@fox-js/fox 3.1.1-9 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/libs/index.cjs.js +1 -3
- package/libs/index.esm.d.ts +794 -144
- package/libs/index.esm.js +2524 -4207
- package/libs/index.umd.js +1 -3
- package/libs/style.css +2 -1
- package/package.json +3 -5
package/libs/index.umd.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
(function(g,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],b):(g=typeof globalThis<"u"?globalThis:g||self,b(g.Fox={},g.Vue))})(this,function(g,b){"use strict";/*!
|
|
2
|
-
* fox v3.1.0 Fri Apr 18 2025 09:04:17 GMT+0800 (中国标准时间)
|
|
3
|
-
*/const ge=typeof window<"u",N=function(){return window},Xe=function(){return window.document};function hr(r){let e=r,t=e.lastIndexOf("/");return t>0&&t<e.length-1?e=e.substring(0,t+1):t===0&&e.indexOf(".")!==-1?e="/":t===-1&&(e.indexOf(".")==-1?e=`/${e}/`:e="/"),e.indexOf("/")!==0&&(e=`/${e}`),e}function Rt(){if(!ge)return"/";let r=N().location,e=`${r.protocol}//${r.host}`;return e+=hr(r.pathname),e}function Qe(r,e,t,s=!1){r.addEventListener?r.addEventListener(e,t,s):r.attachEvent?r.attachEvent(`on${e}`,t):r[`on${e}`]=t}function St(r,e,t){r.removeEventListener?r.removeEventListener(e,t):r.detachEvent?r.detachEvent(`on${e}`,t):r[`on${e}`]=null}const Ye=(r,e,t)=>{e=e??{bubbles:!1,cancelable:!1,detail:void 0};const s=document.createEvent("Events");let n=!0,i=!0;for(let a in e)a==="bubbles"?n=!!e[a]:a==="cancelable"?i=!!e[a]:s[a]=e[a];s.initEvent(r,n,i),(t??document).dispatchEvent(s)},yr=Array.isArray,dr=r=>Ze(r)==="[object Map]",mr=r=>Ze(r)==="[object Set]",pr=r=>r instanceof Date,L=r=>typeof r=="function",gr=r=>typeof r=="string",vr=r=>typeof r=="symbol",us=r=>r!==null&&typeof r=="object",wr=r=>us(r)&&L(r.then)&&L(r.catch),Le=r=>r==null,br=Object.prototype.toString,Ze=r=>br.call(r),cs=r=>Ze(r)==="[object Object]",Rr=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function xt(r){return r.__esModule||Rr&&r[Symbol.toStringTag]==="Module"}const Sr=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function D(...r){let e=r[0]!==void 0&&r[0]!==null?r[0]:{},t=1,s=r.length,n=!1;for(typeof e=="boolean"&&(n=e,e=r[t]??{},t++),typeof e!="object"&&(e={});t<s;t++)if(r[t]!==null&&r[t]!==void 0){let i=r[t];for(let o in i){let a=e[o],l=i[o];if(a!==l)if(n===!0&&l&&typeof l=="object"){let u;Array.isArray(l)?u=a&&Array.isArray(a)?a:[]:u=a&&typeof a=="object"?a:{},e[o]=D(n,u,l)}else l!==void 0&&(e[o]=l)}}return e}function et(r,e,t=!1){if(!t)D(!0,r,e);else{if(typeof e!="object")return{};typeof r!="object"&&(r={});for(let s of Reflect.ownKeys(e)){let n=r[s],i=e[s];if(n!==i)if(typeof i=="object"){if(!Array.isArray(i)&&!cs(i))continue;n=et(n,i,t),r[s]=n}else{if(typeof i=="function")continue;r[s]=i}}}return r}class fe{static seed=new Date().getTime();static get(){let e=++fe.seed;return e>=Number.MAX_VALUE&&(fe.seed=0),e}}const Pt=Sr?Promise.resolve():null;function ke(r,...e){Pt!==null?e&&e.length>0?Pt.then(()=>{r(e)}):Pt.then(r):e&&e.length>0?setTimeout(()=>{r(e)}):setTimeout(r)}function Et(r){return r==null?!1:typeof r=="boolean"?r:typeof r=="string"?r.toLocaleLowerCase()==="true":!!r}function xr(r){return typeof r=="number"?r:Number(r)}const Pr={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Object]":"object"};function Ct(r){let t=Object.prototype.toString.call(r);return r==null?String(r):Pr[t]||"object"}function $t(r,e){if(r==e)return!0;if(r===void 0||e===void 0)return!1;let t=Ct(r),s=Ct(e);if(t!==s)return!1;if(t==="object"){let n=Object.keys(r),i=Object.keys(e);if(n.length!==i.length)return!1;for(let o=0;o<n.length;o++){let a=n[o],l=r[a],u=e[a];if(!$t(l,u))return!1}return!0}else if(t==="array"){if(r.length!==e.length)return!1;for(let n=0;n<r.length;n++){let i=r[n],o=e[n];if(!$t(i,o))return!1}return!0}return!1}const fs=r=>{const e={};for(let t of Reflect.ownKeys(r)){let s=r[t];s&&!Array.isArray(s)&&typeof s=="object"&&(s=fs(s)),typeof t=="symbol"?e[String(t)]=s:e[t]=s}return e},Er=/^Symbol\((.*)\)$/,hs=r=>{const e={};for(let t of Reflect.ownKeys(r)){let s=r[t];s&&!Array.isArray(s)&&typeof s=="object"&&(s=hs(s));const n=Er.exec(t);if(n&&n[1]){const i=Symbol.for(n[1]);e[i]=s}else e[t]=s}return e};function ys(r,e){let t=null;return function(...s){t&&clearTimeout(t),t=setTimeout(()=>{t=null,Reflect.apply(r,null,[...s])},e)}}const ds=Symbol("idKey"),ve=Symbol("valueKey"),k=Symbol("childrenKey"),re=Symbol("growKey");class ms{[re]=!0;[ds];[ve]=b.ref();[k]=new Map;constructor(e){this[ds]=e}}class Cr{get(e,t){if(t=="value")return e[ve].value;if(t==="grow")return e[re];let s=e[k].get(t);if(s)return Oe(s);if(e[re])return s=At(t),s[re]=e[re],e[k].set(t,s),Oe(s)}set(e,t,s){return t=="value"?(e[ve].value=s,!0):t==="grow"?(e[re]=Et(s),!0):s==null?(e[k].delete(t),!0):(console.error(`illegal property:${t}`),!1)}deleteProperty(e,t){return t==="value"||t=="grow"?(console.error(`can not delete property:${String(t)}`),!1):(e[k].delete(t),!0)}}const Ft="__proxy__";function At(r){const e=new ms(r);return Reflect.set(e,Ft,new Proxy(e,new Cr)),e}function Oe(r){return Reflect.get(r,Ft)}let $r=class{name="";persistPolicy="memory";storage;initFlag=!1;state={};constructor(e={},t){if(e.persistPolicy&&e.persistPolicy!=="memory"&&Le(e.name))throw new Error("name can not be empty, where persistPolicy is not memory.");this.name=e.name??"",this.persistPolicy=e.persistPolicy??"memory",this.storage=e.storage,t&&typeof t=="object"&&Object.assign(this.state,t)}init(e){this.restore(e),this.initFlag=!0}getStorage(){if(!this.persistPolicy||this.persistPolicy==="memory")return null;let e=null;if(this.persistPolicy==="custom")e=this.storage;else if(ge){const t=N();e=this.persistPolicy==="session"?t.sessionStorage:t.localStorage}return e}saveState(){if(!this.persistPolicy||this.persistPolicy==="memory")return;let e=this.getStorage();if(e===null||!this.state)return;const t=`_bus_${this.name}`,s=JSON.stringify(this.state??{});e.setItem(t,s)}removeState(){if(!this.persistPolicy||this.persistPolicy==="memory")return;let e=this.getStorage();if(e===null||!this.state)return;const t=`_bus_${this.name}`;e.removeItem(t)}restore(e){if(!this.persistPolicy||this.persistPolicy==="memory")return;let t=this.getStorage();if(t===null)return;const s=`_bus_${this.name}`,n=t.getItem(s);if(n){const i=JSON.parse(n);Object.assign(this.state,i),Reflect.ownKeys(this.state).forEach(a=>{if(typeof a!="string")return;const l=this.state[a],u=a.split(/\//g);u.push(l),Reflect.apply(e.put,e,u)})}}put(e){if(this.initFlag&&this.persistPolicy!=="memory")try{const t=e.length,s=e.slice(0,t-1).join("/"),n=e[t-1];this.state[s]=n,this.saveState()}catch(t){console.error(t)}}remove(e){if(this.initFlag&&this.persistPolicy!=="memory")try{const t=e.length,s=e.slice(0,t-1).join("/"),n={};Reflect.ownKeys(this.state).forEach(o=>{typeof o=="string"&&(o===s||o.startsWith(s)||(n[o]=this.state[o]))}),this.state=n,this.saveState()}catch(t){console.error(t)}}clear(){if(this.initFlag)try{this.state={},this.removeState()}catch(e){console.error(e)}}};class ps extends ms{_persistHandler;constructor(e={},t){super("__root__"),this._persistHandler=new $r(e,t),this._persistHandler.init(this)}put(...e){let t=e.length;if(t<2)return console.error("参数至少包括一个(key, value)"),!1;let s=this;for(let n=0;n<t-1;n++){let i=e[n],o;s[k].has(i)?o=s[k].get(i):(o=At(i),s[k].set(i,o)),s=o}return s[ve].value=e[t-1],this._persistHandler.put(e),!0}get(...e){let t=e.length;if(t===0)return;let s=this;for(let n=0;n<t;n++){let i=e[n];if(s[k].has(i))s=s[k].get(i);else return}return s[ve].value}remove(...e){let t=e.length;if(t==0)return!1;let s=this;for(let i=0;i<t-1;i++){const o=e[i];if(s[k].has(o))s=s[k].get(o);else return!1}const n=e[t-1];return s[k].has(n)?(s[k].delete(n),this._persistHandler.remove(e),!0):!1}contains(...e){const t=e.length;if(t==0)return!1;let s=this;for(let i=0;i<t-1;i++){let o=e[i];if(s[k].has(o))s=s[k].get(o);else return!1}const n=e[t-1];return s[k].has(n)}clear(){this[k].clear(),this._persistHandler.clear()}}const Fr=["put","get","contains","remove","clear","_persistHandler"];function gs(r){return Fr.includes(r)}class Ar{get(e,t){if(t=="value")return e[ve].value;if(t==="grow")return e[re];if(t===k)return e[k];if(typeof t=="string"&&gs(t))return e[t];const s=String(t);let n=e[k].get(s);if(n)return Oe(n);if(e[re])return n=At(s),n[re]=e[re],e[k].set(s,n),Oe(n)}set(e,t,s){return t=="value"?(e[ve].value=s,!0):t==="grow"?(e[re]=Et(s),!0):gs(t)?!1:s==null?(e[k].delete(t),!0):(console.error(`illegal property:${t}`),!1)}deleteProperty(e,t){return t==="value"||t=="grow"?(console.error(`can not delete property:${String(t)}`),!1):(e[k].delete(t),!0)}}function Tr(r,e){const t=new ps(r,e),s=new Ar,n=new Proxy(t,s);return Reflect.set(t,Ft,n),t}const Tt=new Proxy(ps,{construct(r,e){const t=e[0]??{},s=e[1],n=Tr(t,s);return Oe(n)}}),Kt=r=>!r||typeof r!="object"?!0:Reflect.ownKeys(r).length===0;class vs{name="";persistPolicy="memory";storage;constructor(e={}){if(e.persistPolicy&&e.persistPolicy!=="memory"&&Le(e.name))throw new Error("name can not be empty, where persistPolicy is not memory.");this.name=e.name??"",this.persistPolicy=e.persistPolicy??"memory",this.storage=e.storage}getStorage(){if(!this.persistPolicy||this.persistPolicy==="memory")return null;let e=null;if(this.persistPolicy==="custom")e=this.storage;else if(ge){const t=N();e=this.persistPolicy==="session"?t.sessionStorage:t.localStorage}return e}saveState(e){if(!this.persistPolicy||this.persistPolicy==="memory")return;let t=this.getStorage();if(t===null||Kt(e))return;const s=`_state_${this.name}`,n=JSON.stringify(e??{});t.setItem(s,n)}removeState(){if(!this.persistPolicy||this.persistPolicy==="memory")return;let e=this.getStorage();if(e===null)return;const t=`_state_${this.name}`;e.removeItem(t)}restore(e){if(!this.persistPolicy||this.persistPolicy==="memory")return;let t=this.getStorage();if(t===null)return;const s=`_state_${this.name}`,n=t.getItem(s);if(n){const i=JSON.parse(n);Object.assign(e,i)}}}function ws(r,e,t){const s=new vs(t);s.restore(e);const n=l=>{const u=b.toRaw(l),c={};for(let h in u){const f=u[h];Le(f)||(c[h]=f)}Kt(c)?s.removeState():s.saveState(c)};let i=null;if(t&&t.debounce===!1)i=n;else{const l=t&&t.debounceDelay?t.debounceDelay:250;i=ys(n,l)}const o=r?b.shallowReactive(e):b.reactive(e);return b.effectScope(!0).run(()=>{b.watch(o,l=>{const u=b.toRaw(l);i(u)})}),o}function Kr(r,e){return ws(!1,r,e)}function _r(r,e){return ws(!0,r,e)}function jr(r,e){const t=new vs(e);t.restore(r);const s=a=>{const l=b.toRaw(a),u={};for(let c in l){const h=l[c];Le(h)||(u[c]=h)}Kt(u)?t.removeState():t.saveState(u)};let n=null;if(e&&e.debounce===!1)n=s;else{const a=e&&e.debounceDelay?e.debounceDelay:250;n=ys(s,a)}const i={get(a,l){return a[l]},set(a,l,u){return a[l]=u,n(a),!0}};return new Proxy(r,i)}function qr(r,e){return jr(r,e)}const le="default",bs=Symbol("sync"),W=Symbol("normalizeRoute");function Rs(r){let e=!1;return function(...t){if(!e)return e=!0,Reflect.apply(r,{},t)}}function Lr(r){let e=r.src;return new Promise((t,s)=>{const n=Rs(a=>{xt(a)&&(a=a.default),r.component=a,console.debug("success load async module"),t()}),i=Rs(a=>{console.debug("reject load async module"),s(a)});let o;try{o=e(n,i)}catch(a){i(a)}if(o)if(typeof o.then=="function")o.then(n,i);else{const a=o.component;a&&typeof a.then=="function"&&a.then(n,i)}})}class kr{name;level;rootName;rootIndex=0;constructor(e,t,s,n){this.name=e,this.level=t,this.rootName=s,this.rootIndex=n}}class Ce{to;routeModel;from;data={};constructor(e,t){this.to=e,this.from=t}static from(e){const t=new Ce(e.to,e.from),s=e.data??{};return D(!0,t.data,s),t}static clear(e){for(let t in e)e[t]=void 0}}class O{path;get fullPath(){const e=this.path??`/${this.name}`;return`${this.root??le}!${e}`}alias;name;root;params;query;traceless;template;matched;meta;success;error;destroy;opsType;updateType;historyUpdatePolicy;viewTagAttrs;index;active;slot;static clone(e,t){let s=new O;return et(s,e,t),s}static isSame(e,t){return e===t?!0:!(e==null||t==null||e.path&&e.path!==t.path||e.name&&e.name!==t.name||e.root!==t.root||e.index!==t.index)}static isSameForRouteModel(e,t){return e===t?!0:!(e==null||t==null||e.path&&e.path!=t.path||e.name&&e.name!=t.name)}static from(e){let t=new O;if(e==null)return t;let s=t;for(let i in e){let o=e[i];s[i]=o}const n=Object.getOwnPropertySymbols(e);if(Array.isArray(n)&&n.length>0)for(let i of n)s[i]=e[i];return t}}class Or{id;name;props;meta;src;component;constructor(e,t,s,n){this.id=fe.get(),this.name=e,this.src=t,typeof t!="function"&&(this.component=t),this.props=s,this.meta=n}get isResolved(){return this.component!==void 0}resolve(){return Lr(this)}}class Ss{models=[]}class _t{path;match;redirect;name;layers=[]}var I=(r=>(r[r.Push=0]="Push",r[r.Replace=1]="Replace",r[r.Put=2]="Put",r[r.Append=3]="Append",r[r.Open=4]="Open",r))(I||{});const xs="FoxBeforeEnter",Ps="FoxEnter",Es="FoxLeave",Cs="FoxLeave",tt="FoxLeaveEnd",Y=Symbol("chainKey"),G=Symbol("cursorKey"),jt=Symbol("$persistentModeKey"),H=Symbol("statusKey"),ae=Symbol("argsKey"),st=Symbol("exArgsKey"),$e=Symbol("successFnsKey"),Me=Symbol("errorFnsKey"),he=Symbol("sessionKey"),ue=Symbol("_go");class Ie{[Y]=[];[G]=0;[jt]=!1;[H]="Free";[ae]=[];[st]=[];[$e]=[];[Me]=[];[he];get session(){return this[he]}constructor(e,t=!1){this[he]=e,this[jt]=t}[ue](e,...t){let s=this[H];if(this[H]="Busy",this[G]+=e,this[G]<0&&(this[G]=0),this[ae]=t,s==="Exception"||s==="Reject"){let a=[{session:this[he]},...this[st]];for(;this[Me].length>0;)try{let l=this[Me].shift();typeof l=="function"&&ke(()=>{Reflect.apply(l,{},a)})}catch(l){console.error(l.message,l)}return this[H]=s,this[Y]=[],this[G]=0,this}else if(s==="Finished"||this[G]>=this[Y].length){let a=[{session:this[he]},...this[ae]];for(;this[$e].length>0;){let l=this[$e].shift();typeof l=="function"&&ke(()=>{Reflect.apply(l,{},a)})}return this[H]="Free",this}if(this[G]>=this[Y].length)return this[H]="Free",this;let n=this[Y][this[G]];this[jt]||(this[Y].splice(0,this[G]+1),this[G]=-1);let i=this[G]+1;try{let o=!1,a={go:(l,...u)=>{o||(o=!0,Reflect.apply(this[ue],this,[l,...u]))},resolve:(...l)=>{o||(o=!0,Reflect.apply(this[ue],this,[1,...l]))},reject:(...l)=>{o||(o=!0,Reflect.apply(this.reject,this,[...l]))},insert:l=>{o||(this[Y].splice(i,0,l),i++)},session:this[he]};ke(()=>{Reflect.apply(n,{},[a,...this[ae]])})}catch(o){this.throw(o)}return this}go(e,...t){return Reflect.apply(this[ue],this,[e,...t])}finish(...e){return this[H]="Finished",this[ae]=e,Reflect.apply(this[ue],this,[0])}reject(...e){return this[H]="Reject",this[st]=e,Reflect.apply(this[ue],this,[0])}throw(...e){return this[H]="Exception",this[st]=e,Reflect.apply(this[ue],this,[0])}reset(...e){this[H]="Busy",this[ae]=e,this[Y]=[],this[G]=0;let s=[{session:this[he]},...this[ae]];for(;this[$e].length>0;){let n=this[$e].shift();ke(()=>{Reflect.apply(n,this,s)})}return this[H]="Free",this}post(e){return this[H]==="Reject"||this[H]==="Exception"?this:(Array.isArray(e)?this[Y]=[...this[Y],...e]:this[Y].push(e),this[H]==="Busy"?this:(Reflect.apply(this[ue],this,[0,...this[ae]]),this))}wait(e,t){return e&&typeof e=="function"&&this[$e].push(e),t&&typeof t=="function"&&this[Me].push(t),this[H]==="Busy"?this:(Reflect.apply(this[ue],this,[0,...this[ae]]),this)}exception(e){return e&&typeof e=="function"&&this[Me].push(e),this[H]==="Busy"?this:Reflect.apply(this[ue],this,[0,...this[ae]])}isFinish(){return this[H]=="Reject"||this[H]=="Free"&&this[G]>=this[Y].length}}const Fe=Symbol("registerKey");class Mr{policy;callback;constructor(e,t){this.callback=e,this.policy=t}}class qt{[Fe]=new Map;constructor(){}on(e,t,s=!1){let n=this[Fe].get(e);n||(n=new Array,this[Fe].set(e,n));let i=s===!0?1:0,o=new Mr(t,i);return n.push(o),this}off(e,t){if(!t)return this[Fe].delete(e),this;let s=this[Fe].get(e);if(s){for(let n=0;n<s.length;n++)if(s[n].callback===t){s.splice(n,1);break}}return this}bind(e,t,s=!1){return this.on(e,t,s)}unbind(e,t){return this.off(e,t)}once(e,t){return this.on(e,t,!0)}all(...e){let t=e.length;if(t<1)return this;let s=e[t-1];if(typeof s!="function")return console.error("callback can not benn empty"),this;let n=t-1,i=new Array(n),o=[].splice.call(e,0,n);for(let a=0;a<o.length;a++)this.once(o[a],l=>{i[a]=l,n-=1,n==0&&Reflect.apply(s,{},i)});return this}emit(e,...t){let s=this[Fe].get(e);if(!s)return this;for(let n=0;n<s.length;){let i=s[n];if(i.policy==1?s.splice(n,1):n++,typeof i.callback=="function")try{ke(()=>{Reflect.apply(i.callback,{},t)})}catch(o){console.error(o.message,o)}}return this}trigger(e,...t){return Reflect.apply(this.emit,this,[e,...t])}}const Ne=Symbol("registerKey");class Ir{[Ne]=new Map;constructor(){}set(e,t){this[Ne].set(e,t)}get(e){return this[Ne].get(e)}has(e){return this[Ne].has(e)}delete(e){return this[Ne].delete(e)}}const we=Symbol("lc");function rt(r,e=!1){let t=r;if(Reflect.has(t,we))return t[we];if(e){const s=new Ir;return t[we]=s,s}return null}function $s(r,e=!1){let t=null,s=r;for(;s&&!(Reflect.has(s,we)&&(t=s[we],t));)s=s.$parent;if(!t&&e){const n=r;n&&n.$parent&&(t=rt(n.$parent,e))}return t}function Lt(r,e){let t=r;for(;t;){if(Reflect.has(t,we)){const s=t[we];if(s.has(e))return s.get(e)}t=t.$parent}return null}function Nr(r,e,t){$s(r,!0)?.set(e,t)}function Dr(r,e){$s(r,!0)?.delete(e)}function Fs(r){if(Array.isArray(r.children)&&r.children.length>0){let e=r.children[0];if(e!=null&&e.component!=null&&e.component.proxy!=null)return rt(e.component.proxy,!1)}return null}const nt=Symbol("hooksKey");function Hr(r){let e=r.get(nt);e||(e=[],r.set(nt,e))}function As(r,e){let t=r.get(nt);if(t!=null)for(let s=t.length-1;s>=0;s--){let n=t[s];if(n.type===e)try{Reflect.apply(n.hook,n.target,[])}catch(i){console.error(i.message,i)}}}var kt=(r=>(r.DEACTIVATED="da",r.ACTIVATED="a",r))(kt||{});class Ur{type;hook;target;constructor(e,t,s){this.target=s,this.hook=t,this.type=e}}function Br(r,e,t,s){let n=new Ur(e,t,s);return r.push(n),!0}function Vr(r,e,t,s){let n=-1;for(let i=0;i<r.length;i++){let o=r[i];if(o.type===e&&o.hook===t&&o.target===s){n=i;break}}return n!=-1?(r.splice(n,1),!0):!1}function Ts(r){return(e,t)=>{let s;if(t)s=t;else{const i=b.getCurrentInstance();if(i==null||i.proxy==null){console.error("can not get current instance or proxy");return}s=i.proxy}const n=Lt(s,nt);if(n==null){console.warn("hooks context not found");return}b.onUnmounted(()=>{Vr(n,r,e,s)}),Br(n,r,e,s)}}const zr=Ts("a"),Jr=Ts("da"),Ks=Symbol("routeKey");function _s(r,e){r.set(Ks,e)}function Ot(r){let e=Lt(r,Ks);return typeof e=="function"?e():e??null}const it=Symbol("rk"),Mt=Symbol("vd"),js=Symbol("rv"),It=Symbol("rvi"),qs=Symbol("pv"),Nt=Symbol("pvi");var ce={},Ls;function Wr(){if(Ls)return ce;Ls=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.TokenData=void 0,ce.parse=l,ce.compile=u,ce.match=f,ce.pathToRegexp=oe;const r="/",e=m=>m,t=/^\p{XID_Continue}$/u,s="https://git.new/pathToRegexpError",n={"!":"!","@":"@",";":";",",":",","*":"*","+":"+","?":"?","{":"{","}":"}"};function i(m){const y=[...m],p=[];let v=0;for(;v<y.length;){const $=y[v],x=n[$];if(x){p.push({type:x,index:v++,value:$});continue}if($==="\\"){p.push({type:"ESCAPED",index:v++,value:y[v++]});continue}if($===":"){let F="";for(;t.test(y[++v]);)F+=y[v];if(!F)throw new TypeError(`Missing parameter name at ${v}`);p.push({type:"NAME",index:v,value:F});continue}if($==="("){const F=v++;let T=1,E="";if(y[v]==="?")throw new TypeError(`Pattern cannot start with "?" at ${v}`);for(;v<y.length;){if(y[v]==="\\"){E+=y[v++]+y[v++];continue}if(y[v]===")"){if(T--,T===0){v++;break}}else if(y[v]==="("&&(T++,y[v+1]!=="?"))throw new TypeError(`Capturing groups are not allowed at ${v}`);E+=y[v++]}if(T)throw new TypeError(`Unbalanced pattern at ${F}`);if(!E)throw new TypeError(`Missing pattern at ${F}`);p.push({type:"PATTERN",index:v,value:E});continue}p.push({type:"CHAR",index:v,value:y[v++]})}return p.push({type:"END",index:v,value:""}),new o(p)}class o{constructor(y){this.tokens=y,this.index=0}peek(){return this.tokens[this.index]}tryConsume(y){const p=this.peek();if(p.type===y)return this.index++,p.value}consume(y){const p=this.tryConsume(y);if(p!==void 0)return p;const{type:v,index:$}=this.peek();throw new TypeError(`Unexpected ${v} at ${$}, expected ${y}: ${s}`)}text(){let y="",p;for(;p=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)y+=p;return y}modifier(){return this.tryConsume("?")||this.tryConsume("*")||this.tryConsume("+")}}class a{constructor(y,p){this.tokens=y,this.delimiter=p}}ce.TokenData=a;function l(m,y={}){const{encodePath:p=e,delimiter:v=p(r)}=y,$=[],x=i(m);let F=0;do{const T=x.text();T&&$.push(p(T));const E=x.tryConsume("NAME"),q=x.tryConsume("PATTERN");if(E||q){$.push({name:E||String(F++),pattern:q});const j=x.peek();if(j.type==="*")throw new TypeError(`Unexpected * at ${j.index}, you probably want \`/*\` or \`{/:foo}*\`: ${s}`);continue}if(x.tryConsume("*")){$.push({name:String(F++),pattern:`(?:(?!${d(v)}).)*`,modifier:"*",separator:v});continue}if(x.tryConsume("{")){const j=x.text(),z=x.tryConsume("NAME"),Q=x.tryConsume("PATTERN"),B=x.text(),pe=x.tryConsume(";")&&x.text();x.consume("}");const Ee=x.modifier();$.push({name:z||(Q?String(F++):""),prefix:p(j),suffix:p(B),pattern:Q,modifier:Ee,separator:pe});continue}x.consume("END");break}while(!0);return new a($,v)}function u(m,y={}){const p=m instanceof a?m:l(m,y);return h(p,y)}function c(m,y){if(typeof m=="string")return()=>m;const p=y||e,v=m.modifier==="+"||m.modifier==="*",$=m.modifier==="?"||m.modifier==="*",{prefix:x="",suffix:F="",separator:T=F+x}=m;if(y&&v){const q=(_,j)=>{if(typeof _!="string")throw new TypeError(`Expected "${m.name}/${j}" to be a string`);return p(_)},K=_=>{if(!Array.isArray(_))throw new TypeError(`Expected "${m.name}" to be an array`);return _.length===0?"":x+_.map(q).join(T)+F};return $?_=>{const j=_[m.name];return j==null?"":j.length?K(j):""}:_=>{const j=_[m.name];return K(j)}}const E=q=>{if(typeof q!="string")throw new TypeError(`Expected "${m.name}" to be a string`);return x+p(q)+F};return $?q=>{const K=q[m.name];return K==null?"":E(K)}:q=>{const K=q[m.name];return E(K)}}function h(m,y){const{encode:p=encodeURIComponent,loose:v=!0,validate:$=!0,strict:x=!1}=y,F=P(y),T=R(v,m.delimiter),E=S(m,T,[],F,x),q=m.tokens.map((K,_)=>{const j=c(K,p);if(!$||typeof K=="string")return j;const z=new RegExp(`^${E[_]}$`,F);return Q=>{const B=j(Q);if(!z.test(B))throw new TypeError(`Invalid value for "${K.name}": ${JSON.stringify(B)}`);return B}});return function(_={}){let j="";for(const z of q)j+=z(_);return j}}function f(m,y={}){const{decode:p=decodeURIComponent,loose:v=!0}=y,$=m instanceof a?m:l(m,y),x=R(v,$.delimiter),F=[],T=A($,F,y),E=F.map(q=>{if(p&&(q.modifier==="+"||q.modifier==="*")){const{prefix:K="",suffix:_="",separator:j=_+K}=q,z=new RegExp(x(j),"g");return Q=>Q.split(z).map(p)}return p||e});return function(K){const _=T.exec(K);if(!_)return!1;const{0:j,index:z}=_,Q=Object.create(null);for(let B=1;B<_.length;B++){if(_[B]===void 0)continue;const pe=F[B-1],Ee=E[B-1];Q[pe.name]=Ee(_[B])}return{path:j,index:z,params:Q}}}function d(m){return m.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function w(m,y){const p=d(m);return y?`(?:${p})+(?!${p})`:p}function R(m,y){if(!m)return d;const p=new RegExp(`(?:(?!${d(y)}).)+|(.)`,"g");return v=>v.replace(p,w)}function P(m){return m.sensitive?"":"i"}function A(m,y,p){const{trailing:v=!0,loose:$=!0,start:x=!0,end:F=!0,strict:T=!1}=p,E=P(p),q=R($,m.delimiter),K=S(m,q,y,E,T);let _=x?"^":"";return _+=K.join(""),v&&(_+=`(?:${q(m.delimiter)})?`),_+=F?"$":`(?=${d(m.delimiter)}|$)`,new RegExp(_,E)}function S(m,y,p,v,$){const x=`(?:(?!${d(m.delimiter)}).)+?`;let F="",T=!0;return m.tokens.map((E,q)=>{if(typeof E=="string")return F=E,y(E);const{prefix:K="",suffix:_="",separator:j=_+K,modifier:z=""}=E,Q=y(K),B=y(_);if(E.name){const pe=E.pattern?`(?:${E.pattern})`:x,Ee=X(pe,E.name,v);if(T||(T=se(Ee,K||F)),!T)throw new TypeError(`Ambiguous pattern for "${E.name}": ${s}`);if(T=!$||se(Ee,_),F="",p.push(E),z==="+"||z==="*"){const Ln=z==="*"?"?":"",fr=y(j);if(!fr)throw new TypeError(`Missing separator for "${E.name}": ${s}`);if(T||(T=!$||se(Ee,j)),!T)throw new TypeError(`Ambiguous pattern for "${E.name}" separator: ${s}`);return T=!$,`(?:${Q}(${pe}(?:${fr}${pe})*)${B})${Ln}`}return`(?:${Q}(${pe})${B})${z}`}return`(?:${Q}${B})${z}`})}function X(m,y,p){try{return new RegExp(`^${m}$`,p)}catch(v){throw new TypeError(`Invalid pattern for "${y}": ${v.message}`)}}function se(m,y){return y?!m.test(y):!1}function oe(m,y={}){const p=m instanceof a?m:l(m,y),v=[],$=A(p,v,y);return Object.assign($,{keys:v})}return ce}var ks=Wr(),ot=(r=>(r[r.Part=0]="Part",r[r.All=1]="All",r))(ot||{});const ne=Symbol("rootKey"),ie=Symbol("rootNodeKey"),be=Symbol("parentNodeKey"),lt=Symbol("nameKey");class ye{instance=null;model;route;active=!0;index=0;constructor(e,t,s=0,n=!0){this.route=e,this.model=t,this.index=s,this.active=n}}class De{_slots;get slots(){return this._slots==null&&(this._slots=b.shallowRef([])),this._slots}get empty(){return this._slots==null||this._slots.value.length==0}[lt];[ne];[ie]=null;[be]=null;get name(){return this[lt]}constructor(e,t,s){this[lt]=e,this[ne]=t,s&&(this[ie]=s)}}class Z{view;index;level;constructor(e,t,s){this.view=e,this.index=t,this.level=s}static include(e,t){for(let s=0;s<e.length;s++){let n=e[s];if(n.view===t.view&&(t.index==-1||n.index===t.index)&&n.level===t.level)return!0}return!1}}class Dt{views=[]}class Gr{layers=[]}class Xr{time;route}class Qr{forbidTime=300;submitRecorder=new Xr;isSameRoute(e,t){return e==null||t==null?!1:e.name===t.name&&e.path===t.path&&e.root===t.root}acquire(e){let t=new Date().getTime();if(this.isSameRoute(e,this.submitRecorder.route)&&this.submitRecorder.time&&t-this.submitRecorder.time<=this.forbidTime){this.submitRecorder.time=t;return}return this.submitRecorder.route=e,this.submitRecorder.time=t,t}release(e){this.submitRecorder.time===e&&(this.submitRecorder.route=void 0)}}const Ae=Symbol("_notifyChange");class Os{currentRoute;routes;constructor(e,t){this.currentRoute=e,this.routes=t}}const Re=Symbol("historyChangeConsumerKey"),Ms=Symbol("_navigateFirstRoute"),at=Symbol("_getRouteMark"),Ht=Symbol("_getUrlSearch"),Ut=Symbol("_generateLocation"),ut=Symbol("_setRouteMarkRecorder"),He=Symbol("beforeRestoreFiltersKey"),Is=Symbol("_beforeRestore"),Ns="Symbol(_fox_restore_point)";function Ue(r,...e){return typeof r=="function"?Reflect.apply(r,null,[...e]):r}function Ds(r){if(!Array.isArray(r))return!1;if(r.length===0)return!0;const e=r[0];return!!(Reflect.has(e,"path")&&Reflect.has(e,"root"))}class Hs{base;storage;mode;query;firstNavigate=!0;historyMonitor;traceless=!1;changeHandler;historyChange;[Re]=!1;[He]=new Array;backTimeout=320;constructor(e="hash",t="",s="",n=!0,i=!0,o=!1,a,l){this.mode=e,this.base=t,this.query=s,this.firstNavigate=n,this.historyMonitor=i,this.traceless=o,this.storage=a??N().sessionStorage,this.backTimeout=l??320}init(e=!0){const t=N();return typeof this.historyChange!="function"&&(this.historyChange=()=>{if(typeof this[Re]=="function"){const s=this[Re]();if(this[Re]=!1,s)return}else if(this[Re]===!0){this[Re]=!1;return}if(Ue(this.historyMonitor)){const s=t.history.state;this[Ae](s);try{let n=[];if(typeof s=="string"?n=JSON.parse(s):n=s,Array.isArray(n)&&n.length>0){const i=this[at]()??"/";this[ut](i,n)}}catch{}}}),Qe(t,"popstate",this.historyChange),this.firstNavigate&&e&&this[Ms](),Promise.resolve()}destroy(){if(this.historyChange){const e=N();St(e,"popstate",this.historyChange)}}[Is](e,t,s,n){for(let i of this[He])try{const o=Reflect.apply(i,{},[e,t,s,n]);if(o===!1)return o}catch(o){console.error(o.message,o)}return!0}beforeRestoreEach(e){this[He].push(e)}removeBeforeRestoreEach(e){const t=this[He].indexOf(e);return t!==-1?(this[He].splice(t,1),!0):!1}[Ms](){const e=this[at]()??"/",t=this.storage.getItem(Ns);if(t)try{const o=JSON.parse(t);if(o.mark===e&&Array.isArray(o.routes)&&o.routes.length>0){const a=o.routes.filter((l,u)=>(l.params=l.params?hs(l.params):{},this[Is](l,u,e,o.routes)));if(a.length>0){const l=this[Ht](),u=a.length-1;a[u].query=l||a[u].query,this[Ae](a);return}}}catch{}const s=e.indexOf("!");let n;s!=-1?n=e.substring(s+1):n=e;const i=new O;i.path=n,i.query=this[Ht](),this[Ae]([i])}[ut](e,t){try{t.forEach(i=>{i.params=i.params?fs(i.params):{}});const n=JSON.stringify({mark:e,routes:t});this.storage.setItem(Ns,n)}catch(s){console.error(s.message,s)}}setRestorePoint(e){const t=this[at]()??"/";this[ut](t,e)}[Ae](e){typeof this.changeHandler=="function"&&this.changeHandler(e)}[at](){const e=N();if(this.mode==="path"){let t=e.location.pathname;return this.base&&t.indexOf(this.base)===0&&(t=t.substring(this.base.length)),t}else{const t=e.location.hash,s=t.indexOf("#");if(s!=-1)return t.substring(s+1)}return null}[Ht](){let t=N().location.search;return t.length>0&&t.indexOf("?")===0&&(t=t.substring(1)),t}listen(e){this.changeHandler=e}go(e,t=!1){const s=N();this[Re]=t,s.history.go(e)}goBack(e,t){const s=N(),n=s.history.state;if(Ds(n)&&n.length>0){let i=!1;for(let c=n.length-1;c>=0;c--){const h=O.from(n[c]);if(!(h.historyUpdatePolicy==="traceless"||Ue(this.traceless,h))&&O.isSame(h,e)){i=!0;break}}if(!i){t();return}const o=this.backTimeout;let a=null;const l=()=>{s.history.go(-1),a=setTimeout(l,o)},u=()=>{clearTimeout(a);const h=N().history.state;if(Ds(h)&&h.length>0){let f=h.length;const d=h[f-1],w=O.from(d);if(O.isSame(w,e))return t(),!0;if(f>0){let R=!1;for(let P=f-1;P>=0;P--){const A=O.from(h[P]);if(!(A.traceless===!0||Ue(this.traceless,A))&&O.isSame(A,e)){R=!0;break}}return R?(setTimeout(()=>{a=setTimeout(l,o),this.go(-1,u)},0),!0):(t(),!0)}}return t(),!0};a=setTimeout(l,o),this.go(-1,u)}else t()}setRouteMark(e){const t=e.currentRoute.fullPath;this[ut](t,e.routes)}push(e){const t=this[Ut](e.currentRoute);e.currentRoute.historyUpdatePolicy!=="traceless"&&!Ue(this.traceless,e.currentRoute)&&N().history.pushState(e.routes,"",t),this.setRouteMark(e)}replace(e){const t=this[Ut](e.currentRoute);(e.currentRoute.historyUpdatePolicy!=="traceless"||!Ue(this.traceless,e.currentRoute))&&N().history.replaceState(e.routes,"",t),this.setRouteMark(e)}[Ut](e){const t=N();let s="";if(e.query){let a="";if(typeof e.query=="object")for(let l of Reflect.ownKeys(e.query)){let u=encodeURIComponent(e.query[l]),c=`${encodeURIComponent(String(l))}=${u}`;a.length>0&&(a+="&"),a+=c}else a=e.query;this.query?(s=a.length>0?`${this.query}&${a}`:this.query,s.length>0&&s.charAt(0)!=="?"&&(s=`?${s}`)):a.length>0&&(s=`?${a}`)}const n=t.location;let i=e.alias??e.fullPath;i.startsWith(le)&&(i=i.substring(le.length+1));let o;return s?this.mode=="path"?i.indexOf("/")===0?o=`${this.base}${i}${s}`:o=`${this.base}/${i}${s}`:o=`${n.pathname}${s}#${i}`:this.mode=="path"?i.indexOf("/")===0?o=`${this.base}${i}`:o=`${this.base}/${i}`:o=`${n.pathname}#${i}`,`${n.origin}${o}`}}function Yr(r=!0,e=null,t="",s=!0,n=!1,i){return e!==null&&(e=N().location.pathname),e&&e.endsWith("/")&&(e=e.substring(0,e.length-1)),new Hs("path",e??"",t,r,s,n,i)}function Us(r=!0,e="",t=!0,s=!1,n){return new Hs("hash","",e,r,t,s,n)}class Zr{maxSize=50;cursor=-1;queue=[];changeHandler;base;historyMonitor=!1;traceless=!1;constructor(e,t=50){this.base=e,this.maxSize=t}init(e=!0){return Promise.resolve()}destroy(){this.queue=[]}beforeRestoreEach(e){}removeBeforeRestoreEach(e){return!1}listen(e){this.changeHandler=e}[Ae](e){typeof this.changeHandler=="function"&&this.changeHandler(e)}go(e,t=!1){if(this.queue.length==0||this.cursor<=0)return;let s=this.cursor+e;if(s<0?s=0:s>this.queue.length-1&&(s=this.queue.length-1),s!=this.cursor){this.cursor=s;let n=!1;if(typeof t=="function"?n=t():n=t,!n){const i=this.queue[s];this[Ae](i.routes)}}}goBack(e,t){if(this.queue.length==0||this.cursor<=0)return;let s=0;if(e===null)s=this.cursor+1;else for(let n=this.cursor;n>=0;n--){const i=this.queue[n];if(O.isSame(i.currentRoute,e))break;s++}if(s===0){t();return}this.go(-s,()=>(t(),!0))}setRouteMark(e){}push(e){this.queue.length>=this.maxSize&&this.queue.splice(0,1),this.queue.push(e),this.cursor=this.queue.length-1}replace(e){let t=this.queue.length-this.cursor;this.queue.splice(this.cursor,t),this.queue[this.cursor]=e}setRestorePoint(e){}}function Bs(r="",e=50){return new Zr(r,e)}function kn(r){}const ct=Symbol("_constructRouteModel"),ft=Symbol("_findRouteModel"),Bt=Symbol("_findRootView"),Vs=Symbol("_getFirstView"),Se=Symbol("_removeView"),zs=Symbol("_buildPage"),Js=Symbol("_resolveComponent"),Ws=Symbol("_update"),de=Symbol("_merge"),Vt=Symbol("_handleHistoryChange"),xe=Symbol("_handleRouteUpdated"),ht=Symbol("routeUpdatedCallback"),zt=Symbol("currentRoute"),C=Symbol("currentRoutes"),yt=Symbol("routeSessionCacheKey"),Gs=Symbol("_addRouteRecorder"),Be=Symbol("_removeRouteRecorder"),dt=Symbol("_cloneRouteRecorder"),V=Symbol("_handleError"),mt=Symbol("errorCallback"),ee=Symbol("registerKey"),pt=Symbol("notFoundKey"),Jt=Symbol("notFoundPathKey"),te=Symbol("forestKey"),M=Symbol("historyKey"),Ve=Symbol("beforeFiltersKey"),ze=Symbol("afterFiltersKey"),Je=Symbol("destroyFiltersKey"),Wt=Symbol("propsFilterKey"),Te=Symbol("mainDispatcherKey"),Gt=Symbol("initKey"),Pe=Symbol("readyKey"),Xt=Symbol("readyHandlersKey"),gt=Symbol("_markReady"),Xs=Symbol("_createNextFn"),Qt=Symbol("_start"),Yt=Symbol("_before"),Zt=Symbol("_after"),Qs=Symbol("_destroy"),es=Symbol("_load"),We=Symbol("_unload"),Ge=Symbol("routerGuardKey");function en(r){return r.layers.length==0||r.layers[0].views.length==0}function tn(r){let e=[];return r.layers.forEach(t=>{t.models==null||t.models==null||t.models.forEach(s=>{if(!(s==null||s==null))if(typeof s.meta=="object"){let n=D(!0,{},s.meta);e.push(n)}else s.meta&&e.push(s.meta)})}),e}class sn{[ee]=new Array;[pt];[Jt]="*";[Pe]=!1;[Xt]=[];[te]=new Gr;[M];[C]=new Array;[zt]=b.shallowRef(null);[yt]=new WeakMap;[mt]=null;[ht]=null;[Ve]=new Array;[ze]=new Array;[Je]=new Array;[Wt]=null;[Te]=new Ie;[Ge]=new Qr;[Gt]=!1;get currentRoute(){return b.readonly(this[zt])}options;constructor(e){this.options=e??{},this.options.notFoundPath&&this.setNotFoundPath(this.options.notFoundPath);let t=this.options.routes||[];this.addRoutes(t),this.options.notFound&&this.setNotFoundRoute(this.options.notFound),e.history?this[M]=e.history:this[M]=ge?Us():Bs(),this[M]?.listen(async s=>{let n=!0;try{if(typeof s=="string"){const i=this[W](s);i&&await this[Vt]([i])}else await this[Vt](s)}catch(i){console.error(i.message,i),n=!1}this[Pe]===!1&&this[gt](n)})}[V](e="error",t){if(t&&typeof t.error=="function")try{t.error(e)}catch{}if(typeof this[mt]=="function")try{this[mt](e,t)}catch{}console.error(e)}init(){this[Gt]!==!0&&(this[M]?.init(!this[Pe]),this[Gt]=!0)}isReady(){return this[Pe]?Promise.resolve():new Promise((e,t)=>{this[Xt].push([e,t])})}[gt](e){this[Pe]=!0,this[Xt].forEach(([t,s])=>{try{e?t():s()}catch(n){console.error(n.message,n)}})}[Vt](e){try{if(!e){let o=[...this[C]].reverse();return this[We](o),ge&&N().location.reload(),Promise.resolve()}let t=null,s=[],n=[],i=0;for(;i<e.length&&i<this[C].length&&O.isSame(e[i],this[C][i]);i++)e[i].active===!0&&e[i].active!==this[C][i].active&&(t=e[i]);if(i<e.length&&(s=e.slice(i)),i<this[C].length&&(n=this[C].slice(i).reverse()),n.length===0&&s.length===0){if(t!==null)return this.restore([t])}else if(n.length>0){if(this[We](n)){if(s.length>0)return this.restore(s);if(t!==null)return this.restore([t])}}else return this.restore(s)}catch(t){this[V](t)}return Promise.resolve()}[xe](e=null){if(this[zt].value=e,typeof this[ht]=="function")try{this[ht](e)}catch{}}[Gs](e,t){if(e.opsType===I.Open){let s=!1;const n=this[C].length-1;for(let i=n;i>=0;i--){const o=this[C][i];if(e.root==o.root){if(e.path===o.path){this[C].splice(i,1,e),s=!0;continue}e.active&&(o.active=!1)}}s||this[C].push(e)}else this[C].push(e);this[yt].set(e,t),this[xe](e)}[dt](){let e=[];for(let t of this[C]){let s=O.clone(t,!0);e.push(s)}return e}[Be](e){if(!this[C]){this[xe](null);return}let t=-1;for(let s=0;s<this[C].length;s++)if(O.isSame(this[C][s],e)){t=s;break}if(t!=-1){const s=this[C][t];this[C].splice(t,1);const n=this[yt].get(s);if(this[yt].delete(s),this[Qs](s,n),s.opsType===I.Append){const i=this[C].length-1;this[xe](this[C][i]??null)}else this[xe](null)}else this[xe](null)}set historyMonitor(e){this[M]&&(this[M].historyMonitor=e)}get historyMonitor(){return this[M]?this[M].historyMonitor:!1}set traceless(e){this[M]&&(this[M].traceless=e)}get traceless(){return this[M]?this[M].traceless:!1}set propsFilter(e){this[Wt]=e}get propsFilter(){return this[Wt]}setRestorePoint(){const e=this[dt]();this[M]?.setRestorePoint(e)}onRouteUpdated(e){this[ht]=e}onError(e){this[mt]=e}beforeEach(e){this[Ve].push(e)}removeBeforeEach(e){const t=this[Ve].indexOf(e);return t!==-1?(this[Ve].splice(t,1),!0):!1}afterEach(e){this[ze].push(e)}removeAfterEach(e){const t=this[ze].indexOf(e);return t!==-1?(this[ze].splice(t,1),!0):!1}destroyEach(e){this[Je].push(e)}removeDestroyEach(e){const t=this[Je].indexOf(e);return t!==-1?(this[Je].splice(t,1),!0):!1}beforeRestoreEach(e){this[M]?.beforeRestoreEach(e)}removeBeforeRestoreEach(e){return this[M]?.removeBeforeRestoreEach(e)??!1}addRoutes(e){for(let t of e)this.addRoute(t)}addRoute(e,t=-1){if(e.path===this[Jt]){this.setNotFoundRoute(e);return}const s=this[ct](e);if(t==-1)this[ee]=[...this[ee],...s];else for(let n=s.length-1;n>=0;n--)this[ee].splice(t,0,s[n])}removeRoute(e){const t=this[W](e);if(t===null)return console.warn("route格式错误",e),!1;for(let s=0;s<this[ee].length;s++){const n=this[ee][s];if(t?.path&&n.path===t.path)return this[ee].splice(s,1),!0;if(t?.name&&n.name===t.name)return this[ee].splice(s,1),!0}return!1}hasRoute(e){const t=this[W](e);return t===null?(console.warn("route格式错误",e),!1):this[ee].findIndex(n=>{if(t?.path&&n.path===t.path||t?.name&&n.name===t.name)return!0})!==-1}setNotFoundPath(e){this[Jt]=e}setNotFoundRoute(e){const t=this[ct](e);this[pt]=t[0]}getRoutes(){return[...this[ee]]}[ct](e){let t=e.path??"";t.length>0&&t.charAt(0)!=="/"&&(t=`/${t}`);let s=e.components??(e.component&&{"":e.component});if(s==null){const a=new _t;return a.path=t,a.redirect=e.redirect,[a]}let n=[];for(let a in s){let l=s[a];a.length===0&&(a=le);let u=new Or(a,l,e.props,e.meta);n.push(u)}let i=!1,o=[];if(e.children)for(let a of e.children){let l=this[ct](a);for(let u of l){let c=new _t;c.name=u.name,u.path&&u.path.length>0?t!=="/"?c.path=`${t}${u.path}`:c.path=u.path:(i=!0,c.path=t);let h=new Ss;h.models=[...n],c.layers=[h,...u.layers],o.push(c)}}if(!i){const a=new Ss;a.models=n;const l=new _t;l.name=e.name,l.path=t,l.layers=[a],o.splice(0,0,l)}return o}[ft](e){const t=e.route;try{for(let s of this[ee]){const n=t.template??t.path,i=t.template??t.name;if(n&&s.path){let o=s.match;o||(o=s.match=ks.match(s.path));const a=o(n);if(!a)continue;if(s.redirect){const l=new O;D(!0,l,t),l.path=s.redirect;const u={route:l,find:void 0};return this[ft](u)?(e.route=u.route,e.find=u.find,t.template&&e.find&&(e.find={...e.find},e.find.path=t.path),!0):!1}if(t.params=t.params??{},D(!0,t.params,a.params),t.query){const l=t.query;if(typeof l=="string"){const u={},c=l.split("&");for(let h of c){const f=h.split("=");if(f.length!==2)continue;const d=decodeURIComponent(f[0].trim()),w=decodeURIComponent(f[1].trim());u[d]=w}D(!0,t.params,u)}else typeof l=="object"&&D(!0,t.params,l)}return e.find=s,t.template&&e.find&&(e.find={...e.find},e.find.path=t.path),!0}else if(i===s.name){t.params=t.params??{};const o=ks.compile(s.path);return t.path=o(t.params),e.find=s,t.template&&e.find&&(e.find={...e.find},e.find.name=t.name),!0}}}catch(s){console.error(s.message,s),typeof t.error=="function"&&t.error(s.message)}return!1}[W](e){let t=null;if(Array.isArray(e))if(t=new O,typeof e[0]=="object")t=O.from(e[0]);else for(let s=0;s<e.length;s++)s===0?e[s].charAt(0)==="/"?t.path=e[s]:t.name=e[s]:s===1?t.params=e[s]:s===2?t.root=e[s]:s===3&&D(!1,t,e[s]);else typeof e=="object"?t=O.from(e):typeof e=="string"&&(t=new O,e.charAt(0)=="/"?t.path=e:t.name=e);if(t){if(t.path){let s=t.path.indexOf("?");s!==-1&&s<t.path.length-1&&(t.query=t.path.substring(s+1),t.path=t.path.substring(0,s))}t.root=t.root??le,t.opsType=t.opsType??this.options.defaultOperationType??I.Push,t.traceless&&!t.historyUpdatePolicy&&(t.historyUpdatePolicy="traceless")}return t}push(...e){const t=this[W](e);return t?(t.opsType=I.Push,t.historyUpdatePolicy=t.historyUpdatePolicy??"push",this.to(t)):(this[V]("resolve route fail",t),this)}put(...e){const t=this[W](e);return t?(t.opsType=I.Put,t.historyUpdatePolicy=t.historyUpdatePolicy??"traceless",this.to(t)):(this[V]("resolve route fail",t),this)}replace(...e){const t=this[W](e);return t?(t.opsType=I.Replace,t.historyUpdatePolicy=t.historyUpdatePolicy??"replace",this.to(t)):(this[V]("resolve route fail",t),this)}append(...e){const t=this[W](e);return t?(t.opsType=I.Append,t.historyUpdatePolicy=t.historyUpdatePolicy??"push",this.to(t)):(this[V]("resolve route fail",t),this)}remove(e,t){return new Promise(s=>{this[Te].post(n=>{try{if(this[C].length===0){n.resolve(),s(!1);return}let i=-1,o,a=[];if(e){if(e.root?o=e.root:o=this[C][0].root??le,e.all)for(let u=this[C].length-1;u>0;u--){let c=this[C][u];c.opsType===I.Append&&c.root===o&&(a.splice(0,0,c),i=u-1)}else if(e.until)for(let u=this[C].length-1;u>0;u--){let c=this[C][u];if(c.opsType===I.Append&&c.root===o){if(e.until.charAt(0)==="/"&&e.until===c.path){i=u;break}else if(e.until===c.name){i=u;break}a.splice(0,0,c)}}else if(e.to)for(let u=this[C].length-1;u>0;u--){let c=this[C][u];if(c.opsType===I.Append&&c.root===o){if(a.splice(0,0,c),e.to.charAt(0)==="/"&&e.to===c.path){i=u-1;break}else if(e.to===c.name){i=u-1;break}}}}else{o=le;let u=this[Vs](this[te]);u&&(o=u.name);for(let c=this[C].length-1;c>0;c--){let h=this[C][c];if(h.opsType===I.Append&&h.root===o){a.push(h),i=c-1;break}}}if(i===-1||a.length===0){let u="can not find route";console.warn(u),n.resolve(u),s(!1);return}let l=null;if(i!==-1&&(l=this[C][i]),this[We](a)){if(t===!1)return n.resolve(),s(!0),!0;const u=()=>(n.resolve(),s(!0),!0),c=this[C].length;if(l&&O.isSame(l,this[C][c-1])){this[M]?.goBack(l,u);return}u()}}catch(i){this[V](i),n.resolve(),s(!1)}})})}open(...e){let t=this[W](e);return t?(t.opsType=I.Open,t.historyUpdatePolicy=t.historyUpdatePolicy??"push",this.to(t)):(this[V]("resolve route fail",t),this)}close(e){return this[Te].post(t=>{try{let s=this[W](e);if(!s){t.reject("resolve route fail");return}let n=[];for(let i=0;i<this[C].length;i++){let o=this[C][i];if(o.root===s.root){if(!s.path&&!s.name){n.push(o);continue}if(s.path&&s.path===o.path){n.push(o);break}else if(s.name&&s.name===o.name){n.push(o);break}}}if(n.length===0){t.resolve();return}this[We](n),t.resolve()}catch(s){this[V](s),t.resolve()}}),this}to(...e){let t=this[W](e);if(!t)return this[V]("resolve route fail",t),this;let s=this[Ge].acquire(t);return s==null?(this[V]("route forbid",t),this):(this[Te].post(n=>{try{let i=this[Qt](t);this[Yt](i),this[es](i),this[Zt](i),i.wait((o,a)=>{const l=o.session.to;if(o.session.updateResult&&o.session.updateResult.status==="success")try{let u=O.clone(l,!0);const c=new Os(u,this[dt]());l.historyUpdatePolicy==="replace"?this[M]?.replace(c):l.historyUpdatePolicy==="traceless"?this[M]?.setRouteMark(c):this[M]?.push(c)}catch(u){console.error(u.message,u)}if(Ce.clear(o.session),this[Ge].release(s),typeof t.success=="function")try{Reflect.apply(t.success,{},[])}catch(u){console.error(u.message,u)}this[Pe]===!1&&this[gt](!0),i=null,n.resolve()},(o,a)=>{this[Ge].release(s),a!==null&&this[V](a,t),this[Pe]===!1&&this[gt](!1),Ce.clear(o.session),i=null,n.resolve()})}catch(i){this[Ge].release(s),this[V](i,t),n.resolve()}}),this)}back(e=1){this[M]?.go(-e,!1)}[Xs](e){return(t,s)=>{if(typeof t=="boolean")e.session.redirect=!1,t?e.resolve():e.reject(s??null);else if(t){const n=this[W](t);if(n){const i=e.session.to;n.success=i.success,n.error=i.error,e.session.to=n,e.session.redirect=!0,e.session.routeModel=null,e.resolve()}else e.session.redirect=!1,e.reject("route resolve fail")}else e.session.redirect=!1,e.resolve()}}[Qt](e){const t=this[C].length>0?this[C][this[C].length-1]:void 0,s=new Ce(e,t),n={route:e,find:null};return this[ft](n),n.find&&(s.routeModel=n.find,e.matched=tn(n.find),Array.isArray(e.matched)&&e.matched.length>0&&(e.meta=n.find.layers[0].models[0].meta)),new Ie(s)}[Yt](e){for(let t of this[Ve])e.post(s=>{const n=this[Xs](s);Reflect.apply(t,{},[s.session.to,s.session.from,n,s.session])})}[Zt](e){e.post(t=>{for(let s of this[ze])try{Reflect.apply(s,{},[t.session.to,t.session.from,t.session])}catch(n){console.error(n.message,n)}t.resolve()})}[Qs](e,t){for(let s of this[Je])try{Reflect.apply(s,{},[e,t])}catch(n){console.error(n.message,n)}typeof e.destroy=="function"&&Reflect.apply(e.destroy,e,[])}[es](e){e.post(t=>{const s=t.session.to;let n=t.session.routeModel;if(n==null){let o={route:s,find:null};if(this[ft](o))n=o.find,t.session.routeModel=n;else if(this[pt])n=this[pt];else{t.reject(`not find route model, path:${s.path??s.name}`);return}}const i=Ce.from(t.session);this[zs](s,n,i).then(o=>{this[te],t.session.updateResult=o??{status:"success",message:""},t.resolve()},o=>{t.reject(o)})})}[We](e){if(e.length==0)return!0;let t=this[te],s=[];for(let n of e){let i=this[Bt](t,n);i!=null&&s.push({...i,route:n})}if(s.length==0)return this[V]("can not find view index"),!1;for(let n of s.reverse())this[Se](t,{x:n.x,y:n.y},[n.route.index??0],!0);return!0}[Bt](e,t){const s=t.root??le;let n;for(let i=0;i<e.layers.length;i++){const o=e.layers[i];for(let a=o.views.length-1;a>=0;a--){const l=o.views[a];if(l[ne]&&l[lt]===s)return n={x:a,y:i},n}}return null}[Vs](e){return e.layers.length>0&&e.layers[0].views.length>0?e.layers[0].views[0]:null}[Se](e,t,s=null,n=!0){if(t.y>=e.layers.length||t.x>=e.layers[t.y].views.length)return;let i=e.layers[t.y].views[t.x],o=!1,a=[],l=!1,u=[...i.slots.value];for(let h=u.length-1;h>=0;h--){let f=u[h];(!s||s.indexOf(f.index)!=-1)&&(f.route&&i[ne]&&(this[Be](f.route),f.active===!0&&f.route.opsType==I.Append&&(l=!0)),a.push(new Z(i,f.index,t.y)),u.splice(h,1))}if(u.length==0)n?i.slots.value=u:e.layers[t.y].views.splice(t.x,1);else{if(l){let h=u.length-1,f=u[h];f.active=!0,f.route&&(f.route.active=f.active)}i.slots.value=u}e.layers[t.y].views.length==0&&(o=!0);let c=t.y+1;for(;c<e.layers.length;c++){let h=e.layers[c].views,f=[];for(let d=h.length-1;(o||a.length>0)&&d>=0;d--){let w=h[d];if(w[be]&&(o||Z.include(a,w[be]))){let R=w.slots.value;for(let P=R.length-1;P>=0;P--){let A=R[P];A.route&&w[ne]&&this[Be](A.route),f.push(new Z(w,A.index,c)),R.splice(P,1)}e.layers[c].views.splice(d,1)}}a=f,e.layers[c].views.length==0&&(o=!0)}}restore(e){if(!e||this[ee].length==0){let t=this[te];if(t.layers.length>0){let s=t.layers[0].views;s.length>0&&(s[0].slots.value=[])}return this[C]=[],this[xe](null),Promise.resolve()}else return new Promise((s,n)=>{let i=null,o=!1;for(let a=0;a<e.length;a++){const l=e[a];this[Te].post(u=>{const c=this[Qt](l);this[Yt](c),this[es](c),this[Zt](c),c.wait((h,f)=>{i=h.session.to,o=h.session.redirect,u.resolve()},(h,f)=>{i=null,f!==null&&this[V](f),u.resolve()})})}this[Te].post(a=>{if(i&&o===!0){const l=O.clone(i,!0),u=new Os(l,this[dt]());this[M]?.replace(u)}a.resolve(),s()})})}[zs](e,t,s){const n=e.updateType??ot.Part;return this[Js](t).then(()=>{const o=this[Ws](t,e,s,n);if(o.status==="error")throw Error(o.message);return o})}[Js](e){let t=[];for(let s=0;s<e.layers.length;s++){let n=e.layers[s];for(let i=0;i<n.models.length;i++){let o=n.models[i];o.isResolved||t.push(o.resolve())}}return t.length>0?Promise.all(t):Promise.resolve()}[Ws](e,t,s,n){if(e.layers[0].models.length!==1)return{status:"error",message:"illegal route structure(multi root node)"};const i=e.layers[0].models[0];let o=this[te],a=en(o),l=t.root??le,u;!a&&n==ot.Part&&(u=this[Bt](o,t));let c,h=0;if(u==null||u==null)if(a||n===ot.All){if(o.layers.length==0&&(o.layers[0]=new Dt),o.layers[0].views.length==0){let f=t.root??le;c=new De(f,!0,null),o.layers[0].views=[c]}else c=o.layers[0].views[0];u={x:0,y:0}}else{let f=t.slot;if(!f)return{status:"error",message:"can not rebuild view(because not route slot)"};let d=f.level;if(d>o.layers.length)return{status:"error",message:"can not insert view(override level)"};let w;if(f.rootName){let R=o.layers[d-1];for(let P of R.views){if(P[ne]&&P.name===f.rootName){w=new Z(P,f.rootIndex??0,d-1);break}if(P[ie]&&P[ie].view.name===f.rootName&&P[ie].index===f.rootIndex){w=P[ie];break}}}if(!w)return{status:"error",message:"can not insert view(not find root node ref)"};c=new De(l,!0,w),o.layers[d].views.push(c),u={x:o.layers[d].views.length-1,y:d}}else c=o.layers[u.y].views[u.x];if(h=u.y,c[ne]=!0,t.opsType===I.Append){t.index=t.index??fe.get(),t.active=!0;let f=c.slots.value;if(f.length>0){let A=f[f.length-1];A.active=!1,A.route&&(A.route.active=A.active)}let d=new ye(t,i,t.index,!0);c.slots.value=[...f,d];let w=h+1,R=1,P=new Z(c,t.index,h);this[de](o,w,e,R,P)}else if(t.opsType===I.Open){let f=c.slots.value;const d=t.active??!0;let w=!1;for(let R of f){if(R.route!==null&&O.isSameForRouteModel(R.route,t)){if(R.active===d)return t.index=R.index,t.active=d,R.route=t,{status:"no-change",message:""};R.active=d,w=!0,t.index=R.index,t.active=d,R.route=t}else d&&(R.active=!1);R.route&&(R.route.active=R.active)}if(!w){t.index=t.index??fe.get(),t.active=d;let R=new ye(t,i,t.index,d);f.push(R);let P=h+1,A=1,S=new Z(c,t.index,h);this[de](o,P,e,A,S)}c.slots.value=[...f]}else{let f=c.slots.value;if(f.length==0){t.index=t.index??fe.get(),t.active=!0,c.slots.value=[new ye(t,i,t.index)];let d=h+1,w=1,R=new Z(c,t.index,h);this[de](o,d,e,w,R)}else{let d=f[0];if(d.model!==i){this[Se](o,u,null,!0),t.index=t.index??fe.get(),t.active=!0,c.slots.value=[new ye(t,i,t.index)];let w=h+1,R=1,P=new Z(c,t.index,h);this[de](o,w,e,R,P)}else{d.route!==null&&this[Be](d.route);let w=!1;const R=t.active??!0;d.active!==R&&(d.active=R,w=!0),t.active=R,t.index=d.index,d.route=t;let P=[];for(let oe=1;oe<f.length;oe++)P.push(f[oe].index);P.length>0?this[Se](o,u,P,!0):w&&(c.slots.value=[...f]);let A=[new Z(c,t.index,h)],S=h+1,X=1,se=new Z(c,t.index,h);for(;A.length>0&&S<o.layers.length&&X<e.layers.length;S++,X++){let oe=[];for(let y=0;y<o.layers[S].views.length;y++){let p=o.layers[S].views[y];p[be]&&Z.include(A,p[be])&&oe.unshift(y)}let m=[];for(let y of oe){let p=o.layers[S].views[y],v=e.layers[X].models,$;for(let x=0;x<v.length;x++)if(p.name===v[x].name){$=v[x];break}if(!$)this[Se](o,{x:y,y:S},null,!1);else{let x=p.slots.value;if(x.length==0){let F=0;p.slots.value=[new ye(null,$,F)];let T=S+1,E=X+1;this[de](o,T,e,E,se)}else{let F=x[0];if(F.model!==$){this[Se](o,{x:y,y:S},null,!0),p.slots.value=[new ye(null,$,0)];let T=S+1,E=X+1;this[de](o,T,e,E,se)}else{p[ne]&&F.route!==null&&this[Be](F.route);let T=[];for(let E=1;E<x.length;E++)T.push(x[E].index);T.length>0&&this[Se](o,{x:y,y:S},T,!0),m.push(new Z(p,F.index,S))}}p[ne]=!1}}A=m}this[de](o,S,e,X,se)}}}if(c&&c[ie]){let f=c[ie];f&&(t.slot=new kr(l,h,f?.view.name,f?.index??0))}return s.to=void 0,s.routeModel=void 0,this[Gs](t,s),{status:"success",message:""}}[de](e,t,s,n,i){let o=n,a=t;for(;a<e.layers.length&&o<s.layers.length;a++,o++){let l=e.layers[a].views;for(let u of s.layers[o].models){let c=new De(u.name,!1,i),h=new ye(null,u);c.slots.value=[h],l.push(c)}}for(;o<s.layers.length;o++){let l=new Dt;l.views=[];for(let u of s.layers[o].models){let c=new De(u.name,!1,i),h=new ye(null,u);c.slots.value=[h],l.views.push(c)}e.layers.push(l)}}[bs](e,t,s,n,i,o){if(t<0||t>this[te].layers.length)return null;if(t<this[te].layers.length){let c=this[te].layers[t],h=null;for(let f of c.views){let d=!1;if(s!==null?(d=f.name===e&&f[ie]?.view===s,d&&n!==-1&&(d=f[ie]?.index===n)):d=f.name===e,!!d){i!==null&&(f[be]={view:i,index:o,level:t-1}),h=f;break}}if(h!==null)return h}let a=null,l=null;i!==null&&(i[ne]?a={view:i,index:o,level:t-1}:a=i[ie],l={view:i,index:o,level:t-1});let u=new De(e,!0,a);if(u[be]=l,t==this[te].layers.length){let c=new Dt;c.views=[u],this[te].layers.push(c)}else this[te].layers[t].views.push(u);return u}}const rn="fox-router-view",nn="fox-router-link";function Ys(r,e=!1){let t=null;return e?t=r.showFromClass??r.enterFromClass:t=r.enterFromClass,t||(t=r.transitionName,t?e?`${t}-show-from`:`${t}-enter-from`:null)}function Zs(r,e=!1){let t=null;return e?t=r.showActiveClass??r.enterActiveClass:t=r.enterActiveClass,t||(t=r.transitionName,t?e?`${t}-show-active`:`${t}-enter-active`:null)}function on(r,e=!1){let t=null;return e?t=r.showToClass??r.enterToClass:t=r.enterToClass,t||(t=r.transitionName,t?e?`${t}-show-to`:`${t}-enter-to`:null)}function er(r,e=!1){let t=null;return e?t=r.hideFromClass??r.leaveFromClass:t=r.leaveFromClass,t||(t=r.transitionName,t?e?`${t}-hide-from`:`${t}-leave-from`:null)}function tr(r,e=!1){let t=null;return e?t=r.hideActiveClass??r.leaveActiveClass:t=r.leaveActiveClass,t||(t=r.transitionName,t?e?`${t}-hide-active`:`${t}-leave-active`:null)}function ln(r,e=!1){let t=null;return e?t=r.hideToClass??r.leaveToClass:t=r.leaveToClass,t||(t=r.transitionName,t?e?`${t}-hide-to`:`${t}-leave-to`:null)}function an(r,e=!1){let t=null;return e?t=r.beforeShow??r.beforeEnter:t=r.beforeEnter,t}function un(r,e=!1){let t=null;return e?t=r.show??r.enter:t=r.enter,t}function cn(r,e=!1){let t=null;return e?t=r.afterShow??r.afterEnter:t=r.afterEnter,t}function fn(r,e=!1){let t=null;return e?t=r.showCancelled??r.enterCancelled:t=r.enterCancelled,t}function hn(r,e=!1){let t=null;return e?t=r.beforeHide??r.beforeLeave:t=r.beforeLeave,t}function yn(r,e=!1){let t=null;return e?t=r.hide??r.leave:t=r.leave,t}function dn(r,e=!1){let t=null;return e?t=r.afterHide??r.afterLeave:t=r.afterLeave,t}function mn(r,e=!1){let t=null;return e?t=r.hideCancelled??r.leaveCancelled:t=r.leaveCancelled,t}function ts(r){let e,t=r.duration;return typeof t=="object"?e={enter:t.enter??-1,leave:t.leave??-1,show:t.show??-1,hide:t.hide??-1}:(typeof t=="string"&&(t=t.length==0?-1:Number(t)),e={enter:t,leave:t,show:t,hide:t}),e}function Ke(r,e){r.classList.contains(e)||r.classList.add(e)}function _e(r,e){r.classList.remove(e)}const pn=ge&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout;function vt(r){pn(r)}function U(r,e,t){L(e)&&(r==null&&(r={}),Reflect.apply(e,r,t))}function sr(r,e,t,s=-1,n,i,o,a){let l=[];const u=()=>{for(let c of l)St(e,c.type,c.listener);l=[]};if(L(i)){if(n!==void 0&&n>=0){setTimeout(()=>{Reflect.apply(i,r,[e,t,s]),L(a)&&Reflect.apply(a,r,[])},n);return}const c=["animationend","transitionend",tt],h=f=>{const d=f.target||f.srcElement,w=f.currentTarget;d===w&&(u(),Reflect.apply(i,r,[e,t,s]))};c.forEach(f=>{Qe(e,f,h),l.push({type:f,listener:h})})}if(L(o)){const c="animationcancel",h=f=>{const d=f.target||f.srcElement,w=f.currentTarget;d===w&&(u(),Reflect.apply(o,r,[e,t,s]))};Qe(e,c,h),l.push({type:c,listener:h})}}function wt(r){return!ge||r===null?!1:r.opsType===I.Append||r.opsType===I.Open}function rr(r,e,t,s={},n,i=-1){if(e||wt(n)){const o=Ys(s,e);o&&Ke(t,o);const a=Zs(s,e);a&&Ke(t,a);const l=an(s,e);U(r,l,[t,e,n,i])}}function nr(r,e,t,s={},n,i,o,a){if(!wt(i)&&!e){L(a)&&a(r,a,[t]);return}const l=Ys(s,e),u=Zs(s,e),c=on(s,e),h=un(s,e),f=cn(s,e),d=fn(s,e);if(!l&&!u&&!c&&!h){L(a)&&a(r,a,[t]);return}vt(()=>{sr(r,t,i,o,n,()=>{u&&_e(t,u),c&&_e(t,c),L(f)&&U(r,f,[t,e,i,o]),L(a)&&a(r,a,[t])},()=>{L(d)&&U(r,d,[t,e,i,o])}),l&&_e(t,l),c&&Ke(t,c),L(h)&&U(r,h,[t,e,i,o])})}function ir(r,e,t,s={},n,i=-1){if(e||wt(n)){const o=er(s,e);o&&Ke(t,o);const a=tr(s,e);a&&Ke(t,a);const l=hn(s,e);U(r,l,[t,e,n,i])}}function or(r,e,t,s={},n,i,o,a,l){if(!wt(o)&&!e){L(l)&&U(r,l,[t]),!e&&L(i)&&i();return}const u=er(s,e),c=tr(s,e),h=ln(s,e),f=yn(s,e),d=dn(s,e),w=mn(s,e);if(!u&&!c&&!h&&!f){L(l)&&U(r,l,[t]),!e&&L(i)&&i();return}vt(()=>{sr(r,t,o,a,n,()=>{c&&_e(t,c),h&&_e(t,h),L(d)&&U(r,d,[t,e,o,a]),L(l)&&U(r,l,[t]),!e&&L(i)&&i()},()=>{L(w)&&U(r,w,[t,e,o,a]),L(l)&&U(r,l,[t]),!e&&L(i)&&i()}),u&&_e(t,u),h&&Ke(t,h),L(f)&&U(r,f,[t,e,o,a])})}function ss(r,e,t={},s,n=-1){const i=t.mode??"default",o=ts(t);return{mode:i,persisted:!1,beforeEnter:l=>{rr(r,!1,l,t,s,n)},enter:l=>{nr(r,!1,l,t,o.enter,s,n)},leave:(l,u)=>{ir(r,!1,l,t,s,n),or(r,!1,l,t,o.leave,u,s,n,()=>{e.transition=null,e=null})},clone:l=>ss(r,e,t,s,n)}}function lr(r){return r.el}function gn(r,e,t={},s,n,i,o){if(i===!0){const a=lr(e);if(a==null)return;const l=ts(t);rr(r,!0,a,t,s,n),nr(r,!0,a,t,l.show,s,n,u=>{L(o)&&U(r,o,[u])})}else L(o)&&U(r,o,[])}function vn(r,e,t={},s,n,i,o){if(i===!0){const a=lr(e);if(a==null)return;const l=ts(t);ir(r,!0,a,t,s,n),or(r,!0,a,t,l.hide,null,s,n,u=>{L(o)&&U(r,o,[u])})}else L(o)&&U(r,o,[])}function wn(r,e={}){vt(()=>{for(let t=0;t<r.length;t++)Reflect.apply(r[t],e,[])})}function ar(r,e,t={},s,n=-1){return{mode:t.mode??"default",persisted:!1,beforeEnter:a=>{Ye(xs,{},a)},enter:a=>{Ye(Ps,{},a)},leave:(a,l)=>{Ye(Es,{},a),vt(()=>{const u=c=>{const h=c.target||c.srcElement,f=c.currentTarget;h===f&&(St(a,tt,u),l&&Reflect.apply(l,r,[]),e.transition=null,e=null)};Qe(a,tt,u),Ye(Cs,{},a)})},clone:a=>ar(r,e,t,s,n)}}function me(r,e,t){return typeof r=="function"?Reflect.apply(r,{},[e,t]):r}function rs(r,e){if(!r)return null;const t=r(e);return t.length===1?t[0]:t}function je(r,e){return typeof e=="function"?e(r):r}class bn{node;state;constructor(e,t){this.node=e,this.state=t}}const ns=b.defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,required:!1,default:"default"},modelSlot:{type:[Object],required:!1},multi:{type:Boolean,required:!1,default:!1},tag:{type:[String,Object,Function],required:!1,default:"div"},viewTag:{type:[String,Object,Function],required:!1,default:"div"},viewTagProps:{type:[Object,Function],required:!1,default(){return{}}},viewClass:{type:[String,Function],required:!1},viewActiveClass:{type:[String,Function],required:!1},viewInactiveClass:{type:[String,Function],required:!1},transition:{type:[Boolean,String,Function],required:!1,default:!1},transitionName:{type:String,required:!1},enterFromClass:{type:String,required:!1},enterActiveClass:{type:String,required:!1},enterToClass:{type:String,required:!1},leaveFromClass:{type:String,required:!1},leaveActiveClass:{type:String,required:!1},leaveToClass:{type:String,required:!1},showFromClass:{type:String,required:!1},showActiveClass:{type:String,required:!1},showToClass:{type:String,required:!1},hideFromClass:{type:String,required:!1},hideActiveClass:{type:String,required:!1},hideToClass:{type:String,required:!1},beforeEnter:{type:Function,required:!1},enter:{type:Function,required:!1},afterEnter:{type:Function,required:!1},enterCancelled:{type:Function,required:!1},beforeLeave:{type:Function,required:!1},leave:{type:Function,required:!1},afterLeave:{type:Function,required:!1},leaveCancelled:{type:Function,required:!1},beforeShow:{type:Function,required:!1},show:{type:Function,required:!1},afterShow:{type:Function,required:!1},showCancelled:{type:Function,required:!1},beforeHide:{type:Function,required:!1},hide:{type:Function,required:!1},afterHide:{type:Function,required:!1},hideCancelled:{type:Function,required:!1}},setup(r,e){const t=b.getCurrentInstance();if(t===null||t.proxy===null){console.error("instance or instance.proxy not exist");return}const s=r.multi===!0,n=b.inject(it,null),i=b.inject(Mt,0),o=b.inject(js,null),a=b.inject(It,-1);let l=null,u=r.modelSlot;if(u){if(b.provide(Mt,i+1),b.provide(It,u.index),b.provide(Nt,u.index),!u.route){console.warn("child view render error, route not exist");return}const f=rt(t.proxy,!0);Hr(f),_s(f,()=>u?.route??null)}else{if(n==null){console.error("router is not been injected");return}const h=r.name,f=b.inject(qs,null),d=b.inject(Nt,0);if(l=n[bs](h,i,o,a,f,d),l===null)return;b.provide(qs,l);const w=l[ne]===!0;if(w&&b.provide(js,l),!s&&(b.provide(It,-1),b.provide(Mt,i+1),b.provide(Nt,-1),w)){const R=rt(t.proxy,!0);_s(R,()=>{const P=l.slots.value;return P.length>0?P[0].route:null})}}const c={value:new Map};return b.onUnmounted(()=>{if(c.value&&c.value.clear(),u){const h=u;h.route=null,h.model=null,h.instance=null,u=void 0}}),()=>{if(s){const h=new Map,f=[],d=l?.slots.value,w=[];for(let A=0;A<d.length;A++){const S=d[A],X=`${r.name}_${S.index}`,se=me(r.transition,S.route,A)??!0,oe={modelSlot:S};let m;e.slots.default?m=b.h(ns,oe,{default:e.slots.default}):m=b.h(ns,oe);const y={},p=me(r.viewClass,S.route,A);typeof p=="string"&&p.length>0&&(y[p]=!0);const v=me(r.viewActiveClass,S.route,A),$=me(r.viewInactiveClass,S.route,A),x=c.value.get(X);if(typeof v=="string"&&v.length>0&&(y[v]=S.active),typeof $=="string"&&$.length>0&&(y[$]=!S.active),x&&S.active!==x.state){const K=x.node;S.active?w.unshift(()=>{const _=()=>{let j=Fs(K);j!=null&&As(j,kt.ACTIVATED)};gn(t,K,r,S.route,A,se,_)}):w.push(()=>{const _=()=>{const j=Fs(K);j!=null&&As(j,kt.DEACTIVATED)};vn(t,K,r,S.route,A,se,_)})}const F={class:y,key:X},T=me(r.viewTagProps,S.route,A);if(T!==null&&typeof T=="object"){const K=je(T,n?.propsFilter);D(!0,F,K)}if(S.route?.viewTagAttrs&&typeof S.route?.viewTagAttrs=="object"){const K=je(S.route.viewTagAttrs,n?.propsFilter);D(!0,F,K)}const E=me(r.viewTag,S.route,A),q=b.h(E,F,{default:()=>[m]});if(h.set(X,new bn(q,S.active)),c.value.delete(X),se===!0){const K=ss(t,q,r,S.route,A);q.transition=K}else if(se==="custom"){const K=ar(t,q,r,S.route,A);q.transition=K}f.push(q)}c.value=h,wn(w,t);const R=me(r.tag,null,-1),P={};return Object.assign(P,e.attrs),b.h(R,P,{default:()=>f})}else if(u!=null){const h=u.model,f={};if(h.props){if(typeof h.props=="object"){const w=je(h.props,n?.propsFilter);D(!1,f,w)}else if(h.props===!0&&typeof u.route?.params=="object"){const w=je(u.route.params,n?.propsFilter);D(!1,f,w)}}const d=b.h(h.component,f);return rs(e.slots.default,{Component:d,route:u.route})??d}else{const h=l.slots.value;if(h.length>0){const f=h[0],d=f.route??(t.proxy&&Ot(t.proxy))??null,w=f.model,R={};if(w.props){if(typeof w.props=="object"){const S=je(w.props,n?.propsFilter);D(!1,R,S)}else if(w.props===!0&&typeof d?.params=="object"){const S=je(d.params,n?.propsFilter);D(!1,R,S)}}const P=b.h(w.component,R);if(me(r.transition,d,-1)??!0){const S=ss(t,P,r,d,-1);P.transition=S}return rs(e.slots.default,{Component:P,route:d})??P}else return rs(e.slots.fallback,{})}}}});function Rn(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!=null&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const e=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return r.preventDefault&&r.preventDefault(),!0}}function Sn(r,e){return r==null||e==null?!1:!!(r===e||r.path&&r.path===e.path||r.name&&r.name===e.name)}function xn(r,e){return r==null||e==null?!1:!!(r.path&&e.path&&e.path.startsWith(r.path)||r.name&&r.name==e.name)}function qe(r,e){return typeof r=="function"?Reflect.apply(r,{},[e]):r}let Pn=b.defineComponent({name:"RouterLink",inheritAttrs:!1,props:{tag:{type:[String,Object,Function],required:!1,default:"a"},to:{type:[String,Object,Function],required:!0},root:{type:String},activeClass:{type:[String,Function],required:!1,default:"fox-router-link-active"},exact:{type:[String,Boolean,Function],required:!1},exactActiveClass:{type:[String,Function],required:!1,default:"fox-router-link-exact-active"},event:{type:[String,Function],required:!1,default:"onClick"}},setup(r,e){const t=b.inject(it,null);return()=>{let s=qe(r.to,null),n=qe(r.tag,s);if(n==null){console.warn("can not resolve link tag");return}let i=null,o=null;t!==null&&(i=t[W](s),r.root&&(i.root=r.root),o=t.currentRoute.value);let a={},l=qe(r.activeClass,i);if(typeof l=="string"&&l.length>0&&(a[l]=xn(i,o)),qe(r.exact,i)===!0){let f=qe(r.exactActiveClass,i);typeof f=="string"&&f.length>0&&(a[f]=Sn(i,o))}let c={class:a};(n==="a"||n==="A")&&(c.href=i?.path??i?.name??"#"),D(!0,c,e.attrs);let h=qe(r.event,i);if(typeof h=="string"){const f=d=>{if(t==null){console.warn("router is not been injected");return}if(i==null){console.warn("route is not been resolved");return}Rn(d)&&t.to(i)};c[h]=f}return b.h(n,c,e.slots)}}});var J=(r=>(r[r.Loading=0]="Loading",r[r.Loaded=1]="Loaded",r[r.Defining=2]="Defining",r[r.Defined=3]="Defined",r))(J||{}),bt=(r=>(r[r.normal=0]="normal",r[r.factory=1]="factory",r))(bt||{});class En{register=new Map;constructor(){}get(e){return this.register.get(e)??null}set(e,t){this.register.set(e,t)}remove(e){let t=this.register.get(e);return this.register.delete(e),t??null}has(e){return this.register.has(e)}clear(){this.register.clear()}}class ur{moduleManager=new En;options={paths:{},alias:{},nature:[],timeout:3e3};set paths(e){this.options.paths=e}get paths(){return this.options.paths}set alias(e){this.options.alias=e}get alias(){return this.options.alias}set naturePaths(e){this.options.nature=e}get naturePaths(){return this.options.nature}set timeout(e){this.options.timeout=e}get timeout(){return this.options.timeout}_query;set query(e){this._query=e}get query(){return this._query}get head(){return Xe().head}constructor(){}setModule(e,t){const s={id:e,src:"",status:J.Defined};typeof t=="function"?(s.exports=t,s.type=bt.factory):s.exports=t,this.moduleManager.set(e,s)}removeModule(e){this.moduleManager.remove(e)}ensure(...e){const t=[];let s=e.length-1;const n={};typeof e[s]=="object"&&(Object.assign(n,e[s]),s--);let i=null;typeof e[s]=="function"&&(i=e[s],s--);for(let l=0;l<=s;l++)if(Array.isArray(e[l])){let u=e[l];for(let c=0;c<u.length;c++)u[c]&&t.push(this.resolvePath(u[c]))}else if(typeof e[l]=="string"){let u=e[l].split(",");for(let c=0;c<u.length;c++)u[c]&&t.push(this.resolvePath(u[c]))}const o=new Cn(t.length,(l,u)=>{if(o.isOK())try{typeof i=="function"&&Reflect.apply(i,{},u)}catch(c){console.error(c.message,c)}else try{console.error(l),typeof i=="function"&&Reflect.apply(i,{},[])}catch(c){console.error(c.message,c)}}),a=new Ie;for(let l=0;l<t.length;l++){const u=new $n(l,t[l],n,o);this.mount(a,u)}return this}remove(...e){let t=[],s=e.length-1,n={};typeof e[s]=="object"&&(Object.assign(n,e[s]),s--);let i=null;typeof e[s]=="function"&&(i=e[s],s--);for(let o=0;o<=s;o++)if(Array.isArray(e[o])){let a=e[o];for(let l=0;l<a.length;l++)a[l]&&t.push(this.resolvePath(a[l]))}else{let a=e[o].split(",");for(let l=0;l<a.length;l++)a[l]&&t.push(this.resolvePath(a[l]))}return t.forEach(o=>{this.unmount(o,n)}),typeof i=="function"&&Reflect.apply(i,{},[]),this}mount(e,t){if(t.src==="exports"){e.post(n=>{t.progress.work(!0,t.index,"exports"),n.resolve()});return}else if(t.src==="module"){e.post(n=>{t.progress.work(!0,t.index,"module"),n.resolve()});return}if(this.isNaturePath(t.src)){let n=t.params.jsPoint;n||(n=this.head),this.mountJS(e,t,n);return}else if(this.isNaturePath(t.src)){let n=t.params.cssPoint;n||(n=this.head),this.mountCSS(e,t,n);return}let s=this.getFileNamePostfix(t.src);if(s==="js"||s.length===0){let n=t.params.jsPoint;n||(n=this.head),this.mountJS(e,t,n);return}else if(s==="css"){let n=t.params.cssPoint;n||(n=this.head),this.mountCSS(e,t,n);return}}mountCSS(e,t,s){e.post(n=>{const i=t.src,o=this.moduleManager.get(i);if(o&&(o.status==J.Defined||o.status==J.Loaded)&&o.exports){o.type===bt.factory&&typeof o.exports=="function"?t.progress.work(!0,t.index,o.exports()):t.progress.work(!0,t.index,o.exports),n.resolve();return}const a=Xe(),l=a.createElement("link");if(Reflect.has(l,"onload"))l.onload=()=>{l.onload=null,l.onerror=null,t.progress.work(!0,t.index,t.src),n.resolve()},l.onerror=()=>{try{s.removeChild(l)}catch(h){console.error(h.message,h)}l.onload=null,l.onerror=null,t.progress.work(!1,t.index,null),n.reject()};else{const h={timeout:this.options.timeout??3e3,time:0,success:()=>{t.progress.work(!0,t.index,t.src),n.resolve()},error:()=>{try{s.removeChild(l)}catch(f){console.error(f.message,f)}t.progress.work(!1,t.index,null),n.resolve()}};setTimeout(()=>{cr(l,h)},1)}let c=a.getElementById(i);c&&c.parentNode&&c.parentNode.removeChild(c),l.rel="stylesheet",l.type="text/css",l.id=i,l.href=i,s.appendChild(l)})}mountJS(e,t,s){e.post(n=>{const i=t.src;let o=this.moduleManager.get(i);if(o&&(o.status==J.Defined||o.status==J.Loaded)){if(o.exports){o.type===bt.factory&&typeof o.exports=="function"?t.progress.work(!0,t.index,o.exports()):t.progress.work(!0,t.index,o.exports),n.resolve();return}if(document.querySelector(`script[src='${i}`)){t.progress.work(!0,t.index,o.exports),n.resolve();return}}o={id:i,src:i,status:J.Loading},this.moduleManager.set(i,o);const l=Xe().createElement("script");if("onload"in l)l.onload=()=>{l.onload=null,l.onerror=null,o.status===J.Loading&&(o.status=J.Loaded,t.progress.work(!0,t.index,i)),n.resolve()},l.onerror=()=>{try{s.removeChild(l)}catch(h){console.error(h.message,h)}l.onload=null,l.onerror=null,this.moduleManager.remove(i),t.progress.work(!1,t.index,null),n.resolve()};else{const h=l;h.onreadystatechange=()=>{/loaded|complete/.test(h.readyState)&&(h.onreadystatechange=null,o.status==J.Loading&&(o.status=J.Loaded,t.progress.work(!0,t.index,i)),n.resolve())}}l.defer=!0,l.src=i;const c=N();c.define=this.createDefine(o,t),s.appendChild(l)})}unmount(e,t={}){const s=Xe(),n=this.getFileNamePostfix(e);if(n==="js"||n.length===0){const i=s.querySelector(`script[src="${e}"]`);i&&i.parentNode&&i.parentNode.removeChild(i),this.moduleManager.remove(e);return}else if(n==="css"){const i=s.querySelector(`style[href="${e}"]`);i&&i.parentNode&&i.parentNode.removeChild(i);return}}trimEmptyElement(e){let t=[];for(let s=0;s<e.length;s++){if(e[s]===void 0||e[s]===null)continue;const n=e[s].trim();n.length!==0&&t.push(n)}return t}createDefine(e,t){const s=this,n=function(...i){e.status=J.Defining;let o,a,l,u=i.length;u===1?(l=i[0],o=void 0):u===2?(l=i[1],Array.isArray(i[0])?(a=s.trimEmptyElement(i[0]),o=void 0):a=void 0):(o=i[0],a=s.trimEmptyElement(i[1]),l=i[2]),o&&(e.id=o,s.options.alias[o]=e.src),a&&a.length>0?s.ensure(a,(...c)=>{const h=c.map(f=>f==="exports"?((!e.exports||typeof e.exports!="object")&&(e.exports={}),e.exports):f==="module"?e:f);if(typeof l=="function"){const f=Reflect.apply(l,e,h);f&&typeof f=="object"&&(e.exports=f)}else e.exports=l;e.status=J.Defined,t.progress.work(!0,t.index,e.exports)}):(typeof l=="function"?e.exports=Reflect.apply(l,e,[]):e.exports=l,e.status=J.Defined,t.progress.work(!0,t.index,e.exports))};return n.amd=!0,n}resolvePath(e){try{if(e==="exports"||e==="module"||this.isNaturePath(e))return e;e=this.parserPath(e,!0);let t=this.getFileNamePostfix(e);t=t.toLowerCase();let s=this.createSearch(this.query);return e.indexOf("?")==-1?(t!=="js"&&t!=="css"&&(e+=".js"),s.length>0&&(e+=`?${s}`)):s.length>0&&(e+=`&${s}`),e}catch(t){throw console.error(`resolve path[${e}] fail`,t),t}}createSearch(e){let t="";if(e){for(let s in e){let n=`${e[s]}`;t+=`${encodeURIComponent(s)}=${encodeURIComponent(n)}&`}t.length>0&&(t=t.substring(0,t.length-1))}return t}getFileNamePostfix(e){let t=e.lastIndexOf("?");t==-1&&(t=e.length);let s=e.lastIndexOf(".",t);return s==-1?"":e.substring(s+1,t)}isNaturePath(e){if(!this.options.nature)return!1;if(typeof this.options.nature=="function")return this.options.nature(e);const t=this.options.nature;if(t&&Array.isArray(t))for(let s=0;s<t.length;s++){const n=t[s];if(e.indexOf(n)===0)return!0}return!1}parserPath(e,t){if(e.indexOf("http://")==0||e.indexOf("https://")==0||e.indexOf("file:///")==0)return e;if(e.indexOf("/")==0)return`${Rt()}${e.slice(1)}`;if(e.indexOf("./")==0)return`${Rt()}${e.slice(2)}`;if(e.indexOf("//")==0)return`${N().location.protocol}${e}`;if(t){let n=this.options.alias[e];if(!n){let i=e.indexOf("/");if(i==-1)n=e;else{let o=e.slice(0,i),a=this.options.paths[o];a?n=a+e.slice(i):n=e}}return this.parserPath(n,!1)}return`${Rt()}${e}`}}function cr(r,e){let t=r.sheet,s=!1;if(e.isOldWebKit)t&&(s=!0);else if(t)try{t.cssRules&&(s=!0)}catch(n){n.name==="NS_ERROR_DOM_SECURITY_ERR"&&(s=!0)}setTimeout(()=>{e.time+=20,s?e.success():e.timeout>e.timeout?e.error():cr(r,e)},20)}class Cn{callback;values;status;size;lastIndex;constructor(e,t){this.size=e,this.callback=t,this.status=!0,this.values=[],this.lastIndex=-1}work(e,t,s){if(this.status=e,this.status===!0&&(this.lastIndex!==t&&this.size--,this.lastIndex=t,this.values.push(s)),this.size===0||this.status===!1)try{Reflect.apply(this.callback,this,[this.status,this.values])}catch(n){console.error(n.message,n)}}isOK(){return this.status}}class $n{index;src;params;progress;constructor(e,t,s,n){this.index=e,this.src=t,this.params=s,this.progress=n}}const is=Symbol("fk"),os=Symbol("fbk"),ls=Symbol("fepk");function Fn(r={}){const e=new sn(r),t=new Tt,s=new qt,n=new ur,i={get router(){return e},get bus(){return t},get Bus(){return Tt},get EventProxy(){return qt},get eventproxy(){return s},get EventChain(){return Ie},get Require(){return ur},get require(){return n},get extend(){return D},get clone(){return et},get isESModule(){return xt},install(o){o.provide(it,e),o.provide(is,i),o.provide(os,t),o.provide(ls,s),o.component(rn,ns),o.component(nn,Pn),Reflect.defineProperty(o.config.globalProperties,"$fox",{get(){return i}}),Reflect.defineProperty(o.config.globalProperties,"$router",{get(){return e}}),Reflect.defineProperty(o.config.globalProperties,"$bus",{get(){return t}}),Reflect.defineProperty(o.config.globalProperties,"$bus",{get(){return t}}),Reflect.defineProperty(o.config.globalProperties,"$eventProxy",{get(){return s}}),o.config.globalProperties.$fox_on=function(a,l,u=!1){s.on(a,l,u)},o.config.globalProperties.$fox_off=function(a,l){s.off(a,l)},o.config.globalProperties.$fox_once=function(a,l){s.once(a,l)},o.config.globalProperties.$fox_all=function(...a){let l=s;Reflect.apply(l.all,l,a)},o.config.globalProperties.$fox_trigger=function(a,...l){let u=s;Reflect.apply(u.trigger,u,[a,...l])},o.config.globalProperties.$fox_emit=function(a,...l){let u=s;Reflect.apply(u.trigger,u,[a,...l])},o.mixin({computed:{$route(){return Ot(this)}}}),e.init()}};return i}function as(r){return r?r.$router:b.inject(it)}function An(r){return r||(r=b.getCurrentInstance()?.proxy??void 0),r?Ot(r):null}function Tn(r){return r?r.$fox:b.inject(is)}function Kn(r){return r?r.$bus:b.inject(os)}function _n(r){return r?r.$eventProxy:b.inject(ls)}function jn(r){const e=as(),t=(s,n,i)=>{try{Reflect.apply(r,{},[s,n])}catch(o){console.error(o)}i()};e.beforeEach(t),b.onUnmounted(()=>{e.removeBeforeEach(t)})}function qn(r){const e=as(),t=(s,n,i)=>{try{Reflect.apply(r,{},[s,n])}catch(o){console.error(o)}i()};e.afterEach(t),b.onUnmounted(()=>{e.removeAfterEach(t)})}g.Bus=Tt,g.EventChain=Ie,g.EventProxy=qt,g.FoxBeforeEnter=xs,g.FoxBeforeLeave=Es,g.FoxEnter=Ps,g.FoxLeave=Cs,g.FoxLeaveEnd=tt,g.OperationType=I,g.Route=O,g.clone=et,g.createFox=Fn,g.createMemoryHistory=Bs,g.createWebHashHistory=Us,g.createWebHistory=Yr,g.deleteContextValue=Dr,g.extend=D,g.foxBusKey=os,g.foxEventProxyKey=ls,g.foxKey=is,g.injectContextValue=Lt,g.isArray=yr,g.isDate=pr,g.isESModule=xt,g.isEqual=$t,g.isFunction=L,g.isMap=dr,g.isNil=Le,g.isObject=us,g.isPlainObject=cs,g.isPromise=wr,g.isSet=mr,g.isString=gr,g.isSymbol=vr,g.onAfterRouteUpdate=qn,g.onBeforeRouteUpdate=jn,g.onFoxActivated=zr,g.onFoxInactivated=Jr,g.provideContextValue=Nr,g.rawState=qr,g.reactiveState=Kr,g.sessionKey=he,g.shallowReactiveState=_r,g.toBoolean=Et,g.toNumber=xr,g.toTypeString=Ze,g.typeOf=Ct,g.useBus=Kn,g.useEventProxy=_n,g.useFox=Tn,g.useRoute=An,g.useRouter=as,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(p,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],m):(p=typeof globalThis<"u"?globalThis:p||self,m(p.Fox={},p.Vue))})(this,function(p,m){Object.defineProperty(p,Symbol.toStringTag,{value:"Module"});var ce=typeof window<"u",_=function(){return window},Ue=function(){return window.document};function Ve(e,t,r,s=!1){e.addEventListener?e.addEventListener(t,r,s):e.attachEvent?e.attachEvent(`on${t}`,r):e[`on${t}`]=r}function vt(e,t,r){e.removeEventListener?e.removeEventListener(t,r):e.detachEvent?e.detachEvent(`on${t}`,r):e[`on${t}`]=null}var We=(e,t,r)=>{t=t??{bubbles:!1,cancelable:!1,detail:void 0};const s=document.createEvent("Events");let i=!0,n=!0;for(let o in t)o==="bubbles"?i=!!t[o]:o==="cancelable"?n=!!t[o]:s[o]=t[o];s.initEvent(e,i,n),(r??document).dispatchEvent(s)},gt=Array.isArray,ys=e=>ze(e)==="[object Map]",ds=e=>ze(e)==="[object Set]",ms=e=>e instanceof Date,S=e=>typeof e=="function",ps=e=>typeof e=="string",vs=e=>typeof e=="symbol",lr=e=>e!==null&&typeof e=="object",gs=e=>lr(e)&&S(e.then)&&S(e.catch),he=e=>e==null,ws=Object.prototype.toString,ze=e=>ws.call(e),ar=e=>ze(e)==="[object Object]",bs=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function Je(e){return e.__esModule||bs&&e[Symbol.toStringTag]==="Module"}var Rs=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function A(...e){let t=e[0]!==void 0&&e[0]!==null?e[0]:{},r=1,s=e.length,i=!1;for(typeof t=="boolean"&&(i=t,t=e[r]??{},r++),typeof t!="object"&&(t={});r<s;r++)if(e[r]!==null&&e[r]!==void 0){let n=e[r];for(let o in n){let l=t[o],a=n[o];if(l!==a)if(i===!0&&a&&typeof a=="object"){let u;Array.isArray(a)?u=l&&Array.isArray(l)?l:[]:u=l&&typeof l=="object"?l:{},t[o]=A(i,u,a)}else a!==void 0&&(t[o]=a)}}return t}function ur(e,t,r=!1){if(typeof t!="object")return{};typeof e!="object"&&(e={});for(let s of Reflect.ownKeys(t)){let i=e[s],n=t[s];if(i!==n)if(typeof n=="object"){if(!Array.isArray(n)&&!ar(n))continue;i=ur(i,n,r),e[s]=i}else{if(typeof n=="function")continue;e[s]=n}}return e}var xe=class nr{static seed=new Date().getTime();static get(){let t=++nr.seed;return t>=Number.MAX_VALUE&&(nr.seed=0),t}},wt=Rs?Promise.resolve():null;function Pe(e,...t){wt!==null?t&&t.length>0?wt.then(()=>{e(t)}):wt.then(e):t&&t.length>0?setTimeout(()=>{e(t)}):setTimeout(e)}function bt(e){return e==null?!1:typeof e=="boolean"?e:typeof e=="string"?e.toLocaleLowerCase()==="true":!!e}function Ss(e){return typeof e=="number"?e:Number(e)}var xs={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Object]":"object"};function Rt(e){let t=Object.prototype.toString.call(e);return e==null?String(e):xs[t]||"object"}function St(e,t){if(e==t)return!0;if(e===void 0||t===void 0)return!1;let r=Rt(e);if(r!==Rt(t))return!1;if(r==="object"){let s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(let n=0;n<s.length;n++){let o=s[n],l=e[o],a=t[o];if(!St(l,a))return!1}return!0}else if(r==="array"){if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++){let i=e[s],n=t[s];if(!St(i,n))return!1}return!0}return!1}var fr=e=>{const t={};for(let r of Reflect.ownKeys(e)){let s=e[r];s&&!Array.isArray(s)&&typeof s=="object"&&(s=fr(s)),typeof r=="symbol"?t[String(r)]=s:t[r]=s}return t},Ps=/^Symbol\((.*)\)$/,cr=e=>{const t={};for(let r of Reflect.ownKeys(e)){let s=e[r];s&&!Array.isArray(s)&&typeof s=="object"&&(s=cr(s));const i=Ps.exec(r);if(i&&i[1]){const n=Symbol.for(i[1]);t[n]=s}else t[r]=s}return t};function hr(e,t){let r=null;return function(...s){r&&clearTimeout(r),r=setTimeout(()=>{r=null,Reflect.apply(e,null,[...s])},t)}}var yr=Symbol("idKey"),se=Symbol("valueKey"),P=Symbol("childrenKey"),N=Symbol("growKey"),dr=class{[N]=!0;[yr];[se]=(0,m.ref)();[P]=new Map;constructor(e){this[yr]=e}},Fs=class{get(e,t){if(t=="value")return e[se].value;if(t==="grow")return e[N];let r=e[P].get(t);if(r)return Fe(r);if(e[N])return r=Pt(t),r[N]=e[N],e[P].set(t,r),Fe(r)}set(e,t,r){return t=="value"?(e[se].value=r,!0):t==="grow"?(e[N]=bt(r),!0):r==null?(e[P].delete(t),!0):(console.error(`[Fox]illegal property:${t}`),!1)}deleteProperty(e,t){return t==="value"||t=="grow"?(console.error(`[Fox]can not delete property:${String(t)}`),!1):(e[P].delete(t),!0)}},xt="__proxy__";function Pt(e){const t=new dr(e);return Reflect.set(t,xt,new Proxy(t,new Fs)),t}function Fe(e){return Reflect.get(e,xt)}var Cs=class{name="";persistPolicy="memory";storage;initFlag=!1;state={};constructor(e={},t){if(e.persistPolicy&&e.persistPolicy!=="memory"&&he(e.name))throw new Error("name can not be empty, where persistPolicy is not memory.");this.name=e.name??"",this.persistPolicy=e.persistPolicy??"memory",this.storage=e.storage,t&&typeof t=="object"&&Object.assign(this.state,t)}init(e){this.restore(e),this.initFlag=!0}getStorage(){if(!this.persistPolicy||this.persistPolicy==="memory")return null;let e=null;if(this.persistPolicy==="custom")e=this.storage;else if(ce){const t=_();e=this.persistPolicy==="session"?t.sessionStorage:t.localStorage}return e}saveState(){if(!this.persistPolicy||this.persistPolicy==="memory")return;let e=this.getStorage();if(e===null||!this.state)return;const t=`_bus_${this.name}`,r=JSON.stringify(this.state??{});e.setItem(t,r)}removeState(){if(!this.persistPolicy||this.persistPolicy==="memory")return;let e=this.getStorage();if(e===null||!this.state)return;const t=`_bus_${this.name}`;e.removeItem(t)}restore(e){if(!this.persistPolicy||this.persistPolicy==="memory")return;let t=this.getStorage();if(t===null)return;const r=`_bus_${this.name}`,s=t.getItem(r);if(s){const i=JSON.parse(s);Object.assign(this.state,i),Reflect.ownKeys(this.state).forEach(n=>{if(typeof n!="string")return;const o=this.state[n],l=n.split(/\//g);l.push(o),Reflect.apply(e.put,e,l)})}}put(e){if(this.initFlag&&this.persistPolicy!=="memory")try{const t=e.length,r=e.slice(0,t-1).join("/"),s=e[t-1];this.state[r]=s,this.saveState()}catch(t){console.error(t)}}remove(e){if(this.initFlag&&this.persistPolicy!=="memory")try{const t=e.length,r=e.slice(0,t-1).join("/"),s={};Reflect.ownKeys(this.state).forEach(i=>{typeof i=="string"&&(i===r||i.startsWith(r)||(s[i]=this.state[i]))}),this.state=s,this.saveState()}catch(t){console.error(t)}}clear(){if(this.initFlag)try{this.state={},this.removeState()}catch(e){console.error(e)}}},mr=class extends dr{_persistHandler;constructor(e={},t){super("__root__"),this._persistHandler=new Cs(e,t),this._persistHandler.init(this)}put(...e){let t=e.length;if(t<2)return console.error("[Fox]参数至少包括一个(key, value)"),!1;let r=this;for(let s=0;s<t-1;s++){let i=e[s],n;r[P].has(i)?n=r[P].get(i):(n=Pt(i),r[P].set(i,n)),r=n}return r[se].value=e[t-1],this._persistHandler.put(e),!0}get(...e){let t=e.length;if(t===0)return;let r=this;for(let s=0;s<t;s++){let i=e[s];if(r[P].has(i))r=r[P].get(i);else return}return r[se].value}remove(...e){let t=e.length;if(t==0)return!1;let r=this;for(let i=0;i<t-1;i++){const n=e[i];if(r[P].has(n))r=r[P].get(n);else return!1}const s=e[t-1];return r[P].has(s)?(r[P].delete(s),this._persistHandler.remove(e),!0):!1}contains(...e){const t=e.length;if(t==0)return!1;let r=this;for(let i=0;i<t-1;i++){let n=e[i];if(r[P].has(n))r=r[P].get(n);else return!1}const s=e[t-1];return r[P].has(s)}clear(){this[P].clear(),this._persistHandler.clear()}},Es=["put","get","contains","remove","clear","_persistHandler"];function pr(e){return Es.includes(e)}var _s=class{get(e,t){if(t=="value")return e[se].value;if(t==="grow")return e[N];if(t===P)return e[P];if(typeof t=="string"&&pr(t))return e[t];const r=String(t);let s=e[P].get(r);if(s)return Fe(s);if(e[N])return s=Pt(r),s[N]=e[N],e[P].set(r,s),Fe(s)}set(e,t,r){return t=="value"?(e[se].value=r,!0):t==="grow"?(e[N]=bt(r),!0):pr(t)?!1:r==null?(e[P].delete(t),!0):(console.error(`[Fox]illegal property:${t}`),!1)}deleteProperty(e,t){return t==="value"||t=="grow"?(console.error(`[Fox]can not delete property:${String(t)}`),!1):(e[P].delete(t),!0)}};function As(e,t){const r=new mr(e,t),s=new _s,i=new Proxy(r,s);return Reflect.set(r,xt,i),r}var Ft=new Proxy(mr,{construct(e,t){const r=t[0]??{},s=t[1];return Fe(As(r,s))}}),Ct=new WeakMap,Et=e=>!e||typeof e!="object"?!0:Reflect.ownKeys(e).length===0,vr=class{name="";persistPolicy="memory";storage;constructor(e={}){if(e.persistPolicy&&e.persistPolicy!=="memory"&&he(e.name))throw new Error("name can not be empty, where persistPolicy is not memory.");this.name=e.name??"",this.persistPolicy=e.persistPolicy??"memory",this.storage=e.storage}getStorage(){if(!this.persistPolicy||this.persistPolicy==="memory")return null;let e=null;if(this.persistPolicy==="custom")e=this.storage;else if(ce){const t=_();e=this.persistPolicy==="session"?t.sessionStorage:t.localStorage}return e}saveState(e){if(!this.persistPolicy||this.persistPolicy==="memory")return;let t=this.getStorage();if(t===null||Et(e))return;const r=`_state_${this.name}`,s=JSON.stringify(e??{});t.setItem(r,s)}removeState(){if(!this.persistPolicy||this.persistPolicy==="memory")return;let e=this.getStorage();if(e===null)return;const t=`_state_${this.name}`;e.removeItem(t)}restore(e){if(!this.persistPolicy||this.persistPolicy==="memory")return;let t=this.getStorage();if(t===null)return;const r=`_state_${this.name}`,s=t.getItem(r);if(s){const i=JSON.parse(s);Object.assign(e,i)}}};function gr(e,t,r){const s=new vr(r);s.restore(t);const i=a=>{const u=(0,m.toRaw)(a),f={};for(let c in u){const h=u[c];he(h)||(f[c]=h)}Et(f)?s.removeState():s.saveState(f)};let n=null;if(r&&r.debounce===!1)n=i;else{const a=r&&r.debounceDelay?r.debounceDelay:250;n=hr(i,a)}const o=e?(0,m.shallowReactive)(t):(0,m.reactive)(t),l=(0,m.effectScope)(!0);return l.run(()=>{(0,m.watch)(o,a=>{const u=(0,m.toRaw)(a);n(u)})}),Ct.set(o,l),o}function js(e,t){return gr(!1,e,t)}function qs(e,t){return gr(!0,e,t)}function $s(e,t){const r=new vr(t);r.restore(e);const s=n=>{const o=(0,m.toRaw)(n),l={};for(let a in o){const u=o[a];he(u)||(l[a]=u)}Et(l)?r.removeState():r.saveState(l)};let i=null;if(t&&t.debounce===!1)i=s;else{const n=t&&t.debounceDelay?t.debounceDelay:250;i=hr(s,n)}return new Proxy(e,{get(n,o){return n[o]},set(n,o,l){return n[o]=l,i(n),!0}})}function Ks(e,t){return $s(e,t)}function Ts(e){const t=Ct.get(e);t&&(Ct.delete(e),t.stop())}var Ge=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({}),ks={type:0,value:""},Ls=/[a-zA-Z0-9_]/;function Ms(e){if(!e)return[[]];if(e==="/")return[[ks]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(y){throw new Error(`ERR (${r})/"${u}": ${y}`)}let r=0,s=r;const i=[];let n;function o(){n&&i.push(n),n=[]}let l=0,a,u="",f="";function c(){u&&(r===0?n.push({type:0,value:u}):r===1||r===2||r===3?(n.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),n.push({type:1,value:u,regexp:f,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),u="")}function h(){u+=a}for(;l<e.length;){if(a=e[l++],a==="\\"&&r!==2){s=r,r=4;continue}switch(r){case 0:a==="/"?(u&&c(),o()):a===":"?(c(),r=1):h();break;case 4:h(),r=s;break;case 1:a==="("?r=2:Ls.test(a)?h():(c(),r=0,a!=="*"&&a!=="?"&&a!=="+"&&l--);break;case 2:a===")"?f[f.length-1]=="\\"?f=f.slice(0,-1)+a:r=3:f+=a;break;case 3:c(),r=0,a!=="*"&&a!=="?"&&a!=="+"&&l--,f="";break;default:t("Unknown state")}}return r===2&&t(`Unfinished custom RegExp for param "${u}"`),c(),o(),i}var wr="[^/]+?",Is={sensitive:!1,strict:!1,start:!0,end:!0},Os=/[.+*?^${}()[\]/\\]/g;function Ds(e,t){const r=A(!0,{},Is,t),s=[];let i=r.start?"^":"";const n=[];for(const u of e){const f=u.length?[]:[90];r.strict&&!u.length&&(i+="/");for(let c=0;c<u.length;c++){const h=u[c];let y=40+(r.sensitive?.25:0);if(h.type===Ge.Static)c||(i+="/"),i+=h.value.replace(Os,"\\$&"),y+=40;else if(h.type===Ge.Param){const{value:d,repeatable:v,optional:R,regexp:g}=h;n.push({name:d,repeatable:v,optional:R});const w=g||wr;if(w!==wr){y+=10;try{new RegExp(`(${w})`)}catch(L){throw new Error(`Invalid custom RegExp for param "${d}" (${w}): `+L.message)}}let K=v?`((?:${w})(?:/(?:${w}))*)`:`(${w})`;c||(K=R&&u.length<2?`(?:/${K})`:"/"+K),R&&(K+="?"),i+=K,y+=20,R&&(y+=-8),v&&(y+=-20),w===".*"&&(y+=-50)}f.push(y)}s.push(f)}if(r.strict&&r.end){const u=s.length-1;s[u][s[u].length-1]+=.7000000000000001}r.strict||(i+="/?"),r.end?i+="$":r.strict&&!i.endsWith("/")&&(i+="(?:/|$)");const o=new RegExp(i,r.sensitive?"":"i");function l(u){const f=u.match(o),c={};if(!f)return null;for(let h=1;h<f.length;h++){const y=f[h]||"",d=n[h-1];c[d.name]=y&&d.repeatable?y.split("/"):y}return c}function a(u){let f="",c=!1;for(const h of e){(!c||!f.endsWith("/"))&&(f+="/"),c=!1;for(const y of h)if(y.type===Ge.Static)f+=y.value;else if(y.type===Ge.Param){const{value:d,repeatable:v,optional:R}=y,g=d in u?u[d]:"";if(gt(g)&&!v)throw new Error(`Provided param "${d}" is an array but it is not repeatable (* or + modifiers)`);const w=gt(g)?g.join("/"):g;if(!w)if(R)h.length<2&&(f.endsWith("/")?f=f.slice(0,-1):c=!0);else throw new Error(`Missing required param "${d}"`);f+=w}}return f||"/"}return{re:o,score:s,keys:n,parse:l,stringify:a}}function Hs(e,t){const r=Ds(Ms(e),t);return function(s){const i=r.parse(s);return i?{path:s,params:i}:null}}var br="default",Rr=Symbol("sync"),T=Symbol("normalizeRoute");function Sr(e){let t=!1;return function(...r){if(!t)return t=!0,Reflect.apply(e,{},r)}}function Ns(e){let t=e.src;return new Promise((r,s)=>{const i=Sr(l=>{Je(l)&&(l=l.default),e.component=l,console.debug("success load async module"),r()}),n=Sr(l=>{`${l}`,console.debug("reject load async module"),s(l)});let o;try{o=t(i,n)}catch(l){n(l)}if(o)if(typeof o.then=="function")o.then(i,n);else{const l=o.component;l&&typeof l.then=="function"&&l.then(i,n)}})}var Bs=class{name;level;rootName;rootIndex=0;constructor(e,t,r,s){this.name=e,this.level=t,this.rootName=r,this.rootIndex=s}},Xe=class hs{to;routeModel;from;data={};constructor(t,r){this.to=t,this.from=r}static from(t){const r=new hs(t.to,t.from),s=t.data??{};return A(!0,r.data,s),r}static clear(t){for(let r in t)t[r]=void 0}},x=class or{path;get fullPath(){const t=this.path??`${this.name}`;return`${this.root??"default"}!${t}`}alias;name;root;params;query;traceless;template;matched;meta;success;error;destroy;opsType;updateType;historyUpdatePolicy;viewTagAttrs;index;active;slot;static clone(t,r){let s=new or;return ur(s,t,r),s}static isSame(t,r){return!t||!r?!1:t===r?!0:t.root!==r.root||t.index!==r.index?!1:t.path&&r.path&&t.path===r.path?!0:!!(t.name&&r.name&&t.name===r.name)}static isSamePathForRoute(t,r){return!t||!r?!1:t===r||t.path&&r.path&&t.path===r.path?!0:!!(t.name&&r.name&&t.name===r.name)}static from(t){let r=new or;if(t==null)return r;let s=r;for(let n in t)s[n]=t[n];const i=Object.getOwnPropertySymbols(t);if(Array.isArray(i)&&i.length>0)for(let n of i)s[n]=t[n];return r}},Us=class{id;name;props;src;component;constructor(e,t,r){this.id=xe.get(),this.name=e,this.src=t,typeof t!="function"&&(this.component=t),this.props=r}get isResolved(){return this.component!==void 0}resolve(){return Ns(this)}},xr=class{models=[]},_t=class{path;match;redirect;name;meta;matchedRoutes;layers=[]},C=(function(e){return e[e.Push=0]="Push",e[e.Replace=1]="Replace",e[e.Put=2]="Put",e[e.Append=3]="Append",e[e.Open=4]="Open",e})({}),At=(function(e){return e[e.Part=0]="Part",e[e.All=1]="All",e})({}),B=Symbol("rootKey"),U=Symbol("rootNodeKey"),ie=Symbol("parentNodeKey"),Qe=Symbol("nameKey"),Y=class{model;route;active=!0;index=0;constructor(e,t,r=0,s=!0){this.route=e,this.model=t,this.index=r,this.active=s}},Ce=class{_slots;get slots(){return this._slots==null&&(this._slots=(0,m.shallowRef)([])),this._slots}get empty(){return this._slots==null||this._slots.value.length==0}[Qe];[B];[U]=null;[ie]=null;get name(){return this[Qe]}constructor(e,t,r){this[Qe]=e,this[B]=t,r&&(this[U]=r)}},O=class{view;index;level;constructor(e,t,r){this.view=e,this.index=t,this.level=r}static include(e,t){for(let r=0;r<e.length;r++){let s=e[r];if(s.view===t.view&&(t.index==-1||s.index===t.index)&&s.level===t.level)return!0}return!1}},jt=class{views=[]},Vs=class{layers=[]},Ws=class{time;route},zs=class{forbidTime=300;submitRecorder=new Ws;isSameRoute(e,t){return e==null||t==null?!1:e.name===t.name&&e.path===t.path&&e.root===t.root}acquire(e){let t=new Date().getTime();if(this.isSameRoute(e,this.submitRecorder.route)&&this.submitRecorder.time&&t-this.submitRecorder.time<=this.forbidTime){this.submitRecorder.time=t;return}return this.submitRecorder.route=e,this.submitRecorder.time=t,t}release(e){this.submitRecorder.time===e&&(this.submitRecorder.route=void 0)}},D=Symbol("chainKey"),k=Symbol("cursorKey"),qt=Symbol("$persistentModeKey"),E=Symbol("statusKey"),J=Symbol("argsKey"),Ze=Symbol("exArgsKey"),ye=Symbol("successFnsKey"),Ee=Symbol("errorFnsKey"),ne=Symbol("sessionKey"),G=Symbol("_go"),_e=class{[D]=[];[k]=0;[qt]=!1;[E]="Free";[J]=[];[Ze]=[];[ye]=[];[Ee]=[];[ne];get session(){return this[ne]}constructor(e,t=!1){this[ne]=e,this[qt]=t}[G](e,...t){let r=this[E];if(this[E]="Busy",this[k]+=e,this[k]<0&&(this[k]=0),this[J]=t,r==="Exception"||r==="Reject"){let n=[{session:this[ne]},...this[Ze]];for(;this[Ee].length>0;)try{let o=this[Ee].shift();typeof o=="function"&&Pe(()=>{Reflect.apply(o,{},n)})}catch(o){console.error(o.message,o)}return this[E]=r,this[D]=[],this[k]=0,this}else if(r==="Finished"||this[k]>=this[D].length){let n=[{session:this[ne]},...this[J]];for(;this[ye].length>0;){let o=this[ye].shift();typeof o=="function"&&Pe(()=>{Reflect.apply(o,{},n)})}return this[E]="Free",this}if(this[k]>=this[D].length)return this[E]="Free",this;let s=this[D][this[k]];this[qt]||(this[D].splice(0,this[k]+1),this[k]=-1);let i=this[k]+1;try{let n=!1,o={go:(l,...a)=>{n||(n=!0,Reflect.apply(this[G],this,[l,...a]))},resolve:(...l)=>{n||(n=!0,Reflect.apply(this[G],this,[1,...l]))},reject:(...l)=>{n||(n=!0,Reflect.apply(this.reject,this,[...l]))},insert:l=>{n||(this[D].splice(i,0,l),i++)},session:this[ne]};Pe(()=>{Reflect.apply(s,{},[o,...this[J]])})}catch(n){this.throw(n)}return this}go(e,...t){return Reflect.apply(this[G],this,[e,...t])}finish(...e){return this[E]="Finished",this[J]=e,Reflect.apply(this[G],this,[0])}reject(...e){return this[E]="Reject",this[Ze]=e,Reflect.apply(this[G],this,[0])}throw(...e){return this[E]="Exception",this[Ze]=e,Reflect.apply(this[G],this,[0])}reset(...e){this[E]="Busy",this[J]=e,this[D]=[],this[k]=0;let t=[{session:this[ne]},...this[J]];for(;this[ye].length>0;){let r=this[ye].shift();Pe(()=>{Reflect.apply(r,this,t)})}return this[E]="Free",this}post(e){return this[E]==="Reject"||this[E]==="Exception"?this:(Array.isArray(e)?this[D]=[...this[D],...e]:this[D].push(e),this[E]==="Busy"?this:(Reflect.apply(this[G],this,[0,...this[J]]),this))}wait(e,t){return e&&typeof e=="function"&&this[ye].push(e),t&&typeof t=="function"&&this[Ee].push(t),this[E]==="Busy"?this:(Reflect.apply(this[G],this,[0,...this[J]]),this)}exception(e){return e&&typeof e=="function"&&this[Ee].push(e),this[E]==="Busy"?this:Reflect.apply(this[G],this,[0,...this[J]])}isFinish(){return this[E]=="Reject"||this[E]=="Free"&&this[k]>=this[D].length}},de=Symbol("_notifyChange"),$t=class{currentRoute;routes;constructor(e,t){this.currentRoute=e,this.routes=t}},oe=Symbol("historyChangeConsumerKey"),Pr=Symbol("_navigateFirstRoute"),Ye=Symbol("_getRouteMark"),Kt=Symbol("_getUrlSearch"),Tt=Symbol("_generateLocation"),et=Symbol("_setRouteMarkRecorder"),Ae=Symbol("beforeRestoreFiltersKey"),Fr=Symbol("_beforeRestore"),Cr="Symbol(_fox_restore_point)";function tt(e,...t){return typeof e=="function"?Reflect.apply(e,null,[...t]):e}function Er(e){if(!Array.isArray(e))return!1;if(e.length===0)return!0;const t=e[0];return!!((Reflect.has(t,"path")||Reflect.has(t,"name"))&&Reflect.has(t,"root"))}var _r=class{base;storage;mode;query;firstNavigate=!0;historyMonitor;traceless=!1;changeHandler;historyChange;[oe]=!1;[Ae]=new Array;backTimeout=320;constructor(e="hash",t="",r="",s=!0,i=!0,n=!1,o,l){this.mode=e,this.base=t,this.query=r,this.firstNavigate=s,this.historyMonitor=i,this.traceless=n,this.storage=o??_().sessionStorage,this.backTimeout=l??320}init(e=!0){const t=_();return typeof this.historyChange!="function"&&(this.historyChange=()=>{if(typeof this[oe]=="function"){const r=this[oe]();if(this[oe]=!1,r)return}else if(this[oe]===!0){this[oe]=!1;return}if(tt(this.historyMonitor)){const r=t.history.state;this[de](r);try{let s=[];if(typeof r=="string"?s=JSON.parse(r):s=r,Array.isArray(s)&&s.length>0){const i=this[Ye]()??"/";this[et](i,s)}}catch{}}}),Ve(t,"popstate",this.historyChange),this.firstNavigate&&e&&this[Pr](),Promise.resolve()}destroy(){if(this.historyChange){const e=_();vt(e,"popstate",this.historyChange)}}[Fr](e,t,r,s){for(let i of this[Ae])try{const n=Reflect.apply(i,{},[e,t,r,s]);if(n===!1)return n}catch(n){console.error(n.message,n)}return!0}beforeRestoreEach(e){this[Ae].push(e)}removeBeforeRestoreEach(e){const t=this[Ae].indexOf(e);return t!==-1?(this[Ae].splice(t,1),!0):!1}[Pr](){const e=this[Ye]()??"/",t=this.storage.getItem(Cr);if(t)try{const n=JSON.parse(t);if(n.mark===e&&Array.isArray(n.routes)&&n.routes.length>0){const o=n.routes.filter((l,a)=>(l.params=l.params?cr(l.params):{},this[Fr](l,a,e,n.routes)));if(o.length>0){const l=this[Kt](),a=o.length-1;o[a].query=l||o[a].query,this[de](o);return}}}catch{}const r=e.indexOf("!");let s;r!=-1?s=e.substring(r+1):s=e;const i=new x;i.path=s,i.query=this[Kt](),this[de]([i])}[et](e,t){try{t.forEach(s=>{s.params=s.params?fr(s.params):{}});const r=JSON.stringify({mark:e,routes:t});this.storage.setItem(Cr,r)}catch(r){console.error(r.message,r)}}setRestorePoint(e){const t=this[Ye]()??"/";this[et](t,e)}[de](e){typeof this.changeHandler=="function"&&this.changeHandler(e)}[Ye](){const e=_();if(this.mode==="path"){let t=e.location.pathname;return this.base&&t.indexOf(this.base)===0&&(t=t.substring(this.base.length)),t}else{const t=e.location.hash,r=t.indexOf("#");if(r!=-1)return t.substring(r+1)}return null}[Kt](){let e=_().location.search;return e.length>0&&e.indexOf("?")===0&&(e=e.substring(1)),e}listen(e){this.changeHandler=e}go(e,t=!1){const r=_();this[oe]=t,r.history.go(e)}goBack(e,t){const r=_(),s=r.history.state;if(Er(s)&&s.length>0){let i=!1;for(let u=s.length-1;u>=0;u--){const f=x.from(s[u]);if(x.isSame(f,e)){i=!0;break}}if(!i){t();return}const n=this.backTimeout;let o=null;const l=()=>{r.history.go(-1),o=setTimeout(l,n)},a=()=>{clearTimeout(o);const u=_().history.state;if(Er(u)&&u.length>0){let f=u.length;const c=u[f-1],h=x.from(c);if(x.isSame(h,e))return t(),!0;if(f>0){let y=!1;for(let d=f-1;d>=0;d--){const v=x.from(u[d]);if(!(v.traceless===!0||tt(this.traceless,v))&&x.isSame(v,e)){y=!0;break}}return y?(setTimeout(()=>{o=setTimeout(l,n),this.go(-1,a)},0),!0):(t(),!0)}}return t(),!0};o=setTimeout(l,n),this.go(-1,a)}else t()}setRouteMark(e){const t=e.currentRoute.fullPath;this[et](t,e.routes)}push(e){const t=this[Tt](e.currentRoute);e.currentRoute.historyUpdatePolicy!=="traceless"&&!tt(this.traceless,e.currentRoute)&&_().history.pushState(e.routes,"",t),this.setRouteMark(e)}replace(e){const t=this[Tt](e.currentRoute);(e.currentRoute.historyUpdatePolicy!=="traceless"||!tt(this.traceless,e.currentRoute))&&_().history.replaceState(e.routes,"",t),this.setRouteMark(e)}[Tt](e){const t=_();let r="";if(e.query){let o="";if(typeof e.query=="object")for(let l of Reflect.ownKeys(e.query)){let a=encodeURIComponent(e.query[l]),u=`${encodeURIComponent(String(l))}=${a}`;o.length>0&&(o+="&"),o+=u}else o=e.query;this.query?(r=o.length>0?`${this.query}&${o}`:this.query,r.length>0&&r.charAt(0)!=="?"&&(r=`?${r}`)):o.length>0&&(r=`?${o}`)}const s=t.location;let i=e.alias??e.fullPath;i.startsWith("default")&&(i=i.substring(br.length+1));let n;return r?this.mode=="path"?i.indexOf("/")===0?n=`${this.base}${i}${r}`:n=`${this.base}/${i}${r}`:n=`${s.pathname}${r}#${i}`:this.mode=="path"?i.indexOf("/")===0?n=`${this.base}${i}`:n=`${this.base}/${i}`:n=`${s.pathname}#${i}`,`${s.origin}${n}`}};function Js(e=!0,t=null,r="",s=!0,i=!1,n){return t!==null&&(t=_().location.pathname),t&&t.endsWith("/")&&(t=t.substring(0,t.length-1)),new _r("path",t??"",r,e,s,i,n)}function Ar(e=!0,t="",r=!0,s=!1,i){return new _r("hash","",t,e,r,s,i)}var Gs=class{maxSize=50;cursor=-1;queue=[];changeHandler;base;historyMonitor=!1;traceless=!1;constructor(e,t=50){this.base=e,this.maxSize=t}init(e=!0){return Promise.resolve()}destroy(){this.queue=[]}beforeRestoreEach(e){}removeBeforeRestoreEach(e){return!1}listen(e){this.changeHandler=e}[de](e){typeof this.changeHandler=="function"&&this.changeHandler(e)}go(e,t=!1){if(this.queue.length==0||this.cursor<=0)return;let r=this.cursor+e;if(r<0?r=0:r>this.queue.length-1&&(r=this.queue.length-1),r!=this.cursor){this.cursor=r;let s=!1;if(typeof t=="function"?s=t():s=t,!s){const i=this.queue[r];this[de](i.routes)}}}goBack(e,t){if(this.queue.length==0||this.cursor<=0)return;let r=0;if(e===null)r=this.cursor+1;else for(let s=this.cursor;s>=0;s--){const i=this.queue[s];if(x.isSame(i.currentRoute,e))break;r++}if(r===0){t();return}this.go(-r,()=>(t(),!0))}setRouteMark(e){}push(e){this.queue.length>=this.maxSize&&this.queue.splice(0,1),this.queue.push(e),this.cursor=this.queue.length-1}replace(e){let t=this.queue.length-this.cursor;this.queue.splice(this.cursor,t),this.queue[this.cursor]=e}setRestorePoint(e){}};function jr(e="",t=50){return new Gs(e,t)}function Di(e){}var rt=Symbol("_constructRouteModel"),st=Symbol("_findRouteModel"),kt=Symbol("_findRootView"),Xs=Symbol("_getFirstView"),le=Symbol("_removeView"),qr=Symbol("_buildPage"),$r=Symbol("_resolveComponent"),Kr=Symbol("_update"),ee=Symbol("_merge"),Lt=Symbol("_handleHistoryChange"),ae=Symbol("_handleRouteUpdated"),it=Symbol("routeUpdatedCallback"),je=Symbol("currentRoute"),b=Symbol("currentRoutes"),nt=Symbol("routeSessionCacheKey"),Tr=Symbol("_addRouteRecorder"),qe=Symbol("_removeRouteRecorder"),$e=Symbol("_cloneRouteRecorder"),q=Symbol("_handleError"),ot=Symbol("errorCallback"),H=Symbol("registerKey"),lt=Symbol("notFoundKey"),Mt=Symbol("notFoundPathKey"),V=Symbol("forestKey"),F=Symbol("historyKey"),Ke=Symbol("beforeFiltersKey"),Te=Symbol("afterFiltersKey"),ke=Symbol("destroyFiltersKey"),It=Symbol("propsFilterKey"),me=Symbol("mainDispatcherKey"),at=Symbol("initKey"),ue=Symbol("readyKey"),ut=Symbol("readyHandlersKey"),ft=Symbol("_markReady"),kr=Symbol("_createNextFn"),Ot=Symbol("_start"),Dt=Symbol("_before"),Ht=Symbol("_after"),Lr=Symbol("_destroy"),Nt=Symbol("_load"),Le=Symbol("_unload"),Me=Symbol("routerGuardKey");function Qs(e){return e.layers.length==0||e.layers[0].views.length==0}var Mr=class{[H]=new Array;[lt];[Mt]="*";[ue]=!1;[ut]=[];[V]=new Vs;[F];[b]=new Array;[je]=(0,m.shallowRef)(null);[nt]=new WeakMap;[ot]=null;[it]=null;[Ke]=new Array;[Te]=new Array;[ke]=new Array;[It]=null;[me]=new _e;[Me]=new zs;[at]=!1;get currentRoute(){return(0,m.readonly)(this[je])}options;constructor(e){this.options=e??{},this.options.notFoundPath&&this.setNotFoundPath(this.options.notFoundPath);let t=this.options.routes||[];this.addRoutes(t),this.options.notFound&&this.setNotFoundRoute(this.options.notFound),e.history?this[F]=e.history:this[F]=ce?Ar():jr(),this[F]?.listen(async r=>{let s=!0;try{if(typeof r=="string"){const i=this[T](r);i&&await this[Lt]([i])}else await this[Lt](r)}catch(i){console.error(i.message,i),s=!1}this[ue]===!1&&this[ft](s)})}[q](e="error",t){if(t&&typeof t.error=="function")try{t.error(e)}catch{}if(typeof this[ot]=="function")try{this[ot](e,t)}catch{}console.error(e)}init(){this[at]!==!0&&(this[F]?.init(!this[ue]),this[at]=!0)}destroy(){this[F]?.destroy(),this[at]=!1}isReady(){return this[ue]?Promise.resolve():new Promise((e,t)=>{this[ut].push([e,t])})}[ft](e){this[ue]=!0,this[ut].forEach(([t,r])=>{try{e?t():r()}catch(s){console.error(s.message,s)}}),this[ut]=[]}[Lt](e){try{if(!e){let n=[...this[b]].reverse();return this[Le](n),ce&&_().location.reload(),Promise.resolve()}let t=null,r=[],s=[],i=0;for(;i<e.length&&i<this[b].length&&x.isSame(e[i],this[b][i]);i++)e[i].active===!0&&e[i].active!==this[b][i].active&&(t=e[i]);if(i<e.length)r=e.slice(i);else if(i===e.length)for(;i<this[b].length&&this[b][i].historyUpdatePolicy==="traceless";i++)r.push(this[b][i]),t=e[i];if(i<this[b].length&&(s=this[b].slice(i).reverse()),s.length===0&&r.length===0){if(t!==null)return this.restore([t])}else if(s.length>0){if(this[Le](s)){if(r.length>0)return this.restore(r);if(t!==null)return this.restore([t])}}else return this.restore(r)}catch(t){this[q](t)}return Promise.resolve()}[ae](e=null){if(this[je].value=e,typeof this[it]=="function")try{this[it](e)}catch{}}[Tr](e,t){if(e.opsType===C.Open){let r=!1;const s=this[b].length-1;for(let i=s;i>=0;i--){const n=this[b][i];if(e.root==n.root){if(e.path===n.path){this[b].splice(i,1,e),r=!0;continue}e.active&&(n.active=!1)}}r||this[b].push(e)}else this[b].push(e);this[nt].set(e,t),this[ae](e)}[$e](){let e=[];for(let t of this[b]){let r=x.clone(t,!0);e.push(r)}return e}[qe](e){if(!this[b]){this[ae](null);return}let t=-1;for(let r=0;r<this[b].length;r++)if(x.isSame(this[b][r],e)){t=r;break}if(t!=-1){const r=this[b][t];this[b].splice(t,1);const s=this[nt].get(r);if(this[nt].delete(r),this[Lr](r,s),r.opsType===C.Append){const i=this[b].length-1;this[ae](this[b][i]??null)}else this[je].value&&x.isSame(this[je].value,e)&&this[ae](null)}else this[ae](null)}set historyMonitor(e){this[F]&&(this[F].historyMonitor=e)}get historyMonitor(){return this[F]?this[F].historyMonitor:!1}set traceless(e){this[F]&&(this[F].traceless=e)}get traceless(){return this[F]?.traceless??!1}set propsFilter(e){this[It]=e}get propsFilter(){return this[It]}setRestorePoint(){const e=this[$e]();this[F]?.setRestorePoint(e)}onRouteUpdated(e){this[it]=e}onError(e){this[ot]=e}beforeEach(e){this[Ke].push(e)}removeBeforeEach(e){const t=this[Ke].indexOf(e);return t!==-1?(this[Ke].splice(t,1),!0):!1}afterEach(e){this[Te].push(e)}removeAfterEach(e){const t=this[Te].indexOf(e);return t!==-1?(this[Te].splice(t,1),!0):!1}destroyEach(e){this[ke].push(e)}removeDestroyEach(e){const t=this[ke].indexOf(e);return t!==-1?(this[ke].splice(t,1),!0):!1}beforeRestoreEach(e){this[F]?.beforeRestoreEach(e)}removeBeforeRestoreEach(e){return this[F]?.removeBeforeRestoreEach(e)??!1}addRoutes(e){for(let t of e)this.addRoute(t)}addRoute(e,t=-1){if(e.path===this[Mt]){this.setNotFoundRoute(e);return}const r=this[rt](e);if(t==-1)this[H]=[...this[H],...r];else for(let s=r.length-1;s>=0;s--)this[H].splice(t,0,r[s])}removeRoute(e){const t=this[T](e);if(t===null)return console.warn("[Fox]Illegal routing format",e),!1;for(let r=0;r<this[H].length;r++){const s=this[H][r];if(t?.path&&s.path===t.path)return this[H].splice(r,1),!0;if(t?.name&&s.name===t.name)return this[H].splice(r,1),!0}return!1}hasRoute(e){const t=this[T](e);return t===null?(console.warn("[Fox]Illegal routing format",e),!1):this[H].findIndex(r=>{if(t?.path&&r.path===t.path||t?.name&&r.name===t.name)return!0})!==-1}setNotFoundPath(e){this[Mt]=e}setNotFoundRoute(e){const t=this[rt](e);this[lt]=t[0]}getRoutes(){return[...this[H]]}[rt](e){let t=e.path??"";t.length>0&&t.charAt(0)!=="/"&&(t=`/${t}`);let r=e.components??(e.component&&{"":e.component});if(!r){const l=new _t;return l.path=t,l.redirect=e.redirect,[l]}const s=new x;s.path=t,s.name=e.name,s.meta=e.meta;let i=[];for(let l in r){const a=r[l];l.length===0&&(l=br);const u=new Us(l,a,e.props);i.push(u)}let n=!1,o=[];if(e.children)for(let l of e.children){const a=this[rt](l);for(let u of a){let f=new _t;f.name=u.name,u.path&&u.path.length>0?t!=="/"?f.path=`${t}${u.path}`:f.path=u.path:(n=!0,f.path=t);let c=new xr;c.models=[...i],f.layers=[c,...u.layers],f.matchedRoutes=[s,...u.matchedRoutes??[]],o.push(f)}}if(!n){const l=new xr;l.models=i;const a=new _t;a.name=e.name,a.path=t,a.matchedRoutes=[s],a.layers=[l],o.splice(0,0,a)}return o}[st](e){const t=e.route;try{for(let r of this[H]){const s=t.path?t.template??t.path:null,i=t.name?t.template??t.name:null;if(s&&r.path){let n=r.match;n||(n=r.match=Hs(r.path));const o=n(s);if(!o)continue;if(r.redirect){const l=new x;A(!0,l,t),l.path=r.redirect;const a={route:l,find:void 0};return this[st](a)?(e.route=a.route,e.find=a.find,t.template&&e.find&&(e.find={...e.find},e.find.path=t.path),!0):!1}if(t.params=t.params??{},A(!0,t.params,o.params),t.query){const l=t.query;if(typeof l=="string"){const a={},u=l.split("&");for(let f of u){const c=f.split("=");if(c.length!==2)continue;const h=decodeURIComponent(c[0].trim());a[h]=decodeURIComponent(c[1].trim())}A(!0,t.params,a)}else typeof l=="object"&&A(!0,t.params,l)}return e.find=r,t.template&&e.find&&(e.find={...e.find},e.find.path=t.path),!0}else if(i===r.name)return e.find=r,t.template&&e.find&&(e.find={...e.find},e.find.name=t.name),!0}}catch(r){console.error(r.message,r),typeof t.error=="function"&&t.error(r.message)}return!1}[T](e){let t=null;if(Array.isArray(e))if(t=new x,typeof e[0]=="object")t=x.from(e[0]);else for(let r=0;r<e.length;r++)r===0?e[r].charAt(0)==="/"?t.path=e[r]:t.name=e[r]:r===1?t.params=e[r]:r===2?t.root=e[r]:r===3&&A(!1,t,e[r]);else typeof e=="object"?t=x.from(e):typeof e=="string"&&(t=new x,e.charAt(0)=="/"?t.path=e:t.name=e);if(t){if(t.path){let r=t.path.indexOf("?");r!==-1&&r<t.path.length-1&&(t.query=t.path.substring(r+1),t.path=t.path.substring(0,r))}t.root=t.root??"default",t.opsType=t.opsType??this.options.defaultOperationType??C.Push,t.traceless&&!t.historyUpdatePolicy&&(t.historyUpdatePolicy="traceless")}return t}push(...e){const t=this[T](e);return t?(t.opsType=C.Push,t.historyUpdatePolicy=t.historyUpdatePolicy??"push",this.to(t)):(this[q]("resolve route fail",t),this)}put(...e){const t=this[T](e);return t?(t.opsType=C.Put,t.historyUpdatePolicy=t.historyUpdatePolicy??"traceless",this.to(t)):(this[q]("resolve route fail",t),this)}replace(...e){const t=this[T](e);return t?(t.opsType=C.Replace,t.historyUpdatePolicy=t.historyUpdatePolicy??"replace",this.to(t)):(this[q]("resolve route fail",t),this)}append(...e){const t=this[T](e);return t?(t.opsType=C.Append,t.historyUpdatePolicy=t.historyUpdatePolicy??"push",this.to(t)):(this[q]("resolve route fail",t),this)}remove(e,t){return new Promise(r=>{this[me].post(s=>{try{if(this[b].length===0){s.resolve(),r(!1);return}let i=-1,n=null,o=[],l=this[b].length-1,a=l!==-1?this[b][l]:null;if(e){if(n=e.root??"default",e.all)for(let f=l;f>0;f--){const c=this[b][f];if(c.opsType===C.Append){const h=c.root??"default";if(n&&n!==h)continue;o.splice(0,0,c),i=f-1}}else if(e.until)for(let f=l;f>0;f--){let c=this[b][f];if(c.opsType===C.Append&&c.root===n){if(e.until.charAt(0)==="/"&&e.until===c.path){i=f;break}else if(e.until===c.name){i=f;break}o.splice(0,0,c)}}else if(e.to)for(let f=l;f>0;f--){const c=this[b][f];if(c.opsType===C.Append){const h=c.root??"default";if(n&&n!==h)continue;if(o.splice(0,0,c),e.to.charAt(0)==="/"&&e.to===c.path){i=f-1;break}else if(e.to===c.name){i=f-1;break}}}}else for(let f=l;f>0;f--){let c=this[b][f];if(c.opsType===C.Append){o.push(c),i=f-1;break}}if(i===-1||o.length===0){const f="[Fox]can not find route";console.warn(f),s.resolve(f),r(!1);return}const u=i!==-1?this[b][i]:null;if(this[Le](o)){if(t===!1)return s.resolve(),r(!0),!0;const f=()=>(s.resolve(),r(!0),!0),c=this[b].length;if(u&&x.isSame(u,this[b][c-1])){if(a?.historyUpdatePolicy==="traceless"){let h=x.clone(u,!0);const y=new $t(h,this[$e]());this[F]?.replace(y),f()}else this[F]?.goBack(u,f);return}f()}}catch(i){this[q](i),s.resolve(),r(!1)}})})}open(...e){const t=this[T](e);return t?(t.opsType=C.Open,t.historyUpdatePolicy=t.historyUpdatePolicy??"push",this.to(t)):(this[q]("resolve route fail",t),this)}close(e){return this[me].post(t=>{try{let r=this[T](e);if(!r){t.reject("resolve route fail");return}let s=[];for(let i=0;i<this[b].length;i++){let n=this[b][i];if(n.root===r.root){if(!r.path&&!r.name){s.push(n);continue}if(r.path&&r.path===n.path){s.push(n);break}else if(r.name&&r.name===n.name){s.push(n);break}}}if(s.length===0){t.resolve();return}this[Le](s),t.resolve()}catch(r){this[q](r),t.resolve()}}),this}to(...e){const t=this[T](e);if(!t)return this[q]("resolve route fail",t),this;const r=this[Me].acquire(t);return r==null?(this[q]("route forbid",t),this):(this[me].post(s=>{try{let i=this[Ot](t);this[Dt](i),this[Nt](i),this[Ht](i),i.wait((n,o)=>{const l=n.session.to;if(n.session.updateResult&&n.session.updateResult.status==="success")try{let a=x.clone(l,!0);const u=new $t(a,this[$e]());l.historyUpdatePolicy==="replace"?this[F]?.replace(u):l.historyUpdatePolicy==="traceless"?this[F]?.setRouteMark(u):this[F]?.push(u)}catch(a){console.error(a.message,a)}if(Xe.clear(n.session),this[Me].release(r),typeof t.success=="function")try{Reflect.apply(t.success,{},[])}catch(a){console.error(a.message,a)}this[ue]===!1&&this[ft](!0),i=null,s.resolve()},(n,o)=>{this[Me].release(r),o!==null&&this[q](o,t),this[ue]===!1&&this[ft](!1),Xe.clear(n.session),i=null,s.resolve()})}catch(i){this[Me].release(r),this[q](i,t),s.resolve()}}),this)}back(e=1){this[F]?.go(-e,!1)}[kr](e){return(t,r)=>{if(typeof t=="boolean")e.session.redirect=!1,t?e.resolve():e.reject(r??null);else if(t){const s=this[T](t);if(s){const i=e.session.to;s.success=i.success,s.error=i.error,e.session.to=s,e.session.redirect=!0,e.session.routeModel=null,e.resolve()}else e.session.redirect=!1,e.reject("route resolve fail")}else e.session.redirect=!1,e.resolve()}}[Ot](e){const t=this[b].length>0?this[b][this[b].length-1]:void 0,r=new Xe(e,t),s={route:e,find:null};if(this[st](s),s.find){r.routeModel=s.find,e.matched=s.find.matchedRoutes??[];const i={};if(Array.isArray(s.find?.matchedRoutes))for(let n=0;n<s.find.matchedRoutes.length;n++){const o=s.find.matchedRoutes[n];o.meta&&typeof o.meta=="object"&&Object.assign(i,o.meta)}e.meta&&typeof e.meta=="object"&&Object.assign(i,e.meta),e.meta=i}return new _e(r)}[Dt](e){for(let t of this[Ke])e.post(r=>{const s=this[kr](r);Reflect.apply(t,{},[r.session.to,r.session.from,s,r.session])})}[Ht](e){e.post(t=>{for(let r of this[Te])try{Reflect.apply(r,{},[t.session.to,t.session.from,t.session])}catch(s){console.error(s.message,s)}t.resolve()})}[Lr](e,t){for(let r of this[ke])try{Reflect.apply(r,{},[e,t])}catch(s){console.error(s.message,s)}typeof e.destroy=="function"&&Reflect.apply(e.destroy,e,[])}[Nt](e){e.post(t=>{const r=t.session.to;let s=t.session.routeModel;if(s==null){let n={route:r,find:null};if(this[st](n))s=n.find,t.session.routeModel=s;else if(this[lt])s=this[lt];else{t.reject(`not find route model, path:${r.path??r.name}`);return}}const i=Xe.from(t.session);this[qr](r,s,i).then(n=>{this[V],t.session.updateResult=n??{status:"success",message:""},t.resolve()},n=>{t.reject(n)})})}[Le](e){if(e.length==0)return!0;let t=this[V],r=[];for(let s of e){let i=this[kt](t,s);i!=null&&r.push({...i,route:s})}if(r.length==0)return this[q]("can not find view index"),!1;for(let s of r.reverse())this[le](t,{x:s.x,y:s.y},[s.route.index??0],!0);return!0}[kt](e,t){const r=t.root??"default";let s;for(let i=0;i<e.layers.length;i++){const n=e.layers[i];for(let o=n.views.length-1;o>=0;o--){const l=n.views[o];if(l[B]&&l[Qe]===r)return s={x:o,y:i},s}}return null}[Xs](e){return e.layers.length>0&&e.layers[0].views.length>0?e.layers[0].views[0]:null}[le](e,t,r=null,s=!0){if(t.y>=e.layers.length||t.x>=e.layers[t.y].views.length)return;let i=e.layers[t.y].views[t.x],n=!1,o=[],l=!1,a=[...i.slots.value];for(let f=a.length-1;f>=0;f--){let c=a[f];(!r||r.indexOf(c.index)!=-1)&&(c.route&&i[B]&&(this[qe](c.route),c.active===!0&&c.route.opsType==C.Append&&(l=!0)),o.push(new O(i,c.index,t.y)),a.splice(f,1))}if(a.length==0)s?i.slots.value=a:e.layers[t.y].views.splice(t.x,1);else{if(l){let f=a[a.length-1];f.active=!0,f.route&&(f.route.active=f.active)}i.slots.value=a}e.layers[t.y].views.length==0&&(n=!0);let u=t.y+1;for(;u<e.layers.length;u++){let f=e.layers[u].views,c=[];for(let h=f.length-1;(n||o.length>0)&&h>=0;h--){let y=f[h];if(y[ie]&&(n||O.include(o,y[ie]))){let d=y.slots.value;for(let v=d.length-1;v>=0;v--){let R=d[v];R.route&&y[B]&&this[qe](R.route),c.push(new O(y,R.index,u)),d.splice(v,1)}e.layers[u].views.splice(h,1)}}o=c,e.layers[u].views.length==0&&(n=!0)}}restore(e){if(!e||this[H].length==0){let t=this[V];if(t.layers.length>0){let r=t.layers[0].views;r.length>0&&(r[0].slots.value=[])}return this[b]=[],this[ae](null),Promise.resolve()}else return new Promise((t,r)=>{let s=null,i=!1;for(let n=0;n<e.length;n++){const o=e[n];this[me].post(l=>{const a=this[Ot](o);this[Dt](a),this[Nt](a),this[Ht](a),a.wait((u,f)=>{s=u.session.to,i=u.session.redirect,l.resolve()},(u,f)=>{s=null,f!==null&&this[q](f),l.resolve()})})}this[me].post(n=>{if(s&&i===!0){const o=x.clone(s,!0),l=new $t(o,this[$e]());this[F]?.replace(l)}n.resolve(),t()})})}async[qr](e,t,r){const s=e.updateType??At.Part;await this[$r](t);const i=this[Kr](t,e,r,s);if(i.status==="error")throw Error(i.message);return i}[$r](e){let t=[];for(let r=0;r<e.layers.length;r++){let s=e.layers[r];for(let i=0;i<s.models.length;i++){let n=s.models[i];n.isResolved||t.push(n.resolve())}}return t.length>0?Promise.all(t):Promise.resolve()}[Kr](e,t,r,s){if(e.layers[0].models.length!==1)return{status:"error",message:"illegal route structure(multi root node)"};const i=e.layers[0].models[0];let n=this[V],o=Qs(n),l=t.root??"default",a;!o&&s==At.Part&&(a=this[kt](n,t));let u,f=0;if(a==null||a==null)if(o||s===At.All){if(n.layers.length==0&&(n.layers[0]=new jt),n.layers[0].views.length==0){let c=t.root??"default";u=new Ce(c,!0,null),n.layers[0].views=[u]}else u=n.layers[0].views[0];a={x:0,y:0}}else{let c=t.slot;if(!c)return{status:"error",message:"can not rebuild view(because not route slot)"};let h=c.level;if(h>n.layers.length)return{status:"error",message:"can not insert view(override level)"};let y;if(c.rootName){let d=n.layers[h-1];for(let v of d.views){if(v[B]&&v.name===c.rootName){y=new O(v,c.rootIndex??0,h-1);break}if(v[U]&&v[U].view.name===c.rootName&&v[U].index===c.rootIndex){y=v[U];break}}}if(!y)return{status:"error",message:"can not insert view(not find root node ref)"};u=new Ce(l,!0,y),n.layers[h].views.push(u),a={x:n.layers[h].views.length-1,y:h}}else u=n.layers[a.y].views[a.x];if(f=a.y,u[B]=!0,t.opsType===C.Append){t.index=t.index??xe.get(),t.active=!0;let c=u.slots.value;if(c.length>0){let R=c[c.length-1];R.active=!1,R.route&&(R.route.active=R.active)}let h=new Y(t,i,t.index,!0);u.slots.value=[...c,h];let y=f+1,d=1,v=new O(u,t.index,f);this[ee](n,y,e,d,v)}else if(t.opsType===C.Open){let c=u.slots.value;const h=t.active??!0;let y=!1;for(let d of c){if(d.route!==null&&x.isSamePathForRoute(d.route,t)){if(d.active===h)return t.index=d.index,t.active=h,d.route=t,{status:"noChange",message:""};d.active=h,y=!0,t.index=d.index,t.active=h,d.route=t}else h&&(d.active=!1);d.route&&(d.route.active=d.active)}if(!y){t.index=t.index??xe.get(),t.active=h;let d=new Y(t,i,t.index,h);c.push(d);let v=f+1,R=1,g=new O(u,t.index,f);this[ee](n,v,e,R,g)}u.slots.value=[...c]}else{let c=u.slots.value;if(c.length==0){t.index=t.index??xe.get(),t.active=!0,u.slots.value=[new Y(t,i,t.index)];let h=f+1,y=1,d=new O(u,t.index,f);this[ee](n,h,e,y,d)}else{let h=c[0];if(h.model!==i){this[le](n,a,null,!0),t.index=t.index??xe.get(),t.active=!0,u.slots.value=[new Y(t,i,t.index)];let y=f+1,d=1,v=new O(u,t.index,f);this[ee](n,y,e,d,v)}else{h.route!==null&&this[qe](h.route);let y=!1;const d=t.active??!0;h.active!==d&&(h.active=d,y=!0),t.active=d,t.index=h.index,h.route=t;let v=[];for(let L=1;L<c.length;L++)v.push(c[L].index);v.length>0?this[le](n,a,v,!0):y&&(u.slots.value=[...c]);let R=[new O(u,t.index,f)],g=f+1,w=1,K=new O(u,t.index,f);for(;R.length>0&&g<n.layers.length&&w<e.layers.length;g++,w++){let L=[];for(let M=0;M<n.layers[g].views.length;M++){let $=n.layers[g].views[M];$[ie]&&O.include(R,$[ie])&&L.unshift(M)}let Ne=[];for(let M of L){let $=n.layers[g].views[M],fe=e.layers[w].models,Z;for(let I=0;I<fe.length;I++)if($.name===fe[I].name){Z=fe[I];break}if(!Z)this[le](n,{x:M,y:g},null,!1);else{let I=$.slots.value;if(I.length==0){let Q=0;$.slots.value=[new Y(null,Z,Q)];let W=g+1,z=w+1;this[ee](n,W,e,z,K)}else{let Q=I[0];if(Q.model!==Z){this[le](n,{x:M,y:g},null,!0),$.slots.value=[new Y(null,Z,0)];let W=g+1,z=w+1;this[ee](n,W,e,z,K)}else{$[B]&&Q.route!==null&&this[qe](Q.route);let W=[];for(let z=1;z<I.length;z++)W.push(I[z].index);W.length>0&&this[le](n,{x:M,y:g},W,!0),Ne.push(new O($,Q.index,g))}}$[B]=!1}}R=Ne}this[ee](n,g,e,w,K)}}}if(u&&u[U]){let c=u[U];c&&(t.slot=new Bs(l,f,c?.view.name,c?.index??0))}return r.to=void 0,r.routeModel=void 0,this[Tr](t,r),{status:"success",message:""}}[ee](e,t,r,s,i){let n=s,o=t;for(;o<e.layers.length&&n<r.layers.length;o++,n++){let l=e.layers[o].views;for(let a of r.layers[n].models){let u=new Ce(a.name,!1,i),f=new Y(null,a);u.slots.value=[f],l.push(u)}}for(;n<r.layers.length;n++){let l=new jt;l.views=[];for(let a of r.layers[n].models){let u=new Ce(a.name,!1,i),f=new Y(null,a);u.slots.value=[f],l.views.push(u)}e.layers.push(l)}}[Rr](e,t,r,s,i,n){if(t<0||t>this[V].layers.length)return null;if(t<this[V].layers.length){let u=this[V].layers[t],f=null;for(let c of u.views){let h=!1;if(r!==null?(h=c.name===e&&c[U]?.view===r,h&&s!==-1&&(h=c[U]?.index===s)):h=c.name===e,!!h){i!==null&&(c[ie]={view:i,index:n,level:t-1}),f=c;break}}if(f!==null)return f}let o=null,l=null;i!==null&&(i[B]?o={view:i,index:n,level:t-1}:o=i[U],l={view:i,index:n,level:t-1});let a=new Ce(e,!0,o);if(a[ie]=l,t==this[V].layers.length){let u=new jt;u.views=[a],this[V].layers.push(u)}else this[V].layers[t].views.push(a);return a}},Ie=Symbol("rk"),Bt=Symbol("vd"),Ir=Symbol("rv"),Ut=Symbol("rvi"),Or=Symbol("pv"),Vt=Symbol("pvi"),Oe=Symbol("registerKey"),Wt=Symbol("parentKey"),zt=Symbol("lc"),Zs=class{[Oe]=new Map;[Wt]=null;get parent(){return this[Wt]?.deref()??null}set parent(e){this[Wt]=e?new WeakRef(e):null}constructor(){}set(e,t){this[Oe].set(e,t)}get(e){return this[Oe].get(e)}has(e){return this[Oe].has(e)}delete(e){return this[Oe].delete(e)}},te=new WeakMap,De=[];function ct(e,t=!1){let r=e?te.get(e)??null:null;if(t&&!r){r=new Zs,e&&te.set(e,r),(0,m.onScopeDispose)(()=>{e&&te.delete(e)});const s=(0,m.inject)(zt,null);s&&(r.parent=s),(0,m.provide)(zt,r)}return r}function He(e){let t=e?te.get(e)??null:null;if(!t&&(0,m.hasInjectionContext)()&&(t=(0,m.inject)(zt,null)),!t&&De.length>0){const r=De.length-1;t=De[r]}return t}async function Dr(e,t){De.push(e);try{return await t()}finally{De.pop()}}function Ys(e){const t=(0,m.getCurrentScope)();if(!t)return!1;const r=He();if(!r)return!1;if(te.set(t,r),Array.isArray(e))for(let s=0;s<e.length;s++)e[s]&&typeof e[s]=="object"&&te.set(e[s],r);return(0,m.onScopeDispose)(()=>{if(te.delete(t),Array.isArray(e))for(let s=0;s<e.length;s++)e[s]&&typeof e[s]=="object"&&te.delete(e[s])}),!0}function Jt(e,t){const r=He(e);if(!r)return null;let s=r;for(;s&&!s.has(t);)s=s.parent;return s?.get(t)??null}function ei(e,t,r){He(e)?.set(t,r)}function ti(e,t,r){He(e)?.delete(t)}var ht=Symbol("hooksKey");function ri(e){let t=e.get(ht);t||(t=[],e.set(ht,t))}function Hr(e,t){const r=e.get(ht);r!=null&&Dr(e,async()=>{for(let s=r.length-1;s>=0;s--){let i=r[s];if(i.type===t)try{await Reflect.apply(i.hook,null,[])}catch(n){console.error(n.message,n)}}})}var Nr=(function(e){return e.INACTIVATED="ia",e.ACTIVATED="a",e})({}),si=class{type;hook;constructor(e,t){this.hook=t,this.type=e}};function ii(e,t,r){const s=new si(t,r);return e.push(s),!0}function ni(e,t,r){let s=-1;for(let i=0;i<e.length;i++){const n=e[i];if(n.type===t&&n.hook===r){s=i;break}}return s!=-1?(e.splice(s,1),!0):!1}function Br(e){return t=>{const r=Jt(null,ht);r&&((0,m.onScopeDispose)(()=>{ni(r,e,t)}),ii(r,e,t))}}var oi=function(e){(0,m.onActivated)(e),Br("a")(e)},li=function(e){(0,m.onDeactivated)(e),Br("ia")(e)},Ur=Symbol("routeKey");function Vr(e,t){e.set(Ur,t)}function Wr(e){const t=Jt(e??null,Ur);return typeof t=="function"?t():t}var zr="FoxBeforeEnter",Jr="FoxEnter",Gr="FoxLeave",Xr="FoxLeave",yt="FoxLeaveEnd";function Qr(e,t=!1){let r=null;return t?r=e.showFromClass??e.enterFromClass:r=e.enterFromClass,r||(r=e.transitionName,r?t?`${r}-show-from`:`${r}-enter-from`:null)}function Zr(e,t=!1){let r=null;return t?r=e.showActiveClass??e.enterActiveClass:r=e.enterActiveClass,r||(r=e.transitionName,r?t?`${r}-show-active`:`${r}-enter-active`:null)}function ai(e,t=!1){let r=null;return t?r=e.showToClass??e.enterToClass:r=e.enterToClass,r||(r=e.transitionName,r?t?`${r}-show-to`:`${r}-enter-to`:null)}function Yr(e,t=!1){let r=null;return t?r=e.hideFromClass??e.leaveFromClass:r=e.leaveFromClass,r||(r=e.transitionName,r?t?`${r}-hide-from`:`${r}-leave-from`:null)}function es(e,t=!1){let r=null;return t?r=e.hideActiveClass??e.leaveActiveClass:r=e.leaveActiveClass,r||(r=e.transitionName,r?t?`${r}-hide-active`:`${r}-leave-active`:null)}function ui(e,t=!1){let r=null;return t?r=e.hideToClass??e.leaveToClass:r=e.leaveToClass,r||(r=e.transitionName,r?t?`${r}-hide-to`:`${r}-leave-to`:null)}function fi(e,t=!1){let r=null;return t?r=e.beforeShow??e.beforeEnter:r=e.beforeEnter,r}function ci(e,t=!1){let r=null;return t?r=e.show??e.enter:r=e.enter,r}function hi(e,t=!1){let r=null;return t?r=e.afterShow??e.afterEnter:r=e.afterEnter,r}function yi(e,t=!1){let r=null;return t?r=e.showCancelled??e.enterCancelled:r=e.enterCancelled,r}function di(e,t=!1){let r=null;return t?r=e.beforeHide??e.beforeLeave:r=e.beforeLeave,r}function mi(e,t=!1){let r=null;return t?r=e.hide??e.leave:r=e.leave,r}function pi(e,t=!1){let r=null;return t?r=e.afterHide??e.afterLeave:r=e.afterLeave,r}function vi(e,t=!1){let r=null;return t?r=e.hideCancelled??e.leaveCancelled:r=e.leaveCancelled,r}function Gt(e){let t,r=e.transitionDuration;return typeof r=="object"?t={enter:r.enter??-1,leave:r.leave??-1,show:r.show??-1,hide:r.hide??-1}:(typeof r=="string"&&(r=r.length==0?-1:Number(r)),t={enter:r,leave:r,show:r,hide:r}),t}function pe(e,t){e.classList.contains(t)||e.classList.add(t)}function ve(e,t){e.classList.remove(t)}var gi=ce&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout;function dt(e){gi(e)}function j(e,t){S(e)&&Reflect.apply(e,null,t)}function ts(e,t,r=-1,s,i,n){let o=[];const l=()=>{for(let a of o)vt(e,a.type,a.listener);o=[]};if(S(i)){if(s!==void 0&&s>=0){setTimeout(()=>{Reflect.apply(i,null,[e,t,r])},s);return}const a=["animationend","transitionend",yt],u=f=>{(f.target||f.srcElement)===f.currentTarget&&(l(),Reflect.apply(i,null,[e,t,r]))};a.forEach(f=>{Ve(e,f,u),o.push({type:f,listener:u})})}if(S(n)){const a="animationcancel",u=f=>{(f.target||f.srcElement)===f.currentTarget&&(l(),Reflect.apply(n,null,[e,t,r]))};Ve(e,a,u),o.push({type:a,listener:u})}}function mt(e){return!ce||e===null?!1:e.opsType===C.Append||e.opsType===C.Open}function rs(e,t,r={},s,i=-1){if(e||mt(s)){const n=Qr(r,e);n&&pe(t,n);const o=Zr(r,e);o&&pe(t,o),j(fi(r,e),[t,e,s,i])}}function ss(e,t,r={},s,i,n,o){if(!mt(i)&&!e){S(o)&&o(o,[t]);return}const l=Qr(r,e),a=Zr(r,e),u=ai(r,e),f=ci(r,e),c=hi(r,e),h=yi(r,e);if(!l&&!a&&!u&&!f){S(o)&&o(o,[t]);return}dt(()=>{ts(t,i,n,s,()=>{a&&ve(t,a),u&&ve(t,u),S(c)&&j(c,[t,e,i,n]),S(o)&&o(o,[t])},()=>{S(h)&&j(h,[t,e,i,n])}),l&&ve(t,l),u&&pe(t,u),S(f)&&j(f,[t,e,i,n])})}function is(e,t,r={},s,i=-1){if(e||mt(s)){const n=Yr(r,e);n&&pe(t,n);const o=es(r,e);o&&pe(t,o),j(di(r,e),[t,e,s,i])}}function ns(e,t,r={},s,i,n,o,l){if(!mt(n)&&!e){S(l)&&j(l,[t]),!e&&S(i)&&i();return}const a=Yr(r,e),u=es(r,e),f=ui(r,e),c=mi(r,e),h=pi(r,e),y=vi(r,e);if(!a&&!u&&!f&&!c){S(l)&&j(l,[t]),!e&&S(i)&&i();return}dt(()=>{ts(t,n,o,s,()=>{try{u&&ve(t,u),f&&ve(t,f),S(h)&&j(h,[t,e,n,o]),S(l)&&j(l,[t])}finally{!e&&S(i)&&i()}},()=>{try{S(y)&&j(y,[t,e,n,o]),S(l)&&j(l,[t])}finally{!e&&S(i)&&i()}}),a&&ve(t,a),f&&pe(t,f),S(c)&&j(c,[t,e,n,o])})}function Xt(e,t={},r,s=-1){const i=t.mode??"default",n=Gt(t);return{mode:i,persisted:!1,beforeEnter:o=>{rs(!1,o,t,r,s)},enter:o=>{ss(!1,o,t,n.enter,r,s)},leave:(o,l)=>{is(!1,o,t,r,s),ns(!1,o,t,n.leave,l,r,s,()=>{e.transition=null})},clone:o=>Xt(e,t,r,s)}}function os(e){return e.el}function wi(e,t={},r,s,i,n){if(i===!0){const o=os(e);if(o==null)return;const l=Gt(t);rs(!0,o,t,r,s),ss(!0,o,t,l.show,r,s,a=>{S(n)&&j(n,[a])})}else S(n)&&j(n,[])}function bi(e,t={},r,s,i,n){if(i===!0){const o=os(e);if(o==null)return;const l=Gt(t);is(!0,o,t,r,s),ns(!0,o,t,l.hide,null,r,s,a=>{S(n)&&j(n,[a])})}else S(n)&&j(n,[])}function Ri(e){dt(()=>{for(let t=0;t<e.length;t++)Reflect.apply(e[t],null,[])})}function ls(e,t={},r,s=-1){return{mode:t.mode??"default",persisted:!1,beforeEnter:i=>{We(zr,{},i)},enter:i=>{We(Jr,{},i)},leave:(i,n)=>{We(Gr,{},i),dt(()=>{const o=l=>{(l.target||l.srcElement)===l.currentTarget&&(vt(i,yt,o),n&&Reflect.apply(n,null,[]),e.transition=null)};Ve(i,yt,o),We(Xr,{},i)})},clone:i=>ls(e,t,r,s)}}function re(e,t,r){return typeof e=="function"?Reflect.apply(e,{},[t,r]):e}function Qt(e,t){if(!e)return null;const r=e(t);return r.length===1?r[0]:r}function ge(e,t){return typeof t=="function"?t(e):e}var Si=class{node;state;constructor(e,t){this.node=e,this.state=t}},pt=(0,m.defineComponent)({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,required:!1,default:"default"},modelSlot:{type:[Object],required:!1},multi:{type:Boolean,required:!1,default:!1},tag:{type:[String,Object,Function],required:!1,default:"div"},viewTag:{type:[String,Object,Function],required:!1,default:"div"},viewTagProps:{type:[Object,Function],required:!1,default(){return{}}},viewClass:{type:[String,Function],required:!1},viewActiveClass:{type:[String,Function],required:!1},viewInactiveClass:{type:[String,Function],required:!1},transition:{type:[Boolean,String,Function],required:!1,default:!1},transitionName:{type:String,required:!1},transitionDuration:{type:[String,Number,Object],required:!1},enterFromClass:{type:String,required:!1},enterActiveClass:{type:String,required:!1},enterToClass:{type:String,required:!1},leaveFromClass:{type:String,required:!1},leaveActiveClass:{type:String,required:!1},leaveToClass:{type:String,required:!1},showFromClass:{type:String,required:!1},showActiveClass:{type:String,required:!1},showToClass:{type:String,required:!1},hideFromClass:{type:String,required:!1},hideActiveClass:{type:String,required:!1},hideToClass:{type:String,required:!1},beforeEnter:{type:Function,required:!1},enter:{type:Function,required:!1},afterEnter:{type:Function,required:!1},enterCancelled:{type:Function,required:!1},beforeLeave:{type:Function,required:!1},leave:{type:Function,required:!1},afterLeave:{type:Function,required:!1},leaveCancelled:{type:Function,required:!1},beforeShow:{type:Function,required:!1},show:{type:Function,required:!1},afterShow:{type:Function,required:!1},showCancelled:{type:Function,required:!1},beforeHide:{type:Function,required:!1},hide:{type:Function,required:!1},afterHide:{type:Function,required:!1},hideCancelled:{type:Function,required:!1}},setup(e,t){const r=(0,m.getCurrentScope)(),s=e.multi===!0,i=(0,m.inject)(Ie,null),n=(0,m.inject)(Bt,0),o=(0,m.inject)(Ir,null),l=(0,m.inject)(Ut,-1);let a=null,u=e.modelSlot??null;if(u){if((0,m.provide)(Bt,n+1),(0,m.provide)(Ut,u.index),(0,m.provide)(Vt,u.index),!u.route){console.warn("[Fox]child view render error, route not exist");return}const c=ct(u,!0);c&&(ri(c),Vr(c,()=>u?.route??null))}else{if(i==null){console.error("[Fox]router is not been injected");return}const c=e.name,h=(0,m.inject)(Or,null),y=(0,m.inject)(Vt,0);if(a=i[Rr](c,n,o,l,h,y),a===null)return;(0,m.provide)(Or,a);const d=a[B]===!0;if(d&&(0,m.provide)(Ir,a),!s&&((0,m.provide)(Ut,-1),(0,m.provide)(Bt,n+1),(0,m.provide)(Vt,-1),d&&r)){const v=ct(r,!0);v&&Vr(v,()=>{const R=a?.slots.value??[];return R.length>0?R[0].route:null})}}const f={value:new Map};return(0,m.onScopeDispose)(()=>{if(f.value&&f.value.clear(),u){const c=u;c.route=null,c.model=null,c.instance=null,u=null}}),()=>{if(s){const c=new Map,h=[],y=a?.slots.value,d=[];for(let g=0;g<y.length;g++){const w=y[g],K=`${e.name}_${w.index}`,L=re(e.transition,w.route,g)??!0,Ne={modelSlot:w};let M;t.slots.default?M=(0,m.h)(pt,Ne,{default:t.slots.default}):M=(0,m.h)(pt,Ne);const $={},fe=re(e.viewClass,w.route,g);typeof fe=="string"&&fe.length>0&&($[fe]=!0);const Z=re(e.viewActiveClass,w.route,g),I=re(e.viewInactiveClass,w.route,g),Q=f.value.get(K);if(typeof Z=="string"&&Z.length>0&&($[Z]=w.active),typeof I=="string"&&I.length>0&&($[I]=!w.active),Q&&w.active!==Q.state){const Se=Q.node;w.active?d.unshift(()=>{const ir=()=>{const Be=ct(w);Be!=null&&Hr(Be,Nr.ACTIVATED)};wi(Se,e,w.route,g,L,ir)}):d.push(()=>{const ir=()=>{const Be=ct(w);Be!=null&&Hr(Be,Nr.INACTIVATED)};bi(Se,e,w.route,g,L,ir)})}const W={class:$,key:K},z=re(e.viewTagProps,w.route,g);if(z!==null&&typeof z=="object"){const Se=ge(z,i?.propsFilter);A(!0,W,Se)}if(w.route?.viewTagAttrs&&typeof w.route?.viewTagAttrs=="object"){const Se=ge(w.route.viewTagAttrs,i?.propsFilter);A(!0,W,Se)}const Oi=re(e.viewTag,w.route,g),Re=(0,m.h)(Oi,W,{default:()=>[M]});c.set(K,new Si(Re,w.active)),f.value.delete(K),L===!0?Re.transition=Xt(Re,e,w.route,g):L==="custom"&&(Re.transition=ls(Re,e,w.route,g)),h.push(Re)}f.value=c,Ri(d);const v=re(e.tag,null,-1),R={};return Object.assign(R,t.attrs),(0,m.h)(v,R,{default:()=>h})}else if(u!=null){const c=u.model,h={};if(c.props){if(typeof c.props=="object"){const d=ge(c.props,i?.propsFilter);A(!1,h,d)}else if(c.props===!0&&typeof u.route?.params=="object"){const d=ge(u.route.params,i?.propsFilter);A(!1,h,d)}}const y=(0,m.h)(c.component,h);return Qt(t.slots.default,{Component:y,route:u.route})??y}else{const c=a?.slots.value??[];if(c.length>0){const h=c[0],y=h.route,d=h.model,v={};if(d.props){if(typeof d.props=="object"){const g=ge(d.props,i?.propsFilter);A(!1,v,g)}else if(d.props===!0&&typeof y?.params=="object"){const g=ge(y.params,i?.propsFilter);A(!1,v,g)}}const R=(0,m.h)(d.component,v);return(re(e.transition,y,-1)??!0)&&(R.transition=Xt(R,e,y,-1)),Qt(t.slots.default,{Component:R,route:y})??R}else return Qt(t.slots.fallback,{})}}}});function xi(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!=null&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Pi(e,t){return e==null||t==null?!1:!!(e.path&&t.path&&t.path.startsWith(e.path)||e.name&&e.name==t.name)}function we(e,t){return typeof e=="function"?Reflect.apply(e,{},[t]):e}var as=(0,m.defineComponent)({name:"RouterLink",inheritAttrs:!1,props:{tag:{type:[String,Object,Function],required:!1,default:"a"},to:{type:[String,Object,Function],required:!0},root:{type:String},activeClass:{type:[String,Function],required:!1,default:"fox-router-link-active"},exact:{type:[String,Boolean,Function],required:!1},exactActiveClass:{type:[String,Function],required:!1,default:"fox-router-link-exact-active"},event:{type:[String,Function],required:!1,default:"onClick"}},setup(e,t){const r=(0,m.inject)(Ie,null);return()=>{let s=we(e.to,null),i=we(e.tag,s);if(i==null){console.warn("[Fox]can not resolve link tag");return}let n=null,o=null;r!==null&&(n=r[T](s),e.root&&(n.root=e.root),o=r.currentRoute.value);let l={},a=we(e.activeClass,n);if(typeof a=="string"&&a.length>0&&(l[a]=Pi(n,o)),we(e.exact,n)===!0){let c=we(e.exactActiveClass,n);typeof c=="string"&&c.length>0&&(l[c]=x.isSamePathForRoute(n,o))}let u={class:l};(i==="a"||i==="A")&&(u.href=n?.path??n?.name??"#"),A(!0,u,t.attrs);const f=we(e.event,n);if(typeof f=="string"){const c=h=>{if(r==null){console.warn("[Fox]router is not been injected");return}if(n==null){console.warn("[Fox]route is not been resolved");return}xi(h)&&r.to(n)};u[f]=c}return(0,m.h)(i,u,t.slots)}}}),be=Symbol("registerKey"),Fi=class{policy;callback;constructor(e,t){this.callback=e,this.policy=t}},Zt=class{[be]=new Map;constructor(){}on(e,t,r=!1){let s=this[be].get(e);s||(s=new Array,this[be].set(e,s));let i=new Fi(t,r===!0?1:0);return s.push(i),this}off(e,t){if(!t)return this[be].delete(e),this;let r=this[be].get(e);if(r){for(let s=0;s<r.length;s++)if(r[s].callback===t){r.splice(s,1);break}}return this}bind(e,t,r=!1){return this.on(e,t,r)}unbind(e,t){return this.off(e,t)}once(e,t){return this.on(e,t,!0)}all(...e){let t=e.length;if(t<1)return this;let r=e[t-1];if(typeof r!="function")return console.error("[Fox]callback can not be empty"),this;let s=t-1,i=new Array(s),n=[].splice.call(e,0,s);for(let o=0;o<n.length;o++)this.once(n[o],l=>{i[o]=l,s-=1,s==0&&Reflect.apply(r,{},i)});return this}emit(e,...t){let r=this[be].get(e);if(!r)return this;for(let s=0;s<r.length;){let i=r[s];if(i.policy==1?r.splice(s,1):s++,typeof i.callback=="function")try{Pe(()=>{Reflect.apply(i.callback,{},t)})}catch(n){console.error(n.message,n)}}return this}trigger(e,...t){return Reflect.apply(this.emit,this,[e,...t])}},Ci="FoxRouterView",Ei="FoxRouterLink",X=(function(e){return e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Defining=2]="Defining",e[e.Defined=3]="Defined",e})({});function _i(e){return e==1||e===3}var us=(function(e){return e[e.normal=0]="normal",e[e.factory=1]="factory",e})({}),Ai=class{register=new Map;regExpRegisters=[];constructor(){}get(e){let t=this.register.get(e)??null;return t||(t=this.regExpRegisters.find(r=>r.pattern?.test(e))?.module??null),t}has(e){return!!this.get(e)}set(e,t){if(typeof e=="string")this.register.set(e,t);else if(e instanceof RegExp){const r=this.regExpRegisters.find(s=>(s.pattern?.source??"")===(e?.source??""));r?r.module=t:this.regExpRegisters.push({pattern:e,module:t})}}remove(e){if(typeof e=="string"){const t=this.register.get(e);return this.register.delete(e),t??null}else if(e instanceof RegExp){const t=this.regExpRegisters.findIndex(r=>(r.pattern?.source??"")===(e?.source??""));if(t!==-1){const r=this.regExpRegisters[t].module??null;return this.regExpRegisters.splice(t,1),r}}return null}clear(){this.register.clear(),this.regExpRegisters=[]}},Yt=["require","exports","module"];async function ji(e){return await new Function("url","return import(url)")(e)}var fs=class{moduleManager=new Ai;_alias={};set alias(e){this._alias=e}get alias(){return this._alias}_resourceParser;set resourceParser(e){this._resourceParser=e}get resourceParser(){return this._resourceParser}_timeout;set timeout(e){this._timeout=e}get timeout(){return this._timeout}_query;set query(e){this._query=e}get query(){return this._query}get head(){return Ue().head}_cssMountPoint=null;set cssMountPoint(e){this._cssMountPoint=e}get cssMountPoint(){return this._cssMountPoint}_jsMountPoint=null;set jsMountPoint(e){this._jsMountPoint=e}get jsMountPoint(){return this._jsMountPoint}setModule(e,t){const r={id:typeof e=="string"?e:e?.source,src:"",status:X.Loaded};typeof t=="function"?(r.exports=t,r.type=us.factory):r.exports=t,this.moduleManager.set(e,r)}removeModule(e){this.moduleManager.remove(e)}getModuleExports(e){const t=this.moduleManager.get(e);return t&&_i(t.status)?t.type===us.factory&&typeof t.exports=="function"?t.exports():t.exports:null}exposeRequire(e="__foxRequire",t,r){const s=t??_();return s&&typeof s=="object"?(s[e]=i=>{const n=this.getModuleExports(i);return r&&!n&&console.error(`[Fox] module:${i}, not found!`),n},!0):!1}resloveResource(e){if(typeof e=="string"){if(Yt.includes(e))return e;if(e=this.alias?.[e]??e,typeof this.resourceParser=="function"){const r=this.resloveResource(e);if(!r)return r}const t=this.getResourcePathSuffix(e);if(t==="mjs")return{path:e,type:"js",format:"es"};if(t==="js")return{path:e,type:"js",format:"umd"};if(t==="css")return{path:e,type:"css"}}return e}ensure(...e){return new Promise((t,r)=>{if(e.length<=0){r("args is empty");return}const s=[];let i=e.length-1,n=null;typeof e[i]=="function"&&(n=e[i],i--);for(let a=0;a<=i;a++)if(Array.isArray(e[a])){const u=e[a];for(let f=0;f<u.length;f++){const c=this.resloveResource(u[f]);s.push(c)}}else if(typeof e[a]=="string"){const u=this.resloveResource(e[a]);s.push(u)}const o=new qi(s.length,(a,u)=>{if(o.isOK())try{typeof n=="function"&&Reflect.apply(n,{},u),t(u)}catch(f){console.error(f),r(f)}else try{console.error(a),typeof n=="function"&&Reflect.apply(n,{},[]),r(a)}catch(f){console.error(f),r(f)}}),l=new _e;for(let a=0;a<s.length;a++){const u=new $i(a,s[a],o);this.mount(l,u)}return this})}remove(...e){return new Promise((t,r)=>{if(e.length<=0){r("args is empty");return}const s=[];let i=e.length-1,n=null;typeof e[i]=="function"&&(n=e[i],i--);for(let o=0;o<=i;o++)if(Array.isArray(e[o])){const l=e[o];for(let a=0;a<l.length;a++){const u=this.resloveResource(l[a]);s.push(u)}}else if(typeof e[o]=="string"){const l=this.resloveResource(e[o]);s.push(l)}for(let o=0;o<s.length;o++)try{this.unmount(s[o])}catch(l){console.error(l)}typeof n=="function"&&Reflect.apply(n,{},[!0]),t(!0)})}mount(e,t){if(!t.resource){e.post(s=>{t.progress.work(!1,t.index,null),s.resolve()});return}if(typeof t.resource=="string"){if(Yt.includes(t.resource)){e.post(i=>{t.progress.work(!0,t.index,t.resource),i.resolve()});return}const s=this.getModuleExports(t.resource);if(s){e.post(i=>{t.progress.work(!0,t.index,s),i.resolve()});return}}const r=t.resource;if(r.type==="js")if(r.format==="es")this.mountCJS(e,t);else{const s=this.jsMountPoint??this.head;this.mountJS(e,t,s)}else{const s=this.cssMountPoint??this.head;this.mountCSS(e,t,s)}}mountCSS(e,t,r){e.post(s=>{const i=t.resource,n=this.getModuleExports(i.path);if(n){t.progress.work(!0,t.index,n),s.resolve();return}const o=Ue(),l=o.createElement("link"),a="onload"in l;a&&(l.onload=()=>{l.onload=null,l.onerror=null,t.progress.work(!0,t.index,i.path),s.resolve()},l.onerror=()=>{try{r.removeChild(l)}catch(c){console.error(c)}l.onload=null,l.onerror=null,t.progress.work(!1,t.index,null),s.reject()});const u=this.constructResourceUri(i.path),f=o.getElementById(i.path);f&&f.parentNode&&f.parentNode.removeChild(f),l.rel="stylesheet",l.type="text/css",l.id=i.path,l.href=u,r.appendChild(l),a||(t.progress.work(!0,t.index,i.path),s.resolve())})}mountJS(e,t,r){e.post(s=>{const i=t.resource,n=this.getModuleExports(i.path);if(n){t.progress.work(!0,t.index,n),s.resolve();return}const o={id:i.path,src:i.path,status:X.Loading};this.moduleManager.set(i.path,o);const l=Ue().createElement("script");if("onload"in l)l.onload=()=>{l.onload=null,l.onerror=null,o.status===X.Loading&&(o.status=X.Loaded,t.progress.work(!0,t.index,i.path)),s.resolve()},l.onerror=()=>{try{r.removeChild(l)}catch(h){console.error(h)}l.onload=null,l.onerror=null,this.moduleManager.remove(i.path),t.progress.work(!1,t.index,null),s.resolve()};else{const h=l;h.onreadystatechange=()=>{/loaded|complete/.test(h.readyState)&&(h.onreadystatechange=null,o.status==X.Loading&&(o.status=X.Loaded,t.progress.work(!0,t.index,i.path)),s.resolve())}}const a=this.constructResourceUri(i.path);l.defer=!0,l.src=a;const u=_(),f=this.createRequireLoad();u.__require=u.__require??u.require,u.require=f;const c=this.createDefine(o,f,t);u.__define=u.__define??u.define,u.define=c,typeof t.progress.finalCallback!="function"&&(t.progress.finalCallback=function(){u.require=u.__require,u.__require=void 0,u.define=u.__define,u.__define=void 0}),r.appendChild(l)})}mountCJS(e,t){e.post(async r=>{const s=t.resource,i=this.getModuleExports(s.path);if(i){t.progress.work(!0,t.index,i),r.resolve();return}try{let n=await ji(s.path);if(Je(n)&&(n=n.default??n),he(n)){t.progress.work(!1,t.index,n),r.resolve();return}const o={id:s.path,src:s.path,status:X.Loaded,exports:n};this.moduleManager.set(s.path,o),t.progress.work(!0,t.index,n),r.resolve()}catch(n){console.error(n),t.progress.work(!1,t.index,null),r.resolve()}})}unmount(e){let t="",r="";typeof e=="string"?(this.moduleManager.remove(e),r=this.getResourcePathSuffix(e),t=e):(this.moduleManager.remove(e.path),r=e.type==="css"?"css":e.format??"",t=e.path);const s=Ue();if(r==="umd"){let i=s.getElementById(t);i||(i=s.querySelector(`script[src="${t}"]`)),i&&i.remove()}else if(r==="css"){let i=s.getElementById(t);if(!i){const n=this.constructResourceUri(t);i=s.querySelector(`link[href="${n}"]`)}i&&i.remove()}}trimEmptyElement(e){const t=[];for(let r=0;r<e.length;r++){let s=e[r];s!=null&&(s=s.trim(),s.length!==0&&t.push(s))}return t}createDefine(e,t,r){const s=this,i=function(...n){e.status=X.Defining;let o,l,a,u=n.length;if(u===1?(a=n[0],o=void 0):u===2?(a=n[1],Array.isArray(n[0])?(l=s.trimEmptyElement(n[0]),o=void 0):l=void 0):(o=n[0],l=s.trimEmptyElement(n[1]),a=n[2]),o&&(e.id=o,typeof s._alias=="object"&&(s._alias[o]=e.src)),l&&l.length>0)s.ensure(l,(...f)=>{try{const c=f.map(h=>h==="exports"?(e.exports||(e.exports={}),e.exports):h==="module"?e:h==="require"?t:h);if(typeof a=="function"){const h=Reflect.apply(a,e,c);h&&(typeof h=="object"?(e.exports=e.exports??{},Object.assign(e.exports,h)):typeof h=="function"&&(e.exports=h))}else e.exports=a;e.status=X.Defined,r.progress.work(!0,r.index,e.exports)}catch(c){console.error(c),r.progress.work(!1,r.index,[])}});else{if(typeof a=="function"){const f=Reflect.apply(a,e,[]);f&&(typeof f=="object"?(e.exports=e.exports??{},Object.assign(e.exports,f)):typeof f=="function"&&(e.exports=f))}else e.exports=a;e.status=X.Defined,r.progress.work(!0,r.index,e.exports)}};return i.amd=!0,i}createRequireLoad(){return e=>(e=this._alias?.[e]??e,this.getModuleExports(e))}constructResourceUri(e){try{if(Yt.includes(e)||!this.query)return e;const t=this.createSearch(this.query);return e.indexOf("?")==-1?e+=`?${t}`:t.length>0&&(e+=`&${t}`),e}catch(t){throw console.error(`[Fox]resolve path[${e}] fail`,t),t}}createSearch(e){let t="";if(e&&typeof e=="object"){for(let r in e){let s=`${e[r]}`;t+=`${encodeURIComponent(r)}=${encodeURIComponent(s)}&`}t.length>0&&(t=t.substring(0,t.length-1))}return t}getResourcePathSuffix(e){let t=e.lastIndexOf("?");t==-1&&(t=e.length);let r=e.lastIndexOf(".",t);return r==-1?"":e.substring(r+1,t)}},qi=class{finalCallback;callback;values;status;size;lastIndex;constructor(e,t){this.size=e,this.callback=t,this.status=!0,this.values=[],this.lastIndex=-1}work(e,t,r){if(this.status=e,this.status===!0&&(this.lastIndex!==t&&this.size--,this.lastIndex=t,this.values[t]=r),this.size===0||this.status===!1)try{Reflect.apply(this.callback,this,[this.status,this.values])}catch(s){console.error(s.message,s)}finally{typeof this.finalCallback=="function"&&(Reflect.apply(this.finalCallback,null,[]),this.finalCallback=null)}}isOK(){return this.status}},$i=class{index;resource;progress;constructor(e,t,r){this.index=e,this.resource=t,this.progress=r}},er=Symbol("fk"),tr=Symbol("fbk"),rr=Symbol("fepk");function Ki(e={}){const t=new Mr(e),r=new Ft,s=new Zt,i=new fs,n={get router(){return t},get bus(){return r},get Bus(){return Ft},get EventProxy(){return Zt},get eventproxy(){return s},get EventChain(){return _e},get Require(){return fs},get require(){return i},get isESModule(){return Je},install(o,l={}){o.provide(Ie,t),o.provide(er,n),o.provide(tr,r),o.provide(rr,s),l.install!==!1&&(o.component(Ci,pt),o.component(Ei,as)),l.optionsApi!==!1&&(Reflect.defineProperty(o.config.globalProperties,"$fox",{get(){return n}}),Reflect.defineProperty(o.config.globalProperties,"$router",{get(){return t}}),Reflect.defineProperty(o.config.globalProperties,"$bus",{get(){return r}}),Reflect.defineProperty(o.config.globalProperties,"$bus",{get(){return r}}),Reflect.defineProperty(o.config.globalProperties,"$eventProxy",{get(){return s}}),o.config.globalProperties.$fox_on=function(a,u,f=!1){s.on(a,u,f)},o.config.globalProperties.$fox_off=function(a,u){s.off(a,u)},o.config.globalProperties.$fox_once=function(a,u){s.once(a,u)},o.config.globalProperties.$fox_all=function(...a){let u=s;Reflect.apply(u.all,u,a)},o.config.globalProperties.$fox_trigger=function(a,...u){let f=s;Reflect.apply(f.trigger,f,[a,...u])},o.config.globalProperties.$fox_emit=function(a,...u){let f=s;Reflect.apply(f.trigger,f,[a,...u])},o.mixin({computed:{$route(){return cs(this)}}})),t.init()}};return n}function sr(e){return(0,m.hasInjectionContext)()?(0,m.inject)(Ie,null):e?e.$?.appContext?.provides?.[Ie]??null:null}function cs(e){let t=Wr(e);if(!t&&e&&!(0,m.hasInjectionContext)()){let r=e;for(r=r.$parent;r&&(t=Wr(r),!t);)r=r.$parent}return t}function Ti(e){return(0,m.hasInjectionContext)()?(0,m.inject)(er,null):e?e.$?.appContext?.provides?.[er]??null:null}function ki(e){return(0,m.hasInjectionContext)()?(0,m.inject)(tr,null):e?e.$?.appContext?.provides?.[tr]??null:null}function Li(e){return(0,m.hasInjectionContext)()?(0,m.inject)(rr,null):e?e.$?.appContext?.provides?.[rr]??null:null}function Mi(e){const t=sr();if(!t){console.error("[Fox]router is not exist.");return}const r=(s,i,n)=>{try{Reflect.apply(e,{},[s,i])}catch(o){console.error(o)}n()};t?.beforeEach(r),(0,m.onScopeDispose)(()=>{t?.removeBeforeEach(r)})}function Ii(e){const t=sr();if(!t){console.error("[Fox]router is not exist.");return}const r=(s,i,n)=>{try{Reflect.apply(e,{},[s,i])}catch(o){console.error(o)}n()};t?.afterEach(r),(0,m.onScopeDispose)(()=>{t?.removeAfterEach(r)})}p.Bus=Ft,p.EventChain=_e,p.EventProxy=Zt,p.FoxBeforeEnter=zr,p.FoxBeforeLeave=Gr,p.FoxEnter=Jr,p.FoxLeave=Xr,p.FoxLeaveEnd=yt,p.OperationType=C,p.Route=x,p.Router=Mr,p.RouterLink=as,p.RouterView=pt,p.bindLifecycleContextToCurrentScope=Ys,p.createFox=Ki,p.createMemoryHistory=jr,p.createWebHashHistory=Ar,p.createWebHistory=Js,p.deleteContextValue=ti,p.destroyState=Ts,p.extend=A,p.injectContextValue=Jt,p.injectLifecycleContext=He,p.isArray=gt,p.isDate=ms,p.isESModule=Je,p.isEqual=St,p.isFunction=S,p.isMap=ys,p.isNil=he,p.isObject=lr,p.isPlainObject=ar,p.isPromise=gs,p.isSet=ds,p.isString=ps,p.isSymbol=vs,p.onAfterRouteUpdate=Ii,p.onBeforeRouteUpdate=Mi,p.onFoxActivated=oi,p.onFoxInactivated=li,p.provideContextValue=ei,p.rawState=Ks,p.reactiveState=js,p.shallowReactiveState=qs,p.toBoolean=bt,p.toNumber=Ss,p.toTypeString=ze,p.typeOf=Rt,p.useBus=ki,p.useEventProxy=Li,p.useFox=Ti,p.useRoute=cs,p.useRouter=sr,p.withLifecycleContext=Dr});
|
package/libs/style.css
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
.fox-views.fox-views-window{display:block}.fox-views.fox-views-window .fox-view{box-sizing:border-box;z-index:100;width:100%;position:fixed;top:0;left:0}.fox-views.fox-card-views{box-sizing:border-box;width:100%;height:100%;position:relative}.fox-views.fox-card-views .fox-card-view{width:100%}.fox-views.fox-card-views .fox-card-view-active{z-index:1}.fox-views.fox-card-views .fox-card-view-inactive{z-index:0;display:none}.fox-views .fox-view-trans-enter-to{z-index:120;animation:.33s fox-view-in-slide-right}.fox-views .fox-view-trans-leave-to{z-index:120;animation:.32s fox-view-out-slide-right}.fox-views .fox-view-trans-show-to{z-index:110;animation:.3s fox-view-show-slide-right}.fox-views .fox-view-trans-hide-to{z-index:110;animation:.32s fox-view-hide-slide-left}@keyframes fox-view-in-slide-right{0%{transform:translate(103%)}to{transform:translate(0%)}}@keyframes fox-view-out-slide-right{0%{transform:translate(0%)}to{transform:translate(103%)}}@keyframes fox-view-hide-slide-left{0%{transform:translate(0%)}to{transform:translate(-30%)}}@keyframes fox-view-show-slide-right{0%{transform:translate(-30%)}to{transform:translate(0%)}}
|
|
2
|
+
/*$vite$:1*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fox-js/fox",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.1.1
|
|
4
|
+
"version": "3.1.1",
|
|
5
5
|
"description": "Fox Router and commons Utils",
|
|
6
6
|
"author": "jiangcheng",
|
|
7
7
|
"keywords": [
|
|
@@ -26,11 +26,9 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"libs"
|
|
28
28
|
],
|
|
29
|
-
"publishConfig": {
|
|
30
|
-
"access": "public"
|
|
31
|
-
},
|
|
29
|
+
"publishConfig": {},
|
|
32
30
|
"scripts": {
|
|
33
|
-
"publish
|
|
31
|
+
"publish": "npm version patch --no-git-tag-version && npm publish --no-git-checks"
|
|
34
32
|
},
|
|
35
33
|
"dependencies": {},
|
|
36
34
|
"repository": ""
|