@xwiki/cristal-electron-renderer 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/LICENSE +505 -0
- package/dist/Marianne-Bold-CYjThbH0.woff2 +0 -0
- package/dist/Marianne-Bold-u6yfe4-h.woff +0 -0
- package/dist/Marianne-Bold_Italic-BWnPOpjP.woff +0 -0
- package/dist/Marianne-Bold_Italic-BqW9V1Nh.woff2 +0 -0
- package/dist/Marianne-Light-DqWaxKdz.woff +0 -0
- package/dist/Marianne-Light-DsZfzyg9.woff2 +0 -0
- package/dist/Marianne-Light_Italic-BJOCXSxu.woff +0 -0
- package/dist/Marianne-Light_Italic-Yne2G_jl.woff2 +0 -0
- package/dist/Marianne-Medium-CmsIrdJJ.woff +0 -0
- package/dist/Marianne-Medium-DptVAR1p.woff2 +0 -0
- package/dist/Marianne-Medium_Italic-BP8MGzkr.woff +0 -0
- package/dist/Marianne-Medium_Italic-WqZFT7wM.woff2 +0 -0
- package/dist/Marianne-Regular-CaCqrnJM.woff2 +0 -0
- package/dist/Marianne-Regular-DxIeSxmB.woff +0 -0
- package/dist/Marianne-Regular_Italic-BQJsTSNr.woff +0 -0
- package/dist/Marianne-Regular_Italic-DdH8FtNo.woff2 +0 -0
- package/dist/Spectral-ExtraBold-CCzfBm-A.woff2 +0 -0
- package/dist/Spectral-ExtraBold-U325s3c2.woff +0 -0
- package/dist/Spectral-Regular-D0Iocl0n.woff +0 -0
- package/dist/Spectral-Regular-PmBQicsR.woff2 +0 -0
- package/dist/bootstrap-icons-BOrJxbIo.woff +0 -0
- package/dist/bootstrap-icons-BtvjY1KL.woff2 +0 -0
- package/dist/chunk.2Y62WHSU-C8i5cHiy.js +121 -0
- package/dist/chunk.2Y62WHSU-C8i5cHiy.js.map +1 -0
- package/dist/chunk.6DH62NIS-CVBVc-bX.js +684 -0
- package/dist/chunk.6DH62NIS-CVBVc-bX.js.map +1 -0
- package/dist/chunk.GAND2OKP-lICOl7JF.js +89 -0
- package/dist/chunk.GAND2OKP-lICOl7JF.js.map +1 -0
- package/dist/chunk.I6OQK3N3-BBclK2fM.js +117 -0
- package/dist/chunk.I6OQK3N3-BBclK2fM.js.map +1 -0
- package/dist/chunk.KWPBDQ6I-Bf3dc1GJ.js +2 -0
- package/dist/chunk.KWPBDQ6I-Bf3dc1GJ.js.map +1 -0
- package/dist/chunk.LHI6QEL2-DbpPiPxS.js +75 -0
- package/dist/chunk.LHI6QEL2-DbpPiPxS.js.map +1 -0
- package/dist/chunk.MGEAXYVX-o-WC3ZVc.js +77 -0
- package/dist/chunk.MGEAXYVX-o-WC3ZVc.js.map +1 -0
- package/dist/chunk.NYIIDP5N-AHr3eTN0.js +2 -0
- package/dist/chunk.NYIIDP5N-AHr3eTN0.js.map +1 -0
- package/dist/chunk.TUZSOS6C-DxyWSdpL.js +38 -0
- package/dist/chunk.TUZSOS6C-DxyWSdpL.js.map +1 -0
- package/dist/chunk.WJBFYL4X-Cbeo_gEa.js +24 -0
- package/dist/chunk.WJBFYL4X-Cbeo_gEa.js.map +1 -0
- package/dist/chunk.WYDJ5QAQ-C81Elw3D.js +163 -0
- package/dist/chunk.WYDJ5QAQ-C81Elw3D.js.map +1 -0
- package/dist/chunk.XX4STEEY-COEpspdZ.js +455 -0
- package/dist/chunk.XX4STEEY-COEpspdZ.js.map +1 -0
- package/dist/chunk.Z6CYCANS-DF0ctyRp.js +134 -0
- package/dist/chunk.Z6CYCANS-DF0ctyRp.js.map +1 -0
- package/dist/class-map-C3Xk0adH.js +10 -0
- package/dist/class-map-C3Xk0adH.js.map +1 -0
- package/dist/config.json +106 -0
- package/dist/if-defined-DAvNwoU5.js +6 -0
- package/dist/if-defined-DAvNwoU5.js.map +1 -0
- package/dist/index-DK0YwuAW.js +411 -0
- package/dist/index-DK0YwuAW.js.map +1 -0
- package/dist/index-ScDkqPqn.css +28 -0
- package/dist/index.html +13 -0
- package/dist/materialdesignicons-webfont-B7mPwVP_.ttf +0 -0
- package/dist/materialdesignicons-webfont-CSr8KVlo.eot +0 -0
- package/dist/materialdesignicons-webfont-Dp5v-WZN.woff2 +0 -0
- package/dist/materialdesignicons-webfont-PXm3-2wK.woff +0 -0
- package/dist/no-one-Cv0r_Hkg.svg +15 -0
- package/dist/query-D1pSaKds.js +10 -0
- package/dist/query-D1pSaKds.js.map +1 -0
- package/dist/static-CdL8EPVS.js +7 -0
- package/dist/static-CdL8EPVS.js.map +1 -0
- package/dist/staticBuild-BlyaXHUF.css +1 -0
- package/dist/staticBuild-BoKVadnu.js +1063 -0
- package/dist/staticBuild-BoKVadnu.js.map +1 -0
- package/dist/worker-CybHddrE.js +211 -0
- package/dist/worker-CybHddrE.js.map +1 -0
- package/dist/x-alert-7r5rx0d7.js +2 -0
- package/dist/x-alert-7r5rx0d7.js.map +1 -0
- package/dist/x-alert-l0oP9PUN.js +2 -0
- package/dist/x-alert-l0oP9PUN.js.map +1 -0
- package/dist/x-alert-uqeGd1IW.js +2 -0
- package/dist/x-alert-uqeGd1IW.js.map +1 -0
- package/dist/x-avatar-BARZZcgr.js +2 -0
- package/dist/x-avatar-BARZZcgr.js.map +1 -0
- package/dist/x-avatar-CfnVd4CE.css +1 -0
- package/dist/x-avatar-DnbaVGNC.js +2 -0
- package/dist/x-avatar-DnbaVGNC.js.map +1 -0
- package/dist/x-avatar-rzw6K8Wc.js +2 -0
- package/dist/x-avatar-rzw6K8Wc.js.map +1 -0
- package/dist/x-breadcrumb-CzKs24Jh.js +2 -0
- package/dist/x-breadcrumb-CzKs24Jh.js.map +1 -0
- package/dist/x-breadcrumb-VokcqVrB.js +2 -0
- package/dist/x-breadcrumb-VokcqVrB.js.map +1 -0
- package/dist/x-btn-BNO2Vh9q.js +2 -0
- package/dist/x-btn-BNO2Vh9q.js.map +1 -0
- package/dist/x-btn-BeE4ChBm.js +2 -0
- package/dist/x-btn-BeE4ChBm.js.map +1 -0
- package/dist/x-btn-D2HJcK1C.css +1 -0
- package/dist/x-btn-DOkDF37q.js +2 -0
- package/dist/x-btn-DOkDF37q.js.map +1 -0
- package/dist/x-card-BzquGj3n.js +2 -0
- package/dist/x-card-BzquGj3n.js.map +1 -0
- package/dist/x-card-D6loY5Bx.js +2 -0
- package/dist/x-card-D6loY5Bx.js.map +1 -0
- package/dist/x-card-D_W5kTzv.js +2 -0
- package/dist/x-card-D_W5kTzv.js.map +1 -0
- package/dist/x-col-B5OPXPr8.js +2 -0
- package/dist/x-col-B5OPXPr8.js.map +1 -0
- package/dist/x-col-KJDQojCc.js +2 -0
- package/dist/x-col-KJDQojCc.js.map +1 -0
- package/dist/x-container-e-eRQnv6.js +2 -0
- package/dist/x-container-e-eRQnv6.js.map +1 -0
- package/dist/x-container-e4wjA5VY.js +2 -0
- package/dist/x-container-e4wjA5VY.js.map +1 -0
- package/dist/x-dialog-D6r8mi6-.js +2 -0
- package/dist/x-dialog-D6r8mi6-.js.map +1 -0
- package/dist/x-dialog-DYWxApRD.js +2 -0
- package/dist/x-dialog-DYWxApRD.js.map +1 -0
- package/dist/x-dialog-oAn88o9T.js +2 -0
- package/dist/x-dialog-oAn88o9T.js.map +1 -0
- package/dist/x-divider-BCwuNKpo.js +2 -0
- package/dist/x-divider-BCwuNKpo.js.map +1 -0
- package/dist/x-divider-BnEfygqi.js +2 -0
- package/dist/x-divider-BnEfygqi.js.map +1 -0
- package/dist/x-divider-rvXgbWfE.js +2 -0
- package/dist/x-divider-rvXgbWfE.js.map +1 -0
- package/dist/x-img-B2B5glWY.js +2 -0
- package/dist/x-img-B2B5glWY.js.map +1 -0
- package/dist/x-img-Bj_1ZxwL.js +2 -0
- package/dist/x-img-Bj_1ZxwL.js.map +1 -0
- package/dist/x-img-iz7nX54V.js +2 -0
- package/dist/x-img-iz7nX54V.js.map +1 -0
- package/dist/x-load-B-IMf3jW.js +2 -0
- package/dist/x-load-B-IMf3jW.js.map +1 -0
- package/dist/x-load-DKS8UJZy.js +2 -0
- package/dist/x-load-DKS8UJZy.js.map +1 -0
- package/dist/x-load-DYuGRQQC.css +1 -0
- package/dist/x-load-Diex9fJK.js +2 -0
- package/dist/x-load-Diex9fJK.js.map +1 -0
- package/dist/x-load-DyIF2nXd.css +5 -0
- package/dist/x-load-THoDQrSz.css +3 -0
- package/dist/x-menu-BBb2QzOu.js +2 -0
- package/dist/x-menu-BBb2QzOu.js.map +1 -0
- package/dist/x-menu-BKquCdsX.js +4963 -0
- package/dist/x-menu-BKquCdsX.js.map +1 -0
- package/dist/x-menu-Ce37WOnf.js +2 -0
- package/dist/x-menu-Ce37WOnf.js.map +1 -0
- package/dist/x-menu-item-JuTN7QVh.js +2 -0
- package/dist/x-menu-item-JuTN7QVh.js.map +1 -0
- package/dist/x-menuitem-CNKTVGiE.js +2 -0
- package/dist/x-menuitem-CNKTVGiE.js.map +1 -0
- package/dist/x-menuitem-CVO0asxe.js +2 -0
- package/dist/x-menuitem-CVO0asxe.js.map +1 -0
- package/dist/x-row-B5OPXPr8.js +2 -0
- package/dist/x-row-B5OPXPr8.js.map +1 -0
- package/dist/x-row-KJDQojCc.js +2 -0
- package/dist/x-row-KJDQojCc.js.map +1 -0
- package/dist/x-search-B0oJfSre.js +2 -0
- package/dist/x-search-B0oJfSre.js.map +1 -0
- package/dist/x-search-D_rjUBBL.js +2 -0
- package/dist/x-search-D_rjUBBL.js.map +1 -0
- package/dist/x-textfield-CRySrmrj.js +2 -0
- package/dist/x-textfield-CRySrmrj.js.map +1 -0
- package/dist/x-textfield-GtnNDOX1.js +2 -0
- package/dist/x-textfield-GtnNDOX1.js.map +1 -0
- package/dist/xwiki-logo-color-DZ9bdNW4.svg +18 -0
- package/index.html +12 -0
- package/package.json +38 -0
- package/public/config.json +106 -0
- package/src/index.ts +50 -0
- package/src/vite-env.d.ts +27 -0
- package/src/vue.d.ts +32 -0
- package/tsconfig.json +21 -0
- package/vite.config.js +79 -0
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
const __vite__fileDeps=["./staticBuild-BoKVadnu.js","./staticBuild-BlyaXHUF.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ln="named",ff="name",xs="unmanaged",hf="optional",ks="inject",oi="multi_inject",df="inversify:tagged",pf="inversify:tagged_props",$a="inversify:paramtypes",tp="design:paramtypes",Ru="post_construct",Fa="pre_destroy";function np(){return[ks,oi,ff,xs,ln,hf]}var Iu=np(),Tt={Request:"Request",Singleton:"Singleton",Transient:"Transient"},mt={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"},ro={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"},rp=0;function io(){return rp++}var ip=function(){function e(t,n){this.id=io(),this.activated=!1,this.serviceIdentifier=t,this.scope=n,this.type=mt.Invalid,this.constraint=function(r){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.onDeactivation=null,this.dynamicValue=null}return e.prototype.clone=function(){var t=new e(this.serviceIdentifier,this.scope);return t.activated=t.scope===Tt.Singleton?this.activated:!1,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.factory=this.factory,t.provider=this.provider,t.constraint=this.constraint,t.onActivation=this.onActivation,t.onDeactivation=this.onDeactivation,t.cache=this.cache,t},e}(),op="Cannot apply @injectable decorator multiple times.",gf="Metadata key was used more than once in a parameter:",xi="NULL argument",Mu="Key Not Found",sp="Ambiguous match found for serviceIdentifier:",ap="Could not unbind serviceIdentifier:",lp="No matching bindings found for serviceIdentifier:",mf="Missing required @injectable annotation in:",up="Missing required @inject or @multiInject annotation in:",cp=function(e){return"@inject called with undefined this could mean that the class "+e+" has a circular dependency problem. You can use a LazyServiceIdentifier to overcome this limitation."},fp="Circular dependency found:",hp="Invalid binding type:",dp="No snapshot available to restore.",pp="Invalid return type in middleware. Middleware must return!",gp="Value provided to function binding must be a function!",mp=function(e){return"You are attempting to construct '"+e+`' in a synchronous way
|
|
3
|
+
but it has asynchronous dependencies.`},vp="The toSelf function can only be applied when a constructor is used as service identifier",vf="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.",yp=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"The number of constructor arguments in the derived class "+(e[0]+" must be >= than the number of constructor arguments of its base class.")},bp="Invalid Container constructor argument. Container options must be an object.",_p='Invalid Container option. Default scope must be a string ("singleton" or "transient").',wp="Invalid Container option. Auto bind injectable must be a boolean",xp="Invalid Container option. Skip base check must be a boolean",kp="Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)",Cp=function(e,t){return"@postConstruct error in class "+e+": "+t},Sp=function(e,t){return"@preDestroy error in class "+e+": "+t},Ba=function(e,t){return"onDeactivation() error in class "+e+": "+t},Ep=function(e,t){return"It looks like there is a circular dependency in one of the '"+e+"' bindings. Please investigate bindings with "+("service identifier '"+t+"'.")},Ap="Maximum call stack size exceeded",Pp=function(){function e(){}return e.prototype.getConstructorMetadata=function(t){var n=Reflect.getMetadata($a,t),r=Reflect.getMetadata(df,t);return{compilerGeneratedMetadata:n,userGeneratedMetadata:r||{}}},e.prototype.getPropertiesMetadata=function(t){var n=Reflect.getMetadata(pf,t)||[];return n},e}(),Qo={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1};function yf(e){return e instanceof RangeError||e.message===Ap}var Tp=function(e,t){try{return e()}catch(n){throw yf(n)&&(n=t()),n}};function Ki(e){if(typeof e=="function"){var t=e;return t.name}else{if(typeof e=="symbol")return e.toString();var t=e;return t}}function Du(e,t,n){var r="",i=n(e,t);return i.length!==0&&(r=`
|
|
4
|
+
Registered bindings:`,i.forEach(function(o){var a="Object";o.implementationType!==null&&(a=Cs(o.implementationType)),r=r+`
|
|
5
|
+
`+a,o.constraint.metaData&&(r=r+" - "+o.constraint.metaData)})),r}function bf(e,t){return e.parentRequest===null?!1:e.parentRequest.serviceIdentifier===t?!0:bf(e.parentRequest,t)}function Op(e){function t(r,i){i===void 0&&(i=[]);var o=Ki(r.serviceIdentifier);return i.push(o),r.parentRequest!==null?t(r.parentRequest,i):i}var n=t(e);return n.reverse().join(" --> ")}function _f(e){e.childRequests.forEach(function(t){if(bf(t,t.serviceIdentifier)){var n=Op(t);throw new Error(fp+" "+n)}else _f(t)})}function Rp(e,t){if(t.isTagged()||t.isNamed()){var n="",r=t.getNamedTag(),i=t.getCustomTags();return r!==null&&(n+=r.toString()+`
|
|
6
|
+
`),i!==null&&i.forEach(function(o){n+=o.toString()+`
|
|
7
|
+
`})," "+e+`
|
|
8
|
+
`+e+" - "+n}else return" "+e}function Cs(e){if(e.name)return e.name;var t=e.toString(),n=t.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+t}function Ip(e){return e.toString().slice(7,-1)}var wf=function(){function e(t){this.id=io(),this.container=t}return e.prototype.addPlan=function(t){this.plan=t},e.prototype.setCurrentRequest=function(t){this.currentRequest=t},e}(),Bn=function(){function e(t,n){this.key=t,this.value=n}return e.prototype.toString=function(){return this.key===ln?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},e}(),Mp=function(){function e(t,n){this.parentContext=t,this.rootRequest=n}return e}(),Dp=function(){function e(t){this._cb=t}return e.prototype.unwrap=function(){return this._cb()},e}(),Lp=function(){function e(t){this.str=t}return e.prototype.startsWith=function(t){return this.str.indexOf(t)===0},e.prototype.endsWith=function(t){var n="",r=t.split("").reverse().join("");return n=this.str.split("").reverse().join(""),this.startsWith.call({str:n},r)},e.prototype.contains=function(t){return this.str.indexOf(t)!==-1},e.prototype.equals=function(t){return this.str===t},e.prototype.value=function(){return this.str},e}(),Ss=function(){function e(t,n,r,i){this.id=io(),this.type=t,this.serviceIdentifier=r;var o=typeof n=="symbol"?Ip(n):n;this.name=new Lp(o||""),this.identifier=n,this.metadata=new Array;var a=null;typeof i=="string"?a=new Bn(ln,i):i instanceof Bn&&(a=i),a!==null&&this.metadata.push(a)}return e.prototype.hasTag=function(t){for(var n=0,r=this.metadata;n<r.length;n++){var i=r[n];if(i.key===t)return!0}return!1},e.prototype.isArray=function(){return this.hasTag(oi)},e.prototype.matchesArray=function(t){return this.matchesTag(oi)(t)},e.prototype.isNamed=function(){return this.hasTag(ln)},e.prototype.isTagged=function(){return this.metadata.some(function(t){return Iu.every(function(n){return t.key!==n})})},e.prototype.isOptional=function(){return this.matchesTag(hf)(!0)},e.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(t){return t.key===ln})[0]:null},e.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(t){return Iu.every(function(n){return t.key!==n})}):null},e.prototype.matchesNamedTag=function(t){return this.matchesTag(ln)(t)},e.prototype.matchesTag=function(t){var n=this;return function(r){for(var i=0,o=n.metadata;i<o.length;i++){var a=o[i];if(a.key===t&&a.value===r)return!0}return!1}},e}(),is=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};function jp(e,t){var n=Cs(t);return xf(e,n,t,!1)}function xf(e,t,n,r){var i=e.getConstructorMetadata(n),o=i.compilerGeneratedMetadata;if(o===void 0){var a=mf+" "+t+".";throw new Error(a)}var c=i.userGeneratedMetadata,f=Object.keys(c),h=n.length===0&&f.length>0,p=f.length>n.length,v=h||p?f.length:n.length,y=$p(r,t,o,c,v),k=kf(e,n,t),D=is(is([],y,!0),k,!0);return D}function Np(e,t,n,r,i){var o=i[e.toString()]||[],a=Sf(o),c=a.unmanaged!==!0,f=r[e],h=a.inject||a.multiInject;if(f=h||f,f instanceof Dp&&(f=f.unwrap()),c){var p=f===Object,v=f===Function,y=f===void 0,k=p||v||y;if(!t&&k){var D=up+" argument "+e+" in class "+n+".";throw new Error(D)}var z=new Ss(ro.ConstructorArgument,a.targetName,f);return z.metadata=o,z}return null}function $p(e,t,n,r,i){for(var o=[],a=0;a<i;a++){var c=a,f=Np(c,e,t,n,r);f!==null&&o.push(f)}return o}function Fp(e,t,n,r){var i=e||t;if(i===void 0){var o=mf+" for property "+String(n)+" in class "+r+".";throw new Error(o)}return i}function kf(e,t,n){for(var r=e.getPropertiesMetadata(t),i=[],o=Object.getOwnPropertySymbols(r),a=Object.keys(r),c=a.concat(o),f=0,h=c;f<h.length;f++){var p=h[f],v=r[p],y=Sf(v),k=y.targetName||p,D=Fp(y.inject,y.multiInject,p,n),z=new Ss(ro.ClassProperty,k,D);z.metadata=v,i.push(z)}var ae=Object.getPrototypeOf(t.prototype).constructor;if(ae!==Object){var re=kf(e,ae,n);i=is(is([],i,!0),re,!0)}return i}function Cf(e,t){var n=Object.getPrototypeOf(t.prototype).constructor;if(n!==Object){var r=Cs(n),i=xf(e,r,n,!0),o=i.map(function(f){return f.metadata.filter(function(h){return h.key===xs})}),a=[].concat.apply([],o).length,c=i.length-a;return c>0?c:Cf(e,n)}else return 0}function Sf(e){var t={};return e.forEach(function(n){t[n.key.toString()]=n.value}),{inject:t[ks],multiInject:t[oi],targetName:t[ff],unmanaged:t[xs]}}var vl=function(){function e(t,n,r,i,o){this.id=io(),this.serviceIdentifier=t,this.parentContext=n,this.parentRequest=r,this.target=o,this.childRequests=[],this.bindings=Array.isArray(i)?i:[i],this.requestScope=r===null?new Map:null}return e.prototype.addChildRequest=function(t,n,r){var i=new e(t,this.parentContext,this,n,r);return this.childRequests.push(i),i},e}();function os(e){return e._bindingDictionary}function Bp(e,t,n,r,i,o){var a=e?oi:ks,c=new Bn(a,n),f=new Ss(t,r,n,c);if(i!==void 0){var h=new Bn(i,o);f.metadata.push(h)}return f}function Lu(e,t,n,r,i){var o=Vi(n.container,i.serviceIdentifier),a=[];return o.length===Qo.NoBindingsAvailable&&n.container.options.autoBindInjectable&&typeof i.serviceIdentifier=="function"&&e.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(i.serviceIdentifier).toSelf(),o=Vi(n.container,i.serviceIdentifier)),t?a=o:a=o.filter(function(c){var f=new vl(c.serviceIdentifier,n,r,c,i);return c.constraint(f)}),Up(i.serviceIdentifier,a,i,n.container),a}function Up(e,t,n,r){switch(t.length){case Qo.NoBindingsAvailable:if(n.isOptional())return t;var i=Ki(e),o=lp;throw o+=Rp(i,n),o+=Du(r,i,Vi),new Error(o);case Qo.OnlyOneBindingAvailable:return t;case Qo.MultipleBindingsAvailable:default:if(n.isArray())return t;var i=Ki(e),o=sp+" "+i;throw o+=Du(r,i,Vi),new Error(o)}}function Ef(e,t,n,r,i,o){var a,c;if(i===null){a=Lu(e,t,r,null,o),c=new vl(n,r,null,a,o);var f=new Mp(r,c);r.addPlan(f)}else a=Lu(e,t,r,i,o),c=i.addChildRequest(o.serviceIdentifier,a,o);a.forEach(function(h){var p=null;if(o.isArray())p=c.addChildRequest(h.serviceIdentifier,h,o);else{if(h.cache)return;p=c}if(h.type===mt.Instance&&h.implementationType!==null){var v=jp(e,h.implementationType);if(!r.container.options.skipBaseClassChecks){var y=Cf(e,h.implementationType);if(v.length<y){var k=yp(Cs(h.implementationType));throw new Error(k)}}v.forEach(function(D){Ef(e,!1,D.serviceIdentifier,r,p,D)})}})}function Vi(e,t){var n=[],r=os(e);return r.hasKey(t)?n=r.get(t):e.parent!==null&&(n=Vi(e.parent,t)),n}function Kp(e,t,n,r,i,o,a,c){c===void 0&&(c=!1);var f=new wf(t),h=Bp(n,r,i,"",o,a);try{return Ef(e,c,i,f,null,h),f}catch(p){throw yf(p)&&_f(f.plan.rootRequest),p}}function Vp(e,t,n,r){var i=new Ss(ro.Variable,"",t,new Bn(n,r)),o=new wf(e),a=new vl(t,o,null,[],i);return a}function en(e){var t=typeof e=="object"&&e!==null||typeof e=="function";return t&&typeof e.then=="function"}function Af(e){return en(e)?!0:Array.isArray(e)&&e.some(en)}var qp=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function c(p){try{h(r.next(p))}catch(v){a(v)}}function f(p){try{h(r.throw(p))}catch(v){a(v)}}function h(p){p.done?o(p.value):i(p.value).then(c,f)}h((r=r.apply(e,t||[])).next())})},Wp=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(h){return function(p){return f([h,p])}}function f(h){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=h[0]&2?i.return:h[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,h[1])).done)return o;switch(i=0,o&&(h=[h[0]&2,o.value]),h[0]){case 0:case 1:o=h;break;case 4:return n.label++,{value:h[1],done:!1};case 5:n.label++,i=h[1],h=[0];continue;case 7:h=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!o||h[1]>o[0]&&h[1]<o[3])){n.label=h[1];break}if(h[0]===6&&n.label<o[1]){n.label=o[1],o=h;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(h);break}o[2]&&n.ops.pop(),n.trys.pop();continue}h=t.call(e,n)}catch(p){h=[6,p],i=0}finally{r=o=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},zp=function(e,t){return t.scope===Tt.Singleton&&t.activated?t.cache:t.scope===Tt.Request&&e.has(t.id)?e.get(t.id):null},Hp=function(e,t,n){t.scope===Tt.Singleton&&Xp(t,n),t.scope===Tt.Request&&Gp(e,t,n)},Gp=function(e,t,n){e.has(t.id)||e.set(t.id,n)},Xp=function(e,t){e.cache=t,e.activated=!0,en(t)&&Yp(e,t)},Yp=function(e,t){return qp(void 0,void 0,void 0,function(){var n,r;return Wp(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,t];case 1:return n=i.sent(),e.cache=n,[3,3];case 2:throw r=i.sent(),e.cache=null,e.activated=!1,r;case 3:return[2]}})})},Ri;(function(e){e.DynamicValue="toDynamicValue",e.Factory="toFactory",e.Provider="toProvider"})(Ri||(Ri={}));var Qp=function(e){var t=null;switch(e.type){case mt.ConstantValue:case mt.Function:t=e.cache;break;case mt.Constructor:case mt.Instance:t=e.implementationType;break;case mt.DynamicValue:t=e.dynamicValue;break;case mt.Provider:t=e.provider;break;case mt.Factory:t=e.factory;break}if(t===null){var n=Ki(e.serviceIdentifier);throw new Error(hp+" "+n)}},Zp=function(e){switch(e.type){case mt.Factory:return{factory:e.factory,factoryType:Ri.Factory};case mt.Provider:return{factory:e.provider,factoryType:Ri.Provider};case mt.DynamicValue:return{factory:e.dynamicValue,factoryType:Ri.DynamicValue};default:throw new Error("Unexpected factory type "+e.type)}},si=function(){return si=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},si.apply(this,arguments)},Pf=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function c(p){try{h(r.next(p))}catch(v){a(v)}}function f(p){try{h(r.throw(p))}catch(v){a(v)}}function h(p){p.done?o(p.value):i(p.value).then(c,f)}h((r=r.apply(e,t||[])).next())})},Tf=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(h){return function(p){return f([h,p])}}function f(h){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=h[0]&2?i.return:h[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,h[1])).done)return o;switch(i=0,o&&(h=[h[0]&2,o.value]),h[0]){case 0:case 1:o=h;break;case 4:return n.label++,{value:h[1],done:!1};case 5:n.label++,i=h[1],h=[0];continue;case 7:h=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!o||h[1]>o[0]&&h[1]<o[3])){n.label=h[1];break}if(h[0]===6&&n.label<o[1]){n.label=o[1],o=h;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(h);break}o[2]&&n.ops.pop(),n.trys.pop();continue}h=t.call(e,n)}catch(p){h=[6,p],i=0}finally{r=o=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},Jp=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};function eg(e,t){return e.reduce(function(n,r){var i=t(r),o=r.target.type;return o===ro.ConstructorArgument?n.constructorInjections.push(i):(n.propertyRequests.push(r),n.propertyInjections.push(i)),n.isAsync||(n.isAsync=Af(i)),n},{constructorInjections:[],propertyInjections:[],propertyRequests:[],isAsync:!1})}function tg(e,t,n){var r;if(t.length>0){var i=eg(t,n),o=si(si({},i),{constr:e});i.isAsync?r=ng(o):r=Of(o)}else r=new e;return r}function Of(e){var t,n=new((t=e.constr).bind.apply(t,Jp([void 0],e.constructorInjections,!1)));return e.propertyRequests.forEach(function(r,i){var o=r.target.identifier,a=e.propertyInjections[i];(!r.target.isOptional()||a!==void 0)&&(n[o]=a)}),n}function ng(e){return Pf(this,void 0,void 0,function(){var t,n;return Tf(this,function(r){switch(r.label){case 0:return[4,ju(e.constructorInjections)];case 1:return t=r.sent(),[4,ju(e.propertyInjections)];case 2:return n=r.sent(),[2,Of(si(si({},e),{constructorInjections:t,propertyInjections:n}))]}})})}function ju(e){return Pf(this,void 0,void 0,function(){var t,n,r,i;return Tf(this,function(o){for(t=[],n=0,r=e;n<r.length;n++)i=r[n],Array.isArray(i)?t.push(Promise.all(i)):t.push(i);return[2,Promise.all(t)]})})}function Nu(e,t){var n=rg(e,t);return en(n)?n.then(function(){return t}):t}function rg(e,t){var n,r;if(Reflect.hasMetadata(Ru,e)){var i=Reflect.getMetadata(Ru,e);try{return(r=(n=t)[i.value])===null||r===void 0?void 0:r.call(n)}catch(o){if(o instanceof Error)throw new Error(Cp(e.name,o.message))}}}function ig(e,t){e.scope!==Tt.Singleton&&og(e,t)}function og(e,t){var n="Class cannot be instantiated in "+(e.scope===Tt.Request?"request":"transient")+" scope.";if(typeof e.onDeactivation=="function")throw new Error(Ba(t.name,n));if(Reflect.hasMetadata(Fa,t))throw new Error(Sp(t.name,n))}function sg(e,t,n,r){ig(e,t);var i=tg(t,n,r);return en(i)?i.then(function(o){return Nu(t,o)}):Nu(t,i)}var ag=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function c(p){try{h(r.next(p))}catch(v){a(v)}}function f(p){try{h(r.throw(p))}catch(v){a(v)}}function h(p){p.done?o(p.value):i(p.value).then(c,f)}h((r=r.apply(e,t||[])).next())})},lg=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(h){return function(p){return f([h,p])}}function f(h){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=h[0]&2?i.return:h[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,h[1])).done)return o;switch(i=0,o&&(h=[h[0]&2,o.value]),h[0]){case 0:case 1:o=h;break;case 4:return n.label++,{value:h[1],done:!1};case 5:n.label++,i=h[1],h=[0];continue;case 7:h=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!o||h[1]>o[0]&&h[1]<o[3])){n.label=h[1];break}if(h[0]===6&&n.label<o[1]){n.label=o[1],o=h;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(h);break}o[2]&&n.ops.pop(),n.trys.pop();continue}h=t.call(e,n)}catch(p){h=[6,p],i=0}finally{r=o=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},yl=function(e){return function(t){t.parentContext.setCurrentRequest(t);var n=t.bindings,r=t.childRequests,i=t.target&&t.target.isArray(),o=!t.parentRequest||!t.parentRequest.target||!t.target||!t.parentRequest.target.matchesArray(t.target.serviceIdentifier);if(i&&o)return r.map(function(c){var f=yl(e);return f(c)});if(t.target.isOptional()&&n.length===0)return;var a=n[0];return hg(e,t,a)}},ug=function(e,t){var n=Zp(e);return Tp(function(){return n.factory.bind(e)(t)},function(){return new Error(Ep(n.factoryType,t.currentRequest.serviceIdentifier.toString()))})},cg=function(e,t,n){var r,i=t.childRequests;switch(Qp(n),n.type){case mt.ConstantValue:case mt.Function:r=n.cache;break;case mt.Constructor:r=n.implementationType;break;case mt.Instance:r=sg(n,n.implementationType,i,yl(e));break;default:r=ug(n,t.parentContext)}return r},fg=function(e,t,n){var r=zp(e,t);return r!==null||(r=n(),Hp(e,t,r)),r},hg=function(e,t,n){return fg(e,n,function(){var r=cg(e,t,n);return en(r)?r=r.then(function(i){return $u(t,n,i)}):r=$u(t,n,r),r})};function $u(e,t,n){var r=dg(e.parentContext,t,n),i=mg(e.parentContext.container),o,a=i.next();do{o=a.value;var c=e.parentContext,f=e.serviceIdentifier,h=gg(o,f);en(r)?r=Rf(h,c,r):r=pg(h,c,r),a=i.next()}while(a.done!==!0&&!os(o).hasKey(e.serviceIdentifier));return r}var dg=function(e,t,n){var r;return typeof t.onActivation=="function"?r=t.onActivation(e,n):r=n,r},pg=function(e,t,n){for(var r=e.next();!r.done;){if(n=r.value(t,n),en(n))return Rf(e,t,n);r=e.next()}return n},Rf=function(e,t,n){return ag(void 0,void 0,void 0,function(){var r,i;return lg(this,function(o){switch(o.label){case 0:return[4,n];case 1:r=o.sent(),i=e.next(),o.label=2;case 2:return i.done?[3,4]:[4,i.value(t,r)];case 3:return r=o.sent(),i=e.next(),[3,2];case 4:return[2,r]}})})},gg=function(e,t){var n=e._activations;return n.hasKey(t)?n.get(t).values():[].values()},mg=function(e){for(var t=[e],n=e.parent;n!==null;)t.push(n),n=n.parent;var r=function(){var o=t.pop();return o!==void 0?{done:!1,value:o}:{done:!0,value:void 0}},i={next:r};return i};function vg(e){var t=yl(e.plan.rootRequest.requestScope);return t(e.plan.rootRequest)}var jn=function(e,t){var n=e.parentRequest;return n!==null?t(n)?!0:jn(n,t):!1},Ti=function(e){return function(t){var n=function(r){return r!==null&&r.target!==null&&r.target.matchesTag(e)(t)};return n.metaData=new Bn(e,t),n}},jo=Ti(ln),_a=function(e){return function(t){var n=null;if(t!==null)if(n=t.bindings[0],typeof e=="string"){var r=n.serviceIdentifier;return r===e}else{var i=t.bindings[0].implementationType;return e===i}return!1}},ss=function(){function e(t){this._binding=t}return e.prototype.when=function(t){return this._binding.constraint=t,new Ut(this._binding)},e.prototype.whenTargetNamed=function(t){return this._binding.constraint=jo(t),new Ut(this._binding)},e.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(t){if(t===null)return!1;var n=t.target!==null&&!t.target.isNamed()&&!t.target.isTagged();return n},new Ut(this._binding)},e.prototype.whenTargetTagged=function(t,n){return this._binding.constraint=Ti(t)(n),new Ut(this._binding)},e.prototype.whenInjectedInto=function(t){return this._binding.constraint=function(n){return n!==null&&_a(t)(n.parentRequest)},new Ut(this._binding)},e.prototype.whenParentNamed=function(t){return this._binding.constraint=function(n){return n!==null&&jo(t)(n.parentRequest)},new Ut(this._binding)},e.prototype.whenParentTagged=function(t,n){return this._binding.constraint=function(r){return r!==null&&Ti(t)(n)(r.parentRequest)},new Ut(this._binding)},e.prototype.whenAnyAncestorIs=function(t){return this._binding.constraint=function(n){return n!==null&&jn(n,_a(t))},new Ut(this._binding)},e.prototype.whenNoAncestorIs=function(t){return this._binding.constraint=function(n){return n!==null&&!jn(n,_a(t))},new Ut(this._binding)},e.prototype.whenAnyAncestorNamed=function(t){return this._binding.constraint=function(n){return n!==null&&jn(n,jo(t))},new Ut(this._binding)},e.prototype.whenNoAncestorNamed=function(t){return this._binding.constraint=function(n){return n!==null&&!jn(n,jo(t))},new Ut(this._binding)},e.prototype.whenAnyAncestorTagged=function(t,n){return this._binding.constraint=function(r){return r!==null&&jn(r,Ti(t)(n))},new Ut(this._binding)},e.prototype.whenNoAncestorTagged=function(t,n){return this._binding.constraint=function(r){return r!==null&&!jn(r,Ti(t)(n))},new Ut(this._binding)},e.prototype.whenAnyAncestorMatches=function(t){return this._binding.constraint=function(n){return n!==null&&jn(n,t)},new Ut(this._binding)},e.prototype.whenNoAncestorMatches=function(t){return this._binding.constraint=function(n){return n!==null&&!jn(n,t)},new Ut(this._binding)},e}(),Ut=function(){function e(t){this._binding=t}return e.prototype.onActivation=function(t){return this._binding.onActivation=t,new ss(this._binding)},e.prototype.onDeactivation=function(t){return this._binding.onDeactivation=t,new ss(this._binding)},e}(),$n=function(){function e(t){this._binding=t,this._bindingWhenSyntax=new ss(this._binding),this._bindingOnSyntax=new Ut(this._binding)}return e.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},e.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(t,n){return this._bindingWhenSyntax.whenTargetTagged(t,n)},e.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},e.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},e.prototype.whenParentTagged=function(t,n){return this._bindingWhenSyntax.whenParentTagged(t,n)},e.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},e.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},e.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},e.prototype.whenAnyAncestorTagged=function(t,n){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,n)},e.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},e.prototype.whenNoAncestorTagged=function(t,n){return this._bindingWhenSyntax.whenNoAncestorTagged(t,n)},e.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},e.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},e.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},e.prototype.onDeactivation=function(t){return this._bindingOnSyntax.onDeactivation(t)},e}(),yg=function(){function e(t){this._binding=t}return e.prototype.inRequestScope=function(){return this._binding.scope=Tt.Request,new $n(this._binding)},e.prototype.inSingletonScope=function(){return this._binding.scope=Tt.Singleton,new $n(this._binding)},e.prototype.inTransientScope=function(){return this._binding.scope=Tt.Transient,new $n(this._binding)},e}(),Fu=function(){function e(t){this._binding=t,this._bindingWhenSyntax=new ss(this._binding),this._bindingOnSyntax=new Ut(this._binding),this._bindingInSyntax=new yg(t)}return e.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},e.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},e.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},e.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},e.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(t,n){return this._bindingWhenSyntax.whenTargetTagged(t,n)},e.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},e.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},e.prototype.whenParentTagged=function(t,n){return this._bindingWhenSyntax.whenParentTagged(t,n)},e.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},e.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},e.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},e.prototype.whenAnyAncestorTagged=function(t,n){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,n)},e.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},e.prototype.whenNoAncestorTagged=function(t,n){return this._bindingWhenSyntax.whenNoAncestorTagged(t,n)},e.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},e.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},e.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},e.prototype.onDeactivation=function(t){return this._bindingOnSyntax.onDeactivation(t)},e}(),bg=function(){function e(t){this._binding=t}return e.prototype.to=function(t){return this._binding.type=mt.Instance,this._binding.implementationType=t,new Fu(this._binding)},e.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+vp);var t=this._binding.serviceIdentifier;return this.to(t)},e.prototype.toConstantValue=function(t){return this._binding.type=mt.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=Tt.Singleton,new $n(this._binding)},e.prototype.toDynamicValue=function(t){return this._binding.type=mt.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new Fu(this._binding)},e.prototype.toConstructor=function(t){return this._binding.type=mt.Constructor,this._binding.implementationType=t,this._binding.scope=Tt.Singleton,new $n(this._binding)},e.prototype.toFactory=function(t){return this._binding.type=mt.Factory,this._binding.factory=t,this._binding.scope=Tt.Singleton,new $n(this._binding)},e.prototype.toFunction=function(t){if(typeof t!="function")throw new Error(gp);var n=this.toConstantValue(t);return this._binding.type=mt.Function,this._binding.scope=Tt.Singleton,n},e.prototype.toAutoFactory=function(t){return this._binding.type=mt.Factory,this._binding.factory=function(n){var r=function(){return n.container.get(t)};return r},this._binding.scope=Tt.Singleton,new $n(this._binding)},e.prototype.toAutoNamedFactory=function(t){return this._binding.type=mt.Factory,this._binding.factory=function(n){return function(r){return n.container.getNamed(t,r)}},new $n(this._binding)},e.prototype.toProvider=function(t){return this._binding.type=mt.Provider,this._binding.provider=t,this._binding.scope=Tt.Singleton,new $n(this._binding)},e.prototype.toService=function(t){this.toDynamicValue(function(n){return n.container.get(t)})},e}(),_g=function(){function e(){}return e.of=function(t,n,r,i,o){var a=new e;return a.bindings=t,a.middleware=n,a.deactivations=i,a.activations=r,a.moduleActivationStore=o,a},e}();function wg(e){return typeof e=="object"&&e!==null&&"clone"in e&&typeof e.clone=="function"}var Pr=function(){function e(){this._map=new Map}return e.prototype.getMap=function(){return this._map},e.prototype.add=function(t,n){if(t==null)throw new Error(xi);if(n==null)throw new Error(xi);var r=this._map.get(t);r!==void 0?r.push(n):this._map.set(t,[n])},e.prototype.get=function(t){if(t==null)throw new Error(xi);var n=this._map.get(t);if(n!==void 0)return n;throw new Error(Mu)},e.prototype.remove=function(t){if(t==null)throw new Error(xi);if(!this._map.delete(t))throw new Error(Mu)},e.prototype.removeIntersection=function(t){var n=this;this.traverse(function(r,i){var o=t.hasKey(r)?t.get(r):void 0;if(o!==void 0){var a=i.filter(function(c){return!o.some(function(f){return c===f})});n._setValue(r,a)}})},e.prototype.removeByCondition=function(t){var n=this,r=[];return this._map.forEach(function(i,o){for(var a=[],c=0,f=i;c<f.length;c++){var h=f[c],p=t(h);p?r.push(h):a.push(h)}n._setValue(o,a)}),r},e.prototype.hasKey=function(t){if(t==null)throw new Error(xi);return this._map.has(t)},e.prototype.clone=function(){var t=new e;return this._map.forEach(function(n,r){n.forEach(function(i){return t.add(r,wg(i)?i.clone():i)})}),t},e.prototype.traverse=function(t){this._map.forEach(function(n,r){t(r,n)})},e.prototype._setValue=function(t,n){n.length>0?this._map.set(t,n):this._map.delete(t)},e}(),xg=function(){function e(){this._map=new Map}return e.prototype.remove=function(t){if(this._map.has(t)){var n=this._map.get(t);return this._map.delete(t),n}return this._getEmptyHandlersStore()},e.prototype.addDeactivation=function(t,n,r){this._getModuleActivationHandlers(t).onDeactivations.add(n,r)},e.prototype.addActivation=function(t,n,r){this._getModuleActivationHandlers(t).onActivations.add(n,r)},e.prototype.clone=function(){var t=new e;return this._map.forEach(function(n,r){t._map.set(r,{onActivations:n.onActivations.clone(),onDeactivations:n.onDeactivations.clone()})}),t},e.prototype._getModuleActivationHandlers=function(t){var n=this._map.get(t);return n===void 0&&(n=this._getEmptyHandlersStore(),this._map.set(t,n)),n},e.prototype._getEmptyHandlersStore=function(){var t={onActivations:new Pr,onDeactivations:new Pr};return t},e}(),as=function(){return as=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},as.apply(this,arguments)},cn=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function c(p){try{h(r.next(p))}catch(v){a(v)}}function f(p){try{h(r.throw(p))}catch(v){a(v)}}function h(p){p.done?o(p.value):i(p.value).then(c,f)}h((r=r.apply(e,t||[])).next())})},fn=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(h){return function(p){return f([h,p])}}function f(h){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=h[0]&2?i.return:h[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,h[1])).done)return o;switch(i=0,o&&(h=[h[0]&2,o.value]),h[0]){case 0:case 1:o=h;break;case 4:return n.label++,{value:h[1],done:!1};case 5:n.label++,i=h[1],h=[0];continue;case 7:h=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!o||h[1]>o[0]&&h[1]<o[3])){n.label=h[1];break}if(h[0]===6&&n.label<o[1]){n.label=o[1],o=h;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(h);break}o[2]&&n.ops.pop(),n.trys.pop();continue}h=t.call(e,n)}catch(p){h=[6,p],i=0}finally{r=o=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},kg=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Cg=function(){function e(t){var n=t||{};if(typeof n!="object")throw new Error(""+bp);if(n.defaultScope===void 0)n.defaultScope=Tt.Transient;else if(n.defaultScope!==Tt.Singleton&&n.defaultScope!==Tt.Transient&&n.defaultScope!==Tt.Request)throw new Error(""+_p);if(n.autoBindInjectable===void 0)n.autoBindInjectable=!1;else if(typeof n.autoBindInjectable!="boolean")throw new Error(""+wp);if(n.skipBaseClassChecks===void 0)n.skipBaseClassChecks=!1;else if(typeof n.skipBaseClassChecks!="boolean")throw new Error(""+xp);this.options={autoBindInjectable:n.autoBindInjectable,defaultScope:n.defaultScope,skipBaseClassChecks:n.skipBaseClassChecks},this.id=io(),this._bindingDictionary=new Pr,this._snapshots=[],this._middleware=null,this._activations=new Pr,this._deactivations=new Pr,this.parent=null,this._metadataReader=new Pp,this._moduleActivationStore=new xg}return e.merge=function(t,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o=new e,a=kg([t,n],r,!0).map(function(h){return os(h)}),c=os(o);function f(h,p){h.traverse(function(v,y){y.forEach(function(k){p.add(k.serviceIdentifier,k.clone())})})}return a.forEach(function(h){f(h,c)}),o},e.prototype.load=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=this._getContainerModuleHelpersFactory(),i=0,o=t;i<o.length;i++){var a=o[i],c=r(a.id);a.registry(c.bindFunction,c.unbindFunction,c.isboundFunction,c.rebindFunction,c.unbindAsyncFunction,c.onActivationFunction,c.onDeactivationFunction)}},e.prototype.loadAsync=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return cn(this,void 0,void 0,function(){var r,i,o,a,c;return fn(this,function(f){switch(f.label){case 0:r=this._getContainerModuleHelpersFactory(),i=0,o=t,f.label=1;case 1:return i<o.length?(a=o[i],c=r(a.id),[4,a.registry(c.bindFunction,c.unbindFunction,c.isboundFunction,c.rebindFunction,c.unbindAsyncFunction,c.onActivationFunction,c.onDeactivationFunction)]):[3,4];case 2:f.sent(),f.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},e.prototype.unload=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];n.forEach(function(i){var o=t._removeModuleBindings(i.id);t._deactivateSingletons(o),t._removeModuleHandlers(i.id)})},e.prototype.unloadAsync=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return cn(this,void 0,void 0,function(){var r,i,o,a;return fn(this,function(c){switch(c.label){case 0:r=0,i=t,c.label=1;case 1:return r<i.length?(o=i[r],a=this._removeModuleBindings(o.id),[4,this._deactivateSingletonsAsync(a)]):[3,4];case 2:c.sent(),this._removeModuleHandlers(o.id),c.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},e.prototype.bind=function(t){var n=this.options.defaultScope||Tt.Transient,r=new ip(t,n);return this._bindingDictionary.add(t,r),new bg(r)},e.prototype.rebind=function(t){return this.unbind(t),this.bind(t)},e.prototype.rebindAsync=function(t){return cn(this,void 0,void 0,function(){return fn(this,function(n){switch(n.label){case 0:return[4,this.unbindAsync(t)];case 1:return n.sent(),[2,this.bind(t)]}})})},e.prototype.unbind=function(t){if(this._bindingDictionary.hasKey(t)){var n=this._bindingDictionary.get(t);this._deactivateSingletons(n)}this._removeServiceFromDictionary(t)},e.prototype.unbindAsync=function(t){return cn(this,void 0,void 0,function(){var n;return fn(this,function(r){switch(r.label){case 0:return this._bindingDictionary.hasKey(t)?(n=this._bindingDictionary.get(t),[4,this._deactivateSingletonsAsync(n)]):[3,2];case 1:r.sent(),r.label=2;case 2:return this._removeServiceFromDictionary(t),[2]}})})},e.prototype.unbindAll=function(){var t=this;this._bindingDictionary.traverse(function(n,r){t._deactivateSingletons(r)}),this._bindingDictionary=new Pr},e.prototype.unbindAllAsync=function(){return cn(this,void 0,void 0,function(){var t,n=this;return fn(this,function(r){switch(r.label){case 0:return t=[],this._bindingDictionary.traverse(function(i,o){t.push(n._deactivateSingletonsAsync(o))}),[4,Promise.all(t)];case 1:return r.sent(),this._bindingDictionary=new Pr,[2]}})})},e.prototype.onActivation=function(t,n){this._activations.add(t,n)},e.prototype.onDeactivation=function(t,n){this._deactivations.add(t,n)},e.prototype.isBound=function(t){var n=this._bindingDictionary.hasKey(t);return!n&&this.parent&&(n=this.parent.isBound(t)),n},e.prototype.isCurrentBound=function(t){return this._bindingDictionary.hasKey(t)},e.prototype.isBoundNamed=function(t,n){return this.isBoundTagged(t,ln,n)},e.prototype.isBoundTagged=function(t,n,r){var i=!1;if(this._bindingDictionary.hasKey(t)){var o=this._bindingDictionary.get(t),a=Vp(this,t,n,r);i=o.some(function(c){return c.constraint(a)})}return!i&&this.parent&&(i=this.parent.isBoundTagged(t,n,r)),i},e.prototype.snapshot=function(){this._snapshots.push(_g.of(this._bindingDictionary.clone(),this._middleware,this._activations.clone(),this._deactivations.clone(),this._moduleActivationStore.clone()))},e.prototype.restore=function(){var t=this._snapshots.pop();if(t===void 0)throw new Error(dp);this._bindingDictionary=t.bindings,this._activations=t.activations,this._deactivations=t.deactivations,this._middleware=t.middleware,this._moduleActivationStore=t.moduleActivationStore},e.prototype.createChild=function(t){var n=new e(t||this.options);return n.parent=this,n},e.prototype.applyMiddleware=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this._middleware?this._middleware:this._planAndResolve();this._middleware=t.reduce(function(i,o){return o(i)},r)},e.prototype.applyCustomMetadataReader=function(t){this._metadataReader=t},e.prototype.get=function(t){var n=this._getNotAllArgs(t,!1);return this._getButThrowIfAsync(n)},e.prototype.getAsync=function(t){return cn(this,void 0,void 0,function(){var n;return fn(this,function(r){return n=this._getNotAllArgs(t,!1),[2,this._get(n)]})})},e.prototype.getTagged=function(t,n,r){var i=this._getNotAllArgs(t,!1,n,r);return this._getButThrowIfAsync(i)},e.prototype.getTaggedAsync=function(t,n,r){return cn(this,void 0,void 0,function(){var i;return fn(this,function(o){return i=this._getNotAllArgs(t,!1,n,r),[2,this._get(i)]})})},e.prototype.getNamed=function(t,n){return this.getTagged(t,ln,n)},e.prototype.getNamedAsync=function(t,n){return this.getTaggedAsync(t,ln,n)},e.prototype.getAll=function(t){var n=this._getAllArgs(t);return this._getButThrowIfAsync(n)},e.prototype.getAllAsync=function(t){var n=this._getAllArgs(t);return this._getAll(n)},e.prototype.getAllTagged=function(t,n,r){var i=this._getNotAllArgs(t,!0,n,r);return this._getButThrowIfAsync(i)},e.prototype.getAllTaggedAsync=function(t,n,r){var i=this._getNotAllArgs(t,!0,n,r);return this._getAll(i)},e.prototype.getAllNamed=function(t,n){return this.getAllTagged(t,ln,n)},e.prototype.getAllNamedAsync=function(t,n){return this.getAllTaggedAsync(t,ln,n)},e.prototype.resolve=function(t){var n=this.isBound(t);n||this.bind(t).toSelf();var r=this.get(t);return n||this.unbind(t),r},e.prototype._preDestroy=function(t,n){var r,i;if(Reflect.hasMetadata(Fa,t)){var o=Reflect.getMetadata(Fa,t);return(i=(r=n)[o.value])===null||i===void 0?void 0:i.call(r)}},e.prototype._removeModuleHandlers=function(t){var n=this._moduleActivationStore.remove(t);this._activations.removeIntersection(n.onActivations),this._deactivations.removeIntersection(n.onDeactivations)},e.prototype._removeModuleBindings=function(t){return this._bindingDictionary.removeByCondition(function(n){return n.moduleId===t})},e.prototype._deactivate=function(t,n){var r=this,i=Object.getPrototypeOf(n).constructor;try{if(this._deactivations.hasKey(t.serviceIdentifier)){var o=this._deactivateContainer(n,this._deactivations.get(t.serviceIdentifier).values());if(en(o))return this._handleDeactivationError(o.then(function(){return r._propagateContainerDeactivationThenBindingAndPreDestroyAsync(t,n,i)}),i)}var a=this._propagateContainerDeactivationThenBindingAndPreDestroy(t,n,i);if(en(a))return this._handleDeactivationError(a,i)}catch(c){if(c instanceof Error)throw new Error(Ba(i.name,c.message))}},e.prototype._handleDeactivationError=function(t,n){return cn(this,void 0,void 0,function(){var r;return fn(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,t];case 1:return i.sent(),[3,3];case 2:if(r=i.sent(),r instanceof Error)throw new Error(Ba(n.name,r.message));return[3,3];case 3:return[2]}})})},e.prototype._deactivateContainer=function(t,n){for(var r=this,i=n.next();i.value;){var o=i.value(t);if(en(o))return o.then(function(){return r._deactivateContainerAsync(t,n)});i=n.next()}},e.prototype._deactivateContainerAsync=function(t,n){return cn(this,void 0,void 0,function(){var r;return fn(this,function(i){switch(i.label){case 0:r=n.next(),i.label=1;case 1:return r.value?[4,r.value(t)]:[3,3];case 2:return i.sent(),r=n.next(),[3,1];case 3:return[2]}})})},e.prototype._getContainerModuleHelpersFactory=function(){var t=this,n=function(p,v){p._binding.moduleId=v},r=function(p){return function(v){var y=t.bind(v);return n(y,p),y}},i=function(){return function(p){return t.unbind(p)}},o=function(){return function(p){return t.unbindAsync(p)}},a=function(){return function(p){return t.isBound(p)}},c=function(p){return function(v){var y=t.rebind(v);return n(y,p),y}},f=function(p){return function(v,y){t._moduleActivationStore.addActivation(p,v,y),t.onActivation(v,y)}},h=function(p){return function(v,y){t._moduleActivationStore.addDeactivation(p,v,y),t.onDeactivation(v,y)}};return function(p){return{bindFunction:r(p),isboundFunction:a(),onActivationFunction:f(p),onDeactivationFunction:h(p),rebindFunction:c(p),unbindFunction:i(),unbindAsyncFunction:o()}}},e.prototype._getAll=function(t){return Promise.all(this._get(t))},e.prototype._get=function(t){var n=as(as({},t),{contextInterceptor:function(i){return i},targetType:ro.Variable});if(this._middleware){var r=this._middleware(n);if(r==null)throw new Error(pp);return r}return this._planAndResolve()(n)},e.prototype._getButThrowIfAsync=function(t){var n=this._get(t);if(Af(n))throw new Error(mp(t.serviceIdentifier));return n},e.prototype._getAllArgs=function(t){var n={avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:t};return n},e.prototype._getNotAllArgs=function(t,n,r,i){var o={avoidConstraints:!1,isMultiInject:n,serviceIdentifier:t,key:r,value:i};return o},e.prototype._planAndResolve=function(){var t=this;return function(n){var r=Kp(t._metadataReader,t,n.isMultiInject,n.targetType,n.serviceIdentifier,n.key,n.value,n.avoidConstraints);r=n.contextInterceptor(r);var i=vg(r);return i}},e.prototype._deactivateIfSingleton=function(t){var n=this;if(t.activated)return en(t.cache)?t.cache.then(function(r){return n._deactivate(t,r)}):this._deactivate(t,t.cache)},e.prototype._deactivateSingletons=function(t){for(var n=0,r=t;n<r.length;n++){var i=r[n],o=this._deactivateIfSingleton(i);if(en(o))throw new Error(kp)}},e.prototype._deactivateSingletonsAsync=function(t){return cn(this,void 0,void 0,function(){var n=this;return fn(this,function(r){switch(r.label){case 0:return[4,Promise.all(t.map(function(i){return n._deactivateIfSingleton(i)}))];case 1:return r.sent(),[2]}})})},e.prototype._propagateContainerDeactivationThenBindingAndPreDestroy=function(t,n,r){return this.parent?this._deactivate.bind(this.parent)(t,n):this._bindingDeactivationAndPreDestroy(t,n,r)},e.prototype._propagateContainerDeactivationThenBindingAndPreDestroyAsync=function(t,n,r){return cn(this,void 0,void 0,function(){return fn(this,function(i){switch(i.label){case 0:return this.parent?[4,this._deactivate.bind(this.parent)(t,n)]:[3,2];case 1:return i.sent(),[3,4];case 2:return[4,this._bindingDeactivationAndPreDestroyAsync(t,n,r)];case 3:i.sent(),i.label=4;case 4:return[2]}})})},e.prototype._removeServiceFromDictionary=function(t){try{this._bindingDictionary.remove(t)}catch{throw new Error(ap+" "+Ki(t))}},e.prototype._bindingDeactivationAndPreDestroy=function(t,n,r){var i=this;if(typeof t.onDeactivation=="function"){var o=t.onDeactivation(n);if(en(o))return o.then(function(){return i._preDestroy(r,n)})}return this._preDestroy(r,n)},e.prototype._bindingDeactivationAndPreDestroyAsync=function(t,n,r){return cn(this,void 0,void 0,function(){return fn(this,function(i){switch(i.label){case 0:return typeof t.onDeactivation!="function"?[3,2]:[4,t.onDeactivation(n)];case 1:i.sent(),i.label=2;case 2:return[4,this._preDestroy(r,n)];case 3:return i.sent(),[2]}})})},e}();function Sg(e){for(var t=new Set,n=0,r=e;n<r.length;n++){var i=r[n];if(t.has(i))return i;t.add(i)}}function Eg(e){return e.prototype!==void 0}function Ag(e){if(e!==void 0)throw new Error(vf)}function If(e,t,n,r){Ag(t),Mf(df,e,n.toString(),r)}function Pg(e,t,n){if(Eg(e))throw new Error(vf);Mf(pf,e.constructor,t,n)}function Tg(e){var t=[];if(Array.isArray(e)){t=e;var n=Sg(t.map(function(r){return r.key}));if(n!==void 0)throw new Error(gf+" "+n.toString())}else t=[e];return t}function Mf(e,t,n,r){var i=Tg(r),o={};Reflect.hasOwnMetadata(e,t)&&(o=Reflect.getMetadata(e,t));var a=o[n];if(a===void 0)a=[];else for(var c=function(v){if(i.some(function(y){return y.key===v.key}))throw new Error(gf+" "+v.key.toString())},f=0,h=a;f<h.length;f++){var p=h[f];c(p)}a.push.apply(a,i),o[n]=a,Reflect.defineMetadata(e,o,t)}function Df(e){return function(t,n,r){typeof r=="number"?If(t,n,r,e):Pg(t,n,e)}}function kt(){return function(e){if(Reflect.hasOwnMetadata($a,e))throw new Error(op);var t=Reflect.getMetadata(tp,e)||[];return Reflect.defineMetadata($a,t,e),e}}function bl(e){return Df(new Bn(ln,e))}function Lf(e){return function(t){return function(n,r,i){if(t===void 0){var o=typeof n=="function"?n.name:n.constructor.name;throw new Error(cp(o))}return Df(new Bn(e,t))(n,r,i)}}}var wt=Lf(ks);function Og(){return function(e,t,n){var r=new Bn(xs,!0);If(e,t,n,r)}}var Rg=Lf(oi),ls=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ig(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}/*! *****************************************************************************
|
|
9
|
+
Copyright (C) Microsoft. All rights reserved.
|
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
11
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
12
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
|
|
14
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
16
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
17
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
18
|
+
|
|
19
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
20
|
+
and limitations under the License.
|
|
21
|
+
***************************************************************************** */var Bu;(function(e){(function(t){var n=typeof globalThis=="object"?globalThis:typeof ls=="object"?ls:typeof self=="object"?self:typeof this=="object"?this:c(),r=i(e);typeof n.Reflect<"u"&&(r=i(n.Reflect,r)),t(r,n),typeof n.Reflect>"u"&&(n.Reflect=e);function i(f,h){return function(p,v){Object.defineProperty(f,p,{configurable:!0,writable:!0,value:v}),h&&h(p,v)}}function o(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function c(){return o()||a()}})(function(t,n){var r=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",o=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",c=typeof Object.create=="function",f={__proto__:[]}instanceof Array,h=!c&&!f,p={create:c?function(){return ht(Object.create(null))}:f?function(){return ht({__proto__:null})}:function(){return ht({})},has:h?function(O,j){return r.call(O,j)}:function(O,j){return j in O},get:h?function(O,j){return r.call(O,j)?O[j]:void 0}:function(O,j){return O[j]}},v=Object.getPrototypeOf(Function),y=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:$e(),k=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Qe(),D=typeof WeakMap=="function"?WeakMap:it(),z=i?Symbol.for("@reflect-metadata:registry"):void 0,ae=de(),re=Ee(ae);function Q(O,j,V,ee){if(xe(V)){if(!Xe(O))throw new TypeError;if(!_(j))throw new TypeError;return he(O,j)}else{if(!Xe(O))throw new TypeError;if(!at(j))throw new TypeError;if(!at(ee)&&!xe(ee)&&!It(ee))throw new TypeError;return It(ee)&&(ee=void 0),V=me(V),Le(O,j,V,ee)}}t("decorate",Q);function _e(O,j){function V(ee,H){if(!at(ee))throw new TypeError;if(!xe(H)&&!x(H))throw new TypeError;Fe(O,j,ee,H)}return V}t("metadata",_e);function Te(O,j,V,ee){if(!at(V))throw new TypeError;return xe(ee)||(ee=me(ee)),Fe(O,j,V,ee)}t("defineMetadata",Te);function le(O,j,V){if(!at(j))throw new TypeError;return xe(V)||(V=me(V)),dt(O,j,V)}t("hasMetadata",le);function Z(O,j,V){if(!at(j))throw new TypeError;return xe(V)||(V=me(V)),Ct(O,j,V)}t("hasOwnMetadata",Z);function Ce(O,j,V){if(!at(j))throw new TypeError;return xe(V)||(V=me(V)),Ze(O,j,V)}t("getMetadata",Ce);function ye(O,j,V){if(!at(j))throw new TypeError;return xe(V)||(V=me(V)),Ye(O,j,V)}t("getOwnMetadata",ye);function Re(O,j){if(!at(O))throw new TypeError;return xe(j)||(j=me(j)),Lt(O,j)}t("getMetadataKeys",Re);function Ie(O,j){if(!at(O))throw new TypeError;return xe(j)||(j=me(j)),Et(O,j)}t("getOwnMetadataKeys",Ie);function Ge(O,j,V){if(!at(j))throw new TypeError;if(xe(V)||(V=me(V)),!at(j))throw new TypeError;xe(V)||(V=me(V));var ee=Ae(j,V,!1);return xe(ee)?!1:ee.OrdinaryDeleteMetadata(O,j,V)}t("deleteMetadata",Ge);function he(O,j){for(var V=O.length-1;V>=0;--V){var ee=O[V],H=ee(j);if(!xe(H)&&!It(H)){if(!_(H))throw new TypeError;j=H}}return j}function Le(O,j,V,ee){for(var H=O.length-1;H>=0;--H){var We=O[H],ze=We(j,V,ee);if(!xe(ze)&&!It(ze)){if(!at(ze))throw new TypeError;ee=ze}}return ee}function dt(O,j,V){var ee=Ct(O,j,V);if(ee)return!0;var H=J(j);return It(H)?!1:dt(O,H,V)}function Ct(O,j,V){var ee=Ae(j,V,!1);return xe(ee)?!1:ge(ee.OrdinaryHasOwnMetadata(O,j,V))}function Ze(O,j,V){var ee=Ct(O,j,V);if(ee)return Ye(O,j,V);var H=J(j);if(!It(H))return Ze(O,H,V)}function Ye(O,j,V){var ee=Ae(j,V,!1);if(!xe(ee))return ee.OrdinaryGetOwnMetadata(O,j,V)}function Fe(O,j,V,ee){var H=Ae(V,ee,!0);H.OrdinaryDefineOwnMetadata(O,j,V,ee)}function Lt(O,j){var V=Et(O,j),ee=J(O);if(ee===null)return V;var H=Lt(ee,j);if(H.length<=0)return V;if(V.length<=0)return H;for(var We=new k,ze=[],je=0,F=V;je<F.length;je++){var ve=F[je],be=We.has(ve);be||(We.add(ve),ze.push(ve))}for(var we=0,Be=H;we<Be.length;we++){var ve=Be[we],be=We.has(ve);be||(We.add(ve),ze.push(ve))}return ze}function Et(O,j){var V=Ae(O,j,!1);return V?V.OrdinaryOwnMetadataKeys(O,j):[]}function Bt(O){if(O===null)return 1;switch(typeof O){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return O===null?1:6;default:return 6}}function xe(O){return O===void 0}function It(O){return O===null}function vn(O){return typeof O=="symbol"}function at(O){return typeof O=="object"?O!==null:typeof O=="function"}function pt(O,j){switch(Bt(O)){case 0:return O;case 1:return O;case 2:return O;case 3:return O;case 4:return O;case 5:return O}var V="string",ee=G(O,o);if(ee!==void 0){var H=ee.call(O,V);if(at(H))throw new TypeError;return H}return W(O)}function W(O,j){var V,ee;{var H=O.toString;if(Se(H)){var ee=H.call(O);if(!at(ee))return ee}var V=O.valueOf;if(Se(V)){var ee=V.call(O);if(!at(ee))return ee}}throw new TypeError}function ge(O){return!!O}function U(O){return""+O}function me(O){var j=pt(O);return vn(j)?j:U(j)}function Xe(O){return Array.isArray?Array.isArray(O):O instanceof Object?O instanceof Array:Object.prototype.toString.call(O)==="[object Array]"}function Se(O){return typeof O=="function"}function _(O){return typeof O=="function"}function x(O){switch(Bt(O)){case 3:return!0;case 4:return!0;default:return!1}}function L(O,j){return O===j||O!==O&&j!==j}function G(O,j){var V=O[j];if(V!=null){if(!Se(V))throw new TypeError;return V}}function q(O){var j=G(O,a);if(!Se(j))throw new TypeError;var V=j.call(O);if(!at(V))throw new TypeError;return V}function ne(O){return O.value}function ue(O){var j=O.next();return j.done?!1:j}function te(O){var j=O.return;j&&j.call(O)}function J(O){var j=Object.getPrototypeOf(O);if(typeof O!="function"||O===v||j!==v)return j;var V=O.prototype,ee=V&&Object.getPrototypeOf(V);if(ee==null||ee===Object.prototype)return j;var H=ee.constructor;return typeof H!="function"||H===O?j:H}function Y(){var O;!xe(z)&&typeof n.Reflect<"u"&&!(z in n.Reflect)&&typeof n.Reflect.defineMetadata=="function"&&(O=ke(n.Reflect));var j,V,ee,H=new D,We={registerProvider:ze,getProvider:F,setProvider:be};return We;function ze(we){if(!Object.isExtensible(We))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case O===we:break;case xe(j):j=we;break;case j===we:break;case xe(V):V=we;break;case V===we:break;default:ee===void 0&&(ee=new k),ee.add(we);break}}function je(we,Be){if(!xe(j)){if(j.isProviderFor(we,Be))return j;if(!xe(V)){if(V.isProviderFor(we,Be))return j;if(!xe(ee))for(var lt=q(ee);;){var _t=ue(lt);if(!_t)return;var rn=ne(_t);if(rn.isProviderFor(we,Be))return te(lt),rn}}}if(!xe(O)&&O.isProviderFor(we,Be))return O}function F(we,Be){var lt=H.get(we),_t;return xe(lt)||(_t=lt.get(Be)),xe(_t)&&(_t=je(we,Be),xe(_t)||(xe(lt)&&(lt=new y,H.set(we,lt)),lt.set(Be,_t))),_t}function ve(we){if(xe(we))throw new TypeError;return j===we||V===we||!xe(ee)&&ee.has(we)}function be(we,Be,lt){if(!ve(lt))throw new Error("Metadata provider not registered.");var _t=F(we,Be);if(_t!==lt){if(!xe(_t))return!1;var rn=H.get(we);xe(rn)&&(rn=new y,H.set(we,rn)),rn.set(Be,lt)}return!0}}function de(){var O;return!xe(z)&&at(n.Reflect)&&Object.isExtensible(n.Reflect)&&(O=n.Reflect[z]),xe(O)&&(O=Y()),!xe(z)&&at(n.Reflect)&&Object.isExtensible(n.Reflect)&&Object.defineProperty(n.Reflect,z,{enumerable:!1,configurable:!1,writable:!1,value:O}),O}function Ee(O){var j=new D,V={isProviderFor:function(ve,be){var we=j.get(ve);return xe(we)?!1:we.has(be)},OrdinaryDefineOwnMetadata:ze,OrdinaryHasOwnMetadata:H,OrdinaryGetOwnMetadata:We,OrdinaryOwnMetadataKeys:je,OrdinaryDeleteMetadata:F};return ae.registerProvider(V),V;function ee(ve,be,we){var Be=j.get(ve),lt=!1;if(xe(Be)){if(!we)return;Be=new y,j.set(ve,Be),lt=!0}var _t=Be.get(be);if(xe(_t)){if(!we)return;if(_t=new y,Be.set(be,_t),!O.setProvider(ve,be,V))throw Be.delete(be),lt&&j.delete(ve),new Error("Wrong provider for target.")}return _t}function H(ve,be,we){var Be=ee(be,we,!1);return xe(Be)?!1:ge(Be.has(ve))}function We(ve,be,we){var Be=ee(be,we,!1);if(!xe(Be))return Be.get(ve)}function ze(ve,be,we,Be){var lt=ee(we,Be,!0);lt.set(ve,be)}function je(ve,be){var we=[],Be=ee(ve,be,!1);if(xe(Be))return we;for(var lt=Be.keys(),_t=q(lt),rn=0;;){var Rn=ue(_t);if(!Rn)return we.length=rn,we;var Wn=ne(Rn);try{we[rn]=Wn}catch(di){try{te(_t)}finally{throw di}}rn++}}function F(ve,be,we){var Be=ee(be,we,!1);if(xe(Be)||!Be.delete(ve))return!1;if(Be.size===0){var lt=j.get(be);xe(lt)||(lt.delete(we),lt.size===0&&j.delete(lt))}return!0}}function ke(O){var j=O.defineMetadata,V=O.hasOwnMetadata,ee=O.getOwnMetadata,H=O.getOwnMetadataKeys,We=O.deleteMetadata,ze=new D,je={isProviderFor:function(F,ve){var be=ze.get(F);return!xe(be)&&be.has(ve)?!0:H(F,ve).length?(xe(be)&&(be=new k,ze.set(F,be)),be.add(ve),!0):!1},OrdinaryDefineOwnMetadata:j,OrdinaryHasOwnMetadata:V,OrdinaryGetOwnMetadata:ee,OrdinaryOwnMetadataKeys:H,OrdinaryDeleteMetadata:We};return je}function Ae(O,j,V){var ee=ae.getProvider(O,j);if(!xe(ee))return ee;if(V){if(ae.setProvider(O,j,re))return re;throw new Error("Illegal state.")}}function $e(){var O={},j=[],V=function(){function je(F,ve,be){this._index=0,this._keys=F,this._values=ve,this._selector=be}return je.prototype["@@iterator"]=function(){return this},je.prototype[a]=function(){return this},je.prototype.next=function(){var F=this._index;if(F>=0&&F<this._keys.length){var ve=this._selector(this._keys[F],this._values[F]);return F+1>=this._keys.length?(this._index=-1,this._keys=j,this._values=j):this._index++,{value:ve,done:!1}}return{value:void 0,done:!0}},je.prototype.throw=function(F){throw this._index>=0&&(this._index=-1,this._keys=j,this._values=j),F},je.prototype.return=function(F){return this._index>=0&&(this._index=-1,this._keys=j,this._values=j),{value:F,done:!0}},je}(),ee=function(){function je(){this._keys=[],this._values=[],this._cacheKey=O,this._cacheIndex=-2}return Object.defineProperty(je.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),je.prototype.has=function(F){return this._find(F,!1)>=0},je.prototype.get=function(F){var ve=this._find(F,!1);return ve>=0?this._values[ve]:void 0},je.prototype.set=function(F,ve){var be=this._find(F,!0);return this._values[be]=ve,this},je.prototype.delete=function(F){var ve=this._find(F,!1);if(ve>=0){for(var be=this._keys.length,we=ve+1;we<be;we++)this._keys[we-1]=this._keys[we],this._values[we-1]=this._values[we];return this._keys.length--,this._values.length--,L(F,this._cacheKey)&&(this._cacheKey=O,this._cacheIndex=-2),!0}return!1},je.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=O,this._cacheIndex=-2},je.prototype.keys=function(){return new V(this._keys,this._values,H)},je.prototype.values=function(){return new V(this._keys,this._values,We)},je.prototype.entries=function(){return new V(this._keys,this._values,ze)},je.prototype["@@iterator"]=function(){return this.entries()},je.prototype[a]=function(){return this.entries()},je.prototype._find=function(F,ve){if(!L(this._cacheKey,F)){this._cacheIndex=-1;for(var be=0;be<this._keys.length;be++)if(L(this._keys[be],F)){this._cacheIndex=be;break}}return this._cacheIndex<0&&ve&&(this._cacheIndex=this._keys.length,this._keys.push(F),this._values.push(void 0)),this._cacheIndex},je}();return ee;function H(je,F){return je}function We(je,F){return F}function ze(je,F){return[je,F]}}function Qe(){var O=function(){function j(){this._map=new y}return Object.defineProperty(j.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),j.prototype.has=function(V){return this._map.has(V)},j.prototype.add=function(V){return this._map.set(V,V),this},j.prototype.delete=function(V){return this._map.delete(V)},j.prototype.clear=function(){this._map.clear()},j.prototype.keys=function(){return this._map.keys()},j.prototype.values=function(){return this._map.keys()},j.prototype.entries=function(){return this._map.entries()},j.prototype["@@iterator"]=function(){return this.keys()},j.prototype[a]=function(){return this.keys()},j}();return O}function it(){var O=16,j=p.create(),V=ee();return function(){function F(){this._key=ee()}return F.prototype.has=function(ve){var be=H(ve,!1);return be!==void 0?p.has(be,this._key):!1},F.prototype.get=function(ve){var be=H(ve,!1);return be!==void 0?p.get(be,this._key):void 0},F.prototype.set=function(ve,be){var we=H(ve,!0);return we[this._key]=be,this},F.prototype.delete=function(ve){var be=H(ve,!1);return be!==void 0?delete be[this._key]:!1},F.prototype.clear=function(){this._key=ee()},F}();function ee(){var F;do F="@@WeakMap@@"+je();while(p.has(j,F));return j[F]=!0,F}function H(F,ve){if(!r.call(F,V)){if(!ve)return;Object.defineProperty(F,V,{value:p.create()})}return F[V]}function We(F,ve){for(var be=0;be<ve;++be)F[be]=Math.random()*255|0;return F}function ze(F){if(typeof Uint8Array=="function"){var ve=new Uint8Array(F);return typeof crypto<"u"?crypto.getRandomValues(ve):typeof msCrypto<"u"?msCrypto.getRandomValues(ve):We(ve,F),ve}return We(new Array(F),F)}function je(){var F=ze(O);F[6]=F[6]&79|64,F[8]=F[8]&191|128;for(var ve="",be=0;be<O;++be){var we=F[be];(be===4||be===6||be===8)&&(ve+="-"),we<16&&(ve+="0"),ve+=we.toString(16).toLowerCase()}return ve}}function ht(O){return O.__=void 0,delete O.__,O}})})(Bu||(Bu={}));/**
|
|
22
|
+
* @vue/shared v3.4.27
|
|
23
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
24
|
+
* @license MIT
|
|
25
|
+
**//*! #__NO_SIDE_EFFECTS__ */function _l(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const vt={},Jr=[],dn=()=>{},Mg=()=>!1,Es=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),wl=e=>e.startsWith("onUpdate:"),Rt=Object.assign,xl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Dg=Object.prototype.hasOwnProperty,Je=(e,t)=>Dg.call(e,t),Oe=Array.isArray,ei=e=>oo(e)==="[object Map]",As=e=>oo(e)==="[object Set]",Uu=e=>oo(e)==="[object Date]",De=e=>typeof e=="function",xt=e=>typeof e=="string",Un=e=>typeof e=="symbol",ct=e=>e!==null&&typeof e=="object",jf=e=>(ct(e)||De(e))&&De(e.then)&&De(e.catch),Nf=Object.prototype.toString,oo=e=>Nf.call(e),Lg=e=>oo(e).slice(8,-1),$f=e=>oo(e)==="[object Object]",kl=e=>xt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ii=_l(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ps=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},jg=/-(\w)/g,On=Ps(e=>e.replace(jg,(t,n)=>n?n.toUpperCase():"")),Ng=/\B([A-Z])/g,Br=Ps(e=>e.replace(Ng,"-$1").toLowerCase()),Ts=Ps(e=>e.charAt(0).toUpperCase()+e.slice(1)),wa=Ps(e=>e?`on${Ts(e)}`:""),hr=(e,t)=>!Object.is(e,t),Zo=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Ff=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},us=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Bf=e=>{const t=xt(e)?Number(e):NaN;return isNaN(t)?e:t};let Ku;const Uf=()=>Ku||(Ku=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Os(e){if(Oe(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],i=xt(r)?Ug(r):Os(r);if(i)for(const o in i)t[o]=i[o]}return t}else if(xt(e)||ct(e))return e}const $g=/;(?![^(]*\))/g,Fg=/:([^]+)/,Bg=/\/\*[^]*?\*\//g;function Ug(e){const t={};return e.replace(Bg,"").split($g).forEach(n=>{if(n){const r=n.split(Fg);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Ur(e){let t="";if(xt(e))t=e;else if(Oe(e))for(let n=0;n<e.length;n++){const r=Ur(e[n]);r&&(t+=r+" ")}else if(ct(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Cx(e){if(!e)return null;let{class:t,style:n}=e;return t&&!xt(t)&&(e.class=Ur(t)),n&&(e.style=Os(n)),e}const Kg="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Vg=_l(Kg);function Kf(e){return!!e||e===""}function qg(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Rs(e[r],t[r]);return n}function Rs(e,t){if(e===t)return!0;let n=Uu(e),r=Uu(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=Un(e),r=Un(t),n||r)return e===t;if(n=Oe(e),r=Oe(t),n||r)return n&&r?qg(e,t):!1;if(n=ct(e),r=ct(t),n||r){if(!n||!r)return!1;const i=Object.keys(e).length,o=Object.keys(t).length;if(i!==o)return!1;for(const a in e){const c=e.hasOwnProperty(a),f=t.hasOwnProperty(a);if(c&&!f||!c&&f||!Rs(e[a],t[a]))return!1}}return String(e)===String(t)}function Wg(e,t){return e.findIndex(n=>Rs(n,t))}const Tn=e=>xt(e)?e:e==null?"":Oe(e)||ct(e)&&(e.toString===Nf||!De(e.toString))?JSON.stringify(e,Vf,2):String(e),Vf=(e,t)=>t&&t.__v_isRef?Vf(e,t.value):ei(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i],o)=>(n[xa(r,o)+" =>"]=i,n),{})}:As(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>xa(n))}:Un(t)?xa(t):ct(t)&&!Oe(t)&&!$f(t)?String(t):t,xa=(e,t="")=>{var n;return Un(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
26
|
+
* @vue/reactivity v3.4.27
|
|
27
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
28
|
+
* @license MIT
|
|
29
|
+
**/let sn;class qf{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=sn,!t&&sn&&(this.index=(sn.scopes||(sn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=sn;try{return sn=this,t()}finally{sn=n}}}on(){sn=this}off(){sn=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function Sx(e){return new qf(e)}function zg(e,t=sn){t&&t.active&&t.effects.push(e)}function Hg(){return sn}function Ex(e){sn&&sn.cleanups.push(e)}let Ir;class Cl{constructor(t,n,r,i){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,zg(this,i)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,mr();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(Gg(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),vr()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=cr,n=Ir;try{return cr=!0,Ir=this,this._runnings++,Vu(this),this.fn()}finally{qu(this),this._runnings--,Ir=n,cr=t}}stop(){this.active&&(Vu(this),qu(this),this.onStop&&this.onStop(),this.active=!1)}}function Gg(e){return e.value}function Vu(e){e._trackId++,e._depsLength=0}function qu(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Wf(e.deps[t],e);e.deps.length=e._depsLength}}function Wf(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let cr=!0,Ua=0;const zf=[];function mr(){zf.push(cr),cr=!1}function vr(){const e=zf.pop();cr=e===void 0?!0:e}function Sl(){Ua++}function El(){for(Ua--;!Ua&&Ka.length;)Ka.shift()()}function Hf(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const r=e.deps[e._depsLength];r!==t?(r&&Wf(r,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Ka=[];function Gf(e,t,n){Sl();for(const r of e.keys()){let i;r._dirtyLevel<t&&(i??(i=e.get(r)===r._trackId))&&(r._shouldSchedule||(r._shouldSchedule=r._dirtyLevel===0),r._dirtyLevel=t),r._shouldSchedule&&(i??(i=e.get(r)===r._trackId))&&(r.trigger(),(!r._runnings||r.allowRecurse)&&r._dirtyLevel!==2&&(r._shouldSchedule=!1,r.scheduler&&Ka.push(r.scheduler)))}El()}const Xf=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},cs=new WeakMap,Mr=Symbol(""),Va=Symbol("");function nn(e,t,n){if(cr&&Ir){let r=cs.get(e);r||cs.set(e,r=new Map);let i=r.get(n);i||r.set(n,i=Xf(()=>r.delete(n))),Hf(Ir,i)}}function Fn(e,t,n,r,i,o){const a=cs.get(e);if(!a)return;let c=[];if(t==="clear")c=[...a.values()];else if(n==="length"&&Oe(e)){const f=Number(r);a.forEach((h,p)=>{(p==="length"||!Un(p)&&p>=f)&&c.push(h)})}else switch(n!==void 0&&c.push(a.get(n)),t){case"add":Oe(e)?kl(n)&&c.push(a.get("length")):(c.push(a.get(Mr)),ei(e)&&c.push(a.get(Va)));break;case"delete":Oe(e)||(c.push(a.get(Mr)),ei(e)&&c.push(a.get(Va)));break;case"set":ei(e)&&c.push(a.get(Mr));break}Sl();for(const f of c)f&&Gf(f,4);El()}function Xg(e,t){const n=cs.get(e);return n&&n.get(t)}const Yg=_l("__proto__,__v_isRef,__isVue"),Yf=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Un)),Wu=Qg();function Qg(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=et(this);for(let o=0,a=this.length;o<a;o++)nn(r,"get",o+"");const i=r[t](...n);return i===-1||i===!1?r[t](...n.map(et)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){mr(),Sl();const r=et(this)[t].apply(this,n);return El(),vr(),r}}),e}function Zg(e){Un(e)||(e=String(e));const t=et(this);return nn(t,"has",e),t.hasOwnProperty(e)}class Qf{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const i=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(i?o?fm:th:o?eh:Jf).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const a=Oe(t);if(!i){if(a&&Je(Wu,n))return Reflect.get(Wu,n,r);if(n==="hasOwnProperty")return Zg}const c=Reflect.get(t,n,r);return(Un(n)?Yf.has(n):Yg(n))||(i||nn(t,"get",n),o)?c:Ht(c)?a&&kl(n)?c:c.value:ct(c)?i?rh(c):Ms(c):c}}class Zf extends Qf{constructor(t=!1){super(!1,t)}set(t,n,r,i){let o=t[n];if(!this._isShallow){const f=qi(o);if(!fs(r)&&!qi(r)&&(o=et(o),r=et(r)),!Oe(t)&&Ht(o)&&!Ht(r))return f?!1:(o.value=r,!0)}const a=Oe(t)&&kl(n)?Number(n)<t.length:Je(t,n),c=Reflect.set(t,n,r,i);return t===et(i)&&(a?hr(r,o)&&Fn(t,"set",n,r):Fn(t,"add",n,r)),c}deleteProperty(t,n){const r=Je(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&r&&Fn(t,"delete",n,void 0),i}has(t,n){const r=Reflect.has(t,n);return(!Un(n)||!Yf.has(n))&&nn(t,"has",n),r}ownKeys(t){return nn(t,"iterate",Oe(t)?"length":Mr),Reflect.ownKeys(t)}}class Jg extends Qf{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const em=new Zf,tm=new Jg,nm=new Zf(!0);const Al=e=>e,Is=e=>Reflect.getPrototypeOf(e);function No(e,t,n=!1,r=!1){e=e.__v_raw;const i=et(e),o=et(t);n||(hr(t,o)&&nn(i,"get",t),nn(i,"get",o));const{has:a}=Is(i),c=r?Al:n?Ol:Wi;if(a.call(i,t))return c(e.get(t));if(a.call(i,o))return c(e.get(o));e!==i&&e.get(t)}function $o(e,t=!1){const n=this.__v_raw,r=et(n),i=et(e);return t||(hr(e,i)&&nn(r,"has",e),nn(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function Fo(e,t=!1){return e=e.__v_raw,!t&&nn(et(e),"iterate",Mr),Reflect.get(e,"size",e)}function zu(e){e=et(e);const t=et(this);return Is(t).has.call(t,e)||(t.add(e),Fn(t,"add",e,e)),this}function Hu(e,t){t=et(t);const n=et(this),{has:r,get:i}=Is(n);let o=r.call(n,e);o||(e=et(e),o=r.call(n,e));const a=i.call(n,e);return n.set(e,t),o?hr(t,a)&&Fn(n,"set",e,t):Fn(n,"add",e,t),this}function Gu(e){const t=et(this),{has:n,get:r}=Is(t);let i=n.call(t,e);i||(e=et(e),i=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return i&&Fn(t,"delete",e,void 0),o}function Xu(){const e=et(this),t=e.size!==0,n=e.clear();return t&&Fn(e,"clear",void 0,void 0),n}function Bo(e,t){return function(r,i){const o=this,a=o.__v_raw,c=et(a),f=t?Al:e?Ol:Wi;return!e&&nn(c,"iterate",Mr),a.forEach((h,p)=>r.call(i,f(h),f(p),o))}}function Uo(e,t,n){return function(...r){const i=this.__v_raw,o=et(i),a=ei(o),c=e==="entries"||e===Symbol.iterator&&a,f=e==="keys"&&a,h=i[e](...r),p=n?Al:t?Ol:Wi;return!t&&nn(o,"iterate",f?Va:Mr),{next(){const{value:v,done:y}=h.next();return y?{value:v,done:y}:{value:c?[p(v[0]),p(v[1])]:p(v),done:y}},[Symbol.iterator](){return this}}}}function Zn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function rm(){const e={get(o){return No(this,o)},get size(){return Fo(this)},has:$o,add:zu,set:Hu,delete:Gu,clear:Xu,forEach:Bo(!1,!1)},t={get(o){return No(this,o,!1,!0)},get size(){return Fo(this)},has:$o,add:zu,set:Hu,delete:Gu,clear:Xu,forEach:Bo(!1,!0)},n={get(o){return No(this,o,!0)},get size(){return Fo(this,!0)},has(o){return $o.call(this,o,!0)},add:Zn("add"),set:Zn("set"),delete:Zn("delete"),clear:Zn("clear"),forEach:Bo(!0,!1)},r={get(o){return No(this,o,!0,!0)},get size(){return Fo(this,!0)},has(o){return $o.call(this,o,!0)},add:Zn("add"),set:Zn("set"),delete:Zn("delete"),clear:Zn("clear"),forEach:Bo(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=Uo(o,!1,!1),n[o]=Uo(o,!0,!1),t[o]=Uo(o,!1,!0),r[o]=Uo(o,!0,!0)}),[e,n,t,r]}const[im,om,sm,am]=rm();function Pl(e,t){const n=t?e?am:sm:e?om:im;return(r,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(Je(n,i)&&i in r?n:r,i,o)}const lm={get:Pl(!1,!1)},um={get:Pl(!1,!0)},cm={get:Pl(!0,!1)};const Jf=new WeakMap,eh=new WeakMap,th=new WeakMap,fm=new WeakMap;function hm(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function dm(e){return e.__v_skip||!Object.isExtensible(e)?0:hm(Lg(e))}function Ms(e){return qi(e)?e:Tl(e,!1,em,lm,Jf)}function nh(e){return Tl(e,!1,nm,um,eh)}function rh(e){return Tl(e,!0,tm,cm,th)}function Tl(e,t,n,r,i){if(!ct(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const a=dm(e);if(a===0)return e;const c=new Proxy(e,a===2?r:n);return i.set(e,c),c}function Mi(e){return qi(e)?Mi(e.__v_raw):!!(e&&e.__v_isReactive)}function qi(e){return!!(e&&e.__v_isReadonly)}function fs(e){return!!(e&&e.__v_isShallow)}function ih(e){return e?!!e.__v_raw:!1}function et(e){const t=e&&e.__v_raw;return t?et(t):e}function oh(e){return Object.isExtensible(e)&&Ff(e,"__v_skip",!0),e}const Wi=e=>ct(e)?Ms(e):e,Ol=e=>ct(e)?rh(e):e;class sh{constructor(t,n,r,i){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Cl(()=>t(this._value),()=>Di(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=et(this);return(!t._cacheable||t.effect.dirty)&&hr(t._value,t._value=t.effect.run())&&Di(t,4),Rl(t),t.effect._dirtyLevel>=2&&Di(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function pm(e,t,n=!1){let r,i;const o=De(e);return o?(r=e,i=dn):(r=e.get,i=e.set),new sh(r,i,o||!i,n)}function Rl(e){var t;cr&&Ir&&(e=et(e),Hf(Ir,(t=e.dep)!=null?t:e.dep=Xf(()=>e.dep=void 0,e instanceof sh?e:void 0)))}function Di(e,t=4,n){e=et(e);const r=e.dep;r&&Gf(r,t)}function Ht(e){return!!(e&&e.__v_isRef===!0)}function Ot(e){return lh(e,!1)}function ah(e){return lh(e,!0)}function lh(e,t){return Ht(e)?e:new gm(e,t)}class gm{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:et(t),this._value=n?t:Wi(t)}get value(){return Rl(this),this._value}set value(t){const n=this.__v_isShallow||fs(t)||qi(t);t=n?t:et(t),hr(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:Wi(t),Di(this,4))}}function rt(e){return Ht(e)?e.value:e}const mm={get:(e,t,n)=>rt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return Ht(i)&&!Ht(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function uh(e){return Mi(e)?e:new Proxy(e,mm)}class vm{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Rl(this),()=>Di(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function Ax(e){return new vm(e)}function Px(e){const t=Oe(e)?new Array(e.length):{};for(const n in e)t[n]=ch(e,n);return t}class ym{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Xg(et(this._object),this._key)}}class bm{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Tx(e,t,n){return Ht(e)?e:De(e)?new bm(e):ct(e)&&arguments.length>1?ch(e,t,n):Ot(e)}function ch(e,t,n){const r=e[t];return Ht(r)?r:new ym(e,t,n)}/**
|
|
30
|
+
* @vue/runtime-core v3.4.27
|
|
31
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
32
|
+
* @license MIT
|
|
33
|
+
**/function fr(e,t,n,r){try{return r?e(...r):e()}catch(i){hi(i,t,n)}}function mn(e,t,n,r){if(De(e)){const i=fr(e,t,n,r);return i&&jf(i)&&i.catch(o=>{hi(o,t,n)}),i}if(Oe(e)){const i=[];for(let o=0;o<e.length;o++)i.push(mn(e[o],t,n,r));return i}}function hi(e,t,n,r=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const a=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const h=o.ec;if(h){for(let p=0;p<h.length;p++)if(h[p](e,a,c)===!1)return}o=o.parent}const f=t.appContext.config.errorHandler;if(f){mr(),fr(f,null,10,[e,a,c]),vr();return}}_m(e,n,i,r)}function _m(e,t,n,r=!0){console.error(e)}let zi=!1,qa=!1;const zt=[];let Cn=0;const ti=[];let ir=null,Tr=0;const fh=Promise.resolve();let Il=null;function Ml(e){const t=Il||fh;return e?t.then(this?e.bind(this):e):t}function wm(e){let t=Cn+1,n=zt.length;for(;t<n;){const r=t+n>>>1,i=zt[r],o=Hi(i);o<e||o===e&&i.pre?t=r+1:n=r}return t}function Ds(e){(!zt.length||!zt.includes(e,zi&&e.allowRecurse?Cn+1:Cn))&&(e.id==null?zt.push(e):zt.splice(wm(e.id),0,e),hh())}function hh(){!zi&&!qa&&(qa=!0,Il=fh.then(ph))}function xm(e){const t=zt.indexOf(e);t>Cn&&zt.splice(t,1)}function Wa(e){Oe(e)?ti.push(...e):(!ir||!ir.includes(e,e.allowRecurse?Tr+1:Tr))&&ti.push(e),hh()}function Yu(e,t,n=zi?Cn+1:0){for(;n<zt.length;n++){const r=zt[n];if(r&&r.pre){if(e&&r.id!==e.uid)continue;zt.splice(n,1),n--,r()}}}function dh(e){if(ti.length){const t=[...new Set(ti)].sort((n,r)=>Hi(n)-Hi(r));if(ti.length=0,ir){ir.push(...t);return}for(ir=t,Tr=0;Tr<ir.length;Tr++)ir[Tr]();ir=null,Tr=0}}const Hi=e=>e.id==null?1/0:e.id,km=(e,t)=>{const n=Hi(e)-Hi(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function ph(e){qa=!1,zi=!0,zt.sort(km);try{for(Cn=0;Cn<zt.length;Cn++){const t=zt[Cn];t&&t.active!==!1&&fr(t,null,14)}}finally{Cn=0,zt.length=0,dh(),zi=!1,Il=null,(zt.length||ti.length)&&ph()}}function Cm(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||vt;let i=n;const o=t.startsWith("update:"),a=o&&t.slice(7);if(a&&a in r){const p=`${a==="modelValue"?"model":a}Modifiers`,{number:v,trim:y}=r[p]||vt;y&&(i=n.map(k=>xt(k)?k.trim():k)),v&&(i=n.map(us))}let c,f=r[c=wa(t)]||r[c=wa(On(t))];!f&&o&&(f=r[c=wa(Br(t))]),f&&mn(f,e,6,i);const h=r[c+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,mn(h,e,6,i)}}function gh(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const o=e.emits;let a={},c=!1;if(!De(e)){const f=h=>{const p=gh(h,t,!0);p&&(c=!0,Rt(a,p))};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!o&&!c?(ct(e)&&r.set(e,null),null):(Oe(o)?o.forEach(f=>a[f]=null):Rt(a,o),ct(e)&&r.set(e,a),a)}function Ls(e,t){return!e||!Es(t)?!1:(t=t.slice(2).replace(/Once$/,""),Je(e,t[0].toLowerCase()+t.slice(1))||Je(e,Br(t))||Je(e,t))}let Dt=null,js=null;function hs(e){const t=Dt;return Dt=e,js=e&&e.type.__scopeId||null,t}function mh(e){js=e}function vh(){js=null}function pn(e,t=Dt,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&fc(-1);const o=hs(t);let a;try{a=e(...i)}finally{hs(o),r._d&&fc(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function ka(e){const{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[o],slots:a,attrs:c,emit:f,render:h,renderCache:p,props:v,data:y,setupState:k,ctx:D,inheritAttrs:z}=e,ae=hs(e);let re,Q;try{if(n.shapeFlag&4){const Te=i||r,le=Te;re=bn(h.call(le,Te,p,v,k,y,D)),Q=c}else{const Te=t;re=bn(Te.length>1?Te(v,{attrs:c,slots:a,emit:f}):Te(v,null)),Q=t.props?c:Em(c)}}catch(Te){$i.length=0,hi(Te,e,1),re=oe(Qt)}let _e=re;if(Q&&z!==!1){const Te=Object.keys(Q),{shapeFlag:le}=_e;Te.length&&le&7&&(o&&Te.some(wl)&&(Q=Am(Q,o)),_e=dr(_e,Q,!1,!0))}return n.dirs&&(_e=dr(_e,null,!1,!0),_e.dirs=_e.dirs?_e.dirs.concat(n.dirs):n.dirs),n.transition&&(_e.transition=n.transition),re=_e,hs(ae),re}function Sm(e,t=!0){let n;for(let r=0;r<e.length;r++){const i=e[r];if(Qi(i)){if(i.type!==Qt||i.children==="v-if"){if(n)return;n=i}}else return}return n}const Em=e=>{let t;for(const n in e)(n==="class"||n==="style"||Es(n))&&((t||(t={}))[n]=e[n]);return t},Am=(e,t)=>{const n={};for(const r in e)(!wl(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Pm(e,t,n){const{props:r,children:i,component:o}=e,{props:a,children:c,patchFlag:f}=t,h=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&f>=0){if(f&1024)return!0;if(f&16)return r?Qu(r,a,h):!!a;if(f&8){const p=t.dynamicProps;for(let v=0;v<p.length;v++){const y=p[v];if(a[y]!==r[y]&&!Ls(h,y))return!0}}}else return(i||c)&&(!c||!c.$stable)?!0:r===a?!1:r?a?Qu(r,a,h):!0:!!a;return!1}function Qu(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){const o=r[i];if(t[o]!==e[o]&&!Ls(n,o))return!0}return!1}function Dl({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const Ll="components",Tm="directives";function St(e,t){return Nl(Ll,e,!0,t)||e}const yh=Symbol.for("v-ndc");function jl(e){return xt(e)?Nl(Ll,e,!1)||e:e||yh}function Ox(e){return Nl(Tm,e)}function Nl(e,t,n=!0,r=!1){const i=Dt||Nt;if(i){const o=i.type;if(e===Ll){const c=Av(o,!1);if(c&&(c===t||c===On(t)||c===Ts(On(t))))return o}const a=Zu(i[e]||o[e],t)||Zu(i.appContext[e],t);return!a&&r?o:a}}function Zu(e,t){return e&&(e[t]||e[On(t)]||e[Ts(On(t))])}const Om=e=>e.__isSuspense;let za=0;const Rm={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,o,a,c,f,h){if(e==null)Im(t,n,r,i,o,a,c,f,h);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Mm(e,t,n,r,i,a,c,f,h)}},hydrate:Dm,create:$l,normalize:Lm},Rx=Rm;function Gi(e,t){const n=e.props&&e.props[t];De(n)&&n()}function Im(e,t,n,r,i,o,a,c,f){const{p:h,o:{createElement:p}}=f,v=p("div"),y=e.suspense=$l(e,i,r,t,v,n,o,a,c,f);h(null,y.pendingBranch=e.ssContent,v,null,r,y,o,a),y.deps>0?(Gi(e,"onPending"),Gi(e,"onFallback"),h(null,e.ssFallback,t,n,r,null,o,a),ni(y,e.ssFallback)):y.resolve(!1,!0)}function Mm(e,t,n,r,i,o,a,c,{p:f,um:h,o:{createElement:p}}){const v=t.suspense=e.suspense;v.vnode=t,t.el=e.el;const y=t.ssContent,k=t.ssFallback,{activeBranch:D,pendingBranch:z,isInFallback:ae,isHydrating:re}=v;if(z)v.pendingBranch=y,Sn(y,z)?(f(z,y,v.hiddenContainer,null,i,v,o,a,c),v.deps<=0?v.resolve():ae&&(re||(f(D,k,n,r,i,null,o,a,c),ni(v,k)))):(v.pendingId=za++,re?(v.isHydrating=!1,v.activeBranch=z):h(z,i,v),v.deps=0,v.effects.length=0,v.hiddenContainer=p("div"),ae?(f(null,y,v.hiddenContainer,null,i,v,o,a,c),v.deps<=0?v.resolve():(f(D,k,n,r,i,null,o,a,c),ni(v,k))):D&&Sn(y,D)?(f(D,y,n,r,i,v,o,a,c),v.resolve(!0)):(f(null,y,v.hiddenContainer,null,i,v,o,a,c),v.deps<=0&&v.resolve()));else if(D&&Sn(y,D))f(D,y,n,r,i,v,o,a,c),ni(v,y);else if(Gi(t,"onPending"),v.pendingBranch=y,y.shapeFlag&512?v.pendingId=y.component.suspenseId:v.pendingId=za++,f(null,y,v.hiddenContainer,null,i,v,o,a,c),v.deps<=0)v.resolve();else{const{timeout:Q,pendingId:_e}=v;Q>0?setTimeout(()=>{v.pendingId===_e&&v.fallback(k)},Q):Q===0&&v.fallback(k)}}function $l(e,t,n,r,i,o,a,c,f,h,p=!1){const{p:v,m:y,um:k,n:D,o:{parentNode:z,remove:ae}}=h;let re;const Q=Nm(e);Q&&t&&t.pendingBranch&&(re=t.pendingId,t.deps++);const _e=e.props?Bf(e.props.timeout):void 0,Te=o,le={vnode:e,parent:t,parentComponent:n,namespace:a,container:r,hiddenContainer:i,deps:0,pendingId:za++,timeout:typeof _e=="number"?_e:-1,activeBranch:null,pendingBranch:null,isInFallback:!p,isHydrating:p,isUnmounted:!1,effects:[],resolve(Z=!1,Ce=!1){const{vnode:ye,activeBranch:Re,pendingBranch:Ie,pendingId:Ge,effects:he,parentComponent:Le,container:dt}=le;let Ct=!1;le.isHydrating?le.isHydrating=!1:Z||(Ct=Re&&Ie.transition&&Ie.transition.mode==="out-in",Ct&&(Re.transition.afterLeave=()=>{Ge===le.pendingId&&(y(Ie,dt,o===Te?D(Re):o,0),Wa(he))}),Re&&(z(Re.el)!==le.hiddenContainer&&(o=D(Re)),k(Re,Le,le,!0)),Ct||y(Ie,dt,o,0)),ni(le,Ie),le.pendingBranch=null,le.isInFallback=!1;let Ze=le.parent,Ye=!1;for(;Ze;){if(Ze.pendingBranch){Ze.effects.push(...he),Ye=!0;break}Ze=Ze.parent}!Ye&&!Ct&&Wa(he),le.effects=[],Q&&t&&t.pendingBranch&&re===t.pendingId&&(t.deps--,t.deps===0&&!Ce&&t.resolve()),Gi(ye,"onResolve")},fallback(Z){if(!le.pendingBranch)return;const{vnode:Ce,activeBranch:ye,parentComponent:Re,container:Ie,namespace:Ge}=le;Gi(Ce,"onFallback");const he=D(ye),Le=()=>{le.isInFallback&&(v(null,Z,Ie,he,Re,null,Ge,c,f),ni(le,Z))},dt=Z.transition&&Z.transition.mode==="out-in";dt&&(ye.transition.afterLeave=Le),le.isInFallback=!0,k(ye,Re,null,!0),dt||Le()},move(Z,Ce,ye){le.activeBranch&&y(le.activeBranch,Z,Ce,ye),le.container=Z},next(){return le.activeBranch&&D(le.activeBranch)},registerDep(Z,Ce){const ye=!!le.pendingBranch;ye&&le.deps++;const Re=Z.vnode.el;Z.asyncDep.catch(Ie=>{hi(Ie,Z,0)}).then(Ie=>{if(Z.isUnmounted||le.isUnmounted||le.pendingId!==Z.suspenseId)return;Z.asyncResolved=!0;const{vnode:Ge}=Z;el(Z,Ie,!1),Re&&(Ge.el=Re);const he=!Re&&Z.subTree.el;Ce(Z,Ge,z(Re||Z.subTree.el),Re?null:D(Z.subTree),le,a,f),he&&ae(he),Dl(Z,Ge.el),ye&&--le.deps===0&&le.resolve()})},unmount(Z,Ce){le.isUnmounted=!0,le.activeBranch&&k(le.activeBranch,n,Z,Ce),le.pendingBranch&&k(le.pendingBranch,n,Z,Ce)}};return le}function Dm(e,t,n,r,i,o,a,c,f){const h=t.suspense=$l(t,r,n,e.parentNode,document.createElement("div"),null,i,o,a,c,!0),p=f(e,h.pendingBranch=t.ssContent,n,h,o,a);return h.deps===0&&h.resolve(!1,!0),p}function Lm(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=Ju(r?n.default:n),e.ssFallback=r?Ju(n.fallback):oe(Qt)}function Ju(e){let t;if(De(e)){const n=ai&&e._c;n&&(e._d=!1,qe()),e=e(),n&&(e._d=!0,t=gn,Uh())}return Oe(e)&&(e=Sm(e)),e=bn(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function jm(e,t){t&&t.pendingBranch?Oe(e)?t.effects.push(...e):t.effects.push(e):Wa(e)}function ni(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,Dl(r,i))}function Nm(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const $m=Symbol.for("v-scx"),Fm=()=>bt($m);function Ix(e,t){return Ns(e,null,t)}function Bm(e,t){return Ns(e,null,{flush:"post"})}const Ko={};function Dr(e,t,n){return Ns(e,t,n)}function Ns(e,t,{immediate:n,deep:r,flush:i,once:o,onTrack:a,onTrigger:c}=vt){if(t&&o){const Z=t;t=(...Ce)=>{Z(...Ce),le()}}const f=Nt,h=Z=>r===!0?Z:Rr(Z,r===!1?1:void 0);let p,v=!1,y=!1;if(Ht(e)?(p=()=>e.value,v=fs(e)):Mi(e)?(p=()=>h(e),v=!0):Oe(e)?(y=!0,v=e.some(Z=>Mi(Z)||fs(Z)),p=()=>e.map(Z=>{if(Ht(Z))return Z.value;if(Mi(Z))return h(Z);if(De(Z))return fr(Z,f,2)})):De(e)?t?p=()=>fr(e,f,2):p=()=>(k&&k(),mn(e,f,3,[D])):p=dn,t&&r){const Z=p;p=()=>Rr(Z())}let k,D=Z=>{k=_e.onStop=()=>{fr(Z,f,4),k=_e.onStop=void 0}},z;if(uo)if(D=dn,t?n&&mn(t,f,3,[p(),y?[]:void 0,D]):p(),i==="sync"){const Z=Fm();z=Z.__watcherHandles||(Z.__watcherHandles=[])}else return dn;let ae=y?new Array(e.length).fill(Ko):Ko;const re=()=>{if(!(!_e.active||!_e.dirty))if(t){const Z=_e.run();(r||v||(y?Z.some((Ce,ye)=>hr(Ce,ae[ye])):hr(Z,ae)))&&(k&&k(),mn(t,f,3,[Z,ae===Ko?void 0:y&&ae[0]===Ko?[]:ae,D]),ae=Z)}else _e.run()};re.allowRecurse=!!t;let Q;i==="sync"?Q=re:i==="post"?Q=()=>Jt(re,f&&f.suspense):(re.pre=!0,f&&(re.id=f.uid),Q=()=>Ds(re));const _e=new Cl(p,dn,Q),Te=Hg(),le=()=>{_e.stop(),Te&&xl(Te.effects,_e)};return t?n?re():ae=_e.run():i==="post"?Jt(_e.run.bind(_e),f&&f.suspense):_e.run(),z&&z.push(le),le}function Um(e,t,n){const r=this.proxy,i=xt(e)?e.includes(".")?bh(r,e):()=>r[e]:e.bind(r,r);let o;De(t)?o=t:(o=t.handler,n=t);const a=lo(this),c=Ns(i,o.bind(r),n);return a(),c}function bh(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i<n.length&&r;i++)r=r[n[i]];return r}}function Rr(e,t=1/0,n){if(t<=0||!ct(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Ht(e))Rr(e.value,t,n);else if(Oe(e))for(let r=0;r<e.length;r++)Rr(e[r],t,n);else if(As(e)||ei(e))e.forEach(r=>{Rr(r,t,n)});else if($f(e))for(const r in e)Rr(e[r],t,n);return e}function Mx(e,t){if(Dt===null)return e;const n=Us(Dt)||Dt.proxy,r=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[o,a,c,f=vt]=t[i];o&&(De(o)&&(o={mounted:o,updated:o}),o.deep&&Rr(a),r.push({dir:o,instance:n,value:a,oldValue:void 0,arg:c,modifiers:f}))}return e}function Sr(e,t,n,r){const i=e.dirs,o=t&&t.dirs;for(let a=0;a<i.length;a++){const c=i[a];o&&(c.oldValue=o[a].value);let f=c.dir[r];f&&(mr(),mn(f,n,8,[e.el,c,e,t]),vr())}}const or=Symbol("_leaveCb"),Vo=Symbol("_enterCb");function _h(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Kr(()=>{e.isMounted=!0}),Ch(()=>{e.isUnmounting=!0}),e}const hn=[Function,Array],wh={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:hn,onEnter:hn,onAfterEnter:hn,onEnterCancelled:hn,onBeforeLeave:hn,onLeave:hn,onAfterLeave:hn,onLeaveCancelled:hn,onBeforeAppear:hn,onAppear:hn,onAfterAppear:hn,onAppearCancelled:hn},Km={name:"BaseTransition",props:wh,setup(e,{slots:t}){const n=Bs(),r=_h();return()=>{const i=t.default&&Fl(t.default(),!0);if(!i||!i.length)return;let o=i[0];if(i.length>1){for(const y of i)if(y.type!==Qt){o=y;break}}const a=et(e),{mode:c}=a;if(r.isLeaving)return Ca(o);const f=ec(o);if(!f)return Ca(o);const h=Xi(f,a,r,n);Yi(f,h);const p=n.subTree,v=p&&ec(p);if(v&&v.type!==Qt&&!Sn(f,v)){const y=Xi(v,a,r,n);if(Yi(v,y),c==="out-in"&&f.type!==Qt)return r.isLeaving=!0,y.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Ca(o);c==="in-out"&&f.type!==Qt&&(y.delayLeave=(k,D,z)=>{const ae=xh(r,v);ae[String(v.key)]=v,k[or]=()=>{D(),k[or]=void 0,delete h.delayedLeave},h.delayedLeave=z})}return o}}},Vm=Km;function xh(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Xi(e,t,n,r){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:c,onEnter:f,onAfterEnter:h,onEnterCancelled:p,onBeforeLeave:v,onLeave:y,onAfterLeave:k,onLeaveCancelled:D,onBeforeAppear:z,onAppear:ae,onAfterAppear:re,onAppearCancelled:Q}=t,_e=String(e.key),Te=xh(n,e),le=(ye,Re)=>{ye&&mn(ye,r,9,Re)},Z=(ye,Re)=>{const Ie=Re[1];le(ye,Re),Oe(ye)?ye.every(Ge=>Ge.length<=1)&&Ie():ye.length<=1&&Ie()},Ce={mode:o,persisted:a,beforeEnter(ye){let Re=c;if(!n.isMounted)if(i)Re=z||c;else return;ye[or]&&ye[or](!0);const Ie=Te[_e];Ie&&Sn(e,Ie)&&Ie.el[or]&&Ie.el[or](),le(Re,[ye])},enter(ye){let Re=f,Ie=h,Ge=p;if(!n.isMounted)if(i)Re=ae||f,Ie=re||h,Ge=Q||p;else return;let he=!1;const Le=ye[Vo]=dt=>{he||(he=!0,dt?le(Ge,[ye]):le(Ie,[ye]),Ce.delayedLeave&&Ce.delayedLeave(),ye[Vo]=void 0)};Re?Z(Re,[ye,Le]):Le()},leave(ye,Re){const Ie=String(e.key);if(ye[Vo]&&ye[Vo](!0),n.isUnmounting)return Re();le(v,[ye]);let Ge=!1;const he=ye[or]=Le=>{Ge||(Ge=!0,Re(),Le?le(D,[ye]):le(k,[ye]),ye[or]=void 0,Te[Ie]===e&&delete Te[Ie])};Te[Ie]=e,y?Z(y,[ye,he]):he()},clone(ye){return Xi(ye,t,n,r)}};return Ce}function Ca(e){if(so(e))return e=dr(e),e.children=null,e}function ec(e){if(!so(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&De(n.default))return n.default()}}function Yi(e,t){e.shapeFlag&6&&e.component?Yi(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Fl(e,t=!1,n){let r=[],i=0;for(let o=0;o<e.length;o++){let a=e[o];const c=n==null?a.key:String(n)+String(a.key!=null?a.key:o);a.type===jt?(a.patchFlag&128&&i++,r=r.concat(Fl(a.children,t,c))):(t||a.type!==Qt)&&r.push(c!=null?dr(a,{key:c}):a)}if(i>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function Zt(e,t){return De(e)?Rt({name:e.name},t,{setup:e}):e}const Li=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Dx(e){De(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,timeout:o,suspensible:a=!0,onError:c}=e;let f=null,h,p=0;const v=()=>(p++,f=null,y()),y=()=>{let k;return f||(k=f=t().catch(D=>{if(D=D instanceof Error?D:new Error(String(D)),c)return new Promise((z,ae)=>{c(D,()=>z(v()),()=>ae(D),p+1)});throw D}).then(D=>k!==f&&f?f:(D&&(D.__esModule||D[Symbol.toStringTag]==="Module")&&(D=D.default),h=D,D)))};return Zt({name:"AsyncComponentWrapper",__asyncLoader:y,get __asyncResolved(){return h},setup(){const k=Nt;if(h)return()=>Sa(h,k);const D=Q=>{f=null,hi(Q,k,13,!r)};if(a&&k.suspense||uo)return y().then(Q=>()=>Sa(Q,k)).catch(Q=>(D(Q),()=>r?oe(r,{error:Q}):null));const z=Ot(!1),ae=Ot(),re=Ot(!!i);return i&&setTimeout(()=>{re.value=!1},i),o!=null&&setTimeout(()=>{if(!z.value&&!ae.value){const Q=new Error(`Async component timed out after ${o}ms.`);D(Q),ae.value=Q}},o),y().then(()=>{z.value=!0,k.parent&&so(k.parent.vnode)&&(k.parent.effect.dirty=!0,Ds(k.parent.update))}).catch(Q=>{D(Q),ae.value=Q}),()=>{if(z.value&&h)return Sa(h,k);if(ae.value&&r)return oe(r,{error:ae.value});if(n&&!re.value)return oe(n)}}})}function Sa(e,t){const{ref:n,props:r,children:i,ce:o}=t.vnode,a=oe(e,r,i);return a.ref=n,a.ce=o,delete t.vnode.ce,a}const so=e=>e.type.__isKeepAlive;function qm(e,t){kh(e,"a",t)}function Wm(e,t){kh(e,"da",t)}function kh(e,t,n=Nt){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if($s(t,r,n),n){let i=n.parent;for(;i&&i.parent;)so(i.parent.vnode)&&zm(r,t,n,i),i=i.parent}}function zm(e,t,n,r){const i=$s(t,e,r,!0);ao(()=>{xl(r[t],i)},n)}function $s(e,t,n=Nt,r=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...a)=>{if(n.isUnmounted)return;mr();const c=lo(n),f=mn(t,n,e,a);return c(),vr(),f});return r?i.unshift(o):i.push(o),o}}const qn=e=>(t,n=Nt)=>(!uo||e==="sp")&&$s(e,(...r)=>t(...r),n),Hm=qn("bm"),Kr=qn("m"),Gm=qn("bu"),Bl=qn("u"),Ch=qn("bum"),ao=qn("um"),Xm=qn("sp"),Ym=qn("rtg"),Qm=qn("rtc");function Zm(e,t=Nt){$s("ec",e,t)}function Sh(e,t,n,r){let i;const o=n;if(Oe(e)||xt(e)){i=new Array(e.length);for(let a=0,c=e.length;a<c;a++)i[a]=t(e[a],a,void 0,o)}else if(typeof e=="number"){i=new Array(e);for(let a=0;a<e;a++)i[a]=t(a+1,a,void 0,o)}else if(ct(e))if(e[Symbol.iterator])i=Array.from(e,(a,c)=>t(a,c,void 0,o));else{const a=Object.keys(e);i=new Array(a.length);for(let c=0,f=a.length;c<f;c++){const h=a[c];i[c]=t(e[h],h,c,o)}}else i=[];return i}function Eh(e,t,n={},r,i){if(Dt.isCE||Dt.parent&&Li(Dt.parent)&&Dt.parent.isCE)return t!=="default"&&(n.name=t),oe("slot",n,r&&r());let o=e[t];o&&o._c&&(o._d=!1),qe();const a=o&&Ah(o(n)),c=yr(jt,{key:n.key||a&&a.key||`_${t}`},a||(r?r():[]),a&&e._===1?64:-2);return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),o&&o._c&&(o._d=!0),c}function Ah(e){return e.some(t=>Qi(t)?!(t.type===Qt||t.type===jt&&!Ah(t.children)):!0)?e:null}const Ha=e=>e?Wh(e)?Us(e)||e.proxy:Ha(e.parent):null,ji=Rt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ha(e.parent),$root:e=>Ha(e.root),$emit:e=>e.emit,$options:e=>Ul(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Ds(e.update)}),$nextTick:e=>e.n||(e.n=Ml.bind(e.proxy)),$watch:e=>Um.bind(e)}),Ea=(e,t)=>e!==vt&&!e.__isScriptSetup&&Je(e,t),Jm={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:i,props:o,accessCache:a,type:c,appContext:f}=e;let h;if(t[0]!=="$"){const k=a[t];if(k!==void 0)switch(k){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(Ea(r,t))return a[t]=1,r[t];if(i!==vt&&Je(i,t))return a[t]=2,i[t];if((h=e.propsOptions[0])&&Je(h,t))return a[t]=3,o[t];if(n!==vt&&Je(n,t))return a[t]=4,n[t];Ga&&(a[t]=0)}}const p=ji[t];let v,y;if(p)return t==="$attrs"&&nn(e.attrs,"get",""),p(e);if((v=c.__cssModules)&&(v=v[t]))return v;if(n!==vt&&Je(n,t))return a[t]=4,n[t];if(y=f.config.globalProperties,Je(y,t))return y[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:o}=e;return Ea(i,t)?(i[t]=n,!0):r!==vt&&Je(r,t)?(r[t]=n,!0):Je(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:o}},a){let c;return!!n[a]||e!==vt&&Je(e,a)||Ea(t,a)||(c=o[0])&&Je(c,a)||Je(r,a)||Je(ji,a)||Je(i.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Je(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Lx(){return Ph().slots}function jx(){return Ph().attrs}function Ph(){const e=Bs();return e.setupContext||(e.setupContext=Hh(e))}function tc(e){return Oe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ga=!0;function ev(e){const t=Ul(e),n=e.proxy,r=e.ctx;Ga=!1,t.beforeCreate&&nc(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:a,watch:c,provide:f,inject:h,created:p,beforeMount:v,mounted:y,beforeUpdate:k,updated:D,activated:z,deactivated:ae,beforeDestroy:re,beforeUnmount:Q,destroyed:_e,unmounted:Te,render:le,renderTracked:Z,renderTriggered:Ce,errorCaptured:ye,serverPrefetch:Re,expose:Ie,inheritAttrs:Ge,components:he,directives:Le,filters:dt}=t;if(h&&tv(h,r,null),a)for(const Ye in a){const Fe=a[Ye];De(Fe)&&(r[Ye]=Fe.bind(n))}if(i){const Ye=i.call(n,n);ct(Ye)&&(e.data=Ms(Ye))}if(Ga=!0,o)for(const Ye in o){const Fe=o[Ye],Lt=De(Fe)?Fe.bind(n,n):De(Fe.get)?Fe.get.bind(n,n):dn,Et=!De(Fe)&&De(Fe.set)?Fe.set.bind(n):dn,Bt=Yt({get:Lt,set:Et});Object.defineProperty(r,Ye,{enumerable:!0,configurable:!0,get:()=>Bt.value,set:xe=>Bt.value=xe})}if(c)for(const Ye in c)Th(c[Ye],r,n,Ye);if(f){const Ye=De(f)?f.call(n):f;Reflect.ownKeys(Ye).forEach(Fe=>{Jo(Fe,Ye[Fe])})}p&&nc(p,e,"c");function Ze(Ye,Fe){Oe(Fe)?Fe.forEach(Lt=>Ye(Lt.bind(n))):Fe&&Ye(Fe.bind(n))}if(Ze(Hm,v),Ze(Kr,y),Ze(Gm,k),Ze(Bl,D),Ze(qm,z),Ze(Wm,ae),Ze(Zm,ye),Ze(Qm,Z),Ze(Ym,Ce),Ze(Ch,Q),Ze(ao,Te),Ze(Xm,Re),Oe(Ie))if(Ie.length){const Ye=e.exposed||(e.exposed={});Ie.forEach(Fe=>{Object.defineProperty(Ye,Fe,{get:()=>n[Fe],set:Lt=>n[Fe]=Lt})})}else e.exposed||(e.exposed={});le&&e.render===dn&&(e.render=le),Ge!=null&&(e.inheritAttrs=Ge),he&&(e.components=he),Le&&(e.directives=Le)}function tv(e,t,n=dn){Oe(e)&&(e=Xa(e));for(const r in e){const i=e[r];let o;ct(i)?"default"in i?o=bt(i.from||r,i.default,!0):o=bt(i.from||r):o=bt(i),Ht(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[r]=o}}function nc(e,t,n){mn(Oe(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Th(e,t,n,r){const i=r.includes(".")?bh(n,r):()=>n[r];if(xt(e)){const o=t[e];De(o)&&Dr(i,o)}else if(De(e))Dr(i,e.bind(n));else if(ct(e))if(Oe(e))e.forEach(o=>Th(o,t,n,r));else{const o=De(e.handler)?e.handler.bind(n):t[e.handler];De(o)&&Dr(i,o,e)}}function Ul(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,c=o.get(t);let f;return c?f=c:!i.length&&!n&&!r?f=t:(f={},i.length&&i.forEach(h=>ds(f,h,a,!0)),ds(f,t,a)),ct(t)&&o.set(t,f),f}function ds(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&ds(e,o,n,!0),i&&i.forEach(a=>ds(e,a,n,!0));for(const a in t)if(!(r&&a==="expose")){const c=nv[a]||n&&n[a];e[a]=c?c(e[a],t[a]):t[a]}return e}const nv={data:rc,props:ic,emits:ic,methods:Oi,computed:Oi,beforeCreate:Xt,created:Xt,beforeMount:Xt,mounted:Xt,beforeUpdate:Xt,updated:Xt,beforeDestroy:Xt,beforeUnmount:Xt,destroyed:Xt,unmounted:Xt,activated:Xt,deactivated:Xt,errorCaptured:Xt,serverPrefetch:Xt,components:Oi,directives:Oi,watch:iv,provide:rc,inject:rv};function rc(e,t){return t?e?function(){return Rt(De(e)?e.call(this,this):e,De(t)?t.call(this,this):t)}:t:e}function rv(e,t){return Oi(Xa(e),Xa(t))}function Xa(e){if(Oe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Xt(e,t){return e?[...new Set([].concat(e,t))]:t}function Oi(e,t){return e?Rt(Object.create(null),e,t):t}function ic(e,t){return e?Oe(e)&&Oe(t)?[...new Set([...e,...t])]:Rt(Object.create(null),tc(e),tc(t??{})):t}function iv(e,t){if(!e)return t;if(!t)return e;const n=Rt(Object.create(null),e);for(const r in t)n[r]=Xt(e[r],t[r]);return n}function Oh(){return{app:null,config:{isNativeTag:Mg,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let ov=0;function sv(e,t){return function(r,i=null){De(r)||(r=Rt({},r)),i!=null&&!ct(i)&&(i=null);const o=Oh(),a=new WeakSet;let c=!1;const f=o.app={_uid:ov++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:Tv,get config(){return o.config},set config(h){},use(h,...p){return a.has(h)||(h&&De(h.install)?(a.add(h),h.install(f,...p)):De(h)&&(a.add(h),h(f,...p))),f},mixin(h){return o.mixins.includes(h)||o.mixins.push(h),f},component(h,p){return p?(o.components[h]=p,f):o.components[h]},directive(h,p){return p?(o.directives[h]=p,f):o.directives[h]},mount(h,p,v){if(!c){const y=oe(r,i);return y.appContext=o,v===!0?v="svg":v===!1&&(v=void 0),p&&t?t(y,h):e(y,h,v),c=!0,f._container=h,h.__vue_app__=f,Us(y.component)||y.component.proxy}},unmount(){c&&(e(null,f._container),delete f._container.__vue_app__)},provide(h,p){return o.provides[h]=p,f},runWithContext(h){const p=ri;ri=f;try{return h()}finally{ri=p}}};return f}}let ri=null;function Jo(e,t){if(Nt){let n=Nt.provides;const r=Nt.parent&&Nt.parent.provides;r===n&&(n=Nt.provides=Object.create(r)),n[e]=t}}function bt(e,t,n=!1){const r=Nt||Dt;if(r||ri){const i=r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:ri._context.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&De(t)?t.call(r&&r.proxy):t}}function Nx(){return!!(Nt||Dt||ri)}const Rh={},Ih=()=>Object.create(Rh),Mh=e=>Object.getPrototypeOf(e)===Rh;function av(e,t,n,r=!1){const i={},o=Ih();e.propsDefaults=Object.create(null),Dh(e,t,i,o);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);n?e.props=r?i:nh(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function lv(e,t,n,r){const{props:i,attrs:o,vnode:{patchFlag:a}}=e,c=et(i),[f]=e.propsOptions;let h=!1;if((r||a>0)&&!(a&16)){if(a&8){const p=e.vnode.dynamicProps;for(let v=0;v<p.length;v++){let y=p[v];if(Ls(e.emitsOptions,y))continue;const k=t[y];if(f)if(Je(o,y))k!==o[y]&&(o[y]=k,h=!0);else{const D=On(y);i[D]=Ya(f,c,D,k,e,!1)}else k!==o[y]&&(o[y]=k,h=!0)}}}else{Dh(e,t,i,o)&&(h=!0);let p;for(const v in c)(!t||!Je(t,v)&&((p=Br(v))===v||!Je(t,p)))&&(f?n&&(n[v]!==void 0||n[p]!==void 0)&&(i[v]=Ya(f,c,v,void 0,e,!0)):delete i[v]);if(o!==c)for(const v in o)(!t||!Je(t,v))&&(delete o[v],h=!0)}h&&Fn(e.attrs,"set","")}function Dh(e,t,n,r){const[i,o]=e.propsOptions;let a=!1,c;if(t)for(let f in t){if(Ii(f))continue;const h=t[f];let p;i&&Je(i,p=On(f))?!o||!o.includes(p)?n[p]=h:(c||(c={}))[p]=h:Ls(e.emitsOptions,f)||(!(f in r)||h!==r[f])&&(r[f]=h,a=!0)}if(o){const f=et(n),h=c||vt;for(let p=0;p<o.length;p++){const v=o[p];n[v]=Ya(i,f,v,h[v],e,!Je(h,v))}}return a}function Ya(e,t,n,r,i,o){const a=e[n];if(a!=null){const c=Je(a,"default");if(c&&r===void 0){const f=a.default;if(a.type!==Function&&!a.skipFactory&&De(f)){const{propsDefaults:h}=i;if(n in h)r=h[n];else{const p=lo(i);r=h[n]=f.call(null,t),p()}}else r=f}a[0]&&(o&&!c?r=!1:a[1]&&(r===""||r===Br(n))&&(r=!0))}return r}function Lh(e,t,n=!1){const r=t.propsCache,i=r.get(e);if(i)return i;const o=e.props,a={},c=[];let f=!1;if(!De(e)){const p=v=>{f=!0;const[y,k]=Lh(v,t,!0);Rt(a,y),k&&c.push(...k)};!n&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!o&&!f)return ct(e)&&r.set(e,Jr),Jr;if(Oe(o))for(let p=0;p<o.length;p++){const v=On(o[p]);oc(v)&&(a[v]=vt)}else if(o)for(const p in o){const v=On(p);if(oc(v)){const y=o[p],k=a[v]=Oe(y)||De(y)?{type:y}:Rt({},y);if(k){const D=lc(Boolean,k.type),z=lc(String,k.type);k[0]=D>-1,k[1]=z<0||D<z,(D>-1||Je(k,"default"))&&c.push(v)}}}const h=[a,c];return ct(e)&&r.set(e,h),h}function oc(e){return e[0]!=="$"&&!Ii(e)}function sc(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function ac(e,t){return sc(e)===sc(t)}function lc(e,t){return Oe(t)?t.findIndex(n=>ac(n,e)):De(t)&&ac(t,e)?0:-1}const jh=e=>e[0]==="_"||e==="$stable",Kl=e=>Oe(e)?e.map(bn):[bn(e)],uv=(e,t,n)=>{if(t._n)return t;const r=pn((...i)=>Kl(t(...i)),n);return r._c=!1,r},Nh=(e,t,n)=>{const r=e._ctx;for(const i in e){if(jh(i))continue;const o=e[i];if(De(o))t[i]=uv(i,o,r);else if(o!=null){const a=Kl(o);t[i]=()=>a}}},$h=(e,t)=>{const n=Kl(t);e.slots.default=()=>n},cv=(e,t)=>{const n=e.slots=Ih();if(e.vnode.shapeFlag&32){const r=t._;r?(Rt(n,t),Ff(n,"_",r,!0)):Nh(t,n)}else t&&$h(e,t)},fv=(e,t,n)=>{const{vnode:r,slots:i}=e;let o=!0,a=vt;if(r.shapeFlag&32){const c=t._;c?n&&c===1?o=!1:(Rt(i,t),!n&&c===1&&delete i._):(o=!t.$stable,Nh(t,i)),a=t}else t&&($h(e,t),a={default:1});if(o)for(const c in i)!jh(c)&&a[c]==null&&delete i[c]};function Qa(e,t,n,r,i=!1){if(Oe(e)){e.forEach((y,k)=>Qa(y,t&&(Oe(t)?t[k]:t),n,r,i));return}if(Li(r)&&!i)return;const o=r.shapeFlag&4?Us(r.component)||r.component.proxy:r.el,a=i?null:o,{i:c,r:f}=e,h=t&&t.r,p=c.refs===vt?c.refs={}:c.refs,v=c.setupState;if(h!=null&&h!==f&&(xt(h)?(p[h]=null,Je(v,h)&&(v[h]=null)):Ht(h)&&(h.value=null)),De(f))fr(f,c,12,[a,p]);else{const y=xt(f),k=Ht(f);if(y||k){const D=()=>{if(e.f){const z=y?Je(v,f)?v[f]:p[f]:f.value;i?Oe(z)&&xl(z,o):Oe(z)?z.includes(o)||z.push(o):y?(p[f]=[o],Je(v,f)&&(v[f]=p[f])):(f.value=[o],e.k&&(p[e.k]=f.value))}else y?(p[f]=a,Je(v,f)&&(v[f]=a)):k&&(f.value=a,e.k&&(p[e.k]=a))};a?(D.id=-1,Jt(D,n)):D()}}}const Jt=jm;function hv(e){return dv(e)}function dv(e,t){const n=Uf();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:a,createText:c,createComment:f,setText:h,setElementText:p,parentNode:v,nextSibling:y,setScopeId:k=dn,insertStaticContent:D}=e,z=(_,x,L,G=null,q=null,ne=null,ue=void 0,te=null,J=!!x.dynamicChildren)=>{if(_===x)return;_&&!Sn(_,x)&&(G=W(_),xe(_,q,ne,!0),_=null),x.patchFlag===-2&&(J=!1,x.dynamicChildren=null);const{type:Y,ref:de,shapeFlag:Ee}=x;switch(Y){case Fs:ae(_,x,L,G);break;case Qt:re(_,x,L,G);break;case es:_==null&&Q(x,L,G,ue);break;case jt:he(_,x,L,G,q,ne,ue,te,J);break;default:Ee&1?le(_,x,L,G,q,ne,ue,te,J):Ee&6?Le(_,x,L,G,q,ne,ue,te,J):(Ee&64||Ee&128)&&Y.process(_,x,L,G,q,ne,ue,te,J,me)}de!=null&&q&&Qa(de,_&&_.ref,ne,x||_,!x)},ae=(_,x,L,G)=>{if(_==null)r(x.el=c(x.children),L,G);else{const q=x.el=_.el;x.children!==_.children&&h(q,x.children)}},re=(_,x,L,G)=>{_==null?r(x.el=f(x.children||""),L,G):x.el=_.el},Q=(_,x,L,G)=>{[_.el,_.anchor]=D(_.children,x,L,G,_.el,_.anchor)},_e=({el:_,anchor:x},L,G)=>{let q;for(;_&&_!==x;)q=y(_),r(_,L,G),_=q;r(x,L,G)},Te=({el:_,anchor:x})=>{let L;for(;_&&_!==x;)L=y(_),i(_),_=L;i(x)},le=(_,x,L,G,q,ne,ue,te,J)=>{x.type==="svg"?ue="svg":x.type==="math"&&(ue="mathml"),_==null?Z(x,L,G,q,ne,ue,te,J):Re(_,x,q,ne,ue,te,J)},Z=(_,x,L,G,q,ne,ue,te)=>{let J,Y;const{props:de,shapeFlag:Ee,transition:ke,dirs:Ae}=_;if(J=_.el=a(_.type,ne,de&&de.is,de),Ee&8?p(J,_.children):Ee&16&&ye(_.children,J,null,G,q,Aa(_,ne),ue,te),Ae&&Sr(_,null,G,"created"),Ce(J,_,_.scopeId,ue,G),de){for(const Qe in de)Qe!=="value"&&!Ii(Qe)&&o(J,Qe,null,de[Qe],ne,_.children,G,q,pt);"value"in de&&o(J,"value",null,de.value,ne),(Y=de.onVnodeBeforeMount)&&kn(Y,G,_)}Ae&&Sr(_,null,G,"beforeMount");const $e=pv(q,ke);$e&&ke.beforeEnter(J),r(J,x,L),((Y=de&&de.onVnodeMounted)||$e||Ae)&&Jt(()=>{Y&&kn(Y,G,_),$e&&ke.enter(J),Ae&&Sr(_,null,G,"mounted")},q)},Ce=(_,x,L,G,q)=>{if(L&&k(_,L),G)for(let ne=0;ne<G.length;ne++)k(_,G[ne]);if(q){let ne=q.subTree;if(x===ne){const ue=q.vnode;Ce(_,ue,ue.scopeId,ue.slotScopeIds,q.parent)}}},ye=(_,x,L,G,q,ne,ue,te,J=0)=>{for(let Y=J;Y<_.length;Y++){const de=_[Y]=te?sr(_[Y]):bn(_[Y]);z(null,de,x,L,G,q,ne,ue,te)}},Re=(_,x,L,G,q,ne,ue)=>{const te=x.el=_.el;let{patchFlag:J,dynamicChildren:Y,dirs:de}=x;J|=_.patchFlag&16;const Ee=_.props||vt,ke=x.props||vt;let Ae;if(L&&Er(L,!1),(Ae=ke.onVnodeBeforeUpdate)&&kn(Ae,L,x,_),de&&Sr(x,_,L,"beforeUpdate"),L&&Er(L,!0),Y?Ie(_.dynamicChildren,Y,te,L,G,Aa(x,q),ne):ue||Fe(_,x,te,null,L,G,Aa(x,q),ne,!1),J>0){if(J&16)Ge(te,x,Ee,ke,L,G,q);else if(J&2&&Ee.class!==ke.class&&o(te,"class",null,ke.class,q),J&4&&o(te,"style",Ee.style,ke.style,q),J&8){const $e=x.dynamicProps;for(let Qe=0;Qe<$e.length;Qe++){const it=$e[Qe],ht=Ee[it],O=ke[it];(O!==ht||it==="value")&&o(te,it,ht,O,q,_.children,L,G,pt)}}J&1&&_.children!==x.children&&p(te,x.children)}else!ue&&Y==null&&Ge(te,x,Ee,ke,L,G,q);((Ae=ke.onVnodeUpdated)||de)&&Jt(()=>{Ae&&kn(Ae,L,x,_),de&&Sr(x,_,L,"updated")},G)},Ie=(_,x,L,G,q,ne,ue)=>{for(let te=0;te<x.length;te++){const J=_[te],Y=x[te],de=J.el&&(J.type===jt||!Sn(J,Y)||J.shapeFlag&70)?v(J.el):L;z(J,Y,de,null,G,q,ne,ue,!0)}},Ge=(_,x,L,G,q,ne,ue)=>{if(L!==G){if(L!==vt)for(const te in L)!Ii(te)&&!(te in G)&&o(_,te,L[te],null,ue,x.children,q,ne,pt);for(const te in G){if(Ii(te))continue;const J=G[te],Y=L[te];J!==Y&&te!=="value"&&o(_,te,Y,J,ue,x.children,q,ne,pt)}"value"in G&&o(_,"value",L.value,G.value,ue)}},he=(_,x,L,G,q,ne,ue,te,J)=>{const Y=x.el=_?_.el:c(""),de=x.anchor=_?_.anchor:c("");let{patchFlag:Ee,dynamicChildren:ke,slotScopeIds:Ae}=x;Ae&&(te=te?te.concat(Ae):Ae),_==null?(r(Y,L,G),r(de,L,G),ye(x.children||[],L,de,q,ne,ue,te,J)):Ee>0&&Ee&64&&ke&&_.dynamicChildren?(Ie(_.dynamicChildren,ke,L,q,ne,ue,te),(x.key!=null||q&&x===q.subTree)&&Vl(_,x,!0)):Fe(_,x,L,de,q,ne,ue,te,J)},Le=(_,x,L,G,q,ne,ue,te,J)=>{x.slotScopeIds=te,_==null?x.shapeFlag&512?q.ctx.activate(x,L,G,ue,J):dt(x,L,G,q,ne,ue,J):Ct(_,x,J)},dt=(_,x,L,G,q,ne,ue)=>{const te=_.component=kv(_,G,q);if(so(_)&&(te.ctx.renderer=me),Cv(te),te.asyncDep){if(q&&q.registerDep(te,Ze),!_.el){const J=te.subTree=oe(Qt);re(null,J,x,L)}}else Ze(te,_,x,L,q,ne,ue)},Ct=(_,x,L)=>{const G=x.component=_.component;if(Pm(_,x,L))if(G.asyncDep&&!G.asyncResolved){Ye(G,x,L);return}else G.next=x,xm(G.update),G.effect.dirty=!0,G.update();else x.el=_.el,G.vnode=x},Ze=(_,x,L,G,q,ne,ue)=>{const te=()=>{if(_.isMounted){let{next:de,bu:Ee,u:ke,parent:Ae,vnode:$e}=_;{const j=Fh(_);if(j){de&&(de.el=$e.el,Ye(_,de,ue)),j.asyncDep.then(()=>{_.isUnmounted||te()});return}}let Qe=de,it;Er(_,!1),de?(de.el=$e.el,Ye(_,de,ue)):de=$e,Ee&&Zo(Ee),(it=de.props&&de.props.onVnodeBeforeUpdate)&&kn(it,Ae,de,$e),Er(_,!0);const ht=ka(_),O=_.subTree;_.subTree=ht,z(O,ht,v(O.el),W(O),_,q,ne),de.el=ht.el,Qe===null&&Dl(_,ht.el),ke&&Jt(ke,q),(it=de.props&&de.props.onVnodeUpdated)&&Jt(()=>kn(it,Ae,de,$e),q)}else{let de;const{el:Ee,props:ke}=x,{bm:Ae,m:$e,parent:Qe}=_,it=Li(x);if(Er(_,!1),Ae&&Zo(Ae),!it&&(de=ke&&ke.onVnodeBeforeMount)&&kn(de,Qe,x),Er(_,!0),Ee&&Se){const ht=()=>{_.subTree=ka(_),Se(Ee,_.subTree,_,q,null)};it?x.type.__asyncLoader().then(()=>!_.isUnmounted&&ht()):ht()}else{const ht=_.subTree=ka(_);z(null,ht,L,G,_,q,ne),x.el=ht.el}if($e&&Jt($e,q),!it&&(de=ke&&ke.onVnodeMounted)){const ht=x;Jt(()=>kn(de,Qe,ht),q)}(x.shapeFlag&256||Qe&&Li(Qe.vnode)&&Qe.vnode.shapeFlag&256)&&_.a&&Jt(_.a,q),_.isMounted=!0,x=L=G=null}},J=_.effect=new Cl(te,dn,()=>Ds(Y),_.scope),Y=_.update=()=>{J.dirty&&J.run()};Y.id=_.uid,Er(_,!0),Y()},Ye=(_,x,L)=>{x.component=_;const G=_.vnode.props;_.vnode=x,_.next=null,lv(_,x.props,G,L),fv(_,x.children,L),mr(),Yu(_),vr()},Fe=(_,x,L,G,q,ne,ue,te,J=!1)=>{const Y=_&&_.children,de=_?_.shapeFlag:0,Ee=x.children,{patchFlag:ke,shapeFlag:Ae}=x;if(ke>0){if(ke&128){Et(Y,Ee,L,G,q,ne,ue,te,J);return}else if(ke&256){Lt(Y,Ee,L,G,q,ne,ue,te,J);return}}Ae&8?(de&16&&pt(Y,q,ne),Ee!==Y&&p(L,Ee)):de&16?Ae&16?Et(Y,Ee,L,G,q,ne,ue,te,J):pt(Y,q,ne,!0):(de&8&&p(L,""),Ae&16&&ye(Ee,L,G,q,ne,ue,te,J))},Lt=(_,x,L,G,q,ne,ue,te,J)=>{_=_||Jr,x=x||Jr;const Y=_.length,de=x.length,Ee=Math.min(Y,de);let ke;for(ke=0;ke<Ee;ke++){const Ae=x[ke]=J?sr(x[ke]):bn(x[ke]);z(_[ke],Ae,L,null,q,ne,ue,te,J)}Y>de?pt(_,q,ne,!0,!1,Ee):ye(x,L,G,q,ne,ue,te,J,Ee)},Et=(_,x,L,G,q,ne,ue,te,J)=>{let Y=0;const de=x.length;let Ee=_.length-1,ke=de-1;for(;Y<=Ee&&Y<=ke;){const Ae=_[Y],$e=x[Y]=J?sr(x[Y]):bn(x[Y]);if(Sn(Ae,$e))z(Ae,$e,L,null,q,ne,ue,te,J);else break;Y++}for(;Y<=Ee&&Y<=ke;){const Ae=_[Ee],$e=x[ke]=J?sr(x[ke]):bn(x[ke]);if(Sn(Ae,$e))z(Ae,$e,L,null,q,ne,ue,te,J);else break;Ee--,ke--}if(Y>Ee){if(Y<=ke){const Ae=ke+1,$e=Ae<de?x[Ae].el:G;for(;Y<=ke;)z(null,x[Y]=J?sr(x[Y]):bn(x[Y]),L,$e,q,ne,ue,te,J),Y++}}else if(Y>ke)for(;Y<=Ee;)xe(_[Y],q,ne,!0),Y++;else{const Ae=Y,$e=Y,Qe=new Map;for(Y=$e;Y<=ke;Y++){const We=x[Y]=J?sr(x[Y]):bn(x[Y]);We.key!=null&&Qe.set(We.key,Y)}let it,ht=0;const O=ke-$e+1;let j=!1,V=0;const ee=new Array(O);for(Y=0;Y<O;Y++)ee[Y]=0;for(Y=Ae;Y<=Ee;Y++){const We=_[Y];if(ht>=O){xe(We,q,ne,!0);continue}let ze;if(We.key!=null)ze=Qe.get(We.key);else for(it=$e;it<=ke;it++)if(ee[it-$e]===0&&Sn(We,x[it])){ze=it;break}ze===void 0?xe(We,q,ne,!0):(ee[ze-$e]=Y+1,ze>=V?V=ze:j=!0,z(We,x[ze],L,null,q,ne,ue,te,J),ht++)}const H=j?gv(ee):Jr;for(it=H.length-1,Y=O-1;Y>=0;Y--){const We=$e+Y,ze=x[We],je=We+1<de?x[We+1].el:G;ee[Y]===0?z(null,ze,L,je,q,ne,ue,te,J):j&&(it<0||Y!==H[it]?Bt(ze,L,je,2):it--)}}},Bt=(_,x,L,G,q=null)=>{const{el:ne,type:ue,transition:te,children:J,shapeFlag:Y}=_;if(Y&6){Bt(_.component.subTree,x,L,G);return}if(Y&128){_.suspense.move(x,L,G);return}if(Y&64){ue.move(_,x,L,me);return}if(ue===jt){r(ne,x,L);for(let Ee=0;Ee<J.length;Ee++)Bt(J[Ee],x,L,G);r(_.anchor,x,L);return}if(ue===es){_e(_,x,L);return}if(G!==2&&Y&1&&te)if(G===0)te.beforeEnter(ne),r(ne,x,L),Jt(()=>te.enter(ne),q);else{const{leave:Ee,delayLeave:ke,afterLeave:Ae}=te,$e=()=>r(ne,x,L),Qe=()=>{Ee(ne,()=>{$e(),Ae&&Ae()})};ke?ke(ne,$e,Qe):Qe()}else r(ne,x,L)},xe=(_,x,L,G=!1,q=!1)=>{const{type:ne,props:ue,ref:te,children:J,dynamicChildren:Y,shapeFlag:de,patchFlag:Ee,dirs:ke}=_;if(te!=null&&Qa(te,null,L,_,!0),de&256){x.ctx.deactivate(_);return}const Ae=de&1&&ke,$e=!Li(_);let Qe;if($e&&(Qe=ue&&ue.onVnodeBeforeUnmount)&&kn(Qe,x,_),de&6)at(_.component,L,G);else{if(de&128){_.suspense.unmount(L,G);return}Ae&&Sr(_,null,x,"beforeUnmount"),de&64?_.type.remove(_,x,L,q,me,G):Y&&(ne!==jt||Ee>0&&Ee&64)?pt(Y,x,L,!1,!0):(ne===jt&&Ee&384||!q&&de&16)&&pt(J,x,L),G&&It(_)}($e&&(Qe=ue&&ue.onVnodeUnmounted)||Ae)&&Jt(()=>{Qe&&kn(Qe,x,_),Ae&&Sr(_,null,x,"unmounted")},L)},It=_=>{const{type:x,el:L,anchor:G,transition:q}=_;if(x===jt){vn(L,G);return}if(x===es){Te(_);return}const ne=()=>{i(L),q&&!q.persisted&&q.afterLeave&&q.afterLeave()};if(_.shapeFlag&1&&q&&!q.persisted){const{leave:ue,delayLeave:te}=q,J=()=>ue(L,ne);te?te(_.el,ne,J):J()}else ne()},vn=(_,x)=>{let L;for(;_!==x;)L=y(_),i(_),_=L;i(x)},at=(_,x,L)=>{const{bum:G,scope:q,update:ne,subTree:ue,um:te}=_;G&&Zo(G),q.stop(),ne&&(ne.active=!1,xe(ue,_,x,L)),te&&Jt(te,x),Jt(()=>{_.isUnmounted=!0},x),x&&x.pendingBranch&&!x.isUnmounted&&_.asyncDep&&!_.asyncResolved&&_.suspenseId===x.pendingId&&(x.deps--,x.deps===0&&x.resolve())},pt=(_,x,L,G=!1,q=!1,ne=0)=>{for(let ue=ne;ue<_.length;ue++)xe(_[ue],x,L,G,q)},W=_=>_.shapeFlag&6?W(_.component.subTree):_.shapeFlag&128?_.suspense.next():y(_.anchor||_.el);let ge=!1;const U=(_,x,L)=>{_==null?x._vnode&&xe(x._vnode,null,null,!0):z(x._vnode||null,_,x,null,null,null,L),ge||(ge=!0,Yu(),dh(),ge=!1),x._vnode=_},me={p:z,um:xe,m:Bt,r:It,mt:dt,mc:ye,pc:Fe,pbc:Ie,n:W,o:e};let Xe,Se;return{render:U,hydrate:Xe,createApp:sv(U,Xe)}}function Aa({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Er({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function pv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Vl(e,t,n=!1){const r=e.children,i=t.children;if(Oe(r)&&Oe(i))for(let o=0;o<r.length;o++){const a=r[o];let c=i[o];c.shapeFlag&1&&!c.dynamicChildren&&((c.patchFlag<=0||c.patchFlag===32)&&(c=i[o]=sr(i[o]),c.el=a.el),n||Vl(a,c)),c.type===Fs&&(c.el=a.el)}}function gv(e){const t=e.slice(),n=[0];let r,i,o,a,c;const f=e.length;for(r=0;r<f;r++){const h=e[r];if(h!==0){if(i=n[n.length-1],e[i]<h){t[r]=i,n.push(r);continue}for(o=0,a=n.length-1;o<a;)c=o+a>>1,e[n[c]]<h?o=c+1:a=c;h<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,a=n[o-1];o-- >0;)n[o]=a,a=t[a];return n}function Fh(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Fh(t)}const mv=e=>e.__isTeleport,Ni=e=>e&&(e.disabled||e.disabled===""),uc=e=>typeof SVGElement<"u"&&e instanceof SVGElement,cc=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Za=(e,t)=>{const n=e&&e.to;return xt(n)?t?t(n):null:n},vv={name:"Teleport",__isTeleport:!0,process(e,t,n,r,i,o,a,c,f,h){const{mc:p,pc:v,pbc:y,o:{insert:k,querySelector:D,createText:z,createComment:ae}}=h,re=Ni(t.props);let{shapeFlag:Q,children:_e,dynamicChildren:Te}=t;if(e==null){const le=t.el=z(""),Z=t.anchor=z("");k(le,n,r),k(Z,n,r);const Ce=t.target=Za(t.props,D),ye=t.targetAnchor=z("");Ce&&(k(ye,Ce),a==="svg"||uc(Ce)?a="svg":(a==="mathml"||cc(Ce))&&(a="mathml"));const Re=(Ie,Ge)=>{Q&16&&p(_e,Ie,Ge,i,o,a,c,f)};re?Re(n,Z):Ce&&Re(Ce,ye)}else{t.el=e.el;const le=t.anchor=e.anchor,Z=t.target=e.target,Ce=t.targetAnchor=e.targetAnchor,ye=Ni(e.props),Re=ye?n:Z,Ie=ye?le:Ce;if(a==="svg"||uc(Z)?a="svg":(a==="mathml"||cc(Z))&&(a="mathml"),Te?(y(e.dynamicChildren,Te,Re,i,o,a,c),Vl(e,t,!0)):f||v(e,t,Re,Ie,i,o,a,c,!1),re)ye?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):qo(t,n,le,h,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Ge=t.target=Za(t.props,D);Ge&&qo(t,Ge,null,h,0)}else ye&&qo(t,Z,Ce,h,1)}Bh(t)},remove(e,t,n,r,{um:i,o:{remove:o}},a){const{shapeFlag:c,children:f,anchor:h,targetAnchor:p,target:v,props:y}=e;if(v&&o(p),a&&o(h),c&16){const k=a||!Ni(y);for(let D=0;D<f.length;D++){const z=f[D];i(z,t,n,k,!!z.dynamicChildren)}}},move:qo,hydrate:yv};function qo(e,t,n,{o:{insert:r},m:i},o=2){o===0&&r(e.targetAnchor,t,n);const{el:a,anchor:c,shapeFlag:f,children:h,props:p}=e,v=o===2;if(v&&r(a,t,n),(!v||Ni(p))&&f&16)for(let y=0;y<h.length;y++)i(h[y],t,n,2);v&&r(c,t,n)}function yv(e,t,n,r,i,o,{o:{nextSibling:a,parentNode:c,querySelector:f}},h){const p=t.target=Za(t.props,f);if(p){const v=p._lpa||p.firstChild;if(t.shapeFlag&16)if(Ni(t.props))t.anchor=h(a(e),t,c(e),n,r,i,o),t.targetAnchor=v;else{t.anchor=a(e);let y=v;for(;y;)if(y=a(y),y&&y.nodeType===8&&y.data==="teleport anchor"){t.targetAnchor=y,p._lpa=t.targetAnchor&&a(t.targetAnchor);break}h(v,t,p,n,r,i,o)}Bh(t)}return t.anchor&&a(t.anchor)}const $x=vv;function Bh(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const jt=Symbol.for("v-fgt"),Fs=Symbol.for("v-txt"),Qt=Symbol.for("v-cmt"),es=Symbol.for("v-stc"),$i=[];let gn=null;function qe(e=!1){$i.push(gn=e?null:[])}function Uh(){$i.pop(),gn=$i[$i.length-1]||null}let ai=1;function fc(e){ai+=e}function Kh(e){return e.dynamicChildren=ai>0?gn||Jr:null,Uh(),ai>0&&gn&&gn.push(e),e}function ot(e,t,n,r,i,o){return Kh(Pe(e,t,n,r,i,o,!0))}function yr(e,t,n,r,i){return Kh(oe(e,t,n,r,i,!0))}function Qi(e){return e?e.__v_isVNode===!0:!1}function Sn(e,t){return e.type===t.type&&e.key===t.key}const Vh=({key:e})=>e??null,ts=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?xt(e)||Ht(e)||De(e)?{i:Dt,r:e,k:t,f:!!n}:e:null);function Pe(e,t=null,n=null,r=0,i=null,o=e===jt?0:1,a=!1,c=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Vh(t),ref:t&&ts(t),scopeId:js,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Dt};return c?(ql(f,n),o&128&&e.normalize(f)):n&&(f.shapeFlag|=xt(n)?8:16),ai>0&&!a&&gn&&(f.patchFlag>0||o&6)&&f.patchFlag!==32&&gn.push(f),f}const oe=bv;function bv(e,t=null,n=null,r=0,i=null,o=!1){if((!e||e===yh)&&(e=Qt),Qi(e)){const c=dr(e,t,!0);return n&&ql(c,n),ai>0&&!o&&gn&&(c.shapeFlag&6?gn[gn.indexOf(e)]=c:gn.push(c)),c.patchFlag|=-2,c}if(Pv(e)&&(e=e.__vccOpts),t){t=_v(t);let{class:c,style:f}=t;c&&!xt(c)&&(t.class=Ur(c)),ct(f)&&(ih(f)&&!Oe(f)&&(f=Rt({},f)),t.style=Os(f))}const a=xt(e)?1:Om(e)?128:mv(e)?64:ct(e)?4:De(e)?2:0;return Pe(e,t,n,r,i,a,o,!0)}function _v(e){return e?ih(e)||Mh(e)?Rt({},e):e:null}function dr(e,t,n=!1,r=!1){const{props:i,ref:o,patchFlag:a,children:c,transition:f}=e,h=t?qh(i||{},t):i,p={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&Vh(h),ref:t&&t.ref?n&&o?Oe(o)?o.concat(ts(t)):[o,ts(t)]:ts(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:c,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==jt?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:f,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&dr(e.ssContent),ssFallback:e.ssFallback&&dr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return f&&r&&(p.transition=f.clone(p)),p}function Mt(e=" ",t=0){return oe(Fs,null,e,t)}function hc(e="",t=!1){return t?(qe(),yr(Qt,null,e)):oe(Qt,null,e)}function bn(e){return e==null||typeof e=="boolean"?oe(Qt):Oe(e)?oe(jt,null,e.slice()):typeof e=="object"?sr(e):oe(Fs,null,String(e))}function sr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:dr(e)}function ql(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Oe(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),ql(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Mh(t)?t._ctx=Dt:i===3&&Dt&&(Dt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else De(t)?(t={default:t,_ctx:Dt},n=32):(t=String(t),r&64?(n=16,t=[Mt(t)]):n=8);e.children=t,e.shapeFlag|=n}function qh(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const i in r)if(i==="class")t.class!==r.class&&(t.class=Ur([t.class,r.class]));else if(i==="style")t.style=Os([t.style,r.style]);else if(Es(i)){const o=t[i],a=r[i];a&&o!==a&&!(Oe(o)&&o.includes(a))&&(t[i]=o?[].concat(o,a):a)}else i!==""&&(t[i]=r[i])}return t}function kn(e,t,n,r=null){mn(e,t,7,[n,r])}const wv=Oh();let xv=0;function kv(e,t,n){const r=e.type,i=(t?t.appContext:e.appContext)||wv,o={uid:xv++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new qf(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Lh(r,i),emitsOptions:gh(r,i),emit:null,emitted:null,propsDefaults:vt,inheritAttrs:r.inheritAttrs,ctx:vt,data:vt,props:vt,attrs:vt,slots:vt,refs:vt,setupState:vt,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=Cm.bind(null,o),e.ce&&e.ce(o),o}let Nt=null;const Bs=()=>Nt||Dt;let ps,Ja;{const e=Uf(),t=(n,r)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(r),o=>{i.length>1?i.forEach(a=>a(o)):i[0](o)}};ps=t("__VUE_INSTANCE_SETTERS__",n=>Nt=n),Ja=t("__VUE_SSR_SETTERS__",n=>uo=n)}const lo=e=>{const t=Nt;return ps(e),e.scope.on(),()=>{e.scope.off(),ps(t)}},dc=()=>{Nt&&Nt.scope.off(),ps(null)};function Wh(e){return e.vnode.shapeFlag&4}let uo=!1;function Cv(e,t=!1){t&&Ja(t);const{props:n,children:r}=e.vnode,i=Wh(e);av(e,n,i,t),cv(e,r);const o=i?Sv(e,t):void 0;return t&&Ja(!1),o}function Sv(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Jm);const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?Hh(e):null,o=lo(e);mr();const a=fr(r,e,0,[e.props,i]);if(vr(),o(),jf(a)){if(a.then(dc,dc),t)return a.then(c=>{el(e,c,t)}).catch(c=>{hi(c,e,0)});e.asyncDep=a}else el(e,a,t)}else zh(e,t)}function el(e,t,n){De(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ct(t)&&(e.setupState=uh(t)),zh(e,n)}let pc;function zh(e,t,n){const r=e.type;if(!e.render){if(!t&&pc&&!r.render){const i=r.template||Ul(e).template;if(i){const{isCustomElement:o,compilerOptions:a}=e.appContext.config,{delimiters:c,compilerOptions:f}=r,h=Rt(Rt({isCustomElement:o,delimiters:c},a),f);r.render=pc(i,h)}}e.render=r.render||dn}{const i=lo(e);mr();try{ev(e)}finally{vr(),i()}}}const Ev={get(e,t){return nn(e,"get",""),e[t]}};function Hh(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ev),slots:e.slots,emit:e.emit,expose:t}}function Us(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(uh(oh(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ji)return ji[n](e)},has(t,n){return n in t||n in ji}}))}function Av(e,t=!0){return De(e)?e.displayName||e.name:e.name||t&&e.__name}function Pv(e){return De(e)&&"__vccOpts"in e}const Yt=(e,t)=>pm(e,t,uo);function Wl(e,t,n){const r=arguments.length;return r===2?ct(t)&&!Oe(t)?Qi(t)?oe(e,null,[t]):oe(e,t):oe(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Qi(n)&&(n=[n]),oe(e,t,n))}const Tv="3.4.27";/**
|
|
34
|
+
* @vue/runtime-dom v3.4.27
|
|
35
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
36
|
+
* @license MIT
|
|
37
|
+
**/const Ov="http://www.w3.org/2000/svg",Rv="http://www.w3.org/1998/Math/MathML",ar=typeof document<"u"?document:null,gc=ar&&ar.createElement("template"),Iv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t==="svg"?ar.createElementNS(Ov,e):t==="mathml"?ar.createElementNS(Rv,e):ar.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>ar.createTextNode(e),createComment:e=>ar.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ar.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,o){const a=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{gc.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const c=gc.content;if(r==="svg"||r==="mathml"){const f=c.firstChild;for(;f.firstChild;)c.appendChild(f.firstChild);c.removeChild(f)}t.insertBefore(c,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Jn="transition",ki="animation",li=Symbol("_vtc"),Gh=(e,{slots:t})=>Wl(Vm,Yh(e),t);Gh.displayName="Transition";const Xh={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Mv=Gh.props=Rt({},wh,Xh),Ar=(e,t=[])=>{Oe(e)?e.forEach(n=>n(...t)):e&&e(...t)},mc=e=>e?Oe(e)?e.some(t=>t.length>1):e.length>1:!1;function Yh(e){const t={};for(const he in e)he in Xh||(t[he]=e[he]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:f=o,appearActiveClass:h=a,appearToClass:p=c,leaveFromClass:v=`${n}-leave-from`,leaveActiveClass:y=`${n}-leave-active`,leaveToClass:k=`${n}-leave-to`}=e,D=Dv(i),z=D&&D[0],ae=D&&D[1],{onBeforeEnter:re,onEnter:Q,onEnterCancelled:_e,onLeave:Te,onLeaveCancelled:le,onBeforeAppear:Z=re,onAppear:Ce=Q,onAppearCancelled:ye=_e}=t,Re=(he,Le,dt)=>{rr(he,Le?p:c),rr(he,Le?h:a),dt&&dt()},Ie=(he,Le)=>{he._isLeaving=!1,rr(he,v),rr(he,k),rr(he,y),Le&&Le()},Ge=he=>(Le,dt)=>{const Ct=he?Ce:Q,Ze=()=>Re(Le,he,dt);Ar(Ct,[Le,Ze]),vc(()=>{rr(Le,he?f:o),Nn(Le,he?p:c),mc(Ct)||yc(Le,r,z,Ze)})};return Rt(t,{onBeforeEnter(he){Ar(re,[he]),Nn(he,o),Nn(he,a)},onBeforeAppear(he){Ar(Z,[he]),Nn(he,f),Nn(he,h)},onEnter:Ge(!1),onAppear:Ge(!0),onLeave(he,Le){he._isLeaving=!0;const dt=()=>Ie(he,Le);Nn(he,v),Nn(he,y),Zh(),vc(()=>{he._isLeaving&&(rr(he,v),Nn(he,k),mc(Te)||yc(he,r,ae,dt))}),Ar(Te,[he,dt])},onEnterCancelled(he){Re(he,!1),Ar(_e,[he])},onAppearCancelled(he){Re(he,!0),Ar(ye,[he])},onLeaveCancelled(he){Ie(he),Ar(le,[he])}})}function Dv(e){if(e==null)return null;if(ct(e))return[Pa(e.enter),Pa(e.leave)];{const t=Pa(e);return[t,t]}}function Pa(e){return Bf(e)}function Nn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[li]||(e[li]=new Set)).add(t)}function rr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[li];n&&(n.delete(t),n.size||(e[li]=void 0))}function vc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Lv=0;function yc(e,t,n,r){const i=e._endId=++Lv,o=()=>{i===e._endId&&r()};if(n)return setTimeout(o,n);const{type:a,timeout:c,propCount:f}=Qh(e,t);if(!a)return r();const h=a+"end";let p=0;const v=()=>{e.removeEventListener(h,y),o()},y=k=>{k.target===e&&++p>=f&&v()};setTimeout(()=>{p<f&&v()},c+1),e.addEventListener(h,y)}function Qh(e,t){const n=window.getComputedStyle(e),r=D=>(n[D]||"").split(", "),i=r(`${Jn}Delay`),o=r(`${Jn}Duration`),a=bc(i,o),c=r(`${ki}Delay`),f=r(`${ki}Duration`),h=bc(c,f);let p=null,v=0,y=0;t===Jn?a>0&&(p=Jn,v=a,y=o.length):t===ki?h>0&&(p=ki,v=h,y=f.length):(v=Math.max(a,h),p=v>0?a>h?Jn:ki:null,y=p?p===Jn?o.length:f.length:0);const k=p===Jn&&/\b(transform|all)(,|$)/.test(r(`${Jn}Property`).toString());return{type:p,timeout:v,propCount:y,hasTransform:k}}function bc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>_c(n)+_c(e[r])))}function _c(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Zh(){return document.body.offsetHeight}function jv(e,t,n){const r=e[li];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const gs=Symbol("_vod"),Jh=Symbol("_vsh"),Fx={beforeMount(e,{value:t},{transition:n}){e[gs]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ci(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Ci(e,!0),r.enter(e)):r.leave(e,()=>{Ci(e,!1)}):Ci(e,t))},beforeUnmount(e,{value:t}){Ci(e,t)}};function Ci(e,t){e.style.display=t?e[gs]:"none",e[Jh]=!t}const ed=Symbol("");function Bx(e){const t=Bs();if(!t)return;const n=t.ut=(i=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>nl(o,i))},r=()=>{const i=e(t.proxy);tl(t.subTree,i),n(i)};Kr(()=>{Bm(r);const i=new MutationObserver(r);i.observe(t.subTree.el.parentNode,{childList:!0}),ao(()=>i.disconnect())})}function tl(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{tl(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)nl(e.el,t);else if(e.type===jt)e.children.forEach(n=>tl(n,t));else if(e.type===es){let{el:n,anchor:r}=e;for(;n&&(nl(n,t),n!==r);)n=n.nextSibling}}function nl(e,t){if(e.nodeType===1){const n=e.style;let r="";for(const i in t)n.setProperty(`--${i}`,t[i]),r+=`--${i}: ${t[i]};`;n[ed]=r}}const Nv=/(^|;)\s*display\s*:/;function $v(e,t,n){const r=e.style,i=xt(n);let o=!1;if(n&&!i){if(t)if(xt(t))for(const a of t.split(";")){const c=a.slice(0,a.indexOf(":")).trim();n[c]==null&&ns(r,c,"")}else for(const a in t)n[a]==null&&ns(r,a,"");for(const a in n)a==="display"&&(o=!0),ns(r,a,n[a])}else if(i){if(t!==n){const a=r[ed];a&&(n+=";"+a),r.cssText=n,o=Nv.test(n)}}else t&&e.removeAttribute("style");gs in e&&(e[gs]=o?r.display:"",e[Jh]&&(r.display="none"))}const wc=/\s*!important$/;function ns(e,t,n){if(Oe(n))n.forEach(r=>ns(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Fv(e,t);wc.test(n)?e.setProperty(Br(r),n.replace(wc,""),"important"):e[r]=n}}const xc=["Webkit","Moz","ms"],Ta={};function Fv(e,t){const n=Ta[t];if(n)return n;let r=On(t);if(r!=="filter"&&r in e)return Ta[t]=r;r=Ts(r);for(let i=0;i<xc.length;i++){const o=xc[i]+r;if(o in e)return Ta[t]=o}return t}const kc="http://www.w3.org/1999/xlink";function Bv(e,t,n,r,i){if(r&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(kc,t.slice(6,t.length)):e.setAttributeNS(kc,t,n);else{const o=Vg(t);n==null||o&&!Kf(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}function Uv(e,t,n,r,i,o,a){if(t==="innerHTML"||t==="textContent"){r&&a(r,i,o),e[t]=n??"";return}const c=e.tagName;if(t==="value"&&c!=="PROGRESS"&&!c.includes("-")){const h=c==="OPTION"?e.getAttribute("value")||"":e.value,p=n??"";(h!==p||!("_value"in e))&&(e.value=p),n==null&&e.removeAttribute(t),e._value=n;return}let f=!1;if(n===""||n==null){const h=typeof e[t];h==="boolean"?n=Kf(n):n==null&&h==="string"?(n="",f=!0):h==="number"&&(n=0,f=!0)}try{e[t]=n}catch{}f&&e.removeAttribute(t)}function Or(e,t,n,r){e.addEventListener(t,n,r)}function Kv(e,t,n,r){e.removeEventListener(t,n,r)}const Cc=Symbol("_vei");function Vv(e,t,n,r,i=null){const o=e[Cc]||(e[Cc]={}),a=o[t];if(r&&a)a.value=r;else{const[c,f]=qv(t);if(r){const h=o[t]=Hv(r,i);Or(e,c,h,f)}else a&&(Kv(e,c,a,f),o[t]=void 0)}}const Sc=/(?:Once|Passive|Capture)$/;function qv(e){let t;if(Sc.test(e)){t={};let r;for(;r=e.match(Sc);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Br(e.slice(2)),t]}let Oa=0;const Wv=Promise.resolve(),zv=()=>Oa||(Wv.then(()=>Oa=0),Oa=Date.now());function Hv(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;mn(Gv(r,n.value),t,5,[r])};return n.value=e,n.attached=zv(),n}function Gv(e,t){if(Oe(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const Ec=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Xv=(e,t,n,r,i,o,a,c,f)=>{const h=i==="svg";t==="class"?jv(e,r,h):t==="style"?$v(e,n,r):Es(t)?wl(t)||Vv(e,t,n,r,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Yv(e,t,r,h))?Uv(e,t,r,o,a,c,f):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Bv(e,t,r,h))};function Yv(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ec(t)&&De(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Ec(t)&&xt(n)?!1:t in e}const td=new WeakMap,nd=new WeakMap,ms=Symbol("_moveCb"),Ac=Symbol("_enterCb"),rd={name:"TransitionGroup",props:Rt({},Mv,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Bs(),r=_h();let i,o;return Bl(()=>{if(!i.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!ty(i[0].el,n.vnode.el,a))return;i.forEach(Zv),i.forEach(Jv);const c=i.filter(ey);Zh(),c.forEach(f=>{const h=f.el,p=h.style;Nn(h,a),p.transform=p.webkitTransform=p.transitionDuration="";const v=h[ms]=y=>{y&&y.target!==h||(!y||/transform$/.test(y.propertyName))&&(h.removeEventListener("transitionend",v),h[ms]=null,rr(h,a))};h.addEventListener("transitionend",v)})}),()=>{const a=et(e),c=Yh(a);let f=a.tag||jt;if(i=[],o)for(let h=0;h<o.length;h++){const p=o[h];p.el&&p.el instanceof Element&&(i.push(p),Yi(p,Xi(p,c,r,n)),td.set(p,p.el.getBoundingClientRect()))}o=t.default?Fl(t.default()):[];for(let h=0;h<o.length;h++){const p=o[h];p.key!=null&&Yi(p,Xi(p,c,r,n))}return oe(f,null,o)}}},Qv=e=>delete e.mode;rd.props;const Ux=rd;function Zv(e){const t=e.el;t[ms]&&t[ms](),t[Ac]&&t[Ac]()}function Jv(e){nd.set(e,e.el.getBoundingClientRect())}function ey(e){const t=td.get(e),n=nd.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${r}px,${i}px)`,o.transitionDuration="0s",e}}function ty(e,t,n){const r=e.cloneNode(),i=e[li];i&&i.forEach(c=>{c.split(/\s+/).forEach(f=>f&&r.classList.remove(f))}),n.split(/\s+/).forEach(c=>c&&r.classList.add(c)),r.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(r);const{hasTransform:a}=Qh(r);return o.removeChild(r),a}const vs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Oe(t)?n=>Zo(t,n):t};function ny(e){e.target.composing=!0}function Pc(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ii=Symbol("_assign"),Kx={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[ii]=vs(i);const o=r||i.props&&i.props.type==="number";Or(e,t?"change":"input",a=>{if(a.target.composing)return;let c=e.value;n&&(c=c.trim()),o&&(c=us(c)),e[ii](c)}),n&&Or(e,"change",()=>{e.value=e.value.trim()}),t||(Or(e,"compositionstart",ny),Or(e,"compositionend",Pc),Or(e,"change",Pc))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:i}},o){if(e[ii]=vs(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?us(e.value):e.value,c=t??"";a!==c&&(document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===c)||(e.value=c))}},Vx={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const i=As(t);Or(e,"change",()=>{const o=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?us(ys(a)):ys(a));e[ii](e.multiple?i?new Set(o):o:o[0]),e._assigning=!0,Ml(()=>{e._assigning=!1})}),e[ii]=vs(r)},mounted(e,{value:t,modifiers:{number:n}}){Tc(e,t)},beforeUpdate(e,t,n){e[ii]=vs(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||Tc(e,t)}};function Tc(e,t,n){const r=e.multiple,i=Oe(t);if(!(r&&!i&&!As(t))){for(let o=0,a=e.options.length;o<a;o++){const c=e.options[o],f=ys(c);if(r)if(i){const h=typeof f;h==="string"||h==="number"?c.selected=t.some(p=>String(p)===String(f)):c.selected=Wg(t,f)>-1}else c.selected=t.has(f);else if(Rs(ys(c),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ys(e){return"_value"in e?e._value:e.value}const ry=["ctrl","shift","alt","meta"],iy={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>ry.some(n=>e[`${n}Key`]&&!t.includes(n))},qx=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(i,...o)=>{for(let a=0;a<t.length;a++){const c=iy[t[a]];if(c&&c(i,t))return}return e(i,...o)})},oy={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Wx=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=i=>{if(!("key"in i))return;const o=Br(i.key);if(t.some(a=>a===o||oy[a]===o))return e(i)})},sy=Rt({patchProp:Xv},Iv);let Oc;function id(){return Oc||(Oc=hv(sy))}const Ra=(...e)=>{id().render(...e)},ay=(...e)=>{const t=id().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=uy(r);if(!i)return;const o=t._component;!De(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const a=n(i,!1,ly(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},t};function ly(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function uy(e){return xt(e)?document.querySelector(e):e}/**
|
|
38
|
+
* See the LICENSE file distributed with this work for additional
|
|
39
|
+
* information regarding copyright ownership.
|
|
40
|
+
*
|
|
41
|
+
* This is free software; you can redistribute it and/or modify it
|
|
42
|
+
* under the terms of the GNU Affero General Public License as
|
|
43
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
44
|
+
* the License, or (at your option) any later version.
|
|
45
|
+
*
|
|
46
|
+
* This software is distributed in the hope that it will be useful,
|
|
47
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
48
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
49
|
+
* Lesser General Public License for more details.
|
|
50
|
+
*
|
|
51
|
+
* You should have received a copy of the GNU Affero General Public
|
|
52
|
+
* License along with this software; if not, write to the Free
|
|
53
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
54
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
55
|
+
*
|
|
56
|
+
* This file is part of the Cristal Wiki software prototype
|
|
57
|
+
* @copyright Copyright (c) 2023 XWiki SAS
|
|
58
|
+
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
59
|
+
*
|
|
60
|
+
**/class rl{constructor(t){this.jsonld=t}getIdentifier(){return this.jsonld.identifier}setIdentifier(t){this.jsonld.identifier=t}getName(){return this.jsonld.name}setName(t){this.jsonld.name=t}getText(){return this.jsonld.text}setText(t){this.jsonld.text=t}get(t){return this.jsonld[t]}set(t,n){this.jsonld[t]=n}getSource(){return this.jsonld}}/**
|
|
61
|
+
* See the LICENSE file distributed with this work for additional
|
|
62
|
+
* information regarding copyright ownership.
|
|
63
|
+
*
|
|
64
|
+
* This is free software; you can redistribute it and/or modify it
|
|
65
|
+
* under the terms of the GNU Affero General Public License as
|
|
66
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
67
|
+
* the License, or (at your option) any later version.
|
|
68
|
+
*
|
|
69
|
+
* This software is distributed in the hope that it will be useful,
|
|
70
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
71
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
72
|
+
* Lesser General Public License for more details.
|
|
73
|
+
*
|
|
74
|
+
* You should have received a copy of the GNU Affero General Public
|
|
75
|
+
* License along with this software; if not, write to the Free
|
|
76
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
77
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
78
|
+
*
|
|
79
|
+
* This file is part of the Cristal Wiki software prototype
|
|
80
|
+
* @copyright Copyright (c) 2023 XWiki SAS
|
|
81
|
+
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
82
|
+
*
|
|
83
|
+
**/class pr{constructor(t="",n="",r="",i=""){this.document=new rl({}),this.source=r,this.syntax=i,this.html="",this.name=n,this.id=t,this.css=[],this.js=[],this.version=""}toObject(){return{id:this.id,name:this.name,source:this.source,syntax:this.syntax,html:this.html,document:this.document.getSource(),css:this.css,js:this.js,version:this.version}}fromObject(t){this.id=t.id,this.name=t.name,this.source=t.source,this.syntax=t.syntax,this.html=t.html,this.document=new rl(t.document),this.css=t.css,this.js=t.js,this.version=t.version}}var cy=Object.defineProperty,fy=Object.getOwnPropertyDescriptor,hy=(e,t,n,r)=>{for(var i=r>1?void 0:r?fy(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&cy(t,n,i),i},dy=(e,t)=>(n,r)=>t(n,r,e);let Zi=class{constructor(e){this.logger=e,this.logger.setModule("storage.components.defaultWikiStorage"),this.offlineSetup=!1}setConfig(e,t,n,r,i,o,a){this.name=e,this.baseURL=t,this.baseRestURL=n,this.homePage=r,this.serverRendering=i,this.designSystem=o,this.offline=a}setConfigFromObject(e){this.name=e.name,this.baseURL=e.baseURL,this.baseRestURL=e.baseRestURL,this.homePage=e.homePage,this.serverRendering=e.serverRendering,this.offline=e.offline,this.designSystem=e.designSystem}setupOfflineStorage(){if(this.logger.debug("Checking offline storage"),this.offline&&this.cristal){this.logger.debug("Looking for wrapping offline storage");const e=this.cristal.getContainer().get("WrappingStorage");e?(this.logger.debug("Offline local storage is ready"),e.setStorage(this.storage),e.setWikiConfig(this.storage.getWikiConfig()),this.storage=e):this.logger.debug("Failed Looking for wrapping offline storage")}else this.cristal||this.logger.debug("Cristal not initialized"),this.offline||this.logger.debug("Offline mode not activated")}isSupported(e){return e=="html"}initialize(){this.offline&&!this.offlineSetup&&(this.setupOfflineStorage(),this.offlineSetup=!0,this.storage.isStorageReady())}defaultPageName(){return"index"}};Zi=hy([kt(),dy(0,wt("Logger"))],Zi);var py=Object.defineProperty,gy=Object.getOwnPropertyDescriptor,od=(e,t,n,r)=>{for(var i=r>1?void 0:r?gy(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&py(t,n,i),i};let ui=class{setModule(e){this.module=e}debug(...e){(!this.loggerConfig||this.loggerConfig.hasLevelId(this.module,4))&&e.unshift(this.module+":"),console.debug.apply(null,e)}info(...e){e.unshift(this.module+":"),console.info.apply(null,e)}warn(...e){e.unshift(this.module+":"),console.warn.apply(null,e)}error(...e){e.unshift(this.module+":"),console.error.apply(null,e)}};od([wt("LoggerConfig")],ui.prototype,"loggerConfig",2);ui=od([kt()],ui);var my=Object.defineProperty,vy=Object.getOwnPropertyDescriptor,yy=(e,t,n,r)=>{for(var i=r>1?void 0:r?vy(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&my(t,n,i),i};let il=class{constructor(e="error"){this.levels=new Map,this.config=new Map,this.defaultLevel=e,this.computedConfig=new Map,this.levels.set("error",1),this.levels.set("warn",2),this.levels.set("info",3),this.levels.set("debug",4)}addLevel(e,t){const n=this.levels.get(t);n!=null&&this.config.forEach(r=>{if(r.startsWith(e)){const i=this.computedConfig.get(r);(i==null||n&&n>i)&&n&&this.computedConfig.set(r,n)}})}getLevels(){return this.config}getLevel(e){let t=this.config.get(e);return t||(t=this.defaultLevel),t}getLevelId(e){const t=this.levels.get(e);return t||10}setDefaultLevel(e){this.defaultLevel=e,this.defaultLevelId=this.getLevelId(this.defaultLevel)}getDefaultLevel(){return this.defaultLevel}getDefaultLevelId(){return this.defaultLevelId?this.defaultLevelId:(this.defaultLevelId=this.getLevelId(this.defaultLevel),this.defaultLevelId)}hasLevel(e,t){let n=this.computedConfig.get(e);n||(n=this.getDefaultLevelId());const r=this.getLevelId(t);return!!(r&&n>=r)}hasLevelId(e,t){let n=this.computedConfig.get(e);n||(n=this.getDefaultLevelId());const r=t;return!!(r&&n>=r)}};il=yy([kt()],il);/*!
|
|
84
|
+
* vue-router v4.3.2
|
|
85
|
+
* (c) 2024 Eduardo San Martin Morote
|
|
86
|
+
* @license MIT
|
|
87
|
+
*/const Qr=typeof document<"u";function by(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ut=Object.assign;function Ia(e,t){const n={};for(const r in t){const i=t[r];n[r]=_n(i)?i.map(e):e(i)}return n}const Fi=()=>{},_n=Array.isArray,sd=/#/g,_y=/&/g,wy=/\//g,xy=/=/g,ky=/\?/g,ad=/\+/g,Cy=/%5B/g,Sy=/%5D/g,ld=/%5E/g,Ey=/%60/g,ud=/%7B/g,Ay=/%7C/g,cd=/%7D/g,Py=/%20/g;function zl(e){return encodeURI(""+e).replace(Ay,"|").replace(Cy,"[").replace(Sy,"]")}function Ty(e){return zl(e).replace(ud,"{").replace(cd,"}").replace(ld,"^")}function ol(e){return zl(e).replace(ad,"%2B").replace(Py,"+").replace(sd,"%23").replace(_y,"%26").replace(Ey,"`").replace(ud,"{").replace(cd,"}").replace(ld,"^")}function Oy(e){return ol(e).replace(xy,"%3D")}function Ry(e){return zl(e).replace(sd,"%23").replace(ky,"%3F")}function Iy(e){return e==null?"":Ry(e).replace(wy,"%2F")}function Ji(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const My=/\/$/,Dy=e=>e.replace(My,"");function Ma(e,t,n="/"){let r,i={},o="",a="";const c=t.indexOf("#");let f=t.indexOf("?");return c<f&&c>=0&&(f=-1),f>-1&&(r=t.slice(0,f),o=t.slice(f+1,c>-1?c:t.length),i=e(o)),c>-1&&(r=r||t.slice(0,c),a=t.slice(c,t.length)),r=$y(r??t,n),{fullPath:r+(o&&"?")+o+a,path:r,query:i,hash:Ji(a)}}function Ly(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Rc(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function jy(e,t,n){const r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&ci(t.matched[r],n.matched[i])&&fd(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ci(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function fd(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Ny(e[n],t[n]))return!1;return!0}function Ny(e,t){return _n(e)?Ic(e,t):_n(t)?Ic(t,e):e===t}function Ic(e,t){return _n(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function $y(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),i=r[r.length-1];(i===".."||i===".")&&r.push("");let o=n.length-1,a,c;for(a=0;a<r.length;a++)if(c=r[a],c!==".")if(c==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(a).join("/")}var eo;(function(e){e.pop="pop",e.push="push"})(eo||(eo={}));var Bi;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Bi||(Bi={}));function Fy(e){if(!e)if(Qr){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Dy(e)}const By=/^[^#]+#/;function Uy(e,t){return e.replace(By,"#")+t}function Ky(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Ks=()=>({left:window.scrollX,top:window.scrollY});function Vy(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=Ky(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Mc(e,t){return(history.state?history.state.position-t:-1)+e}const sl=new Map;function qy(e,t){sl.set(e,t)}function Wy(e){const t=sl.get(e);return sl.delete(e),t}let zy=()=>location.protocol+"//"+location.host;function hd(e,t){const{pathname:n,search:r,hash:i}=t,o=e.indexOf("#");if(o>-1){let c=i.includes(e.slice(o))?e.slice(o).length:1,f=i.slice(c);return f[0]!=="/"&&(f="/"+f),Rc(f,"")}return Rc(n,e)+r+i}function Hy(e,t,n,r){let i=[],o=[],a=null;const c=({state:y})=>{const k=hd(e,location),D=n.value,z=t.value;let ae=0;if(y){if(n.value=k,t.value=y,a&&a===D){a=null;return}ae=z?y.position-z.position:0}else r(k);i.forEach(re=>{re(n.value,D,{delta:ae,type:eo.pop,direction:ae?ae>0?Bi.forward:Bi.back:Bi.unknown})})};function f(){a=n.value}function h(y){i.push(y);const k=()=>{const D=i.indexOf(y);D>-1&&i.splice(D,1)};return o.push(k),k}function p(){const{history:y}=window;y.state&&y.replaceState(ut({},y.state,{scroll:Ks()}),"")}function v(){for(const y of o)y();o=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",p)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",p,{passive:!0}),{pauseListeners:f,listen:h,destroy:v}}function Dc(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?Ks():null}}function Gy(e){const{history:t,location:n}=window,r={value:hd(e,n)},i={value:t.state};i.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(f,h,p){const v=e.indexOf("#"),y=v>-1?(n.host&&document.querySelector("base")?e:e.slice(v))+f:zy()+e+f;try{t[p?"replaceState":"pushState"](h,"",y),i.value=h}catch(k){console.error(k),n[p?"replace":"assign"](y)}}function a(f,h){const p=ut({},t.state,Dc(i.value.back,f,i.value.forward,!0),h,{position:i.value.position});o(f,p,!0),r.value=f}function c(f,h){const p=ut({},i.value,t.state,{forward:f,scroll:Ks()});o(p.current,p,!0);const v=ut({},Dc(r.value,f,null),{position:p.position+1},h);o(f,v,!1),r.value=f}return{location:r,state:i,push:c,replace:a}}function Xy(e){e=Fy(e);const t=Gy(e),n=Hy(e,t.state,t.location,t.replace);function r(o,a=!0){a||n.pauseListeners(),history.go(o)}const i=ut({location:"",base:e,go:r,createHref:Uy.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function Yy(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Xy(e)}function Qy(e){return typeof e=="string"||e&&typeof e=="object"}function dd(e){return typeof e=="string"||typeof e=="symbol"}const er={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},pd=Symbol("");var Lc;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Lc||(Lc={}));function fi(e,t){return ut(new Error,{type:e,[pd]:!0},t)}function Ln(e,t){return e instanceof Error&&pd in e&&(t==null||!!(e.type&t))}const jc="[^/]+?",Zy={sensitive:!1,strict:!1,start:!0,end:!0},Jy=/[.+*?^${}()[\]/\\]/g;function eb(e,t){const n=ut({},Zy,t),r=[];let i=n.start?"^":"";const o=[];for(const h of e){const p=h.length?[]:[90];n.strict&&!h.length&&(i+="/");for(let v=0;v<h.length;v++){const y=h[v];let k=40+(n.sensitive?.25:0);if(y.type===0)v||(i+="/"),i+=y.value.replace(Jy,"\\$&"),k+=40;else if(y.type===1){const{value:D,repeatable:z,optional:ae,regexp:re}=y;o.push({name:D,repeatable:z,optional:ae});const Q=re||jc;if(Q!==jc){k+=10;try{new RegExp(`(${Q})`)}catch(Te){throw new Error(`Invalid custom RegExp for param "${D}" (${Q}): `+Te.message)}}let _e=z?`((?:${Q})(?:/(?:${Q}))*)`:`(${Q})`;v||(_e=ae&&h.length<2?`(?:/${_e})`:"/"+_e),ae&&(_e+="?"),i+=_e,k+=20,ae&&(k+=-8),z&&(k+=-20),Q===".*"&&(k+=-50)}p.push(k)}r.push(p)}if(n.strict&&n.end){const h=r.length-1;r[h][r[h].length-1]+=.7000000000000001}n.strict||(i+="/?"),n.end?i+="$":n.strict&&(i+="(?:/|$)");const a=new RegExp(i,n.sensitive?"":"i");function c(h){const p=h.match(a),v={};if(!p)return null;for(let y=1;y<p.length;y++){const k=p[y]||"",D=o[y-1];v[D.name]=k&&D.repeatable?k.split("/"):k}return v}function f(h){let p="",v=!1;for(const y of e){(!v||!p.endsWith("/"))&&(p+="/"),v=!1;for(const k of y)if(k.type===0)p+=k.value;else if(k.type===1){const{value:D,repeatable:z,optional:ae}=k,re=D in h?h[D]:"";if(_n(re)&&!z)throw new Error(`Provided param "${D}" is an array but it is not repeatable (* or + modifiers)`);const Q=_n(re)?re.join("/"):re;if(!Q)if(ae)y.length<2&&(p.endsWith("/")?p=p.slice(0,-1):v=!0);else throw new Error(`Missing required param "${D}"`);p+=Q}}return p||"/"}return{re:a,score:r,keys:o,parse:c,stringify:f}}function tb(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function nb(e,t){let n=0;const r=e.score,i=t.score;for(;n<r.length&&n<i.length;){const o=tb(r[n],i[n]);if(o)return o;n++}if(Math.abs(i.length-r.length)===1){if(Nc(r))return 1;if(Nc(i))return-1}return i.length-r.length}function Nc(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const rb={type:0,value:""},ib=/[a-zA-Z0-9_]/;function ob(e){if(!e)return[[]];if(e==="/")return[[rb]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(k){throw new Error(`ERR (${n})/"${h}": ${k}`)}let n=0,r=n;const i=[];let o;function a(){o&&i.push(o),o=[]}let c=0,f,h="",p="";function v(){h&&(n===0?o.push({type:0,value:h}):n===1||n===2||n===3?(o.length>1&&(f==="*"||f==="+")&&t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:h,regexp:p,repeatable:f==="*"||f==="+",optional:f==="*"||f==="?"})):t("Invalid state to consume buffer"),h="")}function y(){h+=f}for(;c<e.length;){if(f=e[c++],f==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:f==="/"?(h&&v(),a()):f===":"?(v(),n=1):y();break;case 4:y(),n=r;break;case 1:f==="("?n=2:ib.test(f)?y():(v(),n=0,f!=="*"&&f!=="?"&&f!=="+"&&c--);break;case 2:f===")"?p[p.length-1]=="\\"?p=p.slice(0,-1)+f:n=3:p+=f;break;case 3:v(),n=0,f!=="*"&&f!=="?"&&f!=="+"&&c--,p="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${h}"`),v(),a(),i}function sb(e,t,n){const r=eb(ob(e.path),n),i=ut(r,{record:e,parent:t,children:[],alias:[]});return t&&!i.record.aliasOf==!t.record.aliasOf&&t.children.push(i),i}function ab(e,t){const n=[],r=new Map;t=Bc({strict:!1,end:!0,sensitive:!1},t);function i(p){return r.get(p)}function o(p,v,y){const k=!y,D=lb(p);D.aliasOf=y&&y.record;const z=Bc(t,p),ae=[D];if("alias"in p){const _e=typeof p.alias=="string"?[p.alias]:p.alias;for(const Te of _e)ae.push(ut({},D,{components:y?y.record.components:D.components,path:Te,aliasOf:y?y.record:D}))}let re,Q;for(const _e of ae){const{path:Te}=_e;if(v&&Te[0]!=="/"){const le=v.record.path,Z=le[le.length-1]==="/"?"":"/";_e.path=v.record.path+(Te&&Z+Te)}if(re=sb(_e,v,z),y?y.alias.push(re):(Q=Q||re,Q!==re&&Q.alias.push(re),k&&p.name&&!Fc(re)&&a(p.name)),D.children){const le=D.children;for(let Z=0;Z<le.length;Z++)o(le[Z],re,y&&y.children[Z])}y=y||re,(re.record.components&&Object.keys(re.record.components).length||re.record.name||re.record.redirect)&&f(re)}return Q?()=>{a(Q)}:Fi}function a(p){if(dd(p)){const v=r.get(p);v&&(r.delete(p),n.splice(n.indexOf(v),1),v.children.forEach(a),v.alias.forEach(a))}else{const v=n.indexOf(p);v>-1&&(n.splice(v,1),p.record.name&&r.delete(p.record.name),p.children.forEach(a),p.alias.forEach(a))}}function c(){return n}function f(p){let v=0;for(;v<n.length&&nb(p,n[v])>=0&&(p.record.path!==n[v].record.path||!gd(p,n[v]));)v++;n.splice(v,0,p),p.record.name&&!Fc(p)&&r.set(p.record.name,p)}function h(p,v){let y,k={},D,z;if("name"in p&&p.name){if(y=r.get(p.name),!y)throw fi(1,{location:p});z=y.record.name,k=ut($c(v.params,y.keys.filter(Q=>!Q.optional).concat(y.parent?y.parent.keys.filter(Q=>Q.optional):[]).map(Q=>Q.name)),p.params&&$c(p.params,y.keys.map(Q=>Q.name))),D=y.stringify(k)}else if(p.path!=null)D=p.path,y=n.find(Q=>Q.re.test(D)),y&&(k=y.parse(D),z=y.record.name);else{if(y=v.name?r.get(v.name):n.find(Q=>Q.re.test(v.path)),!y)throw fi(1,{location:p,currentLocation:v});z=y.record.name,k=ut({},v.params,p.params),D=y.stringify(k)}const ae=[];let re=y;for(;re;)ae.unshift(re.record),re=re.parent;return{name:z,path:D,params:k,matched:ae,meta:cb(ae)}}return e.forEach(p=>o(p)),{addRoute:o,resolve:h,removeRoute:a,getRoutes:c,getRecordMatcher:i}}function $c(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function lb(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:ub(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function ub(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Fc(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function cb(e){return e.reduce((t,n)=>ut(t,n.meta),{})}function Bc(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function gd(e,t){return t.children.some(n=>n===e||gd(e,n))}function fb(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<r.length;++i){const o=r[i].replace(ad," "),a=o.indexOf("="),c=Ji(a<0?o:o.slice(0,a)),f=a<0?null:Ji(o.slice(a+1));if(c in t){let h=t[c];_n(h)||(h=t[c]=[h]),h.push(f)}else t[c]=f}return t}function Uc(e){let t="";for(let n in e){const r=e[n];if(n=Oy(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(_n(r)?r.map(o=>o&&ol(o)):[r&&ol(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function hb(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=_n(r)?r.map(i=>i==null?null:""+i):r==null?r:""+r)}return t}const db=Symbol(""),Kc=Symbol(""),Hl=Symbol(""),Gl=Symbol(""),al=Symbol("");function Si(){let e=[];function t(r){return e.push(r),()=>{const i=e.indexOf(r);i>-1&&e.splice(i,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function lr(e,t,n,r,i,o=a=>a()){const a=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((c,f)=>{const h=y=>{y===!1?f(fi(4,{from:n,to:t})):y instanceof Error?f(y):Qy(y)?f(fi(2,{from:t,to:y})):(a&&r.enterCallbacks[i]===a&&typeof y=="function"&&a.push(y),c())},p=o(()=>e.call(r&&r.instances[i],t,n,h));let v=Promise.resolve(p);e.length<3&&(v=v.then(h)),v.catch(y=>f(y))})}function Da(e,t,n,r,i=o=>o()){const o=[];for(const a of e)for(const c in a.components){let f=a.components[c];if(!(t!=="beforeRouteEnter"&&!a.instances[c]))if(pb(f)){const p=(f.__vccOpts||f)[t];p&&o.push(lr(p,n,r,a,c,i))}else{let h=f();o.push(()=>h.then(p=>{if(!p)return Promise.reject(new Error(`Couldn't resolve component "${c}" at "${a.path}"`));const v=by(p)?p.default:p;a.components[c]=v;const k=(v.__vccOpts||v)[t];return k&&lr(k,n,r,a,c,i)()}))}}return o}function pb(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Vc(e){const t=bt(Hl),n=bt(Gl),r=Yt(()=>{const f=rt(e.to);return t.resolve(f)}),i=Yt(()=>{const{matched:f}=r.value,{length:h}=f,p=f[h-1],v=n.matched;if(!p||!v.length)return-1;const y=v.findIndex(ci.bind(null,p));if(y>-1)return y;const k=qc(f[h-2]);return h>1&&qc(p)===k&&v[v.length-1].path!==k?v.findIndex(ci.bind(null,f[h-2])):y}),o=Yt(()=>i.value>-1&&yb(n.params,r.value.params)),a=Yt(()=>i.value>-1&&i.value===n.matched.length-1&&fd(n.params,r.value.params));function c(f={}){return vb(f)?t[rt(e.replace)?"replace":"push"](rt(e.to)).catch(Fi):Promise.resolve()}return{route:r,href:Yt(()=>r.value.href),isActive:o,isExactActive:a,navigate:c}}const gb=Zt({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Vc,setup(e,{slots:t}){const n=Ms(Vc(e)),{options:r}=bt(Hl),i=Yt(()=>({[Wc(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Wc(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:Wl("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},o)}}}),mb=gb;function vb(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function yb(e,t){for(const n in t){const r=t[n],i=e[n];if(typeof r=="string"){if(r!==i)return!1}else if(!_n(i)||i.length!==r.length||r.some((o,a)=>o!==i[a]))return!1}return!0}function qc(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Wc=(e,t,n)=>e??t??n,bb=Zt({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=bt(al),i=Yt(()=>e.route||r.value),o=bt(Kc,0),a=Yt(()=>{let h=rt(o);const{matched:p}=i.value;let v;for(;(v=p[h])&&!v.components;)h++;return h}),c=Yt(()=>i.value.matched[a.value]);Jo(Kc,Yt(()=>a.value+1)),Jo(db,c),Jo(al,i);const f=Ot();return Dr(()=>[f.value,c.value,e.name],([h,p,v],[y,k,D])=>{p&&(p.instances[v]=h,k&&k!==p&&h&&h===y&&(p.leaveGuards.size||(p.leaveGuards=k.leaveGuards),p.updateGuards.size||(p.updateGuards=k.updateGuards))),h&&p&&(!k||!ci(p,k)||!y)&&(p.enterCallbacks[v]||[]).forEach(z=>z(h))},{flush:"post"}),()=>{const h=i.value,p=e.name,v=c.value,y=v&&v.components[p];if(!y)return zc(n.default,{Component:y,route:h});const k=v.props[p],D=k?k===!0?h.params:typeof k=="function"?k(h):k:null,ae=Wl(y,ut({},D,t,{onVnodeUnmounted:re=>{re.component.isUnmounted&&(v.instances[p]=null)},ref:f}));return zc(n.default,{Component:ae,route:h})||ae}}});function zc(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const _b=bb;function wb(e){const t=ab(e.routes,e),n=e.parseQuery||fb,r=e.stringifyQuery||Uc,i=e.history,o=Si(),a=Si(),c=Si(),f=ah(er);let h=er;Qr&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const p=Ia.bind(null,W=>""+W),v=Ia.bind(null,Iy),y=Ia.bind(null,Ji);function k(W,ge){let U,me;return dd(W)?(U=t.getRecordMatcher(W),me=ge):me=W,t.addRoute(me,U)}function D(W){const ge=t.getRecordMatcher(W);ge&&t.removeRoute(ge)}function z(){return t.getRoutes().map(W=>W.record)}function ae(W){return!!t.getRecordMatcher(W)}function re(W,ge){if(ge=ut({},ge||f.value),typeof W=="string"){const x=Ma(n,W,ge.path),L=t.resolve({path:x.path},ge),G=i.createHref(x.fullPath);return ut(x,L,{params:y(L.params),hash:Ji(x.hash),redirectedFrom:void 0,href:G})}let U;if(W.path!=null)U=ut({},W,{path:Ma(n,W.path,ge.path).path});else{const x=ut({},W.params);for(const L in x)x[L]==null&&delete x[L];U=ut({},W,{params:v(x)}),ge.params=v(ge.params)}const me=t.resolve(U,ge),Xe=W.hash||"";me.params=p(y(me.params));const Se=Ly(r,ut({},W,{hash:Ty(Xe),path:me.path})),_=i.createHref(Se);return ut({fullPath:Se,hash:Xe,query:r===Uc?hb(W.query):W.query||{}},me,{redirectedFrom:void 0,href:_})}function Q(W){return typeof W=="string"?Ma(n,W,f.value.path):ut({},W)}function _e(W,ge){if(h!==W)return fi(8,{from:ge,to:W})}function Te(W){return Ce(W)}function le(W){return Te(ut(Q(W),{replace:!0}))}function Z(W){const ge=W.matched[W.matched.length-1];if(ge&&ge.redirect){const{redirect:U}=ge;let me=typeof U=="function"?U(W):U;return typeof me=="string"&&(me=me.includes("?")||me.includes("#")?me=Q(me):{path:me},me.params={}),ut({query:W.query,hash:W.hash,params:me.path!=null?{}:W.params},me)}}function Ce(W,ge){const U=h=re(W),me=f.value,Xe=W.state,Se=W.force,_=W.replace===!0,x=Z(U);if(x)return Ce(ut(Q(x),{state:typeof x=="object"?ut({},Xe,x.state):Xe,force:Se,replace:_}),ge||U);const L=U;L.redirectedFrom=ge;let G;return!Se&&jy(r,me,U)&&(G=fi(16,{to:L,from:me}),Bt(me,me,!0,!1)),(G?Promise.resolve(G):Ie(L,me)).catch(q=>Ln(q)?Ln(q,2)?q:Et(q):Fe(q,L,me)).then(q=>{if(q){if(Ln(q,2))return Ce(ut({replace:_},Q(q.to),{state:typeof q.to=="object"?ut({},Xe,q.to.state):Xe,force:Se}),ge||L)}else q=he(L,me,!0,_,Xe);return Ge(L,me,q),q})}function ye(W,ge){const U=_e(W,ge);return U?Promise.reject(U):Promise.resolve()}function Re(W){const ge=vn.values().next().value;return ge&&typeof ge.runWithContext=="function"?ge.runWithContext(W):W()}function Ie(W,ge){let U;const[me,Xe,Se]=xb(W,ge);U=Da(me.reverse(),"beforeRouteLeave",W,ge);for(const x of me)x.leaveGuards.forEach(L=>{U.push(lr(L,W,ge))});const _=ye.bind(null,W,ge);return U.push(_),pt(U).then(()=>{U=[];for(const x of o.list())U.push(lr(x,W,ge));return U.push(_),pt(U)}).then(()=>{U=Da(Xe,"beforeRouteUpdate",W,ge);for(const x of Xe)x.updateGuards.forEach(L=>{U.push(lr(L,W,ge))});return U.push(_),pt(U)}).then(()=>{U=[];for(const x of Se)if(x.beforeEnter)if(_n(x.beforeEnter))for(const L of x.beforeEnter)U.push(lr(L,W,ge));else U.push(lr(x.beforeEnter,W,ge));return U.push(_),pt(U)}).then(()=>(W.matched.forEach(x=>x.enterCallbacks={}),U=Da(Se,"beforeRouteEnter",W,ge,Re),U.push(_),pt(U))).then(()=>{U=[];for(const x of a.list())U.push(lr(x,W,ge));return U.push(_),pt(U)}).catch(x=>Ln(x,8)?x:Promise.reject(x))}function Ge(W,ge,U){c.list().forEach(me=>Re(()=>me(W,ge,U)))}function he(W,ge,U,me,Xe){const Se=_e(W,ge);if(Se)return Se;const _=ge===er,x=Qr?history.state:{};U&&(me||_?i.replace(W.fullPath,ut({scroll:_&&x&&x.scroll},Xe)):i.push(W.fullPath,Xe)),f.value=W,Bt(W,ge,U,_),Et()}let Le;function dt(){Le||(Le=i.listen((W,ge,U)=>{if(!at.listening)return;const me=re(W),Xe=Z(me);if(Xe){Ce(ut(Xe,{replace:!0}),me).catch(Fi);return}h=me;const Se=f.value;Qr&&qy(Mc(Se.fullPath,U.delta),Ks()),Ie(me,Se).catch(_=>Ln(_,12)?_:Ln(_,2)?(Ce(_.to,me).then(x=>{Ln(x,20)&&!U.delta&&U.type===eo.pop&&i.go(-1,!1)}).catch(Fi),Promise.reject()):(U.delta&&i.go(-U.delta,!1),Fe(_,me,Se))).then(_=>{_=_||he(me,Se,!1),_&&(U.delta&&!Ln(_,8)?i.go(-U.delta,!1):U.type===eo.pop&&Ln(_,20)&&i.go(-1,!1)),Ge(me,Se,_)}).catch(Fi)}))}let Ct=Si(),Ze=Si(),Ye;function Fe(W,ge,U){Et(W);const me=Ze.list();return me.length?me.forEach(Xe=>Xe(W,ge,U)):console.error(W),Promise.reject(W)}function Lt(){return Ye&&f.value!==er?Promise.resolve():new Promise((W,ge)=>{Ct.add([W,ge])})}function Et(W){return Ye||(Ye=!W,dt(),Ct.list().forEach(([ge,U])=>W?U(W):ge()),Ct.reset()),W}function Bt(W,ge,U,me){const{scrollBehavior:Xe}=e;if(!Qr||!Xe)return Promise.resolve();const Se=!U&&Wy(Mc(W.fullPath,0))||(me||!U)&&history.state&&history.state.scroll||null;return Ml().then(()=>Xe(W,ge,Se)).then(_=>_&&Vy(_)).catch(_=>Fe(_,W,ge))}const xe=W=>i.go(W);let It;const vn=new Set,at={currentRoute:f,listening:!0,addRoute:k,removeRoute:D,hasRoute:ae,getRoutes:z,resolve:re,options:e,push:Te,replace:le,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:o.add,beforeResolve:a.add,afterEach:c.add,onError:Ze.add,isReady:Lt,install(W){const ge=this;W.component("RouterLink",mb),W.component("RouterView",_b),W.config.globalProperties.$router=ge,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>rt(f)}),Qr&&!It&&f.value===er&&(It=!0,Te(i.location).catch(Xe=>{}));const U={};for(const Xe in er)Object.defineProperty(U,Xe,{get:()=>f.value[Xe],enumerable:!0});W.provide(Hl,ge),W.provide(Gl,nh(U)),W.provide(al,f);const me=W.unmount;vn.add(W),W.unmount=function(){vn.delete(W),vn.size<1&&(h=er,Le&&Le(),Le=null,f.value=er,It=!1,Ye=!1),me()}}};function pt(W){return W.reduce((ge,U)=>ge.then(()=>Re(U)),Promise.resolve())}return at}function xb(e,t){const n=[],r=[],i=[],o=Math.max(t.matched.length,e.matched.length);for(let a=0;a<o;a++){const c=t.matched[a];c&&(e.matched.find(h=>ci(h,c))?r.push(c):n.push(c));const f=e.matched[a];f&&(t.matched.find(h=>ci(h,f))||i.push(f))}return[n,r,i]}function kb(){return bt(Gl)}var Cb=Object.defineProperty,Sb=Object.getOwnPropertyDescriptor,Eb=(e,t,n,r)=>{for(var i=r>1?void 0:r?Sb(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&Cb(t,n,i),i};let Kn=class{getVueComponent(){throw new Error("Method not implemented.")}getVueName(){throw new Error("Method not implemented.")}isGlobal(){return!0}registerComponents(){}};Kn.cname="cristal.vuejs.component";Kn.hint="template";Kn.priority=1e3;Kn.singleton=!0;Kn=Eb([kt()],Kn);var Ab=Object.defineProperty,Pb=Object.getOwnPropertyDescriptor,Tb=(e,t,n,r)=>{for(var i=r>1?void 0:r?Pb(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&Ab(t,n,i),i};let gr=class extends Kn{constructor(){super()}};gr.cname="cristal.vuejs.component";gr.hint="uix";gr.priority=1e3;gr.singleton=!0;gr=Tb([kt()],gr);const to=Zt({__name:"c-template",props:{name:{}},setup(e){let t,n;const r=e;let i=bt("skinManager"),o=bt("cristal");o&&(n=o.getLogger("skin.vue.template")),i&&(t=i.getTemplate(r.name)||void 0);let a=t;return n?.debug("Template component is",a),(c,f)=>(qe(),yr(jl(rt(a))))}});var Ob=Object.defineProperty,Rb=Object.getOwnPropertyDescriptor,Ib=(e,t,n,r)=>{for(var i=r>1?void 0:r?Rb(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&Ob(t,n,i),i};let Lr=class extends gr{constructor(){super()}getVueComponent(){return to}getVueName(){return"Template"}isGlobal(){return!0}bindToContainer(e){e.bind("VueTemplateProvider").to(Lr)}};Lr.cname="cristal.vuejs.component";Lr.hint="template";Lr.priority=1e3;Lr.singleton=!0;Lr=Ib([kt()],Lr);const Kt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},Mb={};function Db(e,t){const n=St("router-view");return qe(),ot("main",null,[oe(n)])}const md=Kt(Mb,[["render",Db]]);/**
|
|
88
|
+
* See the LICENSE file distributed with this work for additional
|
|
89
|
+
* information regarding copyright ownership.
|
|
90
|
+
*
|
|
91
|
+
* This is free software; you can redistribute it and/or modify it
|
|
92
|
+
* under the terms of the GNU Affero General Public License as
|
|
93
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
94
|
+
* the License, or (at your option) any later version.
|
|
95
|
+
*
|
|
96
|
+
* This software is distributed in the hope that it will be useful,
|
|
97
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
98
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
99
|
+
* Lesser General Public License for more details.
|
|
100
|
+
*
|
|
101
|
+
* You should have received a copy of the GNU Affero General Public
|
|
102
|
+
* License along with this software; if not, write to the Free
|
|
103
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
104
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
105
|
+
*
|
|
106
|
+
* This file is part of the Cristal Wiki software prototype
|
|
107
|
+
* @copyright Copyright (c) 2023 XWiki SAS
|
|
108
|
+
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
109
|
+
*
|
|
110
|
+
**/var ur=(e=>(e[e.Mobile=0]="Mobile",e[e.Desktop=1]="Desktop",e))(ur||{});function vd(){const e=Ot(n());function t(){e.value=n()}function n(){return window.innerWidth<=600?0:1}return Kr(()=>window.addEventListener("resize",t)),ao(()=>window.removeEventListener("resize",t)),e}const Lb=Zt({__name:"c-view",setup(e){const t=vd(),n=Ot(t.value==ur.Mobile);Kr(()=>{t.value==ur.Desktop&&(n.value=localStorage.isLeftSidebarCollapsed==="true")}),Dr(t,i=>{i==ur.Mobile?n.value=!0:n.value=localStorage.isLeftSidebarCollapsed==="true"});function r(){t.value==ur.Desktop&&(n.value=!n.value,localStorage.isLeftSidebarCollapsed=n.value)}return(i,o)=>{const a=St("x-load"),c=St("UIX");return qe(),ot("div",null,[oe(a),Pe("div",{id:"view",class:Ur(["wrapper",{"sidebar-is-collapsed":n.value}])},[oe(c,{uixname:"view.before"}),oe(to,{name:"sidebar",onCollapseLeftSidebar:r}),oe(to,{name:"header"}),oe(md),oe(c,{uixname:"view.after"})],2)])}}}),jb=Kt(Lb,[["__scopeId","data-v-bec0715f"]]);let Ei;const Nb={setup(){let e=[],t="";return Ei=bt("cristal"),Ei!=null&&(Ei.getAvailableConfigurations().forEach(r=>{e.push(r)}),t=Ei.getWikiConfig().name),{configList:e,cristal:Ei,currentConfig:t}}},$b={class:"grid-container"},Fb={class:"wiki-name"},Bb={key:0,class:"offline"},Ub={key:0,class:"ds-name"},Kb={class:"url"},Vb={key:0,class:"current-ds"};function qb(e,t,n,r,i,o){const a=St("x-btn");return qe(),ot("div",null,[Pe("div",$b,[(qe(!0),ot(jt,null,Sh(r.configList,c=>(qe(),ot("div",{key:c.name},[Pe("div",null,[Pe("div",Fb,[Mt(Tn(c.name)+" ",1),c.offline?(qe(),ot("span",Bb,"Offline")):hc("",!0)]),c.designSystem!=""?(qe(),ot("div",Ub,[Mt(" Design System: "),Pe("strong",null,Tn(c.designSystem),1)])):hc("",!0),Pe("div",Kb,Tn(c.baseURL),1)]),c.name==r.currentConfig?(qe(),ot("div",Vb," Currently in Use ")):(qe(),yr(a,{key:1,onClick:f=>r.cristal?.switchConfig(c.name)},{default:pn(()=>[Mt(" Open ")]),_:2},1032,["onClick"]))]))),128))])])}const Wb=Kt(Nb,[["render",qb],["__scopeId","data-v-618a42f8"]]),yd=""+new URL("xwiki-logo-color-DZ9bdNW4.svg",import.meta.url).href;/**
|
|
111
|
+
* See the LICENSE file distributed with this work for additional
|
|
112
|
+
* information regarding copyright ownership.
|
|
113
|
+
*
|
|
114
|
+
* This is free software; you can redistribute it and/or modify it
|
|
115
|
+
* under the terms of the GNU Affero General Public License as
|
|
116
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
117
|
+
* the License, or (at your option) any later version.
|
|
118
|
+
*
|
|
119
|
+
* This software is distributed in the hope that it will be useful,
|
|
120
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
121
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
122
|
+
* Lesser General Public License for more details.
|
|
123
|
+
*
|
|
124
|
+
* You should have received a copy of the GNU Affero General Public
|
|
125
|
+
* License along with this software; if not, write to the Free
|
|
126
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
127
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
128
|
+
*
|
|
129
|
+
* This file is part of the Cristal Wiki software prototype
|
|
130
|
+
* @copyright Copyright (c) 2023 XWiki SAS
|
|
131
|
+
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
132
|
+
*
|
|
133
|
+
**/var En=(e=>(e[e.Small=0]="Small",e[e.Normal=1]="Normal",e[e.Big=2]="Big",e))(En||{});const zb=Zt({__name:"c-icon",props:{name:{},size:{default:En.Normal}},setup(e){const t=e;function n(i){let o;return i===En.Big?o="big":i===En.Small&&(o="small"),o}const r=Yt(()=>{const i=["cr-icon",`bi-${t.name}`],o=n(t.size);return o&&i.push(o),i});return(i,o)=>(qe(),ot("span",{class:Ur(r.value)},null,2))}}),tn=Kt(zb,[["__scopeId","data-v-a7604678"]]),Hb=Zt({__name:"c-config-menu",setup(e){return(t,n)=>{const r=St("x-dialog");return qe(),yr(r,{width:"auto",logo:rt(yd),title:"Configuration"},{activator:pn(({props:i})=>[oe(rt(tn),qh({name:"gear"},i),null,16)]),default:pn(()=>[oe(to,{name:"config"})]),_:1},8,["logo"])}}}),Gb={};function Xb(e,t){return qe(),ot("div",null,[Eh(e.$slots,"default")])}const Yb=Kt(Gb,[["render",Xb]]),Qb={class:"c-sidebar-panel"},Zb={class:"header"},Jb={class:"title"},e_={class:"sidebar-content"},t_=Zt({__name:"c-sidebar-panel",props:{name:{}},setup(e){return(t,n)=>(qe(),ot("div",Qb,[Pe("div",Zb,[Pe("span",Jb,Tn(t.name),1),oe(rt(tn),{name:"list-nested",size:rt(En).Small},null,8,["size"])]),Pe("div",e_,[Eh(t.$slots,"default",{},void 0,!0)])]))}}),Hc=Kt(t_,[["__scopeId","data-v-e7a454d7"]]),n_={class:"help-button"},r_=Zt({__name:"c-help",setup(e){return(t,n)=>{const r=St("x-btn");return qe(),ot("div",n_,[oe(r,{pill:"",size:"small"},{default:pn(()=>[oe(rt(tn),{name:"question-circle"}),Mt(" XWiki Help ")]),_:1})])}}}),i_=Kt(r_,[["__scopeId","data-v-43ae6cec"]]),bd=""+new URL("no-one-Cv0r_Hkg.svg",import.meta.url).href;/**
|
|
134
|
+
* See the LICENSE file distributed with this work for additional
|
|
135
|
+
* information regarding copyright ownership.
|
|
136
|
+
*
|
|
137
|
+
* This is free software; you can redistribute it and/or modify it
|
|
138
|
+
* under the terms of the GNU Affero General Public License as
|
|
139
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
140
|
+
* the License, or (at your option) any later version.
|
|
141
|
+
*
|
|
142
|
+
* This software is distributed in the hope that it will be useful,
|
|
143
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
144
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
145
|
+
* Lesser General Public License for more details.
|
|
146
|
+
*
|
|
147
|
+
* You should have received a copy of the GNU Affero General Public
|
|
148
|
+
* License along with this software; if not, write to the Free
|
|
149
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
150
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
151
|
+
*
|
|
152
|
+
* This file is part of the Cristal Wiki software prototype
|
|
153
|
+
* @copyright Copyright (c) 2023 XWiki SAS
|
|
154
|
+
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
155
|
+
*
|
|
156
|
+
**/function o_(){const e=Ot(0),t=Ot(0);function n(i){e.value=i.pageX,t.value=i.pageY}function r(i){e.value=i.touches[0].clientX,t.value=i.touches[0].clientY}return Kr(()=>{window.addEventListener("mousemove",n),window.addEventListener("touchmove",r)}),ao(()=>{window.removeEventListener("mousemove",n),window.removeEventListener("touchmove",r)}),{x:e,y:t}}const s_={class:"sidebar-collapse-controls"},a_={class:"sidebar-header"},l_={class:"search"},u_={class:"panel-container"},c_=Zt({__name:"c-sidebar",emits:["collapseLeftSidebar"],setup(e){const t=yd,n=bd,r=vd(),{x:i}=o_(),o=Ot(r.value==ur.Mobile);Kr(()=>{localStorage.leftSidebarWidth&&c(localStorage.leftSidebarWidth),r.value==ur.Desktop&&(o.value=localStorage.isLeftSidebarCollapsed==="true")}),Dr(r,k=>{k==ur.Mobile&&(o.value=!0)});let a=0;function c(k){document.documentElement.style.setProperty("--cr-sizes-left-sidebar-width",`${k}px`)}function f(){a==0&&(a=setInterval(()=>{let k=i.value+8;c(k),localStorage.leftSidebarWidth=k},10)),window.addEventListener("mouseup",h),window.addEventListener("touchend",h)}function h(){clearInterval(a),a=0,window.removeEventListener("mouseup",h),window.removeEventListener("touchend",h)}function p(){o.value=!1,window.addEventListener("click",y)}function v(){o.value=!0,window.removeEventListener("click",y)}function y(){let k=parseInt(window.getComputedStyle(document.getElementById("sidebar")).width);i.value>k&&v()}return(k,D)=>{const z=St("UIX"),ae=St("x-img"),re=St("x-avatar"),Q=St("x-search");return qe(),ot(jt,null,[Pe("div",{class:"collapsed-sidebar",onClick:p},[oe(rt(tn),{name:"list",class:"open-sidebar"})]),oe(Yb,{id:"sidebar",class:Ur(["left-sidebar",{"is-visible":!o.value}])},{default:pn(()=>[oe(z,{uixname:"sidebar.before"}),Pe("div",s_,[oe(rt(tn),{name:"x-lg",class:"close-sidebar",onClick:D[0]||(D[0]=_e=>v())}),oe(rt(tn),{name:"pin",class:"pin-sidebar",onClick:D[1]||(D[1]=_e=>k.$emit("collapseLeftSidebar"))})]),Pe("div",a_,[oe(rt(tn),{name:"list",class:"hide-sidebar",onClick:D[2]||(D[2]=_e=>{k.$emit("collapseLeftSidebar"),v()})}),oe(ae,{class:"logo",src:rt(t),width:72},null,8,["src"]),oe(rt(tn),{name:"bell"}),oe(Hb),oe(re,{class:"avatar",image:rt(n),size:"2rem"},null,8,["image"])]),Pe("div",l_,[oe(Q)]),Pe("div",u_,[oe(Hc,{name:"Wiki Name"}),oe(Hc,{name:"Applications"}),oe(z,{uixname:"sidebar.after"})]),oe(i_),Pe("div",{class:"resize-handle",onMousedown:f,onTouchstart:f},null,32)]),_:1},8,["class"])],64)}}}),f_=Kt(c_,[["__scopeId","data-v-fea1cb5e"]]),h_={setup(){const e=Ot(0);return{count:e,inc:()=>{e.value++}}}},_d=e=>(mh("data-v-bd6bab2c"),e=e(),vh(),e),d_={id:"footer",class:"footer"},p_=_d(()=>Pe("p",null,"footer",-1)),g_=_d(()=>Pe("div",null,"Click the button to increase the number",-1));function m_(e,t,n,r,i,o){const a=St("UIX");return qe(),ot("footer",d_,[oe(a,{uixname:"footer.before"}),p_,g_,Pe("button",{onClick:t[0]||(t[0]=c=>r.count++)},Tn(r.count),1),oe(a,{uixname:"footer.after"})])}const v_=Kt(h_,[["render",m_],["__scopeId","data-v-bd6bab2c"]]);function Xl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Vr=Xl();function wd(e){Vr=e}const xd=/[&<>"']/,y_=new RegExp(xd.source,"g"),kd=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,b_=new RegExp(kd.source,"g"),__={"&":"&","<":"<",">":">",'"':""","'":"'"},Gc=e=>__[e];function an(e,t){if(t){if(xd.test(e))return e.replace(y_,Gc)}else if(kd.test(e))return e.replace(b_,Gc);return e}const w_=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function x_(e){return e.replace(w_,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const k_=/(^|[^\[])\^/g;function ft(e,t){let n=typeof e=="string"?e:e.source;t=t||"";const r={replace:(i,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(k_,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,t)};return r}function Xc(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const Ui={exec:()=>null};function Yc(e,t){const n=e.replace(/\|/g,(o,a,c)=>{let f=!1,h=a;for(;--h>=0&&c[h]==="\\";)f=!f;return f?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function Wo(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o===t&&!n)i++;else if(o!==t&&n)i++;else break}return e.slice(0,r-i)}function C_(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}function Qc(e,t,n,r){const i=t.href,o=t.title?an(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const c={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,c}return{type:"image",raw:n,href:i,title:o,text:an(a)}}function S_(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
|
|
157
|
+
`).map(i=>{const o=i.match(/^\s+/);if(o===null)return i;const[a]=o;return a.length>=r.length?i.slice(r.length):i}).join(`
|
|
158
|
+
`)}class bs{options;rules;lexer;constructor(t){this.options=t||Vr}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Wo(r,`
|
|
159
|
+
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=S_(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=Wo(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){let r=n[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
|
160
|
+
$1`);r=Wo(r.replace(/^ *>[ \t]?/gm,""),`
|
|
161
|
+
`);const i=this.lexer.state.top;this.lexer.state.top=!0;const o=this.lexer.blockTokens(r);return this.lexer.state.top=i,{type:"blockquote",raw:n[0],tokens:o,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const i=r.length>1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const a=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let c="",f="",h=!1;for(;t;){let p=!1;if(!(n=a.exec(t))||this.rules.block.hr.test(t))break;c=n[0],t=t.substring(c.length);let v=n[2].split(`
|
|
162
|
+
`,1)[0].replace(/^\t+/,re=>" ".repeat(3*re.length)),y=t.split(`
|
|
163
|
+
`,1)[0],k=0;this.options.pedantic?(k=2,f=v.trimStart()):(k=n[2].search(/[^ ]/),k=k>4?1:k,f=v.slice(k),k+=n[1].length);let D=!1;if(!v&&/^ *$/.test(y)&&(c+=y+`
|
|
164
|
+
`,t=t.substring(y.length+1),p=!0),!p){const re=new RegExp(`^ {0,${Math.min(3,k-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),Q=new RegExp(`^ {0,${Math.min(3,k-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),_e=new RegExp(`^ {0,${Math.min(3,k-1)}}(?:\`\`\`|~~~)`),Te=new RegExp(`^ {0,${Math.min(3,k-1)}}#`);for(;t;){const le=t.split(`
|
|
165
|
+
`,1)[0];if(y=le,this.options.pedantic&&(y=y.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),_e.test(y)||Te.test(y)||re.test(y)||Q.test(t))break;if(y.search(/[^ ]/)>=k||!y.trim())f+=`
|
|
166
|
+
`+y.slice(k);else{if(D||v.search(/[^ ]/)>=4||_e.test(v)||Te.test(v)||Q.test(v))break;f+=`
|
|
167
|
+
`+y}!D&&!y.trim()&&(D=!0),c+=le+`
|
|
168
|
+
`,t=t.substring(le.length+1),v=y.slice(k)}}o.loose||(h?o.loose=!0:/\n *\n *$/.test(c)&&(h=!0));let z=null,ae;this.options.gfm&&(z=/^\[[ xX]\] /.exec(f),z&&(ae=z[0]!=="[ ] ",f=f.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:c,task:!!z,checked:ae,loose:!1,text:f,tokens:[]}),o.raw+=c}o.items[o.items.length-1].raw=c.trimEnd(),o.items[o.items.length-1].text=f.trimEnd(),o.raw=o.raw.trimEnd();for(let p=0;p<o.items.length;p++)if(this.lexer.state.top=!1,o.items[p].tokens=this.lexer.blockTokens(o.items[p].text,[]),!o.loose){const v=o.items[p].tokens.filter(k=>k.type==="space"),y=v.length>0&&v.some(k=>/\n.*\n/.test(k.raw));o.loose=y}if(o.loose)for(let p=0;p<o.items.length;p++)o.items[p].loose=!0;return o}}html(t){const n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){const n=this.rules.block.def.exec(t);if(n){const r=n[1].toLowerCase().replace(/\s+/g," "),i=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:o}}}table(t){const n=this.rules.block.table.exec(t);if(!n||!/[:|]/.test(n[2]))return;const r=Yc(n[1]),i=n[2].replace(/^\||\| *$/g,"").split("|"),o=n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
|
|
169
|
+
`):[],a={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const c of i)/^ *-+: *$/.test(c)?a.align.push("right"):/^ *:-+: *$/.test(c)?a.align.push("center"):/^ *:-+ *$/.test(c)?a.align.push("left"):a.align.push(null);for(const c of r)a.header.push({text:c,tokens:this.lexer.inline(c)});for(const c of o)a.rows.push(Yc(c,a.header.length).map(f=>({text:f,tokens:this.lexer.inline(f)})));return a}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const r=n[1].charAt(n[1].length-1)===`
|
|
170
|
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:an(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const a=Wo(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=C_(n[2],"()");if(a>-1){const f=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,f).trim(),n[3]=""}}let i=n[2],o="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a&&(i=a[1],o=a[3])}else o=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),Qc(n,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const i=(r[2]||r[1]).replace(/\s+/g," "),o=n[i.toLowerCase()];if(!o){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return Qc(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const a=[...i[0]].length-1;let c,f,h=a,p=0;const v=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,n=n.slice(-1*t.length+a);(i=v.exec(n))!=null;){if(c=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!c)continue;if(f=[...c].length,i[3]||i[4]){h+=f;continue}else if((i[5]||i[6])&&a%3&&!((a+f)%3)){p+=f;continue}if(h-=f,h>0)continue;f=Math.min(f,f+h+p);const y=[...i[0]][0].length,k=t.slice(0,a+i.index+y+f);if(Math.min(a,f)%2){const z=k.slice(1,-1);return{type:"em",raw:k,text:z,tokens:this.lexer.inlineTokens(z)}}const D=k.slice(2,-2);return{type:"strong",raw:k,text:D,tokens:this.lexer.inlineTokens(D)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),o=/^ /.test(r)&&/ $/.test(r);return i&&o&&(r=r.substring(1,r.length-1)),r=an(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,i;return n[2]==="@"?(r=an(n[1]),i="mailto:"+r):(r=an(n[1]),i=r),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,i;if(n[2]==="@")r=an(n[0]),i="mailto:"+r;else{let o;do o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(o!==n[0]);r=an(n[0]),n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=an(n[0]),{type:"text",raw:n[0],text:r}}}}const E_=/^(?: *(?:\n|$))+/,A_=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,P_=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,co=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,T_=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Cd=/(?:[*+-]|\d{1,9}[.)])/,Sd=ft(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Cd).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Yl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,O_=/^[^\n]+/,Ql=/(?!\s*\])(?:\\.|[^\[\]\\])+/,R_=ft(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Ql).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),I_=ft(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Cd).getRegex(),Vs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Zl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,M_=ft("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Zl).replace("tag",Vs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ed=ft(Yl).replace("hr",co).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vs).getRegex(),D_=ft(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ed).getRegex(),Jl={blockquote:D_,code:A_,def:R_,fences:P_,heading:T_,hr:co,html:M_,lheading:Sd,list:I_,newline:E_,paragraph:Ed,table:Ui,text:O_},Zc=ft("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",co).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vs).getRegex(),L_={...Jl,table:Zc,paragraph:ft(Yl).replace("hr",co).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vs).getRegex()},j_={...Jl,html:ft(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Zl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ui,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ft(Yl).replace("hr",co).replace("heading",` *#{1,6} *[^
|
|
171
|
+
]`).replace("lheading",Sd).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ad=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,N_=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Pd=/^( {2,}|\\)\n(?!\s*$)/,$_=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,fo="\\p{P}\\p{S}",F_=ft(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,fo).getRegex(),B_=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,U_=ft(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,fo).getRegex(),K_=ft("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,fo).getRegex(),V_=ft("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,fo).getRegex(),q_=ft(/\\([punct])/,"gu").replace(/punct/g,fo).getRegex(),W_=ft(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),z_=ft(Zl).replace("(?:-->|$)","-->").getRegex(),H_=ft("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",z_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_s=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G_=ft(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",_s).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Td=ft(/^!?\[(label)\]\[(ref)\]/).replace("label",_s).replace("ref",Ql).getRegex(),Od=ft(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ql).getRegex(),X_=ft("reflink|nolink(?!\\()","g").replace("reflink",Td).replace("nolink",Od).getRegex(),eu={_backpedal:Ui,anyPunctuation:q_,autolink:W_,blockSkip:B_,br:Pd,code:N_,del:Ui,emStrongLDelim:U_,emStrongRDelimAst:K_,emStrongRDelimUnd:V_,escape:Ad,link:G_,nolink:Od,punctuation:F_,reflink:Td,reflinkSearch:X_,tag:H_,text:$_,url:Ui},Y_={...eu,link:ft(/^!?\[(label)\]\((.*?)\)/).replace("label",_s).getRegex(),reflink:ft(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_s).getRegex()},ll={...eu,escape:ft(Ad).replace("])","~|])").getRegex(),url:ft(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Q_={...ll,br:ft(Pd).replace("{2,}","*").getRegex(),text:ft(ll.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},zo={normal:Jl,gfm:L_,pedantic:j_},Ai={normal:eu,gfm:ll,breaks:Q_,pedantic:Y_};class An{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Vr,this.options.tokenizer=this.options.tokenizer||new bs,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:zo.normal,inline:Ai.normal};this.options.pedantic?(n.block=zo.pedantic,n.inline=Ai.pedantic):this.options.gfm&&(n.block=zo.gfm,this.options.breaks?n.inline=Ai.breaks:n.inline=Ai.gfm),this.tokenizer.rules=n}static get rules(){return{block:zo,inline:Ai}}static lex(t,n){return new An(n).lex(t)}static lexInline(t,n){return new An(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
|
172
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(c,f,h)=>f+" ".repeat(h.length));let r,i,o,a;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
|
173
|
+
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
174
|
+
`+r.raw,i.text+=`
|
|
175
|
+
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
176
|
+
`+r.raw,i.text+=`
|
|
177
|
+
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startBlock){let c=1/0;const f=t.slice(1);let h;this.options.extensions.startBlock.forEach(p=>{h=p.call({lexer:this},f),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(o=t.substring(0,c+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){i=n[n.length-1],a&&i.type==="paragraph"?(i.raw+=`
|
|
178
|
+
`+r.raw,i.text+=`
|
|
179
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),a=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
|
|
180
|
+
`+r.raw,i.text+=`
|
|
181
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,i,o,a=t,c,f,h;if(this.tokens.links){const p=Object.keys(this.tokens.links);if(p.length>0)for(;(c=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)p.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(c=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(c=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,c.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(f||(h=""),f=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(p=>(r=p.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,a,h)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startInline){let p=1/0;const v=t.slice(1);let y;this.options.extensions.startInline.forEach(k=>{y=k.call({lexer:this},v),typeof y=="number"&&y>=0&&(p=Math.min(p,y))}),p<1/0&&p>=0&&(o=t.substring(0,p+1))}if(r=this.tokenizer.inlineText(o)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(h=r.raw.slice(-1)),f=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(t){const p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return n}}class ws{options;constructor(t){this.options=t||Vr}code(t,n,r){const i=(n||"").match(/^\S*/)?.[0];return t=t.replace(/\n$/,"")+`
|
|
182
|
+
`,i?'<pre><code class="language-'+an(i)+'">'+(r?t:an(t,!0))+`</code></pre>
|
|
183
|
+
`:"<pre><code>"+(r?t:an(t,!0))+`</code></pre>
|
|
184
|
+
`}blockquote(t){return`<blockquote>
|
|
185
|
+
${t}</blockquote>
|
|
186
|
+
`}html(t,n){return t}heading(t,n,r){return`<h${n}>${t}</h${n}>
|
|
187
|
+
`}hr(){return`<hr>
|
|
188
|
+
`}list(t,n,r){const i=n?"ol":"ul",o=n&&r!==1?' start="'+r+'"':"";return"<"+i+o+`>
|
|
189
|
+
`+t+"</"+i+`>
|
|
190
|
+
`}listitem(t,n,r){return`<li>${t}</li>
|
|
191
|
+
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>
|
|
192
|
+
`}table(t,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
193
|
+
<thead>
|
|
194
|
+
`+t+`</thead>
|
|
195
|
+
`+n+`</table>
|
|
196
|
+
`}tablerow(t){return`<tr>
|
|
197
|
+
${t}</tr>
|
|
198
|
+
`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+`</${r}>
|
|
199
|
+
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,n,r){const i=Xc(t);if(i===null)return r;t=i;let o='<a href="'+t+'"';return n&&(o+=' title="'+n+'"'),o+=">"+r+"</a>",o}image(t,n,r){const i=Xc(t);if(i===null)return r;t=i;let o=`<img src="${t}" alt="${r}"`;return n&&(o+=` title="${n}"`),o+=">",o}text(t){return t}}class tu{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class Pn{options;renderer;textRenderer;constructor(t){this.options=t||Vr,this.options.renderer=this.options.renderer||new ws,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new tu}static parse(t,n){return new Pn(n).parse(t)}static parseInline(t,n){return new Pn(n).parseInline(t)}parse(t,n=!0){let r="";for(let i=0;i<t.length;i++){const o=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const a=o,c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){r+=c||"";continue}}switch(o.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{const a=o;r+=this.renderer.heading(this.parseInline(a.tokens),a.depth,x_(this.parseInline(a.tokens,this.textRenderer)));continue}case"code":{const a=o;r+=this.renderer.code(a.text,a.lang,!!a.escaped);continue}case"table":{const a=o;let c="",f="";for(let p=0;p<a.header.length;p++)f+=this.renderer.tablecell(this.parseInline(a.header[p].tokens),{header:!0,align:a.align[p]});c+=this.renderer.tablerow(f);let h="";for(let p=0;p<a.rows.length;p++){const v=a.rows[p];f="";for(let y=0;y<v.length;y++)f+=this.renderer.tablecell(this.parseInline(v[y].tokens),{header:!1,align:a.align[y]});h+=this.renderer.tablerow(f)}r+=this.renderer.table(c,h);continue}case"blockquote":{const a=o,c=this.parse(a.tokens);r+=this.renderer.blockquote(c);continue}case"list":{const a=o,c=a.ordered,f=a.start,h=a.loose;let p="";for(let v=0;v<a.items.length;v++){const y=a.items[v],k=y.checked,D=y.task;let z="";if(y.task){const ae=this.renderer.checkbox(!!k);h?y.tokens.length>0&&y.tokens[0].type==="paragraph"?(y.tokens[0].text=ae+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=ae+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:ae+" "}):z+=ae+" "}z+=this.parse(y.tokens,h),p+=this.renderer.listitem(z,D,!!k)}r+=this.renderer.list(p,c,f);continue}case"html":{const a=o;r+=this.renderer.html(a.text,a.block);continue}case"paragraph":{const a=o;r+=this.renderer.paragraph(this.parseInline(a.tokens));continue}case"text":{let a=o,c=a.tokens?this.parseInline(a.tokens):a.text;for(;i+1<t.length&&t[i+1].type==="text";)a=t[++i],c+=`
|
|
200
|
+
`+(a.tokens?this.parseInline(a.tokens):a.text);r+=n?this.renderer.paragraph(c):c;continue}default:{const a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}parseInline(t,n){n=n||this.renderer;let r="";for(let i=0;i<t.length;i++){const o=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=a||"";continue}}switch(o.type){case"escape":{const a=o;r+=n.text(a.text);break}case"html":{const a=o;r+=n.html(a.text);break}case"link":{const a=o;r+=n.link(a.href,a.title,this.parseInline(a.tokens,n));break}case"image":{const a=o;r+=n.image(a.href,a.title,a.text);break}case"strong":{const a=o;r+=n.strong(this.parseInline(a.tokens,n));break}case"em":{const a=o;r+=n.em(this.parseInline(a.tokens,n));break}case"codespan":{const a=o;r+=n.codespan(a.text);break}case"br":{r+=n.br();break}case"del":{const a=o;r+=n.del(this.parseInline(a.tokens,n));break}case"text":{const a=o;r+=n.text(a.text);break}default:{const a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}}class rs{options;constructor(t){this.options=t||Vr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}}class Z_{defaults=Xl();options=this.setOptions;parse=this.#e(An.lex,Pn.parse);parseInline=this.#e(An.lexInline,Pn.parseInline);Parser=Pn;Renderer=ws;TextRenderer=tu;Lexer=An;Tokenizer=bs;Hooks=rs;constructor(...t){this.use(...t)}walkTokens(t,n){let r=[];for(const i of t)switch(r=r.concat(n.call(this,i)),i.type){case"table":{const o=i;for(const a of o.header)r=r.concat(this.walkTokens(a.tokens,n));for(const a of o.rows)for(const c of a)r=r.concat(this.walkTokens(c.tokens,n));break}case"list":{const o=i;r=r.concat(this.walkTokens(o.items,n));break}default:{const o=i;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{const c=o[a].flat(1/0);r=r.concat(this.walkTokens(c,n))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const a=n.renderers[o.name];a?n.renderers[o.name]=function(...c){let f=o.renderer.apply(this,c);return f===!1&&(f=a.apply(this,c)),f}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=n[o.level];a?a.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),i.extensions=n),r.renderer){const o=this.defaults.renderer||new ws(this.defaults);for(const a in r.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(a==="options")continue;const c=a,f=r.renderer[c],h=o[c];o[c]=(...p)=>{let v=f.apply(o,p);return v===!1&&(v=h.apply(o,p)),v||""}}i.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new bs(this.defaults);for(const a in r.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const c=a,f=r.tokenizer[c],h=o[c];o[c]=(...p)=>{let v=f.apply(o,p);return v===!1&&(v=h.apply(o,p)),v}}i.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new rs;for(const a in r.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(a==="options")continue;const c=a,f=r.hooks[c],h=o[c];rs.passThroughHooks.has(a)?o[c]=p=>{if(this.defaults.async)return Promise.resolve(f.call(o,p)).then(y=>h.call(o,y));const v=f.call(o,p);return h.call(o,v)}:o[c]=(...p)=>{let v=f.apply(o,p);return v===!1&&(v=h.apply(o,p)),v}}i.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(c){let f=[];return f.push(a.call(this,c)),o&&(f=f.concat(o.call(this,c))),f}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return An.lex(t,n??this.defaults)}parser(t,n){return Pn.parse(t,n??this.defaults)}#e(t,n){return(r,i)=>{const o={...i},a={...this.defaults,...o};this.defaults.async===!0&&o.async===!1&&(a.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),a.async=!0);const c=this.#t(!!a.silent,!!a.async);if(typeof r>"u"||r===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(f=>t(f,a)).then(f=>a.hooks?a.hooks.processAllTokens(f):f).then(f=>a.walkTokens?Promise.all(this.walkTokens(f,a.walkTokens)).then(()=>f):f).then(f=>n(f,a)).then(f=>a.hooks?a.hooks.postprocess(f):f).catch(c);try{a.hooks&&(r=a.hooks.preprocess(r));let f=t(r,a);a.hooks&&(f=a.hooks.processAllTokens(f)),a.walkTokens&&this.walkTokens(f,a.walkTokens);let h=n(f,a);return a.hooks&&(h=a.hooks.postprocess(h)),h}catch(f){return c(f)}}}#t(t,n){return r=>{if(r.message+=`
|
|
201
|
+
Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An error occurred:</p><pre>"+an(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}}const jr=new Z_;function st(e,t){return jr.parse(e,t)}st.options=st.setOptions=function(e){return jr.setOptions(e),st.defaults=jr.defaults,wd(st.defaults),st};st.getDefaults=Xl;st.defaults=Vr;st.use=function(...e){return jr.use(...e),st.defaults=jr.defaults,wd(st.defaults),st};st.walkTokens=function(e,t){return jr.walkTokens(e,t)};st.parseInline=jr.parseInline;st.Parser=Pn;st.parser=Pn.parse;st.Renderer=ws;st.TextRenderer=tu;st.Lexer=An;st.lexer=An.lex;st.Tokenizer=bs;st.Hooks=rs;st.parse=st;st.options;st.setOptions;st.use;st.walkTokens;st.parseInline;Pn.parse;An.lex;/**
|
|
202
|
+
* See the LICENSE file distributed with this work for additional
|
|
203
|
+
* information regarding copyright ownership.
|
|
204
|
+
*
|
|
205
|
+
* This is free software; you can redistribute it and/or modify it
|
|
206
|
+
* under the terms of the GNU Affero General Public License as
|
|
207
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
208
|
+
* the License, or (at your option) any later version.
|
|
209
|
+
*
|
|
210
|
+
* This software is distributed in the hope that it will be useful,
|
|
211
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
212
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
213
|
+
* Lesser General Public License for more details.
|
|
214
|
+
*
|
|
215
|
+
* You should have received a copy of the GNU Affero General Public
|
|
216
|
+
* License along with this software; if not, write to the Free
|
|
217
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
218
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
219
|
+
*
|
|
220
|
+
* This file is part of the Cristal Wiki software prototype
|
|
221
|
+
* @copyright Copyright (c) 2023 XWiki SAS
|
|
222
|
+
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
223
|
+
*
|
|
224
|
+
**/class Ne{static init(t){this.logger=t?.getLogger("skin.vue.contenttools")}static listenToClicks(t,n){t.addEventListener("click",function(i){const o=i.target.closest("a");if(o?.href)if(Ne.logger?.debug("You clicked",o.href),Ne.logger?.debug(i.target),Ne.logger?.debug(i.target.href),Ne.logger?.debug(location),Ne.logger?.debug(location.origin),Ne.logger?.debug(location.hostname),i.preventDefault(),o.href.startsWith(location.origin)){Ne.logger?.debug("URL is relative URL");const a=o.href.replace(location.origin+location.pathname,"");if(!a.startsWith("#"))Ne.logger?.debug("New page should be",a),n?.setCurrentPage(a,"view"),n?.loadPage().then();else{Ne.logger?.debug("Leaving alone page",a),location=a;return}}else n!=null?n.loadPageFromURL(o.href).then():Ne.logger?.error("cristal object not injected properly in c-content.vue")},!0)}static loadCSS(t){t&&t.length>0&&(Ne.logger?.debug("Current CSS is ",t.length),t.forEach(n=>{const r=Ne.urlToLoad(n);if(r!=null){const i=document.createElement("link");i.href=r,i.type="text/css",i.rel="stylesheet",Ne.logger?.debug("Ready to load css ",i),document.head.appendChild(i)}else Ne.logger?.debug("CSS already loaded: ",n)}))}static loadJS(t){if(t&&t.length>0){Ne.logger?.debug("Loading JS code for content"),t.forEach(n=>{Ne.logger?.debug("JS Link: ",n);const r=Ne.urlToLoad(n);if(r!=null){const i=document.createElement("script");i.src=r,i.async=!1,Ne.logger?.debug("Ready to load js ",i),document.head.appendChild(i)}else Ne.logger?.debug("JS already loaded: ",n)}),Ne.logger?.debug("ready to fire event for main content");try{Ne.logger?.debug("prototype doc is",document)}catch(n){Ne.logger?.debug("exception firing event",n)}}}static urlToLoad(t){let n=null;const r=document.createRange();return r.setStart(document.head,0),r.createContextualFragment(t).querySelectorAll("link[href], script[src]").forEach(function(o){n=o.src||o.href,document.querySelectorAll("link[href], script[src]").forEach(function(a){const c=a.src||a.href;if(n&&n==c)return null})}),n}static transformImages(t,n){const r=document.getElementById(n);if(r){const i=function(o){const a=o.attributes.getNamedItem("src");if(a&&(Ne.logger?.debug("Found image with url ",a.value),a.value.indexOf("http")!=0)){const c=t?.getWikiConfig().storage.getImageURL(t.getCurrentPage(),a.value);c&&(o.src=c,Ne.logger?.debug("Transforming image to url ",o.src))}};new MutationObserver(function(o){Ne.logger?.debug("Called in mutation records"),o[0].addedNodes.item;for(const{addedNodes:c}of o)c.forEach(f=>{f.nodeType==1&&(f.querySelectorAll("img").forEach(p=>{i(p)}),f.tagName==="IMG"&&i(f))})}).observe(r,{childList:!0,subtree:!0})}}static transformScripts(){const t=function(n){const r=n.attributes.getNamedItem("src");r&&(Ne.logger?.debug("Content Found script with url ",r.value),r.value.indexOf("/")==0?(Ne.logger?.debug("Content Ready to transform script url",r.value),n.src="https://wiki30.demo.xwiki.com"+r.value,Ne.logger?.debug("Content Transforming script to url ",n.src)):Ne.logger?.debug("Content Do not transform script url",r.value))};new MutationObserver(function(n){Ne.logger?.debug("Called in mutation records"),n[0].addedNodes.item;for(const{addedNodes:i}of n)i.forEach(o=>{o.nodeType==1&&(o.querySelectorAll("script").forEach(c=>{Ne.logger?.debug("Transforming script url "+c),t(c)}),o.tagName==="SCRIPT"&&(Ne.logger?.debug("Transforming script url "+o.src),t(o)))})}).observe(document.head,{childList:!0,subtree:!0})}static mount(t,n,r,i,o){let a=i,c=oe(t,n,r);return o&&o._context&&(c.appContext=o._context),a?Ra(c,a):typeof document<"u"&&Ra(c,a=document.createElement("div")),()=>{a&&Ra(null,a),a=null,c=null}}static transformMacros(t,n){const r=t.getElementsByTagName("pre");for(let i=0;i<r.length;i++){const o=r[i];if(o.className=="wikimodel-macro"){const a=o.getAttribute("macroname");if(a!=null&&a!=""){Ne.logger?.debug("Found macro",a);try{const c=n?.getContainer().getNamed("MacroProvider",a),f=c?.getVueComponent();if(f&&n?.getApp()){o.id="wikimodel-macro-"+a+"-1";const h=c.parseParameters(o);this.mount(f,{macroData:h},null,o,n.getApp())}}catch(c){Ne.logger?.debug("Could not find macro implementation for",a,c)}}}}}}const qr=e=>(mh("data-v-285e8175"),e=e(),vh(),e),J_={key:0,class:"content-loading"},ew=qr(()=>Pe("span",{class:"load-spinner"},null,-1)),tw=qr(()=>Pe("h3",null,"Loading",-1)),nw=[ew,tw],rw={key:1,class:"content-error"},iw={key:2,id:"content",ref:"root",class:"content"},ow={class:"inner-content"},sw={class:"content-header"},aw={class:"content-scroll"},lw={class:"doc-header"},uw={class:"center-content"},cw={class:"document-title"},fw={class:"doc-info-header"},hw=qr(()=>Pe("span",{class:"doc-info-user-info"}," User Name edited on 12/12/2024 at 12:00 ",-1)),dw={class:"doc-info-actions"},pw={class:"info-action like"},gw=qr(()=>Pe("span",{class:"counter"},"99",-1)),mw={class:"info-action comments"},vw=qr(()=>Pe("span",{class:"counter"},"99",-1)),yw={class:"info-action attachments"},bw=qr(()=>Pe("span",{class:"counter"},"99",-1)),_w={class:"doc-page-actions"},ww={class:"whole-content"},xw={class:"center-content"},kw=["innerHTML"],Cw={key:1,class:"unknown-page"},Sw={class:"doc-info-footer"},Ew=qr(()=>Pe("span",{class:"doc-info-user-info"},"User name created...",-1)),Aw=Zt({__name:"c-content",setup(e){const t=kb(),n=bd,r=Ot(!1),i=Ot(void 0),o=Ot(void 0),a=Yt(()=>t.params.page||p.getCurrentPage()||"Main.WebHome"),c=Ot(void 0),f=Yt(()=>{if(o.value){const y=o.value;if(y.html&&y.html.trim()!=="")return y.html;if(y.source){console.log("marked",st,y.source);const k=st.parse(y.source);return console.log("parse",k),k}else return""}else return}),h=Yt(()=>o.value?.document?.get("headline")||o.value?.name),p=bt("cristal");async function v(y){r.value=!0;try{p.setContentRef(o),o.value=await p.getPage(y||a.value)}catch(k){console.error(k),i.value=k}finally{r.value=!1}}return Dr(()=>t.params.page,v,{immediate:!0}),Bl(()=>{Ne.transformImages(p,"xwikicontent"),p&&c.value&&(Ne.listenToClicks(c.value,p),Ne.transformMacros(c.value,p))}),(y,k)=>{const D=St("UIX"),z=St("XBreadcrumb"),ae=St("x-btn"),re=St("x-avatar"),Q=St("router-link");return r.value?(qe(),ot("div",J_,nw)):i.value?(qe(),ot("div",rw,Tn(i.value),1)):(qe(),ot("article",iw,[oe(D,{uixname:"content.before"}),Pe("div",ow,[Pe("div",sw,[oe(z,{class:"breadcrumb",items:["Home","First","Second","Third"]}),oe(ae,{circle:"",size:"small",variant:"primary",color:"primary"},{default:pn(()=>[oe(rt(tn),{class:"new-page",name:"plus",label:"Create a new document"})]),_:1})]),Pe("div",aw,[Pe("div",lw,[Pe("div",uw,[Pe("h1",cw,Tn(h.value),1),Pe("div",fw,[oe(re,{class:"avatar",image:rt(n),size:"2rem"},null,8,["image"]),hw,Pe("div",dw,[Pe("div",pw,[oe(rt(tn),{name:"heart",size:rt(En).Small},null,8,["size"]),gw]),Pe("div",mw,[oe(rt(tn),{name:"chat",size:rt(En).Small},null,8,["size"]),vw]),Pe("div",yw,[oe(rt(tn),{name:"paperclip",size:rt(En).Small},null,8,["size"]),bw])]),Pe("div",_w,[oe(Q,{to:{name:"edit",params:{page:a.value}}},{default:pn(()=>[oe(ae,{size:"small"},{default:pn(()=>[oe(rt(tn),{name:"pencil",size:rt(En).Small},null,8,["size"]),Mt(" Edit ")]),_:1})]),_:1},8,["to"]),oe(ae,{size:"small"},{default:pn(()=>[oe(rt(tn),{name:"three-dots-vertical",size:rt(En).Small},null,8,["size"])]),_:1})])])])]),Pe("div",ww,[Pe("div",xw,[f.value?(qe(),ot("div",{key:0,id:"xwikicontent",ref_key:"contentRoot",ref:c,class:"document-content",innerHTML:f.value},null,8,kw)):(qe(),ot("div",Cw," The requested page could not be found. You can edit the page to create it. ")),Pe("div",Sw,[oe(re,{class:"avatar"}),Ew])])])])]),oe(D,{uixname:"content.after"})],512))}}}),Pw=Kt(Aw,[["__scopeId","data-v-285e8175"]]);let Tw="Panel content",La=new Map,Yr;const Ow={props:{panelName:{type:String,required:!0}},setup(e){La.set(e.panelName,Ot({currentContent:Tw}));const t=bt("cristal");if(t!=null){Ne.init(t),Yr=t.getLogger("skin.vue.panel");let n=e.panelName;Yr?.debug("Ready to load panel ",n),t.getWikiConfig().storage.getPanelContent(n,"","html").then(async r=>{r.html==""&&(r.html=await t.renderContent(r.source,r.syntax,"html",t.getWikiConfig())),Yr?.debug("Panel content is ",r.html),La.get(e.panelName).value.currentContent=r.html,Yr?.debug("Panel css is ",r.css),Ne.loadCSS(r.css)})}return{content:La.get(e.panelName),panelidname:"panelcontent"+e.panelName}},mounted(){const e=bt("cristal");Yr?.debug("in mounted"),Ne.transformImages(e,"panelcontent")},updated(){const e=bt("cristal");Yr?.debug("in updated"),Ne.listenToClicks(this.$el,e)}},Rw=["id","innerHTML"];function Iw(e,t,n,r,i,o){return qe(),ot("div",{id:r.panelidname,innerHTML:r.content.currentContent},null,8,Rw)}const Mw=Kt(Ow,[["render",Iw]]);let tr,Ho;const Dw={setup(){let e=bt("cristal");e&&(tr=e.getUIXTemplates("editor"),Ho=e.getLogger("skin.vue.editor"))},data(){if(Ho?.debug("Editor UIX components are ",tr),!tr||tr.length==0)return{};{let e=null;if(Ho?.debug("Using first editor UIX component ",tr),tr!=null){for(const t of tr)if(t.editorname==="editortiptap"){e=t;break}}return e==null&&(e=tr[0]),Ho?.debug("Final component ",e),{component:oh(e)}}}},Lw={id:"edit",ref:"root"};function jw(e,t,n,r,i,o){const a=St("UIX");return qe(),ot("article",Lw,[oe(a,{uixname:"edit.before"}),(qe(),yr(jl(e.component))),oe(a,{uixname:"edit.after"})],512)}const Nw=Kt(Dw,[["render",jw]]);let nr=null,$w=new Map,ja=[];const Fw=Zt({props:{name:{type:String,required:!0},document:{type:Object,required:!0},mode:{type:String,required:!0},type:{type:String,required:!1,default:()=>{}}},setup(e){const t=bt("cristal");t!=null&&nr==null?(nr=t.getLogger("skin.vue.field"),nr?.debug("In field template")):console.log("Cannot initialize logger in skin.vue.field");const n=e.document,r=n?n.get(e.name):"";let i="",o=Ot("");if($w.set(e.name,o),e.mode=="edit"){let a=t?.getWikiConfig().storage;nr?.debug("Ready to get edit field",e.name),o.value="",a?.getEditField(n,e.name).then(function(c){o.value=c})}else e.type=="html"&&(ja.push("field-"+e.name),e.name=="html"?i=r:i="");return{value:r,html:i,editField:o}},mounted(){nr?.debug("In field mounted");const e=bt("cristal");ja.forEach(t=>{nr?.debug("Transform image",t),Ne.transformImages(e,t)})},updated(){nr?.debug("In field updated");const e=bt("cristal");ja.forEach(t=>{nr?.debug("Transform image",t),Ne.transformImages(e,t)})}}),Bw=["id","innerHTML"],Uw=["innerHTML"];function Kw(e,t,n,r,i,o){return e.type=="html"?(qe(),ot("div",{key:0,id:"field-"+e.name,class:"renderedContent",innerHTML:e.html},null,8,Bw)):(qe(),ot(jt,{key:1},[e.mode=="edit"?(qe(),ot("span",{key:0,innerHTML:e.editField},null,8,Uw)):(qe(),ot(jt,{key:1},[Mt(Tn(e.value),1)],64))],64))}const Zr=Kt(Fw,[["render",Kw]]),Vw=Zt({__name:"c-blog",props:{document:{},mode:{}},setup(e){const t=e;let n;const r=bt("cristal");r!=null&&(n=r.getLogger("skin.vue.blog"),n?.debug("wiki30 content ref set"));const i=Ot(t.document),o=Ot(t.mode);return(a,c)=>{const f=St("x-divider");return qe(),ot("div",null,[Pe("h1",null,[oe(Zr,{document:i.value,name:"headline",mode:o.value},null,8,["document","mode"])]),oe(Zr,{document:i.value,name:"html",mode:o.value,type:"html"},null,8,["document","mode"]),oe(f),Mt(" Genre: "),oe(Zr,{document:i.value,name:"genre",mode:o.value},null,8,["document","mode"]),Mt(" Created by "),oe(Zr,{document:i.value,name:"creator",mode:o.value},null,8,["document","mode"]),Mt(" on "),oe(Zr,{document:i.value,name:"dateCreated",mode:o.value},null,8,["document","mode"])])}}});let Jc;const qw={components:{Field:Zr},props:{document:{type:Object,required:!0},mode:{type:String,required:!0}},setup(){const e=bt("cristal");return e!=null&&(Jc=e.getLogger("skin.vue.movie"),Jc?.debug("cristal object content ref set")),{link:"/"+e?.getCurrentPage()+"/edit"}}},Ww=Pe("li",null,"Placeholder",-1);function zw(e,t,n,r,i,o){const a=St("Field");return qe(),ot("div",null,[Pe("h1",null,[oe(a,{document:n.document,name:"headline",mode:n.mode},null,8,["document","mode"])]),Pe("ul",null,[Pe("li",null,[Mt(" Storyline: "),oe(a,{document:n.document,name:"text",mode:n.mode,type:"html"},null,8,["document","mode"])]),Pe("li",null,[Mt(" Poster: "),oe(a,{document:n.document,name:"thumbnail",mode:n.mode,type:"html"},null,8,["document","mode"])]),Pe("li",null,[Mt("Genre: "),oe(a,{document:n.document,name:"genre",mode:n.mode},null,8,["document","mode"])]),Ww,Pe("li",null,[Mt(" Director: "),oe(a,{document:n.document,name:"director",mode:n.mode},null,8,["document","mode"])]),Pe("li",null,[Mt("Seen: "),oe(a,{document:n.document,name:"seen",mode:n.mode},null,8,["document","mode"])]),Pe("li",null,[Mt(" Runtime: "),oe(a,{document:n.document,name:"runtime",mode:n.mode},null,8,["document","mode"])]),Pe("li",null,[Mt(" Publish date: "),oe(a,{document:n.document,name:"datePublished",mode:n.mode},null,8,["document","mode"])]),Pe("li",null,[Mt(" Wyisywyg: "),oe(a,{document:n.document,name:"wysiwyg",mode:n.mode,type:"html"},null,8,["document","mode"])])])])}const Hw=Kt(qw,[["render",zw]]);var Gw=Object.defineProperty,Xw=Object.getOwnPropertyDescriptor,Yw=(e,t,n,r)=>{for(var i=r>1?void 0:r?Xw(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&Gw(t,n,i),i};let Vn=class{constructor(){this.designSystem="",this.templates=new Map,this.templates.set("view",jb),this.templates.set("config",Wb),this.templates.set("sidebar",f_),this.templates.set("content",Pw),this.templates.set("footer",v_),this.templates.set("panel",Mw),this.templates.set("main",md),this.templates.set("edit",Nw),this.templates.set("blog",Vw),this.templates.set("movie",Hw)}setDesignSystem(e){this.designSystem=e}getDesignSystem(){return this.designSystem}getTemplate(e){return this.getDefaultTemplate(e)}getDefaultTemplate(e){try{return this.templates.get(e)}catch(t){return console.error("Error loading default template ",e,t),null}}loadDesignSystem(e,t){let n=null;try{n=t.getNamed("DesignSystemLoader",this.designSystem)}catch{console.error("Exception while loading design system ",this.designSystem),Vn.DEFAULT_DESIGN_SYSTEM!=""&&(n=t.getNamed("DesignSystemLoader",Vn.DEFAULT_DESIGN_SYSTEM))}n?n.loadDesignSystem(e):console.error("Cannot initialize design system")}};Vn.DEFAULT_DESIGN_SYSTEM="";Vn.cname="cristal.skin.manager";Vn.hint="default";Vn.priority=1e3;Vn.singleton=!0;Vn=Yw([kt()],Vn);const Qw=Zt({__name:"c-uix",props:{uixname:{}},setup(e){let t=[],n;const r=e,i=bt("cristal");i&&(t=i.getUIXTemplates(r.uixname),n=i.getLogger("skin.vue.template"));const o=ah(t);return n?.debug("Extension Point name",r.uixname),(a,c)=>(qe(!0),ot(jt,null,Sh(o.value,f=>(qe(),yr(jl(f)))),256))}});var Zw=Object.defineProperty,Jw=Object.getOwnPropertyDescriptor,e0=(e,t,n,r)=>{for(var i=r>1?void 0:r?Jw(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&Zw(t,n,i),i};let Nr=class extends gr{constructor(){super()}getVueComponent(){return Qw}getVueName(){return"UIX"}isGlobal(){return!0}bindToContainer(e){e.bind("VueTemplateProvider").to(Nr)}};Nr.cname="cristal.vuejs.component";Nr.hint="uix";Nr.priority=1e3;Nr.singleton=!0;Nr=e0([kt()],Nr);const ef="Jean-Pierre Dupont",t0=Ot(10),n0={setup(){let e="",t=ef.split(/[\s-]/);return t.length>0&&(e+=t[0][0].toUpperCase(),t.length>1&&(e+=t[1][0].toUpperCase()),t.length>2&&(e+=t[2][0].toUpperCase())),{initials:e,displayname:ef,progressValue:0}},onMounted(){const e=setTimeout(()=>t0.value=66,500);return()=>clearTimeout(e)}},r0={id:"userprofile-avatar"},i0={class:"flex gap-5"};function o0(e,t,n,r,i,o){const a=St("x-avatar");return qe(),ot("div",r0,[Pe("div",i0,[oe(a,{color:"white"},{default:pn(()=>[Mt(Tn(r.initials),1)]),_:1}),oe(a,{image:"https://images.unsplash.com/photo-1511485977113-f34c92461ad9?ixlib=rb-1.2.1&w=128&h=128&dpr=2&q=80",alt:r.displayname},{default:pn(()=>[Mt(Tn(r.initials),1)]),_:1},8,["alt"])])])}const s0=Kt(n0,[["render",o0]]);var a0=Object.defineProperty,l0=Object.getOwnPropertyDescriptor,u0=(e,t,n,r)=>{for(var i=r>1?void 0:r?l0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&a0(t,n,i),i};let $r=class extends Kn{constructor(){super(...arguments),this.registered=!1}getVueComponent(){return s0}getVueName(){return"Login"}isGlobal(){return!1}};$r.cname="cristal.vuejs.component";$r.hint="";$r.priority=1e3;$r.singleton=!0;$r.extensionPoint="header.nav.right";$r=u0([kt()],$r);const tf="Jean-Pierre Dupont",c0=Ot(10),f0={setup(){let e="",t=tf.split(/[\s-]/);return t.length>0&&(e+=t[0][0].toUpperCase(),t.length>1&&(e+=t[1][0].toUpperCase()),t.length>2&&(e+=t[2][0].toUpperCase())),{initials:e,displayname:tf,progressValue:0}},onMounted(){const e=setTimeout(()=>c0.value=66,500);return()=>clearTimeout(e)}},h0={id:"search"};function d0(e,t,n,r,i,o){const a=St("x-text-field");return qe(),ot("div",h0,[oe(a,{label:"Search","prepend-inner-icon":"mdi:mdi-magnify",variant:"solo"})])}const p0=Kt(f0,[["render",d0]]);var g0=Object.defineProperty,m0=Object.getOwnPropertyDescriptor,v0=(e,t,n,r)=>{for(var i=r>1?void 0:r?m0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&g0(t,n,i),i};let Fr=class extends Kn{constructor(){super(...arguments),this.registered=!1}getVueComponent(){return p0}getVueName(){return"Search"}isGlobal(){return!1}};Fr.cname="cristal.vuejs.component";Fr.hint="";Fr.priority=1e3;Fr.singleton=!0;Fr.extensionPoint="header.nav.center";Fr=v0([kt()],Fr);const y0=Zt({components:{CTemplate:to},setup(){}});function b0(e,t,n,r,i,o){const a=St("CTemplate");return qe(),yr(a,{name:"view"})}const _0=Kt(y0,[["render",b0]]);var w0=Object.defineProperty,x0=Object.getOwnPropertyDescriptor,k0=(e,t,n,r)=>{for(var i=r>1?void 0:r?x0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&w0(t,n,i),i},Pi=(e,t)=>(n,r)=>t(n,r,e);let ul=class{constructor(e,t,n,r,i){this.availableConfigurations=new Map,this.extensionManager=e,this.skinManager=t,this.vueTemplateProviders=n,this.page=new pr,this.mode="view",this.browserApi=i,this.logger=r,this.logger.setModule("app.components.DefaultWikiApp"),this.logger?.debug("Skin manager: ",t),this.logger?.debug("Vue template providers: ",n)}setContainer(e){this.container=e}getContainer(){return this.container}getCurrentPage(){return this.page.name||this.wikiConfig.defaultPageName()}setCurrentPage(e,t="view"){this.router.push({name:t,params:{page:e}})}handlePopState(e){if(this.logger?.debug("In handlePopState ",e),e.state&&e.state.page){const t=e.state.page;t&&(this.page.name=t,this.page.source="",this.page.html="",this.loadPage())}else{this.logger?.debug("Could not find state or state in page",e);const t=this.getPageFromHash(location.hash);t!=null&&(this.page.name=t,this.page.source="",this.page.html="",this.loadPage())}}setWikiConfig(e){this.wikiConfig=e}getWikiConfig(){return this.wikiConfig}getSkinManager(){return this.skinManager}switchConfig(e){this.logger.debug("Switching config to",e);const t=this.availableConfigurations.get(e);t&&(this.setWikiConfig(t),t.designSystem!=""&&this.skinManager.setDesignSystem(t.designSystem),this.browserApi.switchLocation(t))}setAvailableConfigurations(e){console.log(e),e.forEach((t,n)=>{const r=t?.configType;if(t){const i=this.container.getNamed("WikiConfig",r);i.setConfigFromObject(t),this.availableConfigurations.set(n,i)}})}getAvailableConfigurations(){return this.availableConfigurations}getLogger(e){let t=this.container.get("Logger");return t||(t=new ui),t.setModule(e),t}getLoggerConfig(){return this.container.get("LoggerConfig")}async renderContent(e,t,n,r){if(e==null)return"";this.logger.debug("Loading rendering module");try{return this.container.get("Renderer").convert(e,t,n,r)}catch{return this.logger.error("Could not find a rendering module"),e}}async preloadConverters(){this.logger.debug("Loading rendering module");try{await this.container.get("Renderer").preloadConverters()}catch{this.logger.error("Could not find a rendering module")}}async loadPage(e){try{if(this.logger?.debug("Loading page",this.page.name),this.getWikiConfig().isSupported("jsonld")){const t=await this.getWikiConfig().storage.getPageContent(this.page.name,"jsonld",e?.requeue);if(!t){this.logger.error("Could not find page data",this.page.name,"with syntax","jsonld");return}this.page.document=t.document,this.page.source=t.document.get("text"),t.html==""?(this.page.html=await this.renderContent(this.page.source,t.syntax,"html",this.getWikiConfig()),this.page.document.set("html",this.page.html)):this.page.html=t.html,this.currentContentRef!=null?(this.currentContentRef.value=this.page,this.logger?.debug("Page content ",this.page.source),this.logger?.debug("Page loaded ",this.page.name)):console.error("Could not set content on vue page view component")}else{const t=await this.getWikiConfig().storage.getPageContent(this.page.name,"html");if(!t){this.logger.error("Could not find page data",this.page.name,"with syntax","html");return}this.page.source=t.source,this.page.html=t.html,t.html==""?(this.page.html=await this.renderContent(this.page.source,t.syntax,"html",this.getWikiConfig()),this.page.document.set("html",this.page.html)):this.page.html=t.html,this.currentContentRef!=null?(this.currentContentRef.value=this.page,this.logger?.debug("Page content ",this.page.html),this.logger?.debug("Page loaded ",this.page.name)):console.error("Could not set content on vue page view component")}}catch(t){console.error("Failed to load page ",this.page.name,t)}}async loadPageFromURL(e){this.logger?.debug("Trying to load",e);const t=this.getWikiConfig().storage.getPageFromViewURL(e);t!=null?(this.logger?.debug("The link is evaluated as being page ",t),this.setCurrentPage(t)):(this.logger?.debug("The link is evaluated as an external link"),window.open(e,"_blank"))}getCurrentContent(){return this.page.html}getCurrentSource(){return this.page.source}getCurrentSyntax(){return this.page.document.getSource().encodingFormat}setContentRef(e){this.currentContentRef=e,this.logger?.debug("Received ref from VUE ",e)}getCurrentWiki(){return this.getWikiConfig().name}getApp(){return this.app}getRouter(){return this.router}getPageFromHash(e){let t=null;const n=e.indexOf("/"),r=e.indexOf("/",n+1);return n>0&&(r==-1?t=e.substring(n+1):t=e.substring(n+1,r)),this.logger?.debug("Page from hash is : ",t),t}getPageFromRouter(){let e=this.getPageFromHash(location.hash);return e==null&&(e=this.wikiConfig.homePage),this.logger?.debug("Page is:",e),e}async run(){this.logger?.debug("Before vue");const e=this.getPageFromRouter();this.logger?.debug("Initial page is ",e),this.page=new pr("_jsonld",e,"initial content");const t=[{path:"/",component:this.skinManager.getTemplate("content")},{path:"/:page/view",name:"view",component:this.skinManager.getTemplate("content")},{path:"/:page/edit",component:this.skinManager.getTemplate("edit"),name:"edit"},{path:"/xwiki/search",component:this.skinManager.getTemplate("search")},{path:"/:page/",component:this.skinManager.getTemplate("content")}];this.router=wb({history:Yy(),routes:t}),this.app=ay(_0).use(this.router),this.app.provide("count",0),this.app.provide("skinManager",this.skinManager),this.app.provide("cristal",this),this.skinManager.loadDesignSystem(this.app,this.container);const n=this.container.getAll("VueTemplateProvider");for(const i in n){const o=n[i];if(this.logger?.debug("Found vue component ",o.getVueName(),o),o.isGlobal()){this.logger?.debug("Vue component is ",o.getVueComponent());const a=o.getVueComponent();this.app.component(o.getVueName(),a)}this.logger?.debug("Ready to register components of ",o.getVueName()),o.registerComponents(this.app)}const r=this.container.getAll("UIXTemplateProvider");for(const i in r){const o=r[i];this.logger?.debug("Found vue component ",o.getVueName(),o),this.logger?.debug("Ready to register components of ",o.getVueName()),o.registerComponents(this.app)}this.app.mount("#app"),window.addEventListener("popstate",this.handlePopState.bind(this)),this.logger?.debug("After vue"),this.logger?.debug("Replacing state in history "+this.getCurrentPage()),history.replaceState({page:this.getCurrentPage()},"","/"+this.wikiConfig.name+"/#/"+this.getCurrentPage()+"/view"),await this.preloadConverters(),this.loadPage()}getMenuEntries(){const e=new Array;try{const t=this.container.getAll("MenuEntry");this.logger?.debug("All menu entries",t);for(const n in t)e.push(t[n].getMenuEntry())}catch(t){this.logger?.debug("No menu entry could be loaded ",t)}return e}getUIXTemplates(e){const t=new Array;try{this.logger?.debug("Searching for UIX with extension Point",e);const n=this.getContainer().getAllNamed("UIXTemplateProvider",e);this.logger?.debug("All uix components for extension point ",e,n);for(const r in n)t.push(n[r].getVueComponent())}catch(n){n.message.indexOf("no matching bindings")==0&&this.logger?.debug("No uix entry found",n)}return t}async getPage(e){const t=this.getWikiConfig().isSupported("jsonld"),n=t?"jsonld":"html",r=await this.getWikiConfig().storage.getPageContent(e,n);if(t&&r){const i=r.document;r.html=i.get("html"),r.source=i.get("text"),r.syntax=i.get("encodingFormat")}return r}};ul=k0([kt(),Pi(0,wt("ExtensionManager")),Pi(1,wt("SkinManager")),Pi(2,Rg("VueTemplateProvider")),Pi(3,wt("Logger")),Pi(4,wt("BrowserApi"))],ul);const C0="modulepreload",S0=function(e,t){return new URL(e,t).href},nf={},E0=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),c=a?.nonce||a?.getAttribute("nonce");i=Promise.all(n.map(f=>{if(f=S0(f,r),f in nf)return;nf[f]=!0;const h=f.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(!!r)for(let k=o.length-1;k>=0;k--){const D=o[k];if(D.href===f&&(!h||D.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${p}`))return;const y=document.createElement("link");if(y.rel=h?"stylesheet":C0,h||(y.as="script",y.crossOrigin=""),y.href=f,c&&y.setAttribute("nonce",c),document.head.appendChild(y),h)return new Promise((k,D)=>{y.addEventListener("load",k),y.addEventListener("error",()=>D(new Error(`Unable to preload CSS for ${f}`)))})}))}return i.then(()=>t()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})};var A0=Object.defineProperty,P0=Object.getOwnPropertyDescriptor,T0=(e,t,n,r)=>{for(var i=r>1?void 0:r?P0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&A0(t,n,i),i};let cl=class{constructor(){this.name="component.name",this.hint="default",this.priority=1e3,this.singleton=!1}getName(){return this.name}getHint(){return this.hint}getPriority(){return this.priority}isSingleton(){return this.singleton}};cl=T0([kt()],cl);/**
|
|
225
|
+
* See the LICENSE file distributed with this work for additional
|
|
226
|
+
* information regarding copyright ownership.
|
|
227
|
+
*
|
|
228
|
+
* This is free software; you can redistribute it and/or modify it
|
|
229
|
+
* under the terms of the GNU Affero General Public License as
|
|
230
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
231
|
+
* the License, or (at your option) any later version.
|
|
232
|
+
*
|
|
233
|
+
* This software is distributed in the hope that it will be useful,
|
|
234
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
235
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
236
|
+
* Lesser General Public License for more details.
|
|
237
|
+
*
|
|
238
|
+
* You should have received a copy of the GNU Affero General Public
|
|
239
|
+
* License along with this software; if not, write to the Free
|
|
240
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
241
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
242
|
+
*
|
|
243
|
+
* This file is part of the Cristal Wiki software prototype
|
|
244
|
+
* @copyright Copyright (c) 2023 XWiki SAS
|
|
245
|
+
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
246
|
+
*
|
|
247
|
+
**/class O0{constructor(t,n,r){this.name=t,this.entryFile=n,this.staticModule=r}}var R0=Object.defineProperty,I0=Object.getOwnPropertyDescriptor,M0=(e,t,n,r)=>{for(var i=r>1?void 0:r?I0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&R0(t,n,i),i},D0=(e,t)=>(n,r)=>t(n,r,e);let fl=class extends cl{constructor(e){super(),this.remoteExtensions=new Map,this.remoteExtensionDefaultURL="/apps/",this.remoteExtensionDefaultEntryFile="main.bundle.js",this.logger=e,this.logger.setModule("extensionmanager.components.defaultExtensionManager")}addRemoteExtension(e,t,n){this.remoteExtensions.set(e,new O0(e,t,n))}setRemoteExtensionsConfig(e,t){this.remoteExtensionDefaultURL=e,this.remoteExtensionDefaultEntryFile=t}async loadExtension(e,t){try{const n=this.remoteExtensions.get(e),r=n&&n.entryFile?n.entryFile:this.remoteExtensionDefaultEntryFile,i=this.remoteExtensionDefaultURL+e+"/"+r,o=this.remoteExtensionDefaultURL+e+"/style.css";this.logger?.debug("Ready to import ",i);try{const c=await import(o,{assert:{type:"text/css"}});document.adoptedStyleSheets=[c.default]}catch{}const a=await import(i);if(a!=null){this.logger?.debug("Found components Init for ",e,a);const c=a.ComponentInit;new c(t),this.logger?.debug("Succesfull components Init for ",e)}else this.logger?.debug("No components to load for ",e);return}catch(n){this.logger?.error("Exception while loading components from ",e,n)}}async loadExtensions(e){for(const t of this.remoteExtensions.keys())await this.loadExtension(t,e)}};fl=M0([kt(),D0(0,wt("Logger"))],fl);/**
|
|
248
|
+
* See the LICENSE file distributed with this work for additional
|
|
249
|
+
* information regarding copyright ownership.
|
|
250
|
+
*
|
|
251
|
+
* This is free software; you can redistribute it and/or modify it
|
|
252
|
+
* under the terms of the GNU Affero General Public License as
|
|
253
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
254
|
+
* the License, or (at your option) any later version.
|
|
255
|
+
*
|
|
256
|
+
* This software is distributed in the hope that it will be useful,
|
|
257
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
258
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
259
|
+
* Lesser General Public License for more details.
|
|
260
|
+
*
|
|
261
|
+
* You should have received a copy of the GNU Affero General Public
|
|
262
|
+
* License along with this software; if not, write to the Free
|
|
263
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
264
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
265
|
+
*
|
|
266
|
+
* This file is part of the Cristal Wiki software prototype
|
|
267
|
+
* @copyright Copyright (c) 2023 XWiki SAS
|
|
268
|
+
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
269
|
+
*
|
|
270
|
+
**/let L0=class{constructor(t){this.logger=t.get("Logger"),this.logger.setModule("extensionmanager.components.componentsInit"),this.logger?.debug("Init Extension Manager components begin"),t.bind("ExtensionManager").to(fl),this.logger?.debug("Init Extension Manager components end")}};/**
|
|
271
|
+
* See the LICENSE file distributed with this work for additional
|
|
272
|
+
* information regarding copyright ownership.
|
|
273
|
+
*
|
|
274
|
+
* This is free software; you can redistribute it and/or modify it
|
|
275
|
+
* under the terms of the GNU Affero General Public License as
|
|
276
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
277
|
+
* the License, or (at your option) any later version.
|
|
278
|
+
*
|
|
279
|
+
* This software is distributed in the hope that it will be useful,
|
|
280
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
281
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
282
|
+
* Lesser General Public License for more details.
|
|
283
|
+
*
|
|
284
|
+
* You should have received a copy of the GNU Affero General Public
|
|
285
|
+
* License along with this software; if not, write to the Free
|
|
286
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
287
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
288
|
+
*
|
|
289
|
+
* This file is part of the Cristal Wiki software prototype
|
|
290
|
+
* @copyright Copyright (c) 2023 XWiki SAS
|
|
291
|
+
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
292
|
+
*
|
|
293
|
+
**/class j0{constructor(t){this.extensionList=t}getLogger(t){let n=this.container.get("Logger");return n||(n=new ui),n.setModule(t),n}async loadExtensionManager(t){const n="extension-manager",r="/apps/"+n+"/main.bundle.dev.js";try{if(t)this.logger?.debug("Loading static extension Manager"),new L0(this.container);else{this.logger?.debug("Dynamic extension Manager. Ready to import ",r);const i=await import(r);if(i!=null){this.logger?.debug("Found components Init for ",n,i);const o=i.ComponentInit;new o(this.container),this.logger?.debug("Succesfull components Init for ",n)}else this.logger?.debug("No components to load for ",n)}}catch(i){this.logger?.error("Exception while loading extension Manager from ",r,i)}}async loadExtensions(t,n){this.logger?.debug("Start app"),await this.loadExtensionManager(t);const r=this.container.get("ExtensionManager");if(this.logger?.debug("Extension Manager is ",r),r!=null){if(!n){r.setRemoteExtensionsConfig("/apps/","main.bundle.dev.js");for(const i in this.extensionList)r.addRemoteExtension(i,"",!0);await r.loadExtensions(this.container)}this.logger?.debug("After extensions loading")}else this.logger?.debug("Could not start extension Manager");return r}initializeContainer(){this.container=new Cg,this.container.bind("LoggerConfig").to(il).inSingletonScope(),this.container.bind("Logger").to(ui);const t=this.container.get("LoggerConfig");t&&t.setDefaultLevel("debug"),this.logger=this.getLogger("index.ts"),this.logger?.info("Logging initialized")}getConfigFromPathName(t){let n="";if(t.startsWith("/")){const r=t.indexOf("/",1);r!=-1&&(n=t.substring(1,r))}return(n==null||n=="")&&(n="XWiki"),n}}function N0(e){return async()=>await(await fetch(e)).json()}class nu extends j0{constructor(t){super(t)}loadApp(t,n,r){const i=r,o=new Map(Object.entries(t));if(this.cristal.setAvailableConfigurations(o),n){const c=window.localStorage.getItem("currentApp");c!=null&&this.cristal.getAvailableConfigurations().has(c)?r=c:r="FileSystemSL"}else r=this.getConfigFromPathName(window.location.pathname);let a=this.cristal.getAvailableConfigurations().get(r);if(a==null&&(a=this.cristal.getAvailableConfigurations().get(i)),a==null){n||(window.location.href="/XWiki/#"),this.logger?.error("Could not start cristal module");return}this.cristal.setWikiConfig(a),a.designSystem!=""&&this.cristal.skinManager.setDesignSystem(a.designSystem),a.initialize(),this.logger.debug("Wiki Config is:",a),this.cristal!=null?this.cristal.run():this.logger?.error("Could not start cristal module")}async launchApp(t,n,r,i,o){let a=t;a&&(a=!0,(await E0(()=>import("./staticBuild-BoKVadnu.js").then(h=>h.s),__vite__mapDeps([0,1]),import.meta.url)).StaticBuild.init(this.container,a,o)),await this.loadExtensions(!0,a),this.container.bind("CristalApp").to(ul).inSingletonScope(),this.cristal=this.container.get("CristalApp"),this.cristal.isElectron=r,this.cristal.setContainer(this.container);const c=await n();this.loadApp(c,r,i)}static init(t,n,r,i,o,a){const c=new nu(t);c.initializeContainer(),c.launchApp(r,n,i,o,a)}}var $0=Object.defineProperty,F0=Object.getOwnPropertyDescriptor,B0=(e,t,n,r)=>{for(var i=r>1?void 0:r?F0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&$0(t,n,i),i},Go=(e,t)=>(n,r)=>t(n,r,e);let hl=class extends Zi{constructor(e,t,n){super(e),this.storage=t,this.cristal=n,this.storage.setWikiConfig(this),this.homePage===""&&(this.homePage="index.md")}};hl=B0([kt(),Go(0,wt("Logger")),Go(1,wt("Storage")),Go(1,bl("FileSystem")),Go(2,wt("CristalApp"))],hl);var U0=Object.defineProperty,K0=Object.getOwnPropertyDescriptor,V0=(e,t,n,r)=>{for(var i=r>1?void 0:r?K0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&U0(t,n,i),i},q0=(e,t)=>(n,r)=>t(n,r,e);let no=class{constructor(e,t){this.logger=e,this.logger.setModule(t)}setWikiConfig(e){this.logger.debug("Setting wiki Config: ",e),this.wikiConfig=e}getWikiConfig(){return this.wikiConfig}};no=V0([kt(),q0(0,Og())],no);var W0=Object.defineProperty,z0=Object.getOwnPropertyDescriptor,H0=(e,t,n,r)=>{for(var i=r>1?void 0:r?z0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&W0(t,n,i),i},G0=(e,t)=>(n,r)=>t(n,r,e);let rf=class extends no{constructor(e){super(e,"storage.components.xwikiStorage")}async isStorageReady(){return!0}getPageRestURL(e,t){return this.logger?.debug("XWiki Loading page",e),this.wikiConfig.baseURL+this.wikiConfig.baseRestURL+"&page="+e+"&format="+t}getPageFromViewURL(e){let t;return e.startsWith(this.wikiConfig.baseURL)?(t=e.replace(this.wikiConfig.baseURL,"").replace("/bin","").replace("/view/","").replaceAll("/","."),t.endsWith(".")&&(t+="WebHome")):t=null,t}getImageURL(e,t){e==""&&(e="Main.WebHome");const n=this.wikiConfig.baseURL+"/bin/download/"+e.replace(".","/")+"/"+t;return this.logger?.debug("final image url ",n),n}async getPageContent(e,t){this.logger?.debug("XWiki Loading page",e),e==""&&(e="Main.WebHome");const n=this.getPageRestURL(e,t);this.logger?.debug("XWiki Loading url",n);const i=await(await fetch(n,{cache:"no-store"})).json();let o="",a="",c={};t=="jsonld"?(c=i,this.wikiConfig.serverRendering?(this.logger?.debug("Using server side rendering for jsonld"),o=i.source,a=i.html):(this.logger?.debug("Using client side rendering for jsonld"),o=i.source,a="")):t=="html"?this.wikiConfig.serverRendering?(this.logger?.debug("Using server side rendering for html"),o=i.source,a=""):(this.logger?.debug("Using client side rendering for html"),o=i.source,a=""):(o="",a="");const f=new pr;return f.source=o,f.syntax="xwiki",f.html=a,f.document=new rl(c),f.css=i.css,f.js=i.js,f.version=f.document.get("version"),f.headlineRaw=i.headlineRaw,f.headline=i.headline,f.name=i.name,f}async getPanelContent(e,t){const n=this.wikiConfig.baseURL+"/rest/cristal/panel?media=json&page="+t+"&panel="+e;this.logger?.debug("XWiki Loading url",n);const i=await(await fetch(n,{cache:"no-store"})).json(),o=new pr;return o.source=i.source,o.syntax="xwiki",o.html=i.content,o.css=i.css,o.js=i.js,o}async getEditField(e,t){try{const n=e.get("xwikiMapping")[t];let r=n.type,i=n.fieldName;r==null&&(r="document"),i==null&&(i=t);const o=this.wikiConfig.baseURL+"/bin/get/"+e.getIdentifier().replaceAll(".","/")+"?xpage=display&mode=edit&type="+r+"&property="+e.get("className")+"."+i;return this.logger?.debug("XWiki Loading Field url",o),await(await fetch(o,{cache:"no-store"})).text()}catch(n){return this.logger?.error("Exception looking for edit field for field",t,n),""}}async save(e,t,n){const r=this.wikiConfig.baseURL,i=["rest","wikis","xwiki"],o=e.split(".");for(let c=0;c<o.length;c++){const f=c<o.length-1?"spaces":"pages";i.push(f),i.push(o[c])}const a=`${r}/${i.join("/")}`;await fetch(a,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Basic ${btoa("Test:xwikirox")}`},body:JSON.stringify({content:t,title:n,syntax:"markdown/1.2"})})}};rf=H0([kt(),G0(0,wt("Logger"))],rf);var X0=Object.defineProperty,Y0=Object.getOwnPropertyDescriptor,Q0=(e,t,n,r)=>{for(var i=r>1?void 0:r?Y0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&X0(t,n,i),i},Xo=(e,t)=>(n,r)=>t(n,r,e);let of=class extends Zi{constructor(e,t,n){super(e),this.cristal=n,this.storage=t,this.storage.setWikiConfig(this),this.homePage==""&&(this.homePage="Main.WebHome")}isSupported(e){return e=="html"||e=="jsonld"}defaultPageName(){return"Main.WebHome"}};of=Q0([kt(),Xo(0,wt("Logger")),Xo(1,wt("Storage")),Xo(1,bl("XWiki")),Xo(2,wt("CristalApp"))],of);var Z0=Object.defineProperty,J0=Object.getOwnPropertyDescriptor,ex=(e,t,n,r)=>{for(var i=r>1?void 0:r?J0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&Z0(t,n,i),i},tx=(e,t)=>(n,r)=>t(n,r,e);let sf=class extends no{constructor(e){super(e,"storage.components.githubStorage"),this.hashCode=function(t){let n=0,r,i;if(t.length===0)return""+n;for(r=0;r<t.length;r++)i=t.charCodeAt(r),n=(n<<5)-n+i,n|=0;return""+n}}async isStorageReady(){return!0}getPageRestURL(e,t){return this.logger?.debug("GitHub Loading page",e),this.wikiConfig.baseRestURL+e}getPageFromViewURL(e){let t=null;return e.startsWith(this.wikiConfig.baseURL)&&(t=e.replace(this.wikiConfig.baseURL,"")),t}getImageURL(e,t){return this.wikiConfig.baseRestURL+t}async getPageContent(e,t){this.logger?.debug("GitHub Loading page",e);const n=this.getPageRestURL(e,t),i=await(await fetch(n,{cache:"no-store"})).text();let o="";t=="json"?o="":t=="md"||t=="html"?o=i:o="";const a=new pr;return a.source=o,a.syntax="md",a.css=[],a.version=this.hashCode(o),a}async getPanelContent(){return new pr}async getEditField(){return""}save(){throw new Error("Save not supported")}};sf=ex([kt(),tx(0,wt("Logger"))],sf);var nx=Object.defineProperty,rx=Object.getOwnPropertyDescriptor,ix=(e,t,n,r)=>{for(var i=r>1?void 0:r?rx(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&nx(t,n,i),i},Yo=(e,t)=>(n,r)=>t(n,r,e);let af=class extends Zi{constructor(e,t,n){super(e),this.storage=t,this.cristal=n,this.storage.setWikiConfig(this),this.homePage==""&&(this.homePage="README.md")}defaultPageName(){return"README"}};af=ix([kt(),Yo(0,wt("Logger")),Yo(1,wt("Storage")),Yo(1,bl("GitHub")),Yo(2,wt("CristalApp"))],af);var ox=Object.defineProperty,sx=Object.getOwnPropertyDescriptor,ax=(e,t,n,r)=>{for(var i=r>1?void 0:r?sx(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&ox(t,n,i),i},Na=(e,t)=>(n,r)=>t(n,r,e);let lf=class{constructor(e,t,n){this.logger=e,this.logger.setModule("storage.components.wrappingOfflineStorage"),this.offlineStorage=t,this.queueWorker=n}setStorage(e){this.storage=e}getStorage(){return this.storage}setWikiConfig(e){return this.storage.setWikiConfig(e)}getWikiConfig(){return this.storage.getWikiConfig()}async isStorageReady(){return this.storage.isStorageReady()}getPageRestURL(e,t){return this.storage.getPageRestURL(e,t)}getPageFromViewURL(e){return this.storage.getPageFromViewURL(e)}getImageURL(e,t){return this.storage.getImageURL(e,t)}async getPageContent(e,t,n){if(this.logger.debug("Trying to get data for page ",e),this.offlineStorage){this.logger.debug("Asking offline storage for ",e);const r=await this.offlineStorage.getPage(this.getWikiConfig().name,e+"_"+t);return r!=null&&r!=null?(this.logger.debug("Loading data from local storage for page",e),(n==null||n)&&this.queueWorker.addToQueue(this.getWikiConfig().name+":"+e+"_"+t),r):(this.logger.debug("Could not find data in local storage for page",e),this.savePageContent(e,t))}else return this.logger.debug("No offline local storage available"),this.storage.getPageContent(e,t)}async savePageContent(e,t){const n=await this.storage.getPageContent(e,t);if(n)return n.id=e+"_"+t,this.logger.debug("Saving page to offline storage",e),this.offlineStorage.savePage(this.getWikiConfig().name,e+"_"+t,n),n;throw new Error("Can't save missing page.")}async updatePageContent(e,t){const n=await this.offlineStorage.getPage(this.getWikiConfig().name,e+"_"+t),r=await this.storage.getPageContent(e,t);return n&&r?(r.id=e+"_"+t,this.logger.debug("Saving page to offline storage",e),this.offlineStorage.savePage(this.getWikiConfig().name,e+"_"+t,r),!0):n?.version!=r?.version&&r?(r.id=e+"_"+t,this.logger.debug("Updating page to offline storage",e),this.offlineStorage.updatePage(this.getWikiConfig().name,e+"_"+t,r),!0):(this.logger.debug("Local storage not updated, because version are identical"),!1)}async getPanelContent(e,t,n){return this.storage.getPanelContent(e,t,n)}async getEditField(e,t){return await this.storage.getEditField(e,t)}save(e,t,n,r){return this.storage.save(e,t,n,r)}};lf=ax([kt(),Na(0,wt("Logger")),Na(1,wt("OfflineStorage")),Na(2,wt("QueueWorker"))],lf);var Rd={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ls,function(){var n=function(s,l){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(u[g]=d[g])})(s,l)},r=function(){return(r=Object.assign||function(s){for(var l,u=1,d=arguments.length;u<d;u++)for(var g in l=arguments[u])Object.prototype.hasOwnProperty.call(l,g)&&(s[g]=l[g]);return s}).apply(this,arguments)};function i(s,l,u){for(var d,g=0,m=l.length;g<m;g++)!d&&g in l||((d=d||Array.prototype.slice.call(l,0,g))[g]=l[g]);return s.concat(d||Array.prototype.slice.call(l))}var o=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:ls,a=Object.keys,c=Array.isArray;function f(s,l){return typeof l!="object"||a(l).forEach(function(u){s[u]=l[u]}),s}typeof Promise>"u"||o.Promise||(o.Promise=Promise);var h=Object.getPrototypeOf,p={}.hasOwnProperty;function v(s,l){return p.call(s,l)}function y(s,l){typeof l=="function"&&(l=l(h(s))),(typeof Reflect>"u"?a:Reflect.ownKeys)(l).forEach(function(u){D(s,u,l[u])})}var k=Object.defineProperty;function D(s,l,u,d){k(s,l,f(u&&v(u,"get")&&typeof u.get=="function"?{get:u.get,set:u.set,configurable:!0}:{value:u,configurable:!0,writable:!0},d))}function z(s){return{from:function(l){return s.prototype=Object.create(l.prototype),D(s.prototype,"constructor",s),{extend:y.bind(null,s.prototype)}}}}var ae=Object.getOwnPropertyDescriptor,re=[].slice;function Q(s,l,u){return re.call(s,l,u)}function _e(s,l){return l(s)}function Te(s){if(!s)throw new Error("Assertion Failed")}function le(s){o.setImmediate?setImmediate(s):setTimeout(s,0)}function Z(s,l){if(typeof l=="string"&&v(s,l))return s[l];if(!l)return s;if(typeof l!="string"){for(var u=[],d=0,g=l.length;d<g;++d){var m=Z(s,l[d]);u.push(m)}return u}var b=l.indexOf(".");if(b!==-1){var w=s[l.substr(0,b)];return w==null?void 0:Z(w,l.substr(b+1))}}function Ce(s,l,u){if(s&&l!==void 0&&!("isFrozen"in Object&&Object.isFrozen(s)))if(typeof l!="string"&&"length"in l){Te(typeof u!="string"&&"length"in u);for(var d=0,g=l.length;d<g;++d)Ce(s,l[d],u[d])}else{var m,b,w=l.indexOf(".");w!==-1?(m=l.substr(0,w),(b=l.substr(w+1))===""?u===void 0?c(s)&&!isNaN(parseInt(m))?s.splice(m,1):delete s[m]:s[m]=u:Ce(w=!(w=s[m])||!v(s,m)?s[m]={}:w,b,u)):u===void 0?c(s)&&!isNaN(parseInt(l))?s.splice(l,1):delete s[l]:s[l]=u}}function ye(s){var l,u={};for(l in s)v(s,l)&&(u[l]=s[l]);return u}var Re=[].concat;function Ie(s){return Re.apply([],s)}var Mn="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Ie([8,16,32,64].map(function(s){return["Int","Uint","Float"].map(function(l){return l+s+"Array"})}))).filter(function(s){return o[s]}),Ge=new Set(Mn.map(function(s){return o[s]})),he=null;function Le(s){return he=new WeakMap,s=function l(u){if(!u||typeof u!="object")return u;var d=he.get(u);if(d)return d;if(c(u)){d=[],he.set(u,d);for(var g=0,m=u.length;g<m;++g)d.push(l(u[g]))}else if(Ge.has(u.constructor))d=u;else{var b,w=h(u);for(b in d=w===Object.prototype?{}:Object.create(w),he.set(u,d),u)v(u,b)&&(d[b]=l(u[b]))}return d}(s),he=null,s}var dt={}.toString;function Ct(s){return dt.call(s).slice(8,-1)}var Ze=typeof Symbol<"u"?Symbol.iterator:"@@iterator",Ye=typeof Ze=="symbol"?function(s){var l;return s!=null&&(l=s[Ze])&&l.apply(s)}:function(){return null};function Fe(s,l){return l=s.indexOf(l),0<=l&&s.splice(l,1),0<=l}var Lt={};function Et(s){var l,u,d,g;if(arguments.length===1){if(c(s))return s.slice();if(this===Lt&&typeof s=="string")return[s];if(g=Ye(s)){for(u=[];!(d=g.next()).done;)u.push(d.value);return u}if(s==null)return[s];if(typeof(l=s.length)!="number")return[s];for(u=new Array(l);l--;)u[l]=s[l];return u}for(l=arguments.length,u=new Array(l);l--;)u[l]=arguments[l];return u}var Bt=typeof Symbol<"u"?function(s){return s[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},ke=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],un=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(ke),xe={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function It(s,l){this.name=s,this.message=l}function vn(s,l){return s+". Errors: "+Object.keys(l).map(function(u){return l[u].toString()}).filter(function(u,d,g){return g.indexOf(u)===d}).join(`
|
|
294
|
+
`)}function at(s,l,u,d){this.failures=l,this.failedKeys=d,this.successCount=u,this.message=vn(s,l)}function pt(s,l){this.name="BulkError",this.failures=Object.keys(l).map(function(u){return l[u]}),this.failuresByPos=l,this.message=vn(s,this.failures)}z(It).from(Error).extend({toString:function(){return this.name+": "+this.message}}),z(at).from(It),z(pt).from(It);var W=un.reduce(function(s,l){return s[l]=l+"Error",s},{}),ge=It,U=un.reduce(function(s,l){var u=l+"Error";function d(g,m){this.name=u,g?typeof g=="string"?(this.message="".concat(g).concat(m?`
|
|
295
|
+
`+m:""),this.inner=m||null):typeof g=="object"&&(this.message="".concat(g.name," ").concat(g.message),this.inner=g):(this.message=xe[l]||u,this.inner=null)}return z(d).from(ge),s[l]=d,s},{});U.Syntax=SyntaxError,U.Type=TypeError,U.Range=RangeError;var me=ke.reduce(function(s,l){return s[l+"Error"]=U[l],s},{}),Xe=un.reduce(function(s,l){return["Syntax","Type","Range"].indexOf(l)===-1&&(s[l+"Error"]=U[l]),s},{});function Se(){}function _(s){return s}function x(s,l){return s==null||s===_?l:function(u){return l(s(u))}}function L(s,l){return function(){s.apply(this,arguments),l.apply(this,arguments)}}function G(s,l){return s===Se?l:function(){var u=s.apply(this,arguments);u!==void 0&&(arguments[0]=u);var d=this.onsuccess,g=this.onerror;this.onsuccess=null,this.onerror=null;var m=l.apply(this,arguments);return d&&(this.onsuccess=this.onsuccess?L(d,this.onsuccess):d),g&&(this.onerror=this.onerror?L(g,this.onerror):g),m!==void 0?m:u}}function q(s,l){return s===Se?l:function(){s.apply(this,arguments);var u=this.onsuccess,d=this.onerror;this.onsuccess=this.onerror=null,l.apply(this,arguments),u&&(this.onsuccess=this.onsuccess?L(u,this.onsuccess):u),d&&(this.onerror=this.onerror?L(d,this.onerror):d)}}function ne(s,l){return s===Se?l:function(u){var d=s.apply(this,arguments);f(u,d);var g=this.onsuccess,m=this.onerror;return this.onsuccess=null,this.onerror=null,u=l.apply(this,arguments),g&&(this.onsuccess=this.onsuccess?L(g,this.onsuccess):g),m&&(this.onerror=this.onerror?L(m,this.onerror):m),d===void 0?u===void 0?void 0:u:f(d,u)}}function ue(s,l){return s===Se?l:function(){return l.apply(this,arguments)!==!1&&s.apply(this,arguments)}}function te(s,l){return s===Se?l:function(){var u=s.apply(this,arguments);if(u&&typeof u.then=="function"){for(var d=this,g=arguments.length,m=new Array(g);g--;)m[g]=arguments[g];return u.then(function(){return l.apply(d,m)})}return l.apply(this,arguments)}}Xe.ModifyError=at,Xe.DexieError=It,Xe.BulkError=pt;var J=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Y(s){J=s}var de={},Ee=100,Mn=typeof Promise>"u"?[]:function(){var s=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[s,h(s),s];var l=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[l,h(l),s]}(),ke=Mn[0],un=Mn[1],Mn=Mn[2],un=un&&un.then,Ae=ke&&ke.constructor,$e=!!Mn,Qe=function(s,l){We.push([s,l]),ht&&(queueMicrotask(rn),ht=!1)},it=!0,ht=!0,O=[],j=[],V=_,ee={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Se,pgp:!1,env:{},finalize:Se},H=ee,We=[],ze=0,je=[];function F(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var l=this._PSD=H;if(typeof s!="function"){if(s!==de)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&we(this,this._value))}this._state=null,this._value=null,++l.ref,function u(d,g){try{g(function(m){if(d._state===null){if(m===d)throw new TypeError("A promise cannot be resolved with itself.");var b=d._lib&&Rn();m&&typeof m.then=="function"?u(d,function(w,A){m instanceof F?m._then(w,A):m.then(w,A)}):(d._state=!0,d._value=m,Be(d)),b&&Wn()}},we.bind(null,d))}catch(m){we(d,m)}}(this,s)}var ve={get:function(){var s=H,l=mo;function u(d,g){var m=this,b=!s.global&&(s!==H||l!==mo),w=b&&!Hn(),A=new F(function(S,R){lt(m,new be(iu(d,s,b,w),iu(g,s,b,w),S,R,s))});return this._consoleTask&&(A._consoleTask=this._consoleTask),A}return u.prototype=de,u},set:function(s){D(this,"then",s&&s.prototype===de?ve:{get:function(){return s},set:ve.set})}};function be(s,l,u,d,g){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof l=="function"?l:null,this.resolve=u,this.reject=d,this.psd=g}function we(s,l){var u,d;j.push(l),s._state===null&&(u=s._lib&&Rn(),l=V(l),s._state=!1,s._value=l,d=s,O.some(function(g){return g._value===d._value})||O.push(d),Be(s),u&&Wn())}function Be(s){var l=s._listeners;s._listeners=[];for(var u=0,d=l.length;u<d;++u)lt(s,l[u]);var g=s._PSD;--g.ref||g.finalize(),ze===0&&(++ze,Qe(function(){--ze==0&&di()},[]))}function lt(s,l){if(s._state!==null){var u=s._state?l.onFulfilled:l.onRejected;if(u===null)return(s._state?l.resolve:l.reject)(s._value);++l.psd.ref,++ze,Qe(_t,[u,s,l])}else s._listeners.push(l)}function _t(s,l,u){try{var d,g=l._value;!l._state&&j.length&&(j=[]),d=J&&l._consoleTask?l._consoleTask.run(function(){return s(g)}):s(g),l._state||j.indexOf(g)!==-1||function(m){for(var b=O.length;b;)if(O[--b]._value===m._value)return O.splice(b,1)}(l),u.resolve(d)}catch(m){u.reject(m)}finally{--ze==0&&di(),--u.psd.ref||u.psd.finalize()}}function rn(){br(ee,function(){Rn()&&Wn()})}function Rn(){var s=it;return ht=it=!1,s}function Wn(){var s,l,u;do for(;0<We.length;)for(s=We,We=[],u=s.length,l=0;l<u;++l){var d=s[l];d[0].apply(null,d[1])}while(0<We.length);ht=it=!0}function di(){var s=O;O=[],s.forEach(function(d){d._PSD.onunhandled.call(null,d._value,d)});for(var l=je.slice(0),u=l.length;u;)l[--u]()}function ho(s){return new F(de,!1,s)}function yt(s,l){var u=H;return function(){var d=Rn(),g=H;try{return Gn(u,!0),s.apply(this,arguments)}catch(m){l&&l(m)}finally{Gn(g,!1),d&&Wn()}}}y(F.prototype,{then:ve,_then:function(s,l){lt(this,new be(null,null,s,l,H))},catch:function(s){if(arguments.length===1)return this.then(null,s);var l=s,u=arguments[1];return typeof l=="function"?this.then(null,function(d){return(d instanceof l?u:ho)(d)}):this.then(null,function(d){return(d&&d.name===l?u:ho)(d)})},finally:function(s){return this.then(function(l){return F.resolve(s()).then(function(){return l})},function(l){return F.resolve(s()).then(function(){return ho(l)})})},timeout:function(s,l){var u=this;return s<1/0?new F(function(d,g){var m=setTimeout(function(){return g(new U.Timeout(l))},s);u.then(d,g).finally(clearTimeout.bind(null,m))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&D(F.prototype,Symbol.toStringTag,"Dexie.Promise"),ee.env=ru(),y(F,{all:function(){var s=Et.apply(null,arguments).map(vo);return new F(function(l,u){s.length===0&&l([]);var d=s.length;s.forEach(function(g,m){return F.resolve(g).then(function(b){s[m]=b,--d||l(s)},u)})})},resolve:function(s){return s instanceof F?s:s&&typeof s.then=="function"?new F(function(l,u){s.then(l,u)}):new F(de,!0,s)},reject:ho,race:function(){var s=Et.apply(null,arguments).map(vo);return new F(function(l,u){s.map(function(d){return F.resolve(d).then(l,u)})})},PSD:{get:function(){return H},set:function(s){return H=s}},totalEchoes:{get:function(){return mo}},newPSD:zn,usePSD:br,scheduler:{get:function(){return Qe},set:function(s){Qe=s}},rejectionMapper:{get:function(){return V},set:function(s){V=s}},follow:function(s,l){return new F(function(u,d){return zn(function(g,m){var b=H;b.unhandleds=[],b.onunhandled=m,b.finalize=L(function(){var w,A=this;w=function(){A.unhandleds.length===0?g():m(A.unhandleds[0])},je.push(function S(){w(),je.splice(je.indexOf(S),1)}),++ze,Qe(function(){--ze==0&&di()},[])},b.finalize),s()},l,u,d)})}}),Ae&&(Ae.allSettled&&D(F,"allSettled",function(){var s=Et.apply(null,arguments).map(vo);return new F(function(l){s.length===0&&l([]);var u=s.length,d=new Array(u);s.forEach(function(g,m){return F.resolve(g).then(function(b){return d[m]={status:"fulfilled",value:b}},function(b){return d[m]={status:"rejected",reason:b}}).then(function(){return--u||l(d)})})})}),Ae.any&&typeof AggregateError<"u"&&D(F,"any",function(){var s=Et.apply(null,arguments).map(vo);return new F(function(l,u){s.length===0&&u(new AggregateError([]));var d=s.length,g=new Array(d);s.forEach(function(m,b){return F.resolve(m).then(function(w){return l(w)},function(w){g[b]=w,--d||u(new AggregateError(g))})})})}));var $t={awaits:0,echoes:0,id:0},Id=0,po=[],go=0,mo=0,Md=0;function zn(s,l,u,d){var g=H,m=Object.create(g);return m.parent=g,m.ref=0,m.global=!1,m.id=++Md,ee.env,m.env=$e?{Promise:F,PromiseProp:{value:F,configurable:!0,writable:!0},all:F.all,race:F.race,allSettled:F.allSettled,any:F.any,resolve:F.resolve,reject:F.reject}:{},l&&f(m,l),++g.ref,m.finalize=function(){--this.parent.ref||this.parent.finalize()},d=br(m,s,u,d),m.ref===0&&m.finalize(),d}function Wr(){return $t.id||($t.id=++Id),++$t.awaits,$t.echoes+=Ee,$t.id}function Hn(){return!!$t.awaits&&(--$t.awaits==0&&($t.id=0),$t.echoes=$t.awaits*Ee,!0)}function vo(s){return $t.echoes&&s&&s.constructor===Ae?(Wr(),s.then(function(l){return Hn(),l},function(l){return Hn(),At(l)})):s}function Dd(){var s=po[po.length-1];po.pop(),Gn(s,!1)}function Gn(s,l){var u,d=H;(l?!$t.echoes||go++&&s===H:!go||--go&&s===H)||queueMicrotask(l?function(g){++mo,$t.echoes&&--$t.echoes!=0||($t.echoes=$t.awaits=$t.id=0),po.push(H),Gn(g,!0)}.bind(null,s):Dd),s!==H&&(H=s,d===ee&&(ee.env=ru()),$e&&(u=ee.env.Promise,l=s.env,(d.global||s.global)&&(Object.defineProperty(o,"Promise",l.PromiseProp),u.all=l.all,u.race=l.race,u.resolve=l.resolve,u.reject=l.reject,l.allSettled&&(u.allSettled=l.allSettled),l.any&&(u.any=l.any))))}function ru(){var s=o.Promise;return $e?{Promise:s,PromiseProp:Object.getOwnPropertyDescriptor(o,"Promise"),all:s.all,race:s.race,allSettled:s.allSettled,any:s.any,resolve:s.resolve,reject:s.reject}:{}}function br(s,l,u,d,g){var m=H;try{return Gn(s,!0),l(u,d,g)}finally{Gn(m,!1)}}function iu(s,l,u,d){return typeof s!="function"?s:function(){var g=H;u&&Wr(),Gn(l,!0);try{return s.apply(this,arguments)}finally{Gn(g,!1),d&&queueMicrotask(Hn)}}}function qs(s){Promise===Ae&&$t.echoes===0?go===0?s():enqueueNativeMicroTask(s):setTimeout(s,0)}(""+un).indexOf("[native code]")===-1&&(Wr=Hn=Se);var At=F.reject,_r="",In="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",ou="String expected.",zr=[],yo="__dbnames",Ws="readonly",zs="readwrite";function wr(s,l){return s?l?function(){return s.apply(this,arguments)&&l.apply(this,arguments)}:s:l}var su={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function bo(s){return typeof s!="string"||/\./.test(s)?function(l){return l}:function(l){return l[s]===void 0&&s in l&&delete(l=Le(l))[s],l}}function au(){throw U.Type()}function nt(s,l){try{var u=lu(s),d=lu(l);if(u!==d)return u==="Array"?1:d==="Array"?-1:u==="binary"?1:d==="binary"?-1:u==="string"?1:d==="string"?-1:u==="Date"?1:d!=="Date"?NaN:-1;switch(u){case"number":case"Date":case"string":return l<s?1:s<l?-1:0;case"binary":return function(g,m){for(var b=g.length,w=m.length,A=b<w?b:w,S=0;S<A;++S)if(g[S]!==m[S])return g[S]<m[S]?-1:1;return b===w?0:b<w?-1:1}(uu(s),uu(l));case"Array":return function(g,m){for(var b=g.length,w=m.length,A=b<w?b:w,S=0;S<A;++S){var R=nt(g[S],m[S]);if(R!==0)return R}return b===w?0:b<w?-1:1}(s,l)}}catch{}return NaN}function lu(s){var l=typeof s;return l!="object"?l:ArrayBuffer.isView(s)?"binary":(s=Ct(s),s==="ArrayBuffer"?"binary":s)}function uu(s){return s instanceof Uint8Array?s:ArrayBuffer.isView(s)?new Uint8Array(s.buffer,s.byteOffset,s.byteLength):new Uint8Array(s)}var cu=(gt.prototype._trans=function(s,l,u){var d=this._tx||H.trans,g=this.name,m=J&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(s==="readonly"?"read":"write"," ").concat(this.name));function b(S,R,C){if(!C.schema[g])throw new U.NotFound("Table "+g+" not part of transaction");return l(C.idbtrans,C)}var w=Rn();try{var A=d&&d.db._novip===this.db._novip?d===H.trans?d._promise(s,b,u):zn(function(){return d._promise(s,b,u)},{trans:d,transless:H.transless||H}):function S(R,C,I,E){if(R.idbdb&&(R._state.openComplete||H.letThrough||R._vip)){var T=R._createTransaction(C,I,R._dbSchema);try{T.create(),R._state.PR1398_maxLoop=3}catch(M){return M.name===W.InvalidState&&R.isOpen()&&0<--R._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),R.close({disableAutoOpen:!1}),R.open().then(function(){return S(R,C,I,E)})):At(M)}return T._promise(C,function(M,P){return zn(function(){return H.trans=T,E(M,P,T)})}).then(function(M){if(C==="readwrite")try{T.idbtrans.commit()}catch{}return C==="readonly"?M:T._completion.then(function(){return M})})}if(R._state.openComplete)return At(new U.DatabaseClosed(R._state.dbOpenError));if(!R._state.isBeingOpened){if(!R._state.autoOpen)return At(new U.DatabaseClosed);R.open().catch(Se)}return R._state.dbReadyPromise.then(function(){return S(R,C,I,E)})}(this.db,s,[this.name],b);return m&&(A._consoleTask=m,A=A.catch(function(S){return console.trace(S),At(S)})),A}finally{w&&Wn()}},gt.prototype.get=function(s,l){var u=this;return s&&s.constructor===Object?this.where(s).first(l):s==null?At(new U.Type("Invalid argument to Table.get()")):this._trans("readonly",function(d){return u.core.get({trans:d,key:s}).then(function(g){return u.hook.reading.fire(g)})}).then(l)},gt.prototype.where=function(s){if(typeof s=="string")return new this.db.WhereClause(this,s);if(c(s))return new this.db.WhereClause(this,"[".concat(s.join("+"),"]"));var l=a(s);if(l.length===1)return this.where(l[0]).equals(s[l[0]]);var u=this.schema.indexes.concat(this.schema.primKey).filter(function(A){if(A.compound&&l.every(function(R){return 0<=A.keyPath.indexOf(R)})){for(var S=0;S<l.length;++S)if(l.indexOf(A.keyPath[S])===-1)return!1;return!0}return!1}).sort(function(A,S){return A.keyPath.length-S.keyPath.length})[0];if(u&&this.db._maxKey!==_r){var b=u.keyPath.slice(0,l.length);return this.where(b).equals(b.map(function(S){return s[S]}))}!u&&J&&console.warn("The query ".concat(JSON.stringify(s)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(l.join("+"),"]"));var d=this.schema.idxByName,g=this.db._deps.indexedDB;function m(A,S){return g.cmp(A,S)===0}var w=l.reduce(function(I,S){var R=I[0],C=I[1],I=d[S],E=s[S];return[R||I,R||!I?wr(C,I&&I.multi?function(T){return T=Z(T,S),c(T)&&T.some(function(M){return m(E,M)})}:function(T){return m(E,Z(T,S))}):C]},[null,null]),b=w[0],w=w[1];return b?this.where(b.name).equals(s[b.keyPath]).filter(w):u?this.filter(w):this.where(l).equals("")},gt.prototype.filter=function(s){return this.toCollection().and(s)},gt.prototype.count=function(s){return this.toCollection().count(s)},gt.prototype.offset=function(s){return this.toCollection().offset(s)},gt.prototype.limit=function(s){return this.toCollection().limit(s)},gt.prototype.each=function(s){return this.toCollection().each(s)},gt.prototype.toArray=function(s){return this.toCollection().toArray(s)},gt.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},gt.prototype.orderBy=function(s){return new this.db.Collection(new this.db.WhereClause(this,c(s)?"[".concat(s.join("+"),"]"):s))},gt.prototype.reverse=function(){return this.toCollection().reverse()},gt.prototype.mapToClass=function(s){var l,u=this.db,d=this.name;function g(){return l!==null&&l.apply(this,arguments)||this}(this.schema.mappedClass=s).prototype instanceof au&&(function(A,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function R(){this.constructor=A}n(A,S),A.prototype=S===null?Object.create(S):(R.prototype=S.prototype,new R)}(g,l=s),Object.defineProperty(g.prototype,"db",{get:function(){return u},enumerable:!1,configurable:!0}),g.prototype.table=function(){return d},s=g);for(var m=new Set,b=s.prototype;b;b=h(b))Object.getOwnPropertyNames(b).forEach(function(A){return m.add(A)});function w(A){if(!A)return A;var S,R=Object.create(s.prototype);for(S in A)if(!m.has(S))try{R[S]=A[S]}catch{}return R}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=w,this.hook("reading",w),s},gt.prototype.defineClass=function(){return this.mapToClass(function(s){f(this,s)})},gt.prototype.add=function(s,l){var u=this,d=this.schema.primKey,g=d.auto,m=d.keyPath,b=s;return m&&g&&(b=bo(m)(s)),this._trans("readwrite",function(w){return u.core.mutate({trans:w,type:"add",keys:l!=null?[l]:null,values:[b]})}).then(function(w){return w.numFailures?F.reject(w.failures[0]):w.lastResult}).then(function(w){if(m)try{Ce(s,m,w)}catch{}return w})},gt.prototype.update=function(s,l){return typeof s!="object"||c(s)?this.where(":id").equals(s).modify(l):(s=Z(s,this.schema.primKey.keyPath),s===void 0?At(new U.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(s).modify(l))},gt.prototype.put=function(s,l){var u=this,d=this.schema.primKey,g=d.auto,m=d.keyPath,b=s;return m&&g&&(b=bo(m)(s)),this._trans("readwrite",function(w){return u.core.mutate({trans:w,type:"put",values:[b],keys:l!=null?[l]:null})}).then(function(w){return w.numFailures?F.reject(w.failures[0]):w.lastResult}).then(function(w){if(m)try{Ce(s,m,w)}catch{}return w})},gt.prototype.delete=function(s){var l=this;return this._trans("readwrite",function(u){return l.core.mutate({trans:u,type:"delete",keys:[s]})}).then(function(u){return u.numFailures?F.reject(u.failures[0]):void 0})},gt.prototype.clear=function(){var s=this;return this._trans("readwrite",function(l){return s.core.mutate({trans:l,type:"deleteRange",range:su})}).then(function(l){return l.numFailures?F.reject(l.failures[0]):void 0})},gt.prototype.bulkGet=function(s){var l=this;return this._trans("readonly",function(u){return l.core.getMany({keys:s,trans:u}).then(function(d){return d.map(function(g){return l.hook.reading.fire(g)})})})},gt.prototype.bulkAdd=function(s,l,u){var d=this,g=Array.isArray(l)?l:void 0,m=(u=u||(g?void 0:l))?u.allKeys:void 0;return this._trans("readwrite",function(b){var S=d.schema.primKey,w=S.auto,S=S.keyPath;if(S&&g)throw new U.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(g&&g.length!==s.length)throw new U.InvalidArgument("Arguments objects and keys must have the same length");var A=s.length,S=S&&w?s.map(bo(S)):s;return d.core.mutate({trans:b,type:"add",keys:g,values:S,wantResults:m}).then(function(T){var C=T.numFailures,I=T.results,E=T.lastResult,T=T.failures;if(C===0)return m?I:E;throw new pt("".concat(d.name,".bulkAdd(): ").concat(C," of ").concat(A," operations failed"),T)})})},gt.prototype.bulkPut=function(s,l,u){var d=this,g=Array.isArray(l)?l:void 0,m=(u=u||(g?void 0:l))?u.allKeys:void 0;return this._trans("readwrite",function(b){var S=d.schema.primKey,w=S.auto,S=S.keyPath;if(S&&g)throw new U.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(g&&g.length!==s.length)throw new U.InvalidArgument("Arguments objects and keys must have the same length");var A=s.length,S=S&&w?s.map(bo(S)):s;return d.core.mutate({trans:b,type:"put",keys:g,values:S,wantResults:m}).then(function(T){var C=T.numFailures,I=T.results,E=T.lastResult,T=T.failures;if(C===0)return m?I:E;throw new pt("".concat(d.name,".bulkPut(): ").concat(C," of ").concat(A," operations failed"),T)})})},gt.prototype.bulkUpdate=function(s){var l=this,u=this.core,d=s.map(function(b){return b.key}),g=s.map(function(b){return b.changes}),m=[];return this._trans("readwrite",function(b){return u.getMany({trans:b,keys:d,cache:"clone"}).then(function(w){var A=[],S=[];s.forEach(function(C,I){var E=C.key,T=C.changes,M=w[I];if(M){for(var P=0,N=Object.keys(T);P<N.length;P++){var $=N[P],B=T[$];if($===l.schema.primKey.keyPath){if(nt(B,E)!==0)throw new U.Constraint("Cannot update primary key in bulkUpdate()")}else Ce(M,$,B)}m.push(I),A.push(E),S.push(M)}});var R=A.length;return u.mutate({trans:b,type:"put",keys:A,values:S,updates:{keys:d,changeSpecs:g}}).then(function(C){var I=C.numFailures,E=C.failures;if(I===0)return R;for(var T=0,M=Object.keys(E);T<M.length;T++){var P,N=M[T],$=m[Number(N)];$!=null&&(P=E[N],delete E[N],E[$]=P)}throw new pt("".concat(l.name,".bulkUpdate(): ").concat(I," of ").concat(R," operations failed"),E)})})})},gt.prototype.bulkDelete=function(s){var l=this,u=s.length;return this._trans("readwrite",function(d){return l.core.mutate({trans:d,type:"delete",keys:s})}).then(function(b){var g=b.numFailures,m=b.lastResult,b=b.failures;if(g===0)return m;throw new pt("".concat(l.name,".bulkDelete(): ").concat(g," of ").concat(u," operations failed"),b)})},gt);function gt(){}function pi(s){function l(b,w){if(w){for(var A=arguments.length,S=new Array(A-1);--A;)S[A-1]=arguments[A];return u[b].subscribe.apply(null,S),s}if(typeof b=="string")return u[b]}var u={};l.addEventType=m;for(var d=1,g=arguments.length;d<g;++d)m(arguments[d]);return l;function m(b,w,A){if(typeof b!="object"){var S;w=w||ue;var R={subscribers:[],fire:A=A||Se,subscribe:function(C){R.subscribers.indexOf(C)===-1&&(R.subscribers.push(C),R.fire=w(R.fire,C))},unsubscribe:function(C){R.subscribers=R.subscribers.filter(function(I){return I!==C}),R.fire=R.subscribers.reduce(w,A)}};return u[b]=l[b]=R}a(S=b).forEach(function(C){var I=S[C];if(c(I))m(C,S[C][0],S[C][1]);else{if(I!=="asap")throw new U.InvalidArgument("Invalid event config");var E=m(C,_,function(){for(var T=arguments.length,M=new Array(T);T--;)M[T]=arguments[T];E.subscribers.forEach(function(P){le(function(){P.apply(null,M)})})})}})}}function gi(s,l){return z(l).from({prototype:s}),l}function Hr(s,l){return!(s.filter||s.algorithm||s.or)&&(l?s.justLimit:!s.replayFilter)}function Hs(s,l){s.filter=wr(s.filter,l)}function Gs(s,l,u){var d=s.replayFilter;s.replayFilter=d?function(){return wr(d(),l())}:l,s.justLimit=u&&!d}function _o(s,l){if(s.isPrimKey)return l.primaryKey;var u=l.getIndexByKeyPath(s.index);if(!u)throw new U.Schema("KeyPath "+s.index+" on object store "+l.name+" is not indexed");return u}function fu(s,l,u){var d=_o(s,l.schema);return l.openCursor({trans:u,values:!s.keysOnly,reverse:s.dir==="prev",unique:!!s.unique,query:{index:d,range:s.range}})}function wo(s,l,u,d){var g=s.replayFilter?wr(s.filter,s.replayFilter()):s.filter;if(s.or){var m={},b=function(w,A,S){var R,C;g&&!g(A,S,function(I){return A.stop(I)},function(I){return A.fail(I)})||((C=""+(R=A.primaryKey))=="[object ArrayBuffer]"&&(C=""+new Uint8Array(R)),v(m,C)||(m[C]=!0,l(w,A,S)))};return Promise.all([s.or._iterate(b,u),hu(fu(s,d,u),s.algorithm,b,!s.keysOnly&&s.valueMapper)])}return hu(fu(s,d,u),wr(s.algorithm,g),l,!s.keysOnly&&s.valueMapper)}function hu(s,l,u,d){var g=yt(d?function(m,b,w){return u(d(m),b,w)}:u);return s.then(function(m){if(m)return m.start(function(){var b=function(){return m.continue()};l&&!l(m,function(w){return b=w},function(w){m.stop(w),b=Se},function(w){m.fail(w),b=Se})||g(m.value,m,function(w){return b=w}),b()})})}var Mn=Symbol(),Xs=(du.prototype.execute=function(s){var l=(l=this.replacePrefix)===null||l===void 0?void 0:l[0];return l&&typeof s=="string"&&s.startsWith(l)?this.replacePrefix[1]+s.substring(l.length):s},du);function du(s){Object.assign(this,s)}var Ld=(tt.prototype._read=function(s,l){var u=this._ctx;return u.error?u.table._trans(null,At.bind(null,u.error)):u.table._trans("readonly",s).then(l)},tt.prototype._write=function(s){var l=this._ctx;return l.error?l.table._trans(null,At.bind(null,l.error)):l.table._trans("readwrite",s,"locked")},tt.prototype._addAlgorithm=function(s){var l=this._ctx;l.algorithm=wr(l.algorithm,s)},tt.prototype._iterate=function(s,l){return wo(this._ctx,s,l,this._ctx.table.core)},tt.prototype.clone=function(s){var l=Object.create(this.constructor.prototype),u=Object.create(this._ctx);return s&&f(u,s),l._ctx=u,l},tt.prototype.raw=function(){return this._ctx.valueMapper=null,this},tt.prototype.each=function(s){var l=this._ctx;return this._read(function(u){return wo(l,s,u,l.table.core)})},tt.prototype.count=function(s){var l=this;return this._read(function(u){var d=l._ctx,g=d.table.core;if(Hr(d,!0))return g.count({trans:u,query:{index:_o(d,g.schema),range:d.range}}).then(function(b){return Math.min(b,d.limit)});var m=0;return wo(d,function(){return++m,!1},u,g).then(function(){return m})}).then(s)},tt.prototype.sortBy=function(s,l){var u=s.split(".").reverse(),d=u[0],g=u.length-1;function m(A,S){return S?m(A[u[S]],S-1):A[d]}var b=this._ctx.dir==="next"?1:-1;function w(A,S){return A=m(A,g),S=m(S,g),A<S?-b:S<A?b:0}return this.toArray(function(A){return A.sort(w)}).then(l)},tt.prototype.toArray=function(s){var l=this;return this._read(function(u){var d=l._ctx;if(d.dir==="next"&&Hr(d,!0)&&0<d.limit){var g=d.valueMapper,m=_o(d,d.table.core.schema);return d.table.core.query({trans:u,limit:d.limit,values:!0,query:{index:m,range:d.range}}).then(function(w){return w=w.result,g?w.map(g):w})}var b=[];return wo(d,function(w){return b.push(w)},u,d.table.core).then(function(){return b})},s)},tt.prototype.offset=function(s){var l=this._ctx;return s<=0||(l.offset+=s,Hr(l)?Gs(l,function(){var u=s;return function(d,g){return u===0||(u===1?--u:g(function(){d.advance(u),u=0}),!1)}}):Gs(l,function(){var u=s;return function(){return--u<0}})),this},tt.prototype.limit=function(s){return this._ctx.limit=Math.min(this._ctx.limit,s),Gs(this._ctx,function(){var l=s;return function(u,d,g){return--l<=0&&d(g),0<=l}},!0),this},tt.prototype.until=function(s,l){return Hs(this._ctx,function(u,d,g){return!s(u.value)||(d(g),l)}),this},tt.prototype.first=function(s){return this.limit(1).toArray(function(l){return l[0]}).then(s)},tt.prototype.last=function(s){return this.reverse().first(s)},tt.prototype.filter=function(s){var l;return Hs(this._ctx,function(u){return s(u.value)}),(l=this._ctx).isMatch=wr(l.isMatch,s),this},tt.prototype.and=function(s){return this.filter(s)},tt.prototype.or=function(s){return new this.db.WhereClause(this._ctx.table,s,this)},tt.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},tt.prototype.desc=function(){return this.reverse()},tt.prototype.eachKey=function(s){var l=this._ctx;return l.keysOnly=!l.isMatch,this.each(function(u,d){s(d.key,d)})},tt.prototype.eachUniqueKey=function(s){return this._ctx.unique="unique",this.eachKey(s)},tt.prototype.eachPrimaryKey=function(s){var l=this._ctx;return l.keysOnly=!l.isMatch,this.each(function(u,d){s(d.primaryKey,d)})},tt.prototype.keys=function(s){var l=this._ctx;l.keysOnly=!l.isMatch;var u=[];return this.each(function(d,g){u.push(g.key)}).then(function(){return u}).then(s)},tt.prototype.primaryKeys=function(s){var l=this._ctx;if(l.dir==="next"&&Hr(l,!0)&&0<l.limit)return this._read(function(d){var g=_o(l,l.table.core.schema);return l.table.core.query({trans:d,values:!1,limit:l.limit,query:{index:g,range:l.range}})}).then(function(d){return d.result}).then(s);l.keysOnly=!l.isMatch;var u=[];return this.each(function(d,g){u.push(g.primaryKey)}).then(function(){return u}).then(s)},tt.prototype.uniqueKeys=function(s){return this._ctx.unique="unique",this.keys(s)},tt.prototype.firstKey=function(s){return this.limit(1).keys(function(l){return l[0]}).then(s)},tt.prototype.lastKey=function(s){return this.reverse().firstKey(s)},tt.prototype.distinct=function(){var s=this._ctx,s=s.index&&s.table.schema.idxByName[s.index];if(!s||!s.multi)return this;var l={};return Hs(this._ctx,function(g){var d=g.primaryKey.toString(),g=v(l,d);return l[d]=!0,!g}),this},tt.prototype.modify=function(s){var l=this,u=this._ctx;return this._write(function(d){var g,m,b;b=typeof s=="function"?s:(g=a(s),m=g.length,function(P){for(var N=!1,$=0;$<m;++$){var B=g[$],K=s[B],X=Z(P,B);K instanceof Xs?(Ce(P,B,K.execute(X)),N=!0):X!==K&&(Ce(P,B,K),N=!0)}return N});function w(P,B){var $=B.failures,B=B.numFailures;T+=P-B;for(var K=0,X=a($);K<X.length;K++){var ce=X[K];E.push($[ce])}}var A=u.table.core,S=A.schema.primaryKey,R=S.outbound,C=S.extractKey,I=l.db._options.modifyChunkSize||200,E=[],T=0,M=[];return l.clone().primaryKeys().then(function(P){function N($){var B=Math.min(I,P.length-$);return A.getMany({trans:d,keys:P.slice($,$+B),cache:"immutable"}).then(function(K){for(var X=[],ce=[],ie=R?[]:null,se=[],fe=0;fe<B;++fe){var pe=K[fe],Me={value:Le(pe),primKey:P[$+fe]};b.call(Me,Me.value,Me)!==!1&&(Me.value==null?se.push(P[$+fe]):R||nt(C(pe),C(Me.value))===0?(ce.push(Me.value),R&&ie.push(P[$+fe])):(se.push(P[$+fe]),X.push(Me.value)))}var Ue=Hr(u)&&u.limit===1/0&&(typeof s!="function"||s===Ys)&&{index:u.index,range:u.range};return Promise.resolve(0<X.length&&A.mutate({trans:d,type:"add",values:X}).then(function(He){for(var Ke in He.failures)se.splice(parseInt(Ke),1);w(X.length,He)})).then(function(){return(0<ce.length||Ue&&typeof s=="object")&&A.mutate({trans:d,type:"put",keys:ie,values:ce,criteria:Ue,changeSpec:typeof s!="function"&&s}).then(function(He){return w(ce.length,He)})}).then(function(){return(0<se.length||Ue&&s===Ys)&&A.mutate({trans:d,type:"delete",keys:se,criteria:Ue}).then(function(He){return w(se.length,He)})}).then(function(){return P.length>$+B&&N($+I)})})}return N(0).then(function(){if(0<E.length)throw new at("Error modifying one or more objects",E,T,M);return P.length})})})},tt.prototype.delete=function(){var s=this._ctx,l=s.range;return Hr(s)&&(s.isPrimKey||l.type===3)?this._write(function(u){var d=s.table.core.schema.primaryKey,g=l;return s.table.core.count({trans:u,query:{index:d,range:g}}).then(function(m){return s.table.core.mutate({trans:u,type:"deleteRange",range:g}).then(function(b){var w=b.failures;if(b.lastResult,b.results,b=b.numFailures,b)throw new at("Could not delete some values",Object.keys(w).map(function(A){return w[A]}),m-b);return m-b})})}):this.modify(Ys)},tt);function tt(){}var Ys=function(s,l){return l.value=null};function jd(s,l){return s<l?-1:s===l?0:1}function Nd(s,l){return l<s?-1:s===l?0:1}function on(s,l,u){return s=s instanceof gu?new s.Collection(s):s,s._ctx.error=new(u||TypeError)(l),s}function Gr(s){return new s.Collection(s,function(){return pu("")}).limit(0)}function xo(s,l,u,d){var g,m,b,w,A,S,R,C=u.length;if(!u.every(function(T){return typeof T=="string"}))return on(s,ou);function I(T){g=T==="next"?function(P){return P.toUpperCase()}:function(P){return P.toLowerCase()},m=T==="next"?function(P){return P.toLowerCase()}:function(P){return P.toUpperCase()},b=T==="next"?jd:Nd;var M=u.map(function(P){return{lower:m(P),upper:g(P)}}).sort(function(P,N){return b(P.lower,N.lower)});w=M.map(function(P){return P.upper}),A=M.map(function(P){return P.lower}),R=(S=T)==="next"?"":d}I("next"),s=new s.Collection(s,function(){return Xn(w[0],A[C-1]+d)}),s._ondirectionchange=function(T){I(T)};var E=0;return s._addAlgorithm(function(T,M,P){var N=T.key;if(typeof N!="string")return!1;var $=m(N);if(l($,A,E))return!0;for(var B=null,K=E;K<C;++K){var X=function(ce,ie,se,fe,pe,Me){for(var Ue=Math.min(ce.length,fe.length),He=-1,Ke=0;Ke<Ue;++Ke){var yn=ie[Ke];if(yn!==fe[Ke])return pe(ce[Ke],se[Ke])<0?ce.substr(0,Ke)+se[Ke]+se.substr(Ke+1):pe(ce[Ke],fe[Ke])<0?ce.substr(0,Ke)+fe[Ke]+se.substr(Ke+1):0<=He?ce.substr(0,He)+ie[He]+se.substr(He+1):null;pe(ce[Ke],yn)<0&&(He=Ke)}return Ue<fe.length&&Me==="next"?ce+se.substr(ce.length):Ue<ce.length&&Me==="prev"?ce.substr(0,se.length):He<0?null:ce.substr(0,He)+fe[He]+se.substr(He+1)}(N,$,w[K],A[K],b,S);X===null&&B===null?E=K+1:(B===null||0<b(B,X))&&(B=X)}return M(B!==null?function(){T.continue(B+R)}:P),!1}),s}function Xn(s,l,u,d){return{type:2,lower:s,upper:l,lowerOpen:u,upperOpen:d}}function pu(s){return{type:1,lower:s,upper:s}}var gu=(Object.defineProperty(Ft.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Ft.prototype.between=function(s,l,u,d){u=u!==!1,d=d===!0;try{return 0<this._cmp(s,l)||this._cmp(s,l)===0&&(u||d)&&(!u||!d)?Gr(this):new this.Collection(this,function(){return Xn(s,l,!u,!d)})}catch{return on(this,In)}},Ft.prototype.equals=function(s){return s==null?on(this,In):new this.Collection(this,function(){return pu(s)})},Ft.prototype.above=function(s){return s==null?on(this,In):new this.Collection(this,function(){return Xn(s,void 0,!0)})},Ft.prototype.aboveOrEqual=function(s){return s==null?on(this,In):new this.Collection(this,function(){return Xn(s,void 0,!1)})},Ft.prototype.below=function(s){return s==null?on(this,In):new this.Collection(this,function(){return Xn(void 0,s,!1,!0)})},Ft.prototype.belowOrEqual=function(s){return s==null?on(this,In):new this.Collection(this,function(){return Xn(void 0,s)})},Ft.prototype.startsWith=function(s){return typeof s!="string"?on(this,ou):this.between(s,s+_r,!0,!0)},Ft.prototype.startsWithIgnoreCase=function(s){return s===""?this.startsWith(s):xo(this,function(l,u){return l.indexOf(u[0])===0},[s],_r)},Ft.prototype.equalsIgnoreCase=function(s){return xo(this,function(l,u){return l===u[0]},[s],"")},Ft.prototype.anyOfIgnoreCase=function(){var s=Et.apply(Lt,arguments);return s.length===0?Gr(this):xo(this,function(l,u){return u.indexOf(l)!==-1},s,"")},Ft.prototype.startsWithAnyOfIgnoreCase=function(){var s=Et.apply(Lt,arguments);return s.length===0?Gr(this):xo(this,function(l,u){return u.some(function(d){return l.indexOf(d)===0})},s,_r)},Ft.prototype.anyOf=function(){var s=this,l=Et.apply(Lt,arguments),u=this._cmp;try{l.sort(u)}catch{return on(this,In)}if(l.length===0)return Gr(this);var d=new this.Collection(this,function(){return Xn(l[0],l[l.length-1])});d._ondirectionchange=function(m){u=m==="next"?s._ascending:s._descending,l.sort(u)};var g=0;return d._addAlgorithm(function(m,b,w){for(var A=m.key;0<u(A,l[g]);)if(++g===l.length)return b(w),!1;return u(A,l[g])===0||(b(function(){m.continue(l[g])}),!1)}),d},Ft.prototype.notEqual=function(s){return this.inAnyRange([[-1/0,s],[s,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Ft.prototype.noneOf=function(){var s=Et.apply(Lt,arguments);if(s.length===0)return new this.Collection(this);try{s.sort(this._ascending)}catch{return on(this,In)}var l=s.reduce(function(u,d){return u?u.concat([[u[u.length-1][1],d]]):[[-1/0,d]]},null);return l.push([s[s.length-1],this.db._maxKey]),this.inAnyRange(l,{includeLowers:!1,includeUppers:!1})},Ft.prototype.inAnyRange=function(N,l){var u=this,d=this._cmp,g=this._ascending,m=this._descending,b=this._min,w=this._max;if(N.length===0)return Gr(this);if(!N.every(function($){return $[0]!==void 0&&$[1]!==void 0&&g($[0],$[1])<=0}))return on(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",U.InvalidArgument);var A=!l||l.includeLowers!==!1,S=l&&l.includeUppers===!0,R,C=g;function I($,B){return C($[0],B[0])}try{(R=N.reduce(function($,B){for(var K=0,X=$.length;K<X;++K){var ce=$[K];if(d(B[0],ce[1])<0&&0<d(B[1],ce[0])){ce[0]=b(ce[0],B[0]),ce[1]=w(ce[1],B[1]);break}}return K===X&&$.push(B),$},[])).sort(I)}catch{return on(this,In)}var E=0,T=S?function($){return 0<g($,R[E][1])}:function($){return 0<=g($,R[E][1])},M=A?function($){return 0<m($,R[E][0])}:function($){return 0<=m($,R[E][0])},P=T,N=new this.Collection(this,function(){return Xn(R[0][0],R[R.length-1][1],!A,!S)});return N._ondirectionchange=function($){C=$==="next"?(P=T,g):(P=M,m),R.sort(I)},N._addAlgorithm(function($,B,K){for(var X,ce=$.key;P(ce);)if(++E===R.length)return B(K),!1;return!T(X=ce)&&!M(X)||(u._cmp(ce,R[E][1])===0||u._cmp(ce,R[E][0])===0||B(function(){C===g?$.continue(R[E][0]):$.continue(R[E][1])}),!1)}),N},Ft.prototype.startsWithAnyOf=function(){var s=Et.apply(Lt,arguments);return s.every(function(l){return typeof l=="string"})?s.length===0?Gr(this):this.inAnyRange(s.map(function(l){return[l,l+_r]})):on(this,"startsWithAnyOf() only works with strings")},Ft);function Ft(){}function wn(s){return yt(function(l){return mi(l),s(l.target.error),!1})}function mi(s){s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault()}var vi="storagemutated",Qs="x-storagemutated-1",Yn=pi(null,vi),$d=(xn.prototype._lock=function(){return Te(!H.global),++this._reculock,this._reculock!==1||H.global||(H.lockOwnerFor=this),this},xn.prototype._unlock=function(){if(Te(!H.global),--this._reculock==0)for(H.global||(H.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var s=this._blockedFuncs.shift();try{br(s[1],s[0])}catch{}}return this},xn.prototype._locked=function(){return this._reculock&&H.lockOwnerFor!==this},xn.prototype.create=function(s){var l=this;if(!this.mode)return this;var u=this.db.idbdb,d=this.db._state.dbOpenError;if(Te(!this.idbtrans),!s&&!u)switch(d&&d.name){case"DatabaseClosedError":throw new U.DatabaseClosed(d);case"MissingAPIError":throw new U.MissingAPI(d.message,d);default:throw new U.OpenFailed(d)}if(!this.active)throw new U.TransactionInactive;return Te(this._completion._state===null),(s=this.idbtrans=s||(this.db.core||u).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=yt(function(g){mi(g),l._reject(s.error)}),s.onabort=yt(function(g){mi(g),l.active&&l._reject(new U.Abort(s.error)),l.active=!1,l.on("abort").fire(g)}),s.oncomplete=yt(function(){l.active=!1,l._resolve(),"mutatedParts"in s&&Yn.storagemutated.fire(s.mutatedParts)}),this},xn.prototype._promise=function(s,l,u){var d=this;if(s==="readwrite"&&this.mode!=="readwrite")return At(new U.ReadOnly("Transaction is readonly"));if(!this.active)return At(new U.TransactionInactive);if(this._locked())return new F(function(m,b){d._blockedFuncs.push([function(){d._promise(s,l,u).then(m,b)},H])});if(u)return zn(function(){var m=new F(function(b,w){d._lock();var A=l(b,w,d);A&&A.then&&A.then(b,w)});return m.finally(function(){return d._unlock()}),m._lib=!0,m});var g=new F(function(m,b){var w=l(m,b,d);w&&w.then&&w.then(m,b)});return g._lib=!0,g},xn.prototype._root=function(){return this.parent?this.parent._root():this},xn.prototype.waitFor=function(s){var l,u=this._root(),d=F.resolve(s);u._waitingFor?u._waitingFor=u._waitingFor.then(function(){return d}):(u._waitingFor=d,u._waitingQueue=[],l=u.idbtrans.objectStore(u.storeNames[0]),function m(){for(++u._spinCount;u._waitingQueue.length;)u._waitingQueue.shift()();u._waitingFor&&(l.get(-1/0).onsuccess=m)}());var g=u._waitingFor;return new F(function(m,b){d.then(function(w){return u._waitingQueue.push(yt(m.bind(null,w)))},function(w){return u._waitingQueue.push(yt(b.bind(null,w)))}).finally(function(){u._waitingFor===g&&(u._waitingFor=null)})})},xn.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new U.Abort))},xn.prototype.table=function(s){var l=this._memoizedTables||(this._memoizedTables={});if(v(l,s))return l[s];var u=this.schema[s];if(!u)throw new U.NotFound("Table "+s+" not part of transaction");return u=new this.db.Table(s,u,this),u.core=this.db.core.table(s),l[s]=u},xn);function xn(){}function Zs(s,l,u,d,g,m,b){return{name:s,keyPath:l,unique:u,multi:d,auto:g,compound:m,src:(u&&!b?"&":"")+(d?"*":"")+(g?"++":"")+mu(l)}}function mu(s){return typeof s=="string"?s:s?"["+[].join.call(s,"+")+"]":""}function Js(s,l,u){return{name:s,primKey:l,indexes:u,mappedClass:null,idxByName:(d=function(g){return[g.name,g]},u.reduce(function(g,m,b){return b=d(m,b),b&&(g[b[0]]=b[1]),g},{}))};var d}var yi=function(s){try{return s.only([[]]),yi=function(){return[[]]},[[]]}catch{return yi=function(){return _r},_r}};function ea(s){return s==null?function(){}:typeof s=="string"?(l=s).split(".").length===1?function(u){return u[l]}:function(u){return Z(u,l)}:function(u){return Z(u,s)};var l}function vu(s){return[].slice.call(s)}var Fd=0;function bi(s){return s==null?":id":typeof s=="string"?s:"[".concat(s.join("+"),"]")}function Bd(s,l,A){function d(P){if(P.type===3)return null;if(P.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var E=P.lower,T=P.upper,M=P.lowerOpen,P=P.upperOpen;return E===void 0?T===void 0?null:l.upperBound(T,!!P):T===void 0?l.lowerBound(E,!!M):l.bound(E,T,!!M,!!P)}function g(I){var E,T=I.name;return{name:T,schema:I,mutate:function(M){var P=M.trans,N=M.type,$=M.keys,B=M.values,K=M.range;return new Promise(function(X,ce){X=yt(X);var ie=P.objectStore(T),se=ie.keyPath==null,fe=N==="put"||N==="add";if(!fe&&N!=="delete"&&N!=="deleteRange")throw new Error("Invalid operation type: "+N);var pe,Me=($||B||{length:1}).length;if($&&B&&$.length!==B.length)throw new Error("Given keys array must have same length as given values array.");if(Me===0)return X({numFailures:0,failures:{},results:[],lastResult:void 0});function Ue(Gt){++yn,mi(Gt)}var He=[],Ke=[],yn=0;if(N==="deleteRange"){if(K.type===4)return X({numFailures:yn,failures:Ke,results:[],lastResult:void 0});K.type===3?He.push(pe=ie.clear()):He.push(pe=ie.delete(d(K)))}else{var se=fe?se?[B,$]:[B,null]:[$,null],Ve=se[0],qt=se[1];if(fe)for(var Wt=0;Wt<Me;++Wt)He.push(pe=qt&&qt[Wt]!==void 0?ie[N](Ve[Wt],qt[Wt]):ie[N](Ve[Wt])),pe.onerror=Ue;else for(Wt=0;Wt<Me;++Wt)He.push(pe=ie[N](Ve[Wt])),pe.onerror=Ue}function Lo(Gt){Gt=Gt.target.result,He.forEach(function(Cr,ba){return Cr.error!=null&&(Ke[ba]=Cr.error)}),X({numFailures:yn,failures:Ke,results:N==="delete"?$:He.map(function(Cr){return Cr.result}),lastResult:Gt})}pe.onerror=function(Gt){Ue(Gt),Lo(Gt)},pe.onsuccess=Lo})},getMany:function(M){var P=M.trans,N=M.keys;return new Promise(function($,B){$=yt($);for(var K,X=P.objectStore(T),ce=N.length,ie=new Array(ce),se=0,fe=0,pe=function(He){He=He.target,ie[He._pos]=He.result,++fe===se&&$(ie)},Me=wn(B),Ue=0;Ue<ce;++Ue)N[Ue]!=null&&((K=X.get(N[Ue]))._pos=Ue,K.onsuccess=pe,K.onerror=Me,++se);se===0&&$(ie)})},get:function(M){var P=M.trans,N=M.key;return new Promise(function($,B){$=yt($);var K=P.objectStore(T).get(N);K.onsuccess=function(X){return $(X.target.result)},K.onerror=wn(B)})},query:(E=S,function(M){return new Promise(function(P,N){P=yt(P);var $,B,K,se=M.trans,X=M.values,ce=M.limit,pe=M.query,ie=ce===1/0?void 0:ce,fe=pe.index,pe=pe.range,se=se.objectStore(T),fe=fe.isPrimaryKey?se:se.index(fe.name),pe=d(pe);if(ce===0)return P({result:[]});E?((ie=X?fe.getAll(pe,ie):fe.getAllKeys(pe,ie)).onsuccess=function(Me){return P({result:Me.target.result})},ie.onerror=wn(N)):($=0,B=!X&&"openKeyCursor"in fe?fe.openKeyCursor(pe):fe.openCursor(pe),K=[],B.onsuccess=function(Me){var Ue=B.result;return Ue?(K.push(X?Ue.value:Ue.primaryKey),++$===ce?P({result:K}):void Ue.continue()):P({result:K})},B.onerror=wn(N))})}),openCursor:function(M){var P=M.trans,N=M.values,$=M.query,B=M.reverse,K=M.unique;return new Promise(function(X,ce){X=yt(X);var fe=$.index,ie=$.range,se=P.objectStore(T),se=fe.isPrimaryKey?se:se.index(fe.name),fe=B?K?"prevunique":"prev":K?"nextunique":"next",pe=!N&&"openKeyCursor"in se?se.openKeyCursor(d(ie),fe):se.openCursor(d(ie),fe);pe.onerror=wn(ce),pe.onsuccess=yt(function(Me){var Ue,He,Ke,yn,Ve=pe.result;Ve?(Ve.___id=++Fd,Ve.done=!1,Ue=Ve.continue.bind(Ve),He=(He=Ve.continuePrimaryKey)&&He.bind(Ve),Ke=Ve.advance.bind(Ve),yn=function(){throw new Error("Cursor not stopped")},Ve.trans=P,Ve.stop=Ve.continue=Ve.continuePrimaryKey=Ve.advance=function(){throw new Error("Cursor not started")},Ve.fail=yt(ce),Ve.next=function(){var qt=this,Wt=1;return this.start(function(){return Wt--?qt.continue():qt.stop()}).then(function(){return qt})},Ve.start=function(qt){function Wt(){if(pe.result)try{qt()}catch(Gt){Ve.fail(Gt)}else Ve.done=!0,Ve.start=function(){throw new Error("Cursor behind last entry")},Ve.stop()}var Lo=new Promise(function(Gt,Cr){Gt=yt(Gt),pe.onerror=wn(Cr),Ve.fail=Cr,Ve.stop=function(ba){Ve.stop=Ve.continue=Ve.continuePrimaryKey=Ve.advance=yn,Gt(ba)}});return pe.onsuccess=yt(function(Gt){pe.onsuccess=Wt,Wt()}),Ve.continue=Ue,Ve.continuePrimaryKey=He,Ve.advance=Ke,Wt(),Lo},X(Ve)):X(null)},ce)})},count:function(M){var P=M.query,N=M.trans,$=P.index,B=P.range;return new Promise(function(K,X){var ce=N.objectStore(T),ie=$.isPrimaryKey?ce:ce.index($.name),ce=d(B),ie=ce?ie.count(ce):ie.count();ie.onsuccess=yt(function(se){return K(se.target.result)}),ie.onerror=wn(X)})}}}var m,b,w,R=(b=A,w=vu((m=s).objectStoreNames),{schema:{name:m.name,tables:w.map(function(I){return b.objectStore(I)}).map(function(I){var E=I.keyPath,P=I.autoIncrement,T=c(E),M={},P={name:I.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:E==null,compound:T,keyPath:E,autoIncrement:P,unique:!0,extractKey:ea(E)},indexes:vu(I.indexNames).map(function(N){return I.index(N)}).map(function(K){var $=K.name,B=K.unique,X=K.multiEntry,K=K.keyPath,X={name:$,compound:c(K),keyPath:K,unique:B,multiEntry:X,extractKey:ea(K)};return M[bi(K)]=X}),getIndexByKeyPath:function(N){return M[bi(N)]}};return M[":id"]=P.primaryKey,E!=null&&(M[bi(E)]=P.primaryKey),P})},hasGetAll:0<w.length&&"getAll"in b.objectStore(w[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),A=R.schema,S=R.hasGetAll,R=A.tables.map(g),C={};return R.forEach(function(I){return C[I.name]=I}),{stack:"dbcore",transaction:s.transaction.bind(s),table:function(I){if(!C[I])throw new Error("Table '".concat(I,"' not found"));return C[I]},MIN_KEY:-1/0,MAX_KEY:yi(l),schema:A}}function Ud(s,l,u,d){var g=u.IDBKeyRange;return u.indexedDB,{dbcore:(d=Bd(l,g,d),s.dbcore.reduce(function(m,b){return b=b.create,r(r({},m),b(m))},d))}}function ko(s,d){var u=d.db,d=Ud(s._middlewares,u,s._deps,d);s.core=d.dbcore,s.tables.forEach(function(g){var m=g.name;s.core.schema.tables.some(function(b){return b.name===m})&&(g.core=s.core.table(m),s[m]instanceof s.Table&&(s[m].core=g.core))})}function Co(s,l,u,d){u.forEach(function(g){var m=d[g];l.forEach(function(b){var w=function A(S,R){return ae(S,R)||(S=h(S))&&A(S,R)}(b,g);(!w||"value"in w&&w.value===void 0)&&(b===s.Transaction.prototype||b instanceof s.Transaction?D(b,g,{get:function(){return this.table(g)},set:function(A){k(this,g,{value:A,writable:!0,configurable:!0,enumerable:!0})}}):b[g]=new s.Table(g,m))})})}function ta(s,l){l.forEach(function(u){for(var d in u)u[d]instanceof s.Table&&delete u[d]})}function Kd(s,l){return s._cfg.version-l._cfg.version}function Vd(s,l,u,d){var g=s._dbSchema;u.objectStoreNames.contains("$meta")&&!g.$meta&&(g.$meta=Js("$meta",bu("")[0],[]),s._storeNames.push("$meta"));var m=s._createTransaction("readwrite",s._storeNames,g);m.create(u),m._completion.catch(d);var b=m._reject.bind(m),w=H.transless||H;zn(function(){return H.trans=m,H.transless=w,l!==0?(ko(s,u),S=l,((A=m).storeNames.includes("$meta")?A.table("$meta").get("version").then(function(R){return R??S}):F.resolve(S)).then(function(R){return I=R,E=m,T=u,M=[],R=(C=s)._versions,P=C._dbSchema=Eo(0,C.idbdb,T),(R=R.filter(function(N){return N._cfg.version>=I})).length!==0?(R.forEach(function(N){M.push(function(){var $=P,B=N._cfg.dbschema;Ao(C,$,T),Ao(C,B,T),P=C._dbSchema=B;var K=na($,B);K.add.forEach(function(fe){ra(T,fe[0],fe[1].primKey,fe[1].indexes)}),K.change.forEach(function(fe){if(fe.recreate)throw new U.Upgrade("Not yet support for changing primary key");var pe=T.objectStore(fe.name);fe.add.forEach(function(Me){return So(pe,Me)}),fe.change.forEach(function(Me){pe.deleteIndex(Me.name),So(pe,Me)}),fe.del.forEach(function(Me){return pe.deleteIndex(Me)})});var X=N._cfg.contentUpgrade;if(X&&N._cfg.version>I){ko(C,T),E._memoizedTables={};var ce=ye(B);K.del.forEach(function(fe){ce[fe]=$[fe]}),ta(C,[C.Transaction.prototype]),Co(C,[C.Transaction.prototype],a(ce),ce),E.schema=ce;var ie,se=Bt(X);return se&&Wr(),K=F.follow(function(){var fe;(ie=X(E))&&se&&(fe=Hn.bind(null,null),ie.then(fe,fe))}),ie&&typeof ie.then=="function"?F.resolve(ie):K.then(function(){return ie})}}),M.push(function($){var B,K,X=N._cfg.dbschema;B=X,K=$,[].slice.call(K.db.objectStoreNames).forEach(function(ce){return B[ce]==null&&K.db.deleteObjectStore(ce)}),ta(C,[C.Transaction.prototype]),Co(C,[C.Transaction.prototype],C._storeNames,C._dbSchema),E.schema=C._dbSchema}),M.push(function($){C.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(C.idbdb.version/10)===N._cfg.version?(C.idbdb.deleteObjectStore("$meta"),delete C._dbSchema.$meta,C._storeNames=C._storeNames.filter(function(B){return B!=="$meta"})):$.objectStore("$meta").put(N._cfg.version,"version"))})}),function N(){return M.length?F.resolve(M.shift()(E.idbtrans)).then(N):F.resolve()}().then(function(){yu(P,T)})):F.resolve();var C,I,E,T,M,P}).catch(b)):(a(g).forEach(function(R){ra(u,R,g[R].primKey,g[R].indexes)}),ko(s,u),void F.follow(function(){return s.on.populate.fire(m)}).catch(b));var A,S})}function qd(s,l){yu(s._dbSchema,l),l.db.version%10!=0||l.objectStoreNames.contains("$meta")||l.db.createObjectStore("$meta").add(Math.ceil(l.db.version/10-1),"version");var u=Eo(0,s.idbdb,l);Ao(s,s._dbSchema,l);for(var d=0,g=na(u,s._dbSchema).change;d<g.length;d++){var m=function(b){if(b.change.length||b.recreate)return console.warn("Unable to patch indexes of table ".concat(b.name," because it has changes on the type of index or primary key.")),{value:void 0};var w=l.objectStore(b.name);b.add.forEach(function(A){J&&console.debug("Dexie upgrade patch: Creating missing index ".concat(b.name,".").concat(A.src)),So(w,A)})}(g[d]);if(typeof m=="object")return m.value}}function na(s,l){var u,d={del:[],add:[],change:[]};for(u in s)l[u]||d.del.push(u);for(u in l){var g=s[u],m=l[u];if(g){var b={name:u,def:m,recreate:!1,del:[],add:[],change:[]};if(""+(g.primKey.keyPath||"")!=""+(m.primKey.keyPath||"")||g.primKey.auto!==m.primKey.auto)b.recreate=!0,d.change.push(b);else{var w=g.idxByName,A=m.idxByName,S=void 0;for(S in w)A[S]||b.del.push(S);for(S in A){var R=w[S],C=A[S];R?R.src!==C.src&&b.change.push(C):b.add.push(C)}(0<b.del.length||0<b.add.length||0<b.change.length)&&d.change.push(b)}}else d.add.push([u,m])}return d}function ra(s,l,u,d){var g=s.db.createObjectStore(l,u.keyPath?{keyPath:u.keyPath,autoIncrement:u.auto}:{autoIncrement:u.auto});return d.forEach(function(m){return So(g,m)}),g}function yu(s,l){a(s).forEach(function(u){l.db.objectStoreNames.contains(u)||(J&&console.debug("Dexie: Creating missing table",u),ra(l,u,s[u].primKey,s[u].indexes))})}function So(s,l){s.createIndex(l.name,l.keyPath,{unique:l.unique,multiEntry:l.multi})}function Eo(s,l,u){var d={};return Q(l.objectStoreNames,0).forEach(function(g){for(var m=u.objectStore(g),b=Zs(mu(S=m.keyPath),S||"",!0,!1,!!m.autoIncrement,S&&typeof S!="string",!0),w=[],A=0;A<m.indexNames.length;++A){var R=m.index(m.indexNames[A]),S=R.keyPath,R=Zs(R.name,S,!!R.unique,!!R.multiEntry,!1,S&&typeof S!="string",!1);w.push(R)}d[g]=Js(g,b,w)}),d}function Ao(s,l,u){for(var d=u.db.objectStoreNames,g=0;g<d.length;++g){var m=d[g],b=u.objectStore(m);s._hasGetAll="getAll"in b;for(var w=0;w<b.indexNames.length;++w){var A=b.indexNames[w],S=b.index(A).keyPath,R=typeof S=="string"?S:"["+Q(S).join("+")+"]";!l[m]||(S=l[m].idxByName[R])&&(S.name=A,delete l[m].idxByName[R],l[m].idxByName[A]=S)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&o.WorkerGlobalScope&&o instanceof o.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(s._hasGetAll=!1)}function bu(s){return s.split(",").map(function(l,u){var d=(l=l.trim()).replace(/([&*]|\+\+)/g,""),g=/^\[/.test(d)?d.match(/^\[(.*)\]$/)[1].split("+"):d;return Zs(d,g||null,/\&/.test(l),/\*/.test(l),/\+\+/.test(l),c(g),u===0)})}var Wd=(Po.prototype._parseStoresSpec=function(s,l){a(s).forEach(function(u){if(s[u]!==null){var d=bu(s[u]),g=d.shift();if(g.unique=!0,g.multi)throw new U.Schema("Primary key cannot be multi-valued");d.forEach(function(m){if(m.auto)throw new U.Schema("Only primary key can be marked as autoIncrement (++)");if(!m.keyPath)throw new U.Schema("Index must have a name and cannot be an empty string")}),l[u]=Js(u,g,d)}})},Po.prototype.stores=function(u){var l=this.db;this._cfg.storesSource=this._cfg.storesSource?f(this._cfg.storesSource,u):u;var u=l._versions,d={},g={};return u.forEach(function(m){f(d,m._cfg.storesSource),g=m._cfg.dbschema={},m._parseStoresSpec(d,g)}),l._dbSchema=g,ta(l,[l._allTables,l,l.Transaction.prototype]),Co(l,[l._allTables,l,l.Transaction.prototype,this._cfg.tables],a(g),g),l._storeNames=a(g),this},Po.prototype.upgrade=function(s){return this._cfg.contentUpgrade=te(this._cfg.contentUpgrade||Se,s),this},Po);function Po(){}function ia(s,l){var u=s._dbNamesDB;return u||(u=s._dbNamesDB=new Dn(yo,{addons:[],indexedDB:s,IDBKeyRange:l})).version(1).stores({dbnames:"name"}),u.table("dbnames")}function oa(s){return s&&typeof s.databases=="function"}function sa(s){return zn(function(){return H.letThrough=!0,s()})}function aa(s){return!("from"in s)}var Vt=function(s,l){if(!this){var u=new Vt;return s&&"d"in s&&f(u,s),u}f(this,arguments.length?{d:1,from:s,to:1<arguments.length?l:s}:{d:0})};function _i(s,l,u){var d=nt(l,u);if(!isNaN(d)){if(0<d)throw RangeError();if(aa(s))return f(s,{from:l,to:u,d:1});var g=s.l,d=s.r;if(nt(u,s.from)<0)return g?_i(g,l,u):s.l={from:l,to:u,d:1,l:null,r:null},_u(s);if(0<nt(l,s.to))return d?_i(d,l,u):s.r={from:l,to:u,d:1,l:null,r:null},_u(s);nt(l,s.from)<0&&(s.from=l,s.l=null,s.d=d?d.d+1:1),0<nt(u,s.to)&&(s.to=u,s.r=null,s.d=s.l?s.l.d+1:1),u=!s.r,g&&!s.l&&wi(s,g),d&&u&&wi(s,d)}}function wi(s,l){aa(l)||function u(d,A){var m=A.from,b=A.to,w=A.l,A=A.r;_i(d,m,b),w&&u(d,w),A&&u(d,A)}(s,l)}function To(s,l){var u=la(l),d=u.next();if(d.done)return!1;for(var g=d.value,m=la(s),b=m.next(g.from),w=b.value;!d.done&&!b.done;){if(nt(w.from,g.to)<=0&&0<=nt(w.to,g.from))return!0;nt(g.from,w.from)<0?g=(d=u.next(w.from)).value:w=(b=m.next(g.from)).value}return!1}function la(s){var l=aa(s)?null:{s:0,n:s};return{next:function(u){for(var d=0<arguments.length;l;)switch(l.s){case 0:if(l.s=1,d)for(;l.n.l&&nt(u,l.n.from)<0;)l={up:l,n:l.n.l,s:1};else for(;l.n.l;)l={up:l,n:l.n.l,s:1};case 1:if(l.s=2,!d||nt(u,l.n.to)<=0)return{value:l.n,done:!1};case 2:if(l.n.r){l.s=3,l={up:l,n:l.n.r,s:0};continue}case 3:l=l.up}return{done:!0}}}}function _u(s){var l,u,d=(((l=s.r)===null||l===void 0?void 0:l.d)||0)-(((u=s.l)===null||u===void 0?void 0:u.d)||0),g=1<d?"r":d<-1?"l":"";g&&(l=g=="r"?"l":"r",u=r({},s),d=s[g],s.from=d.from,s.to=d.to,s[g]=d[g],u[g]=d[l],(s[l]=u).d=wu(u)),s.d=wu(s)}function wu(u){var l=u.r,u=u.l;return(l?u?Math.max(l.d,u.d):l.d:u?u.d:0)+1}function Oo(s,l){return a(l).forEach(function(u){s[u]?wi(s[u],l[u]):s[u]=function d(g){var m,b,w={};for(m in g)v(g,m)&&(b=g[m],w[m]=!b||typeof b!="object"||Ge.has(b.constructor)?b:d(b));return w}(l[u])}),s}function ua(s,l){return s.all||l.all||Object.keys(s).some(function(u){return l[u]&&To(l[u],s[u])})}y(Vt.prototype,((un={add:function(s){return wi(this,s),this},addKey:function(s){return _i(this,s,s),this},addKeys:function(s){var l=this;return s.forEach(function(u){return _i(l,u,u)}),this}})[Ze]=function(){return la(this)},un));var xr={},ca={},fa=!1;function Ro(s){Oo(ca,s),fa||(fa=!0,setTimeout(function(){fa=!1,ha(ca,!(ca={}))},0))}function ha(s,l){l===void 0&&(l=!1);var u=new Set;if(s.all)for(var d=0,g=Object.values(xr);d<g.length;d++)xu(b=g[d],s,u,l);else for(var m in s){var b,w=/^idb\:\/\/(.*)\/(.*)\//.exec(m);w&&(m=w[1],w=w[2],(b=xr["idb://".concat(m,"/").concat(w)])&&xu(b,s,u,l))}u.forEach(function(A){return A()})}function xu(s,l,u,d){for(var g=[],m=0,b=Object.entries(s.queries.query);m<b.length;m++){for(var w=b[m],A=w[0],S=[],R=0,C=w[1];R<C.length;R++){var I=C[R];ua(l,I.obsSet)?I.subscribers.forEach(function(P){return u.add(P)}):d&&S.push(I)}d&&g.push([A,S])}if(d)for(var E=0,T=g;E<T.length;E++){var M=T[E],A=M[0],S=M[1];s.queries.query[A]=S}}function zd(s){var l=s._state,u=s._deps.indexedDB;if(l.isBeingOpened||s.idbdb)return l.dbReadyPromise.then(function(){return l.dbOpenError?At(l.dbOpenError):s});l.isBeingOpened=!0,l.dbOpenError=null,l.openComplete=!1;var d=l.openCanceller,g=Math.round(10*s.verno),m=!1;function b(){if(l.openCanceller!==d)throw new U.DatabaseClosed("db.open() was cancelled")}function w(){return new F(function(I,E){if(b(),!u)throw new U.MissingAPI;var T=s.name,M=l.autoSchema||!g?u.open(T):u.open(T,g);if(!M)throw new U.MissingAPI;M.onerror=wn(E),M.onblocked=yt(s._fireOnBlocked),M.onupgradeneeded=yt(function(P){var N;R=M.transaction,l.autoSchema&&!s._options.allowEmptyDB?(M.onerror=mi,R.abort(),M.result.close(),(N=u.deleteDatabase(T)).onsuccess=N.onerror=yt(function(){E(new U.NoSuchDatabase("Database ".concat(T," doesnt exist")))})):(R.onerror=wn(E),P=P.oldVersion>Math.pow(2,62)?0:P.oldVersion,C=P<1,s.idbdb=M.result,m&&qd(s,R),Vd(s,P/10,R,E))},E),M.onsuccess=yt(function(){R=null;var P,N,$,B,K,X=s.idbdb=M.result,ce=Q(X.objectStoreNames);if(0<ce.length)try{var ie=X.transaction((B=ce).length===1?B[0]:B,"readonly");if(l.autoSchema)N=X,$=ie,(P=s).verno=N.version/10,$=P._dbSchema=Eo(0,N,$),P._storeNames=Q(N.objectStoreNames,0),Co(P,[P._allTables],a($),$);else if(Ao(s,s._dbSchema,ie),((K=na(Eo(0,(K=s).idbdb,ie),K._dbSchema)).add.length||K.change.some(function(se){return se.add.length||se.change.length}))&&!m)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),X.close(),g=X.version+1,m=!0,I(w());ko(s,ie)}catch{}zr.push(s),X.onversionchange=yt(function(se){l.vcFired=!0,s.on("versionchange").fire(se)}),X.onclose=yt(function(se){s.on("close").fire(se)}),C&&(K=s._deps,ie=T,X=K.indexedDB,K=K.IDBKeyRange,oa(X)||ie===yo||ia(X,K).put({name:ie}).catch(Se)),I()},E)}).catch(function(I){switch(I?.name){case"UnknownError":if(0<l.PR1398_maxLoop)return l.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),w();break;case"VersionError":if(0<g)return g=0,w()}return F.reject(I)})}var A,S=l.dbReadyResolve,R=null,C=!1;return F.race([d,(typeof navigator>"u"?F.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(I){function E(){return indexedDB.databases().finally(I)}A=setInterval(E,100),E()}).finally(function(){return clearInterval(A)}):Promise.resolve()).then(w)]).then(function(){return b(),l.onReadyBeingFired=[],F.resolve(sa(function(){return s.on.ready.fire(s.vip)})).then(function I(){if(0<l.onReadyBeingFired.length){var E=l.onReadyBeingFired.reduce(te,Se);return l.onReadyBeingFired=[],F.resolve(sa(function(){return E(s.vip)})).then(I)}})}).finally(function(){l.openCanceller===d&&(l.onReadyBeingFired=null,l.isBeingOpened=!1)}).catch(function(I){l.dbOpenError=I;try{R&&R.abort()}catch{}return d===l.openCanceller&&s._close(),At(I)}).finally(function(){l.openComplete=!0,S()}).then(function(){var I;return C&&(I={},s.tables.forEach(function(E){E.schema.indexes.forEach(function(T){T.name&&(I["idb://".concat(s.name,"/").concat(E.name,"/").concat(T.name)]=new Vt(-1/0,[[[]]]))}),I["idb://".concat(s.name,"/").concat(E.name,"/")]=I["idb://".concat(s.name,"/").concat(E.name,"/:dels")]=new Vt(-1/0,[[[]]])}),Yn(vi).fire(I),ha(I,!0)),s})}function da(s){function l(m){return s.next(m)}var u=g(l),d=g(function(m){return s.throw(m)});function g(m){return function(A){var w=m(A),A=w.value;return w.done?A:A&&typeof A.then=="function"?A.then(u,d):c(A)?Promise.all(A).then(u,d):u(A)}}return g(l)()}function Io(s,l,u){for(var d=c(s)?s.slice():[s],g=0;g<u;++g)d.push(l);return d}var Hd={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(s){return r(r({},s),{table:function(l){var u=s.table(l),d=u.schema,g={},m=[];function b(C,I,E){var T=bi(C),M=g[T]=g[T]||[],P=C==null?0:typeof C=="string"?1:C.length,N=0<I,N=r(r({},E),{name:N?"".concat(T,"(virtual-from:").concat(E.name,")"):E.name,lowLevelIndex:E,isVirtual:N,keyTail:I,keyLength:P,extractKey:ea(C),unique:!N&&E.unique});return M.push(N),N.isPrimaryKey||m.push(N),1<P&&b(P===2?C[0]:C.slice(0,P-1),I+1,E),M.sort(function($,B){return $.keyTail-B.keyTail}),N}l=b(d.primaryKey.keyPath,0,d.primaryKey),g[":id"]=[l];for(var w=0,A=d.indexes;w<A.length;w++){var S=A[w];b(S.keyPath,0,S)}function R(C){var I,E=C.query.index;return E.isVirtual?r(r({},C),{query:{index:E.lowLevelIndex,range:(I=C.query.range,E=E.keyTail,{type:I.type===1?2:I.type,lower:Io(I.lower,I.lowerOpen?s.MAX_KEY:s.MIN_KEY,E),lowerOpen:!0,upper:Io(I.upper,I.upperOpen?s.MIN_KEY:s.MAX_KEY,E),upperOpen:!0})}}):C}return r(r({},u),{schema:r(r({},d),{primaryKey:l,indexes:m,getIndexByKeyPath:function(C){return(C=g[bi(C)])&&C[0]}}),count:function(C){return u.count(R(C))},query:function(C){return u.query(R(C))},openCursor:function(C){var I=C.query.index,E=I.keyTail,T=I.isVirtual,M=I.keyLength;return T?u.openCursor(R(C)).then(function(N){return N&&P(N)}):u.openCursor(C);function P(N){return Object.create(N,{continue:{value:function($){$!=null?N.continue(Io($,C.reverse?s.MAX_KEY:s.MIN_KEY,E)):C.unique?N.continue(N.key.slice(0,M).concat(C.reverse?s.MIN_KEY:s.MAX_KEY,E)):N.continue()}},continuePrimaryKey:{value:function($,B){N.continuePrimaryKey(Io($,s.MAX_KEY,E),B)}},primaryKey:{get:function(){return N.primaryKey}},key:{get:function(){var $=N.key;return M===1?$[0]:$.slice(0,M)}},value:{get:function(){return N.value}}})}}})}})}};function pa(s,l,u,d){return u=u||{},d=d||"",a(s).forEach(function(g){var m,b,w;v(l,g)?(m=s[g],b=l[g],typeof m=="object"&&typeof b=="object"&&m&&b?(w=Ct(m))!==Ct(b)?u[d+g]=l[g]:w==="Object"?pa(m,b,u,d+g+"."):m!==b&&(u[d+g]=l[g]):m!==b&&(u[d+g]=l[g])):u[d+g]=void 0}),a(l).forEach(function(g){v(s,g)||(u[d+g]=l[g])}),u}function ga(s,l){return l.type==="delete"?l.keys:l.keys||l.values.map(s.extractKey)}var Gd={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(s){return r(r({},s),{table:function(l){var u=s.table(l),d=u.schema.primaryKey;return r(r({},u),{mutate:function(g){var m=H.trans,b=m.table(l).hook,w=b.deleting,A=b.creating,S=b.updating;switch(g.type){case"add":if(A.fire===Se)break;return m._promise("readwrite",function(){return R(g)},!0);case"put":if(A.fire===Se&&S.fire===Se)break;return m._promise("readwrite",function(){return R(g)},!0);case"delete":if(w.fire===Se)break;return m._promise("readwrite",function(){return R(g)},!0);case"deleteRange":if(w.fire===Se)break;return m._promise("readwrite",function(){return function C(I,E,T){return u.query({trans:I,values:!1,query:{index:d,range:E},limit:T}).then(function(M){var P=M.result;return R({type:"delete",keys:P,trans:I}).then(function(N){return 0<N.numFailures?Promise.reject(N.failures[0]):P.length<T?{failures:[],numFailures:0,lastResult:void 0}:C(I,r(r({},E),{lower:P[P.length-1],lowerOpen:!0}),T)})})}(g.trans,g.range,1e4)},!0)}return u.mutate(g);function R(C){var I,E,T,M=H.trans,P=C.keys||ga(d,C);if(!P)throw new Error("Keys missing");return(C=C.type==="add"||C.type==="put"?r(r({},C),{keys:P}):r({},C)).type!=="delete"&&(C.values=i([],C.values)),C.keys&&(C.keys=i([],C.keys)),I=u,T=P,((E=C).type==="add"?Promise.resolve([]):I.getMany({trans:E.trans,keys:T,cache:"immutable"})).then(function(N){var $=P.map(function(B,K){var X,ce,ie,se=N[K],fe={onerror:null,onsuccess:null};return C.type==="delete"?w.fire.call(fe,B,se,M):C.type==="add"||se===void 0?(X=A.fire.call(fe,B,C.values[K],M),B==null&&X!=null&&(C.keys[K]=B=X,d.outbound||Ce(C.values[K],d.keyPath,B))):(X=pa(se,C.values[K]),(ce=S.fire.call(fe,X,B,se,M))&&(ie=C.values[K],Object.keys(ce).forEach(function(pe){v(ie,pe)?ie[pe]=ce[pe]:Ce(ie,pe,ce[pe])}))),fe});return u.mutate(C).then(function(B){for(var K=B.failures,X=B.results,ce=B.numFailures,B=B.lastResult,ie=0;ie<P.length;++ie){var se=(X||P)[ie],fe=$[ie];se==null?fe.onerror&&fe.onerror(K[ie]):fe.onsuccess&&fe.onsuccess(C.type==="put"&&N[ie]?C.values[ie]:se)}return{failures:K,results:X,numFailures:ce,lastResult:B}}).catch(function(B){return $.forEach(function(K){return K.onerror&&K.onerror(B)}),Promise.reject(B)})})}}})}})}};function ku(s,l,u){try{if(!l||l.keys.length<s.length)return null;for(var d=[],g=0,m=0;g<l.keys.length&&m<s.length;++g)nt(l.keys[g],s[m])===0&&(d.push(u?Le(l.values[g]):l.values[g]),++m);return d.length===s.length?d:null}catch{return null}}var Xd={stack:"dbcore",level:-1,create:function(s){return{table:function(l){var u=s.table(l);return r(r({},u),{getMany:function(d){if(!d.cache)return u.getMany(d);var g=ku(d.keys,d.trans._cache,d.cache==="clone");return g?F.resolve(g):u.getMany(d).then(function(m){return d.trans._cache={keys:d.keys,values:d.cache==="clone"?Le(m):m},m})},mutate:function(d){return d.type!=="add"&&(d.trans._cache=null),u.mutate(d)}})}}}};function Cu(s,l){return s.trans.mode==="readonly"&&!!s.subscr&&!s.trans.explicit&&s.trans.db._options.cache!=="disabled"&&!l.schema.primaryKey.outbound}function Su(s,l){switch(s){case"query":return l.values&&!l.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var Yd={stack:"dbcore",level:0,name:"Observability",create:function(s){var l=s.schema.name,u=new Vt(s.MIN_KEY,s.MAX_KEY);return r(r({},s),{transaction:function(d,g,m){if(H.subscr&&g!=="readonly")throw new U.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(H.querier));return s.transaction(d,g,m)},table:function(d){var g=s.table(d),m=g.schema,b=m.primaryKey,C=m.indexes,w=b.extractKey,A=b.outbound,S=b.autoIncrement&&C.filter(function(E){return E.compound&&E.keyPath.includes(b.keyPath)}),R=r(r({},g),{mutate:function(E){function T(pe){return pe="idb://".concat(l,"/").concat(d,"/").concat(pe),B[pe]||(B[pe]=new Vt)}var M,P,N,$=E.trans,B=E.mutatedParts||(E.mutatedParts={}),K=T(""),X=T(":dels"),ce=E.type,fe=E.type==="deleteRange"?[E.range]:E.type==="delete"?[E.keys]:E.values.length<50?[ga(b,E).filter(function(pe){return pe}),E.values]:[],ie=fe[0],se=fe[1],fe=E.trans._cache;return c(ie)?(K.addKeys(ie),(fe=ce==="delete"||ie.length===se.length?ku(ie,fe):null)||X.addKeys(ie),(fe||se)&&(M=T,P=fe,N=se,m.indexes.forEach(function(pe){var Me=M(pe.name||"");function Ue(Ke){return Ke!=null?pe.extractKey(Ke):null}function He(Ke){return pe.multiEntry&&c(Ke)?Ke.forEach(function(yn){return Me.addKey(yn)}):Me.addKey(Ke)}(P||N).forEach(function(Ke,qt){var Ve=P&&Ue(P[qt]),qt=N&&Ue(N[qt]);nt(Ve,qt)!==0&&(Ve!=null&&He(Ve),qt!=null&&He(qt))})}))):ie?(se={from:ie.lower,to:ie.upper},X.add(se),K.add(se)):(K.add(u),X.add(u),m.indexes.forEach(function(pe){return T(pe.name).add(u)})),g.mutate(E).then(function(pe){return!ie||E.type!=="add"&&E.type!=="put"||(K.addKeys(pe.results),S&&S.forEach(function(Me){var Ue=E.values.map(function(Ke){return Me.extractKey(Ke)}),He=Me.keyPath.findIndex(function(Ke){return Ke===b.keyPath});pe.results.forEach(function(Ke){return Ue[He]=Ke}),T(Me.name).addKeys(Ue)})),$.mutatedParts=Oo($.mutatedParts||{},B),pe})}}),C=function(T){var M=T.query,T=M.index,M=M.range;return[T,new Vt((T=M.lower)!==null&&T!==void 0?T:s.MIN_KEY,(M=M.upper)!==null&&M!==void 0?M:s.MAX_KEY)]},I={get:function(E){return[b,new Vt(E.key)]},getMany:function(E){return[b,new Vt().addKeys(E.keys)]},count:C,query:C,openCursor:C};return a(I).forEach(function(E){R[E]=function(T){var M=H.subscr,P=!!M,N=Cu(H,g)&&Su(E,T)?T.obsSet={}:M;if(P){var $=function(se){return se="idb://".concat(l,"/").concat(d,"/").concat(se),N[se]||(N[se]=new Vt)},B=$(""),K=$(":dels"),M=I[E](T),P=M[0],M=M[1];if((E==="query"&&P.isPrimaryKey&&!T.values?K:$(P.name||"")).add(M),!P.isPrimaryKey){if(E!=="count"){var X=E==="query"&&A&&T.values&&g.query(r(r({},T),{values:!1}));return g[E].apply(this,arguments).then(function(se){if(E==="query"){if(A&&T.values)return X.then(function(Ue){return Ue=Ue.result,B.addKeys(Ue),se});var fe=T.values?se.result.map(w):se.result;(T.values?B:K).addKeys(fe)}else if(E==="openCursor"){var pe=se,Me=T.values;return pe&&Object.create(pe,{key:{get:function(){return K.addKey(pe.primaryKey),pe.key}},primaryKey:{get:function(){var Ue=pe.primaryKey;return K.addKey(Ue),Ue}},value:{get:function(){return Me&&B.addKey(pe.primaryKey),pe.value}}})}return se})}K.add(u)}}return g[E].apply(this,arguments)}}),R}})}};function Eu(s,l,u){if(u.numFailures===0)return l;if(l.type==="deleteRange")return null;var d=l.keys?l.keys.length:"values"in l&&l.values?l.values.length:1;return u.numFailures===d?null:(l=r({},l),c(l.keys)&&(l.keys=l.keys.filter(function(g,m){return!(m in u.failures)})),"values"in l&&c(l.values)&&(l.values=l.values.filter(function(g,m){return!(m in u.failures)})),l)}function ma(s,l){return u=s,((d=l).lower===void 0||(d.lowerOpen?0<nt(u,d.lower):0<=nt(u,d.lower)))&&(s=s,(l=l).upper===void 0||(l.upperOpen?nt(s,l.upper)<0:nt(s,l.upper)<=0));var u,d}function Au(s,l,I,d,g,m){if(!I||I.length===0)return s;var b=l.query.index,w=b.multiEntry,A=l.query.range,S=d.schema.primaryKey.extractKey,R=b.extractKey,C=(b.lowLevelIndex||b).extractKey,I=I.reduce(function(E,T){var M=E,P=T.type==="add"||T.type==="put"?T.values.filter(function(K){return K=R(K),w&&c(K)?K.some(function(X){return ma(X,A)}):ma(K,A)}).map(function(K){return K=Le(K),m&&Object.freeze(K),K}):[];switch(T.type){case"add":M=E.concat(l.values?P:P.map(function(X){return S(X)}));break;case"put":var N=new Vt().addKeys(T.values.map(function(X){return S(X)})),M=E.filter(function(X){return X=l.values?S(X):X,!To(new Vt(X),N)}).concat(l.values?P:P.map(function(X){return S(X)}));break;case"delete":var $=new Vt().addKeys(T.keys);M=E.filter(function(X){return X=l.values?S(X):X,!To(new Vt(X),$)});break;case"deleteRange":var B=T.range;M=E.filter(function(X){return!ma(S(X),B)})}return M},s);return I===s?s:(I.sort(function(E,T){return nt(C(E),C(T))||nt(S(E),S(T))}),l.limit&&l.limit<1/0&&(I.length>l.limit?I.length=l.limit:s.length===l.limit&&I.length<l.limit&&(g.dirty=!0)),m?Object.freeze(I):I)}function Pu(s,l){return nt(s.lower,l.lower)===0&&nt(s.upper,l.upper)===0&&!!s.lowerOpen==!!l.lowerOpen&&!!s.upperOpen==!!l.upperOpen}function Qd(s,l){return function(u,d,g,m){if(u===void 0)return d!==void 0?-1:0;if(d===void 0)return 1;if((d=nt(u,d))===0){if(g&&m)return 0;if(g)return 1;if(m)return-1}return d}(s.lower,l.lower,s.lowerOpen,l.lowerOpen)<=0&&0<=function(u,d,g,m){if(u===void 0)return d!==void 0?1:0;if(d===void 0)return-1;if((d=nt(u,d))===0){if(g&&m)return 0;if(g)return-1;if(m)return 1}return d}(s.upper,l.upper,s.upperOpen,l.upperOpen)}function Zd(s,l,u,d){s.subscribers.add(u),d.addEventListener("abort",function(){var g,m;s.subscribers.delete(u),s.subscribers.size===0&&(g=s,m=l,setTimeout(function(){g.subscribers.size===0&&Fe(m,g)},3e3))})}var Jd={stack:"dbcore",level:0,name:"Cache",create:function(s){var l=s.schema.name;return r(r({},s),{transaction:function(u,d,g){var m,b,w=s.transaction(u,d,g);return d==="readwrite"&&(b=(m=new AbortController).signal,g=function(A){return function(){if(m.abort(),d==="readwrite"){for(var S=new Set,R=0,C=u;R<C.length;R++){var I=C[R],E=xr["idb://".concat(l,"/").concat(I)];if(E){var T=s.table(I),M=E.optimisticOps.filter(function(Me){return Me.trans===w});if(w._explicit&&A&&w.mutatedParts)for(var P=0,N=Object.values(E.queries.query);P<N.length;P++)for(var $=0,B=(ce=N[P]).slice();$<B.length;$++)ua((ie=B[$]).obsSet,w.mutatedParts)&&(Fe(ce,ie),ie.subscribers.forEach(function(Me){return S.add(Me)}));else if(0<M.length){E.optimisticOps=E.optimisticOps.filter(function(Me){return Me.trans!==w});for(var K=0,X=Object.values(E.queries.query);K<X.length;K++)for(var ce,ie,se,fe=0,pe=(ce=X[K]).slice();fe<pe.length;fe++)(ie=pe[fe]).res!=null&&w.mutatedParts&&(A&&!ie.dirty?(se=Object.isFrozen(ie.res),se=Au(ie.res,ie.req,M,T,ie,se),ie.dirty?(Fe(ce,ie),ie.subscribers.forEach(function(Me){return S.add(Me)})):se!==ie.res&&(ie.res=se,ie.promise=F.resolve({result:se}))):(ie.dirty&&Fe(ce,ie),ie.subscribers.forEach(function(Me){return S.add(Me)})))}}}S.forEach(function(Me){return Me()})}}},w.addEventListener("abort",g(!1),{signal:b}),w.addEventListener("error",g(!1),{signal:b}),w.addEventListener("complete",g(!0),{signal:b})),w},table:function(u){var d=s.table(u),g=d.schema.primaryKey;return r(r({},d),{mutate:function(m){var b=H.trans;if(g.outbound||b.db._options.cache==="disabled"||b.explicit)return d.mutate(m);var w=xr["idb://".concat(l,"/").concat(u)];return w?(b=d.mutate(m),m.type!=="add"&&m.type!=="put"||!(50<=m.values.length||ga(g,m).some(function(A){return A==null}))?(w.optimisticOps.push(m),m.mutatedParts&&Ro(m.mutatedParts),b.then(function(A){0<A.numFailures&&(Fe(w.optimisticOps,m),(A=Eu(0,m,A))&&w.optimisticOps.push(A),m.mutatedParts&&Ro(m.mutatedParts))}),b.catch(function(){Fe(w.optimisticOps,m),m.mutatedParts&&Ro(m.mutatedParts)})):b.then(function(A){var S=Eu(0,r(r({},m),{values:m.values.map(function(E,C){var I,E=(I=g.keyPath)!==null&&I!==void 0&&I.includes(".")?Le(E):r({},E);return Ce(E,g.keyPath,A.results[C]),E})}),A);w.optimisticOps.push(S),queueMicrotask(function(){return m.mutatedParts&&Ro(m.mutatedParts)})}),b):d.mutate(m)},query:function(m){if(!Cu(H,d)||!Su("query",m))return d.query(m);var b=((S=H.trans)===null||S===void 0?void 0:S.db._options.cache)==="immutable",C=H,w=C.requery,A=C.signal,S=function(T,M,P,N){var $=xr["idb://".concat(T,"/").concat(M)];if(!$)return[];if(!(M=$.queries[P]))return[null,!1,$,null];var B=M[(N.query?N.query.index.name:null)||""];if(!B)return[null,!1,$,null];switch(P){case"query":var K=B.find(function(X){return X.req.limit===N.limit&&X.req.values===N.values&&Pu(X.req.query.range,N.query.range)});return K?[K,!0,$,B]:[B.find(function(X){return("limit"in X.req?X.req.limit:1/0)>=N.limit&&(!N.values||X.req.values)&&Qd(X.req.query.range,N.query.range)}),!1,$,B];case"count":return K=B.find(function(X){return Pu(X.req.query.range,N.query.range)}),[K,!!K,$,B]}}(l,u,"query",m),R=S[0],C=S[1],I=S[2],E=S[3];return R&&C?R.obsSet=m.obsSet:(C=d.query(m).then(function(T){var M=T.result;if(R&&(R.res=M),b){for(var P=0,N=M.length;P<N;++P)Object.freeze(M[P]);Object.freeze(M)}else T.result=Le(M);return T}).catch(function(T){return E&&R&&Fe(E,R),Promise.reject(T)}),R={obsSet:m.obsSet,promise:C,subscribers:new Set,type:"query",req:m,dirty:!1},E?E.push(R):(E=[R],(I=I||(xr["idb://".concat(l,"/").concat(u)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[m.query.index.name||""]=E)),Zd(R,E,w,A),R.promise.then(function(T){return{result:Au(T.result,m,I?.optimisticOps,d,R,b)}})}})}})}};function Mo(s,l){return new Proxy(s,{get:function(u,d,g){return d==="db"?l:Reflect.get(u,d,g)}})}var Dn=(Pt.prototype.version=function(s){if(isNaN(s)||s<.1)throw new U.Type("Given version is not a positive number");if(s=Math.round(10*s)/10,this.idbdb||this._state.isBeingOpened)throw new U.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,s);var l=this._versions,u=l.filter(function(d){return d._cfg.version===s})[0];return u||(u=new this.Version(s),l.push(u),l.sort(Kd),u.stores({}),this._state.autoSchema=!1,u)},Pt.prototype._whenReady=function(s){var l=this;return this.idbdb&&(this._state.openComplete||H.letThrough||this._vip)?s():new F(function(u,d){if(l._state.openComplete)return d(new U.DatabaseClosed(l._state.dbOpenError));if(!l._state.isBeingOpened){if(!l._state.autoOpen)return void d(new U.DatabaseClosed);l.open().catch(Se)}l._state.dbReadyPromise.then(u,d)}).then(s)},Pt.prototype.use=function(s){var l=s.stack,u=s.create,d=s.level,g=s.name;return g&&this.unuse({stack:l,name:g}),s=this._middlewares[l]||(this._middlewares[l]=[]),s.push({stack:l,create:u,level:d??10,name:g}),s.sort(function(m,b){return m.level-b.level}),this},Pt.prototype.unuse=function(s){var l=s.stack,u=s.name,d=s.create;return l&&this._middlewares[l]&&(this._middlewares[l]=this._middlewares[l].filter(function(g){return d?g.create!==d:!!u&&g.name!==u})),this},Pt.prototype.open=function(){var s=this;return br(ee,function(){return zd(s)})},Pt.prototype._close=function(){var s=this._state,l=zr.indexOf(this);if(0<=l&&zr.splice(l,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}s.isBeingOpened||(s.dbReadyPromise=new F(function(u){s.dbReadyResolve=u}),s.openCanceller=new F(function(u,d){s.cancelOpen=d}))},Pt.prototype.close=function(u){var l=(u===void 0?{disableAutoOpen:!0}:u).disableAutoOpen,u=this._state;l?(u.isBeingOpened&&u.cancelOpen(new U.DatabaseClosed),this._close(),u.autoOpen=!1,u.dbOpenError=new U.DatabaseClosed):(this._close(),u.autoOpen=this._options.autoOpen||u.isBeingOpened,u.openComplete=!1,u.dbOpenError=null)},Pt.prototype.delete=function(s){var l=this;s===void 0&&(s={disableAutoOpen:!0});var u=0<arguments.length&&typeof arguments[0]!="object",d=this._state;return new F(function(g,m){function b(){l.close(s);var w=l._deps.indexedDB.deleteDatabase(l.name);w.onsuccess=yt(function(){var A,S,R;A=l._deps,S=l.name,R=A.indexedDB,A=A.IDBKeyRange,oa(R)||S===yo||ia(R,A).delete(S).catch(Se),g()}),w.onerror=wn(m),w.onblocked=l._fireOnBlocked}if(u)throw new U.InvalidArgument("Invalid closeOptions argument to db.delete()");d.isBeingOpened?d.dbReadyPromise.then(b):b()})},Pt.prototype.backendDB=function(){return this.idbdb},Pt.prototype.isOpen=function(){return this.idbdb!==null},Pt.prototype.hasBeenClosed=function(){var s=this._state.dbOpenError;return s&&s.name==="DatabaseClosed"},Pt.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Pt.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Pt.prototype,"tables",{get:function(){var s=this;return a(this._allTables).map(function(l){return s._allTables[l]})},enumerable:!1,configurable:!0}),Pt.prototype.transaction=function(){var s=function(l,u,d){var g=arguments.length;if(g<2)throw new U.InvalidArgument("Too few arguments");for(var m=new Array(g-1);--g;)m[g-1]=arguments[g];return d=m.pop(),[l,Ie(m),d]}.apply(this,arguments);return this._transaction.apply(this,s)},Pt.prototype._transaction=function(s,l,u){var d=this,g=H.trans;g&&g.db===this&&s.indexOf("!")===-1||(g=null);var m,b,w=s.indexOf("?")!==-1;s=s.replace("!","").replace("?","");try{if(b=l.map(function(S){if(S=S instanceof d.Table?S.name:S,typeof S!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return S}),s=="r"||s===Ws)m=Ws;else{if(s!="rw"&&s!=zs)throw new U.InvalidArgument("Invalid transaction mode: "+s);m=zs}if(g){if(g.mode===Ws&&m===zs){if(!w)throw new U.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");g=null}g&&b.forEach(function(S){if(g&&g.storeNames.indexOf(S)===-1){if(!w)throw new U.SubTransaction("Table "+S+" not included in parent transaction.");g=null}}),w&&g&&!g.active&&(g=null)}}catch(S){return g?g._promise(null,function(R,C){C(S)}):At(S)}var A=function S(R,C,I,E,T){return F.resolve().then(function(){var M=H.transless||H,P=R._createTransaction(C,I,R._dbSchema,E);if(P.explicit=!0,M={trans:P,transless:M},E)P.idbtrans=E.idbtrans;else try{P.create(),P.idbtrans._explicit=!0,R._state.PR1398_maxLoop=3}catch(B){return B.name===W.InvalidState&&R.isOpen()&&0<--R._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),R.close({disableAutoOpen:!1}),R.open().then(function(){return S(R,C,I,null,T)})):At(B)}var N,$=Bt(T);return $&&Wr(),M=F.follow(function(){var B;(N=T.call(P,P))&&($?(B=Hn.bind(null,null),N.then(B,B)):typeof N.next=="function"&&typeof N.throw=="function"&&(N=da(N)))},M),(N&&typeof N.then=="function"?F.resolve(N).then(function(B){return P.active?B:At(new U.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):M.then(function(){return N})).then(function(B){return E&&P._resolve(),P._completion.then(function(){return B})}).catch(function(B){return P._reject(B),At(B)})})}.bind(null,this,m,b,g,u);return g?g._promise(m,A,"lock"):H.trans?br(H.transless,function(){return d._whenReady(A)}):this._whenReady(A)},Pt.prototype.table=function(s){if(!v(this._allTables,s))throw new U.InvalidTable("Table ".concat(s," does not exist"));return this._allTables[s]},Pt);function Pt(s,l){var u=this;this._middlewares={},this.verno=0;var d=Pt.dependencies;this._options=l=r({addons:Pt.addons,autoOpen:!0,indexedDB:d.indexedDB,IDBKeyRange:d.IDBKeyRange,cache:"cloned"},l),this._deps={indexedDB:l.indexedDB,IDBKeyRange:l.IDBKeyRange},d=l.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var g,m,b,w,A,S={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Se,dbReadyPromise:null,cancelOpen:Se,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:l.autoOpen};S.dbReadyPromise=new F(function(C){S.dbReadyResolve=C}),S.openCanceller=new F(function(C,I){S.cancelOpen=I}),this._state=S,this.name=s,this.on=pi(this,"populate","blocked","versionchange","close",{ready:[te,Se]}),this.on.ready.subscribe=_e(this.on.ready.subscribe,function(C){return function(I,E){Pt.vip(function(){var T,M=u._state;M.openComplete?(M.dbOpenError||F.resolve().then(I),E&&C(I)):M.onReadyBeingFired?(M.onReadyBeingFired.push(I),E&&C(I)):(C(I),T=u,E||C(function P(){T.on.ready.unsubscribe(I),T.on.ready.unsubscribe(P)}))})}}),this.Collection=(g=this,gi(Ld.prototype,function(N,P){this.db=g;var E=su,T=null;if(P)try{E=P()}catch($){T=$}var M=N._ctx,P=M.table,N=P.hook.reading.fire;this._ctx={table:P,index:M.index,isPrimKey:!M.index||P.schema.primKey.keyPath&&M.index===P.schema.primKey.name,range:E,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:T,or:M.or,valueMapper:N!==_?N:null}})),this.Table=(m=this,gi(cu.prototype,function(C,I,E){this.db=m,this._tx=E,this.name=C,this.schema=I,this.hook=m._allTables[C]?m._allTables[C].hook:pi(null,{creating:[G,Se],reading:[x,_],updating:[ne,Se],deleting:[q,Se]})})),this.Transaction=(b=this,gi($d.prototype,function(C,I,E,T,M){var P=this;this.db=b,this.mode=C,this.storeNames=I,this.schema=E,this.chromeTransactionDurability=T,this.idbtrans=null,this.on=pi(this,"complete","error","abort"),this.parent=M||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new F(function(N,$){P._resolve=N,P._reject=$}),this._completion.then(function(){P.active=!1,P.on.complete.fire()},function(N){var $=P.active;return P.active=!1,P.on.error.fire(N),P.parent?P.parent._reject(N):$&&P.idbtrans&&P.idbtrans.abort(),At(N)})})),this.Version=(w=this,gi(Wd.prototype,function(C){this.db=w,this._cfg={version:C,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(A=this,gi(gu.prototype,function(C,I,E){if(this.db=A,this._ctx={table:C,index:I===":id"?null:I,or:E},this._cmp=this._ascending=nt,this._descending=function(T,M){return nt(M,T)},this._max=function(T,M){return 0<nt(T,M)?T:M},this._min=function(T,M){return nt(T,M)<0?T:M},this._IDBKeyRange=A._deps.IDBKeyRange,!this._IDBKeyRange)throw new U.MissingAPI})),this.on("versionchange",function(C){0<C.newVersion?console.warn("Another connection wants to upgrade database '".concat(u.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(u.name,"'. Closing db now to resume the delete request.")),u.close({disableAutoOpen:!1})}),this.on("blocked",function(C){!C.newVersion||C.newVersion<C.oldVersion?console.warn("Dexie.delete('".concat(u.name,"') was blocked")):console.warn("Upgrade '".concat(u.name,"' blocked by other connection holding version ").concat(C.oldVersion/10))}),this._maxKey=yi(l.IDBKeyRange),this._createTransaction=function(C,I,E,T){return new u.Transaction(C,I,E,u._options.chromeTransactionDurability,T)},this._fireOnBlocked=function(C){u.on("blocked").fire(C),zr.filter(function(I){return I.name===u.name&&I!==u&&!I._state.vcFired}).map(function(I){return I.on("versionchange").fire(C)})},this.use(Xd),this.use(Jd),this.use(Yd),this.use(Hd),this.use(Gd);var R=new Proxy(this,{get:function(C,I,E){if(I==="_vip")return!0;if(I==="table")return function(M){return Mo(u.table(M),R)};var T=Reflect.get(C,I,E);return T instanceof cu?Mo(T,R):I==="tables"?T.map(function(M){return Mo(M,R)}):I==="_createTransaction"?function(){return Mo(T.apply(this,arguments),R)}:T}});this.vip=R,d.forEach(function(C){return C(u)})}var Do,un=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",ep=(va.prototype.subscribe=function(s,l,u){return this._subscribe(s&&typeof s!="function"?s:{next:s,error:l,complete:u})},va.prototype[un]=function(){return this},va);function va(s){this._subscribe=s}try{Do={indexedDB:o.indexedDB||o.mozIndexedDB||o.webkitIndexedDB||o.msIndexedDB,IDBKeyRange:o.IDBKeyRange||o.webkitIDBKeyRange}}catch{Do={indexedDB:null,IDBKeyRange:null}}function Tu(s){var l,u=!1,d=new ep(function(g){var m=Bt(s),b,w=!1,A={},S={},R={get closed(){return w},unsubscribe:function(){w||(w=!0,b&&b.abort(),C&&Yn.storagemutated.unsubscribe(E))}};g.start&&g.start(R);var C=!1,I=function(){return qs(T)},E=function(M){Oo(A,M),ua(S,A)&&I()},T=function(){var M,P,N;!w&&Do.indexedDB&&(A={},M={},b&&b.abort(),b=new AbortController,N=function($){var B=Rn();try{m&&Wr();var K=zn(s,$);return K=m?K.finally(Hn):K}finally{B&&Wn()}}(P={subscr:M,signal:b.signal,requery:I,querier:s,trans:null}),Promise.resolve(N).then(function($){u=!0,l=$,w||P.signal.aborted||(A={},function(B){for(var K in B)if(v(B,K))return;return 1}(S=M)||C||(Yn(vi,E),C=!0),qs(function(){return!w&&g.next&&g.next($)}))},function($){u=!1,["DatabaseClosedError","AbortError"].includes($?.name)||w||qs(function(){w||g.error&&g.error($)})}))};return setTimeout(I,0),R});return d.hasValue=function(){return u},d.getValue=function(){return l},d}var kr=Dn;function ya(s){var l=Qn;try{Qn=!0,Yn.storagemutated.fire(s),ha(s,!0)}finally{Qn=l}}y(kr,r(r({},Xe),{delete:function(s){return new kr(s,{addons:[]}).delete()},exists:function(s){return new kr(s,{addons:[]}).open().then(function(l){return l.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(s){try{return l=kr.dependencies,u=l.indexedDB,l=l.IDBKeyRange,(oa(u)?Promise.resolve(u.databases()).then(function(d){return d.map(function(g){return g.name}).filter(function(g){return g!==yo})}):ia(u,l).toCollection().primaryKeys()).then(s)}catch{return At(new U.MissingAPI)}var l,u},defineClass:function(){return function(s){f(this,s)}},ignoreTransaction:function(s){return H.trans?br(H.transless,s):s()},vip:sa,async:function(s){return function(){try{var l=da(s.apply(this,arguments));return l&&typeof l.then=="function"?l:F.resolve(l)}catch(u){return At(u)}}},spawn:function(s,l,u){try{var d=da(s.apply(u,l||[]));return d&&typeof d.then=="function"?d:F.resolve(d)}catch(g){return At(g)}},currentTransaction:{get:function(){return H.trans||null}},waitFor:function(s,l){return l=F.resolve(typeof s=="function"?kr.ignoreTransaction(s):s).timeout(l||6e4),H.trans?H.trans.waitFor(l):l},Promise:F,debug:{get:function(){return J},set:function(s){Y(s)}},derive:z,extend:f,props:y,override:_e,Events:pi,on:Yn,liveQuery:Tu,extendObservabilitySet:Oo,getByKeyPath:Z,setByKeyPath:Ce,delByKeyPath:function(s,l){typeof l=="string"?Ce(s,l,void 0):"length"in l&&[].map.call(l,function(u){Ce(s,u,void 0)})},shallowClone:ye,deepClone:Le,getObjectDiff:pa,cmp:nt,asap:le,minKey:-1/0,addons:[],connections:zr,errnames:W,dependencies:Do,cache:xr,semVer:"4.0.4",version:"4.0.4".split(".").map(function(s){return parseInt(s)}).reduce(function(s,l,u){return s+l/Math.pow(10,2*u)})})),kr.maxKey=yi(kr.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Yn(vi,function(s){Qn||(s=new CustomEvent(Qs,{detail:s}),Qn=!0,dispatchEvent(s),Qn=!1)}),addEventListener(Qs,function(s){s=s.detail,Qn||ya(s)}));var Xr,Qn=!1,Ou=function(){};return typeof BroadcastChannel<"u"&&((Ou=function(){(Xr=new BroadcastChannel(Qs)).onmessage=function(s){return s.data&&ya(s.data)}})(),typeof Xr.unref=="function"&&Xr.unref(),Yn(vi,function(s){Qn||Xr.postMessage(s)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(s){if(!Dn.disableBfCache&&s.persisted){J&&console.debug("Dexie: handling persisted pagehide"),Xr?.close();for(var l=0,u=zr;l<u.length;l++)u[l].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(s){!Dn.disableBfCache&&s.persisted&&(J&&console.debug("Dexie: handling persisted pageshow"),Ou(),ya({all:new Vt(-1/0,[[]])}))})),F.rejectionMapper=function(s,l){return!s||s instanceof It||s instanceof TypeError||s instanceof SyntaxError||!s.name||!me[s.name]?s:(l=new me[s.name](l||s.message,s),"stack"in s&&D(l,"stack",{get:function(){return this.inner.stack}}),l)},Y(J),r(Dn,Object.freeze({__proto__:null,Dexie:Dn,liveQuery:Tu,Entity:au,cmp:nt,PropModSymbol:Mn,PropModification:Xs,replacePrefix:function(s,l){return new Xs({replacePrefix:[s,l]})},default:Dn,RangeSet:Vt,mergeRanges:wi,rangesOverlap:To}),{default:Dn}),Dn})})(Rd);var lx=Rd.exports;const dl=Ig(lx),uf=Symbol.for("Dexie"),pl=globalThis[uf]||(globalThis[uf]=dl);if(dl.semVer!==pl.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${dl.semVer} and ${pl.semVer}`);/**
|
|
296
|
+
* See the LICENSE file distributed with this work for additional
|
|
297
|
+
* information regarding copyright ownership.
|
|
298
|
+
*
|
|
299
|
+
* This is free software; you can redistribute it and/or modify it
|
|
300
|
+
* under the terms of the GNU Affero General Public License as
|
|
301
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
302
|
+
* the License, or (at your option) any later version.
|
|
303
|
+
*
|
|
304
|
+
* This software is distributed in the hope that it will be useful,
|
|
305
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
306
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
307
|
+
* Lesser General Public License for more details.
|
|
308
|
+
*
|
|
309
|
+
* You should have received a copy of the GNU Affero General Public
|
|
310
|
+
* License along with this software; if not, write to the Free
|
|
311
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
312
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
313
|
+
*
|
|
314
|
+
* This file is part of the Cristal Wiki software prototype
|
|
315
|
+
* @copyright Copyright (c) 2023 XWiki SAS
|
|
316
|
+
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
317
|
+
*
|
|
318
|
+
**/class ux extends pl{constructor(t){super("pages_"+t),this.version(2).stores({pages:"id, name, content, document, css, js, document.name, document.headline, document.creator"})}}var cx=Object.defineProperty,fx=Object.getOwnPropertyDescriptor,hx=(e,t,n,r)=>{for(var i=r>1?void 0:r?fx(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&cx(t,n,i),i},dx=(e,t)=>(n,r)=>t(n,r,e);let cf=class{constructor(e){this.pageStorageMap=new Map,this.logger=e,this.logger.setModule("storage.components.dexieOfflineStorage")}getPageStorage(e){let t=this.pageStorageMap.get(e);return t==null&&(t=new ux(e),this.pageStorageMap.set(e,t)),t}async getPage(e,t){try{this.logger.debug("Ready to load page from local storage",t);const n=this.getPageStorage(e);this.logger.debug("pageStorage is ready, asking for page");const r=await n.pages.get(t),i=new pr;return i.fromObject(r),i}catch(n){this.logger.debug("Exception while trying to read from local storage",n);return}}async savePage(e,t,n){try{await this.getPageStorage(e).pages.put(n.toObject(),t)}catch(r){this.logger.debug("Exception while trying to store in local storage",e,t,n,r)}}async updatePage(e,t,n){try{const r=this.getPageStorage(e);this.logger.debug("Ready to store",n),await r.pages.update(t,n.toObject())}catch(r){this.logger.debug("Exception while trying to store in local storage",e,t,n,r)}}};cf=hx([kt(),dx(0,wt("Logger"))],cf);var px=Object.defineProperty,gx=Object.getOwnPropertyDescriptor,mx=(e,t,n,r)=>{for(var i=r>1?void 0:r?gx(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&px(t,n,i),i},vx=(e,t)=>(n,r)=>t(n,r,e);let gl=class extends no{constructor(e){super(e,"storage.components.fileSystemStorage")}getEditField(){return Promise.resolve("")}getImageURL(){return""}async getPageContent(e,t){const n=await fileSystemStorage.resolvePath(e,t),r=await fileSystemStorage.readPage(n||"");return r&&(r.headline=r.name,r.headlineRaw=r.name),r}getPageFromViewURL(){return null}getPageRestURL(){return""}getPanelContent(){return Promise.resolve(new pr)}isStorageReady(){return Promise.resolve(!0)}async save(e,t,n,r){const i=await fileSystemStorage.resolvePath(e,r);await fileSystemStorage.savePage(i,t,n)}};gl=mx([kt(),vx(0,wt("Logger"))],gl);/**
|
|
319
|
+
* See the LICENSE file distributed with this work for additional
|
|
320
|
+
* information regarding copyright ownership.
|
|
321
|
+
*
|
|
322
|
+
* This is free software; you can redistribute it and/or modify it
|
|
323
|
+
* under the terms of the GNU Affero General Public License as
|
|
324
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
325
|
+
* the License, or (at your option) any later version.
|
|
326
|
+
*
|
|
327
|
+
* This software is distributed in the hope that it will be useful,
|
|
328
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
329
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
330
|
+
* Lesser General Public License for more details.
|
|
331
|
+
*
|
|
332
|
+
* You should have received a copy of the GNU Affero General Public
|
|
333
|
+
* License along with this software; if not, write to the Free
|
|
334
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
335
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
336
|
+
*
|
|
337
|
+
* This file is part of the Cristal Wiki software prototype
|
|
338
|
+
* @copyright Copyright (c) 2023 XWiki SAS
|
|
339
|
+
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
340
|
+
*
|
|
341
|
+
**/let yx=class{constructor(t){this.logger=t.get("Logger"),this.logger.setModule("electron.storage.components.componentsInit"),this.logger?.debug("Init Sample Module components begin"),t.bind("WikiConfig").to(hl).whenTargetNamed("FileSystem"),t.bind("Storage").to(gl).whenTargetNamed("FileSystem"),this.logger?.debug("Init Sample Module components end")}};var bx=Object.defineProperty,_x=Object.getOwnPropertyDescriptor,wx=(e,t,n,r)=>{for(var i=r>1?void 0:r?_x(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&bx(t,n,i),i};let ml=class{switchLocation(e){window.localStorage.setItem("currentApp",e.name),browserElectron.reloadBrowser()}};ml=wx([kt()],ml);/**
|
|
342
|
+
* See the LICENSE file distributed with this work for additional
|
|
343
|
+
* information regarding copyright ownership.
|
|
344
|
+
*
|
|
345
|
+
* This is free software; you can redistribute it and/or modify it
|
|
346
|
+
* under the terms of the GNU Affero General Public License as
|
|
347
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
348
|
+
* the License, or (at your option) any later version.
|
|
349
|
+
*
|
|
350
|
+
* This software is distributed in the hope that it will be useful,
|
|
351
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
352
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
353
|
+
* Lesser General Public License for more details.
|
|
354
|
+
*
|
|
355
|
+
* You should have received a copy of the GNU Affero General Public
|
|
356
|
+
* License along with this software; if not, write to the Free
|
|
357
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
358
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
359
|
+
*
|
|
360
|
+
* This file is part of the Cristal Wiki software prototype
|
|
361
|
+
* @copyright Copyright (c) 2023 XWiki SAS
|
|
362
|
+
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
363
|
+
*
|
|
364
|
+
**/const xx="BrowserApi";/**
|
|
365
|
+
* See the LICENSE file distributed with this work for additional
|
|
366
|
+
* information regarding copyright ownership.
|
|
367
|
+
*
|
|
368
|
+
* This is free software; you can redistribute it and/or modify it
|
|
369
|
+
* under the terms of the GNU Affero General Public License as
|
|
370
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
371
|
+
* the License, or (at your option) any later version.
|
|
372
|
+
*
|
|
373
|
+
* This software is distributed in the hope that it will be useful,
|
|
374
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
375
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
376
|
+
* Lesser General Public License for more details.
|
|
377
|
+
*
|
|
378
|
+
* You should have received a copy of the GNU Affero General Public
|
|
379
|
+
* License along with this software; if not, write to the Free
|
|
380
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
381
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
382
|
+
*
|
|
383
|
+
* This file is part of the Cristal Wiki software prototype
|
|
384
|
+
* @copyright Copyright (c) 2023 XWiki SAS
|
|
385
|
+
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
386
|
+
*
|
|
387
|
+
**/class kx{constructor(t){t.bind(xx).to(ml).inSingletonScope()}}/**
|
|
388
|
+
* See the LICENSE file distributed with this work for additional
|
|
389
|
+
* information regarding copyright ownership.
|
|
390
|
+
*
|
|
391
|
+
* This is free software; you can redistribute it and/or modify it
|
|
392
|
+
* under the terms of the GNU Affero General Public License as
|
|
393
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
394
|
+
* the License, or (at your option) any later version.
|
|
395
|
+
*
|
|
396
|
+
* This software is distributed in the hope that it will be useful,
|
|
397
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
398
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
399
|
+
* Lesser General Public License for more details.
|
|
400
|
+
*
|
|
401
|
+
* You should have received a copy of the GNU Affero General Public
|
|
402
|
+
* License along with this software; if not, write to the Free
|
|
403
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
404
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
405
|
+
*
|
|
406
|
+
* This file is part of the Cristal Wiki software prototype
|
|
407
|
+
* @copyright Copyright (c) 2023 XWiki SAS
|
|
408
|
+
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
409
|
+
*
|
|
410
|
+
**/nu.init(["skin","dsvuetify","dsfr","dsshoelace","macros","storage","extension-menubuttons","sharedworker"],N0("./config.json"),!0,!0,"FileSystemSL",e=>{new yx(e),new kx(e)});export{oh as $,qm as A,Ex as B,Qt as C,Vn as D,Sx as E,jt as F,af as G,et as H,oe as I,Ux as J,Gh as K,qh as L,Ht as M,Tx as N,Hm as O,Mx as P,Ox as Q,Fx as R,Rx as S,Lr as T,$r as U,Kr as V,lf as W,of as X,Bl as Y,Fs as Z,jl as _,Fr as a,$x as a0,dr as a1,Mt as a2,ao as a3,Gm as a4,qx as a5,Tn as a6,Kx as a7,St as a8,Ra as a9,Ax as aA,Mi as aB,Nx as aC,Hg as aD,En as aE,tn as aF,ay as aG,Cg as aH,Ig as aI,kb as aJ,kt as aa,E0 as ab,qe as ac,ot as ad,Ur as ae,yr as af,pn as ag,Pe as ah,Eh as ai,hc as aj,Sh as ak,Os as al,Cx as am,_v as an,Wx as ao,Lx as ap,jx as aq,Bx as ar,Vx as as,mh as at,vh as au,Kn as av,Ne as aw,Kt as ax,wt as ay,st as az,Nr as b,cf as c,Dx as d,rf as e,sf as f,Yt as g,Ts as h,Qi as i,rh as j,Ot as k,bt as l,Zt as m,On as n,Wl as o,Jo as p,Bs as q,Ms as r,ah as s,Px as t,rt as u,Ch as v,Ix as w,Dr as x,Ml as y,Wm as z};
|
|
411
|
+
//# sourceMappingURL=index-DK0YwuAW.js.map
|