@fox-js/fox 2.1.30 → 2.1.32

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 +1 -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,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(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:function(){return _o}}),Symbol("rk");var r=Symbol("crk"),n=Symbol("vd"),o=Symbol("rv"),i=Symbol("rvi"),a=Symbol("pv"),u=Symbol("pvi");function l(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var o=1,i="";if("?"===e[u=r+1])throw new TypeError('Pattern cannot start with "?" at '.concat(u));for(;u<e.length;)if("\\"!==e[u]){if(")"===e[u]){if(0==--o){u++;break}}else if("("===e[u]&&(o++,"?"!==e[u+1]))throw new TypeError("Capturing groups are not allowed at ".concat(u));i+=e[u++]}else i+=e[u++]+e[u++];if(o)throw new TypeError("Unbalanced pattern at ".concat(r));if(!i)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:i}),r=u}else{for(var a="",u=r+1;u<e.length;){var l=e.charCodeAt(u);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;a+=e[u++]}if(!a)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:a}),r=u}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,i="[^".concat(c(t.delimiter||"/#?"),"]+?"),a=[],u=0,l=0,s="",f=function(e){if(l<r.length&&r[l].type===e)return r[l++].value},v=function(e){var t=f(e);if(void 0!==t)return t;var n=r[l],o=n.type,i=n.index;throw new TypeError("Unexpected ".concat(o," at ").concat(i,", expected ").concat(e))},h=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};l<r.length;){var y=f("CHAR"),p=f("NAME"),d=f("PATTERN");if(p||d){var m=y||"";-1===o.indexOf(m)&&(s+=m,m=""),s&&(a.push(s),s=""),a.push({name:p||u++,prefix:m,suffix:"",pattern:d||i,modifier:f("MODIFIER")||""})}else{var g=y||f("ESCAPED_CHAR");if(g)s+=g;else if(s&&(a.push(s),s=""),f("OPEN")){m=h();var b=f("NAME")||"",w=f("PATTERN")||"",S=h();v("CLOSE"),a.push({name:b||(w?u++:""),pattern:b&&!w?i:w,prefix:m,suffix:S,modifier:f("MODIFIER")||""})}else v("END")}}return a}function s(e,t){var r=[];return function(e,t,r){void 0===r&&(r={});var n=r.decode,o=void 0===n?function(e){return e}:n;return function(r){var n=e.exec(r);if(!n)return!1;for(var i=n[0],a=n.index,u=Object.create(null),l=function(e){if(void 0===n[e])return"continue";var r=t[e-1];"*"===r.modifier||"+"===r.modifier?u[r.name]=n[e].split(r.prefix+r.suffix).map((function(e){return o(e,r)})):u[r.name]=o(n[e],r)},s=1;s<n.length;s++)l(s);return{path:i,index:a,params:u}}}(v(e,r,t),r,t)}function c(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function f(e){return e&&e.sensitive?"":"i"}function v(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,o=r.exec(e.source);o;)t.push({name:o[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),o=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return v(e,t,r).source}));return new RegExp("(?:".concat(n.join("|"),")"),f(r))}(e,t,r):function(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,i=r.start,a=void 0===i||i,u=r.end,l=void 0===u||u,s=r.encode,v=void 0===s?function(e){return e}:s,h=r.delimiter,y=void 0===h?"/#?":h,p=r.endsWith,d="[".concat(c(void 0===p?"":p),"]|$"),m="[".concat(c(y),"]"),g=a?"^":"",b=0,w=e;b<w.length;b++){var S=w[b];if("string"==typeof S)g+=c(v(S));else{var x=c(v(S.prefix)),k=c(v(S.suffix));if(S.pattern)if(t&&t.push(S),x||k)if("+"===S.modifier||"*"===S.modifier){var j="*"===S.modifier?"?":"";g+="(?:".concat(x,"((?:").concat(S.pattern,")(?:").concat(k).concat(x,"(?:").concat(S.pattern,"))*)").concat(k,")").concat(j)}else g+="(?:".concat(x,"(").concat(S.pattern,")").concat(k,")").concat(S.modifier);else"+"===S.modifier||"*"===S.modifier?g+="((?:".concat(S.pattern,")").concat(S.modifier,")"):g+="(".concat(S.pattern,")").concat(S.modifier);else g+="(?:".concat(x).concat(k,")").concat(S.modifier)}}if(l)o||(g+="".concat(m,"?")),g+=r.endsWith?"(?=".concat(d,")"):"$";else{var A=e[e.length-1],O="string"==typeof A?m.indexOf(A[A.length-1])>-1:void 0===A;o||(g+="(?:".concat(m,"(?=").concat(d,"))?")),O||(g+="(?=".concat(m,"|").concat(d,")"))}return new RegExp(g,f(r))}(l(e,r),t,r)}(e,t,r)}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function y(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function m(e){return m="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},m(e)}var g=Array.isArray,b=function(e){return"function"==typeof e},w=Object.prototype.toString,S=function(e){return"[object Object]"===(t=e,w.call(t));var t},x="function"==typeof Symbol&&"symbol"===m(Symbol.toStringTag);function k(e){return e.__esModule||x&&"Module"===e[Symbol.toStringTag]}var j="undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]");function A(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o=void 0!==t[0]&&null!==t[0]?t[0]:{},i=1,a=t.length,u=!1;for("boolean"==typeof o&&(u=o,o=null!==(n=t[i])&&void 0!==n?n:{},i++),"object"!==m(o)&&(o={});i<a;i++)if(null!==t[i]&&void 0!==t[i]){var l=t[i];for(var s in l){var c=o[s],f=l[s];if(c!==f)if(!0===u&&f&&"object"===m(f)){var v;v=Array.isArray(f)?c&&Array.isArray(c)?c:[]:c&&"object"===m(c)?c:{},o[s]=A(u,v,f)}else void 0!==f&&(o[s]=f)}}return o}function O(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r){if("object"!==m(t))return{};for(var n in"object"!==m(e)&&(e={}),t){var o=e[n],i=t[n];if(o!==i)if("object"===m(i)){if(!Array.isArray(i)&&!S(i))continue;o=O(o,i,r),e[n]=o}else{if("function"==typeof i)continue;e[n]=i}}var a,u=p(Object.getOwnPropertySymbols(t));try{for(u.s();!(a=u.n()).done;){var l=a.value,s=e[l],c=t[l];if(s!==c)if("object"===m(c)){if(!Array.isArray(c)&&!S(c))continue;s=O(s,c,r),e[l]=s}else{if("function"==typeof c)continue;e[l]=c}}}catch(e){u.e(e)}finally{u.f()}}else A(!0,e,t);return e}var R,P,E,C=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,r=[{key:"get",value:function(){var t=++e.seed;return t>=Number.MAX_VALUE&&(e.seed=0),t}}],null&&h(t.prototype,null),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();R=C,P="seed",E=(new Date).getTime(),(P=y(P))in R?Object.defineProperty(R,P,{value:E,enumerable:!0,configurable:!0,writable:!0}):R[P]=E;var T=j?Promise.resolve():null;function q(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];null!==T?r&&r.length>0?T.then((function(){e(r)})):T.then(e):r&&r.length>0?setTimeout((function(){e(r)})):setTimeout(e)}function _(e){return null!=e&&("boolean"==typeof e?e:"string"==typeof e?"true"===e.toLocaleLowerCase():Boolean(e))}var F={"[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 M(e){var t=Object.prototype.toString.call(e);return null==e?String(e):F[t]||"object"}function I(e){return e&&"object"===m(e)&&"setInterval"in e}function N(e){var t=!!e&&"length"in e&&e.length,r=M(e);return"function"!==r&&!I(e)&&("array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e)}function K(e,t){for(var r=+t.length,n=0,o=e.length;n<r;n++)e[o++]=t[n];return e.length=o,e}function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null!=e&&(N(Object(e))?K(t,"string"==typeof e?[e]:e):t.push(e)),t}function $(e,t,r){if(N(e))Reflect.apply([].forEach,e,[t]);else for(var n in e)if(r&&e.hasOwnProperty(n)){if(!1===Reflect.apply(t,e,[e[n]]))break}else if(!1===Reflect.apply(t,e,[e[n]]))break;return e}function L(e,t){if(e==t)return!0;if(void 0===e||void 0===t)return!1;var r=M(e);if(r!==M(t))return!1;if("object"===r){var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++){var a=n[i];if(!L(e[a],t[a]))return!1}return!0}if("array"===r){if(e.length!==t.length)return!1;for(var u=0;u<e.length;u++)if(!L(e[u],t[u]))return!1;return!0}return!1}var U=function(e){var t,r={},n=p(Reflect.ownKeys(e));try{for(n.s();!(t=n.n()).done;){var o=t.value,i=e[o];i&&!Array.isArray(i)&&"object"===m(i)&&(i=U(i)),"symbol"===m(o)?r[String(o)]=i:r[o]=i}}catch(e){n.e(e)}finally{n.f()}return r},B=/^Symbol\((.*)\)$/,H=function(e){var t,r={},n=p(Reflect.ownKeys(e));try{for(n.s();!(t=n.n()).done;){var o=t.value,i=e[o];i&&!Array.isArray(i)&&"object"===m(i)&&(i=H(i));var a=B.exec(o);a&&a[1]?r[Symbol.for(a[1])]=i:r[o]=i}}catch(e){n.e(e)}finally{n.f()}return r},J="default",W=Symbol("sync"),z=Symbol("resolveRoute");function V(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Reflect.apply(e,{},n)}}}function G(e){return G="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},G(e)}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,te(n.key),n)}}function Q(e,t,r){return t&&Y(e.prototype,t),r&&Y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(e,t,r){return(t=te(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function te(e){var t=function(e){if("object"!=G(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=G(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==G(t)?t:t+""}var re,ne=Q((function e(t,r,n,o){Z(this,e),ee(this,"rootIndex",0),this.name=t,this.level=r,this.rootName=n,this.rootIndex=o})),oe=function(){function e(t,r){Z(this,e),ee(this,"data",{}),this.to=t,this.from=r}return Q(e,null,[{key:"from",value:function(t){var r,n=new e(t.to,t.from),o=null!==(r=t.data)&&void 0!==r?r:{};return A(!0,n.data,o),n}},{key:"clear",value:function(e){for(var t in e)e[t]=void 0}}])}(),ie=function(){function e(){Z(this,e)}return Q(e,[{key:"fullPath",get:function(){var e,t,r=null!==(e=this.path)&&void 0!==e?e:"/".concat(this.name);return"".concat(null!==(t=this.root)&&void 0!==t?t:J,"!").concat(r)}}],[{key:"clone",value:function(t,r){var n=new e;return O(n,t,r),n}},{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 r=new e;if(null==t)return r;var n=r;for(var o in t){var i=t[o];n[o]=i}var a=Object.getOwnPropertySymbols(t);if(Array.isArray(a)&&a.length>0){var u,l=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return X(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(a);try{for(l.s();!(u=l.n()).done;){var s=u.value;n[s]=t[s]}}catch(e){l.e(e)}finally{l.f()}}return r}}])}(),ae=function(){return Q((function e(t,r,n,o){Z(this,e),this.id=C.get(),this.name=t,this.src=r,"function"!=typeof r&&(this.component=r),this.props=n,this.meta=o}),[{key:"isResolved",get:function(){return void 0!==this.component}},{key:"resolve",value:function(){return t=(e=this).src,new Promise((function(r,n){var o,i=V((function(t){k(t)&&(t=t.default),e.component=t,r()})),a=V((function(e){var t="failed to resolve async component ".concat(e);n(t)}));try{o=t(i,a)}catch(e){a(e)}if(o)if("function"==typeof o.then)o.then(i,a);else{var u=o.component;u&&"function"==typeof u.then&&u.then(i,a)}}));var e,t}}])}(),ue=Q((function e(){Z(this,e),ee(this,"models",[])})),le=Q((function e(){Z(this,e),ee(this,"layers",[])})),se=function(e){return e[e.Push=0]="Push",e[e.Replace=1]="Replace",e[e.Put=2]="Put",e[e.Append=3]="Append",e[e.Open=4]="Open",e}({}),ce=function(e){return e[e.Part=0]="Part",e[e.All=1]="All",e}({}),fe=Symbol("valueKey"),ve=Symbol("pvds"),he=Symbol("sk");function ye(e,t,r,n){var o=e[ve];if(o||(o=e[ve]=new Map),n){var i=o.get(n);i||(i=new Map,o.set(n,i)),i.set(t,r)}else o.set(t,r)}function pe(e,t,r){for(var n=e.$vnode?e.$vnode.data:{},o=n[he],i=e.$parent;i&&i._routerRoot!==i;){var a=i[ve];if(a){if(o){var u=a.get(o);if(u&&u.has(t))return u.get(t)}if(a.has(t))return a.get(t)}var l=(n=i.$vnode?i.$vnode.data:{})[he];void 0!==l&&(o=l),i=i.$parent}return r}function de(e,t){if(t){var r=e[ve];r&&r&&r.has(t)&&r.delete(t)}else Reflect.deleteProperty(e,ve)}function me(e){return me="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},me(e)}function ge(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,xe(n.key),n)}}function be(e,t,r){return t&&ge(e.prototype,t),r&&ge(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function we(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t,r){return(t=xe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xe(e){var t=function(e){if("object"!=me(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==me(t)?t:t+""}var ke=Symbol("rootKey"),je=Symbol("rootNodeKey"),Ae=Symbol("parentNodeKey"),Oe=Symbol("nameKey"),Re=be((function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];we(this,e),Se(this,"active",!0),Se(this,"index",0),this.route=t,this.model=r,this.index=n,this.active=o})),Pe=function(){return be((function e(t,r,n){we(this,e),Se(this,je,null),Se(this,Ae,null),this[Oe]=t,this[ke]=r,n&&(this[je]=n)}),[{key:"slots",get:function(){return null==this._slots&&(this._slots=function(){if(re){var e={};return re.util.defineReactive(e,"value",[],void 0,!0),e}var t={};return Reflect.defineProperty(t,"value",{get:function(){return t[fe]},set:function(e){return t[fe]=e}}),t}()),this._slots}},{key:"empty",get:function(){return null==this._slots||0==this._slots.value.length}},{key:"name",get:function(){return this[Oe]}}])}(),Ee=function(){return be((function e(t,r,n){we(this,e),this.view=t,this.index=r,this.level=n}),null,[{key:"include",value:function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(n.view===t.view&&(-1==t.index||n.index===t.index)&&n.level===t.level)return!0}return!1}}])}(),Ce=be((function e(){we(this,e),Se(this,"views",[])})),Te=be((function e(){we(this,e),Se(this,"layers",[])}));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},qe(e)}function _e(e,t,r){return(t=Ie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ie(n.key),n)}}function Me(e,t,r){return t&&Fe(e.prototype,t),r&&Fe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ie(e){var t=function(e){if("object"!=qe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qe(t)?t:t+""}function Ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Ke=Me((function e(){Ne(this,e)})),De=function(){return Me((function e(){Ne(this,e),_e(this,"forbidTime",300),_e(this,"submitRecorder",new Ke)}),[{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)}}])}(),$e="undefined"!=typeof window,Le=function(){return window},Ue=function(){return window.document};function Be(){if(!$e)return"/";var e,t,r=Le().location;return"".concat(r.protocol,"//").concat(r.host)+((t=(e=r.pathname).lastIndexOf("/"))>0&&t<e.length-1?e=e.substring(0,t+1):0===t&&-1!==e.indexOf(".")?e="/":-1===t&&(e=-1==e.indexOf(".")?"/".concat(e,"/"):"/"),0!==e.indexOf("/")&&(e="/".concat(e)),e)}function He(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent?e.attachEvent("on".concat(t),r):e["on".concat(t)]=r}function Je(e,t,r){e.removeEventListener?e.removeEventListener(t,r):e.detachEvent?e.detachEvent("on".concat(t),r):e["on".concat(t)]=null}function We(e){return We="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},We(e)}function ze(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ve(n.key),n)}}function Ve(e){var t=function(e){if("object"!=We(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=We(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==We(t)?t:t+""}Be();var Ge=function(e){return e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Defining=2]="Defining",e[e.Defined=3]="Defined",e}({}),Xe=function(e){return e[e.normal=0]="normal",e[e.factory=1]="factory",e}({}),Ye=function(){return function(e,t){return t&&ze(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,r){(t=Ve(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"register",new Map)}),[{key:"get",value:function(e){var t;return null!==(t=this.register.get(e))&&void 0!==t?t:null}},{key:"set",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),null!=t?t:null}},{key:"has",value:function(e){return this.register.has(e)}},{key:"clear",value:function(){this.register.clear()}}])}();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},Qe(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 r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,nt(n.key),n)}}function rt(e,t,r){return(t=nt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nt(e){var t=function(e){if("object"!=Qe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qe(t)?t:t+""}var ot=function(e){return e.Busy="Busy",e.Free="Free",e.Reject="Reject",e.Exception="Exception",e.Finished="Finished",e}(ot||{}),it=Symbol("chainKey"),at=Symbol("cursorKey"),ut=Symbol("$persistentModeKey"),lt=Symbol("statusKey"),st=Symbol("argsKey"),ct=Symbol("exArgsKey"),ft=Symbol("successFnsKey"),vt=Symbol("errorFnsKey"),ht=Symbol("sessionKey"),yt=Symbol("_go"),pt=function(){return function(e,t){return t&&tt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),rt(this,it,[]),rt(this,at,0),rt(this,ut,!1),rt(this,lt,ot.Free),rt(this,st,[]),rt(this,ct,[]),rt(this,ft,[]),rt(this,vt,[]),this[ht]=t,this[ut]=r}),[{key:"session",get:function(){return this[ht]}},{key:yt,value:function(e){var t=this,r=this[lt];this[lt]=ot.Busy,this[at]+=e,this[at]<0&&(this[at]=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];if(this[st]=o,r===ot.Exception||r===ot.Reject){for(var a=[{session:this[ht]}].concat(Ze(this[ct])),u=function(){try{var e=t[vt].shift();"function"==typeof e&&q((function(){Reflect.apply(e,{},a)}))}catch(e){console.error(e.message,e)}};this[vt].length>0;)u();return this[lt]=r,this[it]=[],this[at]=0,this}if(r===ot.Finished||this[at]>=this[it].length){for(var l=[{session:this[ht]}].concat(Ze(this[st])),s=function(){var e=t[ft].shift();"function"==typeof e&&q((function(){Reflect.apply(e,{},l)}))};this[ft].length>0;)s();return this[lt]=ot.Free,this}if(this[at]>=this[it].length)return this[lt]=ot.Free,this;var c=this[it][this[at]];this[ut]||(this[it].splice(0,this[at]+1),this[at]=-1);var f=this[at]+1;try{var v=!1,h={go:function(e){if(!v){v=!0;for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];Reflect.apply(t[yt],t,[e].concat(n))}},resolve:function(){if(!v){v=!0;for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];Reflect.apply(t[yt],t,[1].concat(r))}},reject:function(){if(!v){v=!0;for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];Reflect.apply(t.reject,t,[].concat(r))}},insert:function(e){v||(t[it].splice(f,0,e),f++)},session:this[ht]};q((function(){Reflect.apply(c,{},[h].concat(Ze(t[st])))}))}catch(e){this.throw(e)}return this}},{key:"go",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Reflect.apply(this[yt],this,[e].concat(r))}},{key:"finish",value:function(){this[lt]=ot.Finished;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this[st]=t,Reflect.apply(this[yt],this,[0])}},{key:"reject",value:function(){this[lt]=ot.Reject;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this[ct]=t,Reflect.apply(this[yt],this,[0])}},{key:"throw",value:function(){this[lt]=ot.Exception;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this[ct]=t,Reflect.apply(this[yt],this,[0])}},{key:"reset",value:function(){var e=this;this[lt]=ot.Busy;for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this[st]=r,this[it]=[],this[at]=0;for(var o=[{session:this[ht]}].concat(Ze(this[st])),i=function(){var t=e[ft].shift();q((function(){Reflect.apply(t,e,o)}))};this[ft].length>0;)i();return this[lt]=ot.Free,this}},{key:"post",value:function(e){return this[lt]===ot.Reject||this[lt]===ot.Exception||(Array.isArray(e)?this[it]=[].concat(Ze(this[it]),Ze(e)):this[it].push(e),this[lt]===ot.Busy||Reflect.apply(this[yt],this,[0].concat(Ze(this[st])))),this}},{key:"wait",value:function(e,t){return e&&"function"==typeof e&&this[ft].push(e),t&&"function"==typeof t&&this[vt].push(t),this[lt]===ot.Busy||Reflect.apply(this[yt],this,[0].concat(Ze(this[st]))),this}},{key:"exception",value:function(e){return e&&"function"==typeof e&&this[vt].push(e),this[lt]===ot.Busy?this:Reflect.apply(this[yt],this,[0].concat(Ze(this[st])))}},{key:"isFinish",value:function(){return this[lt]==ot.Reject||this[lt]==ot.Free&&this[at]>=this[it].length}}])}();function dt(e){return dt="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},dt(e)}function mt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,St(n.key),n)}}function bt(e,t,r){return t&&gt(e.prototype,t),r&&gt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function wt(e,t,r){return(t=St(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function St(e){var t=function(e){if("object"!=dt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=dt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dt(t)?t:t+""}var xt=function(){return bt((function e(){mt(this,e),wt(this,"moduleManager",new Ye),wt(this,"options",{paths:{},alias:{},nature:[],timeout:3e3})}),[{key:"paths",get:function(){return this.options.paths},set:function(e){this.options.paths=e}},{key:"alias",get:function(){return this.options.alias},set:function(e){this.options.alias=e}},{key:"naturePaths",get:function(){return this.options.nature},set:function(e){this.options.nature=e}},{key:"timeout",get:function(){return this.options.timeout},set:function(e){this.options.timeout=e}},{key:"query",get:function(){return this._query},set:function(e){this._query=e}},{key:"head",get:function(){return Ue().head}},{key:"setModule",value:function(e,t){var r={id:e,src:"",status:Ge.Defined};"function"==typeof t?(r.exports=t,r.type=Xe.factory):r.exports=t,this.moduleManager.set(e,r)}},{key:"removeModule",value:function(e){this.moduleManager.remove(e)}},{key:"ensure",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=[],o=t.length-1,i={};"object"===dt(t[o])&&(Object.assign(i,t[o]),o--);var a=null;"function"==typeof t[o]&&(a=t[o],o--);for(var u=0;u<=o;u++)if(Array.isArray(t[u]))for(var l=t[u],s=0;s<l.length;s++)l[s]&&n.push(this.resolvePath(l[s]));else if("string"==typeof t[u])for(var c=t[u].split(","),f=0;f<c.length;f++)c[f]&&n.push(this.resolvePath(c[f]));for(var v=new jt(n.length,(function(e,t){if(v.isOK())try{"function"==typeof a&&Reflect.apply(a,{},t)}catch(e){console.error(e.message,e)}else try{console.error(e),"function"==typeof a&&Reflect.apply(a,{},[])}catch(e){console.error(e.message,e)}})),h=new pt,y=0;y<n.length;y++){var p=new At(y,n[y],i,v);this.mount(h,p)}return this}},{key:"remove",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=[],i=r.length-1,a={};"object"===dt(r[i])&&(Object.assign(a,r[i]),i--);var u=null;"function"==typeof r[i]&&(u=r[i],i--);for(var l=0;l<=i;l++)if(Array.isArray(r[l]))for(var s=r[l],c=0;c<s.length;c++)s[c]&&o.push(this.resolvePath(s[c]));else for(var f=r[l].split(","),v=0;v<f.length;v++)f[v]&&o.push(this.resolvePath(f[v]));return o.forEach((function(t){e.unmount(t,a)})),"function"==typeof u&&Reflect.apply(u,{},[]),this}},{key:"mount",value:function(e,t){if("exports"!==t.src)if("module"!==t.src){if(this.isNaturePath(t.src)){var r=t.params.jsPoint;return r||(r=this.head),void this.mountJS(e,t,r)}if(this.isNaturePath(t.src)){var n=t.params.cssPoint;return n||(n=this.head),void this.mountCSS(e,t,n)}var o=this.getFileNamePostfix(t.src);if("js"===o||0===o.length){var i=t.params.jsPoint;return i||(i=this.head),void this.mountJS(e,t,i)}if("css"===o){var a=t.params.cssPoint;return a||(a=this.head),void this.mountCSS(e,t,a)}}else e.post((function(e){t.progress.work(!0,t.index,"module"),e.resolve()}));else e.post((function(e){t.progress.work(!0,t.index,"exports"),e.resolve()}))}},{key:"mountCSS",value:function(e,t,r){var n=this;e.post((function(e){var o=t.src,i=n.moduleManager.get(o);if(i&&(i.status==Ge.Defined||i.status==Ge.Loaded)&&i.exports)return i.type===Xe.factory&&"function"==typeof i.exports?t.progress.work(!0,t.index,i.exports()):t.progress.work(!0,t.index,i.exports),void e.resolve();var a=Ue(),u=a.createElement("link");if(Reflect.has(u,"onload"))u.onload=function(){u.onload=null,u.onerror=null,t.progress.work(!0,t.index,t.src),e.resolve()},u.onerror=function(){try{r.removeChild(u)}catch(e){console.error(e.message,e)}u.onload=null,u.onerror=null,t.progress.work(!1,t.index,null),e.reject()};else{var l,s={timeout:null!==(l=n.options.timeout)&&void 0!==l?l:3e3,time:0,success:function(){t.progress.work(!0,t.index,t.src),e.resolve()},error:function(){try{r.removeChild(u)}catch(e){console.error(e.message,e)}t.progress.work(!1,t.index,null),e.resolve()}};setTimeout((function(){kt(u,s)}),1)}var c=a.getElementById(o);c&&c.parentNode&&c.parentNode.removeChild(c),u.rel="stylesheet",u.type="text/css",u.id=o,u.href=o,r.appendChild(u)}))}},{key:"mountJS",value:function(e,t,r){var n=this;e.post((function(e){var o=t.src,i=n.moduleManager.get(o);if(i&&(i.status==Ge.Defined||i.status==Ge.Loaded)){if(i.exports)return i.type===Xe.factory&&"function"==typeof i.exports?t.progress.work(!0,t.index,i.exports()):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={id:o,src:o,status:Ge.Loading},n.moduleManager.set(o,i);var a=Ue().createElement("script");if("onload"in a)a.onload=function(){a.onload=null,a.onerror=null,i.status===Ge.Loading&&(i.status=Ge.Loaded,t.progress.work(!0,t.index,o)),e.resolve()},a.onerror=function(){try{r.removeChild(a)}catch(e){console.error(e.message,e)}a.onload=null,a.onerror=null,n.moduleManager.remove(o),t.progress.work(!1,t.index,null),e.resolve()};else{var u=a;u.onreadystatechange=function(){/loaded|complete/.test(u.readyState)&&(u.onreadystatechange=null,i.status==Ge.Loading&&(i.status=Ge.Loaded,t.progress.work(!0,t.index,o)),e.resolve())}}a.defer=!0,a.src=o,Le().define=n.createDefine(i,t),r.appendChild(a)}))}},{key:"unmount",value:function(e){var t=Ue(),r=this.getFileNamePostfix(e);if("js"===r||0===r.length){var n=t.querySelector('script[src="'.concat(e,'"]'));return n&&n.parentNode&&n.parentNode.removeChild(n),void this.moduleManager.remove(e)}if("css"!==r);else{var o=t.querySelector('style[href="'.concat(e,'"]'));o&&o.parentNode&&o.parentNode.removeChild(o)}}},{key:"trimEmptyElement",value:function(e){for(var t=[],r=0;r<e.length;r++)if(void 0!==e[r]&&null!==e[r]){var n=e[r].trim();0!==n.length&&t.push(n)}return t}},{key:"createDefine",value:function(e,t){var r=this,n=function(){var n,o,i;e.status=Ge.Defining;var a=arguments.length;1===a?(i=arguments.length<=0?void 0:arguments[0],n=void 0):2===a?(i=arguments.length<=1?void 0:arguments[1],Array.isArray(arguments.length<=0?void 0:arguments[0])?(o=r.trimEmptyElement(arguments.length<=0?void 0:arguments[0]),n=void 0):o=void 0):(n=arguments.length<=0?void 0:arguments[0],o=r.trimEmptyElement(arguments.length<=1?void 0:arguments[1]),i=arguments.length<=2?void 0:arguments[2]),n&&(e.id=n,r.options.alias[n]=e.src),o&&o.length>0?r.ensure(o,(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];var a=n.map((function(t){return"exports"===t?(e.exports&&"object"===dt(e.exports)||(e.exports={}),e.exports):"module"===t?e:t}));if("function"==typeof i){var u=Reflect.apply(i,e,a);u&&"object"===dt(u)&&(e.exports=u)}else e.exports=i;e.status=Ge.Defined,t.progress.work(!0,t.index,e.exports)})):(e.exports="function"==typeof i?Reflect.apply(i,e,[]):i,e.status=Ge.Defined,t.progress.work(!0,t.index,e.exports))};return n.amd=!0,n}},{key:"resolvePath",value:function(e){try{if("exports"===e||"module"===e)return e;if(this.isNaturePath(e))return e;e=this.parserPath(e,!0);var t=this.getFileNamePostfix(e);t=t.toLowerCase();var r=this.createSearch(this.query);return-1==e.indexOf("?")?("js"!==t&&"css"!==t&&(e+=".js"),r.length>0&&(e+="?".concat(r))):r.length>0&&(e+="&".concat(r)),e}catch(t){throw console.error("resolve path[".concat(e,"] fail"),t),t}}},{key:"createSearch",value:function(e){var t="";if(e){for(var r in e){var n="".concat(e[r]);t+="".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(n),"&")}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 r=e.lastIndexOf(".",t);return-1==r?"":e.substring(r+1,t)}},{key:"isNaturePath",value:function(e){if(!this.options.nature)return!1;if("function"==typeof this.options.nature)return this.options.nature(e);var t=this.options.nature;if(t&&Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(0===e.indexOf(n))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"".concat(Be()).concat(e.slice(1));if(0==e.indexOf("./"))return"".concat(Be()).concat(e.slice(2));if(0==e.indexOf("//")){var r=Le();return"".concat(r.location.protocol).concat(e)}if(t){var n=this.options.alias[e];if(!n){var o=e.indexOf("/");if(-1==o)n=e;else{var i=e.slice(0,o),a=this.options.paths[i];n=a?a+e.slice(o):e}}return this.parserPath(n,!1)}return"".concat(Be()).concat(e)}}])}();function kt(e,t){var r=e.sheet,n=!1;if(t.isOldWebKit)r&&(n=!0);else if(r)try{r.cssRules&&(n=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(n=!0)}setTimeout((function(){t.time+=20,n?t.success():t.timeout>t.timeout?t.error():kt(e,t)}),20)}var jt=function(){return bt((function e(t,r){mt(this,e),this.size=t,this.callback=r,this.status=!0,this.values=[],this.lastIndex=-1}),[{key:"work",value:function(e,t,r){if(this.status=e,!0===this.status&&(this.lastIndex!==t&&this.size--,this.lastIndex=t,this.values.push(r)),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}}])}(),At=bt((function e(t,r,n,o){mt(this,e),this.index=t,this.src=r,this.params=n,this.progress=o}));function Ot(e){return Ot="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},Ot(e)}function Rt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Et(n.key),n)}}function Pt(e,t,r){return t&&Rt(e.prototype,t),r&&Rt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Et(e){var t=function(e){if("object"!=Ot(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ot(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ot(t)?t:t+""}var Ct=Symbol("_notifyChange"),Tt=Pt((function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.currentRoute=t,this.routes=r}));function qt(e){return qt="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},qt(e)}function _t(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ft(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ft(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Mt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Nt(n.key),n)}}function It(e,t,r){return(t=Nt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nt(e){var t=function(e){if("object"!=qt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qt(t)?t:t+""}var Kt=Symbol("historyChangeConsumerKey"),Dt=Symbol("_navigateFirstRoute"),$t=Symbol("_getRouteMark"),Lt=Symbol("_getUrlSearch"),Ut=Symbol("_generateLocation"),Bt=Symbol("_setRouteMarkRecorder"),Ht=Symbol("beforeRestoreFiltersKey"),Jt=Symbol("_beforeRestore"),Wt="Symbol(_fox_restore_point)";function zt(e){if("function"==typeof e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Reflect.apply(e,null,[].concat(r))}return e}function Vt(e){if(!Array.isArray(e))return!1;if(0===e.length)return!0;var t=e[0];return!(!Reflect.has(t,"path")||!Reflect.has(t,"root"))}var Gt=function(){return function(e,t){return t&&Mt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"hash",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=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],u=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),It(this,"firstNavigate",!0),It(this,"traceless",!1),It(this,Kt,!1),It(this,Ht,new Array),It(this,"backTimeout",320),this.mode=t,this.base=r,this.query=n,this.firstNavigate=o,this.historyMonitor=i,this.traceless=a,this.storage=null!=u?u:Le().sessionStorage,this.backTimeout=null!=l?l:320}),[{key:"init",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=Le();return"function"!=typeof this.historyChange&&(this.historyChange=function(){if("function"==typeof e[Kt]){var t=e[Kt]();if(e[Kt]=!1,t)return}else if(!0===e[Kt])return void(e[Kt]=!1);if(zt(e.historyMonitor)){var n=r.history.state;e[Ct](n);try{var o;if(o="string"==typeof n?JSON.parse(n):n,Array.isArray(o)&&o.length>0){var i,a=null!==(i=e[$t]())&&void 0!==i?i:"/";e[Bt](a,o)}}catch(e){}}}),He(r,"popstate",this.historyChange),this.firstNavigate&&t&&this[Dt](),Promise.resolve()}},{key:"destroy",value:function(){this.historyChange&&Je(Le(),"popstate",this.historyChange)}},{key:Jt,value:function(e,t,r,n){var o,i=_t(this[Ht]);try{for(i.s();!(o=i.n()).done;){var a=o.value;try{var u=Reflect.apply(a,{},[e,t,r,n]);if(!1===u)return u}catch(e){console.error(e.message,e)}}}catch(e){i.e(e)}finally{i.f()}return!0}},{key:"beforeRestoreEach",value:function(e){this[Ht].push(e)}},{key:"removeBeforeRestoreEach",value:function(e){var t=this[Ht].indexOf(e);return-1!==t&&(this[Ht].splice(t,1),!0)}},{key:Dt,value:function(){var e,t=this,r=null!==(e=this[$t]())&&void 0!==e?e:"/",n=this.storage.getItem(Wt);if(n)try{var o=JSON.parse(n);if(o.mark===r&&Array.isArray(o.routes)&&o.routes.length>0){var i=o.routes.filter((function(e,n){return e.params=e.params?H(e.params):{},t[Jt](e,n,r,o.routes)}));if(i.length>0){var a=this[Lt](),u=i.length-1;return i[u].query=a||i[u].query,void this[Ct](i)}}}catch(e){}var l,s=r.indexOf("!");l=-1!=s?r.substring(s+1):r;var c=new ie;c.path=l,c.query=this[Lt](),this[Ct]([c])}},{key:Bt,value:function(e,t){try{t.forEach((function(e){e.params=e.params?U(e.params):{}}));var r={mark:e,routes:t},n=JSON.stringify(r);this.storage.setItem(Wt,n)}catch(e){console.error(e.message,e)}}},{key:"setRestorePoint",value:function(e){var t,r=null!==(t=this[$t]())&&void 0!==t?t:"/";this[Bt](r,e)}},{key:Ct,value:function(e){"function"==typeof this.changeHandler&&this.changeHandler(e)}},{key:$t,value:function(){var e=Le();if("path"===this.mode){var t=e.location.pathname;return this.base&&0===t.indexOf(this.base)&&(t=t.substring(this.base.length)),t}var r=e.location.hash,n=r.indexOf("#");return-1!=n?r.substring(n+1):null}},{key:Lt,value:function(){var e=Le().location.search;return e.length>0&&0===e.indexOf("?")&&(e=e.substring(1)),e}},{key:"listen",value:function(e){this.changeHandler=e}},{key:"go",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=Le();this[Kt]=t,r.history.go(e)}},{key:"goBack",value:function(e,t){var r=this,n=Le(),o=n.history.state;if(Vt(o)&&o.length>0){for(var i=!1,a=o.length-1;a>=0;a--){var u=ie.from(o[a]);if(!0!==u.traceless&&!zt(this.traceless,u)&&ie.isSame(u,e)){i=!0;break}}if(!i)return void t();var l=this.backTimeout,s=null,c=function(){n.history.go(-1),s=setTimeout(c,l)},f=function(){clearTimeout(s);var n=Le().history.state;if(Vt(n)&&n.length>0){var o=n.length,i=n[o-1],a=ie.from(i);if(ie.isSame(a,e))return t(),!0;if(o>0){for(var u=!1,v=o-1;v>=0;v--){var h=ie.from(n[v]);if(!0!==h.traceless&&!zt(r.traceless,h)&&ie.isSame(h,e)){u=!0;break}}return u?(setTimeout((function(){s=setTimeout(c,l),r.go(-1,f)}),0),!0):(t(),!0)}}return t(),!0};s=setTimeout(c,l),this.go(-1,f)}else t()}},{key:"push",value:function(e){var t=this[Ut](e.currentRoute);!0===e.currentRoute.traceless||zt(this.traceless,e.currentRoute)||Le().history.pushState(e.routes,"",t);var r=e.currentRoute.fullPath;this[Bt](r,e.routes)}},{key:"replace",value:function(e){var t=this[Ut](e.currentRoute);!0===e.currentRoute.traceless||zt(this.traceless,e.currentRoute)||Le().history.replaceState(e.routes,"",t);var r=e.currentRoute.fullPath;this[Bt](r,e.routes)}},{key:Ut,value:function(e){var t,r=Le(),n="";if(e.query){var o="";if("object"===qt(e.query)){var i,a=_t(Reflect.ownKeys(e.query));try{for(a.s();!(i=a.n()).done;){var u=i.value,l=encodeURIComponent(e.query[u]),s="".concat(encodeURIComponent(String(u)),"=").concat(l);o.length>0&&(o+="&"),o+=s}}catch(e){a.e(e)}finally{a.f()}}else o=e.query;this.query?(n=o.length>0?"".concat(this.query,"&").concat(o):this.query).length>0&&"?"!==n.charAt(0)&&(n="?".concat(n)):o.length>0&&(n="?".concat(o))}var c,f=r.location,v=null!==(t=e.alias)&&void 0!==t?t:e.fullPath;return v.startsWith(J)&&(v=v.substring(8)),c=n?"path"==this.mode?0===v.indexOf("/")?"".concat(this.base).concat(v).concat(n):"".concat(this.base,"/").concat(v).concat(n):"".concat(f.pathname).concat(n,"#").concat(v):"path"==this.mode?0===v.indexOf("/")?"".concat(this.base).concat(v):"".concat(this.base,"/").concat(v):"".concat(f.pathname,"#").concat(v),"".concat(f.origin).concat(c)}}])}();function Xt(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=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!==r&&(r=Le().location.pathname),r&&r.endsWith("/")&&(r=r.substring(0,r.length-1)),new Gt("path",null!==(e=r)&&void 0!==e?e:"",n,t,o,i,a)}function Yt(){return new Gt("hash","",arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",!(arguments.length>0&&void 0!==arguments[0])||arguments[0],!(arguments.length>2&&void 0!==arguments[2])||arguments[2],arguments.length>3&&void 0!==arguments[3]&&arguments[3],arguments.length>4?arguments[4]:void 0)}function Qt(e){return Qt="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},Qt(e)}function Zt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tr(n.key),n)}}function er(e,t,r){return(t=tr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tr(e){var t=function(e){if("object"!=Qt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qt(t)?t:t+""}var rr=function(){return function(e,t){return t&&Zt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),er(this,"maxSize",50),er(this,"cursor",-1),er(this,"queue",[]),er(this,"historyMonitor",!1),er(this,"traceless",!1),this.base=t,this.maxSize=r}),[{key:"init",value:function(){return Promise.resolve()}},{key:"destroy",value:function(){this.queue=[]}},{key:"beforeRestoreEach",value:function(e){}},{key:"removeBeforeRestoreEach",value:function(e){return!1}},{key:"listen",value:function(e){this.changeHandler=e}},{key:Ct,value:function(e){"function"==typeof this.changeHandler&&this.changeHandler(e)}},{key:"go",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(0!=this.queue.length&&!(this.cursor<=0)){var r=this.cursor+e;if(r<0?r=0:r>this.queue.length-1&&(r=this.queue.length-1),r!=this.cursor&&(this.cursor=r,!("function"==typeof t?t():t))){var n=this.queue[r];this[Ct](n.routes)}}}},{key:"goBack",value:function(e,t){if(0!=this.queue.length&&!(this.cursor<=0)){var r=0;if(null===e)r=this.cursor+1;else for(var n=this.cursor;n>=0;n--){r++;var o=this.queue[n];if(ie.isSameForRoute(o.currentRoute,e))break}this.go(-r,(function(){return t(),!0}))}}},{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}},{key:"setRestorePoint",value:function(e){}}])}();function nr(){return new rr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",arguments.length>1&&void 0!==arguments[1]?arguments[1]:50)}function or(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ir(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?or(Object(r),!0).forEach((function(t){fr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):or(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ar(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=lr(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function ur(e){return function(e){if(Array.isArray(e))return sr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||lr(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 lr(e,t){if(e){if("string"==typeof e)return sr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sr(e,t):void 0}}function sr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function cr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,vr(n.key),n)}}function fr(e,t,r){return(t=vr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vr(e){var t=function(e){if("object"!=hr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=hr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hr(t)?t:t+""}function hr(e){return hr="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},hr(e)}var yr=Symbol("_constructRouteModel"),pr=Symbol("_findRouteModel"),dr=Symbol("_findRootView"),mr=Symbol("_getFirstView"),gr=Symbol("_removeView"),br=Symbol("_buildPage"),wr=Symbol("_resolveComponent"),Sr=Symbol("_update"),xr=Symbol("_merge"),kr=Symbol("_handleHistoryChange"),jr=Symbol("_handleRouteUpdated"),Ar=Symbol("routeUpdatedCallback"),Or=Symbol("currentRoutes"),Rr=Symbol("routeSessionCacheKey"),Pr=Symbol("_addRouteRecorder"),Er=Symbol("_removeRouteRecorder"),Cr=Symbol("_cloneRouteRecorder"),Tr=Symbol("_handleError"),qr=Symbol("errorCallback"),_r=Symbol("registerKey"),Fr=Symbol("notFoundKey"),Mr=Symbol("notFoundPathKey"),Ir=Symbol("forestKey"),Nr=Symbol("historyKey"),Kr=Symbol("beforeFiltersKey"),Dr=Symbol("afterFiltersKey"),$r=Symbol("destroyFiltersKey"),Lr=Symbol("mainDispatcherKey"),Ur=Symbol("initKey"),Br=Symbol("requireKey"),Hr=Symbol("readyKey"),Jr=Symbol("readyHandlersKey"),Wr=Symbol("_markReady"),zr=Symbol("_createNextFn"),Vr=Symbol("_start"),Gr=Symbol("_before"),Xr=Symbol("_after"),Yr=Symbol("_destroy"),Qr=Symbol("_load"),Zr=Symbol("_unload"),en=Symbol("_loadDependency"),tn=Symbol("resolvedModulesKey"),rn=Symbol("resolveDependencyKey"),nn=Symbol("routerGuardKey");Symbol.for("loadViewModel");var on=function(){return function(e,t){return t&&cr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var r,n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),fr(this,_r,new Array),fr(this,Mr,"*"),fr(this,Hr,!1),fr(this,Jr,[]),fr(this,Ir,new Te),fr(this,Or,new Array),fr(this,Rr,new WeakMap),fr(this,qr,null),fr(this,Ar,null),fr(this,Kr,new Array),fr(this,Dr,new Array),fr(this,$r,new Array),fr(this,Lr,new pt),fr(this,tn,new Map),fr(this,nn,new De),fr(this,Ur,!1),fr(this,Br,null),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[Nr]=t.history:this[Nr]=$e?Yt():nr(),null===(r=this[Nr])||void 0===r||r.listen((function(e){var t=null;if("string"==typeof e){var r=n[z](e);r&&(t=n[kr]([r]))}else t=n[kr](e);t&&t.then((function(){!1===n[Hr]&&n[Wr](!0)})).catch((function(){!1===n[Hr]&&n[Wr](!1)}))}))}),[{key:"require",get:function(){return $e?(this[Br]||(this[Br]=new xt),this[Br]):null}},{key:"current",get:function(){var e=this[Or].length;return e>0?this[Or][e-1]:null}},{key:"setHistoryMode",value:function(e){var t,r=this;if(!this[Hr]){if(this[Nr])try{this[Nr].destroy()}catch(e){console.error(e.message,e)}for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];this[Nr]="path"===e?Reflect.apply(Xt,null,[].concat(o)):"memory"===e?Reflect.apply(nr,null,[].concat(o)):Reflect.apply(Yt,null,[].concat(o)),null===(t=this[Nr])||void 0===t||t.listen((function(e){var t=null;if("string"==typeof e){var n=r[z](e);n&&(t=r[kr]([n]))}else t=r[kr](e);t&&t.then((function(){!1===r[Hr]&&r[Wr](!0)})).catch((function(){!1===r[Hr]&&r[Wr](!1)}))}))}}},{key:Tr,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[qr])try{this[qr](e,t)}catch(e){}console.error(e)}},{key:"init",value:function(){var e;!0!==this[Ur]&&(null===(e=this[Nr])||void 0===e||e.init(!this[Hr]),this[Ur]=!0)}},{key:"isReady",value:function(){var e=this;return this[Hr]?Promise.resolve():new Promise((function(t,r){e[Jr].push([t,r])}))}},{key:Wr,value:function(e){this[Hr]=!0,this[Jr].forEach((function(t){var r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],l=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||lr(e,t)||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.")}()}(t,2),n=r[0],o=r[1];try{e?n():o()}catch(e){console.error(e.message,e)}}))}},{key:kr,value:function(e){try{if(!e){var t=ur(this[Or]).reverse();return this[Zr](t),$e&&Le().location.reload(),Promise.resolve()}for(var r=null,n=[],o=[],i=0;i<e.length&&i<this[Or].length&&ie.isSame(e[i],this[Or][i]);i++)!0===e[i].active&&e[i].active!==this[Or][i].active&&(r=e[i]);if(i<e.length&&(n=e.slice(i)),i<this[Or].length&&(o=this[Or].slice(i).reverse()),0===o.length&&0===n.length){if(null!==r)return this.restore([r])}else{if(!(o.length>0))return this.restore(n);if(this[Zr](o)){if(n.length>0)return this.restore(n);if(null!==r)return this.restore([r])}}}catch(e){this[Tr](e)}return Promise.resolve()}},{key:jr,value:function(e){if(e||(e=this.current),"function"==typeof this[Ar])try{this[Ar](e)}catch(e){}}},{key:Pr,value:function(e,t){if(e.opsType===se.Open){for(var r=!1,n=this[Or].length-1;n>=0;n--){var o=this[Or][n];e.root==o.root&&(e.path!==o.path?e.active&&(o.active=!1):(this[Or].splice(n,1,e),r=!0))}r||this[Or].push(e)}else this[Or].push(e);this[Rr].set(e,t)}},{key:Cr,value:function(){var e,t=[],r=ar(this[Or]);try{for(r.s();!(e=r.n()).done;){var n=e.value,o=ie.clone(n,!0);t.push(o)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:Er,value:function(e){if(null!=this[Or]){for(var t=-1,r=0;r<this[Or].length;r++)if(ie.isSame(this[Or][r],e)){t=r;break}if(-1!=t){var n=this[Or][t];this[Or].splice(t,1);var o=this[Rr].get(n);this[Rr].delete(n),this[Yr](n,o)}}}},{key:"historyMonitor",get:function(){return!!this[Nr]&&this[Nr].historyMonitor},set:function(e){this[Nr]&&(this[Nr].historyMonitor=e)}},{key:"traceless",get:function(){return!!this[Nr]&&this[Nr].traceless},set:function(e){this[Nr]&&(this[Nr].traceless=e)}},{key:"setRestorePoint",value:function(){var e,t=this[Cr]();null===(e=this[Nr])||void 0===e||e.setRestorePoint(t)}},{key:"onRouteUpdated",value:function(e){this[Ar]=e}},{key:"onError",value:function(e){this[qr]=e}},{key:"beforeEach",value:function(e){this[Kr].push(e)}},{key:"afterEach",value:function(e){this[Dr].push(e)}},{key:"destroyEach",value:function(e){this[$r].push(e)}},{key:"beforeRestoreEach",value:function(e){this[Nr].beforeRestoreEach(e)}},{key:"removeBeforeRestoreEach",value:function(e){return this[Nr].removeBeforeRestoreEach(e)}},{key:"setResolveDependency",value:function(e){this[rn]=e}},{key:"addRoutes",value:function(e){var t,r=ar(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;this.addRoute(n)}}catch(e){r.e(e)}finally{r.f()}}},{key:"addRoute",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(e.path!==this[Mr]){var r=this[yr](e);if(-1==t)this[_r]=[].concat(ur(this[_r]),ur(r));else for(var n=r.length-1;n>=0;n--)this[_r].splice(t,0,r[n])}else this.setNotFoundRoute(e)}},{key:"removeRoute",value:function(e){var t=this[z](e);if(null===t)return console.warn("route格式错误",e),!1;for(var r=0;r<this[_r].length;r++){var n=this[_r][r];if(null!=t&&t.path&&n.path===t.path)return this[_r].splice(r,1),!0;if(null!=t&&t.name&&n.name===t.name)return this[_r].splice(r,1),!0}return!1}},{key:"hasRoute",value:function(e){var t=this[z](e);return null===t?(console.warn("route格式错误",e),!1):-1!==this[_r].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[Mr]=e}},{key:"setNotFoundRoute",value:function(e){var t=this[yr](e);this[Fr]=t[0]}},{key:"getRoutes",value:function(){return ur(this[_r])}},{key:yr,value:function(e){var t,r=null!==(t=e.path)&&void 0!==t?t:"";r.length>0&&"/"!==r.charAt(0)&&(r="/".concat(r));var n=e.components||e.component&&{"":e.component};if(null==n){var o=new le;return o.path=r,o.redirect=e.redirect,[o]}var i=[];for(var a in n){var u=n[a];0===a.length&&(a=J);var l=new ae(a,u,e.props,e.meta);i.push(l)}var s=!1,c=[];if(e.children){var f,v=ar(e.children);try{for(v.s();!(f=v.n()).done;){var h,y=f.value,p=ar(this[yr](y));try{for(p.s();!(h=p.n()).done;){var d=h.value,m=new le;m.name=d.name,d.path&&d.path.length>0?m.path="".concat(r).concat(d.path):(s=!0,m.path=r);var g=new ue;g.models=[].concat(i),m.layers=[g].concat(ur(d.layers)),c.push(m)}}catch(e){p.e(e)}finally{p.f()}}}catch(e){v.e(e)}finally{v.f()}}if(!s){var b=new ue;b.models=i;var w=new le;w.name=e.name,w.path=r,w.layers=[b],c.splice(0,0,w)}return c}},{key:pr,value:function(e){var t,r=e.route;try{var n,o=ar(this[_r]);try{for(o.s();!(n=o.n()).done;){var i,a,u=n.value,c=null!==(i=r.template)&&void 0!==i?i:r.path,v=null!==(a=r.template)&&void 0!==a?a:r.name;if(c&&u.path){var h,y=u.match;y||(y=u.match=s(u.path));var p=y(c);if(!p)continue;if(u.redirect){var d=new ie;A(!0,d,r),d.path=u.redirect;var m={route:d,find:void 0};return!!this[pr](m)&&(e.route=m.route,e.find=m.find,r.template&&e.find&&(e.find=ir({},e.find),e.find.path=r.path),!0)}if(r.params=null!==(h=r.params)&&void 0!==h?h:{},A(!0,r.params,p.params),r.query){var g=r.query;if("string"==typeof g){var b,w={},S=ar(g.split("&"));try{for(S.s();!(b=S.n()).done;){var x=b.value.split("=");if(2===x.length){var k=decodeURIComponent(x[0].trim()),j=decodeURIComponent(x[1].trim());w[k]=j}}}catch(e){S.e(e)}finally{S.f()}A(!0,r.params,w)}else"object"===hr(g)&&A(!0,r.params,g)}return e.find=u,r.template&&e.find&&(e.find=ir({},e.find),e.find.path=r.path),!0}if(v===u.name){var O;r.params=null!==(O=r.params)&&void 0!==O?O:{};var R=function(e,t){void 0===t&&(t={});var r=f(t),n=t.encode,o=void 0===n?function(e){return e}:n,i=t.validate,a=void 0===i||i,u=e.map((function(e){if("object"==typeof e)return new RegExp("^(?:".concat(e.pattern,")$"),r)}));return function(t){for(var r="",n=0;n<e.length;n++){var i=e[n];if("string"!=typeof i){var l=t?t[i.name]:void 0,s="?"===i.modifier||"*"===i.modifier,c="*"===i.modifier||"+"===i.modifier;if(Array.isArray(l)){if(!c)throw new TypeError('Expected "'.concat(i.name,'" to not repeat, but got an array'));if(0===l.length){if(s)continue;throw new TypeError('Expected "'.concat(i.name,'" to not be empty'))}for(var f=0;f<l.length;f++){var v=o(l[f],i);if(a&&!u[n].test(v))throw new TypeError('Expected all "'.concat(i.name,'" to match "').concat(i.pattern,'", but got "').concat(v,'"'));r+=i.prefix+v+i.suffix}}else if("string"!=typeof l&&"number"!=typeof l){if(!s){var h=c?"an array":"a string";throw new TypeError('Expected "'.concat(i.name,'" to be ').concat(h))}}else{if(v=o(String(l),i),a&&!u[n].test(v))throw new TypeError('Expected "'.concat(i.name,'" to match "').concat(i.pattern,'", but got "').concat(v,'"'));r+=i.prefix+v+i.suffix}}else r+=i}return r}}(l(u.path,t=void 0),t);return r.path=R(r.params),e.find=u,r.template&&e.find&&(e.find=ir({},e.find),e.find.name=r.name),!0}}}catch(e){o.e(e)}finally{o.f()}}catch(e){console.error(e.message,e),"function"==typeof r.error&&r.error(e.message)}return!1}},{key:z,value:function(e){var t=null;if(Array.isArray(e))if(t=new ie,"object"===hr(e[0]))t=ie.from(e[0]);else for(var r=0;r<e.length;r++)0===r?"/"===e[r].charAt(0)?t.path=e[r]:t.name=e[r]:1===r?t.params=e[r]:2===r?t.root=e[r]:3===r&&A(!1,t,e[r]);else"object"===hr(e)?t=ie.from(e):"string"==typeof e&&(t=new ie,"/"==e.charAt(0)?t.path=e:t.name=e);if(t){var n,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!==(n=t.root)&&void 0!==n?n:J,t.opsType=null!==(o=null!==(i=t.opsType)&&void 0!==i?i:this.options.defaultOperationType)&&void 0!==o?o:se.Push}return t}},{key:"push",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=this[z](t);return n?(n.opsType=n.opsType||se.Push,this.to(n)):(this[Tr]("resolve route fail",n),this)}},{key:"put",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=this[z](t);return n?(n.opsType=se.Put,n.traceless=!0,this.to(n)):(this[Tr]("resolve route fail",n),this)}},{key:"replace",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=this[z](t);return n?(n.opsType=se.Replace,this.to(n)):(this[Tr]("resolve route fail",n),this)}},{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=this[z](t);return n?(n.opsType=se.Append,this.to(n)):(this[Tr]("resolve route fail",n),this)}},{key:"remove",value:function(e,t){var r=this;return new Promise((function(n){r[Lr].post((function(o){try{if(0===r[Or].length)return o.resolve(),void n(!1);var i,a=-1,u=[];if(e){var l;if(i=e.root?e.root:null!==(l=r[Or][0].root)&&void 0!==l?l:J,e.all)for(var s=r[Or].length-1;s>0;s--){var c=r[Or][s];c.opsType===se.Append&&c.root===i&&(u.splice(0,0,c),a=s-1)}else if(e.until)for(var f=r[Or].length-1;f>0;f--){var v=r[Or][f];if(v.opsType===se.Append&&v.root===i){if("/"===e.until.charAt(0)&&e.until===v.path){a=f;break}if(e.until===v.name){a=f;break}u.splice(0,0,v)}}}else{i=J;var h=r[mr](r[Ir]);h&&(i=h.name);for(var y=r[Or].length-1;y>0;y--){var p=r[Or][y];if(p.opsType===se.Append&&p.root===i){u.push(p),a=y-1;break}}}if(0===u.length){var d="can not find route";return console.warn(d),o.resolve(d),void n(!1)}var m=null;if(-1!==a&&(m=r[Or][a]),r[Zr](u)){if(!1===t)return o.resolve(),n(!0),!0;var g,b=function(){return o.resolve(),n(!0),!0},w=r[Or].length;if(m&&ie.isSame(m,r[Or][w-1]))return void(null===(g=r[Nr])||void 0===g||g.goBack(m,b));b()}}catch(e){r[Tr](e),o.resolve(),n(!1)}}))}))}},{key:"open",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=this[z](t);return n?(n.opsType=se.Open,this.to(n)):(this[Tr]("resolve route fail",n),this)}},{key:"close",value:function(e){var t=this;return this[Lr].post((function(r){try{var n=t[z](e);if(!n)return void r.reject("resolve route fail");for(var o=[],i=0;i<t[Or].length;i++){var a=t[Or][i];if(a.root===n.root)if(n.path||n.name){if(n.path&&n.path===a.path){o.push(a);break}if(n.name&&n.name===a.name){o.push(a);break}}else o.push(a)}if(0===o.length)return void r.resolve();t[Zr](o)&&t[jr](),r.resolve()}catch(e){r.resolve(),t[Tr](e.message)}})),this}},{key:"to",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=this[z](r);if(!o)return this[Tr]("resolve route fail",o),this;var i=this[nn].acquire(o);return null==i?(this[Tr]("route forbid",o),this):(this[Lr].post((function(t){try{var r,n=e[Vr](o);e[Gr](n),null!==(r=n.session)&&void 0!==r&&r.routeModel||!e[rn]||e[en](n),e[Qr](n),e[Xr](n),n.wait((function(r,a){var u=r.session.to;if(r.session.updateResult&&"success"===r.session.updateResult.status)try{var l,s,c=ie.clone(u,!0),f=new Tt(c,e[Cr]());u.opsType===se.Replace?null===(l=e[Nr])||void 0===l||l.replace(f):null===(s=e[Nr])||void 0===s||s.push(f)}catch(e){console.error(e.message,e)}if(oe.clear(r.session),e[nn].release(i),e[jr](u),"function"==typeof o.success)try{Reflect.apply(o.success,{},[])}catch(e){console.error(e.message,e)}!1===e[Hr]&&e[Wr](!0),n=null,t.resolve()}),(function(r,a){e[nn].release(i),null!==a&&e[Tr](a,o),!1===e[Hr]&&e[Wr](!1),oe.clear(r.session),n=null,t.resolve()}))}catch(r){e[nn].release(i),e[Tr](r,o),t.resolve()}})),this)}},{key:"back",value:function(e){var t;null===(t=this[Nr])||void 0===t||t.go(-e)}},{key:zr,value:function(e){var t=this;return function(r,n){if("boolean"==typeof r)r?e.resolve():e.reject(null!=n?n:null);else if(r){var o=t[z](r);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:Vr,value:function(e){var t,r=this[Or].length>0?this[Or][this[Or].length-1]:void 0,n=new oe(e,r),o={route:e,find:null};return this[pr](o),o.find&&(n.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"===hr(e.meta)){var r=A(!0,{},e.meta);t.push(r)}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 pt(n)}},{key:Gr,value:function(e){var t,r=this,n=ar(this[Kr]);try{var o=function(){var n=t.value;e.post((function(e){var t=r[zr](e);Reflect.apply(n,{},[e.session.to,e.session.from,t,e.session])}))};for(n.s();!(t=n.n()).done;)o()}catch(e){n.e(e)}finally{n.f()}}},{key:Xr,value:function(e){var t=this;e.post((function(e){var r,n=ar(t[Dr]);try{for(n.s();!(r=n.n()).done;){var o=r.value;try{Reflect.apply(o,{},[e.session.to,e.session.from,e.session])}catch(e){console.error(e.message,e)}}}catch(e){n.e(e)}finally{n.f()}e.resolve()}))}},{key:Yr,value:function(e,t){var r,n=ar(this[$r]);try{for(n.s();!(r=n.n()).done;){var o=r.value;try{Reflect.apply(o,{},[e,t])}catch(e){console.error(e.message,e)}}}catch(e){n.e(e)}finally{n.f()}"function"==typeof e.destroy&&Reflect.apply(e.destroy,e,[])}},{key:en,value:function(e){var t=this,r=e.session,n=Reflect.apply(this[rn],this,[null==r?void 0:r.to]);if(null!=n&&null!=n){Array.isArray(n)||(n=[n]);var o,i=[],a=ar(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;this[tn].has(u)||i.push(u)}}catch(e){a.e(e)}finally{a.f()}0!==i.length&&e.post((function(e){t[Br].ensure(i,(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];if(n){for(var a=0,u=n;a<u.length;a++){var l=u[a];if(l){var s;s=k(l)?l.default:l,Array.isArray(s)&&t.addRoutes(s)}}for(var c=0,f=i;c<f.length;c++){var v=f[c];t[tn].set(v,!0)}e.resolve()}else e.reject()}))}))}}},{key:Qr,value:function(e){var t=this;e.post((function(e){var r=e.session.to,n=e.session.routeModel;if(null==n){var o={route:r,find:null};if(t[pr](o))n=o.find,e.session.routeModel=n;else{if(!t[Fr])return void e.reject("not find route model");n=t[Fr]}}var i=oe.from(e.session);t[br](r,n,i).then((function(r){t[Ir],e.session.updateResult=null!=r?r:{status:"success",message:""},e.resolve()}),(function(t){e.reject(t)}))}))}},{key:Zr,value:function(e){if(0==e.length)return!0;var t,r=this[Ir],n=[],o=ar(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=this[dr](r,i);null!=a&&n.push(ir(ir({},a),{},{route:i}))}}catch(e){o.e(e)}finally{o.f()}if(0==n.length)return this[Tr]("can not find view index"),!1;var u,l=ar(n.reverse());try{for(l.s();!(u=l.n()).done;){var s,c=u.value;this[gr](r,{x:c.x,y:c.y},[null!==(s=c.route.index)&&void 0!==s?s:0],!0)}}catch(e){l.e(e)}finally{l.f()}return!0}},{key:dr,value:function(e,t){for(var r,n=null!==(r=t.root)&&void 0!==r?r:J,o=0;o<e.layers.length;o++)for(var i=e.layers[o],a=i.views.length-1;a>=0;a--){var u=i.views[a];if(u[ke]&&u[Oe]===n)return{x:a,y:o}}return null}},{key:mr,value:function(e){return e.layers.length>0&&e.layers[0].views.length>0?e.layers[0].views[0]:null}},{key:gr,value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=!(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=[],u=!1,l=o.slots.value,s=l.length-1;s>=0;s--){var c=l[s];null!=r&&-1==r.indexOf(c.index)||(c.route&&o[ke]&&(this[Er](c.route),!0===c.active&&c.route.opsType==se.Append&&(u=!0)),a.push(new Ee(o,c.index,t.y)),l.splice(s,1))}if(0==l.length)n?o.slots.value=ur(l):e.layers[t.y].views.splice(t.x,1);else{if(u){var f=l[l.length-1];f.active=!0,f.route&&(f.route.active=f.active)}o.slots.value=ur(l)}0==e.layers[t.y].views.length&&(i=!0);for(var v=t.y+1;v<e.layers.length;v++){for(var h=e.layers[v].views,y=[],p=h.length-1;(i||a.length>0)&&p>=0;p--){var d=h[p];if(d[Ae]&&(i||Ee.include(a,d[Ae]))){for(var m=d.slots.value,g=m.length-1;g>=0;g--){var b=m[g];b.route&&d[ke]&&this[Er](b.route),y.push(new Ee(d,b.index,v)),m.splice(g,1)}e.layers[v].views.splice(p,1)}}a=y,0==e.layers[v].views.length&&(i=!0)}}}},{key:"restore",value:function(e){var t=this;if(e&&0!=this[_r].length)return new Promise((function(r,n){for(var o=function(){var r=e[i];t[Lr].post((function(e){var n,o=t[Vr](r);t[Gr](o),null!==(n=o.session)&&void 0!==n&&n.routeModel||!t[rn]||t[en](o),t[Qr](o),t[Xr](o),o.wait((function(t,r){e.resolve()}),(function(r,n){null!==n&&t[Tr](n),e.resolve()}))}))},i=0;i<e.length;i++)o();t[Lr].post((function(e){e.resolve(),r()}))}));var r=this[Ir];if(r.layers.length>0){var n=r.layers[0].views;n.length>0&&(n[0].slots.value=[])}return this[Or]=[],this[jr](),Promise.resolve()}},{key:br,value:function(e,t,r){var n,o=this,i=null!==(n=e.updateType)&&void 0!==n?n:ce.Part;return this[wr](t).then((function(){var n=o[Sr](t,e,r,i);if("error"===n.status)throw Error(n.message);return n}))}},{key:wr,value:function(e){for(var t=[],r=0;r<e.layers.length;r++)for(var n=e.layers[r],o=0;o<n.models.length;o++){var i=n.models[o];i.isResolved||t.push(i.resolve())}return t.length>0?Promise.all(t):Promise.resolve()}},{key:Sr,value:function(e,t,r,n){var o;if(1!==e.layers[0].models.length)return{status:"error",message:"illegal route structure(multi root node)"};var i,a,u,l=e.layers[0].models[0],s=this[Ir],c=function(e){return 0==e.layers.length||0==e.layers[0].views.length}(s),f=null!==(o=t.root)&&void 0!==o?o:J;if(c||n!=ce.Part||(i=this[dr](s,t)),null==i||null==i)if(c||n===ce.All){if(0==s.layers.length&&(s.layers[0]=new Ce),0==s.layers[0].views.length){var v,h=null!==(v=t.root)&&void 0!==v?v:J;a=new Pe(h,!0,null),s.layers[0].views=[a]}else a=s.layers[0].views[0];i={x:0,y:0}}else{var y=t.slot;if(!y)return{status:"error",message:"can not rebuild view(because not route slot)"};var p,d=y.level;if(d>s.layers.length)return{status:"error",message:"can not insert view(override level)"};if(y.rootName){var m,g=ar(s.layers[d-1].views);try{for(g.s();!(m=g.n()).done;){var b=m.value;if(b[ke]&&b.name===y.rootName){var w;p=new Ee(b,null!==(w=y.rootIndex)&&void 0!==w?w:0,d-1);break}if(b[je]&&b[je].view.name===y.rootName&&b[je].index===y.rootIndex){p=b[je];break}}}catch(e){g.e(e)}finally{g.f()}}if(!p)return{status:"error",message:"can not insert view(not find root node ref)"};a=new Pe(f,!0,p),s.layers[d].views.push(a),i={x:s.layers[d].views.length-1,y:d}}else a=s.layers[i.y].views[i.x];if(u=i.y,a[ke]=!0,t.opsType===se.Append){var S;t.index=null!==(S=t.index)&&void 0!==S?S:C.get(),t.active=!0;var x=a.slots.value;if(x.length>0){var k=x[x.length-1];k.active=!1,k.route&&(k.route.active=k.active)}var j=new Re(t,l,t.index,!0);a.slots.value=[].concat(ur(x),[j]);var A=u+1,O=new Ee(a,t.index,u);this[xr](s,A,e,1,O)}else if(t.opsType===se.Open){var R,P,E=a.slots.value,T=null===(R=t.active)||void 0===R||R,q=!1,_=ar(E);try{for(_.s();!(P=_.n()).done;){var F=P.value;if(null!==F.route&&ie.isSameForRouteModel(F.route,t)){if(F.active===T)return t.index=F.index,t.active=T,F.route=t,{status:"no-change",message:""};F.active=T,q=!0,t.index=F.index,t.active=T,F.route=t}else T&&(F.active=!1);F.route&&(F.route.active=F.active)}}catch(e){_.e(e)}finally{_.f()}if(!q){var M;t.index=null!==(M=t.index)&&void 0!==M?M:C.get(),t.active=T;var I=new Re(t,l,t.index,T);E.push(I);var N=u+1,K=new Ee(a,t.index,u);this[xr](s,N,e,1,K)}a.slots.value=ur(E)}else{var D=a.slots.value;if(0==D.length){var $;t.index=null!==($=t.index)&&void 0!==$?$:C.get(),t.active=!0,a.slots.value=[new Re(t,l,t.index)];var L=u+1,U=new Ee(a,t.index,u);this[xr](s,L,e,1,U)}else{var B=D[0];if(B.model!==l){var H;this[gr](s,i,null,!0),t.index=null!==(H=t.index)&&void 0!==H?H:C.get(),t.active=!0,a.slots.value=[new Re(t,l,t.index)];var W=u+1,z=new Ee(a,t.index,u);this[xr](s,W,e,1,z)}else{var V;null!==B.route&&this[Er](B.route);var G=!1,X=null===(V=t.active)||void 0===V||V;B.active!==X&&(B.active=X,G=!0),t.active=X,t.index=B.index,B.route=t;for(var Y=[],Q=1;Q<D.length;Q++)Y.push(D[Q].index);Y.length>0?this[gr](s,i,Y,!0):G&&(a.slots.value=ur(D));for(var Z=[new Ee(a,t.index,u)],ee=u+1,te=1,re=new Ee(a,t.index,u);Z.length>0&&ee<s.layers.length&&te<e.layers.length;ee++,te++){for(var oe=[],ae=0;ae<s.layers[ee].views.length;ae++){var ue=s.layers[ee].views[ae];ue[Ae]&&Ee.include(Z,ue[Ae])&&oe.unshift(ae)}for(var le=[],fe=0,ve=oe;fe<ve.length;fe++){for(var he=ve[fe],ye=s.layers[ee].views[he],pe=e.layers[te].models,de=void 0,me=0;me<pe.length;me++)if(ye.name===pe[me].name){de=pe[me];break}if(de){var ge=ye.slots.value;if(0==ge.length){ye.slots.value=[new Re(null,de,0)];var be=ee+1,we=te+1;this[xr](s,be,e,we,re)}else{var Se=ge[0];if(Se.model!==de){this[gr](s,{x:he,y:ee},null,!0),ye.slots.value=[new Re(null,de,0)];var xe=ee+1,Oe=te+1;this[xr](s,xe,e,Oe,re)}else{ye[ke]&&null!==Se.route&&this[Er](Se.route);for(var Te=[],qe=1;qe<ge.length;qe++)Te.push(ge[qe].index);Te.length>0&&this[gr](s,{x:he,y:ee},Te,!0),le.push(new Ee(ye,Se.index,ee))}}ye[ke]=!1}else this[gr](s,{x:he,y:ee},null,!1)}Z=le}this[xr](s,ee,e,te,re)}}}if(a&&a[je]){var _e,Fe=a[je];Fe&&(t.slot=new ne(f,u,null==Fe?void 0:Fe.view.name,null!==(_e=null==Fe?void 0:Fe.index)&&void 0!==_e?_e:0))}return r.to=void 0,r.routeModel=void 0,this[Pr](t,r),{status:"success",message:""}}},{key:xr,value:function(e,t,r,n,o){for(var i=n,a=t;a<e.layers.length&&i<r.layers.length;a++,i++){var u,l=e.layers[a].views,s=ar(r.layers[i].models);try{for(s.s();!(u=s.n()).done;){var c=u.value,f=new Pe(c.name,!1,o),v=new Re(null,c);f.slots.value=[v],l.push(f)}}catch(e){s.e(e)}finally{s.f()}}for(;i<r.layers.length;i++){var h=new Ce;h.views=[];var y,p=ar(r.layers[i].models);try{for(p.s();!(y=p.n()).done;){var d=y.value,m=new Pe(d.name,!1,o),g=new Re(null,d);m.slots.value=[g],h.views.push(m)}}catch(e){p.e(e)}finally{p.f()}e.layers.push(h)}}},{key:W,value:function(e,t,r,n,o,i){if(t<0||t>this[Ir].layers.length)return null;if(t<this[Ir].layers.length){var a,u=null,l=ar(this[Ir].layers[t].views);try{for(l.s();!(a=l.n()).done;){var s,c,f=a.value,v=!1;if(null!==r?(v=f.name===e&&(null===(s=f[je])||void 0===s?void 0:s.view)===r)&&-1!==n&&(v=(null===(c=f[je])||void 0===c?void 0:c.index)===n):v=f.name===e,v){null!==o&&(f[Ae]={view:o,index:i,level:t-1}),u=f;break}}}catch(e){l.e(e)}finally{l.f()}if(null!==u)return u}var h=null,y=null;null!==o&&(h=o[ke]?{view:o,index:i,level:t-1}:o[je],y={view:o,index:i,level:t-1});var p=new Pe(e,!0,h);if(p[Ae]=y,t==this[Ir].layers.length){var d=new Ce;d.views=[p],this[Ir].layers.push(d)}else this[Ir].layers[t].views.push(p);return p}}])}(),an="fox-router-view";function un(e){return un="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},un(e)}function ln(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return(n=r&&null!==(t=e.showClass)&&void 0!==t?t:e.enterClass)||((n=e.transitionName)?"".concat(n,r?"-show":"-enter"):null)}function sn(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return(n=r&&null!==(t=e.showActiveClass)&&void 0!==t?t:e.enterActiveClass)||((n=e.transitionName)?"".concat(n,r?"-show-active":"-enter-active"):null)}function cn(e){var t,r,n,o,i,a=e.duration;return"object"==un(a)?t={enter:null!==(r=a.enter)&&void 0!==r?r:-1,leave:null!==(n=a.leave)&&void 0!==n?n:-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 fn(e,t){e.classList.contains(t)||e.classList.add(t)}function vn(e,t){e.classList.remove(t)}var hn=$e&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout;function yn(e){hn(e)}function pn(e,t,r){b(t)&&(null==e&&(e={}),Reflect.apply(t,e,r))}function dn(e,t,r){var n=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,u=arguments.length>7?arguments[7]:void 0,l=[],s=function(){for(var e=0,r=l;e<r.length;e++){var n=r[e];Je(t,n.type,n.listener)}l=[]};if(b(i)){if(void 0!==o&&o>=0)return void setTimeout((function(){Reflect.apply(i,e,[t,r,n]),b(u)&&Reflect.apply(u,e,[])}),o);var c=function(o){s(),Reflect.apply(i,e,[t,r,n]),u&&Reflect.apply(u,e,[])};["animationend","transitionend"].forEach((function(e){He(t,e,c),l.push({type:e,listener:c})}))}if(b(a)){var f="animationcancel",v=function(o){s(),Reflect.apply(a,e,[t,r,n])};He(t,f,v),l.push({type:f,listener:v})}}function mn(e){return null!==e&&(e.opsType===se.Append||e.opsType===se.Open)}function gn(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:-1;if(t||mn(o)){var a=ln(n,t);a&&fn(r,a);var u=sn(n,t);u&&fn(r,u);var l=function(e){var t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!==(t=e.beforeShow)&&void 0!==t?t:e.beforeEnter}(n,t);pn(e,l,[r,t,o,i])}}function bn(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0;if(mn(i)||t){var l=ln(n,t),s=sn(n,t),c=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return(n=r&&null!==(t=e.showToClass)&&void 0!==t?t:e.enterToClass)||((n=e.transitionName)?"".concat(n,r?"-show-to":"-enter-to"):null)}(n,t),f=function(e){var t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!==(t=e.show)&&void 0!==t?t:e.enter}(n,t),v=function(e){var t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!==(t=e.afterShow)&&void 0!==t?t:e.afterEnter}(n,t),h=function(e){var t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!==(t=e.showCancelled)&&void 0!==t?t:e.enterCancelled}(n,t);l||s||c||f?yn((function(){dn(e,r,i,a,o,(function(){s&&vn(r,s),c&&vn(r,c),b(v)&&pn(e,v,[r,t,i,a]),b(u)&&u(e,u,[r])}),(function(){b(h)&&pn(e,h,[r,t,i,a])})),l&&vn(r,l),c&&fn(r,c),b(f)&&pn(e,f,[r,t,i,a])})):b(u)&&u(e,u,[r])}else b(u)&&u(e,u,[r])}function wn(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0;if(!mn(a)&&!t)return b(l)&&pn(e,l,[r]),void(!t&&b(i)&&i());var s=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return(n=r&&null!==(t=e.hideClass)&&void 0!==t?t:e.leaveClass)||((n=e.transitionName)?"".concat(n,r?"-hide":"-leave"):null)}(n,t),c=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return(n=r&&null!==(t=e.hideActiveClass)&&void 0!==t?t:e.leaveActiveClass)||((n=e.transitionName)?"".concat(n,r?"-hide-active":"-leave-active"):null)}(n,t),f=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return(n=r&&null!==(t=e.hideToClass)&&void 0!==t?t:e.leaveToClass)||((n=e.transitionName)?"".concat(n,r?"-hide-to":"-leave-to"):null)}(n,t),v=function(e){var t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!==(t=e.hide)&&void 0!==t?t:e.leave}(n,t),h=function(e){var t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!==(t=e.afterHide)&&void 0!==t?t:e.afterLeave}(n,t),y=function(e){var t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!==(t=e.hideCancelled)&&void 0!==t?t:e.leaveCancelled}(n,t);if(!(s||c||f||v))return b(l)&&pn(e,l,[r]),void(!t&&b(i)&&i());s&&fn(r,s),c&&fn(r,c),b(v)&&pn(e,v,[r,t,a,u]),yn((function(){dn(e,r,a,u,o,(function(){c&&vn(r,c),f&&vn(r,f),b(h)&&pn(e,h,[r,t,a,u]),b(l)&&pn(e,l,[r]),!t&&b(i)&&i()}),(function(){b(y)&&pn(e,y,[r,t,a,u]),b(l)&&pn(e,l,[r]),!t&&b(i)&&i()})),s&&vn(r,s),f&&fn(r,f)}))}function Sn(e){return e.elm}function xn(e){return xn="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},xn(e)}function kn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,On(n.key),n)}}function jn(e,t,r){return t&&kn(e.prototype,t),r&&kn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function An(e,t,r){return(t=On(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function On(e){var t=function(e){if("object"!=xn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=xn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xn(t)?t:t+""}function Rn(e){return function(e){if(Array.isArray(e))return En(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Pn(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 Pn(e,t){if(e){if("string"==typeof e)return En(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?En(e,t):void 0}}function En(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Cn=Symbol("ruvc"),Tn=Symbol("cvs");function qn(e,t,r){return"function"==typeof e?Reflect.apply(e,{},[t,r]):e}function _n(e,t){if(e.componentOptions&&e.componentOptions.Ctor&&e.componentOptions.Ctor.extendOptions){var r=e.componentInstance||e,n=[];if(e.fnOptions&&e.fnOptions[t]){var o=e.fnOptions[t];Array.isArray(o)?n=Rn(o):"function"==typeof o&&(n=[o])}if(e.componentOptions.Ctor&&e.componentOptions.Ctor.extendOptions){var i=e.componentOptions.Ctor.extendOptions[t];Array.isArray(i)?n=[].concat(Rn(n),Rn(i)):"function"==typeof i&&(n=[].concat(Rn(n),[i]))}return function(e){n.forEach((function(e){Reflect.apply(e,r,[])}))}}return function(){}}var Fn=jn((function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),An(this,"node",void 0),An(this,"state",void 0),this.node=t,this.state=r})),Mn={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,Function],required:!1},tag:{type:[String,Function,Object],required:!1,default:"div"},tagProps:{type:[Object,Function],required:!1,default:function(){return{}}},viewTag:{type:[String,Function,Object],required:!1,default:"div"},viewTagData:{type:[Object,Function],required:!1,default:function(){return{}}},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},viewInactiveClass:{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},beforeEnter:{type:Function,required:!1},enter:{type:Function,required:!1},afterEnter:{type:Function,required:!1},enterCancelled:{type:Function,required:!1},beforeLeave:{type:Function,required:!1},leave:{type:Function,required:!1},afterLeave:{type:Function,required:!1},leaveCancelled:{type:Function,required:!1},beforeShow:{type:Function,required:!1},show:{type:Function,required:!1},afterShow:{type:Function,required:!1},showCancelled:{type:Function,required:!1},beforeHide:{type:Function,required:!1},hide:{type:Function,required:!1},afterHide:{type:Function,required:!1},hideCancelled:{type:Function,required:!1},duration:{type:[Number,Object],required:!1}},render:function(e,t){var l,s=t,c=t.parent.$createElement,f=t.parent.$router,v=t.props,h=v.name,y=v.multi,p=t.data,d=(l=t.parent)[Cn]||(l[Cn]={}),m=pe(t.parent,n,0),g=pe(t.parent,o,null),w=pe(t.parent,i,-1),S=v.modelSlot;if(S){var x=h;ye(t.parent,n,m+1,x),ye(t.parent,i,S.index,x),ye(t.parent,u,S.index,x);var k=S.route;k&&ye(t.parent,r,k,x);var j,O=An({attrs:{}},he,x);if(S.model.props)if("object"===xn(S.model.props))Object.assign(O.attrs,S.model.props);else if(!0===S.model.props&&"object"===xn(null===(j=S.route)||void 0===j?void 0:j.params)){var R;Object.assign(O.attrs,null===(R=S.route)||void 0===R?void 0:R.params)}return c(S.model.component,O,t.children)}if(null==f)return console.error("router is not been register"),c();var P=pe(t.parent,a,null),E=pe(t.parent,u,0),C=f[W](h,m,g,w,P,E);if(null===C)return de(t.parent),c();if(ye(t.parent,a,C),!0===C[ke]&&ye(t.parent,o,C),y){var T=d[Tn];T||(T=d[Tn]=new Map);for(var _=new Map,F=[],M=C.slots.value,I=[],N=function(e){var t,r,n,o=M[e],i="".concat(v.name,"-").concat(o.index),a=null===(t=qn(v.transition,o.route,e))||void 0===t||t,u=c(an,{props:{name:i,modelSlot:o}}),l={},f=qn(v.viewClass,o.route,e);"string"==typeof f&&f.length>0&&(l[f]=!0);var h=qn(v.viewActiveClass,o.route,e),y=qn(null!==(r=v.viewInactiveClass)&&void 0!==r?r:v.viewDeactiveClass,o.route,e),p=T.get(i);if("string"==typeof h&&h.length>0&&(l[h]=o.active),"string"==typeof y&&y.length>0&&(l[y]=!o.active),p&&o.active!==p.state){var d=p.node;if(o.active){var m=null;d&&d.children&&d.children.length>0&&(m=_n(d.children[0],"activated")),I.unshift((function(){!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=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,u=Sn(t);if(null!=u)if(i){var l=cn(r);gn(e,!0,u,r,n,o),bn(e,!0,u,r,l.show,n,o,(function(e){b(a)&&a("from enter")}))}else b(a)&&a();else b(a)&&a()}(s,d,v,o.route,e,a,m)}))}else{if(d&&d.children&&d.children.length>0){var g=_n(d.children[0],"deactivated");try{q(g)}catch(e){console.error(e)}}I.push((function(){!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=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,u=Sn(t);null!=u&&i?wn(e,!0,u,r,cn(r).hide,null,n,o,(function(e){b(a)&&a("from leave")})):b(a)&&a()}(s,d,v,o.route,e,a)}))}}var w={class:l,key:i},S=null!==(n=qn(v.viewTagData,o.route,e))&&void 0!==n?n:{};null!==S&&"object"===xn(S)&&A(!0,w,S);var x=qn(v.viewTagProps,o.route,e);null!==x&&"object"===xn(x)&&(w.props=A(!0,{},x));var k=qn(v.viewTagAttrs,o.route,e);null!==k&&"object"===xn(k)&&(w.attrs=A(!0,{},k)),o.route.viewTagAttrs&&"object"===xn(o.route.viewTagAttrs)&&(w.attrs?Object.assign(w.attrs,o.route.viewTagAttrs):w.attrs=o.route.viewTagAttrs);var j=qn(v.viewTag,o.route,e),O=c(j,w,[u]);if(_.set(i,new Fn(O,o.active)),a){var R=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,i=cn(r);return{create:function(e,t){var a=Sn(t);gn(e,!1,a,r,n,o),bn(e,!1,a,r,i.enter,n,o)},activate:function(e,t){var a=Sn(t);gn(e,!1,a,r,n,o),bn(e,!1,a,r,i.enter,n,o)},remove:function(e,a){wn(e,!1,Sn(e),r,i.leave,a,n,o,(function(){t&&t.data&&(t.data.hook=null),t=null}))}}}(s,O,v,o.route,e);O.data.hook=R}F.push(O)},K=0;K<M.length;K++)N(K);var D,$=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Pn(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}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 o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(T.keys());try{for($.s();!(D=$.n()).done;){var L=D.value;_.has(L)||de(t.parent,L)}}catch(e){$.e(e)}finally{$.f()}d[Tn]=_,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};yn((function(){for(var r=function(r){q((function(){Reflect.apply(e[r],t,[])}))},n=0;n<e.length;n++)r(n)}))}(I,s);var U=qn(v.tag,null,-1),B={};for(var H in p)"props"!==H&&(B[H]=p[H]);var J=qn(v.tagProps,null,-1);return null!==J&&"object"===xn(J)&&(B.props=J),c(U,B,F)}ye(t.parent,i,-1),ye(t.parent,n,m+1),ye(t.parent,u,-1);var z=C.slots.value;if(z.length>0){var V=z[0],G=V.route;G?ye(t.parent,r,G):g&&g.slots.value.length>0&&(G=g.slots.value[0].route,ye(t.parent,r,G));var X=An({},he,"");for(var Y in p)"props"!==Y&&(X[Y]=p[Y]);null!==X.attrs&&"object"===xn(X.attrs)||(X.attrs={});var Q,Z=V.model;if(Z.props)if("object"===xn(Z.props))Object.assign(X.attrs,Z.props);else if(!0===Z.props&&"object"===xn(null===(Q=V.route)||void 0===Q?void 0:Q.params)){var ee;Object.assign(X.attrs,null===(ee=V.route)||void 0===ee?void 0:ee.params)}return null!==v.passProps&&"object"===xn(v.passProps)&&Object.assign(X.attrs,v.passProps),c(Z.component,X,[])}}};function In(e){return In="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},In(e)}var Nn={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,r,n=this.$router,o=this.$route,i={},a=n.options.linkActiveClass,u=n.options.linkExactActiveClass,l=null==a?"fox-router-link-active":a,s=null==u?"fox-router-link-exact-active":u,c=null==this.activeClass?l:this.activeClass,f=null==this.exactActiveClass?s:this.exactActiveClass;i[f]=(t=o,r=this.to,!!t&&("object"===In(r)?r.path?t.path===r.path:t.name===r.name:"/"===r.charAt(0)?t.path===r:t.name===r)),i[c]=this.exact?i[f]:function(e,t){return!!e&&("object"===In(t)?t.path?0===e.path.indexOf(t.path):e.name===t.name:"/"===t.charAt(0)?0===e.path.indexOf(t):e.name===t)}(o,this.to);var v=n[z](this.to),h=function(e){Kn(e)&&n.to(v)},y={click:Kn};Array.isArray(this.event)?this.event.forEach((function(e){y[e]=h})):y[this.event]=h;var p={class:i},d="#".concat(v.path);if("a"===this.tag)p.on=y,p.attrs={href:d};else{var m=Dn(this.$slots.default);if(m){m.isStatic=!1;var g=m.data=extend({},m.data);for(var b in g.on=g.on||{},g.on){var w=g.on[b];b in y&&(g.on[b]=Array.isArray(w)?w:[w])}for(var S in y)S in g.on?g.on[S].push(y[S]):g.on[S]=h;(m.data.attrs=extend({},m.data.attrs)).href=d}else p.on=y}return e(this.tag,p,this.$slots.default)}};function Kn(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 Dn(e){if(e)for(var t,r=0;r<e.length;r++){if("a"===(t=e[r]).tag)return t;if(t.children&&(t=Dn(t.children)))return t}}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},$n(e)}function Ln(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Bn(n.key),n)}}function Un(e,t,r){return t&&Ln(e.prototype,t),r&&Ln(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bn(e){var t=function(e){if("object"!=$n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=$n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$n(t)?t:t+""}function Hn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Jn=function(e){return e[e.limitless=0]="limitless",e[e.once=1]="once",e}(Jn||{}),Wn=Symbol("registerKey"),zn=Un((function e(t,r){Hn(this,e),this.callback=t,this.policy=r})),Vn=function(){return Un((function e(){Hn(this,e),function(e,t,r){(t=Bn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,Wn,new Map)}),[{key:"on",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this[Wn].get(e);n||(n=new Array,this[Wn].set(e,n));var o=!0===r?Jn.once:Jn.limitless,i=new zn(t,o);return n.push(i),this}},{key:"off",value:function(e,t){if(!t)return this[Wn].delete(e),this;var r=this[Wn].get(e);if(r)for(var n=0;n<r.length;n++)if(r[n].callback===t){r.splice(n,1);break}return this}},{key:"bind",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.on(e,t,r)}},{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,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=r.length;if(o<1)return this;var i=r[o-1];if("function"!=typeof i)return console.error("callback can not benn empty"),this;for(var a=o-1,u=new Array(a),l=[].splice.call(r,0,a),s=function(t){e.once(l[t],(function(e){u[t]=e,0==(a-=1)&&Reflect.apply(i,{},u)}))},c=0;c<l.length;c++)s(c);return this}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=this[Wn].get(e);if(!o)return this;for(var i=function(e){var t=o[e];if(t.policy==Jn.once?o.splice(e,1):e++,"function"==typeof t.callback)try{q((function(){Reflect.apply(t.callback,{},r)}))}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,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Reflect.apply(this.emit,this,[e].concat(r))}}])}();function Gn(e){return Gn="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},Gn(e)}var Xn={type:"GET",async:!0,contentType:"application/x-www-form-urlencoded",dataType:"string",cache:!1,timeout:3e4,processData:!0};function Yn(e){var t=new XMLHttpRequest,r={};if(A(!0,r,Xn),A(!0,r,e),(e=r).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 r,n=null!==(r=t.response)&&void 0!==r?r:"";if(0==n.length&&0==t.status)return;try{o=n,"json"===e.dataType&&"string"==typeof o&&(o=JSON.parse(o)),n=o}catch(e){console.error(e.message,e)}"function"==typeof e.success&&e.success(n,t.status,t)}else"function"==typeof e.error&&e.error(t,t.status);var o};try{var n=e.url;if(e.type&&"GET"===e.type.toUpperCase()&&(n=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text";if(null==t)return e;var n="";if(0===(r=r.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded")||0===r.indexOf("application/json"))if("object"===Gn(t))for(var o in t){var i=t[o];if(Array.isArray(i))for(var a=0;a<i.length;a++){var u="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i[a]));n.length>0&&(n+="&"),n+=u}else{var l="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i));n.length>0&&(n+="&"),n+=l}}else n=t;else n=t;return n.length>0&&(e=-1===e.indexOf("?")?"".concat(e,"?").concat(n):"".concat(e,"&").concat(n)),e}(e.url,e.data,e.contentType)),t.open(e.type,n,e.async),e.contentType&&t.setRequestHeader("Content-Type",e.contentType),"function"==typeof e.beforeSend){var o={};A(!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",r="";if(0===(t=t.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded"))if("object"===Gn(e))for(var n in e){var o=e[n];if(Array.isArray(o))for(var i=0;i<o.length;i++){var a="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(o[i]));r.length>0&&(r+="&"),r+=a}else{var u="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(o));r.length>0&&(r+="&"),r+=u}}else r=e;else r=0===t.indexOf("text")?"object"===Gn(e)?JSON.stringify(e):e:0===t.indexOf("application/json")&&"object"===Gn(e)?JSON.stringify(e):e;return r}(e.data,e.contentType):e.data;t.send(i)}else t.send()}catch(r){"function"==typeof e.error&&e.error(t,r.message),"function"==typeof e.complete&&e.complete(t,r.message)}return t}function Qn(e){return Qn="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},Qn(e)}function Zn(e,t,r){return t=to(t),function(e,t){if(t&&("object"==Qn(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)}(e,eo()?Reflect.construct(t,r||[],to(e).constructor):t.apply(e,r))}function eo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(eo=function(){return!!e})()}function to(e){return to=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},to(e)}function ro(e,t){return ro=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ro(e,t)}function no(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uo(n.key),n)}}function oo(e,t,r){return t&&no(e.prototype,t),r&&no(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function io(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ao(e,t,r){return(t=uo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uo(e){var t=function(e){if("object"!=Qn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Qn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qn(t)?t:t+""}var lo=Symbol("idKey"),so=Symbol("valueKey"),co=Symbol("childrenKey"),fo=Symbol("growKey"),vo=oo((function e(t){io(this,e),ao(this,fo,!0),ao(this,so,function(){if(re){var e={};return re.util.defineReactive(e,"value",void 0),e}var t={};return Reflect.defineProperty(t,"value",{get:function(){return t[fe]},set:function(e){return t[fe]=e}}),t}()),ao(this,co,new Map),this[lo]=t})),ho=function(){return oo((function e(){io(this,e)}),[{key:"get",value:function(e,t){if("value"==t)return e[so].value;if("grow"===t)return e[fo];var r=e[co].get(t);return r?mo(r):e[fo]?((r=po(t))[fo]=e[fo],e[co].set(t,r),mo(r)):void 0}},{key:"set",value:function(e,t,r){return"value"==t?(e[so].value=r,!0):"grow"===t?(e[fo]=_(r),!0):null==r?(e[co].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[co].delete(t),!0)}}])}(),yo="__proxy__";function po(e){var t=new vo(e);return Reflect.set(t,yo,new Proxy(t,new ho)),t}function mo(e){return Reflect.get(e,yo)}var go=function(e){function t(){return io(this,t),Zn(this,t,["__root__"])}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ro(e,t)}(t,e),oo(t,[{key:"put",value:function(){var e=arguments.length;if(e<2)return console.error("参数至少包括一个(key, value)"),!1;for(var t=this,r=0;r<e-1;r++){var n=r<0||arguments.length<=r?void 0:arguments[r],o=void 0;t[co].has(n)?o=t[co].get(n):(o=po(n),t[co].set(n,o)),t=o}return t[so].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,r=0;r<e;r++){var n=r<0||arguments.length<=r?void 0:arguments[r];if(!t[co].has(n))return;t=t[co].get(n)}return t[so].value}}},{key:"remove",value:function(){var e=arguments.length;if(0==e)return!1;for(var t=this,r=0;r<e-1;r++){var n=r<0||arguments.length<=r?void 0:arguments[r];if(!t[co].has(n))return!1;t=t[co].get(n)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return!!t[co].has(o)&&(t[co].delete(o),!0)}},{key:"contains",value:function(){var e=arguments.length;if(0==e)return!1;for(var t=this,r=0;r<e-1;r++){var n=r<0||arguments.length<=r?void 0:arguments[r];if(!t[co].has(n))return!1;t=t[co].get(n)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return t[co].has(o)}},{key:"clear",value:function(){this[co].clear()}}])}(vo),bo=(Symbol("treeKey"),["put","get","contains","remove","clear"]);function wo(e){return bo.includes(e)}var So=function(){return oo((function e(){io(this,e)}),[{key:"get",value:function(e,t){if("value"==t)return e[so].value;if("grow"===t)return e[fo];if(t===co)return e[co];if("string"==typeof t&&wo(t))return e[t];var r=String(t),n=e[co].get(r);return n?mo(n):e[fo]?((n=po(r))[fo]=e[fo],e[co].set(r,n),mo(n)):void 0}},{key:"set",value:function(e,t,r){return"value"==t?(e[so].value=r,!0):"grow"===t?(e[fo]=_(r),!0):!wo(t)&&(null==r?(e[co].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[co].delete(t),!0)}}])}(),xo=new Proxy(go,{construct:function(e){var t=function(){var e=new go,t=new So,r=new Proxy(e,t),n={put:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Reflect.apply(e.put,e,r)},get:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Reflect.apply(e.get,e,r)},remove:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Reflect.apply(e.remove,e,r)},contains:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Reflect.apply(e.contains,e,r)},clear:function(){return Reflect.apply(e.clear,e,[])}};return Object.assign(n,r),Reflect.set(e,yo,r),e}();return mo(t)}}),ko={get each(){return $},get type(){return M},get isFunction(){return b},get isArray(){return g},get isArrayLike(){return N},get makeArray(){return D},get merge(){return K},get isWindow(){return I},get isPlainObject(){return S},get isEqual(){return L},get isESModule(){return k}};function jo(e){return jo="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},jo(e)}function Ao(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ao(Object(r),!0).forEach((function(t){Ro(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ao(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ro(e,t,r){return(t=function(e){var t=function(e){if("object"!=jo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=jo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Symbol("fk");var Po=new on({}),Eo=new xo,Co=new Vn,To=!1,qo=Oo(Oo({},ko),{},{get router(){return Po},get bus(){return Eo},get Bus(){return xo},get eventproxy(){return Co},get EventProxy(){return Vn},get EventChain(){return pt},get require(){return Po.require},get ajax(){return Yn},get extend(){return A},get clone(){return O},install:function(e){To||(To=!0,function(e){re=e}(e),e.component(an,Mn),e.component("fox-router-link",Nn),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 pe(this,r,null)}}),Reflect.defineProperty(e.prototype,"$bus",{get:function(){return this._routerRoot._fox.bus}}),e.prototype.$fox_on=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Co.on(e,t,r)},e.prototype.$fox_off=function(e,t){Co.off(e,t)},e.prototype.$fox_once=function(e,t){Co.once(e,t)},e.prototype.$fox_all=function(){for(var e=Co,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];Reflect.apply(e.all,e,r)},e.prototype.$fox_trigger=function(e){for(var t=Co,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];Reflect.apply(t.trigger,t,[e].concat(n))},e.prototype.$fox_emit=function(e){for(var t=Co,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];Reflect.apply(t.trigger,t,[e].concat(n))},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(){}}))}}),_o=qo;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,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(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:function(){return _o}}),Symbol("rk");var r=Symbol("crk"),n=Symbol("vd"),o=Symbol("rv"),i=Symbol("rvi"),a=Symbol("pv"),u=Symbol("pvi");function l(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var o=1,i="";if("?"===e[u=r+1])throw new TypeError('Pattern cannot start with "?" at '.concat(u));for(;u<e.length;)if("\\"!==e[u]){if(")"===e[u]){if(0==--o){u++;break}}else if("("===e[u]&&(o++,"?"!==e[u+1]))throw new TypeError("Capturing groups are not allowed at ".concat(u));i+=e[u++]}else i+=e[u++]+e[u++];if(o)throw new TypeError("Unbalanced pattern at ".concat(r));if(!i)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:i}),r=u}else{for(var a="",u=r+1;u<e.length;){var l=e.charCodeAt(u);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;a+=e[u++]}if(!a)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:a}),r=u}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,i="[^".concat(c(t.delimiter||"/#?"),"]+?"),a=[],u=0,l=0,s="",f=function(e){if(l<r.length&&r[l].type===e)return r[l++].value},v=function(e){var t=f(e);if(void 0!==t)return t;var n=r[l],o=n.type,i=n.index;throw new TypeError("Unexpected ".concat(o," at ").concat(i,", expected ").concat(e))},h=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};l<r.length;){var y=f("CHAR"),p=f("NAME"),d=f("PATTERN");if(p||d){var m=y||"";-1===o.indexOf(m)&&(s+=m,m=""),s&&(a.push(s),s=""),a.push({name:p||u++,prefix:m,suffix:"",pattern:d||i,modifier:f("MODIFIER")||""})}else{var g=y||f("ESCAPED_CHAR");if(g)s+=g;else if(s&&(a.push(s),s=""),f("OPEN")){m=h();var b=f("NAME")||"",w=f("PATTERN")||"",S=h();v("CLOSE"),a.push({name:b||(w?u++:""),pattern:b&&!w?i:w,prefix:m,suffix:S,modifier:f("MODIFIER")||""})}else v("END")}}return a}function s(e,t){var r=[];return function(e,t,r){void 0===r&&(r={});var n=r.decode,o=void 0===n?function(e){return e}:n;return function(r){var n=e.exec(r);if(!n)return!1;for(var i=n[0],a=n.index,u=Object.create(null),l=function(e){if(void 0===n[e])return"continue";var r=t[e-1];"*"===r.modifier||"+"===r.modifier?u[r.name]=n[e].split(r.prefix+r.suffix).map((function(e){return o(e,r)})):u[r.name]=o(n[e],r)},s=1;s<n.length;s++)l(s);return{path:i,index:a,params:u}}}(v(e,r,t),r,t)}function c(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function f(e){return e&&e.sensitive?"":"i"}function v(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,o=r.exec(e.source);o;)t.push({name:o[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),o=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return v(e,t,r).source}));return new RegExp("(?:".concat(n.join("|"),")"),f(r))}(e,t,r):function(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,i=r.start,a=void 0===i||i,u=r.end,l=void 0===u||u,s=r.encode,v=void 0===s?function(e){return e}:s,h=r.delimiter,y=void 0===h?"/#?":h,p=r.endsWith,d="[".concat(c(void 0===p?"":p),"]|$"),m="[".concat(c(y),"]"),g=a?"^":"",b=0,w=e;b<w.length;b++){var S=w[b];if("string"==typeof S)g+=c(v(S));else{var x=c(v(S.prefix)),k=c(v(S.suffix));if(S.pattern)if(t&&t.push(S),x||k)if("+"===S.modifier||"*"===S.modifier){var j="*"===S.modifier?"?":"";g+="(?:".concat(x,"((?:").concat(S.pattern,")(?:").concat(k).concat(x,"(?:").concat(S.pattern,"))*)").concat(k,")").concat(j)}else g+="(?:".concat(x,"(").concat(S.pattern,")").concat(k,")").concat(S.modifier);else"+"===S.modifier||"*"===S.modifier?g+="((?:".concat(S.pattern,")").concat(S.modifier,")"):g+="(".concat(S.pattern,")").concat(S.modifier);else g+="(?:".concat(x).concat(k,")").concat(S.modifier)}}if(l)o||(g+="".concat(m,"?")),g+=r.endsWith?"(?=".concat(d,")"):"$";else{var A=e[e.length-1],O="string"==typeof A?m.indexOf(A[A.length-1])>-1:void 0===A;o||(g+="(?:".concat(m,"(?=").concat(d,"))?")),O||(g+="(?=".concat(m,"|").concat(d,")"))}return new RegExp(g,f(r))}(l(e,r),t,r)}(e,t,r)}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function y(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function m(e){return m="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},m(e)}var g=Array.isArray,b=function(e){return"function"==typeof e},w=Object.prototype.toString,S=function(e){return"[object Object]"===(t=e,w.call(t));var t},x="function"==typeof Symbol&&"symbol"===m(Symbol.toStringTag);function k(e){return e.__esModule||x&&"Module"===e[Symbol.toStringTag]}var j="undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]");function A(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o=void 0!==t[0]&&null!==t[0]?t[0]:{},i=1,a=t.length,u=!1;for("boolean"==typeof o&&(u=o,o=null!==(n=t[i])&&void 0!==n?n:{},i++),"object"!==m(o)&&(o={});i<a;i++)if(null!==t[i]&&void 0!==t[i]){var l=t[i];for(var s in l){var c=o[s],f=l[s];if(c!==f)if(!0===u&&f&&"object"===m(f)){var v;v=Array.isArray(f)?c&&Array.isArray(c)?c:[]:c&&"object"===m(c)?c:{},o[s]=A(u,v,f)}else void 0!==f&&(o[s]=f)}}return o}function O(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r){if("object"!==m(t))return{};for(var n in"object"!==m(e)&&(e={}),t){var o=e[n],i=t[n];if(o!==i)if("object"===m(i)){if(!Array.isArray(i)&&!S(i))continue;o=O(o,i,r),e[n]=o}else{if("function"==typeof i)continue;e[n]=i}}var a,u=p(Object.getOwnPropertySymbols(t));try{for(u.s();!(a=u.n()).done;){var l=a.value,s=e[l],c=t[l];if(s!==c)if("object"===m(c)){if(!Array.isArray(c)&&!S(c))continue;s=O(s,c,r),e[l]=s}else{if("function"==typeof c)continue;e[l]=c}}}catch(e){u.e(e)}finally{u.f()}}else A(!0,e,t);return e}var R,P,E,T=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,r=[{key:"get",value:function(){var t=++e.seed;return t>=Number.MAX_VALUE&&(e.seed=0),t}}],null&&h(t.prototype,null),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();R=T,P="seed",E=(new Date).getTime(),(P=y(P))in R?Object.defineProperty(R,P,{value:E,enumerable:!0,configurable:!0,writable:!0}):R[P]=E;var C=j?Promise.resolve():null;function q(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];null!==C?r&&r.length>0?C.then((function(){e(r)})):C.then(e):r&&r.length>0?setTimeout((function(){e(r)})):setTimeout(e)}function _(e){return null!=e&&("boolean"==typeof e?e:"string"==typeof e?"true"===e.toLocaleLowerCase():Boolean(e))}var F={"[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 M(e){var t=Object.prototype.toString.call(e);return null==e?String(e):F[t]||"object"}function I(e){return e&&"object"===m(e)&&"setInterval"in e}function N(e){var t=!!e&&"length"in e&&e.length,r=M(e);return"function"!==r&&!I(e)&&("array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e)}function K(e,t){for(var r=+t.length,n=0,o=e.length;n<r;n++)e[o++]=t[n];return e.length=o,e}function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null!=e&&(N(Object(e))?K(t,"string"==typeof e?[e]:e):t.push(e)),t}function $(e,t,r){if(N(e))Reflect.apply([].forEach,e,[t]);else for(var n in e)if(r&&e.hasOwnProperty(n)){if(!1===Reflect.apply(t,e,[e[n]]))break}else if(!1===Reflect.apply(t,e,[e[n]]))break;return e}function L(e,t){if(e==t)return!0;if(void 0===e||void 0===t)return!1;var r=M(e);if(r!==M(t))return!1;if("object"===r){var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++){var a=n[i];if(!L(e[a],t[a]))return!1}return!0}if("array"===r){if(e.length!==t.length)return!1;for(var u=0;u<e.length;u++)if(!L(e[u],t[u]))return!1;return!0}return!1}var U=function(e){var t,r={},n=p(Reflect.ownKeys(e));try{for(n.s();!(t=n.n()).done;){var o=t.value,i=e[o];i&&!Array.isArray(i)&&"object"===m(i)&&(i=U(i)),"symbol"===m(o)?r[String(o)]=i:r[o]=i}}catch(e){n.e(e)}finally{n.f()}return r},B=/^Symbol\((.*)\)$/,H=function(e){var t,r={},n=p(Reflect.ownKeys(e));try{for(n.s();!(t=n.n()).done;){var o=t.value,i=e[o];i&&!Array.isArray(i)&&"object"===m(i)&&(i=H(i));var a=B.exec(o);a&&a[1]?r[Symbol.for(a[1])]=i:r[o]=i}}catch(e){n.e(e)}finally{n.f()}return r},J="default",W=Symbol("sync"),z=Symbol("resolveRoute");function V(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Reflect.apply(e,{},n)}}}function G(e){return G="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},G(e)}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,te(n.key),n)}}function Q(e,t,r){return t&&Y(e.prototype,t),r&&Y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(e,t,r){return(t=te(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function te(e){var t=function(e){if("object"!=G(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=G(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==G(t)?t:t+""}var re,ne=Q((function e(t,r,n,o){Z(this,e),ee(this,"rootIndex",0),this.name=t,this.level=r,this.rootName=n,this.rootIndex=o})),oe=function(){function e(t,r){Z(this,e),ee(this,"data",{}),this.to=t,this.from=r}return Q(e,null,[{key:"from",value:function(t){var r,n=new e(t.to,t.from),o=null!==(r=t.data)&&void 0!==r?r:{};return A(!0,n.data,o),n}},{key:"clear",value:function(e){for(var t in e)e[t]=void 0}}])}(),ie=function(){function e(){Z(this,e)}return Q(e,[{key:"fullPath",get:function(){var e,t,r=null!==(e=this.path)&&void 0!==e?e:"/".concat(this.name);return"".concat(null!==(t=this.root)&&void 0!==t?t:J,"!").concat(r)}}],[{key:"clone",value:function(t,r){var n=new e;return O(n,t,r),n}},{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 r=new e;if(null==t)return r;var n=r;for(var o in t){var i=t[o];n[o]=i}var a=Object.getOwnPropertySymbols(t);if(Array.isArray(a)&&a.length>0){var u,l=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return X(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(a);try{for(l.s();!(u=l.n()).done;){var s=u.value;n[s]=t[s]}}catch(e){l.e(e)}finally{l.f()}}return r}}])}(),ae=function(){return Q((function e(t,r,n,o){Z(this,e),this.id=T.get(),this.name=t,this.src=r,"function"!=typeof r&&(this.component=r),this.props=n,this.meta=o}),[{key:"isResolved",get:function(){return void 0!==this.component}},{key:"resolve",value:function(){return t=(e=this).src,new Promise((function(r,n){var o,i=V((function(t){k(t)&&(t=t.default),e.component=t,r()})),a=V((function(e){var t="failed to resolve async component ".concat(e);n(t)}));try{o=t(i,a)}catch(e){a(e)}if(o)if("function"==typeof o.then)o.then(i,a);else{var u=o.component;u&&"function"==typeof u.then&&u.then(i,a)}}));var e,t}}])}(),ue=Q((function e(){Z(this,e),ee(this,"models",[])})),le=Q((function e(){Z(this,e),ee(this,"layers",[])})),se=function(e){return e[e.Push=0]="Push",e[e.Replace=1]="Replace",e[e.Put=2]="Put",e[e.Append=3]="Append",e[e.Open=4]="Open",e}({}),ce=function(e){return e[e.Part=0]="Part",e[e.All=1]="All",e}({}),fe=Symbol("valueKey"),ve=Symbol("pvds"),he=Symbol("sk");function ye(e,t,r,n){var o=e[ve];if(o||(o=e[ve]=new Map),n){var i=o.get(n);i||(i=new Map,o.set(n,i)),i.set(t,r)}else o.set(t,r)}function pe(e,t,r){for(var n=e.$vnode?e.$vnode.data:{},o=n[he],i=e.$parent;i&&i._routerRoot!==i;){var a=i[ve];if(a){if(o){var u=a.get(o);if(u&&u.has(t))return u.get(t)}if(a.has(t))return a.get(t)}var l=(n=i.$vnode?i.$vnode.data:{})[he];void 0!==l&&(o=l),i=i.$parent}return r}function de(e,t){if(t){var r=e[ve];r&&r&&r.has(t)&&r.delete(t)}else Reflect.deleteProperty(e,ve)}function me(e){return me="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},me(e)}function ge(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,xe(n.key),n)}}function be(e,t,r){return t&&ge(e.prototype,t),r&&ge(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function we(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t,r){return(t=xe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xe(e){var t=function(e){if("object"!=me(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==me(t)?t:t+""}var ke=Symbol("rootKey"),je=Symbol("rootNodeKey"),Ae=Symbol("parentNodeKey"),Oe=Symbol("nameKey"),Re=be((function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];we(this,e),Se(this,"active",!0),Se(this,"index",0),this.route=t,this.model=r,this.index=n,this.active=o})),Pe=function(){return be((function e(t,r,n){we(this,e),Se(this,je,null),Se(this,Ae,null),this[Oe]=t,this[ke]=r,n&&(this[je]=n)}),[{key:"slots",get:function(){return null==this._slots&&(this._slots=function(){if(re){var e={};return re.util.defineReactive(e,"value",[],void 0,!0),e}var t={};return Reflect.defineProperty(t,"value",{get:function(){return t[fe]},set:function(e){return t[fe]=e}}),t}()),this._slots}},{key:"empty",get:function(){return null==this._slots||0==this._slots.value.length}},{key:"name",get:function(){return this[Oe]}}])}(),Ee=function(){return be((function e(t,r,n){we(this,e),this.view=t,this.index=r,this.level=n}),null,[{key:"include",value:function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(n.view===t.view&&(-1==t.index||n.index===t.index)&&n.level===t.level)return!0}return!1}}])}(),Te=be((function e(){we(this,e),Se(this,"views",[])})),Ce=be((function e(){we(this,e),Se(this,"layers",[])}));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},qe(e)}function _e(e,t,r){return(t=Ie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ie(n.key),n)}}function Me(e,t,r){return t&&Fe(e.prototype,t),r&&Fe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ie(e){var t=function(e){if("object"!=qe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qe(t)?t:t+""}function Ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Ke=Me((function e(){Ne(this,e)})),De=function(){return Me((function e(){Ne(this,e),_e(this,"forbidTime",300),_e(this,"submitRecorder",new Ke)}),[{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)}}])}(),$e="undefined"!=typeof window,Le=function(){return window},Ue=function(){return window.document};function Be(){if(!$e)return"/";var e,t,r=Le().location;return"".concat(r.protocol,"//").concat(r.host)+((t=(e=r.pathname).lastIndexOf("/"))>0&&t<e.length-1?e=e.substring(0,t+1):0===t&&-1!==e.indexOf(".")?e="/":-1===t&&(e=-1==e.indexOf(".")?"/".concat(e,"/"):"/"),0!==e.indexOf("/")&&(e="/".concat(e)),e)}function He(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent?e.attachEvent("on".concat(t),r):e["on".concat(t)]=r}function Je(e,t,r){e.removeEventListener?e.removeEventListener(t,r):e.detachEvent?e.detachEvent("on".concat(t),r):e["on".concat(t)]=null}function We(e){return We="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},We(e)}function ze(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ve(n.key),n)}}function Ve(e){var t=function(e){if("object"!=We(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=We(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==We(t)?t:t+""}Be();var Ge=function(e){return e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Defining=2]="Defining",e[e.Defined=3]="Defined",e}({}),Xe=function(e){return e[e.normal=0]="normal",e[e.factory=1]="factory",e}({}),Ye=function(){return function(e,t){return t&&ze(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,r){(t=Ve(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"register",new Map)}),[{key:"get",value:function(e){var t;return null!==(t=this.register.get(e))&&void 0!==t?t:null}},{key:"set",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),null!=t?t:null}},{key:"has",value:function(e){return this.register.has(e)}},{key:"clear",value:function(){this.register.clear()}}])}();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},Qe(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 r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,nt(n.key),n)}}function rt(e,t,r){return(t=nt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nt(e){var t=function(e){if("object"!=Qe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qe(t)?t:t+""}var ot=function(e){return e.Busy="Busy",e.Free="Free",e.Reject="Reject",e.Exception="Exception",e.Finished="Finished",e}(ot||{}),it=Symbol("chainKey"),at=Symbol("cursorKey"),ut=Symbol("$persistentModeKey"),lt=Symbol("statusKey"),st=Symbol("argsKey"),ct=Symbol("exArgsKey"),ft=Symbol("successFnsKey"),vt=Symbol("errorFnsKey"),ht=Symbol("sessionKey"),yt=Symbol("_go"),pt=function(){return function(e,t){return t&&tt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),rt(this,it,[]),rt(this,at,0),rt(this,ut,!1),rt(this,lt,ot.Free),rt(this,st,[]),rt(this,ct,[]),rt(this,ft,[]),rt(this,vt,[]),this[ht]=t,this[ut]=r}),[{key:"session",get:function(){return this[ht]}},{key:yt,value:function(e){var t=this,r=this[lt];this[lt]=ot.Busy,this[at]+=e,this[at]<0&&(this[at]=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];if(this[st]=o,r===ot.Exception||r===ot.Reject){for(var a=[{session:this[ht]}].concat(Ze(this[ct])),u=function(){try{var e=t[vt].shift();"function"==typeof e&&q((function(){Reflect.apply(e,{},a)}))}catch(e){console.error(e.message,e)}};this[vt].length>0;)u();return this[lt]=r,this[it]=[],this[at]=0,this}if(r===ot.Finished||this[at]>=this[it].length){for(var l=[{session:this[ht]}].concat(Ze(this[st])),s=function(){var e=t[ft].shift();"function"==typeof e&&q((function(){Reflect.apply(e,{},l)}))};this[ft].length>0;)s();return this[lt]=ot.Free,this}if(this[at]>=this[it].length)return this[lt]=ot.Free,this;var c=this[it][this[at]];this[ut]||(this[it].splice(0,this[at]+1),this[at]=-1);var f=this[at]+1;try{var v=!1,h={go:function(e){if(!v){v=!0;for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];Reflect.apply(t[yt],t,[e].concat(n))}},resolve:function(){if(!v){v=!0;for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];Reflect.apply(t[yt],t,[1].concat(r))}},reject:function(){if(!v){v=!0;for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];Reflect.apply(t.reject,t,[].concat(r))}},insert:function(e){v||(t[it].splice(f,0,e),f++)},session:this[ht]};q((function(){Reflect.apply(c,{},[h].concat(Ze(t[st])))}))}catch(e){this.throw(e)}return this}},{key:"go",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Reflect.apply(this[yt],this,[e].concat(r))}},{key:"finish",value:function(){this[lt]=ot.Finished;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this[st]=t,Reflect.apply(this[yt],this,[0])}},{key:"reject",value:function(){this[lt]=ot.Reject;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this[ct]=t,Reflect.apply(this[yt],this,[0])}},{key:"throw",value:function(){this[lt]=ot.Exception;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this[ct]=t,Reflect.apply(this[yt],this,[0])}},{key:"reset",value:function(){var e=this;this[lt]=ot.Busy;for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this[st]=r,this[it]=[],this[at]=0;for(var o=[{session:this[ht]}].concat(Ze(this[st])),i=function(){var t=e[ft].shift();q((function(){Reflect.apply(t,e,o)}))};this[ft].length>0;)i();return this[lt]=ot.Free,this}},{key:"post",value:function(e){return this[lt]===ot.Reject||this[lt]===ot.Exception||(Array.isArray(e)?this[it]=[].concat(Ze(this[it]),Ze(e)):this[it].push(e),this[lt]===ot.Busy||Reflect.apply(this[yt],this,[0].concat(Ze(this[st])))),this}},{key:"wait",value:function(e,t){return e&&"function"==typeof e&&this[ft].push(e),t&&"function"==typeof t&&this[vt].push(t),this[lt]===ot.Busy||Reflect.apply(this[yt],this,[0].concat(Ze(this[st]))),this}},{key:"exception",value:function(e){return e&&"function"==typeof e&&this[vt].push(e),this[lt]===ot.Busy?this:Reflect.apply(this[yt],this,[0].concat(Ze(this[st])))}},{key:"isFinish",value:function(){return this[lt]==ot.Reject||this[lt]==ot.Free&&this[at]>=this[it].length}}])}();function dt(e){return dt="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},dt(e)}function mt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,St(n.key),n)}}function bt(e,t,r){return t&&gt(e.prototype,t),r&&gt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function wt(e,t,r){return(t=St(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function St(e){var t=function(e){if("object"!=dt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=dt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dt(t)?t:t+""}var xt=function(){return bt((function e(){mt(this,e),wt(this,"moduleManager",new Ye),wt(this,"options",{paths:{},alias:{},nature:[],timeout:3e3})}),[{key:"paths",get:function(){return this.options.paths},set:function(e){this.options.paths=e}},{key:"alias",get:function(){return this.options.alias},set:function(e){this.options.alias=e}},{key:"naturePaths",get:function(){return this.options.nature},set:function(e){this.options.nature=e}},{key:"timeout",get:function(){return this.options.timeout},set:function(e){this.options.timeout=e}},{key:"query",get:function(){return this._query},set:function(e){this._query=e}},{key:"head",get:function(){return Ue().head}},{key:"setModule",value:function(e,t){var r={id:e,src:"",status:Ge.Defined};"function"==typeof t?(r.exports=t,r.type=Xe.factory):r.exports=t,this.moduleManager.set(e,r)}},{key:"removeModule",value:function(e){this.moduleManager.remove(e)}},{key:"ensure",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=[],o=t.length-1,i={};"object"===dt(t[o])&&(Object.assign(i,t[o]),o--);var a=null;"function"==typeof t[o]&&(a=t[o],o--);for(var u=0;u<=o;u++)if(Array.isArray(t[u]))for(var l=t[u],s=0;s<l.length;s++)l[s]&&n.push(this.resolvePath(l[s]));else if("string"==typeof t[u])for(var c=t[u].split(","),f=0;f<c.length;f++)c[f]&&n.push(this.resolvePath(c[f]));for(var v=new jt(n.length,(function(e,t){if(v.isOK())try{"function"==typeof a&&Reflect.apply(a,{},t)}catch(e){console.error(e.message,e)}else try{console.error(e),"function"==typeof a&&Reflect.apply(a,{},[])}catch(e){console.error(e.message,e)}})),h=new pt,y=0;y<n.length;y++){var p=new At(y,n[y],i,v);this.mount(h,p)}return this}},{key:"remove",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=[],i=r.length-1,a={};"object"===dt(r[i])&&(Object.assign(a,r[i]),i--);var u=null;"function"==typeof r[i]&&(u=r[i],i--);for(var l=0;l<=i;l++)if(Array.isArray(r[l]))for(var s=r[l],c=0;c<s.length;c++)s[c]&&o.push(this.resolvePath(s[c]));else for(var f=r[l].split(","),v=0;v<f.length;v++)f[v]&&o.push(this.resolvePath(f[v]));return o.forEach((function(t){e.unmount(t,a)})),"function"==typeof u&&Reflect.apply(u,{},[]),this}},{key:"mount",value:function(e,t){if("exports"!==t.src)if("module"!==t.src){if(this.isNaturePath(t.src)){var r=t.params.jsPoint;return r||(r=this.head),void this.mountJS(e,t,r)}if(this.isNaturePath(t.src)){var n=t.params.cssPoint;return n||(n=this.head),void this.mountCSS(e,t,n)}var o=this.getFileNamePostfix(t.src);if("js"===o||0===o.length){var i=t.params.jsPoint;return i||(i=this.head),void this.mountJS(e,t,i)}if("css"===o){var a=t.params.cssPoint;return a||(a=this.head),void this.mountCSS(e,t,a)}}else e.post((function(e){t.progress.work(!0,t.index,"module"),e.resolve()}));else e.post((function(e){t.progress.work(!0,t.index,"exports"),e.resolve()}))}},{key:"mountCSS",value:function(e,t,r){var n=this;e.post((function(e){var o=t.src,i=n.moduleManager.get(o);if(i&&(i.status==Ge.Defined||i.status==Ge.Loaded)&&i.exports)return i.type===Xe.factory&&"function"==typeof i.exports?t.progress.work(!0,t.index,i.exports()):t.progress.work(!0,t.index,i.exports),void e.resolve();var a=Ue(),u=a.createElement("link");if(Reflect.has(u,"onload"))u.onload=function(){u.onload=null,u.onerror=null,t.progress.work(!0,t.index,t.src),e.resolve()},u.onerror=function(){try{r.removeChild(u)}catch(e){console.error(e.message,e)}u.onload=null,u.onerror=null,t.progress.work(!1,t.index,null),e.reject()};else{var l,s={timeout:null!==(l=n.options.timeout)&&void 0!==l?l:3e3,time:0,success:function(){t.progress.work(!0,t.index,t.src),e.resolve()},error:function(){try{r.removeChild(u)}catch(e){console.error(e.message,e)}t.progress.work(!1,t.index,null),e.resolve()}};setTimeout((function(){kt(u,s)}),1)}var c=a.getElementById(o);c&&c.parentNode&&c.parentNode.removeChild(c),u.rel="stylesheet",u.type="text/css",u.id=o,u.href=o,r.appendChild(u)}))}},{key:"mountJS",value:function(e,t,r){var n=this;e.post((function(e){var o=t.src,i=n.moduleManager.get(o);if(i&&(i.status==Ge.Defined||i.status==Ge.Loaded)){if(i.exports)return i.type===Xe.factory&&"function"==typeof i.exports?t.progress.work(!0,t.index,i.exports()):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={id:o,src:o,status:Ge.Loading},n.moduleManager.set(o,i);var a=Ue().createElement("script");if("onload"in a)a.onload=function(){a.onload=null,a.onerror=null,i.status===Ge.Loading&&(i.status=Ge.Loaded,t.progress.work(!0,t.index,o)),e.resolve()},a.onerror=function(){try{r.removeChild(a)}catch(e){console.error(e.message,e)}a.onload=null,a.onerror=null,n.moduleManager.remove(o),t.progress.work(!1,t.index,null),e.resolve()};else{var u=a;u.onreadystatechange=function(){/loaded|complete/.test(u.readyState)&&(u.onreadystatechange=null,i.status==Ge.Loading&&(i.status=Ge.Loaded,t.progress.work(!0,t.index,o)),e.resolve())}}a.defer=!0,a.src=o,Le().define=n.createDefine(i,t),r.appendChild(a)}))}},{key:"unmount",value:function(e){var t=Ue(),r=this.getFileNamePostfix(e);if("js"===r||0===r.length){var n=t.querySelector('script[src="'.concat(e,'"]'));return n&&n.parentNode&&n.parentNode.removeChild(n),void this.moduleManager.remove(e)}if("css"!==r);else{var o=t.querySelector('style[href="'.concat(e,'"]'));o&&o.parentNode&&o.parentNode.removeChild(o)}}},{key:"trimEmptyElement",value:function(e){for(var t=[],r=0;r<e.length;r++)if(void 0!==e[r]&&null!==e[r]){var n=e[r].trim();0!==n.length&&t.push(n)}return t}},{key:"createDefine",value:function(e,t){var r=this,n=function(){var n,o,i;e.status=Ge.Defining;var a=arguments.length;1===a?(i=arguments.length<=0?void 0:arguments[0],n=void 0):2===a?(i=arguments.length<=1?void 0:arguments[1],Array.isArray(arguments.length<=0?void 0:arguments[0])?(o=r.trimEmptyElement(arguments.length<=0?void 0:arguments[0]),n=void 0):o=void 0):(n=arguments.length<=0?void 0:arguments[0],o=r.trimEmptyElement(arguments.length<=1?void 0:arguments[1]),i=arguments.length<=2?void 0:arguments[2]),n&&(e.id=n,r.options.alias[n]=e.src),o&&o.length>0?r.ensure(o,(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];var a=n.map((function(t){return"exports"===t?(e.exports&&"object"===dt(e.exports)||(e.exports={}),e.exports):"module"===t?e:t}));if("function"==typeof i){var u=Reflect.apply(i,e,a);u&&"object"===dt(u)&&(e.exports=u)}else e.exports=i;e.status=Ge.Defined,t.progress.work(!0,t.index,e.exports)})):(e.exports="function"==typeof i?Reflect.apply(i,e,[]):i,e.status=Ge.Defined,t.progress.work(!0,t.index,e.exports))};return n.amd=!0,n}},{key:"resolvePath",value:function(e){try{if("exports"===e||"module"===e)return e;if(this.isNaturePath(e))return e;e=this.parserPath(e,!0);var t=this.getFileNamePostfix(e);t=t.toLowerCase();var r=this.createSearch(this.query);return-1==e.indexOf("?")?("js"!==t&&"css"!==t&&(e+=".js"),r.length>0&&(e+="?".concat(r))):r.length>0&&(e+="&".concat(r)),e}catch(t){throw console.error("resolve path[".concat(e,"] fail"),t),t}}},{key:"createSearch",value:function(e){var t="";if(e){for(var r in e){var n="".concat(e[r]);t+="".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(n),"&")}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 r=e.lastIndexOf(".",t);return-1==r?"":e.substring(r+1,t)}},{key:"isNaturePath",value:function(e){if(!this.options.nature)return!1;if("function"==typeof this.options.nature)return this.options.nature(e);var t=this.options.nature;if(t&&Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(0===e.indexOf(n))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"".concat(Be()).concat(e.slice(1));if(0==e.indexOf("./"))return"".concat(Be()).concat(e.slice(2));if(0==e.indexOf("//")){var r=Le();return"".concat(r.location.protocol).concat(e)}if(t){var n=this.options.alias[e];if(!n){var o=e.indexOf("/");if(-1==o)n=e;else{var i=e.slice(0,o),a=this.options.paths[i];n=a?a+e.slice(o):e}}return this.parserPath(n,!1)}return"".concat(Be()).concat(e)}}])}();function kt(e,t){var r=e.sheet,n=!1;if(t.isOldWebKit)r&&(n=!0);else if(r)try{r.cssRules&&(n=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(n=!0)}setTimeout((function(){t.time+=20,n?t.success():t.timeout>t.timeout?t.error():kt(e,t)}),20)}var jt=function(){return bt((function e(t,r){mt(this,e),this.size=t,this.callback=r,this.status=!0,this.values=[],this.lastIndex=-1}),[{key:"work",value:function(e,t,r){if(this.status=e,!0===this.status&&(this.lastIndex!==t&&this.size--,this.lastIndex=t,this.values.push(r)),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}}])}(),At=bt((function e(t,r,n,o){mt(this,e),this.index=t,this.src=r,this.params=n,this.progress=o}));function Ot(e){return Ot="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},Ot(e)}function Rt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Et(n.key),n)}}function Pt(e,t,r){return t&&Rt(e.prototype,t),r&&Rt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Et(e){var t=function(e){if("object"!=Ot(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ot(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ot(t)?t:t+""}var Tt=Symbol("_notifyChange"),Ct=Pt((function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.currentRoute=t,this.routes=r}));function qt(e){return qt="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},qt(e)}function _t(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ft(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ft(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Mt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Nt(n.key),n)}}function It(e,t,r){return(t=Nt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nt(e){var t=function(e){if("object"!=qt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qt(t)?t:t+""}var Kt=Symbol("historyChangeConsumerKey"),Dt=Symbol("_navigateFirstRoute"),$t=Symbol("_getRouteMark"),Lt=Symbol("_getUrlSearch"),Ut=Symbol("_generateLocation"),Bt=Symbol("_setRouteMarkRecorder"),Ht=Symbol("beforeRestoreFiltersKey"),Jt=Symbol("_beforeRestore"),Wt="Symbol(_fox_restore_point)";function zt(e){if("function"==typeof e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Reflect.apply(e,null,[].concat(r))}return e}function Vt(e){if(!Array.isArray(e))return!1;if(0===e.length)return!0;var t=e[0];return!(!Reflect.has(t,"path")||!Reflect.has(t,"root"))}var Gt=function(){return function(e,t){return t&&Mt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"hash",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=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],u=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),It(this,"firstNavigate",!0),It(this,"traceless",!1),It(this,Kt,!1),It(this,Ht,new Array),It(this,"backTimeout",320),this.mode=t,this.base=r,this.query=n,this.firstNavigate=o,this.historyMonitor=i,this.traceless=a,this.storage=null!=u?u:Le().sessionStorage,this.backTimeout=null!=l?l:320}),[{key:"init",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=Le();return"function"!=typeof this.historyChange&&(this.historyChange=function(){if("function"==typeof e[Kt]){var t=e[Kt]();if(e[Kt]=!1,t)return}else if(!0===e[Kt])return void(e[Kt]=!1);if(zt(e.historyMonitor)){var n=r.history.state;e[Tt](n);try{var o;if(o="string"==typeof n?JSON.parse(n):n,Array.isArray(o)&&o.length>0){var i,a=null!==(i=e[$t]())&&void 0!==i?i:"/";e[Bt](a,o)}}catch(e){}}}),He(r,"popstate",this.historyChange),this.firstNavigate&&t&&this[Dt](),Promise.resolve()}},{key:"destroy",value:function(){this.historyChange&&Je(Le(),"popstate",this.historyChange)}},{key:Jt,value:function(e,t,r,n){var o,i=_t(this[Ht]);try{for(i.s();!(o=i.n()).done;){var a=o.value;try{var u=Reflect.apply(a,{},[e,t,r,n]);if(!1===u)return u}catch(e){console.error(e.message,e)}}}catch(e){i.e(e)}finally{i.f()}return!0}},{key:"beforeRestoreEach",value:function(e){this[Ht].push(e)}},{key:"removeBeforeRestoreEach",value:function(e){var t=this[Ht].indexOf(e);return-1!==t&&(this[Ht].splice(t,1),!0)}},{key:Dt,value:function(){var e,t=this,r=null!==(e=this[$t]())&&void 0!==e?e:"/",n=this.storage.getItem(Wt);if(n)try{var o=JSON.parse(n);if(o.mark===r&&Array.isArray(o.routes)&&o.routes.length>0){var i=o.routes.filter((function(e,n){return e.params=e.params?H(e.params):{},t[Jt](e,n,r,o.routes)}));if(i.length>0){var a=this[Lt](),u=i.length-1;return i[u].query=a||i[u].query,void this[Tt](i)}}}catch(e){}var l,s=r.indexOf("!");l=-1!=s?r.substring(s+1):r;var c=new ie;c.path=l,c.query=this[Lt](),this[Tt]([c])}},{key:Bt,value:function(e,t){try{t.forEach((function(e){e.params=e.params?U(e.params):{}}));var r={mark:e,routes:t},n=JSON.stringify(r);this.storage.setItem(Wt,n)}catch(e){console.error(e.message,e)}}},{key:"setRestorePoint",value:function(e){var t,r=null!==(t=this[$t]())&&void 0!==t?t:"/";this[Bt](r,e)}},{key:Tt,value:function(e){"function"==typeof this.changeHandler&&this.changeHandler(e)}},{key:$t,value:function(){var e=Le();if("path"===this.mode){var t=e.location.pathname;return this.base&&0===t.indexOf(this.base)&&(t=t.substring(this.base.length)),t}var r=e.location.hash,n=r.indexOf("#");return-1!=n?r.substring(n+1):null}},{key:Lt,value:function(){var e=Le().location.search;return e.length>0&&0===e.indexOf("?")&&(e=e.substring(1)),e}},{key:"listen",value:function(e){this.changeHandler=e}},{key:"go",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=Le();this[Kt]=t,r.history.go(e)}},{key:"goBack",value:function(e,t){var r=this,n=Le(),o=n.history.state;if(Vt(o)&&o.length>0){for(var i=!1,a=o.length-1;a>=0;a--){var u=ie.from(o[a]);if(!0!==u.traceless&&!zt(this.traceless,u)&&ie.isSame(u,e)){i=!0;break}}if(!i)return void t();var l=this.backTimeout,s=null,c=function(){n.history.go(-1),s=setTimeout(c,l)},f=function(){clearTimeout(s);var n=Le().history.state;if(Vt(n)&&n.length>0){var o=n.length,i=n[o-1],a=ie.from(i);if(ie.isSame(a,e))return t(),!0;if(o>0){for(var u=!1,v=o-1;v>=0;v--){var h=ie.from(n[v]);if(!0!==h.traceless&&!zt(r.traceless,h)&&ie.isSame(h,e)){u=!0;break}}return u?(setTimeout((function(){s=setTimeout(c,l),r.go(-1,f)}),0),!0):(t(),!0)}}return t(),!0};s=setTimeout(c,l),this.go(-1,f)}else t()}},{key:"push",value:function(e){var t=this[Ut](e.currentRoute);!0===e.currentRoute.traceless||zt(this.traceless,e.currentRoute)||Le().history.pushState(e.routes,"",t);var r=e.currentRoute.fullPath;this[Bt](r,e.routes)}},{key:"replace",value:function(e){var t=this[Ut](e.currentRoute);!0===e.currentRoute.traceless||zt(this.traceless,e.currentRoute)||Le().history.replaceState(e.routes,"",t);var r=e.currentRoute.fullPath;this[Bt](r,e.routes)}},{key:Ut,value:function(e){var t,r=Le(),n="";if(e.query){var o="";if("object"===qt(e.query)){var i,a=_t(Reflect.ownKeys(e.query));try{for(a.s();!(i=a.n()).done;){var u=i.value,l=encodeURIComponent(e.query[u]),s="".concat(encodeURIComponent(String(u)),"=").concat(l);o.length>0&&(o+="&"),o+=s}}catch(e){a.e(e)}finally{a.f()}}else o=e.query;this.query?(n=o.length>0?"".concat(this.query,"&").concat(o):this.query).length>0&&"?"!==n.charAt(0)&&(n="?".concat(n)):o.length>0&&(n="?".concat(o))}var c,f=r.location,v=null!==(t=e.alias)&&void 0!==t?t:e.fullPath;return v.startsWith(J)&&(v=v.substring(8)),c=n?"path"==this.mode?0===v.indexOf("/")?"".concat(this.base).concat(v).concat(n):"".concat(this.base,"/").concat(v).concat(n):"".concat(f.pathname).concat(n,"#").concat(v):"path"==this.mode?0===v.indexOf("/")?"".concat(this.base).concat(v):"".concat(this.base,"/").concat(v):"".concat(f.pathname,"#").concat(v),"".concat(f.origin).concat(c)}}])}();function Xt(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=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!==r&&(r=Le().location.pathname),r&&r.endsWith("/")&&(r=r.substring(0,r.length-1)),new Gt("path",null!==(e=r)&&void 0!==e?e:"",n,t,o,i,a)}function Yt(){return new Gt("hash","",arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",!(arguments.length>0&&void 0!==arguments[0])||arguments[0],!(arguments.length>2&&void 0!==arguments[2])||arguments[2],arguments.length>3&&void 0!==arguments[3]&&arguments[3],arguments.length>4?arguments[4]:void 0)}function Qt(e){return Qt="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},Qt(e)}function Zt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tr(n.key),n)}}function er(e,t,r){return(t=tr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tr(e){var t=function(e){if("object"!=Qt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qt(t)?t:t+""}var rr=function(){return function(e,t){return t&&Zt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),er(this,"maxSize",50),er(this,"cursor",-1),er(this,"queue",[]),er(this,"historyMonitor",!1),er(this,"traceless",!1),this.base=t,this.maxSize=r}),[{key:"init",value:function(){return Promise.resolve()}},{key:"destroy",value:function(){this.queue=[]}},{key:"beforeRestoreEach",value:function(e){}},{key:"removeBeforeRestoreEach",value:function(e){return!1}},{key:"listen",value:function(e){this.changeHandler=e}},{key:Tt,value:function(e){"function"==typeof this.changeHandler&&this.changeHandler(e)}},{key:"go",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(0!=this.queue.length&&!(this.cursor<=0)){var r=this.cursor+e;if(r<0?r=0:r>this.queue.length-1&&(r=this.queue.length-1),r!=this.cursor&&(this.cursor=r,!("function"==typeof t?t():t))){var n=this.queue[r];this[Tt](n.routes)}}}},{key:"goBack",value:function(e,t){if(0!=this.queue.length&&!(this.cursor<=0)){var r=0;if(null===e)r=this.cursor+1;else for(var n=this.cursor;n>=0;n--){r++;var o=this.queue[n];if(ie.isSameForRoute(o.currentRoute,e))break}this.go(-r,(function(){return t(),!0}))}}},{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}},{key:"setRestorePoint",value:function(e){}}])}();function nr(){return new rr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",arguments.length>1&&void 0!==arguments[1]?arguments[1]:50)}function or(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ir(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?or(Object(r),!0).forEach((function(t){fr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):or(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ar(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=lr(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function ur(e){return function(e){if(Array.isArray(e))return sr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||lr(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 lr(e,t){if(e){if("string"==typeof e)return sr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sr(e,t):void 0}}function sr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function cr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,vr(n.key),n)}}function fr(e,t,r){return(t=vr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vr(e){var t=function(e){if("object"!=hr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=hr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hr(t)?t:t+""}function hr(e){return hr="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},hr(e)}var yr=Symbol("_constructRouteModel"),pr=Symbol("_findRouteModel"),dr=Symbol("_findRootView"),mr=Symbol("_getFirstView"),gr=Symbol("_removeView"),br=Symbol("_buildPage"),wr=Symbol("_resolveComponent"),Sr=Symbol("_update"),xr=Symbol("_merge"),kr=Symbol("_handleHistoryChange"),jr=Symbol("_handleRouteUpdated"),Ar=Symbol("routeUpdatedCallback"),Or=Symbol("currentRoutes"),Rr=Symbol("routeSessionCacheKey"),Pr=Symbol("_addRouteRecorder"),Er=Symbol("_removeRouteRecorder"),Tr=Symbol("_cloneRouteRecorder"),Cr=Symbol("_handleError"),qr=Symbol("errorCallback"),_r=Symbol("registerKey"),Fr=Symbol("notFoundKey"),Mr=Symbol("notFoundPathKey"),Ir=Symbol("forestKey"),Nr=Symbol("historyKey"),Kr=Symbol("beforeFiltersKey"),Dr=Symbol("afterFiltersKey"),$r=Symbol("destroyFiltersKey"),Lr=Symbol("mainDispatcherKey"),Ur=Symbol("initKey"),Br=Symbol("requireKey"),Hr=Symbol("readyKey"),Jr=Symbol("readyHandlersKey"),Wr=Symbol("_markReady"),zr=Symbol("_createNextFn"),Vr=Symbol("_start"),Gr=Symbol("_before"),Xr=Symbol("_after"),Yr=Symbol("_destroy"),Qr=Symbol("_load"),Zr=Symbol("_unload"),en=Symbol("_loadDependency"),tn=Symbol("resolvedModulesKey"),rn=Symbol("resolveDependencyKey"),nn=Symbol("routerGuardKey");Symbol.for("loadViewModel");var on=function(){return function(e,t){return t&&cr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var r,n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),fr(this,_r,new Array),fr(this,Mr,"*"),fr(this,Hr,!1),fr(this,Jr,[]),fr(this,Ir,new Ce),fr(this,Or,new Array),fr(this,Rr,new WeakMap),fr(this,qr,null),fr(this,Ar,null),fr(this,Kr,new Array),fr(this,Dr,new Array),fr(this,$r,new Array),fr(this,Lr,new pt),fr(this,tn,new Map),fr(this,nn,new De),fr(this,Ur,!1),fr(this,Br,null),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[Nr]=t.history:this[Nr]=$e?Yt():nr(),null===(r=this[Nr])||void 0===r||r.listen((function(e){var t=null;if("string"==typeof e){var r=n[z](e);r&&(t=n[kr]([r]))}else t=n[kr](e);t&&t.then((function(){!1===n[Hr]&&n[Wr](!0)})).catch((function(){!1===n[Hr]&&n[Wr](!1)}))}))}),[{key:"require",get:function(){return $e?(this[Br]||(this[Br]=new xt),this[Br]):null}},{key:"current",get:function(){var e=this[Or].length;return e>0?this[Or][e-1]:null}},{key:"setHistoryMode",value:function(e){var t,r=this;if(!this[Hr]){if(this[Nr])try{this[Nr].destroy()}catch(e){console.error(e.message,e)}for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];this[Nr]="path"===e?Reflect.apply(Xt,null,[].concat(o)):"memory"===e?Reflect.apply(nr,null,[].concat(o)):Reflect.apply(Yt,null,[].concat(o)),null===(t=this[Nr])||void 0===t||t.listen((function(e){var t=null;if("string"==typeof e){var n=r[z](e);n&&(t=r[kr]([n]))}else t=r[kr](e);t&&t.then((function(){!1===r[Hr]&&r[Wr](!0)})).catch((function(){!1===r[Hr]&&r[Wr](!1)}))}))}}},{key:Cr,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[qr])try{this[qr](e,t)}catch(e){}console.error(e)}},{key:"init",value:function(){var e;!0!==this[Ur]&&(null===(e=this[Nr])||void 0===e||e.init(!this[Hr]),this[Ur]=!0)}},{key:"isReady",value:function(){var e=this;return this[Hr]?Promise.resolve():new Promise((function(t,r){e[Jr].push([t,r])}))}},{key:Wr,value:function(e){this[Hr]=!0,this[Jr].forEach((function(t){var r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],l=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||lr(e,t)||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.")}()}(t,2),n=r[0],o=r[1];try{e?n():o()}catch(e){console.error(e.message,e)}}))}},{key:kr,value:function(e){try{if(!e){var t=ur(this[Or]).reverse();return this[Zr](t),$e&&Le().location.reload(),Promise.resolve()}for(var r=null,n=[],o=[],i=0;i<e.length&&i<this[Or].length&&ie.isSame(e[i],this[Or][i]);i++)!0===e[i].active&&e[i].active!==this[Or][i].active&&(r=e[i]);if(i<e.length&&(n=e.slice(i)),i<this[Or].length&&(o=this[Or].slice(i).reverse()),0===o.length&&0===n.length){if(null!==r)return this.restore([r])}else{if(!(o.length>0))return this.restore(n);if(this[Zr](o)){if(n.length>0)return this.restore(n);if(null!==r)return this.restore([r])}}}catch(e){this[Cr](e)}return Promise.resolve()}},{key:jr,value:function(e){if(e||(e=this.current),"function"==typeof this[Ar])try{this[Ar](e)}catch(e){}}},{key:Pr,value:function(e,t){if(e.opsType===se.Open){for(var r=!1,n=this[Or].length-1;n>=0;n--){var o=this[Or][n];e.root==o.root&&(e.path!==o.path?e.active&&(o.active=!1):(this[Or].splice(n,1,e),r=!0))}r||this[Or].push(e)}else this[Or].push(e);this[Rr].set(e,t)}},{key:Tr,value:function(){var e,t=[],r=ar(this[Or]);try{for(r.s();!(e=r.n()).done;){var n=e.value,o=ie.clone(n,!0);t.push(o)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:Er,value:function(e){if(null!=this[Or]){for(var t=-1,r=0;r<this[Or].length;r++)if(ie.isSame(this[Or][r],e)){t=r;break}if(-1!=t){var n=this[Or][t];this[Or].splice(t,1);var o=this[Rr].get(n);this[Rr].delete(n),this[Yr](n,o)}}}},{key:"historyMonitor",get:function(){return!!this[Nr]&&this[Nr].historyMonitor},set:function(e){this[Nr]&&(this[Nr].historyMonitor=e)}},{key:"traceless",get:function(){return!!this[Nr]&&this[Nr].traceless},set:function(e){this[Nr]&&(this[Nr].traceless=e)}},{key:"setRestorePoint",value:function(){var e,t=this[Tr]();null===(e=this[Nr])||void 0===e||e.setRestorePoint(t)}},{key:"onRouteUpdated",value:function(e){this[Ar]=e}},{key:"onError",value:function(e){this[qr]=e}},{key:"beforeEach",value:function(e){this[Kr].push(e)}},{key:"afterEach",value:function(e){this[Dr].push(e)}},{key:"destroyEach",value:function(e){this[$r].push(e)}},{key:"beforeRestoreEach",value:function(e){this[Nr].beforeRestoreEach(e)}},{key:"removeBeforeRestoreEach",value:function(e){return this[Nr].removeBeforeRestoreEach(e)}},{key:"setResolveDependency",value:function(e){this[rn]=e}},{key:"addRoutes",value:function(e){var t,r=ar(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;this.addRoute(n)}}catch(e){r.e(e)}finally{r.f()}}},{key:"addRoute",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(e.path!==this[Mr]){var r=this[yr](e);if(-1==t)this[_r]=[].concat(ur(this[_r]),ur(r));else for(var n=r.length-1;n>=0;n--)this[_r].splice(t,0,r[n])}else this.setNotFoundRoute(e)}},{key:"removeRoute",value:function(e){var t=this[z](e);if(null===t)return console.warn("route格式错误",e),!1;for(var r=0;r<this[_r].length;r++){var n=this[_r][r];if(null!=t&&t.path&&n.path===t.path)return this[_r].splice(r,1),!0;if(null!=t&&t.name&&n.name===t.name)return this[_r].splice(r,1),!0}return!1}},{key:"hasRoute",value:function(e){var t=this[z](e);return null===t?(console.warn("route格式错误",e),!1):-1!==this[_r].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[Mr]=e}},{key:"setNotFoundRoute",value:function(e){var t=this[yr](e);this[Fr]=t[0]}},{key:"getRoutes",value:function(){return ur(this[_r])}},{key:yr,value:function(e){var t,r=null!==(t=e.path)&&void 0!==t?t:"";r.length>0&&"/"!==r.charAt(0)&&(r="/".concat(r));var n=e.components||e.component&&{"":e.component};if(null==n){var o=new le;return o.path=r,o.redirect=e.redirect,[o]}var i=[];for(var a in n){var u=n[a];0===a.length&&(a=J);var l=new ae(a,u,e.props,e.meta);i.push(l)}var s=!1,c=[];if(e.children){var f,v=ar(e.children);try{for(v.s();!(f=v.n()).done;){var h,y=f.value,p=ar(this[yr](y));try{for(p.s();!(h=p.n()).done;){var d=h.value,m=new le;m.name=d.name,d.path&&d.path.length>0?m.path="".concat(r).concat(d.path):(s=!0,m.path=r);var g=new ue;g.models=[].concat(i),m.layers=[g].concat(ur(d.layers)),c.push(m)}}catch(e){p.e(e)}finally{p.f()}}}catch(e){v.e(e)}finally{v.f()}}if(!s){var b=new ue;b.models=i;var w=new le;w.name=e.name,w.path=r,w.layers=[b],c.splice(0,0,w)}return c}},{key:pr,value:function(e){var t,r=e.route;try{var n,o=ar(this[_r]);try{for(o.s();!(n=o.n()).done;){var i,a,u=n.value,c=null!==(i=r.template)&&void 0!==i?i:r.path,v=null!==(a=r.template)&&void 0!==a?a:r.name;if(c&&u.path){var h,y=u.match;y||(y=u.match=s(u.path));var p=y(c);if(!p)continue;if(u.redirect){var d=new ie;A(!0,d,r),d.path=u.redirect;var m={route:d,find:void 0};return!!this[pr](m)&&(e.route=m.route,e.find=m.find,r.template&&e.find&&(e.find=ir({},e.find),e.find.path=r.path),!0)}if(r.params=null!==(h=r.params)&&void 0!==h?h:{},A(!0,r.params,p.params),r.query){var g=r.query;if("string"==typeof g){var b,w={},S=ar(g.split("&"));try{for(S.s();!(b=S.n()).done;){var x=b.value.split("=");if(2===x.length){var k=decodeURIComponent(x[0].trim()),j=decodeURIComponent(x[1].trim());w[k]=j}}}catch(e){S.e(e)}finally{S.f()}A(!0,r.params,w)}else"object"===hr(g)&&A(!0,r.params,g)}return e.find=u,r.template&&e.find&&(e.find=ir({},e.find),e.find.path=r.path),!0}if(v===u.name){var O;r.params=null!==(O=r.params)&&void 0!==O?O:{};var R=function(e,t){void 0===t&&(t={});var r=f(t),n=t.encode,o=void 0===n?function(e){return e}:n,i=t.validate,a=void 0===i||i,u=e.map((function(e){if("object"==typeof e)return new RegExp("^(?:".concat(e.pattern,")$"),r)}));return function(t){for(var r="",n=0;n<e.length;n++){var i=e[n];if("string"!=typeof i){var l=t?t[i.name]:void 0,s="?"===i.modifier||"*"===i.modifier,c="*"===i.modifier||"+"===i.modifier;if(Array.isArray(l)){if(!c)throw new TypeError('Expected "'.concat(i.name,'" to not repeat, but got an array'));if(0===l.length){if(s)continue;throw new TypeError('Expected "'.concat(i.name,'" to not be empty'))}for(var f=0;f<l.length;f++){var v=o(l[f],i);if(a&&!u[n].test(v))throw new TypeError('Expected all "'.concat(i.name,'" to match "').concat(i.pattern,'", but got "').concat(v,'"'));r+=i.prefix+v+i.suffix}}else if("string"!=typeof l&&"number"!=typeof l){if(!s){var h=c?"an array":"a string";throw new TypeError('Expected "'.concat(i.name,'" to be ').concat(h))}}else{if(v=o(String(l),i),a&&!u[n].test(v))throw new TypeError('Expected "'.concat(i.name,'" to match "').concat(i.pattern,'", but got "').concat(v,'"'));r+=i.prefix+v+i.suffix}}else r+=i}return r}}(l(u.path,t=void 0),t);return r.path=R(r.params),e.find=u,r.template&&e.find&&(e.find=ir({},e.find),e.find.name=r.name),!0}}}catch(e){o.e(e)}finally{o.f()}}catch(e){console.error(e.message,e),"function"==typeof r.error&&r.error(e.message)}return!1}},{key:z,value:function(e){var t=null;if(Array.isArray(e))if(t=new ie,"object"===hr(e[0]))t=ie.from(e[0]);else for(var r=0;r<e.length;r++)0===r?"/"===e[r].charAt(0)?t.path=e[r]:t.name=e[r]:1===r?t.params=e[r]:2===r?t.root=e[r]:3===r&&A(!1,t,e[r]);else"object"===hr(e)?t=ie.from(e):"string"==typeof e&&(t=new ie,"/"==e.charAt(0)?t.path=e:t.name=e);if(t){var n,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!==(n=t.root)&&void 0!==n?n:J,t.opsType=null!==(o=null!==(i=t.opsType)&&void 0!==i?i:this.options.defaultOperationType)&&void 0!==o?o:se.Push}return t}},{key:"push",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=this[z](t);return n?(n.opsType=n.opsType||se.Push,this.to(n)):(this[Cr]("resolve route fail",n),this)}},{key:"put",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=this[z](t);return n?(n.opsType=se.Put,n.traceless=!0,this.to(n)):(this[Cr]("resolve route fail",n),this)}},{key:"replace",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=this[z](t);return n?(n.opsType=se.Replace,this.to(n)):(this[Cr]("resolve route fail",n),this)}},{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=this[z](t);return n?(n.opsType=se.Append,this.to(n)):(this[Cr]("resolve route fail",n),this)}},{key:"remove",value:function(e,t){var r=this;return new Promise((function(n){r[Lr].post((function(o){try{if(0===r[Or].length)return o.resolve(),void n(!1);var i,a=-1,u=[];if(e){var l;if(i=e.root?e.root:null!==(l=r[Or][0].root)&&void 0!==l?l:J,e.all)for(var s=r[Or].length-1;s>0;s--){var c=r[Or][s];c.opsType===se.Append&&c.root===i&&(u.splice(0,0,c),a=s-1)}else if(e.until)for(var f=r[Or].length-1;f>0;f--){var v=r[Or][f];if(v.opsType===se.Append&&v.root===i){if("/"===e.until.charAt(0)&&e.until===v.path){a=f;break}if(e.until===v.name){a=f;break}u.splice(0,0,v)}}else if(e.to)for(var h=r[Or].length-1;h>0;h--){var y=r[Or][h];if(y.opsType===se.Append&&y.root===i){if(u.splice(0,0,y),"/"===e.to.charAt(0)&&e.to===y.path){a=h-1;break}if(e.to===y.name){a=h-1;break}}}}else{i=J;var p=r[mr](r[Ir]);p&&(i=p.name);for(var d=r[Or].length-1;d>0;d--){var m=r[Or][d];if(m.opsType===se.Append&&m.root===i){u.push(m),a=d-1;break}}}if(-1===a||0===u.length){var g="can not find route";return console.warn(g),o.resolve(g),void n(!1)}var b=null;if(-1!==a&&(b=r[Or][a]),r[Zr](u)){if(!1===t)return o.resolve(),n(!0),!0;var w,S=function(){return o.resolve(),n(!0),!0},x=r[Or].length;if(b&&ie.isSame(b,r[Or][x-1]))return void(null===(w=r[Nr])||void 0===w||w.goBack(b,S));S()}}catch(e){r[Cr](e),o.resolve(),n(!1)}}))}))}},{key:"open",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=this[z](t);return n?(n.opsType=se.Open,this.to(n)):(this[Cr]("resolve route fail",n),this)}},{key:"close",value:function(e){var t=this;return this[Lr].post((function(r){try{var n=t[z](e);if(!n)return void r.reject("resolve route fail");for(var o=[],i=0;i<t[Or].length;i++){var a=t[Or][i];if(a.root===n.root)if(n.path||n.name){if(n.path&&n.path===a.path){o.push(a);break}if(n.name&&n.name===a.name){o.push(a);break}}else o.push(a)}if(0===o.length)return void r.resolve();t[Zr](o)&&t[jr](),r.resolve()}catch(e){r.resolve(),t[Cr](e.message)}})),this}},{key:"to",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=this[z](r);if(!o)return this[Cr]("resolve route fail",o),this;var i=this[nn].acquire(o);return null==i?(this[Cr]("route forbid",o),this):(this[Lr].post((function(t){try{var r,n=e[Vr](o);e[Gr](n),null!==(r=n.session)&&void 0!==r&&r.routeModel||!e[rn]||e[en](n),e[Qr](n),e[Xr](n),n.wait((function(r,a){var u=r.session.to;if(r.session.updateResult&&"success"===r.session.updateResult.status)try{var l,s,c=ie.clone(u,!0),f=new Ct(c,e[Tr]());u.opsType===se.Replace?null===(l=e[Nr])||void 0===l||l.replace(f):null===(s=e[Nr])||void 0===s||s.push(f)}catch(e){console.error(e.message,e)}if(oe.clear(r.session),e[nn].release(i),e[jr](u),"function"==typeof o.success)try{Reflect.apply(o.success,{},[])}catch(e){console.error(e.message,e)}!1===e[Hr]&&e[Wr](!0),n=null,t.resolve()}),(function(r,a){e[nn].release(i),null!==a&&e[Cr](a,o),!1===e[Hr]&&e[Wr](!1),oe.clear(r.session),n=null,t.resolve()}))}catch(r){e[nn].release(i),e[Cr](r,o),t.resolve()}})),this)}},{key:"back",value:function(e){var t;null===(t=this[Nr])||void 0===t||t.go(-e)}},{key:zr,value:function(e){var t=this;return function(r,n){if("boolean"==typeof r)r?e.resolve():e.reject(null!=n?n:null);else if(r){var o=t[z](r);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:Vr,value:function(e){var t,r=this[Or].length>0?this[Or][this[Or].length-1]:void 0,n=new oe(e,r),o={route:e,find:null};return this[pr](o),o.find&&(n.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"===hr(e.meta)){var r=A(!0,{},e.meta);t.push(r)}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 pt(n)}},{key:Gr,value:function(e){var t,r=this,n=ar(this[Kr]);try{var o=function(){var n=t.value;e.post((function(e){var t=r[zr](e);Reflect.apply(n,{},[e.session.to,e.session.from,t,e.session])}))};for(n.s();!(t=n.n()).done;)o()}catch(e){n.e(e)}finally{n.f()}}},{key:Xr,value:function(e){var t=this;e.post((function(e){var r,n=ar(t[Dr]);try{for(n.s();!(r=n.n()).done;){var o=r.value;try{Reflect.apply(o,{},[e.session.to,e.session.from,e.session])}catch(e){console.error(e.message,e)}}}catch(e){n.e(e)}finally{n.f()}e.resolve()}))}},{key:Yr,value:function(e,t){var r,n=ar(this[$r]);try{for(n.s();!(r=n.n()).done;){var o=r.value;try{Reflect.apply(o,{},[e,t])}catch(e){console.error(e.message,e)}}}catch(e){n.e(e)}finally{n.f()}"function"==typeof e.destroy&&Reflect.apply(e.destroy,e,[])}},{key:en,value:function(e){var t=this,r=e.session,n=Reflect.apply(this[rn],this,[null==r?void 0:r.to]);if(null!=n&&null!=n){Array.isArray(n)||(n=[n]);var o,i=[],a=ar(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;this[tn].has(u)||i.push(u)}}catch(e){a.e(e)}finally{a.f()}0!==i.length&&e.post((function(e){t[Br].ensure(i,(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];if(n){for(var a=0,u=n;a<u.length;a++){var l=u[a];if(l){var s;s=k(l)?l.default:l,Array.isArray(s)&&t.addRoutes(s)}}for(var c=0,f=i;c<f.length;c++){var v=f[c];t[tn].set(v,!0)}e.resolve()}else e.reject()}))}))}}},{key:Qr,value:function(e){var t=this;e.post((function(e){var r=e.session.to,n=e.session.routeModel;if(null==n){var o={route:r,find:null};if(t[pr](o))n=o.find,e.session.routeModel=n;else{if(!t[Fr])return void e.reject("not find route model");n=t[Fr]}}var i=oe.from(e.session);t[br](r,n,i).then((function(r){t[Ir],e.session.updateResult=null!=r?r:{status:"success",message:""},e.resolve()}),(function(t){e.reject(t)}))}))}},{key:Zr,value:function(e){if(0==e.length)return!0;var t,r=this[Ir],n=[],o=ar(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=this[dr](r,i);null!=a&&n.push(ir(ir({},a),{},{route:i}))}}catch(e){o.e(e)}finally{o.f()}if(0==n.length)return this[Cr]("can not find view index"),!1;var u,l=ar(n.reverse());try{for(l.s();!(u=l.n()).done;){var s,c=u.value;this[gr](r,{x:c.x,y:c.y},[null!==(s=c.route.index)&&void 0!==s?s:0],!0)}}catch(e){l.e(e)}finally{l.f()}return!0}},{key:dr,value:function(e,t){for(var r,n=null!==(r=t.root)&&void 0!==r?r:J,o=0;o<e.layers.length;o++)for(var i=e.layers[o],a=i.views.length-1;a>=0;a--){var u=i.views[a];if(u[ke]&&u[Oe]===n)return{x:a,y:o}}return null}},{key:mr,value:function(e){return e.layers.length>0&&e.layers[0].views.length>0?e.layers[0].views[0]:null}},{key:gr,value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=!(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=[],u=!1,l=o.slots.value,s=l.length-1;s>=0;s--){var c=l[s];null!=r&&-1==r.indexOf(c.index)||(c.route&&o[ke]&&(this[Er](c.route),!0===c.active&&c.route.opsType==se.Append&&(u=!0)),a.push(new Ee(o,c.index,t.y)),l.splice(s,1))}if(0==l.length)n?o.slots.value=ur(l):e.layers[t.y].views.splice(t.x,1);else{if(u){var f=l[l.length-1];f.active=!0,f.route&&(f.route.active=f.active)}o.slots.value=ur(l)}0==e.layers[t.y].views.length&&(i=!0);for(var v=t.y+1;v<e.layers.length;v++){for(var h=e.layers[v].views,y=[],p=h.length-1;(i||a.length>0)&&p>=0;p--){var d=h[p];if(d[Ae]&&(i||Ee.include(a,d[Ae]))){for(var m=d.slots.value,g=m.length-1;g>=0;g--){var b=m[g];b.route&&d[ke]&&this[Er](b.route),y.push(new Ee(d,b.index,v)),m.splice(g,1)}e.layers[v].views.splice(p,1)}}a=y,0==e.layers[v].views.length&&(i=!0)}}}},{key:"restore",value:function(e){var t=this;if(e&&0!=this[_r].length)return new Promise((function(r,n){for(var o=function(){var r=e[i];t[Lr].post((function(e){var n,o=t[Vr](r);t[Gr](o),null!==(n=o.session)&&void 0!==n&&n.routeModel||!t[rn]||t[en](o),t[Qr](o),t[Xr](o),o.wait((function(t,r){e.resolve()}),(function(r,n){null!==n&&t[Cr](n),e.resolve()}))}))},i=0;i<e.length;i++)o();t[Lr].post((function(e){e.resolve(),r()}))}));var r=this[Ir];if(r.layers.length>0){var n=r.layers[0].views;n.length>0&&(n[0].slots.value=[])}return this[Or]=[],this[jr](),Promise.resolve()}},{key:br,value:function(e,t,r){var n,o=this,i=null!==(n=e.updateType)&&void 0!==n?n:ce.Part;return this[wr](t).then((function(){var n=o[Sr](t,e,r,i);if("error"===n.status)throw Error(n.message);return n}))}},{key:wr,value:function(e){for(var t=[],r=0;r<e.layers.length;r++)for(var n=e.layers[r],o=0;o<n.models.length;o++){var i=n.models[o];i.isResolved||t.push(i.resolve())}return t.length>0?Promise.all(t):Promise.resolve()}},{key:Sr,value:function(e,t,r,n){var o;if(1!==e.layers[0].models.length)return{status:"error",message:"illegal route structure(multi root node)"};var i,a,u,l=e.layers[0].models[0],s=this[Ir],c=function(e){return 0==e.layers.length||0==e.layers[0].views.length}(s),f=null!==(o=t.root)&&void 0!==o?o:J;if(c||n!=ce.Part||(i=this[dr](s,t)),null==i||null==i)if(c||n===ce.All){if(0==s.layers.length&&(s.layers[0]=new Te),0==s.layers[0].views.length){var v,h=null!==(v=t.root)&&void 0!==v?v:J;a=new Pe(h,!0,null),s.layers[0].views=[a]}else a=s.layers[0].views[0];i={x:0,y:0}}else{var y=t.slot;if(!y)return{status:"error",message:"can not rebuild view(because not route slot)"};var p,d=y.level;if(d>s.layers.length)return{status:"error",message:"can not insert view(override level)"};if(y.rootName){var m,g=ar(s.layers[d-1].views);try{for(g.s();!(m=g.n()).done;){var b=m.value;if(b[ke]&&b.name===y.rootName){var w;p=new Ee(b,null!==(w=y.rootIndex)&&void 0!==w?w:0,d-1);break}if(b[je]&&b[je].view.name===y.rootName&&b[je].index===y.rootIndex){p=b[je];break}}}catch(e){g.e(e)}finally{g.f()}}if(!p)return{status:"error",message:"can not insert view(not find root node ref)"};a=new Pe(f,!0,p),s.layers[d].views.push(a),i={x:s.layers[d].views.length-1,y:d}}else a=s.layers[i.y].views[i.x];if(u=i.y,a[ke]=!0,t.opsType===se.Append){var S;t.index=null!==(S=t.index)&&void 0!==S?S:T.get(),t.active=!0;var x=a.slots.value;if(x.length>0){var k=x[x.length-1];k.active=!1,k.route&&(k.route.active=k.active)}var j=new Re(t,l,t.index,!0);a.slots.value=[].concat(ur(x),[j]);var A=u+1,O=new Ee(a,t.index,u);this[xr](s,A,e,1,O)}else if(t.opsType===se.Open){var R,P,E=a.slots.value,C=null===(R=t.active)||void 0===R||R,q=!1,_=ar(E);try{for(_.s();!(P=_.n()).done;){var F=P.value;if(null!==F.route&&ie.isSameForRouteModel(F.route,t)){if(F.active===C)return t.index=F.index,t.active=C,F.route=t,{status:"no-change",message:""};F.active=C,q=!0,t.index=F.index,t.active=C,F.route=t}else C&&(F.active=!1);F.route&&(F.route.active=F.active)}}catch(e){_.e(e)}finally{_.f()}if(!q){var M;t.index=null!==(M=t.index)&&void 0!==M?M:T.get(),t.active=C;var I=new Re(t,l,t.index,C);E.push(I);var N=u+1,K=new Ee(a,t.index,u);this[xr](s,N,e,1,K)}a.slots.value=ur(E)}else{var D=a.slots.value;if(0==D.length){var $;t.index=null!==($=t.index)&&void 0!==$?$:T.get(),t.active=!0,a.slots.value=[new Re(t,l,t.index)];var L=u+1,U=new Ee(a,t.index,u);this[xr](s,L,e,1,U)}else{var B=D[0];if(B.model!==l){var H;this[gr](s,i,null,!0),t.index=null!==(H=t.index)&&void 0!==H?H:T.get(),t.active=!0,a.slots.value=[new Re(t,l,t.index)];var W=u+1,z=new Ee(a,t.index,u);this[xr](s,W,e,1,z)}else{var V;null!==B.route&&this[Er](B.route);var G=!1,X=null===(V=t.active)||void 0===V||V;B.active!==X&&(B.active=X,G=!0),t.active=X,t.index=B.index,B.route=t;for(var Y=[],Q=1;Q<D.length;Q++)Y.push(D[Q].index);Y.length>0?this[gr](s,i,Y,!0):G&&(a.slots.value=ur(D));for(var Z=[new Ee(a,t.index,u)],ee=u+1,te=1,re=new Ee(a,t.index,u);Z.length>0&&ee<s.layers.length&&te<e.layers.length;ee++,te++){for(var oe=[],ae=0;ae<s.layers[ee].views.length;ae++){var ue=s.layers[ee].views[ae];ue[Ae]&&Ee.include(Z,ue[Ae])&&oe.unshift(ae)}for(var le=[],fe=0,ve=oe;fe<ve.length;fe++){for(var he=ve[fe],ye=s.layers[ee].views[he],pe=e.layers[te].models,de=void 0,me=0;me<pe.length;me++)if(ye.name===pe[me].name){de=pe[me];break}if(de){var ge=ye.slots.value;if(0==ge.length){ye.slots.value=[new Re(null,de,0)];var be=ee+1,we=te+1;this[xr](s,be,e,we,re)}else{var Se=ge[0];if(Se.model!==de){this[gr](s,{x:he,y:ee},null,!0),ye.slots.value=[new Re(null,de,0)];var xe=ee+1,Oe=te+1;this[xr](s,xe,e,Oe,re)}else{ye[ke]&&null!==Se.route&&this[Er](Se.route);for(var Ce=[],qe=1;qe<ge.length;qe++)Ce.push(ge[qe].index);Ce.length>0&&this[gr](s,{x:he,y:ee},Ce,!0),le.push(new Ee(ye,Se.index,ee))}}ye[ke]=!1}else this[gr](s,{x:he,y:ee},null,!1)}Z=le}this[xr](s,ee,e,te,re)}}}if(a&&a[je]){var _e,Fe=a[je];Fe&&(t.slot=new ne(f,u,null==Fe?void 0:Fe.view.name,null!==(_e=null==Fe?void 0:Fe.index)&&void 0!==_e?_e:0))}return r.to=void 0,r.routeModel=void 0,this[Pr](t,r),{status:"success",message:""}}},{key:xr,value:function(e,t,r,n,o){for(var i=n,a=t;a<e.layers.length&&i<r.layers.length;a++,i++){var u,l=e.layers[a].views,s=ar(r.layers[i].models);try{for(s.s();!(u=s.n()).done;){var c=u.value,f=new Pe(c.name,!1,o),v=new Re(null,c);f.slots.value=[v],l.push(f)}}catch(e){s.e(e)}finally{s.f()}}for(;i<r.layers.length;i++){var h=new Te;h.views=[];var y,p=ar(r.layers[i].models);try{for(p.s();!(y=p.n()).done;){var d=y.value,m=new Pe(d.name,!1,o),g=new Re(null,d);m.slots.value=[g],h.views.push(m)}}catch(e){p.e(e)}finally{p.f()}e.layers.push(h)}}},{key:W,value:function(e,t,r,n,o,i){if(t<0||t>this[Ir].layers.length)return null;if(t<this[Ir].layers.length){var a,u=null,l=ar(this[Ir].layers[t].views);try{for(l.s();!(a=l.n()).done;){var s,c,f=a.value,v=!1;if(null!==r?(v=f.name===e&&(null===(s=f[je])||void 0===s?void 0:s.view)===r)&&-1!==n&&(v=(null===(c=f[je])||void 0===c?void 0:c.index)===n):v=f.name===e,v){null!==o&&(f[Ae]={view:o,index:i,level:t-1}),u=f;break}}}catch(e){l.e(e)}finally{l.f()}if(null!==u)return u}var h=null,y=null;null!==o&&(h=o[ke]?{view:o,index:i,level:t-1}:o[je],y={view:o,index:i,level:t-1});var p=new Pe(e,!0,h);if(p[Ae]=y,t==this[Ir].layers.length){var d=new Te;d.views=[p],this[Ir].layers.push(d)}else this[Ir].layers[t].views.push(p);return p}}])}(),an="fox-router-view";function un(e){return un="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},un(e)}function ln(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return(n=r&&null!==(t=e.showClass)&&void 0!==t?t:e.enterClass)||((n=e.transitionName)?"".concat(n,r?"-show":"-enter"):null)}function sn(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return(n=r&&null!==(t=e.showActiveClass)&&void 0!==t?t:e.enterActiveClass)||((n=e.transitionName)?"".concat(n,r?"-show-active":"-enter-active"):null)}function cn(e){var t,r,n,o,i,a=e.duration;return"object"==un(a)?t={enter:null!==(r=a.enter)&&void 0!==r?r:-1,leave:null!==(n=a.leave)&&void 0!==n?n:-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 fn(e,t){e.classList.contains(t)||e.classList.add(t)}function vn(e,t){e.classList.remove(t)}var hn=$e&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout;function yn(e){hn(e)}function pn(e,t,r){b(t)&&(null==e&&(e={}),Reflect.apply(t,e,r))}function dn(e,t,r){var n=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,u=arguments.length>7?arguments[7]:void 0,l=[],s=function(){for(var e=0,r=l;e<r.length;e++){var n=r[e];Je(t,n.type,n.listener)}l=[]};if(b(i)){if(void 0!==o&&o>=0)return void setTimeout((function(){Reflect.apply(i,e,[t,r,n]),b(u)&&Reflect.apply(u,e,[])}),o);var c=function(o){s(),Reflect.apply(i,e,[t,r,n]),u&&Reflect.apply(u,e,[])};["animationend","transitionend"].forEach((function(e){He(t,e,c),l.push({type:e,listener:c})}))}if(b(a)){var f="animationcancel",v=function(o){s(),Reflect.apply(a,e,[t,r,n])};He(t,f,v),l.push({type:f,listener:v})}}function mn(e){return null!==e&&(e.opsType===se.Append||e.opsType===se.Open)}function gn(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:-1;if(t||mn(o)){var a=ln(n,t);a&&fn(r,a);var u=sn(n,t);u&&fn(r,u);var l=function(e){var t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!==(t=e.beforeShow)&&void 0!==t?t:e.beforeEnter}(n,t);pn(e,l,[r,t,o,i])}}function bn(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0;if(mn(i)||t){var l=ln(n,t),s=sn(n,t),c=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return(n=r&&null!==(t=e.showToClass)&&void 0!==t?t:e.enterToClass)||((n=e.transitionName)?"".concat(n,r?"-show-to":"-enter-to"):null)}(n,t),f=function(e){var t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!==(t=e.show)&&void 0!==t?t:e.enter}(n,t),v=function(e){var t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!==(t=e.afterShow)&&void 0!==t?t:e.afterEnter}(n,t),h=function(e){var t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!==(t=e.showCancelled)&&void 0!==t?t:e.enterCancelled}(n,t);l||s||c||f?yn((function(){dn(e,r,i,a,o,(function(){s&&vn(r,s),c&&vn(r,c),b(v)&&pn(e,v,[r,t,i,a]),b(u)&&u(e,u,[r])}),(function(){b(h)&&pn(e,h,[r,t,i,a])})),l&&vn(r,l),c&&fn(r,c),b(f)&&pn(e,f,[r,t,i,a])})):b(u)&&u(e,u,[r])}else b(u)&&u(e,u,[r])}function wn(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0;if(!mn(a)&&!t)return b(l)&&pn(e,l,[r]),void(!t&&b(i)&&i());var s=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return(n=r&&null!==(t=e.hideClass)&&void 0!==t?t:e.leaveClass)||((n=e.transitionName)?"".concat(n,r?"-hide":"-leave"):null)}(n,t),c=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return(n=r&&null!==(t=e.hideActiveClass)&&void 0!==t?t:e.leaveActiveClass)||((n=e.transitionName)?"".concat(n,r?"-hide-active":"-leave-active"):null)}(n,t),f=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;return(n=r&&null!==(t=e.hideToClass)&&void 0!==t?t:e.leaveToClass)||((n=e.transitionName)?"".concat(n,r?"-hide-to":"-leave-to"):null)}(n,t),v=function(e){var t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!==(t=e.hide)&&void 0!==t?t:e.leave}(n,t),h=function(e){var t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!==(t=e.afterHide)&&void 0!==t?t:e.afterLeave}(n,t),y=function(e){var t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!==(t=e.hideCancelled)&&void 0!==t?t:e.leaveCancelled}(n,t);if(!(s||c||f||v))return b(l)&&pn(e,l,[r]),void(!t&&b(i)&&i());s&&fn(r,s),c&&fn(r,c),b(v)&&pn(e,v,[r,t,a,u]),yn((function(){dn(e,r,a,u,o,(function(){c&&vn(r,c),f&&vn(r,f),b(h)&&pn(e,h,[r,t,a,u]),b(l)&&pn(e,l,[r]),!t&&b(i)&&i()}),(function(){b(y)&&pn(e,y,[r,t,a,u]),b(l)&&pn(e,l,[r]),!t&&b(i)&&i()})),s&&vn(r,s),f&&fn(r,f)}))}function Sn(e){return e.elm}function xn(e){return xn="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},xn(e)}function kn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,On(n.key),n)}}function jn(e,t,r){return t&&kn(e.prototype,t),r&&kn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function An(e,t,r){return(t=On(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function On(e){var t=function(e){if("object"!=xn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=xn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xn(t)?t:t+""}function Rn(e){return function(e){if(Array.isArray(e))return En(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Pn(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 Pn(e,t){if(e){if("string"==typeof e)return En(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?En(e,t):void 0}}function En(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Tn=Symbol("ruvc"),Cn=Symbol("cvs");function qn(e,t,r){return"function"==typeof e?Reflect.apply(e,{},[t,r]):e}function _n(e,t){if(e.componentOptions&&e.componentOptions.Ctor&&e.componentOptions.Ctor.extendOptions){var r=e.componentInstance||e,n=[];if(e.fnOptions&&e.fnOptions[t]){var o=e.fnOptions[t];Array.isArray(o)?n=Rn(o):"function"==typeof o&&(n=[o])}if(e.componentOptions.Ctor&&e.componentOptions.Ctor.extendOptions){var i=e.componentOptions.Ctor.extendOptions[t];Array.isArray(i)?n=[].concat(Rn(n),Rn(i)):"function"==typeof i&&(n=[].concat(Rn(n),[i]))}return function(e){n.forEach((function(e){Reflect.apply(e,r,[])}))}}return function(){}}var Fn=jn((function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),An(this,"node",void 0),An(this,"state",void 0),this.node=t,this.state=r})),Mn={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,Function],required:!1},tag:{type:[String,Function,Object],required:!1,default:"div"},tagProps:{type:[Object,Function],required:!1,default:function(){return{}}},viewTag:{type:[String,Function,Object],required:!1,default:"div"},viewTagData:{type:[Object,Function],required:!1,default:function(){return{}}},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},viewInactiveClass:{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},beforeEnter:{type:Function,required:!1},enter:{type:Function,required:!1},afterEnter:{type:Function,required:!1},enterCancelled:{type:Function,required:!1},beforeLeave:{type:Function,required:!1},leave:{type:Function,required:!1},afterLeave:{type:Function,required:!1},leaveCancelled:{type:Function,required:!1},beforeShow:{type:Function,required:!1},show:{type:Function,required:!1},afterShow:{type:Function,required:!1},showCancelled:{type:Function,required:!1},beforeHide:{type:Function,required:!1},hide:{type:Function,required:!1},afterHide:{type:Function,required:!1},hideCancelled:{type:Function,required:!1},duration:{type:[Number,Object],required:!1}},render:function(e,t){var l,s=t,c=t.parent.$createElement,f=t.parent.$router,v=t.props,h=v.name,y=v.multi,p=t.data,d=(l=t.parent)[Tn]||(l[Tn]={}),m=pe(t.parent,n,0),g=pe(t.parent,o,null),w=pe(t.parent,i,-1),S=v.modelSlot;if(S){var x=h;ye(t.parent,n,m+1,x),ye(t.parent,i,S.index,x),ye(t.parent,u,S.index,x);var k=S.route;k&&ye(t.parent,r,k,x);var j,O=An({attrs:{}},he,x);if(S.model.props)if("object"===xn(S.model.props))Object.assign(O.attrs,S.model.props);else if(!0===S.model.props&&"object"===xn(null===(j=S.route)||void 0===j?void 0:j.params)){var R;Object.assign(O.attrs,null===(R=S.route)||void 0===R?void 0:R.params)}return c(S.model.component,O,t.children)}if(null==f)return console.error("router is not been register"),c();var P=pe(t.parent,a,null),E=pe(t.parent,u,0),T=f[W](h,m,g,w,P,E);if(null===T)return de(t.parent),c();if(ye(t.parent,a,T),!0===T[ke]&&ye(t.parent,o,T),y){var C=d[Cn];C||(C=d[Cn]=new Map);for(var _=new Map,F=[],M=T.slots.value,I=[],N=function(e){var t,r,n,o=M[e],i="".concat(v.name,"-").concat(o.index),a=null===(t=qn(v.transition,o.route,e))||void 0===t||t,u=c(an,{props:{name:i,modelSlot:o}}),l={},f=qn(v.viewClass,o.route,e);"string"==typeof f&&f.length>0&&(l[f]=!0);var h=qn(v.viewActiveClass,o.route,e),y=qn(null!==(r=v.viewInactiveClass)&&void 0!==r?r:v.viewDeactiveClass,o.route,e),p=C.get(i);if("string"==typeof h&&h.length>0&&(l[h]=o.active),"string"==typeof y&&y.length>0&&(l[y]=!o.active),p&&o.active!==p.state){var d=p.node;if(o.active){var m=null;d&&d.children&&d.children.length>0&&(m=_n(d.children[0],"activated")),I.unshift((function(){!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=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,u=Sn(t);if(null!=u)if(i){var l=cn(r);gn(e,!0,u,r,n,o),bn(e,!0,u,r,l.show,n,o,(function(e){b(a)&&a("from enter")}))}else b(a)&&a();else b(a)&&a()}(s,d,v,o.route,e,a,m)}))}else{if(d&&d.children&&d.children.length>0){var g=_n(d.children[0],"deactivated");try{q(g)}catch(e){console.error(e)}}I.push((function(){!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=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,u=Sn(t);null!=u&&i?wn(e,!0,u,r,cn(r).hide,null,n,o,(function(e){b(a)&&a("from leave")})):b(a)&&a()}(s,d,v,o.route,e,a)}))}}var w={class:l,key:i},S=null!==(n=qn(v.viewTagData,o.route,e))&&void 0!==n?n:{};null!==S&&"object"===xn(S)&&A(!0,w,S);var x=qn(v.viewTagProps,o.route,e);null!==x&&"object"===xn(x)&&(w.props=A(!0,{},x));var k=qn(v.viewTagAttrs,o.route,e);null!==k&&"object"===xn(k)&&(w.attrs=A(!0,{},k)),o.route.viewTagAttrs&&"object"===xn(o.route.viewTagAttrs)&&(w.attrs?Object.assign(w.attrs,o.route.viewTagAttrs):w.attrs=o.route.viewTagAttrs);var j=qn(v.viewTag,o.route,e),O=c(j,w,[u]);if(_.set(i,new Fn(O,o.active)),a){var R=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,i=cn(r);return{create:function(e,t){var a=Sn(t);gn(e,!1,a,r,n,o),bn(e,!1,a,r,i.enter,n,o)},activate:function(e,t){var a=Sn(t);gn(e,!1,a,r,n,o),bn(e,!1,a,r,i.enter,n,o)},remove:function(e,a){wn(e,!1,Sn(e),r,i.leave,a,n,o,(function(){t&&t.data&&(t.data.hook=null),t=null}))}}}(s,O,v,o.route,e);O.data.hook=R}F.push(O)},K=0;K<M.length;K++)N(K);var D,$=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Pn(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}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 o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(C.keys());try{for($.s();!(D=$.n()).done;){var L=D.value;_.has(L)||de(t.parent,L)}}catch(e){$.e(e)}finally{$.f()}d[Cn]=_,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};yn((function(){for(var r=function(r){q((function(){Reflect.apply(e[r],t,[])}))},n=0;n<e.length;n++)r(n)}))}(I,s);var U=qn(v.tag,null,-1),B={};for(var H in p)"props"!==H&&(B[H]=p[H]);var J=qn(v.tagProps,null,-1);return null!==J&&"object"===xn(J)&&(B.props=J),c(U,B,F)}ye(t.parent,i,-1),ye(t.parent,n,m+1),ye(t.parent,u,-1);var z=T.slots.value;if(z.length>0){var V=z[0],G=V.route;G?ye(t.parent,r,G):g&&g.slots.value.length>0&&(G=g.slots.value[0].route,ye(t.parent,r,G));var X=An({},he,"");for(var Y in p)"props"!==Y&&(X[Y]=p[Y]);null!==X.attrs&&"object"===xn(X.attrs)||(X.attrs={});var Q,Z=V.model;if(Z.props)if("object"===xn(Z.props))Object.assign(X.attrs,Z.props);else if(!0===Z.props&&"object"===xn(null===(Q=V.route)||void 0===Q?void 0:Q.params)){var ee;Object.assign(X.attrs,null===(ee=V.route)||void 0===ee?void 0:ee.params)}return null!==v.passProps&&"object"===xn(v.passProps)&&Object.assign(X.attrs,v.passProps),c(Z.component,X,[])}}};function In(e){return In="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},In(e)}var Nn={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,r,n=this.$router,o=this.$route,i={},a=n.options.linkActiveClass,u=n.options.linkExactActiveClass,l=null==a?"fox-router-link-active":a,s=null==u?"fox-router-link-exact-active":u,c=null==this.activeClass?l:this.activeClass,f=null==this.exactActiveClass?s:this.exactActiveClass;i[f]=(t=o,r=this.to,!!t&&("object"===In(r)?r.path?t.path===r.path:t.name===r.name:"/"===r.charAt(0)?t.path===r:t.name===r)),i[c]=this.exact?i[f]:function(e,t){return!!e&&("object"===In(t)?t.path?0===e.path.indexOf(t.path):e.name===t.name:"/"===t.charAt(0)?0===e.path.indexOf(t):e.name===t)}(o,this.to);var v=n[z](this.to),h=function(e){Kn(e)&&n.to(v)},y={click:Kn};Array.isArray(this.event)?this.event.forEach((function(e){y[e]=h})):y[this.event]=h;var p={class:i},d="#".concat(v.path);if("a"===this.tag)p.on=y,p.attrs={href:d};else{var m=Dn(this.$slots.default);if(m){m.isStatic=!1;var g=m.data=extend({},m.data);for(var b in g.on=g.on||{},g.on){var w=g.on[b];b in y&&(g.on[b]=Array.isArray(w)?w:[w])}for(var S in y)S in g.on?g.on[S].push(y[S]):g.on[S]=h;(m.data.attrs=extend({},m.data.attrs)).href=d}else p.on=y}return e(this.tag,p,this.$slots.default)}};function Kn(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 Dn(e){if(e)for(var t,r=0;r<e.length;r++){if("a"===(t=e[r]).tag)return t;if(t.children&&(t=Dn(t.children)))return t}}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},$n(e)}function Ln(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Bn(n.key),n)}}function Un(e,t,r){return t&&Ln(e.prototype,t),r&&Ln(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bn(e){var t=function(e){if("object"!=$n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=$n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$n(t)?t:t+""}function Hn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Jn=function(e){return e[e.limitless=0]="limitless",e[e.once=1]="once",e}(Jn||{}),Wn=Symbol("registerKey"),zn=Un((function e(t,r){Hn(this,e),this.callback=t,this.policy=r})),Vn=function(){return Un((function e(){Hn(this,e),function(e,t,r){(t=Bn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,Wn,new Map)}),[{key:"on",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this[Wn].get(e);n||(n=new Array,this[Wn].set(e,n));var o=!0===r?Jn.once:Jn.limitless,i=new zn(t,o);return n.push(i),this}},{key:"off",value:function(e,t){if(!t)return this[Wn].delete(e),this;var r=this[Wn].get(e);if(r)for(var n=0;n<r.length;n++)if(r[n].callback===t){r.splice(n,1);break}return this}},{key:"bind",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.on(e,t,r)}},{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,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=r.length;if(o<1)return this;var i=r[o-1];if("function"!=typeof i)return console.error("callback can not benn empty"),this;for(var a=o-1,u=new Array(a),l=[].splice.call(r,0,a),s=function(t){e.once(l[t],(function(e){u[t]=e,0==(a-=1)&&Reflect.apply(i,{},u)}))},c=0;c<l.length;c++)s(c);return this}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=this[Wn].get(e);if(!o)return this;for(var i=function(e){var t=o[e];if(t.policy==Jn.once?o.splice(e,1):e++,"function"==typeof t.callback)try{q((function(){Reflect.apply(t.callback,{},r)}))}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,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Reflect.apply(this.emit,this,[e].concat(r))}}])}();function Gn(e){return Gn="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},Gn(e)}var Xn={type:"GET",async:!0,contentType:"application/x-www-form-urlencoded",dataType:"string",cache:!1,timeout:3e4,processData:!0};function Yn(e){var t=new XMLHttpRequest,r={};if(A(!0,r,Xn),A(!0,r,e),(e=r).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 r,n=null!==(r=t.response)&&void 0!==r?r:"";if(0==n.length&&0==t.status)return;try{o=n,"json"===e.dataType&&"string"==typeof o&&(o=JSON.parse(o)),n=o}catch(e){console.error(e.message,e)}"function"==typeof e.success&&e.success(n,t.status,t)}else"function"==typeof e.error&&e.error(t,t.status);var o};try{var n=e.url;if(e.type&&"GET"===e.type.toUpperCase()&&(n=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text";if(null==t)return e;var n="";if(0===(r=r.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded")||0===r.indexOf("application/json"))if("object"===Gn(t))for(var o in t){var i=t[o];if(Array.isArray(i))for(var a=0;a<i.length;a++){var u="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i[a]));n.length>0&&(n+="&"),n+=u}else{var l="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i));n.length>0&&(n+="&"),n+=l}}else n=t;else n=t;return n.length>0&&(e=-1===e.indexOf("?")?"".concat(e,"?").concat(n):"".concat(e,"&").concat(n)),e}(e.url,e.data,e.contentType)),t.open(e.type,n,e.async),e.contentType&&t.setRequestHeader("Content-Type",e.contentType),"function"==typeof e.beforeSend){var o={};A(!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",r="";if(0===(t=t.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded"))if("object"===Gn(e))for(var n in e){var o=e[n];if(Array.isArray(o))for(var i=0;i<o.length;i++){var a="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(o[i]));r.length>0&&(r+="&"),r+=a}else{var u="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(o));r.length>0&&(r+="&"),r+=u}}else r=e;else r=0===t.indexOf("text")?"object"===Gn(e)?JSON.stringify(e):e:0===t.indexOf("application/json")&&"object"===Gn(e)?JSON.stringify(e):e;return r}(e.data,e.contentType):e.data;t.send(i)}else t.send()}catch(r){"function"==typeof e.error&&e.error(t,r.message),"function"==typeof e.complete&&e.complete(t,r.message)}return t}function Qn(e){return Qn="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},Qn(e)}function Zn(e,t,r){return t=to(t),function(e,t){if(t&&("object"==Qn(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)}(e,eo()?Reflect.construct(t,r||[],to(e).constructor):t.apply(e,r))}function eo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(eo=function(){return!!e})()}function to(e){return to=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},to(e)}function ro(e,t){return ro=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ro(e,t)}function no(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uo(n.key),n)}}function oo(e,t,r){return t&&no(e.prototype,t),r&&no(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function io(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ao(e,t,r){return(t=uo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uo(e){var t=function(e){if("object"!=Qn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Qn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qn(t)?t:t+""}var lo=Symbol("idKey"),so=Symbol("valueKey"),co=Symbol("childrenKey"),fo=Symbol("growKey"),vo=oo((function e(t){io(this,e),ao(this,fo,!0),ao(this,so,function(){if(re){var e={};return re.util.defineReactive(e,"value",void 0),e}var t={};return Reflect.defineProperty(t,"value",{get:function(){return t[fe]},set:function(e){return t[fe]=e}}),t}()),ao(this,co,new Map),this[lo]=t})),ho=function(){return oo((function e(){io(this,e)}),[{key:"get",value:function(e,t){if("value"==t)return e[so].value;if("grow"===t)return e[fo];var r=e[co].get(t);return r?mo(r):e[fo]?((r=po(t))[fo]=e[fo],e[co].set(t,r),mo(r)):void 0}},{key:"set",value:function(e,t,r){return"value"==t?(e[so].value=r,!0):"grow"===t?(e[fo]=_(r),!0):null==r?(e[co].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[co].delete(t),!0)}}])}(),yo="__proxy__";function po(e){var t=new vo(e);return Reflect.set(t,yo,new Proxy(t,new ho)),t}function mo(e){return Reflect.get(e,yo)}var go=function(e){function t(){return io(this,t),Zn(this,t,["__root__"])}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ro(e,t)}(t,e),oo(t,[{key:"put",value:function(){var e=arguments.length;if(e<2)return console.error("参数至少包括一个(key, value)"),!1;for(var t=this,r=0;r<e-1;r++){var n=r<0||arguments.length<=r?void 0:arguments[r],o=void 0;t[co].has(n)?o=t[co].get(n):(o=po(n),t[co].set(n,o)),t=o}return t[so].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,r=0;r<e;r++){var n=r<0||arguments.length<=r?void 0:arguments[r];if(!t[co].has(n))return;t=t[co].get(n)}return t[so].value}}},{key:"remove",value:function(){var e=arguments.length;if(0==e)return!1;for(var t=this,r=0;r<e-1;r++){var n=r<0||arguments.length<=r?void 0:arguments[r];if(!t[co].has(n))return!1;t=t[co].get(n)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return!!t[co].has(o)&&(t[co].delete(o),!0)}},{key:"contains",value:function(){var e=arguments.length;if(0==e)return!1;for(var t=this,r=0;r<e-1;r++){var n=r<0||arguments.length<=r?void 0:arguments[r];if(!t[co].has(n))return!1;t=t[co].get(n)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return t[co].has(o)}},{key:"clear",value:function(){this[co].clear()}}])}(vo),bo=(Symbol("treeKey"),["put","get","contains","remove","clear"]);function wo(e){return bo.includes(e)}var So=function(){return oo((function e(){io(this,e)}),[{key:"get",value:function(e,t){if("value"==t)return e[so].value;if("grow"===t)return e[fo];if(t===co)return e[co];if("string"==typeof t&&wo(t))return e[t];var r=String(t),n=e[co].get(r);return n?mo(n):e[fo]?((n=po(r))[fo]=e[fo],e[co].set(r,n),mo(n)):void 0}},{key:"set",value:function(e,t,r){return"value"==t?(e[so].value=r,!0):"grow"===t?(e[fo]=_(r),!0):!wo(t)&&(null==r?(e[co].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[co].delete(t),!0)}}])}(),xo=new Proxy(go,{construct:function(e){var t=function(){var e=new go,t=new So,r=new Proxy(e,t),n={put:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Reflect.apply(e.put,e,r)},get:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Reflect.apply(e.get,e,r)},remove:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Reflect.apply(e.remove,e,r)},contains:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Reflect.apply(e.contains,e,r)},clear:function(){return Reflect.apply(e.clear,e,[])}};return Object.assign(n,r),Reflect.set(e,yo,r),e}();return mo(t)}}),ko={get each(){return $},get type(){return M},get isFunction(){return b},get isArray(){return g},get isArrayLike(){return N},get makeArray(){return D},get merge(){return K},get isWindow(){return I},get isPlainObject(){return S},get isEqual(){return L},get isESModule(){return k}};function jo(e){return jo="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},jo(e)}function Ao(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ao(Object(r),!0).forEach((function(t){Ro(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ao(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ro(e,t,r){return(t=function(e){var t=function(e){if("object"!=jo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=jo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Symbol("fk");var Po=new on({}),Eo=new xo,To=new Vn,Co=!1,qo=Oo(Oo({},ko),{},{get router(){return Po},get bus(){return Eo},get Bus(){return xo},get eventproxy(){return To},get EventProxy(){return Vn},get EventChain(){return pt},get require(){return Po.require},get ajax(){return Yn},get extend(){return A},get clone(){return O},install:function(e){Co||(Co=!0,function(e){re=e}(e),e.component(an,Mn),e.component("fox-router-link",Nn),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 pe(this,r,null)}}),Reflect.defineProperty(e.prototype,"$bus",{get:function(){return this._routerRoot._fox.bus}}),e.prototype.$fox_on=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];To.on(e,t,r)},e.prototype.$fox_off=function(e,t){To.off(e,t)},e.prototype.$fox_once=function(e,t){To.once(e,t)},e.prototype.$fox_all=function(){for(var e=To,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];Reflect.apply(e.all,e,r)},e.prototype.$fox_trigger=function(e){for(var t=To,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];Reflect.apply(t.trigger,t,[e].concat(n))},e.prototype.$fox_emit=function(e){for(var t=To,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];Reflect.apply(t.trigger,t,[e].concat(n))},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(){}}))}}),_o=qo;return t}()}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fox-js/fox",
3
- "version": "2.1.30",
3
+ "version": "2.1.32",
4
4
  "keywords": [
5
5
  "Router",
6
6
  "Vue2",