(function(){System.register([],function(exports,module){"use strict";return{execute:function(){var __vite_style__=document.createElement("style"); /** * @vue/shared v3.5.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ function makeMap(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return e=>e in t}__vite_style__.textContent='html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display: inline;*zoom: 1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal;*margin-left: -7px}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align: middle}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow: visible}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height: 13px;*width: 13px}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}\n/*$vite$:1*/',document.head.appendChild(__vite_style__),exports({E:getDefaultExportFromCjs,a:createTextVNode,b:resolveComponent,c:createElementBlock,d:defineComponent,e:renderList,f:createBlock,g:normalizeStyle,h:h,i:inject,j:resolveDynamicComponent,l:ref,n:normalizeClass,o:openBlock,p:provide,q:createCommentVNode,r:renderSlot,s:withCtx,u:useComponent,v:nextTick,w:watch,x:watchEffect,y:shallowReactive,z:onScopeDispose});const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),isModelListener=e=>e.startsWith("onUpdate:"),extend$1=Object.assign,remove=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},hasOwnProperty$d=Object.prototype.hasOwnProperty,hasOwn=(e,t)=>hasOwnProperty$d.call(e,t),isArray$2=Array.isArray,isMap$1=e=>"[object Map]"===toTypeString(e),isSet$1=e=>"[object Set]"===toTypeString(e),isFunction$2=e=>"function"==typeof e,isString$1=e=>"string"==typeof e,isSymbol$1=e=>"symbol"==typeof e,isObject$4=e=>null!==e&&"object"==typeof e,isPromise=e=>(isObject$4(e)||isFunction$2(e))&&isFunction$2(e.then)&&isFunction$2(e.catch),objectToString$1=Object.prototype.toString,toTypeString=e=>objectToString$1.call(e),toRawType=e=>toTypeString(e).slice(8,-1),isPlainObject$1=e=>"[object Object]"===toTypeString(e),isIntegerKey=e=>isString$1(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},camelizeRE=/-\w/g,camelize=cacheStringFunction(e=>e.replace(camelizeRE,e=>e.slice(1).toUpperCase())),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(e=>e.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(e=>e.charAt(0).toUpperCase()+e.slice(1)),toHandlerKey=cacheStringFunction(e=>e?`on${capitalize(e)}`:""),hasChanged=(e,t)=>!Object.is(e,t),invokeArrayFns=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},looseToNumber=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function normalizeStyle(e){if(isArray$2(e)){const t={};for(let n=0;n{if(e){const n=e.split(propertyDelimiterRE);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function normalizeClass(e){let t="";if(isString$1(e))t=e;else if(isArray$2(e))for(let n=0;n!(!e||!0!==e.__v_isRef),toDisplayString=exports("t",e=>isString$1(e)?e:null==e?"":isArray$2(e)||isObject$4(e)&&(e.toString===objectToString$1||!isFunction$2(e.toString))?isRef$1(e)?toDisplayString(e.value):JSON.stringify(e,replacer,2):String(e)),replacer=(e,t)=>isRef$1(t)?replacer(e,t.value):isMap$1(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[stringifySymbol(t,r)+" =>"]=n,e),{})}:isSet$1(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>stringifySymbol(e))}:isSymbol$1(t)?stringifySymbol(t):!isObject$4(t)||isArray$2(t)||isPlainObject$1(t)?t:String(t),stringifySymbol=(e,t="")=>{var n;return isSymbol$1(e)?`Symbol(${null!=(n=e.description)?n:t})`:e}; /** * @vue/reactivity v3.5.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ let activeEffectScope,activeSub;class EffectScope{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=activeEffectScope,!e&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e0&&0===--this._on&&(activeEffectScope=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){let t,n;for(this._active=!1,t=0,n=this.effects.length;t0)return;if(batchedComputed){let e=batchedComputed;for(batchedComputed=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;batchedSub;){let n=batchedSub;for(batchedSub=void 0;n;){const r=n.next;if(n.next=void 0,n.flags&=-9,1&n.flags)try{n.trigger()}catch(t){e||(e=t)}n=r}}if(e)throw e}function prepareDeps(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function cleanupDeps(e){let t,n=e.depsTail,r=n;for(;r;){const e=r.prevDep;-1===r.version?(r===n&&(n=e),removeSub(r),removeDep(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function isDirty(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(refreshComputed(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function refreshComputed(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===globalVersion)return;if(e.globalVersion=globalVersion,!e.isSSR&&128&e.flags&&(!e.deps&&!e._dirty||!isDirty(e)))return;e.flags|=2;const t=e.dep,n=activeSub,r=shouldTrack;activeSub=e,shouldTrack=!0;try{prepareDeps(e);const n=e.fn(e._value);(0===t.version||hasChanged(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(s){throw t.version++,s}finally{activeSub=n,shouldTrack=r,cleanupDeps(e),e.flags&=-3}}function removeSub(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)removeSub(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function removeDep(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let shouldTrack=!0;const trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){const e=trackStack.pop();shouldTrack=void 0===e||e}function cleanupEffect(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=activeSub;activeSub=void 0;try{t()}finally{activeSub=e}}}let globalVersion=0;class Link{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Dep{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!activeSub||!shouldTrack||activeSub===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==activeSub)t=this.activeLink=new Link(activeSub,this),activeSub.deps?(t.prevDep=activeSub.depsTail,activeSub.depsTail.nextDep=t,activeSub.depsTail=t):activeSub.deps=activeSub.depsTail=t,addSub(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=activeSub.depsTail,t.nextDep=void 0,activeSub.depsTail.nextDep=t,activeSub.depsTail=t,activeSub.deps===t&&(activeSub.deps=e)}return t}trigger(e){this.version++,globalVersion++,this.notify(e)}notify(e){startBatch();try{0;for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{endBatch()}}}function addSub(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)addSub(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const targetMap=new WeakMap,ITERATE_KEY=Symbol(""),MAP_KEY_ITERATE_KEY=Symbol(""),ARRAY_ITERATE_KEY=Symbol("");function track(e,t,n){if(shouldTrack&&activeSub){let t=targetMap.get(e);t||targetMap.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Dep),r.map=t,r.key=n),r.track()}}function trigger(e,t,n,r,s,o){const i=targetMap.get(e);if(!i)return void globalVersion++;const a=e=>{e&&e.trigger()};if(startBatch(),"clear"===t)i.forEach(a);else{const s=isArray$2(e),o=s&&isIntegerKey(n);if(s&&"length"===n){const e=Number(r);i.forEach((t,n)=>{("length"===n||n===ARRAY_ITERATE_KEY||!isSymbol$1(n)&&n>=e)&&a(t)})}else switch((void 0!==n||i.has(void 0))&&a(i.get(n)),o&&a(i.get(ARRAY_ITERATE_KEY)),t){case"add":s?o&&a(i.get("length")):(a(i.get(ITERATE_KEY)),isMap$1(e)&&a(i.get(MAP_KEY_ITERATE_KEY)));break;case"delete":s||(a(i.get(ITERATE_KEY)),isMap$1(e)&&a(i.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap$1(e)&&a(i.get(ITERATE_KEY))}}endBatch()}function reactiveReadArray(e){const t=toRaw(e);return t===e?t:(track(t,"iterate",ARRAY_ITERATE_KEY),isShallow(e)?t:t.map(toReactive))}function shallowReadArray(e){return track(e=toRaw(e),"iterate",ARRAY_ITERATE_KEY),e}const arrayInstrumentations={__proto__:null,[Symbol.iterator](){return iterator$1(this,Symbol.iterator,toReactive)},concat(...e){return reactiveReadArray(this).concat(...e.map(e=>isArray$2(e)?reactiveReadArray(e):e))},entries(){return iterator$1(this,"entries",e=>(e[1]=toReactive(e[1]),e))},every(e,t){return apply$1(this,"every",e,t,void 0,arguments)},filter(e,t){return apply$1(this,"filter",e,t,e=>e.map(toReactive),arguments)},find(e,t){return apply$1(this,"find",e,t,toReactive,arguments)},findIndex(e,t){return apply$1(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return apply$1(this,"findLast",e,t,toReactive,arguments)},findLastIndex(e,t){return apply$1(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return apply$1(this,"forEach",e,t,void 0,arguments)},includes(...e){return searchProxy(this,"includes",e)},indexOf(...e){return searchProxy(this,"indexOf",e)},join(e){return reactiveReadArray(this).join(e)},lastIndexOf(...e){return searchProxy(this,"lastIndexOf",e)},map(e,t){return apply$1(this,"map",e,t,void 0,arguments)},pop(){return noTracking(this,"pop")},push(...e){return noTracking(this,"push",e)},reduce(e,...t){return reduce(this,"reduce",e,t)},reduceRight(e,...t){return reduce(this,"reduceRight",e,t)},shift(){return noTracking(this,"shift")},some(e,t){return apply$1(this,"some",e,t,void 0,arguments)},splice(...e){return noTracking(this,"splice",e)},toReversed(){return reactiveReadArray(this).toReversed()},toSorted(e){return reactiveReadArray(this).toSorted(e)},toSpliced(...e){return reactiveReadArray(this).toSpliced(...e)},unshift(...e){return noTracking(this,"unshift",e)},values(){return iterator$1(this,"values",toReactive)}};function iterator$1(e,t,n){const r=shallowReadArray(e),s=r[t]();return r===e||isShallow(e)||(s._next=s.next,s.next=()=>{const e=s._next();return e.value&&(e.value=n(e.value)),e}),s}const arrayProto$1=Array.prototype;function apply$1(e,t,n,r,s,o){const i=shallowReadArray(e),a=i!==e&&!isShallow(e),c=i[t];if(c!==arrayProto$1[t]){const t=c.apply(e,o);return a?toReactive(t):t}let l=n;i!==e&&(a?l=function(t,r){return n.call(this,toReactive(t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));const u=c.call(i,l,r);return a&&s?s(u):u}function reduce(e,t,n,r){const s=shallowReadArray(e);let o=n;return s!==e&&(isShallow(e)?n.length>3&&(o=function(t,r,s){return n.call(this,t,r,s,e)}):o=function(t,r,s){return n.call(this,t,toReactive(r),s,e)}),s[t](o,...r)}function searchProxy(e,t,n){const r=toRaw(e);track(r,"iterate",ARRAY_ITERATE_KEY);const s=r[t](...n);return-1!==s&&!1!==s||!isProxy(n[0])?s:(n[0]=toRaw(n[0]),r[t](...n))}function noTracking(e,t,n=[]){pauseTracking(),startBatch();const r=toRaw(e)[t].apply(e,n);return endBatch(),resetTracking(),r}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(isSymbol$1));function hasOwnProperty$c(e){isSymbol$1(e)||(e=String(e));const t=toRaw(this);return track(t,"has",e),t.hasOwnProperty(e)}class BaseReactiveHandler{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;const r=this._isReadonly,s=this._isShallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return s;if("__v_raw"===t)return n===(r?s?shallowReadonlyMap:readonlyMap:s?shallowReactiveMap:reactiveMap).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=isArray$2(e);if(!r){let e;if(o&&(e=arrayInstrumentations[t]))return e;if("hasOwnProperty"===t)return hasOwnProperty$c}const i=Reflect.get(e,t,isRef(e)?e:n);return(isSymbol$1(t)?builtInSymbols.has(t):isNonTrackableKeys(t))?i:(r||track(e,"get",t),s?i:isRef(i)?o&&isIntegerKey(t)?i:i.value:isObject$4(i)?r?readonly(i):reactive(i):i)}}class MutableReactiveHandler extends BaseReactiveHandler{constructor(e=!1){super(!1,e)}set(e,t,n,r){let s=e[t];if(!this._isShallow){const t=isReadonly(s);if(isShallow(n)||isReadonly(n)||(s=toRaw(s),n=toRaw(n)),!isArray$2(e)&&isRef(s)&&!isRef(n))return t||(s.value=n),!0}const o=isArray$2(e)&&isIntegerKey(t)?Number(t)e,getProto=e=>Reflect.getPrototypeOf(e);function createIterableMethod(e,t,n){return function(...r){const s=this.__v_raw,o=toRaw(s),i=isMap$1(o),a="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,l=s[e](...r),u=n?toShallow:t?toReadonly:toReactive;return!t&&track(o,"iterate",c?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function createInstrumentations(e,t){const n={get(n){const r=this.__v_raw,s=toRaw(r),o=toRaw(n);e||(hasChanged(n,o)&&track(s,"get",n),track(s,"get",o));const{has:i}=getProto(s),a=t?toShallow:e?toReadonly:toReactive;return i.call(s,n)?a(r.get(n)):i.call(s,o)?a(r.get(o)):void(r!==s&&r.get(n))},get size(){const t=this.__v_raw;return!e&&track(toRaw(t),"iterate",ITERATE_KEY),t.size},has(t){const n=this.__v_raw,r=toRaw(n),s=toRaw(t);return e||(hasChanged(t,s)&&track(r,"has",t),track(r,"has",s)),t===s?n.has(t):n.has(t)||n.has(s)},forEach(n,r){const s=this,o=s.__v_raw,i=toRaw(o),a=t?toShallow:e?toReadonly:toReactive;return!e&&track(i,"iterate",ITERATE_KEY),o.forEach((e,t)=>n.call(r,a(e),a(t),s))}};extend$1(n,e?{add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear")}:{add(e){t||isShallow(e)||isReadonly(e)||(e=toRaw(e));const n=toRaw(this);return getProto(n).has.call(n,e)||(n.add(e),trigger(n,"add",e,e)),this},set(e,n){t||isShallow(n)||isReadonly(n)||(n=toRaw(n));const r=toRaw(this),{has:s,get:o}=getProto(r);let i=s.call(r,e);i||(e=toRaw(e),i=s.call(r,e));const a=o.call(r,e);return r.set(e,n),i?hasChanged(n,a)&&trigger(r,"set",e,n):trigger(r,"add",e,n),this},delete(e){const t=toRaw(this),{has:n,get:r}=getProto(t);let s=n.call(t,e);s||(e=toRaw(e),s=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return s&&trigger(t,"delete",e,void 0),o},clear(){const e=toRaw(this),t=0!==e.size,n=e.clear();return t&&trigger(e,"clear",void 0,void 0),n}});return["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=createIterableMethod(r,e,t)}),n}function createInstrumentationGetter(e,t){const n=createInstrumentations(e,t);return(t,r,s)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(hasOwn(n,r)&&r in t?n:t,r,s)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},shallowReadonlyCollectionHandlers={get:createInstrumentationGetter(!0,!0)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(e){return e.__v_skip||!Object.isExtensible(e)?0:targetTypeMap(toRawType(e))}function reactive(e){return isReadonly(e)?e:createReactiveObject(e,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(e){return createReactiveObject(e,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(e){return createReactiveObject(e,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function shallowReadonly(e){return createReactiveObject(e,!0,shallowReadonlyHandlers,shallowReadonlyCollectionHandlers,shallowReadonlyMap)}function createReactiveObject(e,t,n,r,s){if(!isObject$4(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const o=getTargetType(e);if(0===o)return e;const i=s.get(e);if(i)return i;const a=new Proxy(e,2===o?r:n);return s.set(e,a),a}function isReactive(e){return isReadonly(e)?isReactive(e.__v_raw):!(!e||!e.__v_isReactive)}function isReadonly(e){return!(!e||!e.__v_isReadonly)}function isShallow(e){return!(!e||!e.__v_isShallow)}function isProxy(e){return!!e&&!!e.__v_raw}function toRaw(e){const t=e&&e.__v_raw;return t?toRaw(t):e}function markRaw(e){return!hasOwn(e,"__v_skip")&&Object.isExtensible(e)&&def(e,"__v_skip",!0),e}const toReactive=e=>isObject$4(e)?reactive(e):e,toReadonly=e=>isObject$4(e)?readonly(e):e;function isRef(e){return!!e&&!0===e.__v_isRef}function ref(e){return createRef(e,!1)}function createRef(e,t){return isRef(e)?e:new RefImpl(e,t)}class RefImpl{constructor(e,t){this.dep=new Dep,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:toRaw(e),this._value=t?e:toReactive(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||isShallow(e)||isReadonly(e);e=n?e:toRaw(e),hasChanged(e,t)&&(this._rawValue=e,this._value=n?e:toReactive(e),this.dep.trigger())}}function unref(e){return isRef(e)?e.value:e}const shallowUnwrapHandlers={get:(e,t,n)=>"__v_raw"===t?e:unref(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return isRef(s)&&!isRef(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function proxyRefs(e){return isReactive(e)?e:new Proxy(e,shallowUnwrapHandlers)}class ComputedRefImpl{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Dep(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=globalVersion-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&activeSub!==this)return batch(this,!0),!0}get value(){const e=this.dep.track();return refreshComputed(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function computed$1(e,t,n=!1){let r,s;isFunction$2(e)?r=e:(r=e.get,s=e.set);return new ComputedRefImpl(r,s,n)}const INITIAL_WATCHER_VALUE={},cleanupMap=new WeakMap;let activeWatcher;function onWatcherCleanup(e,t=!1,n=activeWatcher){if(n){let t=cleanupMap.get(n);t||cleanupMap.set(n,t=[]),t.push(e)}}function watch$1(e,t,n=EMPTY_OBJ){const{immediate:r,deep:s,once:o,scheduler:i,augmentJob:a,call:c}=n,l=e=>s?e:isShallow(e)||!1===s||0===s?traverse(e,1):traverse(e);let u,d,p,h,f=!1,g=!1;if(isRef(e)?(d=()=>e.value,f=isShallow(e)):isReactive(e)?(d=()=>l(e),f=!0):isArray$2(e)?(g=!0,f=e.some(e=>isReactive(e)||isShallow(e)),d=()=>e.map(e=>isRef(e)?e.value:isReactive(e)?l(e):isFunction$2(e)?c?c(e,2):e():void 0)):d=isFunction$2(e)?t?c?()=>c(e,2):e:()=>{if(p){pauseTracking();try{p()}finally{resetTracking()}}const t=activeWatcher;activeWatcher=u;try{return c?c(e,3,[h]):e(h)}finally{activeWatcher=t}}:NOOP,t&&s){const e=d,t=!0===s?1/0:s;d=()=>traverse(e(),t)}const m=getCurrentScope(),y=()=>{u.stop(),m&&m.active&&remove(m.effects,u)};if(o&&t){const e=t;t=(...t)=>{e(...t),y()}}let b=g?new Array(e.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const v=e=>{if(1&u.flags&&(u.dirty||e))if(t){const e=u.run();if(s||f||(g?e.some((e,t)=>hasChanged(e,b[t])):hasChanged(e,b))){p&&p();const n=activeWatcher;activeWatcher=u;try{const n=[e,b===INITIAL_WATCHER_VALUE?void 0:g&&b[0]===INITIAL_WATCHER_VALUE?[]:b,h];b=e,c?c(t,3,n):t(...n)}finally{activeWatcher=n}}}else u.run()};return a&&a(v),u=new ReactiveEffect(d),u.scheduler=i?()=>i(v,!1):v,h=e=>onWatcherCleanup(e,!1,u),p=u.onStop=()=>{const e=cleanupMap.get(u);if(e){if(c)c(e,4);else for(const t of e)t();cleanupMap.delete(u)}},t?r?v(!0):b=u.run():i?i(v.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function traverse(e,t=1/0,n){if(t<=0||!isObject$4(e)||e.__v_skip)return e;if(((n=n||new Map).get(e)||0)>=t)return e;if(n.set(e,t),t--,isRef(e))traverse(e.value,t,n);else if(isArray$2(e))for(let r=0;r{traverse(e,t,n)});else if(isPlainObject$1(e)){for(const r in e)traverse(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&traverse(e[r],t,n)}return e} /** * @vue/runtime-core v3.5.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/const stack=[];let isWarning=!1;function warn$1(e,...t){if(isWarning)return;isWarning=!0,pauseTracking();const n=stack.length?stack[stack.length-1].component:null,r=n&&n.appContext.config.warnHandler,s=getComponentTrace();if(r)callWithErrorHandling(r,n,11,[e+t.map(e=>{var t,n;return null!=(n=null==(t=e.toString)?void 0:t.call(e))?n:JSON.stringify(e)}).join(""),n&&n.proxy,s.map(({vnode:e})=>`at <${formatComponentName(n,e.type)}>`).join("\n"),s]);else{const n=[`[Vue warn]: ${e}`,...t];s.length&&n.push("\n",...formatTrace(s)),console.warn(...n)}resetTracking(),isWarning=!1}function getComponentTrace(){let e=stack[stack.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function formatTrace(e){const t=[];return e.forEach((e,n)=>{t.push(...0===n?[]:["\n"],...formatTraceEntry(e))}),t}function formatTraceEntry({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=!!e.component&&null==e.component.parent,s=` at <${formatComponentName(e.component,e.type,r)}`,o=">"+n;return e.props?[s,...formatProps(e.props),o]:[s+o]}function formatProps(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(n=>{t.push(...formatProp(n,e[n]))}),n.length>3&&t.push(" ..."),t}function formatProp(e,t,n){return isString$1(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):"number"==typeof t||"boolean"==typeof t||null==t?n?t:[`${e}=${t}`]:isRef(t)?(t=formatProp(e,toRaw(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):isFunction$2(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=toRaw(t),n?t:[`${e}=`,t])}function callWithErrorHandling(e,t,n,r){try{return r?e(...r):e()}catch(s){handleError(s,t,n)}}function callWithAsyncErrorHandling(e,t,n,r){if(isFunction$2(e)){const s=callWithErrorHandling(e,t,n,r);return s&&isPromise(s)&&s.catch(e=>{handleError(e,t,n)}),s}if(isArray$2(e)){const s=[];for(let o=0;o>>1,s=queue[r],o=getId(s);o=getId(n)?queue.push(e):queue.splice(findInsertionIndex(t),0,e),e.flags|=1,queueFlush()}}function queueFlush(){currentFlushPromise||(currentFlushPromise=resolvedPromise.then(flushJobs))}function queuePostFlushCb(e){isArray$2(e)?pendingPostFlushCbs.push(...e):activePostFlushCbs&&-1===e.id?activePostFlushCbs.splice(postFlushIndex+1,0,e):1&e.flags||(pendingPostFlushCbs.push(e),e.flags|=1),queueFlush()}function flushPreFlushCbs(e,t,n=flushIndex+1){for(;ngetId(e)-getId(t));if(pendingPostFlushCbs.length=0,activePostFlushCbs)return void activePostFlushCbs.push(...e);for(activePostFlushCbs=e,postFlushIndex=0;postFlushIndexnull==e.id?2&e.flags?-1:1/0:e.id;function flushJobs(e){try{for(flushIndex=0;flushIndex{r._d&&setBlockTracking(-1);const s=setCurrentRenderingInstance(t);let o;try{o=e(...n)}finally{setCurrentRenderingInstance(s),r._d&&setBlockTracking(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function withDirectives(e,t){if(null===currentRenderingInstance)return e;const n=getComponentPublicInstance(currentRenderingInstance),r=e.dirs||(e.dirs=[]);for(let s=0;se.__isTeleport,leaveCbKey=Symbol("_leaveCb");function setTransitionHooks(e,t){6&e.shapeFlag&&e.component?(e.transition=t,setTransitionHooks(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function defineComponent(e,t){return isFunction$2(e)?(()=>extend$1({name:e.name},t,{setup:e}))():e}function markAsyncBoundary(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const pendingSetRefMap=new WeakMap;function setRef(e,t,n,r,s=!1){if(isArray$2(e))return void e.forEach((e,o)=>setRef(e,t&&(isArray$2(t)?t[o]:t),n,r,s));if(isAsyncWrapper(r)&&!s)return void(512&r.shapeFlag&&r.type.__asyncResolved&&r.component.subTree.component&&setRef(e,t,n,r.component.subTree));const o=4&r.shapeFlag?getComponentPublicInstance(r.component):r.el,i=s?null:o,{i:a,r:c}=e,l=t&&t.r,u=a.refs===EMPTY_OBJ?a.refs={}:a.refs,d=a.setupState,p=toRaw(d),h=d===EMPTY_OBJ?NO:e=>hasOwn(p,e);if(null!=l&&l!==c)if(invalidatePendingSetRef(t),isString$1(l))u[l]=null,h(l)&&(d[l]=null);else if(isRef(l)){l.value=null;const e=t;e.k&&(u[e.k]=null)}if(isFunction$2(c))callWithErrorHandling(c,a,12,[i,u]);else{const t=isString$1(c),r=isRef(c);if(t||r){const a=()=>{if(e.f){const n=t?h(c)?d[c]:u[c]:c.value;if(s)isArray$2(n)&&remove(n,o);else if(isArray$2(n))n.includes(o)||n.push(o);else if(t)u[c]=[o],h(c)&&(d[c]=u[c]);else{const t=[o];c.value=t,e.k&&(u[e.k]=t)}}else t?(u[c]=i,h(c)&&(d[c]=i)):r&&(c.value=i,e.k&&(u[e.k]=i))};if(i){const t=()=>{a(),pendingSetRefMap.delete(e)};t.id=-1,pendingSetRefMap.set(e,t),queuePostRenderEffect(t,n)}else invalidatePendingSetRef(e),a()}}}function invalidatePendingSetRef(e){const t=pendingSetRefMap.get(e);t&&(t.flags|=8,pendingSetRefMap.delete(e))}const isComment=e=>8===e.nodeType;function forEachElement(e,t){if(isComment(e)&&"["===e.data){let n=1,r=e.nextSibling;for(;r;){if(1===r.nodeType){if(!1===t(r))break}else if(isComment(r))if("]"===r.data){if(0===--n)break}else"["===r.data&&n++;r=r.nextSibling}}else t(e)}getGlobalThis().requestIdleCallback,getGlobalThis().cancelIdleCallback;const isAsyncWrapper=e=>!!e.type.__asyncLoader;function defineAsyncComponent(e){isFunction$2(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:s=200,hydrate:o,timeout:i,suspensible:a=!0,onError:c}=e;let l,u=null,d=0;const p=()=>{let e;return u||(e=u=t().catch(e=>{if(e=e instanceof Error?e:new Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t((d++,u=null,p())),()=>n(e),d+1)});throw e}).then(t=>e!==u&&u?u:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),l=t,t)))};return defineComponent({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(e,t,n){let r=!1;(t.bu||(t.bu=[])).push(()=>r=!0);const s=()=>{r||n()},i=o?()=>{const n=o(s,t=>forEachElement(e,t));n&&(t.bum||(t.bum=[])).push(n)}:s;l?i():p().then(()=>!t.isUnmounted&&i())},get __asyncResolved(){return l},setup(){const e=currentInstance;if(markAsyncBoundary(e),l)return()=>createInnerComp(l,e);const t=t=>{u=null,handleError(t,e,13,!r)};if(a&&e.suspense||isInSSRComponentSetup)return p().then(t=>()=>createInnerComp(t,e)).catch(e=>(t(e),()=>r?createVNode(r,{error:e}):null));const o=ref(!1),c=ref(),d=ref(!!s);return s&&setTimeout(()=>{d.value=!1},s),null!=i&&setTimeout(()=>{if(!o.value&&!c.value){const e=new Error(`Async component timed out after ${i}ms.`);t(e),c.value=e}},i),p().then(()=>{o.value=!0,e.parent&&isKeepAlive(e.parent.vnode)&&e.parent.update()}).catch(e=>{t(e),c.value=e}),()=>o.value&&l?createInnerComp(l,e):c.value&&r?createVNode(r,{error:c.value}):n&&!d.value?createVNode(n):void 0}})}function createInnerComp(e,t){const{ref:n,props:r,children:s,ce:o}=t.vnode,i=createVNode(e,r,s);return i.ref=n,i.ce=o,delete t.vnode.ce,i}const isKeepAlive=e=>e.type.__isKeepAlive;function onActivated(e,t){registerKeepAliveHook(e,"a",t)}function onDeactivated(e,t){registerKeepAliveHook(e,"da",t)}function registerKeepAliveHook(e,t,n=currentInstance){const r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(injectHook(t,r,n),n){let e=n.parent;for(;e&&e.parent;)isKeepAlive(e.parent.vnode)&&injectToKeepAliveRoot(r,t,n,e),e=e.parent}}function injectToKeepAliveRoot(e,t,n,r){const s=injectHook(t,e,r,!0);onUnmounted(()=>{remove(r[t],s)},n)}function injectHook(e,t,n=currentInstance,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{pauseTracking();const s=setCurrentInstance(n),o=callWithAsyncErrorHandling(t,n,e,r);return s(),resetTracking(),o});return r?s.unshift(o):s.push(o),o}}const createHook=e=>(t,n=currentInstance)=>{isInSSRComponentSetup&&"sp"!==e||injectHook(e,(...e)=>t(...e),n)},onBeforeMount=createHook("bm"),onMounted=exports("H",createHook("m")),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=exports("m",createHook("bum")),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(e,t=currentInstance){injectHook("ec",e,t)}const COMPONENTS="components",DIRECTIVES="directives";function resolveComponent(e,t){return resolveAsset(COMPONENTS,e,!0,t)||e}const NULL_DYNAMIC_COMPONENT=Symbol.for("v-ndc");function resolveDynamicComponent(e){return isString$1(e)?resolveAsset(COMPONENTS,e,!1)||e:e||NULL_DYNAMIC_COMPONENT}function resolveDirective(e){return resolveAsset(DIRECTIVES,e)}function resolveAsset(e,t,n=!0,r=!1){const s=currentRenderingInstance||currentInstance;if(s){const n=s.type;if(e===COMPONENTS){const e=getComponentName(n,!1);if(e&&(e===t||e===camelize(t)||e===capitalize(camelize(t))))return n}const o=resolve(s[e]||n[e],t)||resolve(s.appContext[e],t);return!o&&r?n:o}}function resolve(e,t){return e&&(e[t]||e[camelize(t)]||e[capitalize(camelize(t))])}function renderList(e,t,n,r){let s;const o=n,i=isArray$2(e);if(i||isString$1(e)){let n=!1,r=!1;i&&isReactive(e)&&(n=!isShallow(e),r=isReadonly(e),e=shallowReadArray(e)),s=new Array(e.length);for(let i=0,a=e.length;it(e,n,void 0,o));else{const n=Object.keys(e);s=new Array(n.length);for(let r=0,i=n.length;r!isVNode(e)||e.type!==Comment&&!(e.type===Fragment&&!ensureValidVNode(e.children)))?e:null}const getPublicInstance=e=>e?isStatefulComponent(e)?getComponentPublicInstance(e):getPublicInstance(e.parent):null,publicPropertiesMap=extend$1(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=>getPublicInstance(e.parent),$root:e=>getPublicInstance(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>resolveMergedOptions(e),$forceUpdate:e=>e.f||(e.f=()=>{queueJob(e.update)}),$nextTick:e=>e.n||(e.n=nextTick.bind(e.proxy)),$watch:e=>instanceWatch.bind(e)}),hasSetupBinding=(e,t)=>e!==EMPTY_OBJ&&!e.__isScriptSetup&&hasOwn(e,t),PublicInstanceProxyHandlers={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:a,appContext:c}=e;let l;if("$"!==t[0]){const a=i[t];if(void 0!==a)switch(a){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(hasSetupBinding(r,t))return i[t]=1,r[t];if(s!==EMPTY_OBJ&&hasOwn(s,t))return i[t]=2,s[t];if((l=e.propsOptions[0])&&hasOwn(l,t))return i[t]=3,o[t];if(n!==EMPTY_OBJ&&hasOwn(n,t))return i[t]=4,n[t];shouldCacheAccess&&(i[t]=0)}}const u=publicPropertiesMap[t];let d,p;return u?("$attrs"===t&&track(e.attrs,"get",""),u(e)):(d=a.__cssModules)&&(d=d[t])?d:n!==EMPTY_OBJ&&hasOwn(n,t)?(i[t]=4,n[t]):(p=c.config.globalProperties,hasOwn(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return hasSetupBinding(s,t)?(s[t]=n,!0):r!==EMPTY_OBJ&&hasOwn(r,t)?(r[t]=n,!0):!hasOwn(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(o[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:o,type:i}},a){let c,l;return!!(n[a]||e!==EMPTY_OBJ&&"$"!==a[0]&&hasOwn(e,a)||hasSetupBinding(t,a)||(c=o[0])&&hasOwn(c,a)||hasOwn(r,a)||hasOwn(publicPropertiesMap,a)||hasOwn(s.config.globalProperties,a)||(l=i.__cssModules)&&l[a])},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:hasOwn(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function normalizePropsOrEmits(e){return isArray$2(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}let shouldCacheAccess=!0;function applyOptions(e){const t=resolveMergedOptions(e),n=e.proxy,r=e.ctx;shouldCacheAccess=!1,t.beforeCreate&&callHook(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:a,provide:c,inject:l,created:u,beforeMount:d,mounted:p,beforeUpdate:h,updated:f,activated:g,deactivated:m,beforeDestroy:y,beforeUnmount:b,destroyed:v,unmounted:S,render:E,renderTracked:T,renderTriggered:_,errorCaptured:A,serverPrefetch:O,expose:$,inheritAttrs:w,components:C,directives:R,filters:x}=t;if(l&&resolveInjections(l,r,null),i)for(const k in i){const e=i[k];isFunction$2(e)&&(r[k]=e.bind(n))}if(s){const t=s.call(n,n);isObject$4(t)&&(e.data=reactive(t))}if(shouldCacheAccess=!0,o)for(const k in o){const e=o[k],t=isFunction$2(e)?e.bind(n,n):isFunction$2(e.get)?e.get.bind(n,n):NOOP,s=!isFunction$2(e)&&isFunction$2(e.set)?e.set.bind(n):NOOP,i=computed({get:t,set:s});Object.defineProperty(r,k,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(a)for(const k in a)createWatcher(a[k],r,n,k);if(c){const e=isFunction$2(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{provide(t,e[t])})}function P(e,t){isArray$2(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(u&&callHook(u,e,"c"),P(onBeforeMount,d),P(onMounted,p),P(onBeforeUpdate,h),P(onUpdated,f),P(onActivated,g),P(onDeactivated,m),P(onErrorCaptured,A),P(onRenderTracked,T),P(onRenderTriggered,_),P(onBeforeUnmount,b),P(onUnmounted,S),P(onServerPrefetch,O),isArray$2($))if($.length){const t=e.exposed||(e.exposed={});$.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||(e.exposed={});E&&e.render===NOOP&&(e.render=E),null!=w&&(e.inheritAttrs=w),C&&(e.components=C),R&&(e.directives=R),O&&markAsyncBoundary(e)}function resolveInjections(e,t,n=NOOP){isArray$2(e)&&(e=normalizeInject(e));for(const r in e){const n=e[r];let s;s=isObject$4(n)?"default"in n?inject(n.from||r,n.default,!0):inject(n.from||r):inject(n),isRef(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[r]=s}}function callHook(e,t,n){callWithAsyncErrorHandling(isArray$2(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function createWatcher(e,t,n,r){let s=r.includes(".")?createPathGetter(n,r):()=>n[r];if(isString$1(e)){const n=t[e];isFunction$2(n)&&watch(s,n)}else if(isFunction$2(e))watch(s,e.bind(n));else if(isObject$4(e))if(isArray$2(e))e.forEach(e=>createWatcher(e,t,n,r));else{const r=isFunction$2(e.handler)?e.handler.bind(n):t[e.handler];isFunction$2(r)&&watch(s,r,e)}}function resolveMergedOptions(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,a=o.get(t);let c;return a?c=a:s.length||n||r?(c={},s.length&&s.forEach(e=>mergeOptions(c,e,i,!0)),mergeOptions(c,t,i)):c=t,isObject$4(t)&&o.set(t,c),c}function mergeOptions(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&mergeOptions(e,o,n,!0),s&&s.forEach(t=>mergeOptions(e,t,n,!0));for(const i in t)if(r&&"expose"===i);else{const r=internalOptionMergeStrats[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(e,t){return t?e?function(){return extend$1(isFunction$2(e)?e.call(this,this):e,isFunction$2(t)?t.call(this,this):t)}:t:e}function mergeInject(e,t){return mergeObjectOptions(normalizeInject(e),normalizeInject(t))}function normalizeInject(e){if(isArray$2(e)){const t={};for(let n=0;n(s.has(e)||(e&&isFunction$2(e.install)?(s.add(e),e.install(a,...t)):isFunction$2(e)&&(s.add(e),e(a,...t))),a),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),a),component:(e,t)=>t?(r.components[e]=t,a):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,a):r.directives[e],mount(s,o,c){if(!i){const o=a._ceVNode||createVNode(t,n);return o.appContext=r,!0===c?c="svg":!1===c&&(c=void 0),e(o,s,c),i=!0,a._container=s,s.__vue_app__=a,getComponentPublicInstance(o.component)}},onUnmount(e){o.push(e)},unmount(){i&&(callWithAsyncErrorHandling(o,a._instance,16),e(null,a._container),delete a._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,a),runWithContext(e){const t=currentApp;currentApp=a;try{return e()}finally{currentApp=t}}};return a}}let currentApp=null;function provide(e,t){if(currentInstance){let n=currentInstance.provides;const r=currentInstance.parent&¤tInstance.parent.provides;r===n&&(n=currentInstance.provides=Object.create(r)),n[e]=t}else;}function inject(e,t,n=!1){const r=getCurrentInstance();if(r||currentApp){let s=currentApp?currentApp._context.provides:r?null==r.parent||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&isFunction$2(t)?t.call(r&&r.proxy):t}}const internalObjectProto={},createInternalObject=()=>Object.create(internalObjectProto),isInternalObject=e=>Object.getPrototypeOf(e)===internalObjectProto;function initProps(e,t,n,r=!1){const s={},o=createInternalObject();e.propsDefaults=Object.create(null),setFullProps(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:shallowReactive(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function updateProps(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,a=toRaw(s),[c]=e.propsOptions;let l=!1;if(!(r||i>0)||16&i){let r;setFullProps(e,t,s,o)&&(l=!0);for(const o in a)t&&(hasOwn(t,o)||(r=hyphenate(o))!==o&&hasOwn(t,r))||(c?!n||void 0===n[o]&&void 0===n[r]||(s[o]=resolvePropValue(c,a,o,void 0,e,!0)):delete s[o]);if(o!==a)for(const e in o)t&&hasOwn(t,e)||(delete o[e],l=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let r=0;r{c=!0;const[n,r]=normalizePropsOptions(e,t,!0);extend$1(i,n),r&&a.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!o&&!c)return isObject$4(e)&&r.set(e,EMPTY_ARR),EMPTY_ARR;if(isArray$2(o))for(let u=0;u"_"===e||"_ctx"===e||"$stable"===e,normalizeSlotValue=e=>isArray$2(e)?e.map(normalizeVNode):[normalizeVNode(e)],normalizeSlot=(e,t,n)=>{if(t._n)return t;const r=withCtx((...e)=>normalizeSlotValue(t(...e)),n);return r._c=!1,r},normalizeObjectSlots=(e,t,n)=>{const r=e._ctx;for(const s in e){if(isInternalKey(s))continue;const n=e[s];if(isFunction$2(n))t[s]=normalizeSlot(s,n,r);else if(null!=n){const e=normalizeSlotValue(n);t[s]=()=>e}}},normalizeVNodeSlots=(e,t)=>{const n=normalizeSlotValue(t);e.slots.default=()=>n},assignSlots=(e,t,n)=>{for(const r in t)!n&&isInternalKey(r)||(e[r]=t[r])},initSlots=(e,t,n)=>{const r=e.slots=createInternalObject();if(32&e.vnode.shapeFlag){const e=t._;e?(assignSlots(r,t,n),n&&def(r,"_",e,!0)):normalizeObjectSlots(t,r)}else t&&normalizeVNodeSlots(e,t)},updateSlots=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=EMPTY_OBJ;if(32&r.shapeFlag){const e=t._;e?n&&1===e?o=!1:assignSlots(s,t,n):(o=!t.$stable,normalizeObjectSlots(t,s)),i=t}else t&&(normalizeVNodeSlots(e,t),i={default:1});if(o)for(const a in s)isInternalKey(a)||null!=i[a]||delete s[a]},queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(e){return baseCreateRenderer(e)}function baseCreateRenderer(e,t){getGlobalThis().__VUE__=!0;const{insert:n,remove:r,patchProp:s,createElement:o,createText:i,createComment:a,setText:c,setElementText:l,parentNode:u,nextSibling:d,setScopeId:p=NOOP,insertStaticContent:h}=e,f=(e,t,n,r=null,s=null,o=null,i=void 0,a=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!isSameVNodeType(e,t)&&(r=B(e),j(e,s,o,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:l,ref:u,shapeFlag:d}=t;switch(l){case Text:g(e,t,n,r);break;case Comment:m(e,t,n,r);break;case Static:null==e&&y(t,n,r,i);break;case Fragment:O(e,t,n,r,s,o,i,a,c);break;default:1&d?b(e,t,n,r,s,o,i,a,c):6&d?$(e,t,n,r,s,o,i,a,c):(64&d||128&d)&&l.process(e,t,n,r,s,o,i,a,c,V)}null!=u&&s?setRef(u,e&&e.ref,o,t||e,!t):null==u&&e&&null!=e.ref&&setRef(e.ref,null,o,e,!0)},g=(e,t,r,s)=>{if(null==e)n(t.el=i(t.children),r,s);else{const n=t.el=e.el;t.children!==e.children&&c(n,t.children)}},m=(e,t,r,s)=>{null==e?n(t.el=a(t.children||""),r,s):t.el=e.el},y=(e,t,n,r)=>{[e.el,e.anchor]=h(e.children,t,n,r,e.el,e.anchor)},b=(e,t,n,r,s,o,i,a,c)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?v(t,n,r,s,o,i,a,c):T(e,t,s,o,i,a,c)},v=(e,t,r,i,a,c,u,d)=>{let p,h;const{props:f,shapeFlag:g,transition:m,dirs:y}=e;if(p=e.el=o(e.type,c,f&&f.is,f),8&g?l(p,e.children):16&g&&E(e.children,p,null,i,a,resolveChildrenNamespace(e,c),u,d),y&&invokeDirectiveHook(e,null,i,"created"),S(p,e,e.scopeId,u,i),f){for(const e in f)"value"===e||isReservedProp(e)||s(p,e,null,f[e],c,i);"value"in f&&s(p,"value",null,f.value,c),(h=f.onVnodeBeforeMount)&&invokeVNodeHook(h,i,e)}y&&invokeDirectiveHook(e,null,i,"beforeMount");const b=needTransition(a,m);b&&m.beforeEnter(p),n(p,t,r),((h=f&&f.onVnodeMounted)||b||y)&&queuePostRenderEffect(()=>{h&&invokeVNodeHook(h,i,e),b&&m.enter(p),y&&invokeDirectiveHook(e,null,i,"mounted")},a)},S=(e,t,n,r,s)=>{if(n&&p(e,n),r)for(let o=0;o{for(let l=c;l{const c=t.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:p}=t;u|=16&e.patchFlag;const h=e.props||EMPTY_OBJ,f=t.props||EMPTY_OBJ;let g;if(n&&toggleRecurse(n,!1),(g=f.onVnodeBeforeUpdate)&&invokeVNodeHook(g,n,t,e),p&&invokeDirectiveHook(t,e,n,"beforeUpdate"),n&&toggleRecurse(n,!0),(h.innerHTML&&null==f.innerHTML||h.textContent&&null==f.textContent)&&l(c,""),d?_(e.dynamicChildren,d,c,n,r,resolveChildrenNamespace(t,o),i):a||P(e,t,c,null,n,r,resolveChildrenNamespace(t,o),i,!1),u>0){if(16&u)A(c,h,f,n,o);else if(2&u&&h.class!==f.class&&s(c,"class",null,f.class,o),4&u&&s(c,"style",h.style,f.style,o),8&u){const e=t.dynamicProps;for(let t=0;t{g&&invokeVNodeHook(g,n,t,e),p&&invokeDirectiveHook(t,e,n,"updated")},r)},_=(e,t,n,r,s,o,i)=>{for(let a=0;a{if(t!==n){if(t!==EMPTY_OBJ)for(const i in t)isReservedProp(i)||i in n||s(e,i,t[i],null,o,r);for(const i in n){if(isReservedProp(i))continue;const a=n[i],c=t[i];a!==c&&"value"!==i&&s(e,i,c,a,o,r)}"value"in n&&s(e,"value",t.value,n.value,o)}},O=(e,t,r,s,o,a,c,l,u)=>{const d=t.el=e?e.el:i(""),p=t.anchor=e?e.anchor:i("");let{patchFlag:h,dynamicChildren:f,slotScopeIds:g}=t;g&&(l=l?l.concat(g):g),null==e?(n(d,r,s),n(p,r,s),E(t.children||[],r,p,o,a,c,l,u)):h>0&&64&h&&f&&e.dynamicChildren?(_(e.dynamicChildren,f,r,o,a,c,l),(null!=t.key||o&&t===o.subTree)&&traverseStaticChildren(e,t,!0)):P(e,t,r,p,o,a,c,l,u)},$=(e,t,n,r,s,o,i,a,c)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?s.ctx.activate(t,n,r,i,c):w(t,n,r,s,o,i,c):C(e,t,c)},w=(e,t,n,r,s,o,i)=>{const a=e.component=createComponentInstance(e,r,s);if(isKeepAlive(e)&&(a.ctx.renderer=V),setupComponent(a,!1,i),a.asyncDep){if(s&&s.registerDep(a,R,i),!e.el){const r=a.subTree=createVNode(Comment);m(null,r,t,n),e.placeholder=r.el}}else R(a,e,t,n,s,o,i)},C=(e,t,n)=>{const r=t.component=e.component;if(shouldUpdateComponent(e,t,n)){if(r.asyncDep&&!r.asyncResolved)return void x(r,t,n);r.next=t,r.update()}else t.el=e.el,r.vnode=t},R=(e,t,n,r,s,o,i)=>{const a=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:c,vnode:l}=e;{const n=locateNonHydratedAsyncRoot(e);if(n)return t&&(t.el=l.el,x(e,t,i)),void n.asyncDep.then(()=>{e.isUnmounted||a()})}let d,p=t;toggleRecurse(e,!1),t?(t.el=l.el,x(e,t,i)):t=l,n&&invokeArrayFns(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&invokeVNodeHook(d,c,t,l),toggleRecurse(e,!0);const h=renderComponentRoot(e),g=e.subTree;e.subTree=h,f(g,h,u(g.el),B(g),e,s,o),t.el=h.el,null===p&&updateHOCHostEl(e,h.el),r&&queuePostRenderEffect(r,s),(d=t.props&&t.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(d,c,t,l),s)}else{let i;const{el:a,props:c}=t,{bm:l,m:u,parent:d,root:p,type:h}=e,g=isAsyncWrapper(t);toggleRecurse(e,!1),l&&invokeArrayFns(l),!g&&(i=c&&c.onVnodeBeforeMount)&&invokeVNodeHook(i,d,t),toggleRecurse(e,!0);{p.ce&&!1!==p.ce._def.shadowRoot&&p.ce._injectChildStyle(h);const i=e.subTree=renderComponentRoot(e);f(null,i,n,r,e,s,o),t.el=i.el}if(u&&queuePostRenderEffect(u,s),!g&&(i=c&&c.onVnodeMounted)){const e=t;queuePostRenderEffect(()=>invokeVNodeHook(i,d,e),s)}(256&t.shapeFlag||d&&isAsyncWrapper(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&queuePostRenderEffect(e.a,s),e.isMounted=!0,t=n=r=null}};e.scope.on();const c=e.effect=new ReactiveEffect(a);e.scope.off();const l=e.update=c.run.bind(c),d=e.job=c.runIfDirty.bind(c);d.i=e,d.id=e.uid,c.scheduler=()=>queueJob(d),toggleRecurse(e,!0),l()},x=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,updateProps(e,t.props,r,n),updateSlots(e,t.children,n),pauseTracking(),flushPreFlushCbs(e),resetTracking()},P=(e,t,n,r,s,o,i,a,c=!1)=>{const u=e&&e.children,d=e?e.shapeFlag:0,p=t.children,{patchFlag:h,shapeFlag:f}=t;if(h>0){if(128&h)return void I(u,p,n,r,s,o,i,a,c);if(256&h)return void k(u,p,n,r,s,o,i,a,c)}8&f?(16&d&&L(u,s,o),p!==u&&l(n,p)):16&d?16&f?I(u,p,n,r,s,o,i,a,c):L(u,s,o,!0):(8&d&&l(n,""),16&f&&E(p,n,r,s,o,i,a,c))},k=(e,t,n,r,s,o,i,a,c)=>{t=t||EMPTY_ARR;const l=(e=e||EMPTY_ARR).length,u=t.length,d=Math.min(l,u);let p;for(p=0;pu?L(e,s,o,!0,!1,d):E(t,n,r,s,o,i,a,c,d)},I=(e,t,n,r,s,o,i,a,c)=>{let l=0;const u=t.length;let d=e.length-1,p=u-1;for(;l<=d&&l<=p;){const r=e[l],u=t[l]=c?cloneIfMounted(t[l]):normalizeVNode(t[l]);if(!isSameVNodeType(r,u))break;f(r,u,n,null,s,o,i,a,c),l++}for(;l<=d&&l<=p;){const r=e[d],l=t[p]=c?cloneIfMounted(t[p]):normalizeVNode(t[p]);if(!isSameVNodeType(r,l))break;f(r,l,n,null,s,o,i,a,c),d--,p--}if(l>d){if(l<=p){const e=p+1,d=ep)for(;l<=d;)j(e[l],s,o,!0),l++;else{const h=l,g=l,m=new Map;for(l=g;l<=p;l++){const e=t[l]=c?cloneIfMounted(t[l]):normalizeVNode(t[l]);null!=e.key&&m.set(e.key,l)}let y,b=0;const v=p-g+1;let S=!1,E=0;const T=new Array(v);for(l=0;l=v){j(r,s,o,!0);continue}let u;if(null!=r.key)u=m.get(r.key);else for(y=g;y<=p;y++)if(0===T[y-g]&&isSameVNodeType(r,t[y])){u=y;break}void 0===u?j(r,s,o,!0):(T[u-g]=l+1,u>=E?E=u:S=!0,f(r,t[u],n,null,s,o,i,a,c),b++)}const _=S?getSequence(T):EMPTY_ARR;for(y=_.length-1,l=v-1;l>=0;l--){const e=g+l,d=t[e],p=t[e+1],h=e+1{const{el:a,type:c,transition:l,children:u,shapeFlag:p}=e;if(6&p)return void D(e.component.subTree,t,s,o);if(128&p)return void e.suspense.move(t,s,o);if(64&p)return void c.move(e,t,s,V);if(c===Fragment){n(a,t,s);for(let e=0;e{let o;for(;e&&e!==t;)o=d(e),n(e,r,s),e=o;n(t,r,s)})(e,t,s);if(2!==o&&1&p&&l)if(0===o)l.beforeEnter(a),n(a,t,s),queuePostRenderEffect(()=>l.enter(a),i);else{const{leave:o,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?r(a):n(a,t,s)},d=()=>{a._isLeaving&&a[leaveCbKey](!0),o(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}else n(a,t,s)},j=(e,t,n,r=!1,s=!1)=>{const{type:o,props:i,ref:a,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:p,cacheIndex:h}=e;if(-2===d&&(s=!1),null!=a&&(pauseTracking(),setRef(a,null,n,e,!0),resetTracking()),null!=h&&(t.renderCache[h]=void 0),256&u)return void t.ctx.deactivate(e);const f=1&u&&p,g=!isAsyncWrapper(e);let m;if(g&&(m=i&&i.onVnodeBeforeUnmount)&&invokeVNodeHook(m,t,e),6&u)F(e.component,n,r);else{if(128&u)return void e.suspense.unmount(n,r);f&&invokeDirectiveHook(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,V,r):l&&!l.hasOnce&&(o!==Fragment||d>0&&64&d)?L(l,t,n,!1,!0):(o===Fragment&&384&d||!s&&16&u)&&L(c,t,n),r&&N(e)}(g&&(m=i&&i.onVnodeUnmounted)||f)&&queuePostRenderEffect(()=>{m&&invokeVNodeHook(m,t,e),f&&invokeDirectiveHook(e,null,t,"unmounted")},n)},N=e=>{const{type:t,el:n,anchor:s,transition:o}=e;if(t===Fragment)return void M(n,s);if(t===Static)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=d(e),r(e),e=n;r(t)})(e);const i=()=>{r(n),o&&!o.persisted&&o.afterLeave&&o.afterLeave()};if(1&e.shapeFlag&&o&&!o.persisted){const{leave:t,delayLeave:r}=o,s=()=>t(n,i);r?r(e.el,i,s):s()}else i()},M=(e,t)=>{let n;for(;e!==t;)n=d(e),r(e),e=n;r(t)},F=(e,t,n)=>{const{bum:r,scope:s,job:o,subTree:i,um:a,m:c,a:l}=e;invalidateMount(c),invalidateMount(l),r&&invokeArrayFns(r),s.stop(),o&&(o.flags|=8,j(i,e,t,n)),a&&queuePostRenderEffect(a,t),queuePostRenderEffect(()=>{e.isUnmounted=!0},t)},L=(e,t,n,r=!1,s=!1,o=0)=>{for(let i=o;i{if(6&e.shapeFlag)return B(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=d(e.anchor||e.el),n=t&&t[TeleportEndKey];return n?d(n):t};let H=!1;const U=(e,t,n)=>{null==e?t._vnode&&j(t._vnode,null,null,!0):f(t._vnode||null,e,t,null,null,null,n),t._vnode=e,H||(H=!0,flushPreFlushCbs(),flushPostFlushCbs(),H=!1)},V={p:f,um:j,m:D,r:N,mt:w,mc:E,pc:P,pbc:_,n:B,o:e};return{render:U,hydrate:undefined,createApp:createAppAPI(U)}}function resolveChildrenNamespace({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function toggleRecurse({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function needTransition(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function traverseStaticChildren(e,t,n=!1){const r=e.children,s=t.children;if(isArray$2(r)&&isArray$2(s))for(let o=0;o>1,e[n[a]]0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function locateNonHydratedAsyncRoot(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:locateNonHydratedAsyncRoot(t)}function invalidateMount(e){if(e)for(let t=0;tinject(ssrContextKey);function watchEffect(e,t){return doWatch(e,null,t)}function watch(e,t,n){return doWatch(e,t,n)}function doWatch(e,t,n=EMPTY_OBJ){const{immediate:r,deep:s,flush:o,once:i}=n,a=extend$1({},n),c=t&&r||!t&&"post"!==o;let l;if(isInSSRComponentSetup)if("sync"===o){const e=useSSRContext();l=e.__watcherHandles||(e.__watcherHandles=[])}else if(!c){const e=()=>{};return e.stop=NOOP,e.resume=NOOP,e.pause=NOOP,e}const u=currentInstance;a.call=(e,t,n)=>callWithAsyncErrorHandling(e,u,t,n);let d=!1;"post"===o?a.scheduler=e=>{queuePostRenderEffect(e,u&&u.suspense)}:"sync"!==o&&(d=!0,a.scheduler=(e,t)=>{t?e():queueJob(e)}),a.augmentJob=e=>{t&&(e.flags|=4),d&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};const p=watch$1(e,t,a);return isInSSRComponentSetup&&(l?l.push(p):c&&p()),p}function instanceWatch(e,t,n){const r=this.proxy,s=isString$1(e)?e.includes(".")?createPathGetter(r,e):()=>r[e]:e.bind(r,r);let o;isFunction$2(t)?o=t:(o=t.handler,n=t);const i=setCurrentInstance(this),a=doWatch(s,o.bind(r),n);return i(),a}function createPathGetter(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${camelize(t)}Modifiers`]||e[`${hyphenate(t)}Modifiers`];function emit(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||EMPTY_OBJ;let s=n;const o=t.startsWith("update:"),i=o&&getModelModifiers(r,t.slice(7));let a;i&&(i.trim&&(s=n.map(e=>isString$1(e)?e.trim():e)),i.number&&(s=n.map(looseToNumber)));let c=r[a=toHandlerKey(t)]||r[a=toHandlerKey(camelize(t))];!c&&o&&(c=r[a=toHandlerKey(hyphenate(t))]),c&&callWithAsyncErrorHandling(c,e,6,s);const l=r[a+"Once"];if(l){if(e.emitted){if(e.emitted[a])return}else e.emitted={};e.emitted[a]=!0,callWithAsyncErrorHandling(l,e,6,s)}}const mixinEmitsCache=new WeakMap;function normalizeEmitsOptions(e,t,n=!1){const r=n?mixinEmitsCache:t.emitsCache,s=r.get(e);if(void 0!==s)return s;const o=e.emits;let i={},a=!1;if(!isFunction$2(e)){const r=e=>{const n=normalizeEmitsOptions(e,t,!0);n&&(a=!0,extend$1(i,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return o||a?(isArray$2(o)?o.forEach(e=>i[e]=null):extend$1(i,o),isObject$4(e)&&r.set(e,i),i):(isObject$4(e)&&r.set(e,null),null)}function isEmitListener(e,t){return!(!e||!isOn(t))&&(t=t.slice(2).replace(/Once$/,""),hasOwn(e,t[0].toLowerCase()+t.slice(1))||hasOwn(e,hyphenate(t))||hasOwn(e,t))}function markAttrsAccessed(){}function renderComponentRoot(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:a,emit:c,render:l,renderCache:u,props:d,data:p,setupState:h,ctx:f,inheritAttrs:g}=e,m=setCurrentRenderingInstance(e);let y,b;try{if(4&n.shapeFlag){const e=s||r,t=e;y=normalizeVNode(l.call(t,e,u,d,h,p,f)),b=a}else{const e=t;0,y=normalizeVNode(e.length>1?e(d,{attrs:a,slots:i,emit:c}):e(d,null)),b=t.props?a:getFunctionalFallthrough(a)}}catch(S){blockStack.length=0,handleError(S,e,1),y=createVNode(Comment)}let v=y;if(b&&!1!==g){const e=Object.keys(b),{shapeFlag:t}=v;e.length&&7&t&&(o&&e.some(isModelListener)&&(b=filterModelListeners(b,o)),v=cloneVNode(v,b,!1,!0))}return n.dirs&&(v=cloneVNode(v,null,!1,!0),v.dirs=v.dirs?v.dirs.concat(n.dirs):n.dirs),n.transition&&setTransitionHooks(v,n.transition),y=v,setCurrentRenderingInstance(m),y}const getFunctionalFallthrough=e=>{let t;for(const n in e)("class"===n||"style"===n||isOn(n))&&((t||(t={}))[n]=e[n]);return t},filterModelListeners=(e,t)=>{const n={};for(const r in e)isModelListener(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function shouldUpdateComponent(e,t,n){const{props:r,children:s,component:o}=e,{props:i,children:a,patchFlag:c}=t,l=o.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!s&&!a||a&&a.$stable)||r!==i&&(r?!i||hasPropsChanged(r,i,l):!!i);if(1024&c)return!0;if(16&c)return r?hasPropsChanged(r,i,l):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;te.__isSuspense;function queueEffectWithSuspense(e,t){t&&t.pendingBranch?isArray$2(e)?t.effects.push(...e):t.effects.push(e):queuePostFlushCb(e)}const Fragment=exports("F",Symbol.for("v-fgt")),Text=Symbol.for("v-txt"),Comment=Symbol.for("v-cmt"),Static=Symbol.for("v-stc"),blockStack=[];let currentBlock=null;function openBlock(e=!1){blockStack.push(currentBlock=e?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(e,t=!1){isBlockTreeEnabled+=e,e<0&¤tBlock&&t&&(currentBlock.hasOnce=!0)}function setupBlock(e){return e.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(e),e}function createElementBlock(e,t,n,r,s,o){return setupBlock(createBaseVNode(e,t,n,r,s,o,!0))}function createBlock(e,t,n,r,s){return setupBlock(createVNode(e,t,n,r,s,!0))}function isVNode(e){return!!e&&!0===e.__v_isVNode}function isSameVNodeType(e,t){return e.type===t.type&&e.key===t.key}const normalizeKey=({key:e})=>null!=e?e:null,normalizeRef=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?isString$1(e)||isRef(e)||isFunction$2(e)?{i:currentRenderingInstance,r:e,k:t,f:!!n}:e:null);function createBaseVNode(e,t=null,n=null,r=0,s=null,o=(e===Fragment?0:1),i=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&normalizeKey(t),ref:t&&normalizeRef(t),scopeId:currentScopeId,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return a?(normalizeChildren(c,n),128&o&&e.normalize(c)):n&&(c.shapeFlag|=isString$1(n)?8:16),isBlockTreeEnabled>0&&!i&¤tBlock&&(c.patchFlag>0||6&o)&&32!==c.patchFlag&¤tBlock.push(c),c}const createVNode=_createVNode;function _createVNode(e,t=null,n=null,r=0,s=null,o=!1){if(e&&e!==NULL_DYNAMIC_COMPONENT||(e=Comment),isVNode(e)){const r=cloneVNode(e,t,!0);return n&&normalizeChildren(r,n),isBlockTreeEnabled>0&&!o&¤tBlock&&(6&r.shapeFlag?currentBlock[currentBlock.indexOf(e)]=r:currentBlock.push(r)),r.patchFlag=-2,r}if(isClassComponent(e)&&(e=e.__vccOpts),t){t=guardReactiveProps(t);let{class:e,style:n}=t;e&&!isString$1(e)&&(t.class=normalizeClass(e)),isObject$4(n)&&(isProxy(n)&&!isArray$2(n)&&(n=extend$1({},n)),t.style=normalizeStyle(n))}return createBaseVNode(e,t,n,r,s,isString$1(e)?1:isSuspense(e)?128:isTeleport(e)?64:isObject$4(e)?4:isFunction$2(e)?2:0,o,!0)}function guardReactiveProps(e){return e?isProxy(e)||isInternalObject(e)?extend$1({},e):e:null}function cloneVNode(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:a,transition:c}=e,l=t?mergeProps(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&normalizeKey(l),ref:t&&t.ref?n&&o?isArray$2(o)?o.concat(normalizeRef(t)):[o,normalizeRef(t)]:normalizeRef(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Fragment?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&cloneVNode(e.ssContent),ssFallback:e.ssFallback&&cloneVNode(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&setTransitionHooks(u,c.clone(u)),u}function createTextVNode(e=" ",t=0){return createVNode(Text,null,e,t)}function createCommentVNode(e="",t=!1){return t?(openBlock(),createBlock(Comment,null,e)):createVNode(Comment,null,e)}function normalizeVNode(e){return null==e||"boolean"==typeof e?createVNode(Comment):isArray$2(e)?createVNode(Fragment,null,e.slice()):isVNode(e)?cloneIfMounted(e):createVNode(Text,null,String(e))}function cloneIfMounted(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:cloneVNode(e)}function normalizeChildren(e,t){let n=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(isArray$2(t))n=16;else if("object"==typeof t){if(65&r){const n=t.default;return void(n&&(n._c&&(n._d=!1),normalizeChildren(e,n()),n._c&&(n._d=!0)))}{n=32;const r=t._;r||isInternalObject(t)?3===r&¤tRenderingInstance&&(1===currentRenderingInstance.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=currentRenderingInstance}}else isFunction$2(t)?(t={default:t,_ctx:currentRenderingInstance},n=32):(t=String(t),64&r?(n=16,t=[createTextVNode(t)]):n=8);e.children=t,e.shapeFlag|=n}function mergeProps(...e){const t={};for(let n=0;ncurrentInstance||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{const e=getGlobalThis(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};internalSetCurrentInstance=t("__VUE_INSTANCE_SETTERS__",e=>currentInstance=e),setInSSRSetupState=t("__VUE_SSR_SETTERS__",e=>isInSSRComponentSetup=e)}const setCurrentInstance=e=>{const t=currentInstance;return internalSetCurrentInstance(e),e.scope.on(),()=>{e.scope.off(),internalSetCurrentInstance(t)}},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(e){return 4&e.vnode.shapeFlag}let isInSSRComponentSetup=!1;function setupComponent(e,t=!1,n=!1){t&&setInSSRSetupState(t);const{props:r,children:s}=e.vnode,o=isStatefulComponent(e);initProps(e,r,o,t),initSlots(e,s,n||t);const i=o?setupStatefulComponent(e,t):void 0;return t&&setInSSRSetupState(!1),i}function setupStatefulComponent(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,PublicInstanceProxyHandlers);const{setup:r}=n;if(r){pauseTracking();const n=e.setupContext=r.length>1?createSetupContext(e):null,s=setCurrentInstance(e),o=callWithErrorHandling(r,e,0,[e.props,n]),i=isPromise(o);if(resetTracking(),s(),!i&&!e.sp||isAsyncWrapper(e)||markAsyncBoundary(e),i){if(o.then(unsetCurrentInstance,unsetCurrentInstance),t)return o.then(t=>{handleSetupResult(e,t)}).catch(t=>{handleError(t,e,0)});e.asyncDep=o}else handleSetupResult(e,o)}else finishComponentSetup(e)}function handleSetupResult(e,t,n){isFunction$2(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:isObject$4(t)&&(e.setupState=proxyRefs(t)),finishComponentSetup(e)}function finishComponentSetup(e,t,n){const r=e.type;e.render||(e.render=r.render||NOOP);{const t=setCurrentInstance(e);pauseTracking();try{applyOptions(e)}finally{resetTracking(),t()}}}const attrsProxyHandlers={get:(e,t)=>(track(e,"get",""),e[t])};function createSetupContext(e){const t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,attrsProxyHandlers),slots:e.slots,emit:e.emit,expose:t}}function getComponentPublicInstance(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(proxyRefs(markRaw(e.exposed)),{get:(t,n)=>n in t?t[n]:n in publicPropertiesMap?publicPropertiesMap[n](e):void 0,has:(e,t)=>t in e||t in publicPropertiesMap})):e.proxy}const classifyRE=/(?:^|[-_])\w/g,classify=e=>e.replace(classifyRE,e=>e.toUpperCase()).replace(/[-_]/g,"");function getComponentName(e,t=!0){return isFunction$2(e)?e.displayName||e.name:e.name||t&&e.__name}function formatComponentName(e,t,n=!1){let r=getComponentName(t);if(!r&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(r=e[1])}if(!r&&e&&e.parent){const n=e=>{for(const n in e)if(e[n]===t)return n};r=n(e.components||e.parent.type.components)||n(e.appContext.components)}return r?classify(r):n?"App":"Anonymous"}function isClassComponent(e){return isFunction$2(e)&&"__vccOpts"in e}const computed=exports("k",(e,t)=>computed$1(e,t,isInSSRComponentSetup));function h(e,t,n){const r=(e,t,n)=>{setBlockTracking(-1);try{return createVNode(e,t,n)}finally{setBlockTracking(1)}},s=arguments.length;return 2===s?isObject$4(t)&&!isArray$2(t)?isVNode(t)?r(e,null,[t]):r(e,t):r(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):3===s&&isVNode(n)&&(n=[n]),r(e,t,n))}const version="3.5.21"; /** * @vue/runtime-dom v3.5.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let policy;const tt="undefined"!=typeof window&&window.trustedTypes;if(tt)try{policy=tt.createPolicy("vue",{createHTML:e=>e})}catch(e){}const unsafeToTrustedHTML=policy?e=>policy.createHTML(e):e=>e,svgNS="http://www.w3.org/2000/svg",mathmlNS="http://www.w3.org/1998/Math/MathML",doc="undefined"!=typeof document?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={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 s="svg"===t?doc.createElementNS(svgNS,e):"mathml"===t?doc.createElementNS(mathmlNS,e):n?doc.createElement(e,{is:n}):doc.createElement(e);return"select"===e&&r&&null!=r.multiple&&s.setAttribute("multiple",r.multiple),s},createText:e=>doc.createTextNode(e),createComment:e=>doc.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>doc.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),s!==o&&(s=s.nextSibling););else{templateContainer.innerHTML=unsafeToTrustedHTML("svg"===r?`${e}`:"mathml"===r?`${e}`:e);const s=templateContainer.content;if("svg"===r||"mathml"===r){const e=s.firstChild;for(;e.firstChild;)s.appendChild(e.firstChild);s.removeChild(e)}t.insertBefore(s,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},vtcKey=Symbol("_vtc");function patchClass(e,t,n){const r=e[vtcKey];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const vShowOriginalDisplay=Symbol("_vod"),vShowHidden=Symbol("_vsh"),CSS_VAR_TEXT=Symbol(""),displayRE=/(?:^|;)\s*display\s*:/;function patchStyle(e,t,n){const r=e.style,s=isString$1(n);let o=!1;if(n&&!s){if(t)if(isString$1(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&setStyle(r,t,"")}else for(const e in t)null==n[e]&&setStyle(r,e,"");for(const e in n)"display"===e&&(o=!0),setStyle(r,e,n[e])}else if(s){if(t!==n){const e=r[CSS_VAR_TEXT];e&&(n+=";"+e),r.cssText=n,o=displayRE.test(n)}}else t&&e.removeAttribute("style");vShowOriginalDisplay in e&&(e[vShowOriginalDisplay]=o?r.display:"",e[vShowHidden]&&(r.display="none"))}const importantRE=/\s*!important$/;function setStyle(e,t,n){if(isArray$2(n))n.forEach(n=>setStyle(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=autoPrefix(e,t);importantRE.test(n)?e.setProperty(hyphenate(r),n.replace(importantRE,""),"important"):e[r]=n}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(e,t){const n=prefixCache[t];if(n)return n;let r=camelize(t);if("filter"!==r&&r in e)return prefixCache[t]=r;r=capitalize(r);for(let s=0;scachedNow||(p.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();callWithAsyncErrorHandling(patchStopImmediatePropagation(e,n.value),t,5,[e])};return n.value=e,n.attached=getNow(),n}function patchStopImmediatePropagation(e,t){if(isArray$2(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}return t}const isNativeOn=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,patchProp=(e,t,n,r,s,o)=>{const i="svg"===s;"class"===t?patchClass(e,r,i):"style"===t?patchStyle(e,n,r):isOn(t)?isModelListener(t)||patchEvent(e,t,n,r,o):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):shouldSetAsProp(e,t,r,i))?(patchDOMProp(e,t,r),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||patchAttr(e,t,r,i,o,"value"!==t)):!e._isVueCE||!/[A-Z]/.test(t)&&isString$1(r)?("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),patchAttr(e,t,r,i)):patchDOMProp(e,camelize(t),r,o,t)};function shouldSetAsProp(e,t,n,r){if(r)return"innerHTML"===t||"textContent"===t||!!(t in e&&isNativeOn(t)&&isFunction$2(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"autocorrect"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return(!isNativeOn(t)||!isString$1(n))&&t in e}const rendererOptions=extend$1({patchProp:patchProp},nodeOps);let renderer;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}const createApp=(...e)=>{const t=ensureRenderer().createApp(...e),{mount:n}=t;return t.mount=e=>{const r=normalizeContainer(e);if(!r)return;const s=t._component;isFunction$2(s)||s.render||s.template||(s.template=r.innerHTML),1===r.nodeType&&(r.textContent="");const o=n(r,!1,resolveRootNamespace(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function resolveRootNamespace(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function normalizeContainer(e){if(isString$1(e)){return document.querySelector(e)}return e}function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var e,t="object"==typeof Reflect?Reflect:null,n=t&&"function"==typeof t.apply?t.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}events.exports=s,events.exports.once=function(e,t){return new Promise(function(n,r){function s(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",s),n([].slice.call(arguments))}f(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&f(e,"error",t,n)}(e,s,{once:!0})})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function i(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function a(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var s,o,c,l;if(i(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),c=o[t]),void 0===c)c=o[t]=n,++e._eventsCount;else if("function"==typeof c?c=o[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(s=a(e))>0&&c.length>s&&!c.warned){c.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=c.length,l=u,console&&console.warn&&console.warn(l)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},s=l.bind(r);return s.listener=n,r.wrapFn=s,s}function d(e,t,n){var r=e._events;if(void 0===r)return[];var s=r[t];return void 0===s?[]:"function"==typeof s?n?[s.listener||s]:[s]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(i=t[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,u=h(c,l);for(r=0;r=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,s=o;break}if(s<0)return this;0===s?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return d(this,e,!0)},s.prototype.rawListeners=function(e){return d(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},events.exports}var eventsExports=requireEvents();const EventEmitter=getDefaultExportFromCjs(eventsExports);var freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),Symbol$1=root.Symbol,objectProto$d=Object.prototype,hasOwnProperty$b=objectProto$d.hasOwnProperty,nativeObjectToString$1=objectProto$d.toString,symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(t){var n=hasOwnProperty$b.call(t,symToStringTag$1),r=t[symToStringTag$1];try{t[symToStringTag$1]=void 0;var s=!0}catch(e){}var o=nativeObjectToString$1.call(t);return s&&(n?t[symToStringTag$1]=r:delete t[symToStringTag$1]),o}var objectProto$c=Object.prototype,nativeObjectToString=objectProto$c.toString;function objectToString(e){return nativeObjectToString.call(e)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}function isObjectLike(e){return null!=e&&"object"==typeof e}var symbolTag$2="[object Symbol]";function isSymbol(e){return"symbol"==typeof e||isObjectLike(e)&&baseGetTag(e)==symbolTag$2}function arrayMap(e,t){for(var n=-1,r=null==e?0:e.length,s=Array(r);++n0){if(++t>=HOT_COUNT)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function constant(e){return function(){return e}}var defineProperty=function(){try{var t=getNative(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),baseSetToString=defineProperty?function(e,t){return defineProperty(e,"toString",{configurable:!0,enumerable:!1,value:constant(t),writable:!0})}:identity,setToString=shortOut(baseSetToString);function arrayEach(e,t){for(var n=-1,r=null==e?0:e.length;++n-1}var MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(e,t){var n=typeof e;return!!(t=null==t?MAX_SAFE_INTEGER$1:t)&&("number"==n||"symbol"!=n&&reIsUint.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=MAX_SAFE_INTEGER}function isArrayLike(e){return null!=e&&isLength(e.length)&&!isFunction$1(e)}var objectProto$9=Object.prototype;function isPrototype(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||objectProto$9)}function baseTimes(e,t){for(var n=-1,r=Array(e);++n-1}function listCacheSet(e,t){var n=this.__data__,r=assocIndexOf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ListCache(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=LARGE_ARRAY_SIZE){var l=createSet(e);if(l)return setToArray(l);i=!1,s=cacheHas,c=new SetCache}else c=a;e:for(;++re.useInEditor)?.data||this.getDefaultData(),t=cloneDeep(this.mockData)}else if("boolean"==typeof e.useMock&&e.useMock){const n=cloneDeep(e.schema.mocks||[]);this.mockData=n.find(e=>e.enable)?.data,t=cloneDeep(this.mockData)||this.getDefaultData()}else{if(e.initialData)return this.#r=new n(e.initialData??{}),void(this.isInit=!0);t=this.getDefaultData()}this.#r=new n(t??{})}get id(){return this.#t}get type(){return this.#e}get schema(){return this.#n}get fields(){return this.#s}get methods(){return this.#o}setFields(e){this.#s=e}setMethods(e){this.#o=e}get data(){return this.#r.getData("")}setData(e,t){this.#r.update(e,t);const n={updateData:e,path:t};this.emit("change",n)}setValue(e,t){return this.setData(t,e)}onDataChange(e,t){this.#r.on(e,t)}offDataChange(e,t){this.#r.off(e,t)}getDefaultData(){return getDefaultValueFromFields(this.#s)}async init(){this.isInit=!0}destroy(){this.#s=[],this.removeAllListeners(),this.#r.destroy()}}const urlencoded=e=>Object.entries(e).reduce((e,[t,n])=>{let r=n;return"object"==typeof n&&(r=JSON.stringify(n)),void 0!==n?`${e}${e?"&":""}${globalThis.encodeURIComponent(t)}=${globalThis.encodeURIComponent(`${r}`)}`:e},""),webRequest=async e=>{const{url:t,method:n="GET",headers:r={},params:s={},data:o={},...i}=e,a=urlencoded(s);let c=JSON.stringify(o);r["Content-Type"]?.includes("application/x-www-form-urlencoded")&&(c=urlencoded(o));return(await globalThis.fetch(a?`${t}?${a}`:t,{method:n,headers:r,body:"GET"===n?void 0:c,...i})).json()};class HttpDataSource extends DataSource{isLoading=!1;error;httpOptions;#i;#a=[];#c=[];#e="http";constructor(e){const{options:t}=e.schema;super(e),this.httpOptions=t,"function"==typeof e.request?this.#i=e.request:"function"==typeof globalThis.fetch&&(this.#i=webRequest),this.methods.forEach(e=>{"function"==typeof e.content&&("beforeRequest"===e.timing&&this.#a.push(e.content),"afterRequest"===e.timing&&this.#c.push(e.content))})}get type(){return this.#e}async init(){this.schema.autoFetch&&await this.request(),super.init()}async request(e={}){this.isLoading=!0;const{url:t,params:n,data:r,headers:s,...o}=this.httpOptions;let i={url:"function"==typeof t?t({app:this.app,dataSource:this}):t,params:"function"==typeof n?n({app:this.app,dataSource:this}):n,data:"function"==typeof r?r({app:this.app,dataSource:this}):r,headers:"function"==typeof s?s({app:this.app,dataSource:this}):s,...o,...e};try{for(const e of this.#a)await e({options:i,params:{},dataSource:this,app:this.app});if("function"==typeof this.schema.beforeRequest&&(i=await this.schema.beforeRequest(i,{app:this.app,dataSource:this})),this.mockData)this.setData(this.mockData);else{let e=await(this.#i?.(i));for(const t of this.#c)await t({res:e,options:i,params:{},dataSource:this,app:this.app});if("function"==typeof this.schema.afterResponse&&(e=await this.schema.afterResponse(e,{app:this.app,dataSource:this,options:i})),this.schema.responseOptions?.dataPath){const t=getValueByKeyPath(this.schema.responseOptions.dataPath,e);this.setData(t)}else this.setData(e)}this.error=void 0}catch(a){this.error={msg:a.message},this.emit("error",a)}this.isLoading=!1}get(e){return this.request({...e,method:"GET"})}post(e){return this.request({...e,method:"POST"})}}const cache=new Map,getDeps=(e,t,n)=>{let r;if(n){const n=[];t.forEach(e=>{traverseNode(e,e=>{n.push(e.id)})}),r=`${e.id}:${n.join(":")}`}else r=`${e.id}:${t.map(e=>e.id).join(":")}`;if(cache.has(r))return cache.get(r);const s=new Watcher;s.addTarget(new Target({id:e.id,type:"data-source",isTarget:(t,n)=>!`${t}`.includes(DSL_NODE_KEY_COPY_PREFIX)&&isDataSourceTarget(e,t,n,!0)})),s.addTarget(new Target({id:e.id,type:"cond",isTarget:(t,n)=>isDataSourceCondTarget(e,t,n,!0)})),s.collect(t,{},!0);const{deps:o}=s.getTarget(e.id,"data-source"),{deps:i}=s.getTarget(e.id,"cond"),a={deps:o,condDeps:i};return cache.set(r,a),a},compiledCondition=(t,n)=>{let r=!0;for(const{op:s,value:o,range:i,field:a}of t){const[t,...c]=a,l=n[t];if(!l||!c.length)break;try{const e=getValueByKeyPath(c.join("."),l);if(!compiledCond(s,e,o,i)){r=!1;break}}catch(e){console.warn(e)}}return r},compliedConditions=(e,t)=>{if(!e[NODE_CONDS_KEY]||!Array.isArray(e[NODE_CONDS_KEY])||!e[NODE_CONDS_KEY].length)return!0;for(const{cond:n}of e[NODE_CONDS_KEY])if(n&&compiledCondition(n,t))return!0;return!1},updateNode=(e,t)=>{if(isPage(e)||isPageFragment(e)){const n=t.items?.findIndex(t=>t.id===e.id);t.items.splice(n,1,e)}else replaceChildNode(e,t.items)},createIteratorContentData=(e,t,n=[],r={})=>{const s={...r,[t]:{}};let o=cloneDeep(r[t]),i=s[t];return n.forEach((t,r)=>{Object.assign(i,o),r!==n.length-1?(Array.isArray(o[t])&&(o[t]={},i[t]={}),o=o[t],i=i[t]):i[t]=e}),s},compliedDataSourceField=(t,n)=>{const[r,...s]=t,o=r.indexOf(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX);if(o>-1){const i=n[r.substring(o+DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX.length)];if(!i)return t;try{return getValueByKeyPath(s.join("."),i)}catch(e){return t}}return t},template=(t,n)=>t.replace(dataSourceTemplateRegExp,(t,r)=>{try{return getValueByKeyPath(r,n)}catch(e){return t}}),compiledNodeField=(e,t)=>"string"==typeof e?template(e,t):e?.isBindDataSource&&e.dataSourceId?t[e.dataSourceId]:e?.isBindDataSourceField&&e.dataSourceId&&"string"==typeof e.template?template(e.template,t[e.dataSourceId]):Array.isArray(e)&&"string"==typeof e[0]?compliedDataSourceField(e,t):e,compliedIteratorItem=({compile:e,dsId:t,item:n,deps:r,condDeps:s,inEditor:o,ctxData:i})=>{const{items:a,...c}=n,l=cloneDeep(c);return s[c.id]?.keys.length&&!o&&(l.condResult=compliedConditions(c,i)),Array.isArray(a)&&a.length?l.items=a.map(n=>compliedIteratorItem({compile:e,dsId:t,item:n,deps:r,condDeps:s,inEditor:o,ctxData:i})):a&&(l.items=a),r[l.id]?.keys.length?compiledNode(e,l,{[t]:r},t):l},registerDataSourceOnDemand=async(e,t)=>{const{dataSourceMethodsDeps:n={},dataSourceCondDeps:r={},dataSourceDeps:s={},dataSources:o=[]}=e,i={};o.forEach(e=>{let o=r[e.id]||{};Object.keys(o).length||(o=s[e.id]||{}),Object.keys(o).length||(o=n[e.id]||{}),Object.keys(o).length&&t[e.type]&&(i[e.type]=t[e.type])});const a=await Promise.all(Object.values(i).map(e=>e())),c={};return a.forEach((e,t)=>{const n=Object.keys(i)[t];c[n]=e.default}),c};class DataSourceManager extends EventEmitter{static dataSourceClassMap=new Map([["base",DataSource],["http",HttpDataSource]]);static ObservedDataClass=SimpleObservedData;static waitInitSchemaList=new Map;static register(e,t){DataSourceManager.dataSourceClassMap.set(e,t),DataSourceManager.waitInitSchemaList?.forEach((t,n)=>{const r=t[e]||[];for(let e=r.shift();e;e=r.shift()){const t=n.addDataSource(e);t&&n.init(t)}})}static getDataSourceClass(e){return DataSourceManager.dataSourceClassMap.get(e)}static clearDataSourceClass(){DataSourceManager.dataSourceClassMap.clear(),DataSourceManager.dataSourceClassMap.set("base",DataSource),DataSourceManager.dataSourceClassMap.set("http",HttpDataSource)}static registerObservedData(e){DataSourceManager.ObservedDataClass=e}app;dataSourceMap=new Map;data={};initialData={};useMock=!1;constructor({app:e,useMock:t,initialData:n}){super(),DataSourceManager.waitInitSchemaList.set(this,{}),this.app=e,this.useMock=t,n&&(this.initialData=n,this.data={...n}),e.dsl?.dataSources?.forEach(e=>{this.addDataSource(e)}),this.isAllDataSourceRegistered()?this.callDsInit():this.on("registered-all",()=>{this.callDsInit()})}async init(e){if(!(e.isInit||this.app.jsEngine&&e.schema.disabledInitInJsEngine?.includes(this.app.jsEngine))){for(const t of e.methods){if("function"!=typeof t.content)return;"beforeInit"===t.timing&&await t.content({params:{},dataSource:e,app:this.app})}await e.init();for(const t of e.methods){if("function"!=typeof t.content)return;"afterInit"===t.timing&&await t.content({params:{},dataSource:e,app:this.app})}}}get(e){return this.dataSourceMap.get(e)}addDataSource(e){if(!e)return;const t=DataSourceManager.dataSourceClassMap.get(e.type);if(!t){let t=DataSourceManager.waitInitSchemaList.get(this);return t||(t={},DataSourceManager.waitInitSchemaList.set(this,t)),t[e.type]?t[e.type].push(e):t[e.type]=[e],void(this.data[e.id]=this.initialData[e.id]??getDefaultValueFromFields(e.fields))}const n=new t({app:this.app,schema:e,request:this.app.request,useMock:this.useMock,initialData:this.initialData[e.id],ObservedDataClass:DataSourceManager.ObservedDataClass});return this.dataSourceMap.set(e.id,n),this.data[n.id]=n.data,n.on("change",e=>{this.setData(n,e)}),this.isAllDataSourceRegistered()&&this.emit("registered-all"),n}setData(e,t){this.data[e.id]=e.data,this.emit("change",e.id,t)}removeDataSource(e){this.get(e)?.destroy(),delete this.data[e],this.dataSourceMap.delete(e)}updateSchema(e){for(const t of e){if(!this.get(t.id))return;this.removeDataSource(t.id)}for(const t of e){this.addDataSource(cloneDeep(t));const e=this.get(t.id);e&&this.init(e)}}compiledNode(e,t,n=!1){if(e[NODE_DISABLE_DATA_SOURCE_KEY])return e;const{items:r,...s}=e,o=cloneDeep(s);return r&&(o.items=Array.isArray(r)&&n?r.map(e=>this.compiledNode(e,t,n)):r),!1===s.condResult||!1===s.visible?o:compiledNode(e=>compiledNodeField(e,this.data),o,this.app.dsl?.dataSourceDeps||{},t)}compliedConds(e){return!!e[NODE_DISABLE_DATA_SOURCE_KEY]||compliedConditions(e,this.data)}compliedIteratorItemConds(e,t,n=[]){const[r,...s]=n,o=this.get(r);if(!o)return!0;const i=createIteratorContentData(e,o.id,s,this.data);return compliedConditions(t,i)}compliedIteratorItems(e,t,n=[]){const[r,...s]=n,o=this.get(r);if(!o)return t;const i="editor"===this.app.platform,a=createIteratorContentData(e,o.id,s,this.data),{deps:c={},condDeps:l={}}=getDeps(o.schema,t,i);return Object.keys(c).length||Object.keys(l).length?t.map(e=>compliedIteratorItem({compile:e=>compiledNodeField(e,a),dsId:o.id,item:e,deps:c,condDeps:l,inEditor:i,ctxData:a})):t}isAllDataSourceRegistered(){return!this.app.dsl?.dataSources?.length||this.dataSourceMap.size===this.app.dsl.dataSources.length}destroy(){this.removeAllListeners(),this.data={},this.initialData={},this.dataSourceMap.forEach(e=>{e.destroy()}),this.dataSourceMap.clear(),DataSourceManager.waitInitSchemaList.delete(this)}onDataChange(e,t,n){return this.get(e)?.onDataChange(t,n)}offDataChange(e,t,n){return this.get(e)?.offDataChange(t,n)}callDsInit(){const e=Array.from(this.dataSourceMap);"function"==typeof Promise.allSettled?Promise.allSettled(e.map(([,e])=>this.init(e))).then(t=>{const n={},r={};t.forEach((t,s)=>{const o=e[s][0];"fulfilled"===t.status?this.data[o]?n[o]=this.data[o]:delete n[o]:"rejected"===t.status&&(delete n[o],r[o]=t.reason)}),this.emit("init",n,r)}):Promise.all(e.map(([,e])=>this.init(e))).then(()=>{this.emit("init",this.data)}).catch(()=>{this.emit("init",this.data)})}}const createDataSourceManager=(e,t,n)=>{const{dsl:r,platform:s}=e;if(!r?.dataSources)return;const o=new DataSourceManager({app:e,useMock:t,initialData:n});return r.dataSources&&r.dataSourceCondDeps&&"editor"!==s&&getNodes(getDepNodeIds(r.dataSourceCondDeps),r.items).forEach(e=>{e.condResult=o.compliedConds(e),updateNode(e,r)}),r.dataSources&&r.dataSourceDeps&&getNodes(getDepNodeIds(r.dataSourceDeps),r.items).forEach(e=>{updateNode(o.compiledNode(e),r)}),"nodejs"===e.jsEngine||o.on("change",(t,n)=>{const s=r.dataSourceDeps?.[t]||{},i=r.dataSourceCondDeps?.[t]||{},a=union([...Object.keys(i),...Object.keys(s)]);for(const c of r.items)if("editor"===e.platform||isPage(c)&&c.id===e.page?.data.id||isPageFragment(c)){const r=getNodes(a,[c]).map(t=>{"editor"!==e.platform&&(t.condResult=o.compliedConds(t));const n=o.compiledNode(t);if("function"==typeof e.page?.setData){isPage(n)?e.page.setData(n):c.id!==e.page.data.id||e.page.instance||replaceChildNode(n,[e.page.data]),e.getNode(t.id)?.setData(n);for(const[,t]of e.pageFragments)t.data.id===n.id?t.setData(n):t.data.id===c.id&&(t.getNode(n.id)?.setData(n),t.instance||replaceChildNode(n,[t.data]))}return n});r.length&&o.emit("update-data",r,t,n,c.id)}}),o}; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function __awaiter(t,n,r,s){return new(r||(r=Promise))(function(n,o){function i(t){try{c(s.next(t))}catch(e){o(e)}}function a(t){try{c(s.throw(t))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,a)}c((s=s.apply(t,[])).next())})}const segments=[];function Match(e,t,n="*"){if(e===n)return!0;segments.length=0;let r=0,s=0,o=0,i=0;for(let d=0,p=e.length;di&&segments.push(e.substring(i,d)),segments.push(t),i=d+1)}if(io)return!1;let c=segments.length-1,l=t.length-1,u=!1;for(;;){const e=segments[c];if(c-=1,e===n)u=!0;else{const n=l+1-e.length,r=t.lastIndexOf(e,n);if(-1===r||r>n)return!1;if(u)l=r-1,u=!1;else{if(r!==n)return!1;l-=e.length}}if(0>c)break}return!0}class WildcardObject{constructor(e,t,n,r=void 0){this.obj=e,this.delimiter=t,this.wildcard=n,this.is_match=r}shortMatch(e,t){if(e===t)return!0;if(e===this.wildcard)return!0;if(this.is_match)return this.is_match(e,t);const n=e.indexOf(this.wildcard);if(n>-1){const r=e.substr(n+1);if(0===n||t.substring(0,n)===e.substring(0,n)){const e=r.length;return!(e>0)||t.substr(-e)===r}}return!1}match(e,t){return this.is_match?this.is_match(e,t):e===t||e===this.wildcard||t===this.wildcard||this.shortMatch(e,t)||Match(e,t,this.wildcard)}handleArray(e,t,n,r,s={}){let o=e.indexOf(this.delimiter,n),i=!1;-1===o&&(i=!0,o=e.length);const a=e.substring(n,o);let c=0;for(const l of t){const t=c.toString(),n=""===r?t:r+this.delimiter+c;(a===this.wildcard||a===t||this.shortMatch(a,t))&&(i?s[n]=l:this.goFurther(e,l,o+1,n,s)),c++}return s}handleObject(e,t,n,r,s={}){let o=e.indexOf(this.delimiter,n),i=!1;-1===o&&(i=!0,o=e.length);const a=e.substring(n,o);for(let c in t){c=c.toString();const n=""===r?c:r+this.delimiter+c;(a===this.wildcard||a===c||this.shortMatch(a,c))&&(i?s[n]=t[c]:this.goFurther(e,t[c],o+1,n,s))}return s}goFurther(e,t,n,r,s={}){return Array.isArray(t)?this.handleArray(e,t,n,r,s):this.handleObject(e,t,n,r,s)}get(e){return this.goFurther(e,this.obj,0,"")}}class ObjectPath{static get(e,t,n=!1){if(!t)return;let r=t;for(const s of e)if(s in r)r=r[s];else{if(!n)return;r[s]=Object.create({}),r=r[s]}return r}static set(e,t,n){if(!n)return;if(0===e.length){for(const e in n)delete n[e];for(const e in t)n[e]=t[e];return}const r=e.slice(),s=r.pop(),o=ObjectPath.get(r,n,!0);return"object"==typeof o&&(o[s]=t),t}}let wasm,WASM_VECTOR_LEN=0,cachegetUint8Memory0=null;function getUint8Memory0(){return null!==cachegetUint8Memory0&&cachegetUint8Memory0.buffer===wasm.memory.buffer||(cachegetUint8Memory0=new Uint8Array(wasm.memory.buffer)),cachegetUint8Memory0}let cachedTextEncoder=new TextEncoder("utf-8");const encodeString="function"==typeof cachedTextEncoder.encodeInto?function(e,t){return cachedTextEncoder.encodeInto(e,t)}:function(e,t){const n=cachedTextEncoder.encode(e);return t.set(n),{read:e.length,written:n.length}};function passStringToWasm0(e,t,n){if(void 0===n){const n=cachedTextEncoder.encode(e),r=t(n.length);return getUint8Memory0().subarray(r,r+n.length).set(n),WASM_VECTOR_LEN=n.length,r}let r=e.length,s=t(r);const o=getUint8Memory0();let i=0;for(;i127)break;o[s+i]=t}if(i!==r){0!==i&&(e=e.slice(i)),s=n(s,r,r=i+3*e.length);const t=getUint8Memory0().subarray(s+i,s+r);i+=encodeString(e,t).written}return WASM_VECTOR_LEN=i,s}function is_match(e,t){var n=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),r=WASM_VECTOR_LEN,s=passStringToWasm0(t,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),o=WASM_VECTOR_LEN;return 0!==wasm.is_match(n,r,s,o)}async function load(t,n){if("function"==typeof Response&&t instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(t,n)}catch(e){if("application/wasm"==t.headers.get("Content-Type"))throw e;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}const r=await t.arrayBuffer();return await WebAssembly.instantiate(r,n)}{const e=await WebAssembly.instantiate(t,n);return e instanceof WebAssembly.Instance?{instance:e,module:t}:e}}async function init(e){("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:t,module:n}=await load(await e,{});return wasm=t.exports,init.__wbindgen_wasm_module=n,wasm}const defaultUpdateOptions={only:[],source:"",debug:!1,data:void 0,queue:!1,force:!1};function log(e,t){console.debug(e,t)}function getDefaultOptions(){return{delimiter:".",debug:!1,extraDebug:!1,useMute:!0,notRecursive:";",param:":",wildcard:"*",experimentalMatch:!1,queue:!1,defaultBulkValue:!0,useCache:!1,useSplitCache:!1,useIndicesCache:!1,maxSimultaneousJobs:1e3,maxQueueRuns:1e3,log:log,Promise:Promise}}function isObject$2(e){return e&&e.constructor?"Object"===e.constructor.name:"object"==typeof e&&null!==e}class DeepState{constructor(e={},t={}){this.jobsRunning=0,this.updateQueue=[],this.subscribeQueue=[],this.listenersIgnoreCache=new WeakMap,this.is_match=null,this.destroyed=!1,this.queueRuns=0,this.groupId=0,this.namedGroups=[],this.numberGroups=[],this.traceId=0,this.traceMap=new Map,this.tracing=[],this.savedTrace=[],this.collection=null,this.collections=0,this.cache=new Map,this.splitCache=new Map,this.indices=new Map,this.indicesCount=new Map,this.lastExecs=new WeakMap,this.listeners=new Map,this.waitingListeners=new Map,this.options=Object.assign(Object.assign({},getDefaultOptions()),t),this.data=e,this.id=0,this.options.useCache?(this.pathGet=this.cacheGet,this.pathSet=this.cacheSet):(this.pathGet=ObjectPath.get,this.pathSet=ObjectPath.set),t.Promise?this.resolved=t.Promise.resolve():this.resolved=Promise.resolve(),this.muted=new Set,this.mutedListeners=new Set,this.scan=new WildcardObject(this.data,this.options.delimiter,this.options.wildcard),this.destroyed=!1}getDefaultListenerOptions(){return{bulk:!1,bulkValue:this.options.defaultBulkValue,debug:!1,source:"",data:void 0,queue:!1,group:!1}}cacheGet(e,t=this.data,n=!1){const r=e.join(this.options.delimiter),s=this.cache.get(r);if(s){const e=s.deref();if(e)return e}const o=ObjectPath.get(e,t,n);return(isObject$2(o)||Array.isArray(o))&&this.cache.set(r,new WeakRef(o)),o}cacheSet(e,t,n=this.data){const r=e.join(this.options.delimiter);return isObject$2(t)||Array.isArray(t)?this.cache.set(r,new WeakRef(t)):this.cache.delete(r),ObjectPath.set(e,t,n)}silentSet(e,t){return this.pathSet(this.split(e),t,this.data)}loadWasmMatcher(e){return __awaiter(this,void 0,void 0,function*(){yield init(e),this.is_match=is_match,this.scan=new WildcardObject(this.data,this.options.delimiter,this.options.wildcard,this.is_match)})}same(e,t){return(["number","string","undefined","boolean"].includes(typeof e)||null===e)&&t===e}getListeners(){return this.listeners}destroy(){this.destroyed=!0,this.data=void 0,this.listeners=new Map,this.waitingListeners=new Map,this.updateQueue=[],this.jobsRunning=0}match(e,t,n=!0){return this.is_match?this.is_match(e,t):e===t||(e===this.options.wildcard||t===this.options.wildcard||!(!n&&this.getIndicesCount(this.options.delimiter,e)-1;)o.push(r),s=r+n;return this.options.useIndicesCache&&this.indices.set(t,o),o}getIndicesCount(e,t){if(this.options.useIndicesCache&&this.indicesCount.has(t))return this.indicesCount.get(t);const n=e.length;if(0==n)return 0;let r,s=0,o=0;for(;(r=t.indexOf(e,s))>-1;)o++,s=r+n;return this.options.useIndicesCache&&this.indicesCount.set(t,o),o}cutPath(e,t){if(""===t)return"";if((e=this.cleanNotRecursivePath(e))===(t=this.cleanNotRecursivePath(t)))return e;const n=this.getIndicesCount(this.options.delimiter,t),r=this.getIndicesOf(this.options.delimiter,e);return e.substring(0,r[n])}trimPath(e){return(e=this.cleanNotRecursivePath(e)).charAt(0)===this.options.delimiter?e.substr(1):e}split(e){if(""===e)return[];if(!this.options.useSplitCache)return e.split(this.options.delimiter);const t=this.splitCache.get(e);if(t)return t.slice();const n=e.split(this.options.delimiter);return this.splitCache.set(e,n.slice()),n}isWildcard(e){return e.includes(this.options.wildcard)||this.hasParams(e)}isNotRecursive(e){return e.endsWith(this.options.notRecursive)}cleanNotRecursivePath(e){return this.isNotRecursive(e)?e.substring(0,e.length-1):e}hasParams(e){return e.includes(this.options.param)}getParamsInfo(e){let t={replaced:"",original:e,params:{}},n=0,r=[];for(const s of this.split(e)){t.params[n]={original:s,replaced:"",name:""};const e=new RegExp(`\\${this.options.param}([^\\${this.options.delimiter}\\${this.options.param}]+)`,"g");let o=e.exec(s);o?(t.params[n].name=o[1],e.lastIndex=0,t.params[n].replaced=s.replace(e,this.options.wildcard),r.push(t.params[n].replaced),n++):(delete t.params[n],r.push(s),n++)}return t.replaced=r.join(this.options.delimiter),t}getParams(e,t){if(!e)return;const n=this.split(t),r={};for(const s in e.params){r[e.params[s].name]=n[s]}return r}waitForAll(e,t){const n={};for(let r of e)n[r]={dirty:!1},this.hasParams(r)&&(n[r].paramsInfo=this.getParamsInfo(r)),n[r].isWildcard=this.isWildcard(r),n[r].isRecursive=!this.isNotRecursive(r);return this.waitingListeners.set(e,{fn:t,paths:n}),t(n),function(){this.waitingListeners.delete(e)}}executeWaitingListeners(e){if(!this.destroyed)for(const t of this.waitingListeners.values()){const{fn:n,paths:r}=t;let s=0,o=0;for(let t in r){const n=r[t];let i=!1;n.isRecursive&&(e=this.cutPath(e,t)),n.isWildcard&&this.match(t,e)&&(i=!0),e===t&&(i=!0),i&&(n.dirty=!0),n.dirty&&s++,o++}s===o&&n(r)}}subscribeAll(e,t,n=this.getDefaultListenerOptions()){if(this.destroyed)return()=>{};let r=[],s=0,o=null;"boolean"==typeof n.group&&n.group?(this.groupId++,o=this.groupId,n.bulk=!0):"string"==typeof n.group&&(n.bulk=!0,o=n.group);for(const i of e)r.push(this.subscribe(i,t,n,{all:e,index:s,groupId:o})),s++;return function(){for(const e of r)e()}}getCleanListenersCollection(e={}){return Object.assign({listeners:new Map,isRecursive:!1,isWildcard:!1,hasParams:!1,match:void 0,paramsInfo:void 0,path:void 0,originalPath:void 0,count:0},e)}getCleanListener(e,t=this.getDefaultListenerOptions()){return{fn:e,options:Object.assign(Object.assign({},this.getDefaultListenerOptions()),t),groupId:null}}getListenerCollectionMatch(e,t,n){e=this.cleanNotRecursivePath(e);const r=this;return function(s,o=!1){let i=e;return t?s=r.cutPath(s,e):i=r.cutPath(r.cleanNotRecursivePath(e),s),o&&console.log("[getListenerCollectionMatch]",{listenerPath:e,scopedListenerPath:i,path:s,isRecursive:t,isWildcard:n}),!(!n||!r.match(i,s,t))||i===s}}getListenersCollection(e,t){if(this.listeners.has(e)){let n=this.listeners.get(e);return n.listeners.set(++this.id,t),t.id=this.id,n}const n=this.hasParams(e);let r;n&&(r=this.getParamsInfo(e));let s={isRecursive:!this.isNotRecursive(e),isWildcard:this.isWildcard(e),hasParams:n,paramsInfo:r,originalPath:e,path:n?r.replaced:e};s.isRecursive||(s.path=this.cleanNotRecursivePath(s.path));let o=this.getCleanListenersCollection(Object.assign(Object.assign({},s),{match:this.getListenerCollectionMatch(s.path,s.isRecursive,s.isWildcard)}));return this.id++,o.listeners.set(this.id,t),t.id=this.id,this.listeners.set(s.originalPath,o),o}subscribe(e,t,n=this.getDefaultListenerOptions(),r={all:[e],index:0,groupId:null}){if(this.destroyed)return()=>{};this.jobsRunning++;const s="subscribe";let o=this.getCleanListener(t,n);n.group&&(n.bulk=!0,"string"==typeof n.group?o.groupId=n.group:r.groupId&&(o.groupId=r.groupId)),this.listenersIgnoreCache.set(o,{truthy:[],falsy:[]});const i=this.getListenersCollection(e,o);n.debug&&console.log("[subscribe]",{listenerPath:e,options:n}),i.count++;let a=!0;if(o.groupId&&("string"==typeof o.groupId?this.namedGroups.includes(o.groupId)?a=!1:this.namedGroups.push(o.groupId):"number"==typeof o.groupId&&(this.numberGroups.includes(o.groupId)?a=!1:this.numberGroups.push(o.groupId))),a){const r=this.cleanNotRecursivePath(i.path),a=this.split(r);if(i.isWildcard){const a=this.scan.get(r);if(n.bulk){const r=[];for(const e in a)this.isMuted(e)||r.push({path:e,params:this.getParams(i.paramsInfo,e),value:a[e]});this.isMuted(t)||t(r,{type:s,listener:o,listenersCollection:i,path:{listener:e,update:void 0,resolved:void 0},options:n,params:void 0})}else for(const r in a)this.isMuted(r)||this.isMuted(t)||t(a[r],{type:s,listener:o,listenersCollection:i,path:{listener:e,update:void 0,resolved:this.cleanNotRecursivePath(r)},params:this.getParams(i.paramsInfo,r),options:n})}else this.isMuted(r)||this.isMuted(t)||t(this.pathGet(a,this.data),{type:s,listener:o,listenersCollection:i,path:{listener:e,update:void 0,resolved:this.cleanNotRecursivePath(e)},params:this.getParams(i.paramsInfo,r),options:n})}return this.debugSubscribe(o,i,e),this.jobsRunning--,this.unsubscribe(e,this.id)}unsubscribe(e,t){const n=this.listeners,r=n.get(e);return function(){r.listeners.delete(t),r.count--,0===r.count&&n.delete(e)}}runQueuedListeners(){if(!this.destroyed&&0!==this.subscribeQueue.length)if(0===this.jobsRunning){this.queueRuns=0;const e=[...this.subscribeQueue];for(let t=0,n=e.length;t=this.options.maxQueueRuns)throw this.queueRuns=0,new Error("Maximal number of queue runs exhausted.");Promise.resolve().then(()=>this.runQueuedListeners()).catch(e=>{throw e})}}getQueueNotifyListeners(e,t=[]){for(const n in e){if(this.isMuted(n))continue;let{single:r,bulk:s}=e[n];for(const e of r){let n=!1,r=e.listener.id+":"+e.eventInfo.path.resolved;e.eventInfo.path.resolved||(r=e.listener.id+":"+e.eventInfo.path.listener);for(const e of t)if(r===e.resolvedIdPath){n=!0;break}if(n)continue;const s=this.debugTime(e);if(!this.isMuted(e.listener.fn))if(e.listener.options.queue&&this.jobsRunning)this.subscribeQueue.push(()=>{e.listener.fn(e.value?e.value():void 0,e.eventInfo)});else{let n=e.listener.id+":"+e.eventInfo.path.resolved;e.eventInfo.path.resolved||(n=e.listener.id+":"+e.eventInfo.path.listener),t.push({id:e.listener.id,resolvedPath:e.eventInfo.path.resolved,resolvedIdPath:n,originalFn:e.listener.fn,fn:()=>{e.listener.fn(e.value?e.value():void 0,e.eventInfo)},options:e.listener.options,groupId:e.listener.groupId})}this.debugListener(s,e)}for(const e of s){let n=!1;for(const o of t)if(o.id===e.listener.id){n=!0;break}if(n)continue;const r=this.debugTime(e),s=[];for(const t of e.value)s.push(Object.assign(Object.assign({},t),{value:t.value?t.value():void 0}));if(!this.isMuted(e.listener.fn))if(e.listener.options.queue&&this.jobsRunning)this.subscribeQueue.push(()=>!this.jobsRunning&&(e.listener.fn(s,e.eventInfo),!0));else{let n=e.listener.id+":"+e.eventInfo.path.resolved;e.eventInfo.path.resolved||(n=e.listener.id+":"+e.eventInfo.path.listener),t.push({id:e.listener.id,resolvedPath:e.eventInfo.path.resolved,resolvedIdPath:n,originalFn:e.listener.fn,fn:()=>{e.listener.fn(s,e.eventInfo)},options:e.listener.options,groupId:e.listener.groupId})}this.debugListener(r,e)}}return Promise.resolve().then(()=>this.runQueuedListeners()),t}shouldIgnore(e,t){if(!e.options.ignore)return!1;for(const n of e.options.ignore){if(t.startsWith(n))return!0;if(this.is_match&&this.is_match(n,t))return!0;{const e=this.cutPath(t,n);if(this.match(n,e))return!0}}return!1}getSubscribedListeners(e,t,n,r="update",s=null){n=Object.assign(Object.assign({},defaultUpdateOptions),n);const o={};for(let[i,a]of this.listeners)if(a.match(e)){o[i]={single:[],bulk:[],bulkData:[]};const c=a.paramsInfo?this.getParams(a.paramsInfo,e):void 0,l=this.cutPath(e,i),u=a.isRecursive||a.isWildcard?()=>this.get(l):()=>t,d=[{value:u,path:e,params:c}];for(const t of a.listeners.values())this.shouldIgnore(t,e)?t.options.debug&&console.log("[getSubscribedListeners] Listener was not fired because it was ignored.",{listener:t,listenersCollection:a}):t.options.bulk?o[i].bulk.push({listener:t,listenersCollection:a,eventInfo:{type:r,listener:t,path:{listener:i,update:s||e,resolved:void 0},params:c,options:n},value:d}):o[i].single.push({listener:t,listenersCollection:a,eventInfo:{type:r,listener:t,path:{listener:i,update:s||e,resolved:this.cleanNotRecursivePath(e)},params:c,options:n},value:u})}else if(this.options.extraDebug){let t=!1;for(const n of a.listeners.values())n.options.debug&&(t=!0,console.log("[getSubscribedListeners] Listener was not fired because there was no match.",{listener:n,listenersCollection:a,updatePath:e}));t&&a.match(e,!0)}return o}notifySubscribedListeners(e,t,n,r="update",s=null){return this.getQueueNotifyListeners(this.getSubscribedListeners(e,t,n,r,s))}useBulkValue(e){for(const[t,n]of e.listeners){if(n.options.bulk&&n.options.bulkValue)return!0;if(!n.options.bulk)return!0}return!1}getNestedListeners(e,t,n,r="update",s=null){const o={},i={};for(let[a,c]of this.listeners){if(!c.isRecursive)continue;const l=this.cutPath(a,e);if(this.match(l,e)){o[a]={single:[],bulk:[]};const u=this.trimPath(a.substr(l.length)),d=this.useBulkValue(c);let p;d&&(p=i[u]?i[u]:new WildcardObject(t,this.options.delimiter,this.options.wildcard).get(u),i[u]=p);const h=c.paramsInfo?this.getParams(c.paramsInfo,e):void 0,f=[],g={};for(const[t,i]of c.listeners)if(d)for(const l in p){const u=()=>p[l],d=[e,l].join(this.options.delimiter),m={type:r,listener:i,listenersCollection:c,path:{listener:a,update:s||e,resolved:this.cleanNotRecursivePath(d)},params:h,options:n};this.shouldIgnore(i,e)||(i.options.bulk?(f.push({value:u,path:d,params:h}),g[t]=i):o[a].single.push({listener:i,listenersCollection:c,eventInfo:m,value:u}))}else{const l={type:r,listener:i,listenersCollection:c,path:{listener:a,update:s||e,resolved:void 0},params:h,options:n};if(this.shouldIgnore(i,e))continue;i.options.bulk?(f.push({value:void 0,path:void 0,params:h}),g[t]=i):o[a].single.push({listener:i,listenersCollection:c,eventInfo:l,value:void 0})}for(const t in g){const s=g[t],i={type:r,listener:s,listenersCollection:c,path:{listener:a,update:e,resolved:void 0},options:n,params:h};o[a].bulk.push({listener:s,listenersCollection:c,eventInfo:i,value:f})}}else if(this.options.extraDebug)for(const t of c.listeners.values())t.options.debug&&console.log("[getNestedListeners] Listener was not fired because there was no match.",{listener:t,listenersCollection:c,currentCutPath:l,updatePath:e})}return o}notifyNestedListeners(e,t,n,r="update",s,o=null){return this.getQueueNotifyListeners(this.getNestedListeners(e,t,n,r,o),s)}getNotifyOnlyListeners(e,t,n,r="update",s=null){const o={};if("object"!=typeof n.only||!Array.isArray(n.only)||void 0===n.only[0]||!this.canBeNested(t))return o;for(const i of n.only){const a=new WildcardObject(t,this.options.delimiter,this.options.wildcard).get(i);o[i]={bulk:[],single:[]};for(const t in a){const c=e+this.options.delimiter+t;for(const[l,u]of this.listeners){const d=u.paramsInfo?this.getParams(u.paramsInfo,c):void 0;if(this.match(l,c)){const p=()=>a[t],h=[{value:p,path:c,params:d}];for(const t of u.listeners.values()){const a={type:r,listener:t,listenersCollection:u,path:{listener:l,update:s||e,resolved:this.cleanNotRecursivePath(c)},params:d,options:n};this.shouldIgnore(t,e)||(t.options.bulk?o[i].bulk.some(e=>e.listener===t)||o[i].bulk.push({listener:t,listenersCollection:u,eventInfo:a,value:h}):o[i].single.push({listener:t,listenersCollection:u,eventInfo:a,value:p}))}}}}}return o}runQueue(e){const t=[];for(const n of e)n.options.group?t.includes(n.groupId)||(n.fn(),t.push(n.groupId)):n.fn()}sortAndRunQueue(e,t){e.sort(function(e,t){return e.id-t.id}),this.options.debug&&console.log(`[deep-state-observer] queue for ${t}`,e),this.runQueue(e)}notifyOnly(e,t,n,r="update",s=""){const o=this.getQueueNotifyListeners(this.getNotifyOnlyListeners(e,t,n,r,s));this.sortAndRunQueue(o,e)}canBeNested(e){return"object"==typeof e&&null!==e}getUpdateValues(e,t){let n=t;return"function"==typeof t&&(n=t(e)),{newValue:n,oldValue:e}}wildcardNotify(e,t){let n=[];for(const r of e)this.getQueueNotifyListeners(r,n);for(const r of t)this.executeWaitingListeners(r);return this.jobsRunning--,n}wildcardUpdate(e,t,n=defaultUpdateOptions,r=!1){++this.jobsRunning,n=Object.assign(Object.assign({},defaultUpdateOptions),n);const s=this.scan.get(e),o={};for(const l in s){const e=this.split(l),{oldValue:r,newValue:i}=this.getUpdateValues(s[l],t);this.same(i,r)&&!n.force||(this.pathSet(e,i,this.data),o[l]=i)}const i=[],a=[];for(const l in o){const t=o[l];n.only.length?i.push(this.getNotifyOnlyListeners(l,t,n,"update",e)):(i.push(this.getSubscribedListeners(l,t,n,"update",e)),this.canBeNested(t)&&i.push(this.getNestedListeners(l,t,n,"update",e))),n.debug&&this.options.log("Wildcard update",{path:l,newValue:t}),a.push(l)}if(r){const t=this;return function(){const n=t.wildcardNotify(i,a);t.sortAndRunQueue(n,e)}}const c=this.wildcardNotify(i,a);this.sortAndRunQueue(c,e)}runUpdateQueue(){if(!this.destroyed)for(;this.updateQueue.length&&this.updateQueue.lengththis.options.maxSimultaneousJobs)throw new Error("Maximal simultaneous jobs limit reached.");this.updateQueue.push({updatePath:e,fnOrValue:t,options:n,multi:r});const o=Promise.resolve().then(()=>{this.runUpdateQueue()});return r?function(){return o}:o}if(this.isWildcard(e))return this.wildcardUpdate(e,t,n,r);++this.jobsRunning;const o=this.split(e),i=this.pathGet(o,this.data);let{oldValue:a,newValue:c}=this.getUpdateValues(i,t);if(n.debug&&this.options.log(`Updating ${e} ${n.source?`from ${n.source}`:""}`,{oldValue:a,newValue:c}),this.same(c,a)&&!n.force)return--this.jobsRunning,r?function(){return c}:c;if(this.pathSet(o,c,this.data),null===(n=Object.assign(Object.assign({},defaultUpdateOptions),n)).only)return--this.jobsRunning,r?function(){}:c;if(n.only.length){if(--this.jobsRunning,r){const t=this;return function(){return t.updateNotifyOnly(e,c,n)}}return this.updateNotifyOnly(e,c,n),c}if(r){--this.jobsRunning;const t=this;return function(){return t.updateNotify(e,c,n)}}return this.updateNotify(e,c,n),--this.jobsRunning,c}multi(e=!1){if(this.destroyed)return{update(){return this},done(){},getStack:()=>[]};if(this.collection)return this.collection;const t=this,n=[],r=[];return{update(s,o,i=defaultUpdateOptions){if(e){const e=t.split(s);let r=o;const a=t.pathGet(e,t.data);"function"==typeof r&&(r=r(a)),t.pathSet(e,r,t.data),n.push({updatePath:s,newValue:r,options:i})}else r.push(t.update(s,o,i,!0));return this},done(){if(0===t.collections){if(e)t.updateNotifyAll(n);else for(const e of r)e();n.length=0}},getStack:()=>n}}collect(){return this.collections++,this.collection||(this.collection=this.multi(!0)),this.collection}executeCollected(){if(this.collections--,0===this.collections&&this.collection){const e=this.collection;this.collection=null,e.done()}}getCollectedCount(){return this.collections}getCollectedStack(){return this.collection?this.collection.getStack():[]}get(e=void 0){if(!this.destroyed)return void 0===e||""===e?this.data:this.isWildcard(e)?this.scan.get(e):this.pathGet(this.split(e),this.data)}last(e){let t=this.lastExecs.get(e);t||(t={calls:0},this.lastExecs.set(e,t));const n=++t.calls;this.resolved.then(()=>{n===t.calls&&(this.lastExecs.set(e,{calls:0}),e())})}isMuted(e){if(!this.options.useMute)return!1;if("function"==typeof e)return this.isMutedListener(e);for(const t of this.muted){const n=!this.isNotRecursive(t),r=this.trimPath(t);if(this.match(e,r))return!0;if(this.match(r,e))return!0;if(n){const n=this.cutPath(r,e);if(this.match(n,t))return!0;if(this.match(t,n))return!0}}return!1}isMutedListener(e){return this.mutedListeners.has(e)}mute(e){if("function"==typeof e)return this.mutedListeners.add(e);this.muted.add(e)}unmute(e){if("function"==typeof e)return this.mutedListeners.delete(e);this.muted.delete(e)}debugSubscribe(e,t,n){e.options.debug&&this.options.log("listener subscribed",{listenerPath:n,listener:e,listenersCollection:t})}debugListener(e,t){(t.eventInfo.options.debug||t.listener.options.debug)&&this.options.log("Listener fired",{time:Date.now()-e,info:t})}debugTime(e){return e.listener.options.debug||e.eventInfo.options.debug?Date.now():0}startTrace(e,t=null){this.traceId++;const n=this.traceId+":"+e;return this.traceMap.set(n,{id:n,sort:this.traceId,stack:this.tracing.map(e=>e),additionalData:t,changed:[]}),this.tracing.push(n),n}stopTrace(e){const t=this.traceMap.get(e);return this.tracing.pop(),this.traceMap.delete(e),t}saveTrace(e){const t=this.traceMap.get(e);return this.tracing.pop(),this.traceMap.delete(e),this.savedTrace.push(t),t}getSavedTraces(){const e=this.savedTrace.map(e=>e);return e.sort((e,t)=>e.sort-t.sort),this.savedTrace=[],e}}const ignoreFirstCall=e=>{let t=0;return(...n)=>{if(0!==t)return e(...n);t+=1}};class DeepObservedData extends ObservedData{state;subscribers=new Map;constructor(e){super(),this.state=new DeepState(e)}update=(e,t)=>{this.state?.update(t??"",e)};on=(e,t,n)=>{const r=this.state.subscribe(e,n?.immediate?t:ignoreFirstCall(t)),s=this.subscribers.get(e)??new Map;s.set(t,r),this.subscribers.set(e,s)};off=(e,t)=>{const n=this.subscribers.get(e);n&&(n.get(t)?.(),n.delete(t))};getData=e=>this.state?this.state?.get(e):{};destroy=()=>{this.subscribers.forEach(e=>{e.forEach(e=>e())})}}class Env{isIos=!1;isIphone=!1;isIpad=!1;isAndroid=!1;isAndroidPad=!1;isMac=!1;isWin=!1;isMqq=!1;isWechat=!1;isWeb=!1;isOpenHarmony=!1;constructor(e=globalThis.navigator?.userAgent??"",t={}){e&&(this.isIphone=e.indexOf("iPhone")>=0,this.isIpad=/(iPad).*OS\s([\d_]+)/.test(e),this.isIos=this.isIphone||this.isIpad,this.isAndroid=e.indexOf("Android")>=0,this.isAndroidPad=this.isAndroid&&e.indexOf("Mobile")<0,this.isMac=e.indexOf("Macintosh")>=0,this.isWin=e.indexOf("Windows")>=0,this.isMqq=/QQ\/([\d.]+)/.test(e),this.isWechat=e.indexOf("MicroMessenger")>=0&&e.indexOf("wxwork")<0,this.isOpenHarmony=e.includes("OpenHarmony"),this.isWeb=!(this.isIos||this.isAndroid||this.isOpenHarmony||/(WebOS|BlackBerry)/.test(e)),Object.entries(t).forEach(([e,t])=>{this[e]=t}))}}var NodeType=exports("N",(e=>(e.CONTAINER="container",e.PAGE="page",e.ROOT="app",e.PAGE_FRAGMENT="page-fragment",e))(NodeType||{}));const NODE_CONDS_KEY="displayConds",NODE_DISABLE_DATA_SOURCE_KEY="_tmagic_node_disabled_data_source",NODE_DISABLE_CODE_BLOCK_KEY="_tmagic_node_disabled_code_block";var ActionType=(e=>(e.COMP="comp",e.CODE="code",e.DATA_SOURCE="data-source",e))(ActionType||{}),HookType=(e=>(e.CODE="code",e))(HookType||{}),HookCodeType=(e=>(e.CODE="code",e.DATA_SOURCE_METHOD="data-source-method",e))(HookCodeType||{});const toLine=exports("A",(e="")=>e.replace(/\B([A-Z])/g,"-$1").toLowerCase()),getNodePath=(e,t=[])=>{const n=[],r=function(e,t){if(!Array.isArray(t))return null;for(let s=0,o=t.length;se.replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),getUrlParam=(e,t)=>{const n=location.href,r=new RegExp(`[?&#]${e}=([^&#]+)`,"gi"),s=n.match(r);let o;return s&&s.length>0?(o=s[s.length-1].split("="),o&&o.length>1?filterXSS(o[1]):""):""},isObject$1=e=>"[object Object]"===Object.prototype.toString.call(e),isPage=e=>!!e&&Boolean(e.type?.toLowerCase()===NodeType.PAGE),isPageFragment=e=>!!e&&Boolean(e.type?.toLowerCase()===NodeType.PAGE_FRAGMENT),isNumber$1=e=>/^(-?\d+)(\.\d+)?$/.test(e),getKeysArray=e=>`${e}`.replace(/\[(\d+)\]/g,".$1").split("."),getValueByKeyPath=(e="",t={})=>(Array.isArray(e)?e:getKeysArray(e)).reduce((n,r)=>{if(isObject$1(n))return n[r];if(Array.isArray(n)&&/^\d*$/.test(`${r}`))return n[r];throw new Error(`${t}中不存在${e}`)},t),setValueByKeyPath=(e,t,n={})=>set(n,e,t),getNodes=(e,t=[])=>{const n=[],r=function(e,t){if(Array.isArray(t))for(const s of t){const t=e.findIndex(e=>`${e}`==`${s.id}`);t>-1&&(e.splice(t,1),n.push(s)),s.items&&r(e,s.items)}};return r(e,t),n},getDepKeys=(e={},t)=>Array.from(Object.values(e).reduce((e,n)=>((n[t]?.keys||[]).forEach(t=>e.add(t)),e),new Set)),getDepNodeIds=(e={})=>Array.from(Object.values(e).reduce((e,t)=>(Object.keys(t).forEach(t=>{e.add(t)}),e),new Set)),replaceChildNode=(e,t,n)=>{const r=getNodePath(e.id,t),s=r.pop();let o=r.pop();if(!s)return void console.warn(`未找到目标节点(${e.id})`);if(!o)return void console.warn(`未找到父节点(${e.id})`);const i=o.items?.findIndex(e=>e.id===s.id);o.items.splice(i,1,e)},DSL_NODE_KEY_COPY_PREFIX="__tmagic__",IS_DSL_NODE_KEY=exports("I","__tmagic__dslNode"),PAGE_FRAGMENT_CONTAINER_ID_KEY=exports("P","tmagic-page-fragment-container-id"),compiledNode=(t,n,r={},s)=>{let o=[];if(s){const e=r[s];o=e?.[n.id].keys||[]}else o=getDepKeys(r,n.id);return o.forEach(r=>{const s=getKeysArray(r),o=s.map((e,t)=>t{switch("string"==typeof t&&void 0===n&&(n=""),e){case"is":case"=":return t===n;case"not":case"!=":return t!==n;case">":return t>n;case">=":return t>=n;case"<":return t1&&t>=r[0]&&t<=r[1];case"not_between":return r.length<2||tr[1];case"include":return t?.includes?.(n);case"not_include":return void 0===t||!t.includes?.(n)}return!1},getDefaultValueFromFields=t=>{const n={},r={string:void 0,object:{},array:[],boolean:void 0,number:void 0,null:null,any:void 0};return t.forEach(t=>{if(void 0===t.defaultValue)"object"!==t.type?t.type?n[t.name]=r[t.type]:n[t.name]=void 0:n[t.name]=t.fields?getDefaultValueFromFields(t.fields):r.object;else{if("array"===t.type&&!Array.isArray(t.defaultValue))return void(n[t.name]=r.array);if("object"===t.type&&!isObject$1(t.defaultValue)){if("string"==typeof t.defaultValue){try{n[t.name]=JSON.parse(t.defaultValue)}catch(e){n[t.name]=r.object,console.warn("defaultValue 解析失败",t.defaultValue,e)}return}return void(n[t.name]=r.object)}n[t.name]=cloneDeep(t.defaultValue)}}),n},DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX=exports("D","ds-field::"),DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX="ds-field-changed",dataSourceTemplateRegExp=/\$\{([\s\S]+?)\}/g,isDslNode=exports("G",e=>void 0===e[IS_DSL_NODE_KEY]||!0===e[IS_DSL_NODE_KEY]),traverseNode=(e,t,n=[],r=!1)=>{r||t(e,n),Array.isArray(e.items)&&e.items.length&&(n.push(e),e.items.forEach(e=>{traverseNode(e,t,[...n],r)})),r&&t(e,n)};class FlowState{isAbort;constructor(){this.isAbort=!1}abort(){this.isAbort=!0}reset(){this.isAbort=!1}}class EventHelper extends eventsExports.EventEmitter{app;eventQueue=[];nodeEventList=new Map;dataSourceEventList=new Map;beforeEventHandler;afterEventHandler;constructor({app:e,beforeEventHandler:t,afterEventHandler:n}){super(),this.beforeEventHandler=t,this.afterEventHandler=n,this.app=e}destroy(){this.removeNodeEvents(),this.removeAllListeners(),this.nodeEventList.clear(),this.dataSourceEventList.clear()}bindNodeEvents(e){e.events?.forEach((t,n)=>{if(!t.name)return;let r=`${t.name}_${e.data.id}`;const s=t.name.split(".");s.length>1&&(r=`${s[1]}_${s[0]}`);let o=Symbol(r);e.eventKeys.has(r)?o=e.eventKeys.get(r):e.eventKeys.set(r,o);const i=(t,...r)=>{this.eventHandler(n,e,r)};this.nodeEventList.set(i,o),this.on(o,i)})}removeNodeEvents(){for(const e of Array.from(this.nodeEventList.keys())){const t=this.nodeEventList.get(e);t&&this.off(t,e)}this.nodeEventList.clear()}bindDataSourceEvents(){const e=Array.from(this.app.dataSourceManager?.dataSourceMap.values()||[]);this.removeDataSourceEvents(e);for(const t of e){const e=this.dataSourceEventList.get(t.id)??new Map;for(const n of t.schema.events||[]){const[r,...s]=n.name?.split(".")||[];if(!r)return;const o=(...e)=>{this.eventHandler(n,t,e)};e.set(n.name,o),r===DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX?t?.onDataChange(s.join("."),o):t.on(r,o)}this.dataSourceEventList.set(t.id,e)}}removeDataSourceEvents(e){if(this.dataSourceEventList.size){for(const t of e){const e=this.dataSourceEventList.get(t.id);if(!e)return;for(const n of Array.from(e.keys())){const[r,...s]=n.split(".");r===DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX?t.offDataChange(s.join("."),e.get(n)):t.off(r,e.get(n))}}this.dataSourceEventList.clear()}}getEventQueue(){return this.eventQueue}addEventToQueue(e){this.eventQueue.push(e)}async eventHandler(t,n,r){const s="number"==typeof t?n.events[t]:t;if("function"==typeof this.beforeEventHandler&&this.beforeEventHandler({eventConfig:s,source:n,args:r}),has(s,"actions")){const e=new FlowState,{actions:o}=s;for(let s=0;s1?e**2/r:e}resizeHandler=()=>{clearTimeout(this.tid),this.tid=setTimeout(()=>{this.refreshRem(),this.tid=void 0},300)};pageshowHandler=e=>{e.persisted&&this.resizeHandler()}}class Store{data;constructor({initialData:e={}}={}){this.data=e}set(e,t){this.data[e]=t}get(e){return this.data[e]}}class Node extends eventsExports.EventEmitter{data;style;events=[];instance=null;page;parent;app;store;eventKeys=new Map;eventQueue=[];constructor(e){super(),this.store=new Store({initialData:e.app.nodeStoreInitialData?.()||{}}),this.page=e.page,this.parent=e.parent,this.app=e.app,this.setData(e.config),this.listenLifeSafe()}setData(t){this.data=t;const{events:n,style:r}=t;this.events=n||[],this.style=r||{};try{!this.instance||Object.isFrozen(this.instance)||!1===Object.getOwnPropertyDescriptor(this.instance,"config")?.writable||this.instance.__isVue||(this.instance.config=t)}catch(e){}this.emit("update-data",t)}addEventToQueue(e){this.eventQueue.push(e)}registerMethod(e){if(e){this.instance||(this.instance={});for(const[t,n]of Object.entries(e))"function"==typeof n&&(this.instance[t]=n)}}setInstance(e){this.instance=e}async runHookCode(e,t){if("function"==typeof this.data[e])return void(await this.data[e](this));const n=this.data[e];if(n?.hookType===HookType.CODE)for(const r of n.hookData){const{codeType:e=HookCodeType.CODE,codeId:n,params:s={}}=r;e===HookCodeType.CODE&&"string"==typeof n?await this.app.runCode(n,t||s,[],void 0,this):e===HookCodeType.DATA_SOURCE_METHOD&&Array.isArray(n)&&n.length>1&&await this.app.runDataSourceMethod(n[0],n[1],t||s,[],void 0,this)}}destroy(){this.eventQueue.length=0,this.instance=null,this.events=[],this.style={},this.removeAllListeners()}listenLifeSafe(){this.once("created",e=>{this.once("destroy",()=>{this.instance=null,!0!==this.data[NODE_DISABLE_CODE_BLOCK_KEY]&&this.runHookCode("destroy"),this.listenLifeSafe()}),e&&this.setInstance(e),!0!==this.data[NODE_DISABLE_CODE_BLOCK_KEY]&&this.runHookCode("created")}),this.once("mounted",e=>{(async()=>{e&&this.setInstance(e);for(let t=this.eventQueue.shift();t;t=this.eventQueue.shift())"function"==typeof e[t.method]&&await e[t.method](t.fromCpt,...t.args);if(this.app.eventHelper){for(const t of this.app.eventHelper.getEventQueue())for(const[,n]of this.app.pageFragments){const r=n.getNode(t.toId);r&&r===this&&("function"==typeof e[t.method]&&await e[t.method](t.fromCpt,...t.args),t.handled=!0)}this.app.eventHelper.eventQueue=this.app.eventHelper.getEventQueue().filter(e=>!e.handled)}!0!==this.data[NODE_DISABLE_CODE_BLOCK_KEY]&&this.runHookCode("mounted")})()})}}class IteratorContainer extends Node{nodes=[];setData(e){this.resetNodes(),super.setData(e)}resetNodes(){this.nodes?.forEach(e=>{e.forEach(e=>{e.destroy()})}),this.nodes=[]}initNode(e,t,n){if(n.has(e.id)&&n.get(e.id)?.destroy(),e.type&&this.app.iteratorContainerType.has(e.type)){const r=new IteratorContainer({config:e,parent:t,page:this.page,app:this.app});return n.set(e.id,r),void this.app.eventHelper?.bindNodeEvents(r)}const r=new Node({config:e,parent:t,page:this.page,app:this.app});if(this.app.eventHelper?.bindNodeEvents(r),n.set(e.id,r),e.type&&this.app.pageFragmentContainerType.has(e.type)&&e.pageFragmentId){const t=this.app.dsl?.items?.find(t=>t.id===e.pageFragmentId);t&&(e.items=[t])}e.items?.forEach(e=>{this.initNode(e,r,n)})}setNodes(e,t){const n=this.nodes[t]||new Map;e.forEach(e=>{this.initNode(e,this,n)}),this.nodes[t]=n}getNode(e,t){return this.nodes[t]?.get(e)}destroy(){super.destroy(),this.resetNodes()}}class Page extends Node{nodes=new Map;constructor(e){super(e),this.setNode(e.config.id,this),e.config.items.forEach(e=>{this.initNode(e,this)})}initNode(e,t){if(e.type&&this.app.iteratorContainerType.has(e.type))return void this.setNode(e.id,new IteratorContainer({config:e,parent:t,page:this,app:this.app}));const n=new(e.type&&App.nodeClassMap.get(e.type)||Node)({config:e,parent:t,page:this,app:this.app});if(this.setNode(e.id,n),e.type&&this.app.pageFragmentContainerType.has(e.type)&&e.pageFragmentId){const t=this.app.dsl?.items?.find(t=>t.id===e.pageFragmentId);t&&this.app.pageFragments.set(e.id,new Page({config:t,app:this.app}))}e.items?.forEach(e=>{this.initNode(e,n)})}getNode(e,{iteratorContainerId:t,iteratorIndex:n,pageFragmentContainerId:r}={}){if(this.nodes.has(e))return this.nodes.get(e);if(r)return this.app.pageFragments.get(r)?.getNode(e,{iteratorContainerId:t,iteratorIndex:n});if(Array.isArray(t)&&t.length&&Array.isArray(n)){let r=this.nodes.get(t[0]);for(let e=1,s=t.length;e{e!==this&&e.destroy()}),this.nodes.clear(),super.destroy()}}const style2Obj=e=>{if("string"!=typeof e)return e;const t={};return e.split(";").forEach(e=>{if(!e)return;const n=e.split(":");let r=n.shift(),s=n.join(":");r&&(r=r.replace(/^\s*/,"").replace(/\s*$/,""),s=s.replace(/^\s*/,"").replace(/\s*$/,""),r=r.split("-").map((e,t)=>t>0?`${e[0].toUpperCase()}${e.substr(1)}`:e).join(""),t[r]=s)}),t},fillBackgroundImage=e=>!e||/^url/.test(e)||/^linear-gradient/.test(e)?e:`url(${e})`,getTransform=(e,t)=>{if(!e)return[];const n=Object.entries(e).map(([e,n])=>n.trim()?("rotate"===e&&isNumber$1(n)&&(n=`${n}deg`),"hippy"!==t?`${e}(${n})`:{[e]:n}):"");if("hippy"===t)return n;const r=n.join(" ");return r.trim()?r:"none"},transformStyle=(e,t)=>{if(!e)return{};let n={};const r={};n="string"==typeof e?style2Obj(e):{...e};const s="hippy"===t,o=["zIndex","opacity","fontWeight"];return Object.entries(n).forEach(([e,n])=>{"scale"===e&&!r.transform&&s?r.transform=[{scale:n}]:"backgroundImage"!==e||s?"transform"===e&&"string"!=typeof n?r[e]=getTransform(n,t):!o.includes(e)&&n&&/^[-]?[0-9]*[.]?[0-9]*$/.test(n)?r[e]=s?n:n/100+"rem":r[e]=n:n&&(r[e]=fillBackgroundImage(n))}),r},COMMON_EVENT_PREFIX=exports("C","magic:common:events:");class App extends eventsExports.EventEmitter{static nodeClassMap=new Map;static registerNode(e,t){App.nodeClassMap.set(e,t)}env;dsl;codeDsl;dataSourceManager;page;pageFragments=new Map;useMock=!1;platform="mobile";jsEngine="browser";components=new Map;pageFragmentContainerType=new Set(["page-fragment-container"]);iteratorContainerType=new Set(["iterator-container"]);request;transformStyle;eventHelper;errorHandler;nodeStoreInitialData;flexible;constructor(e){if(super(),e.env?this.setEnv(e.env):this.setEnv(e.ua),this.errorHandler=e.errorHandler,this.codeDsl=e.config?.codeBlocks,e.platform&&(this.platform=e.platform),e.jsEngine&&(this.jsEngine=e.jsEngine),e.nodeStoreInitialData&&(this.nodeStoreInitialData=e.nodeStoreInitialData),e.pageFragmentContainerType){(Array.isArray(e.pageFragmentContainerType)?e.pageFragmentContainerType:[e.pageFragmentContainerType]).forEach(e=>{this.pageFragmentContainerType.add(e)})}if(e.iteratorContainerType){(Array.isArray(e.iteratorContainerType)?e.iteratorContainerType:[e.iteratorContainerType]).forEach(e=>{this.iteratorContainerType.add(e)})}"boolean"==typeof e.useMock&&(this.useMock=e.useMock),"browser"!==this.jsEngine||e.disabledFlexible||(this.flexible=new Flexible({designWidth:e.designWidth})),"editor"!==this.platform&&(this.eventHelper=new EventHelper({app:this,beforeEventHandler:e.beforeEventHandler,afterEventHandler:e.afterEventHandler})),this.transformStyle=e.transformStyle||(e=>transformStyle(e,this.jsEngine)),e.request&&(this.request=e.request),e.config&&this.setConfig(e.config,e.curPage,e.dataSourceManagerInitialData)}setEnv(e){this.env=e&&"string"!=typeof e?e:new Env(e)}setDesignWidth(e){this.flexible?.setDesignWidth(e)}setConfig(e,t,n){this.dsl=e,!t&&e.items.length&&(t=e.items[0].id),this.dataSourceManager&&this.dataSourceManager.destroy(),this.dataSourceManager=createDataSourceManager(this,this.useMock,n),this.codeDsl=e.codeBlocks;const r=t||this.page?.data?.id;super.emit("dsl-change",{dsl:e,curPage:r}),this.pageFragments.forEach(e=>{e.destroy()}),this.pageFragments.clear(),this.setPage(r),this.dataSourceManager&&(this.dataSourceManager.isAllDataSourceRegistered()?this.eventHelper?.bindDataSourceEvents():this.dataSourceManager.once("registered-all",()=>{this.eventHelper?.bindDataSourceEvents()}))}setPage(e){const t=this.dsl?.items.find(t=>`${t.id}`==`${e}`);if(!t)return this.deletePage(),void super.emit("page-change");if(this.page){if(t===this.page.data)return;this.page.destroy()}if(this.page=new Page({config:t,app:this}),this.eventHelper){this.eventHelper.removeNodeEvents();for(const[,e]of this.page.nodes)this.eventHelper.bindNodeEvents(e);for(const[,e]of this.pageFragments)for(const[,t]of e.nodes)this.eventHelper.bindNodeEvents(t)}super.emit("page-change",this.page)}deletePage(){this.page?.destroy(),this.eventHelper?.removeNodeEvents(),this.page=void 0}getPage(e){return e?this.page&&`${this.page.data.id}`==`${e}`?this.page:void 0:this.page}getNode(e,t){return this.page?.getNode(e,t)}registerComponent(e,t){this.components.set(e,t)}unregisterComponent(e){this.components.delete(e)}resolveComponent(e){return this.components.get(e)}emit(e,...t){const[n,...r]=t;return this.eventHelper&&n instanceof Node&&n.data?.id&&n.eventKeys.has(`${String(e)}_${n.data.id}`)?this.eventHelper?.emit(n.eventKeys.get(`${String(e)}_${n.data.id}`),n,...r):super.emit(e,...t)}async runCode(t,n,r,s,o){if(!t||isEmpty(this.codeDsl))return;const i=this.codeDsl?.[t]?.content;if("function"==typeof i)try{await i({app:this,params:n,eventParams:r,flowState:s,node:o})}catch(e){if(!this.errorHandler)throw e;this.errorHandler(e,void 0,{type:"run-code",codeId:t,params:n,eventParams:r,flowState:s,node:o})}}async runDataSourceMethod(t,n,r,s,o,i){if(!t||!n)return;const a=this.dataSourceManager?.get(t);if(a)try{const e=(a.methods||[]).find(e=>e.name===n);e&&"function"==typeof e.content?await e.content({app:this,params:r,dataSource:a,eventParams:s,flowState:o,node:i}):"function"==typeof a[n]&&await a[n]()}catch(e){if(!this.errorHandler)throw e;this.errorHandler(e,a,{type:"data-source-method",params:r,eventParams:s,flowState:o,node:i})}}destroy(){this.removeAllListeners(),this.page?.destroy(),this.page=void 0,this.pageFragments.forEach(e=>{e.destroy()}),this.pageFragments.clear(),this.flexible?.destroy(),this.flexible=void 0,this.eventHelper?.destroy(),this.dsl=void 0,this.dataSourceManager?.destroy(),this.dataSourceManager=void 0,this.codeDsl=void 0,this.components.clear(),this.nodeStoreInitialData=void 0}}var DepTargetType=(e=>(e.DEFAULT="default",e.CODE_BLOCK="code-block",e.DATA_SOURCE="data-source",e.DATA_SOURCE_METHOD="data-source-method",e.DATA_SOURCE_COND="data-source-cond",e))(DepTargetType||{});class Target{isTarget;id;name;type=DepTargetType.DEFAULT;deps={};isCollectByDefault;constructor(e){this.isTarget=e.isTarget,this.id=e.id,this.name=e.name,this.isCollectByDefault=e.isCollectByDefault??!0,e.type&&(this.type=e.type),e.initialDeps&&(this.deps=e.initialDeps)}updateDep({id:e,name:t,key:n,data:r}){const s=this.deps[e]||{name:t,keys:[]};s.name=t,s.data=r,this.deps[e]=s,-1===s.keys.indexOf(n)&&s.keys.push(n)}removeDep(e,t){if(void 0===e)return void Object.keys(this.deps).forEach(e=>{delete this.deps[e]});const n=this.deps[e];if(n)if(t){const r=n.keys.indexOf(t);n.keys.splice(r,1),0===n.keys.length&&delete this.deps[e]}else delete this.deps[e]}hasDep(e,t){const n=this.deps[e];return Boolean(n?.keys.find(e=>e===t))}destroy(){this.deps={}}}const isIncludeArrayField=(e,t)=>{let n=t;return e.some((t,r)=>{const s=n.find(({name:e})=>e===t);return n=s?.fields||[],s&&"array"===s.type&&/^(?!\d+$).*$/.test(`${e[r+1]}`)&&r{const r=e.match(dataSourceTemplateRegExp)||[];if(r.length<=0)return!1;const s=[],o=[];return r.forEach(e=>{const n=e.substring(2,e.length-1),r=getKeysArray(n),i=r.shift();i&&i===t.id&&(isIncludeArrayField(r,t.fields)?s.push(e):o.push(e))}),n?s.length>0:o.length>0},isSpecificDataSourceTemplate=(e,t)=>e?.isBindDataSourceField&&e.dataSourceId&&e.dataSourceId===t&&"string"==typeof e.template,isUseDataSourceField=(e,t)=>{if(!Array.isArray(e)||"string"!=typeof e[0])return!1;const[n]=e,r=n.indexOf(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX);if(-1===r)return!1;return n.substring(r+DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX.length)===t},isDataSourceTarget=(e,t,n,r=!1)=>{if(!n||!["string","object"].includes(typeof n))return!1;if(`${t}`.startsWith(NODE_CONDS_KEY))return!1;if("string"==typeof n)return isDataSourceTemplate(n,e,r);if(isObject$1(n)&&n?.isBindDataSource&&n.dataSourceId&&n.dataSourceId===e.id)return!0;if(isSpecificDataSourceTemplate(n,e.id))return!0;if(isUseDataSourceField(n,e.id)){const[,...t]=n,s=isIncludeArrayField(t,e.fields);return r?s:!s}return!1},isDataSourceCondTarget=(e,t,n,r=!1)=>{if(!Array.isArray(n)||!e)return!1;const[s,...o]=n;if(s!==e.id||!`${t}`.startsWith(NODE_CONDS_KEY))return!1;if(e.fields?.find(e=>e.name===o[0])){const t=isIncludeArrayField(o,e.fields);return r?t:!t}return!1},traverseTarget=(e,t,n)=>{for(const r of Object.values(e))for(const e of Object.values(r))n&&e.type!==n||t(e)};class Watcher{targetsList={};childrenProp="items";idProp="id";nameProp="name";constructor(e){e?.initialTargets&&(this.targetsList=e.initialTargets),e?.childrenProp&&(this.childrenProp=e.childrenProp)}getTargetsList(){return this.targetsList}getTargets(e=DepTargetType.DEFAULT){return this.targetsList[e]||{}}addTarget(e){const t=this.getTargets(e.type)||{};this.targetsList[e.type]=t,t[e.id]=e}getTarget(e,t=DepTargetType.DEFAULT){return this.getTargets(t)[e]}hasTarget(e,t=DepTargetType.DEFAULT){return Boolean(this.getTarget(e,t))}hasSpecifiedTypeTarget(e=DepTargetType.DEFAULT){return Object.keys(this.getTargets(e)).length>0}removeTarget(e,t=DepTargetType.DEFAULT){const n=this.getTargets(t);n[e]&&(n[e].destroy(),delete n[e])}removeTargets(e=DepTargetType.DEFAULT){const t=this.targetsList[e];if(t){for(const e of Object.values(t))e.destroy();delete this.targetsList[e]}}clearTargets(){for(const e of Object.keys(this.targetsList))delete this.targetsList[e]}collect(e,t={},n=!1,r){this.collectByCallback(e,r,({node:e,target:r})=>{this.removeTargetDep(r,e),this.collectItem(e,r,t,n)})}collectByCallback(e,t,n){traverseTarget(this.targetsList,r=>{if(t||r.isCollectByDefault)for(const t of e)n({node:t,target:r})},t)}clear(e,t){let{targetsList:n}=this;t&&(n={[t]:this.getTargets(t)});const r=[];traverseTarget(n,t=>{if(e)for(const n of e)t.removeDep(n[this.idProp]),Array.isArray(n[this.childrenProp])&&n[this.childrenProp].length&&!r.includes(n[this.idProp])&&(r.push(n[this.idProp]),this.clear(n[this.childrenProp]));else t.removeDep()})}clearByType(e,t){this.clear(t,e)}collectItem(e,t,n={},r=!1){const s=[DepTargetType.DATA_SOURCE,DepTargetType.DATA_SOURCE_COND,DepTargetType.DATA_SOURCE_METHOD];if(e[NODE_DISABLE_DATA_SOURCE_KEY]&&s.includes(t.type))return;if(e[NODE_DISABLE_CODE_BLOCK_KEY]&&t.type===DepTargetType.CODE_BLOCK)return;const o=(s,i="")=>{const a=(s,a)=>{const c=s===this.childrenProp,l=i?`${i}.${s}`:s;if(t.isTarget(l,a))t.updateDep({id:e[this.idProp],name:`${e[this.nameProp]||e[this.idProp]}`,data:n,key:l});else if(!c&&Array.isArray(a))for(let e=0,t=a.length;e{for(const e of t||[])"rejected"===e.status&&s(e.reason);return e().catch(s)})},components={button:()=>__vitePreload(()=>module.import("./index-legacy-DUW78s6z.js"),void 0),container:()=>__vitePreload(()=>module.import("./Container-legacy-CNSnNQxe.js"),void 0),img:()=>__vitePreload(()=>module.import("./index-legacy-B8TBKR5k.js"),void 0),"iterator-container":()=>__vitePreload(()=>module.import("./IteratorContainer-legacy-DD31s6Kr.js"),void 0),overlay:()=>__vitePreload(()=>module.import("./index-legacy-GzDSacW1.js"),void 0),page:()=>__vitePreload(()=>module.import("./index-legacy-DR1X9oBQ.js"),void 0),"page-fragment":()=>__vitePreload(()=>module.import("./PageFragment-legacy-0KEFaiu-.js"),void 0),"page-fragment-container":()=>__vitePreload(()=>module.import("./PageFragmentContainer-legacy-CsBGwj_o.js"),void 0),qrcode:()=>__vitePreload(()=>module.import("./index-legacy-nQNUWAgo.js"),void 0),text:()=>__vitePreload(()=>module.import("./index-legacy-DA367VbM.js"),void 0)},datasources={},plugins={};function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString:toString}=Object.prototype,{getPrototypeOf:getPrototypeOf}=Object,{iterator:iterator,toStringTag:toStringTag}=Symbol,kindOf=(e=>t=>{const n=toString.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return null!==e&&!isUndefined(e)&&null!==e.constructor&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isBoolean=e=>!0===e||!1===e,isPlainObject=e=>{if("object"!==kindOf(e))return!1;const t=getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||toStringTag in e||iterator in e)},isEmptyObject=t=>{if(!isObject(t)||isBuffer(t))return!1;try{return 0===Object.keys(t).length&&Object.getPrototypeOf(t)===Object.prototype}catch(e){return!1}},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||isFunction(e.append)&&("formdata"===(t=kindOf(e))||"object"===t&&isFunction(e.toString)&&"[object FormData]"===e.toString()))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),isArray(e))for(r=0,s=e.length;r0;)if(r=n[s],t===r.toLowerCase())return r;return null}const _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e}=isContextDefined(this)&&this||{},t={},n=(n,r)=>{const s=e&&findKey(t,r)||r;isPlainObject(t[s])&&isPlainObject(n)?t[s]=merge(t[s],n):isPlainObject(n)?t[s]=merge({},n):isArray(n)?t[s]=n.slice():t[s]=n};for(let r=0,s=arguments.length;r(forEach(t,(t,r)=>{n&&isFunction(t)?e[r]=bind(t,n):e[r]=t},{allOwnKeys:r}),e),stripBOM=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],r&&!r(i,e,t)||a[i]||(t[i]=e[i],a[i]=!0);e=!1!==n&&getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},isTypedArray=(TypedArray="undefined"!=typeof Uint8Array&&getPrototypeOf(Uint8Array),e=>TypedArray&&e instanceof TypedArray);var TypedArray;const forEachEntry=(e,t)=>{const n=(e&&e[iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll=(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),hasOwnProperty=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};forEach(n,(n,s)=>{let o;!1!==(o=t(n,s,e))&&(r[s]=o||n)}),Object.defineProperties(e,r)},freezeMethods=e=>{reduceDescriptors(e,(t,n)=>{if(isFunction(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];isFunction(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet=(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return isArray(e)?r(e):r(String(e).split(t)),n},noop=()=>{},toFiniteNumber=(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&"FormData"===e[toStringTag]&&e[iterator])}const toJSONObject=e=>{const t=new Array(10),n=(e,r)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(isBuffer(e))return e;if(!("toJSON"in e)){t[r]=e;const s=isArray(e)?[]:{};return forEach(e,(e,t)=>{const o=n(e,r+1);!isUndefined(o)&&(s[t]=o)}),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch),_setImmediate=(setImmediateSupported="function"==typeof setImmediate,postMessageSupported=isFunction(_global.postMessage),setImmediateSupported?setImmediate:postMessageSupported?(token=`axios@${Math.random()}`,callbacks=[],_global.addEventListener("message",({source:e,data:t})=>{e===_global&&t===token&&callbacks.length&&callbacks.shift()()},!1),e=>{callbacks.push(e),_global.postMessage(token,"*")}):e=>setTimeout(e));var setImmediateSupported,postMessageSupported,token,callbacks;const asap="undefined"!=typeof queueMicrotask?queueMicrotask.bind(_global):"undefined"!=typeof process&&process.nextTick||_setImmediate,isIterable=e=>null!=e&&isFunction(e[iterator]),utils$1={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isBoolean:isBoolean,isObject:isObject,isPlainObject:isPlainObject,isEmptyObject:isEmptyObject,isReadableStream:isReadableStream,isRequest:isRequest,isResponse:isResponse,isHeaders:isHeaders,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isRegExp:isRegExp,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isTypedArray:isTypedArray,isFileList:isFileList,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject,isAsyncFn:isAsyncFn,isThenable:isThenable,setImmediate:_setImmediate,asap:asap,isIterable:isIterable};function AxiosError$1(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}utils$1.inherits(AxiosError$1,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError$1.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{descriptors[e]={value:e}}),Object.defineProperties(AxiosError$1,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError$1.from=(e,t,n,r,s,o)=>{const i=Object.create(prototype$1);return utils$1.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),AxiosError$1.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(e,t){return e=removeBrackets(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(e){return/^is[A-Z]/.test(e)});function toFormData$1(e,t,n){if(!utils$1.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=utils$1.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!utils$1.isUndefined(t[e])})).metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(utils$1.isDate(e))return e.toISOString();if(utils$1.isBoolean(e))return e.toString();if(!a&&utils$1.isBlob(e))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(e)||utils$1.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,s){let a=e;if(e&&!s&&"object"==typeof e)if(utils$1.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(utils$1.isArray(e)&&isFlatArray(e)||(utils$1.isFileList(e)||utils$1.endsWith(n,"[]"))&&(a=utils$1.toArray(e)))return n=removeBrackets(n),a.forEach(function(e,r){!utils$1.isUndefined(e)&&null!==e&&t.append(!0===i?renderKey([n],r,o):null===i?n:n+"[]",c(e))}),!1;return!!isVisitable(e)||(t.append(renderKey(s,n,o),c(e)),!1)}const u=[],d=Object.assign(predicates,{defaultVisitor:l,convertValue:c,isVisitable:isVisitable});if(!utils$1.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!utils$1.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),utils$1.forEach(n,function(n,o){!0===(!(utils$1.isUndefined(n)||null===n)&&s.call(t,n,utils$1.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])}),u.pop()}}(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const prototype=AxiosURLSearchParams.prototype;function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,n){if(!t)return e;const r=n&&n.encode||encode;utils$1.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(o=s?s(t,n):utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}prototype.append=function(e,t){this._pairs.push([e,t])},prototype.toString=function(e){const t=e?function(t){return e.call(this,t,encode$1)}:encode$1;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class InterceptorManager{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){utils$1.forEach(this.handlers,function(t){null!==t&&e(t)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1="undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,FormData$1="undefined"!=typeof FormData?FormData:null,Blob$1="undefined"!=typeof Blob?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv="undefined"!=typeof window&&"undefined"!=typeof document,_navigator="object"==typeof navigator&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hasBrowserEnv,hasStandardBrowserEnv:hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv:hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin:origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(e,t){return toFormData$1(e,new platform.classes.URLSearchParams,{visitor:function(e,t,n,r){return platform.isNode&&utils$1.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}function arrayToObject(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=e.length;if(o=!o&&utils$1.isArray(r)?r.length:o,a)return utils$1.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!i;r[o]&&utils$1.isObject(r[o])||(r[o]=[]);return t(e,n,r[o],s)&&utils$1.isArray(r[o])&&(r[o]=arrayToObject(r[o])),!i}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){const n={};return utils$1.forEachEntry(e,(e,r)=>{t(parsePropPath(e),r,n,0)}),n}return null}function stringifySafely(t,n,r){if(utils$1.isString(t))try{return(n||JSON.parse)(t),utils$1.trim(t)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(t)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=utils$1.isObject(e);s&&utils$1.isHTMLForm(e)&&(e=new FormData(e));if(utils$1.isFormData(e))return r?JSON.stringify(formDataToJSON(e)):e;if(utils$1.isArrayBuffer(e)||utils$1.isBuffer(e)||utils$1.isStream(e)||utils$1.isFile(e)||utils$1.isBlob(e)||utils$1.isReadableStream(e))return e;if(utils$1.isArrayBufferView(e))return e.buffer;if(utils$1.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(e,this.formSerializer).toString();if((o=utils$1.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData$1(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),stringifySafely(e)):e}],transformResponse:[function(t){const n=this.transitional||defaults.transitional,r=n&&n.forcedJSONParsing,s="json"===this.responseType;if(utils$1.isResponse(t)||utils$1.isReadableStream(t))return t;if(t&&utils$1.isString(t)&&(r&&!this.responseType||s)){const r=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(e){if(r){if("SyntaxError"===e.name)throw AxiosError$1.from(e,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],e=>{defaults.headers[e]={}});const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let n,r,s;return e&&e.split("\n").forEach(function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),r=e.substring(s+1).trim(),!n||t[n]&&ignoreDuplicateOf[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,n,r,s){return utils$1.isFunction(r)?r.call(this,t,n):(s&&(t=n),utils$1.isString(t)?utils$1.isString(r)?-1!==t.indexOf(r):utils$1.isRegExp(r)?r.test(t):void 0:void 0)}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function buildAccessors(e,t){const n=utils$1.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,s){return this[r].call(this,t,e,n,s)},configurable:!0})})}let AxiosHeaders$1=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=normalizeHeader(t);if(!s)throw new Error("header name must be a non-empty string");const o=utils$1.findKey(r,s);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=normalizeValue(e))}const o=(e,t)=>utils$1.forEach(e,(e,n)=>s(e,n,t));if(utils$1.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(utils$1.isString(e)&&(e=e.trim())&&!isValidHeaderName(e))o(parseHeaders(e),t);else if(utils$1.isObject(e)&&utils$1.isIterable(e)){let n,r,s={};for(const t of e){if(!utils$1.isArray(t))throw TypeError("Object iterator must return a key-value pair");s[r=t[0]]=(n=s[r])?utils$1.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(s,t)}else null!=e&&s(t,e,n);return this}get(e,t){if(e=normalizeHeader(e)){const n=utils$1.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return parseTokens(e);if(utils$1.isFunction(t))return t.call(this,e,n);if(utils$1.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const n=utils$1.findKey(this,e);return!(!n||void 0===this[n]||t&&!matchHeaderValue(this,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=normalizeHeader(e)){const s=utils$1.findKey(n,e);!s||t&&!matchHeaderValue(n,n[s],s,t)||(delete n[s],r=!0)}}return utils$1.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];e&&!matchHeaderValue(this,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return utils$1.forEach(this,(r,s)=>{const o=utils$1.findKey(n,s);if(o)return t[o]=normalizeValue(r),void delete t[s];const i=e?formatHeader(s):String(s).trim();i!==s&&delete t[s],t[i]=normalizeValue(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return utils$1.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&utils$1.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[$internals]=this[$internals]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=normalizeHeader(e);t[r]||(buildAccessors(n,e),t[r]=!0)}return utils$1.isArray(e)?e.forEach(r):r(e),this}};function transformData(e,t){const n=this||defaults,r=t||n,s=AxiosHeaders$1.from(r.headers);let o=r.data;return utils$1.forEach(e,function(e){o=e.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function isCancel$1(e){return!(!e||!e.__CANCEL__)}function CanceledError$1(e,t,n){AxiosError$1.call(this,null==e?"canceled":e,AxiosError$1.ERR_CANCELED,t,n),this.name="CanceledError"}function settle(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new AxiosError$1("Request failed with status code "+n.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s,o=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[i];s||(s=c),n[o]=a,r[o]=c;let u=i,d=0;for(;u!==o;)d+=n[u++],u%=e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-s{s=o,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-s;a>=o?i(e,t):(n=e,r||(r=setTimeout(()=>{r=null,i(n)},o-a)))},()=>n&&i(n)]}AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders$1.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),utils$1.freezeMethods(AxiosHeaders$1),utils$1.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});const progressEventReducer=(e,t,n=3)=>{let r=0;const s=speedometer(50,250);return throttle(n=>{const o=n.loaded,i=n.lengthComputable?n.total:void 0,a=o-r,c=s(a);r=o;e({loaded:o,total:i,progress:i?o/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&o<=i?(i-o)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},progressEventDecorator=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},asyncDecorator=e=>(...t)=>utils$1.asap(()=>e(...t)),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,platform.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];utils$1.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),utils$1.isString(r)&&i.push("path="+r),utils$1.isString(s)&&i.push("domain="+s),!0===o&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t,n){let r=!isAbsoluteURL(t);return e&&(r||0==n)?combineURLs(e,t):t}const headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e;function mergeConfig$1(e,t){t=t||{};const n={};function r(e,t,n,r){return utils$1.isPlainObject(e)&&utils$1.isPlainObject(t)?utils$1.merge.call({caseless:r},e,t):utils$1.isPlainObject(t)?utils$1.merge({},t):utils$1.isArray(t)?t.slice():t}function s(e,t,n,s){return utils$1.isUndefined(t)?utils$1.isUndefined(e)?void 0:r(void 0,e,0,s):r(e,t,0,s)}function o(e,t){if(!utils$1.isUndefined(t))return r(void 0,t)}function i(e,t){return utils$1.isUndefined(t)?utils$1.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,s,o){return o in t?r(n,s):o in e?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t,n)=>s(headersToObject(e),headersToObject(t),0,!0)};return utils$1.forEach(Object.keys({...e,...t}),function(r){const o=c[r]||s,i=o(e[r],t[r],r);utils$1.isUndefined(i)&&o!==a||(n[r]=i)}),n}const resolveConfig=e=>{const t=mergeConfig$1({},e);let n,{data:r,withXSRFToken:s,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:c}=t;if(t.headers=a=AxiosHeaders$1.from(a),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),utils$1.isFormData(r))if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(platform.hasStandardBrowserEnv&&(s&&utils$1.isFunction(s)&&(s=s(t)),s||!1!==s&&isURLSameOrigin(t.url))){const e=o&&i&&cookies.read(i);e&&a.set(o,e)}return t},isXHRAdapterSupported="undefined"!=typeof XMLHttpRequest,xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(t,n){const r=resolveConfig(e);let s=r.data;const o=AxiosHeaders$1.from(r.headers).normalize();let i,a,c,l,u,{responseType:d,onUploadProgress:p,onDownloadProgress:h}=r;function f(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let g=new XMLHttpRequest;function m(){if(!g)return;const r=AxiosHeaders$1.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());settle(function(e){t(e),f()},function(e){n(e),f()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,g)),g=null)},g.onerror=function(){n(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||transitionalDefaults;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new AxiosError$1(t,s.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,g)),g=null},void 0===s&&o.setContentType(null),"setRequestHeader"in g&&utils$1.forEach(o.toJSON(),function(e,t){g.setRequestHeader(t,e)}),utils$1.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),d&&"json"!==d&&(g.responseType=r.responseType),h&&([c,u]=progressEventReducer(h,!0),g.addEventListener("progress",c)),p&&g.upload&&([a,l]=progressEventReducer(p),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(i=t=>{g&&(n(!t||t.type?new CanceledError$1(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const y=parseProtocol(r.url);y&&-1===platform.protocols.indexOf(y)?n(new AxiosError$1("Unsupported protocol "+y+":",AxiosError$1.ERR_BAD_REQUEST,e)):g.send(s||null)})},composeSignals=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const s=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof AxiosError$1?t:new CanceledError$1(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,s(new AxiosError$1(`timeout ${t} of ms exceeded`,AxiosError$1.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)}),e=null)};e.forEach(e=>e.addEventListener("abort",s));const{signal:a}=r;return a.unsubscribe=()=>utils$1.asap(i),a}},streamChunk=function*(e,t){let n=e.byteLength;if(n{const s=readBytes(e,t);let o,i=0,a=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await s.next();if(t)return a(),void e.close();let o=r.byteLength;if(n){let e=i+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw a(t),t}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},isFetchSupported="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,isReadableStreamSupported=isFetchSupported&&"function"==typeof ReadableStream,encodeText=isFetchSupported&&("function"==typeof TextEncoder?(encoder=new TextEncoder,e=>encoder.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var encoder;const test=(t,...n)=>{try{return!!t(...n)}catch(e){return!1}},supportsRequestStream=isReadableStreamSupported&&test(()=>{let e=!1;const t=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),DEFAULT_CHUNK_SIZE=65536,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$1.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(e=>e.body)};var res;isFetchSupported&&(res=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!resolvers[e]&&(resolvers[e]=utils$1.isFunction(res[e])?t=>t[e]():(t,n)=>{throw new AxiosError$1(`Response type '${e}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,n)})}));const getBodyLength=async e=>{if(null==e)return 0;if(utils$1.isBlob(e))return e.size;if(utils$1.isSpecCompliantForm(e)){const t=new Request(platform.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return utils$1.isArrayBufferView(e)||utils$1.isArrayBuffer(e)?e.byteLength:(utils$1.isURLSearchParams(e)&&(e+=""),utils$1.isString(e)?(await encodeText(e)).byteLength:void 0)},resolveBodyLength=async(e,t)=>{const n=utils$1.toFiniteNumber(e.getContentLength());return null==n?getBodyLength(t):n},fetchAdapter=isFetchSupported&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:p}=resolveConfig(e);l=l?(l+"").toLowerCase():"text";let h,f=composeSignals([s,o&&o.toAbortSignal()],i);const g=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let m;try{if(c&&supportsRequestStream&&"get"!==n&&"head"!==n&&0!==(m=await resolveBodyLength(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(utils$1.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=progressEventDecorator(m,progressEventReducer(asyncDecorator(c)));r=trackStream(n.body,DEFAULT_CHUNK_SIZE,e,t)}}utils$1.isString(d)||(d=d?"include":"omit");const s="credentials"in Request.prototype;h=new Request(t,{...p,signal:f,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:s?d:void 0});let o=await fetch(h,p);const i=supportsResponseStream&&("stream"===l||"response"===l);if(supportsResponseStream&&(a||i&&g)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=o[t]});const t=utils$1.toFiniteNumber(o.headers.get("content-length")),[n,r]=a&&progressEventDecorator(t,progressEventReducer(asyncDecorator(a),!0))||[];o=new Response(trackStream(o.body,DEFAULT_CHUNK_SIZE,n,()=>{r&&r(),g&&g()}),e)}l=l||"text";let y=await resolvers[utils$1.findKey(resolvers,l)||"text"](o,e);return!i&&g&&g(),await new Promise((t,n)=>{settle(t,n,{data:y,headers:AxiosHeaders$1.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:h})})}catch(y){if(g&&g(),y&&"TypeError"===y.name&&/Load failed|fetch/i.test(y.message))throw Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,h),{cause:y.cause||y});throw AxiosError$1.from(y,y&&y.code,e,h)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{value:n})}catch(e){}Object.defineProperty(t,"adapterName",{value:n})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils$1.isFunction(e)||null===e||!1===e,adapters={getAdapter:e=>{e=utils$1.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new AxiosError$1("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError$1(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return adapters.getAdapter(e.adapter||defaults.adapter)(e).then(function(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=AxiosHeaders$1.from(t.headers),t},function(t){return isCancel$1(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=AxiosHeaders$1.from(t.response.headers))),Promise.reject(t)})}const VERSION$1="1.11.0",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{validators$1[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const deprecatedWarnings={};function assertOptions(e,t,n){if("object"!=typeof e)throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const t=e[o],n=void 0===t||i(t,o,e);if(!0!==n)throw new AxiosError$1("option "+o+" must be "+n,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new AxiosError$1("Unknown option "+o,AxiosError$1.ERR_BAD_OPTION)}}validators$1.transitional=function(e,t,n){function r(e,t){return"[Axios v"+VERSION$1+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,o)=>{if(!1===e)throw new AxiosError$1(r(s," has been removed"+(t?" in "+t:"")),AxiosError$1.ERR_DEPRECATED);return t&&!deprecatedWarnings[s]&&(deprecatedWarnings[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,o)}},validators$1.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const validator={assertOptions:assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(e){this.defaults=e||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{r.stack?n&&!String(r.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+n):r.stack=n}catch(e){}}throw r}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig$1(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&validator.assertOptions(n,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),null!=r&&(utils$1.isFunction(r)?t.paramsSerializer={serialize:r}:validator.assertOptions(r,{encode:validators.function,serialize:validators.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),validator.assertOptions(t,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&utils$1.merge(s.common,s[t.method]);s&&utils$1.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=AxiosHeaders$1.concat(o,s);const i=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const c=[];let l;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[dispatchRequest.bind(this),void 0];for(e.unshift(...i),e.push(...c),u=e.length,l=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,s){n.reason||(n.reason=new CanceledError$1(e,r,s),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function spread$1(e){return function(t){return e.apply(null,t)}}function isAxiosError$1(e){return utils$1.isObject(e)&&!0===e.isAxiosError}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};function createInstance(e){const t=new Axios$1(e),n=bind(Axios$1.prototype.request,t);return utils$1.extend(n,Axios$1.prototype,t,{allOwnKeys:!0}),utils$1.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return createInstance(mergeConfig$1(e,t))},n}Object.entries(HttpStatusCode$1).forEach(([e,t])=>{HttpStatusCode$1[t]=e});const axios=createInstance(defaults);axios.Axios=Axios$1,axios.CanceledError=CanceledError$1,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel$1,axios.VERSION=VERSION$1,axios.toFormData=toFormData$1,axios.AxiosError=AxiosError$1,axios.Cancel=axios.CanceledError,axios.all=function(e){return Promise.all(e)},axios.spread=spread$1,axios.isAxiosError=isAxiosError$1,axios.mergeConfig=mergeConfig$1,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const{Axios:Axios,AxiosError:AxiosError,CanceledError:CanceledError,isCancel:isCancel,CancelToken:CancelToken,VERSION:VERSION,all:all,Cancel:Cancel,isAxiosError:isAxiosError,spread:spread,toFormData:toFormData,AxiosHeaders:AxiosHeaders,HttpStatusCode:HttpStatusCode,formToJSON:formToJSON,getAdapter:getAdapter,mergeConfig:mergeConfig}=axios,requestHandler=function(e){return e},responseHandler=function(e){return e},service=axios.create({withCredentials:!0,timeout:7e3});service.interceptors.request.use(requestHandler),service.interceptors.response.use(responseHandler);const request={install(e){e.provide("request",service)}},useDsl=exports("B",(e=inject("app"),t)=>{if(!e)throw new Error("useDsl must be used after MagicApp is created");const n=t?e.pageFragments.get(t):null,r=ref(t?n?.data:e.page?.data);t?e.on("dsl-change",()=>{r.value=n?.data}):e.on("page-change",()=>{r.value=e.page?.data});const s=(s,o,i,a)=>{if(!(!s.length||t&&n?.data.id!==a||!t&&e.page?.data.id!==a)){for(const e of s)isPage(e)&&!t&&e.id===a||isPageFragment(e)&&t?r.value=e:replaceChildNode(reactive(e),[r.value]);nextTick(()=>{e.emit("replaced-node",{nodes:s,sourceId:o,...i})})}};return e.dataSourceManager&&(e.dataSourceManager.on("update-data",s),onBeforeUnmount(()=>{e.dataSourceManager.off("update-data",s)})),{app:e,pageConfig:r}});function useComponent(e=""){let t,n,r;return"string"==typeof e?t=e:({componentType:t,app:n}=e),t&&""!==t||(t="container"),n||(n=inject("app")),r=n?.resolveComponent(t),r||t.startsWith("magic-ui-")||(t=`magic-ui-${toLine(t)}`,r=n?.resolveComponent(t)),r??t}const _sfc_main=defineComponent({__name:"App",setup(e){const{pageConfig:t}=useDsl(),n=useComponent("page");return(e,r)=>(openBlock(),createBlock(resolveDynamicComponent(unref(n)),{config:unref(t)},null,8,["config"]))}}),getLocalConfig=()=>{const configStr=localStorage.getItem("magicDSL");if(!configStr)return[];try{return[eval(`(${configStr})`)]}catch(err){return console.error("Error parsing localStorage magicDSL:",err),[]}};DataSourceManager.registerObservedData(DeepObservedData);const vueApp=createApp(_sfc_main);vueApp.use(request);const dsl=((getUrlParam("localPreview")?getLocalConfig():window.magicDSL)||[])[0]||{},app=new App({ua:window.navigator.userAgent,config:dsl,request:service,curPage:getUrlParam("page"),useMock:Boolean(getUrlParam("useMock"))});app.setDesignWidth(app.env.isWeb?window.document.documentElement.getBoundingClientRect().width:375),Object.entries(components).forEach(([e,t])=>{app.registerComponent(e,defineAsyncComponent(t))}),Object.values(plugins).forEach(e=>{vueApp.use(e,{app:app})}),vueApp.provide("userRender",({h:e,type:t,props:n={},attrs:r={},style:s,className:o,on:i,directives:a=[]})=>{const c={...n,...r,style:s,class:o};if(i)for(const[l,u]of Object.entries(i))c[`on${l[0].toLocaleUpperCase()}${l.substring(1)}`]=u;return a.length?withDirectives(e(t,c),a.map(e=>[resolveDirective(e.name),e.value,e.modifiers])):e(t,c)}),registerDataSourceOnDemand(dsl,datasources).then(e=>{Object.entries(e).forEach(([e,t])=>{DataSourceManager.register(e,t)}),vueApp.config.globalProperties.app=app,vueApp.provide("app",app),vueApp.mount("#app")})}}})})(); //# sourceMappingURL=index-legacy-BcevF5gJ.js.map