const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-7F8izgBm.js","assets/plugin-vueexport-helper-CAXJ8sGA.js","assets/Container-DK0Lu2Fj.js","assets/use-component-status-BuKRmaCm.js","assets/index-fCe7t2BB.js","assets/IteratorContainer-CWEPRDVy.js","assets/index-GCqbqFTJ.js","assets/index-CE30GUgR.js","assets/PageFragment-DNRIMCtY.js","assets/PageFragmentContainer-BMWpuBJg.js","assets/PageFragmentContainer-cYhCsB48.css","assets/index-KPHPX1v8.js","assets/index-Bk94UvMv.js"])))=>i.map(i=>d[i]); var Be=Object.defineProperty;var je=e=>{throw TypeError(e)};var Ue=(e,t,r)=>t in e?Be(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var R=(e,t,r)=>Ue(e,typeof t!="symbol"?t+"":t,r),Le=(e,t,r)=>t.has(e)||je("Cannot "+r);var G=(e,t,r)=>(Le(e,t,"read from private field"),r?r.call(e):t.get(e)),re=(e,t,r)=>t.has(e)?je("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ce=(e,t,r,s)=>(Le(e,t,"write to private field"),s?s.call(e,r):t.set(e,r),r);function __vite_legacy_guard(){import.meta.url,import("_").catch(()=>1),async function*(){}().next()}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))s(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function r(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(n){if(n.ep)return;n.ep=!0;const i=r(n);fetch(n.href,i)}})();/** * @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 r of e.split(","))t[r]=1;return r=>r in t}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),isModelListener=e=>e.startsWith("onUpdate:"),extend$1=Object.assign,remove=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},hasOwnProperty$d=Object.prototype.hasOwnProperty,hasOwn=(e,t)=>hasOwnProperty$d.call(e,t),isArray$2=Array.isArray,isMap$1=e=>toTypeString(e)==="[object Map]",isSet$1=e=>toTypeString(e)==="[object Set]",isFunction$2=e=>typeof e=="function",isString$1=e=>typeof e=="string",isSymbol$1=e=>typeof e=="symbol",isObject$4=e=>e!==null&&typeof e=="object",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=>toTypeString(e)==="[object Object]",isIntegerKey=e=>isString$1(e)&&e!=="NaN"&&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 r=>t[r]||(t[r]=e(r))},camelizeRE=/-\w/g,camelize=cacheStringFunction(e=>e.replace(camelizeRE,t=>t.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".concat(capitalize(e)):""),hasChanged=(e,t)=>!Object.is(e,t),invokeArrayFns=(e,...t)=>{for(let r=0;r{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:r})},looseToNumber=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function normalizeStyle(e){if(isArray$2(e)){const t={};for(let r=0;r{if(r){const s=r.split(propertyDelimiterRE);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function normalizeClass(e){let t="";if(isString$1(e))t=e;else if(isArray$2(e))for(let r=0;r!!(e&&e.__v_isRef===!0),toDisplayString=e=>isString$1(e)?e:e==null?"":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(".concat(t.size,")")]:[...t.entries()].reduce((r,[s,n],i)=>(r[stringifySymbol(s,i)+" =>"]=n,r),{})}:isSet$1(t)?{["Set(".concat(t.size,")")]:[...t.values()].map(r=>stringifySymbol(r))}:isSymbol$1(t)?stringifySymbol(t):isObject$4(t)&&!isArray$2(t)&&!isPlainObject$1(t)?String(t):t,stringifySymbol=(e,t="")=>{var r;return isSymbol$1(e)?"Symbol(".concat((r=e.description)!=null?r:t,")"):e};/** * @vue/reactivity v3.5.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let activeEffectScope;class EffectScope{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=activeEffectScope,!t&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,r;if(this.scopes)for(t=0,r=this.scopes.length;t0&&--this._on===0&&(activeEffectScope=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let r,s;for(r=0,s=this.effects.length;r0)return;if(batchedComputed){let t=batchedComputed;for(batchedComputed=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;batchedSub;){let t=batchedSub;for(batchedSub=void 0;t;){const r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=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,r=e.depsTail,s=r;for(;s;){const n=s.prevDep;s.version===-1?(s===r&&(r=n),removeSub(s),removeDep(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=n}e.deps=t,e.depsTail=r}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(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===globalVersion)||(e.globalVersion=globalVersion,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!isDirty(e))))return;e.flags|=2;const t=e.dep,r=activeSub,s=shouldTrack;activeSub=e,shouldTrack=!0;try{prepareDeps(e);const n=e.fn(e._value);(t.version===0||hasChanged(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(n){throw t.version++,n}finally{activeSub=r,shouldTrack=s,cleanupDeps(e),e.flags&=-3}}function removeSub(e,t=!1){const{dep:r,prevSub:s,nextSub:n}=e;if(s&&(s.nextSub=n,e.prevSub=void 0),n&&(n.prevSub=s,e.nextSub=void 0),r.subs===e&&(r.subs=s,!s&&r.computed)){r.computed.flags&=-5;for(let i=r.computed.deps;i;i=i.nextDep)removeSub(i,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function removeDep(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.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=e===void 0?!0:e}function cleanupEffect(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=activeSub;activeSub=void 0;try{t()}finally{activeSub=r}}}let globalVersion=0;class Link{constructor(t,r){this.sub=t,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Dep{constructor(t){this.computed=t,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(t){if(!activeSub||!shouldTrack||activeSub===this.computed)return;let r=this.activeLink;if(r===void 0||r.sub!==activeSub)r=this.activeLink=new Link(activeSub,this),activeSub.deps?(r.prevDep=activeSub.depsTail,activeSub.depsTail.nextDep=r,activeSub.depsTail=r):activeSub.deps=activeSub.depsTail=r,addSub(r);else if(r.version===-1&&(r.version=this.version,r.nextDep)){const s=r.nextDep;s.prevDep=r.prevDep,r.prevDep&&(r.prevDep.nextDep=s),r.prevDep=activeSub.depsTail,r.nextDep=void 0,activeSub.depsTail.nextDep=r,activeSub.depsTail=r,activeSub.deps===r&&(activeSub.deps=s)}return r}trigger(t){this.version++,globalVersion++,this.notify(t)}notify(t){startBatch();try{for(let r=this.subs;r;r=r.prevSub)r.sub.notify()&&r.sub.dep.notify()}finally{endBatch()}}}function addSub(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)addSub(s)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.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,r){if(shouldTrack&&activeSub){let s=targetMap.get(e);s||targetMap.set(e,s=new Map);let n=s.get(r);n||(s.set(r,n=new Dep),n.map=s,n.key=r),n.track()}}function trigger(e,t,r,s,n,i){const o=targetMap.get(e);if(!o){globalVersion++;return}const a=c=>{c&&c.trigger()};if(startBatch(),t==="clear")o.forEach(a);else{const c=isArray$2(e),l=c&&isIntegerKey(r);if(c&&r==="length"){const u=Number(s);o.forEach((f,m)=>{(m==="length"||m===ARRAY_ITERATE_KEY||!isSymbol$1(m)&&m>=u)&&a(f)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),l&&a(o.get(ARRAY_ITERATE_KEY)),t){case"add":c?l&&a(o.get("length")):(a(o.get(ITERATE_KEY)),isMap$1(e)&&a(o.get(MAP_KEY_ITERATE_KEY)));break;case"delete":c||(a(o.get(ITERATE_KEY)),isMap$1(e)&&a(o.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap$1(e)&&a(o.get(ITERATE_KEY));break}}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(t=>isArray$2(t)?reactiveReadArray(t):t))},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,r=>r.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,r){const s=shallowReadArray(e),n=s[t]();return s!==e&&!isShallow(e)&&(n._next=n.next,n.next=()=>{const i=n._next();return i.value&&(i.value=r(i.value)),i}),n}const arrayProto$1=Array.prototype;function apply$1(e,t,r,s,n,i){const o=shallowReadArray(e),a=o!==e&&!isShallow(e),c=o[t];if(c!==arrayProto$1[t]){const f=c.apply(e,i);return a?toReactive(f):f}let l=r;o!==e&&(a?l=function(f,m){return r.call(this,toReactive(f),m,e)}:r.length>2&&(l=function(f,m){return r.call(this,f,m,e)}));const u=c.call(o,l,s);return a&&n?n(u):u}function reduce(e,t,r,s){const n=shallowReadArray(e);let i=r;return n!==e&&(isShallow(e)?r.length>3&&(i=function(o,a,c){return r.call(this,o,a,c,e)}):i=function(o,a,c){return r.call(this,o,toReactive(a),c,e)}),n[t](i,...s)}function searchProxy(e,t,r){const s=toRaw(e);track(s,"iterate",ARRAY_ITERATE_KEY);const n=s[t](...r);return(n===-1||n===!1)&&isProxy(r[0])?(r[0]=toRaw(r[0]),s[t](...r)):n}function noTracking(e,t,r=[]){pauseTracking(),startBatch();const s=toRaw(e)[t].apply(e,r);return endBatch(),resetTracking(),s}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").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(t=!1,r=!1){this._isReadonly=t,this._isShallow=r}get(t,r,s){if(r==="__v_skip")return t.__v_skip;const n=this._isReadonly,i=this._isShallow;if(r==="__v_isReactive")return!n;if(r==="__v_isReadonly")return n;if(r==="__v_isShallow")return i;if(r==="__v_raw")return s===(n?i?shallowReadonlyMap:readonlyMap:i?shallowReactiveMap:reactiveMap).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=isArray$2(t);if(!n){let c;if(o&&(c=arrayInstrumentations[r]))return c;if(r==="hasOwnProperty")return hasOwnProperty$c}const a=Reflect.get(t,r,isRef(t)?t:s);return(isSymbol$1(r)?builtInSymbols.has(r):isNonTrackableKeys(r))||(n||track(t,"get",r),i)?a:isRef(a)?o&&isIntegerKey(r)?a:a.value:isObject$4(a)?n?readonly(a):reactive(a):a}}class MutableReactiveHandler extends BaseReactiveHandler{constructor(t=!1){super(!1,t)}set(t,r,s,n){let i=t[r];if(!this._isShallow){const c=isReadonly(i);if(!isShallow(s)&&!isReadonly(s)&&(i=toRaw(i),s=toRaw(s)),!isArray$2(t)&&isRef(i)&&!isRef(s))return c||(i.value=s),!0}const o=isArray$2(t)&&isIntegerKey(r)?Number(r)e,getProto=e=>Reflect.getPrototypeOf(e);function createIterableMethod(e,t,r){return function(...s){const n=this.__v_raw,i=toRaw(n),o=isMap$1(i),a=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,l=n[e](...s),u=r?toShallow:t?toReadonly:toReactive;return!t&&track(i,"iterate",c?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:f,done:m}=l.next();return m?{value:f,done:m}:{value:a?[u(f[0]),u(f[1])]:u(f),done:m}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function createInstrumentations(e,t){const r={get(n){const i=this.__v_raw,o=toRaw(i),a=toRaw(n);e||(hasChanged(n,a)&&track(o,"get",n),track(o,"get",a));const{has:c}=getProto(o),l=t?toShallow:e?toReadonly:toReactive;if(c.call(o,n))return l(i.get(n));if(c.call(o,a))return l(i.get(a));i!==o&&i.get(n)},get size(){const n=this.__v_raw;return!e&&track(toRaw(n),"iterate",ITERATE_KEY),n.size},has(n){const i=this.__v_raw,o=toRaw(i),a=toRaw(n);return e||(hasChanged(n,a)&&track(o,"has",n),track(o,"has",a)),n===a?i.has(n):i.has(n)||i.has(a)},forEach(n,i){const o=this,a=o.__v_raw,c=toRaw(a),l=t?toShallow:e?toReadonly:toReactive;return!e&&track(c,"iterate",ITERATE_KEY),a.forEach((u,f)=>n.call(i,l(u),l(f),o))}};return extend$1(r,e?{add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear")}:{add(n){!t&&!isShallow(n)&&!isReadonly(n)&&(n=toRaw(n));const i=toRaw(this);return getProto(i).has.call(i,n)||(i.add(n),trigger(i,"add",n,n)),this},set(n,i){!t&&!isShallow(i)&&!isReadonly(i)&&(i=toRaw(i));const o=toRaw(this),{has:a,get:c}=getProto(o);let l=a.call(o,n);l||(n=toRaw(n),l=a.call(o,n));const u=c.call(o,n);return o.set(n,i),l?hasChanged(i,u)&&trigger(o,"set",n,i):trigger(o,"add",n,i),this},delete(n){const i=toRaw(this),{has:o,get:a}=getProto(i);let c=o.call(i,n);c||(n=toRaw(n),c=o.call(i,n)),a&&a.call(i,n);const l=i.delete(n);return c&&trigger(i,"delete",n,void 0),l},clear(){const n=toRaw(this),i=n.size!==0,o=n.clear();return i&&trigger(n,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{r[n]=createIterableMethod(n,e,t)}),r}function createInstrumentationGetter(e,t){const r=createInstrumentations(e,t);return(s,n,i)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?s:Reflect.get(hasOwn(r,n)&&n in s?r:s,n,i)}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,r,s,n){if(!isObject$4(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=getTargetType(e);if(i===0)return e;const o=n.get(e);if(o)return o;const a=new Proxy(e,i===2?s:r);return n.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:!1}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?e.__v_isRef===!0:!1}function ref(e){return createRef(e,!1)}function createRef(e,t){return isRef(e)?e:new RefImpl(e,t)}class RefImpl{constructor(t,r){this.dep=new Dep,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=r?t:toRaw(t),this._value=r?t:toReactive(t),this.__v_isShallow=r}get value(){return this.dep.track(),this._value}set value(t){const r=this._rawValue,s=this.__v_isShallow||isShallow(t)||isReadonly(t);t=s?t:toRaw(t),hasChanged(t,r)&&(this._rawValue=t,this._value=s?t:toReactive(t),this.dep.trigger())}}function unref(e){return isRef(e)?e.value:e}const shallowUnwrapHandlers={get:(e,t,r)=>t==="__v_raw"?e:unref(Reflect.get(e,t,r)),set:(e,t,r,s)=>{const n=e[t];return isRef(n)&&!isRef(r)?(n.value=r,!0):Reflect.set(e,t,r,s)}};function proxyRefs(e){return isReactive(e)?e:new Proxy(e,shallowUnwrapHandlers)}class ComputedRefImpl{constructor(t,r,s){this.fn=t,this.setter=r,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=!r,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&activeSub!==this)return batch(this,!0),!0}get value(){const t=this.dep.track();return refreshComputed(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function computed$1(e,t,r=!1){let s,n;return isFunction$2(e)?s=e:(s=e.get,n=e.set),new ComputedRefImpl(s,n,r)}const INITIAL_WATCHER_VALUE={},cleanupMap=new WeakMap;let activeWatcher;function onWatcherCleanup(e,t=!1,r=activeWatcher){if(r){let s=cleanupMap.get(r);s||cleanupMap.set(r,s=[]),s.push(e)}}function watch$1(e,t,r=EMPTY_OBJ){const{immediate:s,deep:n,once:i,scheduler:o,augmentJob:a,call:c}=r,l=b=>n?b:isShallow(b)||n===!1||n===0?traverse(b,1):traverse(b);let u,f,m,S,y=!1,T=!1;if(isRef(e)?(f=()=>e.value,y=isShallow(e)):isReactive(e)?(f=()=>l(e),y=!0):isArray$2(e)?(T=!0,y=e.some(b=>isReactive(b)||isShallow(b)),f=()=>e.map(b=>{if(isRef(b))return b.value;if(isReactive(b))return l(b);if(isFunction$2(b))return c?c(b,2):b()})):isFunction$2(e)?t?f=c?()=>c(e,2):e:f=()=>{if(m){pauseTracking();try{m()}finally{resetTracking()}}const b=activeWatcher;activeWatcher=u;try{return c?c(e,3,[S]):e(S)}finally{activeWatcher=b}}:f=NOOP,t&&n){const b=f,E=n===!0?1/0:n;f=()=>traverse(b(),E)}const _=getCurrentScope(),x=()=>{u.stop(),_&&_.active&&remove(_.effects,u)};if(i&&t){const b=t;t=(...E)=>{b(...E),x()}}let D=T?new Array(e.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const M=b=>{if(!(!(u.flags&1)||!u.dirty&&!b))if(t){const E=u.run();if(n||y||(T?E.some((C,j)=>hasChanged(C,D[j])):hasChanged(E,D))){m&&m();const C=activeWatcher;activeWatcher=u;try{const j=[E,D===INITIAL_WATCHER_VALUE?void 0:T&&D[0]===INITIAL_WATCHER_VALUE?[]:D,S];D=E,c?c(t,3,j):t(...j)}finally{activeWatcher=C}}}else u.run()};return a&&a(M),u=new ReactiveEffect(f),u.scheduler=o?()=>o(M,!1):M,S=b=>onWatcherCleanup(b,!1,u),m=u.onStop=()=>{const b=cleanupMap.get(u);if(b){if(c)c(b,4);else for(const E of b)E();cleanupMap.delete(u)}},t?s?M(!0):D=u.run():o?o(M.bind(null,!0),!0):u.run(),x.pause=u.pause.bind(u),x.resume=u.resume.bind(u),x.stop=x,x}function traverse(e,t=1/0,r){if(t<=0||!isObject$4(e)||e.__v_skip||(r=r||new Map,(r.get(e)||0)>=t))return e;if(r.set(e,t),t--,isRef(e))traverse(e.value,t,r);else if(isArray$2(e))for(let s=0;s{traverse(s,t,r)});else if(isPlainObject$1(e)){for(const s in e)traverse(e[s],t,r);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&traverse(e[s],t,r)}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 r=stack.length?stack[stack.length-1].component:null,s=r&&r.appContext.config.warnHandler,n=getComponentTrace();if(s)callWithErrorHandling(s,r,11,[e+t.map(i=>{var o,a;return(a=(o=i.toString)==null?void 0:o.call(i))!=null?a:JSON.stringify(i)}).join(""),r&&r.proxy,n.map(({vnode:i})=>"at <".concat(formatComponentName(r,i.type),">")).join("\n"),n]);else{const i=["[Vue warn]: ".concat(e),...t];n.length&&i.push("\n",...formatTrace(n)),console.warn(...i)}resetTracking(),isWarning=!1}function getComponentTrace(){let e=stack[stack.length-1];if(!e)return[];const t=[];for(;e;){const r=t[0];r&&r.vnode===e?r.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function formatTrace(e){const t=[];return e.forEach((r,s)=>{t.push(...s===0?[]:["\n"],...formatTraceEntry(r))}),t}function formatTraceEntry({vnode:e,recurseCount:t}){const r=t>0?"... (".concat(t," recursive calls)"):"",s=e.component?e.component.parent==null:!1,n=" at <".concat(formatComponentName(e.component,e.type,s)),i=">"+r;return e.props?[n,...formatProps(e.props),i]:[n+i]}function formatProps(e){const t=[],r=Object.keys(e);return r.slice(0,3).forEach(s=>{t.push(...formatProp(s,e[s]))}),r.length>3&&t.push(" ..."),t}function formatProp(e,t,r){return isString$1(t)?(t=JSON.stringify(t),r?t:["".concat(e,"=").concat(t)]):typeof t=="number"||typeof t=="boolean"||t==null?r?t:["".concat(e,"=").concat(t)]:isRef(t)?(t=formatProp(e,toRaw(t.value),!0),r?t:["".concat(e,"=Ref<"),t,">"]):isFunction$2(t)?["".concat(e,"=fn").concat(t.name?"<".concat(t.name,">"):"")]:(t=toRaw(t),r?t:["".concat(e,"="),t])}function callWithErrorHandling(e,t,r,s){try{return s?e(...s):e()}catch(n){handleError(n,t,r)}}function callWithAsyncErrorHandling(e,t,r,s){if(isFunction$2(e)){const n=callWithErrorHandling(e,t,r,s);return n&&isPromise(n)&&n.catch(i=>{handleError(i,t,r)}),n}if(isArray$2(e)){const n=[];for(let i=0;i>>1,n=queue[s],i=getId(n);i=getId(r)?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&&e.id===-1?activePostFlushCbs.splice(postFlushIndex+1,0,e):e.flags&1||(pendingPostFlushCbs.push(e),e.flags|=1),queueFlush()}function flushPreFlushCbs(e,t,r=flushIndex+1){for(;rgetId(r)-getId(s));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...t);return}for(activePostFlushCbs=t,postFlushIndex=0;postFlushIndexe.id==null?e.flags&2?-1:1/0:e.id;function flushJobs(e){try{for(flushIndex=0;flushIndex{s._d&&setBlockTracking(-1);const i=setCurrentRenderingInstance(t);let o;try{o=e(...n)}finally{setCurrentRenderingInstance(i),s._d&&setBlockTracking(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function withDirectives(e,t){if(currentRenderingInstance===null)return e;const r=getComponentPublicInstance(currentRenderingInstance),s=e.dirs||(e.dirs=[]);for(let n=0;ne.__isTeleport,leaveCbKey=Symbol("_leaveCb");function setTransitionHooks(e,t){e.shapeFlag&6&&e.component?(e.transition=t,setTransitionHooks(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function 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,r,s,n=!1){if(isArray$2(e)){e.forEach((y,T)=>setRef(y,t&&(isArray$2(t)?t[T]:t),r,s,n));return}if(isAsyncWrapper(s)&&!n){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&setRef(e,t,r,s.component.subTree);return}const i=s.shapeFlag&4?getComponentPublicInstance(s.component):s.el,o=n?null:i,{i:a,r:c}=e,l=t&&t.r,u=a.refs===EMPTY_OBJ?a.refs={}:a.refs,f=a.setupState,m=toRaw(f),S=f===EMPTY_OBJ?NO:y=>hasOwn(m,y);if(l!=null&&l!==c){if(invalidatePendingSetRef(t),isString$1(l))u[l]=null,S(l)&&(f[l]=null);else if(isRef(l)){l.value=null;const y=t;y.k&&(u[y.k]=null)}}if(isFunction$2(c))callWithErrorHandling(c,a,12,[o,u]);else{const y=isString$1(c),T=isRef(c);if(y||T){const _=()=>{if(e.f){const x=y?S(c)?f[c]:u[c]:c.value;if(n)isArray$2(x)&&remove(x,i);else if(isArray$2(x))x.includes(i)||x.push(i);else if(y)u[c]=[i],S(c)&&(f[c]=u[c]);else{const D=[i];c.value=D,e.k&&(u[e.k]=D)}}else y?(u[c]=o,S(c)&&(f[c]=o)):T&&(c.value=o,e.k&&(u[e.k]=o))};if(o){const x=()=>{_(),pendingSetRefMap.delete(e)};x.id=-1,pendingSetRefMap.set(e,x),queuePostRenderEffect(x,r)}else invalidatePendingSetRef(e),_()}}}function invalidatePendingSetRef(e){const t=pendingSetRefMap.get(e);t&&(t.flags|=8,pendingSetRefMap.delete(e))}const isComment=e=>e.nodeType===8;getGlobalThis().requestIdleCallback;getGlobalThis().cancelIdleCallback;function forEachElement(e,t){if(isComment(e)&&e.data==="["){let r=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(isComment(s))if(s.data==="]"){if(--r===0)break}else s.data==="["&&r++;s=s.nextSibling}}else t(e)}const isAsyncWrapper=e=>!!e.type.__asyncLoader;function defineAsyncComponent(e){isFunction$2(e)&&(e={loader:e});const{loader:t,loadingComponent:r,errorComponent:s,delay:n=200,hydrate:i,timeout:o,suspensible:a=!0,onError:c}=e;let l=null,u,f=0;const m=()=>(f++,l=null,S()),S=()=>{let y;return l||(y=l=t().catch(T=>{if(T=T instanceof Error?T:new Error(String(T)),c)return new Promise((_,x)=>{c(T,()=>_(m()),()=>x(T),f+1)});throw T}).then(T=>y!==l&&l?l:(T&&(T.__esModule||T[Symbol.toStringTag]==="Module")&&(T=T.default),u=T,T)))};return defineComponent({name:"AsyncComponentWrapper",__asyncLoader:S,__asyncHydrate(y,T,_){let x=!1;(T.bu||(T.bu=[])).push(()=>x=!0);const D=()=>{x||_()},M=i?()=>{const b=i(D,E=>forEachElement(y,E));b&&(T.bum||(T.bum=[])).push(b)}:D;u?M():S().then(()=>!T.isUnmounted&&M())},get __asyncResolved(){return u},setup(){const y=currentInstance;if(markAsyncBoundary(y),u)return()=>createInnerComp(u,y);const T=M=>{l=null,handleError(M,y,13,!s)};if(a&&y.suspense||isInSSRComponentSetup)return S().then(M=>()=>createInnerComp(M,y)).catch(M=>(T(M),()=>s?createVNode(s,{error:M}):null));const _=ref(!1),x=ref(),D=ref(!!n);return n&&setTimeout(()=>{D.value=!1},n),o!=null&&setTimeout(()=>{if(!_.value&&!x.value){const M=new Error("Async component timed out after ".concat(o,"ms."));T(M),x.value=M}},o),S().then(()=>{_.value=!0,y.parent&&isKeepAlive(y.parent.vnode)&&y.parent.update()}).catch(M=>{T(M),x.value=M}),()=>{if(_.value&&u)return createInnerComp(u,y);if(x.value&&s)return createVNode(s,{error:x.value});if(r&&!D.value)return createVNode(r)}}})}function createInnerComp(e,t){const{ref:r,props:s,children:n,ce:i}=t.vnode,o=createVNode(e,s,n);return o.ref=r,o.ce=i,delete t.vnode.ce,o}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,r=currentInstance){const s=e.__wdc||(e.__wdc=()=>{let n=r;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(injectHook(t,s,r),r){let n=r.parent;for(;n&&n.parent;)isKeepAlive(n.parent.vnode)&&injectToKeepAliveRoot(s,t,r,n),n=n.parent}}function injectToKeepAliveRoot(e,t,r,s){const n=injectHook(t,e,s,!0);onUnmounted(()=>{remove(s[t],n)},r)}function injectHook(e,t,r=currentInstance,s=!1){if(r){const n=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{pauseTracking();const a=setCurrentInstance(r),c=callWithAsyncErrorHandling(t,r,e,o);return a(),resetTracking(),c});return s?n.unshift(i):n.push(i),i}}const createHook=e=>(t,r=currentInstance)=>{(!isInSSRComponentSetup||e==="sp")&&injectHook(e,(...s)=>t(...s),r)},onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=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,r=!0,s=!1){const n=currentRenderingInstance||currentInstance;if(n){const i=n.type;if(e===COMPONENTS){const a=getComponentName(i,!1);if(a&&(a===t||a===camelize(t)||a===capitalize(camelize(t))))return i}const o=resolve(n[e]||i[e],t)||resolve(n.appContext[e],t);return!o&&s?i:o}}function resolve(e,t){return e&&(e[t]||e[camelize(t)]||e[capitalize(camelize(t))])}function renderList(e,t,r,s){let n;const i=r,o=isArray$2(e);if(o||isString$1(e)){const a=o&&isReactive(e);let c=!1,l=!1;a&&(c=!isShallow(e),l=isReadonly(e),e=shallowReadArray(e)),n=new Array(e.length);for(let u=0,f=e.length;ut(a,c,void 0,i));else{const a=Object.keys(e);n=new Array(a.length);for(let c=0,l=a.length;cisVNode(t)?!(t.type===Comment||t.type===Fragment&&!ensureValidVNode(t.children)):!0)?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(t==="__v_skip")return!0;const{ctx:r,setupState:s,data:n,props:i,accessCache:o,type:a,appContext:c}=e;let l;if(t[0]!=="$"){const S=o[t];if(S!==void 0)switch(S){case 1:return s[t];case 2:return n[t];case 4:return r[t];case 3:return i[t]}else{if(hasSetupBinding(s,t))return o[t]=1,s[t];if(n!==EMPTY_OBJ&&hasOwn(n,t))return o[t]=2,n[t];if((l=e.propsOptions[0])&&hasOwn(l,t))return o[t]=3,i[t];if(r!==EMPTY_OBJ&&hasOwn(r,t))return o[t]=4,r[t];shouldCacheAccess&&(o[t]=0)}}const u=publicPropertiesMap[t];let f,m;if(u)return t==="$attrs"&&track(e.attrs,"get",""),u(e);if((f=a.__cssModules)&&(f=f[t]))return f;if(r!==EMPTY_OBJ&&hasOwn(r,t))return o[t]=4,r[t];if(m=c.config.globalProperties,hasOwn(m,t))return m[t]},set({_:e},t,r){const{data:s,setupState:n,ctx:i}=e;return hasSetupBinding(n,t)?(n[t]=r,!0):s!==EMPTY_OBJ&&hasOwn(s,t)?(s[t]=r,!0):hasOwn(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:s,appContext:n,propsOptions:i,type:o}},a){let c,l;return!!(r[a]||e!==EMPTY_OBJ&&a[0]!=="$"&&hasOwn(e,a)||hasSetupBinding(t,a)||(c=i[0])&&hasOwn(c,a)||hasOwn(s,a)||hasOwn(publicPropertiesMap,a)||hasOwn(n.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:hasOwn(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}};function normalizePropsOrEmits(e){return isArray$2(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}let shouldCacheAccess=!0;function applyOptions(e){const t=resolveMergedOptions(e),r=e.proxy,s=e.ctx;shouldCacheAccess=!1,t.beforeCreate&&callHook(t.beforeCreate,e,"bc");const{data:n,computed:i,methods:o,watch:a,provide:c,inject:l,created:u,beforeMount:f,mounted:m,beforeUpdate:S,updated:y,activated:T,deactivated:_,beforeDestroy:x,beforeUnmount:D,destroyed:M,unmounted:b,render:E,renderTracked:C,renderTriggered:j,errorCaptured:F,serverPrefetch:V,expose:U,inheritAttrs:Q,components:se,directives:ue,filters:ge}=t;if(l&&resolveInjections(l,s,null),o)for(const Y in o){const q=o[Y];isFunction$2(q)&&(s[Y]=q.bind(r))}if(n){const Y=n.call(r,r);isObject$4(Y)&&(e.data=reactive(Y))}if(shouldCacheAccess=!0,i)for(const Y in i){const q=i[Y],fe=isFunction$2(q)?q.bind(r,r):isFunction$2(q.get)?q.get.bind(r,r):NOOP,Ae=!isFunction$2(q)&&isFunction$2(q.set)?q.set.bind(r):NOOP,de=computed({get:fe,set:Ae});Object.defineProperty(s,Y,{enumerable:!0,configurable:!0,get:()=>de.value,set:ne=>de.value=ne})}if(a)for(const Y in a)createWatcher(a[Y],s,r,Y);if(c){const Y=isFunction$2(c)?c.call(r):c;Reflect.ownKeys(Y).forEach(q=>{provide(q,Y[q])})}u&&callHook(u,e,"c");function X(Y,q){isArray$2(q)?q.forEach(fe=>Y(fe.bind(r))):q&&Y(q.bind(r))}if(X(onBeforeMount,f),X(onMounted,m),X(onBeforeUpdate,S),X(onUpdated,y),X(onActivated,T),X(onDeactivated,_),X(onErrorCaptured,F),X(onRenderTracked,C),X(onRenderTriggered,j),X(onBeforeUnmount,D),X(onUnmounted,b),X(onServerPrefetch,V),isArray$2(U))if(U.length){const Y=e.exposed||(e.exposed={});U.forEach(q=>{Object.defineProperty(Y,q,{get:()=>r[q],set:fe=>r[q]=fe,enumerable:!0})})}else e.exposed||(e.exposed={});E&&e.render===NOOP&&(e.render=E),Q!=null&&(e.inheritAttrs=Q),se&&(e.components=se),ue&&(e.directives=ue),V&&markAsyncBoundary(e)}function resolveInjections(e,t,r=NOOP){isArray$2(e)&&(e=normalizeInject(e));for(const s in e){const n=e[s];let i;isObject$4(n)?"default"in n?i=inject(n.from||s,n.default,!0):i=inject(n.from||s):i=inject(n),isRef(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function callHook(e,t,r){callWithAsyncErrorHandling(isArray$2(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,r)}function createWatcher(e,t,r,s){let n=s.includes(".")?createPathGetter(r,s):()=>r[s];if(isString$1(e)){const i=t[e];isFunction$2(i)&&watch(n,i)}else if(isFunction$2(e))watch(n,e.bind(r));else if(isObject$4(e))if(isArray$2(e))e.forEach(i=>createWatcher(i,t,r,s));else{const i=isFunction$2(e.handler)?e.handler.bind(r):t[e.handler];isFunction$2(i)&&watch(n,i,e)}}function resolveMergedOptions(e){const t=e.type,{mixins:r,extends:s}=t,{mixins:n,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let c;return a?c=a:!n.length&&!r&&!s?c=t:(c={},n.length&&n.forEach(l=>mergeOptions(c,l,o,!0)),mergeOptions(c,t,o)),isObject$4(t)&&i.set(t,c),c}function mergeOptions(e,t,r,s=!1){const{mixins:n,extends:i}=t;i&&mergeOptions(e,i,r,!0),n&&n.forEach(o=>mergeOptions(e,o,r,!0));for(const o in t)if(!(s&&o==="expose")){const a=internalOptionMergeStrats[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}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 r=0;r1)return r&&isFunction$2(t)?t.call(s&&s.proxy):t}}const internalObjectProto={},createInternalObject=()=>Object.create(internalObjectProto),isInternalObject=e=>Object.getPrototypeOf(e)===internalObjectProto;function initProps(e,t,r,s=!1){const n={},i=createInternalObject();e.propsDefaults=Object.create(null),setFullProps(e,t,n,i);for(const o in e.propsOptions[0])o in n||(n[o]=void 0);r?e.props=s?n:shallowReactive(n):e.type.props?e.props=n:e.props=i,e.attrs=i}function updateProps(e,t,r,s){const{props:n,attrs:i,vnode:{patchFlag:o}}=e,a=toRaw(n),[c]=e.propsOptions;let l=!1;if((s||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let f=0;f{c=!0;const[m,S]=normalizePropsOptions(f,t,!0);extend$1(o,m),S&&a.push(...S)};!r&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!c)return isObject$4(e)&&s.set(e,EMPTY_ARR),EMPTY_ARR;if(isArray$2(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",normalizeSlotValue=e=>isArray$2(e)?e.map(normalizeVNode):[normalizeVNode(e)],normalizeSlot=(e,t,r)=>{if(t._n)return t;const s=withCtx((...n)=>normalizeSlotValue(t(...n)),r);return s._c=!1,s},normalizeObjectSlots=(e,t,r)=>{const s=e._ctx;for(const n in e){if(isInternalKey(n))continue;const i=e[n];if(isFunction$2(i))t[n]=normalizeSlot(n,i,s);else if(i!=null){const o=normalizeSlotValue(i);t[n]=()=>o}}},normalizeVNodeSlots=(e,t)=>{const r=normalizeSlotValue(t);e.slots.default=()=>r},assignSlots=(e,t,r)=>{for(const s in t)(r||!isInternalKey(s))&&(e[s]=t[s])},initSlots=(e,t,r)=>{const s=e.slots=createInternalObject();if(e.vnode.shapeFlag&32){const n=t._;n?(assignSlots(s,t,r),r&&def(s,"_",n,!0)):normalizeObjectSlots(t,s)}else t&&normalizeVNodeSlots(e,t)},updateSlots=(e,t,r)=>{const{vnode:s,slots:n}=e;let i=!0,o=EMPTY_OBJ;if(s.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:assignSlots(n,t,r):(i=!t.$stable,normalizeObjectSlots(t,n)),o=t}else t&&(normalizeVNodeSlots(e,t),o={default:1});if(i)for(const a in n)!isInternalKey(a)&&o[a]==null&&delete n[a]},queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(e){return baseCreateRenderer(e)}function baseCreateRenderer(e,t){const r=getGlobalThis();r.__VUE__=!0;const{insert:s,remove:n,patchProp:i,createElement:o,createText:a,createComment:c,setText:l,setElementText:u,parentNode:f,nextSibling:m,setScopeId:S=NOOP,insertStaticContent:y}=e,T=(d,g,v,O=null,A=null,$=null,N=void 0,P=null,I=!!g.dynamicChildren)=>{if(d===g)return;d&&!isSameVNodeType(d,g)&&(O=$e(d),ne(d,A,$,!0),d=null),g.patchFlag===-2&&(I=!1,g.dynamicChildren=null);const{type:w,ref:H,shapeFlag:L}=g;switch(w){case Text:_(d,g,v,O);break;case Comment:x(d,g,v,O);break;case Static:d==null&&D(g,v,O,N);break;case Fragment:se(d,g,v,O,A,$,N,P,I);break;default:L&1?E(d,g,v,O,A,$,N,P,I):L&6?ue(d,g,v,O,A,$,N,P,I):(L&64||L&128)&&w.process(d,g,v,O,A,$,N,P,I,ye)}H!=null&&A?setRef(H,d&&d.ref,$,g||d,!g):H==null&&d&&d.ref!=null&&setRef(d.ref,null,$,d,!0)},_=(d,g,v,O)=>{if(d==null)s(g.el=a(g.children),v,O);else{const A=g.el=d.el;g.children!==d.children&&l(A,g.children)}},x=(d,g,v,O)=>{d==null?s(g.el=c(g.children||""),v,O):g.el=d.el},D=(d,g,v,O)=>{[d.el,d.anchor]=y(d.children,g,v,O,d.el,d.anchor)},M=({el:d,anchor:g},v,O)=>{let A;for(;d&&d!==g;)A=m(d),s(d,v,O),d=A;s(g,v,O)},b=({el:d,anchor:g})=>{let v;for(;d&&d!==g;)v=m(d),n(d),d=v;n(g)},E=(d,g,v,O,A,$,N,P,I)=>{g.type==="svg"?N="svg":g.type==="math"&&(N="mathml"),d==null?C(g,v,O,A,$,N,P,I):V(d,g,A,$,N,P,I)},C=(d,g,v,O,A,$,N,P)=>{let I,w;const{props:H,shapeFlag:L,transition:k,dirs:B}=d;if(I=d.el=o(d.type,$,H&&H.is,H),L&8?u(I,d.children):L&16&&F(d.children,I,null,O,A,resolveChildrenNamespace(d,$),N,P),B&&invokeDirectiveHook(d,null,O,"created"),j(I,d,d.scopeId,N,O),H){for(const z in H)z!=="value"&&!isReservedProp(z)&&i(I,z,null,H[z],$,O);"value"in H&&i(I,"value",null,H.value,$),(w=H.onVnodeBeforeMount)&&invokeVNodeHook(w,O,d)}B&&invokeDirectiveHook(d,null,O,"beforeMount");const W=needTransition(A,k);W&&k.beforeEnter(I),s(I,g,v),((w=H&&H.onVnodeMounted)||W||B)&&queuePostRenderEffect(()=>{w&&invokeVNodeHook(w,O,d),W&&k.enter(I),B&&invokeDirectiveHook(d,null,O,"mounted")},A)},j=(d,g,v,O,A)=>{if(v&&S(d,v),O)for(let $=0;${for(let w=I;w{const P=g.el=d.el;let{patchFlag:I,dynamicChildren:w,dirs:H}=g;I|=d.patchFlag&16;const L=d.props||EMPTY_OBJ,k=g.props||EMPTY_OBJ;let B;if(v&&toggleRecurse(v,!1),(B=k.onVnodeBeforeUpdate)&&invokeVNodeHook(B,v,g,d),H&&invokeDirectiveHook(g,d,v,"beforeUpdate"),v&&toggleRecurse(v,!0),(L.innerHTML&&k.innerHTML==null||L.textContent&&k.textContent==null)&&u(P,""),w?U(d.dynamicChildren,w,P,v,O,resolveChildrenNamespace(g,A),$):N||q(d,g,P,null,v,O,resolveChildrenNamespace(g,A),$,!1),I>0){if(I&16)Q(P,L,k,v,A);else if(I&2&&L.class!==k.class&&i(P,"class",null,k.class,A),I&4&&i(P,"style",L.style,k.style,A),I&8){const W=g.dynamicProps;for(let z=0;z{B&&invokeVNodeHook(B,v,g,d),H&&invokeDirectiveHook(g,d,v,"updated")},O)},U=(d,g,v,O,A,$,N)=>{for(let P=0;P{if(g!==v){if(g!==EMPTY_OBJ)for(const $ in g)!isReservedProp($)&&!($ in v)&&i(d,$,g[$],null,A,O);for(const $ in v){if(isReservedProp($))continue;const N=v[$],P=g[$];N!==P&&$!=="value"&&i(d,$,P,N,A,O)}"value"in v&&i(d,"value",g.value,v.value,A)}},se=(d,g,v,O,A,$,N,P,I)=>{const w=g.el=d?d.el:a(""),H=g.anchor=d?d.anchor:a("");let{patchFlag:L,dynamicChildren:k,slotScopeIds:B}=g;B&&(P=P?P.concat(B):B),d==null?(s(w,v,O),s(H,v,O),F(g.children||[],v,H,A,$,N,P,I)):L>0&&L&64&&k&&d.dynamicChildren?(U(d.dynamicChildren,k,v,A,$,N,P),(g.key!=null||A&&g===A.subTree)&&traverseStaticChildren(d,g,!0)):q(d,g,v,H,A,$,N,P,I)},ue=(d,g,v,O,A,$,N,P,I)=>{g.slotScopeIds=P,d==null?g.shapeFlag&512?A.ctx.activate(g,v,O,N,I):ge(g,v,O,A,$,N,I):xe(d,g,I)},ge=(d,g,v,O,A,$,N)=>{const P=d.component=createComponentInstance(d,O,A);if(isKeepAlive(d)&&(P.ctx.renderer=ye),setupComponent(P,!1,N),P.asyncDep){if(A&&A.registerDep(P,X,N),!d.el){const I=P.subTree=createVNode(Comment);x(null,I,g,v),d.placeholder=I.el}}else X(P,d,g,v,A,$,N)},xe=(d,g,v)=>{const O=g.component=d.component;if(shouldUpdateComponent(d,g,v))if(O.asyncDep&&!O.asyncResolved){Y(O,g,v);return}else O.next=g,O.update();else g.el=d.el,O.vnode=g},X=(d,g,v,O,A,$,N)=>{const P=()=>{if(d.isMounted){let{next:L,bu:k,u:B,parent:W,vnode:z}=d;{const oe=locateNonHydratedAsyncRoot(d);if(oe){L&&(L.el=z.el,Y(d,L,N)),oe.asyncDep.then(()=>{d.isUnmounted||P()});return}}let K=L,Z;toggleRecurse(d,!1),L?(L.el=z.el,Y(d,L,N)):L=z,k&&invokeArrayFns(k),(Z=L.props&&L.props.onVnodeBeforeUpdate)&&invokeVNodeHook(Z,W,L,z),toggleRecurse(d,!0);const ee=renderComponentRoot(d),ie=d.subTree;d.subTree=ee,T(ie,ee,f(ie.el),$e(ie),d,A,$),L.el=ee.el,K===null&&updateHOCHostEl(d,ee.el),B&&queuePostRenderEffect(B,A),(Z=L.props&&L.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(Z,W,L,z),A)}else{let L;const{el:k,props:B}=g,{bm:W,m:z,parent:K,root:Z,type:ee}=d,ie=isAsyncWrapper(g);toggleRecurse(d,!1),W&&invokeArrayFns(W),!ie&&(L=B&&B.onVnodeBeforeMount)&&invokeVNodeHook(L,K,g),toggleRecurse(d,!0);{Z.ce&&Z.ce._def.shadowRoot!==!1&&Z.ce._injectChildStyle(ee);const oe=d.subTree=renderComponentRoot(d);T(null,oe,v,O,d,A,$),g.el=oe.el}if(z&&queuePostRenderEffect(z,A),!ie&&(L=B&&B.onVnodeMounted)){const oe=g;queuePostRenderEffect(()=>invokeVNodeHook(L,K,oe),A)}(g.shapeFlag&256||K&&isAsyncWrapper(K.vnode)&&K.vnode.shapeFlag&256)&&d.a&&queuePostRenderEffect(d.a,A),d.isMounted=!0,g=v=O=null}};d.scope.on();const I=d.effect=new ReactiveEffect(P);d.scope.off();const w=d.update=I.run.bind(I),H=d.job=I.runIfDirty.bind(I);H.i=d,H.id=d.uid,I.scheduler=()=>queueJob(H),toggleRecurse(d,!0),w()},Y=(d,g,v)=>{g.component=d;const O=d.vnode.props;d.vnode=g,d.next=null,updateProps(d,g.props,O,v),updateSlots(d,g.children,v),pauseTracking(),flushPreFlushCbs(d),resetTracking()},q=(d,g,v,O,A,$,N,P,I=!1)=>{const w=d&&d.children,H=d?d.shapeFlag:0,L=g.children,{patchFlag:k,shapeFlag:B}=g;if(k>0){if(k&128){Ae(w,L,v,O,A,$,N,P,I);return}else if(k&256){fe(w,L,v,O,A,$,N,P,I);return}}B&8?(H&16&&me(w,A,$),L!==w&&u(v,L)):H&16?B&16?Ae(w,L,v,O,A,$,N,P,I):me(w,A,$,!0):(H&8&&u(v,""),B&16&&F(L,v,O,A,$,N,P,I))},fe=(d,g,v,O,A,$,N,P,I)=>{d=d||EMPTY_ARR,g=g||EMPTY_ARR;const w=d.length,H=g.length,L=Math.min(w,H);let k;for(k=0;kH?me(d,A,$,!0,!1,L):F(g,v,O,A,$,N,P,I,L)},Ae=(d,g,v,O,A,$,N,P,I)=>{let w=0;const H=g.length;let L=d.length-1,k=H-1;for(;w<=L&&w<=k;){const B=d[w],W=g[w]=I?cloneIfMounted(g[w]):normalizeVNode(g[w]);if(isSameVNodeType(B,W))T(B,W,v,null,A,$,N,P,I);else break;w++}for(;w<=L&&w<=k;){const B=d[L],W=g[k]=I?cloneIfMounted(g[k]):normalizeVNode(g[k]);if(isSameVNodeType(B,W))T(B,W,v,null,A,$,N,P,I);else break;L--,k--}if(w>L){if(w<=k){const B=k+1,W=Bk)for(;w<=L;)ne(d[w],A,$,!0),w++;else{const B=w,W=w,z=new Map;for(w=W;w<=k;w++){const te=g[w]=I?cloneIfMounted(g[w]):normalizeVNode(g[w]);te.key!=null&&z.set(te.key,w)}let K,Z=0;const ee=k-W+1;let ie=!1,oe=0;const be=new Array(ee);for(w=0;w=ee){ne(te,A,$,!0);continue}let ae;if(te.key!=null)ae=z.get(te.key);else for(K=W;K<=k;K++)if(be[K-W]===0&&isSameVNodeType(te,g[K])){ae=K;break}ae===void 0?ne(te,A,$,!0):(be[ae-W]=w+1,ae>=oe?oe=ae:ie=!0,T(te,g[ae],v,null,A,$,N,P,I),Z++)}const De=ie?getSequence(be):EMPTY_ARR;for(K=De.length-1,w=ee-1;w>=0;w--){const te=W+w,ae=g[te],Ne=g[te+1],Me=te+1{const{el:$,type:N,transition:P,children:I,shapeFlag:w}=d;if(w&6){de(d.component.subTree,g,v,O);return}if(w&128){d.suspense.move(g,v,O);return}if(w&64){N.move(d,g,v,ye);return}if(N===Fragment){s($,g,v);for(let L=0;LP.enter($),A);else{const{leave:L,delayLeave:k,afterLeave:B}=P,W=()=>{d.ctx.isUnmounted?n($):s($,g,v)},z=()=>{$._isLeaving&&$[leaveCbKey](!0),L($,()=>{W(),B&&B()})};k?k($,W,z):z()}else s($,g,v)},ne=(d,g,v,O=!1,A=!1)=>{const{type:$,props:N,ref:P,children:I,dynamicChildren:w,shapeFlag:H,patchFlag:L,dirs:k,cacheIndex:B}=d;if(L===-2&&(A=!1),P!=null&&(pauseTracking(),setRef(P,null,v,d,!0),resetTracking()),B!=null&&(g.renderCache[B]=void 0),H&256){g.ctx.deactivate(d);return}const W=H&1&&k,z=!isAsyncWrapper(d);let K;if(z&&(K=N&&N.onVnodeBeforeUnmount)&&invokeVNodeHook(K,g,d),H&6)He(d.component,v,O);else{if(H&128){d.suspense.unmount(v,O);return}W&&invokeDirectiveHook(d,null,g,"beforeUnmount"),H&64?d.type.remove(d,g,v,ye,O):w&&!w.hasOnce&&($!==Fragment||L>0&&L&64)?me(w,g,v,!1,!0):($===Fragment&&L&384||!A&&H&16)&&me(I,g,v),O&&Ie(d)}(z&&(K=N&&N.onVnodeUnmounted)||W)&&queuePostRenderEffect(()=>{K&&invokeVNodeHook(K,g,d),W&&invokeDirectiveHook(d,null,g,"unmounted")},v)},Ie=d=>{const{type:g,el:v,anchor:O,transition:A}=d;if(g===Fragment){ke(v,O);return}if(g===Static){b(d);return}const $=()=>{n(v),A&&!A.persisted&&A.afterLeave&&A.afterLeave()};if(d.shapeFlag&1&&A&&!A.persisted){const{leave:N,delayLeave:P}=A,I=()=>N(v,$);P?P(d.el,$,I):I()}else $()},ke=(d,g)=>{let v;for(;d!==g;)v=m(d),n(d),d=v;n(g)},He=(d,g,v)=>{const{bum:O,scope:A,job:$,subTree:N,um:P,m:I,a:w}=d;invalidateMount(I),invalidateMount(w),O&&invokeArrayFns(O),A.stop(),$&&($.flags|=8,ne(N,d,g,v)),P&&queuePostRenderEffect(P,g),queuePostRenderEffect(()=>{d.isUnmounted=!0},g)},me=(d,g,v,O=!1,A=!1,$=0)=>{for(let N=$;N{if(d.shapeFlag&6)return $e(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const g=m(d.anchor||d.el),v=g&&g[TeleportEndKey];return v?m(v):g};let Re=!1;const Pe=(d,g,v)=>{d==null?g._vnode&&ne(g._vnode,null,null,!0):T(g._vnode||null,d,g,null,null,null,v),g._vnode=d,Re||(Re=!0,flushPreFlushCbs(),flushPostFlushCbs(),Re=!1)},ye={p:T,um:ne,m:de,r:Ie,mt:ge,mc:F,pc:q,pbc:U,n:$e,o:e};return{render:Pe,hydrate:void 0,createApp:createAppAPI(Pe)}}function resolveChildrenNamespace({type:e,props:t},r){return r==="svg"&&e==="foreignObject"||r==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:r}function toggleRecurse({effect:e,job:t},r){r?(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,r=!1){const s=e.children,n=t.children;if(isArray$2(s)&&isArray$2(n))for(let i=0;i>1,e[r[a]]0&&(t[s]=r[i-1]),r[i]=s)}}for(i=r.length,o=r[i-1];i-- >0;)r[i]=o,o=t[o];return r}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,r){return doWatch(e,t,r)}function doWatch(e,t,r=EMPTY_OBJ){const{immediate:s,deep:n,flush:i,once:o}=r,a=extend$1({},r),c=t&&s||!t&&i!=="post";let l;if(isInSSRComponentSetup){if(i==="sync"){const S=useSSRContext();l=S.__watcherHandles||(S.__watcherHandles=[])}else if(!c){const S=()=>{};return S.stop=NOOP,S.resume=NOOP,S.pause=NOOP,S}}const u=currentInstance;a.call=(S,y,T)=>callWithAsyncErrorHandling(S,u,y,T);let f=!1;i==="post"?a.scheduler=S=>{queuePostRenderEffect(S,u&&u.suspense)}:i!=="sync"&&(f=!0,a.scheduler=(S,y)=>{y?S():queueJob(S)}),a.augmentJob=S=>{t&&(S.flags|=4),f&&(S.flags|=2,u&&(S.id=u.uid,S.i=u))};const m=watch$1(e,t,a);return isInSSRComponentSetup&&(l?l.push(m):c&&m()),m}function instanceWatch(e,t,r){const s=this.proxy,n=isString$1(e)?e.includes(".")?createPathGetter(s,e):()=>s[e]:e.bind(s,s);let i;isFunction$2(t)?i=t:(i=t.handler,r=t);const o=setCurrentInstance(this),a=doWatch(n,i.bind(s),r);return o(),a}function createPathGetter(e,t){const r=t.split(".");return()=>{let s=e;for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e["".concat(t,"Modifiers")]||e["".concat(camelize(t),"Modifiers")]||e["".concat(hyphenate(t),"Modifiers")];function emit(e,t,...r){if(e.isUnmounted)return;const s=e.vnode.props||EMPTY_OBJ;let n=r;const i=t.startsWith("update:"),o=i&&getModelModifiers(s,t.slice(7));o&&(o.trim&&(n=r.map(u=>isString$1(u)?u.trim():u)),o.number&&(n=r.map(looseToNumber)));let a,c=s[a=toHandlerKey(t)]||s[a=toHandlerKey(camelize(t))];!c&&i&&(c=s[a=toHandlerKey(hyphenate(t))]),c&&callWithAsyncErrorHandling(c,e,6,n);const l=s[a+"Once"];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,callWithAsyncErrorHandling(l,e,6,n)}}const mixinEmitsCache=new WeakMap;function normalizeEmitsOptions(e,t,r=!1){const s=r?mixinEmitsCache:t.emitsCache,n=s.get(e);if(n!==void 0)return n;const i=e.emits;let o={},a=!1;if(!isFunction$2(e)){const c=l=>{const u=normalizeEmitsOptions(l,t,!0);u&&(a=!0,extend$1(o,u))};!r&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!a?(isObject$4(e)&&s.set(e,null),null):(isArray$2(i)?i.forEach(c=>o[c]=null):extend$1(o,i),isObject$4(e)&&s.set(e,o),o)}function isEmitListener(e,t){return!e||!isOn(t)?!1:(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:r,proxy:s,withProxy:n,propsOptions:[i],slots:o,attrs:a,emit:c,render:l,renderCache:u,props:f,data:m,setupState:S,ctx:y,inheritAttrs:T}=e,_=setCurrentRenderingInstance(e);let x,D;try{if(r.shapeFlag&4){const b=n||s,E=b;x=normalizeVNode(l.call(E,b,u,f,S,m,y)),D=a}else{const b=t;x=normalizeVNode(b.length>1?b(f,{attrs:a,slots:o,emit:c}):b(f,null)),D=t.props?a:getFunctionalFallthrough(a)}}catch(b){blockStack.length=0,handleError(b,e,1),x=createVNode(Comment)}let M=x;if(D&&T!==!1){const b=Object.keys(D),{shapeFlag:E}=M;b.length&&E&7&&(i&&b.some(isModelListener)&&(D=filterModelListeners(D,i)),M=cloneVNode(M,D,!1,!0))}return r.dirs&&(M=cloneVNode(M,null,!1,!0),M.dirs=M.dirs?M.dirs.concat(r.dirs):r.dirs),r.transition&&setTransitionHooks(M,r.transition),x=M,setCurrentRenderingInstance(_),x}const getFunctionalFallthrough=e=>{let t;for(const r in e)(r==="class"||r==="style"||isOn(r))&&((t||(t={}))[r]=e[r]);return t},filterModelListeners=(e,t)=>{const r={};for(const s in e)(!isModelListener(s)||!(s.slice(9)in t))&&(r[s]=e[s]);return r};function shouldUpdateComponent(e,t,r){const{props:s,children:n,component:i}=e,{props:o,children:a,patchFlag:c}=t,l=i.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&c>=0){if(c&1024)return!0;if(c&16)return s?hasPropsChanged(s,o,l):!!o;if(c&8){const u=t.dynamicProps;for(let f=0;fe.__isSuspense;function queueEffectWithSuspense(e,t){t&&t.pendingBranch?isArray$2(e)?t.effects.push(...e):t.effects.push(e):queuePostFlushCb(e)}const Fragment=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,r,s,n,i){return setupBlock(createBaseVNode(e,t,r,s,n,i,!0))}function createBlock(e,t,r,s,n){return setupBlock(createVNode(e,t,r,s,n,!0))}function isVNode(e){return e?e.__v_isVNode===!0:!1}function isSameVNodeType(e,t){return e.type===t.type&&e.key===t.key}const normalizeKey=({key:e})=>e!=null?e:null,normalizeRef=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?isString$1(e)||isRef(e)||isFunction$2(e)?{i:currentRenderingInstance,r:e,k:t,f:!!r}:e:null);function createBaseVNode(e,t=null,r=null,s=0,n=null,i=e===Fragment?0:1,o=!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:r,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:i,patchFlag:s,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return a?(normalizeChildren(c,r),i&128&&e.normalize(c)):r&&(c.shapeFlag|=isString$1(r)?8:16),isBlockTreeEnabled>0&&!o&¤tBlock&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&¤tBlock.push(c),c}const createVNode=_createVNode;function _createVNode(e,t=null,r=null,s=0,n=null,i=!1){if((!e||e===NULL_DYNAMIC_COMPONENT)&&(e=Comment),isVNode(e)){const a=cloneVNode(e,t,!0);return r&&normalizeChildren(a,r),isBlockTreeEnabled>0&&!i&¤tBlock&&(a.shapeFlag&6?currentBlock[currentBlock.indexOf(e)]=a:currentBlock.push(a)),a.patchFlag=-2,a}if(isClassComponent(e)&&(e=e.__vccOpts),t){t=guardReactiveProps(t);let{class:a,style:c}=t;a&&!isString$1(a)&&(t.class=normalizeClass(a)),isObject$4(c)&&(isProxy(c)&&!isArray$2(c)&&(c=extend$1({},c)),t.style=normalizeStyle(c))}const o=isString$1(e)?1:isSuspense(e)?128:isTeleport(e)?64:isObject$4(e)?4:isFunction$2(e)?2:0;return createBaseVNode(e,t,r,s,n,o,i,!0)}function guardReactiveProps(e){return e?isProxy(e)||isInternalObject(e)?extend$1({},e):e:null}function cloneVNode(e,t,r=!1,s=!1){const{props:n,ref:i,patchFlag:o,children:a,transition:c}=e,l=t?mergeProps(n||{},t):n,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&normalizeKey(l),ref:t&&t.ref?r&&i?isArray$2(i)?i.concat(normalizeRef(t)):[i,normalizeRef(t)]:normalizeRef(t):i,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?o===-1?16:o|16:o,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&&s&&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 e==null||typeof e=="boolean"?createVNode(Comment):isArray$2(e)?createVNode(Fragment,null,e.slice()):isVNode(e)?cloneIfMounted(e):createVNode(Text,null,String(e))}function cloneIfMounted(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:cloneVNode(e)}function normalizeChildren(e,t){let r=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(isArray$2(t))r=16;else if(typeof t=="object")if(s&65){const n=t.default;n&&(n._c&&(n._d=!1),normalizeChildren(e,n()),n._c&&(n._d=!0));return}else{r=32;const n=t._;!n&&!isInternalObject(t)?t._ctx=currentRenderingInstance:n===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else isFunction$2(t)?(t={default:t,_ctx:currentRenderingInstance},r=32):(t=String(t),s&64?(r=16,t=[createTextVNode(t)]):r=8);e.children=t,e.shapeFlag|=r}function mergeProps(...e){const t={};for(let r=0;rcurrentInstance||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{const e=getGlobalThis(),t=(r,s)=>{let n;return(n=e[r])||(n=e[r]=[]),n.push(s),i=>{n.length>1?n.forEach(o=>o(i)):n[0](i)}};internalSetCurrentInstance=t("__VUE_INSTANCE_SETTERS__",r=>currentInstance=r),setInSSRSetupState=t("__VUE_SSR_SETTERS__",r=>isInSSRComponentSetup=r)}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 e.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(e,t=!1,r=!1){t&&setInSSRSetupState(t);const{props:s,children:n}=e.vnode,i=isStatefulComponent(e);initProps(e,s,i,t),initSlots(e,n,r||t);const o=i?setupStatefulComponent(e,t):void 0;return t&&setInSSRSetupState(!1),o}function setupStatefulComponent(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,PublicInstanceProxyHandlers);const{setup:s}=r;if(s){pauseTracking();const n=e.setupContext=s.length>1?createSetupContext(e):null,i=setCurrentInstance(e),o=callWithErrorHandling(s,e,0,[e.props,n]),a=isPromise(o);if(resetTracking(),i(),(a||e.sp)&&!isAsyncWrapper(e)&&markAsyncBoundary(e),a){if(o.then(unsetCurrentInstance,unsetCurrentInstance),t)return o.then(c=>{handleSetupResult(e,c)}).catch(c=>{handleError(c,e,0)});e.asyncDep=o}else handleSetupResult(e,o)}else finishComponentSetup(e)}function handleSetupResult(e,t,r){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,r){const s=e.type;e.render||(e.render=s.render||NOOP);{const n=setCurrentInstance(e);pauseTracking();try{applyOptions(e)}finally{resetTracking(),n()}}}const attrsProxyHandlers={get(e,t){return track(e,"get",""),e[t]}};function createSetupContext(e){const t=r=>{e.exposed=r||{}};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,r){if(r in t)return t[r];if(r in publicPropertiesMap)return publicPropertiesMap[r](e)},has(t,r){return r in t||r in publicPropertiesMap}})):e.proxy}const classifyRE=/(?:^|[-_])\w/g,classify=e=>e.replace(classifyRE,t=>t.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,r=!1){let s=getComponentName(t);if(!s&&t.__file){const n=t.__file.match(/([^/\\]+)\.\w+$/);n&&(s=n[1])}if(!s&&e&&e.parent){const n=i=>{for(const o in i)if(i[o]===t)return o};s=n(e.components||e.parent.type.components)||n(e.appContext.components)}return s?classify(s):r?"App":"Anonymous"}function isClassComponent(e){return isFunction$2(e)&&"__vccOpts"in e}const computed=(e,t)=>computed$1(e,t,isInSSRComponentSetup);function h(e,t,r){const s=(i,o,a)=>{setBlockTracking(-1);try{return createVNode(i,o,a)}finally{setBlockTracking(1)}},n=arguments.length;return n===2?isObject$4(t)&&!isArray$2(t)?isVNode(t)?s(e,null,[t]):s(e,t):s(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&isVNode(r)&&(r=[r]),s(e,t,r))}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=typeof window<"u"&&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=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,s)=>{const n=t==="svg"?doc.createElementNS(svgNS,e):t==="mathml"?doc.createElementNS(mathmlNS,e):r?doc.createElement(e,{is:r}):doc.createElement(e);return e==="select"&&s&&s.multiple!=null&&n.setAttribute("multiple",s.multiple),n},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,r,s,n,i){const o=r?r.previousSibling:t.lastChild;if(n&&(n===i||n.nextSibling))for(;t.insertBefore(n.cloneNode(!0),r),!(n===i||!(n=n.nextSibling)););else{templateContainer.innerHTML=unsafeToTrustedHTML(s==="svg"?"".concat(e,""):s==="mathml"?"".concat(e,""):e);const a=templateContainer.content;if(s==="svg"||s==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}},vtcKey=Symbol("_vtc");function patchClass(e,t,r){const s=e[vtcKey];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):r?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,r){const s=e.style,n=isString$1(r);let i=!1;if(r&&!n){if(t)if(isString$1(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&setStyle(s,a,"")}else for(const o in t)r[o]==null&&setStyle(s,o,"");for(const o in r)o==="display"&&(i=!0),setStyle(s,o,r[o])}else if(n){if(t!==r){const o=s[CSS_VAR_TEXT];o&&(r+=";"+o),s.cssText=r,i=displayRE.test(r)}}else t&&e.removeAttribute("style");vShowOriginalDisplay in e&&(e[vShowOriginalDisplay]=i?s.display:"",e[vShowHidden]&&(s.display="none"))}const importantRE=/\s*!important$/;function setStyle(e,t,r){if(isArray$2(r))r.forEach(s=>setStyle(e,t,s));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const s=autoPrefix(e,t);importantRE.test(r)?e.setProperty(hyphenate(s),r.replace(importantRE,""),"important"):e[s]=r}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(e,t){const r=prefixCache[t];if(r)return r;let s=camelize(t);if(s!=="filter"&&s in e)return prefixCache[t]=s;s=capitalize(s);for(let n=0;ncachedNow||(p.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(e,t){const r=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=r.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(s,r.value),t,5,[s])};return r.value=e,r.attached=getNow(),r}function patchStopImmediatePropagation(e,t){if(isArray$2(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(s=>n=>!n._stopped&&s&&s(n))}else return t}const isNativeOn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,patchProp=(e,t,r,s,n,i)=>{const o=n==="svg";t==="class"?patchClass(e,s,o):t==="style"?patchStyle(e,r,s):isOn(t)?isModelListener(t)||patchEvent(e,t,r,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):shouldSetAsProp(e,t,s,o))?(patchDOMProp(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&patchAttr(e,t,s,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!isString$1(s))?patchDOMProp(e,camelize(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),patchAttr(e,t,s,o))};function shouldSetAsProp(e,t,r,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&isNativeOn(t)&&isFunction$2(r));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const n=e.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return isNativeOn(t)&&isString$1(r)?!1:t in e}const rendererOptions=extend$1({patchProp},nodeOps);let renderer;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}const createApp=(...e)=>{const t=ensureRenderer().createApp(...e),{mount:r}=t;return t.mount=s=>{const n=normalizeContainer(s);if(!n)return;const i=t._component;!isFunction$2(i)&&!i.render&&!i.template&&(i.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const o=r(n,!1,resolveRootNamespace(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),o},t};function resolveRootNamespace(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function normalizeContainer(e){return isString$1(e)?document.querySelector(e):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=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(E,C,j){return Function.prototype.apply.call(E,C,j)},r;e&&typeof e.ownKeys=="function"?r=e.ownKeys:Object.getOwnPropertySymbols?r=function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:r=function(E){return Object.getOwnPropertyNames(E)};function s(b){console&&console.warn&&console.warn(b)}var n=Number.isNaN||function(E){return E!==E};function i(){i.init.call(this)}events.exports=i,events.exports.once=x,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(b){if(typeof b!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof b)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(b){if(typeof b!="number"||b<0||n(b))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+b+".");o=b}}),i.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(E){if(typeof E!="number"||E<0||n(E))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+E+".");return this._maxListeners=E,this};function c(b){return b._maxListeners===void 0?i.defaultMaxListeners:b._maxListeners}i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(E){for(var C=[],j=1;j0&&(U=C[0]),U instanceof Error)throw U;var Q=new Error("Unhandled error."+(U?" ("+U.message+")":""));throw Q.context=U,Q}var se=V[E];if(se===void 0)return!1;if(typeof se=="function")t(se,this,C);else for(var ue=se.length,ge=y(se,ue),j=0;j0&&U.length>F&&!U.warned){U.warned=!0;var Q=new Error("Possible EventEmitter memory leak detected. "+U.length+" "+String(E)+" listeners added. Use emitter.setMaxListeners() to increase limit");Q.name="MaxListenersExceededWarning",Q.emitter=b,Q.type=E,Q.count=U.length,s(Q)}return b}i.prototype.addListener=function(E,C){return l(this,E,C,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(E,C){return l(this,E,C,!0)};function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(b,E,C){var j={fired:!1,wrapFn:void 0,target:b,type:E,listener:C},F=u.bind(j);return F.listener=C,j.wrapFn=F,F}i.prototype.once=function(E,C){return a(C),this.on(E,f(this,E,C)),this},i.prototype.prependOnceListener=function(E,C){return a(C),this.prependListener(E,f(this,E,C)),this},i.prototype.removeListener=function(E,C){var j,F,V,U,Q;if(a(C),F=this._events,F===void 0)return this;if(j=F[E],j===void 0)return this;if(j===C||j.listener===C)--this._eventsCount===0?this._events=Object.create(null):(delete F[E],F.removeListener&&this.emit("removeListener",E,j.listener||C));else if(typeof j!="function"){for(V=-1,U=j.length-1;U>=0;U--)if(j[U]===C||j[U].listener===C){Q=j[U].listener,V=U;break}if(V<0)return this;V===0?j.shift():T(j,V),j.length===1&&(F[E]=j[0]),F.removeListener!==void 0&&this.emit("removeListener",E,Q||C)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(E){var C,j,F;if(j=this._events,j===void 0)return this;if(j.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):j[E]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete j[E]),this;if(arguments.length===0){var V=Object.keys(j),U;for(F=0;F=0;F--)this.removeListener(E,C[F]);return this};function m(b,E,C){var j=b._events;if(j===void 0)return[];var F=j[E];return F===void 0?[]:typeof F=="function"?C?[F.listener||F]:[F]:C?_(F):y(F,F.length)}i.prototype.listeners=function(E){return m(this,E,!0)},i.prototype.rawListeners=function(E){return m(this,E,!1)},i.listenerCount=function(b,E){return typeof b.listenerCount=="function"?b.listenerCount(E):S.call(b,E)},i.prototype.listenerCount=S;function S(b){var E=this._events;if(E!==void 0){var C=E[b];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function y(b,E){for(var C=new Array(E),j=0;j0){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 e=getNative(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),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 r=-1,s=e==null?0:e.length;++r-1}var MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(e,t){var r=typeof e;return t=t==null?MAX_SAFE_INTEGER$1:t,!!t&&(r=="number"||r!="symbol"&&reIsUint.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=MAX_SAFE_INTEGER}function isArrayLike(e){return e!=null&&isLength(e.length)&&!isFunction$1(e)}var objectProto$9=Object.prototype;function isPrototype(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||objectProto$9;return e===r}function baseTimes(e,t){for(var r=-1,s=Array(e);++r-1}function listCacheSet(e,t){var r=this.__data__,s=assocIndexOf(r,e);return s<0?(++this.size,r.push([e,t])):r[s][1]=t,this}function ListCache(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t=LARGE_ARRAY_SIZE){var l=createSet(e);if(l)return setToArray(l);o=!1,n=cacheHas,c=new SetCache}else c=a;e:for(;++sl.useInEditor))==null?void 0:i.data)||this.getDefaultData(),s=cloneDeep(this.mockData)}else if(typeof r.useMock=="boolean"&&r.useMock){const c=cloneDeep(r.schema.mocks||[]);this.mockData=(o=c.find(l=>l.enable))==null?void 0:o.data,s=cloneDeep(this.mockData)||this.getDefaultData()}else if(!r.initialData)s=this.getDefaultData();else{ce(this,le,new n((a=r.initialData)!=null?a:{})),this.isInit=!0;return}ce(this,le,new n(s!=null?s:{}))}get id(){return G(this,Se)}get type(){return G(this,Oe)}get schema(){return G(this,Ee)}get fields(){return G(this,he)}get methods(){return G(this,ve)}setFields(r){ce(this,he,r)}setMethods(r){ce(this,ve,r)}get data(){return G(this,le).getData("")}setData(r,s){G(this,le).update(r,s);const n={updateData:r,path:s};this.emit("change",n)}setValue(r,s){return this.setData(s,r)}onDataChange(r,s){G(this,le).on(r,s)}offDataChange(r,s){G(this,le).off(r,s)}getDefaultData(){return getDefaultValueFromFields(G(this,he))}async init(){this.isInit=!0}destroy(){ce(this,he,[]),this.removeAllListeners(),G(this,le).destroy()}}Oe=new WeakMap,Se=new WeakMap,Ee=new WeakMap,le=new WeakMap,he=new WeakMap,ve=new WeakMap;const urlencoded=e=>Object.entries(e).reduce((t,[r,s])=>{let n=s;return typeof s=="object"&&(n=JSON.stringify(s)),typeof s<"u"?"".concat(t).concat(t?"&":"").concat(globalThis.encodeURIComponent(r),"=").concat(globalThis.encodeURIComponent("".concat(n))):t},""),webRequest=async e=>{var u;const{url:t,method:r="GET",headers:s={},params:n={},data:i={},...o}=e,a=urlencoded(n);let c=JSON.stringify(i);return(u=s["Content-Type"])!=null&&u.includes("application/x-www-form-urlencoded")&&(c=urlencoded(i)),(await globalThis.fetch(a?"".concat(t,"?").concat(a):t,{method:r,headers:s,body:r==="GET"?void 0:c,...o})).json()};var pe,Te,_e,we;class HttpDataSource extends DataSource{constructor(r){const{options:s}=r.schema;super(r);R(this,"isLoading",!1);R(this,"error");R(this,"httpOptions");re(this,pe);re(this,Te,[]);re(this,_e,[]);re(this,we,"http");this.httpOptions=s,typeof r.request=="function"?ce(this,pe,r.request):typeof globalThis.fetch=="function"&&ce(this,pe,webRequest),this.methods.forEach(n=>{typeof n.content=="function"&&(n.timing==="beforeRequest"&&G(this,Te).push(n.content),n.timing==="afterRequest"&&G(this,_e).push(n.content))})}get type(){return G(this,we)}async init(){this.schema.autoFetch&&await this.request(),super.init()}async request(r={}){var l,u;this.isLoading=!0;const{url:s,params:n,data:i,headers:o,...a}=this.httpOptions;let c={url:typeof s=="function"?s({app:this.app,dataSource:this}):s,params:typeof n=="function"?n({app:this.app,dataSource:this}):n,data:typeof i=="function"?i({app:this.app,dataSource:this}):i,headers:typeof o=="function"?o({app:this.app,dataSource:this}):o,...a,...r};try{for(const f of G(this,Te))await f({options:c,params:{},dataSource:this,app:this.app});if(typeof this.schema.beforeRequest=="function"&&(c=await this.schema.beforeRequest(c,{app:this.app,dataSource:this})),this.mockData)this.setData(this.mockData);else{let f=await((l=G(this,pe))==null?void 0:l.call(this,c));for(const m of G(this,_e))await m({res:f,options:c,params:{},dataSource:this,app:this.app});if(typeof this.schema.afterResponse=="function"&&(f=await this.schema.afterResponse(f,{app:this.app,dataSource:this,options:c})),(u=this.schema.responseOptions)!=null&&u.dataPath){const m=getValueByKeyPath(this.schema.responseOptions.dataPath,f);this.setData(m)}else this.setData(f)}this.error=void 0}catch(f){this.error={msg:f.message},this.emit("error",f)}this.isLoading=!1}get(r){return this.request({...r,method:"GET"})}post(r){return this.request({...r,method:"POST"})}}pe=new WeakMap,Te=new WeakMap,_e=new WeakMap,we=new WeakMap;const cache=new Map,getDeps=(e,t,r)=>{let s;if(r){const c=[];t.forEach(l=>{traverseNode(l,u=>{c.push(u.id)})}),s="".concat(e.id,":").concat(c.join(":"))}else s="".concat(e.id,":").concat(t.map(c=>c.id).join(":"));if(cache.has(s))return cache.get(s);const n=new Watcher;n.addTarget(new Target({id:e.id,type:"data-source",isTarget:(c,l)=>"".concat(c).includes(DSL_NODE_KEY_COPY_PREFIX)?!1:isDataSourceTarget(e,c,l,!0)})),n.addTarget(new Target({id:e.id,type:"cond",isTarget:(c,l)=>isDataSourceCondTarget(e,c,l,!0)})),n.collect(t,{},!0);const{deps:i}=n.getTarget(e.id,"data-source"),{deps:o}=n.getTarget(e.id,"cond"),a={deps:i,condDeps:o};return cache.set(s,a),a},compiledCondition=(e,t)=>{let r=!0;for(const{op:s,value:n,range:i,field:o}of e){const[a,...c]=o,l=t[a];if(!l||!c.length)break;try{const u=getValueByKeyPath(c.join("."),l);if(!compiledCond(s,u,n,i)){r=!1;break}}catch(u){console.warn(u)}}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:r}of e[NODE_CONDS_KEY])if(r&&compiledCondition(r,t))return!0;return!1},updateNode=(e,t)=>{var r;if(isPage(e)||isPageFragment(e)){const s=(r=t.items)==null?void 0:r.findIndex(n=>n.id===e.id);t.items.splice(s,1,e)}else replaceChildNode(e,t.items)},createIteratorContentData=(e,t,r=[],s={})=>{const n={...s,[t]:{}};let i=cloneDeep(s[t]),o=n[t];return r.forEach((a,c)=>{if(Object.assign(o,i),c===r.length-1){o[a]=e;return}Array.isArray(i[a])&&(i[a]={},o[a]={}),i=i[a],o=o[a]}),n},compliedDataSourceField=(e,t)=>{const[r,...s]=e,n=r.indexOf(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX);if(n>-1){const i=r.substring(n+DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX.length),o=t[i];if(!o)return e;try{return getValueByKeyPath(s.join("."),o)}catch(a){return e}}return e},template=(e,t)=>e.replace(dataSourceTemplateRegExp,(r,s)=>{try{return getValueByKeyPath(s,t)}catch(n){return r}}),compiledNodeField=(e,t)=>typeof e=="string"?template(e,t):e!=null&&e.isBindDataSource&&e.dataSourceId?t[e.dataSourceId]:e!=null&&e.isBindDataSourceField&&e.dataSourceId&&typeof e.template=="string"?template(e.template,t[e.dataSourceId]):Array.isArray(e)&&typeof e[0]=="string"?compliedDataSourceField(e,t):e,compliedIteratorItem=({compile:e,dsId:t,item:r,deps:s,condDeps:n,inEditor:i,ctxData:o})=>{var u,f;const{items:a,...c}=r,l=cloneDeep(c);return(u=n[c.id])!=null&&u.keys.length&&!i&&(l.condResult=compliedConditions(c,o)),Array.isArray(a)&&a.length?l.items=a.map(m=>compliedIteratorItem({compile:e,dsId:t,item:m,deps:s,condDeps:n,inEditor:i,ctxData:o})):a&&(l.items=a),(f=s[l.id])!=null&&f.keys.length?compiledNode(e,l,{[t]:s},t):l},registerDataSourceOnDemand=async(e,t)=>{const{dataSourceMethodsDeps:r={},dataSourceCondDeps:s={},dataSourceDeps:n={},dataSources:i=[]}=e,o={};i.forEach(l=>{let u=s[l.id]||{};Object.keys(u).length||(u=n[l.id]||{}),Object.keys(u).length||(u=r[l.id]||{}),Object.keys(u).length&&t[l.type]&&(o[l.type]=t[l.type])});const a=await Promise.all(Object.values(o).map(l=>l())),c={};return a.forEach((l,u)=>{const f=Object.keys(o)[u];c[f]=l.default}),c},J=class J extends EventEmitter{constructor({app:r,useMock:s,initialData:n}){var i,o;super();R(this,"app");R(this,"dataSourceMap",new Map);R(this,"data",{});R(this,"initialData",{});R(this,"useMock",!1);J.waitInitSchemaList.set(this,{}),this.app=r,this.useMock=s,n&&(this.initialData=n,this.data={...n}),(o=(i=r.dsl)==null?void 0:i.dataSources)==null||o.forEach(a=>{this.addDataSource(a)}),this.isAllDataSourceRegistered()?this.callDsInit():this.on("registered-all",()=>{this.callDsInit()})}static register(r,s){var n;J.dataSourceClassMap.set(r,s),(n=J.waitInitSchemaList)==null||n.forEach((i,o)=>{const a=i[r]||[];for(let c=a.shift();c;c=a.shift()){const l=o.addDataSource(c);l&&o.init(l)}})}static getDataSourceClass(r){return J.dataSourceClassMap.get(r)}static clearDataSourceClass(){J.dataSourceClassMap.clear(),J.dataSourceClassMap.set("base",DataSource),J.dataSourceClassMap.set("http",HttpDataSource)}static registerObservedData(r){J.ObservedDataClass=r}async init(r){var s;if(!r.isInit&&!(this.app.jsEngine&&((s=r.schema.disabledInitInJsEngine)!=null&&s.includes(this.app.jsEngine)))){for(const n of r.methods){if(typeof n.content!="function")return;n.timing==="beforeInit"&&await n.content({params:{},dataSource:r,app:this.app})}await r.init();for(const n of r.methods){if(typeof n.content!="function")return;n.timing==="afterInit"&&await n.content({params:{},dataSource:r,app:this.app})}}}get(r){return this.dataSourceMap.get(r)}addDataSource(r){var i;if(!r)return;const s=J.dataSourceClassMap.get(r.type);if(!s){let o=J.waitInitSchemaList.get(this);o||(o={},J.waitInitSchemaList.set(this,o)),o[r.type]?o[r.type].push(r):o[r.type]=[r],this.data[r.id]=(i=this.initialData[r.id])!=null?i:getDefaultValueFromFields(r.fields);return}const n=new s({app:this.app,schema:r,request:this.app.request,useMock:this.useMock,initialData:this.initialData[r.id],ObservedDataClass:J.ObservedDataClass});return this.dataSourceMap.set(r.id,n),this.data[n.id]=n.data,n.on("change",o=>{this.setData(n,o)}),this.isAllDataSourceRegistered()&&this.emit("registered-all"),n}setData(r,s){this.data[r.id]=r.data,this.emit("change",r.id,s)}removeDataSource(r){var s;(s=this.get(r))==null||s.destroy(),delete this.data[r],this.dataSourceMap.delete(r)}updateSchema(r){for(const s of r){if(!this.get(s.id))return;this.removeDataSource(s.id)}for(const s of r){this.addDataSource(cloneDeep(s));const n=this.get(s.id);n&&this.init(n)}}compiledNode(r,s,n=!1){var c;if(r[NODE_DISABLE_DATA_SOURCE_KEY])return r;const{items:i,...o}=r,a=cloneDeep(o);return i&&(a.items=Array.isArray(i)&&n?i.map(l=>this.compiledNode(l,s,n)):i),o.condResult===!1||o.visible===!1?a:compiledNode(l=>compiledNodeField(l,this.data),a,((c=this.app.dsl)==null?void 0:c.dataSourceDeps)||{},s)}compliedConds(r){return r[NODE_DISABLE_DATA_SOURCE_KEY]?!0:compliedConditions(r,this.data)}compliedIteratorItemConds(r,s,n=[]){const[i,...o]=n,a=this.get(i);if(!a)return!0;const c=createIteratorContentData(r,a.id,o,this.data);return compliedConditions(s,c)}compliedIteratorItems(r,s,n=[]){const[i,...o]=n,a=this.get(i);if(!a)return s;const c=this.app.platform==="editor",l=createIteratorContentData(r,a.id,o,this.data),{deps:u={},condDeps:f={}}=getDeps(a.schema,s,c);return!Object.keys(u).length&&!Object.keys(f).length?s:s.map(m=>compliedIteratorItem({compile:S=>compiledNodeField(S,l),dsId:a.id,item:m,deps:u,condDeps:f,inEditor:c,ctxData:l}))}isAllDataSourceRegistered(){var r,s;return!((s=(r=this.app.dsl)==null?void 0:r.dataSources)!=null&&s.length)||this.dataSourceMap.size===this.app.dsl.dataSources.length}destroy(){this.removeAllListeners(),this.data={},this.initialData={},this.dataSourceMap.forEach(r=>{r.destroy()}),this.dataSourceMap.clear(),J.waitInitSchemaList.delete(this)}onDataChange(r,s,n){var i;return(i=this.get(r))==null?void 0:i.onDataChange(s,n)}offDataChange(r,s,n){var i;return(i=this.get(r))==null?void 0:i.offDataChange(s,n)}callDsInit(){const r=Array.from(this.dataSourceMap);typeof Promise.allSettled=="function"?Promise.allSettled(r.map(([,s])=>this.init(s))).then(s=>{const n={},i={};s.forEach((o,a)=>{const c=r[a][0];o.status==="fulfilled"?this.data[c]?n[c]=this.data[c]:delete n[c]:o.status==="rejected"&&(delete n[c],i[c]=o.reason)}),this.emit("init",n,i)}):Promise.all(r.map(([,s])=>this.init(s))).then(()=>{this.emit("init",this.data)}).catch(()=>{this.emit("init",this.data)})}};R(J,"dataSourceClassMap",new Map([["base",DataSource],["http",HttpDataSource]])),R(J,"ObservedDataClass",SimpleObservedData),R(J,"waitInitSchemaList",new Map);let DataSourceManager=J;const createDataSourceManager=(e,t,r)=>{const{dsl:s,platform:n}=e;if(!(s!=null&&s.dataSources))return;const i=new DataSourceManager({app:e,useMock:t,initialData:r});return s.dataSources&&s.dataSourceCondDeps&&n!=="editor"&&getNodes(getDepNodeIds(s.dataSourceCondDeps),s.items).forEach(o=>{o.condResult=i.compliedConds(o),updateNode(o,s)}),s.dataSources&&s.dataSourceDeps&&getNodes(getDepNodeIds(s.dataSourceDeps),s.items).forEach(o=>{updateNode(i.compiledNode(o),s)}),e.jsEngine==="nodejs"||i.on("change",(o,a)=>{var f,m,S;const c=((f=s.dataSourceDeps)==null?void 0:f[o])||{},l=((m=s.dataSourceCondDeps)==null?void 0:m[o])||{},u=union([...Object.keys(l),...Object.keys(c)]);for(const y of s.items)if(e.platform==="editor"||isPage(y)&&y.id===((S=e.page)==null?void 0:S.data.id)||isPageFragment(y)){const T=getNodes(u,[y]).map(_=>{var D,M,b;e.platform!=="editor"&&(_.condResult=i.compliedConds(_));const x=i.compiledNode(_);if(typeof((D=e.page)==null?void 0:D.setData)=="function"){isPage(x)?e.page.setData(x):y.id===e.page.data.id&&!e.page.instance&&replaceChildNode(x,[e.page.data]),(M=e.getNode(_.id))==null||M.setData(x);for(const[,E]of e.pageFragments)E.data.id===x.id?E.setData(x):E.data.id===y.id&&((b=E.getNode(x.id))==null||b.setData(x),E.instance||replaceChildNode(x,[E.data]))}return x});T.length&&i.emit("update-data",T,o,a,y.id)}}),i};/*! ***************************************************************************** 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(e,t,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{l(s.next(u))}catch(f){o(f)}}function c(u){try{l(s.throw(u))}catch(f){o(f)}}function l(u){u.done?i(u.value):n(u.value).then(a,c)}l((s=s.apply(e,[])).next())})}const segments=[];function Match(e,t,r="*"){if(e===r)return!0;segments.length=0;let s=0,n=0,i=0,o=0;for(let m=0,S=e.length;mo&&segments.push(e.substring(o,m)),segments.push(y),o=m+1)}if(oi)return!1;let c=0,l=segments.length-1,u=t.length-1,f=!1;for(;;){const m=segments[l];if(l-=1,m===r)f=!0;else{const S=u+1-m.length,y=t.lastIndexOf(m,S);if(y===-1||y>S)return!1;if(f)u=y-1,f=!1;else{if(y!==S)return!1;u-=m.length}}if(c>l)break}return!0}class WildcardObject{constructor(t,r,s,n=void 0){this.obj=t,this.delimiter=r,this.wildcard=s,this.is_match=n}shortMatch(t,r){if(t===r||t===this.wildcard)return!0;if(this.is_match)return this.is_match(t,r);const s=t.indexOf(this.wildcard);if(s>-1){const n=t.substr(s+1);if(s===0||r.substring(0,s)===t.substring(0,s)){const i=n.length;return i>0?r.substr(-i)===n:!0}}return!1}match(t,r){return this.is_match?this.is_match(t,r):t===r||t===this.wildcard||r===this.wildcard||this.shortMatch(t,r)||Match(t,r,this.wildcard)}handleArray(t,r,s,n,i={}){let o=t.indexOf(this.delimiter,s),a=!1;o===-1&&(a=!0,o=t.length);const c=t.substring(s,o);let l=0;for(const u of r){const f=l.toString(),m=n===""?f:n+this.delimiter+l;(c===this.wildcard||c===f||this.shortMatch(c,f))&&(a?i[m]=u:this.goFurther(t,u,o+1,m,i)),l++}return i}handleObject(t,r,s,n,i={}){let o=t.indexOf(this.delimiter,s),a=!1;o===-1&&(a=!0,o=t.length);const c=t.substring(s,o);for(let l in r){l=l.toString();const u=n===""?l:n+this.delimiter+l;(c===this.wildcard||c===l||this.shortMatch(c,l))&&(a?i[u]=r[l]:this.goFurther(t,r[l],o+1,u,i))}return i}goFurther(t,r,s,n,i={}){return Array.isArray(r)?this.handleArray(t,r,s,n,i):this.handleObject(t,r,s,n,i)}get(t){return this.goFurther(t,this.obj,0,"")}}class ObjectPath{static get(t,r,s=!1){if(!r)return;let n=r;for(const i of t)if(i in n)n=n[i];else if(s)n[i]=Object.create({}),n=n[i];else return;return n}static set(t,r,s){if(!s)return;if(t.length===0){for(const a in s)delete s[a];for(const a in r)s[a]=r[a];return}const n=t.slice(),i=n.pop(),o=ObjectPath.get(n,s,!0);return typeof o=="object"&&(o[i]=r),r}}let wasm,WASM_VECTOR_LEN=0,cachegetUint8Memory0=null;function getUint8Memory0(){return(cachegetUint8Memory0===null||cachegetUint8Memory0.buffer!==wasm.memory.buffer)&&(cachegetUint8Memory0=new Uint8Array(wasm.memory.buffer)),cachegetUint8Memory0}let cachedTextEncoder=new TextEncoder("utf-8");const encodeString=typeof cachedTextEncoder.encodeInto=="function"?function(e,t){return cachedTextEncoder.encodeInto(e,t)}:function(e,t){const r=cachedTextEncoder.encode(e);return t.set(r),{read:e.length,written:r.length}};function passStringToWasm0(e,t,r){if(r===void 0){const a=cachedTextEncoder.encode(e),c=t(a.length);return getUint8Memory0().subarray(c,c+a.length).set(a),WASM_VECTOR_LEN=a.length,c}let s=e.length,n=t(s);const i=getUint8Memory0();let o=0;for(;o127)break;i[n+o]=a}if(o!==s){o!==0&&(e=e.slice(o)),n=r(n,s,s=o+e.length*3);const a=getUint8Memory0().subarray(n+o,n+s),c=encodeString(e,a);o+=c.written}return WASM_VECTOR_LEN=o,n}function is_match(e,t){var r=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),s=WASM_VECTOR_LEN,n=passStringToWasm0(t,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),i=WASM_VECTOR_LEN,o=wasm.is_match(r,s,n,i);return o!==0}async function load(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(s){if(e.headers.get("Content-Type")!="application/wasm")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",s);else throw s}const r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{const r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}}async function init(e){const t={};(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:r,module:s}=await load(await e,t);return wasm=r.exports,init.__wbindgen_wasm_module=s,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,Promise}}function isObject$2(e){return e&&e.constructor?e.constructor.name==="Object":typeof e=="object"&&e!==null}class DeepState{constructor(t={},r={}){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()),r),this.data=t,this.id=0,this.options.useCache?(this.pathGet=this.cacheGet,this.pathSet=this.cacheSet):(this.pathGet=ObjectPath.get,this.pathSet=ObjectPath.set),r.Promise?this.resolved=r.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(t,r=this.data,s=!1){const n=t.join(this.options.delimiter),i=this.cache.get(n);if(i){const a=i.deref();if(a)return a}const o=ObjectPath.get(t,r,s);return(isObject$2(o)||Array.isArray(o))&&this.cache.set(n,new WeakRef(o)),o}cacheSet(t,r,s=this.data){const n=t.join(this.options.delimiter);return isObject$2(r)||Array.isArray(r)?this.cache.set(n,new WeakRef(r)):this.cache.delete(n),ObjectPath.set(t,r,s)}silentSet(t,r){return this.pathSet(this.split(t),r,this.data)}loadWasmMatcher(t){return __awaiter(this,void 0,void 0,function*(){yield init(t),this.is_match=is_match,this.scan=new WildcardObject(this.data,this.options.delimiter,this.options.wildcard,this.is_match)})}same(t,r){return(["number","string","undefined","boolean"].includes(typeof t)||t===null)&&r===t}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(t,r,s=!0){return this.is_match?this.is_match(t,r):t===r||t===this.options.wildcard||r===this.options.wildcard?!0:!s&&this.getIndicesCount(this.options.delimiter,t)-1;)o.push(i),n=i+s;return this.options.useIndicesCache&&this.indices.set(r,o),o}getIndicesCount(t,r){if(this.options.useIndicesCache&&this.indicesCount.has(r))return this.indicesCount.get(r);const s=t.length;if(s==0)return 0;let n=0,i,o=0;for(;(i=r.indexOf(t,n))>-1;)o++,n=i+s;return this.options.useIndicesCache&&this.indicesCount.set(r,o),o}cutPath(t,r){if(r==="")return"";if(t=this.cleanNotRecursivePath(t),r=this.cleanNotRecursivePath(r),t===r)return t;const s=this.getIndicesCount(this.options.delimiter,r),n=this.getIndicesOf(this.options.delimiter,t);return t.substring(0,n[s])}trimPath(t){return t=this.cleanNotRecursivePath(t),t.charAt(0)===this.options.delimiter?t.substr(1):t}split(t){if(t==="")return[];if(!this.options.useSplitCache)return t.split(this.options.delimiter);const r=this.splitCache.get(t);if(r)return r.slice();const s=t.split(this.options.delimiter);return this.splitCache.set(t,s.slice()),s}isWildcard(t){return t.includes(this.options.wildcard)||this.hasParams(t)}isNotRecursive(t){return t.endsWith(this.options.notRecursive)}cleanNotRecursivePath(t){return this.isNotRecursive(t)?t.substring(0,t.length-1):t}hasParams(t){return t.includes(this.options.param)}getParamsInfo(t){let r={replaced:"",original:t,params:{}},s=0,n=[];for(const i of this.split(t)){r.params[s]={original:i,replaced:"",name:""};const o=new RegExp("\\".concat(this.options.param,"([^\\").concat(this.options.delimiter,"\\").concat(this.options.param,"]+)"),"g");let a=o.exec(i);if(a)r.params[s].name=a[1];else{delete r.params[s],n.push(i),s++;continue}o.lastIndex=0,r.params[s].replaced=i.replace(o,this.options.wildcard),n.push(r.params[s].replaced),s++}return r.replaced=n.join(this.options.delimiter),r}getParams(t,r){if(!t)return;const s=this.split(r),n={};for(const i in t.params){const o=t.params[i];n[o.name]=s[i]}return n}waitForAll(t,r){const s={};for(let n of t)s[n]={dirty:!1},this.hasParams(n)&&(s[n].paramsInfo=this.getParamsInfo(n)),s[n].isWildcard=this.isWildcard(n),s[n].isRecursive=!this.isNotRecursive(n);return this.waitingListeners.set(t,{fn:r,paths:s}),r(s),function(){this.waitingListeners.delete(t)}}executeWaitingListeners(t){if(!this.destroyed)for(const r of this.waitingListeners.values()){const{fn:s,paths:n}=r;let i=0,o=0;for(let a in n){const c=n[a];let l=!1;c.isRecursive&&(t=this.cutPath(t,a)),c.isWildcard&&this.match(a,t)&&(l=!0),t===a&&(l=!0),l&&(c.dirty=!0),c.dirty&&i++,o++}i===o&&s(n)}}subscribeAll(t,r,s=this.getDefaultListenerOptions()){if(this.destroyed)return()=>{};let n=[],i=0,o=null;typeof s.group=="boolean"&&s.group?(this.groupId++,o=this.groupId,s.bulk=!0):typeof s.group=="string"&&(s.bulk=!0,o=s.group);for(const a of t)n.push(this.subscribe(a,r,s,{all:t,index:i,groupId:o})),i++;return function(){for(const c of n)c()}}getCleanListenersCollection(t={}){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},t)}getCleanListener(t,r=this.getDefaultListenerOptions()){return{fn:t,options:Object.assign(Object.assign({},this.getDefaultListenerOptions()),r),groupId:null}}getListenerCollectionMatch(t,r,s){t=this.cleanNotRecursivePath(t);const n=this;return function(o,a=!1){let c=t;return r?o=n.cutPath(o,t):c=n.cutPath(n.cleanNotRecursivePath(t),o),a&&console.log("[getListenerCollectionMatch]",{listenerPath:t,scopedListenerPath:c,path:o,isRecursive:r,isWildcard:s}),s&&n.match(c,o,r)?!0:c===o}}getListenersCollection(t,r){if(this.listeners.has(t)){let a=this.listeners.get(t);return a.listeners.set(++this.id,r),r.id=this.id,a}const s=this.hasParams(t);let n;s&&(n=this.getParamsInfo(t));let i={isRecursive:!this.isNotRecursive(t),isWildcard:this.isWildcard(t),hasParams:s,paramsInfo:n,originalPath:t,path:s?n.replaced:t};i.isRecursive||(i.path=this.cleanNotRecursivePath(i.path));let o=this.getCleanListenersCollection(Object.assign(Object.assign({},i),{match:this.getListenerCollectionMatch(i.path,i.isRecursive,i.isWildcard)}));return this.id++,o.listeners.set(this.id,r),r.id=this.id,this.listeners.set(i.originalPath,o),o}subscribe(t,r,s=this.getDefaultListenerOptions(),n={all:[t],index:0,groupId:null}){if(this.destroyed)return()=>{};this.jobsRunning++;const i="subscribe";let o=this.getCleanListener(r,s);s.group&&(s.bulk=!0,typeof s.group=="string"?o.groupId=s.group:n.groupId&&(o.groupId=n.groupId)),this.listenersIgnoreCache.set(o,{truthy:[],falsy:[]});const a=this.getListenersCollection(t,o);s.debug&&console.log("[subscribe]",{listenerPath:t,options:s}),a.count++;let c=!0;if(o.groupId&&(typeof o.groupId=="string"?this.namedGroups.includes(o.groupId)?c=!1:this.namedGroups.push(o.groupId):typeof o.groupId=="number"&&(this.numberGroups.includes(o.groupId)?c=!1:this.numberGroups.push(o.groupId))),c){const l=this.cleanNotRecursivePath(a.path),u=this.split(l);if(!a.isWildcard)!this.isMuted(l)&&!this.isMuted(r)&&r(this.pathGet(u,this.data),{type:i,listener:o,listenersCollection:a,path:{listener:t,update:void 0,resolved:this.cleanNotRecursivePath(t)},params:this.getParams(a.paramsInfo,l),options:s});else{const f=this.scan.get(l);if(s.bulk){const m=[];for(const S in f)this.isMuted(S)||m.push({path:S,params:this.getParams(a.paramsInfo,S),value:f[S]});this.isMuted(r)||r(m,{type:i,listener:o,listenersCollection:a,path:{listener:t,update:void 0,resolved:void 0},options:s,params:void 0})}else for(const m in f)!this.isMuted(m)&&!this.isMuted(r)&&r(f[m],{type:i,listener:o,listenersCollection:a,path:{listener:t,update:void 0,resolved:this.cleanNotRecursivePath(m)},params:this.getParams(a.paramsInfo,m),options:s})}}return this.debugSubscribe(o,a,t),this.jobsRunning--,this.unsubscribe(t,this.id)}unsubscribe(t,r){const s=this.listeners,n=s.get(t);return function(){n.listeners.delete(r),n.count--,n.count===0&&s.delete(t)}}runQueuedListeners(){if(!this.destroyed&&this.subscribeQueue.length!==0)if(this.jobsRunning===0){this.queueRuns=0;const t=[...this.subscribeQueue];for(let r=0,s=t.length;r=this.options.maxQueueRuns)throw this.queueRuns=0,new Error("Maximal number of queue runs exhausted.");Promise.resolve().then(()=>this.runQueuedListeners()).catch(t=>{throw t})}}getQueueNotifyListeners(t,r=[]){for(const s in t){if(this.isMuted(s))continue;let{single:n,bulk:i}=t[s];for(const o of n){let a=!1,c=o.listener.id+":"+o.eventInfo.path.resolved;o.eventInfo.path.resolved||(c=o.listener.id+":"+o.eventInfo.path.listener);for(const u of r)if(c===u.resolvedIdPath){a=!0;break}if(a)continue;const l=this.debugTime(o);if(!this.isMuted(o.listener.fn))if(o.listener.options.queue&&this.jobsRunning)this.subscribeQueue.push(()=>{o.listener.fn(o.value?o.value():void 0,o.eventInfo)});else{let u=o.listener.id+":"+o.eventInfo.path.resolved;o.eventInfo.path.resolved||(u=o.listener.id+":"+o.eventInfo.path.listener),r.push({id:o.listener.id,resolvedPath:o.eventInfo.path.resolved,resolvedIdPath:u,originalFn:o.listener.fn,fn:()=>{o.listener.fn(o.value?o.value():void 0,o.eventInfo)},options:o.listener.options,groupId:o.listener.groupId})}this.debugListener(l,o)}for(const o of i){let a=!1;for(const u of r)if(u.id===o.listener.id){a=!0;break}if(a)continue;const c=this.debugTime(o),l=[];for(const u of o.value)l.push(Object.assign(Object.assign({},u),{value:u.value?u.value():void 0}));if(!this.isMuted(o.listener.fn))if(o.listener.options.queue&&this.jobsRunning)this.subscribeQueue.push(()=>this.jobsRunning?!1:(o.listener.fn(l,o.eventInfo),!0));else{let u=o.listener.id+":"+o.eventInfo.path.resolved;o.eventInfo.path.resolved||(u=o.listener.id+":"+o.eventInfo.path.listener),r.push({id:o.listener.id,resolvedPath:o.eventInfo.path.resolved,resolvedIdPath:u,originalFn:o.listener.fn,fn:()=>{o.listener.fn(l,o.eventInfo)},options:o.listener.options,groupId:o.listener.groupId})}this.debugListener(c,o)}}return Promise.resolve().then(()=>this.runQueuedListeners()),r}shouldIgnore(t,r){if(!t.options.ignore)return!1;for(const s of t.options.ignore){if(r.startsWith(s)||this.is_match&&this.is_match(s,r))return!0;{const n=this.cutPath(r,s);if(this.match(s,n))return!0}}return!1}getSubscribedListeners(t,r,s,n="update",i=null){s=Object.assign(Object.assign({},defaultUpdateOptions),s);const o={};for(let[a,c]of this.listeners)if(c.match(t)){o[a]={single:[],bulk:[],bulkData:[]};const l=c.paramsInfo?this.getParams(c.paramsInfo,t):void 0,u=this.cutPath(t,a),m=c.isRecursive||c.isWildcard?()=>this.get(u):()=>r,S=[{value:m,path:t,params:l}];for(const y of c.listeners.values()){if(this.shouldIgnore(y,t)){y.options.debug&&console.log("[getSubscribedListeners] Listener was not fired because it was ignored.",{listener:y,listenersCollection:c});continue}y.options.bulk?o[a].bulk.push({listener:y,listenersCollection:c,eventInfo:{type:n,listener:y,path:{listener:a,update:i||t,resolved:void 0},params:l,options:s},value:S}):o[a].single.push({listener:y,listenersCollection:c,eventInfo:{type:n,listener:y,path:{listener:a,update:i||t,resolved:this.cleanNotRecursivePath(t)},params:l,options:s},value:m})}}else if(this.options.extraDebug){let l=!1;for(const u of c.listeners.values())u.options.debug&&(l=!0,console.log("[getSubscribedListeners] Listener was not fired because there was no match.",{listener:u,listenersCollection:c,updatePath:t}));l&&c.match(t,!0)}return o}notifySubscribedListeners(t,r,s,n="update",i=null){return this.getQueueNotifyListeners(this.getSubscribedListeners(t,r,s,n,i))}useBulkValue(t){for(const[r,s]of t.listeners)if(s.options.bulk&&s.options.bulkValue||!s.options.bulk)return!0;return!1}getNestedListeners(t,r,s,n="update",i=null){const o={},a={};for(let[c,l]of this.listeners){if(!l.isRecursive)continue;const u=this.cutPath(c,t);if(this.match(u,t)){o[c]={single:[],bulk:[]};const f=this.trimPath(c.substr(u.length)),m=this.useBulkValue(l);let S;m&&(S=a[f]?a[f]:new WildcardObject(r,this.options.delimiter,this.options.wildcard).get(f),a[f]=S);const y=l.paramsInfo?this.getParams(l.paramsInfo,t):void 0,T=[],_={};for(const[x,D]of l.listeners)if(m)for(const M in S){const b=()=>S[M],E=[t,M].join(this.options.delimiter),C={type:n,listener:D,listenersCollection:l,path:{listener:c,update:i||t,resolved:this.cleanNotRecursivePath(E)},params:y,options:s};this.shouldIgnore(D,t)||(D.options.bulk?(T.push({value:b,path:E,params:y}),_[x]=D):o[c].single.push({listener:D,listenersCollection:l,eventInfo:C,value:b}))}else{const M={type:n,listener:D,listenersCollection:l,path:{listener:c,update:i||t,resolved:void 0},params:y,options:s};if(this.shouldIgnore(D,t))continue;D.options.bulk?(T.push({value:void 0,path:void 0,params:y}),_[x]=D):o[c].single.push({listener:D,listenersCollection:l,eventInfo:M,value:void 0})}for(const x in _){const D=_[x],M={type:n,listener:D,listenersCollection:l,path:{listener:c,update:t,resolved:void 0},options:s,params:y};o[c].bulk.push({listener:D,listenersCollection:l,eventInfo:M,value:T})}}else if(this.options.extraDebug)for(const f of l.listeners.values())f.options.debug&&console.log("[getNestedListeners] Listener was not fired because there was no match.",{listener:f,listenersCollection:l,currentCutPath:u,updatePath:t})}return o}notifyNestedListeners(t,r,s,n="update",i,o=null){return this.getQueueNotifyListeners(this.getNestedListeners(t,r,s,n,o),i)}getNotifyOnlyListeners(t,r,s,n="update",i=null){const o={};if(typeof s.only!="object"||!Array.isArray(s.only)||typeof s.only[0]>"u"||!this.canBeNested(r))return o;for(const a of s.only){const c=new WildcardObject(r,this.options.delimiter,this.options.wildcard).get(a);o[a]={bulk:[],single:[]};for(const l in c){const u=t+this.options.delimiter+l;for(const[f,m]of this.listeners){const S=m.paramsInfo?this.getParams(m.paramsInfo,u):void 0;if(this.match(f,u)){const y=()=>c[l],T=[{value:y,path:u,params:S}];for(const _ of m.listeners.values()){const x={type:n,listener:_,listenersCollection:m,path:{listener:f,update:i||t,resolved:this.cleanNotRecursivePath(u)},params:S,options:s};this.shouldIgnore(_,t)||(_.options.bulk?o[a].bulk.some(D=>D.listener===_)||o[a].bulk.push({listener:_,listenersCollection:m,eventInfo:x,value:T}):o[a].single.push({listener:_,listenersCollection:m,eventInfo:x,value:y}))}}}}}return o}runQueue(t){const r=[];for(const s of t)s.options.group?r.includes(s.groupId)||(s.fn(),r.push(s.groupId)):s.fn()}sortAndRunQueue(t,r){t.sort(function(s,n){return s.id-n.id}),this.options.debug&&console.log("[deep-state-observer] queue for ".concat(r),t),this.runQueue(t)}notifyOnly(t,r,s,n="update",i=""){const o=this.getQueueNotifyListeners(this.getNotifyOnlyListeners(t,r,s,n,i));this.sortAndRunQueue(o,t)}canBeNested(t){return typeof t=="object"&&t!==null}getUpdateValues(t,r){let s=r;return typeof r=="function"&&(s=r(t)),{newValue:s,oldValue:t}}wildcardNotify(t,r){let s=[];for(const n of t)this.getQueueNotifyListeners(n,s);for(const n of r)this.executeWaitingListeners(n);return this.jobsRunning--,s}wildcardUpdate(t,r,s=defaultUpdateOptions,n=!1){++this.jobsRunning,s=Object.assign(Object.assign({},defaultUpdateOptions),s);const i=this.scan.get(t),o={};for(const u in i){const f=this.split(u),{oldValue:m,newValue:S}=this.getUpdateValues(i[u],r);(!this.same(S,m)||s.force)&&(this.pathSet(f,S,this.data),o[u]=S)}const a=[],c=[];for(const u in o){const f=o[u];s.only.length?a.push(this.getNotifyOnlyListeners(u,f,s,"update",t)):(a.push(this.getSubscribedListeners(u,f,s,"update",t)),this.canBeNested(f)&&a.push(this.getNestedListeners(u,f,s,"update",t))),s.debug&&this.options.log("Wildcard update",{path:u,newValue:f}),c.push(u)}if(n){const u=this;return function(){const f=u.wildcardNotify(a,c);u.sortAndRunQueue(f,t)}}const l=this.wildcardNotify(a,c);this.sortAndRunQueue(l,t)}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:t,fnOrValue:r,options:s,multi:n});const u=Promise.resolve().then(()=>{this.runUpdateQueue()});return n?function(){return u}:u}if(this.isWildcard(t))return this.wildcardUpdate(t,r,s,n);++this.jobsRunning;const o=this.split(t),a=this.pathGet(o,this.data);let{oldValue:c,newValue:l}=this.getUpdateValues(a,r);if(s.debug&&this.options.log("Updating ".concat(t," ").concat(s.source?"from ".concat(s.source):""),{oldValue:c,newValue:l}),this.same(l,c)&&!s.force)return--this.jobsRunning,n?function(){return l}:l;if(this.pathSet(o,l,this.data),s=Object.assign(Object.assign({},defaultUpdateOptions),s),s.only===null)return--this.jobsRunning,n?function(){}:l;if(s.only.length){if(--this.jobsRunning,n){const u=this;return function(){return u.updateNotifyOnly(t,l,s)}}return this.updateNotifyOnly(t,l,s),l}if(n){--this.jobsRunning;const u=this;return function(){return u.updateNotify(t,l,s)}}return this.updateNotify(t,l,s),--this.jobsRunning,l}multi(t=!1){if(this.destroyed)return{update(){return this},done(){},getStack(){return[]}};if(this.collection)return this.collection;const r=this,s=[],n=[];return{update(o,a,c=defaultUpdateOptions){if(t){const l=r.split(o);let u=a;const f=r.pathGet(l,r.data);typeof u=="function"&&(u=u(f)),r.pathSet(l,u,r.data),s.push({updatePath:o,newValue:u,options:c})}else n.push(r.update(o,a,c,!0));return this},done(){if(r.collections===0){if(t)r.updateNotifyAll(s);else for(const o of n)o();s.length=0}},getStack(){return s}}}collect(){return this.collections++,this.collection||(this.collection=this.multi(!0)),this.collection}executeCollected(){if(this.collections--,this.collections===0&&this.collection){const t=this.collection;this.collection=null,t.done()}}getCollectedCount(){return this.collections}getCollectedStack(){return this.collection?this.collection.getStack():[]}get(t=void 0){if(!this.destroyed)return t===void 0||t===""?this.data:this.isWildcard(t)?this.scan.get(t):this.pathGet(this.split(t),this.data)}last(t){let r=this.lastExecs.get(t);r||(r={calls:0},this.lastExecs.set(t,r));const s=++r.calls;this.resolved.then(()=>{s===r.calls&&(this.lastExecs.set(t,{calls:0}),t())})}isMuted(t){if(!this.options.useMute)return!1;if(typeof t=="function")return this.isMutedListener(t);for(const r of this.muted){const s=!this.isNotRecursive(r),n=this.trimPath(r);if(this.match(t,n)||this.match(n,t))return!0;if(s){const i=this.cutPath(n,t);if(this.match(i,r)||this.match(r,i))return!0}}return!1}isMutedListener(t){return this.mutedListeners.has(t)}mute(t){if(typeof t=="function")return this.mutedListeners.add(t);this.muted.add(t)}unmute(t){if(typeof t=="function")return this.mutedListeners.delete(t);this.muted.delete(t)}debugSubscribe(t,r,s){t.options.debug&&this.options.log("listener subscribed",{listenerPath:s,listener:t,listenersCollection:r})}debugListener(t,r){(r.eventInfo.options.debug||r.listener.options.debug)&&this.options.log("Listener fired",{time:Date.now()-t,info:r})}debugTime(t){return t.listener.options.debug||t.eventInfo.options.debug?Date.now():0}startTrace(t,r=null){this.traceId++;const s=this.traceId+":"+t;return this.traceMap.set(s,{id:s,sort:this.traceId,stack:this.tracing.map(n=>n),additionalData:r,changed:[]}),this.tracing.push(s),s}stopTrace(t){const r=this.traceMap.get(t);return this.tracing.pop(),this.traceMap.delete(t),r}saveTrace(t){const r=this.traceMap.get(t);return this.tracing.pop(),this.traceMap.delete(t),this.savedTrace.push(r),r}getSavedTraces(){const t=this.savedTrace.map(r=>r);return t.sort((r,s)=>r.sort-s.sort),this.savedTrace=[],t}}const ignoreFirstCall=e=>{let t=0;return(...r)=>{if(t===0){t+=1;return}return e(...r)}};class DeepObservedData extends ObservedData{constructor(r){super();R(this,"state");R(this,"subscribers",new Map);R(this,"update",(r,s)=>{var n;(n=this.state)==null||n.update(s!=null?s:"",r)});R(this,"on",(r,s,n)=>{var a;const i=this.state.subscribe(r,n!=null&&n.immediate?s:ignoreFirstCall(s)),o=(a=this.subscribers.get(r))!=null?a:new Map;o.set(s,i),this.subscribers.set(r,o)});R(this,"off",(r,s)=>{var i;const n=this.subscribers.get(r);n&&((i=n.get(s))==null||i(),n.delete(s))});R(this,"getData",r=>{var s;return this.state?(s=this.state)==null?void 0:s.get(r):{}});R(this,"destroy",()=>{this.subscribers.forEach(r=>{r.forEach(s=>s())})});this.state=new DeepState(r)}}class Env{constructor(t=(n=>(n=(s=>(s=globalThis.navigator)==null?void 0:s.userAgent)())!=null?n:"")(),r={}){R(this,"isIos",!1);R(this,"isIphone",!1);R(this,"isIpad",!1);R(this,"isAndroid",!1);R(this,"isAndroidPad",!1);R(this,"isMac",!1);R(this,"isWin",!1);R(this,"isMqq",!1);R(this,"isWechat",!1);R(this,"isWeb",!1);R(this,"isOpenHarmony",!1);t&&(this.isIphone=t.indexOf("iPhone")>=0,this.isIpad=/(iPad).*OS\s([\d_]+)/.test(t),this.isIos=this.isIphone||this.isIpad,this.isAndroid=t.indexOf("Android")>=0,this.isAndroidPad=this.isAndroid&&t.indexOf("Mobile")<0,this.isMac=t.indexOf("Macintosh")>=0,this.isWin=t.indexOf("Windows")>=0,this.isMqq=/QQ\/([\d.]+)/.test(t),this.isWechat=t.indexOf("MicroMessenger")>=0&&t.indexOf("wxwork")<0,this.isOpenHarmony=t.includes("OpenHarmony"),this.isWeb=!this.isIos&&!this.isAndroid&&!this.isOpenHarmony&&!/(WebOS|BlackBerry)/.test(t),Object.entries(r).forEach(([i,o])=>{this[i]=o}))}}var NodeType=(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=(e="")=>e.replace(/\B([A-Z])/g,"-$1").toLowerCase(),getNodePath=(e,t=[])=>{const r=[],s=function(n,i){if(!Array.isArray(i))return null;for(let o=0,a=i.length;oe.replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),getUrlParam=(e,t)=>{const r=location.href,s=new RegExp("[?&#]".concat(e,"=([^&#]+)"),"gi"),n=r.match(s);let i;return n&&n.length>0?(i=n[n.length-1].split("="),i&&i.length>1?filterXSS(i[1]):""):""},isObject$1=e=>Object.prototype.toString.call(e)==="[object Object]",isPage=e=>{var t;return e?((t=e.type)==null?void 0:t.toLowerCase())===NodeType.PAGE:!1},isPageFragment=e=>{var t;return e?((t=e.type)==null?void 0:t.toLowerCase())===NodeType.PAGE_FRAGMENT:!1},isNumber$1=e=>/^(-?\d+)(\.\d+)?$/.test(e),getKeysArray=e=>"".concat(e).replace(/\[(\d+)\]/g,".$1").split("."),getValueByKeyPath=(e="",t={})=>(Array.isArray(e)?e:getKeysArray(e)).reduce((s,n)=>{if(isObject$1(s)||Array.isArray(s)&&/^\d*$/.test("".concat(n)))return s[n];throw new Error("".concat(t,"中不存在").concat(e))},t),setValueByKeyPath=(e,t,r={})=>set(r,e,t),getNodes=(e,t=[])=>{const r=[],s=function(n,i){if(Array.isArray(i))for(const o of i){const a=n.findIndex(c=>"".concat(c)==="".concat(o.id));a>-1&&(n.splice(a,1),r.push(o)),o.items&&s(n,o.items)}};return s(e,t),r},getDepKeys=(e={},t)=>Array.from(Object.values(e).reduce((r,s)=>{var n;return(((n=s[t])==null?void 0:n.keys)||[]).forEach(i=>r.add(i)),r},new Set)),getDepNodeIds=(e={})=>Array.from(Object.values(e).reduce((t,r)=>(Object.keys(r).forEach(s=>{t.add(s)}),t),new Set)),replaceChildNode=(e,t,r)=>{var a;const s=getNodePath(e.id,t),n=s.pop();let i=s.pop();if(!n){console.warn("未找到目标节点(".concat(e.id,")"));return}if(!i){console.warn("未找到父节点(".concat(e.id,")"));return}const o=(a=i.items)==null?void 0:a.findIndex(c=>c.id===n.id);i.items.splice(o,1,e)},DSL_NODE_KEY_COPY_PREFIX="__tmagic__",IS_DSL_NODE_KEY="__tmagic__dslNode",PAGE_FRAGMENT_CONTAINER_ID_KEY="tmagic-page-fragment-container-id",compiledNode=(e,t,r={},s)=>{let n=[];if(!s)n=getDepKeys(r,t.id);else{const i=r[s];n=(i==null?void 0:i[t.id].keys)||[]}return n.forEach(i=>{const o=getKeysArray(i),a=o.map((u,f)=>f"u")try{const u=getValueByKeyPath(i,t);setValueByKeyPath(a.join("."),u,t),c=u}catch(u){console.warn(u);return}let l;try{l=e(c)}catch(u){console.error(u),l=""}setValueByKeyPath(i,l,t)}),t},compiledCond=(e,t,r,s=[])=>{var n,i;switch(typeof t=="string"&&typeof r>"u"&&(r=""),e){case"is":return t===r;case"not":return t!==r;case"=":return t===r;case"!=":return t!==r;case">":return t>r;case">=":return t>=r;case"<":return t1&&t>=s[0]&&t<=s[1];case"not_between":return s.length<2||ts[1];case"include":return(n=t==null?void 0:t.includes)==null?void 0:n.call(t,r);case"not_include":return typeof t>"u"||!((i=t.includes)!=null&&i.call(t,r))}return!1},getDefaultValueFromFields=e=>{const t={},r={string:void 0,object:{},array:[],boolean:void 0,number:void 0,null:null,any:void 0};return e.forEach(s=>{if(typeof s.defaultValue<"u"){if(s.type==="array"&&!Array.isArray(s.defaultValue)){t[s.name]=r.array;return}if(s.type==="object"&&!isObject$1(s.defaultValue)){if(typeof s.defaultValue=="string"){try{t[s.name]=JSON.parse(s.defaultValue)}catch(n){t[s.name]=r.object,console.warn("defaultValue 解析失败",s.defaultValue,n)}return}t[s.name]=r.object;return}t[s.name]=cloneDeep(s.defaultValue);return}if(s.type==="object"){t[s.name]=s.fields?getDefaultValueFromFields(s.fields):r.object;return}if(s.type){t[s.name]=r[s.type];return}t[s.name]=void 0}),t},DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX="ds-field::",DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX="ds-field-changed",dataSourceTemplateRegExp=/\$\{([\s\S]+?)\}/g,isDslNode=e=>typeof e[IS_DSL_NODE_KEY]>"u"||e[IS_DSL_NODE_KEY]===!0,traverseNode=(e,t,r=[],s=!1)=>{s||t(e,r),Array.isArray(e.items)&&e.items.length&&(r.push(e),e.items.forEach(n=>{traverseNode(n,t,[...r],s)})),s&&t(e,r)};class FlowState{constructor(){R(this,"isAbort");this.isAbort=!1}abort(){this.isAbort=!0}reset(){this.isAbort=!1}}class EventHelper extends eventsExports.EventEmitter{constructor({app:r,beforeEventHandler:s,afterEventHandler:n}){super();R(this,"app");R(this,"eventQueue",[]);R(this,"nodeEventList",new Map);R(this,"dataSourceEventList",new Map);R(this,"beforeEventHandler");R(this,"afterEventHandler");this.beforeEventHandler=s,this.afterEventHandler=n,this.app=r}destroy(){this.removeNodeEvents(),this.removeAllListeners(),this.nodeEventList.clear(),this.dataSourceEventList.clear()}bindNodeEvents(r){var s;(s=r.events)==null||s.forEach((n,i)=>{if(!n.name)return;let o="".concat(n.name,"_").concat(r.data.id);const a=n.name.split(".");a.length>1&&(o="".concat(a[1],"_").concat(a[0]));let c=Symbol(o);r.eventKeys.has(o)?c=r.eventKeys.get(o):r.eventKeys.set(o,c);const l=(u,...f)=>{this.eventHandler(i,r,f)};this.nodeEventList.set(l,c),this.on(c,l)})}removeNodeEvents(){for(const r of Array.from(this.nodeEventList.keys())){const s=this.nodeEventList.get(r);s&&this.off(s,r)}this.nodeEventList.clear()}bindDataSourceEvents(){var s,n,i;const r=Array.from(((s=this.app.dataSourceManager)==null?void 0:s.dataSourceMap.values())||[]);this.removeDataSourceEvents(r);for(const o of r){const a=(n=this.dataSourceEventList.get(o.id))!=null?n:new Map;for(const c of o.schema.events||[]){const[l,...u]=((i=c.name)==null?void 0:i.split("."))||[];if(!l)return;const f=(...m)=>{this.eventHandler(c,o,m)};a.set(c.name,f),l===DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX?o==null||o.onDataChange(u.join("."),f):o.on(l,f)}this.dataSourceEventList.set(o.id,a)}}removeDataSourceEvents(r){if(this.dataSourceEventList.size){for(const s of r){const n=this.dataSourceEventList.get(s.id);if(!n)return;for(const i of Array.from(n.keys())){const[o,...a]=i.split(".");o===DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX?s.offDataChange(a.join("."),n.get(i)):s.off(o,n.get(i))}}this.dataSourceEventList.clear()}}getEventQueue(){return this.eventQueue}addEventToQueue(r){this.eventQueue.push(r)}async eventHandler(r,s,n){const i=typeof r=="number"?s.events[r]:r;if(typeof this.beforeEventHandler=="function"&&this.beforeEventHandler({eventConfig:i,source:s,args:n}),has(i,"actions")){const o=new FlowState,{actions:a}=i;for(let c=0;c{clearTimeout(this.tid),this.tid=setTimeout(()=>{this.refreshRem(),this.tid=void 0},300)});R(this,"pageshowHandler",t=>{t.persisted&&this.resizeHandler()});globalThis.document.readyState==="complete"?this.setBodyFontSize():globalThis.document.addEventListener("DOMContentLoaded",this.setBodyFontSize,!1),globalThis.addEventListener("resize",this.resizeHandler,!1),globalThis.addEventListener("pageshow",this.pageshowHandler,!1),typeof(t==null?void 0:t.designWidth)<"u"&&this.setDesignWidth(t.designWidth)}destroy(){globalThis.document.removeEventListener("DOMContentLoaded",this.setBodyFontSize,!1),globalThis.removeEventListener("resize",this.resizeHandler,!1),globalThis.removeEventListener("pageshow",this.pageshowHandler,!1)}setDesignWidth(t){this.designWidth=t,this.refreshRem()}setBodyFontSize(){globalThis.document.body.style.fontSize=".12rem"}refreshRem(){const{width:t}=document.documentElement.getBoundingClientRect(),r=t/(this.designWidth/100);globalThis.document.documentElement.style.fontSize="".concat(r,"px"),globalThis.document.documentElement.style.fontSize="".concat(this.correctRem(r),"px")}correctRem(t){const{document:r}=globalThis,s=r.createElement("div");s.style.cssText="width:1rem;height:0;overflow:hidden;position:absolute;z-index:-1;visibility:hidden;",r.documentElement.appendChild(s);const n=s.offsetWidth;return r.documentElement.removeChild(s),Math.abs(n-t)>1?t**2/n:t}}class Store{constructor({initialData:t={}}={}){R(this,"data");this.data=t}set(t,r){this.data[t]=r}get(t){return this.data[t]}}class Node extends eventsExports.EventEmitter{constructor(r){var s,n;super();R(this,"data");R(this,"style");R(this,"events",[]);R(this,"instance",null);R(this,"page");R(this,"parent");R(this,"app");R(this,"store");R(this,"eventKeys",new Map);R(this,"eventQueue",[]);this.store=new Store({initialData:((n=(s=r.app).nodeStoreInitialData)==null?void 0:n.call(s))||{}}),this.page=r.page,this.parent=r.parent,this.app=r.app,this.setData(r.config),this.listenLifeSafe()}setData(r){var i;this.data=r;const{events:s,style:n}=r;this.events=s||[],this.style=n||{};try{this.instance&&!Object.isFrozen(this.instance)&&((i=Object.getOwnPropertyDescriptor(this.instance,"config"))==null?void 0:i.writable)!==!1&&!this.instance.__isVue&&(this.instance.config=r)}catch(o){}this.emit("update-data",r)}addEventToQueue(r){this.eventQueue.push(r)}registerMethod(r){if(r){this.instance||(this.instance={});for(const[s,n]of Object.entries(r))typeof n=="function"&&(this.instance[s]=n)}}setInstance(r){this.instance=r}async runHookCode(r,s){if(typeof this.data[r]=="function"){await this.data[r](this);return}const n=this.data[r];if((n==null?void 0:n.hookType)===HookType.CODE)for(const i of n.hookData){const{codeType:o=HookCodeType.CODE,codeId:a,params:c={}}=i;o===HookCodeType.CODE&&typeof a=="string"?await this.app.runCode(a,s||c,[],void 0,this):o===HookCodeType.DATA_SOURCE_METHOD&&Array.isArray(a)&&a.length>1&&await this.app.runDataSourceMethod(a[0],a[1],s||c,[],void 0,this)}}destroy(){this.eventQueue.length=0,this.instance=null,this.events=[],this.style={},this.removeAllListeners()}listenLifeSafe(){this.once("created",r=>{this.once("destroy",()=>{this.instance=null,this.data[NODE_DISABLE_CODE_BLOCK_KEY]!==!0&&this.runHookCode("destroy"),this.listenLifeSafe()}),r&&this.setInstance(r),this.data[NODE_DISABLE_CODE_BLOCK_KEY]!==!0&&this.runHookCode("created")}),this.once("mounted",r=>{(async()=>{r&&this.setInstance(r);for(let n=this.eventQueue.shift();n;n=this.eventQueue.shift())typeof r[n.method]=="function"&&await r[n.method](n.fromCpt,...n.args);if(this.app.eventHelper){for(const n of this.app.eventHelper.getEventQueue())for(const[,i]of this.app.pageFragments){const o=i.getNode(n.toId);o&&o===this&&(typeof r[n.method]=="function"&&await r[n.method](n.fromCpt,...n.args),n.handled=!0)}this.app.eventHelper.eventQueue=this.app.eventHelper.getEventQueue().filter(n=>!n.handled)}this.data[NODE_DISABLE_CODE_BLOCK_KEY]!==!0&&this.runHookCode("mounted")})()})}}class IteratorContainer extends Node{constructor(){super(...arguments);R(this,"nodes",[])}setData(r){this.resetNodes(),super.setData(r)}resetNodes(){var r;(r=this.nodes)==null||r.forEach(s=>{s.forEach(n=>{n.destroy()})}),this.nodes=[]}initNode(r,s,n){var o,a,c,l,u,f;if(n.has(r.id)&&((o=n.get(r.id))==null||o.destroy()),r.type&&this.app.iteratorContainerType.has(r.type)){const m=new IteratorContainer({config:r,parent:s,page:this.page,app:this.app});n.set(r.id,m),(a=this.app.eventHelper)==null||a.bindNodeEvents(m);return}const i=new Node({config:r,parent:s,page:this.page,app:this.app});if((c=this.app.eventHelper)==null||c.bindNodeEvents(i),n.set(r.id,i),r.type&&this.app.pageFragmentContainerType.has(r.type)&&r.pageFragmentId){const m=(u=(l=this.app.dsl)==null?void 0:l.items)==null?void 0:u.find(S=>S.id===r.pageFragmentId);m&&(r.items=[m])}(f=r.items)==null||f.forEach(m=>{this.initNode(m,i,n)})}setNodes(r,s){const n=this.nodes[s]||new Map;r.forEach(i=>{this.initNode(i,this,n)}),this.nodes[s]=n}getNode(r,s){var n;return(n=this.nodes[s])==null?void 0:n.get(r)}destroy(){super.destroy(),this.resetNodes()}}class Page extends Node{constructor(r){super(r);R(this,"nodes",new Map);this.setNode(r.config.id,this),r.config.items.forEach(s=>{this.initNode(s,this)})}initNode(r,s){var i,o,a;if(r.type&&this.app.iteratorContainerType.has(r.type)){this.setNode(r.id,new IteratorContainer({config:r,parent:s,page:this,app:this.app}));return}const n=new(r.type&&App.nodeClassMap.get(r.type)||Node)({config:r,parent:s,page:this,app:this.app});if(this.setNode(r.id,n),r.type&&this.app.pageFragmentContainerType.has(r.type)&&r.pageFragmentId){const c=(o=(i=this.app.dsl)==null?void 0:i.items)==null?void 0:o.find(l=>l.id===r.pageFragmentId);c&&this.app.pageFragments.set(r.id,new Page({config:c,app:this.app}))}(a=r.items)==null||a.forEach(c=>{this.initNode(c,n)})}getNode(r,{iteratorContainerId:s,iteratorIndex:n,pageFragmentContainerId:i}={}){var o;if(this.nodes.has(r))return this.nodes.get(r);if(i)return(o=this.app.pageFragments.get(i))==null?void 0:o.getNode(r,{iteratorContainerId:s,iteratorIndex:n});if(Array.isArray(s)&&s.length&&Array.isArray(n)){let a=this.nodes.get(s[0]);for(let c=1,l=s.length;c{r!==this&&r.destroy()}),this.nodes.clear(),super.destroy()}}const style2Obj=e=>{if(typeof e!="string")return e;const t={};return e.split(";").forEach(r=>{if(!r)return;const s=r.split(":");let n=s.shift(),i=s.join(":");n&&(n=n.replace(/^\s*/,"").replace(/\s*$/,""),i=i.replace(/^\s*/,"").replace(/\s*$/,""),n=n.split("-").map((o,a)=>a>0?"".concat(o[0].toUpperCase()).concat(o.substr(1)):o).join(""),t[n]=i)}),t},fillBackgroundImage=e=>e&&!/^url/.test(e)&&!/^linear-gradient/.test(e)?"url(".concat(e,")"):e,getTransform=(e,t)=>{if(!e)return[];const r=Object.entries(e).map(([n,i])=>i.trim()?(n==="rotate"&&isNumber$1(i)&&(i="".concat(i,"deg")),t!=="hippy"?"".concat(n,"(").concat(i,")"):{[n]:i}):"");if(t==="hippy")return r;const s=r.join(" ");return s.trim()?s:"none"},transformStyle=(e,t)=>{if(!e)return{};let r={};const s={};typeof e=="string"?r=style2Obj(e):r={...e};const n=t==="hippy",i=["zIndex","opacity","fontWeight"];return Object.entries(r).forEach(([o,a])=>{o==="scale"&&!s.transform&&n?s.transform=[{scale:a}]:o==="backgroundImage"&&!n?a&&(s[o]=fillBackgroundImage(a)):o==="transform"&&typeof a!="string"?s[o]=getTransform(a,t):!i.includes(o)&&a&&/^[-]?[0-9]*[.]?[0-9]*$/.test(a)?s[o]=n?a:"".concat(a/100,"rem"):s[o]=a}),s},COMMON_EVENT_PREFIX="magic:common:events:",Ce=class Ce extends eventsExports.EventEmitter{constructor(r){var s;super();R(this,"env");R(this,"dsl");R(this,"codeDsl");R(this,"dataSourceManager");R(this,"page");R(this,"pageFragments",new Map);R(this,"useMock",!1);R(this,"platform","mobile");R(this,"jsEngine","browser");R(this,"components",new Map);R(this,"pageFragmentContainerType",new Set(["page-fragment-container"]));R(this,"iteratorContainerType",new Set(["iterator-container"]));R(this,"request");R(this,"transformStyle");R(this,"eventHelper");R(this,"errorHandler");R(this,"nodeStoreInitialData");R(this,"flexible");r.env?this.setEnv(r.env):this.setEnv(r.ua),this.errorHandler=r.errorHandler,this.codeDsl=(s=r.config)==null?void 0:s.codeBlocks,r.platform&&(this.platform=r.platform),r.jsEngine&&(this.jsEngine=r.jsEngine),r.nodeStoreInitialData&&(this.nodeStoreInitialData=r.nodeStoreInitialData),r.pageFragmentContainerType&&(Array.isArray(r.pageFragmentContainerType)?r.pageFragmentContainerType:[r.pageFragmentContainerType]).forEach(i=>{this.pageFragmentContainerType.add(i)}),r.iteratorContainerType&&(Array.isArray(r.iteratorContainerType)?r.iteratorContainerType:[r.iteratorContainerType]).forEach(i=>{this.iteratorContainerType.add(i)}),typeof r.useMock=="boolean"&&(this.useMock=r.useMock),this.jsEngine==="browser"&&!r.disabledFlexible&&(this.flexible=new Flexible({designWidth:r.designWidth})),this.platform!=="editor"&&(this.eventHelper=new EventHelper({app:this,beforeEventHandler:r.beforeEventHandler,afterEventHandler:r.afterEventHandler})),this.transformStyle=r.transformStyle||(n=>transformStyle(n,this.jsEngine)),r.request&&(this.request=r.request),r.config&&this.setConfig(r.config,r.curPage,r.dataSourceManagerInitialData)}static registerNode(r,s){Ce.nodeClassMap.set(r,s)}setEnv(r){!r||typeof r=="string"?this.env=new Env(r):this.env=r}setDesignWidth(r){var s;(s=this.flexible)==null||s.setDesignWidth(r)}setConfig(r,s,n){var o,a,c;this.dsl=r,!s&&r.items.length&&(s=r.items[0].id),this.dataSourceManager&&this.dataSourceManager.destroy(),this.dataSourceManager=createDataSourceManager(this,this.useMock,n),this.codeDsl=r.codeBlocks;const i=s||((a=(o=this.page)==null?void 0:o.data)==null?void 0:a.id);super.emit("dsl-change",{dsl:r,curPage:i}),this.pageFragments.forEach(l=>{l.destroy()}),this.pageFragments.clear(),this.setPage(i),this.dataSourceManager&&(this.dataSourceManager.isAllDataSourceRegistered()?(c=this.eventHelper)==null||c.bindDataSourceEvents():this.dataSourceManager.once("registered-all",()=>{var l;(l=this.eventHelper)==null||l.bindDataSourceEvents()}))}setPage(r){var n;const s=(n=this.dsl)==null?void 0:n.items.find(i=>"".concat(i.id)==="".concat(r));if(!s){this.deletePage(),super.emit("page-change");return}if(this.page){if(s===this.page.data)return;this.page.destroy()}if(this.page=new Page({config:s,app:this}),this.eventHelper){this.eventHelper.removeNodeEvents();for(const[,i]of this.page.nodes)this.eventHelper.bindNodeEvents(i);for(const[,i]of this.pageFragments)for(const[,o]of i.nodes)this.eventHelper.bindNodeEvents(o)}super.emit("page-change",this.page)}deletePage(){var r,s;(r=this.page)==null||r.destroy(),(s=this.eventHelper)==null||s.removeNodeEvents(),this.page=void 0}getPage(r){if(!r)return this.page;if(this.page&&"".concat(this.page.data.id)==="".concat(r))return this.page}getNode(r,s){var n;return(n=this.page)==null?void 0:n.getNode(r,s)}registerComponent(r,s){this.components.set(r,s)}unregisterComponent(r){this.components.delete(r)}resolveComponent(r){return this.components.get(r)}emit(r,...s){var o,a;const[n,...i]=s;return this.eventHelper&&n instanceof Node&&((o=n.data)!=null&&o.id)&&n.eventKeys.has("".concat(String(r),"_").concat(n.data.id))?(a=this.eventHelper)==null?void 0:a.emit(n.eventKeys.get("".concat(String(r),"_").concat(n.data.id)),n,...i):super.emit(r,...s)}async runCode(r,s,n,i,o){var c,l;if(!r||isEmpty(this.codeDsl))return;const a=(l=(c=this.codeDsl)==null?void 0:c[r])==null?void 0:l.content;if(typeof a=="function")try{await a({app:this,params:s,eventParams:n,flowState:i,node:o})}catch(u){if(this.errorHandler)this.errorHandler(u,void 0,{type:"run-code",codeId:r,params:s,eventParams:n,flowState:i,node:o});else throw u}}async runDataSourceMethod(r,s,n,i,o,a){var l;if(!r||!s)return;const c=(l=this.dataSourceManager)==null?void 0:l.get(r);if(c)try{const f=(c.methods||[]).find(m=>m.name===s);f&&typeof f.content=="function"?await f.content({app:this,params:n,dataSource:c,eventParams:i,flowState:o,node:a}):typeof c[s]=="function"&&await c[s]()}catch(u){if(this.errorHandler)this.errorHandler(u,c,{type:"data-source-method",params:n,eventParams:i,flowState:o,node:a});else throw u}}destroy(){var r,s,n,i;this.removeAllListeners(),(r=this.page)==null||r.destroy(),this.page=void 0,this.pageFragments.forEach(o=>{o.destroy()}),this.pageFragments.clear(),(s=this.flexible)==null||s.destroy(),this.flexible=void 0,(n=this.eventHelper)==null||n.destroy(),this.dsl=void 0,(i=this.dataSourceManager)==null||i.destroy(),this.dataSourceManager=void 0,this.codeDsl=void 0,this.components.clear(),this.nodeStoreInitialData=void 0}};R(Ce,"nodeClassMap",new Map);let App=Ce;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{constructor(t){R(this,"isTarget");R(this,"id");R(this,"name");R(this,"type",DepTargetType.DEFAULT);R(this,"deps",{});R(this,"isCollectByDefault");var r;this.isTarget=t.isTarget,this.id=t.id,this.name=t.name,this.isCollectByDefault=(r=t.isCollectByDefault)!=null?r:!0,t.type&&(this.type=t.type),t.initialDeps&&(this.deps=t.initialDeps)}updateDep({id:t,name:r,key:s,data:n}){const i=this.deps[t]||{name:r,keys:[]};i.name=r,i.data=n,this.deps[t]=i,i.keys.indexOf(s)===-1&&i.keys.push(s)}removeDep(t,r){if(typeof t>"u"){Object.keys(this.deps).forEach(n=>{delete this.deps[n]});return}const s=this.deps[t];if(s)if(r){const n=s.keys.indexOf(r);s.keys.splice(n,1),s.keys.length===0&&delete this.deps[t]}else delete this.deps[t]}hasDep(t,r){const s=this.deps[t];return!!(s!=null&&s.keys.find(n=>n===r))}destroy(){this.deps={}}}const isIncludeArrayField=(e,t)=>{let r=t;return e.some((s,n)=>{const i=r.find(({name:o})=>o===s);return r=(i==null?void 0:i.fields)||[],i&&i.type==="array"&&/^(?!\d+$).*$/.test("".concat(e[n+1]))&&n{const s=e.match(dataSourceTemplateRegExp)||[];if(s.length<=0)return!1;const n=[],i=[];return s.forEach(o=>{const a=o.substring(2,o.length-1),c=getKeysArray(a),l=c.shift();!l||l!==t.id||(isIncludeArrayField(c,t.fields)?n.push(o):i.push(o))}),r?n.length>0:i.length>0},isSpecificDataSourceTemplate=(e,t)=>(e==null?void 0:e.isBindDataSourceField)&&e.dataSourceId&&e.dataSourceId===t&&typeof e.template=="string",isUseDataSourceField=(e,t)=>{if(!Array.isArray(e)||typeof e[0]!="string")return!1;const[r]=e,s=r.indexOf(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX);return s===-1?!1:r.substring(s+DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX.length)===t},isDataSourceTarget=(e,t,r,s=!1)=>{if(!r||!["string","object"].includes(typeof r)||"".concat(t).startsWith(NODE_CONDS_KEY))return!1;if(typeof r=="string")return isDataSourceTemplate(r,e,s);if(isObject$1(r)&&(r!=null&&r.isBindDataSource)&&r.dataSourceId&&r.dataSourceId===e.id||isSpecificDataSourceTemplate(r,e.id))return!0;if(isUseDataSourceField(r,e.id)){const[,...n]=r,i=isIncludeArrayField(n,e.fields);return s?i:!i}return!1},isDataSourceCondTarget=(e,t,r,s=!1)=>{var o;if(!Array.isArray(r)||!e)return!1;const[n,...i]=r;if(n!==e.id||!"".concat(t).startsWith(NODE_CONDS_KEY))return!1;if((o=e.fields)!=null&&o.find(a=>a.name===i[0])){const a=isIncludeArrayField(i,e.fields);return s?a:!a}return!1},traverseTarget=(e,t,r)=>{for(const s of Object.values(e))for(const n of Object.values(s))r&&n.type!==r||t(n)};class Watcher{constructor(t){R(this,"targetsList",{});R(this,"childrenProp","items");R(this,"idProp","id");R(this,"nameProp","name");t!=null&&t.initialTargets&&(this.targetsList=t.initialTargets),t!=null&&t.childrenProp&&(this.childrenProp=t.childrenProp)}getTargetsList(){return this.targetsList}getTargets(t=DepTargetType.DEFAULT){return this.targetsList[t]||{}}addTarget(t){const r=this.getTargets(t.type)||{};this.targetsList[t.type]=r,r[t.id]=t}getTarget(t,r=DepTargetType.DEFAULT){return this.getTargets(r)[t]}hasTarget(t,r=DepTargetType.DEFAULT){return!!this.getTarget(t,r)}hasSpecifiedTypeTarget(t=DepTargetType.DEFAULT){return Object.keys(this.getTargets(t)).length>0}removeTarget(t,r=DepTargetType.DEFAULT){const s=this.getTargets(r);s[t]&&(s[t].destroy(),delete s[t])}removeTargets(t=DepTargetType.DEFAULT){const r=this.targetsList[t];if(r){for(const s of Object.values(r))s.destroy();delete this.targetsList[t]}}clearTargets(){for(const t of Object.keys(this.targetsList))delete this.targetsList[t]}collect(t,r={},s=!1,n){this.collectByCallback(t,n,({node:i,target:o})=>{this.removeTargetDep(o,i),this.collectItem(i,o,r,s)})}collectByCallback(t,r,s){traverseTarget(this.targetsList,n=>{if(!(!r&&!n.isCollectByDefault))for(const i of t)s({node:i,target:n})},r)}clear(t,r){let{targetsList:s}=this;r&&(s={[r]:this.getTargets(r)});const n=[];traverseTarget(s,i=>{if(t)for(const o of t)i.removeDep(o[this.idProp]),Array.isArray(o[this.childrenProp])&&o[this.childrenProp].length&&!n.includes(o[this.idProp])&&(n.push(o[this.idProp]),this.clear(o[this.childrenProp]));else i.removeDep()})}clearByType(t,r){this.clear(r,t)}collectItem(t,r,s={},n=!1){const i=[DepTargetType.DATA_SOURCE,DepTargetType.DATA_SOURCE_COND,DepTargetType.DATA_SOURCE_METHOD];if(t[NODE_DISABLE_DATA_SOURCE_KEY]&&i.includes(r.type)||t[NODE_DISABLE_CODE_BLOCK_KEY]&&r.type===DepTargetType.CODE_BLOCK)return;const o=(a,c="")=>{const l=(u,f)=>{const m=u===this.childrenProp,S=c?"".concat(c,".").concat(u):u;if(r.isTarget(S,f))r.updateDep({id:t[this.idProp],name:"".concat(t[this.nameProp]||t[this.idProp]),data:s,key:S});else if(!m&&Array.isArray(f))for(let y=0,T=f.length;y"u"||f===""||l(u,f)};o(t)}removeTargetDep(t,r,s){if(t.removeDep(r[this.idProp],s),typeof s>"u"&&Array.isArray(r[this.childrenProp])&&r[this.childrenProp].length)for(const n of r[this.childrenProp])this.removeTargetDep(t,n,s)}}const scriptRel="modulepreload",assetsURL=function(e){return"/tmagic-editor/playground/runtime/vue/page/"+e},seen={},__vitePreload=function(t,r,s){let n=Promise.resolve();if(r&&r.length>0){let c=function(l){return Promise.all(l.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));n=c(r.map(l=>{if(l=assetsURL(l),l in seen)return;seen[l]=!0;const u=l.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector('link[href="'.concat(l,'"]').concat(f)))return;const m=document.createElement("link");if(m.rel=u?"stylesheet":scriptRel,u||(m.as="script"),m.crossOrigin="",m.href=l,a&&m.setAttribute("nonce",a),document.head.appendChild(m),u)return new Promise((S,y)=>{m.addEventListener("load",S),m.addEventListener("error",()=>y(new Error("Unable to preload CSS for ".concat(l))))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return n.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})},components={button:()=>__vitePreload(()=>import("./index-7F8izgBm.js"),__vite__mapDeps([0,1])),container:()=>__vitePreload(()=>import("./Container-DK0Lu2Fj.js"),__vite__mapDeps([2,1,3])),img:()=>__vitePreload(()=>import("./index-fCe7t2BB.js"),__vite__mapDeps([4,1])),"iterator-container":()=>__vitePreload(()=>import("./IteratorContainer-CWEPRDVy.js"),__vite__mapDeps([5,1,3])),overlay:()=>__vitePreload(()=>import("./index-GCqbqFTJ.js"),__vite__mapDeps([6,1])),page:()=>__vitePreload(()=>import("./index-CE30GUgR.js"),__vite__mapDeps([7,1,3])),"page-fragment":()=>__vitePreload(()=>import("./PageFragment-DNRIMCtY.js"),__vite__mapDeps([8,1,3])),"page-fragment-container":()=>__vitePreload(()=>import("./PageFragmentContainer-BMWpuBJg.js"),__vite__mapDeps([9,1,10])),qrcode:()=>__vitePreload(()=>import("./index-KPHPX1v8.js"),__vite__mapDeps([11,1])),text:()=>__vitePreload(()=>import("./index-Bk94UvMv.js"),__vite__mapDeps([12,1]))},datasources={},plugins={};function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString}=Object.prototype,{getPrototypeOf}=Object,{iterator,toStringTag}=Symbol,kindOf=(e=>t=>{const r=toString.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>e!==null&&typeof e=="object",isBoolean=e=>e===!0||e===!1,isPlainObject=e=>{if(kindOf(e)!=="object")return!1;const t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(toStringTag in e)&&!(iterator in e)},isEmptyObject=e=>{if(!isObject(e)||isBuffer(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){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&&(typeof FormData=="function"&&e instanceof FormData||isFunction(e.append)&&((t=kindOf(e))==="formdata"||t==="object"&&isFunction(e.toString)&&e.toString()==="[object FormData]"))},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:r=!1}={}){if(e===null||typeof e>"u")return;let s,n;if(typeof e!="object"&&(e=[e]),isArray(e))for(s=0,n=e.length;s0;)if(n=r[s],t===n.toLowerCase())return n;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e}=isContextDefined(this)&&this||{},t={},r=(s,n)=>{const i=e&&findKey(t,n)||n;isPlainObject(t[i])&&isPlainObject(s)?t[i]=merge(t[i],s):isPlainObject(s)?t[i]=merge({},s):isArray(s)?t[i]=s.slice():t[i]=s};for(let s=0,n=arguments.length;s(forEach(t,(n,i)=>{r&&isFunction(n)?e[i]=bind(n,r):e[i]=n},{allOwnKeys:s}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,r,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject=(e,t,r,s)=>{let n,i,o;const a={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),i=n.length;i-- >0;)o=n[i],(!s||s(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=r!==!1&&getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const s=e.indexOf(t,r);return s!==-1&&s===r},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},isTypedArray=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(e,t)=>{const s=(e&&e[iterator]).call(e);let n;for(;(n=s.next())&&!n.done;){const i=n.value;t.call(e,i[0],i[1])}},matchAll=(e,t)=>{let r;const s=[];for(;(r=e.exec(t))!==null;)s.push(r);return s},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,n){return s.toUpperCase()+n}),hasOwnProperty=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),s={};forEach(r,(n,i)=>{let o;(o=t(n,i,e))!==!1&&(s[i]=o||n)}),Object.defineProperties(e,s)},freezeMethods=e=>{reduceDescriptors(e,(t,r)=>{if(isFunction(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=e[r];if(isFunction(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet=(e,t)=>{const r={},s=n=>{n.forEach(i=>{r[i]=!0})};return isArray(e)?s(e):s(String(e).split(t)),r},noop=()=>{},toFiniteNumber=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&e[toStringTag]==="FormData"&&e[iterator])}const toJSONObject=e=>{const t=new Array(10),r=(s,n)=>{if(isObject(s)){if(t.indexOf(s)>=0)return;if(isBuffer(s))return s;if(!("toJSON"in s)){t[n]=s;const i=isArray(s)?[]:{};return forEach(s,(o,a)=>{const c=r(o,n+1);!isUndefined(c)&&(i[a]=c)}),t[n]=void 0,i}}return s};return r(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch),_setImmediate=((e,t)=>e?setImmediate:t?((r,s)=>(_global.addEventListener("message",({source:n,data:i})=>{n===_global&&i===r&&s.length&&s.shift()()},!1),n=>{s.push(n),_global.postMessage(r,"*")}))("axios@".concat(Math.random()),[]):r=>setTimeout(r))(typeof setImmediate=="function",isFunction(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,isIterable=e=>e!=null&&isFunction(e[iterator]),utils$1={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean,isObject,isPlainObject,isEmptyObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable};function AxiosError$1(e,t,r,s,n){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),r&&(this.config=r),s&&(this.request=s),n&&(this.response=n,this.status=n.status?n.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,r,s,n,i)=>{const o=Object.create(prototype$1);return utils$1.toFlatObject(e,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),AxiosError$1.call(o,e.message,t,r,s,n),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};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,r){return e?e.concat(t).map(function(n,i){return n=removeBrackets(n),!r&&i?"["+n+"]":n}).join(r?".":""):t}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(t){return/^is[A-Z]/.test(t)});function toFormData$1(e,t,r){if(!utils$1.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=utils$1.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,_){return!utils$1.isUndefined(_[T])});const s=r.metaTokens,n=r.visitor||u,i=r.dots,o=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(n))throw new TypeError("visitor must be a function");function l(y){if(y===null)return"";if(utils$1.isDate(y))return y.toISOString();if(utils$1.isBoolean(y))return y.toString();if(!c&&utils$1.isBlob(y))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(y)||utils$1.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function u(y,T,_){let x=y;if(y&&!_&&typeof y=="object"){if(utils$1.endsWith(T,"{}"))T=s?T:T.slice(0,-2),y=JSON.stringify(y);else if(utils$1.isArray(y)&&isFlatArray(y)||(utils$1.isFileList(y)||utils$1.endsWith(T,"[]"))&&(x=utils$1.toArray(y)))return T=removeBrackets(T),x.forEach(function(M,b){!(utils$1.isUndefined(M)||M===null)&&t.append(o===!0?renderKey([T],b,i):o===null?T:T+"[]",l(M))}),!1}return isVisitable(y)?!0:(t.append(renderKey(_,T,i),l(y)),!1)}const f=[],m=Object.assign(predicates,{defaultVisitor:u,convertValue:l,isVisitable});function S(y,T){if(!utils$1.isUndefined(y)){if(f.indexOf(y)!==-1)throw Error("Circular reference detected in "+T.join("."));f.push(y),utils$1.forEach(y,function(x,D){(!(utils$1.isUndefined(x)||x===null)&&n.call(t,x,utils$1.isString(D)?D.trim():D,T,m))===!0&&S(x,T?T.concat(D):[D])}),f.pop()}}if(!utils$1.isObject(e))throw new TypeError("data must be an object");return S(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(t,r){this._pairs.push([t,r])};prototype.toString=function(t){const r=t?function(s){return t.call(this,s,encode$1)}:encode$1;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};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,r){if(!t)return e;const s=r&&r.encode||encode;utils$1.isFunction(r)&&(r={serialize:r});const n=r&&r.serialize;let i;if(n?i=n(t,r):i=utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(s),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class InterceptorManager{constructor(){this.handlers=[]}use(t,r,s){return this.handlers.push({fulfilled:t,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){utils$1.forEach(this.handlers,function(s){s!==null&&t(s)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(e,t){return toFormData$1(e,new platform.classes.URLSearchParams,{visitor:function(r,s,n,i){return platform.isNode&&utils$1.isBuffer(r)?(this.append(s,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function arrayToObject(e){const t={},r=Object.keys(e);let s;const n=r.length;let i;for(s=0;s=r.length;return o=!o&&utils$1.isArray(n)?n.length:o,c?(utils$1.hasOwnProp(n,o)?n[o]=[n[o],s]:n[o]=s,!a):((!n[o]||!utils$1.isObject(n[o]))&&(n[o]=[]),t(r,s,n[o],i)&&utils$1.isArray(n[o])&&(n[o]=arrayToObject(n[o])),!a)}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){const r={};return utils$1.forEachEntry(e,(s,n)=>{t(parsePropPath(s),n,r,0)}),r}return null}function stringifySafely(e,t,r){if(utils$1.isString(e))try{return(t||JSON.parse)(e),utils$1.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(e)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const s=r.getContentType()||"",n=s.indexOf("application/json")>-1,i=utils$1.isObject(t);if(i&&utils$1.isHTMLForm(t)&&(t=new FormData(t)),utils$1.isFormData(t))return n?JSON.stringify(formDataToJSON(t)):t;if(utils$1.isArrayBuffer(t)||utils$1.isBuffer(t)||utils$1.isStream(t)||utils$1.isFile(t)||utils$1.isBlob(t)||utils$1.isReadableStream(t))return t;if(utils$1.isArrayBufferView(t))return t.buffer;if(utils$1.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(t,this.formSerializer).toString();if((a=utils$1.isFileList(t))||s.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return toFormData$1(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||n?(r.setContentType("application/json",!1),stringifySafely(t)):t}],transformResponse:[function(t){const r=this.transitional||defaults.transitional,s=r&&r.forcedJSONParsing,n=this.responseType==="json";if(utils$1.isResponse(t)||utils$1.isReadableStream(t))return t;if(t&&utils$1.isString(t)&&(s&&!this.responseType||n)){const o=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?AxiosError$1.from(a,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response):a}}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(t){return t>=200&&t<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 r,s,n;return e&&e.split("\n").forEach(function(o){n=o.indexOf(":"),r=o.substring(0,n).trim().toLowerCase(),s=o.substring(n+1).trim(),!(!r||t[r]&&ignoreDuplicateOf[r])&&(r==="set-cookie"?t[r]?t[r].push(s):t[r]=[s]:t[r]=t[r]?t[r]+", "+s:s)}),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return e===!1||e==null?e:utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(e);)t[s[1]]=s[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,r,s,n){if(utils$1.isFunction(s))return s.call(this,t,r);if(n&&(t=r),!!utils$1.isString(t)){if(utils$1.isString(s))return t.indexOf(s)!==-1;if(utils$1.isRegExp(s))return s.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,s)=>r.toUpperCase()+s)}function buildAccessors(e,t){const r=utils$1.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+r,{value:function(n,i,o){return this[s].call(this,t,n,i,o)},configurable:!0})})}let AxiosHeaders$1=class{constructor(t){t&&this.set(t)}set(t,r,s){const n=this;function i(a,c,l){const u=normalizeHeader(c);if(!u)throw new Error("header name must be a non-empty string");const f=utils$1.findKey(n,u);(!f||n[f]===void 0||l===!0||l===void 0&&n[f]!==!1)&&(n[f||c]=normalizeValue(a))}const o=(a,c)=>utils$1.forEach(a,(l,u)=>i(l,u,c));if(utils$1.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(utils$1.isString(t)&&(t=t.trim())&&!isValidHeaderName(t))o(parseHeaders(t),r);else if(utils$1.isObject(t)&&utils$1.isIterable(t)){let a={},c,l;for(const u of t){if(!utils$1.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[l=u[0]]=(c=a[l])?utils$1.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}o(a,r)}else t!=null&&i(r,t,s);return this}get(t,r){if(t=normalizeHeader(t),t){const s=utils$1.findKey(this,t);if(s){const n=this[s];if(!r)return n;if(r===!0)return parseTokens(n);if(utils$1.isFunction(r))return r.call(this,n,s);if(utils$1.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=normalizeHeader(t),t){const s=utils$1.findKey(this,t);return!!(s&&this[s]!==void 0&&(!r||matchHeaderValue(this,this[s],s,r)))}return!1}delete(t,r){const s=this;let n=!1;function i(o){if(o=normalizeHeader(o),o){const a=utils$1.findKey(s,o);a&&(!r||matchHeaderValue(s,s[a],a,r))&&(delete s[a],n=!0)}}return utils$1.isArray(t)?t.forEach(i):i(t),n}clear(t){const r=Object.keys(this);let s=r.length,n=!1;for(;s--;){const i=r[s];(!t||matchHeaderValue(this,this[i],i,t,!0))&&(delete this[i],n=!0)}return n}normalize(t){const r=this,s={};return utils$1.forEach(this,(n,i)=>{const o=utils$1.findKey(s,i);if(o){r[o]=normalizeValue(n),delete r[i];return}const a=t?formatHeader(i):String(i).trim();a!==i&&delete r[i],r[a]=normalizeValue(n),s[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return utils$1.forEach(this,(s,n)=>{s!=null&&s!==!1&&(r[n]=t&&utils$1.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const s=new this(t);return r.forEach(n=>s.set(n)),s}static accessor(t){const s=(this[$internals]=this[$internals]={accessors:{}}).accessors,n=this.prototype;function i(o){const a=normalizeHeader(o);s[a]||(buildAccessors(n,o),s[a]=!0)}return utils$1.isArray(t)?t.forEach(i):i(t),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders$1.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}});utils$1.freezeMethods(AxiosHeaders$1);function transformData(e,t){const r=this||defaults,s=t||r,n=AxiosHeaders$1.from(s.headers);let i=s.data;return utils$1.forEach(e,function(a){i=a.call(r,i,n.normalize(),t?t.status:void 0)}),n.normalize(),i}function isCancel$1(e){return!!(e&&e.__CANCEL__)}function CanceledError$1(e,t,r){AxiosError$1.call(this,e==null?"canceled":e,AxiosError$1.ERR_CANCELED,t,r),this.name="CanceledError"}utils$1.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});function settle(e,t,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?e(r):t(new AxiosError$1("Request failed with status code "+r.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const r=new Array(e),s=new Array(e);let n=0,i=0,o;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=s[i];o||(o=l),r[n]=c,s[n]=l;let f=i,m=0;for(;f!==n;)m+=r[f++],f=f%e;if(n=(n+1)%e,n===i&&(i=(i+1)%e),l-o{r=u,n=null,i&&(clearTimeout(i),i=null),e(...l)};return[(...l)=>{const u=Date.now(),f=u-r;f>=s?o(l,u):(n=l,i||(i=setTimeout(()=>{i=null,o(n)},s-f)))},()=>n&&o(n)]}const progressEventReducer=(e,t,r=3)=>{let s=0;const n=speedometer(50,250);return throttle(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,c=o-s,l=n(c),u=o<=a;s=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&u?(a-o)/l:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},r)},progressEventDecorator=(e,t)=>{const r=e!=null;return[s=>t[0]({lengthComputable:r,total:e,loaded:s}),t[1]]},asyncDecorator=e=>(...t)=>utils$1.asap(()=>e(...t)),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,platform.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,t,r,s,n,i){const o=[e+"="+encodeURIComponent(t)];utils$1.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),utils$1.isString(s)&&o.push("path="+s),utils$1.isString(n)&&o.push("domain="+n),i===!0&&o.push("secure"),document.cookie=o.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(){return 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,r){let s=!isAbsoluteURL(t);return e&&(s||r==!1)?combineURLs(e,t):t}const headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e;function mergeConfig$1(e,t){t=t||{};const r={};function s(l,u,f,m){return utils$1.isPlainObject(l)&&utils$1.isPlainObject(u)?utils$1.merge.call({caseless:m},l,u):utils$1.isPlainObject(u)?utils$1.merge({},u):utils$1.isArray(u)?u.slice():u}function n(l,u,f,m){if(utils$1.isUndefined(u)){if(!utils$1.isUndefined(l))return s(void 0,l,f,m)}else return s(l,u,f,m)}function i(l,u){if(!utils$1.isUndefined(u))return s(void 0,u)}function o(l,u){if(utils$1.isUndefined(u)){if(!utils$1.isUndefined(l))return s(void 0,l)}else return s(void 0,u)}function a(l,u,f){if(f in t)return s(l,u);if(f in e)return s(void 0,l)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,u,f)=>n(headersToObject(l),headersToObject(u),f,!0)};return utils$1.forEach(Object.keys({...e,...t}),function(u){const f=c[u]||n,m=f(e[u],t[u],u);utils$1.isUndefined(m)&&f!==a||(r[u]=m)}),r}const resolveConfig=e=>{const t=mergeConfig$1({},e);let{data:r,withXSRFToken:s,xsrfHeaderName:n,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=AxiosHeaders$1.from(o),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(utils$1.isFormData(r)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[l,...u]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...u].join("; "))}}if(platform.hasStandardBrowserEnv&&(s&&utils$1.isFunction(s)&&(s=s(t)),s||s!==!1&&isURLSameOrigin(t.url))){const l=n&&i&&cookies.read(i);l&&o.set(n,l)}return t},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(r,s){const n=resolveConfig(e);let i=n.data;const o=AxiosHeaders$1.from(n.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:l}=n,u,f,m,S,y;function T(){S&&S(),y&&y(),n.cancelToken&&n.cancelToken.unsubscribe(u),n.signal&&n.signal.removeEventListener("abort",u)}let _=new XMLHttpRequest;_.open(n.method.toUpperCase(),n.url,!0),_.timeout=n.timeout;function x(){if(!_)return;const M=AxiosHeaders$1.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:M,config:e,request:_};settle(function(j){r(j),T()},function(j){s(j),T()},E),_=null}"onloadend"in _?_.onloadend=x:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(x)},_.onabort=function(){_&&(s(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,_)),_=null)},_.onerror=function(){s(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let b=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const E=n.transitional||transitionalDefaults;n.timeoutErrorMessage&&(b=n.timeoutErrorMessage),s(new AxiosError$1(b,E.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,_)),_=null},i===void 0&&o.setContentType(null),"setRequestHeader"in _&&utils$1.forEach(o.toJSON(),function(b,E){_.setRequestHeader(E,b)}),utils$1.isUndefined(n.withCredentials)||(_.withCredentials=!!n.withCredentials),a&&a!=="json"&&(_.responseType=n.responseType),l&&([m,y]=progressEventReducer(l,!0),_.addEventListener("progress",m)),c&&_.upload&&([f,S]=progressEventReducer(c),_.upload.addEventListener("progress",f),_.upload.addEventListener("loadend",S)),(n.cancelToken||n.signal)&&(u=M=>{_&&(s(!M||M.type?new CanceledError$1(null,e,_):M),_.abort(),_=null)},n.cancelToken&&n.cancelToken.subscribe(u),n.signal&&(n.signal.aborted?u():n.signal.addEventListener("abort",u)));const D=parseProtocol(n.url);if(D&&platform.protocols.indexOf(D)===-1){s(new AxiosError$1("Unsupported protocol "+D+":",AxiosError$1.ERR_BAD_REQUEST,e));return}_.send(i||null)})},composeSignals=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let s=new AbortController,n;const i=function(l){if(!n){n=!0,a();const u=l instanceof Error?l:this.reason;s.abort(u instanceof AxiosError$1?u:new CanceledError$1(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new AxiosError$1("timeout ".concat(t," of ms exceeded"),AxiosError$1.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),e=null)};e.forEach(l=>l.addEventListener("abort",i));const{signal:c}=s;return c.unsubscribe=()=>utils$1.asap(a),c}},streamChunk=function*(e,t){let r=e.byteLength;if(r{const n=readBytes(e,t);let i=0,o,a=c=>{o||(o=!0,s&&s(c))};return new ReadableStream({async pull(c){try{const{done:l,value:u}=await n.next();if(l){a(),c.close();return}let f=u.byteLength;if(r){let m=i+=f;r(m)}c.enqueue(new Uint8Array(u))}catch(l){throw a(l),l}},cancel(c){return a(c),n.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),test=(e,...t)=>{try{return!!e(...t)}catch(r){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=64*1024,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$1.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(e=>e.body)};isFetchSupported&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!resolvers[t]&&(resolvers[t]=utils$1.isFunction(e[t])?r=>r[t]():(r,s)=>{throw new AxiosError$1("Response type '".concat(t,"' is not supported"),AxiosError$1.ERR_NOT_SUPPORT,s)})})})(new Response);const getBodyLength=async e=>{if(e==null)return 0;if(utils$1.isBlob(e))return e.size;if(utils$1.isSpecCompliantForm(e))return(await new Request(platform.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(e)||utils$1.isArrayBuffer(e))return e.byteLength;if(utils$1.isURLSearchParams(e)&&(e=e+""),utils$1.isString(e))return(await encodeText(e)).byteLength},resolveBodyLength=async(e,t)=>{const r=utils$1.toFiniteNumber(e.getContentLength());return r==null?getBodyLength(t):r},fetchAdapter=isFetchSupported&&(async e=>{let{url:t,method:r,data:s,signal:n,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:f="same-origin",fetchOptions:m}=resolveConfig(e);l=l?(l+"").toLowerCase():"text";let S=composeSignals([n,i&&i.toAbortSignal()],o),y;const T=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let _;try{if(c&&supportsRequestStream&&r!=="get"&&r!=="head"&&(_=await resolveBodyLength(u,s))!==0){let E=new Request(t,{method:"POST",body:s,duplex:"half"}),C;if(utils$1.isFormData(s)&&(C=E.headers.get("content-type"))&&u.setContentType(C),E.body){const[j,F]=progressEventDecorator(_,progressEventReducer(asyncDecorator(c)));s=trackStream(E.body,DEFAULT_CHUNK_SIZE,j,F)}}utils$1.isString(f)||(f=f?"include":"omit");const x="credentials"in Request.prototype;y=new Request(t,{...m,signal:S,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:s,duplex:"half",credentials:x?f:void 0});let D=await fetch(y,m);const M=supportsResponseStream&&(l==="stream"||l==="response");if(supportsResponseStream&&(a||M&&T)){const E={};["status","statusText","headers"].forEach(V=>{E[V]=D[V]});const C=utils$1.toFiniteNumber(D.headers.get("content-length")),[j,F]=a&&progressEventDecorator(C,progressEventReducer(asyncDecorator(a),!0))||[];D=new Response(trackStream(D.body,DEFAULT_CHUNK_SIZE,j,()=>{F&&F(),T&&T()}),E)}l=l||"text";let b=await resolvers[utils$1.findKey(resolvers,l)||"text"](D,e);return!M&&T&&T(),await new Promise((E,C)=>{settle(E,C,{data:b,headers:AxiosHeaders$1.from(D.headers),status:D.status,statusText:D.statusText,config:e,request:y})})}catch(x){throw T&&T(),x&&x.name==="TypeError"&&/Load failed|fetch/i.test(x.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,y),{cause:x.cause||x}):AxiosError$1.from(x,x&&x.code,e,y)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});const renderReason=e=>"- ".concat(e),isResolvedHandle=e=>utils$1.isFunction(e)||e===null||e===!1,adapters={getAdapter:e=>{e=utils$1.isArray(e)?e:[e];const{length:t}=e;let r,s;const n={};for(let i=0;i"adapter ".concat(a," ")+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?"since :\n"+i.map(renderReason).join("\n"):" "+renderReason(i[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},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){return throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e.adapter||defaults.adapter)(e).then(function(s){return throwIfCancellationRequested(e),s.data=transformData.call(e,e.transformResponse,s),s.headers=AxiosHeaders$1.from(s.headers),s},function(s){return isCancel$1(s)||(throwIfCancellationRequested(e),s&&s.response&&(s.response.data=transformData.call(e,e.transformResponse,s.response),s.response.headers=AxiosHeaders$1.from(s.response.headers))),Promise.reject(s)})}const VERSION$1="1.11.0",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{validators$1[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const deprecatedWarnings={};validators$1.transitional=function(t,r,s){function n(i,o){return"[Axios v"+VERSION$1+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,a)=>{if(t===!1)throw new AxiosError$1(n(o," has been removed"+(r?" in "+r:"")),AxiosError$1.ERR_DEPRECATED);return r&&!deprecatedWarnings[o]&&(deprecatedWarnings[o]=!0,console.warn(n(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,a):!0}};validators$1.spelling=function(t){return(r,s)=>(console.warn("".concat(s," is likely a misspelling of ").concat(t)),!0)};function assertOptions(e,t,r){if(typeof e!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let n=s.length;for(;n-- >0;){const i=s[n],o=t[i];if(o){const a=e[i],c=a===void 0||o(a,i,e);if(c!==!0)throw new AxiosError$1("option "+i+" must be "+c,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new AxiosError$1("Unknown option "+i,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(t){this.defaults=t||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(t,r){try{return await this._request(t,r)}catch(s){if(s instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const i=n.stack?n.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+="\n"+i):s.stack=i}catch(o){}}throw s}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=mergeConfig$1(this.defaults,r);const{transitional:s,paramsSerializer:n,headers:i}=r;s!==void 0&&validator.assertOptions(s,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),n!=null&&(utils$1.isFunction(n)?r.paramsSerializer={serialize:n}:validator.assertOptions(n,{encode:validators.function,serialize:validators.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),validator.assertOptions(r,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&utils$1.merge(i.common,i[r.method]);i&&utils$1.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),r.headers=AxiosHeaders$1.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(T){typeof T.runWhen=="function"&&T.runWhen(r)===!1||(c=c&&T.synchronous,a.unshift(T.fulfilled,T.rejected))});const l=[];this.interceptors.response.forEach(function(T){l.push(T.fulfilled,T.rejected)});let u,f=0,m;if(!c){const y=[dispatchRequest.bind(this),void 0];for(y.unshift(...a),y.push(...l),m=y.length,u=Promise.resolve(r);f{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](n);s._listeners=null}),this.promise.then=n=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(n);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,a){s.reason||(s.reason=new CanceledError$1(i,o,a),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=s=>{t.abort(s)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Fe(function(n){t=n}),cancel:t}}};function spread$1(e){return function(r){return e.apply(null,r)}}function isAxiosError$1(e){return utils$1.isObject(e)&&e.isAxiosError===!0}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};Object.entries(HttpStatusCode$1).forEach(([e,t])=>{HttpStatusCode$1[t]=e});function createInstance(e){const t=new Axios$1(e),r=bind(Axios$1.prototype.request,t);return utils$1.extend(r,Axios$1.prototype,t,{allOwnKeys:!0}),utils$1.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return createInstance(mergeConfig$1(e,n))},r}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(t){return Promise.all(t)};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,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,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=(e=inject("app"),t)=>{var i;if(!e)throw new Error("useDsl must be used after MagicApp is created");const r=t?e.pageFragments.get(t):null,s=ref(t?r==null?void 0:r.data:(i=e.page)==null?void 0:i.data);t?e.on("dsl-change",()=>{s.value=r==null?void 0:r.data}):e.on("page-change",()=>{var o;s.value=(o=e.page)==null?void 0:o.data});const n=(o,a,c,l)=>{var u;if(!(!o.length||t&&(r==null?void 0:r.data.id)!==l||!t&&((u=e.page)==null?void 0:u.data.id)!==l)){for(const f of o)isPage(f)&&!t&&f.id===l||isPageFragment(f)&&t?s.value=f:replaceChildNode(reactive(f),[s.value]);nextTick(()=>{e.emit("replaced-node",{nodes:o,sourceId:a,...c})})}};return e.dataSourceManager&&(e.dataSourceManager.on("update-data",n),onBeforeUnmount(()=>{e.dataSourceManager.off("update-data",n)})),{app:e,pageConfig:s}};function useComponent(e=""){let t,r,s;return typeof e=="string"?t=e:{componentType:t,app:r}=e,(!t||t==="")&&(t="container"),r||(r=inject("app")),s=r==null?void 0:r.resolveComponent(t),!s&&!t.startsWith("magic-ui-")&&(t="magic-ui-".concat(toLine(t)),s=r==null?void 0:r.resolveComponent(t)),s!=null?s:t}const _sfc_main=defineComponent({__name:"App",setup(e){const{pageConfig:t}=useDsl(),r=useComponent("page");return(s,n)=>(openBlock(),createBlock(resolveDynamicComponent(unref(r)),{config:unref(t)},null,8,["config"]))}}),getLocalConfig=()=>{const configStr=localStorage.getItem("magicDSL");if(!configStr)return[];try{return[eval("(".concat(configStr,")"))]}catch(e){return console.error("Error parsing localStorage magicDSL:",e),[]}};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:!!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})});vueApp.provide("userRender",({h:e,type:t,props:r={},attrs:s={},style:n,className:i,on:o,directives:a=[]})=>{const c={...r,...s,style:n,class:i};if(o)for(const[l,u]of Object.entries(o))c["on".concat(l[0].toLocaleUpperCase()).concat(l.substring(1))]=u;return a.length?withDirectives(e(t,c),a.map(l=>[resolveDirective(l.name),l.value,l.modifiers])):e(t,c)});registerDataSourceOnDemand(dsl,datasources).then(e=>{Object.entries(e).forEach(([t,r])=>{DataSourceManager.register(t,r)}),vueApp.config.globalProperties.app=app,vueApp.provide("app",app),vueApp.mount("#app")});export{toLine as A,useDsl as B,COMMON_EVENT_PREFIX as C,DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX as D,getDefaultExportFromCjs as E,Fragment as F,isDslNode as G,onMounted as H,IS_DSL_NODE_KEY as I,NodeType as N,PAGE_FRAGMENT_CONTAINER_ID_KEY as P,__vite_legacy_guard,createTextVNode as a,resolveComponent as b,createElementBlock as c,defineComponent as d,renderList as e,createBlock as f,normalizeStyle as g,h,inject as i,resolveDynamicComponent as j,computed as k,ref as l,onBeforeUnmount as m,normalizeClass as n,openBlock as o,provide as p,createCommentVNode as q,renderSlot as r,withCtx as s,toDisplayString as t,useComponent as u,nextTick as v,watch as w,watchEffect as x,shallowReactive as y,onScopeDispose as z}; //# sourceMappingURL=index-DGi0-hAa.js.map