UNPKG

vue-app-sdk

Version:
4 lines 79.4 kB
(function(p,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],d):(p=typeof globalThis<"u"?globalThis:p||self,d(p.VueAppSdk={},p.Vue,p.VueRouter))})(this,function(p,d,V){"use strict";var Hd=Object.defineProperty;var Vd=(p,d,V)=>d in p?Hd(p,d,{enumerable:!0,configurable:!0,writable:!0,value:V}):p[d]=V;var c=(p,d,V)=>Vd(p,typeof d!="symbol"?d+"":d,V);function sr(e){return d.getCurrentScope()?(d.onScopeDispose(e),!0):!1}function Ge(e){return typeof e=="function"?e():d.unref(e)}const zi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Yi=Object.prototype.toString,qi=e=>Yi.call(e)==="[object Object]",Ji=()=>{};function Zi(e,t){function r(...n){return new Promise((i,a)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(i).catch(a)})}return r}const or=e=>e();function Qi(e=or){const t=d.ref(!0);function r(){t.value=!1}function n(){t.value=!0}const i=(...a)=>{t.value&&e(...a)};return{isActive:d.readonly(t),pause:r,resume:n,eventFilter:i}}function Xi(e){return d.getCurrentInstance()}function ur(e,t,r={}){const{eventFilter:n=or,...i}=r;return d.watch(e,Zi(n,t),i)}function ea(e,t,r={}){const{eventFilter:n,...i}=r,{eventFilter:a,pause:s,resume:o,isActive:u}=Qi(n);return{stop:ur(e,t,{...i,eventFilter:a}),pause:s,resume:o,isActive:u}}function ta(e,t=!0,r){Xi()?d.onMounted(e,r):t?e():d.nextTick(e)}const be=zi?window:void 0;function ra(e){var t;const r=Ge(e);return(t=r==null?void 0:r.$el)!=null?t:r}function st(...e){let t,r,n,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([r,n,i]=e,t=be):[t,r,n,i]=e,!t)return Ji;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const a=[],s=()=>{a.forEach(f=>f()),a.length=0},o=(f,h,g,_)=>(f.addEventListener(h,g,_),()=>f.removeEventListener(h,g,_)),u=d.watch(()=>[ra(t),Ge(i)],([f,h])=>{if(s(),!f)return;const g=qi(h)?{...h}:h;a.push(...r.flatMap(_=>n.map(b=>o(f,_,b,g))))},{immediate:!0,flush:"post"}),l=()=>{u(),s()};return sr(l),l}const Ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},We="__vueuse_ssr_handlers__",na=ia();function ia(){return We in Ke||(Ke[We]=Ke[We]||{}),Ke[We]}function lr(e,t){return na[e]||t}function cr(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const fr={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},hr="vueuse-storage";function aa(e,t,r,n={}){var i;const{flush:a="pre",deep:s=!0,listenToStorageChanges:o=!0,writeDefaults:u=!0,mergeDefaults:l=!1,shallow:f,window:h=be,eventFilter:g,onError:_=P=>{console.error(P)},initOnMounted:b}=n,A=(f?d.shallowRef:d.ref)(typeof t=="function"?t():t);if(!r)try{r=lr("getDefaultStorage",()=>{var P;return(P=be)==null?void 0:P.localStorage})()}catch(P){_(P)}if(!r)return A;const v=Ge(t),y=cr(v),m=(i=n.serializer)!=null?i:fr[y],{pause:T,resume:O}=ea(A,()=>se(A.value),{flush:a,deep:s,eventFilter:g});h&&o&&ta(()=>{r instanceof Storage?st(h,"storage",K):st(h,hr,je),b&&K()}),b||K();function x(P,E){if(h){const N={key:e,oldValue:P,newValue:E,storageArea:r};h.dispatchEvent(r instanceof Storage?new StorageEvent("storage",N):new CustomEvent(hr,{detail:N}))}}function se(P){try{const E=r.getItem(e);if(P==null)x(E,null),r.removeItem(e);else{const N=m.write(P);E!==N&&(r.setItem(e,N),x(E,N))}}catch(E){_(E)}}function X(P){const E=P?P.newValue:r.getItem(e);if(E==null)return u&&v!=null&&r.setItem(e,m.write(v)),v;if(!P&&l){const N=m.read(E);return typeof l=="function"?l(N,v):y==="object"&&!Array.isArray(N)?{...v,...N}:N}else return typeof E!="string"?E:m.read(E)}function K(P){if(!(P&&P.storageArea!==r)){if(P&&P.key==null){A.value=v;return}if(!(P&&P.key!==e)){T();try{(P==null?void 0:P.newValue)!==m.write(A.value)&&(A.value=X(P))}catch(E){_(E)}finally{P?d.nextTick(O):O()}}}}function je(P){K(P.detail)}return A}function sa(e,t,r,n={}){var i;const{flush:a="pre",deep:s=!0,listenToStorageChanges:o=!0,writeDefaults:u=!0,mergeDefaults:l=!1,shallow:f,window:h=be,eventFilter:g,onError:_=T=>{console.error(T)}}=n,b=Ge(t),A=cr(b),v=(f?d.shallowRef:d.ref)(t),y=(i=n.serializer)!=null?i:fr[A];if(!r)try{r=lr("getDefaultStorageAsync",()=>{var T;return(T=be)==null?void 0:T.localStorage})()}catch(T){_(T)}async function m(T){if(!(!r||T&&T.key!==e))try{const O=T?T.newValue:await r.getItem(e);if(O==null)v.value=b,u&&b!==null&&await r.setItem(e,await y.write(b));else if(l){const x=await y.read(O);typeof l=="function"?v.value=l(x,b):A==="object"&&!Array.isArray(x)?v.value={...b,...x}:v.value=x}else v.value=await y.read(O)}catch(O){_(O)}}return m(),h&&o&&st(h,"storage",T=>Promise.resolve().then(()=>m(T))),r&&ur(v,async()=>{try{v.value==null?await r.removeItem(e):await r.setItem(e,await y.write(v.value))}catch(T){_(T)}},{flush:a,deep:s,eventFilter:g}),v}var dr=typeof global=="object"&&global&&global.Object===Object&&global,oa=typeof self=="object"&&self&&self.Object===Object&&self,C=dr||oa||Function("return this")(),j=C.Symbol,gr=Object.prototype,ua=gr.hasOwnProperty,la=gr.toString,ye=j?j.toStringTag:void 0;function ca(e){var t=ua.call(e,ye),r=e[ye];try{e[ye]=void 0;var n=!0}catch{}var i=la.call(e);return n&&(t?e[ye]=r:delete e[ye]),i}var fa=Object.prototype,ha=fa.toString;function da(e){return ha.call(e)}var ga="[object Null]",pa="[object Undefined]",pr=j?j.toStringTag:void 0;function J(e){return e==null?e===void 0?pa:ga:pr&&pr in Object(e)?ca(e):da(e)}function k(e){return e!=null&&typeof e=="object"}var _a="[object Symbol]";function ue(e){return typeof e=="symbol"||k(e)&&J(e)==_a}function Ae(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var S=Array.isArray,va=1/0,_r=j?j.prototype:void 0,vr=_r?_r.toString:void 0;function br(e){if(typeof e=="string")return e;if(S(e))return Ae(e,br)+"";if(ue(e))return vr?vr.call(e):"";var t=e+"";return t=="0"&&1/e==-va?"-0":t}var ba=/\s/;function ya(e){for(var t=e.length;t--&&ba.test(e.charAt(t)););return t}var Aa=/^\s+/;function ma(e){return e&&e.slice(0,ya(e)+1).replace(Aa,"")}function F(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var yr=NaN,Pa=/^[-+]0x[0-9a-f]+$/i,wa=/^0b[01]+$/i,Ta=/^0o[0-7]+$/i,Ra=parseInt;function Sa(e){if(typeof e=="number")return e;if(ue(e))return yr;if(F(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=F(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ma(e);var r=wa.test(e);return r||Ta.test(e)?Ra(e.slice(2),r?2:8):Pa.test(e)?yr:+e}var Ar=1/0,$a=17976931348623157e292;function Ea(e){if(!e)return e===0?e:0;if(e=Sa(e),e===Ar||e===-Ar){var t=e<0?-1:1;return t*$a}return e===e?e:0}function ot(e){var t=Ea(e),r=t%1;return t===t?r?t-r:t:0}function me(e){return e}var Oa="[object AsyncFunction]",xa="[object Function]",Ia="[object GeneratorFunction]",La="[object Proxy]";function G(e){if(!F(e))return!1;var t=J(e);return t==xa||t==Ia||t==Oa||t==La}var ut=C["__core-js_shared__"],mr=function(){var e=/[^.]+$/.exec(ut&&ut.keys&&ut.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Da(e){return!!mr&&mr in e}var Ca=Function.prototype,Ma=Ca.toString;function ee(e){if(e!=null){try{return Ma.call(e)}catch{}try{return e+""}catch{}}return""}var Fa=/[\\^$.*+?()[\]{}|]/g,Na=/^\[object .+?Constructor\]$/,ja=Function.prototype,Ga=Object.prototype,Ka=ja.toString,Wa=Ga.hasOwnProperty,ka=RegExp("^"+Ka.call(Wa).replace(Fa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ua(e){if(!F(e)||Da(e))return!1;var t=G(e)?ka:Na;return t.test(ee(e))}function Ba(e,t){return e==null?void 0:e[t]}function te(e,t){var r=Ba(e,t);return Ua(r)?r:void 0}var Pe=te(C,"WeakMap"),ke=Pe&&new Pe,Pr=ke?function(e,t){return ke.set(e,t),e}:me,wr=Object.create,Ue=function(){function e(){}return function(t){if(!F(t))return{};if(wr)return wr(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function we(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Ue(e.prototype),n=e.apply(r,t);return F(n)?n:r}}var Ha=1;function Va(e,t,r){var n=t&Ha,i=we(e);function a(){var s=this&&this!==C&&this instanceof a?i:e;return s.apply(n?r:this,arguments)}return a}function lt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var za=Math.max;function Tr(e,t,r,n){for(var i=-1,a=e.length,s=r.length,o=-1,u=t.length,l=za(a-s,0),f=Array(u+l),h=!n;++o<u;)f[o]=t[o];for(;++i<s;)(h||i<a)&&(f[r[i]]=e[i]);for(;l--;)f[o++]=e[i++];return f}var Ya=Math.max;function Rr(e,t,r,n){for(var i=-1,a=e.length,s=-1,o=r.length,u=-1,l=t.length,f=Ya(a-o,0),h=Array(f+l),g=!n;++i<f;)h[i]=e[i];for(var _=i;++u<l;)h[_+u]=t[u];for(;++s<o;)(g||i<a)&&(h[_+r[s]]=e[i++]);return h}function qa(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}function ct(){}var Ja=4294967295;function le(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ja,this.__views__=[]}le.prototype=Ue(ct.prototype),le.prototype.constructor=le;function Sr(){}var ft=ke?function(e){return ke.get(e)}:Sr,$r={},Za=Object.prototype,Qa=Za.hasOwnProperty;function Be(e){for(var t=e.name+"",r=$r[t],n=Qa.call($r,t)?r.length:0;n--;){var i=r[n],a=i.func;if(a==null||a==e)return i.name}return t}function Z(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}Z.prototype=Ue(ct.prototype),Z.prototype.constructor=Z;function ht(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Xa(e){if(e instanceof le)return e.clone();var t=new Z(e.__wrapped__,e.__chain__);return t.__actions__=ht(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var es=Object.prototype,ts=es.hasOwnProperty;function He(e){if(k(e)&&!S(e)&&!(e instanceof le)){if(e instanceof Z)return e;if(ts.call(e,"__wrapped__"))return Xa(e)}return new Z(e)}He.prototype=ct.prototype,He.prototype.constructor=He;function dt(e){var t=Be(e),r=He[t];if(typeof r!="function"||!(t in le.prototype))return!1;if(e===r)return!0;var n=ft(r);return!!n&&e===n[0]}var rs=800,ns=16,is=Date.now;function Er(e){var t=0,r=0;return function(){var n=is(),i=ns-(n-r);if(r=n,i>0){if(++t>=rs)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Or=Er(Pr),as=/\{\n\/\* \[wrapped with (.+)\] \*/,ss=/,? & /;function os(e){var t=e.match(as);return t?t[1].split(ss):[]}var us=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function ls(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(us,`{
/* [wrapped with `+t+`] */
`)}function cs(e){return function(){return e}}var Ve=function(){try{var e=te(Object,"defineProperty");return e({},"",{}),e}catch{}}(),fs=Ve?function(e,t){return Ve(e,"toString",{configurable:!0,enumerable:!1,value:cs(t),writable:!0})}:me,gt=Er(fs);function xr(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function hs(e,t,r,n){for(var i=e.length,a=r+-1;++a<i;)if(t(e[a],a,e))return a;return-1}function ds(e){return e!==e}function gs(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function ps(e,t,r){return t===t?gs(e,t,r):hs(e,ds,r)}function _s(e,t){var r=e==null?0:e.length;return!!r&&ps(e,t,0)>-1}var vs=1,bs=2,ys=8,As=16,ms=32,Ps=64,ws=128,Ts=256,Rs=512,Ss=[["ary",ws],["bind",vs],["bindKey",bs],["curry",ys],["curryRight",As],["flip",Rs],["partial",ms],["partialRight",Ps],["rearg",Ts]];function $s(e,t){return xr(Ss,function(r){var n="_."+r[0];t&r[1]&&!_s(e,n)&&e.push(n)}),e.sort()}function Ir(e,t,r){var n=t+"";return gt(e,ls(n,$s(os(n),r)))}var Es=1,Os=2,xs=4,Is=8,Lr=32,Dr=64;function Cr(e,t,r,n,i,a,s,o,u,l){var f=t&Is,h=f?s:void 0,g=f?void 0:s,_=f?a:void 0,b=f?void 0:a;t|=f?Lr:Dr,t&=~(f?Dr:Lr),t&xs||(t&=~(Es|Os));var A=[e,t,i,_,h,b,g,o,u,l],v=r.apply(void 0,A);return dt(e)&&Or(v,A),v.placeholder=n,Ir(v,e,t)}function pt(e){var t=e;return t.placeholder}var Ls=9007199254740991,Ds=/^(?:0|[1-9]\d*)$/;function ze(e,t){var r=typeof e;return t=t??Ls,!!t&&(r=="number"||r!="symbol"&&Ds.test(e))&&e>-1&&e%1==0&&e<t}var Cs=Math.min;function Ms(e,t){for(var r=e.length,n=Cs(t.length,r),i=ht(e);n--;){var a=t[n];e[n]=ze(a,r)?i[a]:void 0}return e}var Mr="__lodash_placeholder__";function Te(e,t){for(var r=-1,n=e.length,i=0,a=[];++r<n;){var s=e[r];(s===t||s===Mr)&&(e[r]=Mr,a[i++]=r)}return a}var Fs=1,Ns=2,js=8,Gs=16,Ks=128,Ws=512;function _t(e,t,r,n,i,a,s,o,u,l){var f=t&Ks,h=t&Fs,g=t&Ns,_=t&(js|Gs),b=t&Ws,A=g?void 0:we(e);function v(){for(var y=arguments.length,m=Array(y),T=y;T--;)m[T]=arguments[T];if(_)var O=pt(v),x=qa(m,O);if(n&&(m=Tr(m,n,i,_)),a&&(m=Rr(m,a,s,_)),y-=x,_&&y<l){var se=Te(m,O);return Cr(e,t,_t,v.placeholder,r,m,se,o,u,l-y)}var X=h?r:this,K=g?X[e]:e;return y=m.length,o?m=Ms(m,o):b&&y>1&&m.reverse(),f&&u<y&&(m.length=u),this&&this!==C&&this instanceof v&&(K=A||we(K)),K.apply(X,m)}return v}function ks(e,t,r){var n=we(e);function i(){for(var a=arguments.length,s=Array(a),o=a,u=pt(i);o--;)s[o]=arguments[o];var l=a<3&&s[0]!==u&&s[a-1]!==u?[]:Te(s,u);if(a-=l.length,a<r)return Cr(e,t,_t,i.placeholder,void 0,s,l,void 0,void 0,r-a);var f=this&&this!==C&&this instanceof i?n:e;return lt(f,this,s)}return i}var Us=1;function Bs(e,t,r,n){var i=t&Us,a=we(e);function s(){for(var o=-1,u=arguments.length,l=-1,f=n.length,h=Array(f+u),g=this&&this!==C&&this instanceof s?a:e;++l<f;)h[l]=n[l];for(;u--;)h[l++]=arguments[++o];return lt(g,i?r:this,h)}return s}var Fr="__lodash_placeholder__",vt=1,Hs=2,Vs=4,Nr=8,Re=128,jr=256,zs=Math.min;function Ys(e,t){var r=e[1],n=t[1],i=r|n,a=i<(vt|Hs|Re),s=n==Re&&r==Nr||n==Re&&r==jr&&e[7].length<=t[8]||n==(Re|jr)&&t[7].length<=t[8]&&r==Nr;if(!(a||s))return e;n&vt&&(e[2]=t[2],i|=r&vt?0:Vs);var o=t[3];if(o){var u=e[3];e[3]=u?Tr(u,o,t[4]):o,e[4]=u?Te(e[3],Fr):t[4]}return o=t[5],o&&(u=e[5],e[5]=u?Rr(u,o,t[6]):o,e[6]=u?Te(e[5],Fr):t[6]),o=t[7],o&&(e[7]=o),n&Re&&(e[8]=e[8]==null?t[8]:zs(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}var qs="Expected a function",Gr=1,Js=2,bt=8,yt=16,At=32,Kr=64,Wr=Math.max;function Zs(e,t,r,n,i,a,s,o){var u=t&Js;if(!u&&typeof e!="function")throw new TypeError(qs);var l=n?n.length:0;if(l||(t&=~(At|Kr),n=i=void 0),s=s===void 0?s:Wr(ot(s),0),o=o===void 0?o:ot(o),l-=i?i.length:0,t&Kr){var f=n,h=i;n=i=void 0}var g=u?void 0:ft(e),_=[e,t,r,n,i,f,h,a,s,o];if(g&&Ys(_,g),e=_[0],t=_[1],r=_[2],n=_[3],i=_[4],o=_[9]=_[9]===void 0?u?0:e.length:Wr(_[9]-l,0),!o&&t&(bt|yt)&&(t&=~(bt|yt)),!t||t==Gr)var b=Va(e,t,r);else t==bt||t==yt?b=ks(e,t,o):(t==At||t==(Gr|At))&&!i.length?b=Bs(e,t,r,n):b=_t.apply(void 0,_);var A=g?Pr:Or;return Ir(A(b,_),e,t)}function kr(e,t,r){t=="__proto__"&&Ve?Ve(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function mt(e,t){return e===t||e!==e&&t!==t}var Qs=Object.prototype,Xs=Qs.hasOwnProperty;function Pt(e,t,r){var n=e[t];(!(Xs.call(e,t)&&mt(n,r))||r===void 0&&!(t in e))&&kr(e,t,r)}function Se(e,t,r,n){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var o=t[a],u=void 0;u===void 0&&(u=e[o]),i?kr(r,o,u):Pt(r,o,u)}return r}var Ur=Math.max;function Br(e,t,r){return t=Ur(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Ur(n.length-t,0),s=Array(a);++i<a;)s[i]=n[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=n[i];return o[t]=r(s),lt(e,this,o)}}function eo(e,t){return gt(Br(e,t,me),e+"")}var to=9007199254740991;function wt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=to}function Ye(e){return e!=null&&wt(e.length)&&!G(e)}var ro=Object.prototype;function Tt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ro;return e===r}function no(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var io="[object Arguments]";function Hr(e){return k(e)&&J(e)==io}var Vr=Object.prototype,ao=Vr.hasOwnProperty,so=Vr.propertyIsEnumerable,Rt=Hr(function(){return arguments}())?Hr:function(e){return k(e)&&ao.call(e,"callee")&&!so.call(e,"callee")};function oo(){return!1}var zr=typeof p=="object"&&p&&!p.nodeType&&p,Yr=zr&&typeof module=="object"&&module&&!module.nodeType&&module,uo=Yr&&Yr.exports===zr,qr=uo?C.Buffer:void 0,lo=qr?qr.isBuffer:void 0,qe=lo||oo,co="[object Arguments]",fo="[object Array]",ho="[object Boolean]",go="[object Date]",po="[object Error]",_o="[object Function]",vo="[object Map]",bo="[object Number]",yo="[object Object]",Ao="[object RegExp]",mo="[object Set]",Po="[object String]",wo="[object WeakMap]",To="[object ArrayBuffer]",Ro="[object DataView]",So="[object Float32Array]",$o="[object Float64Array]",Eo="[object Int8Array]",Oo="[object Int16Array]",xo="[object Int32Array]",Io="[object Uint8Array]",Lo="[object Uint8ClampedArray]",Do="[object Uint16Array]",Co="[object Uint32Array]",R={};R[So]=R[$o]=R[Eo]=R[Oo]=R[xo]=R[Io]=R[Lo]=R[Do]=R[Co]=!0,R[co]=R[fo]=R[To]=R[ho]=R[Ro]=R[go]=R[po]=R[_o]=R[vo]=R[bo]=R[yo]=R[Ao]=R[mo]=R[Po]=R[wo]=!1;function Mo(e){return k(e)&&wt(e.length)&&!!R[J(e)]}function Je(e){return function(t){return e(t)}}var Jr=typeof p=="object"&&p&&!p.nodeType&&p,$e=Jr&&typeof module=="object"&&module&&!module.nodeType&&module,Fo=$e&&$e.exports===Jr,St=Fo&&dr.process,ce=function(){try{var e=$e&&$e.require&&$e.require("util").types;return e||St&&St.binding&&St.binding("util")}catch{}}(),Zr=ce&&ce.isTypedArray,Qr=Zr?Je(Zr):Mo,No=Object.prototype,jo=No.hasOwnProperty;function Xr(e,t){var r=S(e),n=!r&&Rt(e),i=!r&&!n&&qe(e),a=!r&&!n&&!i&&Qr(e),s=r||n||i||a,o=s?no(e.length,String):[],u=o.length;for(var l in e)(t||jo.call(e,l))&&!(s&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||ze(l,u)))&&o.push(l);return o}function en(e,t){return function(r){return e(t(r))}}var Go=en(Object.keys,Object),Ko=Object.prototype,Wo=Ko.hasOwnProperty;function ko(e){if(!Tt(e))return Go(e);var t=[];for(var r in Object(e))Wo.call(e,r)&&r!="constructor"&&t.push(r);return t}function Ee(e){return Ye(e)?Xr(e):ko(e)}function Uo(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Bo=Object.prototype,Ho=Bo.hasOwnProperty;function Vo(e){if(!F(e))return Uo(e);var t=Tt(e),r=[];for(var n in e)n=="constructor"&&(t||!Ho.call(e,n))||r.push(n);return r}function $t(e){return Ye(e)?Xr(e,!0):Vo(e)}var zo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yo=/^\w*$/;function Et(e,t){if(S(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ue(e)?!0:Yo.test(e)||!zo.test(e)||t!=null&&e in Object(t)}var Oe=te(Object,"create");function qo(){this.__data__=Oe?Oe(null):{},this.size=0}function Jo(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Zo="__lodash_hash_undefined__",Qo=Object.prototype,Xo=Qo.hasOwnProperty;function eu(e){var t=this.__data__;if(Oe){var r=t[e];return r===Zo?void 0:r}return Xo.call(t,e)?t[e]:void 0}var tu=Object.prototype,ru=tu.hasOwnProperty;function nu(e){var t=this.__data__;return Oe?t[e]!==void 0:ru.call(t,e)}var iu="__lodash_hash_undefined__";function au(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Oe&&t===void 0?iu:t,this}function re(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}re.prototype.clear=qo,re.prototype.delete=Jo,re.prototype.get=eu,re.prototype.has=nu,re.prototype.set=au;function su(){this.__data__=[],this.size=0}function Ze(e,t){for(var r=e.length;r--;)if(mt(e[r][0],t))return r;return-1}var ou=Array.prototype,uu=ou.splice;function lu(e){var t=this.__data__,r=Ze(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():uu.call(t,r,1),--this.size,!0}function cu(e){var t=this.__data__,r=Ze(t,e);return r<0?void 0:t[r][1]}function fu(e){return Ze(this.__data__,e)>-1}function hu(e,t){var r=this.__data__,n=Ze(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Y(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Y.prototype.clear=su,Y.prototype.delete=lu,Y.prototype.get=cu,Y.prototype.has=fu,Y.prototype.set=hu;var xe=te(C,"Map");function du(){this.size=0,this.__data__={hash:new re,map:new(xe||Y),string:new re}}function gu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Qe(e,t){var r=e.__data__;return gu(t)?r[typeof t=="string"?"string":"hash"]:r.map}function pu(e){var t=Qe(this,e).delete(e);return this.size-=t?1:0,t}function _u(e){return Qe(this,e).get(e)}function vu(e){return Qe(this,e).has(e)}function bu(e,t){var r=Qe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function q(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}q.prototype.clear=du,q.prototype.delete=pu,q.prototype.get=_u,q.prototype.has=vu,q.prototype.set=bu;var yu="Expected a function";function Xe(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(yu);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(Xe.Cache||q),r}Xe.Cache=q;var Au=500;function mu(e){var t=Xe(e,function(n){return r.size===Au&&r.clear(),n}),r=t.cache;return t}var Pu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wu=/\\(\\)?/g,Tu=mu(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Pu,function(r,n,i,a){t.push(i?a.replace(wu,"$1"):n||r)}),t});function Ie(e){return e==null?"":br(e)}function fe(e,t){return S(e)?e:Et(e,t)?[e]:Tu(Ie(e))}var Ru=1/0;function he(e){if(typeof e=="string"||ue(e))return e;var t=e+"";return t=="0"&&1/e==-Ru?"-0":t}function Le(e,t){t=fe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[he(t[r++])];return r&&r==n?e:void 0}function Su(e,t,r){var n=e==null?void 0:Le(e,t);return n===void 0?r:n}function Ot(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var tn=j?j.isConcatSpreadable:void 0;function $u(e){return S(e)||Rt(e)||!!(tn&&e&&e[tn])}function Eu(e,t,r,n,i){var a=-1,s=e.length;for(r||(r=$u),i||(i=[]);++a<s;){var o=e[a];r(o)?Ot(i,o):i[i.length]=o}return i}function Ou(e){var t=e==null?0:e.length;return t?Eu(e):[]}function xt(e){return gt(Br(e,void 0,Ou),e+"")}var It=en(Object.getPrototypeOf,Object),xu="[object Object]",Iu=Function.prototype,Lu=Object.prototype,rn=Iu.toString,Du=Lu.hasOwnProperty,Cu=rn.call(Object);function Mu(e){if(!k(e)||J(e)!=xu)return!1;var t=It(e);if(t===null)return!0;var r=Du.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&rn.call(r)==Cu}var Fu="Expected a function";function Nu(e,t){var r;if(typeof t!="function")throw new TypeError(Fu);return e=ot(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}function nn(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}function ju(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:nn(e,t,r)}var Gu="\\ud800-\\udfff",Ku="\\u0300-\\u036f",Wu="\\ufe20-\\ufe2f",ku="\\u20d0-\\u20ff",Uu=Ku+Wu+ku,Bu="\\ufe0e\\ufe0f",Hu="\\u200d",Vu=RegExp("["+Hu+Gu+Uu+Bu+"]");function an(e){return Vu.test(e)}function zu(e){return e.split("")}var sn="\\ud800-\\udfff",Yu="\\u0300-\\u036f",qu="\\ufe20-\\ufe2f",Ju="\\u20d0-\\u20ff",Zu=Yu+qu+Ju,Qu="\\ufe0e\\ufe0f",Xu="["+sn+"]",Lt="["+Zu+"]",Dt="\\ud83c[\\udffb-\\udfff]",el="(?:"+Lt+"|"+Dt+")",on="[^"+sn+"]",un="(?:\\ud83c[\\udde6-\\uddff]){2}",ln="[\\ud800-\\udbff][\\udc00-\\udfff]",tl="\\u200d",cn=el+"?",fn="["+Qu+"]?",rl="(?:"+tl+"(?:"+[on,un,ln].join("|")+")"+fn+cn+")*",nl=fn+cn+rl,il="(?:"+[on+Lt+"?",Lt,un,ln,Xu].join("|")+")",al=RegExp(Dt+"(?="+Dt+")|"+il+nl,"g");function sl(e){return e.match(al)||[]}function ol(e){return an(e)?sl(e):zu(e)}function ul(e){return function(t){t=Ie(t);var r=an(t)?ol(t):void 0,n=r?r[0]:t.charAt(0),i=r?ju(r,1).join(""):t.slice(1);return n[e]()+i}}var hn=ul("toUpperCase");function ll(e){return hn(Ie(e).toLowerCase())}function cl(e,t,r,n){for(var i=-1,a=e==null?0:e.length;++i<a;)r=t(r,e[i],i,e);return r}function fl(e){return function(t){return e==null?void 0:e[t]}}var hl={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},dl=fl(hl),gl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,pl="\\u0300-\\u036f",_l="\\ufe20-\\ufe2f",vl="\\u20d0-\\u20ff",bl=pl+_l+vl,yl="["+bl+"]",Al=RegExp(yl,"g");function ml(e){return e=Ie(e),e&&e.replace(gl,dl).replace(Al,"")}var Pl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function wl(e){return e.match(Pl)||[]}var Tl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Rl(e){return Tl.test(e)}var dn="\\ud800-\\udfff",Sl="\\u0300-\\u036f",$l="\\ufe20-\\ufe2f",El="\\u20d0-\\u20ff",Ol=Sl+$l+El,gn="\\u2700-\\u27bf",pn="a-z\\xdf-\\xf6\\xf8-\\xff",xl="\\xac\\xb1\\xd7\\xf7",Il="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ll="\\u2000-\\u206f",Dl=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_n="A-Z\\xc0-\\xd6\\xd8-\\xde",Cl="\\ufe0e\\ufe0f",vn=xl+Il+Ll+Dl,bn="['’]",yn="["+vn+"]",Ml="["+Ol+"]",An="\\d+",Fl="["+gn+"]",mn="["+pn+"]",Pn="[^"+dn+vn+An+gn+pn+_n+"]",Nl="\\ud83c[\\udffb-\\udfff]",jl="(?:"+Ml+"|"+Nl+")",Gl="[^"+dn+"]",wn="(?:\\ud83c[\\udde6-\\uddff]){2}",Tn="[\\ud800-\\udbff][\\udc00-\\udfff]",de="["+_n+"]",Kl="\\u200d",Rn="(?:"+mn+"|"+Pn+")",Wl="(?:"+de+"|"+Pn+")",Sn="(?:"+bn+"(?:d|ll|m|re|s|t|ve))?",$n="(?:"+bn+"(?:D|LL|M|RE|S|T|VE))?",En=jl+"?",On="["+Cl+"]?",kl="(?:"+Kl+"(?:"+[Gl,wn,Tn].join("|")+")"+On+En+")*",Ul="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Bl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Hl=On+En+kl,Vl="(?:"+[Fl,wn,Tn].join("|")+")"+Hl,zl=RegExp([de+"?"+mn+"+"+Sn+"(?="+[yn,de,"$"].join("|")+")",Wl+"+"+$n+"(?="+[yn,de+Rn,"$"].join("|")+")",de+"?"+Rn+"+"+Sn,de+"+"+$n,Bl,Ul,An,Vl].join("|"),"g");function Yl(e){return e.match(zl)||[]}function ql(e,t,r){return e=Ie(e),t=t,t===void 0?Rl(e)?Yl(e):wl(e):e.match(t)||[]}var Jl="['’]",Zl=RegExp(Jl,"g");function Ql(e){return function(t){return cl(ql(ml(t).replace(Zl,"")),e,"")}}var Xl=Ql(function(e,t,r){return t=t.toLowerCase(),e+(r?ll(t):t)});function ec(){if(!arguments.length)return[];var e=arguments[0];return S(e)?e:[e]}function tc(){this.__data__=new Y,this.size=0}function rc(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function nc(e){return this.__data__.get(e)}function ic(e){return this.__data__.has(e)}var ac=200;function sc(e,t){var r=this.__data__;if(r instanceof Y){var n=r.__data__;if(!xe||n.length<ac-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new q(n)}return r.set(e,t),this.size=r.size,this}function z(e){var t=this.__data__=new Y(e);this.size=t.size}z.prototype.clear=tc,z.prototype.delete=rc,z.prototype.get=nc,z.prototype.has=ic,z.prototype.set=sc;function oc(e,t){return e&&Se(t,Ee(t),e)}function uc(e,t){return e&&Se(t,$t(t),e)}var xn=typeof p=="object"&&p&&!p.nodeType&&p,In=xn&&typeof module=="object"&&module&&!module.nodeType&&module,lc=In&&In.exports===xn,Ln=lc?C.Buffer:void 0,Dn=Ln?Ln.allocUnsafe:void 0;function cc(e,t){if(t)return e.slice();var r=e.length,n=Dn?Dn(r):new e.constructor(r);return e.copy(n),n}function Cn(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}function Mn(){return[]}var fc=Object.prototype,hc=fc.propertyIsEnumerable,Fn=Object.getOwnPropertySymbols,Ct=Fn?function(e){return e==null?[]:(e=Object(e),Cn(Fn(e),function(t){return hc.call(e,t)}))}:Mn;function dc(e,t){return Se(e,Ct(e),t)}var gc=Object.getOwnPropertySymbols,Nn=gc?function(e){for(var t=[];e;)Ot(t,Ct(e)),e=It(e);return t}:Mn;function pc(e,t){return Se(e,Nn(e),t)}function jn(e,t,r){var n=t(e);return S(e)?n:Ot(n,r(e))}function Mt(e){return jn(e,Ee,Ct)}function Gn(e){return jn(e,$t,Nn)}var Ft=te(C,"DataView"),Nt=te(C,"Promise"),jt=te(C,"Set"),Kn="[object Map]",_c="[object Object]",Wn="[object Promise]",kn="[object Set]",Un="[object WeakMap]",Bn="[object DataView]",vc=ee(Ft),bc=ee(xe),yc=ee(Nt),Ac=ee(jt),mc=ee(Pe),U=J;(Ft&&U(new Ft(new ArrayBuffer(1)))!=Bn||xe&&U(new xe)!=Kn||Nt&&U(Nt.resolve())!=Wn||jt&&U(new jt)!=kn||Pe&&U(new Pe)!=Un)&&(U=function(e){var t=J(e),r=t==_c?e.constructor:void 0,n=r?ee(r):"";if(n)switch(n){case vc:return Bn;case bc:return Kn;case yc:return Wn;case Ac:return kn;case mc:return Un}return t});var Pc=Object.prototype,wc=Pc.hasOwnProperty;function Tc(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&wc.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var et=C.Uint8Array;function Gt(e){var t=new e.constructor(e.byteLength);return new et(t).set(new et(e)),t}function Rc(e,t){var r=t?Gt(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Sc=/\w*$/;function $c(e){var t=new e.constructor(e.source,Sc.exec(e));return t.lastIndex=e.lastIndex,t}var Hn=j?j.prototype:void 0,Vn=Hn?Hn.valueOf:void 0;function Ec(e){return Vn?Object(Vn.call(e)):{}}function Oc(e,t){var r=t?Gt(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var xc="[object Boolean]",Ic="[object Date]",Lc="[object Map]",Dc="[object Number]",Cc="[object RegExp]",Mc="[object Set]",Fc="[object String]",Nc="[object Symbol]",jc="[object ArrayBuffer]",Gc="[object DataView]",Kc="[object Float32Array]",Wc="[object Float64Array]",kc="[object Int8Array]",Uc="[object Int16Array]",Bc="[object Int32Array]",Hc="[object Uint8Array]",Vc="[object Uint8ClampedArray]",zc="[object Uint16Array]",Yc="[object Uint32Array]";function qc(e,t,r){var n=e.constructor;switch(t){case jc:return Gt(e);case xc:case Ic:return new n(+e);case Gc:return Rc(e,r);case Kc:case Wc:case kc:case Uc:case Bc:case Hc:case Vc:case zc:case Yc:return Oc(e,r);case Lc:return new n;case Dc:case Fc:return new n(e);case Cc:return $c(e);case Mc:return new n;case Nc:return Ec(e)}}function Jc(e){return typeof e.constructor=="function"&&!Tt(e)?Ue(It(e)):{}}var Zc="[object Map]";function Qc(e){return k(e)&&U(e)==Zc}var zn=ce&&ce.isMap,Xc=zn?Je(zn):Qc,ef="[object Set]";function tf(e){return k(e)&&U(e)==ef}var Yn=ce&&ce.isSet,rf=Yn?Je(Yn):tf,nf=1,af=2,sf=4,qn="[object Arguments]",of="[object Array]",uf="[object Boolean]",lf="[object Date]",cf="[object Error]",Jn="[object Function]",ff="[object GeneratorFunction]",hf="[object Map]",df="[object Number]",Zn="[object Object]",gf="[object RegExp]",pf="[object Set]",_f="[object String]",vf="[object Symbol]",bf="[object WeakMap]",yf="[object ArrayBuffer]",Af="[object DataView]",mf="[object Float32Array]",Pf="[object Float64Array]",wf="[object Int8Array]",Tf="[object Int16Array]",Rf="[object Int32Array]",Sf="[object Uint8Array]",$f="[object Uint8ClampedArray]",Ef="[object Uint16Array]",Of="[object Uint32Array]",w={};w[qn]=w[of]=w[yf]=w[Af]=w[uf]=w[lf]=w[mf]=w[Pf]=w[wf]=w[Tf]=w[Rf]=w[hf]=w[df]=w[Zn]=w[gf]=w[pf]=w[_f]=w[vf]=w[Sf]=w[$f]=w[Ef]=w[Of]=!0,w[cf]=w[Jn]=w[bf]=!1;function De(e,t,r,n,i,a){var s,o=t&nf,u=t&af,l=t&sf;if(r&&(s=i?r(e,n,i,a):r(e)),s!==void 0)return s;if(!F(e))return e;var f=S(e);if(f){if(s=Tc(e),!o)return ht(e,s)}else{var h=U(e),g=h==Jn||h==ff;if(qe(e))return cc(e,o);if(h==Zn||h==qn||g&&!i){if(s=u||g?{}:Jc(e),!o)return u?pc(e,uc(s,e)):dc(e,oc(s,e))}else{if(!w[h])return i?e:{};s=qc(e,h,o)}}a||(a=new z);var _=a.get(e);if(_)return _;a.set(e,s),rf(e)?e.forEach(function(v){s.add(De(v,t,r,v,e,a))}):Xc(e)&&e.forEach(function(v,y){s.set(y,De(v,t,r,y,e,a))});var b=l?u?Gn:Mt:u?$t:Ee,A=f?void 0:b(e);return xr(A||e,function(v,y){A&&(y=v,v=e[y]),Pt(s,y,De(v,t,r,y,e,a))}),s}var xf=1,If=4;function tt(e){return De(e,xf|If)}var Lf="__lodash_hash_undefined__";function Df(e){return this.__data__.set(e,Lf),this}function Cf(e){return this.__data__.has(e)}function rt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new q;++t<r;)this.add(e[t])}rt.prototype.add=rt.prototype.push=Df,rt.prototype.has=Cf;function Mf(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Ff(e,t){return e.has(t)}var Nf=1,jf=2;function Qn(e,t,r,n,i,a){var s=r&Nf,o=e.length,u=t.length;if(o!=u&&!(s&&u>o))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var h=-1,g=!0,_=r&jf?new rt:void 0;for(a.set(e,t),a.set(t,e);++h<o;){var b=e[h],A=t[h];if(n)var v=s?n(A,b,h,t,e,a):n(b,A,h,e,t,a);if(v!==void 0){if(v)continue;g=!1;break}if(_){if(!Mf(t,function(y,m){if(!Ff(_,m)&&(b===y||i(b,y,r,n,a)))return _.push(m)})){g=!1;break}}else if(!(b===A||i(b,A,r,n,a))){g=!1;break}}return a.delete(e),a.delete(t),g}function Gf(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Kf(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Wf=1,kf=2,Uf="[object Boolean]",Bf="[object Date]",Hf="[object Error]",Vf="[object Map]",zf="[object Number]",Yf="[object RegExp]",qf="[object Set]",Jf="[object String]",Zf="[object Symbol]",Qf="[object ArrayBuffer]",Xf="[object DataView]",Xn=j?j.prototype:void 0,Kt=Xn?Xn.valueOf:void 0;function eh(e,t,r,n,i,a,s){switch(r){case Xf:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Qf:return!(e.byteLength!=t.byteLength||!a(new et(e),new et(t)));case Uf:case Bf:case zf:return mt(+e,+t);case Hf:return e.name==t.name&&e.message==t.message;case Yf:case Jf:return e==t+"";case Vf:var o=Gf;case qf:var u=n&Wf;if(o||(o=Kf),e.size!=t.size&&!u)return!1;var l=s.get(e);if(l)return l==t;n|=kf,s.set(e,t);var f=Qn(o(e),o(t),n,i,a,s);return s.delete(e),f;case Zf:if(Kt)return Kt.call(e)==Kt.call(t)}return!1}var th=1,rh=Object.prototype,nh=rh.hasOwnProperty;function ih(e,t,r,n,i,a){var s=r&th,o=Mt(e),u=o.length,l=Mt(t),f=l.length;if(u!=f&&!s)return!1;for(var h=u;h--;){var g=o[h];if(!(s?g in t:nh.call(t,g)))return!1}var _=a.get(e),b=a.get(t);if(_&&b)return _==t&&b==e;var A=!0;a.set(e,t),a.set(t,e);for(var v=s;++h<u;){g=o[h];var y=e[g],m=t[g];if(n)var T=s?n(m,y,g,t,e,a):n(y,m,g,e,t,a);if(!(T===void 0?y===m||i(y,m,r,n,a):T)){A=!1;break}v||(v=g=="constructor")}if(A&&!v){var O=e.constructor,x=t.constructor;O!=x&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof x=="function"&&x instanceof x)&&(A=!1)}return a.delete(e),a.delete(t),A}var ah=1,ei="[object Arguments]",ti="[object Array]",nt="[object Object]",sh=Object.prototype,ri=sh.hasOwnProperty;function oh(e,t,r,n,i,a){var s=S(e),o=S(t),u=s?ti:U(e),l=o?ti:U(t);u=u==ei?nt:u,l=l==ei?nt:l;var f=u==nt,h=l==nt,g=u==l;if(g&&qe(e)){if(!qe(t))return!1;s=!0,f=!1}if(g&&!f)return a||(a=new z),s||Qr(e)?Qn(e,t,r,n,i,a):eh(e,t,u,r,n,i,a);if(!(r&ah)){var _=f&&ri.call(e,"__wrapped__"),b=h&&ri.call(t,"__wrapped__");if(_||b){var A=_?e.value():e,v=b?t.value():t;return a||(a=new z),i(A,v,r,n,a)}}return g?(a||(a=new z),ih(e,t,r,n,i,a)):!1}function Wt(e,t,r,n,i){return e===t?!0:e==null||t==null||!k(e)&&!k(t)?e!==e&&t!==t:oh(e,t,r,n,Wt,i)}var uh=1,lh=2;function ch(e,t,r,n){var i=r.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var s=r[i];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=r[i];var o=s[0],u=e[o],l=s[1];if(s[2]){if(u===void 0&&!(o in e))return!1}else{var f=new z,h;if(!(h===void 0?Wt(l,u,uh|lh,n,f):h))return!1}}return!0}function ni(e){return e===e&&!F(e)}function fh(e){for(var t=Ee(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,ni(i)]}return t}function ii(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function hh(e){var t=fh(e);return t.length==1&&t[0][2]?ii(t[0][0],t[0][1]):function(r){return r===e||ch(r,e,t)}}function dh(e,t){return e!=null&&t in Object(e)}function gh(e,t,r){t=fe(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var s=he(t[n]);if(!(a=e!=null&&r(e,s)))break;e=e[s]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&wt(i)&&ze(s,i)&&(S(e)||Rt(e)))}function ai(e,t){return e!=null&&gh(e,t,dh)}var ph=1,_h=2;function vh(e,t){return Et(e)&&ni(t)?ii(he(e),t):function(r){var n=Su(r,e);return n===void 0&&n===t?ai(r,e):Wt(t,n,ph|_h)}}function bh(e){return function(t){return t==null?void 0:t[e]}}function yh(e){return function(t){return Le(t,e)}}function Ah(e){return Et(e)?bh(he(e)):yh(e)}function si(e){return typeof e=="function"?e:e==null?me:typeof e=="object"?S(e)?vh(e[0],e[1]):hh(e):Ah(e)}function mh(e){return function(t,r,n){for(var i=-1,a=Object(t),s=n(t),o=s.length;o--;){var u=s[++i];if(r(a[u],u,a)===!1)break}return t}}var Ph=mh();function wh(e,t){return e&&Ph(e,t,Ee)}function Th(e,t){return function(r,n){if(r==null)return r;if(!Ye(r))return e(r,n);for(var i=r.length,a=-1,s=Object(r);++a<i&&n(s[a],a,s)!==!1;);return r}}var oi=Th(wh);function Rh(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Sh(e,t){var r=[];return oi(e,function(n,i,a){t(n,i,a)&&r.push(n)}),r}function $h(e,t){var r=S(e)?Cn:Sh;return r(e,si(t))}function Eh(e,t){var r=-1,n=Ye(e)?Array(e.length):[];return oi(e,function(i,a,s){n[++r]=t(i,a,s)}),n}var Oh="Expected a function",xh=8,Ih=32,Lh=128,Dh=256;function Ch(e){return xt(function(t){for(var r=t.length,n=r,i=Z.prototype.thru;n--;){var a=t[n];if(typeof a!="function")throw new TypeError(Oh);if(i&&!s&&Be(a)=="wrapper")var s=new Z([],!0)}for(n=s?n:r;++n<r;){a=t[n];var o=Be(a),u=o=="wrapper"?ft(a):void 0;u&&dt(u[0])&&u[1]==(Lh|xh|Ih|Dh)&&!u[4].length&&u[9]==1?s=s[Be(u[0])].apply(s,u[3]):s=a.length==1&&dt(a)?s[o]():s.thru(a)}return function(){var l=arguments,f=l[0];if(s&&l.length==1&&S(f))return s.plant(f).value();for(var h=0,g=r?t[h].apply(this,l):f;++h<r;)g=t[h].call(this,g);return g}})}var ui=Ch(),Mh="[object String]";function M(e){return typeof e=="string"||!S(e)&&k(e)&&J(e)==Mh}function Fh(e,t){return t.length<2?e:Le(e,nn(t,0,-1))}function li(e){return e==null}function ci(e,t){return t=fe(t,e),e=Fh(e,t),e==null||delete e[he(Rh(t))]}function Nh(e){return Mu(e)?void 0:e}var jh=1,Gh=2,Kh=4,Wh=xt(function(e,t){var r={};if(e==null)return r;var n=!1;t=Ae(t,function(a){return a=fe(a,e),n||(n=a.length>1),a}),Se(e,Gn(e),r),n&&(r=De(r,jh|Gh|Kh,Nh));for(var i=t.length;i--;)ci(r,t[i]);return r});function kh(e,t,r,n){if(!F(e))return e;t=fe(t,e);for(var i=-1,a=t.length,s=a-1,o=e;o!=null&&++i<a;){var u=he(t[i]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=s){var f=o[u];l=void 0,l===void 0&&(l=F(f)?f:ze(t[i+1])?[]:{})}Pt(o,u,l),o=o[u]}return e}function Uh(e,t,r){for(var n=-1,i=t.length,a={};++n<i;){var s=t[n],o=Le(e,s);r(o,s)&&kh(a,fe(s,e),o)}return a}function fi(e){return Nu(2,e)}function Bh(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}function Hh(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=ue(e),s=t!==void 0,o=t===null,u=t===t,l=ue(t);if(!o&&!l&&!a&&e>t||a&&s&&u&&!o&&!l||n&&s&&u||!r&&u||!i)return 1;if(!n&&!a&&!l&&e<t||l&&r&&i&&!n&&!a||o&&r&&i||!s&&i||!u)return-1}return 0}function Vh(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,s=i.length,o=r.length;++n<s;){var u=Hh(i[n],a[n]);if(u){if(n>=o)return u;var l=r[n];return u*(l=="desc"?-1:1)}}return e.index-t.index}function zh(e,t,r){t.length?t=Ae(t,function(a){return S(a)?function(s){return Le(s,a.length===1?a[0]:a)}:a}):t=[me];var n=-1;t=Ae(t,Je(si));var i=Eh(e,function(a,s,o){var u=Ae(t,function(l){return l(a)});return{criteria:u,index:++n,value:a}});return Bh(i,function(a,s){return Vh(a,s,r)})}function Yh(e,t,r,n){return e==null?[]:(S(t)||(t=t==null?[]:[t]),r=n?void 0:r,S(r)||(r=r==null?[]:[r]),zh(e,t,r))}var qh=64,kt=eo(function(e,t){var r=Te(t,pt(kt));return Zs(e,qh,void 0,t,r)});kt.placeholder={};function Jh(e,t){return Uh(e,t,function(r,n){return ai(e,n)})}var Ut=xt(function(e,t){return e==null?{}:Jh(e,t)});function Zh(e,t){return e==null?!0:ci(e,t)}function Bt(e,t={}){const{primaryKey:r,useMap:n=!1}=t,i=e.length>0?!F(e[0]):r==null,a=e.map(s=>[i?s:s[r],s]);return n?new Map(a):Object.fromEntries(a)}function hi(e,t=[]){return t.map(r=>Zh(e,r))}function Ht(e){return G(e)?e:()=>e}const Qh=kt($h,e=>!li(e[1]));ui(Object.entries,Qh,Object.fromEntries);function Xh(e,t,r=""){return r&&(r=` ${r}`),`[${e+r}]: ${t}`}function ed(e,t=Xh){function r(s,o=""){return t(e,s,o)}function n(s,...o){console.info(r(s),...o)}function i(s,...o){console.warn(r(s,"warn"),...o)}function a(s,...o){console.error(r(s,"error"),...o)}return{format:r,info:n,warn:i,error:a}}function Vt(e){return function(t,r,n={}){const i={key:"id",parentKey:"parentId",childrenKey:"children",...n};return e(t,r,void 0,[],[],i.childrenKey,i)}}const di=(e,t,r,n,i,a,s)=>{let o,u;e.forEach((l,f)=>{o=n.concat(`${f}`),u=i.concat(l),t.call(e,l,f,r,o,u,e),l[a]&&di(l[a],t,l,o.concat(a),u,a)})},gi=Vt(di),pi=(e,t,r,n,i,a,s)=>{let o,u,l;for(let f=0;f<e.length;f++){const h=e[f];if(o=n.concat(`${f}`),u=i.concat(h),t.call(e,h,f,r,o,u,e))return{index:f,node:h,paths:o,nodes:u,parent:r,tree:e};if(h[a]&&(l=pi(h[a],t,h,o.concat(a),u,a),l))return l}},td=Vt(pi),_i=(e,t,r,n,i,a,s)=>{let o,u;const l=s.mapChildrenKey||a;return e.map((f,h)=>{o=n.concat(`${h}`),u=i.concat(f);const g=t.call(e,f,h,r,o,u,e);if(g[a]){const _=_i(g[a],t,f,o.concat(a),u,a,s);g[l]=g[a]=_}return g})},vi=Vt(_i);function ge(e,t={}){const{onNil:r=(a,s,o)=>s,reviver:n}=t,i=Ht(r);try{const a=JSON.parse(e,n);return li(a)?i(void 0,a,e):a}catch(a){return i(a,void 0,e)}}ui(Xl,hn);function rd(e,t){const{removeEmptyChildrenKey:r=t.strict}=t,n=Ht(r);e.forEach(i=>{var a,s;!((a=i[t.childrenKey])!=null&&a.length)&&n(i)&&hi(i,[t.childrenKey,(s=t.keyMap)==null?void 0:s.childrenKey].filter(Boolean))})}function pe(e,t,r){t&&(e[t]=r)}function nd(e,t={}){const r={key:"id",parentKey:"parentId",childrenKey:"children",...t};r.orderBy&&(e=Yh(e.slice(0),...r.orderBy));const n=[],i={},a={};let s,o,u;return e.forEach(l=>{s=l[r.key],a[s]=!0}),e.forEach(l=>{s=l[r.key],r.dataKey?(u={},u[r.dataKey]=l):u=l,o=l[r.parentKey],i[s]=i[s]||[],i[o]=i[o]||[],i[o].push(u);{const{key:f,parentKey:h,childrenKey:g}=r;pe(u,f,s),pe(u,h,o),pe(u,g,i[s])}if(r.keyMap){const{key:f,parentKey:h,childrenKey:g}=r.keyMap;pe(u,f,s),pe(u,h,o),pe(u,g,i[s])}(!r.strict||o==null)&&!a[o]&&n.push(u)}),rd(e,r),n}function bi(e,t,r){return t.forEach(n=>{const i=n[r.childrenKey];r.dataKey&&(n=n[r.dataKey]),e.push(n),i!=null&&i.length&&bi(e,i,r),r.dropKeys&&hi(n,r.dropKeys)}),e}function id(e,t={}){return bi([],e,{childrenKey:"children",...t})}const Q=ed("VueAppSDK"),I=Object.assign;function zt(e,t,r){const{persistent:n,window:i,storage:a,storageKey:s,shallow:o=!1,value:u}=e;return n?(t?sa:aa)(s,u,a,{shallow:o,window:i,serializer:r}):o?d.shallowRef(u):d.ref(u)}function yi(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}async function ad(e){const t=e.components;return t&&await Promise.all(Object.keys(t).reduce((r,n)=>{const i=t[n];return G(i)&&!("displayName"in i)&&r.push(i().then(a=>{if(!a)return Promise.reject(new Error(`Couldn't resolve component "${n}" at "${e.path}". Ensure you passed a function that returns a promise.`));const s=yi(a)?a.default:a;t[n]=s})),r},[])),e}function sd(e){return Object.values(e.components||{}).some(t=>G(t)&&!("displayName"in t))}function od(e){return"matched"in e&&S(e)?V.loadRouteLocation(e):"components"in e&&e.components?ad(e):Promise.resolve(e)}function ud(e){return e&&(e.name||e.displayName||e.__name)||""}function Yt(e,t){if(!e)return e;if(G(e))return"displayName"in e?e:()=>Yt(e(),t);if("then"in e)return e.then(n=>Yt(n,t));const r=yi(e)?e.default:e;return I(r,{name:t}),e}async function Ce(e){if(!e)return"";const r=await(sd(e)?od(e):Promise.resolve(e));return ud(r.components&&r.components.default)}function qt(e,t={},r){for(const n in e){const i=e[n],a=r?`${r}:${n}`:n;typeof i=="object"&&i!=null?qt(i,t,a):typeof i=="function"&&(t[a]=i)}return t}const ld={run:e=>e()},cd=()=>ld,fd=typeof console.createTask<"u"?console.createTask:cd;function hd(){}const dd=Promise.resolve(),gd={0(e){return(...t)=>e.reduce((r,n)=>n(...t),void 0)},1(e){return(...t)=>e.reduce((r,n)=>r.then(()=>n(...t)),dd)},2(e){return(...t)=>Promise.all(e.map(r=>r(...t)))}};function pd(e,t){return(...r)=>t.run(()=>e(...r))}function Jt(e){const t=gd[e];let r=(n,i,a)=>{r=null;const s=fd(n);return t(i.map(o=>pd(o,s)))(...a)};return r}const _d=Jt(0),vd=Jt(1),bd=Jt(2);var ne=(e=>(e[e.init=0]="init",e[e.before=1]="before",e[e.hook=2]="hook",e[e.after=3]="after",e))(ne||{}),yd=Object.defineProperty,Ad=(e,t,r)=>t in e?yd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ie=(e,t,r)=>Ad(e,typeof t!="symbol"?t+"":t,r);let Zt=null;const B=class{};ie(B,"create",(e,t,r)=>({name:e,args:t,length:r,currentIndex:-1,stage:ne.init})),ie(B,"get",()=>Zt),ie(B,"set",e=>(Zt=e,e)),ie(B,"drop",()=>{Zt=null}),ie(B,"with",(e,t,r)=>{let n=(...i)=>{n=null;try{B.set(t),B.updateCurrentIndex(t,r);const a=e(...i);return a instanceof Promise?a.then(s=>{t.returned=s}):t.returned=a,a}finally{B.drop()}};return n}),ie(B,"updateStage",(e,t)=>{Object.assign(e,{stage:t})}),ie(B,"updateCurrentIndex",(e,t)=>{Object.assign(e,{currentIndex:t,isFirst:t===0,isEnd:t===e.length-1})});let ae=B;var md=Object.defineProperty,Pd=(e,t,r)=>t in e?md(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$=(e,t,r)=>Pd(e,typeof t!="symbol"?t+"":t,r);class wd{constructor(){$(this,"_hooks"),$(this,"_before"),$(this,"_after"),$(this,"_deprecatedHooks"),$(this,"_deprecatedMessages"),$(this,"hook",(t,r,n={})=>{if(!t||typeof r!="function")return hd;const i=t;let a;for(;this._deprecatedHooks[t];)a=this._deprecatedHooks[t],t=a.to;if(a&&!n.allowDeprecated){let o=a.message;o||(o=`${i} hook has been deprecated${a.to?`, please use ${a.to}`:""}`),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(o)||(console.warn(o),this._deprecatedMessages.add(o))}if(!r.name)try{Object.defineProperty(r,"name",{get:()=>`_${t.replace(/\W+/g,"_")}_hook_cb`,configurable:!0})}catch{}return this._hooks.has(t)||this._hooks.set(t,[]),this._hooks.get(t).push(r),()=>{r&&(this.removeHook(t,r),r=void 0)}}),$(this,"hookOnce",(t,r)=>{let n,i=(...a)=>(n&&n(),n=void 0,i=void 0,r(...a));return n=this.hook(t,i),n}),$(this,"removeHook",(t,r)=>{const n=this._hooks.get(t);if(n){const i=n.indexOf(r);i!==-1&&n.splice(i,1),n.length===0&&this._hooks.delete(t)}}),$(this,"deprecateHook",(t,r)=>{this._deprecatedHooks[t]=typeof r=="string"?{to:r}:r;const n=this._hooks.get(t)||[];this._hooks.delete(t);for(const i of n)this.hook(t,i)}),$(this,"deprecateHooks",t=>{Object.assign(this._deprecatedHooks,t);for(const r in t)this.deprecateHook(r,t[r])}),$(this,"addHooks",t=>{const r=qt(t);let n=Object.keys(r).map(i=>this.hook(i,r[i]));return()=>{for(const i of n)i();n=[]}}),$(this,"removeAllHooks",()=>{this._hooks=new Map}),$(this,"callHookSync",(t,...r)=>this.callHookWith(_d,t,...r)),$(this,"callHook",(t,...r)=>this.callHookWith(vd,t,...r)),$(this,"callHookParallel",(t,...r)=>this.callHookWith(bd,t,...r)),$(this,"callHookWith",(t,r,...n)=>{let i=this._hooks.get(r)||[],a=ae.create(r,n,i.length);ae.set(a),o(ne.before,this._before),ae.updateStage(a,ne.hook);const s=t(r,i.map((l,f)=>ae.with(l,a,f)),n);if(s instanceof Promise)return s.finally(()=>o(ne.after,this._after));return o(ne.after,this._after),s;function o(l,f){if(f){ae.updateStage(a,l);const h=f.length;for(let g=0;g<h;g++)ae.updateCurrentIndex(a,g),f[g](a)}l===ne.after&&u()}function u(){Promise.resolve().finally(()=>{t=null,a=null,i=null})}}),$(this,"beforeEach",t=>(this._before=this._before||[],this._before.push(t),()=>{if(this._before){const r=this._before.indexOf(t);r!==-1&&this._before.splice(r,1)}})),$(this,"afterEach",t=>(this._after=this._after||[],this._after.push(t),()=>{if(this._after){const r=this._after.indexOf(t);r!==-1&&this._after.splice(r,1)}})),$(this,"getContext",t=>ae.get()),this._hooks=new Map,this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.removeHooks=this.removeHooks.bind(this)}removeHooks(t){if(typeof t=="string"&&(t=[t]),Array.isArray(t)){t.forEach(n=>this._hooks.delete(n));return}const r=qt(t);for(const n in r)this.removeHook(n,r[n])}}class Td extends wd{constructor(){super();c(this,"hookScope",(r,n)=>{const i=this.hook(r,n);return sr(i),i})}}var _e=(e=>(e.forward="forward",e.backward="backward",e.unchanged="unchanged",e))(_e||{});const Qt=Symbol("router"),Me=Symbol("details changed flag"),Ai=Symbol("details record");function mi(){const e=Ti(),t=d.inject(Ai),{getDetails:r,makeDetails:n}=e.getPlugin(Qt),{fullPath:i}=V.useRoute(),a=d.shallowReactive(n(r(i)));return d.watch(t,s=>{const o=s[i];o&&o[Me]!==a[Me]&&I(a,o)}),d.shallowReadonly(a)}function Rd(e){const t=mi();let r=new Map;const n=d.watch(()=>t,a=>{var s,o,u;r&&a.from&&((s=r.get(a.from.path))==null||s.forEach(l=>l(a.data,a)),(o=r.get(a.from.fullPath))==null||o.forEach(l=>l(a.data,a)),(u=r.get(a.from.name))==null||u.forEach(l=>l(a.data,a)))},{deep:!0});function i(){r&&(n(),r.clear(),r=null,e())}return{set(a,s){r&&G(s)&&(r.has(a)||r.set(a,[]),r.get(a).push(s))},delete(a,s){if(r&&r.has(a)){const o=r.get(a),u=o.indexOf(s);u>-1&&o.splice(u,1),o.length||r.delete(a)}r&&!r.size&&i()}}}const Fe=Symbol("details watcher key");function Sd(e,t){const r=d.getCurrentInstance();if(r||Q.error("watchDetails() 必须在组件 setup() 作用域内调用!"),!r||!r.proxy)return()=>{};const n=r.proxy;n[Fe]||(n[Fe]=Rd(()=>{n[Fe]=null}));const i=n[Fe];i.set(e,t);const a=()=>i.delete(e,t);return d.onBeforeUnmount(a),a}const it=Symbol("details data"),$d=({latestPosition:e,currentPosition:t})=>e==null||t==null?"forward":t<e?"backward":t===e?"unchanged":"forward";class Pi{constructor(t={}){c(this,"id",Qt);c(this,"latestPosition",null);c(this,"_detailsRecord");c(this,"_isNavigating",d.ref(!1));c(this,"_onceLocked",!1);c(this,"_detailsData",it);c(this,"_setDetailsData",t=>{this._detailsData=t});c(this,"_consumeDetailsData",()=>{const t=this._detailsData!==it,r=t?this._detailsData:void 0;return{isChanged:t,data:r}});c(this,"getDetails",t=>this._detailsRecord.value[t]);c(this,"clearDetailsRecord",()=>{this._updateDetailsRecord({})});c(this,"makeDetails",(t,r=!1)=>{const n=t&&t[Me]||0,i=I({from:void 0,data:void 0,[Me]:n},t);return i.from&&(i.from=Object.freeze(Ut(i.from,["path","name","fullPath","hash"]))),r&&i[Me]++,i});c(this,"getCurrentPosition",()=>{var t;return(t=history.state)==null?void 0:t.position});c(this,"install",t=>{const{app:r,router:n}=t;r.provide(Ai,this._detailsRecord),n.beforeEach(()=>{this._isNavigating.value=!0}),n.afterEach(()=>{this._isNavigating.value=!1}),Object.defineProperty(n,"isNavigating",{enumerable:!0,get:()=>this._isNavigating.value}),n.afterEach((o,u,l)=>{if(V.isNavigationFailure(l))return;const f=this.latestPosition??this.getCurrentPosition(),h=this.getCurrentPosition(),g=this.identifyDirection({to:o,from:u,latestPosition:f,currentPosition:h});switch(g){case"backward":t.callHookSync("sdk:router:backward",o,u);break;case"unchanged":t.callHookSync("sdk:router:replace",o,u);break;default:t.callHookSync("sdk:router:forward",o,u);break}t.callHookSync("sdk:router:navigate",g,o,u),this.latestPosition=h}),n.beforeOnce=o=>n.beforeEach((...u)=>{if(!this._onceLocked)return this._onceLocked=!0,o(...u)}),n.afterEach(()=>{this._onceLocked=!1});const{_setDetailsData:i,_consumeDetailsData:a}=this;n.pushWithData=function(o,u){return i(u),n.push(o)},n.replaceWithData=function(o,u){return i(u),n.replace(o)},n.goWithData=function(o,u){return i(u),n.go(o)},n.forwardWithData=function(o){return n.goWithData(1,o)},n.backWithData=function(o){return n.goWithData(-1,o)},n.clearDetailsRecord=this.clearDetailsRecord,t.hook("sdk:router:navigate",(o,u,l)=>{const f=this._detailsRecord.value,{isChanged:h,data:g}=a(),_=()=>{f[u.fullPath]=this.makeDetails(I({},f[u.fullPath],{from:l,data:g}),!0)};switch(o){case"unchanged":h&&_();break;case"backward":delete f[l.fullPath],h&&_();break;default:_();break}this._updateDetailsRecord(f),i(it)}),t.hook("sdk:cleanup",this.clearDetailsRecord);const s=d.watch(this._detailsRecord,o=>t.callHookSync("sdk:router:detailsRecordChange",o));return()=>{this.latestPosition=null,this._onceLocked=!1,this._detailsData=it,s()}});this.options=t;const{persistentDetails:r=!0,storage:n,storageKey:i="__VUE_APP_SDK__ROUTE_DETAILS_RECORD__",window:a}=t;this._detailsRecord=zt({persistent:r,window:a,storage:n,storageKey:i,shallow:!0,value:{}},!0)}get identifyDirection(){return this.options.identifyDirection||$d}_updateDetailsRecord(t){this._detailsRecord.value=t,this._detailsRecord.value===t&&d.triggerRef(this._detailsRecord)}}const wi=Symbol("Vue App"),Xt=Symbol("App SDK");function Ti(){return d.inject(Xt)}class Ri extends Td{constructor(r={}){super();c(this,"isInitialed",!1);c(this,"app");c(this,"router");c(this,"_plugins",[]);c(this,"_builtinPlugins",[]);c(this,"use",r=>{const n=this._plugins.findIndex(i=>i.id===r.id);return n>-1&&(Q.warn(`插件 "${r.id}" 已注册,将被覆盖!`),this._plugins.splice(n,1)),this._plugins.push(r),this});c(this,"getPlugin",r=>this._allPlugins.find(n=>n.id===r));c(this,"getPlugins",(...r)=>r.map(n=>this.getPlugin(n)));c(this,"cleanup",()=>{this.callHookSync("sdk:cleanup")});c(this,"_installPlugins",()=>{this._uninstallPlugins(),this._allPlugins.forEach(r=>{var i;const n=r.install(this);r._un=n||((i=r.uninstall)==null?void 0:i.bind(r,this))})});c(this,"_uninstallPlugins",()=>{this._allPlugins.forEach(r=>{var n;(n=r._un)==null||n.call(r),r._un=void 0})});c(this,"init",r=>{if(this.isInitialed)return;this.isInitialed=!0;const{unmount:n}=r;r.unmount=(...s)=>(this.destroy(),n(...s));const i=r.config.globalProperties,a=i.$router;if(!a)throw new Error(Q.format("请先安装 vue-router!"));this.app=r,this.router=a,i.$appSDK=this,r.provide(wi,r),r.provide(Xt,this),this._installPlugins()});c(this,"destroy",()=>{this.cleanup(),this._uninstallPlugins(),this.removeAllHooks(),this._plugins.length=0,this.app=void 0,this.router=void 0,this.isInitialed=!1});c(this,"install",r=>{this.init(r)});this.options=r,this._builtinPlugins=[new Pi(this.options.router)]}get plugins(){return this._plugins}get _allPlugins(){return[...this._builtinPlugins,...this._plugins]}}function Ed(e={}){return new Ri(e)}const er=Symbol("animation");class Si{constructor(t={}){c(this,"id",er);c(this,"_isAutoEnabled",!0);c(this,"_isEnabled",d.ref(!0));c(this,"_animationName",d.ref(this.forwardName));c(this,"setAutoEnabled",t=>{this._isAutoEnabled=t});c(this,"setEnabled",t=>{this._isEnabled.value=t});c(this,"enable",()=>{this.setEnabled(!0)});c(this,"disable",()=>{this.setEnabled(!1)});c(this,"install",t=>(t.hook("sdk:router:navigate",r=>{this._animationName.value=r===_e.backward?this.backwardName:this.forwardName,this._isAutoEnabled&&d.nextTick(()=>this.enable())}),()=>{this._isAutoEnabled=!0,this._isEnabled.value=!0,this._animationName.value=this.forwardName}));this.options=t}get isAutoEnabled(){return this._isAutoEnabled}get isEnabled(){return this._isEnabled.value}get name(){return this.isEnabled?this._animationName.value:void 0}get forwardName(){return d.toValue(this.options.forwardName)||"forward"}get backwardName(){return d.toValue(this.options.backwardName)||"backward"}}function Od(e){return new Si(e)}const $i=Symbol("auth");class Ei{constructor(t={}){c(this,"id",$i);c(this,"directive");c(this,"_list",d.ref([]));c(this,"_allowTip",!0);c(this,"empower",t=>{this._list.value=t,this._allowTip&&(this._allowTip=!1)});c(this,"verify",(t,r="or")=>{if(this.list==="*")return!0;if(t=ec(t),t.length===0)return!1;this.list.length===0&&this._allowTip&&Q.warn("暂未设置授权列表!");const n=new Set(this.list);return t[r==="and"?"every":"some"](n.has.bind(n))});c(this,"install",t=>{const{directiveName:r="auth"}=this.options;t.app.directive(r,this.directive),t.hook("sdk:cleanup",()=>this.empower([]))});this.options=t;const r=this;this.directive={mounted(n,i){const{value:a,arg:s}=i;r.verify(a,s)||n.remove()}}}get list(){return this._list.value}}function xd(e={}){return new Ei(e)}const tr=Symbol("keep alive"),at={add:()=>!0,remove:()=>!0};class Oi{constructor(t={}){c(this,"id",tr);c(this,"_values",d.shallowRef(new Set));c(this,"_isAuto");c(this,"_staleTimer",null);c(this,"_timeRecord",{});c(this,"_updateTime",t=>{this._timeRecord[t]=Date.now()});c(this,"_removeTime",t=>{delete this._timeRecord[t]});c(this,"startStaleTimer",()=>{const{staleTime:t}=this.options;if(typeof t!="number")throw new Error("staleTime must be a number");t<=0||(this.stopStaleTimer(),this.clearExpired(),this._staleTimer=setTimeout(this.startStaleTimer,t))});c(this,"stopStaleTimer",()=>{this._staleTimer&&(clearTimeout(this._staleTimer),this._staleTimer=null)});c(this,"clearExpired",()=>{const{staleTime:t}=this.options;if(typeof t!="number"||t<=0)return;const r={},n=[];Object.entries(this._timeRecord).forEach(([i,a])=>{Date.now()-a<t?n.push(i):r[i]=a}),this._timeRecord=r,this.set(n)});c(this,"toggleAuto",(t=!this._isAuto.value)=>(this._isAuto.value=t,t));c(this,"enableAuto",()=>this.toggleAuto(!0));c(this,"disableAuto",()=>this.toggleAuto(!1));c(this,"clear",()=>{this.set([])});c(this,"set",t=>{this._values.value=new Set(t)});c(this,"install",t=>{const r=fi(()=>{t.hook("sdk:router:navigate",async(i,a,s)=>{if(this.isAuto){if(i===_e.backward){const o=s.matched.filter(u=>!a.matched.includes(u));await Promise.all(o.map(this.remove))}await Promise.all(a.matched.map(this.add))}})}),n=d.watch(this._isAuto,i=>{i&&(d.nextTick(()=>n()),r())},{immediate:!0});return t.hook("sdk:cleanup",this.clear),()=>{n(),this.stopStaleTimer()}});this.options=t;const{autoCollectAndClean:r=!0}=t;this._isAuto=d.ref(d.toValue(r)),(d.isRef(r)||G(r))&&d.watch(r,this.toggleAuto),this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.refresh=this.refresh.bind(this),t.staleTime!=null&&this.startStaleTimer()}get values(){return[...this._values.value]}get isAuto(){return this._isAuto.value}add(t){if(!t)return;const r=this._values.value;if(M(t))r.has(t)||(r.add(t),this._updateTime(t),this.set(this.values));else if("components"in t){const{beforeRouteAdd:n=at.add}=this.options;return Promise.resolve(n(t)).then(i=>{if(i)return Ce(t).then(this.add)})}else if("matched"in t)return this.add(t.matched.at(-1))}remove(t){if(!t)return;const r=this._values.value;if(M(t))r.has(t)&&(r.delete(t),this._removeTime(t),this.set(this.values));else if("components"in t){const n=this.options.beforeRouteRemove||at.remove;return Promise.resolve(n(t)).then(i=>{if(i)return Ce(t).then(this.remove)})}else if("matched"in t)return this.remove(t.matched.at(-1))}refresh(t){if(t){if(M(t))this.remove(t),d.nextTick(()=>{this.add(t)});else if("components"in t){const{beforeRouteAdd:r=at.add,beforeRouteRemove:n=at.remove}=this.options;return Promise.all([r(t),n(t)]).then(i=>i.every(Boolean)).then(i=>{if(i)return Ce(t).then(this.refresh)})}else if("matched"in t)return this.refresh(t.matched.at(-1))}}}function Id(e={}){return new Oi(e)}const xi=Symbol("page"),Ii=Symbol("reset flag"),Ld=e=>e,Dd=e=>!!e.link,Ne={key:"id",parentKey:"parentId",childrenKey:"children"};class Li{constructor(t){c(this,"id",xi);c(this,"_sdk");c(this,"_removeRouteFns",[]);c(this,"openedWindow",null);c(this,"resetRoutes",()=>{this._removeRouteFns.splice(0).forEach(t=>t(Ii))});c(this,"getPageMetadata",t=>{const r=t.meta||t||{};return I({},r._metadata)});c(this,"toFlattenPages",(t,r={})=>{const{childrenKey:n=Ne.childrenKey,clone:i,calibrate:a,completePath:s}=r;i&&(t=tt(t));let o=id(t,{childrenKey:n,dropKeys:[n]});return a&&(o=o.map(this.calibrateMetadata)),s&&(this.toTreePages(o,{strict:!1,clone:!1,calibrate:!1,completePath:!0}),o.forEach(u=>{delete u.children})),o});c(this,"toTreePages",(t,r={})=>{const{strict:n=!1,clone:i,calibrate:a,completePath:s}=r;let o=t;i&&(o=tt(o)),a&&(o=o.map(this.calibrateMetadata));const u=nd(o,{strict:n,orderBy:["index","asc"],removeEmptyChildrenKey:!0,...Ne});if(s){u.forEach(h=>{h.path.startsWith("/")||(h.path=`/${h.path}`)});const l=Bt(o,{primaryKey:"id",useMap:!1});V.createRouter({history:V.createWebHistory("/"),routes:vi(u,h=>({name:h.name,path:h.path,children:h.children,meta:{_metadata:h}}))}).getRoutes().forEach(h=>{l[this.getPageMetadata(h).id].path=h.path})}return u});c(this,"toMenus",(t,r)=>this.toTreePages(t.filter(n=>n.isMenu),{strict:r,clone:!0,calibrate:!1,completePath:!1}));c(this,"canVisitPage",(t,r,n)=>{if(r==="*")return!0;const i=t.roleList||[];return n&&(r.length===0||i.length===0)?!1:i==="*"||i.some(a=>r.includes(a))});c(this,"filterVisitPages",(t,r,n)=>r==="*"?t:n&&r.length===0?[]:t.filter(i=>this.canVisitPage(i,r,n)));c(this,"createStates",(t,r)=>{const{format:n,childrenKey:i=Ne.childrenKey,strict:a=!1,roleList:s=[],strictVisit:o=!0,childrenFirst:u=!0,completePath:l=!0,resolveActiveMenu:f=L=>{const W=this.getPageMetadata(L);return W.activeMenu||W.name||""}}=r,h=()=>h.id;h.id=-1;const g=[],_=L=>{const W=Xe(L,h);return g.push(W),W},b=_(()=>{if(d.toValue(n)==="tree")return this.toFlattenPages(d.toValue(t),{childrenKey:i,clone:!0,calibrate:!0,completePath:d.toValue(l)});const L=tt(d.toValue(t)).map(this.calibrateMetadata);return d.toValue(l)&&(this.toTreePages(L,{strict:!1,clone:!1,calibrate:!1,completePath:!0}),L.forEach(W=>{delete W.children})),L}),A=_(()=>this.toTreePages(b(),{strict:d.toValue(a),clone:!0,calibrate:!1,completePath:!1})),v=_(()=>{if(!d.toValue(u)){const D=this.filterVisitPages(b(),d.toValue(s),d.toValue(o));return this.toTreePages(D,{strict:d.toValue(a),clone:!0,calibrate:!1,completePath:!1})}const L=tt(A()),W=new Map,nr=D=>{const{id:oe}=D,ar=W.get(oe);if(ar!=null)return ar;const Vi=this.canVisitPage(D,d.toValue(s),d.toValue(o));return W.set(oe,Vi),Vi},ir=D=>{const oe=D.children||[];return oe.length===0?nr(D):!!td(oe,nr)};return vi(L.filter(ir),D=>(D.children&&(D.children=D.children.filter(ir),D.children.length===0&&d.toValue(a)&&delete D.children),D))}),y=_(()=>this.toFlattenPages(v(),{childrenKey:Ne.childrenKey,clone:!0,calibrate:!1,completePath:!1})),m=_(()=>Bt(y(),{primaryKey:"id",useMap:!1})),T=_(()=>{const L={};return gi(v(),(W,nr,ir,D,oe)=>{L[W.id]=oe},{childrenKey:Ne.childrenKey}),L}),O=_(()=>this.toMenus(y(),d.toValue(a))),x=d.shallowRef([]),se=d.shallowRef([]),X=d.shallowRef([]),K=d.shallowRef([]),je=d.shallowRef([]),P=d.shallowRef({}),E=d.shallowRef({}),N=this._sdk.router,Bd=d.computed(()=>{const L=N.currentRoute.value;return f(L,{flattenPages:x.value,treePages:se.value,visitablePages:X.value,visitableTreePages:K.value,visitableMenus:je.value,visitablePageMap:P.value,visitableTreeLinkMap:E.value})});d.isRef(t)||G(t)?d.watch(t,Hi,{immediate:!0,flush:"sync",deep:!0}):Hi();function Hi(){g.forEach(L=>L.cache.delete(h.id++)),x.value=b(),se.value=A(),X.value=y(),K.value=v(),je.value=O(),P.value=m(),E.value=T()}return{flattenPages:x,treePages:se,visitableTreePages:K,visitablePages:X,visitablePageMap:P,visitableTreeLinkMap:E,visitableMenus:je,activeMenu:Bd}});c(this,"pageToRoute",(t,r={},n=!0)=>{let i=t.file?this.options.resolveComponent(t.file,t):void 0;return i&&n&&(i=Yt(i,n===!0?t.name:Ht(n)(t.name,t))),{...r,path:t.path,name:t.name,component:i,redirect:t.redirect?{name:t.redirect}:void 0,meta:I({},r.meta,{_metadata:t})}});c(this,"resolveLink",(t,r=!1)=>{if(t.link===!0||r){const{router:n}=this._sdk,i={},a={};return t.routeQuery&&I(i,M(t.routeQuery)?ge(t.routeQuery):t.routeQuery),t.routeParams&&I(a,M(t.routeParams)?ge(t.routeParams):t.routeParams),n.resolve({name:t.name,query:i,params:a}).href}return t.link||""});c(this,"handleMenuClick",(t,r=this.options.linkSingleWindow)=>{const{router:n,getPlugin:i}=this._sdk,a={},s={};t.routeQuery&&I(a,M(t.routeQuery)?ge(t.routeQuery):t.routeQuery),t.routeParams&&I(s,M(t.routeParams)?ge(t.routeParams):t.routeParams);const o={name:t.name,query:a,params:s};if(this.allowLink(t)){const u=this.openedWindow&&!this.openedWindow.closed,l=r&&u?this.openedWindow:window,f=this.resolveLink(t);r&&this.openedWindow&&!this.openedWindow.closed?this.openedWindow.location.replace(f):this.openedWindow=l.open(f,"_blank");return}if(t.file||t.redirect)if(d.toValue(this.options.isMobile)){const u=i(er);u&&u.disable(),n.replace(o)}else n.push(o)});this.options=t}get calibrateMetadata(){return this.options.calibrateMetadata||Ld}get allowLink(){return this.options.allowLink||Dd}install(t){this._sdk=t;const{router:r}=t,{_removeRouteFns:n}=this,{addRoute:i}=r;return r.addRoute=function(...a){const s=i.apply(this,a);function o(u){if(u!==Ii){const l=n.indexOf(o);l>-1&&n.splice(l,1)}return s()}return n.push(o),o},()=>{n.length=0}}}function Cd(e){let t=1;return gi(e,(r,n,i,a,s)=>{var o;(o=r.children)!=null&&o.length||s.forEach((u,l)=>{u.id==null&&l===0?u.id=String(t++):l>0&&(u.id??(u.id=String(t++)),u.parentId??(u.parentId=s[l-1].id))})}),e}function Di(e){return function(r="",n=""){if(M(r)||!r)return r;if(!n){let i=d.toValue(e);if(F(i)&&"global"in i){Q.warn("localeGetter 后续将不再支持 i18n 实例,请使用 MaybeRefOrGetter<string> 类型值替代!");const a=i;i=a.mode==="legacy"?a.global.locale:a.global.locale.value}n=i}return r[n]}}const Md=Di;function Fd(e){return new Li(e)}const Ci=Symbol("router scroller");class Mi{constructor(t){c(this,"id",Ci);c(this,"_sdk");c(this,"positions",new Map);c(this,"_isAuto");c(this,"toggleAuto",(t=!this._isAuto.value)=>(this._isAuto.value=t,t));c(this,"enableAuto",()=>this.toggleAuto(!0));c(this,"disableAuto",()=>this.toggleAuto(!1));c(this,"trigger",()=>{const{router:t}=this._sdk,r=t.currentRoute.value,n=r.fullPath;return this.applyPositions(r,r,this.positions.get(n),_e.unchanged,!0)});c(this,"querySelector",t=>{if(!(typeof window>"u"))return t==="body"?document.body:t==="window"?window:document.querySelector(t)});c(this,"getScrollPosition",t=>t instanceof Window?{left:window.scrollX,top:window.scrollY}:{left:t.scrollLeft,top:t.scrollTop});c(this,"capturePositions",()=>{const t={};for(const[r]of Object.entries(this.options.selectors)){const n=this.querySelector(r);n&&(t[r]=this.getScrollPosition(n))}return t});c(this,"applyPositions",async(t,r,n,i,a=!1)=>{for(const[s,o]of Object.entries(this.options.selectors)){const u=this.querySelector(s);if(!u)continue;let l=n==null?void 0:n[s];if(G(o)){const f=await o({to:t,from:r,element:u,selector:s,direction:i,savedPosition:l,isManual:a});if(!f)continue;f!==!0&&(l=f)}else o===!0&&this.options.scrollOnlyBackward&&i!==_e.backward&&(l=void 0);u.scrollTo({behavior:this.options.behavior,...l||{top:0,left:0}})}});c(this,"install",t=>{this._sdk=t;const{router:r}=t;r.options.scrollBehavior&&Q.warn('"scrollBehavior" options in Vue Router is overwritten by "RouterScroller" plugin, you can remove it from "createRouter()".'),r.options.scrollBehavior=()=>{},r.beforeResolve((n,i)=>{var s;if(((s=history.state)==null?void 0:s.current)===n.fullPath||!this.isAuto)return;const a=this.capturePositions();this.positions.set(i.fullPath,a)}),t.hook("sdk:router:navigate",(n,i,a)=>{if(!this.isAuto)return;const s=this.positions.get(i.fullPath);d.nextTick(()=>this.applyPositions(i,a,s,n,!1))}),t.hook("sdk:cleanup",()=>this.positions.clear())});this.options=t;const{autoCollect:r=!0}=t;this._isAuto=d.ref(d.toValue(r)),(d.isRef(r)||G(r))&&d.watch(r,this.toggleAuto)}get isAuto(){return this._isAuto.value}}function Nd(e){return new Mi(e)}const Fi=Symbol("sso"),Ni="normal";class ji{constructor(t){c(this,"id",Fi);c(this,"_verifyParams");c(this,"_normalizeParams",t=>t.map(r=>({required:!0,...M(r)?{name:r}:r})));c(this,"_getHashWithoutParams",()=>{const t=location.hash;return t.slice(0,t.indexOf("?"))});c(this,"_verifyGroupParams",(t,r)=>r.every(({name:n,required:i})=>i?n in t.query:!0));c(this,"isFromSSO",t=>Object.values(this._verifyParams).some(r=>this._verifyGroupParams(t,r)));c(this,"getVerifyParams",t=>{const r={};for(const[n,i]of Object.entries(this._verifyParams))if(this._verifyGroupParams(t,i)){for(const{name:a}of i)a in t.query&&(r[a]=t.query[a]);return[n,r]}return[Ni,r]});c(this,"omitVerifyParams",(t,r)=>Wh(t,Object.keys(r||{})));c(this,"gotoSSO",()=>{const t=[location.origin,location.pathname,this._getHashWithoutParams()].filter(Boolean).join("");location.replace(this.options.resolveSSOUri(t))});c(this,"install",()=>{});this.options=t;const{verifyParams:r}=t;S(r)?this._verifyParams={[Ni]:this._normalizeParams(r)}:this._verifyParams=Object.fromEntries(Object.entries(r).map(([n,i])=>[n,this._normalizeParams(i)]))}}function jd(e){return new ji(e)}var Gi=(e=>(e.replace="replace",e.open="open",e.cancel="cancel",e))(Gi||{});const Ki=Symbol("tabs");function ve(e){return e.meta._metadata||{}}const Gd=e=>({...e,pageId:e.id}),Kd=()=>!0,Wi=["isAffix","isUniq","isKeepAlive","title","icon","fullPath"],Wd=[...Wi,"fullPath"],rr={add:()=>!0,remove:()=>!0,replace:()=>"replace"};class ki{constructor(t={}){c(this,"id",Ki);c(this,"_sdk");c(this,"_state");c(this,"_isAuto");c(this,"toggleAuto",(t=!this._isAuto.value)=>(this._isAuto.value=t,t));c(this,"enableAuto",()=>this.toggleAuto(!0));c(this,"disableAuto",()=>this.toggleAuto(!1));c(this,"updateKeepAlive",async()=>{if(!this._keepAlive)return;const t=this._routes,r=new Set;for(const n of this.pages){if(!this.isKeepAlive(n))continue;const i=t.find(s=>ve(s).id===n.pageId),a=await Ce(i);a&&(r.add(a),n.componentName!==a&&(n.componentName=a))}this._keepAlive.set([...r])});c(this,"setTabPages",t=>{this.pages=t,this.updateKeepAlive()});c(this,"_resolveFullPath",t=>{const{router:r}=this._sdk,n={},i={};return t.routeQuery&&I(n,M(t.routeQuery)?ge(t.routeQuery):t.routeQuery),t.routeParams&&I(i,M(t.routeParams)?ge(t.routeParams):t.routeParams),r.resolve({name:t.name,query:n,params:i}).fullPath});c(this,"setAffixTabPagesByRawPages",t=>{const r=[];t.forEach(n=>{!this.isValidRawPage(n)||!this.rawPageToTabPage(n).isAffix||r.push(this.createTabPage({fullPath:this._resolveFullPath(n),meta:{_metadata:n}}))}),this.setTabPages(r)});c(this,"updateTabPage",(t,r)=>{const n=this.resolveId(t),i=this.pages.find(a=>a.id===n);if(i){const a=r.fullPath&&i.fullPath!==r.fullPath&&!i.isUniq;I(i,Ut(r,Wd)),a&&(I(i,{id:this.generateID(i)}),this._keepAlive&&i.componentName&&this._keepAlive.remove(i.componentName),n===this.active&&this._setActive(i.id))}});c(this,"updateFullPath",(t={},r=this.active)=>{const n=this.resolveId(r),i=this.pages.find(o=>o.id===n);if(!i)return;const a=this._sdk.router,{fullPath:s}=a.resolve({name:i.name,...t});this.updateTabPage(i,{fullPath:s})});c(this,"updateTabPagesByRawPages",t=>{const r=S(t)?Bt(t,{primaryKey:"id",useMap:!1}):t;this.pages.forEach(n=>{const i=r[n.pageId];i&&I(n,Ut(this.rawPageToTabPage(i),Wi))})});c(this,"resolveId",t=>{var r;return t==null?"":typeof t=="number"?((r=this.pages[t])==null?void 0:r.id)||"":typeof t=="string"?t:"pageId"in t?t.id:"fullPath"in t&&"meta"in t?this.generateID(t):(Q.warn("无效参数:",t),"")});c(this,"_setActive",t=>{const r=this.resolveId(t);return r===this.active?!1:(this.active=r,!0)});c(this,"setActive",t=>{if(!this._setActive(t))return;if(this.active===""){const{processEmptyActive:i=Sr}=this.options;i();return}const r=this._sdk.router,n=this.activeTabPage;n&&r.currentRoute.value.fullPath!==n.fullPath?r.push(n.fullPath):n||Q.warn("未知的标签页来源:",t)});c(this,"createTabPage",t=>{const r=ve(t);return{...this.rawPageToTabPage(r),id:this.generateID(t),fullPath:t.fullPath}});c(this,"canRemove",(t=this.active)=>{const r=this.resolveId(t);if(!r)return!1;const n=this.pages.find(i=>i.id===r);return n?!n.isAffix:!0});c(this,"canRemoveOther",(t=this.active)=>{const r=this.resolveId(t);return!!r&&this.pages.some(n=>!n.isAffix&&n.id!==r)});c(this,"canRemoveSide",(t,r=this.active)=>{const n=this.resolveId(r);if(!n)return!1;const i=t==="left",a=this.pages.findIndex(o=>o.id===n),s=this.pages.slice(i?0:a+1,i?a:void 0).filter(o=>!o.isAffix);return s.length>0&&s.some(o=>!o.isAffix)});c(this,"canRemoveAll",()=>this.pages.some(t=>!t.isAffix));c(this,"tryRemoveTabPages",async t=>{let r=t.length>0;const{beforeRemove:n=rr.remove}=this.options;for(const i of t)if(r=!!await n(i),!r)break;return r});c(this,"removeActive",()=>this.removeOne(this.active));c(this,"removeOne",async t=>{const r=this.resolveId(t),n=this.pages.findIndex(u=>u.id===r);if(n===-1||this.pages[n].isAffix)return!0;if(!await this.tryRemoveTabPages([this.pages[n]]))return!1;const a=r===this.active,s=a?this.pages[n-1]||this.pages[n+1]:null;a&&this.setActive(s);const{componentName:o}=this.pages.splice(n,1)[0];return this._keepAlive&&o&&this._keepAlive.remove(o),!0});c(this,"removeSide",async(t,r=this.active)=>{const n=t==="left",i=this.resolveId(r);let a=!1;if(i&&i!==this.active){const l=this.pages.findIndex(h=>h.id===i),f=this.pages.findIndex(h=>h.id===this.active);a=n?f<l:f>l}const s=i?this.pages.findIndex(l=>l.id===i):-1,o=this.pages.slice(n?0:s+1,n?s:void 0).filter(l=>!l.isAffix);await this.tryRemoveTabPages(o)&&(a&&this.setActive(s),this.setTabPages(this.pages.filter((l,f)=>l.isAffix||(n?f>=s:f<=s))))});c(this,"removeOther",async(t=this.active)=>{const r=this.resolveId(t);if(!r)return;const n=this.pages.filter(a=>!a.isAffix&&a.id!==r);await this.tryRemoveTabPages(n)&&(r!==this.active&&this.setActive(r),this.setTabPages(this.pages.filter(a=>a.isAffix||a.id===r)))});c(this,"removeAll",async(t=!1)=>{if(!t){const n=this.pages.filter(a=>!a.isAffix);if(!await this.tryRemoveTabPages(n))return}const r=t?[]:this.pages.filter(n=>n.isAffix);this.setActive(r[0]),this.setTabPages(r)});c(this,"matchSameTabPage",t=>{const r=[];let n;return this.pages.forEach(i=>{i.pageId===t.pageId&&(r.push(i),!n&&i.fullPath===t.fullPath&&(n=i))}),{fuzzy:r,exact:n}});c(this,"addOne",async t=>{const r=ve(t);if(!this.isValidRawPage(r))return;const n=this.createTabPage(t),{fuzzy:i,exact:a}=this.matchSameTabPage(n),s=n.isUniq?i.length>0:!!a;if(!s){const{beforeAdd:o=rr.add}=this.options;if(!await o(r))return;const u=this._routes.find(l=>ve(l).id===n.pageId);u&&(n.componentName=await Ce(u)),this.pages.push(n)}if(this.setActive(n),!s&&this.isKeepAlive(n)&&this._keepAlive)if(t.matched)t.matched.forEach(this._keepAlive.add);else{const o=this._routes.find(u=>ve(u).id===n.pageId);o&&this._keepAlive.add(o)}});c(this,"install",t=>{this._sdk=t;const{router:r}=t,n=fi(()=>{t.hook("sdk:router:backward",(a,s)=>{this.removeOne(s)}),r.beforeResolve(async a=>{if(!this.isAuto||!a.meta._metadata||!this.isValidRawPage(a.meta._metadata))return;const s=t.hookOnce("sdk:router:navigate",(f,h)=>{this.isAuto&&this.addOne(h)});if(this.options.mode!=="replace")return;const o=this.createTabPage(a),{fuzzy:u,exact:l}=this.matchSameTabPage(o);if(u.length===1&&!l){const f=u[0],{beforeReplace:h=rr.replace}=this.options;switch(await h(o,f)){case"cancel":return s(),!1;case"open":return;default:this.updateTabPage(f,o),this.setActive(o),s();break}}})}),i=d.watch(this._isAuto,a=>{a&&(d.nextTick(()=>i()),n())},{immediate:!0});return t.hook("sdk:cleanup",()=>this.removeAll(!0)),()=>{i()}});this.options=t;const{autoCollect:r=!0,persistent:n=!0,window:i,storage:a,storageKey:s="__VUE_APP_SDK__TABS__"}=t;this._isAuto=d.ref(d.toValue(r)),(d.isRef(r)||G(r))&&d.watch(r,this.toggleAuto),this._state=zt({persistent:n,window:i,storage:a,storageKey:s,value:{pages:[],active:""}})}get rawPageToTabPage(){return this.options.rawPageToTabPage||Gd}get isValidRawPage(){return this.options.isValidRawPage||Kd}set pages(t){this._state.value.pages=t}get pages(){return this._state.value.pages}set active(t){this._state.value.active=t}get active(){return this._state.value.active}get activeTabPage(){return this.pages.find(t=>t.id===this.active)}get isAuto(){return this._isAuto.value}get _keepAlive(){const t=this._sdk.getPlugin(tr);return t&&t.isAuto&&t.disableAuto(),t}get _routes(){return this._sdk.router.getRoutes()}isKeepAlive(t){return t.isKeepAlive??this.options.keepAlive??!0}generateID(t){let r,n,i;if("meta"in t){const s=ve(t);r=s.id,i=s.isUniq,n=t.fullPath}else r=t.pageId,i=t.isUniq,n=t.fullPath;let a=`${r}`;return i||(a+=`__${n}`),a}}function kd(e={}){return new ki(e)}const Ui=Symbol("token");function Bi(){return{accessToken:{},refreshToken:{}}}class H{constructor(t={}){c(this,"id",Ui);c(this,"_state");c(this,"_tokenProfile",{});c(this,"has",(t,r=H.defaultKey)=>!!this.get(t,r));c(this,"get",(t,r=H.defaultKey)=>this._state.value[t][r]);c(this,"clear",(t,r=H.defaultKey)=>{t?r?this.set(t,"",r):this._state.value[t]={}:this._state.value=Bi()});c(this,"toJWT",(t,r=H.defaultKey)=>(t==null&&(t=this.getTokenProfile(r).jwtPrefix),[t,this.get("accessToken",r)].filter(Boolean).join(" ")));c(this,"resolve",(t=H.defaultKey)=>{const r=this.getTokenProfile(t);return d.toValue(r.format)==="jwt"?this.toJWT(r.jwtPrefix,t):this.get("accessToken",t)});c(this,"getTokenProfile",(t=H.defaultKey)=>Object.assign({format:"normal",jwtPrefix:"Bearer"},this.options,this._tokenProfile[t]));c(this,"install",t=>{t.hook("sdk:cleanup",this.clear)});this.options=t;const{persistent:r=!0,window:n,storage:i,storageKey:a="__VUE_APP_SDK__TOKEN__"}=t;this._state=zt({persistent:r,window:n,storage:i,storageKey:a,value:Bi()}),this.set=this.set.bind(this)}static get defaultKey(){return"__PRIVATE__"}set(...t){if(M(t[0])){const[o,u,...l]=t;t=[{[o]:u},...l]}const[r,n,i]=t,a=(M(n)?n:H.defaultKey)||H.defaultKey,s=M(n)?i:n;Object.entries(r).forEach(([o,u])=>{I(this._state.value[o],{[a]:u})}),this._tokenProfile[a]||(this._tokenProfile[a]={}),I(this._tokenProfile[a],s)}}function Ud(e={}){return new H(e)}p.ANIMATION_ID=er,p.APP_KEY=wi,p.APP_SDK_KEY=Xt,p.AUTH_ID=$i,p.Animation=Si,p.AppSDK=Ri,p.Auth=Ei,p.KEEP_ALIVE_ID=tr,p.KeepAlive=Oi,p.NavigationDirection=_e,p.PAGE_ID=xi,p.Page=Li,p.ROUTER_ID=Qt,p.ROUTER_SCROLLER_ID=Ci,p.Router=Pi,p.RouterScroller=Mi,p.SSO=ji,p.SSO_ID=Fi,p.TABS_ID=Ki,p.TOKEN_ID=Ui,p.Tabs=ki,p.TabsReplaceResult=Gi,p.Token=H,p.createAnimation=Od,p.createAppSDK=Ed,p.createAuth=xd,p.createKeepAlive=Id,p.createLocaleText=Md,p.createPage=Fd,p.createRouterScroller=Nd,p.createSSO=jd,p.createTabs=kd,p.createToken=Ud,p.createTranslator=Di,p.defineStaticPages=Cd,p.useAppSDK=Ti,p.useRouteDetails=mi,p.watchDetails=Sd,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});