/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/@okikio/native@3.0.1/lib/api.es.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
var J={wrapperAttr:"wrapper",headers:[],preventSelfAttr:'prevent="self"',preventAllAttr:'prevent="all"',transitionAttr:"transition",timeout:2e3,maxPages:5,resizeDelay:100,onTransitionPreventClick:!0,cacheIgnore:!1,prefetchIgnore:!1,preventURLs:[],stickyScroll:!1,forceOnError:!0,ignoreHashAction:!1,transitions:[]},G=n=>Object.assign({...J},n),I=(n,e,t=!0)=>{let{prefix:r}=n,i=n[e],s=`data${r?"-"+r:""}-${i}`;return t?`[${s}]`:s};var f=class{constructor(e){this.map=new Map(e)}getMap(){return this.map}get(e){return this.map.get(e)}keys(){return Array.from(this.map.keys())}values(){return Array.from(this.map.values())}set(e,t){return this.map.set(e,t),this}add(e){let r=this.size;return this.set(r,e),this}get size(){return this.map.size}get length(){return this.map.size}last(e=1){let t=this.keys()[this.size-e];return this.get(t)}delete(e){return this.map.delete(e)}remove(e){return this.map.delete(e),this}clear(){return this.map.clear(),this}has(e){return this.map.has(e)}entries(){return this.map.entries()}forEach(e,t){return this.map.forEach(e,t),this}[Symbol.iterator](){return this.entries()}},w=(n,e,...t)=>{n.forEach(r=>{r[e](...t)})};var C=class{constructor(){}install(){}register(e,t){return this.manager=e,this.app=e.app,this.config=e.config,this.emitter=e.emitter,this.key=t,this.install(),this}uninstall(){}unregister(){this.uninstall(),this.manager.remove(this.key),this.key=null,this.manager=null,this.app=null,this.config=null,this.emitter=null}},M=class extends f{constructor(e){super();this.app=e,this.config=e.config,this.emitter=e.emitter}set(e,t){return super.set(e,t),t.register(this,e),this}};var h=(n=window.location.href)=>n instanceof URL?n:new URL(n,window.location.origin),T=n=>{let e=h(n);return`${e.pathname}${e.hash}`},ye=n=>h(n).hash.slice(1),z=n=>h(n).toString().replace(/(\/#.*|\/|#.*)$/,""),U=(n,e)=>z(n)===z(e);var d=class extends C{init(){}boot(){this.initEvents()}initEvents(){}stopEvents(){}stop(){this.stopEvents(),this.unregister()}},F=class extends M{constructor(e){super(e)}init(){return w(this,"init"),this}boot(){return w(this,"boot"),this}stop(){return w(this,"stop"),this}};var A=(n=window.scrollX,e=window.scrollY)=>({x:n,y:e}),D=(n={url:T(h()),index:0,transition:"default",data:{scroll:A(),trigger:"HistoryManager"}})=>n,Q=class extends d{constructor(){super(...arguments);this.pointer=-1}init(){this.states=[];let e=D();this.add(e,"replace")}get(e){return this.states[e]}add(e,t="push"){let r=D(e),i=this.length;this.states.push({...r}),this.pointer=i;let s={index:this.pointer,states:[...this.states]};return Z(t,r,s),this}remove(e){return e?this.states.splice(e,1):this.states.pop(),this.pointer--,this}replace(e){return this.states=e,this}set(e,t){return this.states[e]=t}get current(){return this.get(this.pointer)}get last(){return this.get(this.length-1)}get previous(){return this.pointer<1?null:this.get(this.pointer-1)}get length(){return this.states.length}},Z=(n,e,t)=>{let r=T(e.url),i=[t,"",r];if(window.history)switch(n){case"push":window.history.pushState.apply(window.history,i);break;case"replace":window.history.replaceState.apply(window.history,i);break}};function ee(n){for(var e=[],t=0;t<n.length;){var r=n[t];if(r==="*"||r==="+"||r==="?"){e.push({type:"MODIFIER",index:t,value:n[t++]});continue}if(r==="\\"){e.push({type:"ESCAPED_CHAR",index:t++,value:n[t++]});continue}if(r==="{"){e.push({type:"OPEN",index:t,value:n[t++]});continue}if(r==="}"){e.push({type:"CLOSE",index:t,value:n[t++]});continue}if(r===":"){for(var i="",s=t+1;s<n.length;){var a=n.charCodeAt(s);if(a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||a===95){i+=n[s++];continue}break}if(!i)throw new TypeError("Missing parameter name at "+t);e.push({type:"NAME",index:t,value:i}),t=s;continue}if(r==="("){var l=1,o="",s=t+1;if(n[s]==="?")throw new TypeError('Pattern cannot start with "?" at '+s);for(;s<n.length;){if(n[s]==="\\"){o+=n[s++]+n[s++];continue}if(n[s]===")"){if(l--,l===0){s++;break}}else if(n[s]==="("&&(l++,n[s+1]!=="?"))throw new TypeError("Capturing groups are not allowed at "+s);o+=n[s++]}if(l)throw new TypeError("Unbalanced pattern at "+t);if(!o)throw new TypeError("Missing pattern at "+t);e.push({type:"PATTERN",index:t,value:o}),t=s;continue}e.push({type:"CHAR",index:t,value:n[t++]})}return e.push({type:"END",index:t,value:""}),e}function te(n,e){e===void 0&&(e={});for(var t=ee(n),r=e.prefixes,i=r===void 0?"./":r,s="[^"+L(e.delimiter||"/#?")+"]+?",a=[],l=0,o=0,c="",p=function(b){if(o<t.length&&t[o].type===b)return t[o++].value},m=function(b){var P=p(b);if(P!==void 0)return P;var V=t[o],Y=V.type,X=V.index;throw new TypeError("Unexpected "+Y+" at "+X+", expected "+b)},y=function(){for(var b="",P;P=p("CHAR")||p("ESCAPED_CHAR");)b+=P;return b};o<t.length;){var g=p("CHAR"),R=p("NAME"),S=p("PATTERN");if(R||S){var u=g||"";i.indexOf(u)===-1&&(c+=u,u=""),c&&(a.push(c),c=""),a.push({name:R||l++,prefix:u,suffix:"",pattern:S||s,modifier:p("MODIFIER")||""});continue}var E=g||p("ESCAPED_CHAR");if(E){c+=E;continue}c&&(a.push(c),c="");var x=p("OPEN");if(x){var u=y(),H=p("NAME")||"",v=p("PATTERN")||"",k=y();m("CLOSE"),a.push({name:H||(v?l++:""),pattern:H&&!v?s:v,prefix:u,suffix:k,modifier:p("MODIFIER")||""});continue}m("END")}return a}function L(n){return n.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function $(n){return n&&n.sensitive?"":"i"}function re(n,e){if(!e)return n;for(var t=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,i=t.exec(n.source);i;)e.push({name:i[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),i=t.exec(n.source);return n}function ie(n,e,t){var r=n.map(function(i){return O(i,e,t).source});return new RegExp("(?:"+r.join("|")+")",$(t))}function ne(n,e,t){return se(te(n,t),e,t)}function se(n,e,t){t===void 0&&(t={});for(var r=t.strict,i=r===void 0?!1:r,s=t.start,a=s===void 0?!0:s,l=t.end,o=l===void 0?!0:l,c=t.encode,p=c===void 0?function(b){return b}:c,m="["+L(t.endsWith||"")+"]|$",y="["+L(t.delimiter||"/#?")+"]",g=a?"^":"",R=0,S=n;R<S.length;R++){var u=S[R];if(typeof u=="string")g+=L(p(u));else{var E=L(p(u.prefix)),x=L(p(u.suffix));if(u.pattern)if(e&&e.push(u),E||x)if(u.modifier==="+"||u.modifier==="*"){var H=u.modifier==="*"?"?":"";g+="(?:"+E+"((?:"+u.pattern+")(?:"+x+E+"(?:"+u.pattern+"))*)"+x+")"+H}else g+="(?:"+E+"("+u.pattern+")"+x+")"+u.modifier;else g+="("+u.pattern+")"+u.modifier;else g+="(?:"+E+x+")"+u.modifier}}if(o)i||(g+=y+"?"),g+=t.endsWith?"(?="+m+")":"$";else{var v=n[n.length-1],k=typeof v=="string"?y.indexOf(v[v.length-1])>-1:v===void 0;i||(g+="(?:"+y+"(?="+m+"))?"),k||(g+="(?="+y+"|"+m+")")}return new RegExp(g,$(t))}function O(n,e,t){return n instanceof RegExp?re(n,e):Array.isArray(n)?ie(n,e,t):ne(n,e,t)}var ae=new DOMParser,K=class extends C{constructor(e=h(),t=document){super();this.url=h(e),typeof t=="string"?this.data=t:this.dom=t||document}async build(){if(this.dom instanceof Node||(this.dom=ae.parseFromString(this.data,"text/html")),!(this.body instanceof Node)){let{title:e,head:t,body:r}=this.dom;this.title=e,this.head=t,this.body=r,this.wrapper=this.body.querySelector(this.wrapperAttr)}}install(){this.wrapperAttr=I(this.config,"wrapperAttr")}uninstall(){this.url=null,this.title=null,this.head=null,this.body=null,this.dom=null,this.wrapper=null,this.data=null,this.wrapperAttr=null}},oe=class extends d{constructor(){super();this.loading=new f}install(){this.pages=new M(this.app),this.cacheIgnore=this.config.cacheIgnore;let e=h().pathname;this.set(e,new K),e=null}get(e){return this.pages.get(e)}add(e){return this.pages.add(e),this}set(e,t){return this.pages.set(e,t),this}remove(e){return this.pages.remove(e),this}has(e){return this.pages.has(e)}clear(){return this.pages.clear(),this}get size(){return this.pages.size}keys(){return this.pages.keys()}async load(e=h()){let t=h(e),r=t.pathname,i,s;if(this.has(r)&&!_(r,this.cacheIgnore))return i=this.get(r),Promise.resolve(i);this.loading.has(r)?s=this.loading.get(r):(s=this.request(r),this.loading.set(r,s));let a=await s;if(this.loading.remove(r),i=new K(t,a),this.set(r,i),this.size>this.config.maxPages){let l=h(),o=this.keys(),c=U(l,o[0])?o[1]:o[0],p=this.get(c);p.unregister(),p=null,o=null,l=null,c=null}return i}async request(e){let t=new Headers(this.config.headers),r=window.setTimeout(()=>{window.clearTimeout(r);let i=new Error("Request Timed Out!");throw this.emitter.emit("TIMEOUT_ERROR",i,e),i},this.config.timeout);try{let i=await fetch(e,{mode:"same-origin",method:"GET",headers:t,cache:"default",credentials:"same-origin"});if(window.clearTimeout(r),i.status>=200&&i.status<300)return await i.text();let s=new Error(i.statusText||""+i.status);throw this.emitter.emit("REQUEST_ERROR",s,e),s}catch(i){throw window.clearTimeout(r),i}}},_=(n,e)=>{if(typeof e=="boolean")return e;let t=[];return!e.every(r=>O(r,t,{start:!1,end:!1}).exec(n)==null)};var q=(n,e=window.location.hash)=>{try{let t=e[0]=="#"?e:h(e).hash;if(t.length>1){let r=document.getElementById(t.slice(1));if(r){let{left:i,top:s}=r.getBoundingClientRect(),a=window.scrollX,l=window.scrollY,o=i+a,c=s+l;return A(o,c)}}}catch(t){console.warn("[hashAction] error",t)}return n??A(0,0)},B={name:"replace"},le=class extends d{constructor(e){super();this._arg=e}install(){super.install();let e=this._arg&&this._arg.length?this._arg:this.config.transitions;this.transitions=new f([["default",B],["replace",B]].concat(e))}get(e){return this.transitions.get(e)}set(e,t){return this.transitions.set(e,t),this}add(e){return this.transitions.add(e),this}has(e){return this.transitions.has(e)}async start(e,t){let r=this.transitions.get(e),{oldPage:i,newPage:s,ignoreHashAction:a,trigger:l}=t;if(this.emitter.emit("TRANSITION_START",{transitionName:e,...t}),!("wrapper"in i)||!("wrapper"in s))throw`[TransitionManager] either oldPage or newPage aren't instances of the Page Class.
 ${{newPage:s,oldPage:i}}`;document.title=""+s.title;let o=i.wrapper,c=s.wrapper;if(!(o instanceof Node)||!(c instanceof Node))throw`[TransitionManager] the wrapper from the ${c instanceof Node?"current":"next"} page cannot be found. The wrapper must be an element that has the attribute ${I(this.config,"wrapperAttr")}.`;return r.init&&r?.init(t),this.emitter.emit("BEFORE_TRANSITION_OUT",t),r.out&&await new Promise(p=>{r.out.call(r,{...t,from:i,done:p})?.then(p)}),this.emitter.emit("AFTER_TRANSITION_OUT",t),await new Promise(p=>{o.insertAdjacentElement("beforebegin",c),this.emitter.emit("CONTENT_INSERT",t),p()}),await new Promise(p=>{o.remove(),o=null,c=null,this.emitter.emit("CONTENT_REPLACED",t),!a&&!/back|popstate|forward/.test(l)&&(t.scroll=q(t.scroll)),p()}),this.emitter.emit("BEFORE_TRANSITION_IN",t),r.in&&await new Promise(p=>{r.in.call(r,{...t,from:i,to:s,done:p})?.then(p)}),this.emitter.emit("AFTER_TRANSITION_IN",t),r.manualScroll||(!a&&!/back|popstate|forward/.test(l)&&(t.scroll=q(t.scroll)),window.scroll(t.scroll.x,t.scroll.y)),this.emitter.emit("TRANSITION_END",{transitionName:e,...t}),t}};var W=({callback:n=()=>{},scope:e=null,name:t="event"})=>({callback:n,scope:e,name:t}),N=class extends f{constructor(e="event"){super();this.name=e}},j=class extends f{constructor(){super()}getEvent(e){let t=this.get(e);return t instanceof N?t:(this.set(e,new N(e)),this.get(e))}newListener(e,t,r){let i=this.getEvent(e);return i.add(W({name:e,callback:t,scope:r})),i}on(e,t,r){if(typeof e=="undefined"||e==null)return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let i,s,a=typeof e=="object"&&!Array.isArray(e),l=a?t:r;return a||(s=t),Object.keys(e).forEach(o=>{i=a?o:e[o],a&&(s=e[o]),this.newListener(i,s,l)},this),this}removeListener(e,t,r){let i=this.get(e);if(i instanceof N&&t){let s=W({name:e,callback:t,scope:r});i.forEach((a,l)=>{if(a.callback===s.callback&&a.scope===s.scope)return i.remove(l)})}return i}off(e,t,r){if(typeof e=="undefined"||e==null)return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let i,s,a=typeof e=="object"&&!Array.isArray(e),l=a?t:r;return a||(s=t),Object.keys(e).forEach(o=>{i=a?o:e[o],a&&(s=e[o]),typeof s=="function"?this.removeListener(i,s,l):this.remove(i)},this),this}once(e,t,r){if(typeof e=="undefined"||e==null)return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let i=typeof e=="object"&&!Array.isArray(e);return Object.keys(e).forEach(s=>{let a=i?s:e[s],l=i?e[s]:t,o=i?t:r,c=(...p)=>{l.apply(o,p),this.removeListener(a,c,o)};this.newListener(a,c,o)},this),this}emit(e,...t){return typeof e=="undefined"||e==null?this:(typeof e=="string"&&(e=e.trim().split(/\s/g)),e.forEach(r=>{let i=this.get(r);i instanceof N&&i.forEach(s=>{let{callback:a,scope:l}=s;a.apply(l,t)})},this),this)}clear(){return w(this,"clear"),super.clear(),this}};var pe=class{constructor(e={}){this.canResize=!0;this.canScroll=!0;this._resize=this._resize.bind(this),this._scroll=this._scroll.bind(this),this._ready=this._ready.bind(this),this.register(e)}register(e={}){return this.config=G(e),this.emitter=new j,this.services=new F(this),this}_ready(){document.removeEventListener("DOMContentLoaded",this._ready),window.removeEventListener("load",this._ready),this.emitter.emit("READY ready")}_resize(){if(this.canResize){let e,t;this.canResize=!1,t=window.requestAnimationFrame(()=>{this.emitter.emit("RESIZE resize"),e=window.setTimeout(()=>{this.canResize=!0,e=window.clearTimeout(e),t=window.cancelAnimationFrame(t)},this.config.resizeDelay)})}}_scroll(){if(this.canScroll){let e;this.canScroll=!1,e=requestAnimationFrame(()=>{this.emitter.emit("SCROLL scroll"),this.canScroll=!0,e=window.cancelAnimationFrame(e)})}}get(e){return this.services.get(e)}set(e,t){return this.services.set(e,t),this}add(e){return this.services.add(e),this}boot(){return document.addEventListener("DOMContentLoaded",this._ready),window.addEventListener("load",this._ready),window.addEventListener("resize",this._resize,{passive:!0}),window.addEventListener("scroll",this._scroll,{passive:!0}),this.services.init(),this.services.boot(),this}stop(){return window.removeEventListener("resize",this._resize),window.removeEventListener("scroll",this._scroll),this.services.stop(),this.emitter.clear(),this}on(e,t){return this.emitter.on(e,t,this),this}off(e,t){return this.emitter.off(e,t,this),this}emit(e,...t){return this.emitter.emit(e,...t),this}};var ce=class extends d{install(){super.install(),this.preventURLs=this.config.preventURLs,this.prefetchIgnore=this.config.prefetchIgnore,this.onTransitionPreventClick=this.config.onTransitionPreventClick,this.stickyScroll=this.config.stickyScroll,this.forceOnError=this.config.forceOnError,this.ignoreHashAction=this.config.ignoreHashAction}transitionStart(){this.isTransitioning=!0}transitionStop(){this.isTransitioning=!1}init(){this.onHover=this.onHover.bind(this),this.onClick=this.onClick.bind(this),this.onStateChange=this.onStateChange.bind(this)}boot(){super.boot()}getTransitionName(e){if(!e||!e.getAttribute)return null;let t=e.getAttribute(I(this.config,"transitionAttr",!1));return typeof t=="string"?t:null}validLink(e,t,r){let i=!window.history.pushState,s=!e||!r,a=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey,l=e.hasAttribute("target")&&e.target==="_blank",o=e.protocol!==location.protocol||e.hostname!==location.hostname,c=typeof e.getAttribute("download")=="string",p=e.matches(I(this.config,"preventSelfAttr")),m=Boolean(e.closest(I(this.config,"preventAllAttr"))),y=_(h(r).pathname,this.preventURLs),g=T(h())===T(h(r));return!(s||i||a||l||o||c||p||m||y||g)}getHref(e){return e&&e.tagName&&e.tagName.toLowerCase()==="a"&&typeof e.href=="string"?e.href:null}getLink(e){let t=e.target,r=this.getHref(t);for(;t&&!r;)t=t.parentNode,r=this.getHref(t);if(!(!t||!this.validLink(t,e,r)))return t}onClick(e){let t=this.getLink(e);if(!t)return;if(this.isTransitioning&&this.onTransitionPreventClick){e.preventDefault(),e.stopPropagation();return}let r=this.getHref(t);this.emitter.emit("ANCHOR_CLICK CLICK",e),this.go({href:r,trigger:t,event:e})}getDirection(e){return Math.abs(e)>1?e>0?"forward":"back":e===0?"popstate":e>0?"back":"forward"}force(e){window.location.assign(e)}go({href:e,trigger:t="HistoryManager",event:r}){if(this.isTransitioning&&!this.onTransitionPreventClick||!(this.manager.has("TransitionManager")&&this.manager.has("HistoryManager")&&this.manager.has("PageManager"))){this.force(e);return}let i=this.manager.get("HistoryManager"),s=A(0,0),a=i.current,l=a.url;if(U(l,e))return;let o;if(r&&r.state){this.emitter.emit("POPSTATE",r);let{state:c}=r,{index:p}=c,y=a.index-p;i.replace(c.states),i.pointer=p;let g=i.get(p);o=g.transition,s=g.data.scroll,t=this.getDirection(y),this.emitter.emit(t==="back"?"POPSTATE_BACK":"POPSTATE_FORWARD",r)}else{o=this.getTransitionName(t),s=A();let c=D({url:e,transition:o,data:{scroll:s}});!this.stickyScroll&&(s=A(0,0)),i.add(c),this.emitter.emit("HISTORY_NEW_ITEM",r)}return r&&(r.stopPropagation(),r.preventDefault()),this.emitter.emit("GO",r),this.load({oldHref:l,href:e,trigger:t,transitionName:o,scroll:s})}async load({oldHref:e,href:t,trigger:r,transitionName:i="default",scroll:s={x:0,y:0}}){try{let a=this.manager.get("TransitionManager"),l=this.manager.get("PageManager"),o=this.ignoreHashAction,c,p;this.emitter.emit("NAVIGATION_START",{oldHref:e,href:t,trigger:r,transitionName:i,scroll:s}),a.has(i)||(console.log(`[PJAX] transition name "${i}" doesn't exist, switching to the "default" transition`),i="default");try{this.transitionStart(),this.emitter.emit("PAGE_LOADING",{href:t,oldHref:e,trigger:r,scroll:s}),p=await l.load(e),c=await l.load(t),this.emitter.emit("PAGE_LOAD_COMPLETE",{newPage:c,oldPage:p,trigger:r,scroll:s}),p.dom instanceof Element||p.build(),c.build()}catch(m){console.warn("[PJAX] Page load error",m)}try{s=(await a.start(i,{oldPage:p,newPage:c,trigger:r,scroll:s,ignoreHashAction:o})).scroll}catch(m){console.warn("[PJAX] Transition error",m)}this.emitter.emit("NAVIGATION_END",{oldPage:p,newPage:c,trigger:r,transitionName:i,scroll:s})}catch(a){this.forceOnError?this.force(t):console.warn(a)}finally{this.transitionStop()}}onHover(e){let t=this.getLink(e);if(!t||!this.manager.has("PageManager"))return;let r=this.manager.get("PageManager"),i=h(this.getHref(t)),s=i.pathname;if(this.emitter.emit("ANCHOR_HOVER HOVER",e),!_(i.pathname,this.prefetchIgnore)&&!(r.has(s)&&!_(s,r.cacheIgnore)))try{r.load(i),this.emitter.emit("PREFETCH",e)}catch(a){console.warn("[PJAX] Prefetch error",a)}}onStateChange(e){this.go({href:window.location.href,trigger:"popstate",event:e})}initEvents(){this.prefetchIgnore!==!0&&(document.addEventListener("mouseover",this.onHover),document.addEventListener("touchstart",this.onHover)),document.addEventListener("click",this.onClick),window.addEventListener("popstate",this.onStateChange)}stopEvents(){this.prefetchIgnore!==!0&&(document.removeEventListener("mouseover",this.onHover),document.removeEventListener("touchstart",this.onHover)),document.removeEventListener("click",this.onClick),window.removeEventListener("popstate",this.onStateChange)}};var ue=class extends d{constructor(e=[]){super();this.routes=new f;for(let t of e)this.add(t)}add({path:e,method:t}){let r=this.parse(e);return this.routes.set(r,t),this}parsePath(e){if(typeof e=="string"||e instanceof RegExp||Array.isArray(e))return O(e,[],{start:!1,end:!1});if(typeof e=="boolean")return e&&/.*/;throw"[Router] only regular expressions, strings, booleans and arrays of regular expressions and strings are accepted as paths."}isPath(e){return typeof e=="string"||e instanceof RegExp||typeof e=="boolean"||Array.isArray(e)}parse(e){let t=e,r={from:/.*/,to:/.*/};if(this.isPath(e))r={from:!0,to:e};else if(this.isPath(t.from)&&this.isPath(t.to))r=Object.assign({},r,t);else throw"[Router] path is neither a string, regular expression, or a { from, to } object.";let{from:i,to:s}=r;return{from:this.parsePath(i),to:this.parsePath(s)}}route(){if(this.manager.has("HistoryManager")){let e=this.manager.get("HistoryManager"),t=T(h((e.length>1?e.previous:e.current).url)),r=T(h());this.routes.forEach((i,s)=>{let a=s.from,l=s.to;if(typeof a=="boolean"&&typeof l=="boolean")throw`[Router] path ({ from: ${a}, to: ${l} }) is not valid, remember paths can only be strings, regular expressions, or a boolean; however, both the from and to paths cannot be both booleans.`;let o=a,c=l;a instanceof RegExp&&a.test(t)&&(o=a.exec(t)),l instanceof RegExp&&l.test(r)&&(c=l.exec(r)),(Array.isArray(c)&&Array.isArray(o)||Array.isArray(c)&&o==!1&&!l.test(t)||Array.isArray(o)&&c==!1&&!a.test(r))&&i({from:o,to:c,path:{from:t,to:r}})})}else console.warn("[Route] HistoryManager is missing.")}initEvents(){this.emitter.on("READY",this.route,this),this.emitter.on("CONTENT_REPLACED",this.route,this)}stopEvents(){this.emitter.off("READY",this.route,this),this.emitter.off("CONTENT_REPLACED",this.route,this)}};export{M as AdvancedManager,pe as App,J as CONFIG_DEFAULTS,Q as HistoryManager,f as Manager,C as ManagerItem,ae as PARSER,ce as PJAX,K as Page,oe as PageManager,ue as Router,d as Service,F as ServiceManager,B as TRANSITION_REPLACE,le as TransitionManager,Z as changeState,z as clean,U as equal,ye as getHash,T as getHashedPath,q as hashAction,_ as ignoreURLs,w as methodCall,G as newConfig,A as newCoords,D as newState,h as newURL,I as toAttr};
