File Editor
Directories:
.. (Back)
development
vendor
Files:
a11y.js
a11y.min.js
annotations.js
annotations.min.js
api-fetch.js
api-fetch.min.js
autop.js
autop.min.js
blob.js
blob.min.js
block-directory.js
block-directory.min.js
block-editor.js
block-editor.min.js
block-library.js
block-library.min.js
block-serialization-default-parser.js
block-serialization-default-parser.min.js
blocks.js
blocks.min.js
commands.js
commands.min.js
components.js
components.min.js
compose.js
compose.min.js
core-commands.js
core-commands.min.js
core-data.js
core-data.min.js
customize-widgets.js
customize-widgets.min.js
data-controls.js
data-controls.min.js
data.js
data.min.js
date.js
date.min.js
deprecated.js
deprecated.min.js
dom-ready.js
dom-ready.min.js
dom.js
dom.min.js
edit-post.js
edit-post.min.js
edit-site.js
edit-site.min.js
edit-widgets.js
edit-widgets.min.js
editor.js
editor.min.js
element.js
element.min.js
escape-html.js
escape-html.min.js
format-library.js
format-library.min.js
hooks.js
hooks.min.js
html-entities.js
html-entities.min.js
i18n.js
i18n.min.js
interactivity-router.asset.php
interactivity-router.js
interactivity-router.min.asset.php
interactivity-router.min.js
interactivity.js
interactivity.min.js
is-shallow-equal.js
is-shallow-equal.min.js
keyboard-shortcuts.js
keyboard-shortcuts.min.js
keycodes.js
keycodes.min.js
list-reusable-blocks.js
list-reusable-blocks.min.js
media-utils.js
media-utils.min.js
notices.js
notices.min.js
nux.js
nux.min.js
patterns.js
patterns.min.js
plugins.js
plugins.min.js
preferences-persistence.js
preferences-persistence.min.js
preferences.js
preferences.min.js
primitives.js
primitives.min.js
priority-queue.js
priority-queue.min.js
private-apis.js
private-apis.min.js
redux-routine.js
redux-routine.min.js
reusable-blocks.js
reusable-blocks.min.js
rich-text.js
rich-text.min.js
router.js
router.min.js
server-side-render.js
server-side-render.min.js
shortcode.js
shortcode.min.js
style-engine.js
style-engine.min.js
token-list.js
token-list.min.js
undo-manager.js
undo-manager.min.js
url.js
url.min.js
viewport.js
viewport.min.js
warning.js
warning.min.js
widgets.js
widgets.min.js
wordcount.js
wordcount.min.js
Create New File
Create
Edit File: interactivity-router.min.js
/*! This file is auto-generated */ import*as e from"@wordpress/interactivity";var t={d:(e,o)=>{for(var i in o)t.o(o,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:o[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},o={};t.d(o,{o:()=>x,w:()=>b});const i=(e=>{var o={};return t.d(o,e),o})({getConfig:()=>e.getConfig,privateApis:()=>e.privateApis,store:()=>e.store});var a;const{directivePrefix:n,getRegionRootFragment:r,initialVdom:s,toVdom:c,render:l,parseInitialData:d,populateInitialData:g,batch:w}=(0,i.privateApis)("I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress."),h=null!==(a=(0,i.getConfig)("core/router").navigationMode)&&void 0!==a?a:"regionBased",u=new Map,m=(new Map,e=>{const t=new URL(e,window.location.href);return t.pathname+t.search}),f=async(e,{vdom:t}={})=>{const o={body:void 0};if("regionBased"===h){const i=`data-${n}-router-region`;e.querySelectorAll(`[${i}]`).forEach((e=>{const a=e.getAttribute(i);o[a]=t?.has(e)?t.get(e):c(e)}))}const i=e.querySelector("title")?.innerText,a=d(e);return{regions:o,head:undefined,title:i,initialData:a}},p=e=>{w((()=>{if("regionBased"===h){g(e.initialData);const t=`data-${n}-router-region`;document.querySelectorAll(`[${t}]`).forEach((o=>{const i=o.getAttribute(t),a=r(o);l(e.regions[i],a)}))}e.title&&(document.title=e.title)}))},v=e=>(window.location.assign(e),new Promise((()=>{})));window.addEventListener("popstate",(async()=>{const e=m(window.location.href),t=u.has(e)&&await u.get(e);t?(p(t),b.url=window.location.href):window.location.reload()})),u.set(m(window.location.href),Promise.resolve(f(document,{vdom:s})));let y="";const{state:b,actions:x}=(0,i.store)("core/router",{state:{url:window.location.href,navigation:{hasStarted:!1,hasFinished:!1,texts:{loading:"",loaded:""},message:""}},actions:{*navigate(e,t={}){const{clientNavigationDisabled:o}=(0,i.getConfig)();o&&(yield v(e));const a=m(e),{navigation:n}=b,{loadingAnimation:r=!0,screenReaderAnnouncement:s=!0,timeout:c=1e4}=t;y=e,x.prefetch(a,t);const l=new Promise((e=>setTimeout(e,c))),d=setTimeout((()=>{y===e&&(r&&(n.hasStarted=!0,n.hasFinished=!1),s&&(n.message=n.texts.loading))}),400),g=yield Promise.race([u.get(a),l]);if(clearTimeout(d),y===e)if(g&&!g.initialData?.config?.["core/router"]?.clientNavigationDisabled){yield p(g),window.history[t.replace?"replaceState":"pushState"]({},"",e),b.url=e,r&&(n.hasStarted=!1,n.hasFinished=!0),s&&(n.message=n.texts.loaded+(n.message===n.texts.loaded?" ":""));const{hash:o}=new URL(e,window.location.href);o&&document.querySelector(o)?.scrollIntoView()}else yield v(e)},prefetch(e,t={}){const{clientNavigationDisabled:o}=(0,i.getConfig)();if(o)return;const a=m(e);!t.force&&u.has(a)||u.set(a,(async(e,{html:t})=>{try{if(!t){const o=await window.fetch(e);if(200!==o.status)return!1;t=await o.text()}const o=(new window.DOMParser).parseFromString(t,"text/html");return f(o)}catch(e){return!1}})(a,{html:t.html}))}}});var A=o.o,P=o.w;export{A as actions,P as state};
Save Changes
Rename File
Rename