@fox-js/fox 2.1.4 → 2.1.5

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.
Files changed (2) hide show
  1. package/libs/index.js +1 -1
  2. package/package.json +2 -1
package/libs/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.fox=t():e.fox=t()}(self,(()=>(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>no}),Symbol("rk");var n,r=Symbol("crk"),o=Symbol("vd"),i=Symbol("rv"),a=Symbol("rvi"),l=Symbol("pv"),s=Symbol("pvi"),u=Symbol("valueKey");function c(e){if(n){var t={};return n.util.defineReactive(t,"value",e),t}var r={};return Reflect.defineProperty(r,"value",{get:function(){return r[u]},set:function(e){return r[u]=e}}),r}var f=Symbol("pvds"),v=Symbol("sk");function h(e,t,n,r){var o=e[f];if(o||(o=e[f]=new Map),r){var i=o.get(r);i||(i=new Map,o.set(r,i)),i.set(t,n)}else o.set(t,n)}function y(e,t,n){for(var r=e.$vnode?e.$vnode.data:{},o=r[v],i=e.$parent;i&&i._routerRoot!==i;){var a=i[f];if(a){if(o){var l=a.get(o);if(l&&l.has(t))return l.get(t)}if(a.has(t))return a.get(t)}var s=(r=i.$vnode?i.$vnode.data:{})[v];void 0!==s&&(o=s),i=i.$parent}return n}function p(e,t){if(t){var n=e[f];n&&n&&n.has(t)&&n.delete(t)}else Reflect.deleteProperty(e,f)}function d(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[l=n+1])throw new TypeError('Pattern cannot start with "?" at '+l);for(;l<e.length;)if("\\"!==e[l]){if(")"===e[l]){if(0==--o){l++;break}}else if("("===e[l]&&(o++,"?"!==e[l+1]))throw new TypeError("Capturing groups are not allowed at "+l);i+=e[l++]}else i+=e[l++]+e[l++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=l}else{for(var a="",l=n+1;l<e.length;){var s=e.charCodeAt(l);if(!(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=e[l++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=l}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,i="[^"+g(t.delimiter||"/#?")+"]+?",a=[],l=0,s=0,u="",c=function(e){if(s<n.length&&n[s].type===e)return n[s++].value},f=function(e){var t=c(e);if(void 0!==t)return t;var r=n[s],o=r.type,i=r.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},v=function(){for(var e,t="";e=c("CHAR")||c("ESCAPED_CHAR");)t+=e;return t};s<n.length;){var h=c("CHAR"),y=c("NAME"),p=c("PATTERN");if(y||p){var d=h||"";-1===o.indexOf(d)&&(u+=d,d=""),u&&(a.push(u),u=""),a.push({name:y||l++,prefix:d,suffix:"",pattern:p||i,modifier:c("MODIFIER")||""})}else{var m=h||c("ESCAPED_CHAR");if(m)u+=m;else if(u&&(a.push(u),u=""),c("OPEN")){d=v();var b=c("NAME")||"",w=c("PATTERN")||"",S=v();f("CLOSE"),a.push({name:b||(w?l++:""),pattern:b&&!w?i:w,prefix:d,suffix:S,modifier:c("MODIFIER")||""})}else f("END")}}return a}function m(e,t){var n=[];return function(e,t,n){void 0===n&&(n={});var r=n.decode,o=void 0===r?function(e){return e}:r;return function(n){var r=e.exec(n);if(!r)return!1;for(var i=r[0],a=r.index,l=Object.create(null),s=function(e){if(void 0===r[e])return"continue";var n=t[e-1];"*"===n.modifier||"+"===n.modifier?l[n.name]=r[e].split(n.prefix+n.suffix).map((function(e){return o(e,n)})):l[n.name]=o(r[e],n)},u=1;u<r.length;u++)s(u);return{path:i,index:a,params:l}}}(w(e,n,t),n,t)}function g(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function b(e){return e&&e.sensitive?"":"i"}function w(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return w(e,t,n).source}));return new RegExp("(?:"+r.join("|")+")",b(n))}(e,t,n):function(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,i=n.start,a=void 0===i||i,l=n.end,s=void 0===l||l,u=n.encode,c=void 0===u?function(e){return e}:u,f="["+g(n.endsWith||"")+"]|$",v="["+g(n.delimiter||"/#?")+"]",h=a?"^":"",y=0,p=e;y<p.length;y++){var d=p[y];if("string"==typeof d)h+=g(c(d));else{var m=g(c(d.prefix)),w=g(c(d.suffix));if(d.pattern)if(t&&t.push(d),m||w)if("+"===d.modifier||"*"===d.modifier){var S="*"===d.modifier?"?":"";h+="(?:"+m+"((?:"+d.pattern+")(?:"+w+m+"(?:"+d.pattern+"))*)"+w+")"+S}else h+="(?:"+m+"("+d.pattern+")"+w+")"+d.modifier;else h+="("+d.pattern+")"+d.modifier;else h+="(?:"+m+w+")"+d.modifier}}if(s)o||(h+=v+"?"),h+=n.endsWith?"(?="+f+")":"$";else{var x=e[e.length-1],k="string"==typeof x?v.indexOf(x[x.length-1])>-1:void 0===x;o||(h+="(?:"+v+"(?="+f+"))?"),k||(h+="(?="+v+"|"+f+")")}return new RegExp(h,b(n))}(d(e,n),t,n)}(e,t,n)}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var j=Array.isArray,O=function(e){return"function"==typeof e},R=Object.prototype.toString,P=function(e){return"[object Object]"===function(e){return R.call(e)}(e)},C="function"==typeof Symbol&&"symbol"===A(Symbol.toStringTag);function E(e){return e.__esModule||C&&"Module"===e[Symbol.toStringTag]}var T="undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]");function _(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=void 0!==t[0]&&null!==t[0]?t[0]:{},i=1,a=t.length,l=!1;for("boolean"==typeof o&&(l=o,o=null!==(r=t[i])&&void 0!==r?r:{},i++),"object"!==A(o)&&(o={});i<a;i++)if(null!==t[i]&&void 0!==t[i]){var s=t[i];for(var u in s){var c=o[u],f=s[u];if(c!==f)if(!0===l&&f&&"object"===A(f)){var v=void 0;v=Array.isArray(f)?c&&Array.isArray(c)?c:[]:c&&"object"===A(c)?c:{},o[u]=_(l,v,f)}else void 0!==f&&(o[u]=f)}}return o}function M(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n){if("object"!==A(t))return{};for(var r in"object"!==A(e)&&(e={}),t){var o=e[r],i=t[r];if(o!==i)if("object"===A(i)){if(!Array.isArray(i)&&!P(i))continue;o=M(o,i,n),e[r]=o}else{if("function"==typeof i)continue;e[r]=i}}var a,l=Object.getOwnPropertySymbols(t),s=x(l);try{for(s.s();!(a=s.n()).done;){var u=a.value,c=e[u],f=t[u];if(c!==f)if("object"===A(f)){if(!Array.isArray(f)&&!P(f))continue;c=M(c,f,n),e[u]=c}else{if("function"==typeof f)continue;e[u]=f}}}catch(e){s.e(e)}finally{s.f()}}else _(!0,e,t);return e}var q,I,N,K=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"get",value:function(){var t=++e.seed;return t>=Number.MAX_VALUE&&(e.seed=0),t}}],null&&S(t.prototype,null),n&&S(t,n),e}();q=K,I="seed",N=(new Date).getTime(),I in q?Object.defineProperty(q,I,{value:N,enumerable:!0,configurable:!0,writable:!0}):q.seed=N;var F=T?Promise.resolve():null;function D(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];null!==F?n&&n.length>0?F.then((function(){e(n)})):F.then(e):n&&n.length>0?setTimeout((function(){e(n)})):setTimeout(e)}function $(e){return null!=e&&("boolean"==typeof e?e:"string"==typeof e?"true"===e.toLocaleLowerCase():Boolean(e))}var L={"[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 H(e){var t=Object.prototype.toString.call(e);return null==e?String(e):L[t]||"object"}function U(e){return e&&"object"===A(e)&&"setInterval"in e}function B(e){var t=!!e&&"length"in e&&e.length,n=H(e);return"function"!==n&&!U(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function W(e,t){for(var n=+t.length,r=0,o=e.length;r<n;r++)e[o++]=t[r];return e.length=o,e}function J(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t;return null!=e&&(B(Object(e))?W(n,"string"==typeof e?[e]:e):n.push(e)),n}function V(e,t,n){if(B(e))Reflect.apply([].forEach,e,[t]);else for(var r in e)if(n&&e.hasOwnProperty(r)){if(!1===Reflect.apply(t,e,[e[r]]))break}else if(!1===Reflect.apply(t,e,[e[r]]))break;return e}function G(e,t){if(e==t)return!0;if(void 0===e||void 0===t)return!1;var n=H(e);if(n!==H(t))return!1;if("object"===n){var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(var i=0;i<r.length;i++){var a=r[i];if(!G(e[a],t[a]))return!1}return!0}if("array"===n){if(e.length!==t.length)return!1;for(var l=0;l<e.length;l++)if(!G(e[l],t[l]))return!1;return!0}return!1}var z="default",X=Symbol("sync"),Y=Symbol("resolveRoute");function Q(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Reflect.apply(e,{},r)}}}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function te(e,t,n){return t&&ee(e.prototype,t),n&&ee(e,n),e}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oe,ie,ae=function e(t,n,r,o){ne(this,e),re(this,"rootIndex",0),this.name=t,this.level=n,this.rootName=r,this.rootIndex=o},le=function(){function e(t,n){ne(this,e),re(this,"data",{}),this.to=t,this.from=n}return te(e,null,[{key:"from",value:function(t){var n,r=new e(t.to,t.from),o=null!==(n=t.data)&&void 0!==n?n:{};return _(!0,r.data,o),r}}]),e}(),se=function(){function e(){ne(this,e)}return te(e,[{key:"fullPath",get:function(){var e,t,n=null!==(e=this.path)&&void 0!==e?e:"/".concat(this.name);return"".concat(null!==(t=this.root)&&void 0!==t?t:z,"!").concat(n)}}],[{key:"clone",value:function(t,n){var r=new e;return M(r,t,n),r}},{key:"isSame",value:function(e,t){return!(e!==t&&(null==e||null==t||e.path&&e.path!==t.path||e.name&&e.name!==t.name||e.root!==t.root||e.index!==t.index))}},{key:"isSameForRouteModel",value:function(e,t){return!(e!==t&&(null==e||null==t||e.path&&e.path!=t.path||e.name&&e.name!=t.name))}},{key:"from",value:function(t){var n=new e;if(null==t)return n;var r=n;for(var o in t){var i=t[o];r[o]=i}var a=Object.getOwnPropertySymbols(t);if(Array.isArray(a)&&a.length>0){var l,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(a);try{for(s.s();!(l=s.n()).done;){var u=l.value;r[u]=t[u]}}catch(e){s.e(e)}finally{s.f()}}return n}}]),e}(),ue=function(){function e(t,n,r,o){ne(this,e),this.id=K.get(),this.name=t,this.src=n,"function"!=typeof n&&(this.component=n),this.props=r,this.meta=o}return te(e,[{key:"isResolved",get:function(){return void 0!==this.component}},{key:"resolve",value:function(){return t=(e=this).src,new Promise((function(n,r){var o,i=Q((function(t){E(t)&&(t=t.default),e.component=t,n()})),a=Q((function(e){var t="failed to resolve async component ".concat(e);r(t)}));try{o=t(i,a)}catch(e){a(e)}if(o)if("function"==typeof o.then)o.then(i,a);else{var l=o.component;l&&"function"==typeof l.then&&l.then(i,a)}}));var e,t}}]),e}(),ce=function e(){ne(this,e),re(this,"models",[])},fe=function e(){ne(this,e),re(this,"layers",[])};function ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function he(e,t,n){return t&&ve(e.prototype,t),n&&ve(e,n),e}function ye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){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"}(oe||(oe={})),function(e){e[e.Part=0]="Part",e[e.All=1]="All"}(ie||(ie={}));var de=Symbol("rootKey"),me=Symbol("rootNodeKey"),ge=Symbol("parentNodeKey"),be=Symbol("nameKey"),we=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];ye(this,e),pe(this,"active",!0),pe(this,"index",0),this.route=t,this.model=n,this.index=r,this.active=o},Se=function(){function e(t,n,r){ye(this,e),pe(this,me,null),pe(this,ge,null),this[be]=t,this[de]=n,r&&(this[me]=r)}return he(e,[{key:"slots",get:function(){return null==this._slots&&(this._slots=function(e){if(n){var t={};return n.util.defineReactive(t,"value",[],void 0,!0),t}var r={};return Reflect.defineProperty(r,"value",{get:function(){return r[u]},set:function(e){return r[u]=e}}),r}()),this._slots}},{key:"empty",get:function(){return null==this._slots||0==this._slots.value.length}},{key:"name",get:function(){return this[be]}}]),e}(),xe=function(){function e(t,n,r){ye(this,e),this.view=t,this.index=n,this.level=r}return he(e,null,[{key:"include",value:function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.view===t.view&&(-1==t.index||r.index===t.index)&&r.level===t.level)return!0}return!1}}]),e}(),ke=function e(){ye(this,e),pe(this,"views",[])},Ae=function e(){ye(this,e),pe(this,"layers",[])};function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Pe=function e(){Re(this,e)},Ce=function(){function e(){Re(this,e),Oe(this,"forbidTime",300),Oe(this,"submitRecorder",new Pe)}var t,n;return t=e,(n=[{key:"isSameRoute",value:function(e,t){return null!=e&&null!=t&&e.name===t.name&&e.path===t.path&&e.root===t.root}},{key:"acquire",value:function(e){var t=(new Date).getTime();if(!(this.isSameRoute(e,this.submitRecorder.route)&&this.submitRecorder.time&&t-this.submitRecorder.time<=this.forbidTime))return this.submitRecorder.route=e,this.submitRecorder.time=t,t;this.submitRecorder.time=t}},{key:"release",value:function(e){this.submitRecorder.time===e&&(this.submitRecorder.route=void 0)}}])&&je(t.prototype,n),e}();function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Te=void 0!==("undefined"==typeof window?"undefined":Ee(window)),_e=window,Me=window.document;function qe(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on".concat(t),n):e["on".concat(t)]=n}function Ie(e,t,n){e.removeEventListener?e.removeEventListener(t,n):e.detachEvent?e.detachEvent("on".concat(t),n):e["on".concat(t)]=null}var Ne,Ke,Fe,De,$e=(Fe=_e.location,De="".concat(Fe.protocol,"//").concat(Fe.host),De+=((Ke=(Ne=Fe.pathname).lastIndexOf("/"))>0&&Ke<Ne.length-1?Ne=Ne.substring(0,Ke+1):0===Ke&&-1!==Ne.indexOf(".")?Ne="/":-1===Ke&&(Ne=-1==Ne.indexOf(".")?"/".concat(Ne,"/"):"/"),0!==Ne.indexOf("/")&&(Ne="/".concat(Ne)),Ne));function Le(e){return(Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var He={type:"GET",async:!0,contentType:"application/x-www-form-urlencoded",dataType:"string",cache:!1,timeout:3e4,processData:!0};function Ue(e){var t=new XMLHttpRequest,n={};if(_(!0,n,He),_(!0,n,e),(e=n).async)try{t.responseType=e.dataType,t.timeout=e.timeout,t.ontimeout=function(){"function"==typeof e.ontimeout?e.ontimeout(t,t.status):"function"==typeof e.error&&e.error(t,t.status)}}catch(e){console.error(e.message,e)}t.onabort=function(){"function"==typeof e.onabort?e.onabort(t,t.status):"function"==typeof e.error&&e.error(t,t.status)},t.onerror=function(){"function"==typeof e.error&&e.error(t,t.status)},t.onloadend=function(){"function"==typeof e.complete&&e.complete(t,t.status)},t.onprogress=function(){"function"==typeof e.loading&&e.loading(t)},t.onload=function(){if(0==t.status||t.status>=200&&t.status<300||304==t.status){var n,r=null!==(n=t.response)&&void 0!==n?n:"";if(0==r.length&&0==t.status)return;try{o=r,"json"===e.dataType&&"string"==typeof o&&(o=JSON.parse(o)),r=o}catch(e){console.error(e.message,e)}"function"==typeof e.success&&e.success(r,t.status,t)}else"function"==typeof e.error&&e.error(t,t.status);var o};try{var r=e.url;if(e.type&&"GET"===e.type.toUpperCase()&&(r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text";if(null==t)return e;var r="";if(0===(n=n.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded")||0===n.indexOf("application/json"))if("object"===Le(t))for(var o in t){var i=t[o];if(Array.isArray(i))for(var a=0;a<i.length;a++){var l="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i[a]));r.length>0&&(r+="&"),r+=l}else{var s="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i));r.length>0&&(r+="&"),r+=s}}else r=t;else r=t;return r.length>0&&(e=-1===e.indexOf("?")?"".concat(e,"?").concat(r):"".concat(e,"&").concat(r)),e}(e.url,e.data,e.contentType)),t.open(e.type,r,e.async),e.contentType&&t.setRequestHeader("Content-Type",e.contentType),"function"==typeof e.beforeSend){var o={};_(!0,o,e),Reflect.apply(e.beforeSend,e,[t,o])}if(e.cache||t.setRequestHeader("Cache-Control","no-cache"),e.type&&"POST"===e.type.toUpperCase()){var i=e.processData?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text",n="";if(0===(t=t.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded"))if("object"===Le(e))for(var r in e){var o=e[r];if(Array.isArray(o))for(var i=0;i<o.length;i++){var a="".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(o[i]));n.length>0&&(n+="&"),n+=a}else{var l="".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(o));n.length>0&&(n+="&"),n+=l}}else n=e;else n=0===t.indexOf("text")?"object"===Le(e)?JSON.stringify(e):e:0===t.indexOf("application/json")&&"object"===Le(e)?JSON.stringify(e):e;return n}(e.data,e.contentType):e.data;t.send(i)}else t.send()}catch(n){"function"==typeof e.error&&e.error(t,n.message),"function"==typeof e.complete&&e.complete(t,n.message)}return t}function Be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var We,Je=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"cache",new Map)}var t,n;return t=e,(n=[{key:"get",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return new Promise((function(r,o){if(t.cache.has(e)){var i=t.cache.get(e);r(i)}else Ue({url:e,type:"GET",cache:!1,data:{},timeout:n,async:!0,success:function(n,o,i){t.cache.set(e,n),r(n)},error:function(e,t){o(t)}})}))}},{key:"remove",value:function(e){this.cache.delete(e)}}])&&Be(t.prototype,n),e}());function Ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(e){e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Defining=2]="Defining",e[e.Defined=3]="Defined"}(We||(We={}));var ze,Xe=function e(){Ge(this,e)},Ye=function(){function e(){Ge(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"register",new Map)}var t,n;return t=e,(n=[{key:"get",value:function(e){return this.register.get(e)}},{key:"put",value:function(e,t){this.register.set(e,t)}},{key:"remove",value:function(e){var t=this.register.get(e);return this.register.delete(e),t}},{key:"contains",value:function(e){return this.register.has(e)}},{key:"clear",value:function(){this.register.clear()}}])&&Ve(t.prototype,n),e}();function Qe(e){return(Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ze(e){return function(e){if(Array.isArray(e))return et(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return et(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?et(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function et(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Busy="Busy",e.Free="Free",e.Reject="Reject",e.Exception="Exception",e.Finished="Finished"}(ze||(ze={}));var ot=Symbol("chainKey"),it=Symbol("cursorKey"),at=Symbol("$persistentModeKey"),lt=Symbol("statusKey"),st=Symbol("argsKey"),ut=Symbol("exArgsKey"),ct=Symbol("successFnsKey"),ft=Symbol("errorFnsKey"),vt=Symbol("sessionKey"),ht=Symbol("_go"),yt=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];tt(this,e),rt(this,ot,[]),rt(this,it,0),rt(this,at,!1),rt(this,lt,ze.Free),rt(this,st,[]),rt(this,ut,[]),rt(this,ct,[]),rt(this,ft,[]),this[vt]=t,this[at]=n}var t,n;return t=e,(n=[{key:"session",get:function(){return this[vt]}},{key:ht,value:function(e){var t=this,n=this[lt];this[lt]=ze.Busy,this[it]+=e,this[it]<0&&(this[it]=0);for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];if(this[st]=o,n===ze.Exception||n===ze.Reject){var a=function(){for(var e=[{session:t[vt]}].concat(Ze(t[ut]));t[ft].length>0;)try{!function(){var n=t[ft].shift();"function"==typeof n&&D((function(){Reflect.apply(n,{},e)}))}()}catch(e){console.error(e.message,e)}return t[lt]=n,t[ot]=[],t[it]=0,{v:t}}();if("object"===Qe(a))return a.v}else if(n===ze.Finished||this[it]>=this[ot].length){var l=function(){for(var e=[{session:t[vt]}].concat(Ze(t[st])),n=function(){var n=t[ct].shift();"function"==typeof n&&D((function(){Reflect.apply(n,{},e)}))};t[ct].length>0;)n();return t[lt]=ze.Free,{v:t}}();if("object"===Qe(l))return l.v}if(this[it]>=this[ot].length)return this[lt]=ze.Free,this;var s=this[ot][this[it]];this[at]||(this[ot].splice(0,this[it]+1),this[it]=-1);var u=this[it]+1;try{var c=!1,f={go:function(e){if(!c){c=!0;for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];Reflect.apply(t[ht],t,[e].concat(r))}},resolve:function(){if(!c){c=!0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];Reflect.apply(t[ht],t,[1].concat(n))}},reject:function(){if(!c){c=!0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];Reflect.apply(t.reject,t,[].concat(n))}},insert:function(e){c||(t[ot].splice(u,0,e),u++)},session:this[vt]};D((function(){Reflect.apply(s,{},[f].concat(Ze(t[st])))}))}catch(e){this.throw(e)}return this}},{key:"go",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Reflect.apply(this[ht],this,[e].concat(n))}},{key:"finish",value:function(){this[lt]=ze.Finished;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[st]=t,Reflect.apply(this[ht],this,[0])}},{key:"reject",value:function(){this[lt]=ze.Reject;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[ut]=t,Reflect.apply(this[ht],this,[0])}},{key:"throw",value:function(){this[lt]=ze.Exception;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[ut]=t,Reflect.apply(this[ht],this,[0])}},{key:"reset",value:function(){var e=this;this[lt]=ze.Busy;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this[st]=n,this[ot]=[],this[it]=0;for(var o={session:this[vt]},i=[o].concat(Ze(this[st])),a=function(){var t=e[ct].shift();D((function(){Reflect.apply(t,e,i)}))};this[ct].length>0;)a();return this[lt]=ze.Free,this}},{key:"post",value:function(e){return this[lt]===ze.Reject||this[lt]===ze.Exception||(Array.isArray(e)?this[ot]=[].concat(Ze(this[ot]),Ze(e)):this[ot].push(e),this[lt]===ze.Busy||Reflect.apply(this[ht],this,[0].concat(Ze(this[st])))),this}},{key:"wait",value:function(e,t){return e&&"function"==typeof e&&this[ct].push(e),t&&"function"==typeof t&&this[ft].push(t),this[lt]===ze.Busy||Reflect.apply(this[ht],this,[0].concat(Ze(this[st]))),this}},{key:"exception",value:function(e){return e&&"function"==typeof e&&this[ft].push(e),this[lt]===ze.Busy?this:Reflect.apply(this[ht],this,[0].concat(Ze(this[st])))}},{key:"isFinish",value:function(){return this[lt]==ze.Reject||this[lt]==ze.Free&&this[it]>=this[ot].length}}])&&nt(t.prototype,n),e}();function pt(e){return(pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gt(e,t,n){return t&&mt(e.prototype,t),n&&mt(e,n),e}function bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};dt(this,e),bt(this,"moduleManager",new Ye),this.head=Me.head||Me.getElementsByTagName("head")[0]||Me.documentElement,this.isOldWebKit=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/(\d+).*/,"$1")<536,this.options=t,this.options.paths||(this.options.paths={}),this.options.alias||(this.options.alias={})}return gt(e,[{key:"query",get:function(){return this._query},set:function(e){this._query=e}},{key:"ensure",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=[],i=t.length-1,a={};"object"===pt(t[i])&&(Object.assign(a,t[i]),i--),"function"==typeof t[i]&&(r=t[i],i--);for(var l=0;l<=i;l++)if(Array.isArray(t[l]))for(var s=t[l],u=0;u<s.length;u++)void 0!==s[u]&&o.push(this.resolvePath(s[u]));else for(var c=t[l].split(","),f=0;f<c.length;f++)void 0!==c[f]&&o.push(this.resolvePath(c[f]));for(var v=new xt(o.length,(function(e,t){if(v.isOK())try{"function"==typeof r&&Reflect.apply(r,{},t)}catch(e){console.error(e.message,e)}else try{console.error(e),"function"==typeof r&&Reflect.apply(r,{},[])}catch(e){console.error(e.message,e)}})),h=new yt,y=0;y<o.length;y++){var p=new kt(y,o[y],a,v);this.mount(h,p)}return this}},{key:"remove",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=[],i=n.length-1,a={};"object"===pt(n[i])&&(Object.assign(a,n[i]),i--);var l=null;"function"==typeof n[i]&&(l=n[i],i--);for(var s=0;s<=i;s++)if(Array.isArray(n[s]))for(var u=n[s],c=0;c<u.length;c++)void 0!==u[c]&&o.push(this.resolvePath(u[c]));else for(var f=n[s].split(","),v=0;v<f.length;v++)void 0!==f[v]&&o.push(this.resolvePath(f[v]));return o.forEach((function(t){e.unmount(t,a)})),"function"==typeof l&&Reflect.apply(l,{},[]),this}},{key:"mount",value:function(e,t){if(this.isNaturePath(t.src,"js")){var n=t.params.jsPoint;return null==n&&(n=this.head),void this.mountJS(e,t,n)}if(this.isNaturePath(t.src,"css")){var r=t.params.cssPoint;return null==r&&(r=this.head),void this.mountCSS(e,t,r)}if(this.isNaturePath(t.src,"html")){var o=t.params.htmlPoint;return null==o&&(o=Me.body),void this.mountHTML(e,t,o)}var i=this.getFileNamePostfix(t.src);if("js"===i||0===i.length){var a=t.params.jsPoint;return null==a&&(a=this.head),void this.mountJS(e,t,a)}if("css"===i){var l=t.params.cssPoint;return null==l&&(l=this.head),void this.mountCSS(e,t,l)}var s=t.params.htmlPoint;return null==s&&(s=Me.body),void this.mountHTML(e,t,s)}},{key:"mountHTML",value:function(e,t,n){var r=this;e.post((function(e){var o=t.params.timeout||r.options.timeout||3e4,i=t.src;Je.get(i,o).then((function(r){n.innerHTML=r,t.progress.work(!0,t.index,r),e.resolve()}),(function(n){console.error(n),t.progress.work(!1,t.index,null),e.reject()}))}))}},{key:"mountCSS",value:function(e,t,n){var r=this;e.post((function(e){var o=t.src,i=Me.createElement("link"),a="onload"in i;if(r.isOldWebKit||!a){var l={timeout:r.options.time||3e3,time:0,isOldWebKit:r.isOldWebKit,success:function(){t.progress.work(!0,t.index,t.src),e.resolve()},error:function(){try{n.removeChild(i)}catch(e){console.error(e.message,e)}t.progress.work(!1,t.index,null),e.resolve()}};setTimeout((function(){St(i,l)}),1)}else i.onload=function(){i.onload=i.onerror=null,t.progress.work(!0,t.index,t.src),e.resolve()},i.onerror=function(){try{n.removeChild(i)}catch(e){console.error(e.message,e)}i.onload=i.onerror=null,t.progress.work(!1,t.index,null),e.reject()};var s=Me.getElementById(o);s&&s.parentNode&&s.parentNode.removeChild(s),i.rel="stylesheet",i.type="text/css",i.id=o,i.href=o,n.appendChild(i)}))}},{key:"mountJS",value:function(e,t,n){var r=this;e.post((function(e){var o=t.src,i=r.moduleManager.get(o);if(i&&(i.status==We.Defined||i.status==We.Loaded)){if(i.exports)return t.progress.work(!0,t.index,i.exports),void e.resolve();if(document.querySelector("script[src='".concat(o)))return t.progress.work(!0,t.index,i.exports),void e.resolve()}(i=new Xe).id=o,i.src=o,i.status=We.Loading,r.moduleManager.put(o,i);var a=Me.createElement("script");if("onload"in a)a.onload=function(){a.onload=a.onerror=null,i.status==We.Loading&&(i.status=We.Loaded,t.progress.work(!0,t.index,o)),e.resolve()},a.onerror=function(){try{n.removeChild(a)}catch(e){console.error(e.message,e)}a.onload=a.onerror=null,t.progress.work(!1,t.index,null),e.reject()};else{var l=a;l.onreadystatechange=function(){/loaded|complete/.test(l.readyState)&&(l.onreadystatechange=null,i.status==We.Loading&&(i.status=We.Loaded,t.progress.work(!0,t.index,o)),e.resolve())}}a.defer=!0,a.src=o,_e.define=r.createDefine(i,t),n.appendChild(a)}))}},{key:"unmount",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getFileNamePostfix(e);if("js"===n||0===n.length){var r=Me.querySelector('script[src="'.concat(e,'"]'));return r&&r.parentNode&&r.parentNode.removeChild(r),void this.moduleManager.remove(e)}if("css"!==n){Je.remove(e);var o=t.htmlPoint;return o||(o=Me.body),void(o.innerHTML="")}var i=Me.querySelector('style[href="'.concat(e,'"]'));i&&i.parentNode&&i.parentNode.removeChild(i)}},{key:"trimEmptyElement",value:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n].trim();0!==r.length&&t.push(r)}return t}},{key:"createDefine",value:function(e,t){var n=this,r=function(){var r,o,i;e.status=We.Defining;var a=arguments.length;1===a?(i=arguments.length<=0?void 0:arguments[0],r=void 0):2===a?(i=arguments.length<=1?void 0:arguments[1],Array.isArray(arguments.length<=0?void 0:arguments[0])?(o=n.trimEmptyElement(arguments.length<=0?void 0:arguments[0]),r=void 0):o=void 0):(r=arguments.length<=0?void 0:arguments[0],o=n.trimEmptyElement(arguments.length<=1?void 0:arguments[1]),i=arguments.length<=2?void 0:arguments[2]),r&&(e.id=r,n.options.alias[r]=e.src),o&&o.length>0?n.ensure(o,(function(){if("function"==typeof i){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.exports=Reflect.apply(i,e,r)}else e.exports=i;e.status=We.Defined,t.progress.work(!0,t.index,e.exports)})):(e.exports="function"==typeof i?Reflect.apply(i,e,[]):i,e.status=We.Defined,t.progress.work(!0,t.index,e.exports))};return r.amd=!0,r}},{key:"resolvePath",value:function(e){try{if(this.isNaturePath(e,"all"))return e;e=this.parserPath(e,!0);var t=this.getFileNamePostfix(e);t=t.toLowerCase();var n=this.createSearch(this.query);return-1==e.indexOf("?")?("js"!==t&&"css"!==t&&"html"!==t&&(e+=".js"),n.length>0&&(e+="?".concat(n))):n.length>0&&(e+="&".concat(n)),e}catch(t){throw console.error("resolve path[".concat(e,"] fail"),t),t}}},{key:"createSearch",value:function(e){var t="";if(e){for(var n in e){var r="".concat(e[n]);t+="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r),"&")}t.length>0&&(t=t.substring(0,t.length-1))}return t}},{key:"getFileNamePostfix",value:function(e){var t=e.lastIndexOf("?");-1==t&&(t=e.length);var n=e.lastIndexOf(".",t);return-1==n?"":e.substring(n+1,t)}},{key:"isNaturePath",value:function(e,t){if(null==this.options.nature)return!1;if("all"===t||"js"===t){var n=this.options.nature.js;if(void 0!==n)for(var r=0;r<n.length;r++){var o=n[r];if(0===e.indexOf(o))return!0}}if("all"===t||"css"===t){var i=this.options.nature.css;if(void 0!==i)for(var a=0;a<i.length;a++){var l=i[a];if(0===e.indexOf(l))return!0}}if("all"===t||"html"===t){var s=this.options.nature.html;if(void 0!==s)for(var u=0;u<s.length;u++){var c=s[u];if(0===e.indexOf(c))return!0}}return!1}},{key:"parserPath",value:function(e,t){if(0==e.indexOf("http://"))return e;if(0==e.indexOf("https://"))return e;if(0==e.indexOf("file:///"))return e;if(0==e.indexOf("/"))return $e+e.slice(1);if(0==e.indexOf("./"))return $e+e.slice(2);if(t){var n=this.options.alias[e];if(!n){var r=e.indexOf("/");if(-1==r)n=e;else{var o=e.slice(0,r),i=this.options.paths[o];n=i?i+e.slice(r):e}}return this.parserPath(n,!1)}return $e+e}}]),e}();function St(e,t){var n=e.sheet,r=!1;if(t.isOldWebKit)n&&(r=!0);else if(n)try{n.cssRules&&(r=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(r=!0)}setTimeout((function(){t.time+=20,r?t.success():t.time>t.timeout?t.error():St(e,t)}),20)}var xt=function(){function e(t,n){dt(this,e),this.size=t,this.callback=n,this.status=!0,this.values=[],this.lastIndex=-1}return gt(e,[{key:"work",value:function(e,t,n){if(this.status=e,!0===this.status&&(this.lastIndex!==t&&this.size--,this.lastIndex=t,this.values.push(n)),0===this.size||!1===this.status)try{Reflect.apply(this.callback,this,[this.status,this.values])}catch(e){console.error(e.message,e)}}},{key:"isOK",value:function(){return this.status}}]),e}(),kt=function e(t,n,r,o){dt(this,e),this.index=t,this.src=n,this.params=r,this.progress=o};function At(e){return(At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Pt=Symbol("_notifyChange"),Ct=Symbol("_generateLocation"),Et=Symbol("_setHashRecorder"),Tt=function e(t,n){Rt(this,e),this.currentRoute=t,this.routes=n},_t=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/";Rt(this,e),Ot(this,"traceless",!1),this.query=t,this.hashMonitor=n,this.traceless=r,this.defaultPath=o}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this;if(this.hashMonitor&&!this.historyChange){this.historyChange=function(){if(e.hashMonitor){var t=_e.history.state;e[Pt](t)}},qe(_e,"popstate",this.historyChange);var t=this.getHash()||this.defaultPath,n=_e.sessionStorage.getItem(t);if(n){var r=JSON.parse(n);this[Pt](r)}else{var o,i=t.indexOf("!");o=-1!=i?t.substring(i+1):t;var a=new se;a.path=o,a.query=this.getSearch(),this[Pt]([a])}}}},{key:"destroy",value:function(){this.historyChange&&Ie(_e,"popstate",this.historyChange)}},{key:Et,value:function(e,t){if(this.hashMonitor)try{this.lastHash&&_e.sessionStorage.removeItem(this.lastHash);var n=JSON.stringify(t);_e.sessionStorage.setItem(e,n),this.lastHash=e}catch(e){console.error(e.message)}}},{key:"listen",value:function(e){this.changeHandle=e}},{key:Pt,value:function(e){"function"==typeof this.changeHandle&&this.changeHandle(e)}},{key:"go",value:function(e){_e.history.go(e)}},{key:"push",value:function(e){var t=this[Ct](e.currentRoute);this.traceless||_e.history.pushState(e.routes,"",t),this[Et](e.currentRoute.fullPath,e.routes)}},{key:"replace",value:function(e){var t=this[Ct](e.currentRoute);this.traceless||_e.history.replaceState(e.routes,"",t),this[Et](e.currentRoute.fullPath,e.routes)}},{key:Ct,value:function(e){var t;if(e.query){var n="";if("object"===At(e.query))for(var r in e.query){var o=encodeURIComponent(e.query[r]),i="".concat(encodeURIComponent(r),"=").concat(o);n.length>0&&(n+="&"),n+=i}else n=e.query;this.query?"?"!==(t="".concat(this.query,"&").concat(n)).charAt(0)&&(t="?".concat(t)):t="?".concat(n)}var a=_e.location;return t?"".concat(a.origin).concat(a.pathname).concat(t,"#").concat(e.fullPath):"".concat(a.origin).concat(a.pathname,"#").concat(e.fullPath)}},{key:"getHash",value:function(){var e=_e.location.hash,t=e.indexOf("#");return-1!=t?e.substring(t+1):null}},{key:"getSearch",value:function(){return _e.location.search}}])&&jt(t.prototype,n),e}();function Mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mt(Object(n),!0).forEach((function(t){$t(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function It(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Kt(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Nt(e){return function(e){if(Array.isArray(e))return Ft(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Kt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kt(e,t){if(e){if("string"==typeof e)return Ft(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ft(e,t):void 0}}function Ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lt(e){return(Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Ht=Symbol("_constructRouteModel"),Ut=Symbol("_findRouteModel"),Bt=Symbol("_findRootView"),Wt=Symbol("_getFirstView"),Jt=Symbol("_removeView"),Vt=Symbol("_buildPage"),Gt=Symbol("_resolveComponent"),zt=Symbol("_update"),Xt=Symbol("_merge"),Yt=Symbol("ignoreHistoryChangeOnceKey"),Qt=Symbol("_handleHistoryChange"),Zt=Symbol("_handleRouteUpdated"),en=Symbol("routeUpdatedCallback"),tn=Symbol("currentRoutes"),nn=Symbol("current"),rn=Symbol("_addRouteRecorder"),on=Symbol("_removeRouteRecorder"),an=Symbol("_cloneRouteRecorder"),ln=Symbol("_hanldeError"),sn=Symbol("errorCallback"),un=Symbol("registerKey"),cn=Symbol("notFoundKey"),fn=Symbol("forestKey"),vn=Symbol("historyKey"),hn=Symbol("beforeFiltersKey"),yn=Symbol("afterFiltersKey"),pn=Symbol("destroyFiltersKey"),dn=Symbol("mainDispatcherKey"),mn=Symbol("initKey"),gn=Symbol("requireKey"),bn=Symbol("_createNextFn"),wn=Symbol("_start"),Sn=Symbol("_before"),xn=Symbol("_after"),kn=Symbol("_destroy"),An=Symbol("_load"),jn=Symbol("_unload"),On=Symbol("_loadDependency"),Rn=Symbol("resolvedModulesKey"),Pn=Symbol("resolveDependencyKey"),Cn=Symbol("routerGuardKey");Symbol.for("loadViewModel");var En=function(){function e(t){var n,r,o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),$t(this,un,new Array),$t(this,fn,new Ae),$t(this,tn,new Array),$t(this,sn,null),$t(this,en,null),$t(this,hn,new Array),$t(this,yn,new Array),$t(this,pn,new Array),$t(this,dn,new yt),$t(this,Rn,new Map),$t(this,Cn,new Ce),$t(this,mn,!1),$t(this,nn,c(null)),$t(this,gn,new wt),$t(this,Yt,!1),this.options=null!=t?t:{};var i=null!==(n=this.options.routes)&&void 0!==n?n:[];this.addRoutes(i),this.options.notFound&&this.setNotFoundRoute(this.options.notFound),this[vn]=new _t(this.options.query,this.options.hashMonitor,this.options.traceless,this.options.defaultPath),null===(r=this[vn])||void 0===r||r.listen((function(e){if("string"==typeof e){var t=o[Y](e);t&&o[Qt]([t])}else o[Qt](e)}))}var t,n;return t=e,(n=[{key:"require",get:function(){return this[gn]}},{key:"current",get:function(){return this[nn].value}},{key:ln,value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"error",t=arguments.length>1?arguments[1]:void 0;if(t&&"function"==typeof t.error)try{t.error(e)}catch(e){}if(this[sn])try{this[sn](e,t)}catch(e){}console.error(e)}},{key:"init",value:function(){var e;!0!==this[mn]&&(null===(e=this[vn])||void 0===e||e.init(),this[mn]=!0)}},{key:Qt,value:function(e){if(this[Yt])this[Yt]=!1;else try{if(!e){var t=Nt(this[tn]).reverse();return this[jn](t),void _e.location.reload()}for(var n=null,r=[],o=[],i=0;i<e.length&&i<this[tn].length&&se.isSame(e[i],this[tn][i]);i++)e[i].opsType===oe.Open&&!0===e[i].active&&e[i].active!==this[tn][i].active&&(n=e[i]);if(i<e.length&&(r=e.slice(i)),i<this[tn].length&&(o=this[tn].slice(i).reverse()),0==o.length&&0==r.length)return void(null!==n&&this.restore([n]));if(o.length>0){if(this[jn](o)){if(r.length>0)return void this.restore(r);null!==n&&this.restore([n])}}else this.restore(r)}catch(e){this[ln](e)}}},{key:Zt,value:function(e){if(e)this[nn].value=e;else{var t=this[tn].length;this[nn].value=t>0?this[tn][t-1]:null}if("function"==typeof this[en])try{this[en](this[nn].value)}catch(e){}}},{key:rn,value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t<0||t>=this[tn].length?this[tn].push(e):this[tn].splice(t,0,e)}},{key:an,value:function(){var e,t=[],n=It(this[tn]);try{for(n.s();!(e=n.n()).done;){var r=e.value,o=se.clone(r,!0);t.push(o)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:on,value:function(e){if(null!=this[tn]){for(var t=-1,n=0;n<this[tn].length;n++)if(se.isSame(this[tn][n],e)){t=n;break}if(-1!=t){var r=this[tn][t];this[tn].splice(t,1),this[kn](r,r.session)}}}},{key:"hashMonitor",set:function(e){this[vn]&&(this[vn].hashMonitor=e)}},{key:"hashMonitor",get:function(){return!!this[vn]&&this[vn].hashMonitor}},{key:"traceless",set:function(e){this[vn]&&(this[vn].traceless=e)}},{key:"traceless",get:function(){return!!this[vn]&&this[vn].traceless}},{key:"onRouteUpdated",value:function(e){this[en]=e}},{key:"onError",value:function(e){this[sn]=e}},{key:"beforeEach",value:function(e){this[hn].push(e)}},{key:"afterEach",value:function(e){this[yn].push(e)}},{key:"destroyEach",value:function(e){this[pn].push(e)}},{key:"setResolveDependency",value:function(e){this[Pn]=e}},{key:"addRoutes",value:function(e){var t,n=It(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.addRoute(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"addRoute",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=this[Ht](e);if(-1==t)this[un]=[].concat(Nt(this[un]),Nt(n));else for(var r=n.length-1;r>=0;r--)this[un].splice(t,0,n[r])}},{key:"removeRoute",value:function(e){var t=this[Y](e);if(null===t)return console.warn("route格式错误",e),!1;for(var n=0;n<this[un].length;n++){var r=this[un][n];if(null!=t&&t.path&&r.path===t.path)return this[un].splice(n,1),!0;if(null!=t&&t.name&&r.name===t.name)return this[un].splice(n,1),!0}return!1}},{key:"hasRoute",value:function(e){var t=this[Y](e);return null===t?(console.warn("route格式错误",e),!1):-1!==this[un].findIndex((function(e){return!(null==t||!t.path||e.path!==t.path)||!(null==t||!t.name||e.name!==t.name)||void 0}))}},{key:"setNotFoundRoute",value:function(e){var t=this[Ht](e);this[cn]=t[0]}},{key:"getRoutes",value:function(){return Nt(this[un])}},{key:Ht,value:function(e){var t,n=null!==(t=e.path)&&void 0!==t?t:"";n.length>0&&"/"!==n.charAt(0)&&(n="/".concat(n));var r=e.components||e.component&&{"":e.component};if(null==r){var o=new fe;return o.path=n,o.redirect=e.redirect,[o]}var i=[];for(var a in r){var l=r[a];0===a.length&&(a=z);var s=new ue(a,l,e.props,e.meta);i.push(s)}var u=!1,c=[];if(e.children){var f,v=It(e.children);try{for(v.s();!(f=v.n()).done;){var h,y=f.value,p=It(this[Ht](y));try{for(p.s();!(h=p.n()).done;){var d=h.value,m=new fe;m.name=d.name,d.path&&d.path.length>0?m.path="".concat(n).concat(d.path):(u=!0,m.path=n);var g=new ce;g.models=[].concat(i),m.layers=[g].concat(Nt(d.layers)),c.push(m)}}catch(e){p.e(e)}finally{p.f()}}}catch(e){v.e(e)}finally{v.f()}}if(!u){var b=new ce;b.models=i;var w=new fe;w.name=e.name,w.path=n,w.layers=[b],c.splice(0,0,w)}return c}},{key:Ut,value:function(e){var t,n=e.route;try{var r,o=It(this[un]);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(n.path&&i.path){var a,l=i.match;l||(l=i.match=m(i.path));var s=l(n.path);if(!s)continue;if(i.redirect){var u=new se;_(!0,u,n),u.path=i.redirect;var c={route:u,find:void 0};return!!this[Ut](c)&&(e.route=c.route,e.find=c.find,!0)}if(n.params=null!==(a=n.params)&&void 0!==a?a:{},_(!0,n.params,s.params),n.query){var f=n.query;if("string"==typeof f){var v,h={},y=It(f.split("&"));try{for(y.s();!(v=y.n()).done;){var p=v.value.split("=");if(2===p.length){var g=decodeURIComponent(p[0].trim()),w=decodeURIComponent(p[1].trim());h[g]=w}}}catch(e){y.e(e)}finally{y.f()}_(!0,n.params,h)}else"object"===Lt(f)&&_(!0,n.params,f)}return e.find=i,!0}if(n.name===i.name){var S;n.params=null!==(S=n.params)&&void 0!==S?S:{};var x=function(e,t){void 0===t&&(t={});var n=b(t),r=t.encode,o=void 0===r?function(e){return e}:r,i=t.validate,a=void 0===i||i,l=e.map((function(e){if("object"==typeof e)return new RegExp("^(?:"+e.pattern+")$",n)}));return function(t){for(var n="",r=0;r<e.length;r++){var i=e[r];if("string"!=typeof i){var s=t?t[i.name]:void 0,u="?"===i.modifier||"*"===i.modifier,c="*"===i.modifier||"+"===i.modifier;if(Array.isArray(s)){if(!c)throw new TypeError('Expected "'+i.name+'" to not repeat, but got an array');if(0===s.length){if(u)continue;throw new TypeError('Expected "'+i.name+'" to not be empty')}for(var f=0;f<s.length;f++){var v=o(s[f],i);if(a&&!l[r].test(v))throw new TypeError('Expected all "'+i.name+'" to match "'+i.pattern+'", but got "'+v+'"');n+=i.prefix+v+i.suffix}}else if("string"!=typeof s&&"number"!=typeof s){if(!u){var h=c?"an array":"a string";throw new TypeError('Expected "'+i.name+'" to be '+h)}}else{if(v=o(String(s),i),a&&!l[r].test(v))throw new TypeError('Expected "'+i.name+'" to match "'+i.pattern+'", but got "'+v+'"');n+=i.prefix+v+i.suffix}}else n+=i}return n}}(d(i.path,t=void 0),t);return n.path=x(n.params),e.find=i,!0}}}catch(e){o.e(e)}finally{o.f()}}catch(e){console.error(e.message,e),"function"==typeof n.error&&n.error(e.message)}return!1}},{key:Y,value:function(e){var t=null;if(Array.isArray(e))if(t=new se,"object"===Lt(e[0]))t=se.from(e[0]);else for(var n=0;n<e.length;n++)0===n?"/"===e[n].charAt(0)?t.path=e[n]:t.name=e[n]:1===n?t.params=e[n]:2===n?t.root=e[n]:3===n&&_(!1,t,e[n]);else"object"===Lt(e)?t=se.from(e):"string"==typeof e&&(t=new se,"/"==e.charAt(0)?t.path=e:t.name=e);if(t){var r,o,i;if(t.path){var a=t.path.indexOf("?");-1!==a&&a<t.path.length-1&&(t.query=t.path.substring(a+1),t.path=t.path.substring(0,a))}t.root=null!==(r=t.root)&&void 0!==r?r:z,t.opsType=null!==(o=null!==(i=t.opsType)&&void 0!==i?i:this.options.defaultOperationType)&&void 0!==o?o:oe.Push}return t}},{key:"push",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=r.opsType||oe.Push,this.to(r)):(this[ln]("resolve route fail",r),this)}},{key:"put",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Put,this.to(r)):(this[ln]("resolve route fail",r),this)}},{key:"replace",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Replace,this.to(r)):(this[ln]("resolve route fail",r),this)}},{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Append,this.to(r)):(this[ln]("resolve route fail",r),this)}},{key:"remove",value:function(e){var t=this;return new Promise((function(n){t[dn].post((function(r){try{if(0===t[tn].length)return r.resolve(),void n(!1);var o,i=[];if(e){var a;if(o=e.root?e.root:null!==(a=t[tn][0].root)&&void 0!==a?a:z,e.all)for(var l=t[tn].length-1;l>0;l--){var s=t[tn][l];s.opsType===oe.Append&&s.root===o&&i.splice(0,0,s)}else if(e.until)for(var u=t[tn].length-1;u>0;u--){var c=t[tn][u];if(c.opsType===oe.Append&&c.root===o){if("/"===e.until.charAt(0)&&e.until===c.path)break;if(e.until===c.name)break;i.splice(0,0,c)}}}else{o=z;var f=t[Wt](t[fn]);f&&(o=f.name);for(var v=t[tn].length-1;v>0;v--){var h=t[tn][v];if(h.opsType===oe.Append&&h.root===o){i.push(h);break}}}if(0===i.length){var y="can not find route";return console.warn(y),r.resolve(y),void n(!1)}var p=0;if(t[tn].forEach((function(e){e.opsType!==oe.Put&&p++})),t[jn](i)){var d=0;t[tn].forEach((function(e){e.opsType!==oe.Put&&d++}));var m=p-d;t[Yt]=!0,t.back(m),r.resolve(),n(!0)}}catch(e){t[ln](e),r.resolve(),n(!1)}}))}))}},{key:"open",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Open,this.to(r)):(this[ln]("resolve route fail",r),this)}},{key:"close",value:function(e){var t=this;return this[dn].post((function(n){try{var r=t[Y](e);if(!r)return void n.reject("resolve route fail");for(var o=[],i=0;i<t[tn].length;i++){var a=t[tn][i];if(a.root===r.root){if(r.path&&r.path===a.path){o.push(a);break}if(r.name&&r.name===a.name){o.push(a);break}}}if(0===o.length)return void n.resolve();if(t[jn](o)){var l,s=se.clone(r,!0),u=new Tt(s,t[an]());null===(l=t[vn])||void 0===l||l.replace(u),t[Zt]()}n.resolve()}catch(e){n.resolve(),t[ln](e.message)}})),this}},{key:"to",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=this[Y](n);if(!o)return this[ln]("resolve route fail",o),this;var i=this[Cn].acquire(o);return null==i?(this[ln]("route forbid",o),this):(console.info("to route",o.path,o.opsType,o.root),this[dn].post((function(t){try{var n,r=e[wn](o);e[Sn](r),null!==(n=r.session)&&void 0!==n&&n.routeModel||!e[Pn]||e[On](r),e[An](r),e[xn](r),r.wait((function(n,r){var a=n.session.to;try{var l,s,u=se.clone(a,!0),c=new Tt(u,e[an]());a.opsType===oe.Replace?null===(l=e[vn])||void 0===l||l.replace(c):null===(s=e[vn])||void 0===s||s.push(c)}catch(e){console.error(e.message,e)}if(e[Cn].release(i),e[Zt](a),"function"==typeof o.success)try{Reflect.apply(o.success,{},[])}catch(e){console.error(e.message,e)}t.resolve()}),(function(n,r){e[Cn].release(i),t.resolve(),e[ln](r,o)}))}catch(n){e[Cn].release(i),t.resolve(),e[ln](n,o)}})),this)}},{key:"back",value:function(e){var t;null===(t=this[vn])||void 0===t||t.go(-e)}},{key:bn,value:function(e){var t=this;return function(n,r){if("boolean"==typeof n)n?e.resolve():e.reject(r);else if(n){var o=t[Y](n);if(o){var i=e.session.to;o.success=i.success,o.error=i.error,e.session.to=o,e.session.routeModel=null,e.resolve()}else e.reject("route resolve fail")}else e.resolve()}}},{key:wn,value:function(e){var t,n=this[tn].length>0?this[tn][0]:void 0,r=new le(e,n),o={route:e,find:null};return this[Ut](o),o.find&&(r.routeModel=o.find,e.matched=(t=[],o.find.layers.forEach((function(e){null!=e.models&&null!=e.models&&e.models.forEach((function(e){if(null!=e&&null!=e)if("object"===Lt(e.meta)){var n=_(!0,{},e.meta);t.push(n)}else e.meta&&t.push(e.meta)}))})),t),Array.isArray(e.matched)&&e.matched.length>0&&(e.meta=o.find.layers[0].models[0].meta)),new yt(r)}},{key:Sn,value:function(e){var t,n=this,r=It(this[hn]);try{var o=function(){var r=t.value;e.post((function(e){var t=n[bn](e);Reflect.apply(r,{},[e.session.to,e.session.from,t,e.session])}))};for(r.s();!(t=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}},{key:xn,value:function(e){var t=this;e.post((function(e){var n,r=It(t[yn]);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{Reflect.apply(o,{},[e.session.to,e.session.from,e.session])}catch(e){console.error(e.message,e)}}}catch(e){r.e(e)}finally{r.f()}e.resolve()}))}},{key:kn,value:function(e,t){var n,r=It(this[pn]);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{Reflect.apply(o,{},[e,t])}catch(e){console.error(e.message,e)}}}catch(e){r.e(e)}finally{r.f()}"function"==typeof e.destroy&&Reflect.apply(e.destroy,e,[])}},{key:On,value:function(e){var t=this,n=e.session,r=Reflect.apply(this[Pn],this,[null==n?void 0:n.to]);if(null!=r&&null!=r){Array.isArray(r)||(r=[r]);var o,i=[],a=It(r);try{for(a.s();!(o=a.n()).done;){var l=o.value;this[Rn].has(l)||i.push(l)}}catch(e){a.e(e)}finally{a.f()}0!==i.length&&e.post((function(e){t[gn].ensure(i,(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(r){for(var a=0,l=r;a<l.length;a++){var s=l[a];if(s){var u=void 0;u=E(s)?s.default:s,Array.isArray(u)&&t.addRoutes(u)}}var c,f=It(i);try{for(f.s();!(c=f.n()).done;){var v=c.value;t[Rn].set(v,!0)}}catch(e){f.e(e)}finally{f.f()}e.resolve()}else e.reject()}))}))}}},{key:An,value:function(e){var t=this;e.post((function(e){var n=e.session.to,r=e.session.routeModel;if(null==r){var o={route:n,find:null};if(t[Ut](o))r=o.find,e.session.routeModel=r;else{if(!t[cn])return void e.reject("not find route model");r=t[cn]}}var i=le.from(e.session);t[Vt](n,r,i).then((function(n){t[fn],e.resolve()}),(function(t){e.reject(t)}))}))}},{key:jn,value:function(e){if(0==e.length)return!0;var t,n=this[fn],r=[],o=It(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=this[Bt](n,i);null!=a&&r.push(qt(qt({},a),{},{route:i}))}}catch(e){o.e(e)}finally{o.f()}if(0==r.length)return this[ln]("can not find view index"),!1;var l,s=It(r.reverse());try{for(s.s();!(l=s.n()).done;){var u,c=l.value;this[Jt](n,{x:c.x,y:c.y},[null!==(u=c.route.index)&&void 0!==u?u:0],!0)}}catch(e){s.e(e)}finally{s.f()}return!0}},{key:Bt,value:function(e,t){for(var n,r=null!==(n=t.root)&&void 0!==n?n:z,o=0;o<e.layers.length;o++)for(var i=e.layers[o],a=i.views.length-1;a>=0;a--){var l=i.views[a];if(l[de]&&l[be]===r)return{x:a,y:o}}return null}},{key:Wt,value:function(e){return e.layers.length>0&&e.layers[0].views.length>0?e.layers[0].views[0]:null}},{key:Jt,value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!(t.y>=e.layers.length||t.x>=e.layers[t.y].views.length)){for(var o=e.layers[t.y].views[t.x],i=!1,a=[],l=!1,s=o.slots.value,u=s.length-1;u>=0;u--){var c=s[u];null!=n&&-1==n.indexOf(c.index)||(c.route&&o[de]&&(this[on](c.route),!0===c.active&&c.route.opsType==oe.Append&&(l=!0)),a.push(new xe(o,c.index,t.y)),s.splice(u,1))}if(0==s.length)r?o.slots.value=Nt(s):e.layers[t.y].views.splice(t.x,1);else{if(l){var f=s.length-1,v=s[f];v.active=!0,v.route&&(v.route.active=v.active)}o.slots.value=Nt(s)}0==e.layers[t.y].views.length&&(i=!0);for(var h=t.y+1;h<e.layers.length;h++){for(var y=e.layers[h].views,p=[],d=y.length-1;(i||a.length>0)&&d>=0;d--){var m=y[d];if(m[ge]&&(i||xe.include(a,m[ge]))){for(var g=m.slots.value,b=g.length-1;b>=0;b--){var w=g[b];w.route&&m[de]&&this[on](w.route),p.push(new xe(m,w.index,h)),g.splice(b,1)}e.layers[h].views.splice(d,1)}}a=p,0==e.layers[h].views.length&&(i=!0)}}}},{key:"restore",value:function(e){var t=this;if(e&&0!=this[un].length)return new Promise((function(n,r){for(var o=function(n){var r=e[n];t[dn].post((function(e){var n,o=t[wn](r);t[Sn](o),null!==(n=o.session)&&void 0!==n&&n.routeModel||!t[Pn]||t[On](o),t[An](o),t[xn](o),o.wait((function(t,n){e.resolve()}),(function(n,r){t[ln](r),e.resolve()}))}))},i=0;i<e.length;i++)o(i);t[dn].post((function(e){e.resolve(),n()}))}));var n=this[fn];if(n.layers.length>0){var r=n.layers[0].views;r.length>0&&(r[0].slots.value=[])}return this[tn]=[],this[Zt](),Promise.resolve()}},{key:Vt,value:function(e,t,n){var r,o=this,i=null!==(r=e.updateType)&&void 0!==r?r:ie.Part;return this[Gt](t).then((function(){o[zt](t,e,n,i)}))}},{key:Gt,value:function(e){for(var t=[],n=0;n<e.layers.length;n++)for(var r=e.layers[n],o=0;o<r.models.length;o++){var i=r.models[o];i.isResolved||t.push(i.resolve())}return t.length>0?Promise.all(t):Promise.resolve()}},{key:zt,value:function(e,t,n,r){var o;if(1!==e.layers[0].models.length)return Promise.reject("illegal route structure(multil root node)");var i,a,l,s=e.layers[0].models[0],u=this[fn],c=function(e){return 0==e.layers.length||0==e.layers[0].views.length}(u),f=null!==(o=t.root)&&void 0!==o?o:z;if(c||r!=ie.Part||(i=this[Bt](u,t)),null==i||null==i)if(c||r===ie.All){if(0==u.layers[0].views.length){var v,h=null!==(v=t.root)&&void 0!==v?v:z;a=new Se(h,!0,null),u.layers[0].views=[a]}else a=u.layers[0].views[0];i={x:0,y:0}}else{var y=t.slot;if(!y)return Promise.reject("can not rebuild view(because not route slot)");var p,d=y.level;if(d>u.layers.length)return Promise.reject("can not insert view(override level)");if(y.rootName){var m,g=It(u.layers[d-1].views);try{for(g.s();!(m=g.n()).done;){var b=m.value;if(b[de]&&b.name===y.rootName){var w;p=new xe(b,null!==(w=y.rootIndex)&&void 0!==w?w:0,d-1);break}if(b[me]&&b[me].view.name===y.rootName&&b[me].index===y.rootIndex){p=b[me];break}}}catch(e){g.e(e)}finally{g.f()}}if(!p)return Promise.reject("can not insert view(not find root node ref)");a=new Se(f,!0,p),u.layers[d].views.push(a),i={x:u.layers[d].views.length-1,y:d}}else a=u.layers[i.y].views[i.x];if(l=i.y,a[de]=!0,t.opsType===oe.Append){t.index=K.get();var S=a.slots.value;if(S.length>0){var x=S[S.length-1];x.active=!1,x.route&&(x.route.active=x.active)}var k=new we(t,s,t.index,!0);a.slots.value=[].concat(Nt(S),[k]);var A=l+1,j=new xe(a,t.index,l);this[Xt](u,A,e,1,j)}else if(t.opsType===oe.Open){var O,R=a.slots.value,P=!1,C=It(R);try{for(C.s();!(O=C.n()).done;){var E=O.value;if(null!==E.route&&se.isSameForRouteModel(E.route,t)){if(1==E.active)return t.index=E.index,t.active=E.active,E.route=t,Promise.resolve();E.active=!0,P=!0,t.index=E.index,t.active=E.active,E.route=t,this[on](E.route)}else E.active=!1;E.route&&(E.route.active=E.active)}}catch(e){C.e(e)}finally{C.f()}if(!P){t.index=K.get(),t.active=!0;var T=new we(t,s,t.index,!0);R.push(T);var _=l+1,M=new xe(a,t.index,l);this[Xt](u,_,e,1,M)}a.slots.value=Nt(R)}else{var q=a.slots.value;if(0==q.length){t.index=K.get(),a.slots.value=[new we(t,s,t.index)];var I=l+1,N=new xe(a,t.index,l);this[Xt](u,I,e,1,N)}else{var F=q[0];if(F.model!==s){this[Jt](u,i,null,!0),t.index=K.get(),a.slots.value=[new we(t,s,t.index)];var D=l+1,$=new xe(a,t.index,l);this[Xt](u,D,e,1,$)}else{null!==F.route&&this[on](F.route);for(var L=[],H=1;H<q.length;H++)L.push(q[H].index);L.length>0&&this[Jt](u,i,L,!0),t.index=F.index,F.route=t;for(var U=[new xe(a,t.index,l)],B=l+1,W=1,J=new xe(a,t.index,l);U.length>0&&B<u.layers.length&&W<e.layers.length;B++,W++){for(var V=[],G=0;G<u.layers[B].views.length;G++){var X=u.layers[B].views[G];X[ge]&&xe.include(U,X[ge])&&V.unshift(G)}for(var Y=[],Q=0,Z=V;Q<Z.length;Q++){for(var ee=Z[Q],te=u.layers[B].views[ee],ne=e.layers[W].models,re=void 0,le=0;le<ne.length;le++)if(te.name===ne[le].name){re=ne[le];break}if(re){var ue=te.slots.value;if(0==ue.length){te.slots.value=[new we(null,re,0)];var ce=B+1,fe=W+1;this[Xt](u,ce,e,fe,J)}else{var ve=ue[0];if(ve.model!==re){this[Jt](u,{x:ee,y:B},null,!0),te.slots.value=[new we(null,re,0)];var he=B+1,ye=W+1;this[Xt](u,he,e,ye,J)}else{te[de]&&null!==ve.route&&this[on](ve.route);for(var pe=[],be=1;be<ue.length;be++)pe.push(ue[be].index);pe.length>0&&this[Jt](u,{x:ee,y:B},pe,!0),Y.push(new xe(te,ve.index,B))}}te[de]=!1}else this[Jt](u,{x:ee,y:B},null,!1)}U=Y}this[Xt](u,B,e,W,J)}}}if(a&&a[me]){var ke,Ae=a[me];Ae&&(t.slot=new ae(f,l,null==Ae?void 0:Ae.view.name,null!==(ke=null==Ae?void 0:Ae.index)&&void 0!==ke?ke:0))}n.to=null,n.routeModel=null,t.session=n,this[rn](t)}},{key:Xt,value:function(e,t,n,r,o){for(var i=r,a=t;a<e.layers.length&&i<n.layers.length;a++,i++){var l,s=e.layers[a].views,u=It(n.layers[i].models);try{for(u.s();!(l=u.n()).done;){var c=l.value,f=new Se(c.name,!1,o),v=new we(null,c);f.slots.value=[v],s.push(f)}}catch(e){u.e(e)}finally{u.f()}}for(;i<n.layers.length;i++){var h=new ke;h.views=[];var y,p=It(n.layers[i].models);try{for(p.s();!(y=p.n()).done;){var d=y.value,m=new Se(d.name,!1,o),g=new we(null,d);m.slots.value=[g],h.views.push(m)}}catch(e){p.e(e)}finally{p.f()}e.layers.push(h)}}},{key:X,value:function(e,t,n,r,o,i){if(t<0||t>this[fn].layers.length)return null;if(t<this[fn].layers.length){var a,l=null,s=It(this[fn].layers[t].views);try{for(s.s();!(a=s.n()).done;){var u,c,f=a.value,v=!1;if(null!==n?(v=f.name===e&&(null===(u=f[me])||void 0===u?void 0:u.view)===n)&&-1!==r&&(v=(null===(c=f[me])||void 0===c?void 0:c.index)===r):v=f.name===e,v){null!==o&&(f[ge]={view:o,index:i,level:t-1}),l=f;break}}}catch(e){s.e(e)}finally{s.f()}if(null!==l)return l}var h=null,y=null;null!==o&&(h=o[de]?{view:o,index:i,level:t-1}:o[me],y={view:o,index:i,level:t-1});var p=new Se(e,!0,h);if(p[ge]=y,t==this[fn].layers.length){var d=new ke;d.views=[p],this[fn].layers.push(d)}else this[fn].layers[t].views.push(p);return p}}])&&Dt(t.prototype,n),e}(),Tn="fox-router-view";function _n(e){return(_n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.showClass)&&void 0!==t?t:e.enterClass)||((r=e.transitionName)?"".concat(r,n?"-show":"-enter"):null)}function qn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.showActiveClass)&&void 0!==t?t:e.enterActiveClass)||((r=e.transitionName)?"".concat(r,n?"-show-active":"-enter-active"):null)}function In(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.showToClass)&&void 0!==t?t:e.enterToClass)||((r=e.transitionName)?"".concat(r,n?"-show-to":"-enter-to"):null)}function Nn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.hideClass)&&void 0!==t?t:e.leaveClass)||((r=e.transitionName)?"".concat(r,n?"-hide":"-leave"):null)}function Kn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.hideActiveClass)&&void 0!==t?t:e.leaveActiveClass)||((r=e.transitionName)?"".concat(r,n?"-hide-active":"-leave-active"):null)}function Fn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.hideToClass)&&void 0!==t?t:e.leaveToClass)||((r=e.transitionName)?"".concat(r,n?"-hide-to":"-leave-to"):null)}function Dn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onBeforeShow)&&void 0!==t?t:e.onBeforeEnter}function $n(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onShow)&&void 0!==t?t:e.onEnter}function Ln(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onAfterShow)&&void 0!==t?t:e.onAfterEnter}function Hn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onShowCancelled)&&void 0!==t?t:e.onEnterCancelled}function Un(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onHide)&&void 0!==t?t:e.onLeave}function Bn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onAfterHide)&&void 0!==t?t:e.onAfterLeave}function Wn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onHideCancelled)&&void 0!==t?t:e.onLeaveCancelled}function Jn(e){var t,n,r,o,i,a=e.duration;return"object"==_n(a)?t={enter:null!==(n=a.enter)&&void 0!==n?n:-1,leave:null!==(r=a.leave)&&void 0!==r?r:-1,show:null!==(o=a.show)&&void 0!==o?o:-1,hide:null!==(i=a.hide)&&void 0!==i?i:-1}:("string"==typeof a&&(a=0==a.length?-1:Number(a)),t={enter:a,leave:a,show:a,hide:a}),t}function Vn(e,t){e.classList.contains(t)||e.classList.add(t)}function Gn(e,t){e.classList.remove(t)}var zn=Te&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout;function Xn(e){zn(e)}function Yn(e,t){if(O(t)){null==e&&(e={});for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];Reflect.apply(t,e,r)}}function Qn(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;if(O(i)){if(void 0!==o&&o>=0)return void setTimeout((function(){Reflect.apply(i,e,[t,n,r]),O(l)&&Reflect.apply(l,e,[])}),o);var s=["animationend","transitionend"],u=function o(a){s.forEach((function(e){Ie(t,e,o)})),Reflect.apply(i,e,[t,n,r]),l&&Reflect.apply(l,e,[])};s.forEach((function(e){qe(t,e,u)}))}if(O(a)){var c="animationcancel",f=function o(i){Reflect.apply(a,e,[t,n,r]),Ie(t,c,o)};qe(t,c,f)}}function Zn(e){return null!==e&&(e.opsType===oe.Append||e.opsType===oe.Open)}function er(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:-1;if(t&&(n||Zn(i))){var l=Mn(o,n);l&&Vn(r,l);var s=qn(o,n);s&&Vn(r,s)}else{var u=Dn(o,n);Yn(e,u,[r,i,a])}}function tr(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,s=arguments.length>8?arguments[8]:void 0;if(Zn(a)||n)if(t){var u=Mn(o,n),c=qn(o,n),f=In(o,n);Xn(f?function(){Qn(e,r,a,l,i,(function(){c&&Gn(r,c),f&&Gn(r,f),O(s)&&s(r)})),u&&Gn(r,u),f&&Vn(r,f)}:function(){u&&Gn(r,u),c&&Gn(r,c),O(s)&&s(r)})}else{var v=$n(o,n),h=Ln(o,n),y=Hn(o,n),p=function(t){!t&&O(h)?Yn(e,h,[r,a,l]):O(y)&&Yn(e,y,[r,a,l]),O(s)&&s(r)};O(v)?Yn(e,v,[r,p,a,l]):p()}else O(s)&&s(r)}function nr(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,s=arguments.length>8?arguments[8]:void 0,u=arguments.length>9?arguments[9]:void 0;if(Zn(l)||n||!n&&O(a)&&a(),t){var c=Nn(o,n),f=Kn(o,n),v=Fn(o,n);c&&Vn(r,c),f&&Vn(r,f),Xn(v?function(){Qn(e,r,l,s,i,(function(){f&&Gn(r,f),v&&Gn(r,v),O(u)&&u(r),!n&&O(a)&&a()})),c&&Gn(r,c),v&&Vn(r,v)}:function(){c&&Gn(r,c),f&&Gn(r,f),O(u)&&u(r),!n&&O(a)&&a()})}else{var h=Un(o,n),y=Bn(o,n),p=Wn(o,n),d=function(t){!t&&O(y)?(Yn(e,y,[r,l,s]),O(u)&&u(r),!n&&O(a)&&a()):O(p)&&(Yn(e,p,[r,l,s]),O(u)&&u(r))};O(h)?Yn(e,h,[r,d,l,s]):d()}}function rr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=$(t.css),i=Jn(t),a={create:function(e,a){var l=or(a);er(e,o,!1,l,t,n,r),tr(e,o,!1,l,t,i.enter,n,r)},activate:function(e,a){var l=or(a);er(e,o,!1,l,t,n,r),tr(e,o,!1,l,t,i.enter,n,r)},remove:function(e,a){var l=or(e);nr(e,o,!1,l,t,i.leave,a,n,r)}};return a}function or(e){return e.elm}function ir(e){return(ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ar(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lr(e){return function(e){if(Array.isArray(e))return ur(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||sr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sr(e,t){if(e){if("string"==typeof e)return ur(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ur(e,t):void 0}}function ur(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var cr=Symbol("ruvc"),fr=Symbol("cvs");function vr(e,t,n){return"function"==typeof e?Reflect.apply(e,{},[t,n]):e}function hr(e,t){if(e.componentOptions&&e.componentOptions.Ctor&&e.componentOptions.Ctor.extendOptions){var n=e.componentInstance||e,r=[];if(e.fnOptions&&e.fnOptions[t]){var o=e.fnOptions[t];Array.isArray(o)?r=lr(o):"function"==typeof o&&(r=[o])}if(e.componentOptions.Ctor&&e.componentOptions.Ctor.extendOptions){var i=e.componentOptions.Ctor.extendOptions[t];Array.isArray(i)?r=[].concat(lr(r),lr(i)):"function"==typeof i&&(r=[].concat(lr(r),[i]))}return function(e){r.forEach((function(e){Reflect.apply(e,n,[])}))}}return function(){}}var yr=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ar(this,"node",void 0),ar(this,"state",void 0),this.node=t,this.state=n};const pr={functional:!0,props:{name:{type:String,required:!1,default:"default"},passProps:{type:Object,required:!1},modelSlot:{type:[Object],required:!1},multi:{type:Boolean,default:!1},transition:{type:[Boolean,String],required:!1},css:{type:[Boolean,String],required:!1,default:!0},tag:{type:[String],required:!1,default:"div"},viewTag:{type:[String,Function],required:!1,default:"div"},viewTagProps:{type:[Object,Function],required:!1,default:function(){return{}}},viewTagAttrs:{type:[Object,Function],required:!1,default:function(){return{}}},viewClass:{type:[String,Function],required:!1},viewActiveClass:{type:[String,Function],required:!1},viewDeactiveClass:{type:[String,Function],required:!1},transitionName:{type:String,required:!1},enterClass:{type:String,required:!1},enterActiveClass:{type:String,required:!1},enterToClass:{type:String,required:!1},leaveClass:{type:String,required:!1},leaveActiveClass:{type:String,required:!1},leaveToClass:{type:String,required:!1},showClass:{type:String,required:!1},showActiveClass:{type:String,required:!1},showToClass:{type:String,required:!1},hideClass:{type:String,required:!1},hideActiveClass:{type:String,required:!1},hideToClass:{type:String,required:!1},duration:{type:[Number,Object],required:!1}},render:function(e,t){var n,u=t,c=t.parent.$createElement,f=t.parent.$router,d=t.props,m=d.name,g=d.multi,b=t.data,w=(n=t.parent)[cr]||(n[cr]={}),S=y(t.parent,o,0),x=y(t.parent,i,null),k=y(t.parent,a,-1),A=d.modelSlot;if(A){var j=m;h(t.parent,o,S+1,j),h(t.parent,a,A.index,j),h(t.parent,s,A.index,j);var R=A.route;R&&h(t.parent,r,R,j);var P,C=ar({attrs:{}},v,j);if(A.model.props)if("object"===ir(A.model.props))Object.assign(C.attrs,A.model.props);else if(!0===A.model.props&&"object"===ir(null===(P=A.route)||void 0===P?void 0:P.params)){var E;Object.assign(C.attrs,null===(E=A.route)||void 0===E?void 0:E.params)}return c(A.model.component,C,t.children)}if(null==f)return console.error("router is not been register"),c();var T=y(t.parent,l,null),_=y(t.parent,s,0),M=f[X](m,S,x,k,T,_);if(null===M)return p(t.parent),c();if(h(t.parent,l,M),!0===M[de]&&h(t.parent,i,M),g){var q=function(){var e,n=$(null===(e=d.transition)||void 0===e||e),r=w[fr];r||(r=w[fr]=new Map);for(var o=new Map,i=[],a=M.slots.value,l=[],s=function(e){var t=a[e],s="".concat(d.name,"-").concat(t.index),f=c(Tn,{props:{name:s,modelSlot:t}}),v={},h=vr(d.viewClass,t.route,e);"string"==typeof h&&h.length>0&&(v[h]=!0);var y=vr(d.viewActiveClass,t.route,e),p=vr(d.viewDeactiveClass,t.route,e),m=r.get(s);if("string"==typeof y&&y.length>0&&(v[y]=t.active),"string"==typeof p&&p.length>0&&(v[p]=!t.active),m&&t.active!==m.state){var g=m.node;if(t.active){var b=null;g&&g.children&&g.children.length>0&&(b=hr(g.children[0],"activated")),l.unshift((function(){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=or(t);if(null!=l)if(i){var s=$(n.css),u=Jn(n);er(e,s,!0,l,n,r,o),tr(e,s,!0,l,n,u.show,r,o,(function(e){O(a)&&a("from enter")}))}else O(a)&&a();else O(a)&&a()}(u,g,d,t.route,e,n,b)}))}else{if(g&&g.children&&g.children.length>0){var w=hr(g.children[0],"deactivated");try{D(w)}catch(e){console.error(e)}}l.push((function(){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=or(t);null!=l&&i?nr(e,$(n.css),!0,l,n,Jn(n).hide,null,r,o,(function(e){O(a)&&a("from leave")})):O(a)&&a()}(u,g,d,t.route,e,n)}))}}var S={class:v,key:s},x=vr(d.viewTagProps,t.route,e);null!==x&&"object"===ir(x)&&(S.props=x);var k=vr(d.viewTagAttrs,t.route,e);null!==k&&"object"===ir(k)&&(S.attrs=k),t.route.viewTagAttrs&&"object"===ir(t.route.viewTagAttrs)&&(S.attrs?Object.assign(S.attrs,t.route.viewTagAttrs):S.attrs=t.route.viewTagAttrs);var A=vr(d.viewTag,t.route,e),j=c(A,S,[f]);if(o.set(s,new yr(j,t.active)),n){var R=rr(u,d,t.route,e);j.data.hook=R}i.push(j)},f=0;f<a.length;f++)s(f);var v,h=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=sr(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(r.keys());try{for(h.s();!(v=h.n()).done;){var y=v.value;o.has(y)||p(t.parent,y)}}catch(e){h.e(e)}finally{h.f()}w[fr]=o,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xn((function(){for(var n=function(n){D((function(){Reflect.apply(e[n],t,[])}))},r=0;r<e.length;r++)n(r)}))}(l,u);var m=vr(d.tag,null,-1),g={};for(var S in b)"props"!==S&&(g[S]=b[S]);return{v:c(m,g,i)}}();if("object"===ir(q))return q.v}else{var I,N=$(null!==(I=d.transition)&&void 0!==I&&I);h(t.parent,a,-1),h(t.parent,o,S+1),h(t.parent,s,-1);var K=M.slots.value;if(K.length>0){var F=K[0],L=F.route;L&&h(t.parent,r,L);var H=ar({},v,"");for(var U in b)"props"!==U&&(H[U]=b[U]);null!==H.attrs&&"object"===ir(H.attrs)||(H.attrs={});var B,W=F.model;if(W.props)if("object"===ir(W.props))Object.assign(H.attrs,W.props);else if(!0===W.props&&"object"===ir(null===(B=F.route)||void 0===B?void 0:B.params)){var J;Object.assign(H.attrs,null===(J=F.route)||void 0===J?void 0:J.params)}null!==d.passProps&&"object"===ir(d.passProps)&&Object.assign(H.attrs,d.passProps);var V=c(W.component,H,[]);if(N){var G=rr(u,d,F.route,-1);viewTagNode.data.hook=G}return V}}}};function dr(e){return(dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}const mr={name:"RouterLink",props:{tag:{type:[String],default:"a"},to:{type:[String,Object],required:!0},activeClass:String,exact:Boolean,exactActiveClass:String,event:{type:[String,Array],default:"click"}},render:function(e){var t=this.$router,n=this.$route,r={},o=t.options.linkActiveClass,i=t.options.linkExactActiveClass,a=null==o?"fox-router-link-active":o,l=null==i?"fox-router-link-exact-active":i,s=null==this.activeClass?a:this.activeClass,u=null==this.exactActiveClass?l:this.exactActiveClass;r[u]=function(e,t){return!!e&&("object"===dr(t)?t.path?e.path===t.path:e.name===t.name:"/"===t.charAt(0)?e.path===t:e.name===t)}(n,this.to),r[s]=this.exact?r[u]:function(e,t){return!!e&&("object"===dr(t)?t.path?0===e.path.indexOf(t.path):e.name===t.name:"/"===t.charAt(0)?0===e.path.indexOf(t):e.name===t)}(n,this.to);var c=t[Y](this.to),f=function(e){gr(e)&&t.to(c)},v={click:gr};Array.isArray(this.event)?this.event.forEach((function(e){v[e]=f})):v[this.event]=f;var h={class:r},y="#".concat(c.path);if("a"===this.tag)h.on=v,h.attrs={href:y};else{var p=br(this.$slots.default);if(p){p.isStatic=!1;var d=p.data=extend({},p.data);for(var m in d.on=d.on||{},d.on){var g=d.on[m];m in v&&(d.on[m]=Array.isArray(g)?g:[g])}for(var b in v)b in d.on?d.on[b].push(v[b]):d.on[b]=f;(p.data.attrs=extend({},p.data.attrs)).href=y}else h.on=v}return e(this.tag,h,this.$slots.default)}};function gr(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){var t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function br(e){if(e)for(var t,n=0;n<e.length;n++){if("a"===(t=e[n]).tag)return t;if(t.children&&(t=br(t.children)))return t}}function wr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var xr;!function(e){e[e.limitless=0]="limitless",e[e.once=1]="once"}(xr||(xr={}));var kr=Symbol("registerKey"),Ar=function e(t,n){Sr(this,e),this.callback=t,this.policy=n},jr=function(){function e(){Sr(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,kr,new Map)}var t,n;return t=e,(n=[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this[kr].get(e);r||(r=new Array,this[kr].set(e,r));var o=!0===n?xr.once:xr.limitless,i=new Ar(t,o);return r.push(i),this}},{key:"off",value:function(e,t){if(!t)return this[kr].delete(e),this;var n=this[kr].get(e);if(n)for(var r=0;r<n.length;r++)if(n[r].callback===t){n.splice(r,1);break}return this}},{key:"bind",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.on(e,t,n)}},{key:"unbind",value:function(e,t){return this.off(e,t)}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"all",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n.length;if(o<1)return this;var i=n[o-1];if("function"!=typeof i)return console.error("callback can not benn empty"),this;for(var a=o-1,l=new Array(a),s=[].splice.call(n,0,a),u=function(t){e.once(s[t],(function(e){l[t]=e,0==(a-=1)&&Reflect.apply(i,{},l)}))},c=0;c<s.length;c++)u(c);return this}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=this[kr].get(e);if(!o)return this;for(var i=function(e){var t=o[e];if(t.policy==xr.once?o.splice(e,1):e++,"function"==typeof t.callback)try{D((function(){Reflect.apply(t.callback,{},n)}))}catch(e){console.error(e.message,e)}a=e},a=0;a<o.length;)i(a);return this}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Reflect.apply(this.emit,this,[e].concat(n))}}])&&wr(t.prototype,n),e}();function Or(e){return(Or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rr(e,t){return(Rr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pr(e,t){if(t&&("object"===Or(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Cr(e){return(Cr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Er(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tr(e,t,n){return t&&Er(e.prototype,t),n&&Er(e,n),e}function _r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qr=Symbol("idKey"),Ir=Symbol("valueKey"),Nr=Symbol("childrenKey"),Kr=Symbol("growKey"),Fr=function e(t){_r(this,e),Mr(this,Kr,!0),Mr(this,Ir,c()),Mr(this,Nr,new Map),this[qr]=t},Dr=function(){function e(){_r(this,e)}return Tr(e,[{key:"get",value:function(e,t){if("value"==t)return e[Ir].value;if("grow"===t)return e[Kr];var n=e[Nr].get(t);return n?Hr(n):e[Kr]?((n=Lr(t))[Kr]=e[Kr],e[Nr].set(t,n),Hr(n)):void 0}},{key:"set",value:function(e,t,n){return"value"==t?(e[Ir].value=n,!0):"grow"===t?(e[Kr]=$(n),!0):null==n?(e[Nr].delete(t),!0):(console.error("illegal property:".concat(t)),!1)}},{key:"deleteProperty",value:function(e,t){return"value"===t||"grow"==t?(console.error("can not delete property:".concat(String(t))),!1):(e[Nr].delete(t),!0)}}]),e}(),$r="__proxy__";function Lr(e){var t=new Fr(e);return Reflect.set(t,$r,new Proxy(t,new Dr)),t}function Hr(e){return Reflect.get(e,$r)}var Ur=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rr(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Cr(t);if(n){var o=Cr(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Pr(this,e)});function o(){return _r(this,o),r.call(this,"__root__")}return Tr(o,[{key:"put",value:function(){var e=arguments.length;if(e<2)return console.error("参数至少包括一个(key, value)"),!1;for(var t=this,n=0;n<e-1;n++){var r=n<0||arguments.length<=n?void 0:arguments[n],o=void 0;t[Nr].has(r)?o=t[Nr].get(r):(o=Lr(r),t[Nr].set(r,o)),t=o}return t[Ir].value=e-1<0||arguments.length<=e-1?void 0:arguments[e-1],!0}},{key:"get",value:function(){var e=arguments.length;if(0!==e){for(var t=this,n=0;n<e;n++){var r=n<0||arguments.length<=n?void 0:arguments[n];if(!t[Nr].has(r))return;t=t[Nr].get(r)}return t[Ir].value}}},{key:"remove",value:function(){var e=arguments.length;if(0==e)return!1;for(var t=this,n=0;n<e-1;n++){var r=n<0||arguments.length<=n?void 0:arguments[n];if(!t[Nr].has(r))return!1;t=t[Nr].get(r)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return!!t[Nr].has(o)&&(t[Nr].delete(o),!0)}},{key:"contains",value:function(){var e=arguments.length;if(0==e)return!1;for(var t=this,n=0;n<e-1;n++){var r=n<0||arguments.length<=n?void 0:arguments[n];if(!t[Nr].has(r))return!1;t=t[Nr].get(r)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return t[Nr].has(o)}},{key:"clear",value:function(){this[Nr].clear()}}]),o}(Fr),Br=(Symbol("treeKey"),["put","get","contains","remove","clear"]);function Wr(e){return Br.includes(e)}var Jr=function(){function e(){_r(this,e)}return Tr(e,[{key:"get",value:function(e,t){if("value"==t)return e[Ir].value;if("grow"===t)return e[Kr];if(t===Nr)return e[Nr];if("string"==typeof t&&Wr(t))return e[t];var n=String(t),r=e[Nr].get(n);return r?Hr(r):e[Kr]?((r=Lr(n))[Kr]=e[Kr],e[Nr].set(n,r),Hr(r)):void 0}},{key:"set",value:function(e,t,n){return"value"==t?(e[Ir].value=n,!0):"grow"===t?(e[Kr]=$(n),!0):!Wr(t)&&(null==n?(e[Nr].delete(t),!0):(console.error("illegal property:".concat(t)),!1))}},{key:"deleteProperty",value:function(e,t){return"value"===t||"grow"==t?(console.error("can not delete property:".concat(String(t))),!1):(e[Nr].delete(t),!0)}}]),e}(),Vr=new Proxy(Ur,{construct:function(e){return Hr((t=new Ur,n=new Jr,r=new Proxy(t,n),o={put:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.put,t,n)},get:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.get,t,n)},remove:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.remove,t,n)},contains:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.contains,t,n)},clear:function(){return Reflect.apply(t.clear,t,[])}},Object.assign(o,r),Reflect.set(t,$r,r),t));var t,n,r,o}}),Gr={get each(){return V},get type(){return H},get isFunction(){return O},get isArray(){return j},get isArrayLike(){return B},get makeArray(){return J},get merge(){return W},get isWindow(){return U},get isPlainObject(){return P},get isEqual(){return G},get isESModule(){return E}};function zr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zr(Object(n),!0).forEach((function(t){Yr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Symbol("fk");var Qr=new En({}),Zr=new Vr,eo=new jr,to=!1;const no=Xr(Xr({},Gr),{},{get router(){return Qr},get bus(){return Zr},get Bus(){return Vr},get eventproxy(){return eo},get EventProxy(){return jr},get EventChain(){return yt},get require(){return Qr.require},get ajax(){return Ue},get extend(){return _},get clone(){return M},install:function(e){to||(to=!0,function(e){n=e}(e),e.component(Tn,pr),e.component("fox-router-link",mr),Object.defineProperty(e.prototype,"$fox",{get:function(){return this._routerRoot._fox}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Reflect.defineProperty(e.prototype,"$route",{get:function(){return y(this,r,null)}}),Reflect.defineProperty(e.prototype,"$bus",{get:function(){return this._routerRoot._fox.bus}}),e.prototype.$fox_on=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];eo.on(e,t,n)},e.prototype.$fox_off=function(e,t){eo.off(e,t)},e.prototype.$fox_once=function(e,t){eo.once(e,t)},e.prototype.$fox_all=function(){for(var e=eo,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Reflect.apply(e.all,e,n)},e.prototype.$fox_trigger=function(e){for(var t=eo,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];Reflect.apply(t.trigger,t,[e].concat(r))},e.prototype.$fox_emit=function(e){for(var t=eo,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];Reflect.apply(t.trigger,t,[e].concat(r))},e.mixin({beforeCreate:function(){this.$options.fox?(this._routerRoot=this,this._fox=this.$options.fox,this._router=this._fox.router,this._router.init()):this._routerRoot=this.$parent&&this.$parent._routerRoot||this},mounted:function(){},destroyed:function(){}}))}});return t})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.fox=t():e.fox=t()}(self,(()=>(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>po}),Symbol("rk");var n,r=Symbol("crk"),o=Symbol("vd"),i=Symbol("rv"),a=Symbol("rvi"),l=Symbol("pv"),s=Symbol("pvi"),u=Symbol("valueKey");function c(e){if(n){var t={};return n.util.defineReactive(t,"value",e),t}var r={};return Reflect.defineProperty(r,"value",{get:function(){return r[u]},set:function(e){return r[u]=e}}),r}var f=Symbol("pvds"),h=Symbol("sk");function v(e,t,n,r){var o=e[f];if(o||(o=e[f]=new Map),r){var i=o.get(r);i||(i=new Map,o.set(r,i)),i.set(t,n)}else o.set(t,n)}function y(e,t,n){for(var r=e.$vnode?e.$vnode.data:{},o=r[h],i=e.$parent;i&&i._routerRoot!==i;){var a=i[f];if(a){if(o){var l=a.get(o);if(l&&l.has(t))return l.get(t)}if(a.has(t))return a.get(t)}var s=(r=i.$vnode?i.$vnode.data:{})[h];void 0!==s&&(o=s),i=i.$parent}return n}function p(e,t){if(t){var n=e[f];n&&n&&n.has(t)&&n.delete(t)}else Reflect.deleteProperty(e,f)}function d(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[l=n+1])throw new TypeError('Pattern cannot start with "?" at '+l);for(;l<e.length;)if("\\"!==e[l]){if(")"===e[l]){if(0==--o){l++;break}}else if("("===e[l]&&(o++,"?"!==e[l+1]))throw new TypeError("Capturing groups are not allowed at "+l);i+=e[l++]}else i+=e[l++]+e[l++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=l}else{for(var a="",l=n+1;l<e.length;){var s=e.charCodeAt(l);if(!(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=e[l++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=l}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,i="[^"+g(t.delimiter||"/#?")+"]+?",a=[],l=0,s=0,u="",c=function(e){if(s<n.length&&n[s].type===e)return n[s++].value},f=function(e){var t=c(e);if(void 0!==t)return t;var r=n[s],o=r.type,i=r.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},h=function(){for(var e,t="";e=c("CHAR")||c("ESCAPED_CHAR");)t+=e;return t};s<n.length;){var v=c("CHAR"),y=c("NAME"),p=c("PATTERN");if(y||p){var d=v||"";-1===o.indexOf(d)&&(u+=d,d=""),u&&(a.push(u),u=""),a.push({name:y||l++,prefix:d,suffix:"",pattern:p||i,modifier:c("MODIFIER")||""})}else{var m=v||c("ESCAPED_CHAR");if(m)u+=m;else if(u&&(a.push(u),u=""),c("OPEN")){d=h();var b=c("NAME")||"",w=c("PATTERN")||"",S=h();f("CLOSE"),a.push({name:b||(w?l++:""),pattern:b&&!w?i:w,prefix:d,suffix:S,modifier:c("MODIFIER")||""})}else f("END")}}return a}function m(e,t){var n=[];return function(e,t,n){void 0===n&&(n={});var r=n.decode,o=void 0===r?function(e){return e}:r;return function(n){var r=e.exec(n);if(!r)return!1;for(var i=r[0],a=r.index,l=Object.create(null),s=function(e){if(void 0===r[e])return"continue";var n=t[e-1];"*"===n.modifier||"+"===n.modifier?l[n.name]=r[e].split(n.prefix+n.suffix).map((function(e){return o(e,n)})):l[n.name]=o(r[e],n)},u=1;u<r.length;u++)s(u);return{path:i,index:a,params:l}}}(w(e,n,t),n,t)}function g(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function b(e){return e&&e.sensitive?"":"i"}function w(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return w(e,t,n).source}));return new RegExp("(?:"+r.join("|")+")",b(n))}(e,t,n):function(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,i=n.start,a=void 0===i||i,l=n.end,s=void 0===l||l,u=n.encode,c=void 0===u?function(e){return e}:u,f="["+g(n.endsWith||"")+"]|$",h="["+g(n.delimiter||"/#?")+"]",v=a?"^":"",y=0,p=e;y<p.length;y++){var d=p[y];if("string"==typeof d)v+=g(c(d));else{var m=g(c(d.prefix)),w=g(c(d.suffix));if(d.pattern)if(t&&t.push(d),m||w)if("+"===d.modifier||"*"===d.modifier){var S="*"===d.modifier?"?":"";v+="(?:"+m+"((?:"+d.pattern+")(?:"+w+m+"(?:"+d.pattern+"))*)"+w+")"+S}else v+="(?:"+m+"("+d.pattern+")"+w+")"+d.modifier;else v+="("+d.pattern+")"+d.modifier;else v+="(?:"+m+w+")"+d.modifier}}if(s)o||(v+=h+"?"),v+=n.endsWith?"(?="+f+")":"$";else{var x=e[e.length-1],k="string"==typeof x?h.indexOf(x[x.length-1])>-1:void 0===x;o||(v+="(?:"+h+"(?="+f+"))?"),k||(v+="(?="+h+"|"+f+")")}return new RegExp(v,b(n))}(d(e,n),t,n)}(e,t,n)}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var j=Array.isArray,O=function(e){return"function"==typeof e},R=Object.prototype.toString,P=function(e){return"[object Object]"===function(e){return R.call(e)}(e)},E="function"==typeof Symbol&&"symbol"===A(Symbol.toStringTag);function C(e){return e.__esModule||E&&"Module"===e[Symbol.toStringTag]}var T="undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]");function _(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=void 0!==t[0]&&null!==t[0]?t[0]:{},i=1,a=t.length,l=!1;for("boolean"==typeof o&&(l=o,o=null!==(r=t[i])&&void 0!==r?r:{},i++),"object"!==A(o)&&(o={});i<a;i++)if(null!==t[i]&&void 0!==t[i]){var s=t[i];for(var u in s){var c=o[u],f=s[u];if(c!==f)if(!0===l&&f&&"object"===A(f)){var h=void 0;h=Array.isArray(f)?c&&Array.isArray(c)?c:[]:c&&"object"===A(c)?c:{},o[u]=_(l,h,f)}else void 0!==f&&(o[u]=f)}}return o}function q(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n){if("object"!==A(t))return{};for(var r in"object"!==A(e)&&(e={}),t){var o=e[r],i=t[r];if(o!==i)if("object"===A(i)){if(!Array.isArray(i)&&!P(i))continue;o=q(o,i,n),e[r]=o}else{if("function"==typeof i)continue;e[r]=i}}var a,l=Object.getOwnPropertySymbols(t),s=x(l);try{for(s.s();!(a=s.n()).done;){var u=a.value,c=e[u],f=t[u];if(c!==f)if("object"===A(f)){if(!Array.isArray(f)&&!P(f))continue;c=q(c,f,n),e[u]=c}else{if("function"==typeof f)continue;e[u]=f}}}catch(e){s.e(e)}finally{s.f()}}else _(!0,e,t);return e}var M,I,N,K=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"get",value:function(){var t=++e.seed;return t>=Number.MAX_VALUE&&(e.seed=0),t}}],null&&S(t.prototype,null),n&&S(t,n),e}();M=K,I="seed",N=(new Date).getTime(),I in M?Object.defineProperty(M,I,{value:N,enumerable:!0,configurable:!0,writable:!0}):M.seed=N;var F=T?Promise.resolve():null;function D(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];null!==F?n&&n.length>0?F.then((function(){e(n)})):F.then(e):n&&n.length>0?setTimeout((function(){e(n)})):setTimeout(e)}function $(e){return null!=e&&("boolean"==typeof e?e:"string"==typeof e?"true"===e.toLocaleLowerCase():Boolean(e))}var L={"[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 U(e){var t=Object.prototype.toString.call(e);return null==e?String(e):L[t]||"object"}function H(e){return e&&"object"===A(e)&&"setInterval"in e}function B(e){var t=!!e&&"length"in e&&e.length,n=U(e);return"function"!==n&&!H(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function W(e,t){for(var n=+t.length,r=0,o=e.length;r<n;r++)e[o++]=t[r];return e.length=o,e}function J(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t;return null!=e&&(B(Object(e))?W(n,"string"==typeof e?[e]:e):n.push(e)),n}function z(e,t,n){if(B(e))Reflect.apply([].forEach,e,[t]);else for(var r in e)if(n&&e.hasOwnProperty(r)){if(!1===Reflect.apply(t,e,[e[r]]))break}else if(!1===Reflect.apply(t,e,[e[r]]))break;return e}function V(e,t){if(e==t)return!0;if(void 0===e||void 0===t)return!1;var n=U(e);if(n!==U(t))return!1;if("object"===n){var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(var i=0;i<r.length;i++){var a=r[i];if(!V(e[a],t[a]))return!1}return!0}if("array"===n){if(e.length!==t.length)return!1;for(var l=0;l<e.length;l++)if(!V(e[l],t[l]))return!1;return!0}return!1}var G="default",X=Symbol("sync"),Y=Symbol("resolveRoute");function Q(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Reflect.apply(e,{},r)}}}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function te(e,t,n){return t&&ee(e.prototype,t),n&&ee(e,n),e}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oe,ie,ae=function e(t,n,r,o){ne(this,e),re(this,"rootIndex",0),this.name=t,this.level=n,this.rootName=r,this.rootIndex=o},le=function(){function e(t,n){ne(this,e),re(this,"data",{}),this.to=t,this.from=n}return te(e,null,[{key:"from",value:function(t){var n,r=new e(t.to,t.from),o=null!==(n=t.data)&&void 0!==n?n:{};return _(!0,r.data,o),r}}]),e}(),se=function(){function e(){ne(this,e)}return te(e,[{key:"fullPath",get:function(){var e,t,n=null!==(e=this.path)&&void 0!==e?e:"/".concat(this.name);return"".concat(null!==(t=this.root)&&void 0!==t?t:G,"!").concat(n)}}],[{key:"clone",value:function(t,n){var r=new e;return q(r,t,n),r}},{key:"isSame",value:function(e,t){return!(e!==t&&(null==e||null==t||e.path&&e.path!==t.path||e.name&&e.name!==t.name||e.root!==t.root||e.index!==t.index))}},{key:"isSameForRouteModel",value:function(e,t){return!(e!==t&&(null==e||null==t||e.path&&e.path!=t.path||e.name&&e.name!=t.name))}},{key:"from",value:function(t){var n=new e;if(null==t)return n;var r=n;for(var o in t){var i=t[o];r[o]=i}var a=Object.getOwnPropertySymbols(t);if(Array.isArray(a)&&a.length>0){var l,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(a);try{for(s.s();!(l=s.n()).done;){var u=l.value;r[u]=t[u]}}catch(e){s.e(e)}finally{s.f()}}return n}}]),e}(),ue=function(){function e(t,n,r,o){ne(this,e),this.id=K.get(),this.name=t,this.src=n,"function"!=typeof n&&(this.component=n),this.props=r,this.meta=o}return te(e,[{key:"isResolved",get:function(){return void 0!==this.component}},{key:"resolve",value:function(){return t=(e=this).src,new Promise((function(n,r){var o,i=Q((function(t){C(t)&&(t=t.default),e.component=t,n()})),a=Q((function(e){var t="failed to resolve async component ".concat(e);r(t)}));try{o=t(i,a)}catch(e){a(e)}if(o)if("function"==typeof o.then)o.then(i,a);else{var l=o.component;l&&"function"==typeof l.then&&l.then(i,a)}}));var e,t}}]),e}(),ce=function e(){ne(this,e),re(this,"models",[])},fe=function e(){ne(this,e),re(this,"layers",[])};function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ve(e,t,n){return t&&he(e.prototype,t),n&&he(e,n),e}function ye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){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"}(oe||(oe={})),function(e){e[e.Part=0]="Part",e[e.All=1]="All"}(ie||(ie={}));var de=Symbol("rootKey"),me=Symbol("rootNodeKey"),ge=Symbol("parentNodeKey"),be=Symbol("nameKey"),we=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];ye(this,e),pe(this,"active",!0),pe(this,"index",0),this.route=t,this.model=n,this.index=r,this.active=o},Se=function(){function e(t,n,r){ye(this,e),pe(this,me,null),pe(this,ge,null),this[be]=t,this[de]=n,r&&(this[me]=r)}return ve(e,[{key:"slots",get:function(){return null==this._slots&&(this._slots=function(e){if(n){var t={};return n.util.defineReactive(t,"value",[],void 0,!0),t}var r={};return Reflect.defineProperty(r,"value",{get:function(){return r[u]},set:function(e){return r[u]=e}}),r}()),this._slots}},{key:"empty",get:function(){return null==this._slots||0==this._slots.value.length}},{key:"name",get:function(){return this[be]}}]),e}(),xe=function(){function e(t,n,r){ye(this,e),this.view=t,this.index=n,this.level=r}return ve(e,null,[{key:"include",value:function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.view===t.view&&(-1==t.index||r.index===t.index)&&r.level===t.level)return!0}return!1}}]),e}(),ke=function e(){ye(this,e),pe(this,"views",[])},Ae=function e(){ye(this,e),pe(this,"layers",[])};function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Pe=function e(){Re(this,e)},Ee=function(){function e(){Re(this,e),Oe(this,"forbidTime",300),Oe(this,"submitRecorder",new Pe)}var t,n;return t=e,(n=[{key:"isSameRoute",value:function(e,t){return null!=e&&null!=t&&e.name===t.name&&e.path===t.path&&e.root===t.root}},{key:"acquire",value:function(e){var t=(new Date).getTime();if(!(this.isSameRoute(e,this.submitRecorder.route)&&this.submitRecorder.time&&t-this.submitRecorder.time<=this.forbidTime))return this.submitRecorder.route=e,this.submitRecorder.time=t,t;this.submitRecorder.time=t}},{key:"release",value:function(e){this.submitRecorder.time===e&&(this.submitRecorder.route=void 0)}}])&&je(t.prototype,n),e}(),Ce=function(){return window};function Te(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on".concat(t),n):e["on".concat(t)]=n}function _e(e,t,n){e.removeEventListener?e.removeEventListener(t,n):e.detachEvent?e.detachEvent("on".concat(t),n):e["on".concat(t)]=null}var qe,Me,Ie,Ne,Ke=(Ie=Ce().location,Ne="".concat(Ie.protocol,"//").concat(Ie.host),Ne+=((Me=(qe=Ie.pathname).lastIndexOf("/"))>0&&Me<qe.length-1?qe=qe.substring(0,Me+1):0===Me&&-1!==qe.indexOf(".")?qe="/":-1===Me&&(qe=-1==qe.indexOf(".")?"/".concat(qe,"/"):"/"),0!==qe.indexOf("/")&&(qe="/".concat(qe)),qe));function Fe(e){return(Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var De={type:"GET",async:!0,contentType:"application/x-www-form-urlencoded",dataType:"string",cache:!1,timeout:3e4,processData:!0};function $e(e){var t=new XMLHttpRequest,n={};if(_(!0,n,De),_(!0,n,e),(e=n).async)try{t.responseType=e.dataType,t.timeout=e.timeout,t.ontimeout=function(){"function"==typeof e.ontimeout?e.ontimeout(t,t.status):"function"==typeof e.error&&e.error(t,t.status)}}catch(e){console.error(e.message,e)}t.onabort=function(){"function"==typeof e.onabort?e.onabort(t,t.status):"function"==typeof e.error&&e.error(t,t.status)},t.onerror=function(){"function"==typeof e.error&&e.error(t,t.status)},t.onloadend=function(){"function"==typeof e.complete&&e.complete(t,t.status)},t.onprogress=function(){"function"==typeof e.loading&&e.loading(t)},t.onload=function(){if(0==t.status||t.status>=200&&t.status<300||304==t.status){var n,r=null!==(n=t.response)&&void 0!==n?n:"";if(0==r.length&&0==t.status)return;try{o=r,"json"===e.dataType&&"string"==typeof o&&(o=JSON.parse(o)),r=o}catch(e){console.error(e.message,e)}"function"==typeof e.success&&e.success(r,t.status,t)}else"function"==typeof e.error&&e.error(t,t.status);var o};try{var r=e.url;if(e.type&&"GET"===e.type.toUpperCase()&&(r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text";if(null==t)return e;var r="";if(0===(n=n.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded")||0===n.indexOf("application/json"))if("object"===Fe(t))for(var o in t){var i=t[o];if(Array.isArray(i))for(var a=0;a<i.length;a++){var l="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i[a]));r.length>0&&(r+="&"),r+=l}else{var s="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i));r.length>0&&(r+="&"),r+=s}}else r=t;else r=t;return r.length>0&&(e=-1===e.indexOf("?")?"".concat(e,"?").concat(r):"".concat(e,"&").concat(r)),e}(e.url,e.data,e.contentType)),t.open(e.type,r,e.async),e.contentType&&t.setRequestHeader("Content-Type",e.contentType),"function"==typeof e.beforeSend){var o={};_(!0,o,e),Reflect.apply(e.beforeSend,e,[t,o])}if(e.cache||t.setRequestHeader("Cache-Control","no-cache"),e.type&&"POST"===e.type.toUpperCase()){var i=e.processData?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text",n="";if(0===(t=t.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded"))if("object"===Fe(e))for(var r in e){var o=e[r];if(Array.isArray(o))for(var i=0;i<o.length;i++){var a="".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(o[i]));n.length>0&&(n+="&"),n+=a}else{var l="".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(o));n.length>0&&(n+="&"),n+=l}}else n=e;else n=0===t.indexOf("text")?"object"===Fe(e)?JSON.stringify(e):e:0===t.indexOf("application/json")&&"object"===Fe(e)?JSON.stringify(e):e;return n}(e.data,e.contentType):e.data;t.send(i)}else t.send()}catch(n){"function"==typeof e.error&&e.error(t,n.message),"function"==typeof e.complete&&e.complete(t,n.message)}return t}function Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ue,He=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"cache",new Map)}var t,n;return t=e,(n=[{key:"get",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return new Promise((function(r,o){if(t.cache.has(e)){var i=t.cache.get(e);r(i)}else $e({url:e,type:"GET",cache:!1,data:{},timeout:n,async:!0,success:function(n,o,i){t.cache.set(e,n),r(n)},error:function(e,t){o(t)}})}))}},{key:"remove",value:function(e){this.cache.delete(e)}}])&&Le(t.prototype,n),e}());function Be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function We(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(e){e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Defining=2]="Defining",e[e.Defined=3]="Defined"}(Ue||(Ue={}));var Je,ze=function e(){We(this,e)},Ve=function(){function e(){We(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"register",new Map)}var t,n;return t=e,(n=[{key:"get",value:function(e){return this.register.get(e)}},{key:"put",value:function(e,t){this.register.set(e,t)}},{key:"remove",value:function(e){var t=this.register.get(e);return this.register.delete(e),t}},{key:"contains",value:function(e){return this.register.has(e)}},{key:"clear",value:function(){this.register.clear()}}])&&Be(t.prototype,n),e}();function Ge(e){return(Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xe(e){return function(e){if(Array.isArray(e))return Ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ye(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ye(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Busy="Busy",e.Free="Free",e.Reject="Reject",e.Exception="Exception",e.Finished="Finished"}(Je||(Je={}));var tt=Symbol("chainKey"),nt=Symbol("cursorKey"),rt=Symbol("$persistentModeKey"),ot=Symbol("statusKey"),it=Symbol("argsKey"),at=Symbol("exArgsKey"),lt=Symbol("successFnsKey"),st=Symbol("errorFnsKey"),ut=Symbol("sessionKey"),ct=Symbol("_go"),ft=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Qe(this,e),et(this,tt,[]),et(this,nt,0),et(this,rt,!1),et(this,ot,Je.Free),et(this,it,[]),et(this,at,[]),et(this,lt,[]),et(this,st,[]),this[ut]=t,this[rt]=n}var t,n;return t=e,(n=[{key:"session",get:function(){return this[ut]}},{key:ct,value:function(e){var t=this,n=this[ot];this[ot]=Je.Busy,this[nt]+=e,this[nt]<0&&(this[nt]=0);for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];if(this[it]=o,n===Je.Exception||n===Je.Reject){var a=function(){for(var e=[{session:t[ut]}].concat(Xe(t[at]));t[st].length>0;)try{!function(){var n=t[st].shift();"function"==typeof n&&D((function(){Reflect.apply(n,{},e)}))}()}catch(e){console.error(e.message,e)}return t[ot]=n,t[tt]=[],t[nt]=0,{v:t}}();if("object"===Ge(a))return a.v}else if(n===Je.Finished||this[nt]>=this[tt].length){var l=function(){for(var e=[{session:t[ut]}].concat(Xe(t[it])),n=function(){var n=t[lt].shift();"function"==typeof n&&D((function(){Reflect.apply(n,{},e)}))};t[lt].length>0;)n();return t[ot]=Je.Free,{v:t}}();if("object"===Ge(l))return l.v}if(this[nt]>=this[tt].length)return this[ot]=Je.Free,this;var s=this[tt][this[nt]];this[rt]||(this[tt].splice(0,this[nt]+1),this[nt]=-1);var u=this[nt]+1;try{var c=!1,f={go:function(e){if(!c){c=!0;for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];Reflect.apply(t[ct],t,[e].concat(r))}},resolve:function(){if(!c){c=!0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];Reflect.apply(t[ct],t,[1].concat(n))}},reject:function(){if(!c){c=!0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];Reflect.apply(t.reject,t,[].concat(n))}},insert:function(e){c||(t[tt].splice(u,0,e),u++)},session:this[ut]};D((function(){Reflect.apply(s,{},[f].concat(Xe(t[it])))}))}catch(e){this.throw(e)}return this}},{key:"go",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Reflect.apply(this[ct],this,[e].concat(n))}},{key:"finish",value:function(){this[ot]=Je.Finished;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[it]=t,Reflect.apply(this[ct],this,[0])}},{key:"reject",value:function(){this[ot]=Je.Reject;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[at]=t,Reflect.apply(this[ct],this,[0])}},{key:"throw",value:function(){this[ot]=Je.Exception;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[at]=t,Reflect.apply(this[ct],this,[0])}},{key:"reset",value:function(){var e=this;this[ot]=Je.Busy;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this[it]=n,this[tt]=[],this[nt]=0;for(var o={session:this[ut]},i=[o].concat(Xe(this[it])),a=function(){var t=e[lt].shift();D((function(){Reflect.apply(t,e,i)}))};this[lt].length>0;)a();return this[ot]=Je.Free,this}},{key:"post",value:function(e){return this[ot]===Je.Reject||this[ot]===Je.Exception||(Array.isArray(e)?this[tt]=[].concat(Xe(this[tt]),Xe(e)):this[tt].push(e),this[ot]===Je.Busy||Reflect.apply(this[ct],this,[0].concat(Xe(this[it])))),this}},{key:"wait",value:function(e,t){return e&&"function"==typeof e&&this[lt].push(e),t&&"function"==typeof t&&this[st].push(t),this[ot]===Je.Busy||Reflect.apply(this[ct],this,[0].concat(Xe(this[it]))),this}},{key:"exception",value:function(e){return e&&"function"==typeof e&&this[st].push(e),this[ot]===Je.Busy?this:Reflect.apply(this[ct],this,[0].concat(Xe(this[it])))}},{key:"isFinish",value:function(){return this[ot]==Je.Reject||this[ot]==Je.Free&&this[nt]>=this[tt].length}}])&&Ze(t.prototype,n),e}();function ht(e){return(ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pt(e,t,n){return t&&yt(e.prototype,t),n&&yt(e,n),e}function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};vt(this,e),dt(this,"moduleManager",new Ve),this.head=this.dom.head||this.dom.getElementsByTagName("head")[0]||this.dom.documentElement,this.isOldWebKit=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/(\d+).*/,"$1")<536,this.options=t,this.options.paths||(this.options.paths={}),this.options.alias||(this.options.alias={})}return pt(e,[{key:"query",get:function(){return this._query},set:function(e){this._query=e}},{key:"dom",get:function(){return window.document}},{key:"ensure",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=[],i=t.length-1,a={};"object"===ht(t[i])&&(Object.assign(a,t[i]),i--),"function"==typeof t[i]&&(r=t[i],i--);for(var l=0;l<=i;l++)if(Array.isArray(t[l]))for(var s=t[l],u=0;u<s.length;u++)void 0!==s[u]&&o.push(this.resolvePath(s[u]));else for(var c=t[l].split(","),f=0;f<c.length;f++)void 0!==c[f]&&o.push(this.resolvePath(c[f]));for(var h=new bt(o.length,(function(e,t){if(h.isOK())try{"function"==typeof r&&Reflect.apply(r,{},t)}catch(e){console.error(e.message,e)}else try{console.error(e),"function"==typeof r&&Reflect.apply(r,{},[])}catch(e){console.error(e.message,e)}})),v=new ft,y=0;y<o.length;y++){var p=new wt(y,o[y],a,h);this.mount(v,p)}return this}},{key:"remove",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=[],i=n.length-1,a={};"object"===ht(n[i])&&(Object.assign(a,n[i]),i--);var l=null;"function"==typeof n[i]&&(l=n[i],i--);for(var s=0;s<=i;s++)if(Array.isArray(n[s]))for(var u=n[s],c=0;c<u.length;c++)void 0!==u[c]&&o.push(this.resolvePath(u[c]));else for(var f=n[s].split(","),h=0;h<f.length;h++)void 0!==f[h]&&o.push(this.resolvePath(f[h]));return o.forEach((function(t){e.unmount(t,a)})),"function"==typeof l&&Reflect.apply(l,{},[]),this}},{key:"mount",value:function(e,t){if(this.isNaturePath(t.src,"js")){var n=t.params.jsPoint;return null==n&&(n=this.head),void this.mountJS(e,t,n)}if(this.isNaturePath(t.src,"css")){var r=t.params.cssPoint;return null==r&&(r=this.head),void this.mountCSS(e,t,r)}if(this.isNaturePath(t.src,"html")){var o=t.params.htmlPoint;return null==o&&(o=this.dom.body),void this.mountHTML(e,t,o)}var i=this.getFileNamePostfix(t.src);if("js"===i||0===i.length){var a=t.params.jsPoint;return null==a&&(a=this.head),void this.mountJS(e,t,a)}if("css"===i){var l=t.params.cssPoint;return null==l&&(l=this.head),void this.mountCSS(e,t,l)}var s=t.params.htmlPoint;return null==s&&(s=this.dom.body),void this.mountHTML(e,t,s)}},{key:"mountHTML",value:function(e,t,n){var r=this;e.post((function(e){var o=t.params.timeout||r.options.timeout||3e4,i=t.src;He.get(i,o).then((function(r){n.innerHTML=r,t.progress.work(!0,t.index,r),e.resolve()}),(function(n){console.error(n),t.progress.work(!1,t.index,null),e.reject()}))}))}},{key:"mountCSS",value:function(e,t,n){var r=this;e.post((function(e){var o=t.src,i=r.dom.createElement("link"),a="onload"in i;if(r.isOldWebKit||!a){var l={timeout:r.options.time||3e3,time:0,isOldWebKit:r.isOldWebKit,success:function(){t.progress.work(!0,t.index,t.src),e.resolve()},error:function(){try{n.removeChild(i)}catch(e){console.error(e.message,e)}t.progress.work(!1,t.index,null),e.resolve()}};setTimeout((function(){gt(i,l)}),1)}else i.onload=function(){i.onload=i.onerror=null,t.progress.work(!0,t.index,t.src),e.resolve()},i.onerror=function(){try{n.removeChild(i)}catch(e){console.error(e.message,e)}i.onload=i.onerror=null,t.progress.work(!1,t.index,null),e.reject()};var s=r.dom.getElementById(o);s&&s.parentNode&&s.parentNode.removeChild(s),i.rel="stylesheet",i.type="text/css",i.id=o,i.href=o,n.appendChild(i)}))}},{key:"mountJS",value:function(e,t,n){var r=this;e.post((function(e){var o=t.src,i=r.moduleManager.get(o);if(i&&(i.status==Ue.Defined||i.status==Ue.Loaded)){if(i.exports)return t.progress.work(!0,t.index,i.exports),void e.resolve();if(r.dom.querySelector("script[src='".concat(o)))return t.progress.work(!0,t.index,i.exports),void e.resolve()}(i=new ze).id=o,i.src=o,i.status=Ue.Loading,r.moduleManager.put(o,i);var a=r.dom.createElement("script");if("onload"in a)a.onload=function(){a.onload=a.onerror=null,i.status==Ue.Loading&&(i.status=Ue.Loaded,t.progress.work(!0,t.index,o)),e.resolve()},a.onerror=function(){try{n.removeChild(a)}catch(e){console.error(e.message,e)}a.onload=a.onerror=null,t.progress.work(!1,t.index,null),e.reject()};else{var l=a;l.onreadystatechange=function(){/loaded|complete/.test(l.readyState)&&(l.onreadystatechange=null,i.status==Ue.Loading&&(i.status=Ue.Loaded,t.progress.work(!0,t.index,o)),e.resolve())}}a.defer=!0,a.src=o,Ce().define=r.createDefine(i,t),n.appendChild(a)}))}},{key:"unmount",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getFileNamePostfix(e);if("js"===n||0===n.length){var r=this.dom.querySelector('script[src="'.concat(e,'"]'));return r&&r.parentNode&&r.parentNode.removeChild(r),void this.moduleManager.remove(e)}if("css"!==n){He.remove(e);var o=t.htmlPoint;return o||(o=this.dom.body),void(o.innerHTML="")}var i=this.dom.querySelector('style[href="'.concat(e,'"]'));i&&i.parentNode&&i.parentNode.removeChild(i)}},{key:"trimEmptyElement",value:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n].trim();0!==r.length&&t.push(r)}return t}},{key:"createDefine",value:function(e,t){var n=this,r=function(){var r,o,i;e.status=Ue.Defining;var a=arguments.length;1===a?(i=arguments.length<=0?void 0:arguments[0],r=void 0):2===a?(i=arguments.length<=1?void 0:arguments[1],Array.isArray(arguments.length<=0?void 0:arguments[0])?(o=n.trimEmptyElement(arguments.length<=0?void 0:arguments[0]),r=void 0):o=void 0):(r=arguments.length<=0?void 0:arguments[0],o=n.trimEmptyElement(arguments.length<=1?void 0:arguments[1]),i=arguments.length<=2?void 0:arguments[2]),r&&(e.id=r,n.options.alias[r]=e.src),o&&o.length>0?n.ensure(o,(function(){if("function"==typeof i){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.exports=Reflect.apply(i,e,r)}else e.exports=i;e.status=Ue.Defined,t.progress.work(!0,t.index,e.exports)})):(e.exports="function"==typeof i?Reflect.apply(i,e,[]):i,e.status=Ue.Defined,t.progress.work(!0,t.index,e.exports))};return r.amd=!0,r}},{key:"resolvePath",value:function(e){try{if(this.isNaturePath(e,"all"))return e;e=this.parserPath(e,!0);var t=this.getFileNamePostfix(e);t=t.toLowerCase();var n=this.createSearch(this.query);return-1==e.indexOf("?")?("js"!==t&&"css"!==t&&"html"!==t&&(e+=".js"),n.length>0&&(e+="?".concat(n))):n.length>0&&(e+="&".concat(n)),e}catch(t){throw console.error("resolve path[".concat(e,"] fail"),t),t}}},{key:"createSearch",value:function(e){var t="";if(e){for(var n in e){var r="".concat(e[n]);t+="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r),"&")}t.length>0&&(t=t.substring(0,t.length-1))}return t}},{key:"getFileNamePostfix",value:function(e){var t=e.lastIndexOf("?");-1==t&&(t=e.length);var n=e.lastIndexOf(".",t);return-1==n?"":e.substring(n+1,t)}},{key:"isNaturePath",value:function(e,t){if(null==this.options.nature)return!1;if("all"===t||"js"===t){var n=this.options.nature.js;if(void 0!==n)for(var r=0;r<n.length;r++){var o=n[r];if(0===e.indexOf(o))return!0}}if("all"===t||"css"===t){var i=this.options.nature.css;if(void 0!==i)for(var a=0;a<i.length;a++){var l=i[a];if(0===e.indexOf(l))return!0}}if("all"===t||"html"===t){var s=this.options.nature.html;if(void 0!==s)for(var u=0;u<s.length;u++){var c=s[u];if(0===e.indexOf(c))return!0}}return!1}},{key:"parserPath",value:function(e,t){if(0==e.indexOf("http://"))return e;if(0==e.indexOf("https://"))return e;if(0==e.indexOf("file:///"))return e;if(0==e.indexOf("/"))return Ke+e.slice(1);if(0==e.indexOf("./"))return Ke+e.slice(2);if(t){var n=this.options.alias[e];if(!n){var r=e.indexOf("/");if(-1==r)n=e;else{var o=e.slice(0,r),i=this.options.paths[o];n=i?i+e.slice(r):e}}return this.parserPath(n,!1)}return Ke+e}}]),e}();function gt(e,t){var n=e.sheet,r=!1;if(t.isOldWebKit)n&&(r=!0);else if(n)try{n.cssRules&&(r=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(r=!0)}setTimeout((function(){t.time+=20,r?t.success():t.time>t.timeout?t.error():gt(e,t)}),20)}var bt=function(){function e(t,n){vt(this,e),this.size=t,this.callback=n,this.status=!0,this.values=[],this.lastIndex=-1}return pt(e,[{key:"work",value:function(e,t,n){if(this.status=e,!0===this.status&&(this.lastIndex!==t&&this.size--,this.lastIndex=t,this.values.push(n)),0===this.size||!1===this.status)try{Reflect.apply(this.callback,this,[this.status,this.values])}catch(e){console.error(e.message,e)}}},{key:"isOK",value:function(){return this.status}}]),e}(),wt=function e(t,n,r,o){vt(this,e),this.index=t,this.src=n,this.params=r,this.progress=o},St=Symbol("_notifyChange"),xt=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.currentRoute=t,this.routes=n};function kt(e){return(kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function At(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rt=Symbol("_navigateFirstRoute"),Pt=Symbol("_getRouteMark"),Et=Symbol("_getUrlSearch"),Ct=Symbol("_generateLocation"),Tt=Symbol("_setRoteMarkhRecorder"),_t=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"hash",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6?arguments[6]:void 0;At(this,e),Ot(this,"firstNavigate",!0),Ot(this,"traceless",!1),this.mode=t,this.base=n,this.query=r,this.firstNavigate=o,this.historyMonitor=i,this.traceless=a,this.storage=null!=l?l:Ce().sessionStorage}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=Ce();return"function"!=typeof this.historyChange&&(this.historyChange=function(){if(e.historyMonitor){var t=n.history.state;e[St](t)}}),Te(n,"popstate",this.historyChange),this.firstNavigate&&t&&this[Rt](),Promise.resolve()}},{key:"destroy",value:function(){this.historyChange&&_e(Ce(),"popstate",this.historyChange)}},{key:Rt,value:function(){var e,t=null!==(e=this[Pt]())&&void 0!==e?e:"/",n=this.storage.getItem(t);if(n)try{var r=JSON.parse(n);return void this[St](r)}catch(e){}var o,i=t.indexOf("!");o=-1!=i?t.substring(i+1):t;var a=new se;a.path=o,a.query=this[Et](),this[St]([a])}},{key:Tt,value:function(e,t){if(this.historyMonitor)try{this.lastMark&&this.storage.removeItem(this.lastMark);var n=JSON.stringify(t);this.storage.setItem(e,n),this.lastMark=e}catch(e){console.error(e.message,e)}}},{key:St,value:function(e){"function"==typeof this.changeHandler&&this.changeHandler(e)}},{key:Pt,value:function(){var e=Ce();if("path"===this.mode){var t=e.location.pathname;this.base&&0==t.indexOf(this.base)&&(t=t.substring(this.base.length));var n=t.indexOf("#");return-1!=n&&(t=t.substring(0,n)),t}var r=e.location.hash,o=r.indexOf("#");return-1!=o?r.substring(o+1):null}},{key:Et,value:function(){return Ce().location.search}},{key:"listen",value:function(e){this.changeHandler=e}},{key:"go",value:function(e){Ce().history.go(e)}},{key:"push",value:function(e){var t=this[Ct](e.currentRoute);this.traceless||Ce().history.pushState(e.routes,"",t),this[Tt](e.currentRoute.fullPath,e.routes)}},{key:"replace",value:function(e){var t=this[Ct](e.currentRoute);this.traceless||Ce().history.replaceState(e.routes,"",t),this[Tt](e.currentRoute.fullPath,e.routes)}},{key:Ct,value:function(e){var t,n=Ce();if(e.query){var r="";if("object"===kt(e.query))for(var o in e.query){var i=encodeURIComponent(e.query[o]),a="".concat(encodeURIComponent(o),"=").concat(i);r.length>0&&(r+="&"),r+=a}else r=e.query;this.query?"?"!==(t="".concat(this.query,"&").concat(r)).charAt(0)&&(t="?".concat(t)):t="?".concat(r)}var l,s=n.location,u=e.fullPath;return u.startsWith(G)&&(u=u.substring(G.length+2)),l=t?"path"==this.mode?"".concat(this.base,"/").concat(u).concat(t):"".concat(s.pathname).concat(t,"#").concat(u):"path"==this.mode?"".concat(this.base,"/").concat(u):"".concat(s.pathname,"#").concat(u),"".concat(s.origin).concat(l)}}])&&jt(t.prototype,n),e}();function qt(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5?arguments[5]:void 0;return null!==n&&(n=Ce().location.pathname),n&&n.endsWith("/")&&(n=n.substring(0,n.length-1)),new _t("path",null!==(e=n)&&void 0!==e?e:"",r,t,o,i,a)}function Mt(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;return new _t("hash","",t,e,n,r,o)}function It(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ft=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;It(this,e),Kt(this,"maxSize",50),Kt(this,"cursor",-1),Kt(this,"queue",[]),Kt(this,"historyMonitor",!1),Kt(this,"traceless",!1),this.base=t,this.maxSize=n}var t,n;return t=e,(n=[{key:"init",value:function(){return Promise.resolve()}},{key:"destroy",value:function(){this.queue=[]}},{key:"listen",value:function(e){this.changeHandler=e}},{key:St,value:function(e){"function"==typeof this.changeHandler&&this.changeHandler(e)}},{key:"go",value:function(e){if(0!=this.queue.length&&!(this.cursor<=0||this.cursor>=this.queue.length-1)){var t=this.cursor+e;if(t<0?t=0:t>this.queue.length-1&&(t=this.queue.length-1),t!=this.cursor){this.cursor=t;var n=this.queue[t];this[St](n.routes)}}}},{key:"push",value:function(e){this.queue.length>=this.maxSize&&this.queue.splice(0,1),this.queue.push(e),this.cursor=this.queue.length-1}},{key:"replace",value:function(e){var t=this.queue.length-this.cursor;this.queue.splice(this.cursor,t),this.queue[this.cursor]=e}}])&&Nt(t.prototype,n),e}();function Dt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return new Ft(e,t)}var $t="undefined"!=typeof window;function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(n),!0).forEach((function(t){Vt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ht(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Wt(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Bt(e){return function(e){if(Array.isArray(e))return Jt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Wt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wt(e,t){if(e){if("string"==typeof e)return Jt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jt(e,t):void 0}}function Jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gt(e){return(Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Xt=Symbol("_constructRouteModel"),Yt=Symbol("_findRouteModel"),Qt=Symbol("_findRootView"),Zt=Symbol("_getFirstView"),en=Symbol("_removeView"),tn=Symbol("_buildPage"),nn=Symbol("_resolveComponent"),rn=Symbol("_update"),on=Symbol("_merge"),an=Symbol("ignoreHistoryChangeOnceKey"),ln=Symbol("_handleHistoryChange"),sn=Symbol("_handleRouteUpdated"),un=Symbol("routeUpdatedCallback"),cn=Symbol("currentRoutes"),fn=Symbol("current"),hn=Symbol("_addRouteRecorder"),vn=Symbol("_removeRouteRecorder"),yn=Symbol("_cloneRouteRecorder"),pn=Symbol("_hanldeError"),dn=Symbol("errorCallback"),mn=Symbol("registerKey"),gn=Symbol("notFoundKey"),bn=Symbol("notFoundPathKey"),wn=Symbol("forestKey"),Sn=Symbol("historyKey"),xn=Symbol("beforeFiltersKey"),kn=Symbol("afterFiltersKey"),An=Symbol("destroyFiltersKey"),jn=Symbol("mainDispatcherKey"),On=Symbol("initKey"),Rn=Symbol("requireKey"),Pn=Symbol("readyKey"),En=Symbol("readyHandlersKey"),Cn=Symbol("_markReady"),Tn=Symbol("_createNextFn"),_n=Symbol("_start"),qn=Symbol("_before"),Mn=Symbol("_after"),In=Symbol("_destroy"),Nn=Symbol("_load"),Kn=Symbol("_unload"),Fn=Symbol("_loadDependency"),Dn=Symbol("resolvedModulesKey"),$n=Symbol("resolveDependencyKey"),Ln=Symbol("routerGuardKey");Symbol.for("loadViewModel");var Un,Hn=function(){function e(t){var n,r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Vt(this,mn,new Array),Vt(this,bn,"*"),Vt(this,Pn,!1),Vt(this,En,[]),Vt(this,wn,new Ae),Vt(this,cn,new Array),Vt(this,dn,null),Vt(this,un,null),Vt(this,xn,new Array),Vt(this,kn,new Array),Vt(this,An,new Array),Vt(this,jn,new ft),Vt(this,Dn,new Map),Vt(this,Ln,new Ee),Vt(this,On,!1),Vt(this,fn,c(null)),Vt(this,Rn,null),Vt(this,an,!1),this.options=null!=t?t:{},this.options.notFoundPath&&this.setNotFoundPath(this.options.notFoundPath);var o=this.options.routes||[];this.addRoutes(o),this.options.notFound&&this.setNotFoundRoute(this.options.notFound),t.history?this[Sn]=t.history:this[Sn]=$t?Mt():Dt(),null===(n=this[Sn])||void 0===n||n.listen((function(e){var t=null;if("string"==typeof e){var n=r[Y](e);n&&(t=r[ln]([n]))}else t=r[ln](e);t&&t.then((function(){!1===r[Pn]&&r[Cn](!0)})).catch((function(){!1===r[Pn]&&r[Cn](!1)}))}))}var t,n;return t=e,(n=[{key:"require",get:function(){return $t?(this[Rn]||(this[Rn]=new mt),this[Rn]):null}},{key:"current",get:function(){return this[fn].value}},{key:"setHistoryMode",value:function(e){var t,n=this;if(!this[Pn]){if(this[Sn])try{this[Sn].destroy()}catch(e){console.error(e.message,e)}for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];this[Sn]="path"===e?Reflect.apply(qt,null,[].concat(o)):"memory"===e?Reflect.apply(Dt,null,[].concat(o)):Reflect.apply(Mt,null,[].concat(o)),null===(t=this[Sn])||void 0===t||t.listen((function(e){var t=null;if("string"==typeof e){var r=n[Y](e);r&&(t=n[ln]([r]))}else t=n[ln](e);t&&t.then((function(){!1===n[Pn]&&n[Cn](!0)})).catch((function(){!1===n[Pn]&&n[Cn](!1)}))}))}}},{key:pn,value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"error",t=arguments.length>1?arguments[1]:void 0;if(t&&"function"==typeof t.error)try{t.error(e)}catch(e){}if(this[dn])try{this[dn](e,t)}catch(e){}console.error(e)}},{key:"init",value:function(){var e;!0!==this[On]&&(null===(e=this[Sn])||void 0===e||e.init(!this[Pn]),this[On]=!0)}},{key:"isReady",value:function(){var e=this;return this[Pn]?Promise.resolve():new Promise((function(t,n){e[En].push([t,n])}))}},{key:Cn,value:function(e){this[Pn]=!0,this[En].forEach((function(t){var n,r,o=(r=2,function(e){if(Array.isArray(e))return e}(n=t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(n,r)||Wt(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1];try{e?i():a()}catch(e){console.error(e.message,e)}}))}},{key:ln,value:function(e){if(this[an])return this[an]=!1,Promise.resolve();try{if(!e){var t=Bt(this[cn]).reverse();return this[Kn](t),$t&&Ce().location.reload(),Promise.resolve()}for(var n=null,r=[],o=[],i=0;i<e.length&&i<this[cn].length&&se.isSame(e[i],this[cn][i]);i++)e[i].opsType===oe.Open&&!0===e[i].active&&e[i].active!==this[cn][i].active&&(n=e[i]);if(i<e.length&&(r=e.slice(i)),i<this[cn].length&&(o=this[cn].slice(i).reverse()),0==o.length&&0==r.length){if(null!==n)return this.restore([n])}else{if(!(o.length>0))return this.restore(r);if(this[Kn](o)){if(r.length>0)return this.restore(r);if(null!==n)return this.restore([n])}}}catch(e){this[pn](e)}return Promise.resolve()}},{key:sn,value:function(e){if(e)this[fn].value=e;else{var t=this[cn].length;this[fn].value=t>0?this[cn][t-1]:null}if("function"==typeof this[un])try{this[un](this[fn].value)}catch(e){}}},{key:hn,value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t<0||t>=this[cn].length?this[cn].push(e):this[cn].splice(t,0,e)}},{key:yn,value:function(){var e,t=[],n=Ht(this[cn]);try{for(n.s();!(e=n.n()).done;){var r=e.value,o=se.clone(r,!0);t.push(o)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:vn,value:function(e){if(null!=this[cn]){for(var t=-1,n=0;n<this[cn].length;n++)if(se.isSame(this[cn][n],e)){t=n;break}if(-1!=t){var r=this[cn][t];this[cn].splice(t,1),this[In](r,r.session)}}}},{key:"historyMonitor",set:function(e){this[Sn]&&(this[Sn].historyMonitor=e)}},{key:"historyMonitor",get:function(){return!!this[Sn]&&this[Sn].historyMonitor}},{key:"traceless",set:function(e){this[Sn]&&(this[Sn].traceless=e)}},{key:"traceless",get:function(){return!!this[Sn]&&this[Sn].traceless}},{key:"onRouteUpdated",value:function(e){this[un]=e}},{key:"onError",value:function(e){this[dn]=e}},{key:"beforeEach",value:function(e){this[xn].push(e)}},{key:"afterEach",value:function(e){this[kn].push(e)}},{key:"destroyEach",value:function(e){this[An].push(e)}},{key:"setResolveDependency",value:function(e){this[$n]=e}},{key:"addRoutes",value:function(e){var t,n=Ht(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.addRoute(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"addRoute",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(e.path!==this[bn]){var n=this[Xt](e);if(-1==t)this[mn]=[].concat(Bt(this[mn]),Bt(n));else for(var r=n.length-1;r>=0;r--)this[mn].splice(t,0,n[r])}else this.setNotFoundRoute(e)}},{key:"removeRoute",value:function(e){var t=this[Y](e);if(null===t)return console.warn("route格式错误",e),!1;for(var n=0;n<this[mn].length;n++){var r=this[mn][n];if(null!=t&&t.path&&r.path===t.path)return this[mn].splice(n,1),!0;if(null!=t&&t.name&&r.name===t.name)return this[mn].splice(n,1),!0}return!1}},{key:"hasRoute",value:function(e){var t=this[Y](e);return null===t?(console.warn("route格式错误",e),!1):-1!==this[mn].findIndex((function(e){return!(null==t||!t.path||e.path!==t.path)||!(null==t||!t.name||e.name!==t.name)||void 0}))}},{key:"setNotFoundPath",value:function(e){this[bn]=e}},{key:"setNotFoundRoute",value:function(e){var t=this[Xt](e);this[gn]=t[0]}},{key:"getRoutes",value:function(){return Bt(this[mn])}},{key:Xt,value:function(e){var t,n=null!==(t=e.path)&&void 0!==t?t:"";n.length>0&&"/"!==n.charAt(0)&&(n="/".concat(n));var r=e.components||e.component&&{"":e.component};if(null==r){var o=new fe;return o.path=n,o.redirect=e.redirect,[o]}var i=[];for(var a in r){var l=r[a];0===a.length&&(a=G);var s=new ue(a,l,e.props,e.meta);i.push(s)}var u=!1,c=[];if(e.children){var f,h=Ht(e.children);try{for(h.s();!(f=h.n()).done;){var v,y=f.value,p=Ht(this[Xt](y));try{for(p.s();!(v=p.n()).done;){var d=v.value,m=new fe;m.name=d.name,d.path&&d.path.length>0?m.path="".concat(n).concat(d.path):(u=!0,m.path=n);var g=new ce;g.models=[].concat(i),m.layers=[g].concat(Bt(d.layers)),c.push(m)}}catch(e){p.e(e)}finally{p.f()}}}catch(e){h.e(e)}finally{h.f()}}if(!u){var b=new ce;b.models=i;var w=new fe;w.name=e.name,w.path=n,w.layers=[b],c.splice(0,0,w)}return c}},{key:Yt,value:function(e){var t,n=e.route;try{var r,o=Ht(this[mn]);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(n.path&&i.path){var a,l=i.match;l||(l=i.match=m(i.path));var s=l(n.path);if(!s)continue;if(i.redirect){var u=new se;_(!0,u,n),u.path=i.redirect;var c={route:u,find:void 0};return!!this[Yt](c)&&(e.route=c.route,e.find=c.find,!0)}if(n.params=null!==(a=n.params)&&void 0!==a?a:{},_(!0,n.params,s.params),n.query){var f=n.query;if("string"==typeof f){var h,v={},y=Ht(f.split("&"));try{for(y.s();!(h=y.n()).done;){var p=h.value.split("=");if(2===p.length){var g=decodeURIComponent(p[0].trim()),w=decodeURIComponent(p[1].trim());v[g]=w}}}catch(e){y.e(e)}finally{y.f()}_(!0,n.params,v)}else"object"===Gt(f)&&_(!0,n.params,f)}return e.find=i,!0}if(n.name===i.name){var S;n.params=null!==(S=n.params)&&void 0!==S?S:{};var x=function(e,t){void 0===t&&(t={});var n=b(t),r=t.encode,o=void 0===r?function(e){return e}:r,i=t.validate,a=void 0===i||i,l=e.map((function(e){if("object"==typeof e)return new RegExp("^(?:"+e.pattern+")$",n)}));return function(t){for(var n="",r=0;r<e.length;r++){var i=e[r];if("string"!=typeof i){var s=t?t[i.name]:void 0,u="?"===i.modifier||"*"===i.modifier,c="*"===i.modifier||"+"===i.modifier;if(Array.isArray(s)){if(!c)throw new TypeError('Expected "'+i.name+'" to not repeat, but got an array');if(0===s.length){if(u)continue;throw new TypeError('Expected "'+i.name+'" to not be empty')}for(var f=0;f<s.length;f++){var h=o(s[f],i);if(a&&!l[r].test(h))throw new TypeError('Expected all "'+i.name+'" to match "'+i.pattern+'", but got "'+h+'"');n+=i.prefix+h+i.suffix}}else if("string"!=typeof s&&"number"!=typeof s){if(!u){var v=c?"an array":"a string";throw new TypeError('Expected "'+i.name+'" to be '+v)}}else{if(h=o(String(s),i),a&&!l[r].test(h))throw new TypeError('Expected "'+i.name+'" to match "'+i.pattern+'", but got "'+h+'"');n+=i.prefix+h+i.suffix}}else n+=i}return n}}(d(i.path,t=void 0),t);return n.path=x(n.params),e.find=i,!0}}}catch(e){o.e(e)}finally{o.f()}}catch(e){console.error(e.message,e),"function"==typeof n.error&&n.error(e.message)}return!1}},{key:Y,value:function(e){var t=null;if(Array.isArray(e))if(t=new se,"object"===Gt(e[0]))t=se.from(e[0]);else for(var n=0;n<e.length;n++)0===n?"/"===e[n].charAt(0)?t.path=e[n]:t.name=e[n]:1===n?t.params=e[n]:2===n?t.root=e[n]:3===n&&_(!1,t,e[n]);else"object"===Gt(e)?t=se.from(e):"string"==typeof e&&(t=new se,"/"==e.charAt(0)?t.path=e:t.name=e);if(t){var r,o,i;if(t.path){var a=t.path.indexOf("?");-1!==a&&a<t.path.length-1&&(t.query=t.path.substring(a+1),t.path=t.path.substring(0,a))}t.root=null!==(r=t.root)&&void 0!==r?r:G,t.opsType=null!==(o=null!==(i=t.opsType)&&void 0!==i?i:this.options.defaultOperationType)&&void 0!==o?o:oe.Push}return t}},{key:"push",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=r.opsType||oe.Push,this.to(r)):(this[pn]("resolve route fail",r),this)}},{key:"put",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Put,this.to(r)):(this[pn]("resolve route fail",r),this)}},{key:"replace",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Replace,this.to(r)):(this[pn]("resolve route fail",r),this)}},{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Append,this.to(r)):(this[pn]("resolve route fail",r),this)}},{key:"remove",value:function(e){var t=this;return new Promise((function(n){t[jn].post((function(r){try{if(0===t[cn].length)return r.resolve(),void n(!1);var o,i=[];if(e){var a;if(o=e.root?e.root:null!==(a=t[cn][0].root)&&void 0!==a?a:G,e.all)for(var l=t[cn].length-1;l>0;l--){var s=t[cn][l];s.opsType===oe.Append&&s.root===o&&i.splice(0,0,s)}else if(e.until)for(var u=t[cn].length-1;u>0;u--){var c=t[cn][u];if(c.opsType===oe.Append&&c.root===o){if("/"===e.until.charAt(0)&&e.until===c.path)break;if(e.until===c.name)break;i.splice(0,0,c)}}}else{o=G;var f=t[Zt](t[wn]);f&&(o=f.name);for(var h=t[cn].length-1;h>0;h--){var v=t[cn][h];if(v.opsType===oe.Append&&v.root===o){i.push(v);break}}}if(0===i.length){var y="can not find route";return console.warn(y),r.resolve(y),void n(!1)}var p=0;if(t[cn].forEach((function(e){e.opsType!==oe.Put&&p++})),t[Kn](i)){var d=0;t[cn].forEach((function(e){e.opsType!==oe.Put&&d++}));var m=p-d;t[an]=!0,t.back(m),r.resolve(),n(!0)}}catch(e){t[pn](e),r.resolve(),n(!1)}}))}))}},{key:"open",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Open,this.to(r)):(this[pn]("resolve route fail",r),this)}},{key:"close",value:function(e){var t=this;return this[jn].post((function(n){try{var r=t[Y](e);if(!r)return void n.reject("resolve route fail");for(var o=[],i=0;i<t[cn].length;i++){var a=t[cn][i];if(a.root===r.root){if(r.path&&r.path===a.path){o.push(a);break}if(r.name&&r.name===a.name){o.push(a);break}}}if(0===o.length)return void n.resolve();if(t[Kn](o)){var l,s=se.clone(r,!0),u=new xt(s,t[yn]());null===(l=t[Sn])||void 0===l||l.replace(u),t[sn]()}n.resolve()}catch(e){n.resolve(),t[pn](e.message)}})),this}},{key:"to",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=this[Y](n);if(!o)return this[pn]("resolve route fail",o),this;console.debug("route to",o.path,o.root);var i=this[Ln].acquire(o);return null==i?(this[pn]("route forbid",o),this):(this[jn].post((function(t){try{var n,r=e[_n](o);e[qn](r),null!==(n=r.session)&&void 0!==n&&n.routeModel||!e[$n]||e[Fn](r),e[Nn](r),e[Mn](r),r.wait((function(n,r){var a=n.session.to;try{var l,s,u=se.clone(a,!0),c=new xt(u,e[yn]());a.opsType===oe.Replace?null===(l=e[Sn])||void 0===l||l.replace(c):null===(s=e[Sn])||void 0===s||s.push(c)}catch(e){console.error(e.message,e)}if(e[Ln].release(i),e[sn](a),"function"==typeof o.success)try{Reflect.apply(o.success,{},[])}catch(e){console.error(e.message,e)}!1===e[Pn]&&e[Cn](!0),t.resolve()}),(function(n,r){e[Ln].release(i),e[pn](r,o),!1===e[Pn]&&e[Cn](!1),t.resolve()}))}catch(n){e[Ln].release(i),e[pn](n,o),t.resolve()}})),this)}},{key:"back",value:function(e){var t;null===(t=this[Sn])||void 0===t||t.go(-e)}},{key:Tn,value:function(e){var t=this;return function(n,r){if("boolean"==typeof n)n?e.resolve():e.reject(r);else if(n){var o=t[Y](n);if(o){var i=e.session.to;o.success=i.success,o.error=i.error,e.session.to=o,e.session.routeModel=null,e.resolve()}else e.reject("route resolve fail")}else e.resolve()}}},{key:_n,value:function(e){var t,n=this[cn].length>0?this[cn][0]:void 0,r=new le(e,n),o={route:e,find:null};return this[Yt](o),o.find&&(r.routeModel=o.find,e.matched=(t=[],o.find.layers.forEach((function(e){null!=e.models&&null!=e.models&&e.models.forEach((function(e){if(null!=e&&null!=e)if("object"===Gt(e.meta)){var n=_(!0,{},e.meta);t.push(n)}else e.meta&&t.push(e.meta)}))})),t),Array.isArray(e.matched)&&e.matched.length>0&&(e.meta=o.find.layers[0].models[0].meta)),new ft(r)}},{key:qn,value:function(e){var t,n=this,r=Ht(this[xn]);try{var o=function(){var r=t.value;e.post((function(e){var t=n[Tn](e);Reflect.apply(r,{},[e.session.to,e.session.from,t,e.session])}))};for(r.s();!(t=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}},{key:Mn,value:function(e){var t=this;e.post((function(e){var n,r=Ht(t[kn]);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{Reflect.apply(o,{},[e.session.to,e.session.from,e.session])}catch(e){console.error(e.message,e)}}}catch(e){r.e(e)}finally{r.f()}e.resolve()}))}},{key:In,value:function(e,t){var n,r=Ht(this[An]);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{Reflect.apply(o,{},[e,t])}catch(e){console.error(e.message,e)}}}catch(e){r.e(e)}finally{r.f()}"function"==typeof e.destroy&&Reflect.apply(e.destroy,e,[])}},{key:Fn,value:function(e){var t=this,n=e.session,r=Reflect.apply(this[$n],this,[null==n?void 0:n.to]);if(null!=r&&null!=r){Array.isArray(r)||(r=[r]);var o,i=[],a=Ht(r);try{for(a.s();!(o=a.n()).done;){var l=o.value;this[Dn].has(l)||i.push(l)}}catch(e){a.e(e)}finally{a.f()}0!==i.length&&e.post((function(e){t[Rn].ensure(i,(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(r){for(var a=0,l=r;a<l.length;a++){var s=l[a];if(s){var u=void 0;u=C(s)?s.default:s,Array.isArray(u)&&t.addRoutes(u)}}var c,f=Ht(i);try{for(f.s();!(c=f.n()).done;){var h=c.value;t[Dn].set(h,!0)}}catch(e){f.e(e)}finally{f.f()}e.resolve()}else e.reject()}))}))}}},{key:Nn,value:function(e){var t=this;e.post((function(e){var n=e.session.to,r=e.session.routeModel;if(null==r){var o={route:n,find:null};if(t[Yt](o))r=o.find,e.session.routeModel=r;else{if(!t[gn])return void e.reject("not find route model");r=t[gn]}}var i=le.from(e.session);t[tn](n,r,i).then((function(n){t[wn],e.resolve()}),(function(t){e.reject(t)}))}))}},{key:Kn,value:function(e){if(0==e.length)return!0;var t,n=this[wn],r=[],o=Ht(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=this[Qt](n,i);null!=a&&r.push(Ut(Ut({},a),{},{route:i}))}}catch(e){o.e(e)}finally{o.f()}if(0==r.length)return this[pn]("can not find view index"),!1;var l,s=Ht(r.reverse());try{for(s.s();!(l=s.n()).done;){var u,c=l.value;this[en](n,{x:c.x,y:c.y},[null!==(u=c.route.index)&&void 0!==u?u:0],!0)}}catch(e){s.e(e)}finally{s.f()}return!0}},{key:Qt,value:function(e,t){for(var n,r=null!==(n=t.root)&&void 0!==n?n:G,o=0;o<e.layers.length;o++)for(var i=e.layers[o],a=i.views.length-1;a>=0;a--){var l=i.views[a];if(l[de]&&l[be]===r)return{x:a,y:o}}return null}},{key:Zt,value:function(e){return e.layers.length>0&&e.layers[0].views.length>0?e.layers[0].views[0]:null}},{key:en,value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!(t.y>=e.layers.length||t.x>=e.layers[t.y].views.length)){for(var o=e.layers[t.y].views[t.x],i=!1,a=[],l=!1,s=o.slots.value,u=s.length-1;u>=0;u--){var c=s[u];null!=n&&-1==n.indexOf(c.index)||(c.route&&o[de]&&(this[vn](c.route),!0===c.active&&c.route.opsType==oe.Append&&(l=!0)),a.push(new xe(o,c.index,t.y)),s.splice(u,1))}if(0==s.length)r?o.slots.value=Bt(s):e.layers[t.y].views.splice(t.x,1);else{if(l){var f=s.length-1,h=s[f];h.active=!0,h.route&&(h.route.active=h.active)}o.slots.value=Bt(s)}0==e.layers[t.y].views.length&&(i=!0);for(var v=t.y+1;v<e.layers.length;v++){for(var y=e.layers[v].views,p=[],d=y.length-1;(i||a.length>0)&&d>=0;d--){var m=y[d];if(m[ge]&&(i||xe.include(a,m[ge]))){for(var g=m.slots.value,b=g.length-1;b>=0;b--){var w=g[b];w.route&&m[de]&&this[vn](w.route),p.push(new xe(m,w.index,v)),g.splice(b,1)}e.layers[v].views.splice(d,1)}}a=p,0==e.layers[v].views.length&&(i=!0)}}}},{key:"restore",value:function(e){var t=this;if(e&&0!=this[mn].length)return new Promise((function(n,r){for(var o=function(n){var r=e[n];t[jn].post((function(e){var n,o=t[_n](r);t[qn](o),null!==(n=o.session)&&void 0!==n&&n.routeModel||!t[$n]||t[Fn](o),t[Nn](o),t[Mn](o),o.wait((function(t,n){e.resolve()}),(function(n,r){t[pn](r),e.resolve()}))}))},i=0;i<e.length;i++)o(i);t[jn].post((function(e){e.resolve(),n()}))}));var n=this[wn];if(n.layers.length>0){var r=n.layers[0].views;r.length>0&&(r[0].slots.value=[])}return this[cn]=[],this[sn](),Promise.resolve()}},{key:tn,value:function(e,t,n){var r,o=this,i=null!==(r=e.updateType)&&void 0!==r?r:ie.Part;return this[nn](t).then((function(){o[rn](t,e,n,i)}))}},{key:nn,value:function(e){for(var t=[],n=0;n<e.layers.length;n++)for(var r=e.layers[n],o=0;o<r.models.length;o++){var i=r.models[o];i.isResolved||t.push(i.resolve())}return t.length>0?Promise.all(t):Promise.resolve()}},{key:rn,value:function(e,t,n,r){var o;if(1!==e.layers[0].models.length)return Promise.reject("illegal route structure(multil root node)");var i,a,l,s=e.layers[0].models[0],u=this[wn],c=function(e){return 0==e.layers.length||0==e.layers[0].views.length}(u),f=null!==(o=t.root)&&void 0!==o?o:G;if(c||r!=ie.Part||(i=this[Qt](u,t)),null==i||null==i)if(c||r===ie.All){if(0==u.layers[0].views.length){var h,v=null!==(h=t.root)&&void 0!==h?h:G;a=new Se(v,!0,null),u.layers[0].views=[a]}else a=u.layers[0].views[0];i={x:0,y:0}}else{var y=t.slot;if(!y)return Promise.reject("can not rebuild view(because not route slot)");var p,d=y.level;if(d>u.layers.length)return Promise.reject("can not insert view(override level)");if(y.rootName){var m,g=Ht(u.layers[d-1].views);try{for(g.s();!(m=g.n()).done;){var b=m.value;if(b[de]&&b.name===y.rootName){var w;p=new xe(b,null!==(w=y.rootIndex)&&void 0!==w?w:0,d-1);break}if(b[me]&&b[me].view.name===y.rootName&&b[me].index===y.rootIndex){p=b[me];break}}}catch(e){g.e(e)}finally{g.f()}}if(!p)return Promise.reject("can not insert view(not find root node ref)");a=new Se(f,!0,p),u.layers[d].views.push(a),i={x:u.layers[d].views.length-1,y:d}}else a=u.layers[i.y].views[i.x];if(l=i.y,a[de]=!0,t.opsType===oe.Append){t.index=K.get();var S=a.slots.value;if(S.length>0){var x=S[S.length-1];x.active=!1,x.route&&(x.route.active=x.active)}var k=new we(t,s,t.index,!0);a.slots.value=[].concat(Bt(S),[k]);var A=l+1,j=new xe(a,t.index,l);this[on](u,A,e,1,j)}else if(t.opsType===oe.Open){var O,R=a.slots.value,P=!1,E=Ht(R);try{for(E.s();!(O=E.n()).done;){var C=O.value;if(null!==C.route&&se.isSameForRouteModel(C.route,t)){if(1==C.active)return t.index=C.index,t.active=C.active,C.route=t,Promise.resolve();C.active=!0,P=!0,t.index=C.index,t.active=C.active,C.route=t,this[vn](C.route)}else C.active=!1;C.route&&(C.route.active=C.active)}}catch(e){E.e(e)}finally{E.f()}if(!P){t.index=K.get(),t.active=!0;var T=new we(t,s,t.index,!0);R.push(T);var _=l+1,q=new xe(a,t.index,l);this[on](u,_,e,1,q)}a.slots.value=Bt(R)}else{var M=a.slots.value;if(0==M.length){t.index=K.get(),a.slots.value=[new we(t,s,t.index)];var I=l+1,N=new xe(a,t.index,l);this[on](u,I,e,1,N)}else{var F=M[0];if(F.model!==s){this[en](u,i,null,!0),t.index=K.get(),a.slots.value=[new we(t,s,t.index)];var D=l+1,$=new xe(a,t.index,l);this[on](u,D,e,1,$)}else{null!==F.route&&this[vn](F.route);for(var L=[],U=1;U<M.length;U++)L.push(M[U].index);L.length>0&&this[en](u,i,L,!0),t.index=F.index,F.route=t;for(var H=[new xe(a,t.index,l)],B=l+1,W=1,J=new xe(a,t.index,l);H.length>0&&B<u.layers.length&&W<e.layers.length;B++,W++){for(var z=[],V=0;V<u.layers[B].views.length;V++){var X=u.layers[B].views[V];X[ge]&&xe.include(H,X[ge])&&z.unshift(V)}for(var Y=[],Q=0,Z=z;Q<Z.length;Q++){for(var ee=Z[Q],te=u.layers[B].views[ee],ne=e.layers[W].models,re=void 0,le=0;le<ne.length;le++)if(te.name===ne[le].name){re=ne[le];break}if(re){var ue=te.slots.value;if(0==ue.length){te.slots.value=[new we(null,re,0)];var ce=B+1,fe=W+1;this[on](u,ce,e,fe,J)}else{var he=ue[0];if(he.model!==re){this[en](u,{x:ee,y:B},null,!0),te.slots.value=[new we(null,re,0)];var ve=B+1,ye=W+1;this[on](u,ve,e,ye,J)}else{te[de]&&null!==he.route&&this[vn](he.route);for(var pe=[],be=1;be<ue.length;be++)pe.push(ue[be].index);pe.length>0&&this[en](u,{x:ee,y:B},pe,!0),Y.push(new xe(te,he.index,B))}}te[de]=!1}else this[en](u,{x:ee,y:B},null,!1)}H=Y}this[on](u,B,e,W,J)}}}if(a&&a[me]){var ke,Ae=a[me];Ae&&(t.slot=new ae(f,l,null==Ae?void 0:Ae.view.name,null!==(ke=null==Ae?void 0:Ae.index)&&void 0!==ke?ke:0))}n.to=null,n.routeModel=null,t.session=n,this[hn](t)}},{key:on,value:function(e,t,n,r,o){for(var i=r,a=t;a<e.layers.length&&i<n.layers.length;a++,i++){var l,s=e.layers[a].views,u=Ht(n.layers[i].models);try{for(u.s();!(l=u.n()).done;){var c=l.value,f=new Se(c.name,!1,o),h=new we(null,c);f.slots.value=[h],s.push(f)}}catch(e){u.e(e)}finally{u.f()}}for(;i<n.layers.length;i++){var v=new ke;v.views=[];var y,p=Ht(n.layers[i].models);try{for(p.s();!(y=p.n()).done;){var d=y.value,m=new Se(d.name,!1,o),g=new we(null,d);m.slots.value=[g],v.views.push(m)}}catch(e){p.e(e)}finally{p.f()}e.layers.push(v)}}},{key:X,value:function(e,t,n,r,o,i){if(t<0||t>this[wn].layers.length)return null;if(t<this[wn].layers.length){var a,l=null,s=Ht(this[wn].layers[t].views);try{for(s.s();!(a=s.n()).done;){var u,c,f=a.value,h=!1;if(null!==n?(h=f.name===e&&(null===(u=f[me])||void 0===u?void 0:u.view)===n)&&-1!==r&&(h=(null===(c=f[me])||void 0===c?void 0:c.index)===r):h=f.name===e,h){null!==o&&(f[ge]={view:o,index:i,level:t-1}),l=f;break}}}catch(e){s.e(e)}finally{s.f()}if(null!==l)return l}var v=null,y=null;null!==o&&(v=o[de]?{view:o,index:i,level:t-1}:o[me],y={view:o,index:i,level:t-1});var p=new Se(e,!0,v);if(p[ge]=y,t==this[wn].layers.length){var d=new ke;d.views=[p],this[wn].layers.push(d)}else this[wn].layers[t].views.push(p);return p}}])&&zt(t.prototype,n),e}(),Bn="fox-router-view";function Wn(e){return(Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.showClass)&&void 0!==t?t:e.enterClass)||((r=e.transitionName)?"".concat(r,n?"-show":"-enter"):null)}function zn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.showActiveClass)&&void 0!==t?t:e.enterActiveClass)||((r=e.transitionName)?"".concat(r,n?"-show-active":"-enter-active"):null)}function Vn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.showToClass)&&void 0!==t?t:e.enterToClass)||((r=e.transitionName)?"".concat(r,n?"-show-to":"-enter-to"):null)}function Gn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.hideClass)&&void 0!==t?t:e.leaveClass)||((r=e.transitionName)?"".concat(r,n?"-hide":"-leave"):null)}function Xn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.hideActiveClass)&&void 0!==t?t:e.leaveActiveClass)||((r=e.transitionName)?"".concat(r,n?"-hide-active":"-leave-active"):null)}function Yn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.hideToClass)&&void 0!==t?t:e.leaveToClass)||((r=e.transitionName)?"".concat(r,n?"-hide-to":"-leave-to"):null)}function Qn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onBeforeShow)&&void 0!==t?t:e.onBeforeEnter}function Zn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onShow)&&void 0!==t?t:e.onEnter}function er(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onAfterShow)&&void 0!==t?t:e.onAfterEnter}function tr(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onShowCancelled)&&void 0!==t?t:e.onEnterCancelled}function nr(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onHide)&&void 0!==t?t:e.onLeave}function rr(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onAfterHide)&&void 0!==t?t:e.onAfterLeave}function or(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onHideCancelled)&&void 0!==t?t:e.onLeaveCancelled}function ir(e){var t,n,r,o,i,a=e.duration;return"object"==Wn(a)?t={enter:null!==(n=a.enter)&&void 0!==n?n:-1,leave:null!==(r=a.leave)&&void 0!==r?r:-1,show:null!==(o=a.show)&&void 0!==o?o:-1,hide:null!==(i=a.hide)&&void 0!==i?i:-1}:("string"==typeof a&&(a=0==a.length?-1:Number(a)),t={enter:a,leave:a,show:a,hide:a}),t}function ar(e,t){e.classList.contains(t)||e.classList.add(t)}function lr(e,t){e.classList.remove(t)}if($t){var sr=Ce();Un=sr.requestAnimationFrame.bind(sr)}else Un=setTimeout;function ur(e){Un(e)}function cr(e,t){if(O(t)){null==e&&(e={});for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];Reflect.apply(t,e,r)}}function fr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;if(O(i)){if(void 0!==o&&o>=0)return void setTimeout((function(){Reflect.apply(i,e,[t,n,r]),O(l)&&Reflect.apply(l,e,[])}),o);var s=["animationend","transitionend"],u=function o(a){s.forEach((function(e){_e(t,e,o)})),Reflect.apply(i,e,[t,n,r]),l&&Reflect.apply(l,e,[])};s.forEach((function(e){Te(t,e,u)}))}if(O(a)){var c="animationcancel",f=function o(i){Reflect.apply(a,e,[t,n,r]),_e(t,c,o)};Te(t,c,f)}}function hr(e){return null!==e&&(e.opsType===oe.Append||e.opsType===oe.Open)}function vr(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:-1;if(t&&(n||hr(i))){var l=Jn(o,n);l&&ar(r,l);var s=zn(o,n);s&&ar(r,s)}else{var u=Qn(o,n);cr(e,u,[r,i,a])}}function yr(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,s=arguments.length>8?arguments[8]:void 0;if(hr(a)||n)if(t){var u=Jn(o,n),c=zn(o,n),f=Vn(o,n);ur(f?function(){fr(e,r,a,l,i,(function(){c&&lr(r,c),f&&lr(r,f),O(s)&&s(r)})),u&&lr(r,u),f&&ar(r,f)}:function(){u&&lr(r,u),c&&lr(r,c),O(s)&&s(r)})}else{var h=Zn(o,n),v=er(o,n),y=tr(o,n),p=function(t){!t&&O(v)?cr(e,v,[r,a,l]):O(y)&&cr(e,y,[r,a,l]),O(s)&&s(r)};O(h)?cr(e,h,[r,p,a,l]):p()}else O(s)&&s(r)}function pr(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,s=arguments.length>8?arguments[8]:void 0,u=arguments.length>9?arguments[9]:void 0;if(hr(l)||n||!n&&O(a)&&a(),t){var c=Gn(o,n),f=Xn(o,n),h=Yn(o,n);c&&ar(r,c),f&&ar(r,f),ur(h?function(){fr(e,r,l,s,i,(function(){f&&lr(r,f),h&&lr(r,h),O(u)&&u(r),!n&&O(a)&&a()})),c&&lr(r,c),h&&ar(r,h)}:function(){c&&lr(r,c),f&&lr(r,f),O(u)&&u(r),!n&&O(a)&&a()})}else{var v=nr(o,n),y=rr(o,n),p=or(o,n),d=function(t){!t&&O(y)?(cr(e,y,[r,l,s]),O(u)&&u(r),!n&&O(a)&&a()):O(p)&&(cr(e,p,[r,l,s]),O(u)&&u(r))};O(v)?cr(e,v,[r,d,l,s]):d()}}function dr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=$(t.css),i=ir(t),a={create:function(e,a){var l=mr(a);vr(e,o,!1,l,t,n,r),yr(e,o,!1,l,t,i.enter,n,r)},activate:function(e,a){var l=mr(a);vr(e,o,!1,l,t,n,r),yr(e,o,!1,l,t,i.enter,n,r)},remove:function(e,a){var l=mr(e);pr(e,o,!1,l,t,i.leave,a,n,r)}};return a}function mr(e){return e.elm}function gr(e){return(gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function br(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wr(e){return function(e){if(Array.isArray(e))return xr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Sr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sr(e,t){if(e){if("string"==typeof e)return xr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xr(e,t):void 0}}function xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var kr=Symbol("ruvc"),Ar=Symbol("cvs");function jr(e,t,n){return"function"==typeof e?Reflect.apply(e,{},[t,n]):e}function Or(e,t){if(e.componentOptions&&e.componentOptions.Ctor&&e.componentOptions.Ctor.extendOptions){var n=e.componentInstance||e,r=[];if(e.fnOptions&&e.fnOptions[t]){var o=e.fnOptions[t];Array.isArray(o)?r=wr(o):"function"==typeof o&&(r=[o])}if(e.componentOptions.Ctor&&e.componentOptions.Ctor.extendOptions){var i=e.componentOptions.Ctor.extendOptions[t];Array.isArray(i)?r=[].concat(wr(r),wr(i)):"function"==typeof i&&(r=[].concat(wr(r),[i]))}return function(e){r.forEach((function(e){Reflect.apply(e,n,[])}))}}return function(){}}var Rr=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),br(this,"node",void 0),br(this,"state",void 0),this.node=t,this.state=n};const Pr={functional:!0,props:{name:{type:String,required:!1,default:"default"},passProps:{type:Object,required:!1},modelSlot:{type:[Object],required:!1},multi:{type:Boolean,default:!1},transition:{type:[Boolean,String],required:!1},css:{type:[Boolean,String],required:!1,default:!0},tag:{type:[String],required:!1,default:"div"},viewTag:{type:[String,Function],required:!1,default:"div"},viewTagProps:{type:[Object,Function],required:!1,default:function(){return{}}},viewTagAttrs:{type:[Object,Function],required:!1,default:function(){return{}}},viewClass:{type:[String,Function],required:!1},viewActiveClass:{type:[String,Function],required:!1},viewDeactiveClass:{type:[String,Function],required:!1},transitionName:{type:String,required:!1},enterClass:{type:String,required:!1},enterActiveClass:{type:String,required:!1},enterToClass:{type:String,required:!1},leaveClass:{type:String,required:!1},leaveActiveClass:{type:String,required:!1},leaveToClass:{type:String,required:!1},showClass:{type:String,required:!1},showActiveClass:{type:String,required:!1},showToClass:{type:String,required:!1},hideClass:{type:String,required:!1},hideActiveClass:{type:String,required:!1},hideToClass:{type:String,required:!1},duration:{type:[Number,Object],required:!1}},render:function(e,t){var n,u=t,c=t.parent.$createElement,f=t.parent.$router,d=t.props,m=d.name,g=d.multi,b=t.data,w=(n=t.parent)[kr]||(n[kr]={}),S=y(t.parent,o,0),x=y(t.parent,i,null),k=y(t.parent,a,-1),A=d.modelSlot;if(A){var j=m;v(t.parent,o,S+1,j),v(t.parent,a,A.index,j),v(t.parent,s,A.index,j);var R=A.route;R&&v(t.parent,r,R,j);var P,E=br({attrs:{}},h,j);if(A.model.props)if("object"===gr(A.model.props))Object.assign(E.attrs,A.model.props);else if(!0===A.model.props&&"object"===gr(null===(P=A.route)||void 0===P?void 0:P.params)){var C;Object.assign(E.attrs,null===(C=A.route)||void 0===C?void 0:C.params)}return c(A.model.component,E,t.children)}if(null==f)return console.error("router is not been register"),c();var T=y(t.parent,l,null),_=y(t.parent,s,0),q=f[X](m,S,x,k,T,_);if(null===q)return p(t.parent),c();if(v(t.parent,l,q),!0===q[de]&&v(t.parent,i,q),g){var M=function(){var e,n=$(null===(e=d.transition)||void 0===e||e),r=w[Ar];r||(r=w[Ar]=new Map);for(var o=new Map,i=[],a=q.slots.value,l=[],s=function(e){var t=a[e],s="".concat(d.name,"-").concat(t.index),f=c(Bn,{props:{name:s,modelSlot:t}}),h={},v=jr(d.viewClass,t.route,e);"string"==typeof v&&v.length>0&&(h[v]=!0);var y=jr(d.viewActiveClass,t.route,e),p=jr(d.viewDeactiveClass,t.route,e),m=r.get(s);if("string"==typeof y&&y.length>0&&(h[y]=t.active),"string"==typeof p&&p.length>0&&(h[p]=!t.active),m&&t.active!==m.state){var g=m.node;if(t.active){var b=null;g&&g.children&&g.children.length>0&&(b=Or(g.children[0],"activated")),l.unshift((function(){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=mr(t);if(null!=l)if(i){var s=$(n.css),u=ir(n);vr(e,s,!0,l,n,r,o),yr(e,s,!0,l,n,u.show,r,o,(function(e){O(a)&&a("from enter")}))}else O(a)&&a();else O(a)&&a()}(u,g,d,t.route,e,n,b)}))}else{if(g&&g.children&&g.children.length>0){var w=Or(g.children[0],"deactivated");try{D(w)}catch(e){console.error(e)}}l.push((function(){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=mr(t);null!=l&&i?pr(e,$(n.css),!0,l,n,ir(n).hide,null,r,o,(function(e){O(a)&&a("from leave")})):O(a)&&a()}(u,g,d,t.route,e,n)}))}}var S={class:h,key:s},x=jr(d.viewTagProps,t.route,e);null!==x&&"object"===gr(x)&&(S.props=x);var k=jr(d.viewTagAttrs,t.route,e);null!==k&&"object"===gr(k)&&(S.attrs=k),t.route.viewTagAttrs&&"object"===gr(t.route.viewTagAttrs)&&(S.attrs?Object.assign(S.attrs,t.route.viewTagAttrs):S.attrs=t.route.viewTagAttrs);var A=jr(d.viewTag,t.route,e),j=c(A,S,[f]);if(o.set(s,new Rr(j,t.active)),n){var R=dr(u,d,t.route,e);j.data.hook=R}i.push(j)},f=0;f<a.length;f++)s(f);var h,v=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Sr(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(r.keys());try{for(v.s();!(h=v.n()).done;){var y=h.value;o.has(y)||p(t.parent,y)}}catch(e){v.e(e)}finally{v.f()}w[Ar]=o,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ur((function(){for(var n=function(n){D((function(){Reflect.apply(e[n],t,[])}))},r=0;r<e.length;r++)n(r)}))}(l,u);var m=jr(d.tag,null,-1),g={};for(var S in b)"props"!==S&&(g[S]=b[S]);return{v:c(m,g,i)}}();if("object"===gr(M))return M.v}else{var I,N=$(null!==(I=d.transition)&&void 0!==I&&I);v(t.parent,a,-1),v(t.parent,o,S+1),v(t.parent,s,-1);var K=q.slots.value;if(K.length>0){var F=K[0],L=F.route;L&&v(t.parent,r,L);var U=br({},h,"");for(var H in b)"props"!==H&&(U[H]=b[H]);null!==U.attrs&&"object"===gr(U.attrs)||(U.attrs={});var B,W=F.model;if(W.props)if("object"===gr(W.props))Object.assign(U.attrs,W.props);else if(!0===W.props&&"object"===gr(null===(B=F.route)||void 0===B?void 0:B.params)){var J;Object.assign(U.attrs,null===(J=F.route)||void 0===J?void 0:J.params)}null!==d.passProps&&"object"===gr(d.passProps)&&Object.assign(U.attrs,d.passProps);var z=c(W.component,U,[]);if(N){var V=dr(u,d,F.route,-1);viewTagNode.data.hook=V}return z}}}};function Er(e){return(Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}const Cr={name:"RouterLink",props:{tag:{type:[String],default:"a"},to:{type:[String,Object],required:!0},activeClass:String,exact:Boolean,exactActiveClass:String,event:{type:[String,Array],default:"click"}},render:function(e){var t=this.$router,n=this.$route,r={},o=t.options.linkActiveClass,i=t.options.linkExactActiveClass,a=null==o?"fox-router-link-active":o,l=null==i?"fox-router-link-exact-active":i,s=null==this.activeClass?a:this.activeClass,u=null==this.exactActiveClass?l:this.exactActiveClass;r[u]=function(e,t){return!!e&&("object"===Er(t)?t.path?e.path===t.path:e.name===t.name:"/"===t.charAt(0)?e.path===t:e.name===t)}(n,this.to),r[s]=this.exact?r[u]:function(e,t){return!!e&&("object"===Er(t)?t.path?0===e.path.indexOf(t.path):e.name===t.name:"/"===t.charAt(0)?0===e.path.indexOf(t):e.name===t)}(n,this.to);var c=t[Y](this.to),f=function(e){Tr(e)&&t.to(c)},h={click:Tr};Array.isArray(this.event)?this.event.forEach((function(e){h[e]=f})):h[this.event]=f;var v={class:r},y="#".concat(c.path);if("a"===this.tag)v.on=h,v.attrs={href:y};else{var p=_r(this.$slots.default);if(p){p.isStatic=!1;var d=p.data=extend({},p.data);for(var m in d.on=d.on||{},d.on){var g=d.on[m];m in h&&(d.on[m]=Array.isArray(g)?g:[g])}for(var b in h)b in d.on?d.on[b].push(h[b]):d.on[b]=f;(p.data.attrs=extend({},p.data.attrs)).href=y}else v.on=h}return e(this.tag,v,this.$slots.default)}};function Tr(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){var t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function _r(e){if(e)for(var t,n=0;n<e.length;n++){if("a"===(t=e[n]).tag)return t;if(t.children&&(t=_r(t.children)))return t}}function qr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Ir;!function(e){e[e.limitless=0]="limitless",e[e.once=1]="once"}(Ir||(Ir={}));var Nr=Symbol("registerKey"),Kr=function e(t,n){Mr(this,e),this.callback=t,this.policy=n},Fr=function(){function e(){Mr(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,Nr,new Map)}var t,n;return t=e,(n=[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this[Nr].get(e);r||(r=new Array,this[Nr].set(e,r));var o=!0===n?Ir.once:Ir.limitless,i=new Kr(t,o);return r.push(i),this}},{key:"off",value:function(e,t){if(!t)return this[Nr].delete(e),this;var n=this[Nr].get(e);if(n)for(var r=0;r<n.length;r++)if(n[r].callback===t){n.splice(r,1);break}return this}},{key:"bind",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.on(e,t,n)}},{key:"unbind",value:function(e,t){return this.off(e,t)}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"all",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n.length;if(o<1)return this;var i=n[o-1];if("function"!=typeof i)return console.error("callback can not benn empty"),this;for(var a=o-1,l=new Array(a),s=[].splice.call(n,0,a),u=function(t){e.once(s[t],(function(e){l[t]=e,0==(a-=1)&&Reflect.apply(i,{},l)}))},c=0;c<s.length;c++)u(c);return this}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=this[Nr].get(e);if(!o)return this;for(var i=function(e){var t=o[e];if(t.policy==Ir.once?o.splice(e,1):e++,"function"==typeof t.callback)try{D((function(){Reflect.apply(t.callback,{},n)}))}catch(e){console.error(e.message,e)}a=e},a=0;a<o.length;)i(a);return this}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Reflect.apply(this.emit,this,[e].concat(n))}}])&&qr(t.prototype,n),e}();function Dr(e){return(Dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $r(e,t){return($r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Lr(e,t){if(t&&("object"===Dr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ur(e){return(Ur=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Hr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Br(e,t,n){return t&&Hr(e.prototype,t),n&&Hr(e,n),e}function Wr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zr=Symbol("idKey"),Vr=Symbol("valueKey"),Gr=Symbol("childrenKey"),Xr=Symbol("growKey"),Yr=function e(t){Wr(this,e),Jr(this,Xr,!0),Jr(this,Vr,c()),Jr(this,Gr,new Map),this[zr]=t},Qr=function(){function e(){Wr(this,e)}return Br(e,[{key:"get",value:function(e,t){if("value"==t)return e[Vr].value;if("grow"===t)return e[Xr];var n=e[Gr].get(t);return n?to(n):e[Xr]?((n=eo(t))[Xr]=e[Xr],e[Gr].set(t,n),to(n)):void 0}},{key:"set",value:function(e,t,n){return"value"==t?(e[Vr].value=n,!0):"grow"===t?(e[Xr]=$(n),!0):null==n?(e[Gr].delete(t),!0):(console.error("illegal property:".concat(t)),!1)}},{key:"deleteProperty",value:function(e,t){return"value"===t||"grow"==t?(console.error("can not delete property:".concat(String(t))),!1):(e[Gr].delete(t),!0)}}]),e}(),Zr="__proxy__";function eo(e){var t=new Yr(e);return Reflect.set(t,Zr,new Proxy(t,new Qr)),t}function to(e){return Reflect.get(e,Zr)}var no=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$r(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Ur(t);if(n){var o=Ur(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Lr(this,e)});function o(){return Wr(this,o),r.call(this,"__root__")}return Br(o,[{key:"put",value:function(){var e=arguments.length;if(e<2)return console.error("参数至少包括一个(key, value)"),!1;for(var t=this,n=0;n<e-1;n++){var r=n<0||arguments.length<=n?void 0:arguments[n],o=void 0;t[Gr].has(r)?o=t[Gr].get(r):(o=eo(r),t[Gr].set(r,o)),t=o}return t[Vr].value=e-1<0||arguments.length<=e-1?void 0:arguments[e-1],!0}},{key:"get",value:function(){var e=arguments.length;if(0!==e){for(var t=this,n=0;n<e;n++){var r=n<0||arguments.length<=n?void 0:arguments[n];if(!t[Gr].has(r))return;t=t[Gr].get(r)}return t[Vr].value}}},{key:"remove",value:function(){var e=arguments.length;if(0==e)return!1;for(var t=this,n=0;n<e-1;n++){var r=n<0||arguments.length<=n?void 0:arguments[n];if(!t[Gr].has(r))return!1;t=t[Gr].get(r)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return!!t[Gr].has(o)&&(t[Gr].delete(o),!0)}},{key:"contains",value:function(){var e=arguments.length;if(0==e)return!1;for(var t=this,n=0;n<e-1;n++){var r=n<0||arguments.length<=n?void 0:arguments[n];if(!t[Gr].has(r))return!1;t=t[Gr].get(r)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return t[Gr].has(o)}},{key:"clear",value:function(){this[Gr].clear()}}]),o}(Yr),ro=(Symbol("treeKey"),["put","get","contains","remove","clear"]);function oo(e){return ro.includes(e)}var io=function(){function e(){Wr(this,e)}return Br(e,[{key:"get",value:function(e,t){if("value"==t)return e[Vr].value;if("grow"===t)return e[Xr];if(t===Gr)return e[Gr];if("string"==typeof t&&oo(t))return e[t];var n=String(t),r=e[Gr].get(n);return r?to(r):e[Xr]?((r=eo(n))[Xr]=e[Xr],e[Gr].set(n,r),to(r)):void 0}},{key:"set",value:function(e,t,n){return"value"==t?(e[Vr].value=n,!0):"grow"===t?(e[Xr]=$(n),!0):!oo(t)&&(null==n?(e[Gr].delete(t),!0):(console.error("illegal property:".concat(t)),!1))}},{key:"deleteProperty",value:function(e,t){return"value"===t||"grow"==t?(console.error("can not delete property:".concat(String(t))),!1):(e[Gr].delete(t),!0)}}]),e}(),ao=new Proxy(no,{construct:function(e){return to((t=new no,n=new io,r=new Proxy(t,n),o={put:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.put,t,n)},get:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.get,t,n)},remove:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.remove,t,n)},contains:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.contains,t,n)},clear:function(){return Reflect.apply(t.clear,t,[])}},Object.assign(o,r),Reflect.set(t,Zr,r),t));var t,n,r,o}}),lo={get each(){return z},get type(){return U},get isFunction(){return O},get isArray(){return j},get isArrayLike(){return B},get makeArray(){return J},get merge(){return W},get isWindow(){return H},get isPlainObject(){return P},get isEqual(){return V},get isESModule(){return C}};function so(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?so(Object(n),!0).forEach((function(t){co(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):so(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function co(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Symbol("fk");var fo=new Hn({}),ho=new ao,vo=new Fr,yo=!1;const po=uo(uo({},lo),{},{get router(){return fo},get bus(){return ho},get Bus(){return ao},get eventproxy(){return vo},get EventProxy(){return Fr},get EventChain(){return ft},get require(){return fo.require},get ajax(){return $e},get extend(){return _},get clone(){return q},install:function(e){yo||(yo=!0,function(e){n=e}(e),e.component(Bn,Pr),e.component("fox-router-link",Cr),Object.defineProperty(e.prototype,"$fox",{get:function(){return this._routerRoot._fox}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Reflect.defineProperty(e.prototype,"$route",{get:function(){return y(this,r,null)}}),Reflect.defineProperty(e.prototype,"$bus",{get:function(){return this._routerRoot._fox.bus}}),e.prototype.$fox_on=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];vo.on(e,t,n)},e.prototype.$fox_off=function(e,t){vo.off(e,t)},e.prototype.$fox_once=function(e,t){vo.once(e,t)},e.prototype.$fox_all=function(){for(var e=vo,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Reflect.apply(e.all,e,n)},e.prototype.$fox_trigger=function(e){for(var t=vo,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];Reflect.apply(t.trigger,t,[e].concat(r))},e.prototype.$fox_emit=function(e){for(var t=vo,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];Reflect.apply(t.trigger,t,[e].concat(r))},e.mixin({beforeCreate:function(){this.$options.fox?(this._routerRoot=this,this._fox=this.$options.fox,this._router=this._fox.router,this._router.init()):this._routerRoot=this.$parent&&this.$parent._routerRoot||this},mounted:function(){},destroyed:function(){}}))}});return t})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fox-js/fox",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
4
4
  "keywords": [
5
5
  "Router",
6
6
  "Vue2",
@@ -15,6 +15,7 @@
15
15
  },
16
16
  "scripts": {
17
17
  "publish:beta": "npm version prerelease & npm publish --tag beta",
18
+ "publish:legacy": "npm version prerelease & npm publish --tag legacy",
18
19
  "publish:latest": "npm version patch & npm publish"
19
20
  },
20
21
  "dependencies": {},