[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/blocks/ -> query.min.js (source)

   1  import*as e from"@wordpress/interactivity";var t,n,r={998:function(t,n,r){t.exports=(e=>{var t={};return r.d(t,e),t})({directivePrefix:()=>e.directivePrefix,getContext:()=>e.getContext,getElement:()=>e.getElement,getRegionRootFragment:()=>e.getRegionRootFragment,render:()=>e.render,store:()=>e.store,toVdom:()=>e.toVdom})}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,i),n.exports}i.m=r,i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=function(e){return Promise.all(Object.keys(i.f).reduce((function(t,n){return i.f[n](e,t),t}),[]))},i.u=function(e){return"./blocks/"+e+".min.js"},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t={},n="WordPress:",i.l=function(e,r,o,a){if(t[e])t[e].push(r);else{var s,u;if(void 0!==o)for(var c=document.getElementsByTagName("script"),f=0;f<c.length;f++){var l=c[f];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==n+o){s=l;break}}s||(u=!0,(s=document.createElement("script")).type="module",s.charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",n+o),s.src=e),t[e]=[r];var d=function(n,r){s.onerror=s.onload=null,clearTimeout(m);var o=t[e];if(delete t[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((function(e){return e(r)})),n)return n(r)},m=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),u&&document.head.appendChild(s)}},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;if("string"==typeof import.meta.url&&(e=import.meta.url),!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e+"../"}(),function(){var e={658:0};i.f.j=function(t,n){var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((function(n,o){r=e[t]=[n,o]}));n.push(r[2]=o);var a=i.p+i.u(t),s=new Error;i.l(a,(function(n){if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,r[1](s)}}),"chunk-"+t,t)}};var t=function(t,n){var r,o,a=n[0],s=n[1],u=n[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(u)u(i)}for(t&&t(n);c<a.length;c++)o=a[c],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunkWordPress=self.webpackChunkWordPress||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),function(){var e=i(998);const t=e=>e&&e instanceof window.HTMLAnchorElement&&e.href&&(!e.target||"_self"===e.target)&&e.origin===window.location.origin;(0,e.store)("core/query",{state:{get startAnimation(){return"start"===(0,e.getContext)().animation},get finishAnimation(){return"finish"===(0,e.getContext)().animation}},actions:{*navigate(n){const r=(0,e.getContext)(),{ref:o}=(0,e.getElement)(),{queryRef:a}=r,s=a?.dataset.wpNavigationDisabled;if(t(o)&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey||e.defaultPrevented))(n)&&!s){n.preventDefault();const e=setTimeout((()=>{r.message=r.loadingText,r.animation="start"}),400),{actions:t}=yield i.e(908).then(i.bind(i,908));yield t.navigate(o.href),clearTimeout(e),r.message=r.loadedText+(r.message===r.loadedText?" ":""),r.animation="finish",r.url=o.href;const s=".wp-block-post-template a[href]";a.querySelector(s)?.focus()}},*prefetch(){const{queryRef:n}=(0,e.getContext)(),{ref:r}=(0,e.getElement)(),o=n?.dataset.wpNavigationDisabled;if(t(r)&&!o){const{actions:e}=yield i.e(908).then(i.bind(i,908));yield e.prefetch(r.href)}}},callbacks:{*prefetch(){const{url:n}=(0,e.getContext)(),{ref:r}=(0,e.getElement)();if(n&&t(r)){const{actions:e}=yield i.e(908).then(i.bind(i,908));yield e.prefetch(r.href)}},setQueryRef(){const t=(0,e.getContext)(),{ref:n}=(0,e.getElement)();t.queryRef=n}}})}();


Generated : Wed Jan 31 08:20:02 2024 Cross-referenced by PHPXref