diff --git a/javascript/main.entry.js b/javascript/main.entry.js index f81d0ec..796c184 100644 --- a/javascript/main.entry.js +++ b/javascript/main.entry.js @@ -1,4 +1,4 @@ -(function(_n){typeof define=="function"&&define.amd?define(_n):_n()})(function(){"use strict";var fc=Object.defineProperty;var pc=(_n,Cn,$n)=>Cn in _n?fc(_n,Cn,{enumerable:!0,configurable:!0,writable:!0,value:$n}):_n[Cn]=$n;var wl=(_n,Cn,$n)=>(pc(_n,typeof Cn!="symbol"?Cn+"":Cn,$n),$n);/** +(function(_n){typeof define=="function"&&define.amd?define(_n):_n()})(function(){"use strict";var fc=Object.defineProperty;var pc=(_n,Cn,$n)=>Cn in _n?fc(_n,Cn,{enumerable:!0,configurable:!0,writable:!0,value:$n}):_n[Cn]=$n;var Tl=(_n,Cn,$n)=>(pc(_n,typeof Cn!="symbol"?Cn+"":Cn,$n),$n);/** * @vue/shared v3.4.19 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT @@ -13,7 +13,7 @@ **/const stack=[];function warn$1(_n,...Cn){pauseTracking();const $n=stack.length?stack[stack.length-1].component:null,Nn=$n&&$n.appContext.config.warnHandler,Bn=getComponentTrace();if(Nn)callWithErrorHandling(Nn,$n,11,[_n+Cn.join(""),$n&&$n.proxy,Bn.map(({vnode:Ln})=>`at <${formatComponentName($n,Ln.type)}>`).join(` `),Bn]);else{const Ln=[`[Vue warn]: ${_n}`,...Cn];Bn.length&&Ln.push(` `,...formatTrace(Bn)),console.warn(...Ln)}resetTracking()}function getComponentTrace(){let _n=stack[stack.length-1];if(!_n)return[];const Cn=[];for(;_n;){const $n=Cn[0];$n&&$n.vnode===_n?$n.recurseCount++:Cn.push({vnode:_n,recurseCount:0});const Nn=_n.component&&_n.component.parent;_n=Nn&&Nn.vnode}return Cn}function formatTrace(_n){const Cn=[];return _n.forEach(($n,Nn)=>{Cn.push(...Nn===0?[]:[` -`],...formatTraceEntry($n))}),Cn}function formatTraceEntry({vnode:_n,recurseCount:Cn}){const $n=Cn>0?`... (${Cn} recursive calls)`:"",Nn=_n.component?_n.component.parent==null:!1,Bn=` at <${formatComponentName(_n.component,_n.type,Nn)}`,Ln=">"+$n;return _n.props?[Bn,...formatProps(_n.props),Ln]:[Bn+Ln]}function formatProps(_n){const Cn=[],$n=Object.keys(_n);return $n.slice(0,3).forEach(Nn=>{Cn.push(...formatProp(Nn,_n[Nn]))}),$n.length>3&&Cn.push(" ..."),Cn}function formatProp(_n,Cn,$n){return isString$1(Cn)?(Cn=JSON.stringify(Cn),$n?Cn:[`${_n}=${Cn}`]):typeof Cn=="number"||typeof Cn=="boolean"||Cn==null?$n?Cn:[`${_n}=${Cn}`]:isRef(Cn)?(Cn=formatProp(_n,toRaw(Cn.value),!0),$n?Cn:[`${_n}=Ref<`,Cn,">"]):isFunction$2(Cn)?[`${_n}=fn${Cn.name?`<${Cn.name}>`:""}`]:(Cn=toRaw(Cn),$n?Cn:[`${_n}=`,Cn])}function callWithErrorHandling(_n,Cn,$n,Nn){try{return Nn?_n(...Nn):_n()}catch(Bn){handleError(Bn,Cn,$n)}}function callWithAsyncErrorHandling(_n,Cn,$n,Nn){if(isFunction$2(_n)){const Ln=callWithErrorHandling(_n,Cn,$n,Nn);return Ln&&isPromise(Ln)&&Ln.catch(In=>{handleError(In,Cn,$n)}),Ln}const Bn=[];for(let Ln=0;Ln<_n.length;Ln++)Bn.push(callWithAsyncErrorHandling(_n[Ln],Cn,$n,Nn));return Bn}function handleError(_n,Cn,$n,Nn=!0){const Bn=Cn?Cn.vnode:null;if(Cn){let Ln=Cn.parent;const In=Cn.proxy,Pn=`https://vuejs.org/error-reference/#runtime-${$n}`;for(;Ln;){const Wn=Ln.ec;if(Wn){for(let Hn=0;Hn>>1,Bn=queue[Nn],Ln=getId(Bn);Ln<_n||Ln===_n&&Bn.pre?Cn=Nn+1:$n=Nn}return Cn}function queueJob(_n){(!queue.length||!queue.includes(_n,isFlushing&&_n.allowRecurse?flushIndex+1:flushIndex))&&(_n.id==null?queue.push(_n):queue.splice(findInsertionIndex(_n.id),0,_n),queueFlush())}function queueFlush(){!isFlushing&&!isFlushPending&&(isFlushPending=!0,currentFlushPromise=resolvedPromise.then(flushJobs))}function invalidateJob(_n){const Cn=queue.indexOf(_n);Cn>flushIndex&&queue.splice(Cn,1)}function queuePostFlushCb(_n){isArray$3(_n)?pendingPostFlushCbs.push(..._n):(!activePostFlushCbs||!activePostFlushCbs.includes(_n,_n.allowRecurse?postFlushIndex+1:postFlushIndex))&&pendingPostFlushCbs.push(_n),queueFlush()}function flushPreFlushCbs(_n,Cn,$n=isFlushing?flushIndex+1:0){for(;$ngetId($n)-getId(Nn));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...Cn);return}for(activePostFlushCbs=Cn,postFlushIndex=0;postFlushIndex_n.id==null?1/0:_n.id,comparator=(_n,Cn)=>{const $n=getId(_n)-getId(Cn);if($n===0){if(_n.pre&&!Cn.pre)return-1;if(Cn.pre&&!_n.pre)return 1}return $n};function flushJobs(_n){isFlushPending=!1,isFlushing=!0,queue.sort(comparator);const Cn=NOOP;try{for(flushIndex=0;flushIndexisString$1(rr)?rr.trim():rr)),Yn&&(Bn=$n.map(looseToNumber))}let Pn,Dn=Nn[Pn=toHandlerKey(Cn)]||Nn[Pn=toHandlerKey(camelize(Cn))];!Dn&&Ln&&(Dn=Nn[Pn=toHandlerKey(hyphenate(Cn))]),Dn&&callWithAsyncErrorHandling(Dn,_n,6,Bn);const Wn=Nn[Pn+"Once"];if(Wn){if(!_n.emitted)_n.emitted={};else if(_n.emitted[Pn])return;_n.emitted[Pn]=!0,callWithAsyncErrorHandling(Wn,_n,6,Bn)}}function normalizeEmitsOptions(_n,Cn,$n=!1){const Nn=Cn.emitsCache,Bn=Nn.get(_n);if(Bn!==void 0)return Bn;const Ln=_n.emits;let In={},Pn=!1;if(!isFunction$2(_n)){const Dn=Wn=>{const Hn=normalizeEmitsOptions(Wn,Cn,!0);Hn&&(Pn=!0,extend$3(In,Hn))};!$n&&Cn.mixins.length&&Cn.mixins.forEach(Dn),_n.extends&&Dn(_n.extends),_n.mixins&&_n.mixins.forEach(Dn)}return!Ln&&!Pn?(isObject$5(_n)&&Nn.set(_n,null),null):(isArray$3(Ln)?Ln.forEach(Dn=>In[Dn]=null):extend$3(In,Ln),isObject$5(_n)&&Nn.set(_n,In),In)}function isEmitListener(_n,Cn){return!_n||!isOn(Cn)?!1:(Cn=Cn.slice(2).replace(/Once$/,""),hasOwn(_n,Cn[0].toLowerCase()+Cn.slice(1))||hasOwn(_n,hyphenate(Cn))||hasOwn(_n,Cn))}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(_n){const Cn=currentRenderingInstance;return currentRenderingInstance=_n,currentScopeId=_n&&_n.type.__scopeId||null,Cn}function pushScopeId(_n){currentScopeId=_n}function popScopeId(){currentScopeId=null}function withCtx(_n,Cn=currentRenderingInstance,$n){if(!Cn||_n._n)return _n;const Nn=(...Bn)=>{Nn._d&&setBlockTracking(-1);const Ln=setCurrentRenderingInstance(Cn);let In;try{In=_n(...Bn)}finally{setCurrentRenderingInstance(Ln),Nn._d&&setBlockTracking(1)}return In};return Nn._n=!0,Nn._c=!0,Nn._d=!0,Nn}function markAttrsAccessed(){}function renderComponentRoot(_n){const{type:Cn,vnode:$n,proxy:Nn,withProxy:Bn,props:Ln,propsOptions:[In],slots:Pn,attrs:Dn,emit:Wn,render:Hn,renderCache:Yn,data:Gn,setupState:rr,ctx:nr,inheritAttrs:Yo}=_n;let Zo,ei;const li=setCurrentRenderingInstance(_n);try{if($n.shapeFlag&4){const Xo=Bn||Nn,hi=Xo;Zo=normalizeVNode(Hn.call(hi,Xo,Yn,Ln,rr,Gn,nr)),ei=Dn}else{const Xo=Cn;Zo=normalizeVNode(Xo.length>1?Xo(Ln,{attrs:Dn,slots:Pn,emit:Wn}):Xo(Ln,null)),ei=Cn.props?Dn:getFunctionalFallthrough(Dn)}}catch(Xo){blockStack.length=0,handleError(Xo,_n,1),Zo=createVNode(Comment)}let vi=Zo;if(ei&&Yo!==!1){const Xo=Object.keys(ei),{shapeFlag:hi}=vi;Xo.length&&hi&7&&(In&&Xo.some(isModelListener)&&(ei=filterModelListeners(ei,In)),vi=cloneVNode(vi,ei))}return $n.dirs&&(vi=cloneVNode(vi),vi.dirs=vi.dirs?vi.dirs.concat($n.dirs):$n.dirs),$n.transition&&(vi.transition=$n.transition),Zo=vi,setCurrentRenderingInstance(li),Zo}const getFunctionalFallthrough=_n=>{let Cn;for(const $n in _n)($n==="class"||$n==="style"||isOn($n))&&((Cn||(Cn={}))[$n]=_n[$n]);return Cn},filterModelListeners=(_n,Cn)=>{const $n={};for(const Nn in _n)(!isModelListener(Nn)||!(Nn.slice(9)in Cn))&&($n[Nn]=_n[Nn]);return $n};function shouldUpdateComponent(_n,Cn,$n){const{props:Nn,children:Bn,component:Ln}=_n,{props:In,children:Pn,patchFlag:Dn}=Cn,Wn=Ln.emitsOptions;if(Cn.dirs||Cn.transition)return!0;if($n&&Dn>=0){if(Dn&1024)return!0;if(Dn&16)return Nn?hasPropsChanged(Nn,In,Wn):!!In;if(Dn&8){const Hn=Cn.dynamicProps;for(let Yn=0;Yn_n.__isSuspense;function queueEffectWithSuspense(_n,Cn){Cn&&Cn.pendingBranch?isArray$3(_n)?Cn.effects.push(..._n):Cn.effects.push(_n):queuePostFlushCb(_n)}const ssrContextKey=Symbol.for("v-scx"),useSSRContext=()=>inject(ssrContextKey),INITIAL_WATCHER_VALUE={};function watch(_n,Cn,$n){return doWatch(_n,Cn,$n)}function doWatch(_n,Cn,{immediate:$n,deep:Nn,flush:Bn,once:Ln,onTrack:In,onTrigger:Pn}=EMPTY_OBJ){if(Cn&&Ln){const mi=Cn;Cn=(...zn)=>{mi(...zn),hi()}}const Dn=currentInstance,Wn=mi=>Nn===!0?mi:traverse(mi,Nn===!1?1:void 0);let Hn,Yn=!1,Gn=!1;if(isRef(_n)?(Hn=()=>_n.value,Yn=isShallow(_n)):isReactive(_n)?(Hn=()=>Wn(_n),Yn=!0):isArray$3(_n)?(Gn=!0,Yn=_n.some(mi=>isReactive(mi)||isShallow(mi)),Hn=()=>_n.map(mi=>{if(isRef(mi))return mi.value;if(isReactive(mi))return Wn(mi);if(isFunction$2(mi))return callWithErrorHandling(mi,Dn,2)})):isFunction$2(_n)?Cn?Hn=()=>callWithErrorHandling(_n,Dn,2):Hn=()=>(rr&&rr(),callWithAsyncErrorHandling(_n,Dn,3,[nr])):Hn=NOOP,Cn&&Nn){const mi=Hn;Hn=()=>traverse(mi())}let rr,nr=mi=>{rr=vi.onStop=()=>{callWithErrorHandling(mi,Dn,4),rr=vi.onStop=void 0}},Yo;if(isInSSRComponentSetup)if(nr=NOOP,Cn?$n&&callWithAsyncErrorHandling(Cn,Dn,3,[Hn(),Gn?[]:void 0,nr]):Hn(),Bn==="sync"){const mi=useSSRContext();Yo=mi.__watcherHandles||(mi.__watcherHandles=[])}else return NOOP;let Zo=Gn?new Array(_n.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const ei=()=>{if(!(!vi.active||!vi.dirty))if(Cn){const mi=vi.run();(Nn||Yn||(Gn?mi.some((zn,oi)=>hasChanged(zn,Zo[oi])):hasChanged(mi,Zo)))&&(rr&&rr(),callWithAsyncErrorHandling(Cn,Dn,3,[mi,Zo===INITIAL_WATCHER_VALUE?void 0:Gn&&Zo[0]===INITIAL_WATCHER_VALUE?[]:Zo,nr]),Zo=mi)}else vi.run()};ei.allowRecurse=!!Cn;let li;Bn==="sync"?li=ei:Bn==="post"?li=()=>queuePostRenderEffect(ei,Dn&&Dn.suspense):(ei.pre=!0,Dn&&(ei.id=Dn.uid),li=()=>queueJob(ei));const vi=new ReactiveEffect(Hn,NOOP,li),Xo=getCurrentScope(),hi=()=>{vi.stop(),Xo&&remove(Xo.effects,vi)};return Cn?$n?ei():Zo=vi.run():Bn==="post"?queuePostRenderEffect(vi.run.bind(vi),Dn&&Dn.suspense):vi.run(),Yo&&Yo.push(hi),hi}function instanceWatch(_n,Cn,$n){const Nn=this.proxy,Bn=isString$1(_n)?_n.includes(".")?createPathGetter(Nn,_n):()=>Nn[_n]:_n.bind(Nn,Nn);let Ln;isFunction$2(Cn)?Ln=Cn:(Ln=Cn.handler,$n=Cn);const In=setCurrentInstance(this),Pn=doWatch(Bn,Ln.bind(Nn),$n);return In(),Pn}function createPathGetter(_n,Cn){const $n=Cn.split(".");return()=>{let Nn=_n;for(let Bn=0;Bn<$n.length&&Nn;Bn++)Nn=Nn[$n[Bn]];return Nn}}function traverse(_n,Cn,$n=0,Nn){if(!isObject$5(_n)||_n.__v_skip)return _n;if(Cn&&Cn>0){if($n>=Cn)return _n;$n++}if(Nn=Nn||new Set,Nn.has(_n))return _n;if(Nn.add(_n),isRef(_n))traverse(_n.value,Cn,$n,Nn);else if(isArray$3(_n))for(let Bn=0;Bn<_n.length;Bn++)traverse(_n[Bn],Cn,$n,Nn);else if(isSet(_n)||isMap(_n))_n.forEach(Bn=>{traverse(Bn,Cn,$n,Nn)});else if(isPlainObject$3(_n))for(const Bn in _n)traverse(_n[Bn],Cn,$n,Nn);return _n}function withDirectives(_n,Cn){if(currentRenderingInstance===null)return _n;const $n=getExposeProxy(currentRenderingInstance)||currentRenderingInstance.proxy,Nn=_n.dirs||(_n.dirs=[]);for(let Bn=0;Bn{_n.isMounted=!0}),onBeforeUnmount(()=>{_n.isUnmounting=!0}),_n}const TransitionHookValidator=[Function,Array],BaseTransitionPropsValidators={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},BaseTransitionImpl={name:"BaseTransition",props:BaseTransitionPropsValidators,setup(_n,{slots:Cn}){const $n=getCurrentInstance(),Nn=useTransitionState();let Bn;return()=>{const Ln=Cn.default&&getTransitionRawChildren(Cn.default(),!0);if(!Ln||!Ln.length)return;let In=Ln[0];if(Ln.length>1){for(const Yo of Ln)if(Yo.type!==Comment){In=Yo;break}}const Pn=toRaw(_n),{mode:Dn}=Pn;if(Nn.isLeaving)return emptyPlaceholder(In);const Wn=getKeepAliveChild(In);if(!Wn)return emptyPlaceholder(In);const Hn=resolveTransitionHooks(Wn,Pn,Nn,$n);setTransitionHooks(Wn,Hn);const Yn=$n.subTree,Gn=Yn&&getKeepAliveChild(Yn);let rr=!1;const{getTransitionKey:nr}=Wn.type;if(nr){const Yo=nr();Bn===void 0?Bn=Yo:Yo!==Bn&&(Bn=Yo,rr=!0)}if(Gn&&Gn.type!==Comment&&(!isSameVNodeType(Wn,Gn)||rr)){const Yo=resolveTransitionHooks(Gn,Pn,Nn,$n);if(setTransitionHooks(Gn,Yo),Dn==="out-in")return Nn.isLeaving=!0,Yo.afterLeave=()=>{Nn.isLeaving=!1,$n.update.active!==!1&&($n.effect.dirty=!0,$n.update())},emptyPlaceholder(In);Dn==="in-out"&&Wn.type!==Comment&&(Yo.delayLeave=(Zo,ei,li)=>{const vi=getLeavingNodesForType(Nn,Gn);vi[String(Gn.key)]=Gn,Zo[leaveCbKey]=()=>{ei(),Zo[leaveCbKey]=void 0,delete Hn.delayedLeave},Hn.delayedLeave=li})}return In}}},BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(_n,Cn){const{leavingVNodes:$n}=_n;let Nn=$n.get(Cn.type);return Nn||(Nn=Object.create(null),$n.set(Cn.type,Nn)),Nn}function resolveTransitionHooks(_n,Cn,$n,Nn){const{appear:Bn,mode:Ln,persisted:In=!1,onBeforeEnter:Pn,onEnter:Dn,onAfterEnter:Wn,onEnterCancelled:Hn,onBeforeLeave:Yn,onLeave:Gn,onAfterLeave:rr,onLeaveCancelled:nr,onBeforeAppear:Yo,onAppear:Zo,onAfterAppear:ei,onAppearCancelled:li}=Cn,vi=String(_n.key),Xo=getLeavingNodesForType($n,_n),hi=(oi,Jo)=>{oi&&callWithAsyncErrorHandling(oi,Nn,9,Jo)},mi=(oi,Jo)=>{const ni=Jo[1];hi(oi,Jo),isArray$3(oi)?oi.every(si=>si.length<=1)&&ni():oi.length<=1&&ni()},zn={mode:Ln,persisted:In,beforeEnter(oi){let Jo=Pn;if(!$n.isMounted)if(Bn)Jo=Yo||Pn;else return;oi[leaveCbKey]&&oi[leaveCbKey](!0);const ni=Xo[vi];ni&&isSameVNodeType(_n,ni)&&ni.el[leaveCbKey]&&ni.el[leaveCbKey](),hi(Jo,[oi])},enter(oi){let Jo=Dn,ni=Wn,si=Hn;if(!$n.isMounted)if(Bn)Jo=Zo||Dn,ni=ei||Wn,si=li||Hn;else return;let pi=!1;const di=oi[enterCbKey]=Li=>{pi||(pi=!0,Li?hi(si,[oi]):hi(ni,[oi]),zn.delayedLeave&&zn.delayedLeave(),oi[enterCbKey]=void 0)};Jo?mi(Jo,[oi,di]):di()},leave(oi,Jo){const ni=String(_n.key);if(oi[enterCbKey]&&oi[enterCbKey](!0),$n.isUnmounting)return Jo();hi(Yn,[oi]);let si=!1;const pi=oi[leaveCbKey]=di=>{si||(si=!0,Jo(),di?hi(nr,[oi]):hi(rr,[oi]),oi[leaveCbKey]=void 0,Xo[ni]===_n&&delete Xo[ni])};Xo[ni]=_n,Gn?mi(Gn,[oi,pi]):pi()},clone(oi){return resolveTransitionHooks(oi,Cn,$n,Nn)}};return zn}function emptyPlaceholder(_n){if(isKeepAlive(_n))return _n=cloneVNode(_n),_n.children=null,_n}function getKeepAliveChild(_n){return isKeepAlive(_n)?_n.children?_n.children[0]:void 0:_n}function setTransitionHooks(_n,Cn){_n.shapeFlag&6&&_n.component?setTransitionHooks(_n.component.subTree,Cn):_n.shapeFlag&128?(_n.ssContent.transition=Cn.clone(_n.ssContent),_n.ssFallback.transition=Cn.clone(_n.ssFallback)):_n.transition=Cn}function getTransitionRawChildren(_n,Cn=!1,$n){let Nn=[],Bn=0;for(let Ln=0;Ln<_n.length;Ln++){let In=_n[Ln];const Pn=$n==null?In.key:String($n)+String(In.key!=null?In.key:Ln);In.type===Fragment?(In.patchFlag&128&&Bn++,Nn=Nn.concat(getTransitionRawChildren(In.children,Cn,Pn))):(Cn||In.type!==Comment)&&Nn.push(Pn!=null?cloneVNode(In,{key:Pn}):In)}if(Bn>1)for(let Ln=0;Lnextend$3({name:_n.name},Cn,{setup:_n}))():_n}const isAsyncWrapper=_n=>!!_n.type.__asyncLoader,isKeepAlive=_n=>_n.type.__isKeepAlive;function onActivated(_n,Cn){registerKeepAliveHook(_n,"a",Cn)}function onDeactivated(_n,Cn){registerKeepAliveHook(_n,"da",Cn)}function registerKeepAliveHook(_n,Cn,$n=currentInstance){const Nn=_n.__wdc||(_n.__wdc=()=>{let Bn=$n;for(;Bn;){if(Bn.isDeactivated)return;Bn=Bn.parent}return _n()});if(injectHook(Cn,Nn,$n),$n){let Bn=$n.parent;for(;Bn&&Bn.parent;)isKeepAlive(Bn.parent.vnode)&&injectToKeepAliveRoot(Nn,Cn,$n,Bn),Bn=Bn.parent}}function injectToKeepAliveRoot(_n,Cn,$n,Nn){const Bn=injectHook(Cn,_n,Nn,!0);onUnmounted(()=>{remove(Nn[Cn],Bn)},$n)}function injectHook(_n,Cn,$n=currentInstance,Nn=!1){if($n){const Bn=$n[_n]||($n[_n]=[]),Ln=Cn.__weh||(Cn.__weh=(...In)=>{if($n.isUnmounted)return;pauseTracking();const Pn=setCurrentInstance($n),Dn=callWithAsyncErrorHandling(Cn,$n,_n,In);return Pn(),resetTracking(),Dn});return Nn?Bn.unshift(Ln):Bn.push(Ln),Ln}}const createHook=_n=>(Cn,$n=currentInstance)=>(!isInSSRComponentSetup||_n==="sp")&&injectHook(_n,(...Nn)=>Cn(...Nn),$n),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(_n,Cn=currentInstance){injectHook("ec",_n,Cn)}function renderList(_n,Cn,$n,Nn){let Bn;const Ln=$n&&$n[Nn];if(isArray$3(_n)||isString$1(_n)){Bn=new Array(_n.length);for(let In=0,Pn=_n.length;InCn(In,Pn,void 0,Ln&&Ln[Pn]));else{const In=Object.keys(_n);Bn=new Array(In.length);for(let Pn=0,Dn=In.length;PnisVNode(Cn)?!(Cn.type===Comment||Cn.type===Fragment&&!ensureValidVNode(Cn.children)):!0)?_n:null}const getPublicInstance=_n=>_n?isStatefulComponent(_n)?getExposeProxy(_n)||_n.proxy:getPublicInstance(_n.parent):null,publicPropertiesMap=extend$3(Object.create(null),{$:_n=>_n,$el:_n=>_n.vnode.el,$data:_n=>_n.data,$props:_n=>_n.props,$attrs:_n=>_n.attrs,$slots:_n=>_n.slots,$refs:_n=>_n.refs,$parent:_n=>getPublicInstance(_n.parent),$root:_n=>getPublicInstance(_n.root),$emit:_n=>_n.emit,$options:_n=>resolveMergedOptions(_n),$forceUpdate:_n=>_n.f||(_n.f=()=>{_n.effect.dirty=!0,queueJob(_n.update)}),$nextTick:_n=>_n.n||(_n.n=nextTick.bind(_n.proxy)),$watch:_n=>instanceWatch.bind(_n)}),hasSetupBinding=(_n,Cn)=>_n!==EMPTY_OBJ&&!_n.__isScriptSetup&&hasOwn(_n,Cn),PublicInstanceProxyHandlers={get({_:_n},Cn){const{ctx:$n,setupState:Nn,data:Bn,props:Ln,accessCache:In,type:Pn,appContext:Dn}=_n;let Wn;if(Cn[0]!=="$"){const rr=In[Cn];if(rr!==void 0)switch(rr){case 1:return Nn[Cn];case 2:return Bn[Cn];case 4:return $n[Cn];case 3:return Ln[Cn]}else{if(hasSetupBinding(Nn,Cn))return In[Cn]=1,Nn[Cn];if(Bn!==EMPTY_OBJ&&hasOwn(Bn,Cn))return In[Cn]=2,Bn[Cn];if((Wn=_n.propsOptions[0])&&hasOwn(Wn,Cn))return In[Cn]=3,Ln[Cn];if($n!==EMPTY_OBJ&&hasOwn($n,Cn))return In[Cn]=4,$n[Cn];shouldCacheAccess&&(In[Cn]=0)}}const Hn=publicPropertiesMap[Cn];let Yn,Gn;if(Hn)return Cn==="$attrs"&&track(_n,"get",Cn),Hn(_n);if((Yn=Pn.__cssModules)&&(Yn=Yn[Cn]))return Yn;if($n!==EMPTY_OBJ&&hasOwn($n,Cn))return In[Cn]=4,$n[Cn];if(Gn=Dn.config.globalProperties,hasOwn(Gn,Cn))return Gn[Cn]},set({_:_n},Cn,$n){const{data:Nn,setupState:Bn,ctx:Ln}=_n;return hasSetupBinding(Bn,Cn)?(Bn[Cn]=$n,!0):Nn!==EMPTY_OBJ&&hasOwn(Nn,Cn)?(Nn[Cn]=$n,!0):hasOwn(_n.props,Cn)||Cn[0]==="$"&&Cn.slice(1)in _n?!1:(Ln[Cn]=$n,!0)},has({_:{data:_n,setupState:Cn,accessCache:$n,ctx:Nn,appContext:Bn,propsOptions:Ln}},In){let Pn;return!!$n[In]||_n!==EMPTY_OBJ&&hasOwn(_n,In)||hasSetupBinding(Cn,In)||(Pn=Ln[0])&&hasOwn(Pn,In)||hasOwn(Nn,In)||hasOwn(publicPropertiesMap,In)||hasOwn(Bn.config.globalProperties,In)},defineProperty(_n,Cn,$n){return $n.get!=null?_n._.accessCache[Cn]=0:hasOwn($n,"value")&&this.set(_n,Cn,$n.value,null),Reflect.defineProperty(_n,Cn,$n)}};function normalizePropsOrEmits(_n){return isArray$3(_n)?_n.reduce((Cn,$n)=>(Cn[$n]=null,Cn),{}):_n}let shouldCacheAccess=!0;function applyOptions(_n){const Cn=resolveMergedOptions(_n),$n=_n.proxy,Nn=_n.ctx;shouldCacheAccess=!1,Cn.beforeCreate&&callHook$1(Cn.beforeCreate,_n,"bc");const{data:Bn,computed:Ln,methods:In,watch:Pn,provide:Dn,inject:Wn,created:Hn,beforeMount:Yn,mounted:Gn,beforeUpdate:rr,updated:nr,activated:Yo,deactivated:Zo,beforeDestroy:ei,beforeUnmount:li,destroyed:vi,unmounted:Xo,render:hi,renderTracked:mi,renderTriggered:zn,errorCaptured:oi,serverPrefetch:Jo,expose:ni,inheritAttrs:si,components:pi,directives:di,filters:Li}=Cn;if(Wn&&resolveInjections(Wn,Nn,null),In)for(const gi in In){const $i=In[gi];isFunction$2($i)&&(Nn[gi]=$i.bind($n))}if(Bn){const gi=Bn.call($n,$n);isObject$5(gi)&&(_n.data=reactive(gi))}if(shouldCacheAccess=!0,Ln)for(const gi in Ln){const $i=Ln[gi],Ii=isFunction$2($i)?$i.bind($n,$n):isFunction$2($i.get)?$i.get.bind($n,$n):NOOP,sa=!isFunction$2($i)&&isFunction$2($i.set)?$i.set.bind($n):NOOP,la=computed({get:Ii,set:sa});Object.defineProperty(Nn,gi,{enumerable:!0,configurable:!0,get:()=>la.value,set:xi=>la.value=xi})}if(Pn)for(const gi in Pn)createWatcher(Pn[gi],Nn,$n,gi);if(Dn){const gi=isFunction$2(Dn)?Dn.call($n):Dn;Reflect.ownKeys(gi).forEach($i=>{provide($i,gi[$i])})}Hn&&callHook$1(Hn,_n,"c");function Ki(gi,$i){isArray$3($i)?$i.forEach(Ii=>gi(Ii.bind($n))):$i&&gi($i.bind($n))}if(Ki(onBeforeMount,Yn),Ki(onMounted,Gn),Ki(onBeforeUpdate,rr),Ki(onUpdated,nr),Ki(onActivated,Yo),Ki(onDeactivated,Zo),Ki(onErrorCaptured,oi),Ki(onRenderTracked,mi),Ki(onRenderTriggered,zn),Ki(onBeforeUnmount,li),Ki(onUnmounted,Xo),Ki(onServerPrefetch,Jo),isArray$3(ni))if(ni.length){const gi=_n.exposed||(_n.exposed={});ni.forEach($i=>{Object.defineProperty(gi,$i,{get:()=>$n[$i],set:Ii=>$n[$i]=Ii})})}else _n.exposed||(_n.exposed={});hi&&_n.render===NOOP&&(_n.render=hi),si!=null&&(_n.inheritAttrs=si),pi&&(_n.components=pi),di&&(_n.directives=di)}function resolveInjections(_n,Cn,$n=NOOP){isArray$3(_n)&&(_n=normalizeInject(_n));for(const Nn in _n){const Bn=_n[Nn];let Ln;isObject$5(Bn)?"default"in Bn?Ln=inject(Bn.from||Nn,Bn.default,!0):Ln=inject(Bn.from||Nn):Ln=inject(Bn),isRef(Ln)?Object.defineProperty(Cn,Nn,{enumerable:!0,configurable:!0,get:()=>Ln.value,set:In=>Ln.value=In}):Cn[Nn]=Ln}}function callHook$1(_n,Cn,$n){callWithAsyncErrorHandling(isArray$3(_n)?_n.map(Nn=>Nn.bind(Cn.proxy)):_n.bind(Cn.proxy),Cn,$n)}function createWatcher(_n,Cn,$n,Nn){const Bn=Nn.includes(".")?createPathGetter($n,Nn):()=>$n[Nn];if(isString$1(_n)){const Ln=Cn[_n];isFunction$2(Ln)&&watch(Bn,Ln)}else if(isFunction$2(_n))watch(Bn,_n.bind($n));else if(isObject$5(_n))if(isArray$3(_n))_n.forEach(Ln=>createWatcher(Ln,Cn,$n,Nn));else{const Ln=isFunction$2(_n.handler)?_n.handler.bind($n):Cn[_n.handler];isFunction$2(Ln)&&watch(Bn,Ln,_n)}}function resolveMergedOptions(_n){const Cn=_n.type,{mixins:$n,extends:Nn}=Cn,{mixins:Bn,optionsCache:Ln,config:{optionMergeStrategies:In}}=_n.appContext,Pn=Ln.get(Cn);let Dn;return Pn?Dn=Pn:!Bn.length&&!$n&&!Nn?Dn=Cn:(Dn={},Bn.length&&Bn.forEach(Wn=>mergeOptions(Dn,Wn,In,!0)),mergeOptions(Dn,Cn,In)),isObject$5(Cn)&&Ln.set(Cn,Dn),Dn}function mergeOptions(_n,Cn,$n,Nn=!1){const{mixins:Bn,extends:Ln}=Cn;Ln&&mergeOptions(_n,Ln,$n,!0),Bn&&Bn.forEach(In=>mergeOptions(_n,In,$n,!0));for(const In in Cn)if(!(Nn&&In==="expose")){const Pn=internalOptionMergeStrats[In]||$n&&$n[In];_n[In]=Pn?Pn(_n[In],Cn[In]):Cn[In]}return _n}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(_n,Cn){return Cn?_n?function(){return extend$3(isFunction$2(_n)?_n.call(this,this):_n,isFunction$2(Cn)?Cn.call(this,this):Cn)}:Cn:_n}function mergeInject(_n,Cn){return mergeObjectOptions(normalizeInject(_n),normalizeInject(Cn))}function normalizeInject(_n){if(isArray$3(_n)){const Cn={};for(let $n=0;$n<_n.length;$n++)Cn[_n[$n]]=_n[$n];return Cn}return _n}function mergeAsArray(_n,Cn){return _n?[...new Set([].concat(_n,Cn))]:Cn}function mergeObjectOptions(_n,Cn){return _n?extend$3(Object.create(null),_n,Cn):Cn}function mergeEmitsOrPropsOptions(_n,Cn){return _n?isArray$3(_n)&&isArray$3(Cn)?[...new Set([..._n,...Cn])]:extend$3(Object.create(null),normalizePropsOrEmits(_n),normalizePropsOrEmits(Cn??{})):Cn}function mergeWatchOptions(_n,Cn){if(!_n)return Cn;if(!Cn)return _n;const $n=extend$3(Object.create(null),_n);for(const Nn in Cn)$n[Nn]=mergeAsArray(_n[Nn],Cn[Nn]);return $n}function createAppContext(){return{app:null,config:{isNativeTag:NO,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let uid$1=0;function createAppAPI(_n,Cn){return function(Nn,Bn=null){isFunction$2(Nn)||(Nn=extend$3({},Nn)),Bn!=null&&!isObject$5(Bn)&&(Bn=null);const Ln=createAppContext(),In=new WeakSet;let Pn=!1;const Dn=Ln.app={_uid:uid$1++,_component:Nn,_props:Bn,_container:null,_context:Ln,_instance:null,version:version$1,get config(){return Ln.config},set config(Wn){},use(Wn,...Hn){return In.has(Wn)||(Wn&&isFunction$2(Wn.install)?(In.add(Wn),Wn.install(Dn,...Hn)):isFunction$2(Wn)&&(In.add(Wn),Wn(Dn,...Hn))),Dn},mixin(Wn){return Ln.mixins.includes(Wn)||Ln.mixins.push(Wn),Dn},component(Wn,Hn){return Hn?(Ln.components[Wn]=Hn,Dn):Ln.components[Wn]},directive(Wn,Hn){return Hn?(Ln.directives[Wn]=Hn,Dn):Ln.directives[Wn]},mount(Wn,Hn,Yn){if(!Pn){const Gn=createVNode(Nn,Bn);return Gn.appContext=Ln,Yn===!0?Yn="svg":Yn===!1&&(Yn=void 0),Hn&&Cn?Cn(Gn,Wn):_n(Gn,Wn,Yn),Pn=!0,Dn._container=Wn,Wn.__vue_app__=Dn,getExposeProxy(Gn.component)||Gn.component.proxy}},unmount(){Pn&&(_n(null,Dn._container),delete Dn._container.__vue_app__)},provide(Wn,Hn){return Ln.provides[Wn]=Hn,Dn},runWithContext(Wn){const Hn=currentApp;currentApp=Dn;try{return Wn()}finally{currentApp=Hn}}};return Dn}}let currentApp=null;function provide(_n,Cn){if(currentInstance){let $n=currentInstance.provides;const Nn=currentInstance.parent&¤tInstance.parent.provides;Nn===$n&&($n=currentInstance.provides=Object.create(Nn)),$n[_n]=Cn}}function inject(_n,Cn,$n=!1){const Nn=currentInstance||currentRenderingInstance;if(Nn||currentApp){const Bn=Nn?Nn.parent==null?Nn.vnode.appContext&&Nn.vnode.appContext.provides:Nn.parent.provides:currentApp._context.provides;if(Bn&&_n in Bn)return Bn[_n];if(arguments.length>1)return $n&&isFunction$2(Cn)?Cn.call(Nn&&Nn.proxy):Cn}}function initProps(_n,Cn,$n,Nn=!1){const Bn={},Ln={};def(Ln,InternalObjectKey,1),_n.propsDefaults=Object.create(null),setFullProps(_n,Cn,Bn,Ln);for(const In in _n.propsOptions[0])In in Bn||(Bn[In]=void 0);$n?_n.props=Nn?Bn:shallowReactive(Bn):_n.type.props?_n.props=Bn:_n.props=Ln,_n.attrs=Ln}function updateProps(_n,Cn,$n,Nn){const{props:Bn,attrs:Ln,vnode:{patchFlag:In}}=_n,Pn=toRaw(Bn),[Dn]=_n.propsOptions;let Wn=!1;if((Nn||In>0)&&!(In&16)){if(In&8){const Hn=_n.vnode.dynamicProps;for(let Yn=0;Yn{Dn=!0;const[Gn,rr]=normalizePropsOptions(Yn,Cn,!0);extend$3(In,Gn),rr&&Pn.push(...rr)};!$n&&Cn.mixins.length&&Cn.mixins.forEach(Hn),_n.extends&&Hn(_n.extends),_n.mixins&&_n.mixins.forEach(Hn)}if(!Ln&&!Dn)return isObject$5(_n)&&Nn.set(_n,EMPTY_ARR),EMPTY_ARR;if(isArray$3(Ln))for(let Hn=0;Hn-1,rr[1]=Yo<0||nr-1||hasOwn(rr,"default"))&&Pn.push(Yn)}}}const Wn=[In,Pn];return isObject$5(_n)&&Nn.set(_n,Wn),Wn}function validatePropName(_n){return _n[0]!=="$"&&!isReservedProp(_n)}function getType(_n){return _n===null?"null":typeof _n=="function"?_n.name||"":typeof _n=="object"&&_n.constructor&&_n.constructor.name||""}function isSameType(_n,Cn){return getType(_n)===getType(Cn)}function getTypeIndex(_n,Cn){return isArray$3(Cn)?Cn.findIndex($n=>isSameType($n,_n)):isFunction$2(Cn)&&isSameType(Cn,_n)?0:-1}const isInternalKey=_n=>_n[0]==="_"||_n==="$stable",normalizeSlotValue=_n=>isArray$3(_n)?_n.map(normalizeVNode):[normalizeVNode(_n)],normalizeSlot=(_n,Cn,$n)=>{if(Cn._n)return Cn;const Nn=withCtx((...Bn)=>normalizeSlotValue(Cn(...Bn)),$n);return Nn._c=!1,Nn},normalizeObjectSlots=(_n,Cn,$n)=>{const Nn=_n._ctx;for(const Bn in _n){if(isInternalKey(Bn))continue;const Ln=_n[Bn];if(isFunction$2(Ln))Cn[Bn]=normalizeSlot(Bn,Ln,Nn);else if(Ln!=null){const In=normalizeSlotValue(Ln);Cn[Bn]=()=>In}}},normalizeVNodeSlots=(_n,Cn)=>{const $n=normalizeSlotValue(Cn);_n.slots.default=()=>$n},initSlots=(_n,Cn)=>{if(_n.vnode.shapeFlag&32){const $n=Cn._;$n?(_n.slots=toRaw(Cn),def(Cn,"_",$n)):normalizeObjectSlots(Cn,_n.slots={})}else _n.slots={},Cn&&normalizeVNodeSlots(_n,Cn);def(_n.slots,InternalObjectKey,1)},updateSlots=(_n,Cn,$n)=>{const{vnode:Nn,slots:Bn}=_n;let Ln=!0,In=EMPTY_OBJ;if(Nn.shapeFlag&32){const Pn=Cn._;Pn?$n&&Pn===1?Ln=!1:(extend$3(Bn,Cn),!$n&&Pn===1&&delete Bn._):(Ln=!Cn.$stable,normalizeObjectSlots(Cn,Bn)),In=Cn}else Cn&&(normalizeVNodeSlots(_n,Cn),In={default:1});if(Ln)for(const Pn in Bn)!isInternalKey(Pn)&&In[Pn]==null&&delete Bn[Pn]};function setRef(_n,Cn,$n,Nn,Bn=!1){if(isArray$3(_n)){_n.forEach((Gn,rr)=>setRef(Gn,Cn&&(isArray$3(Cn)?Cn[rr]:Cn),$n,Nn,Bn));return}if(isAsyncWrapper(Nn)&&!Bn)return;const Ln=Nn.shapeFlag&4?getExposeProxy(Nn.component)||Nn.component.proxy:Nn.el,In=Bn?null:Ln,{i:Pn,r:Dn}=_n,Wn=Cn&&Cn.r,Hn=Pn.refs===EMPTY_OBJ?Pn.refs={}:Pn.refs,Yn=Pn.setupState;if(Wn!=null&&Wn!==Dn&&(isString$1(Wn)?(Hn[Wn]=null,hasOwn(Yn,Wn)&&(Yn[Wn]=null)):isRef(Wn)&&(Wn.value=null)),isFunction$2(Dn))callWithErrorHandling(Dn,Pn,12,[In,Hn]);else{const Gn=isString$1(Dn),rr=isRef(Dn);if(Gn||rr){const nr=()=>{if(_n.f){const Yo=Gn?hasOwn(Yn,Dn)?Yn[Dn]:Hn[Dn]:Dn.value;Bn?isArray$3(Yo)&&remove(Yo,Ln):isArray$3(Yo)?Yo.includes(Ln)||Yo.push(Ln):Gn?(Hn[Dn]=[Ln],hasOwn(Yn,Dn)&&(Yn[Dn]=Hn[Dn])):(Dn.value=[Ln],_n.k&&(Hn[_n.k]=Dn.value))}else Gn?(Hn[Dn]=In,hasOwn(Yn,Dn)&&(Yn[Dn]=In)):rr&&(Dn.value=In,_n.k&&(Hn[_n.k]=In))};In?(nr.id=-1,queuePostRenderEffect(nr,$n)):nr()}}}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(_n){return baseCreateRenderer(_n)}function baseCreateRenderer(_n,Cn){const $n=getGlobalThis();$n.__VUE__=!0;const{insert:Nn,remove:Bn,patchProp:Ln,createElement:In,createText:Pn,createComment:Dn,setText:Wn,setElementText:Hn,parentNode:Yn,nextSibling:Gn,setScopeId:rr=NOOP,insertStaticContent:nr}=_n,Yo=(ri,ci,_i,wi=null,bi=null,Oi=null,Fi=void 0,Pi=null,Ri=!!ci.dynamicChildren)=>{if(ri===ci)return;ri&&!isSameVNodeType(ri,ci)&&(wi=Qi(ri),xi(ri,bi,Oi,!0),ri=null),ci.patchFlag===-2&&(Ri=!1,ci.dynamicChildren=null);const{type:Si,ref:Di,shapeFlag:Gi}=ci;switch(Si){case Text:Zo(ri,ci,_i,wi);break;case Comment:ei(ri,ci,_i,wi);break;case Static:ri==null&&li(ci,_i,wi,Fi);break;case Fragment:pi(ri,ci,_i,wi,bi,Oi,Fi,Pi,Ri);break;default:Gi&1?hi(ri,ci,_i,wi,bi,Oi,Fi,Pi,Ri):Gi&6?di(ri,ci,_i,wi,bi,Oi,Fi,Pi,Ri):(Gi&64||Gi&128)&&Si.process(ri,ci,_i,wi,bi,Oi,Fi,Pi,Ri,na)}Di!=null&&bi&&setRef(Di,ri&&ri.ref,Oi,ci||ri,!ci)},Zo=(ri,ci,_i,wi)=>{if(ri==null)Nn(ci.el=Pn(ci.children),_i,wi);else{const bi=ci.el=ri.el;ci.children!==ri.children&&Wn(bi,ci.children)}},ei=(ri,ci,_i,wi)=>{ri==null?Nn(ci.el=Dn(ci.children||""),_i,wi):ci.el=ri.el},li=(ri,ci,_i,wi)=>{[ri.el,ri.anchor]=nr(ri.children,ci,_i,wi,ri.el,ri.anchor)},vi=({el:ri,anchor:ci},_i,wi)=>{let bi;for(;ri&&ri!==ci;)bi=Gn(ri),Nn(ri,_i,wi),ri=bi;Nn(ci,_i,wi)},Xo=({el:ri,anchor:ci})=>{let _i;for(;ri&&ri!==ci;)_i=Gn(ri),Bn(ri),ri=_i;Bn(ci)},hi=(ri,ci,_i,wi,bi,Oi,Fi,Pi,Ri)=>{ci.type==="svg"?Fi="svg":ci.type==="math"&&(Fi="mathml"),ri==null?mi(ci,_i,wi,bi,Oi,Fi,Pi,Ri):Jo(ri,ci,bi,Oi,Fi,Pi,Ri)},mi=(ri,ci,_i,wi,bi,Oi,Fi,Pi)=>{let Ri,Si;const{props:Di,shapeFlag:Gi,transition:ki,dirs:qi}=ri;if(Ri=ri.el=In(ri.type,Oi,Di&&Di.is,Di),Gi&8?Hn(Ri,ri.children):Gi&16&&oi(ri.children,Ri,null,wi,bi,resolveChildrenNamespace(ri,Oi),Fi,Pi),qi&&invokeDirectiveHook(ri,null,wi,"created"),zn(Ri,ri,ri.scopeId,Fi,wi),Di){for(const fa in Di)fa!=="value"&&!isReservedProp(fa)&&Ln(Ri,fa,null,Di[fa],Oi,ri.children,wi,bi,Ui);"value"in Di&&Ln(Ri,"value",null,Di.value,Oi),(Si=Di.onVnodeBeforeMount)&&invokeVNodeHook(Si,wi,ri)}qi&&invokeDirectiveHook(ri,null,wi,"beforeMount");const ra=needTransition(bi,ki);ra&&ki.beforeEnter(Ri),Nn(Ri,ci,_i),((Si=Di&&Di.onVnodeMounted)||ra||qi)&&queuePostRenderEffect(()=>{Si&&invokeVNodeHook(Si,wi,ri),ra&&ki.enter(Ri),qi&&invokeDirectiveHook(ri,null,wi,"mounted")},bi)},zn=(ri,ci,_i,wi,bi)=>{if(_i&&rr(ri,_i),wi)for(let Oi=0;Oi{for(let Si=Ri;Si{const Pi=ci.el=ri.el;let{patchFlag:Ri,dynamicChildren:Si,dirs:Di}=ci;Ri|=ri.patchFlag&16;const Gi=ri.props||EMPTY_OBJ,ki=ci.props||EMPTY_OBJ;let qi;if(_i&&toggleRecurse(_i,!1),(qi=ki.onVnodeBeforeUpdate)&&invokeVNodeHook(qi,_i,ci,ri),Di&&invokeDirectiveHook(ci,ri,_i,"beforeUpdate"),_i&&toggleRecurse(_i,!0),Si?ni(ri.dynamicChildren,Si,Pi,_i,wi,resolveChildrenNamespace(ci,bi),Oi):Fi||$i(ri,ci,Pi,null,_i,wi,resolveChildrenNamespace(ci,bi),Oi,!1),Ri>0){if(Ri&16)si(Pi,ci,Gi,ki,_i,wi,bi);else if(Ri&2&&Gi.class!==ki.class&&Ln(Pi,"class",null,ki.class,bi),Ri&4&&Ln(Pi,"style",Gi.style,ki.style,bi),Ri&8){const ra=ci.dynamicProps;for(let fa=0;fa{qi&&invokeVNodeHook(qi,_i,ci,ri),Di&&invokeDirectiveHook(ci,ri,_i,"updated")},wi)},ni=(ri,ci,_i,wi,bi,Oi,Fi)=>{for(let Pi=0;Pi{if(_i!==wi){if(_i!==EMPTY_OBJ)for(const Pi in _i)!isReservedProp(Pi)&&!(Pi in wi)&&Ln(ri,Pi,_i[Pi],null,Fi,ci.children,bi,Oi,Ui);for(const Pi in wi){if(isReservedProp(Pi))continue;const Ri=wi[Pi],Si=_i[Pi];Ri!==Si&&Pi!=="value"&&Ln(ri,Pi,Si,Ri,Fi,ci.children,bi,Oi,Ui)}"value"in wi&&Ln(ri,"value",_i.value,wi.value,Fi)}},pi=(ri,ci,_i,wi,bi,Oi,Fi,Pi,Ri)=>{const Si=ci.el=ri?ri.el:Pn(""),Di=ci.anchor=ri?ri.anchor:Pn("");let{patchFlag:Gi,dynamicChildren:ki,slotScopeIds:qi}=ci;qi&&(Pi=Pi?Pi.concat(qi):qi),ri==null?(Nn(Si,_i,wi),Nn(Di,_i,wi),oi(ci.children||[],_i,Di,bi,Oi,Fi,Pi,Ri)):Gi>0&&Gi&64&&ki&&ri.dynamicChildren?(ni(ri.dynamicChildren,ki,_i,bi,Oi,Fi,Pi),(ci.key!=null||bi&&ci===bi.subTree)&&traverseStaticChildren(ri,ci,!0)):$i(ri,ci,_i,Di,bi,Oi,Fi,Pi,Ri)},di=(ri,ci,_i,wi,bi,Oi,Fi,Pi,Ri)=>{ci.slotScopeIds=Pi,ri==null?ci.shapeFlag&512?bi.ctx.activate(ci,_i,wi,Fi,Ri):Li(ci,_i,wi,bi,Oi,Fi,Ri):ea(ri,ci,Ri)},Li=(ri,ci,_i,wi,bi,Oi,Fi)=>{const Pi=ri.component=createComponentInstance(ri,wi,bi);if(isKeepAlive(ri)&&(Pi.ctx.renderer=na),setupComponent(Pi),Pi.asyncDep){if(bi&&bi.registerDep(Pi,Ki),!ri.el){const Ri=Pi.subTree=createVNode(Comment);ei(null,Ri,ci,_i)}}else Ki(Pi,ri,ci,_i,bi,Oi,Fi)},ea=(ri,ci,_i)=>{const wi=ci.component=ri.component;if(shouldUpdateComponent(ri,ci,_i))if(wi.asyncDep&&!wi.asyncResolved){gi(wi,ci,_i);return}else wi.next=ci,invalidateJob(wi.update),wi.effect.dirty=!0,wi.update();else ci.el=ri.el,wi.vnode=ci},Ki=(ri,ci,_i,wi,bi,Oi,Fi)=>{const Pi=()=>{if(ri.isMounted){let{next:Di,bu:Gi,u:ki,parent:qi,vnode:ra}=ri;{const wa=locateNonHydratedAsyncRoot(ri);if(wa){Di&&(Di.el=ra.el,gi(ri,Di,Fi)),wa.asyncDep.then(()=>{ri.isUnmounted||Pi()});return}}let fa=Di,va;toggleRecurse(ri,!1),Di?(Di.el=ra.el,gi(ri,Di,Fi)):Di=ra,Gi&&invokeArrayFns(Gi),(va=Di.props&&Di.props.onVnodeBeforeUpdate)&&invokeVNodeHook(va,qi,Di,ra),toggleRecurse(ri,!0);const ka=renderComponentRoot(ri),Aa=ri.subTree;ri.subTree=ka,Yo(Aa,ka,Yn(Aa.el),Qi(Aa),ri,bi,Oi),Di.el=ka.el,fa===null&&updateHOCHostEl(ri,ka.el),ki&&queuePostRenderEffect(ki,bi),(va=Di.props&&Di.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(va,qi,Di,ra),bi)}else{let Di;const{el:Gi,props:ki}=ci,{bm:qi,m:ra,parent:fa}=ri,va=isAsyncWrapper(ci);if(toggleRecurse(ri,!1),qi&&invokeArrayFns(qi),!va&&(Di=ki&&ki.onVnodeBeforeMount)&&invokeVNodeHook(Di,fa,ci),toggleRecurse(ri,!0),Gi&&ma){const ka=()=>{ri.subTree=renderComponentRoot(ri),ma(Gi,ri.subTree,ri,bi,null)};va?ci.type.__asyncLoader().then(()=>!ri.isUnmounted&&ka()):ka()}else{const ka=ri.subTree=renderComponentRoot(ri);Yo(null,ka,_i,wi,ri,bi,Oi),ci.el=ka.el}if(ra&&queuePostRenderEffect(ra,bi),!va&&(Di=ki&&ki.onVnodeMounted)){const ka=ci;queuePostRenderEffect(()=>invokeVNodeHook(Di,fa,ka),bi)}(ci.shapeFlag&256||fa&&isAsyncWrapper(fa.vnode)&&fa.vnode.shapeFlag&256)&&ri.a&&queuePostRenderEffect(ri.a,bi),ri.isMounted=!0,ci=_i=wi=null}},Ri=ri.effect=new ReactiveEffect(Pi,NOOP,()=>queueJob(Si),ri.scope),Si=ri.update=()=>{Ri.dirty&&Ri.run()};Si.id=ri.uid,toggleRecurse(ri,!0),Si()},gi=(ri,ci,_i)=>{ci.component=ri;const wi=ri.vnode.props;ri.vnode=ci,ri.next=null,updateProps(ri,ci.props,wi,_i),updateSlots(ri,ci.children,_i),pauseTracking(),flushPreFlushCbs(ri),resetTracking()},$i=(ri,ci,_i,wi,bi,Oi,Fi,Pi,Ri=!1)=>{const Si=ri&&ri.children,Di=ri?ri.shapeFlag:0,Gi=ci.children,{patchFlag:ki,shapeFlag:qi}=ci;if(ki>0){if(ki&128){sa(Si,Gi,_i,wi,bi,Oi,Fi,Pi,Ri);return}else if(ki&256){Ii(Si,Gi,_i,wi,bi,Oi,Fi,Pi,Ri);return}}qi&8?(Di&16&&Ui(Si,bi,Oi),Gi!==Si&&Hn(_i,Gi)):Di&16?qi&16?sa(Si,Gi,_i,wi,bi,Oi,Fi,Pi,Ri):Ui(Si,bi,Oi,!0):(Di&8&&Hn(_i,""),qi&16&&oi(Gi,_i,wi,bi,Oi,Fi,Pi,Ri))},Ii=(ri,ci,_i,wi,bi,Oi,Fi,Pi,Ri)=>{ri=ri||EMPTY_ARR,ci=ci||EMPTY_ARR;const Si=ri.length,Di=ci.length,Gi=Math.min(Si,Di);let ki;for(ki=0;kiDi?Ui(ri,bi,Oi,!0,!1,Gi):oi(ci,_i,wi,bi,Oi,Fi,Pi,Ri,Gi)},sa=(ri,ci,_i,wi,bi,Oi,Fi,Pi,Ri)=>{let Si=0;const Di=ci.length;let Gi=ri.length-1,ki=Di-1;for(;Si<=Gi&&Si<=ki;){const qi=ri[Si],ra=ci[Si]=Ri?cloneIfMounted(ci[Si]):normalizeVNode(ci[Si]);if(isSameVNodeType(qi,ra))Yo(qi,ra,_i,null,bi,Oi,Fi,Pi,Ri);else break;Si++}for(;Si<=Gi&&Si<=ki;){const qi=ri[Gi],ra=ci[ki]=Ri?cloneIfMounted(ci[ki]):normalizeVNode(ci[ki]);if(isSameVNodeType(qi,ra))Yo(qi,ra,_i,null,bi,Oi,Fi,Pi,Ri);else break;Gi--,ki--}if(Si>Gi){if(Si<=ki){const qi=ki+1,ra=qiki)for(;Si<=Gi;)xi(ri[Si],bi,Oi,!0),Si++;else{const qi=Si,ra=Si,fa=new Map;for(Si=ra;Si<=ki;Si++){const Zi=ci[Si]=Ri?cloneIfMounted(ci[Si]):normalizeVNode(ci[Si]);Zi.key!=null&&fa.set(Zi.key,Si)}let va,ka=0;const Aa=ki-ra+1;let wa=!1,Na=0;const Ei=new Array(Aa);for(Si=0;Si=Aa){xi(Zi,bi,Oi,!0);continue}let ua;if(Zi.key!=null)ua=fa.get(Zi.key);else for(va=ra;va<=ki;va++)if(Ei[va-ra]===0&&isSameVNodeType(Zi,ci[va])){ua=va;break}ua===void 0?xi(Zi,bi,Oi,!0):(Ei[ua-ra]=Si+1,ua>=Na?Na=ua:wa=!0,Yo(Zi,ci[ua],_i,null,bi,Oi,Fi,Pi,Ri),ka++)}const zi=wa?getSequence(Ei):EMPTY_ARR;for(va=zi.length-1,Si=Aa-1;Si>=0;Si--){const Zi=ra+Si,ua=ci[Zi],ha=Zi+1{const{el:Oi,type:Fi,transition:Pi,children:Ri,shapeFlag:Si}=ri;if(Si&6){la(ri.component.subTree,ci,_i,wi);return}if(Si&128){ri.suspense.move(ci,_i,wi);return}if(Si&64){Fi.move(ri,ci,_i,na);return}if(Fi===Fragment){Nn(Oi,ci,_i);for(let Gi=0;GiPi.enter(Oi),bi);else{const{leave:Gi,delayLeave:ki,afterLeave:qi}=Pi,ra=()=>Nn(Oi,ci,_i),fa=()=>{Gi(Oi,()=>{ra(),qi&&qi()})};ki?ki(Oi,ra,fa):fa()}else Nn(Oi,ci,_i)},xi=(ri,ci,_i,wi=!1,bi=!1)=>{const{type:Oi,props:Fi,ref:Pi,children:Ri,dynamicChildren:Si,shapeFlag:Di,patchFlag:Gi,dirs:ki}=ri;if(Pi!=null&&setRef(Pi,null,_i,ri,!0),Di&256){ci.ctx.deactivate(ri);return}const qi=Di&1&&ki,ra=!isAsyncWrapper(ri);let fa;if(ra&&(fa=Fi&&Fi.onVnodeBeforeUnmount)&&invokeVNodeHook(fa,ci,ri),Di&6)ji(ri.component,_i,wi);else{if(Di&128){ri.suspense.unmount(_i,wi);return}qi&&invokeDirectiveHook(ri,null,ci,"beforeUnmount"),Di&64?ri.type.remove(ri,ci,_i,bi,na,wi):Si&&(Oi!==Fragment||Gi>0&&Gi&64)?Ui(Si,ci,_i,!1,!0):(Oi===Fragment&&Gi&384||!bi&&Di&16)&&Ui(Ri,ci,_i),wi&&Mi(ri)}(ra&&(fa=Fi&&Fi.onVnodeUnmounted)||qi)&&queuePostRenderEffect(()=>{fa&&invokeVNodeHook(fa,ci,ri),qi&&invokeDirectiveHook(ri,null,ci,"unmounted")},_i)},Mi=ri=>{const{type:ci,el:_i,anchor:wi,transition:bi}=ri;if(ci===Fragment){Hi(_i,wi);return}if(ci===Static){Xo(ri);return}const Oi=()=>{Bn(_i),bi&&!bi.persisted&&bi.afterLeave&&bi.afterLeave()};if(ri.shapeFlag&1&&bi&&!bi.persisted){const{leave:Fi,delayLeave:Pi}=bi,Ri=()=>Fi(_i,Oi);Pi?Pi(ri.el,Oi,Ri):Ri()}else Oi()},Hi=(ri,ci)=>{let _i;for(;ri!==ci;)_i=Gn(ri),Bn(ri),ri=_i;Bn(ci)},ji=(ri,ci,_i)=>{const{bum:wi,scope:bi,update:Oi,subTree:Fi,um:Pi}=ri;wi&&invokeArrayFns(wi),bi.stop(),Oi&&(Oi.active=!1,xi(Fi,ri,ci,_i)),Pi&&queuePostRenderEffect(Pi,ci),queuePostRenderEffect(()=>{ri.isUnmounted=!0},ci),ci&&ci.pendingBranch&&!ci.isUnmounted&&ri.asyncDep&&!ri.asyncResolved&&ri.suspenseId===ci.pendingId&&(ci.deps--,ci.deps===0&&ci.resolve())},Ui=(ri,ci,_i,wi=!1,bi=!1,Oi=0)=>{for(let Fi=Oi;Firi.shapeFlag&6?Qi(ri.component.subTree):ri.shapeFlag&128?ri.suspense.next():Gn(ri.anchor||ri.el);let ia=!1;const Ji=(ri,ci,_i)=>{ri==null?ci._vnode&&xi(ci._vnode,null,null,!0):Yo(ci._vnode||null,ri,ci,null,null,null,_i),ia||(ia=!0,flushPreFlushCbs(),flushPostFlushCbs(),ia=!1),ci._vnode=ri},na={p:Yo,um:xi,m:la,r:Mi,mt:Li,mc:oi,pc:$i,pbc:ni,n:Qi,o:_n};let ga,ma;return Cn&&([ga,ma]=Cn(na)),{render:Ji,hydrate:ga,createApp:createAppAPI(Ji,ga)}}function resolveChildrenNamespace({type:_n,props:Cn},$n){return $n==="svg"&&_n==="foreignObject"||$n==="mathml"&&_n==="annotation-xml"&&Cn&&Cn.encoding&&Cn.encoding.includes("html")?void 0:$n}function toggleRecurse({effect:_n,update:Cn},$n){_n.allowRecurse=Cn.allowRecurse=$n}function needTransition(_n,Cn){return(!_n||_n&&!_n.pendingBranch)&&Cn&&!Cn.persisted}function traverseStaticChildren(_n,Cn,$n=!1){const Nn=_n.children,Bn=Cn.children;if(isArray$3(Nn)&&isArray$3(Bn))for(let Ln=0;Ln>1,_n[$n[Pn]]0&&(Cn[Nn]=$n[Ln-1]),$n[Ln]=Nn)}}for(Ln=$n.length,In=$n[Ln-1];Ln-- >0;)$n[Ln]=In,In=Cn[In];return $n}function locateNonHydratedAsyncRoot(_n){const Cn=_n.subTree.component;if(Cn)return Cn.asyncDep&&!Cn.asyncResolved?Cn:locateNonHydratedAsyncRoot(Cn)}const isTeleport=_n=>_n.__isTeleport,isTeleportDisabled=_n=>_n&&(_n.disabled||_n.disabled===""),isTargetSVG=_n=>typeof SVGElement<"u"&&_n instanceof SVGElement,isTargetMathML=_n=>typeof MathMLElement=="function"&&_n instanceof MathMLElement,resolveTarget=(_n,Cn)=>{const $n=_n&&_n.to;return isString$1($n)?Cn?Cn($n):null:$n},TeleportImpl={name:"Teleport",__isTeleport:!0,process(_n,Cn,$n,Nn,Bn,Ln,In,Pn,Dn,Wn){const{mc:Hn,pc:Yn,pbc:Gn,o:{insert:rr,querySelector:nr,createText:Yo,createComment:Zo}}=Wn,ei=isTeleportDisabled(Cn.props);let{shapeFlag:li,children:vi,dynamicChildren:Xo}=Cn;if(_n==null){const hi=Cn.el=Yo(""),mi=Cn.anchor=Yo("");rr(hi,$n,Nn),rr(mi,$n,Nn);const zn=Cn.target=resolveTarget(Cn.props,nr),oi=Cn.targetAnchor=Yo("");zn&&(rr(oi,zn),In==="svg"||isTargetSVG(zn)?In="svg":(In==="mathml"||isTargetMathML(zn))&&(In="mathml"));const Jo=(ni,si)=>{li&16&&Hn(vi,ni,si,Bn,Ln,In,Pn,Dn)};ei?Jo($n,mi):zn&&Jo(zn,oi)}else{Cn.el=_n.el;const hi=Cn.anchor=_n.anchor,mi=Cn.target=_n.target,zn=Cn.targetAnchor=_n.targetAnchor,oi=isTeleportDisabled(_n.props),Jo=oi?$n:mi,ni=oi?hi:zn;if(In==="svg"||isTargetSVG(mi)?In="svg":(In==="mathml"||isTargetMathML(mi))&&(In="mathml"),Xo?(Gn(_n.dynamicChildren,Xo,Jo,Bn,Ln,In,Pn),traverseStaticChildren(_n,Cn,!0)):Dn||Yn(_n,Cn,Jo,ni,Bn,Ln,In,Pn,!1),ei)oi?Cn.props&&_n.props&&Cn.props.to!==_n.props.to&&(Cn.props.to=_n.props.to):moveTeleport(Cn,$n,hi,Wn,1);else if((Cn.props&&Cn.props.to)!==(_n.props&&_n.props.to)){const si=Cn.target=resolveTarget(Cn.props,nr);si&&moveTeleport(Cn,si,null,Wn,0)}else oi&&moveTeleport(Cn,mi,zn,Wn,1)}updateCssVars(Cn)},remove(_n,Cn,$n,Nn,{um:Bn,o:{remove:Ln}},In){const{shapeFlag:Pn,children:Dn,anchor:Wn,targetAnchor:Hn,target:Yn,props:Gn}=_n;if(Yn&&Ln(Hn),In&&Ln(Wn),Pn&16){const rr=In||!isTeleportDisabled(Gn);for(let nr=0;nr0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(_n),_n}function createElementBlock(_n,Cn,$n,Nn,Bn,Ln){return setupBlock(createBaseVNode(_n,Cn,$n,Nn,Bn,Ln,!0))}function createBlock(_n,Cn,$n,Nn,Bn){return setupBlock(createVNode(_n,Cn,$n,Nn,Bn,!0))}function isVNode(_n){return _n?_n.__v_isVNode===!0:!1}function isSameVNodeType(_n,Cn){return _n.type===Cn.type&&_n.key===Cn.key}const InternalObjectKey="__vInternal",normalizeKey=({key:_n})=>_n??null,normalizeRef=({ref:_n,ref_key:Cn,ref_for:$n})=>(typeof _n=="number"&&(_n=""+_n),_n!=null?isString$1(_n)||isRef(_n)||isFunction$2(_n)?{i:currentRenderingInstance,r:_n,k:Cn,f:!!$n}:_n:null);function createBaseVNode(_n,Cn=null,$n=null,Nn=0,Bn=null,Ln=_n===Fragment?0:1,In=!1,Pn=!1){const Dn={__v_isVNode:!0,__v_skip:!0,type:_n,props:Cn,key:Cn&&normalizeKey(Cn),ref:Cn&&normalizeRef(Cn),scopeId:currentScopeId,slotScopeIds:null,children:$n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:Ln,patchFlag:Nn,dynamicProps:Bn,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return Pn?(normalizeChildren(Dn,$n),Ln&128&&_n.normalize(Dn)):$n&&(Dn.shapeFlag|=isString$1($n)?8:16),isBlockTreeEnabled>0&&!In&¤tBlock&&(Dn.patchFlag>0||Ln&6)&&Dn.patchFlag!==32&¤tBlock.push(Dn),Dn}const createVNode=_createVNode;function _createVNode(_n,Cn=null,$n=null,Nn=0,Bn=null,Ln=!1){if((!_n||_n===NULL_DYNAMIC_COMPONENT)&&(_n=Comment),isVNode(_n)){const Pn=cloneVNode(_n,Cn,!0);return $n&&normalizeChildren(Pn,$n),isBlockTreeEnabled>0&&!Ln&¤tBlock&&(Pn.shapeFlag&6?currentBlock[currentBlock.indexOf(_n)]=Pn:currentBlock.push(Pn)),Pn.patchFlag|=-2,Pn}if(isClassComponent(_n)&&(_n=_n.__vccOpts),Cn){Cn=guardReactiveProps(Cn);let{class:Pn,style:Dn}=Cn;Pn&&!isString$1(Pn)&&(Cn.class=normalizeClass(Pn)),isObject$5(Dn)&&(isProxy(Dn)&&!isArray$3(Dn)&&(Dn=extend$3({},Dn)),Cn.style=normalizeStyle(Dn))}const In=isString$1(_n)?1:isSuspense(_n)?128:isTeleport(_n)?64:isObject$5(_n)?4:isFunction$2(_n)?2:0;return createBaseVNode(_n,Cn,$n,Nn,Bn,In,Ln,!0)}function guardReactiveProps(_n){return _n?isProxy(_n)||InternalObjectKey in _n?extend$3({},_n):_n:null}function cloneVNode(_n,Cn,$n=!1){const{props:Nn,ref:Bn,patchFlag:Ln,children:In}=_n,Pn=Cn?mergeProps(Nn||{},Cn):Nn;return{__v_isVNode:!0,__v_skip:!0,type:_n.type,props:Pn,key:Pn&&normalizeKey(Pn),ref:Cn&&Cn.ref?$n&&Bn?isArray$3(Bn)?Bn.concat(normalizeRef(Cn)):[Bn,normalizeRef(Cn)]:normalizeRef(Cn):Bn,scopeId:_n.scopeId,slotScopeIds:_n.slotScopeIds,children:In,target:_n.target,targetAnchor:_n.targetAnchor,staticCount:_n.staticCount,shapeFlag:_n.shapeFlag,patchFlag:Cn&&_n.type!==Fragment?Ln===-1?16:Ln|16:Ln,dynamicProps:_n.dynamicProps,dynamicChildren:_n.dynamicChildren,appContext:_n.appContext,dirs:_n.dirs,transition:_n.transition,component:_n.component,suspense:_n.suspense,ssContent:_n.ssContent&&cloneVNode(_n.ssContent),ssFallback:_n.ssFallback&&cloneVNode(_n.ssFallback),el:_n.el,anchor:_n.anchor,ctx:_n.ctx,ce:_n.ce}}function createTextVNode(_n=" ",Cn=0){return createVNode(Text,null,_n,Cn)}function createCommentVNode(_n="",Cn=!1){return Cn?(openBlock(),createBlock(Comment,null,_n)):createVNode(Comment,null,_n)}function normalizeVNode(_n){return _n==null||typeof _n=="boolean"?createVNode(Comment):isArray$3(_n)?createVNode(Fragment,null,_n.slice()):typeof _n=="object"?cloneIfMounted(_n):createVNode(Text,null,String(_n))}function cloneIfMounted(_n){return _n.el===null&&_n.patchFlag!==-1||_n.memo?_n:cloneVNode(_n)}function normalizeChildren(_n,Cn){let $n=0;const{shapeFlag:Nn}=_n;if(Cn==null)Cn=null;else if(isArray$3(Cn))$n=16;else if(typeof Cn=="object")if(Nn&65){const Bn=Cn.default;Bn&&(Bn._c&&(Bn._d=!1),normalizeChildren(_n,Bn()),Bn._c&&(Bn._d=!0));return}else{$n=32;const Bn=Cn._;!Bn&&!(InternalObjectKey in Cn)?Cn._ctx=currentRenderingInstance:Bn===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?Cn._=1:(Cn._=2,_n.patchFlag|=1024))}else isFunction$2(Cn)?(Cn={default:Cn,_ctx:currentRenderingInstance},$n=32):(Cn=String(Cn),Nn&64?($n=16,Cn=[createTextVNode(Cn)]):$n=8);_n.children=Cn,_n.shapeFlag|=$n}function mergeProps(..._n){const Cn={};for(let $n=0;$n<_n.length;$n++){const Nn=_n[$n];for(const Bn in Nn)if(Bn==="class")Cn.class!==Nn.class&&(Cn.class=normalizeClass([Cn.class,Nn.class]));else if(Bn==="style")Cn.style=normalizeStyle([Cn.style,Nn.style]);else if(isOn(Bn)){const Ln=Cn[Bn],In=Nn[Bn];In&&Ln!==In&&!(isArray$3(Ln)&&Ln.includes(In))&&(Cn[Bn]=Ln?[].concat(Ln,In):In)}else Bn!==""&&(Cn[Bn]=Nn[Bn])}return Cn}function invokeVNodeHook(_n,Cn,$n,Nn=null){callWithAsyncErrorHandling(_n,Cn,7,[$n,Nn])}const emptyAppContext=createAppContext();let uid=0;function createComponentInstance(_n,Cn,$n){const Nn=_n.type,Bn=(Cn?Cn.appContext:_n.appContext)||emptyAppContext,Ln={uid:uid++,vnode:_n,type:Nn,parent:Cn,appContext:Bn,root:null,next:null,subTree:null,effect:null,update:null,scope:new EffectScope(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:Cn?Cn.provides:Object.create(Bn.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:normalizePropsOptions(Nn,Bn),emitsOptions:normalizeEmitsOptions(Nn,Bn),emit:null,emitted:null,propsDefaults:EMPTY_OBJ,inheritAttrs:Nn.inheritAttrs,ctx:EMPTY_OBJ,data:EMPTY_OBJ,props:EMPTY_OBJ,attrs:EMPTY_OBJ,slots:EMPTY_OBJ,refs:EMPTY_OBJ,setupState:EMPTY_OBJ,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:$n,suspenseId:$n?$n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return Ln.ctx={_:Ln},Ln.root=Cn?Cn.root:Ln,Ln.emit=emit.bind(null,Ln),_n.ce&&_n.ce(Ln),Ln}let currentInstance=null;const getCurrentInstance=()=>currentInstance||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{const _n=getGlobalThis(),Cn=($n,Nn)=>{let Bn;return(Bn=_n[$n])||(Bn=_n[$n]=[]),Bn.push(Nn),Ln=>{Bn.length>1?Bn.forEach(In=>In(Ln)):Bn[0](Ln)}};internalSetCurrentInstance=Cn("__VUE_INSTANCE_SETTERS__",$n=>currentInstance=$n),setInSSRSetupState=Cn("__VUE_SSR_SETTERS__",$n=>isInSSRComponentSetup=$n)}const setCurrentInstance=_n=>{const Cn=currentInstance;return internalSetCurrentInstance(_n),_n.scope.on(),()=>{_n.scope.off(),internalSetCurrentInstance(Cn)}},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(_n){return _n.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(_n,Cn=!1){Cn&&setInSSRSetupState(Cn);const{props:$n,children:Nn}=_n.vnode,Bn=isStatefulComponent(_n);initProps(_n,$n,Bn,Cn),initSlots(_n,Nn);const Ln=Bn?setupStatefulComponent(_n,Cn):void 0;return Cn&&setInSSRSetupState(!1),Ln}function setupStatefulComponent(_n,Cn){const $n=_n.type;_n.accessCache=Object.create(null),_n.proxy=markRaw(new Proxy(_n.ctx,PublicInstanceProxyHandlers));const{setup:Nn}=$n;if(Nn){const Bn=_n.setupContext=Nn.length>1?createSetupContext(_n):null,Ln=setCurrentInstance(_n);pauseTracking();const In=callWithErrorHandling(Nn,_n,0,[_n.props,Bn]);if(resetTracking(),Ln(),isPromise(In)){if(In.then(unsetCurrentInstance,unsetCurrentInstance),Cn)return In.then(Pn=>{handleSetupResult(_n,Pn,Cn)}).catch(Pn=>{handleError(Pn,_n,0)});_n.asyncDep=In}else handleSetupResult(_n,In,Cn)}else finishComponentSetup(_n,Cn)}function handleSetupResult(_n,Cn,$n){isFunction$2(Cn)?_n.type.__ssrInlineRender?_n.ssrRender=Cn:_n.render=Cn:isObject$5(Cn)&&(_n.setupState=proxyRefs(Cn)),finishComponentSetup(_n,$n)}let compile;function finishComponentSetup(_n,Cn,$n){const Nn=_n.type;if(!_n.render){if(!Cn&&compile&&!Nn.render){const Bn=Nn.template||resolveMergedOptions(_n).template;if(Bn){const{isCustomElement:Ln,compilerOptions:In}=_n.appContext.config,{delimiters:Pn,compilerOptions:Dn}=Nn,Wn=extend$3(extend$3({isCustomElement:Ln,delimiters:Pn},In),Dn);Nn.render=compile(Bn,Wn)}}_n.render=Nn.render||NOOP}{const Bn=setCurrentInstance(_n);pauseTracking();try{applyOptions(_n)}finally{resetTracking(),Bn()}}}function getAttrsProxy(_n){return _n.attrsProxy||(_n.attrsProxy=new Proxy(_n.attrs,{get(Cn,$n){return track(_n,"get","$attrs"),Cn[$n]}}))}function createSetupContext(_n){const Cn=$n=>{_n.exposed=$n||{}};return{get attrs(){return getAttrsProxy(_n)},slots:_n.slots,emit:_n.emit,expose:Cn}}function getExposeProxy(_n){if(_n.exposed)return _n.exposeProxy||(_n.exposeProxy=new Proxy(proxyRefs(markRaw(_n.exposed)),{get(Cn,$n){if($n in Cn)return Cn[$n];if($n in publicPropertiesMap)return publicPropertiesMap[$n](_n)},has(Cn,$n){return $n in Cn||$n in publicPropertiesMap}}))}const classifyRE=/(?:^|[-_])(\w)/g,classify=_n=>_n.replace(classifyRE,Cn=>Cn.toUpperCase()).replace(/[-_]/g,"");function getComponentName(_n,Cn=!0){return isFunction$2(_n)?_n.displayName||_n.name:_n.name||Cn&&_n.__name}function formatComponentName(_n,Cn,$n=!1){let Nn=getComponentName(Cn);if(!Nn&&Cn.__file){const Bn=Cn.__file.match(/([^/\\]+)\.\w+$/);Bn&&(Nn=Bn[1])}if(!Nn&&_n&&_n.parent){const Bn=Ln=>{for(const In in Ln)if(Ln[In]===Cn)return In};Nn=Bn(_n.components||_n.parent.type.components)||Bn(_n.appContext.components)}return Nn?classify(Nn):$n?"App":"Anonymous"}function isClassComponent(_n){return isFunction$2(_n)&&"__vccOpts"in _n}const computed=(_n,Cn)=>computed$1(_n,Cn,isInSSRComponentSetup);function h$2(_n,Cn,$n){const Nn=arguments.length;return Nn===2?isObject$5(Cn)&&!isArray$3(Cn)?isVNode(Cn)?createVNode(_n,null,[Cn]):createVNode(_n,Cn):createVNode(_n,null,Cn):(Nn>3?$n=Array.prototype.slice.call(arguments,2):Nn===3&&isVNode($n)&&($n=[$n]),createVNode(_n,Cn,$n))}const version$1="3.4.19";/** +`],...formatTraceEntry($n))}),Cn}function formatTraceEntry({vnode:_n,recurseCount:Cn}){const $n=Cn>0?`... (${Cn} recursive calls)`:"",Nn=_n.component?_n.component.parent==null:!1,Bn=` at <${formatComponentName(_n.component,_n.type,Nn)}`,Ln=">"+$n;return _n.props?[Bn,...formatProps(_n.props),Ln]:[Bn+Ln]}function formatProps(_n){const Cn=[],$n=Object.keys(_n);return $n.slice(0,3).forEach(Nn=>{Cn.push(...formatProp(Nn,_n[Nn]))}),$n.length>3&&Cn.push(" ..."),Cn}function formatProp(_n,Cn,$n){return isString$1(Cn)?(Cn=JSON.stringify(Cn),$n?Cn:[`${_n}=${Cn}`]):typeof Cn=="number"||typeof Cn=="boolean"||Cn==null?$n?Cn:[`${_n}=${Cn}`]:isRef(Cn)?(Cn=formatProp(_n,toRaw(Cn.value),!0),$n?Cn:[`${_n}=Ref<`,Cn,">"]):isFunction$2(Cn)?[`${_n}=fn${Cn.name?`<${Cn.name}>`:""}`]:(Cn=toRaw(Cn),$n?Cn:[`${_n}=`,Cn])}function callWithErrorHandling(_n,Cn,$n,Nn){try{return Nn?_n(...Nn):_n()}catch(Bn){handleError(Bn,Cn,$n)}}function callWithAsyncErrorHandling(_n,Cn,$n,Nn){if(isFunction$2(_n)){const Ln=callWithErrorHandling(_n,Cn,$n,Nn);return Ln&&isPromise(Ln)&&Ln.catch(In=>{handleError(In,Cn,$n)}),Ln}const Bn=[];for(let Ln=0;Ln<_n.length;Ln++)Bn.push(callWithAsyncErrorHandling(_n[Ln],Cn,$n,Nn));return Bn}function handleError(_n,Cn,$n,Nn=!0){const Bn=Cn?Cn.vnode:null;if(Cn){let Ln=Cn.parent;const In=Cn.proxy,Pn=`https://vuejs.org/error-reference/#runtime-${$n}`;for(;Ln;){const Wn=Ln.ec;if(Wn){for(let Hn=0;Hn>>1,Bn=queue[Nn],Ln=getId(Bn);Ln<_n||Ln===_n&&Bn.pre?Cn=Nn+1:$n=Nn}return Cn}function queueJob(_n){(!queue.length||!queue.includes(_n,isFlushing&&_n.allowRecurse?flushIndex+1:flushIndex))&&(_n.id==null?queue.push(_n):queue.splice(findInsertionIndex(_n.id),0,_n),queueFlush())}function queueFlush(){!isFlushing&&!isFlushPending&&(isFlushPending=!0,currentFlushPromise=resolvedPromise.then(flushJobs))}function invalidateJob(_n){const Cn=queue.indexOf(_n);Cn>flushIndex&&queue.splice(Cn,1)}function queuePostFlushCb(_n){isArray$3(_n)?pendingPostFlushCbs.push(..._n):(!activePostFlushCbs||!activePostFlushCbs.includes(_n,_n.allowRecurse?postFlushIndex+1:postFlushIndex))&&pendingPostFlushCbs.push(_n),queueFlush()}function flushPreFlushCbs(_n,Cn,$n=isFlushing?flushIndex+1:0){for(;$ngetId($n)-getId(Nn));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...Cn);return}for(activePostFlushCbs=Cn,postFlushIndex=0;postFlushIndex_n.id==null?1/0:_n.id,comparator=(_n,Cn)=>{const $n=getId(_n)-getId(Cn);if($n===0){if(_n.pre&&!Cn.pre)return-1;if(Cn.pre&&!_n.pre)return 1}return $n};function flushJobs(_n){isFlushPending=!1,isFlushing=!0,queue.sort(comparator);const Cn=NOOP;try{for(flushIndex=0;flushIndexisString$1(rr)?rr.trim():rr)),Yn&&(Bn=$n.map(looseToNumber))}let Pn,Dn=Nn[Pn=toHandlerKey(Cn)]||Nn[Pn=toHandlerKey(camelize(Cn))];!Dn&&Ln&&(Dn=Nn[Pn=toHandlerKey(hyphenate(Cn))]),Dn&&callWithAsyncErrorHandling(Dn,_n,6,Bn);const Wn=Nn[Pn+"Once"];if(Wn){if(!_n.emitted)_n.emitted={};else if(_n.emitted[Pn])return;_n.emitted[Pn]=!0,callWithAsyncErrorHandling(Wn,_n,6,Bn)}}function normalizeEmitsOptions(_n,Cn,$n=!1){const Nn=Cn.emitsCache,Bn=Nn.get(_n);if(Bn!==void 0)return Bn;const Ln=_n.emits;let In={},Pn=!1;if(!isFunction$2(_n)){const Dn=Wn=>{const Hn=normalizeEmitsOptions(Wn,Cn,!0);Hn&&(Pn=!0,extend$3(In,Hn))};!$n&&Cn.mixins.length&&Cn.mixins.forEach(Dn),_n.extends&&Dn(_n.extends),_n.mixins&&_n.mixins.forEach(Dn)}return!Ln&&!Pn?(isObject$5(_n)&&Nn.set(_n,null),null):(isArray$3(Ln)?Ln.forEach(Dn=>In[Dn]=null):extend$3(In,Ln),isObject$5(_n)&&Nn.set(_n,In),In)}function isEmitListener(_n,Cn){return!_n||!isOn(Cn)?!1:(Cn=Cn.slice(2).replace(/Once$/,""),hasOwn(_n,Cn[0].toLowerCase()+Cn.slice(1))||hasOwn(_n,hyphenate(Cn))||hasOwn(_n,Cn))}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(_n){const Cn=currentRenderingInstance;return currentRenderingInstance=_n,currentScopeId=_n&&_n.type.__scopeId||null,Cn}function pushScopeId(_n){currentScopeId=_n}function popScopeId(){currentScopeId=null}function withCtx(_n,Cn=currentRenderingInstance,$n){if(!Cn||_n._n)return _n;const Nn=(...Bn)=>{Nn._d&&setBlockTracking(-1);const Ln=setCurrentRenderingInstance(Cn);let In;try{In=_n(...Bn)}finally{setCurrentRenderingInstance(Ln),Nn._d&&setBlockTracking(1)}return In};return Nn._n=!0,Nn._c=!0,Nn._d=!0,Nn}function markAttrsAccessed(){}function renderComponentRoot(_n){const{type:Cn,vnode:$n,proxy:Nn,withProxy:Bn,props:Ln,propsOptions:[In],slots:Pn,attrs:Dn,emit:Wn,render:Hn,renderCache:Yn,data:Gn,setupState:rr,ctx:nr,inheritAttrs:Yo}=_n;let Zo,ei;const li=setCurrentRenderingInstance(_n);try{if($n.shapeFlag&4){const Xo=Bn||Nn,hi=Xo;Zo=normalizeVNode(Hn.call(hi,Xo,Yn,Ln,rr,Gn,nr)),ei=Dn}else{const Xo=Cn;Zo=normalizeVNode(Xo.length>1?Xo(Ln,{attrs:Dn,slots:Pn,emit:Wn}):Xo(Ln,null)),ei=Cn.props?Dn:getFunctionalFallthrough(Dn)}}catch(Xo){blockStack.length=0,handleError(Xo,_n,1),Zo=createVNode(Comment)}let vi=Zo;if(ei&&Yo!==!1){const Xo=Object.keys(ei),{shapeFlag:hi}=vi;Xo.length&&hi&7&&(In&&Xo.some(isModelListener)&&(ei=filterModelListeners(ei,In)),vi=cloneVNode(vi,ei))}return $n.dirs&&(vi=cloneVNode(vi),vi.dirs=vi.dirs?vi.dirs.concat($n.dirs):$n.dirs),$n.transition&&(vi.transition=$n.transition),Zo=vi,setCurrentRenderingInstance(li),Zo}const getFunctionalFallthrough=_n=>{let Cn;for(const $n in _n)($n==="class"||$n==="style"||isOn($n))&&((Cn||(Cn={}))[$n]=_n[$n]);return Cn},filterModelListeners=(_n,Cn)=>{const $n={};for(const Nn in _n)(!isModelListener(Nn)||!(Nn.slice(9)in Cn))&&($n[Nn]=_n[Nn]);return $n};function shouldUpdateComponent(_n,Cn,$n){const{props:Nn,children:Bn,component:Ln}=_n,{props:In,children:Pn,patchFlag:Dn}=Cn,Wn=Ln.emitsOptions;if(Cn.dirs||Cn.transition)return!0;if($n&&Dn>=0){if(Dn&1024)return!0;if(Dn&16)return Nn?hasPropsChanged(Nn,In,Wn):!!In;if(Dn&8){const Hn=Cn.dynamicProps;for(let Yn=0;Yn_n.__isSuspense;function queueEffectWithSuspense(_n,Cn){Cn&&Cn.pendingBranch?isArray$3(_n)?Cn.effects.push(..._n):Cn.effects.push(_n):queuePostFlushCb(_n)}const ssrContextKey=Symbol.for("v-scx"),useSSRContext=()=>inject(ssrContextKey),INITIAL_WATCHER_VALUE={};function watch(_n,Cn,$n){return doWatch(_n,Cn,$n)}function doWatch(_n,Cn,{immediate:$n,deep:Nn,flush:Bn,once:Ln,onTrack:In,onTrigger:Pn}=EMPTY_OBJ){if(Cn&&Ln){const mi=Cn;Cn=(...zn)=>{mi(...zn),hi()}}const Dn=currentInstance,Wn=mi=>Nn===!0?mi:traverse(mi,Nn===!1?1:void 0);let Hn,Yn=!1,Gn=!1;if(isRef(_n)?(Hn=()=>_n.value,Yn=isShallow(_n)):isReactive(_n)?(Hn=()=>Wn(_n),Yn=!0):isArray$3(_n)?(Gn=!0,Yn=_n.some(mi=>isReactive(mi)||isShallow(mi)),Hn=()=>_n.map(mi=>{if(isRef(mi))return mi.value;if(isReactive(mi))return Wn(mi);if(isFunction$2(mi))return callWithErrorHandling(mi,Dn,2)})):isFunction$2(_n)?Cn?Hn=()=>callWithErrorHandling(_n,Dn,2):Hn=()=>(rr&&rr(),callWithAsyncErrorHandling(_n,Dn,3,[nr])):Hn=NOOP,Cn&&Nn){const mi=Hn;Hn=()=>traverse(mi())}let rr,nr=mi=>{rr=vi.onStop=()=>{callWithErrorHandling(mi,Dn,4),rr=vi.onStop=void 0}},Yo;if(isInSSRComponentSetup)if(nr=NOOP,Cn?$n&&callWithAsyncErrorHandling(Cn,Dn,3,[Hn(),Gn?[]:void 0,nr]):Hn(),Bn==="sync"){const mi=useSSRContext();Yo=mi.__watcherHandles||(mi.__watcherHandles=[])}else return NOOP;let Zo=Gn?new Array(_n.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const ei=()=>{if(!(!vi.active||!vi.dirty))if(Cn){const mi=vi.run();(Nn||Yn||(Gn?mi.some((zn,oi)=>hasChanged(zn,Zo[oi])):hasChanged(mi,Zo)))&&(rr&&rr(),callWithAsyncErrorHandling(Cn,Dn,3,[mi,Zo===INITIAL_WATCHER_VALUE?void 0:Gn&&Zo[0]===INITIAL_WATCHER_VALUE?[]:Zo,nr]),Zo=mi)}else vi.run()};ei.allowRecurse=!!Cn;let li;Bn==="sync"?li=ei:Bn==="post"?li=()=>queuePostRenderEffect(ei,Dn&&Dn.suspense):(ei.pre=!0,Dn&&(ei.id=Dn.uid),li=()=>queueJob(ei));const vi=new ReactiveEffect(Hn,NOOP,li),Xo=getCurrentScope(),hi=()=>{vi.stop(),Xo&&remove(Xo.effects,vi)};return Cn?$n?ei():Zo=vi.run():Bn==="post"?queuePostRenderEffect(vi.run.bind(vi),Dn&&Dn.suspense):vi.run(),Yo&&Yo.push(hi),hi}function instanceWatch(_n,Cn,$n){const Nn=this.proxy,Bn=isString$1(_n)?_n.includes(".")?createPathGetter(Nn,_n):()=>Nn[_n]:_n.bind(Nn,Nn);let Ln;isFunction$2(Cn)?Ln=Cn:(Ln=Cn.handler,$n=Cn);const In=setCurrentInstance(this),Pn=doWatch(Bn,Ln.bind(Nn),$n);return In(),Pn}function createPathGetter(_n,Cn){const $n=Cn.split(".");return()=>{let Nn=_n;for(let Bn=0;Bn<$n.length&&Nn;Bn++)Nn=Nn[$n[Bn]];return Nn}}function traverse(_n,Cn,$n=0,Nn){if(!isObject$5(_n)||_n.__v_skip)return _n;if(Cn&&Cn>0){if($n>=Cn)return _n;$n++}if(Nn=Nn||new Set,Nn.has(_n))return _n;if(Nn.add(_n),isRef(_n))traverse(_n.value,Cn,$n,Nn);else if(isArray$3(_n))for(let Bn=0;Bn<_n.length;Bn++)traverse(_n[Bn],Cn,$n,Nn);else if(isSet(_n)||isMap(_n))_n.forEach(Bn=>{traverse(Bn,Cn,$n,Nn)});else if(isPlainObject$3(_n))for(const Bn in _n)traverse(_n[Bn],Cn,$n,Nn);return _n}function withDirectives(_n,Cn){if(currentRenderingInstance===null)return _n;const $n=getExposeProxy(currentRenderingInstance)||currentRenderingInstance.proxy,Nn=_n.dirs||(_n.dirs=[]);for(let Bn=0;Bn{_n.isMounted=!0}),onBeforeUnmount(()=>{_n.isUnmounting=!0}),_n}const TransitionHookValidator=[Function,Array],BaseTransitionPropsValidators={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},BaseTransitionImpl={name:"BaseTransition",props:BaseTransitionPropsValidators,setup(_n,{slots:Cn}){const $n=getCurrentInstance(),Nn=useTransitionState();let Bn;return()=>{const Ln=Cn.default&&getTransitionRawChildren(Cn.default(),!0);if(!Ln||!Ln.length)return;let In=Ln[0];if(Ln.length>1){for(const Yo of Ln)if(Yo.type!==Comment){In=Yo;break}}const Pn=toRaw(_n),{mode:Dn}=Pn;if(Nn.isLeaving)return emptyPlaceholder(In);const Wn=getKeepAliveChild(In);if(!Wn)return emptyPlaceholder(In);const Hn=resolveTransitionHooks(Wn,Pn,Nn,$n);setTransitionHooks(Wn,Hn);const Yn=$n.subTree,Gn=Yn&&getKeepAliveChild(Yn);let rr=!1;const{getTransitionKey:nr}=Wn.type;if(nr){const Yo=nr();Bn===void 0?Bn=Yo:Yo!==Bn&&(Bn=Yo,rr=!0)}if(Gn&&Gn.type!==Comment&&(!isSameVNodeType(Wn,Gn)||rr)){const Yo=resolveTransitionHooks(Gn,Pn,Nn,$n);if(setTransitionHooks(Gn,Yo),Dn==="out-in")return Nn.isLeaving=!0,Yo.afterLeave=()=>{Nn.isLeaving=!1,$n.update.active!==!1&&($n.effect.dirty=!0,$n.update())},emptyPlaceholder(In);Dn==="in-out"&&Wn.type!==Comment&&(Yo.delayLeave=(Zo,ei,li)=>{const vi=getLeavingNodesForType(Nn,Gn);vi[String(Gn.key)]=Gn,Zo[leaveCbKey]=()=>{ei(),Zo[leaveCbKey]=void 0,delete Hn.delayedLeave},Hn.delayedLeave=li})}return In}}},BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(_n,Cn){const{leavingVNodes:$n}=_n;let Nn=$n.get(Cn.type);return Nn||(Nn=Object.create(null),$n.set(Cn.type,Nn)),Nn}function resolveTransitionHooks(_n,Cn,$n,Nn){const{appear:Bn,mode:Ln,persisted:In=!1,onBeforeEnter:Pn,onEnter:Dn,onAfterEnter:Wn,onEnterCancelled:Hn,onBeforeLeave:Yn,onLeave:Gn,onAfterLeave:rr,onLeaveCancelled:nr,onBeforeAppear:Yo,onAppear:Zo,onAfterAppear:ei,onAppearCancelled:li}=Cn,vi=String(_n.key),Xo=getLeavingNodesForType($n,_n),hi=(oi,Jo)=>{oi&&callWithAsyncErrorHandling(oi,Nn,9,Jo)},mi=(oi,Jo)=>{const ni=Jo[1];hi(oi,Jo),isArray$3(oi)?oi.every(si=>si.length<=1)&&ni():oi.length<=1&&ni()},zn={mode:Ln,persisted:In,beforeEnter(oi){let Jo=Pn;if(!$n.isMounted)if(Bn)Jo=Yo||Pn;else return;oi[leaveCbKey]&&oi[leaveCbKey](!0);const ni=Xo[vi];ni&&isSameVNodeType(_n,ni)&&ni.el[leaveCbKey]&&ni.el[leaveCbKey](),hi(Jo,[oi])},enter(oi){let Jo=Dn,ni=Wn,si=Hn;if(!$n.isMounted)if(Bn)Jo=Zo||Dn,ni=ei||Wn,si=li||Hn;else return;let pi=!1;const di=oi[enterCbKey]=Li=>{pi||(pi=!0,Li?hi(si,[oi]):hi(ni,[oi]),zn.delayedLeave&&zn.delayedLeave(),oi[enterCbKey]=void 0)};Jo?mi(Jo,[oi,di]):di()},leave(oi,Jo){const ni=String(_n.key);if(oi[enterCbKey]&&oi[enterCbKey](!0),$n.isUnmounting)return Jo();hi(Yn,[oi]);let si=!1;const pi=oi[leaveCbKey]=di=>{si||(si=!0,Jo(),di?hi(nr,[oi]):hi(rr,[oi]),oi[leaveCbKey]=void 0,Xo[ni]===_n&&delete Xo[ni])};Xo[ni]=_n,Gn?mi(Gn,[oi,pi]):pi()},clone(oi){return resolveTransitionHooks(oi,Cn,$n,Nn)}};return zn}function emptyPlaceholder(_n){if(isKeepAlive(_n))return _n=cloneVNode(_n),_n.children=null,_n}function getKeepAliveChild(_n){return isKeepAlive(_n)?_n.children?_n.children[0]:void 0:_n}function setTransitionHooks(_n,Cn){_n.shapeFlag&6&&_n.component?setTransitionHooks(_n.component.subTree,Cn):_n.shapeFlag&128?(_n.ssContent.transition=Cn.clone(_n.ssContent),_n.ssFallback.transition=Cn.clone(_n.ssFallback)):_n.transition=Cn}function getTransitionRawChildren(_n,Cn=!1,$n){let Nn=[],Bn=0;for(let Ln=0;Ln<_n.length;Ln++){let In=_n[Ln];const Pn=$n==null?In.key:String($n)+String(In.key!=null?In.key:Ln);In.type===Fragment?(In.patchFlag&128&&Bn++,Nn=Nn.concat(getTransitionRawChildren(In.children,Cn,Pn))):(Cn||In.type!==Comment)&&Nn.push(Pn!=null?cloneVNode(In,{key:Pn}):In)}if(Bn>1)for(let Ln=0;Lnextend$3({name:_n.name},Cn,{setup:_n}))():_n}const isAsyncWrapper=_n=>!!_n.type.__asyncLoader,isKeepAlive=_n=>_n.type.__isKeepAlive;function onActivated(_n,Cn){registerKeepAliveHook(_n,"a",Cn)}function onDeactivated(_n,Cn){registerKeepAliveHook(_n,"da",Cn)}function registerKeepAliveHook(_n,Cn,$n=currentInstance){const Nn=_n.__wdc||(_n.__wdc=()=>{let Bn=$n;for(;Bn;){if(Bn.isDeactivated)return;Bn=Bn.parent}return _n()});if(injectHook(Cn,Nn,$n),$n){let Bn=$n.parent;for(;Bn&&Bn.parent;)isKeepAlive(Bn.parent.vnode)&&injectToKeepAliveRoot(Nn,Cn,$n,Bn),Bn=Bn.parent}}function injectToKeepAliveRoot(_n,Cn,$n,Nn){const Bn=injectHook(Cn,_n,Nn,!0);onUnmounted(()=>{remove(Nn[Cn],Bn)},$n)}function injectHook(_n,Cn,$n=currentInstance,Nn=!1){if($n){const Bn=$n[_n]||($n[_n]=[]),Ln=Cn.__weh||(Cn.__weh=(...In)=>{if($n.isUnmounted)return;pauseTracking();const Pn=setCurrentInstance($n),Dn=callWithAsyncErrorHandling(Cn,$n,_n,In);return Pn(),resetTracking(),Dn});return Nn?Bn.unshift(Ln):Bn.push(Ln),Ln}}const createHook=_n=>(Cn,$n=currentInstance)=>(!isInSSRComponentSetup||_n==="sp")&&injectHook(_n,(...Nn)=>Cn(...Nn),$n),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(_n,Cn=currentInstance){injectHook("ec",_n,Cn)}function renderList(_n,Cn,$n,Nn){let Bn;const Ln=$n&&$n[Nn];if(isArray$3(_n)||isString$1(_n)){Bn=new Array(_n.length);for(let In=0,Pn=_n.length;InCn(In,Pn,void 0,Ln&&Ln[Pn]));else{const In=Object.keys(_n);Bn=new Array(In.length);for(let Pn=0,Dn=In.length;PnisVNode(Cn)?!(Cn.type===Comment||Cn.type===Fragment&&!ensureValidVNode(Cn.children)):!0)?_n:null}const getPublicInstance=_n=>_n?isStatefulComponent(_n)?getExposeProxy(_n)||_n.proxy:getPublicInstance(_n.parent):null,publicPropertiesMap=extend$3(Object.create(null),{$:_n=>_n,$el:_n=>_n.vnode.el,$data:_n=>_n.data,$props:_n=>_n.props,$attrs:_n=>_n.attrs,$slots:_n=>_n.slots,$refs:_n=>_n.refs,$parent:_n=>getPublicInstance(_n.parent),$root:_n=>getPublicInstance(_n.root),$emit:_n=>_n.emit,$options:_n=>resolveMergedOptions(_n),$forceUpdate:_n=>_n.f||(_n.f=()=>{_n.effect.dirty=!0,queueJob(_n.update)}),$nextTick:_n=>_n.n||(_n.n=nextTick.bind(_n.proxy)),$watch:_n=>instanceWatch.bind(_n)}),hasSetupBinding=(_n,Cn)=>_n!==EMPTY_OBJ&&!_n.__isScriptSetup&&hasOwn(_n,Cn),PublicInstanceProxyHandlers={get({_:_n},Cn){const{ctx:$n,setupState:Nn,data:Bn,props:Ln,accessCache:In,type:Pn,appContext:Dn}=_n;let Wn;if(Cn[0]!=="$"){const rr=In[Cn];if(rr!==void 0)switch(rr){case 1:return Nn[Cn];case 2:return Bn[Cn];case 4:return $n[Cn];case 3:return Ln[Cn]}else{if(hasSetupBinding(Nn,Cn))return In[Cn]=1,Nn[Cn];if(Bn!==EMPTY_OBJ&&hasOwn(Bn,Cn))return In[Cn]=2,Bn[Cn];if((Wn=_n.propsOptions[0])&&hasOwn(Wn,Cn))return In[Cn]=3,Ln[Cn];if($n!==EMPTY_OBJ&&hasOwn($n,Cn))return In[Cn]=4,$n[Cn];shouldCacheAccess&&(In[Cn]=0)}}const Hn=publicPropertiesMap[Cn];let Yn,Gn;if(Hn)return Cn==="$attrs"&&track(_n,"get",Cn),Hn(_n);if((Yn=Pn.__cssModules)&&(Yn=Yn[Cn]))return Yn;if($n!==EMPTY_OBJ&&hasOwn($n,Cn))return In[Cn]=4,$n[Cn];if(Gn=Dn.config.globalProperties,hasOwn(Gn,Cn))return Gn[Cn]},set({_:_n},Cn,$n){const{data:Nn,setupState:Bn,ctx:Ln}=_n;return hasSetupBinding(Bn,Cn)?(Bn[Cn]=$n,!0):Nn!==EMPTY_OBJ&&hasOwn(Nn,Cn)?(Nn[Cn]=$n,!0):hasOwn(_n.props,Cn)||Cn[0]==="$"&&Cn.slice(1)in _n?!1:(Ln[Cn]=$n,!0)},has({_:{data:_n,setupState:Cn,accessCache:$n,ctx:Nn,appContext:Bn,propsOptions:Ln}},In){let Pn;return!!$n[In]||_n!==EMPTY_OBJ&&hasOwn(_n,In)||hasSetupBinding(Cn,In)||(Pn=Ln[0])&&hasOwn(Pn,In)||hasOwn(Nn,In)||hasOwn(publicPropertiesMap,In)||hasOwn(Bn.config.globalProperties,In)},defineProperty(_n,Cn,$n){return $n.get!=null?_n._.accessCache[Cn]=0:hasOwn($n,"value")&&this.set(_n,Cn,$n.value,null),Reflect.defineProperty(_n,Cn,$n)}};function normalizePropsOrEmits(_n){return isArray$3(_n)?_n.reduce((Cn,$n)=>(Cn[$n]=null,Cn),{}):_n}let shouldCacheAccess=!0;function applyOptions(_n){const Cn=resolveMergedOptions(_n),$n=_n.proxy,Nn=_n.ctx;shouldCacheAccess=!1,Cn.beforeCreate&&callHook$1(Cn.beforeCreate,_n,"bc");const{data:Bn,computed:Ln,methods:In,watch:Pn,provide:Dn,inject:Wn,created:Hn,beforeMount:Yn,mounted:Gn,beforeUpdate:rr,updated:nr,activated:Yo,deactivated:Zo,beforeDestroy:ei,beforeUnmount:li,destroyed:vi,unmounted:Xo,render:hi,renderTracked:mi,renderTriggered:zn,errorCaptured:oi,serverPrefetch:Jo,expose:ni,inheritAttrs:si,components:pi,directives:di,filters:Li}=Cn;if(Wn&&resolveInjections(Wn,Nn,null),In)for(const gi in In){const $i=In[gi];isFunction$2($i)&&(Nn[gi]=$i.bind($n))}if(Bn){const gi=Bn.call($n,$n);isObject$5(gi)&&(_n.data=reactive(gi))}if(shouldCacheAccess=!0,Ln)for(const gi in Ln){const $i=Ln[gi],Ii=isFunction$2($i)?$i.bind($n,$n):isFunction$2($i.get)?$i.get.bind($n,$n):NOOP,sa=!isFunction$2($i)&&isFunction$2($i.set)?$i.set.bind($n):NOOP,la=computed({get:Ii,set:sa});Object.defineProperty(Nn,gi,{enumerable:!0,configurable:!0,get:()=>la.value,set:xi=>la.value=xi})}if(Pn)for(const gi in Pn)createWatcher(Pn[gi],Nn,$n,gi);if(Dn){const gi=isFunction$2(Dn)?Dn.call($n):Dn;Reflect.ownKeys(gi).forEach($i=>{provide($i,gi[$i])})}Hn&&callHook$1(Hn,_n,"c");function Ki(gi,$i){isArray$3($i)?$i.forEach(Ii=>gi(Ii.bind($n))):$i&&gi($i.bind($n))}if(Ki(onBeforeMount,Yn),Ki(onMounted,Gn),Ki(onBeforeUpdate,rr),Ki(onUpdated,nr),Ki(onActivated,Yo),Ki(onDeactivated,Zo),Ki(onErrorCaptured,oi),Ki(onRenderTracked,mi),Ki(onRenderTriggered,zn),Ki(onBeforeUnmount,li),Ki(onUnmounted,Xo),Ki(onServerPrefetch,Jo),isArray$3(ni))if(ni.length){const gi=_n.exposed||(_n.exposed={});ni.forEach($i=>{Object.defineProperty(gi,$i,{get:()=>$n[$i],set:Ii=>$n[$i]=Ii})})}else _n.exposed||(_n.exposed={});hi&&_n.render===NOOP&&(_n.render=hi),si!=null&&(_n.inheritAttrs=si),pi&&(_n.components=pi),di&&(_n.directives=di)}function resolveInjections(_n,Cn,$n=NOOP){isArray$3(_n)&&(_n=normalizeInject(_n));for(const Nn in _n){const Bn=_n[Nn];let Ln;isObject$5(Bn)?"default"in Bn?Ln=inject(Bn.from||Nn,Bn.default,!0):Ln=inject(Bn.from||Nn):Ln=inject(Bn),isRef(Ln)?Object.defineProperty(Cn,Nn,{enumerable:!0,configurable:!0,get:()=>Ln.value,set:In=>Ln.value=In}):Cn[Nn]=Ln}}function callHook$1(_n,Cn,$n){callWithAsyncErrorHandling(isArray$3(_n)?_n.map(Nn=>Nn.bind(Cn.proxy)):_n.bind(Cn.proxy),Cn,$n)}function createWatcher(_n,Cn,$n,Nn){const Bn=Nn.includes(".")?createPathGetter($n,Nn):()=>$n[Nn];if(isString$1(_n)){const Ln=Cn[_n];isFunction$2(Ln)&&watch(Bn,Ln)}else if(isFunction$2(_n))watch(Bn,_n.bind($n));else if(isObject$5(_n))if(isArray$3(_n))_n.forEach(Ln=>createWatcher(Ln,Cn,$n,Nn));else{const Ln=isFunction$2(_n.handler)?_n.handler.bind($n):Cn[_n.handler];isFunction$2(Ln)&&watch(Bn,Ln,_n)}}function resolveMergedOptions(_n){const Cn=_n.type,{mixins:$n,extends:Nn}=Cn,{mixins:Bn,optionsCache:Ln,config:{optionMergeStrategies:In}}=_n.appContext,Pn=Ln.get(Cn);let Dn;return Pn?Dn=Pn:!Bn.length&&!$n&&!Nn?Dn=Cn:(Dn={},Bn.length&&Bn.forEach(Wn=>mergeOptions(Dn,Wn,In,!0)),mergeOptions(Dn,Cn,In)),isObject$5(Cn)&&Ln.set(Cn,Dn),Dn}function mergeOptions(_n,Cn,$n,Nn=!1){const{mixins:Bn,extends:Ln}=Cn;Ln&&mergeOptions(_n,Ln,$n,!0),Bn&&Bn.forEach(In=>mergeOptions(_n,In,$n,!0));for(const In in Cn)if(!(Nn&&In==="expose")){const Pn=internalOptionMergeStrats[In]||$n&&$n[In];_n[In]=Pn?Pn(_n[In],Cn[In]):Cn[In]}return _n}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(_n,Cn){return Cn?_n?function(){return extend$3(isFunction$2(_n)?_n.call(this,this):_n,isFunction$2(Cn)?Cn.call(this,this):Cn)}:Cn:_n}function mergeInject(_n,Cn){return mergeObjectOptions(normalizeInject(_n),normalizeInject(Cn))}function normalizeInject(_n){if(isArray$3(_n)){const Cn={};for(let $n=0;$n<_n.length;$n++)Cn[_n[$n]]=_n[$n];return Cn}return _n}function mergeAsArray(_n,Cn){return _n?[...new Set([].concat(_n,Cn))]:Cn}function mergeObjectOptions(_n,Cn){return _n?extend$3(Object.create(null),_n,Cn):Cn}function mergeEmitsOrPropsOptions(_n,Cn){return _n?isArray$3(_n)&&isArray$3(Cn)?[...new Set([..._n,...Cn])]:extend$3(Object.create(null),normalizePropsOrEmits(_n),normalizePropsOrEmits(Cn??{})):Cn}function mergeWatchOptions(_n,Cn){if(!_n)return Cn;if(!Cn)return _n;const $n=extend$3(Object.create(null),_n);for(const Nn in Cn)$n[Nn]=mergeAsArray(_n[Nn],Cn[Nn]);return $n}function createAppContext(){return{app:null,config:{isNativeTag:NO,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let uid$1=0;function createAppAPI(_n,Cn){return function(Nn,Bn=null){isFunction$2(Nn)||(Nn=extend$3({},Nn)),Bn!=null&&!isObject$5(Bn)&&(Bn=null);const Ln=createAppContext(),In=new WeakSet;let Pn=!1;const Dn=Ln.app={_uid:uid$1++,_component:Nn,_props:Bn,_container:null,_context:Ln,_instance:null,version:version$1,get config(){return Ln.config},set config(Wn){},use(Wn,...Hn){return In.has(Wn)||(Wn&&isFunction$2(Wn.install)?(In.add(Wn),Wn.install(Dn,...Hn)):isFunction$2(Wn)&&(In.add(Wn),Wn(Dn,...Hn))),Dn},mixin(Wn){return Ln.mixins.includes(Wn)||Ln.mixins.push(Wn),Dn},component(Wn,Hn){return Hn?(Ln.components[Wn]=Hn,Dn):Ln.components[Wn]},directive(Wn,Hn){return Hn?(Ln.directives[Wn]=Hn,Dn):Ln.directives[Wn]},mount(Wn,Hn,Yn){if(!Pn){const Gn=createVNode(Nn,Bn);return Gn.appContext=Ln,Yn===!0?Yn="svg":Yn===!1&&(Yn=void 0),Hn&&Cn?Cn(Gn,Wn):_n(Gn,Wn,Yn),Pn=!0,Dn._container=Wn,Wn.__vue_app__=Dn,getExposeProxy(Gn.component)||Gn.component.proxy}},unmount(){Pn&&(_n(null,Dn._container),delete Dn._container.__vue_app__)},provide(Wn,Hn){return Ln.provides[Wn]=Hn,Dn},runWithContext(Wn){const Hn=currentApp;currentApp=Dn;try{return Wn()}finally{currentApp=Hn}}};return Dn}}let currentApp=null;function provide(_n,Cn){if(currentInstance){let $n=currentInstance.provides;const Nn=currentInstance.parent&¤tInstance.parent.provides;Nn===$n&&($n=currentInstance.provides=Object.create(Nn)),$n[_n]=Cn}}function inject(_n,Cn,$n=!1){const Nn=currentInstance||currentRenderingInstance;if(Nn||currentApp){const Bn=Nn?Nn.parent==null?Nn.vnode.appContext&&Nn.vnode.appContext.provides:Nn.parent.provides:currentApp._context.provides;if(Bn&&_n in Bn)return Bn[_n];if(arguments.length>1)return $n&&isFunction$2(Cn)?Cn.call(Nn&&Nn.proxy):Cn}}function initProps(_n,Cn,$n,Nn=!1){const Bn={},Ln={};def(Ln,InternalObjectKey,1),_n.propsDefaults=Object.create(null),setFullProps(_n,Cn,Bn,Ln);for(const In in _n.propsOptions[0])In in Bn||(Bn[In]=void 0);$n?_n.props=Nn?Bn:shallowReactive(Bn):_n.type.props?_n.props=Bn:_n.props=Ln,_n.attrs=Ln}function updateProps(_n,Cn,$n,Nn){const{props:Bn,attrs:Ln,vnode:{patchFlag:In}}=_n,Pn=toRaw(Bn),[Dn]=_n.propsOptions;let Wn=!1;if((Nn||In>0)&&!(In&16)){if(In&8){const Hn=_n.vnode.dynamicProps;for(let Yn=0;Yn{Dn=!0;const[Gn,rr]=normalizePropsOptions(Yn,Cn,!0);extend$3(In,Gn),rr&&Pn.push(...rr)};!$n&&Cn.mixins.length&&Cn.mixins.forEach(Hn),_n.extends&&Hn(_n.extends),_n.mixins&&_n.mixins.forEach(Hn)}if(!Ln&&!Dn)return isObject$5(_n)&&Nn.set(_n,EMPTY_ARR),EMPTY_ARR;if(isArray$3(Ln))for(let Hn=0;Hn-1,rr[1]=Yo<0||nr-1||hasOwn(rr,"default"))&&Pn.push(Yn)}}}const Wn=[In,Pn];return isObject$5(_n)&&Nn.set(_n,Wn),Wn}function validatePropName(_n){return _n[0]!=="$"&&!isReservedProp(_n)}function getType(_n){return _n===null?"null":typeof _n=="function"?_n.name||"":typeof _n=="object"&&_n.constructor&&_n.constructor.name||""}function isSameType(_n,Cn){return getType(_n)===getType(Cn)}function getTypeIndex(_n,Cn){return isArray$3(Cn)?Cn.findIndex($n=>isSameType($n,_n)):isFunction$2(Cn)&&isSameType(Cn,_n)?0:-1}const isInternalKey=_n=>_n[0]==="_"||_n==="$stable",normalizeSlotValue=_n=>isArray$3(_n)?_n.map(normalizeVNode):[normalizeVNode(_n)],normalizeSlot=(_n,Cn,$n)=>{if(Cn._n)return Cn;const Nn=withCtx((...Bn)=>normalizeSlotValue(Cn(...Bn)),$n);return Nn._c=!1,Nn},normalizeObjectSlots=(_n,Cn,$n)=>{const Nn=_n._ctx;for(const Bn in _n){if(isInternalKey(Bn))continue;const Ln=_n[Bn];if(isFunction$2(Ln))Cn[Bn]=normalizeSlot(Bn,Ln,Nn);else if(Ln!=null){const In=normalizeSlotValue(Ln);Cn[Bn]=()=>In}}},normalizeVNodeSlots=(_n,Cn)=>{const $n=normalizeSlotValue(Cn);_n.slots.default=()=>$n},initSlots=(_n,Cn)=>{if(_n.vnode.shapeFlag&32){const $n=Cn._;$n?(_n.slots=toRaw(Cn),def(Cn,"_",$n)):normalizeObjectSlots(Cn,_n.slots={})}else _n.slots={},Cn&&normalizeVNodeSlots(_n,Cn);def(_n.slots,InternalObjectKey,1)},updateSlots=(_n,Cn,$n)=>{const{vnode:Nn,slots:Bn}=_n;let Ln=!0,In=EMPTY_OBJ;if(Nn.shapeFlag&32){const Pn=Cn._;Pn?$n&&Pn===1?Ln=!1:(extend$3(Bn,Cn),!$n&&Pn===1&&delete Bn._):(Ln=!Cn.$stable,normalizeObjectSlots(Cn,Bn)),In=Cn}else Cn&&(normalizeVNodeSlots(_n,Cn),In={default:1});if(Ln)for(const Pn in Bn)!isInternalKey(Pn)&&In[Pn]==null&&delete Bn[Pn]};function setRef(_n,Cn,$n,Nn,Bn=!1){if(isArray$3(_n)){_n.forEach((Gn,rr)=>setRef(Gn,Cn&&(isArray$3(Cn)?Cn[rr]:Cn),$n,Nn,Bn));return}if(isAsyncWrapper(Nn)&&!Bn)return;const Ln=Nn.shapeFlag&4?getExposeProxy(Nn.component)||Nn.component.proxy:Nn.el,In=Bn?null:Ln,{i:Pn,r:Dn}=_n,Wn=Cn&&Cn.r,Hn=Pn.refs===EMPTY_OBJ?Pn.refs={}:Pn.refs,Yn=Pn.setupState;if(Wn!=null&&Wn!==Dn&&(isString$1(Wn)?(Hn[Wn]=null,hasOwn(Yn,Wn)&&(Yn[Wn]=null)):isRef(Wn)&&(Wn.value=null)),isFunction$2(Dn))callWithErrorHandling(Dn,Pn,12,[In,Hn]);else{const Gn=isString$1(Dn),rr=isRef(Dn);if(Gn||rr){const nr=()=>{if(_n.f){const Yo=Gn?hasOwn(Yn,Dn)?Yn[Dn]:Hn[Dn]:Dn.value;Bn?isArray$3(Yo)&&remove(Yo,Ln):isArray$3(Yo)?Yo.includes(Ln)||Yo.push(Ln):Gn?(Hn[Dn]=[Ln],hasOwn(Yn,Dn)&&(Yn[Dn]=Hn[Dn])):(Dn.value=[Ln],_n.k&&(Hn[_n.k]=Dn.value))}else Gn?(Hn[Dn]=In,hasOwn(Yn,Dn)&&(Yn[Dn]=In)):rr&&(Dn.value=In,_n.k&&(Hn[_n.k]=In))};In?(nr.id=-1,queuePostRenderEffect(nr,$n)):nr()}}}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(_n){return baseCreateRenderer(_n)}function baseCreateRenderer(_n,Cn){const $n=getGlobalThis();$n.__VUE__=!0;const{insert:Nn,remove:Bn,patchProp:Ln,createElement:In,createText:Pn,createComment:Dn,setText:Wn,setElementText:Hn,parentNode:Yn,nextSibling:Gn,setScopeId:rr=NOOP,insertStaticContent:nr}=_n,Yo=(ri,ci,_i,Ti=null,bi=null,Oi=null,Fi=void 0,Pi=null,Ri=!!ci.dynamicChildren)=>{if(ri===ci)return;ri&&!isSameVNodeType(ri,ci)&&(Ti=Qi(ri),xi(ri,bi,Oi,!0),ri=null),ci.patchFlag===-2&&(Ri=!1,ci.dynamicChildren=null);const{type:Si,ref:Di,shapeFlag:Gi}=ci;switch(Si){case Text:Zo(ri,ci,_i,Ti);break;case Comment:ei(ri,ci,_i,Ti);break;case Static:ri==null&&li(ci,_i,Ti,Fi);break;case Fragment:pi(ri,ci,_i,Ti,bi,Oi,Fi,Pi,Ri);break;default:Gi&1?hi(ri,ci,_i,Ti,bi,Oi,Fi,Pi,Ri):Gi&6?di(ri,ci,_i,Ti,bi,Oi,Fi,Pi,Ri):(Gi&64||Gi&128)&&Si.process(ri,ci,_i,Ti,bi,Oi,Fi,Pi,Ri,na)}Di!=null&&bi&&setRef(Di,ri&&ri.ref,Oi,ci||ri,!ci)},Zo=(ri,ci,_i,Ti)=>{if(ri==null)Nn(ci.el=Pn(ci.children),_i,Ti);else{const bi=ci.el=ri.el;ci.children!==ri.children&&Wn(bi,ci.children)}},ei=(ri,ci,_i,Ti)=>{ri==null?Nn(ci.el=Dn(ci.children||""),_i,Ti):ci.el=ri.el},li=(ri,ci,_i,Ti)=>{[ri.el,ri.anchor]=nr(ri.children,ci,_i,Ti,ri.el,ri.anchor)},vi=({el:ri,anchor:ci},_i,Ti)=>{let bi;for(;ri&&ri!==ci;)bi=Gn(ri),Nn(ri,_i,Ti),ri=bi;Nn(ci,_i,Ti)},Xo=({el:ri,anchor:ci})=>{let _i;for(;ri&&ri!==ci;)_i=Gn(ri),Bn(ri),ri=_i;Bn(ci)},hi=(ri,ci,_i,Ti,bi,Oi,Fi,Pi,Ri)=>{ci.type==="svg"?Fi="svg":ci.type==="math"&&(Fi="mathml"),ri==null?mi(ci,_i,Ti,bi,Oi,Fi,Pi,Ri):Jo(ri,ci,bi,Oi,Fi,Pi,Ri)},mi=(ri,ci,_i,Ti,bi,Oi,Fi,Pi)=>{let Ri,Si;const{props:Di,shapeFlag:Gi,transition:ki,dirs:qi}=ri;if(Ri=ri.el=In(ri.type,Oi,Di&&Di.is,Di),Gi&8?Hn(Ri,ri.children):Gi&16&&oi(ri.children,Ri,null,Ti,bi,resolveChildrenNamespace(ri,Oi),Fi,Pi),qi&&invokeDirectiveHook(ri,null,Ti,"created"),zn(Ri,ri,ri.scopeId,Fi,Ti),Di){for(const fa in Di)fa!=="value"&&!isReservedProp(fa)&&Ln(Ri,fa,null,Di[fa],Oi,ri.children,Ti,bi,Ui);"value"in Di&&Ln(Ri,"value",null,Di.value,Oi),(Si=Di.onVnodeBeforeMount)&&invokeVNodeHook(Si,Ti,ri)}qi&&invokeDirectiveHook(ri,null,Ti,"beforeMount");const ra=needTransition(bi,ki);ra&&ki.beforeEnter(Ri),Nn(Ri,ci,_i),((Si=Di&&Di.onVnodeMounted)||ra||qi)&&queuePostRenderEffect(()=>{Si&&invokeVNodeHook(Si,Ti,ri),ra&&ki.enter(Ri),qi&&invokeDirectiveHook(ri,null,Ti,"mounted")},bi)},zn=(ri,ci,_i,Ti,bi)=>{if(_i&&rr(ri,_i),Ti)for(let Oi=0;Oi{for(let Si=Ri;Si{const Pi=ci.el=ri.el;let{patchFlag:Ri,dynamicChildren:Si,dirs:Di}=ci;Ri|=ri.patchFlag&16;const Gi=ri.props||EMPTY_OBJ,ki=ci.props||EMPTY_OBJ;let qi;if(_i&&toggleRecurse(_i,!1),(qi=ki.onVnodeBeforeUpdate)&&invokeVNodeHook(qi,_i,ci,ri),Di&&invokeDirectiveHook(ci,ri,_i,"beforeUpdate"),_i&&toggleRecurse(_i,!0),Si?ni(ri.dynamicChildren,Si,Pi,_i,Ti,resolveChildrenNamespace(ci,bi),Oi):Fi||$i(ri,ci,Pi,null,_i,Ti,resolveChildrenNamespace(ci,bi),Oi,!1),Ri>0){if(Ri&16)si(Pi,ci,Gi,ki,_i,Ti,bi);else if(Ri&2&&Gi.class!==ki.class&&Ln(Pi,"class",null,ki.class,bi),Ri&4&&Ln(Pi,"style",Gi.style,ki.style,bi),Ri&8){const ra=ci.dynamicProps;for(let fa=0;fa{qi&&invokeVNodeHook(qi,_i,ci,ri),Di&&invokeDirectiveHook(ci,ri,_i,"updated")},Ti)},ni=(ri,ci,_i,Ti,bi,Oi,Fi)=>{for(let Pi=0;Pi{if(_i!==Ti){if(_i!==EMPTY_OBJ)for(const Pi in _i)!isReservedProp(Pi)&&!(Pi in Ti)&&Ln(ri,Pi,_i[Pi],null,Fi,ci.children,bi,Oi,Ui);for(const Pi in Ti){if(isReservedProp(Pi))continue;const Ri=Ti[Pi],Si=_i[Pi];Ri!==Si&&Pi!=="value"&&Ln(ri,Pi,Si,Ri,Fi,ci.children,bi,Oi,Ui)}"value"in Ti&&Ln(ri,"value",_i.value,Ti.value,Fi)}},pi=(ri,ci,_i,Ti,bi,Oi,Fi,Pi,Ri)=>{const Si=ci.el=ri?ri.el:Pn(""),Di=ci.anchor=ri?ri.anchor:Pn("");let{patchFlag:Gi,dynamicChildren:ki,slotScopeIds:qi}=ci;qi&&(Pi=Pi?Pi.concat(qi):qi),ri==null?(Nn(Si,_i,Ti),Nn(Di,_i,Ti),oi(ci.children||[],_i,Di,bi,Oi,Fi,Pi,Ri)):Gi>0&&Gi&64&&ki&&ri.dynamicChildren?(ni(ri.dynamicChildren,ki,_i,bi,Oi,Fi,Pi),(ci.key!=null||bi&&ci===bi.subTree)&&traverseStaticChildren(ri,ci,!0)):$i(ri,ci,_i,Di,bi,Oi,Fi,Pi,Ri)},di=(ri,ci,_i,Ti,bi,Oi,Fi,Pi,Ri)=>{ci.slotScopeIds=Pi,ri==null?ci.shapeFlag&512?bi.ctx.activate(ci,_i,Ti,Fi,Ri):Li(ci,_i,Ti,bi,Oi,Fi,Ri):ea(ri,ci,Ri)},Li=(ri,ci,_i,Ti,bi,Oi,Fi)=>{const Pi=ri.component=createComponentInstance(ri,Ti,bi);if(isKeepAlive(ri)&&(Pi.ctx.renderer=na),setupComponent(Pi),Pi.asyncDep){if(bi&&bi.registerDep(Pi,Ki),!ri.el){const Ri=Pi.subTree=createVNode(Comment);ei(null,Ri,ci,_i)}}else Ki(Pi,ri,ci,_i,bi,Oi,Fi)},ea=(ri,ci,_i)=>{const Ti=ci.component=ri.component;if(shouldUpdateComponent(ri,ci,_i))if(Ti.asyncDep&&!Ti.asyncResolved){gi(Ti,ci,_i);return}else Ti.next=ci,invalidateJob(Ti.update),Ti.effect.dirty=!0,Ti.update();else ci.el=ri.el,Ti.vnode=ci},Ki=(ri,ci,_i,Ti,bi,Oi,Fi)=>{const Pi=()=>{if(ri.isMounted){let{next:Di,bu:Gi,u:ki,parent:qi,vnode:ra}=ri;{const Ta=locateNonHydratedAsyncRoot(ri);if(Ta){Di&&(Di.el=ra.el,gi(ri,Di,Fi)),Ta.asyncDep.then(()=>{ri.isUnmounted||Pi()});return}}let fa=Di,va;toggleRecurse(ri,!1),Di?(Di.el=ra.el,gi(ri,Di,Fi)):Di=ra,Gi&&invokeArrayFns(Gi),(va=Di.props&&Di.props.onVnodeBeforeUpdate)&&invokeVNodeHook(va,qi,Di,ra),toggleRecurse(ri,!0);const ka=renderComponentRoot(ri),Aa=ri.subTree;ri.subTree=ka,Yo(Aa,ka,Yn(Aa.el),Qi(Aa),ri,bi,Oi),Di.el=ka.el,fa===null&&updateHOCHostEl(ri,ka.el),ki&&queuePostRenderEffect(ki,bi),(va=Di.props&&Di.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(va,qi,Di,ra),bi)}else{let Di;const{el:Gi,props:ki}=ci,{bm:qi,m:ra,parent:fa}=ri,va=isAsyncWrapper(ci);if(toggleRecurse(ri,!1),qi&&invokeArrayFns(qi),!va&&(Di=ki&&ki.onVnodeBeforeMount)&&invokeVNodeHook(Di,fa,ci),toggleRecurse(ri,!0),Gi&&ma){const ka=()=>{ri.subTree=renderComponentRoot(ri),ma(Gi,ri.subTree,ri,bi,null)};va?ci.type.__asyncLoader().then(()=>!ri.isUnmounted&&ka()):ka()}else{const ka=ri.subTree=renderComponentRoot(ri);Yo(null,ka,_i,Ti,ri,bi,Oi),ci.el=ka.el}if(ra&&queuePostRenderEffect(ra,bi),!va&&(Di=ki&&ki.onVnodeMounted)){const ka=ci;queuePostRenderEffect(()=>invokeVNodeHook(Di,fa,ka),bi)}(ci.shapeFlag&256||fa&&isAsyncWrapper(fa.vnode)&&fa.vnode.shapeFlag&256)&&ri.a&&queuePostRenderEffect(ri.a,bi),ri.isMounted=!0,ci=_i=Ti=null}},Ri=ri.effect=new ReactiveEffect(Pi,NOOP,()=>queueJob(Si),ri.scope),Si=ri.update=()=>{Ri.dirty&&Ri.run()};Si.id=ri.uid,toggleRecurse(ri,!0),Si()},gi=(ri,ci,_i)=>{ci.component=ri;const Ti=ri.vnode.props;ri.vnode=ci,ri.next=null,updateProps(ri,ci.props,Ti,_i),updateSlots(ri,ci.children,_i),pauseTracking(),flushPreFlushCbs(ri),resetTracking()},$i=(ri,ci,_i,Ti,bi,Oi,Fi,Pi,Ri=!1)=>{const Si=ri&&ri.children,Di=ri?ri.shapeFlag:0,Gi=ci.children,{patchFlag:ki,shapeFlag:qi}=ci;if(ki>0){if(ki&128){sa(Si,Gi,_i,Ti,bi,Oi,Fi,Pi,Ri);return}else if(ki&256){Ii(Si,Gi,_i,Ti,bi,Oi,Fi,Pi,Ri);return}}qi&8?(Di&16&&Ui(Si,bi,Oi),Gi!==Si&&Hn(_i,Gi)):Di&16?qi&16?sa(Si,Gi,_i,Ti,bi,Oi,Fi,Pi,Ri):Ui(Si,bi,Oi,!0):(Di&8&&Hn(_i,""),qi&16&&oi(Gi,_i,Ti,bi,Oi,Fi,Pi,Ri))},Ii=(ri,ci,_i,Ti,bi,Oi,Fi,Pi,Ri)=>{ri=ri||EMPTY_ARR,ci=ci||EMPTY_ARR;const Si=ri.length,Di=ci.length,Gi=Math.min(Si,Di);let ki;for(ki=0;kiDi?Ui(ri,bi,Oi,!0,!1,Gi):oi(ci,_i,Ti,bi,Oi,Fi,Pi,Ri,Gi)},sa=(ri,ci,_i,Ti,bi,Oi,Fi,Pi,Ri)=>{let Si=0;const Di=ci.length;let Gi=ri.length-1,ki=Di-1;for(;Si<=Gi&&Si<=ki;){const qi=ri[Si],ra=ci[Si]=Ri?cloneIfMounted(ci[Si]):normalizeVNode(ci[Si]);if(isSameVNodeType(qi,ra))Yo(qi,ra,_i,null,bi,Oi,Fi,Pi,Ri);else break;Si++}for(;Si<=Gi&&Si<=ki;){const qi=ri[Gi],ra=ci[ki]=Ri?cloneIfMounted(ci[ki]):normalizeVNode(ci[ki]);if(isSameVNodeType(qi,ra))Yo(qi,ra,_i,null,bi,Oi,Fi,Pi,Ri);else break;Gi--,ki--}if(Si>Gi){if(Si<=ki){const qi=ki+1,ra=qiki)for(;Si<=Gi;)xi(ri[Si],bi,Oi,!0),Si++;else{const qi=Si,ra=Si,fa=new Map;for(Si=ra;Si<=ki;Si++){const Zi=ci[Si]=Ri?cloneIfMounted(ci[Si]):normalizeVNode(ci[Si]);Zi.key!=null&&fa.set(Zi.key,Si)}let va,ka=0;const Aa=ki-ra+1;let Ta=!1,Na=0;const Ei=new Array(Aa);for(Si=0;Si=Aa){xi(Zi,bi,Oi,!0);continue}let ua;if(Zi.key!=null)ua=fa.get(Zi.key);else for(va=ra;va<=ki;va++)if(Ei[va-ra]===0&&isSameVNodeType(Zi,ci[va])){ua=va;break}ua===void 0?xi(Zi,bi,Oi,!0):(Ei[ua-ra]=Si+1,ua>=Na?Na=ua:Ta=!0,Yo(Zi,ci[ua],_i,null,bi,Oi,Fi,Pi,Ri),ka++)}const zi=Ta?getSequence(Ei):EMPTY_ARR;for(va=zi.length-1,Si=Aa-1;Si>=0;Si--){const Zi=ra+Si,ua=ci[Zi],ha=Zi+1{const{el:Oi,type:Fi,transition:Pi,children:Ri,shapeFlag:Si}=ri;if(Si&6){la(ri.component.subTree,ci,_i,Ti);return}if(Si&128){ri.suspense.move(ci,_i,Ti);return}if(Si&64){Fi.move(ri,ci,_i,na);return}if(Fi===Fragment){Nn(Oi,ci,_i);for(let Gi=0;GiPi.enter(Oi),bi);else{const{leave:Gi,delayLeave:ki,afterLeave:qi}=Pi,ra=()=>Nn(Oi,ci,_i),fa=()=>{Gi(Oi,()=>{ra(),qi&&qi()})};ki?ki(Oi,ra,fa):fa()}else Nn(Oi,ci,_i)},xi=(ri,ci,_i,Ti=!1,bi=!1)=>{const{type:Oi,props:Fi,ref:Pi,children:Ri,dynamicChildren:Si,shapeFlag:Di,patchFlag:Gi,dirs:ki}=ri;if(Pi!=null&&setRef(Pi,null,_i,ri,!0),Di&256){ci.ctx.deactivate(ri);return}const qi=Di&1&&ki,ra=!isAsyncWrapper(ri);let fa;if(ra&&(fa=Fi&&Fi.onVnodeBeforeUnmount)&&invokeVNodeHook(fa,ci,ri),Di&6)ji(ri.component,_i,Ti);else{if(Di&128){ri.suspense.unmount(_i,Ti);return}qi&&invokeDirectiveHook(ri,null,ci,"beforeUnmount"),Di&64?ri.type.remove(ri,ci,_i,bi,na,Ti):Si&&(Oi!==Fragment||Gi>0&&Gi&64)?Ui(Si,ci,_i,!1,!0):(Oi===Fragment&&Gi&384||!bi&&Di&16)&&Ui(Ri,ci,_i),Ti&&Mi(ri)}(ra&&(fa=Fi&&Fi.onVnodeUnmounted)||qi)&&queuePostRenderEffect(()=>{fa&&invokeVNodeHook(fa,ci,ri),qi&&invokeDirectiveHook(ri,null,ci,"unmounted")},_i)},Mi=ri=>{const{type:ci,el:_i,anchor:Ti,transition:bi}=ri;if(ci===Fragment){Hi(_i,Ti);return}if(ci===Static){Xo(ri);return}const Oi=()=>{Bn(_i),bi&&!bi.persisted&&bi.afterLeave&&bi.afterLeave()};if(ri.shapeFlag&1&&bi&&!bi.persisted){const{leave:Fi,delayLeave:Pi}=bi,Ri=()=>Fi(_i,Oi);Pi?Pi(ri.el,Oi,Ri):Ri()}else Oi()},Hi=(ri,ci)=>{let _i;for(;ri!==ci;)_i=Gn(ri),Bn(ri),ri=_i;Bn(ci)},ji=(ri,ci,_i)=>{const{bum:Ti,scope:bi,update:Oi,subTree:Fi,um:Pi}=ri;Ti&&invokeArrayFns(Ti),bi.stop(),Oi&&(Oi.active=!1,xi(Fi,ri,ci,_i)),Pi&&queuePostRenderEffect(Pi,ci),queuePostRenderEffect(()=>{ri.isUnmounted=!0},ci),ci&&ci.pendingBranch&&!ci.isUnmounted&&ri.asyncDep&&!ri.asyncResolved&&ri.suspenseId===ci.pendingId&&(ci.deps--,ci.deps===0&&ci.resolve())},Ui=(ri,ci,_i,Ti=!1,bi=!1,Oi=0)=>{for(let Fi=Oi;Firi.shapeFlag&6?Qi(ri.component.subTree):ri.shapeFlag&128?ri.suspense.next():Gn(ri.anchor||ri.el);let ia=!1;const Ji=(ri,ci,_i)=>{ri==null?ci._vnode&&xi(ci._vnode,null,null,!0):Yo(ci._vnode||null,ri,ci,null,null,null,_i),ia||(ia=!0,flushPreFlushCbs(),flushPostFlushCbs(),ia=!1),ci._vnode=ri},na={p:Yo,um:xi,m:la,r:Mi,mt:Li,mc:oi,pc:$i,pbc:ni,n:Qi,o:_n};let ga,ma;return Cn&&([ga,ma]=Cn(na)),{render:Ji,hydrate:ga,createApp:createAppAPI(Ji,ga)}}function resolveChildrenNamespace({type:_n,props:Cn},$n){return $n==="svg"&&_n==="foreignObject"||$n==="mathml"&&_n==="annotation-xml"&&Cn&&Cn.encoding&&Cn.encoding.includes("html")?void 0:$n}function toggleRecurse({effect:_n,update:Cn},$n){_n.allowRecurse=Cn.allowRecurse=$n}function needTransition(_n,Cn){return(!_n||_n&&!_n.pendingBranch)&&Cn&&!Cn.persisted}function traverseStaticChildren(_n,Cn,$n=!1){const Nn=_n.children,Bn=Cn.children;if(isArray$3(Nn)&&isArray$3(Bn))for(let Ln=0;Ln>1,_n[$n[Pn]]0&&(Cn[Nn]=$n[Ln-1]),$n[Ln]=Nn)}}for(Ln=$n.length,In=$n[Ln-1];Ln-- >0;)$n[Ln]=In,In=Cn[In];return $n}function locateNonHydratedAsyncRoot(_n){const Cn=_n.subTree.component;if(Cn)return Cn.asyncDep&&!Cn.asyncResolved?Cn:locateNonHydratedAsyncRoot(Cn)}const isTeleport=_n=>_n.__isTeleport,isTeleportDisabled=_n=>_n&&(_n.disabled||_n.disabled===""),isTargetSVG=_n=>typeof SVGElement<"u"&&_n instanceof SVGElement,isTargetMathML=_n=>typeof MathMLElement=="function"&&_n instanceof MathMLElement,resolveTarget=(_n,Cn)=>{const $n=_n&&_n.to;return isString$1($n)?Cn?Cn($n):null:$n},TeleportImpl={name:"Teleport",__isTeleport:!0,process(_n,Cn,$n,Nn,Bn,Ln,In,Pn,Dn,Wn){const{mc:Hn,pc:Yn,pbc:Gn,o:{insert:rr,querySelector:nr,createText:Yo,createComment:Zo}}=Wn,ei=isTeleportDisabled(Cn.props);let{shapeFlag:li,children:vi,dynamicChildren:Xo}=Cn;if(_n==null){const hi=Cn.el=Yo(""),mi=Cn.anchor=Yo("");rr(hi,$n,Nn),rr(mi,$n,Nn);const zn=Cn.target=resolveTarget(Cn.props,nr),oi=Cn.targetAnchor=Yo("");zn&&(rr(oi,zn),In==="svg"||isTargetSVG(zn)?In="svg":(In==="mathml"||isTargetMathML(zn))&&(In="mathml"));const Jo=(ni,si)=>{li&16&&Hn(vi,ni,si,Bn,Ln,In,Pn,Dn)};ei?Jo($n,mi):zn&&Jo(zn,oi)}else{Cn.el=_n.el;const hi=Cn.anchor=_n.anchor,mi=Cn.target=_n.target,zn=Cn.targetAnchor=_n.targetAnchor,oi=isTeleportDisabled(_n.props),Jo=oi?$n:mi,ni=oi?hi:zn;if(In==="svg"||isTargetSVG(mi)?In="svg":(In==="mathml"||isTargetMathML(mi))&&(In="mathml"),Xo?(Gn(_n.dynamicChildren,Xo,Jo,Bn,Ln,In,Pn),traverseStaticChildren(_n,Cn,!0)):Dn||Yn(_n,Cn,Jo,ni,Bn,Ln,In,Pn,!1),ei)oi?Cn.props&&_n.props&&Cn.props.to!==_n.props.to&&(Cn.props.to=_n.props.to):moveTeleport(Cn,$n,hi,Wn,1);else if((Cn.props&&Cn.props.to)!==(_n.props&&_n.props.to)){const si=Cn.target=resolveTarget(Cn.props,nr);si&&moveTeleport(Cn,si,null,Wn,0)}else oi&&moveTeleport(Cn,mi,zn,Wn,1)}updateCssVars(Cn)},remove(_n,Cn,$n,Nn,{um:Bn,o:{remove:Ln}},In){const{shapeFlag:Pn,children:Dn,anchor:Wn,targetAnchor:Hn,target:Yn,props:Gn}=_n;if(Yn&&Ln(Hn),In&&Ln(Wn),Pn&16){const rr=In||!isTeleportDisabled(Gn);for(let nr=0;nr0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(_n),_n}function createElementBlock(_n,Cn,$n,Nn,Bn,Ln){return setupBlock(createBaseVNode(_n,Cn,$n,Nn,Bn,Ln,!0))}function createBlock(_n,Cn,$n,Nn,Bn){return setupBlock(createVNode(_n,Cn,$n,Nn,Bn,!0))}function isVNode(_n){return _n?_n.__v_isVNode===!0:!1}function isSameVNodeType(_n,Cn){return _n.type===Cn.type&&_n.key===Cn.key}const InternalObjectKey="__vInternal",normalizeKey=({key:_n})=>_n??null,normalizeRef=({ref:_n,ref_key:Cn,ref_for:$n})=>(typeof _n=="number"&&(_n=""+_n),_n!=null?isString$1(_n)||isRef(_n)||isFunction$2(_n)?{i:currentRenderingInstance,r:_n,k:Cn,f:!!$n}:_n:null);function createBaseVNode(_n,Cn=null,$n=null,Nn=0,Bn=null,Ln=_n===Fragment?0:1,In=!1,Pn=!1){const Dn={__v_isVNode:!0,__v_skip:!0,type:_n,props:Cn,key:Cn&&normalizeKey(Cn),ref:Cn&&normalizeRef(Cn),scopeId:currentScopeId,slotScopeIds:null,children:$n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:Ln,patchFlag:Nn,dynamicProps:Bn,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return Pn?(normalizeChildren(Dn,$n),Ln&128&&_n.normalize(Dn)):$n&&(Dn.shapeFlag|=isString$1($n)?8:16),isBlockTreeEnabled>0&&!In&¤tBlock&&(Dn.patchFlag>0||Ln&6)&&Dn.patchFlag!==32&¤tBlock.push(Dn),Dn}const createVNode=_createVNode;function _createVNode(_n,Cn=null,$n=null,Nn=0,Bn=null,Ln=!1){if((!_n||_n===NULL_DYNAMIC_COMPONENT)&&(_n=Comment),isVNode(_n)){const Pn=cloneVNode(_n,Cn,!0);return $n&&normalizeChildren(Pn,$n),isBlockTreeEnabled>0&&!Ln&¤tBlock&&(Pn.shapeFlag&6?currentBlock[currentBlock.indexOf(_n)]=Pn:currentBlock.push(Pn)),Pn.patchFlag|=-2,Pn}if(isClassComponent(_n)&&(_n=_n.__vccOpts),Cn){Cn=guardReactiveProps(Cn);let{class:Pn,style:Dn}=Cn;Pn&&!isString$1(Pn)&&(Cn.class=normalizeClass(Pn)),isObject$5(Dn)&&(isProxy(Dn)&&!isArray$3(Dn)&&(Dn=extend$3({},Dn)),Cn.style=normalizeStyle(Dn))}const In=isString$1(_n)?1:isSuspense(_n)?128:isTeleport(_n)?64:isObject$5(_n)?4:isFunction$2(_n)?2:0;return createBaseVNode(_n,Cn,$n,Nn,Bn,In,Ln,!0)}function guardReactiveProps(_n){return _n?isProxy(_n)||InternalObjectKey in _n?extend$3({},_n):_n:null}function cloneVNode(_n,Cn,$n=!1){const{props:Nn,ref:Bn,patchFlag:Ln,children:In}=_n,Pn=Cn?mergeProps(Nn||{},Cn):Nn;return{__v_isVNode:!0,__v_skip:!0,type:_n.type,props:Pn,key:Pn&&normalizeKey(Pn),ref:Cn&&Cn.ref?$n&&Bn?isArray$3(Bn)?Bn.concat(normalizeRef(Cn)):[Bn,normalizeRef(Cn)]:normalizeRef(Cn):Bn,scopeId:_n.scopeId,slotScopeIds:_n.slotScopeIds,children:In,target:_n.target,targetAnchor:_n.targetAnchor,staticCount:_n.staticCount,shapeFlag:_n.shapeFlag,patchFlag:Cn&&_n.type!==Fragment?Ln===-1?16:Ln|16:Ln,dynamicProps:_n.dynamicProps,dynamicChildren:_n.dynamicChildren,appContext:_n.appContext,dirs:_n.dirs,transition:_n.transition,component:_n.component,suspense:_n.suspense,ssContent:_n.ssContent&&cloneVNode(_n.ssContent),ssFallback:_n.ssFallback&&cloneVNode(_n.ssFallback),el:_n.el,anchor:_n.anchor,ctx:_n.ctx,ce:_n.ce}}function createTextVNode(_n=" ",Cn=0){return createVNode(Text,null,_n,Cn)}function createCommentVNode(_n="",Cn=!1){return Cn?(openBlock(),createBlock(Comment,null,_n)):createVNode(Comment,null,_n)}function normalizeVNode(_n){return _n==null||typeof _n=="boolean"?createVNode(Comment):isArray$3(_n)?createVNode(Fragment,null,_n.slice()):typeof _n=="object"?cloneIfMounted(_n):createVNode(Text,null,String(_n))}function cloneIfMounted(_n){return _n.el===null&&_n.patchFlag!==-1||_n.memo?_n:cloneVNode(_n)}function normalizeChildren(_n,Cn){let $n=0;const{shapeFlag:Nn}=_n;if(Cn==null)Cn=null;else if(isArray$3(Cn))$n=16;else if(typeof Cn=="object")if(Nn&65){const Bn=Cn.default;Bn&&(Bn._c&&(Bn._d=!1),normalizeChildren(_n,Bn()),Bn._c&&(Bn._d=!0));return}else{$n=32;const Bn=Cn._;!Bn&&!(InternalObjectKey in Cn)?Cn._ctx=currentRenderingInstance:Bn===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?Cn._=1:(Cn._=2,_n.patchFlag|=1024))}else isFunction$2(Cn)?(Cn={default:Cn,_ctx:currentRenderingInstance},$n=32):(Cn=String(Cn),Nn&64?($n=16,Cn=[createTextVNode(Cn)]):$n=8);_n.children=Cn,_n.shapeFlag|=$n}function mergeProps(..._n){const Cn={};for(let $n=0;$n<_n.length;$n++){const Nn=_n[$n];for(const Bn in Nn)if(Bn==="class")Cn.class!==Nn.class&&(Cn.class=normalizeClass([Cn.class,Nn.class]));else if(Bn==="style")Cn.style=normalizeStyle([Cn.style,Nn.style]);else if(isOn(Bn)){const Ln=Cn[Bn],In=Nn[Bn];In&&Ln!==In&&!(isArray$3(Ln)&&Ln.includes(In))&&(Cn[Bn]=Ln?[].concat(Ln,In):In)}else Bn!==""&&(Cn[Bn]=Nn[Bn])}return Cn}function invokeVNodeHook(_n,Cn,$n,Nn=null){callWithAsyncErrorHandling(_n,Cn,7,[$n,Nn])}const emptyAppContext=createAppContext();let uid=0;function createComponentInstance(_n,Cn,$n){const Nn=_n.type,Bn=(Cn?Cn.appContext:_n.appContext)||emptyAppContext,Ln={uid:uid++,vnode:_n,type:Nn,parent:Cn,appContext:Bn,root:null,next:null,subTree:null,effect:null,update:null,scope:new EffectScope(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:Cn?Cn.provides:Object.create(Bn.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:normalizePropsOptions(Nn,Bn),emitsOptions:normalizeEmitsOptions(Nn,Bn),emit:null,emitted:null,propsDefaults:EMPTY_OBJ,inheritAttrs:Nn.inheritAttrs,ctx:EMPTY_OBJ,data:EMPTY_OBJ,props:EMPTY_OBJ,attrs:EMPTY_OBJ,slots:EMPTY_OBJ,refs:EMPTY_OBJ,setupState:EMPTY_OBJ,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:$n,suspenseId:$n?$n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return Ln.ctx={_:Ln},Ln.root=Cn?Cn.root:Ln,Ln.emit=emit.bind(null,Ln),_n.ce&&_n.ce(Ln),Ln}let currentInstance=null;const getCurrentInstance=()=>currentInstance||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{const _n=getGlobalThis(),Cn=($n,Nn)=>{let Bn;return(Bn=_n[$n])||(Bn=_n[$n]=[]),Bn.push(Nn),Ln=>{Bn.length>1?Bn.forEach(In=>In(Ln)):Bn[0](Ln)}};internalSetCurrentInstance=Cn("__VUE_INSTANCE_SETTERS__",$n=>currentInstance=$n),setInSSRSetupState=Cn("__VUE_SSR_SETTERS__",$n=>isInSSRComponentSetup=$n)}const setCurrentInstance=_n=>{const Cn=currentInstance;return internalSetCurrentInstance(_n),_n.scope.on(),()=>{_n.scope.off(),internalSetCurrentInstance(Cn)}},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(_n){return _n.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(_n,Cn=!1){Cn&&setInSSRSetupState(Cn);const{props:$n,children:Nn}=_n.vnode,Bn=isStatefulComponent(_n);initProps(_n,$n,Bn,Cn),initSlots(_n,Nn);const Ln=Bn?setupStatefulComponent(_n,Cn):void 0;return Cn&&setInSSRSetupState(!1),Ln}function setupStatefulComponent(_n,Cn){const $n=_n.type;_n.accessCache=Object.create(null),_n.proxy=markRaw(new Proxy(_n.ctx,PublicInstanceProxyHandlers));const{setup:Nn}=$n;if(Nn){const Bn=_n.setupContext=Nn.length>1?createSetupContext(_n):null,Ln=setCurrentInstance(_n);pauseTracking();const In=callWithErrorHandling(Nn,_n,0,[_n.props,Bn]);if(resetTracking(),Ln(),isPromise(In)){if(In.then(unsetCurrentInstance,unsetCurrentInstance),Cn)return In.then(Pn=>{handleSetupResult(_n,Pn,Cn)}).catch(Pn=>{handleError(Pn,_n,0)});_n.asyncDep=In}else handleSetupResult(_n,In,Cn)}else finishComponentSetup(_n,Cn)}function handleSetupResult(_n,Cn,$n){isFunction$2(Cn)?_n.type.__ssrInlineRender?_n.ssrRender=Cn:_n.render=Cn:isObject$5(Cn)&&(_n.setupState=proxyRefs(Cn)),finishComponentSetup(_n,$n)}let compile;function finishComponentSetup(_n,Cn,$n){const Nn=_n.type;if(!_n.render){if(!Cn&&compile&&!Nn.render){const Bn=Nn.template||resolveMergedOptions(_n).template;if(Bn){const{isCustomElement:Ln,compilerOptions:In}=_n.appContext.config,{delimiters:Pn,compilerOptions:Dn}=Nn,Wn=extend$3(extend$3({isCustomElement:Ln,delimiters:Pn},In),Dn);Nn.render=compile(Bn,Wn)}}_n.render=Nn.render||NOOP}{const Bn=setCurrentInstance(_n);pauseTracking();try{applyOptions(_n)}finally{resetTracking(),Bn()}}}function getAttrsProxy(_n){return _n.attrsProxy||(_n.attrsProxy=new Proxy(_n.attrs,{get(Cn,$n){return track(_n,"get","$attrs"),Cn[$n]}}))}function createSetupContext(_n){const Cn=$n=>{_n.exposed=$n||{}};return{get attrs(){return getAttrsProxy(_n)},slots:_n.slots,emit:_n.emit,expose:Cn}}function getExposeProxy(_n){if(_n.exposed)return _n.exposeProxy||(_n.exposeProxy=new Proxy(proxyRefs(markRaw(_n.exposed)),{get(Cn,$n){if($n in Cn)return Cn[$n];if($n in publicPropertiesMap)return publicPropertiesMap[$n](_n)},has(Cn,$n){return $n in Cn||$n in publicPropertiesMap}}))}const classifyRE=/(?:^|[-_])(\w)/g,classify=_n=>_n.replace(classifyRE,Cn=>Cn.toUpperCase()).replace(/[-_]/g,"");function getComponentName(_n,Cn=!0){return isFunction$2(_n)?_n.displayName||_n.name:_n.name||Cn&&_n.__name}function formatComponentName(_n,Cn,$n=!1){let Nn=getComponentName(Cn);if(!Nn&&Cn.__file){const Bn=Cn.__file.match(/([^/\\]+)\.\w+$/);Bn&&(Nn=Bn[1])}if(!Nn&&_n&&_n.parent){const Bn=Ln=>{for(const In in Ln)if(Ln[In]===Cn)return In};Nn=Bn(_n.components||_n.parent.type.components)||Bn(_n.appContext.components)}return Nn?classify(Nn):$n?"App":"Anonymous"}function isClassComponent(_n){return isFunction$2(_n)&&"__vccOpts"in _n}const computed=(_n,Cn)=>computed$1(_n,Cn,isInSSRComponentSetup);function h$2(_n,Cn,$n){const Nn=arguments.length;return Nn===2?isObject$5(Cn)&&!isArray$3(Cn)?isVNode(Cn)?createVNode(_n,null,[Cn]):createVNode(_n,Cn):createVNode(_n,null,Cn):(Nn>3?$n=Array.prototype.slice.call(arguments,2):Nn===3&&isVNode($n)&&($n=[$n]),createVNode(_n,Cn,$n))}const version$1="3.4.19";/** * @vue/runtime-dom v3.4.19 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT @@ -34,15 +34,15 @@ v5.4.1 https://github.com/mholt/PapaParse License: MIT */(function(_n,Cn){(function($n,Nn){_n.exports=Nn()})(commonjsGlobal,function $n(){var Nn=typeof self<"u"?self:typeof window<"u"?window:Nn!==void 0?Nn:{},Bn=!Nn.document&&!!Nn.postMessage,Ln=Nn.IS_PAPA_WORKER||!1,In={},Pn=0,Dn={parse:function(oi,Jo){var ni=(Jo=Jo||{}).dynamicTyping||!1;if(zn(ni)&&(Jo.dynamicTypingFunction=ni,ni={}),Jo.dynamicTyping=ni,Jo.transform=!!zn(Jo.transform)&&Jo.transform,Jo.worker&&Dn.WORKERS_SUPPORTED){var si=function(){if(!Dn.WORKERS_SUPPORTED)return!1;var di=(ea=Nn.URL||Nn.webkitURL||null,Ki=$n.toString(),Dn.BLOB_URL||(Dn.BLOB_URL=ea.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",Ki,")();"],{type:"text/javascript"})))),Li=new Nn.Worker(di),ea,Ki;return Li.onmessage=li,Li.id=Pn++,In[Li.id]=Li}();return si.userStep=Jo.step,si.userChunk=Jo.chunk,si.userComplete=Jo.complete,si.userError=Jo.error,Jo.step=zn(Jo.step),Jo.chunk=zn(Jo.chunk),Jo.complete=zn(Jo.complete),Jo.error=zn(Jo.error),delete Jo.worker,void si.postMessage({input:oi,config:Jo,workerId:si.id})}var pi=null;return Dn.NODE_STREAM_INPUT,typeof oi=="string"?(oi=function(di){return di.charCodeAt(0)===65279?di.slice(1):di}(oi),pi=Jo.download?new Yn(Jo):new rr(Jo)):oi.readable===!0&&zn(oi.read)&&zn(oi.on)?pi=new nr(Jo):(Nn.File&&oi instanceof File||oi instanceof Object)&&(pi=new Gn(Jo)),pi.stream(oi)},unparse:function(oi,Jo){var ni=!1,si=!0,pi=",",di=`\r -`,Li='"',ea=Li+Li,Ki=!1,gi=null,$i=!1;(function(){if(typeof Jo=="object"){if(typeof Jo.delimiter!="string"||Dn.BAD_DELIMITERS.filter(function(xi){return Jo.delimiter.indexOf(xi)!==-1}).length||(pi=Jo.delimiter),(typeof Jo.quotes=="boolean"||typeof Jo.quotes=="function"||Array.isArray(Jo.quotes))&&(ni=Jo.quotes),typeof Jo.skipEmptyLines!="boolean"&&typeof Jo.skipEmptyLines!="string"||(Ki=Jo.skipEmptyLines),typeof Jo.newline=="string"&&(di=Jo.newline),typeof Jo.quoteChar=="string"&&(Li=Jo.quoteChar),typeof Jo.header=="boolean"&&(si=Jo.header),Array.isArray(Jo.columns)){if(Jo.columns.length===0)throw new Error("Option columns is empty");gi=Jo.columns}Jo.escapeChar!==void 0&&(ea=Jo.escapeChar+Li),(typeof Jo.escapeFormulae=="boolean"||Jo.escapeFormulae instanceof RegExp)&&($i=Jo.escapeFormulae instanceof RegExp?Jo.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var Ii=new RegExp(Zo(Li),"g");if(typeof oi=="string"&&(oi=JSON.parse(oi)),Array.isArray(oi)){if(!oi.length||Array.isArray(oi[0]))return sa(null,oi,Ki);if(typeof oi[0]=="object")return sa(gi||Object.keys(oi[0]),oi,Ki)}else if(typeof oi=="object")return typeof oi.data=="string"&&(oi.data=JSON.parse(oi.data)),Array.isArray(oi.data)&&(oi.fields||(oi.fields=oi.meta&&oi.meta.fields||gi),oi.fields||(oi.fields=Array.isArray(oi.data[0])?oi.fields:typeof oi.data[0]=="object"?Object.keys(oi.data[0]):[]),Array.isArray(oi.data[0])||typeof oi.data[0]=="object"||(oi.data=[oi.data])),sa(oi.fields||[],oi.data||[],Ki);throw new Error("Unable to serialize unrecognized input");function sa(xi,Mi,Hi){var ji="";typeof xi=="string"&&(xi=JSON.parse(xi)),typeof Mi=="string"&&(Mi=JSON.parse(Mi));var Ui=Array.isArray(xi)&&0=this._config.preview;if(Ln)Nn.postMessage({results:di,workerId:Dn.WORKER_ID,finished:ea});else if(zn(this._config.chunk)&&!ni){if(this._config.chunk(di,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);di=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(di.data),this._completeResults.errors=this._completeResults.errors.concat(di.errors),this._completeResults.meta=di.meta),this._completed||!ea||!zn(this._config.complete)||di&&di.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),ea||di&&di.meta.paused||this._nextChunk(),di}this._halted=!0},this._sendError=function(Jo){zn(this._config.error)?this._config.error(Jo):Ln&&this._config.error&&Nn.postMessage({workerId:Dn.WORKER_ID,error:Jo,finished:!1})}}function Yn(oi){var Jo;(oi=oi||{}).chunkSize||(oi.chunkSize=Dn.RemoteChunkSize),Hn.call(this,oi),this._nextChunk=Bn?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(ni){this._input=ni,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(Jo=new XMLHttpRequest,this._config.withCredentials&&(Jo.withCredentials=this._config.withCredentials),Bn||(Jo.onload=mi(this._chunkLoaded,this),Jo.onerror=mi(this._chunkError,this)),Jo.open(this._config.downloadRequestBody?"POST":"GET",this._input,!Bn),this._config.downloadRequestHeaders){var ni=this._config.downloadRequestHeaders;for(var si in ni)Jo.setRequestHeader(si,ni[si])}if(this._config.chunkSize){var pi=this._start+this._config.chunkSize-1;Jo.setRequestHeader("Range","bytes="+this._start+"-"+pi)}try{Jo.send(this._config.downloadRequestBody)}catch(di){this._chunkError(di.message)}Bn&&Jo.status===0&&this._chunkError()}},this._chunkLoaded=function(){Jo.readyState===4&&(Jo.status<200||400<=Jo.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:Jo.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(ni){var si=ni.getResponseHeader("Content-Range");return si===null?-1:parseInt(si.substring(si.lastIndexOf("/")+1))}(Jo),this.parseChunk(Jo.responseText)))},this._chunkError=function(ni){var si=Jo.statusText||ni;this._sendError(new Error(si))}}function Gn(oi){var Jo,ni;(oi=oi||{}).chunkSize||(oi.chunkSize=Dn.LocalChunkSize),Hn.call(this,oi);var si=typeof FileReader<"u";this.stream=function(pi){this._input=pi,ni=pi.slice||pi.webkitSlice||pi.mozSlice,si?((Jo=new FileReader).onload=mi(this._chunkLoaded,this),Jo.onerror=mi(this._chunkError,this)):Jo=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(pi.target.result)},this._chunkError=function(){this._sendError(Jo.error)}}function rr(oi){var Jo;Hn.call(this,oi=oi||{}),this.stream=function(ni){return Jo=ni,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var ni,si=this._config.chunkSize;return si?(ni=Jo.substring(0,si),Jo=Jo.substring(si)):(ni=Jo,Jo=""),this._finished=!Jo,this.parseChunk(ni)}}}function nr(oi){Hn.call(this,oi=oi||{});var Jo=[],ni=!0,si=!1;this.pause=function(){Hn.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){Hn.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(pi){this._input=pi,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){si&&Jo.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),Jo.length?this.parseChunk(Jo.shift()):ni=!0},this._streamData=mi(function(pi){try{Jo.push(typeof pi=="string"?pi:pi.toString(this._config.encoding)),ni&&(ni=!1,this._checkIsFinished(),this.parseChunk(Jo.shift()))}catch(di){this._streamError(di)}},this),this._streamError=mi(function(pi){this._streamCleanUp(),this._sendError(pi)},this),this._streamEnd=mi(function(){this._streamCleanUp(),si=!0,this._streamData("")},this),this._streamCleanUp=mi(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function Yo(oi){var Jo,ni,si,pi=Math.pow(2,53),di=-pi,Li=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,ea=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Ki=this,gi=0,$i=0,Ii=!1,sa=!1,la=[],xi={data:[],errors:[],meta:{}};if(zn(oi.step)){var Mi=oi.step;oi.step=function(Ji){if(xi=Ji,Ui())ji();else{if(ji(),xi.data.length===0)return;gi+=Ji.data.length,oi.preview&&gi>oi.preview?ni.abort():(xi.data=xi.data[0],Mi(xi,Ki))}}}function Hi(Ji){return oi.skipEmptyLines==="greedy"?Ji.join("").trim()==="":Ji.length===1&&Ji[0].length===0}function ji(){return xi&&si&&(ia("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+Dn.DefaultDelimiter+"'"),si=!1),oi.skipEmptyLines&&(xi.data=xi.data.filter(function(Ji){return!Hi(Ji)})),Ui()&&function(){if(!xi)return;function Ji(ga,ma){zn(oi.transformHeader)&&(ga=oi.transformHeader(ga,ma)),la.push(ga)}if(Array.isArray(xi.data[0])){for(var na=0;Ui()&&na=la.length?"__parsed_extra":la[ri]),oi.transform&&(wi=oi.transform(wi,_i)),wi=Qi(_i,wi),_i==="__parsed_extra"?(ci[_i]=ci[_i]||[],ci[_i].push(wi)):ci[_i]=wi}return oi.header&&(ri>la.length?ia("FieldMismatch","TooManyFields","Too many fields: expected "+la.length+" fields but parsed "+ri,$i+ma):ri=this._config.preview;if(Ln)Nn.postMessage({results:di,workerId:Dn.WORKER_ID,finished:ea});else if(zn(this._config.chunk)&&!ni){if(this._config.chunk(di,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);di=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(di.data),this._completeResults.errors=this._completeResults.errors.concat(di.errors),this._completeResults.meta=di.meta),this._completed||!ea||!zn(this._config.complete)||di&&di.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),ea||di&&di.meta.paused||this._nextChunk(),di}this._halted=!0},this._sendError=function(Jo){zn(this._config.error)?this._config.error(Jo):Ln&&this._config.error&&Nn.postMessage({workerId:Dn.WORKER_ID,error:Jo,finished:!1})}}function Yn(oi){var Jo;(oi=oi||{}).chunkSize||(oi.chunkSize=Dn.RemoteChunkSize),Hn.call(this,oi),this._nextChunk=Bn?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(ni){this._input=ni,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(Jo=new XMLHttpRequest,this._config.withCredentials&&(Jo.withCredentials=this._config.withCredentials),Bn||(Jo.onload=mi(this._chunkLoaded,this),Jo.onerror=mi(this._chunkError,this)),Jo.open(this._config.downloadRequestBody?"POST":"GET",this._input,!Bn),this._config.downloadRequestHeaders){var ni=this._config.downloadRequestHeaders;for(var si in ni)Jo.setRequestHeader(si,ni[si])}if(this._config.chunkSize){var pi=this._start+this._config.chunkSize-1;Jo.setRequestHeader("Range","bytes="+this._start+"-"+pi)}try{Jo.send(this._config.downloadRequestBody)}catch(di){this._chunkError(di.message)}Bn&&Jo.status===0&&this._chunkError()}},this._chunkLoaded=function(){Jo.readyState===4&&(Jo.status<200||400<=Jo.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:Jo.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(ni){var si=ni.getResponseHeader("Content-Range");return si===null?-1:parseInt(si.substring(si.lastIndexOf("/")+1))}(Jo),this.parseChunk(Jo.responseText)))},this._chunkError=function(ni){var si=Jo.statusText||ni;this._sendError(new Error(si))}}function Gn(oi){var Jo,ni;(oi=oi||{}).chunkSize||(oi.chunkSize=Dn.LocalChunkSize),Hn.call(this,oi);var si=typeof FileReader<"u";this.stream=function(pi){this._input=pi,ni=pi.slice||pi.webkitSlice||pi.mozSlice,si?((Jo=new FileReader).onload=mi(this._chunkLoaded,this),Jo.onerror=mi(this._chunkError,this)):Jo=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(pi.target.result)},this._chunkError=function(){this._sendError(Jo.error)}}function rr(oi){var Jo;Hn.call(this,oi=oi||{}),this.stream=function(ni){return Jo=ni,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var ni,si=this._config.chunkSize;return si?(ni=Jo.substring(0,si),Jo=Jo.substring(si)):(ni=Jo,Jo=""),this._finished=!Jo,this.parseChunk(ni)}}}function nr(oi){Hn.call(this,oi=oi||{});var Jo=[],ni=!0,si=!1;this.pause=function(){Hn.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){Hn.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(pi){this._input=pi,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){si&&Jo.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),Jo.length?this.parseChunk(Jo.shift()):ni=!0},this._streamData=mi(function(pi){try{Jo.push(typeof pi=="string"?pi:pi.toString(this._config.encoding)),ni&&(ni=!1,this._checkIsFinished(),this.parseChunk(Jo.shift()))}catch(di){this._streamError(di)}},this),this._streamError=mi(function(pi){this._streamCleanUp(),this._sendError(pi)},this),this._streamEnd=mi(function(){this._streamCleanUp(),si=!0,this._streamData("")},this),this._streamCleanUp=mi(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function Yo(oi){var Jo,ni,si,pi=Math.pow(2,53),di=-pi,Li=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,ea=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Ki=this,gi=0,$i=0,Ii=!1,sa=!1,la=[],xi={data:[],errors:[],meta:{}};if(zn(oi.step)){var Mi=oi.step;oi.step=function(Ji){if(xi=Ji,Ui())ji();else{if(ji(),xi.data.length===0)return;gi+=Ji.data.length,oi.preview&&gi>oi.preview?ni.abort():(xi.data=xi.data[0],Mi(xi,Ki))}}}function Hi(Ji){return oi.skipEmptyLines==="greedy"?Ji.join("").trim()==="":Ji.length===1&&Ji[0].length===0}function ji(){return xi&&si&&(ia("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+Dn.DefaultDelimiter+"'"),si=!1),oi.skipEmptyLines&&(xi.data=xi.data.filter(function(Ji){return!Hi(Ji)})),Ui()&&function(){if(!xi)return;function Ji(ga,ma){zn(oi.transformHeader)&&(ga=oi.transformHeader(ga,ma)),la.push(ga)}if(Array.isArray(xi.data[0])){for(var na=0;Ui()&&na=la.length?"__parsed_extra":la[ri]),oi.transform&&(Ti=oi.transform(Ti,_i)),Ti=Qi(_i,Ti),_i==="__parsed_extra"?(ci[_i]=ci[_i]||[],ci[_i].push(Ti)):ci[_i]=Ti}return oi.header&&(ri>la.length?ia("FieldMismatch","TooManyFields","Too many fields: expected "+la.length+" fields but parsed "+ri,$i+ma):ri=Oi.length/2?`\r -`:"\r"}(Ji,ma)),si=!1,oi.delimiter)zn(oi.delimiter)&&(oi.delimiter=oi.delimiter(Ji),xi.meta.delimiter=oi.delimiter);else{var ri=function(_i,wi,bi,Oi,Fi){var Pi,Ri,Si,Di;Fi=Fi||[","," ","|",";",Dn.RECORD_SEP,Dn.UNIT_SEP];for(var Gi=0;Gi=Li)return wa(!0)}else for(ki=gi,gi++;;){if((ki=Ii.indexOf(Jo,ki+1))===-1)return la||ia.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:Qi.length,index:gi}),ka();if(ki===xi-1)return ka(Ii.substring(gi,ki).replace(Gi,Jo));if(Jo!==Ki||Ii[ki+1]!==Ki){if(Jo===Ki||ki===0||Ii[ki-1]!==Ki){Si!==-1&&Si=Li)return wa(!0);break}ia.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:Qi.length,index:gi}),ki++}}else ki++}return ka();function fa(Ei){Qi.push(Ei),na=gi}function va(Ei){var zi=0;if(Ei!==-1){var Zi=Ii.substring(ki+1,Ei);Zi&&Zi.trim()===""&&(zi=Zi.length)}return zi}function ka(Ei){return la||(Ei===void 0&&(Ei=Ii.substring(gi)),Ji.push(Ei),gi=xi,fa(Ji),Ui&&Na()),wa()}function Aa(Ei){gi=Ei,fa(Ji),Ji=[],Di=Ii.indexOf(si,gi)}function wa(Ei){return{data:Qi,errors:ia,meta:{delimiter:ni,linebreak:si,aborted:$i,truncated:!!Ei,cursor:na+(sa||0)}}}function Na(){di(wa()),Qi=[],ia=[]}},this.abort=function(){$i=!0},this.getCharIndex=function(){return gi}}function li(oi){var Jo=oi.data,ni=In[Jo.workerId],si=!1;if(Jo.error)ni.userError(Jo.error,Jo.file);else if(Jo.results&&Jo.results.data){var pi={abort:function(){si=!0,vi(Jo.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:Xo,resume:Xo};if(zn(ni.userStep)){for(var di=0;di{}},translateApis:{type:Array,default:()=>[]},translateApi:{type:String,default:""},translateApiConfig:{type:Object},tagCompleteFile:{type:String,default:""},onlyCsvOnAuto:{type:Boolean,default:!1},groupTagsTranslate:{type:Boolean,default:!0},groupTagsTranslateCache:{type:Object,default:()=>({toEn:new Map,toLocal:new Map})}},data(){return{cancelMultiTranslate:!1,globals}},computed:{langName(){for(const _n in this.languages){const Cn=this.languages[_n];if(Cn.code===this.languageCode)return Cn.name}return item.name}},methods:{getLang(_n){return common$1.getLang(_n,this.languageCode,this.languages)},replaceGlobals(_n){return common$1.replaceGlobals(_n,this.languageCode)},getCSV(_n=null,Cn=!1){return window.tagCompleteFileCache=window.tagCompleteFileCache||{},window.tagCompleteFileLoading=window.tagCompleteFileLoading||{},new Promise(($n,Nn)=>{if(_n=_n||this.tagCompleteFile,!Cn&&window.tagCompleteFileCache[_n]){$n(window.tagCompleteFileCache[_n]);return}if(window.tagCompleteFileLoading[_n]){const In=setInterval(()=>{window.tagCompleteFileLoading[_n]||(clearInterval(In),$n(window.tagCompleteFileCache[_n]))},100);return}window.tagCompleteFileLoading[_n]=!0;let Bn={toEn:new Map,toLocal:new Map},Ln=(In,Pn)=>{[In,In.replace(/\_/g," "),In.replace(/\-/g," ")].forEach(Wn=>Bn.toLocal.set(Wn,Pn)),Bn.toEn.set(Pn,In)};if(!_n&&typeof translations=="object"&&translations instanceof Map){translations.forEach((In,Pn)=>{Ln(Pn,In)}),window.tagCompleteFileLoading[_n]=!1,window.tagCompleteFileCache[_n]=Bn,$n(Bn);return}if(!_n){window.tagCompleteFileLoading[_n]=!1,window.tagCompleteFileCache[_n]=Bn,Nn(this.getLang("not_found_csv_file"));return}this.gradioAPI.getCSV(_n).then(In=>{In=Papa.parse(In,{header:!1,skipEmptyLines:!0}),In.data.forEach(Pn=>{if(Pn.length<2)return;let Dn=Pn[0].trim(),Wn=Pn[1].trim();Dn===""||Wn===""||Ln(Dn,Wn)}),window.tagCompleteFileLoading[_n]=!1,window.tagCompleteFileCache[_n]=Bn,$n(Bn)}).catch(In=>{window.tagCompleteFileLoading[_n]=!1,window.tagCompleteFileCache[_n]=Bn,In.response&&In.response.status===404?Nn(this.getLang("not_found_csv_file")):Nn(In.message)})})},_translateToLocalBy(_n,Cn,$n=!1){_n=_n.trim().toLowerCase();let Nn=Bn=>{var Ln;return((Ln=Bn.join)==null?void 0:Ln.call(Bn," / "))??Bn};if(Cn.has(_n))return Nn(Cn.get(_n));{const Bn=_n.split(",").map(Pn=>Pn.trim());let Ln=[],In=[];if(Bn.forEach(Pn=>{Cn.has(Pn)?Ln.push(Nn(Cn.get(Pn))):$n&&Pn.length&&In.push(Pn)}),Ln.length>0&&!In.length)return Ln.join(", ")}return""},async translateToLocalByCSV(_n,Cn=null,$n=!1,Nn=!1){let Bn=await this.getCSV(Cn,$n);return this._translateToLocalBy(_n,Bn.toLocal,Nn)},async translateToEnByCSV(_n,Cn=null,$n=!1){let Nn=await this.getCSV(Cn,$n);return this._toEn(_n,Nn.toEn)},async translateToLocalByGroupTags(_n,Cn=!1){return console.log("translateToLocalByGroupTags",_n),this._translateToLocalBy(_n,this.groupTagsTranslateCache.toLocal,Cn)},async translateToEnByGroupTags(_n){return this._toEn(_n,this.groupTagsTranslateCache.toEn)},_toEn(_n,Cn){return _n=_n.trim().toLowerCase(),Cn.has(_n)?Cn.get(_n):""}}},isNaN$1=Number.isNaN||window.isNaN,REGEXP_NUMBER=/^-?(?:\d+|\d+\.\d+|\.\d+)(?:[eE][-+]?\d+)?$/,REGEXP_DECIMALS=/\.\d*(?:0|9){10}\d*$/,normalizeDecimalNumber=(_n,Cn=1e11)=>REGEXP_DECIMALS.test(String(_n))?Math.round(_n*Cn)/Cn:_n,_sfc_main$g=defineComponent({name:"VueNumberInput",props:{attrs:{type:Object,default:void 0},center:Boolean,controls:Boolean,disabled:Boolean,inputtable:{type:Boolean,default:!0},inline:Boolean,max:{type:Number,default:1/0},min:{type:Number,default:-1/0},name:{type:String,default:void 0},placeholder:{type:String,default:void 0},readonly:Boolean,rounded:Boolean,size:{type:String,default:void 0},step:{type:Number,default:1},modelValue:{type:Number,default:NaN}},emits:["update:modelValue"],data(){return{value:NaN}},computed:{increasable(){return isNaN$1(this.value)||this.valuethis.min}},watch:{modelValue:{immediate:!0,handler(_n,Cn){!(isNaN$1(_n)&&typeof Cn>"u")&&_n!==this.value&&this.setValue(_n)}}},methods:{isNaN:isNaN$1,change(_n){this.setValue(_n.target.value)},paste(_n){const Cn=_n.clipboardData||window.clipboardData;Cn&&!REGEXP_NUMBER.test(Cn.getData("text"))&&_n.preventDefault()},decrease(){if(this.decreasable){let{value:_n}=this;isNaN$1(_n)&&(_n=0),this.setValue(normalizeDecimalNumber(_n-this.step))}},increase(){if(this.increasable){let{value:_n}=this;isNaN$1(_n)&&(_n=0),this.setValue(normalizeDecimalNumber(_n+this.step))}},setValue(_n){const Cn=this.value;let $n=typeof _n!="number"?parseFloat(_n):_n;isNaN$1($n)||(this.min<=this.max&&($n=Math.min(this.max,Math.max(this.min,$n))),this.rounded&&($n=Math.round($n))),this.value=$n,$n===Cn&&(this.$refs.input.value=String($n)),this.$emit("update:modelValue",$n,Cn)}}}),_export_sfc=(_n,Cn)=>{const $n=_n.__vccOpts||_n;for(const[Nn,Bn]of Cn)$n[Nn]=Bn;return $n},_hoisted_1$f=["disabled"],_hoisted_2$d=["name","value","min","max","step","readonly","disabled","placeholder"],_hoisted_3$d=["disabled"];function _sfc_render$g(_n,Cn,$n,Nn,Bn,Ln){return openBlock(),createElementBlock("div",{class:normalizeClass(["vue-number-input",{"vue-number-input--inline":_n.inline,"vue-number-input--center":_n.center,"vue-number-input--controls":_n.controls,[`vue-number-input--${_n.size}`]:_n.size}])},[_n.controls?(openBlock(),createElementBlock("button",{key:0,class:"vue-number-input__button vue-number-input__button--minus",type:"button",tabindex:"-1",disabled:_n.disabled||_n.readonly||!_n.decreasable,onClick:Cn[0]||(Cn[0]=withModifiers((...In)=>_n.decrease&&_n.decrease(...In),["prevent"]))},null,8,_hoisted_1$f)):createCommentVNode("",!0),createBaseVNode("input",mergeProps({ref:"input",class:"vue-number-input__input"},_n.attrs,{type:"number",name:_n.name,value:isNaN(_n.value)?"":_n.value,min:_n.min,max:_n.max,step:_n.step,readonly:_n.readonly||!_n.inputtable,disabled:_n.disabled||!_n.decreasable&&!_n.increasable,placeholder:_n.placeholder,autocomplete:"off",onChange:Cn[1]||(Cn[1]=(...In)=>_n.change&&_n.change(...In)),onPaste:Cn[2]||(Cn[2]=(...In)=>_n.paste&&_n.paste(...In))}),null,16,_hoisted_2$d),_n.controls?(openBlock(),createElementBlock("button",{key:1,class:"vue-number-input__button vue-number-input__button--plus",type:"button",tabindex:"-1",disabled:_n.disabled||_n.readonly||!_n.increasable,onClick:Cn[3]||(Cn[3]=withModifiers((...In)=>_n.increase&&_n.increase(...In),["prevent"]))},null,8,_hoisted_3$d)):createCommentVNode("",!0)],2)}const VueNumberInput=_export_sfc(_sfc_main$g,[["render",_sfc_render$g]]),HeaderMixin={data(){return{autocompleteResults:null,autocompleteResultsParent:null,showAppendList:!1,appendListStyle:{top:0,left:0},appendListSelected:null,appendListChildSelected:null,appendList:[{type:"wrap",name:"line_break_character",icon:"wrap",children:[]}],favorites:[],autoInputPrompt:"disabled",autoInputPromptKey:""}},computed:{appendListChildItemTags(){return this.appendListSelected===null?[]:this.appendListChildSelected===null?[]:this.appendList[this.appendListSelected].type!=="favorite"&&this.appendList[this.appendListSelected].type!=="history"?[]:this.appendList[this.appendListSelected].children[this.appendListChildSelected].tags}},mounted(){this.initAutoInputPrompt(),[{name:"txt2img",type:"prompt",key:"txt2img",neg:!1},{name:"txt2img",type:"negative_prompt",key:"txt2img_neg",neg:!0},{name:"img2img",type:"prompt",key:"img2img",neg:!1},{name:"img2img",type:"negative_prompt",key:"img2img_neg",neg:!0}].forEach(Cn=>{Cn.neg===this.neg&&this.appendList.push({type:"favorite",name:["favorite",Cn.name],icon:"favorite",key:Cn.key,dataKey:"favorite."+Cn.key,children:[]})})},methods:{onUnfoldClick(){this.hidePanel&&this.$nextTick(()=>{this.onResize()}),this.$emit("update:hidePanel",!this.hidePanel)},onTranslatesToLocalClick(){if(this.tags.length===0)return;if(this.loading.all_local){this.cancelMultiTranslate=!0,this.loading.all_local=!1;return}this.loading.all_local=!0;let _n=[];for(const Cn in this.tags)this.tags[Cn].type&&this.tags[Cn].type!=="text"||_n.push(Cn);return this.translates(_n,!0,!0).finally(()=>{this.loading.all_local=!1,this.updateTags()})},onTranslatesToEnglishClick(){if(this.tags.length===0)return;if(this.loading.all_en){this.cancelMultiTranslate=!0,this.loading.all_en=!1;return}this.loading.all_en=!0;let _n=[];for(const Cn in this.tags)this.tags[Cn].type&&this.tags[Cn].type!=="text"||_n.push(Cn);this.translates(_n,!1,!0).finally(()=>{this.loading.all_en=!1,this.updateTags()})},onCopyAllTagsClick(){this.copy(this.prompt)},onDeleteAllTagsClick(){confirm(this.getLang("delete_all_keywords_confirm"))&&(this.tags=[],this.updateTags())},onClickLoadWebuiPrompt(){this.onTextareaChange(!0)},appendListItemName(_n){let Cn=[];if(typeof _n.name=="object")for(let $n of _n.name)Cn.push(this.getLang($n));else Cn=[this.getLang(_n.name)];return Cn.join(" / ")},onAppendTagFocus(_n){if(this.$refs.promptTagAppend.value===""||this.$refs.promptTagAppend.value.trim()===""){this.appendListStyle={top:_n.target.offsetTop+_n.target.offsetHeight+"px",left:_n.target.offsetLeft+"px"},this.appendListSelected=null,this.appendListChildSelected=null,this.showAppendList=!0;let Cn=[];this.appendList.forEach($n=>{typeof $n.dataKey=="string"&&Cn.push($n.dataKey)}),this.gradioAPI.getDatas(Cn).then($n=>{this.appendList.forEach(Nn=>{typeof Nn.dataKey=="string"&&(Nn.children=$n[Nn.dataKey]||[],Nn.children.reverse())})})}this._setTextareaFocus()},onAppendTagBlur(_n){setTimeout(()=>{this.showAppendList=!1},300)},selectAppendList(_n=!0){this.appendList.length!==0&&(this.appendListSelected===null?this.appendListSelected=0:_n?(this.appendListSelected++,this.appendListSelected>=this.appendList.length&&(this.appendListSelected=0)):(this.appendListSelected--,this.appendListSelected<0&&(this.appendListSelected=this.appendList.length-1)),this.appendListChildSelected=null)},selectAppendListChild(_n=!0){this.appendList.length!==0&&this.appendListSelected!==null&&this.appendList[this.appendListSelected].children.length!==0&&(this.appendListChildSelected===null?this.appendListChildSelected=0:_n?(this.appendListChildSelected++,this.appendListChildSelected>=this.appendList[this.appendListSelected].children.length&&(this.appendListChildSelected=0)):(this.appendListChildSelected--,this.appendListChildSelected<0&&(this.appendListChildSelected=this.appendList[this.appendListSelected].children.length-1)),this.scrollAppendListChild())},scrollAppendListChild(){this.appendListSelected!==null&&(this.appendListChildSelected===0||this.appendListChildSelected===null?this.$refs.promptAppendListChildren[this.appendListSelected].scrollTop=0:this.$refs.promptAppendListChild[this.appendListChildSelected].scrollIntoView({behavior:"smooth",block:"center"}))},onAppendTagKeyDown(_n,Cn=null){if(!(_n.keyCode===38||_n.keyCode===40))if(_n.keyCode===13){if(this.getAutocompleteResults()&&(this.autocompleteResultsParent&&this.autocompleteResultsParent.style.display==="flex"||this.autocompleteResults.style.display==="none")&&this.getAutocompleteResultsSelected()){let Nn=this.getAutocompleteResultsSelectedText();setTimeout(()=>{Cn=this.$refs.promptTagAppend.value,Nn?Cn=Nn:(Nn=this.getAutocompleteResultsSelectedText(),Nn&&(Cn=Nn)),this.onAppendTagKeyDown(_n,Cn)},300);return}let $n=this.$refs.promptTagAppend.value;if(this.$refs.promptTagAppend.value="",this.showAppendList=!0,console.log($n,Cn),Cn)$n=$n.replace(/\s*,\s*$/,"").trim(),common$1.hasBrackets($n)&&($n=common$1.replaceBrackets($n)),this._appendTag($n,Cn),this.updateTags();else{common$1.hasBrackets($n)?($n=common$1.replaceBrackets($n),$n=[$n]):$n=common$1.splitTags($n,this.autoBreakBeforeWrap,this.autoBreakAfterWrap);let Nn=[];$n.forEach(Bn=>{let Ln=-1;Bn===` +`);var gi=0,$i=!1;this.parse=function(Ii,sa,la){if(typeof Ii!="string")throw new Error("Input must be a string");var xi=Ii.length,Mi=ni.length,Hi=si.length,ji=pi.length,Ui=zn(di),Qi=[],ia=[],Ji=[],na=gi=0;if(!Ii)return Ta();if(oi.header&&!sa){var ga=Ii.split(si)[0].split(ni),ma=[],ri={},ci=!1;for(var _i in ga){var Ti=ga[_i];zn(oi.transformHeader)&&(Ti=oi.transformHeader(Ti,_i));var bi=Ti,Oi=ri[Ti]||0;for(0=Li)return Ta(!0)}else for(ki=gi,gi++;;){if((ki=Ii.indexOf(Jo,ki+1))===-1)return la||ia.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:Qi.length,index:gi}),ka();if(ki===xi-1)return ka(Ii.substring(gi,ki).replace(Gi,Jo));if(Jo!==Ki||Ii[ki+1]!==Ki){if(Jo===Ki||ki===0||Ii[ki-1]!==Ki){Si!==-1&&Si=Li)return Ta(!0);break}ia.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:Qi.length,index:gi}),ki++}}else ki++}return ka();function fa(Ei){Qi.push(Ei),na=gi}function va(Ei){var zi=0;if(Ei!==-1){var Zi=Ii.substring(ki+1,Ei);Zi&&Zi.trim()===""&&(zi=Zi.length)}return zi}function ka(Ei){return la||(Ei===void 0&&(Ei=Ii.substring(gi)),Ji.push(Ei),gi=xi,fa(Ji),Ui&&Na()),Ta()}function Aa(Ei){gi=Ei,fa(Ji),Ji=[],Di=Ii.indexOf(si,gi)}function Ta(Ei){return{data:Qi,errors:ia,meta:{delimiter:ni,linebreak:si,aborted:$i,truncated:!!Ei,cursor:na+(sa||0)}}}function Na(){di(Ta()),Qi=[],ia=[]}},this.abort=function(){$i=!0},this.getCharIndex=function(){return gi}}function li(oi){var Jo=oi.data,ni=In[Jo.workerId],si=!1;if(Jo.error)ni.userError(Jo.error,Jo.file);else if(Jo.results&&Jo.results.data){var pi={abort:function(){si=!0,vi(Jo.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:Xo,resume:Xo};if(zn(ni.userStep)){for(var di=0;di{}},translateApis:{type:Array,default:()=>[]},translateApi:{type:String,default:""},translateApiConfig:{type:Object},tagCompleteFile:{type:String,default:""},onlyCsvOnAuto:{type:Boolean,default:!1},groupTagsTranslate:{type:Boolean,default:!0},groupTagsTranslateCache:{type:Object,default:()=>({toEn:new Map,toLocal:new Map})}},data(){return{cancelMultiTranslate:!1,globals}},computed:{langName(){for(const _n in this.languages){const Cn=this.languages[_n];if(Cn.code===this.languageCode)return Cn.name}return item.name}},methods:{getLang(_n){return common$1.getLang(_n,this.languageCode,this.languages)},replaceGlobals(_n){return common$1.replaceGlobals(_n,this.languageCode)},getCSV(_n=null,Cn=!1){return window.tagCompleteFileCache=window.tagCompleteFileCache||{},window.tagCompleteFileLoading=window.tagCompleteFileLoading||{},new Promise(($n,Nn)=>{if(_n=_n||this.tagCompleteFile,!Cn&&window.tagCompleteFileCache[_n]){$n(window.tagCompleteFileCache[_n]);return}if(window.tagCompleteFileLoading[_n]){const In=setInterval(()=>{window.tagCompleteFileLoading[_n]||(clearInterval(In),$n(window.tagCompleteFileCache[_n]))},100);return}window.tagCompleteFileLoading[_n]=!0;let Bn={toEn:new Map,toLocal:new Map},Ln=(In,Pn)=>{[In,In.replace(/\_/g," "),In.replace(/\-/g," ")].forEach(Wn=>Bn.toLocal.set(Wn,Pn)),Bn.toEn.set(Pn,In)};if(!_n&&typeof translations=="object"&&translations instanceof Map){translations.forEach((In,Pn)=>{Ln(Pn,In)}),window.tagCompleteFileLoading[_n]=!1,window.tagCompleteFileCache[_n]=Bn,$n(Bn);return}if(!_n){window.tagCompleteFileLoading[_n]=!1,window.tagCompleteFileCache[_n]=Bn,Nn(this.getLang("not_found_csv_file"));return}this.gradioAPI.getCSV(_n).then(In=>{In=Papa.parse(In,{header:!1,skipEmptyLines:!0}),In.data.forEach(Pn=>{if(Pn.length<2)return;let Dn=Pn[0].trim(),Wn=Pn[1].trim();Dn===""||Wn===""||Ln(Dn,Wn)}),window.tagCompleteFileLoading[_n]=!1,window.tagCompleteFileCache[_n]=Bn,$n(Bn)}).catch(In=>{window.tagCompleteFileLoading[_n]=!1,window.tagCompleteFileCache[_n]=Bn,In.response&&In.response.status===404?Nn(this.getLang("not_found_csv_file")):Nn(In.message)})})},_translateToLocalBy(_n,Cn,$n=!1){_n=_n.trim().toLowerCase();let Nn=Bn=>{var Ln;return((Ln=Bn.join)==null?void 0:Ln.call(Bn," / "))??Bn};if(Cn.has(_n))return Nn(Cn.get(_n));{const Bn=_n.split(",").map(Pn=>Pn.trim());let Ln=[],In=[];if(Bn.forEach(Pn=>{Cn.has(Pn)?Ln.push(Nn(Cn.get(Pn))):$n&&Pn.length&&In.push(Pn)}),Ln.length>0&&!In.length)return Ln.join(", ")}return""},async translateToLocalByCSV(_n,Cn=null,$n=!1,Nn=!1){let Bn=await this.getCSV(Cn,$n);return this._translateToLocalBy(_n,Bn.toLocal,Nn)},async translateToEnByCSV(_n,Cn=null,$n=!1){let Nn=await this.getCSV(Cn,$n);return this._toEn(_n,Nn.toEn)},async translateToLocalByGroupTags(_n,Cn=!1){return console.log("translateToLocalByGroupTags",_n),this._translateToLocalBy(_n,this.groupTagsTranslateCache.toLocal,Cn)},async translateToEnByGroupTags(_n){return this._toEn(_n,this.groupTagsTranslateCache.toEn)},_toEn(_n,Cn){return _n=_n.trim().toLowerCase(),Cn.has(_n)?Cn.get(_n):""}}},isNaN$1=Number.isNaN||window.isNaN,REGEXP_NUMBER=/^-?(?:\d+|\d+\.\d+|\.\d+)(?:[eE][-+]?\d+)?$/,REGEXP_DECIMALS=/\.\d*(?:0|9){10}\d*$/,normalizeDecimalNumber=(_n,Cn=1e11)=>REGEXP_DECIMALS.test(String(_n))?Math.round(_n*Cn)/Cn:_n,_sfc_main$g=defineComponent({name:"VueNumberInput",props:{attrs:{type:Object,default:void 0},center:Boolean,controls:Boolean,disabled:Boolean,inputtable:{type:Boolean,default:!0},inline:Boolean,max:{type:Number,default:1/0},min:{type:Number,default:-1/0},name:{type:String,default:void 0},placeholder:{type:String,default:void 0},readonly:Boolean,rounded:Boolean,size:{type:String,default:void 0},step:{type:Number,default:1},modelValue:{type:Number,default:NaN}},emits:["update:modelValue"],data(){return{value:NaN}},computed:{increasable(){return isNaN$1(this.value)||this.valuethis.min}},watch:{modelValue:{immediate:!0,handler(_n,Cn){!(isNaN$1(_n)&&typeof Cn>"u")&&_n!==this.value&&this.setValue(_n)}}},methods:{isNaN:isNaN$1,change(_n){this.setValue(_n.target.value)},paste(_n){const Cn=_n.clipboardData||window.clipboardData;Cn&&!REGEXP_NUMBER.test(Cn.getData("text"))&&_n.preventDefault()},decrease(){if(this.decreasable){let{value:_n}=this;isNaN$1(_n)&&(_n=0),this.setValue(normalizeDecimalNumber(_n-this.step))}},increase(){if(this.increasable){let{value:_n}=this;isNaN$1(_n)&&(_n=0),this.setValue(normalizeDecimalNumber(_n+this.step))}},setValue(_n){const Cn=this.value;let $n=typeof _n!="number"?parseFloat(_n):_n;isNaN$1($n)||(this.min<=this.max&&($n=Math.min(this.max,Math.max(this.min,$n))),this.rounded&&($n=Math.round($n))),this.value=$n,$n===Cn&&(this.$refs.input.value=String($n)),this.$emit("update:modelValue",$n,Cn)}}}),_export_sfc=(_n,Cn)=>{const $n=_n.__vccOpts||_n;for(const[Nn,Bn]of Cn)$n[Nn]=Bn;return $n},_hoisted_1$f=["disabled"],_hoisted_2$d=["name","value","min","max","step","readonly","disabled","placeholder"],_hoisted_3$d=["disabled"];function _sfc_render$g(_n,Cn,$n,Nn,Bn,Ln){return openBlock(),createElementBlock("div",{class:normalizeClass(["vue-number-input",{"vue-number-input--inline":_n.inline,"vue-number-input--center":_n.center,"vue-number-input--controls":_n.controls,[`vue-number-input--${_n.size}`]:_n.size}])},[_n.controls?(openBlock(),createElementBlock("button",{key:0,class:"vue-number-input__button vue-number-input__button--minus",type:"button",tabindex:"-1",disabled:_n.disabled||_n.readonly||!_n.decreasable,onClick:Cn[0]||(Cn[0]=withModifiers((...In)=>_n.decrease&&_n.decrease(...In),["prevent"]))},null,8,_hoisted_1$f)):createCommentVNode("",!0),createBaseVNode("input",mergeProps({ref:"input",class:"vue-number-input__input"},_n.attrs,{type:"number",name:_n.name,value:isNaN(_n.value)?"":_n.value,min:_n.min,max:_n.max,step:_n.step,readonly:_n.readonly||!_n.inputtable,disabled:_n.disabled||!_n.decreasable&&!_n.increasable,placeholder:_n.placeholder,autocomplete:"off",onChange:Cn[1]||(Cn[1]=(...In)=>_n.change&&_n.change(...In)),onPaste:Cn[2]||(Cn[2]=(...In)=>_n.paste&&_n.paste(...In))}),null,16,_hoisted_2$d),_n.controls?(openBlock(),createElementBlock("button",{key:1,class:"vue-number-input__button vue-number-input__button--plus",type:"button",tabindex:"-1",disabled:_n.disabled||_n.readonly||!_n.increasable,onClick:Cn[3]||(Cn[3]=withModifiers((...In)=>_n.increase&&_n.increase(...In),["prevent"]))},null,8,_hoisted_3$d)):createCommentVNode("",!0)],2)}const VueNumberInput=_export_sfc(_sfc_main$g,[["render",_sfc_render$g]]),HeaderMixin={data(){return{autocompleteResults:null,autocompleteResultsParent:null,showAppendList:!1,appendListStyle:{top:0,left:0},appendListSelected:null,appendListChildSelected:null,appendList:[{type:"wrap",name:"line_break_character",icon:"wrap",children:[]}],favorites:[],autoInputPrompt:"disabled",autoInputPromptKey:""}},computed:{appendListChildItemTags(){return this.appendListSelected===null?[]:this.appendListChildSelected===null?[]:this.appendList[this.appendListSelected].type!=="favorite"&&this.appendList[this.appendListSelected].type!=="history"?[]:this.appendList[this.appendListSelected].children[this.appendListChildSelected].tags}},mounted(){this.initAutoInputPrompt(),[{name:"txt2img",type:"prompt",key:"txt2img",neg:!1},{name:"txt2img",type:"negative_prompt",key:"txt2img_neg",neg:!0},{name:"img2img",type:"prompt",key:"img2img",neg:!1},{name:"img2img",type:"negative_prompt",key:"img2img_neg",neg:!0}].forEach(Cn=>{Cn.neg===this.neg&&this.appendList.push({type:"favorite",name:["favorite",Cn.name],icon:"favorite",key:Cn.key,dataKey:"favorite."+Cn.key,children:[]})})},methods:{onUnfoldClick(){this.hidePanel&&this.$nextTick(()=>{this.onResize()}),this.$emit("update:hidePanel",!this.hidePanel)},onTranslatesToLocalClick(){if(this.tags.length===0)return;if(this.loading.all_local){this.cancelMultiTranslate=!0,this.loading.all_local=!1;return}this.loading.all_local=!0;let _n=[];for(const Cn in this.tags)this.tags[Cn].type&&this.tags[Cn].type!=="text"||_n.push(Cn);return this.translates(_n,!0,!0).finally(()=>{this.loading.all_local=!1,this.updateTags()})},onTranslatesToEnglishClick(){if(this.tags.length===0)return;if(this.loading.all_en){this.cancelMultiTranslate=!0,this.loading.all_en=!1;return}this.loading.all_en=!0;let _n=[];for(const Cn in this.tags)this.tags[Cn].type&&this.tags[Cn].type!=="text"||_n.push(Cn);this.translates(_n,!1,!0).finally(()=>{this.loading.all_en=!1,this.updateTags()})},onCopyAllTagsClick(){this.copy(this.prompt)},onDeleteAllTagsClick(){confirm(this.getLang("delete_all_keywords_confirm"))&&(this.tags=[],this.updateTags())},onClickLoadWebuiPrompt(){this.onTextareaChange(!0)},appendListItemName(_n){let Cn=[];if(typeof _n.name=="object")for(let $n of _n.name)Cn.push(this.getLang($n));else Cn=[this.getLang(_n.name)];return Cn.join(" / ")},onAppendTagFocus(_n){if(this.$refs.promptTagAppend.value===""||this.$refs.promptTagAppend.value.trim()===""){this.appendListStyle={top:_n.target.offsetTop+_n.target.offsetHeight+"px",left:_n.target.offsetLeft+"px"},this.appendListSelected=null,this.appendListChildSelected=null,this.showAppendList=!0;let Cn=[];this.appendList.forEach($n=>{typeof $n.dataKey=="string"&&Cn.push($n.dataKey)}),this.gradioAPI.getDatas(Cn).then($n=>{this.appendList.forEach(Nn=>{typeof Nn.dataKey=="string"&&(Nn.children=$n[Nn.dataKey]||[],Nn.children.reverse())})})}this._setTextareaFocus()},onAppendTagBlur(_n){setTimeout(()=>{this.showAppendList=!1},300)},selectAppendList(_n=!0){this.appendList.length!==0&&(this.appendListSelected===null?this.appendListSelected=0:_n?(this.appendListSelected++,this.appendListSelected>=this.appendList.length&&(this.appendListSelected=0)):(this.appendListSelected--,this.appendListSelected<0&&(this.appendListSelected=this.appendList.length-1)),this.appendListChildSelected=null)},selectAppendListChild(_n=!0){this.appendList.length!==0&&this.appendListSelected!==null&&this.appendList[this.appendListSelected].children.length!==0&&(this.appendListChildSelected===null?this.appendListChildSelected=0:_n?(this.appendListChildSelected++,this.appendListChildSelected>=this.appendList[this.appendListSelected].children.length&&(this.appendListChildSelected=0)):(this.appendListChildSelected--,this.appendListChildSelected<0&&(this.appendListChildSelected=this.appendList[this.appendListSelected].children.length-1)),this.scrollAppendListChild())},scrollAppendListChild(){this.appendListSelected!==null&&(this.appendListChildSelected===0||this.appendListChildSelected===null?this.$refs.promptAppendListChildren[this.appendListSelected].scrollTop=0:this.$refs.promptAppendListChild[this.appendListChildSelected].scrollIntoView({behavior:"smooth",block:"center"}))},onAppendTagKeyDown(_n,Cn=null){if(!(_n.keyCode===38||_n.keyCode===40))if(_n.keyCode===13){if(this.getAutocompleteResults()&&(this.autocompleteResultsParent&&this.autocompleteResultsParent.style.display==="flex"||this.autocompleteResults.style.display==="none")&&this.getAutocompleteResultsSelected()){let Nn=this.getAutocompleteResultsSelectedText();setTimeout(()=>{Cn=this.$refs.promptTagAppend.value,Nn?Cn=Nn:(Nn=this.getAutocompleteResultsSelectedText(),Nn&&(Cn=Nn)),this.onAppendTagKeyDown(_n,Cn)},300);return}let $n=this.$refs.promptTagAppend.value;if(this.$refs.promptTagAppend.value="",this.showAppendList=!0,console.log($n,Cn),Cn)$n=$n.replace(/\s*,\s*$/,"").trim(),common$1.hasBrackets($n)&&($n=common$1.replaceBrackets($n)),this._appendTag($n,Cn),this.updateTags();else{common$1.hasBrackets($n)?($n=common$1.replaceBrackets($n),$n=[$n]):$n=common$1.splitTags($n,this.autoBreakBeforeWrap,this.autoBreakAfterWrap);let Nn=[];$n.forEach(Bn=>{let Ln=-1;Bn===` `?Ln=this._appendTag(` `,` `,!1,-1,"wrap"):Ln=this._appendTag(Bn),Ln!==-1&&Nn.push(Ln)}),this.autoTranslateByIndexes(Nn)}}else this.removeAutocompleteResultsSelected()},autoTranslateByIndexes(_n){this.updatePrompt(),this.autoTranslateToEnglish||this.autoTranslateToLocal?this.$nextTick(()=>{let Cn=!(this.tagCompleteFile&&this.onlyCsvOnAuto);this.autoTranslateToEnglish?this.translates(_n,!1,Cn).finally(()=>{this.updateTags()}):this.autoTranslateToLocal&&this.translates(_n,!0,Cn).finally(()=>{this.updateTags()})}):this.updateTags()},onAppendTagKeyUp(_n){this.$refs.promptTagAppend.value===""||this.$refs.promptTagAppend.value.trim()===""?(this.$refs.promptTagAppend.value="",this.showAppendList=!0,_n.keyCode===38||_n.keyCode===40?this.appendListChildSelected===null?this.selectAppendList(_n.keyCode===40):this.selectAppendListChild(_n.keyCode===40):_n.keyCode===37||_n.keyCode===39?this.appendListSelected!==null&&(_n.keyCode===37?(this.appendListChildSelected=null,this.scrollAppendListChild()):this.appendList[this.appendListSelected].children.length===0?this.appendListChildSelected=null:(this.appendListChildSelected=0,this.scrollAppendListChild())):_n.keyCode===13&&(this._appendTagByList(),this.scrollAppendListChild(),this.appendListSelected=null,this.appendListChildSelected=null)):this.showAppendList=!1},onAppendGroupClick(_n,Cn,$n){if(_n!==null){if(this.appendListSelected=_n,Cn===null){if(this.appendList[this.appendListSelected].children.length>0)return}else this.appendListChildSelected=Cn;this._appendTagByList()}},onAppendListChildMouseLeave(_n,Cn,$n){this.appendListSelected=null,this.appendListChildSelected=null},onAppendListChildMouseEnter(_n,Cn,$n){this.appendListSelected=_n,this.appendListChildSelected=Cn},_appendTagByList(){if(this.appendListSelected===null)return;const _n=this.appendList[this.appendListSelected];let Cn=null;_n.children.length>0&&this.appendListChildSelected!==null&&(Cn=_n.children[this.appendListChildSelected]);let $n=[];switch(_n.type){case"wrap":$n.push({value:` @@ -50,7 +50,7 @@ License: MIT `,disabled:!1,type:"wrap"});break;case"lora":break;case"favorite":case"history":Cn&&Cn.tags.forEach(Nn=>{$n.push({value:Nn.value,localValue:Nn.localValue,disabled:Nn.disabled,type:Nn.type||"text"})});break}$n.length<=0||($n.forEach(Nn=>{this._appendTag(Nn.value,Nn.localValue,Nn.disabled,-1,Nn.type)}),this.updateTags())},getAutocompleteResults(){if(!this.autocompleteResults){const _n=this.$refs.promptTagAppend.parentElement.querySelector(".autocompleteResults");if(_n){this.autocompleteResults=_n,this.autocompleteResults.getAttribute("data-mousemove")!=="true"&&(this.autocompleteResults.setAttribute("data-mousemove","true"),this.autocompleteResults.addEventListener("mousemove",$n=>{this.bindAutocompleteResultsClick()}));const Cn=this.$refs.promptTagAppend.parentElement.querySelector(".autocompleteParent");Cn&&(this.autocompleteResultsParent=Cn)}}return this.autocompleteResults},removeAutocompleteResultsSelected(){const _n=this.getAutocompleteResults();return _n?(_n.querySelectorAll("li").forEach(Cn=>{Cn.classList.remove("selected")}),!0):!1},getAutocompleteResultsSelected(){const _n=this.getAutocompleteResults();if(!_n)return null;const Cn=_n.querySelector("li.selected");return Cn||null},getAutocompleteResultsSelectedText(_n=null){if(!_n&&(_n=this.getAutocompleteResultsSelected(),!_n))return null;const Nn=_n.querySelector(".acListItem").innerText.match(/\[(.+?)\]/);return Nn?Nn[1]:null},bindAutocompleteResultsClick(){if(this.getAutocompleteResults(),!this.autocompleteResults)return;this.autocompleteResults.querySelectorAll("li").forEach(Cn=>{Cn.getAttribute("physton-on-clicked")!=="true"&&(Cn.setAttribute("physton-on-clicked","true"),Cn.addEventListener("click",()=>{this.onAutocompleteResultsClicked(Cn)}))})},onAutocompleteResultsClicked(_n){const Cn=this.getAutocompleteResultsSelectedText(_n);setTimeout(()=>{let $n=this.$refs.promptTagAppend.value.replace(/,\s*$/,"");this.$refs.promptTagAppend.value="",$n=$n.replace(/\s*,\s*$/,"").trim(),common$1.hasBrackets($n)&&($n=common$1.replaceBrackets($n)),this._appendTag($n,Cn),this.updateTags()},300)},onSettingBoxMouseEnter(){this.favorites=typeof window.phystonPromptfavorites=="object"?window.phystonPromptfavorites:[]},getCurrentTypeFavorites(){this.favorites=typeof window.phystonPromptfavorites=="object"?window.phystonPromptfavorites:[];let _n=[];return this.favorites.forEach(Cn=>{if(this.neg){if(Cn.type!=="negative_prompt")return}else if(Cn.type!=="prompt")return;_n.push(Cn)}),_n},onAutoInputPromptChange(){this.gradioAPI.setData(this.autoInputPromptKey,this.autoInputPrompt).then(()=>{this.$toastr.success(this.getLang("success"))}).catch(()=>{this.$toastr.error(this.getLang("failed"))})},initAutoInputPrompt(){this.autoInputPromptKey="autoInputPrompt-"+this.name,this.gradioAPI.getData(this.autoInputPromptKey).then(_n=>{if(_n!==null)if(this.autoInputPrompt=_n,this.autoInputPrompt==="last")this.gradioAPI.getLatestHistory(this.historyKey).then(Cn=>{this.useHistory(Cn)});else{const Cn=()=>{if(typeof window.phystonPromptfavorites=="object"&&window.phystonPromptfavorites.length>0){for(let $n of window.phystonPromptfavorites)for(let Nn of $n.list)if(Nn.id===this.autoInputPrompt){this.useFavorite(Nn);return}return}setTimeout(Cn,100)};setTimeout(Cn,100)}})}}},DropMixin={data(){return{dropStartX:0,dropStartY:0,dropEndX:0,dropEndY:0,dropOffsetX:0,dropOffsetY:0,dropIsSelecting:!1,dropIsStart:!1,dropIsEnd:!1,dropArea:{top:0,left:0,width:0,height:0},dropTags:[],dropTimeId:0}},methods:{_dropOver(){this.dropIsSelecting=!1,this.dropIsStart=!1,this.dropIsEnd=!1,this.dropTags=[];for(let _n=0;_nthis.dropArea.left+this.dropArea.width||Bn>this.dropArea.top+this.dropArea.height)?(_n.push($n.getAttribute("data-id")),$n.classList.add("drop-selected")):$n.classList.remove("drop-selected"),this.dropTags=_n}},onDropMouseUp(_n){this.dropIsSelecting=!1,this.dropIsStart=!1,this.dropIsEnd=!0,this.$refs.dropSelectBtns.style.left=this.$refs.dropSelectBox.style.left,this.$refs.dropSelectBtns.style.top=this.$refs.dropSelectBox.style.top},_getDropTags(){let _n=[];return this.dropTags.forEach(Cn=>{let $n=this.tags.find(Nn=>Nn.id===Cn);$n&&_n.push($n)}),_n},_getDropIndexes(){let _n=[];return this.dropTags.forEach(Cn=>{let $n=this.tags.findIndex(Nn=>Nn.id===Cn);$n!==-1&&_n.push($n)}),_n},_getDropTagsEle(){let _n=[];return this.dropTags.forEach(Cn=>{let $n=this.$refs.promptTagsList.querySelector(`.prompt-tag[data-id="${Cn}"]`);$n&&_n.push($n)}),_n},onDropCopy(){let _n=this._getDropTags();this._dropOver();let Cn=this.genPrompt(_n,!0);this.copy(Cn)},onDropFavorite(){let _n=this._getDropTags();this._dropOver();let Cn=this.genPrompt(_n,!0);this.gradioAPI.pushFavorite(this.favoriteKey,_n,Cn,"").then($n=>{$n?(this.$toastr.success(this.getLang("success")),this.$emit("refreshFavorites",this.favoriteKey)):this.$toastr.error(this.getLang("failed"))}).catch($n=>{this.$toastr.error(this.getLang("failed"))})},onDropDisable(){let _n=this._getDropTags();this._dropOver(),_n.forEach(Cn=>{Cn.disabled=!0}),this.updateTags()},onDropEnable(){let _n=this._getDropTags();this._dropOver(),_n.forEach(Cn=>{Cn.disabled=!1}),this.updateTags()},onDropDelete(){let _n=this._getDropIndexes();this._dropOver(),_n.sort((Cn,$n)=>$n-Cn),_n.forEach(Cn=>{this.tags.splice(Cn,1)}),this.updateTags()}}};var GHOST_ELEMENT_ID="__autosizeInputGhost",characterEntities={" ":"nbsp","<":"lt",">":"gt"};function mapSpecialCharacterToCharacterEntity(_n){return"&"+characterEntities[_n]+";"}function escapeSpecialCharacters(_n){return _n.replace(/\s|<|>/g,mapSpecialCharacterToCharacterEntity)}function createGhostElement(){var _n=document.createElement("div");return _n.id=GHOST_ELEMENT_ID,_n.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;",document.body.appendChild(_n),_n}var autosizeInput=function(_n,Cn){var $n=window.getComputedStyle(_n),Nn="box-sizing:"+$n.boxSizing+";border-left:"+$n.borderLeftWidth+" solid red;border-right:"+$n.borderRightWidth+" solid red;font-family:"+$n.fontFamily+";font-feature-settings:"+$n.fontFeatureSettings+";font-kerning:"+$n.fontKerning+";font-size:"+$n.fontSize+";font-stretch:"+$n.fontStretch+";font-style:"+$n.fontStyle+";font-variant:"+$n.fontVariant+";font-variant-caps:"+$n.fontVariantCaps+";font-variant-ligatures:"+$n.fontVariantLigatures+";font-variant-numeric:"+$n.fontVariantNumeric+";font-weight:"+$n.fontWeight+";letter-spacing:"+$n.letterSpacing+";margin-left:"+$n.marginLeft+";margin-right:"+$n.marginRight+";padding-left:"+$n.paddingLeft+";padding-right:"+$n.paddingRight+";text-indent:"+$n.textIndent+";text-transform:"+$n.textTransform;function Bn(){var In=_n.value||_n.getAttribute("placeholder")||"",Pn=document.getElementById(GHOST_ELEMENT_ID)||createGhostElement();Pn.style.cssText+=Nn,Pn.innerHTML=escapeSpecialCharacters(In);var Dn=window.getComputedStyle(Pn).width;return _n.style.width=Dn,Dn}_n.addEventListener("input",Bn);var Ln=Bn();return Cn&&Cn.minWidth&&Ln!=="0px"&&(_n.style.minWidth=Ln),function(){_n.removeEventListener("input",Bn);var In=document.getElementById(GHOST_ELEMENT_ID);In&&In.parentNode.removeChild(In)}};const autoSizeInput=getDefaultExportFromCjs(autosizeInput),TagMixin={data(){return{tagClickTimeId:0,showExtendId:""}},mounted(){},methods:{_setTag(_n){if(typeof _n.type=="string"&&_n.type==="wrap")_n.weightNum=1,_n.incWeight=0,_n.decWeight=0;else if(_n.weightNum=common$1.getTagWeightNum(_n.value),_n.incWeight=common$1.getTagIncWeight(_n.value,this.useNovelAiWeightSymbol),_n.decWeight=common$1.getTagDecWeight(_n.value),_n.originalValue=_n.value,!_n.value.match(common$1.loraRegex)&&!_n.value.match(common$1.lycoRegex)){let Cn=_n.value;const $n=common$1.hasBrackets(Cn);($n[0]==="("&&$n[1]===")"||$n[0]==="["&&$n[1]==="]"||this.useNovelAiWeightSymbol&&$n[0]==="{"&&$n[1]==="}")&&(Cn=common$1.setLayers(Cn,0,$n[0],$n[1]),_n.originalValue=Cn.replace(common$1.weightNumRegex,"$1"))}this._setTagClass(_n),this.$nextTick(()=>{this._setTagHeight(_n)})},_setTagHeight(_n){let Cn=10,$n=setInterval(()=>{if(Cn--,Cn<=0&&clearInterval($n),!this.$refs["promptTagValue-"+_n.id]||!this.$refs["promptTagValue-"+_n.id][0])return!1;clearInterval($n);let Nn=this.$refs["promptTagValue-"+_n.id][0],Bn=Nn.offsetHeight;Nn.parentNode.style.height=Bn+"px",this.$refs["promptTagEdit-"+_n.id]&&(this.$refs["promptTagEdit-"+_n.id][0].style.height=Bn+"px"),this.$refs["promptTagDelete-"+_n.id]&&(this.$refs["promptTagDelete-"+_n.id][0].style.height=Bn+"px")},50)},_getTagType(_n){},_setTagClass(_n){if(_n.isLora=!1,_n.loraExists=!1,_n.isLyco=!1,_n.lycoExists=!1,_n.isEmbedding=!1,!(typeof _n.type=="string"&&_n.type==="wrap")){const $n=_n.value.match(common$1.loraRegex);if($n&&(_n.isLora=!0,_n.loraName=$n[1],this.loraExists($n[1])!==!1&&(_n.loraExists=!0)),!_n.isLora){const Nn=_n.value.match(common$1.lycoRegex);Nn&&(_n.isLyco=!0,_n.lycoName=Nn[1],this.lycoExists(Nn[1])!==!1&&(_n.lycoExists=!0))}if(!_n.isLora&&!_n.isLyco){const Nn=this.embeddingExists(_n.value);if(Nn!==!1)_n.isEmbedding=!0,_n.value=Nn,_n.embeddingName=Nn;else{const Bn=this.embeddingExists(_n.originalValue);Bn!==!1&&(_n.isEmbedding=!0,_n.embeddingName=Bn)}}}let Cn=["prompt-tag-value"];return _n.isLora?(Cn.push("lora-tag"),_n.loraExists||Cn.push("lora-not-exists")):_n.isLyco?(Cn.push("lyco-tag"),_n.lycoExists||Cn.push("lyco-not-exists")):_n.isEmbedding?Cn.push("embedding-tag"):this.neg&&Cn.push("neg-tag"),_n.classes=Cn,Cn},_setTagById(_n,Cn=null,$n=null){let Nn=this.tags.find(Bn=>Bn.id===_n);return Nn?(Cn!==null&&(Nn.value=Cn),$n!==null&&(Nn.localValue=$n),Nn):!1},_isTagBlacklist(_n){var Cn,$n,Nn,Bn,Ln;if(typeof _n.type=="string"&&_n.type==="wrap")return!1;if(_n.isLora){if((Cn=this.blacklist.lora)!=null&&Cn.includes(_n.loraName.toLowerCase()))return!0}else if(_n.isLyco){if(($n=this.blacklist.lycoris)!=null&&$n.includes(_n.lycoName.toLowerCase()))return!0}else if(_n.isEmbedding){if((Nn=this.blacklist.embedding)!=null&&Nn.includes(_n.embeddingName.toLowerCase()))return!0}else if(this.neg){if((Bn=this.blacklist.negative_prompt)!=null&&Bn.includes(_n.originalValue.toLowerCase()))return!0}else if((Ln=this.blacklist.prompt)!=null&&Ln.includes(_n.originalValue.toLowerCase()))return!0;return!1},_appendTag(_n,Cn="",$n=!1,Nn=-1,Bn="text"){if(_n==="")return-1;const Ln=Date.now()+(Math.random()*1e6).toFixed(0);let In={id:Ln,value:_n==null||_n===!1?"":_n,localValue:Cn==null||Cn===!1?"":Cn,disabled:$n,type:Bn};return this._setTag(In),this._isTagBlacklist(In)?-1:(Nn>=0?this.tags.splice(Nn,0,In):Nn=this.tags.push(In),this.$nextTick(()=>{this.$refs["promptTagEdit-"+Ln]&&autoSizeInput(this.$refs["promptTagEdit-"+Ln][0])}),Nn-1)},renderTag(_n){let Cn=this.tags.find(Nn=>Nn.id===_n);if(!Cn)return"";let $n=Cn.value;if($n==="BREAK"&&(this.autoBreakBeforeWrap||this.autoBreakAfterWrap))$n='
---------------------
BREAK
---------------------
';else if($n=common$1.escapeHtml($n),Cn.incWeight>0)if(this.useNovelAiWeightSymbol){$n=common$1.setLayers($n,0,"{","}"),$n='
'+$n+"
";let Nn='
'+"{".repeat(Cn.incWeight)+"
",Bn='
'+"}".repeat(Cn.incWeight)+"
";$n=Nn+$n+Bn}else{$n=common$1.setLayers($n,0,"(",")"),$n='
'+$n+"
";let Nn='
'+"(".repeat(Cn.incWeight)+"
",Bn='
'+")".repeat(Cn.incWeight)+"
";$n=Nn+$n+Bn}else if(Cn.decWeight>0){$n=common$1.setLayers($n,0,"[","]"),$n='
'+$n+"
";let Nn='
'+"[".repeat(Cn.decWeight)+"
",Bn='
'+"]".repeat(Cn.decWeight)+"
";$n=Nn+$n+Bn}else $n='
'+$n+"
";return $n},isFavorite(_n){let Cn=this.tags.find($n=>$n.id===_n);if(!Cn)return!1;if(typeof window.phystonPromptfavorites=="object"){for(const $n of window.phystonPromptfavorites)if($n.key===this.favoriteKey){for(const Nn of $n.list)if(Nn.tags.length===1&&Nn.tags[0].value===Cn.value)return Nn.id}}return!1},onLoraPopupUseKeywords(_n){let Cn=[];for(let $n of _n){let Nn=$n.toLowerCase();if(!this.tags.find(Ln=>Ln.value.toLowerCase()===Nn)){let Ln=this._appendTag($n,"",!1,-1,"text");Ln!==-1&&Cn.push(Ln)}}Cn.length&&this.autoTranslateByIndexes(Cn)},onTagMouseEnter(_n){if(this.isEditing)return!1;let Cn=this.tags.find($n=>$n.id===_n);if(!Cn)return!1;if(Cn.isFavorite=this.isFavorite(Cn.id),this.hotkey.hover==="extend"&&(this.showExtendId=_n),Cn.isLora||Cn.isLyco||Cn.isEmbedding){let $n=Cn.isLora?Cn.loraName:Cn.isLyco?Cn.lycoName:Cn.embeddingName;this.$emit("showExtraNetworks",this.$refs["promptTagValue-"+Cn.id][0],$n,this.onLoraPopupUseKeywords,"tags")}},onTagMouseMove(_n){},onTagMouseLeave(_n){if(!this.tags.find($n=>$n.id===_n))return!1;this.hotkey.hover==="extend"&&(this.showExtendId=""),this.$emit("hideExtraNetworks")},onTagClick(_n){this.tagClickTimeId&&clearTimeout(this.tagClickTimeId),this.tagClickTimeId=setTimeout(()=>{switch(this.hotkey.click){case"edit":this._handleEditTag(_n);break;case"disable":this._handleDisableTag(_n);break;case"extend":this._handleHoverTag(_n);break}clearTimeout(this.tagClickTimeId)},250)},onTagDblclick(_n){switch(clearTimeout(this.tagClickTimeId),this.hotkey.dblClick){case"edit":this._handleEditTag(_n);break;case"disable":this._handleDisableTag(_n);break;case"extend":this._handleHoverTag(_n);break}},onTagRightClick(_n,Cn){switch(this.hotkey.rightClick){case"edit":this._handleEditTag(_n);break;case"disable":this._handleDisableTag(_n);break;case"extend":this._handleHoverTag(_n);break}},_handleEditTag(_n){let Cn=this.tags.find($n=>$n.id===_n);if(!Cn)return!1;this.editing={},this.editing[Cn.id]=!0,this.isEditing=!0,this.$forceUpdate(),this.$nextTick(()=>{const $n=this.$refs["promptTagEdit-"+Cn.id][0];$n.focus(),$n.dispatchEvent(new Event("input"))})},_handleDisableTag(_n){let Cn=this.tags.find($n=>$n.id===_n);if(!Cn)return!1;this.onDisabledTagClick(Cn.id)},_handleHoverTag(_n){if(!this.tags.find($n=>$n.id===_n))return!1;this.showExtendId=_n},onTagInputBlur(_n){let Cn=this.tags.find($n=>$n.id===_n);if(!Cn)return!1;this.editing[Cn.id]=!1,this.isEditing=!1},onTagInputKeyDown(_n,Cn){if(Cn.keyCode===13){let $n=this.tags.find(Nn=>Nn.id===_n);if(!$n)return!1;this.editing[$n.id]=!1,this.isEditing=!1,$n.value!==Cn.target.value&&($n.value=Cn.target.value,this._setTag($n),this.updateTags())}},onTagInputChange(_n,Cn){let $n=this.tags.find(Nn=>Nn.id===_n);if(!$n)return!1;$n.value!==Cn.target.value&&($n.value=Cn.target.value,this._setTag($n),this.updateTags())},onTagWeightNumChange(_n,Cn){let $n=this.tags.find(In=>In.id===_n);if(!$n)return!1;if(Cn=typeof Cn=="number"||typeof a=="string"?Cn:Cn.target.value,$n.weightNum==Cn)return;let Nn=Cn,Bn=$n.value,Ln=$n.localValue;if(Nn!==0){if(Nn===1&&!this.autoKeepWeightOne){const In=common$1.hasBrackets(Bn);(In[0]==="("&&In[1]===")"||this.useNovelAiWeightSymbol&&In[0]==="{"&&In[1]==="}")&&(Bn=common$1.setLayers(Bn,0,In[0],In[1]),Ln!==""&&(Ln=common$1.setLayers(Ln,0,In[0],In[1]))),Bn=Bn.replace(common$1.weightNumRegex,"$1"),Ln!==""&&(Ln=Ln.replace(common$1.weightNumRegex,"$1"))}else{if(!common$1.weightNumRegex.test(Bn)){let In=common$1.hasBrackets(Bn);In?(Bn=common$1.setLayers(Bn,1,In[0],In[1],":"+Nn),Ln!==""&&(Ln=common$1.setLayers(Ln,1,In[0],In[1],":"+Nn))):(Bn=Bn+":"+Nn,Ln!==""&&(Ln=Ln+":"+Nn))}common$1.hasBrackets(Bn)||(this.useNovelAiWeightSymbol?(Bn=common$1.setLayers(Bn,1,"{","}"),Ln!==""&&(Ln=common$1.setLayers(Ln,1,"{","}"))):(Bn=common$1.setLayers(Bn,1,"(",")"),Ln!==""&&(Ln=common$1.setLayers(Ln,1,"(",")"))))}Bn!==$n.value&&($n.value=Bn,Ln!==""&&($n.localValue=Ln),this._setTag($n))}else this.autoKeepWeightZero?($n.value=Bn.replace(common$1.weightNumRegex,"$1:0"),Ln!==""&&($n.localValue=$n.localValue.replace(common$1.weightNumRegex,"$1:0"))):($n.value=Bn.replace(common$1.weightNumRegex,"$1"),Ln!==""&&($n.localValue=$n.localValue.replace(common$1.weightNumRegex,"$1")));$n.weightNum=Nn,this.updateTags()},onDeleteTagClick(_n){let Cn=this.tags.find(Nn=>Nn.id===_n);if(!Cn)return!1;let $n=this.tags.indexOf(Cn);this.tags.splice($n,1),this.updateTags()},onFavoriteTagClick(_n){let Cn=this.tags.find(Nn=>Nn.id===_n);if(!Cn)return!1;let $n=this.isFavorite(Cn.id);$n?this.gradioAPI.unFavorite(this.favoriteKey,$n).then(Nn=>{Nn&&(Cn.isFavorite=!1,this.$emit("refreshFavorites",this.favoriteKey))}):this.gradioAPI.pushFavorite(this.favoriteKey,[Cn],Cn.value,Cn.localValue===""?Cn.value:Cn.localValue).then(Nn=>{Nn&&(Cn.isFavorite=!0,this.$emit("refreshFavorites",this.favoriteKey))})},onDisabledTagClick(_n){let Cn=this.tags.find($n=>$n.id===_n);Cn&&(Cn.disabled=!Cn.disabled,this.updateTags())},onIncWeightClick(_n,Cn){let $n=this.tags.find(In=>In.id===_n);if(!$n)return;let Nn=$n.value,Bn=$n.localValue;Nn=common$1.setLayers(Nn,0,"[","]"),Bn!==""&&(Bn=common$1.setLayers(Bn,0,"[","]")),this.useNovelAiWeightSymbol&&(Nn=common$1.setLayers(Nn,0,"(",")"),Bn!==""&&(Bn=common$1.setLayers(Bn,0,"(",")")));let Ln=$n.incWeight;Ln+=Cn,Ln<0&&(Ln=0),$n.incWeight=Ln,$n.decWeight=0,this.useNovelAiWeightSymbol?(Nn=common$1.setLayers(Nn,Ln,"{","}"),Bn!==""&&(Bn=common$1.setLayers(Bn,Ln,"{","}"))):(Nn=common$1.setLayers(Nn,Ln,"(",")"),Bn!==""&&(Bn=common$1.setLayers(Bn,Ln,"(",")"))),$n.value=Nn,Bn!==""&&($n.localValue=Bn),this.updateTags()},onDecWeightClick(_n,Cn){let $n=this.tags.find(In=>In.id===_n);if(!$n)return;let Nn=$n.value,Bn=$n.localValue;Nn=common$1.setLayers(Nn,0,"(",")"),Bn!==""&&(Bn=common$1.setLayers(Bn,0,"(",")")),this.useNovelAiWeightSymbol&&(Nn=common$1.setLayers(Nn,0,"{","}"),Bn!==""&&(Bn=common$1.setLayers(Bn,0,"{","}")));let Ln=$n.decWeight;Ln+=Cn,Ln<0&&(Ln=0),$n.incWeight=0,$n.decWeight=Ln,Nn=common$1.setLayers(Nn,Ln,"[","]"),Bn!==""&&(Bn=common$1.setLayers(Bn,Ln,"[","]")),$n.value=Nn,Bn!==""&&($n.localValue=Bn),this.updateTags()},onWrapTagClick(_n){let Cn=this.tags.find(Ln=>Ln.id===_n);if(!Cn)return;let $n=this.tags.indexOf(Cn),Nn=this._appendTag(` `,` `,!1,-1,"wrap"),Bn=this.tags[Nn];this.tags.splice(Nn,1),this.tags.splice($n+1,0,Bn),this.updateTags()},onTranslateToLocalClick(_n){let Cn=this.tags.find(Nn=>Nn.id===_n);if(!Cn)return;let $n=this.tags.indexOf(Cn);this.loading[Cn.id+"_local"]||this.translates([$n],!0,!0).finally(()=>{this.updateTags()})},onTranslateToEnglishClick(_n){let Cn=this.tags.find(Nn=>Nn.id===_n);if(!Cn)return;let $n=this.tags.indexOf(Cn);this.loading[Cn.id+"_en"]||this.translates([$n],!1,!0).finally(()=>{this.updateTags()})},onBlacklistClick(_n){let Cn=this.tags.find(Nn=>Nn.id===_n);if(!Cn)return;if(!this.cancelBlacklistConfirm){let Nn=this.getLang("confirm_add_blacklist").replace("{0}",Cn.value)+` -`+this.getLang("blacklist_desc");if(!confirm(Nn))return}let $n=JSON.parse(JSON.stringify(this.blacklist));Cn.isLora?$n.lora.push(Cn.loraName):Cn.isLyco?$n.lycoris.push(Cn.lycoName):Cn.isEmbedding?$n.embedding.push(Cn.embeddingName):this.neg?$n.negative_prompt.push(Cn.originalValue):$n.prompt.push(Cn.originalValue),this.gradioAPI.setData("blacklist",$n),this.$emit("update:blacklist",$n,this.cancelBlacklistConfirm),this.tags.forEach(Nn=>{Nn.value===Cn.value&&this.onDeleteTagClick(Nn.id)})}}},GroupTagsMixin={data(){return{groupTagsActive:"",subGroupTagsActive:"",groupTagsProcessed:[]}},watch:{groupTags:{handler(){this.genGroup(),(!this.groupTagsActive||!this.subGroupTagsActive)&&(this.groupTagsActive="favorite",this.subGroupTagsActive="favorite-"+this.favoriteKey),this._setGroupTagItemWidth()},deep:!0,immediate:!0},favorites:{handler(){this.genGroup()},deep:!0,immediate:!0},extraNetworks:{handler(){this.genGroup()},deep:!0,immediate:!0}},mounted(){this.gradioAPI.getData("groupTagsActive-"+this.name).then(_n=>{_n!==null&&typeof _n=="object"&&(this.groupTagsActive=_n.groupTagsActive,this.subGroupTagsActive=_n.subGroupTagsActive)})},methods:{genGroup(){let _n=[],Cn={name:this.getLang("favorite"),tabKey:"favorite",type:"favorite",groups:[]};if(this.getCurrentTypeFavorites().forEach($n=>{let Nn={color:"",name:this.getLang($n.name),tabKey:"favorite-"+$n.key,type:"favorite",tags:{},ori:{}};$n.list.forEach(Bn=>{Nn.tags[Bn.prompt]=Bn.name==""?Bn.prompt:Bn.name,Nn.ori[Bn.prompt]=Bn}),Cn.groups.push(Nn)}),_n.push(Cn),!this.$appMode){let $n={name:"Extra Networks",tabKey:"extraNetworks",type:"extraNetworks",groups:[]};this.extraNetworks.forEach(Nn=>{let Bn={color:"",name:Nn.title,tabKey:"extraNetworks-"+Nn.name,type:"extraNetworks",subType:Nn.name,tags:{},datas:[]};Nn.items.forEach(Pn=>{Bn.datas.push(Pn)}),$n.groups.push(Bn),Nn.items.forEach(Pn=>{Pn.dirnameFormat=Pn.dirname.replaceAll("\\","/")});let Ln=common$1.getSamePrefixPath([...new Set(Nn.items.map(Pn=>Pn.dirnameFormat))]),In=[];Nn.items.forEach(Pn=>{let Dn=Pn.dirnameFormat.replace(Ln,"");Dn===""&&(Dn="@root"),Dn=Dn.replace(/^\//,""),In.push(Dn),Pn.base_dirname=Dn}),In=[...new Set(In)],In.length>1&&In.forEach(Pn=>{let Dn={color:"",name:Pn,tabKey:"extraNetworks-"+Nn.name+"-"+Pn,type:"extraNetworks",subType:Nn.name,tags:{},datas:[]};Nn.items.forEach(Wn=>{Wn.base_dirname===Pn&&Dn.datas.push(Wn)}),$n.groups.push(Dn)}),$n.groups.push({type:"wrap"})}),_n.push($n)}_n=_n.concat(this.groupTags),this.groupTagsProcessed=_n},saveGroupActive(){this.gradioAPI.setData("groupTagsActive-"+this.name,{groupTagsActive:this.groupTagsActive,subGroupTagsActive:this.subGroupTagsActive})},activeGroupTab(_n){this.groupTagsActive=this.groupTagsProcessed[_n].tabKey,this.subGroupTagsActive=this.groupTagsProcessed[_n].groups[0].tabKey,this.saveGroupActive();let Cn=this.$refs.groupTabsHeader.children[_n].offsetLeft-this.$refs.groupTabsHeader.offsetWidth/2+this.$refs.groupTabsHeader.children[_n].offsetWidth/2;this.$refs.groupTabsHeader.scrollTo({left:Cn,behavior:"smooth"}),this._setGroupTagItemWidth()},activeSubGroupTab(_n,Cn){this.subGroupTagsActive=this.groupTagsProcessed[_n].groups[Cn].tabKey,this.saveGroupActive(),this._setGroupTagItemWidth()},_setGroupTagItemWidth(){this.$nextTick(()=>{if(!this.$refs.groupTagItem)return;this.$refs.groupTagItem.forEach((Cn,$n)=>{Cn.style.width="auto"});let _n=0;this.$refs.groupTagItem.forEach((Cn,$n)=>{_n=Math.max(_n,Cn.offsetWidth)}),_n>0&&this.$refs.groupTagItem.forEach((Cn,$n)=>{Cn.style.width=_n+"px"})})},onClickHideGroupTags(){this.$emit("update:hideGroupTags",!this.hideGroupTags)},onClickGroupTag(_n,Cn,$n,Nn){let Bn=[];if(this.tags.forEach((Ln,In)=>{Ln.originalValue===Cn&&Bn.push(In)}),Bn.length)Bn.reverse().forEach(Ln=>{this.tags.splice(Ln,1)}),this.updateTags();else if($n.type==="favorite"){let Ln=Nn.ori[Cn];this.onClickGroupTagFavorite(Ln)}else this._appendTag(Cn,_n,!1,-1,"text"),this.updateTags()},onClickGroupTagFavorite(_n){_n.tags.forEach(Cn=>{this._appendTag(Cn.value,Cn.localValue,Cn.disabled,-1,Cn.type)}),this.updateTags()},onClickGroupTagExtraNetwork(data,group,subGroup){if(subGroup.subType==="checkpoints"){if(data.loading)return;data.loading=!0;let _n=Cn=>{if(Cn>100){data.loading=!1;return}if(opts&&opts.sd_model_checkpoint===data.basename){data.loading=!1;return}setTimeout(_n,100,Cn+1)};_n(0),selectCheckpoint(data.basename);return}let indexes=this._groupTagsExtraNetworkTagsIndexes(data);if(indexes.length)indexes.reverse().forEach(_n=>{console.log(_n),this.tags.splice(_n,1)}),this.updateTags();else{let index=this._appendTag(eval(data.prompt),"",!1,-1,"text");this.autoTranslateToLocal?this.translates([index],!0,!1).finally(()=>{this.updateTags()}):this.updateTags()}},getGroupTagTooltip(_n,Cn){let $n="";return _n&&_n!==Cn&&($n+=_n+"
"),$n+=Cn,$n},getGroupTagStyle(_n,Cn,$n){let Nn={},Bn=common$1.getTagsColorKey(_n,Cn),Ln="";this.groupTagsColor[Bn]&&(Ln=this.groupTagsColor[Bn],common$1.isColorTransparent(Ln)&&(Ln="")),Ln&&(Nn={background:Ln});for(let In of this.tags)if(In.originalValue===$n){Nn.filter="grayscale(1)";break}return Nn},_groupTagsExtraNetworkTagsIndexes(_n){let Cn=_n.name,$n=_n.output_name||void 0,Nn=[];for(let Bn in this.tags){let Ln=this.tags[Bn];if(typeof Ln.type=="string"&&Ln.type==="wrap")continue;let In=!1;Ln.isLora?In=Ln.loraName===Cn||$n&&Ln.loraName===$n:Ln.isLyco?In=Ln.lycoName===Cn||$n&&Ln.lycoName===$n:Ln.isEmbedding?In=Ln.embeddingName===Cn||$n&&Ln.embeddingName===$n:In=Ln.originalValue===Cn||$n&&Ln.originalValue===$n,In&&Nn.push(Bn)}return Nn},getGroupTagExtraNetworkStyle(_n){let Cn=this._groupTagsExtraNetworkTagsIndexes(_n),$n={width:this.extraNetworksWidth+"px",height:this.extraNetworksHeight+"px"};return Cn.length&&($n.filter="grayscale(1)"),$n},getTagsColorKey(_n,Cn){return common$1.getTagsColorKey(_n,Cn)},onTagsColorChange(_n){this.$emit("update:groupTagsColor",this.groupTagsColor)},onClickResetTagsColor(_n){for(let Cn of this.groupTagsProcessed)for(let $n of Cn.groups){if($n.type&&$n.typ=="wrap")continue;let Nn=common$1.getTagsColorKey(Cn.name,$n.name);_n===Nn&&(this.groupTagsColor[_n]=ref(common$1.fitterInputColor($n.color)))}this.onTagsColorChange(_n)},onClickClearTagsColor(_n){this.groupTagsColor[_n]=ref("rgba(0,0,0,0)"),this.onTagsColorChange(_n)},getTagColorStyle(_n){if(_n.isLora||_n.isLyco||_n.isEmbedding)return{};if(!this.groupTagsColorKeyCache[_n.value])return{};let Cn=this.groupTagsColorKeyCache[_n.value];if(!this.groupTagsColor[Cn])return{};let $n=this.groupTagsColor[Cn];return common$1.isColorTransparent($n)?{}:{background:$n}},onGroupExtraNetworkMouseEnter(_n,Cn){this.$emit("showExtraNetworks",_n.target,Cn,this.onLoraPopupUseKeywords,!0,"groupTags")},onGroupExtraNetworkMouseMove(){},onGroupExtraNetworkMouseLeave(){this.$emit("hideExtraNetworks")}}},_sfc_main$f={name:"IconSvg",props:{name:{type:String,required:!0},svgName:{type:String,default:""}},data(){return{svgCode:""}},watch:{name:{handler:function(_n,Cn){this.getSvg()},immediate:!1}},mounted(){this.getSvg()},methods:{getSvg(){if(!this.name)return;let _n=this.svgName||this.name;if(window.loadingSvg=window.loadingSvg||{},window.isLoadSvg=window.isLoadSvg||{},window.isLoadSvg[_n]){this.svgCode=localStorage.getItem("iconSVG-"+_n);return}if(localStorage.getItem("iconSVG-"+_n)&&(this.svgCode=localStorage.getItem("iconSVG-"+_n)),window.loadingSvg[_n]){const Cn=setInterval(()=>{window.loadingSvg[_n]||(clearInterval(Cn),this.svgCode=localStorage.getItem("iconSVG-"+_n))},10);return}window.loadingSvg[_n]=!0,window.iconSvgHash||(window.iconSvgHash=new Date().getTime()),this.gradioAPI.styles("icons/"+_n+".svg",window.iconSvgHash).then(Cn=>{this.svgCode=Cn,localStorage.setItem("iconSVG-"+_n,Cn),window.isLoadSvg[_n]=!0,window.loadingSvg[_n]=!1}).catch(Cn=>{window.loadingSvg[_n]=!1})}}},_hoisted_1$e=["innerHTML"];function _sfc_render$f(_n,Cn,$n,Nn,Bn,Ln){return withDirectives((openBlock(),createElementBlock("div",{class:normalizeClass(["icon-svg","icon-svg-"+$n.name]),"data-name":"name",innerHTML:Bn.svgCode},null,10,_hoisted_1$e)),[[vShow,Bn.svgCode]])}const IconSvg=_export_sfc(_sfc_main$f,[["render",_sfc_render$f]]),_sfc_main$e={name:"HighlightPrompt",props:{textarea:{type:Object,required:!0},hideDefaultInput:{type:Boolean,default:!1}},data(){return{scrollTop:0,showTimeId:0,hideTimeId:0,lastHighLightTag:null}},watch:{},mounted(){},methods:{show(_n){this.lastHighLightTag&&this.lastHighLightTag.value===_n.value||(this.lastHighLightTag=_n,this.showTimeId&&clearTimeout(this.showTimeId),this.showTimeId=setTimeout(()=>{this._show(_n),this.showTimeId=0},10))},_show(_n){if(this.hideDefaultInput)return this._hide();if(typeof _n.type=="string"&&_n.type==="wrap")return this._hide();let Cn=_n.value,$n=this.textarea.value;if(Cn===""||Cn.trim()==="")return this._hide();if($n===""||$n.trim()==="")return this._hide();if(Cn=common$1.escapeHtml(Cn),$n=common$1.escapeHtml(this.textarea.value),$n.indexOf(Cn)===-1)return this._hide();this.textarea.parentNode.insertBefore(this.$refs.highlightPrompt,this.textarea.nextSibling);const Bn=window.getComputedStyle(this.textarea);for(const Pn of Bn)this.$refs.highlightPrompt.style[Pn]=Bn[Pn];this.$refs.highlightPrompt.style.display="block",this.textarea.style.display="none";let Ln="",In=$n;for(;;){const Pn=In.indexOf(Cn);if(Pn===-1){Ln+=In;break}const Dn=Pn+Cn.length;Ln+=In.substring(0,Pn),Ln+='',Ln+=In.substring(Pn,Dn),Ln+="",In=In.substring(Dn)}this.$refs.highlightPrompt.innerHTML=Ln,this.$refs.highlightPrompt.scrollTop=this.scrollTop},hide(){this.lastHighLightTag=null,this.showTimeId&&clearTimeout(this.showTimeId),this.hideTimeId&&clearTimeout(this.hideTimeId),this.hideTimeId=setTimeout(()=>{this._hide(),this.hideTimeId=0},10)},_hide(){this.textarea.style.display="block",this.$refs.highlightPrompt.style.display="none",this.scrollTop=this.textarea.scrollTop}}};function _sfc_render$e(_n,Cn,$n,Nn,Bn,Ln){return openBlock(),createElementBlock("div",{class:"physton-highlight-prompt",ref:"highlightPrompt",onClick:Cn[0]||(Cn[0]=(...In)=>Ln.hide&&Ln.hide(...In))},null,512)}const HighlightPrompt=_export_sfc(_sfc_main$e,[["render",_sfc_render$e]]);function tryOnScopeDispose(_n){return getCurrentScope()?(onScopeDispose(_n),!0):!1}function toValue(_n){return typeof _n=="function"?_n():unref(_n)}const isClient=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const toString$1=Object.prototype.toString,isObject$4=_n=>toString$1.call(_n)==="[object Object]",noop$1=()=>{},isIOS=getIsIOS();function getIsIOS(){var _n,Cn;return isClient&&((_n=window==null?void 0:window.navigator)==null?void 0:_n.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((Cn=window==null?void 0:window.navigator)==null?void 0:Cn.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function createFilterWrapper(_n,Cn){function $n(...Nn){return new Promise((Bn,Ln)=>{Promise.resolve(_n(()=>Cn.apply(this,Nn),{fn:Cn,thisArg:this,args:Nn})).then(Bn).catch(Ln)})}return $n}const bypassFilter=_n=>_n();function debounceFilter(_n,Cn={}){let $n,Nn,Bn=noop$1;const Ln=Pn=>{clearTimeout(Pn),Bn(),Bn=noop$1};return Pn=>{const Dn=toValue(_n),Wn=toValue(Cn.maxWait);return $n&&Ln($n),Dn<=0||Wn!==void 0&&Wn<=0?(Nn&&(Ln(Nn),Nn=null),Promise.resolve(Pn())):new Promise((Hn,Yn)=>{Bn=Cn.rejectOnCancel?Yn:Hn,Wn&&!Nn&&(Nn=setTimeout(()=>{$n&&Ln($n),Nn=null,Hn(Pn())},Wn)),$n=setTimeout(()=>{Nn&&Ln(Nn),Nn=null,Hn(Pn())},Dn)})}}function pausableFilter(_n=bypassFilter){const Cn=ref(!0);function $n(){Cn.value=!1}function Nn(){Cn.value=!0}const Bn=(...Ln)=>{Cn.value&&_n(...Ln)};return{isActive:readonly(Cn),pause:$n,resume:Nn,eventFilter:Bn}}function getLifeCycleTarget(_n){return _n||getCurrentInstance()}function useDebounceFn(_n,Cn=200,$n={}){return createFilterWrapper(debounceFilter(Cn,$n),_n)}function watchWithFilter(_n,Cn,$n={}){const{eventFilter:Nn=bypassFilter,...Bn}=$n;return watch(_n,createFilterWrapper(Nn,Cn),Bn)}function watchPausable(_n,Cn,$n={}){const{eventFilter:Nn,...Bn}=$n,{eventFilter:Ln,pause:In,resume:Pn,isActive:Dn}=pausableFilter(Nn);return{stop:watchWithFilter(_n,Cn,{...Bn,eventFilter:Ln}),pause:In,resume:Pn,isActive:Dn}}function tryOnMounted(_n,Cn=!0,$n){getLifeCycleTarget()?onMounted(_n,$n):Cn?_n():nextTick(_n)}function whenever(_n,Cn,$n){return watch(_n,(Nn,Bn,Ln)=>{Nn&&Cn(Nn,Bn,Ln)},$n)}function unrefElement(_n){var Cn;const $n=toValue(_n);return(Cn=$n==null?void 0:$n.$el)!=null?Cn:$n}const defaultWindow=isClient?window:void 0;function useEventListener(..._n){let Cn,$n,Nn,Bn;if(typeof _n[0]=="string"||Array.isArray(_n[0])?([$n,Nn,Bn]=_n,Cn=defaultWindow):[Cn,$n,Nn,Bn]=_n,!Cn)return noop$1;Array.isArray($n)||($n=[$n]),Array.isArray(Nn)||(Nn=[Nn]);const Ln=[],In=()=>{Ln.forEach(Hn=>Hn()),Ln.length=0},Pn=(Hn,Yn,Gn,rr)=>(Hn.addEventListener(Yn,Gn,rr),()=>Hn.removeEventListener(Yn,Gn,rr)),Dn=watch(()=>[unrefElement(Cn),toValue(Bn)],([Hn,Yn])=>{if(In(),!Hn)return;const Gn=isObject$4(Yn)?{...Yn}:Yn;Ln.push(...$n.flatMap(rr=>Nn.map(nr=>Pn(Hn,rr,nr,Gn))))},{immediate:!0,flush:"post"}),Wn=()=>{Dn(),In()};return tryOnScopeDispose(Wn),Wn}let _iOSWorkaround=!1;function onClickOutside(_n,Cn,$n={}){const{window:Nn=defaultWindow,ignore:Bn=[],capture:Ln=!0,detectIframe:In=!1}=$n;if(!Nn)return noop$1;isIOS&&!_iOSWorkaround&&(_iOSWorkaround=!0,Array.from(Nn.document.body.children).forEach(Gn=>Gn.addEventListener("click",noop$1)),Nn.document.documentElement.addEventListener("click",noop$1));let Pn=!0;const Dn=Gn=>Bn.some(rr=>{if(typeof rr=="string")return Array.from(Nn.document.querySelectorAll(rr)).some(nr=>nr===Gn.target||Gn.composedPath().includes(nr));{const nr=unrefElement(rr);return nr&&(Gn.target===nr||Gn.composedPath().includes(nr))}}),Hn=[useEventListener(Nn,"click",Gn=>{const rr=unrefElement(_n);if(!(!rr||rr===Gn.target||Gn.composedPath().includes(rr))){if(Gn.detail===0&&(Pn=!Dn(Gn)),!Pn){Pn=!0;return}Cn(Gn)}},{passive:!0,capture:Ln}),useEventListener(Nn,"pointerdown",Gn=>{const rr=unrefElement(_n);Pn=!Dn(Gn)&&!!(rr&&!Gn.composedPath().includes(rr))},{passive:!0}),In&&useEventListener(Nn,"blur",Gn=>{setTimeout(()=>{var rr;const nr=unrefElement(_n);((rr=Nn.document.activeElement)==null?void 0:rr.tagName)==="IFRAME"&&!(nr!=null&&nr.contains(Nn.document.activeElement))&&Cn(Gn)},0)})].filter(Boolean);return()=>Hn.forEach(Gn=>Gn())}const _global$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},globalKey="__vueuse_ssr_handlers__",handlers=getHandlers();function getHandlers(){return globalKey in _global$1||(_global$1[globalKey]=_global$1[globalKey]||{}),_global$1[globalKey]}function getSSRHandler(_n,Cn){return handlers[_n]||Cn}function guessSerializerType(_n){return _n==null?"any":_n instanceof Set?"set":_n instanceof Map?"map":_n instanceof Date?"date":typeof _n=="boolean"?"boolean":typeof _n=="string"?"string":typeof _n=="object"?"object":Number.isNaN(_n)?"any":"number"}const StorageSerializers={boolean:{read:_n=>_n==="true",write:_n=>String(_n)},object:{read:_n=>JSON.parse(_n),write:_n=>JSON.stringify(_n)},number:{read:_n=>Number.parseFloat(_n),write:_n=>String(_n)},any:{read:_n=>_n,write:_n=>String(_n)},string:{read:_n=>_n,write:_n=>String(_n)},map:{read:_n=>new Map(JSON.parse(_n)),write:_n=>JSON.stringify(Array.from(_n.entries()))},set:{read:_n=>new Set(JSON.parse(_n)),write:_n=>JSON.stringify(Array.from(_n))},date:{read:_n=>new Date(_n),write:_n=>_n.toISOString()}},customStorageEventName="vueuse-storage";function useStorage(_n,Cn,$n,Nn={}){var Bn;const{flush:Ln="pre",deep:In=!0,listenToStorageChanges:Pn=!0,writeDefaults:Dn=!0,mergeDefaults:Wn=!1,shallow:Hn,window:Yn=defaultWindow,eventFilter:Gn,onError:rr=Jo=>{console.error(Jo)},initOnMounted:nr}=Nn,Yo=(Hn?shallowRef:ref)(typeof Cn=="function"?Cn():Cn);if(!$n)try{$n=getSSRHandler("getDefaultStorage",()=>{var Jo;return(Jo=defaultWindow)==null?void 0:Jo.localStorage})()}catch(Jo){rr(Jo)}if(!$n)return Yo;const Zo=toValue(Cn),ei=guessSerializerType(Zo),li=(Bn=Nn.serializer)!=null?Bn:StorageSerializers[ei],{pause:vi,resume:Xo}=watchPausable(Yo,()=>hi(Yo.value),{flush:Ln,deep:In,eventFilter:Gn});return Yn&&Pn&&tryOnMounted(()=>{useEventListener(Yn,"storage",oi),useEventListener(Yn,customStorageEventName,zn),nr&&oi()}),nr||oi(),Yo;function hi(Jo){try{if(Jo==null)$n.removeItem(_n);else{const ni=li.write(Jo),si=$n.getItem(_n);si!==ni&&($n.setItem(_n,ni),Yn&&Yn.dispatchEvent(new CustomEvent(customStorageEventName,{detail:{key:_n,oldValue:si,newValue:ni,storageArea:$n}})))}}catch(ni){rr(ni)}}function mi(Jo){const ni=Jo?Jo.newValue:$n.getItem(_n);if(ni==null)return Dn&&Zo!=null&&$n.setItem(_n,li.write(Zo)),Zo;if(!Jo&&Wn){const si=li.read(ni);return typeof Wn=="function"?Wn(si,Zo):ei==="object"&&!Array.isArray(si)?{...Zo,...si}:si}else return typeof ni!="string"?ni:li.read(ni)}function zn(Jo){oi(Jo.detail)}function oi(Jo){if(!(Jo&&Jo.storageArea!==$n)){if(Jo&&Jo.key==null){Yo.value=Zo;return}if(!(Jo&&Jo.key!==_n)){vi();try{(Jo==null?void 0:Jo.newValue)!==li.write(Yo.value)&&(Yo.value=mi(Jo))}catch(ni){rr(ni)}finally{Jo?nextTick(Xo):Xo()}}}}}function useLocalStorage(_n,Cn,$n={}){const{window:Nn=defaultWindow}=$n;return useStorage(_n,Cn,Nn==null?void 0:Nn.localStorage,$n)}var GradientParser=GradientParser||{};GradientParser.stringify=function(){var _n={"visit_linear-gradient":function(Cn){return _n.visit_gradient(Cn)},"visit_repeating-linear-gradient":function(Cn){return _n.visit_gradient(Cn)},"visit_radial-gradient":function(Cn){return _n.visit_gradient(Cn)},"visit_repeating-radial-gradient":function(Cn){return _n.visit_gradient(Cn)},visit_gradient:function(Cn){var $n=_n.visit(Cn.orientation);return $n&&($n+=", "),Cn.type+"("+$n+_n.visit(Cn.colorStops)+")"},visit_shape:function(Cn){var $n=Cn.value,Nn=_n.visit(Cn.at),Bn=_n.visit(Cn.style);return Bn&&($n+=" "+Bn),Nn&&($n+=" at "+Nn),$n},"visit_default-radial":function(Cn){var $n="",Nn=_n.visit(Cn.at);return Nn&&($n+=Nn),$n},"visit_extent-keyword":function(Cn){var $n=Cn.value,Nn=_n.visit(Cn.at);return Nn&&($n+=" at "+Nn),$n},"visit_position-keyword":function(Cn){return Cn.value},visit_position:function(Cn){return _n.visit(Cn.value.x)+" "+_n.visit(Cn.value.y)},"visit_%":function(Cn){return Cn.value+"%"},visit_em:function(Cn){return Cn.value+"em"},visit_px:function(Cn){return Cn.value+"px"},visit_literal:function(Cn){return _n.visit_color(Cn.value,Cn)},visit_hex:function(Cn){return _n.visit_color("#"+Cn.value,Cn)},visit_rgb:function(Cn){return _n.visit_color("rgb("+Cn.value.join(", ")+")",Cn)},visit_rgba:function(Cn){return _n.visit_color("rgba("+Cn.value.join(", ")+")",Cn)},visit_color:function(Cn,$n){var Nn=Cn,Bn=_n.visit($n.length);return Bn&&(Nn+=" "+Bn),Nn},visit_angular:function(Cn){return Cn.value+"deg"},visit_directional:function(Cn){return"to "+Cn.value},visit_array:function(Cn){var $n="",Nn=Cn.length;return Cn.forEach(function(Bn,Ln){$n+=_n.visit(Bn),Ln0&&$n("Invalid input not EOF"),gi}function Bn(){return vi(Ln)}function Ln(){return In("linear-gradient",_n.linearGradient,Dn)||In("repeating-linear-gradient",_n.repeatingLinearGradient,Dn)||In("radial-gradient",_n.radialGradient,Yn)||In("repeating-radial-gradient",_n.repeatingRadialGradient,Yn)}function In(gi,$i,Ii){return Pn($i,function(sa){var la=Ii();return la&&(ea(_n.comma)||$n("Missing comma before color stops")),{type:gi,orientation:la,colorStops:vi(Xo)}})}function Pn(gi,$i){var Ii=ea(gi);if(Ii){ea(_n.startCall)||$n("Missing (");var sa=$i(Ii);return ea(_n.endCall)||$n("Missing )"),sa}}function Dn(){return Wn()||Hn()}function Wn(){return Li("directional",_n.sideOrCorner,1)}function Hn(){return Li("angular",_n.angleValue,1)}function Yn(){var gi,$i=Gn(),Ii;return $i&&(gi=[],gi.push($i),Ii=Cn,ea(_n.comma)&&($i=Gn(),$i?gi.push($i):Cn=Ii)),gi}function Gn(){var gi=rr()||nr();if(gi)gi.at=Zo();else{var $i=Yo();if($i){gi=$i;var Ii=Zo();Ii&&(gi.at=Ii)}else{var sa=ei();sa&&(gi={type:"default-radial",at:sa})}}return gi}function rr(){var gi=Li("shape",/^(circle)/i,0);return gi&&(gi.style=di()||Yo()),gi}function nr(){var gi=Li("shape",/^(ellipse)/i,0);return gi&&(gi.style=si()||Yo()),gi}function Yo(){return Li("extent-keyword",_n.extentKeywords,1)}function Zo(){if(Li("position",/^at/,0)){var gi=ei();return gi||$n("Missing positioning value"),gi}}function ei(){var gi=li();if(gi.x||gi.y)return{type:"position",value:gi}}function li(){return{x:si(),y:si()}}function vi(gi){var $i=gi(),Ii=[];if($i)for(Ii.push($i);ea(_n.comma);)$i=gi(),$i?Ii.push($i):$n("One extra comma");return Ii}function Xo(){var gi=hi();return gi||$n("Expected color definition"),gi.length=si(),gi}function hi(){return zn()||Jo()||oi()||mi()}function mi(){return Li("literal",_n.literalColor,0)}function zn(){return Li("hex",_n.hexColor,1)}function oi(){return Pn(_n.rgbColor,function(){return{type:"rgb",value:vi(ni)}})}function Jo(){return Pn(_n.rgbaColor,function(){return{type:"rgba",value:vi(ni)}})}function ni(){return ea(_n.number)[1]}function si(){return Li("%",_n.percentageValue,1)||pi()||di()}function pi(){return Li("position-keyword",_n.positionKeywords,1)}function di(){return Li("px",_n.pixelValue,1)||Li("em",_n.emValue,1)}function Li(gi,$i,Ii){var sa=ea($i);if(sa)return{type:gi,value:sa[Ii]}}function ea(gi){var $i,Ii;return Ii=/^[\n\r\t\s]+/.exec(Cn),Ii&&Ki(Ii[0].length),$i=gi.exec(Cn),$i&&Ki($i[0].length),$i}function Ki(gi){Cn=Cn.substr(gi)}return function(gi){return Cn=gi.toString(),Nn()}}();var parse=GradientParser.parse,stringify=GradientParser.stringify,top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(_n,Cn){return _n.concat([Cn+"-"+start,Cn+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(_n,Cn){return _n.concat([Cn,Cn+"-"+start,Cn+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(_n){return _n?(_n.nodeName||"").toLowerCase():null}function getWindow(_n){if(_n==null)return window;if(_n.toString()!=="[object Window]"){var Cn=_n.ownerDocument;return Cn&&Cn.defaultView||window}return _n}function isElement$1(_n){var Cn=getWindow(_n).Element;return _n instanceof Cn||_n instanceof Element}function isHTMLElement(_n){var Cn=getWindow(_n).HTMLElement;return _n instanceof Cn||_n instanceof HTMLElement}function isShadowRoot(_n){if(typeof ShadowRoot>"u")return!1;var Cn=getWindow(_n).ShadowRoot;return _n instanceof Cn||_n instanceof ShadowRoot}function applyStyles(_n){var Cn=_n.state;Object.keys(Cn.elements).forEach(function($n){var Nn=Cn.styles[$n]||{},Bn=Cn.attributes[$n]||{},Ln=Cn.elements[$n];!isHTMLElement(Ln)||!getNodeName(Ln)||(Object.assign(Ln.style,Nn),Object.keys(Bn).forEach(function(In){var Pn=Bn[In];Pn===!1?Ln.removeAttribute(In):Ln.setAttribute(In,Pn===!0?"":Pn)}))})}function effect$2(_n){var Cn=_n.state,$n={popper:{position:Cn.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(Cn.elements.popper.style,$n.popper),Cn.styles=$n,Cn.elements.arrow&&Object.assign(Cn.elements.arrow.style,$n.arrow),function(){Object.keys(Cn.elements).forEach(function(Nn){var Bn=Cn.elements[Nn],Ln=Cn.attributes[Nn]||{},In=Object.keys(Cn.styles.hasOwnProperty(Nn)?Cn.styles[Nn]:$n[Nn]),Pn=In.reduce(function(Dn,Wn){return Dn[Wn]="",Dn},{});!isHTMLElement(Bn)||!getNodeName(Bn)||(Object.assign(Bn.style,Pn),Object.keys(Ln).forEach(function(Dn){Bn.removeAttribute(Dn)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement$1(_n){return _n.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var _n=navigator.userAgentData;return _n!=null&&_n.brands&&Array.isArray(_n.brands)?_n.brands.map(function(Cn){return Cn.brand+"/"+Cn.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(_n,Cn,$n){Cn===void 0&&(Cn=!1),$n===void 0&&($n=!1);var Nn=_n.getBoundingClientRect(),Bn=1,Ln=1;Cn&&isHTMLElement(_n)&&(Bn=_n.offsetWidth>0&&round(Nn.width)/_n.offsetWidth||1,Ln=_n.offsetHeight>0&&round(Nn.height)/_n.offsetHeight||1);var In=isElement$1(_n)?getWindow(_n):window,Pn=In.visualViewport,Dn=!isLayoutViewport()&&$n,Wn=(Nn.left+(Dn&&Pn?Pn.offsetLeft:0))/Bn,Hn=(Nn.top+(Dn&&Pn?Pn.offsetTop:0))/Ln,Yn=Nn.width/Bn,Gn=Nn.height/Ln;return{width:Yn,height:Gn,top:Hn,right:Wn+Yn,bottom:Hn+Gn,left:Wn,x:Wn,y:Hn}}function getLayoutRect(_n){var Cn=getBoundingClientRect(_n),$n=_n.offsetWidth,Nn=_n.offsetHeight;return Math.abs(Cn.width-$n)<=1&&($n=Cn.width),Math.abs(Cn.height-Nn)<=1&&(Nn=Cn.height),{x:_n.offsetLeft,y:_n.offsetTop,width:$n,height:Nn}}function contains(_n,Cn){var $n=Cn.getRootNode&&Cn.getRootNode();if(_n.contains(Cn))return!0;if($n&&isShadowRoot($n)){var Nn=Cn;do{if(Nn&&_n.isSameNode(Nn))return!0;Nn=Nn.parentNode||Nn.host}while(Nn)}return!1}function getComputedStyle(_n){return getWindow(_n).getComputedStyle(_n)}function isTableElement(_n){return["table","td","th"].indexOf(getNodeName(_n))>=0}function getDocumentElement(_n){return((isElement$1(_n)?_n.ownerDocument:_n.document)||window.document).documentElement}function getParentNode(_n){return getNodeName(_n)==="html"?_n:_n.assignedSlot||_n.parentNode||(isShadowRoot(_n)?_n.host:null)||getDocumentElement(_n)}function getTrueOffsetParent(_n){return!isHTMLElement(_n)||getComputedStyle(_n).position==="fixed"?null:_n.offsetParent}function getContainingBlock(_n){var Cn=/firefox/i.test(getUAString()),$n=/Trident/i.test(getUAString());if($n&&isHTMLElement(_n)){var Nn=getComputedStyle(_n);if(Nn.position==="fixed")return null}var Bn=getParentNode(_n);for(isShadowRoot(Bn)&&(Bn=Bn.host);isHTMLElement(Bn)&&["html","body"].indexOf(getNodeName(Bn))<0;){var Ln=getComputedStyle(Bn);if(Ln.transform!=="none"||Ln.perspective!=="none"||Ln.contain==="paint"||["transform","perspective"].indexOf(Ln.willChange)!==-1||Cn&&Ln.willChange==="filter"||Cn&&Ln.filter&&Ln.filter!=="none")return Bn;Bn=Bn.parentNode}return null}function getOffsetParent(_n){for(var Cn=getWindow(_n),$n=getTrueOffsetParent(_n);$n&&isTableElement($n)&&getComputedStyle($n).position==="static";)$n=getTrueOffsetParent($n);return $n&&(getNodeName($n)==="html"||getNodeName($n)==="body"&&getComputedStyle($n).position==="static")?Cn:$n||getContainingBlock(_n)||Cn}function getMainAxisFromPlacement(_n){return["top","bottom"].indexOf(_n)>=0?"x":"y"}function within(_n,Cn,$n){return max(_n,min(Cn,$n))}function withinMaxClamp(_n,Cn,$n){var Nn=within(_n,Cn,$n);return Nn>$n?$n:Nn}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(_n){return Object.assign({},getFreshSideObject(),_n)}function expandToHashMap(_n,Cn){return Cn.reduce(function($n,Nn){return $n[Nn]=_n,$n},{})}var toPaddingObject=function _n(Cn,$n){return Cn=typeof Cn=="function"?Cn(Object.assign({},$n.rects,{placement:$n.placement})):Cn,mergePaddingObject(typeof Cn!="number"?Cn:expandToHashMap(Cn,basePlacements))};function arrow(_n){var Cn,$n=_n.state,Nn=_n.name,Bn=_n.options,Ln=$n.elements.arrow,In=$n.modifiersData.popperOffsets,Pn=getBasePlacement$1($n.placement),Dn=getMainAxisFromPlacement(Pn),Wn=[left,right].indexOf(Pn)>=0,Hn=Wn?"height":"width";if(!(!Ln||!In)){var Yn=toPaddingObject(Bn.padding,$n),Gn=getLayoutRect(Ln),rr=Dn==="y"?top:left,nr=Dn==="y"?bottom:right,Yo=$n.rects.reference[Hn]+$n.rects.reference[Dn]-In[Dn]-$n.rects.popper[Hn],Zo=In[Dn]-$n.rects.reference[Dn],ei=getOffsetParent(Ln),li=ei?Dn==="y"?ei.clientHeight||0:ei.clientWidth||0:0,vi=Yo/2-Zo/2,Xo=Yn[rr],hi=li-Gn[Hn]-Yn[nr],mi=li/2-Gn[Hn]/2+vi,zn=within(Xo,mi,hi),oi=Dn;$n.modifiersData[Nn]=(Cn={},Cn[oi]=zn,Cn.centerOffset=zn-mi,Cn)}}function effect$1(_n){var Cn=_n.state,$n=_n.options,Nn=$n.element,Bn=Nn===void 0?"[data-popper-arrow]":Nn;Bn!=null&&(typeof Bn=="string"&&(Bn=Cn.elements.popper.querySelector(Bn),!Bn)||contains(Cn.elements.popper,Bn)&&(Cn.elements.arrow=Bn))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(_n){return _n.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(_n,Cn){var $n=_n.x,Nn=_n.y,Bn=Cn.devicePixelRatio||1;return{x:round($n*Bn)/Bn||0,y:round(Nn*Bn)/Bn||0}}function mapToStyles(_n){var Cn,$n=_n.popper,Nn=_n.popperRect,Bn=_n.placement,Ln=_n.variation,In=_n.offsets,Pn=_n.position,Dn=_n.gpuAcceleration,Wn=_n.adaptive,Hn=_n.roundOffsets,Yn=_n.isFixed,Gn=In.x,rr=Gn===void 0?0:Gn,nr=In.y,Yo=nr===void 0?0:nr,Zo=typeof Hn=="function"?Hn({x:rr,y:Yo}):{x:rr,y:Yo};rr=Zo.x,Yo=Zo.y;var ei=In.hasOwnProperty("x"),li=In.hasOwnProperty("y"),vi=left,Xo=top,hi=window;if(Wn){var mi=getOffsetParent($n),zn="clientHeight",oi="clientWidth";if(mi===getWindow($n)&&(mi=getDocumentElement($n),getComputedStyle(mi).position!=="static"&&Pn==="absolute"&&(zn="scrollHeight",oi="scrollWidth")),mi=mi,Bn===top||(Bn===left||Bn===right)&&Ln===end){Xo=bottom;var Jo=Yn&&mi===hi&&hi.visualViewport?hi.visualViewport.height:mi[zn];Yo-=Jo-Nn.height,Yo*=Dn?1:-1}if(Bn===left||(Bn===top||Bn===bottom)&&Ln===end){vi=right;var ni=Yn&&mi===hi&&hi.visualViewport?hi.visualViewport.width:mi[oi];rr-=ni-Nn.width,rr*=Dn?1:-1}}var si=Object.assign({position:Pn},Wn&&unsetSides),pi=Hn===!0?roundOffsetsByDPR({x:rr,y:Yo},getWindow($n)):{x:rr,y:Yo};if(rr=pi.x,Yo=pi.y,Dn){var di;return Object.assign({},si,(di={},di[Xo]=li?"0":"",di[vi]=ei?"0":"",di.transform=(hi.devicePixelRatio||1)<=1?"translate("+rr+"px, "+Yo+"px)":"translate3d("+rr+"px, "+Yo+"px, 0)",di))}return Object.assign({},si,(Cn={},Cn[Xo]=li?Yo+"px":"",Cn[vi]=ei?rr+"px":"",Cn.transform="",Cn))}function computeStyles(_n){var Cn=_n.state,$n=_n.options,Nn=$n.gpuAcceleration,Bn=Nn===void 0?!0:Nn,Ln=$n.adaptive,In=Ln===void 0?!0:Ln,Pn=$n.roundOffsets,Dn=Pn===void 0?!0:Pn,Wn={placement:getBasePlacement$1(Cn.placement),variation:getVariation(Cn.placement),popper:Cn.elements.popper,popperRect:Cn.rects.popper,gpuAcceleration:Bn,isFixed:Cn.options.strategy==="fixed"};Cn.modifiersData.popperOffsets!=null&&(Cn.styles.popper=Object.assign({},Cn.styles.popper,mapToStyles(Object.assign({},Wn,{offsets:Cn.modifiersData.popperOffsets,position:Cn.options.strategy,adaptive:In,roundOffsets:Dn})))),Cn.modifiersData.arrow!=null&&(Cn.styles.arrow=Object.assign({},Cn.styles.arrow,mapToStyles(Object.assign({},Wn,{offsets:Cn.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:Dn})))),Cn.attributes.popper=Object.assign({},Cn.attributes.popper,{"data-popper-placement":Cn.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(_n){var Cn=_n.state,$n=_n.instance,Nn=_n.options,Bn=Nn.scroll,Ln=Bn===void 0?!0:Bn,In=Nn.resize,Pn=In===void 0?!0:In,Dn=getWindow(Cn.elements.popper),Wn=[].concat(Cn.scrollParents.reference,Cn.scrollParents.popper);return Ln&&Wn.forEach(function(Hn){Hn.addEventListener("scroll",$n.update,passive)}),Pn&&Dn.addEventListener("resize",$n.update,passive),function(){Ln&&Wn.forEach(function(Hn){Hn.removeEventListener("scroll",$n.update,passive)}),Pn&&Dn.removeEventListener("resize",$n.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function _n(){},effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(_n){return _n.replace(/left|right|bottom|top/g,function(Cn){return hash$1[Cn]})}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(_n){return _n.replace(/start|end/g,function(Cn){return hash[Cn]})}function getWindowScroll(_n){var Cn=getWindow(_n),$n=Cn.pageXOffset,Nn=Cn.pageYOffset;return{scrollLeft:$n,scrollTop:Nn}}function getWindowScrollBarX(_n){return getBoundingClientRect(getDocumentElement(_n)).left+getWindowScroll(_n).scrollLeft}function getViewportRect(_n,Cn){var $n=getWindow(_n),Nn=getDocumentElement(_n),Bn=$n.visualViewport,Ln=Nn.clientWidth,In=Nn.clientHeight,Pn=0,Dn=0;if(Bn){Ln=Bn.width,In=Bn.height;var Wn=isLayoutViewport();(Wn||!Wn&&Cn==="fixed")&&(Pn=Bn.offsetLeft,Dn=Bn.offsetTop)}return{width:Ln,height:In,x:Pn+getWindowScrollBarX(_n),y:Dn}}function getDocumentRect(_n){var Cn,$n=getDocumentElement(_n),Nn=getWindowScroll(_n),Bn=(Cn=_n.ownerDocument)==null?void 0:Cn.body,Ln=max($n.scrollWidth,$n.clientWidth,Bn?Bn.scrollWidth:0,Bn?Bn.clientWidth:0),In=max($n.scrollHeight,$n.clientHeight,Bn?Bn.scrollHeight:0,Bn?Bn.clientHeight:0),Pn=-Nn.scrollLeft+getWindowScrollBarX(_n),Dn=-Nn.scrollTop;return getComputedStyle(Bn||$n).direction==="rtl"&&(Pn+=max($n.clientWidth,Bn?Bn.clientWidth:0)-Ln),{width:Ln,height:In,x:Pn,y:Dn}}function isScrollParent(_n){var Cn=getComputedStyle(_n),$n=Cn.overflow,Nn=Cn.overflowX,Bn=Cn.overflowY;return/auto|scroll|overlay|hidden/.test($n+Bn+Nn)}function getScrollParent(_n){return["html","body","#document"].indexOf(getNodeName(_n))>=0?_n.ownerDocument.body:isHTMLElement(_n)&&isScrollParent(_n)?_n:getScrollParent(getParentNode(_n))}function listScrollParents(_n,Cn){var $n;Cn===void 0&&(Cn=[]);var Nn=getScrollParent(_n),Bn=Nn===(($n=_n.ownerDocument)==null?void 0:$n.body),Ln=getWindow(Nn),In=Bn?[Ln].concat(Ln.visualViewport||[],isScrollParent(Nn)?Nn:[]):Nn,Pn=Cn.concat(In);return Bn?Pn:Pn.concat(listScrollParents(getParentNode(In)))}function rectToClientRect(_n){return Object.assign({},_n,{left:_n.x,top:_n.y,right:_n.x+_n.width,bottom:_n.y+_n.height})}function getInnerBoundingClientRect(_n,Cn){var $n=getBoundingClientRect(_n,!1,Cn==="fixed");return $n.top=$n.top+_n.clientTop,$n.left=$n.left+_n.clientLeft,$n.bottom=$n.top+_n.clientHeight,$n.right=$n.left+_n.clientWidth,$n.width=_n.clientWidth,$n.height=_n.clientHeight,$n.x=$n.left,$n.y=$n.top,$n}function getClientRectFromMixedType(_n,Cn,$n){return Cn===viewport?rectToClientRect(getViewportRect(_n,$n)):isElement$1(Cn)?getInnerBoundingClientRect(Cn,$n):rectToClientRect(getDocumentRect(getDocumentElement(_n)))}function getClippingParents(_n){var Cn=listScrollParents(getParentNode(_n)),$n=["absolute","fixed"].indexOf(getComputedStyle(_n).position)>=0,Nn=$n&&isHTMLElement(_n)?getOffsetParent(_n):_n;return isElement$1(Nn)?Cn.filter(function(Bn){return isElement$1(Bn)&&contains(Bn,Nn)&&getNodeName(Bn)!=="body"}):[]}function getClippingRect(_n,Cn,$n,Nn){var Bn=Cn==="clippingParents"?getClippingParents(_n):[].concat(Cn),Ln=[].concat(Bn,[$n]),In=Ln[0],Pn=Ln.reduce(function(Dn,Wn){var Hn=getClientRectFromMixedType(_n,Wn,Nn);return Dn.top=max(Hn.top,Dn.top),Dn.right=min(Hn.right,Dn.right),Dn.bottom=min(Hn.bottom,Dn.bottom),Dn.left=max(Hn.left,Dn.left),Dn},getClientRectFromMixedType(_n,In,Nn));return Pn.width=Pn.right-Pn.left,Pn.height=Pn.bottom-Pn.top,Pn.x=Pn.left,Pn.y=Pn.top,Pn}function computeOffsets(_n){var Cn=_n.reference,$n=_n.element,Nn=_n.placement,Bn=Nn?getBasePlacement$1(Nn):null,Ln=Nn?getVariation(Nn):null,In=Cn.x+Cn.width/2-$n.width/2,Pn=Cn.y+Cn.height/2-$n.height/2,Dn;switch(Bn){case top:Dn={x:In,y:Cn.y-$n.height};break;case bottom:Dn={x:In,y:Cn.y+Cn.height};break;case right:Dn={x:Cn.x+Cn.width,y:Pn};break;case left:Dn={x:Cn.x-$n.width,y:Pn};break;default:Dn={x:Cn.x,y:Cn.y}}var Wn=Bn?getMainAxisFromPlacement(Bn):null;if(Wn!=null){var Hn=Wn==="y"?"height":"width";switch(Ln){case start:Dn[Wn]=Dn[Wn]-(Cn[Hn]/2-$n[Hn]/2);break;case end:Dn[Wn]=Dn[Wn]+(Cn[Hn]/2-$n[Hn]/2);break}}return Dn}function detectOverflow(_n,Cn){Cn===void 0&&(Cn={});var $n=Cn,Nn=$n.placement,Bn=Nn===void 0?_n.placement:Nn,Ln=$n.strategy,In=Ln===void 0?_n.strategy:Ln,Pn=$n.boundary,Dn=Pn===void 0?clippingParents:Pn,Wn=$n.rootBoundary,Hn=Wn===void 0?viewport:Wn,Yn=$n.elementContext,Gn=Yn===void 0?popper:Yn,rr=$n.altBoundary,nr=rr===void 0?!1:rr,Yo=$n.padding,Zo=Yo===void 0?0:Yo,ei=mergePaddingObject(typeof Zo!="number"?Zo:expandToHashMap(Zo,basePlacements)),li=Gn===popper?reference:popper,vi=_n.rects.popper,Xo=_n.elements[nr?li:Gn],hi=getClippingRect(isElement$1(Xo)?Xo:Xo.contextElement||getDocumentElement(_n.elements.popper),Dn,Hn,In),mi=getBoundingClientRect(_n.elements.reference),zn=computeOffsets({reference:mi,element:vi,strategy:"absolute",placement:Bn}),oi=rectToClientRect(Object.assign({},vi,zn)),Jo=Gn===popper?oi:mi,ni={top:hi.top-Jo.top+ei.top,bottom:Jo.bottom-hi.bottom+ei.bottom,left:hi.left-Jo.left+ei.left,right:Jo.right-hi.right+ei.right},si=_n.modifiersData.offset;if(Gn===popper&&si){var pi=si[Bn];Object.keys(ni).forEach(function(di){var Li=[right,bottom].indexOf(di)>=0?1:-1,ea=[top,bottom].indexOf(di)>=0?"y":"x";ni[di]+=pi[ea]*Li})}return ni}function computeAutoPlacement(_n,Cn){Cn===void 0&&(Cn={});var $n=Cn,Nn=$n.placement,Bn=$n.boundary,Ln=$n.rootBoundary,In=$n.padding,Pn=$n.flipVariations,Dn=$n.allowedAutoPlacements,Wn=Dn===void 0?placements:Dn,Hn=getVariation(Nn),Yn=Hn?Pn?variationPlacements:variationPlacements.filter(function(nr){return getVariation(nr)===Hn}):basePlacements,Gn=Yn.filter(function(nr){return Wn.indexOf(nr)>=0});Gn.length===0&&(Gn=Yn);var rr=Gn.reduce(function(nr,Yo){return nr[Yo]=detectOverflow(_n,{placement:Yo,boundary:Bn,rootBoundary:Ln,padding:In})[getBasePlacement$1(Yo)],nr},{});return Object.keys(rr).sort(function(nr,Yo){return rr[nr]-rr[Yo]})}function getExpandedFallbackPlacements(_n){if(getBasePlacement$1(_n)===auto)return[];var Cn=getOppositePlacement(_n);return[getOppositeVariationPlacement(_n),Cn,getOppositeVariationPlacement(Cn)]}function flip(_n){var Cn=_n.state,$n=_n.options,Nn=_n.name;if(!Cn.modifiersData[Nn]._skip){for(var Bn=$n.mainAxis,Ln=Bn===void 0?!0:Bn,In=$n.altAxis,Pn=In===void 0?!0:In,Dn=$n.fallbackPlacements,Wn=$n.padding,Hn=$n.boundary,Yn=$n.rootBoundary,Gn=$n.altBoundary,rr=$n.flipVariations,nr=rr===void 0?!0:rr,Yo=$n.allowedAutoPlacements,Zo=Cn.options.placement,ei=getBasePlacement$1(Zo),li=ei===Zo,vi=Dn||(li||!nr?[getOppositePlacement(Zo)]:getExpandedFallbackPlacements(Zo)),Xo=[Zo].concat(vi).reduce(function(Hi,ji){return Hi.concat(getBasePlacement$1(ji)===auto?computeAutoPlacement(Cn,{placement:ji,boundary:Hn,rootBoundary:Yn,padding:Wn,flipVariations:nr,allowedAutoPlacements:Yo}):ji)},[]),hi=Cn.rects.reference,mi=Cn.rects.popper,zn=new Map,oi=!0,Jo=Xo[0],ni=0;ni=0,ea=Li?"width":"height",Ki=detectOverflow(Cn,{placement:si,boundary:Hn,rootBoundary:Yn,altBoundary:Gn,padding:Wn}),gi=Li?di?right:left:di?bottom:top;hi[ea]>mi[ea]&&(gi=getOppositePlacement(gi));var $i=getOppositePlacement(gi),Ii=[];if(Ln&&Ii.push(Ki[pi]<=0),Pn&&Ii.push(Ki[gi]<=0,Ki[$i]<=0),Ii.every(function(Hi){return Hi})){Jo=si,oi=!1;break}zn.set(si,Ii)}if(oi)for(var sa=nr?3:1,la=function(ji){var Ui=Xo.find(function(Qi){var ia=zn.get(Qi);if(ia)return ia.slice(0,ji).every(function(Ji){return Ji})});if(Ui)return Jo=Ui,"break"},xi=sa;xi>0;xi--){var Mi=la(xi);if(Mi==="break")break}Cn.placement!==Jo&&(Cn.modifiersData[Nn]._skip=!0,Cn.placement=Jo,Cn.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(_n,Cn,$n){return $n===void 0&&($n={x:0,y:0}),{top:_n.top-Cn.height-$n.y,right:_n.right-Cn.width+$n.x,bottom:_n.bottom-Cn.height+$n.y,left:_n.left-Cn.width-$n.x}}function isAnySideFullyClipped(_n){return[top,right,bottom,left].some(function(Cn){return _n[Cn]>=0})}function hide(_n){var Cn=_n.state,$n=_n.name,Nn=Cn.rects.reference,Bn=Cn.rects.popper,Ln=Cn.modifiersData.preventOverflow,In=detectOverflow(Cn,{elementContext:"reference"}),Pn=detectOverflow(Cn,{altBoundary:!0}),Dn=getSideOffsets(In,Nn),Wn=getSideOffsets(Pn,Bn,Ln),Hn=isAnySideFullyClipped(Dn),Yn=isAnySideFullyClipped(Wn);Cn.modifiersData[$n]={referenceClippingOffsets:Dn,popperEscapeOffsets:Wn,isReferenceHidden:Hn,hasPopperEscaped:Yn},Cn.attributes.popper=Object.assign({},Cn.attributes.popper,{"data-popper-reference-hidden":Hn,"data-popper-escaped":Yn})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(_n,Cn,$n){var Nn=getBasePlacement$1(_n),Bn=[left,top].indexOf(Nn)>=0?-1:1,Ln=typeof $n=="function"?$n(Object.assign({},Cn,{placement:_n})):$n,In=Ln[0],Pn=Ln[1];return In=In||0,Pn=(Pn||0)*Bn,[left,right].indexOf(Nn)>=0?{x:Pn,y:In}:{x:In,y:Pn}}function offset(_n){var Cn=_n.state,$n=_n.options,Nn=_n.name,Bn=$n.offset,Ln=Bn===void 0?[0,0]:Bn,In=placements.reduce(function(Hn,Yn){return Hn[Yn]=distanceAndSkiddingToXY(Yn,Cn.rects,Ln),Hn},{}),Pn=In[Cn.placement],Dn=Pn.x,Wn=Pn.y;Cn.modifiersData.popperOffsets!=null&&(Cn.modifiersData.popperOffsets.x+=Dn,Cn.modifiersData.popperOffsets.y+=Wn),Cn.modifiersData[Nn]=In}const offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(_n){var Cn=_n.state,$n=_n.name;Cn.modifiersData[$n]=computeOffsets({reference:Cn.rects.reference,element:Cn.rects.popper,strategy:"absolute",placement:Cn.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(_n){return _n==="x"?"y":"x"}function preventOverflow(_n){var Cn=_n.state,$n=_n.options,Nn=_n.name,Bn=$n.mainAxis,Ln=Bn===void 0?!0:Bn,In=$n.altAxis,Pn=In===void 0?!1:In,Dn=$n.boundary,Wn=$n.rootBoundary,Hn=$n.altBoundary,Yn=$n.padding,Gn=$n.tether,rr=Gn===void 0?!0:Gn,nr=$n.tetherOffset,Yo=nr===void 0?0:nr,Zo=detectOverflow(Cn,{boundary:Dn,rootBoundary:Wn,padding:Yn,altBoundary:Hn}),ei=getBasePlacement$1(Cn.placement),li=getVariation(Cn.placement),vi=!li,Xo=getMainAxisFromPlacement(ei),hi=getAltAxis(Xo),mi=Cn.modifiersData.popperOffsets,zn=Cn.rects.reference,oi=Cn.rects.popper,Jo=typeof Yo=="function"?Yo(Object.assign({},Cn.rects,{placement:Cn.placement})):Yo,ni=typeof Jo=="number"?{mainAxis:Jo,altAxis:Jo}:Object.assign({mainAxis:0,altAxis:0},Jo),si=Cn.modifiersData.offset?Cn.modifiersData.offset[Cn.placement]:null,pi={x:0,y:0};if(mi){if(Ln){var di,Li=Xo==="y"?top:left,ea=Xo==="y"?bottom:right,Ki=Xo==="y"?"height":"width",gi=mi[Xo],$i=gi+Zo[Li],Ii=gi-Zo[ea],sa=rr?-oi[Ki]/2:0,la=li===start?zn[Ki]:oi[Ki],xi=li===start?-oi[Ki]:-zn[Ki],Mi=Cn.elements.arrow,Hi=rr&&Mi?getLayoutRect(Mi):{width:0,height:0},ji=Cn.modifiersData["arrow#persistent"]?Cn.modifiersData["arrow#persistent"].padding:getFreshSideObject(),Ui=ji[Li],Qi=ji[ea],ia=within(0,zn[Ki],Hi[Ki]),Ji=vi?zn[Ki]/2-sa-ia-Ui-ni.mainAxis:la-ia-Ui-ni.mainAxis,na=vi?-zn[Ki]/2+sa+ia+Qi+ni.mainAxis:xi+ia+Qi+ni.mainAxis,ga=Cn.elements.arrow&&getOffsetParent(Cn.elements.arrow),ma=ga?Xo==="y"?ga.clientTop||0:ga.clientLeft||0:0,ri=(di=si==null?void 0:si[Xo])!=null?di:0,ci=gi+Ji-ri-ma,_i=gi+na-ri,wi=within(rr?min($i,ci):$i,gi,rr?max(Ii,_i):Ii);mi[Xo]=wi,pi[Xo]=wi-gi}if(Pn){var bi,Oi=Xo==="x"?top:left,Fi=Xo==="x"?bottom:right,Pi=mi[hi],Ri=hi==="y"?"height":"width",Si=Pi+Zo[Oi],Di=Pi-Zo[Fi],Gi=[top,left].indexOf(ei)!==-1,ki=(bi=si==null?void 0:si[hi])!=null?bi:0,qi=Gi?Si:Pi-zn[Ri]-oi[Ri]-ki+ni.altAxis,ra=Gi?Pi+zn[Ri]+oi[Ri]-ki-ni.altAxis:Di,fa=rr&&Gi?withinMaxClamp(qi,Pi,ra):within(rr?qi:Si,Pi,rr?ra:Di);mi[hi]=fa,pi[hi]=fa-Pi}Cn.modifiersData[Nn]=pi}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(_n){return{scrollLeft:_n.scrollLeft,scrollTop:_n.scrollTop}}function getNodeScroll(_n){return _n===getWindow(_n)||!isHTMLElement(_n)?getWindowScroll(_n):getHTMLElementScroll(_n)}function isElementScaled(_n){var Cn=_n.getBoundingClientRect(),$n=round(Cn.width)/_n.offsetWidth||1,Nn=round(Cn.height)/_n.offsetHeight||1;return $n!==1||Nn!==1}function getCompositeRect(_n,Cn,$n){$n===void 0&&($n=!1);var Nn=isHTMLElement(Cn),Bn=isHTMLElement(Cn)&&isElementScaled(Cn),Ln=getDocumentElement(Cn),In=getBoundingClientRect(_n,Bn,$n),Pn={scrollLeft:0,scrollTop:0},Dn={x:0,y:0};return(Nn||!Nn&&!$n)&&((getNodeName(Cn)!=="body"||isScrollParent(Ln))&&(Pn=getNodeScroll(Cn)),isHTMLElement(Cn)?(Dn=getBoundingClientRect(Cn,!0),Dn.x+=Cn.clientLeft,Dn.y+=Cn.clientTop):Ln&&(Dn.x=getWindowScrollBarX(Ln))),{x:In.left+Pn.scrollLeft-Dn.x,y:In.top+Pn.scrollTop-Dn.y,width:In.width,height:In.height}}function order(_n){var Cn=new Map,$n=new Set,Nn=[];_n.forEach(function(Ln){Cn.set(Ln.name,Ln)});function Bn(Ln){$n.add(Ln.name);var In=[].concat(Ln.requires||[],Ln.requiresIfExists||[]);In.forEach(function(Pn){if(!$n.has(Pn)){var Dn=Cn.get(Pn);Dn&&Bn(Dn)}}),Nn.push(Ln)}return _n.forEach(function(Ln){$n.has(Ln.name)||Bn(Ln)}),Nn}function orderModifiers(_n){var Cn=order(_n);return modifierPhases.reduce(function($n,Nn){return $n.concat(Cn.filter(function(Bn){return Bn.phase===Nn}))},[])}function debounce$1(_n){var Cn;return function(){return Cn||(Cn=new Promise(function($n){Promise.resolve().then(function(){Cn=void 0,$n(_n())})})),Cn}}function mergeByName(_n){var Cn=_n.reduce(function($n,Nn){var Bn=$n[Nn.name];return $n[Nn.name]=Bn?Object.assign({},Bn,Nn,{options:Object.assign({},Bn.options,Nn.options),data:Object.assign({},Bn.data,Nn.data)}):Nn,$n},{});return Object.keys(Cn).map(function($n){return Cn[$n]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var _n=arguments.length,Cn=new Array(_n),$n=0;$n<_n;$n++)Cn[$n]=arguments[$n];return!Cn.some(function(Nn){return!(Nn&&typeof Nn.getBoundingClientRect=="function")})}function popperGenerator(_n){_n===void 0&&(_n={});var Cn=_n,$n=Cn.defaultModifiers,Nn=$n===void 0?[]:$n,Bn=Cn.defaultOptions,Ln=Bn===void 0?DEFAULT_OPTIONS:Bn;return function(Pn,Dn,Wn){Wn===void 0&&(Wn=Ln);var Hn={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,Ln),modifiersData:{},elements:{reference:Pn,popper:Dn},attributes:{},styles:{}},Yn=[],Gn=!1,rr={state:Hn,setOptions:function(ei){var li=typeof ei=="function"?ei(Hn.options):ei;Yo(),Hn.options=Object.assign({},Ln,Hn.options,li),Hn.scrollParents={reference:isElement$1(Pn)?listScrollParents(Pn):Pn.contextElement?listScrollParents(Pn.contextElement):[],popper:listScrollParents(Dn)};var vi=orderModifiers(mergeByName([].concat(Nn,Hn.options.modifiers)));return Hn.orderedModifiers=vi.filter(function(Xo){return Xo.enabled}),nr(),rr.update()},forceUpdate:function(){if(!Gn){var ei=Hn.elements,li=ei.reference,vi=ei.popper;if(areValidElements(li,vi)){Hn.rects={reference:getCompositeRect(li,getOffsetParent(vi),Hn.options.strategy==="fixed"),popper:getLayoutRect(vi)},Hn.reset=!1,Hn.placement=Hn.options.placement,Hn.orderedModifiers.forEach(function(ni){return Hn.modifiersData[ni.name]=Object.assign({},ni.data)});for(var Xo=0;Xo{Nn.value===Cn.value&&this.onDeleteTagClick(Nn.id)})}}},GroupTagsMixin={data(){return{groupTagsActive:"",subGroupTagsActive:"",groupTagsProcessed:[],extraNetworksRefreshing:!1}},watch:{groupTags:{handler(){this.genGroup(),(!this.groupTagsActive||!this.subGroupTagsActive)&&(this.groupTagsActive="favorite",this.subGroupTagsActive="favorite-"+this.favoriteKey),this._setGroupTagItemWidth()},deep:!0,immediate:!0},favorites:{handler(){this.genGroup()},deep:!0,immediate:!0},extraNetworks:{handler(){this.genGroup()},deep:!0,immediate:!0}},mounted(){this.gradioAPI.getData("groupTagsActive-"+this.name).then(_n=>{_n!==null&&typeof _n=="object"&&(this.groupTagsActive=_n.groupTagsActive,this.subGroupTagsActive=_n.subGroupTagsActive)})},methods:{genGroup(){let _n=[],Cn={name:this.getLang("favorite"),tabKey:"favorite",type:"favorite",groups:[]};if(this.getCurrentTypeFavorites().forEach($n=>{let Nn={color:"",name:this.getLang($n.name),tabKey:"favorite-"+$n.key,type:"favorite",tags:{},ori:{}};$n.list.forEach(Bn=>{Nn.tags[Bn.prompt]=Bn.name==""?Bn.prompt:Bn.name,Nn.ori[Bn.prompt]=Bn}),Cn.groups.push(Nn)}),_n.push(Cn),!this.$appMode){let $n={name:"Extra Networks",tabKey:"extraNetworks",type:"extraNetworks",groups:[]};this.extraNetworks.forEach(Nn=>{let Bn={color:"",name:Nn.title,tabKey:"extraNetworks-"+Nn.name,type:"extraNetworks",subType:Nn.name,tags:{},datas:[]};Nn.items.forEach(Pn=>{Bn.datas.push(Pn)}),$n.groups.push(Bn),Nn.items.forEach(Pn=>{Pn.dirnameFormat=Pn.dirname.replaceAll("\\","/")});let Ln=common$1.getSamePrefixPath([...new Set(Nn.items.map(Pn=>Pn.dirnameFormat))]),In=[];Nn.items.forEach(Pn=>{let Dn=Pn.dirnameFormat.replace(Ln,"");Dn===""&&(Dn="@root"),Dn=Dn.replace(/^\//,""),In.push(Dn),Pn.base_dirname=Dn}),In=[...new Set(In)],In.length>1&&In.forEach(Pn=>{let Dn={color:"",name:Pn,tabKey:"extraNetworks-"+Nn.name+"-"+Pn,type:"extraNetworks",subType:Nn.name,tags:{},datas:[]};Nn.items.forEach(Wn=>{Wn.base_dirname===Pn&&Dn.datas.push(Wn)}),$n.groups.push(Dn)}),$n.groups.push({type:"wrap"})}),_n.push($n)}_n=_n.concat(this.groupTags),this.groupTagsProcessed=_n},saveGroupActive(){this.gradioAPI.setData("groupTagsActive-"+this.name,{groupTagsActive:this.groupTagsActive,subGroupTagsActive:this.subGroupTagsActive})},activeGroupTab(_n){this.groupTagsActive=this.groupTagsProcessed[_n].tabKey,this.subGroupTagsActive=this.groupTagsProcessed[_n].groups[0].tabKey,this.saveGroupActive();let Cn=this.$refs.groupTabsHeader.children[_n].offsetLeft-this.$refs.groupTabsHeader.offsetWidth/2+this.$refs.groupTabsHeader.children[_n].offsetWidth/2;this.$refs.groupTabsHeader.scrollTo({left:Cn,behavior:"smooth"}),this._setGroupTagItemWidth()},activeSubGroupTab(_n,Cn){this.subGroupTagsActive=this.groupTagsProcessed[_n].groups[Cn].tabKey,this.saveGroupActive(),this._setGroupTagItemWidth()},_setGroupTagItemWidth(){this.$nextTick(()=>{if(!this.$refs.groupTagItem)return;this.$refs.groupTagItem.forEach((Cn,$n)=>{Cn.style.width="auto"});let _n=0;this.$refs.groupTagItem.forEach((Cn,$n)=>{_n=Math.max(_n,Cn.offsetWidth)}),_n>0&&this.$refs.groupTagItem.forEach((Cn,$n)=>{Cn.style.width=_n+"px"})})},onClickHideGroupTags(){this.$emit("update:hideGroupTags",!this.hideGroupTags)},onClickGroupTag(_n,Cn,$n,Nn){let Bn=[];if(this.tags.forEach((Ln,In)=>{Ln.originalValue===Cn&&Bn.push(In)}),Bn.length)Bn.reverse().forEach(Ln=>{this.tags.splice(Ln,1)}),this.updateTags();else if($n.type==="favorite"){let Ln=Nn.ori[Cn];this.onClickGroupTagFavorite(Ln)}else this._appendTag(Cn,_n,!1,-1,"text"),this.updateTags()},onClickGroupTagFavorite(_n){_n.tags.forEach(Cn=>{this._appendTag(Cn.value,Cn.localValue,Cn.disabled,-1,Cn.type)}),this.updateTags()},onClickGroupTagExtraNetwork(data,group,subGroup){if(subGroup.subType==="checkpoints"){if(data.loading)return;data.loading=!0;let _n=Cn=>{if(Cn>100){data.loading=!1,setTimeout(this.onClickGroupExtraNetworkRefresh,1e3);return}if(opts&&opts.sd_model_checkpoint.indexOf(data.basename)===0){data.loading=!1,setTimeout(this.onClickGroupExtraNetworkRefresh,1e3);return}setTimeout(_n,100,Cn+1)};_n(0),selectCheckpoint(data.basename);return}let indexes=this._groupTagsExtraNetworkTagsIndexes(data);if(indexes.length)indexes.reverse().forEach(_n=>{console.log(_n),this.tags.splice(_n,1)}),this.updateTags();else{let index=this._appendTag(eval(data.prompt),"",!1,-1,"text");this.autoTranslateToLocal?this.translates([index],!0,!1).finally(()=>{this.updateTags()}):this.updateTags()}},getGroupTagTooltip(_n,Cn){let $n="";return _n&&_n!==Cn&&($n+=_n+"
"),$n+=Cn,$n},getGroupTagStyle(_n,Cn,$n){let Nn={},Bn=common$1.getTagsColorKey(_n,Cn),Ln="";this.groupTagsColor[Bn]&&(Ln=this.groupTagsColor[Bn],common$1.isColorTransparent(Ln)&&(Ln="")),Ln&&(Nn={background:Ln});for(let In of this.tags)if(In.originalValue===$n){Nn.filter="grayscale(1)";break}return Nn},_groupTagsExtraNetworkTagsIndexes(_n){let Cn=_n.name,$n=_n.output_name||void 0,Nn=[];for(let Bn in this.tags){let Ln=this.tags[Bn];if(typeof Ln.type=="string"&&Ln.type==="wrap")continue;let In=!1;Ln.isLora?In=Ln.loraName===Cn||$n&&Ln.loraName===$n:Ln.isLyco?In=Ln.lycoName===Cn||$n&&Ln.lycoName===$n:Ln.isEmbedding?In=Ln.embeddingName===Cn||$n&&Ln.embeddingName===$n:In=Ln.originalValue===Cn||$n&&Ln.originalValue===$n,In&&Nn.push(Bn)}return Nn},getGroupTagExtraNetworkStyle(_n){let Cn=this._groupTagsExtraNetworkTagsIndexes(_n),$n={width:this.extraNetworksWidth+"px",height:this.extraNetworksHeight+"px"};return Cn.length&&($n.filter="grayscale(1)"),$n},getTagsColorKey(_n,Cn){return common$1.getTagsColorKey(_n,Cn)},onTagsColorChange(_n){this.$emit("update:groupTagsColor",this.groupTagsColor)},onClickResetTagsColor(_n){for(let Cn of this.groupTagsProcessed)for(let $n of Cn.groups){if($n.type&&$n.typ=="wrap")continue;let Nn=common$1.getTagsColorKey(Cn.name,$n.name);_n===Nn&&(this.groupTagsColor[_n]=ref(common$1.fitterInputColor($n.color)))}this.onTagsColorChange(_n)},onClickClearTagsColor(_n){this.groupTagsColor[_n]=ref("rgba(0,0,0,0)"),this.onTagsColorChange(_n)},getTagColorStyle(_n){if(_n.isLora||_n.isLyco||_n.isEmbedding)return{};if(!this.groupTagsColorKeyCache[_n.value])return{};let Cn=this.groupTagsColorKeyCache[_n.value];if(!this.groupTagsColor[Cn])return{};let $n=this.groupTagsColor[Cn];return common$1.isColorTransparent($n)?{}:{background:$n}},onGroupExtraNetworkMouseEnter(_n,Cn){this.$emit("showExtraNetworks",_n.target,Cn,this.onLoraPopupUseKeywords,!0,"groupTags")},onGroupExtraNetworkMouseMove(){},onGroupExtraNetworkMouseLeave(){this.$emit("hideExtraNetworks")},onClickGroupExtraNetworkRefresh(){this.$emit("refreshExtraNetworks")}}},_sfc_main$f={name:"IconSvg",props:{name:{type:String,required:!0},svgName:{type:String,default:""}},data(){return{svgCode:""}},watch:{name:{handler:function(_n,Cn){this.getSvg()},immediate:!1}},mounted(){this.getSvg()},methods:{getSvg(){if(!this.name)return;let _n=this.svgName||this.name;if(window.loadingSvg=window.loadingSvg||{},window.isLoadSvg=window.isLoadSvg||{},window.isLoadSvg[_n]){this.svgCode=localStorage.getItem("iconSVG-"+_n);return}if(localStorage.getItem("iconSVG-"+_n)&&(this.svgCode=localStorage.getItem("iconSVG-"+_n)),window.loadingSvg[_n]){const Cn=setInterval(()=>{window.loadingSvg[_n]||(clearInterval(Cn),this.svgCode=localStorage.getItem("iconSVG-"+_n))},10);return}window.loadingSvg[_n]=!0,window.iconSvgHash||(window.iconSvgHash=new Date().getTime()),this.gradioAPI.styles("icons/"+_n+".svg",window.iconSvgHash).then(Cn=>{this.svgCode=Cn,localStorage.setItem("iconSVG-"+_n,Cn),window.isLoadSvg[_n]=!0,window.loadingSvg[_n]=!1}).catch(Cn=>{window.loadingSvg[_n]=!1})}}},_hoisted_1$e=["innerHTML"];function _sfc_render$f(_n,Cn,$n,Nn,Bn,Ln){return withDirectives((openBlock(),createElementBlock("div",{class:normalizeClass(["icon-svg","icon-svg-"+$n.name]),"data-name":"name",innerHTML:Bn.svgCode},null,10,_hoisted_1$e)),[[vShow,Bn.svgCode]])}const IconSvg=_export_sfc(_sfc_main$f,[["render",_sfc_render$f]]),_sfc_main$e={name:"HighlightPrompt",props:{textarea:{type:Object,required:!0},hideDefaultInput:{type:Boolean,default:!1}},data(){return{scrollTop:0,showTimeId:0,hideTimeId:0,lastHighLightTag:null}},watch:{},mounted(){},methods:{show(_n){this.lastHighLightTag&&this.lastHighLightTag.value===_n.value||(this.lastHighLightTag=_n,this.showTimeId&&clearTimeout(this.showTimeId),this.showTimeId=setTimeout(()=>{this._show(_n),this.showTimeId=0},10))},_show(_n){if(this.hideDefaultInput)return this._hide();if(typeof _n.type=="string"&&_n.type==="wrap")return this._hide();let Cn=_n.value,$n=this.textarea.value;if(Cn===""||Cn.trim()==="")return this._hide();if($n===""||$n.trim()==="")return this._hide();if(Cn=common$1.escapeHtml(Cn),$n=common$1.escapeHtml(this.textarea.value),$n.indexOf(Cn)===-1)return this._hide();this.textarea.parentNode.insertBefore(this.$refs.highlightPrompt,this.textarea.nextSibling);const Bn=window.getComputedStyle(this.textarea);for(const Pn of Bn)this.$refs.highlightPrompt.style[Pn]=Bn[Pn];this.$refs.highlightPrompt.style.display="block",this.textarea.style.display="none";let Ln="",In=$n;for(;;){const Pn=In.indexOf(Cn);if(Pn===-1){Ln+=In;break}const Dn=Pn+Cn.length;Ln+=In.substring(0,Pn),Ln+='',Ln+=In.substring(Pn,Dn),Ln+="",In=In.substring(Dn)}this.$refs.highlightPrompt.innerHTML=Ln,this.$refs.highlightPrompt.scrollTop=this.scrollTop},hide(){this.lastHighLightTag=null,this.showTimeId&&clearTimeout(this.showTimeId),this.hideTimeId&&clearTimeout(this.hideTimeId),this.hideTimeId=setTimeout(()=>{this._hide(),this.hideTimeId=0},10)},_hide(){this.textarea.style.display="block",this.$refs.highlightPrompt.style.display="none",this.scrollTop=this.textarea.scrollTop}}};function _sfc_render$e(_n,Cn,$n,Nn,Bn,Ln){return openBlock(),createElementBlock("div",{class:"physton-highlight-prompt",ref:"highlightPrompt",onClick:Cn[0]||(Cn[0]=(...In)=>Ln.hide&&Ln.hide(...In))},null,512)}const HighlightPrompt=_export_sfc(_sfc_main$e,[["render",_sfc_render$e]]);function tryOnScopeDispose(_n){return getCurrentScope()?(onScopeDispose(_n),!0):!1}function toValue(_n){return typeof _n=="function"?_n():unref(_n)}const isClient=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const toString$1=Object.prototype.toString,isObject$4=_n=>toString$1.call(_n)==="[object Object]",noop$1=()=>{},isIOS=getIsIOS();function getIsIOS(){var _n,Cn;return isClient&&((_n=window==null?void 0:window.navigator)==null?void 0:_n.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((Cn=window==null?void 0:window.navigator)==null?void 0:Cn.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function createFilterWrapper(_n,Cn){function $n(...Nn){return new Promise((Bn,Ln)=>{Promise.resolve(_n(()=>Cn.apply(this,Nn),{fn:Cn,thisArg:this,args:Nn})).then(Bn).catch(Ln)})}return $n}const bypassFilter=_n=>_n();function debounceFilter(_n,Cn={}){let $n,Nn,Bn=noop$1;const Ln=Pn=>{clearTimeout(Pn),Bn(),Bn=noop$1};return Pn=>{const Dn=toValue(_n),Wn=toValue(Cn.maxWait);return $n&&Ln($n),Dn<=0||Wn!==void 0&&Wn<=0?(Nn&&(Ln(Nn),Nn=null),Promise.resolve(Pn())):new Promise((Hn,Yn)=>{Bn=Cn.rejectOnCancel?Yn:Hn,Wn&&!Nn&&(Nn=setTimeout(()=>{$n&&Ln($n),Nn=null,Hn(Pn())},Wn)),$n=setTimeout(()=>{Nn&&Ln(Nn),Nn=null,Hn(Pn())},Dn)})}}function pausableFilter(_n=bypassFilter){const Cn=ref(!0);function $n(){Cn.value=!1}function Nn(){Cn.value=!0}const Bn=(...Ln)=>{Cn.value&&_n(...Ln)};return{isActive:readonly(Cn),pause:$n,resume:Nn,eventFilter:Bn}}function getLifeCycleTarget(_n){return _n||getCurrentInstance()}function useDebounceFn(_n,Cn=200,$n={}){return createFilterWrapper(debounceFilter(Cn,$n),_n)}function watchWithFilter(_n,Cn,$n={}){const{eventFilter:Nn=bypassFilter,...Bn}=$n;return watch(_n,createFilterWrapper(Nn,Cn),Bn)}function watchPausable(_n,Cn,$n={}){const{eventFilter:Nn,...Bn}=$n,{eventFilter:Ln,pause:In,resume:Pn,isActive:Dn}=pausableFilter(Nn);return{stop:watchWithFilter(_n,Cn,{...Bn,eventFilter:Ln}),pause:In,resume:Pn,isActive:Dn}}function tryOnMounted(_n,Cn=!0,$n){getLifeCycleTarget()?onMounted(_n,$n):Cn?_n():nextTick(_n)}function whenever(_n,Cn,$n){return watch(_n,(Nn,Bn,Ln)=>{Nn&&Cn(Nn,Bn,Ln)},$n)}function unrefElement(_n){var Cn;const $n=toValue(_n);return(Cn=$n==null?void 0:$n.$el)!=null?Cn:$n}const defaultWindow=isClient?window:void 0;function useEventListener(..._n){let Cn,$n,Nn,Bn;if(typeof _n[0]=="string"||Array.isArray(_n[0])?([$n,Nn,Bn]=_n,Cn=defaultWindow):[Cn,$n,Nn,Bn]=_n,!Cn)return noop$1;Array.isArray($n)||($n=[$n]),Array.isArray(Nn)||(Nn=[Nn]);const Ln=[],In=()=>{Ln.forEach(Hn=>Hn()),Ln.length=0},Pn=(Hn,Yn,Gn,rr)=>(Hn.addEventListener(Yn,Gn,rr),()=>Hn.removeEventListener(Yn,Gn,rr)),Dn=watch(()=>[unrefElement(Cn),toValue(Bn)],([Hn,Yn])=>{if(In(),!Hn)return;const Gn=isObject$4(Yn)?{...Yn}:Yn;Ln.push(...$n.flatMap(rr=>Nn.map(nr=>Pn(Hn,rr,nr,Gn))))},{immediate:!0,flush:"post"}),Wn=()=>{Dn(),In()};return tryOnScopeDispose(Wn),Wn}let _iOSWorkaround=!1;function onClickOutside(_n,Cn,$n={}){const{window:Nn=defaultWindow,ignore:Bn=[],capture:Ln=!0,detectIframe:In=!1}=$n;if(!Nn)return noop$1;isIOS&&!_iOSWorkaround&&(_iOSWorkaround=!0,Array.from(Nn.document.body.children).forEach(Gn=>Gn.addEventListener("click",noop$1)),Nn.document.documentElement.addEventListener("click",noop$1));let Pn=!0;const Dn=Gn=>Bn.some(rr=>{if(typeof rr=="string")return Array.from(Nn.document.querySelectorAll(rr)).some(nr=>nr===Gn.target||Gn.composedPath().includes(nr));{const nr=unrefElement(rr);return nr&&(Gn.target===nr||Gn.composedPath().includes(nr))}}),Hn=[useEventListener(Nn,"click",Gn=>{const rr=unrefElement(_n);if(!(!rr||rr===Gn.target||Gn.composedPath().includes(rr))){if(Gn.detail===0&&(Pn=!Dn(Gn)),!Pn){Pn=!0;return}Cn(Gn)}},{passive:!0,capture:Ln}),useEventListener(Nn,"pointerdown",Gn=>{const rr=unrefElement(_n);Pn=!Dn(Gn)&&!!(rr&&!Gn.composedPath().includes(rr))},{passive:!0}),In&&useEventListener(Nn,"blur",Gn=>{setTimeout(()=>{var rr;const nr=unrefElement(_n);((rr=Nn.document.activeElement)==null?void 0:rr.tagName)==="IFRAME"&&!(nr!=null&&nr.contains(Nn.document.activeElement))&&Cn(Gn)},0)})].filter(Boolean);return()=>Hn.forEach(Gn=>Gn())}const _global$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},globalKey="__vueuse_ssr_handlers__",handlers=getHandlers();function getHandlers(){return globalKey in _global$1||(_global$1[globalKey]=_global$1[globalKey]||{}),_global$1[globalKey]}function getSSRHandler(_n,Cn){return handlers[_n]||Cn}function guessSerializerType(_n){return _n==null?"any":_n instanceof Set?"set":_n instanceof Map?"map":_n instanceof Date?"date":typeof _n=="boolean"?"boolean":typeof _n=="string"?"string":typeof _n=="object"?"object":Number.isNaN(_n)?"any":"number"}const StorageSerializers={boolean:{read:_n=>_n==="true",write:_n=>String(_n)},object:{read:_n=>JSON.parse(_n),write:_n=>JSON.stringify(_n)},number:{read:_n=>Number.parseFloat(_n),write:_n=>String(_n)},any:{read:_n=>_n,write:_n=>String(_n)},string:{read:_n=>_n,write:_n=>String(_n)},map:{read:_n=>new Map(JSON.parse(_n)),write:_n=>JSON.stringify(Array.from(_n.entries()))},set:{read:_n=>new Set(JSON.parse(_n)),write:_n=>JSON.stringify(Array.from(_n))},date:{read:_n=>new Date(_n),write:_n=>_n.toISOString()}},customStorageEventName="vueuse-storage";function useStorage(_n,Cn,$n,Nn={}){var Bn;const{flush:Ln="pre",deep:In=!0,listenToStorageChanges:Pn=!0,writeDefaults:Dn=!0,mergeDefaults:Wn=!1,shallow:Hn,window:Yn=defaultWindow,eventFilter:Gn,onError:rr=Jo=>{console.error(Jo)},initOnMounted:nr}=Nn,Yo=(Hn?shallowRef:ref)(typeof Cn=="function"?Cn():Cn);if(!$n)try{$n=getSSRHandler("getDefaultStorage",()=>{var Jo;return(Jo=defaultWindow)==null?void 0:Jo.localStorage})()}catch(Jo){rr(Jo)}if(!$n)return Yo;const Zo=toValue(Cn),ei=guessSerializerType(Zo),li=(Bn=Nn.serializer)!=null?Bn:StorageSerializers[ei],{pause:vi,resume:Xo}=watchPausable(Yo,()=>hi(Yo.value),{flush:Ln,deep:In,eventFilter:Gn});return Yn&&Pn&&tryOnMounted(()=>{useEventListener(Yn,"storage",oi),useEventListener(Yn,customStorageEventName,zn),nr&&oi()}),nr||oi(),Yo;function hi(Jo){try{if(Jo==null)$n.removeItem(_n);else{const ni=li.write(Jo),si=$n.getItem(_n);si!==ni&&($n.setItem(_n,ni),Yn&&Yn.dispatchEvent(new CustomEvent(customStorageEventName,{detail:{key:_n,oldValue:si,newValue:ni,storageArea:$n}})))}}catch(ni){rr(ni)}}function mi(Jo){const ni=Jo?Jo.newValue:$n.getItem(_n);if(ni==null)return Dn&&Zo!=null&&$n.setItem(_n,li.write(Zo)),Zo;if(!Jo&&Wn){const si=li.read(ni);return typeof Wn=="function"?Wn(si,Zo):ei==="object"&&!Array.isArray(si)?{...Zo,...si}:si}else return typeof ni!="string"?ni:li.read(ni)}function zn(Jo){oi(Jo.detail)}function oi(Jo){if(!(Jo&&Jo.storageArea!==$n)){if(Jo&&Jo.key==null){Yo.value=Zo;return}if(!(Jo&&Jo.key!==_n)){vi();try{(Jo==null?void 0:Jo.newValue)!==li.write(Yo.value)&&(Yo.value=mi(Jo))}catch(ni){rr(ni)}finally{Jo?nextTick(Xo):Xo()}}}}}function useLocalStorage(_n,Cn,$n={}){const{window:Nn=defaultWindow}=$n;return useStorage(_n,Cn,Nn==null?void 0:Nn.localStorage,$n)}var GradientParser=GradientParser||{};GradientParser.stringify=function(){var _n={"visit_linear-gradient":function(Cn){return _n.visit_gradient(Cn)},"visit_repeating-linear-gradient":function(Cn){return _n.visit_gradient(Cn)},"visit_radial-gradient":function(Cn){return _n.visit_gradient(Cn)},"visit_repeating-radial-gradient":function(Cn){return _n.visit_gradient(Cn)},visit_gradient:function(Cn){var $n=_n.visit(Cn.orientation);return $n&&($n+=", "),Cn.type+"("+$n+_n.visit(Cn.colorStops)+")"},visit_shape:function(Cn){var $n=Cn.value,Nn=_n.visit(Cn.at),Bn=_n.visit(Cn.style);return Bn&&($n+=" "+Bn),Nn&&($n+=" at "+Nn),$n},"visit_default-radial":function(Cn){var $n="",Nn=_n.visit(Cn.at);return Nn&&($n+=Nn),$n},"visit_extent-keyword":function(Cn){var $n=Cn.value,Nn=_n.visit(Cn.at);return Nn&&($n+=" at "+Nn),$n},"visit_position-keyword":function(Cn){return Cn.value},visit_position:function(Cn){return _n.visit(Cn.value.x)+" "+_n.visit(Cn.value.y)},"visit_%":function(Cn){return Cn.value+"%"},visit_em:function(Cn){return Cn.value+"em"},visit_px:function(Cn){return Cn.value+"px"},visit_literal:function(Cn){return _n.visit_color(Cn.value,Cn)},visit_hex:function(Cn){return _n.visit_color("#"+Cn.value,Cn)},visit_rgb:function(Cn){return _n.visit_color("rgb("+Cn.value.join(", ")+")",Cn)},visit_rgba:function(Cn){return _n.visit_color("rgba("+Cn.value.join(", ")+")",Cn)},visit_color:function(Cn,$n){var Nn=Cn,Bn=_n.visit($n.length);return Bn&&(Nn+=" "+Bn),Nn},visit_angular:function(Cn){return Cn.value+"deg"},visit_directional:function(Cn){return"to "+Cn.value},visit_array:function(Cn){var $n="",Nn=Cn.length;return Cn.forEach(function(Bn,Ln){$n+=_n.visit(Bn),Ln0&&$n("Invalid input not EOF"),gi}function Bn(){return vi(Ln)}function Ln(){return In("linear-gradient",_n.linearGradient,Dn)||In("repeating-linear-gradient",_n.repeatingLinearGradient,Dn)||In("radial-gradient",_n.radialGradient,Yn)||In("repeating-radial-gradient",_n.repeatingRadialGradient,Yn)}function In(gi,$i,Ii){return Pn($i,function(sa){var la=Ii();return la&&(ea(_n.comma)||$n("Missing comma before color stops")),{type:gi,orientation:la,colorStops:vi(Xo)}})}function Pn(gi,$i){var Ii=ea(gi);if(Ii){ea(_n.startCall)||$n("Missing (");var sa=$i(Ii);return ea(_n.endCall)||$n("Missing )"),sa}}function Dn(){return Wn()||Hn()}function Wn(){return Li("directional",_n.sideOrCorner,1)}function Hn(){return Li("angular",_n.angleValue,1)}function Yn(){var gi,$i=Gn(),Ii;return $i&&(gi=[],gi.push($i),Ii=Cn,ea(_n.comma)&&($i=Gn(),$i?gi.push($i):Cn=Ii)),gi}function Gn(){var gi=rr()||nr();if(gi)gi.at=Zo();else{var $i=Yo();if($i){gi=$i;var Ii=Zo();Ii&&(gi.at=Ii)}else{var sa=ei();sa&&(gi={type:"default-radial",at:sa})}}return gi}function rr(){var gi=Li("shape",/^(circle)/i,0);return gi&&(gi.style=di()||Yo()),gi}function nr(){var gi=Li("shape",/^(ellipse)/i,0);return gi&&(gi.style=si()||Yo()),gi}function Yo(){return Li("extent-keyword",_n.extentKeywords,1)}function Zo(){if(Li("position",/^at/,0)){var gi=ei();return gi||$n("Missing positioning value"),gi}}function ei(){var gi=li();if(gi.x||gi.y)return{type:"position",value:gi}}function li(){return{x:si(),y:si()}}function vi(gi){var $i=gi(),Ii=[];if($i)for(Ii.push($i);ea(_n.comma);)$i=gi(),$i?Ii.push($i):$n("One extra comma");return Ii}function Xo(){var gi=hi();return gi||$n("Expected color definition"),gi.length=si(),gi}function hi(){return zn()||Jo()||oi()||mi()}function mi(){return Li("literal",_n.literalColor,0)}function zn(){return Li("hex",_n.hexColor,1)}function oi(){return Pn(_n.rgbColor,function(){return{type:"rgb",value:vi(ni)}})}function Jo(){return Pn(_n.rgbaColor,function(){return{type:"rgba",value:vi(ni)}})}function ni(){return ea(_n.number)[1]}function si(){return Li("%",_n.percentageValue,1)||pi()||di()}function pi(){return Li("position-keyword",_n.positionKeywords,1)}function di(){return Li("px",_n.pixelValue,1)||Li("em",_n.emValue,1)}function Li(gi,$i,Ii){var sa=ea($i);if(sa)return{type:gi,value:sa[Ii]}}function ea(gi){var $i,Ii;return Ii=/^[\n\r\t\s]+/.exec(Cn),Ii&&Ki(Ii[0].length),$i=gi.exec(Cn),$i&&Ki($i[0].length),$i}function Ki(gi){Cn=Cn.substr(gi)}return function(gi){return Cn=gi.toString(),Nn()}}();var parse=GradientParser.parse,stringify=GradientParser.stringify,top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(_n,Cn){return _n.concat([Cn+"-"+start,Cn+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(_n,Cn){return _n.concat([Cn,Cn+"-"+start,Cn+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(_n){return _n?(_n.nodeName||"").toLowerCase():null}function getWindow(_n){if(_n==null)return window;if(_n.toString()!=="[object Window]"){var Cn=_n.ownerDocument;return Cn&&Cn.defaultView||window}return _n}function isElement$1(_n){var Cn=getWindow(_n).Element;return _n instanceof Cn||_n instanceof Element}function isHTMLElement(_n){var Cn=getWindow(_n).HTMLElement;return _n instanceof Cn||_n instanceof HTMLElement}function isShadowRoot(_n){if(typeof ShadowRoot>"u")return!1;var Cn=getWindow(_n).ShadowRoot;return _n instanceof Cn||_n instanceof ShadowRoot}function applyStyles(_n){var Cn=_n.state;Object.keys(Cn.elements).forEach(function($n){var Nn=Cn.styles[$n]||{},Bn=Cn.attributes[$n]||{},Ln=Cn.elements[$n];!isHTMLElement(Ln)||!getNodeName(Ln)||(Object.assign(Ln.style,Nn),Object.keys(Bn).forEach(function(In){var Pn=Bn[In];Pn===!1?Ln.removeAttribute(In):Ln.setAttribute(In,Pn===!0?"":Pn)}))})}function effect$2(_n){var Cn=_n.state,$n={popper:{position:Cn.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(Cn.elements.popper.style,$n.popper),Cn.styles=$n,Cn.elements.arrow&&Object.assign(Cn.elements.arrow.style,$n.arrow),function(){Object.keys(Cn.elements).forEach(function(Nn){var Bn=Cn.elements[Nn],Ln=Cn.attributes[Nn]||{},In=Object.keys(Cn.styles.hasOwnProperty(Nn)?Cn.styles[Nn]:$n[Nn]),Pn=In.reduce(function(Dn,Wn){return Dn[Wn]="",Dn},{});!isHTMLElement(Bn)||!getNodeName(Bn)||(Object.assign(Bn.style,Pn),Object.keys(Ln).forEach(function(Dn){Bn.removeAttribute(Dn)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement$1(_n){return _n.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var _n=navigator.userAgentData;return _n!=null&&_n.brands&&Array.isArray(_n.brands)?_n.brands.map(function(Cn){return Cn.brand+"/"+Cn.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(_n,Cn,$n){Cn===void 0&&(Cn=!1),$n===void 0&&($n=!1);var Nn=_n.getBoundingClientRect(),Bn=1,Ln=1;Cn&&isHTMLElement(_n)&&(Bn=_n.offsetWidth>0&&round(Nn.width)/_n.offsetWidth||1,Ln=_n.offsetHeight>0&&round(Nn.height)/_n.offsetHeight||1);var In=isElement$1(_n)?getWindow(_n):window,Pn=In.visualViewport,Dn=!isLayoutViewport()&&$n,Wn=(Nn.left+(Dn&&Pn?Pn.offsetLeft:0))/Bn,Hn=(Nn.top+(Dn&&Pn?Pn.offsetTop:0))/Ln,Yn=Nn.width/Bn,Gn=Nn.height/Ln;return{width:Yn,height:Gn,top:Hn,right:Wn+Yn,bottom:Hn+Gn,left:Wn,x:Wn,y:Hn}}function getLayoutRect(_n){var Cn=getBoundingClientRect(_n),$n=_n.offsetWidth,Nn=_n.offsetHeight;return Math.abs(Cn.width-$n)<=1&&($n=Cn.width),Math.abs(Cn.height-Nn)<=1&&(Nn=Cn.height),{x:_n.offsetLeft,y:_n.offsetTop,width:$n,height:Nn}}function contains(_n,Cn){var $n=Cn.getRootNode&&Cn.getRootNode();if(_n.contains(Cn))return!0;if($n&&isShadowRoot($n)){var Nn=Cn;do{if(Nn&&_n.isSameNode(Nn))return!0;Nn=Nn.parentNode||Nn.host}while(Nn)}return!1}function getComputedStyle(_n){return getWindow(_n).getComputedStyle(_n)}function isTableElement(_n){return["table","td","th"].indexOf(getNodeName(_n))>=0}function getDocumentElement(_n){return((isElement$1(_n)?_n.ownerDocument:_n.document)||window.document).documentElement}function getParentNode(_n){return getNodeName(_n)==="html"?_n:_n.assignedSlot||_n.parentNode||(isShadowRoot(_n)?_n.host:null)||getDocumentElement(_n)}function getTrueOffsetParent(_n){return!isHTMLElement(_n)||getComputedStyle(_n).position==="fixed"?null:_n.offsetParent}function getContainingBlock(_n){var Cn=/firefox/i.test(getUAString()),$n=/Trident/i.test(getUAString());if($n&&isHTMLElement(_n)){var Nn=getComputedStyle(_n);if(Nn.position==="fixed")return null}var Bn=getParentNode(_n);for(isShadowRoot(Bn)&&(Bn=Bn.host);isHTMLElement(Bn)&&["html","body"].indexOf(getNodeName(Bn))<0;){var Ln=getComputedStyle(Bn);if(Ln.transform!=="none"||Ln.perspective!=="none"||Ln.contain==="paint"||["transform","perspective"].indexOf(Ln.willChange)!==-1||Cn&&Ln.willChange==="filter"||Cn&&Ln.filter&&Ln.filter!=="none")return Bn;Bn=Bn.parentNode}return null}function getOffsetParent(_n){for(var Cn=getWindow(_n),$n=getTrueOffsetParent(_n);$n&&isTableElement($n)&&getComputedStyle($n).position==="static";)$n=getTrueOffsetParent($n);return $n&&(getNodeName($n)==="html"||getNodeName($n)==="body"&&getComputedStyle($n).position==="static")?Cn:$n||getContainingBlock(_n)||Cn}function getMainAxisFromPlacement(_n){return["top","bottom"].indexOf(_n)>=0?"x":"y"}function within(_n,Cn,$n){return max(_n,min(Cn,$n))}function withinMaxClamp(_n,Cn,$n){var Nn=within(_n,Cn,$n);return Nn>$n?$n:Nn}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(_n){return Object.assign({},getFreshSideObject(),_n)}function expandToHashMap(_n,Cn){return Cn.reduce(function($n,Nn){return $n[Nn]=_n,$n},{})}var toPaddingObject=function _n(Cn,$n){return Cn=typeof Cn=="function"?Cn(Object.assign({},$n.rects,{placement:$n.placement})):Cn,mergePaddingObject(typeof Cn!="number"?Cn:expandToHashMap(Cn,basePlacements))};function arrow(_n){var Cn,$n=_n.state,Nn=_n.name,Bn=_n.options,Ln=$n.elements.arrow,In=$n.modifiersData.popperOffsets,Pn=getBasePlacement$1($n.placement),Dn=getMainAxisFromPlacement(Pn),Wn=[left,right].indexOf(Pn)>=0,Hn=Wn?"height":"width";if(!(!Ln||!In)){var Yn=toPaddingObject(Bn.padding,$n),Gn=getLayoutRect(Ln),rr=Dn==="y"?top:left,nr=Dn==="y"?bottom:right,Yo=$n.rects.reference[Hn]+$n.rects.reference[Dn]-In[Dn]-$n.rects.popper[Hn],Zo=In[Dn]-$n.rects.reference[Dn],ei=getOffsetParent(Ln),li=ei?Dn==="y"?ei.clientHeight||0:ei.clientWidth||0:0,vi=Yo/2-Zo/2,Xo=Yn[rr],hi=li-Gn[Hn]-Yn[nr],mi=li/2-Gn[Hn]/2+vi,zn=within(Xo,mi,hi),oi=Dn;$n.modifiersData[Nn]=(Cn={},Cn[oi]=zn,Cn.centerOffset=zn-mi,Cn)}}function effect$1(_n){var Cn=_n.state,$n=_n.options,Nn=$n.element,Bn=Nn===void 0?"[data-popper-arrow]":Nn;Bn!=null&&(typeof Bn=="string"&&(Bn=Cn.elements.popper.querySelector(Bn),!Bn)||contains(Cn.elements.popper,Bn)&&(Cn.elements.arrow=Bn))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(_n){return _n.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(_n,Cn){var $n=_n.x,Nn=_n.y,Bn=Cn.devicePixelRatio||1;return{x:round($n*Bn)/Bn||0,y:round(Nn*Bn)/Bn||0}}function mapToStyles(_n){var Cn,$n=_n.popper,Nn=_n.popperRect,Bn=_n.placement,Ln=_n.variation,In=_n.offsets,Pn=_n.position,Dn=_n.gpuAcceleration,Wn=_n.adaptive,Hn=_n.roundOffsets,Yn=_n.isFixed,Gn=In.x,rr=Gn===void 0?0:Gn,nr=In.y,Yo=nr===void 0?0:nr,Zo=typeof Hn=="function"?Hn({x:rr,y:Yo}):{x:rr,y:Yo};rr=Zo.x,Yo=Zo.y;var ei=In.hasOwnProperty("x"),li=In.hasOwnProperty("y"),vi=left,Xo=top,hi=window;if(Wn){var mi=getOffsetParent($n),zn="clientHeight",oi="clientWidth";if(mi===getWindow($n)&&(mi=getDocumentElement($n),getComputedStyle(mi).position!=="static"&&Pn==="absolute"&&(zn="scrollHeight",oi="scrollWidth")),mi=mi,Bn===top||(Bn===left||Bn===right)&&Ln===end){Xo=bottom;var Jo=Yn&&mi===hi&&hi.visualViewport?hi.visualViewport.height:mi[zn];Yo-=Jo-Nn.height,Yo*=Dn?1:-1}if(Bn===left||(Bn===top||Bn===bottom)&&Ln===end){vi=right;var ni=Yn&&mi===hi&&hi.visualViewport?hi.visualViewport.width:mi[oi];rr-=ni-Nn.width,rr*=Dn?1:-1}}var si=Object.assign({position:Pn},Wn&&unsetSides),pi=Hn===!0?roundOffsetsByDPR({x:rr,y:Yo},getWindow($n)):{x:rr,y:Yo};if(rr=pi.x,Yo=pi.y,Dn){var di;return Object.assign({},si,(di={},di[Xo]=li?"0":"",di[vi]=ei?"0":"",di.transform=(hi.devicePixelRatio||1)<=1?"translate("+rr+"px, "+Yo+"px)":"translate3d("+rr+"px, "+Yo+"px, 0)",di))}return Object.assign({},si,(Cn={},Cn[Xo]=li?Yo+"px":"",Cn[vi]=ei?rr+"px":"",Cn.transform="",Cn))}function computeStyles(_n){var Cn=_n.state,$n=_n.options,Nn=$n.gpuAcceleration,Bn=Nn===void 0?!0:Nn,Ln=$n.adaptive,In=Ln===void 0?!0:Ln,Pn=$n.roundOffsets,Dn=Pn===void 0?!0:Pn,Wn={placement:getBasePlacement$1(Cn.placement),variation:getVariation(Cn.placement),popper:Cn.elements.popper,popperRect:Cn.rects.popper,gpuAcceleration:Bn,isFixed:Cn.options.strategy==="fixed"};Cn.modifiersData.popperOffsets!=null&&(Cn.styles.popper=Object.assign({},Cn.styles.popper,mapToStyles(Object.assign({},Wn,{offsets:Cn.modifiersData.popperOffsets,position:Cn.options.strategy,adaptive:In,roundOffsets:Dn})))),Cn.modifiersData.arrow!=null&&(Cn.styles.arrow=Object.assign({},Cn.styles.arrow,mapToStyles(Object.assign({},Wn,{offsets:Cn.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:Dn})))),Cn.attributes.popper=Object.assign({},Cn.attributes.popper,{"data-popper-placement":Cn.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(_n){var Cn=_n.state,$n=_n.instance,Nn=_n.options,Bn=Nn.scroll,Ln=Bn===void 0?!0:Bn,In=Nn.resize,Pn=In===void 0?!0:In,Dn=getWindow(Cn.elements.popper),Wn=[].concat(Cn.scrollParents.reference,Cn.scrollParents.popper);return Ln&&Wn.forEach(function(Hn){Hn.addEventListener("scroll",$n.update,passive)}),Pn&&Dn.addEventListener("resize",$n.update,passive),function(){Ln&&Wn.forEach(function(Hn){Hn.removeEventListener("scroll",$n.update,passive)}),Pn&&Dn.removeEventListener("resize",$n.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function _n(){},effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(_n){return _n.replace(/left|right|bottom|top/g,function(Cn){return hash$1[Cn]})}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(_n){return _n.replace(/start|end/g,function(Cn){return hash[Cn]})}function getWindowScroll(_n){var Cn=getWindow(_n),$n=Cn.pageXOffset,Nn=Cn.pageYOffset;return{scrollLeft:$n,scrollTop:Nn}}function getWindowScrollBarX(_n){return getBoundingClientRect(getDocumentElement(_n)).left+getWindowScroll(_n).scrollLeft}function getViewportRect(_n,Cn){var $n=getWindow(_n),Nn=getDocumentElement(_n),Bn=$n.visualViewport,Ln=Nn.clientWidth,In=Nn.clientHeight,Pn=0,Dn=0;if(Bn){Ln=Bn.width,In=Bn.height;var Wn=isLayoutViewport();(Wn||!Wn&&Cn==="fixed")&&(Pn=Bn.offsetLeft,Dn=Bn.offsetTop)}return{width:Ln,height:In,x:Pn+getWindowScrollBarX(_n),y:Dn}}function getDocumentRect(_n){var Cn,$n=getDocumentElement(_n),Nn=getWindowScroll(_n),Bn=(Cn=_n.ownerDocument)==null?void 0:Cn.body,Ln=max($n.scrollWidth,$n.clientWidth,Bn?Bn.scrollWidth:0,Bn?Bn.clientWidth:0),In=max($n.scrollHeight,$n.clientHeight,Bn?Bn.scrollHeight:0,Bn?Bn.clientHeight:0),Pn=-Nn.scrollLeft+getWindowScrollBarX(_n),Dn=-Nn.scrollTop;return getComputedStyle(Bn||$n).direction==="rtl"&&(Pn+=max($n.clientWidth,Bn?Bn.clientWidth:0)-Ln),{width:Ln,height:In,x:Pn,y:Dn}}function isScrollParent(_n){var Cn=getComputedStyle(_n),$n=Cn.overflow,Nn=Cn.overflowX,Bn=Cn.overflowY;return/auto|scroll|overlay|hidden/.test($n+Bn+Nn)}function getScrollParent(_n){return["html","body","#document"].indexOf(getNodeName(_n))>=0?_n.ownerDocument.body:isHTMLElement(_n)&&isScrollParent(_n)?_n:getScrollParent(getParentNode(_n))}function listScrollParents(_n,Cn){var $n;Cn===void 0&&(Cn=[]);var Nn=getScrollParent(_n),Bn=Nn===(($n=_n.ownerDocument)==null?void 0:$n.body),Ln=getWindow(Nn),In=Bn?[Ln].concat(Ln.visualViewport||[],isScrollParent(Nn)?Nn:[]):Nn,Pn=Cn.concat(In);return Bn?Pn:Pn.concat(listScrollParents(getParentNode(In)))}function rectToClientRect(_n){return Object.assign({},_n,{left:_n.x,top:_n.y,right:_n.x+_n.width,bottom:_n.y+_n.height})}function getInnerBoundingClientRect(_n,Cn){var $n=getBoundingClientRect(_n,!1,Cn==="fixed");return $n.top=$n.top+_n.clientTop,$n.left=$n.left+_n.clientLeft,$n.bottom=$n.top+_n.clientHeight,$n.right=$n.left+_n.clientWidth,$n.width=_n.clientWidth,$n.height=_n.clientHeight,$n.x=$n.left,$n.y=$n.top,$n}function getClientRectFromMixedType(_n,Cn,$n){return Cn===viewport?rectToClientRect(getViewportRect(_n,$n)):isElement$1(Cn)?getInnerBoundingClientRect(Cn,$n):rectToClientRect(getDocumentRect(getDocumentElement(_n)))}function getClippingParents(_n){var Cn=listScrollParents(getParentNode(_n)),$n=["absolute","fixed"].indexOf(getComputedStyle(_n).position)>=0,Nn=$n&&isHTMLElement(_n)?getOffsetParent(_n):_n;return isElement$1(Nn)?Cn.filter(function(Bn){return isElement$1(Bn)&&contains(Bn,Nn)&&getNodeName(Bn)!=="body"}):[]}function getClippingRect(_n,Cn,$n,Nn){var Bn=Cn==="clippingParents"?getClippingParents(_n):[].concat(Cn),Ln=[].concat(Bn,[$n]),In=Ln[0],Pn=Ln.reduce(function(Dn,Wn){var Hn=getClientRectFromMixedType(_n,Wn,Nn);return Dn.top=max(Hn.top,Dn.top),Dn.right=min(Hn.right,Dn.right),Dn.bottom=min(Hn.bottom,Dn.bottom),Dn.left=max(Hn.left,Dn.left),Dn},getClientRectFromMixedType(_n,In,Nn));return Pn.width=Pn.right-Pn.left,Pn.height=Pn.bottom-Pn.top,Pn.x=Pn.left,Pn.y=Pn.top,Pn}function computeOffsets(_n){var Cn=_n.reference,$n=_n.element,Nn=_n.placement,Bn=Nn?getBasePlacement$1(Nn):null,Ln=Nn?getVariation(Nn):null,In=Cn.x+Cn.width/2-$n.width/2,Pn=Cn.y+Cn.height/2-$n.height/2,Dn;switch(Bn){case top:Dn={x:In,y:Cn.y-$n.height};break;case bottom:Dn={x:In,y:Cn.y+Cn.height};break;case right:Dn={x:Cn.x+Cn.width,y:Pn};break;case left:Dn={x:Cn.x-$n.width,y:Pn};break;default:Dn={x:Cn.x,y:Cn.y}}var Wn=Bn?getMainAxisFromPlacement(Bn):null;if(Wn!=null){var Hn=Wn==="y"?"height":"width";switch(Ln){case start:Dn[Wn]=Dn[Wn]-(Cn[Hn]/2-$n[Hn]/2);break;case end:Dn[Wn]=Dn[Wn]+(Cn[Hn]/2-$n[Hn]/2);break}}return Dn}function detectOverflow(_n,Cn){Cn===void 0&&(Cn={});var $n=Cn,Nn=$n.placement,Bn=Nn===void 0?_n.placement:Nn,Ln=$n.strategy,In=Ln===void 0?_n.strategy:Ln,Pn=$n.boundary,Dn=Pn===void 0?clippingParents:Pn,Wn=$n.rootBoundary,Hn=Wn===void 0?viewport:Wn,Yn=$n.elementContext,Gn=Yn===void 0?popper:Yn,rr=$n.altBoundary,nr=rr===void 0?!1:rr,Yo=$n.padding,Zo=Yo===void 0?0:Yo,ei=mergePaddingObject(typeof Zo!="number"?Zo:expandToHashMap(Zo,basePlacements)),li=Gn===popper?reference:popper,vi=_n.rects.popper,Xo=_n.elements[nr?li:Gn],hi=getClippingRect(isElement$1(Xo)?Xo:Xo.contextElement||getDocumentElement(_n.elements.popper),Dn,Hn,In),mi=getBoundingClientRect(_n.elements.reference),zn=computeOffsets({reference:mi,element:vi,strategy:"absolute",placement:Bn}),oi=rectToClientRect(Object.assign({},vi,zn)),Jo=Gn===popper?oi:mi,ni={top:hi.top-Jo.top+ei.top,bottom:Jo.bottom-hi.bottom+ei.bottom,left:hi.left-Jo.left+ei.left,right:Jo.right-hi.right+ei.right},si=_n.modifiersData.offset;if(Gn===popper&&si){var pi=si[Bn];Object.keys(ni).forEach(function(di){var Li=[right,bottom].indexOf(di)>=0?1:-1,ea=[top,bottom].indexOf(di)>=0?"y":"x";ni[di]+=pi[ea]*Li})}return ni}function computeAutoPlacement(_n,Cn){Cn===void 0&&(Cn={});var $n=Cn,Nn=$n.placement,Bn=$n.boundary,Ln=$n.rootBoundary,In=$n.padding,Pn=$n.flipVariations,Dn=$n.allowedAutoPlacements,Wn=Dn===void 0?placements:Dn,Hn=getVariation(Nn),Yn=Hn?Pn?variationPlacements:variationPlacements.filter(function(nr){return getVariation(nr)===Hn}):basePlacements,Gn=Yn.filter(function(nr){return Wn.indexOf(nr)>=0});Gn.length===0&&(Gn=Yn);var rr=Gn.reduce(function(nr,Yo){return nr[Yo]=detectOverflow(_n,{placement:Yo,boundary:Bn,rootBoundary:Ln,padding:In})[getBasePlacement$1(Yo)],nr},{});return Object.keys(rr).sort(function(nr,Yo){return rr[nr]-rr[Yo]})}function getExpandedFallbackPlacements(_n){if(getBasePlacement$1(_n)===auto)return[];var Cn=getOppositePlacement(_n);return[getOppositeVariationPlacement(_n),Cn,getOppositeVariationPlacement(Cn)]}function flip(_n){var Cn=_n.state,$n=_n.options,Nn=_n.name;if(!Cn.modifiersData[Nn]._skip){for(var Bn=$n.mainAxis,Ln=Bn===void 0?!0:Bn,In=$n.altAxis,Pn=In===void 0?!0:In,Dn=$n.fallbackPlacements,Wn=$n.padding,Hn=$n.boundary,Yn=$n.rootBoundary,Gn=$n.altBoundary,rr=$n.flipVariations,nr=rr===void 0?!0:rr,Yo=$n.allowedAutoPlacements,Zo=Cn.options.placement,ei=getBasePlacement$1(Zo),li=ei===Zo,vi=Dn||(li||!nr?[getOppositePlacement(Zo)]:getExpandedFallbackPlacements(Zo)),Xo=[Zo].concat(vi).reduce(function(Hi,ji){return Hi.concat(getBasePlacement$1(ji)===auto?computeAutoPlacement(Cn,{placement:ji,boundary:Hn,rootBoundary:Yn,padding:Wn,flipVariations:nr,allowedAutoPlacements:Yo}):ji)},[]),hi=Cn.rects.reference,mi=Cn.rects.popper,zn=new Map,oi=!0,Jo=Xo[0],ni=0;ni=0,ea=Li?"width":"height",Ki=detectOverflow(Cn,{placement:si,boundary:Hn,rootBoundary:Yn,altBoundary:Gn,padding:Wn}),gi=Li?di?right:left:di?bottom:top;hi[ea]>mi[ea]&&(gi=getOppositePlacement(gi));var $i=getOppositePlacement(gi),Ii=[];if(Ln&&Ii.push(Ki[pi]<=0),Pn&&Ii.push(Ki[gi]<=0,Ki[$i]<=0),Ii.every(function(Hi){return Hi})){Jo=si,oi=!1;break}zn.set(si,Ii)}if(oi)for(var sa=nr?3:1,la=function(ji){var Ui=Xo.find(function(Qi){var ia=zn.get(Qi);if(ia)return ia.slice(0,ji).every(function(Ji){return Ji})});if(Ui)return Jo=Ui,"break"},xi=sa;xi>0;xi--){var Mi=la(xi);if(Mi==="break")break}Cn.placement!==Jo&&(Cn.modifiersData[Nn]._skip=!0,Cn.placement=Jo,Cn.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(_n,Cn,$n){return $n===void 0&&($n={x:0,y:0}),{top:_n.top-Cn.height-$n.y,right:_n.right-Cn.width+$n.x,bottom:_n.bottom-Cn.height+$n.y,left:_n.left-Cn.width-$n.x}}function isAnySideFullyClipped(_n){return[top,right,bottom,left].some(function(Cn){return _n[Cn]>=0})}function hide(_n){var Cn=_n.state,$n=_n.name,Nn=Cn.rects.reference,Bn=Cn.rects.popper,Ln=Cn.modifiersData.preventOverflow,In=detectOverflow(Cn,{elementContext:"reference"}),Pn=detectOverflow(Cn,{altBoundary:!0}),Dn=getSideOffsets(In,Nn),Wn=getSideOffsets(Pn,Bn,Ln),Hn=isAnySideFullyClipped(Dn),Yn=isAnySideFullyClipped(Wn);Cn.modifiersData[$n]={referenceClippingOffsets:Dn,popperEscapeOffsets:Wn,isReferenceHidden:Hn,hasPopperEscaped:Yn},Cn.attributes.popper=Object.assign({},Cn.attributes.popper,{"data-popper-reference-hidden":Hn,"data-popper-escaped":Yn})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(_n,Cn,$n){var Nn=getBasePlacement$1(_n),Bn=[left,top].indexOf(Nn)>=0?-1:1,Ln=typeof $n=="function"?$n(Object.assign({},Cn,{placement:_n})):$n,In=Ln[0],Pn=Ln[1];return In=In||0,Pn=(Pn||0)*Bn,[left,right].indexOf(Nn)>=0?{x:Pn,y:In}:{x:In,y:Pn}}function offset(_n){var Cn=_n.state,$n=_n.options,Nn=_n.name,Bn=$n.offset,Ln=Bn===void 0?[0,0]:Bn,In=placements.reduce(function(Hn,Yn){return Hn[Yn]=distanceAndSkiddingToXY(Yn,Cn.rects,Ln),Hn},{}),Pn=In[Cn.placement],Dn=Pn.x,Wn=Pn.y;Cn.modifiersData.popperOffsets!=null&&(Cn.modifiersData.popperOffsets.x+=Dn,Cn.modifiersData.popperOffsets.y+=Wn),Cn.modifiersData[Nn]=In}const offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(_n){var Cn=_n.state,$n=_n.name;Cn.modifiersData[$n]=computeOffsets({reference:Cn.rects.reference,element:Cn.rects.popper,strategy:"absolute",placement:Cn.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(_n){return _n==="x"?"y":"x"}function preventOverflow(_n){var Cn=_n.state,$n=_n.options,Nn=_n.name,Bn=$n.mainAxis,Ln=Bn===void 0?!0:Bn,In=$n.altAxis,Pn=In===void 0?!1:In,Dn=$n.boundary,Wn=$n.rootBoundary,Hn=$n.altBoundary,Yn=$n.padding,Gn=$n.tether,rr=Gn===void 0?!0:Gn,nr=$n.tetherOffset,Yo=nr===void 0?0:nr,Zo=detectOverflow(Cn,{boundary:Dn,rootBoundary:Wn,padding:Yn,altBoundary:Hn}),ei=getBasePlacement$1(Cn.placement),li=getVariation(Cn.placement),vi=!li,Xo=getMainAxisFromPlacement(ei),hi=getAltAxis(Xo),mi=Cn.modifiersData.popperOffsets,zn=Cn.rects.reference,oi=Cn.rects.popper,Jo=typeof Yo=="function"?Yo(Object.assign({},Cn.rects,{placement:Cn.placement})):Yo,ni=typeof Jo=="number"?{mainAxis:Jo,altAxis:Jo}:Object.assign({mainAxis:0,altAxis:0},Jo),si=Cn.modifiersData.offset?Cn.modifiersData.offset[Cn.placement]:null,pi={x:0,y:0};if(mi){if(Ln){var di,Li=Xo==="y"?top:left,ea=Xo==="y"?bottom:right,Ki=Xo==="y"?"height":"width",gi=mi[Xo],$i=gi+Zo[Li],Ii=gi-Zo[ea],sa=rr?-oi[Ki]/2:0,la=li===start?zn[Ki]:oi[Ki],xi=li===start?-oi[Ki]:-zn[Ki],Mi=Cn.elements.arrow,Hi=rr&&Mi?getLayoutRect(Mi):{width:0,height:0},ji=Cn.modifiersData["arrow#persistent"]?Cn.modifiersData["arrow#persistent"].padding:getFreshSideObject(),Ui=ji[Li],Qi=ji[ea],ia=within(0,zn[Ki],Hi[Ki]),Ji=vi?zn[Ki]/2-sa-ia-Ui-ni.mainAxis:la-ia-Ui-ni.mainAxis,na=vi?-zn[Ki]/2+sa+ia+Qi+ni.mainAxis:xi+ia+Qi+ni.mainAxis,ga=Cn.elements.arrow&&getOffsetParent(Cn.elements.arrow),ma=ga?Xo==="y"?ga.clientTop||0:ga.clientLeft||0:0,ri=(di=si==null?void 0:si[Xo])!=null?di:0,ci=gi+Ji-ri-ma,_i=gi+na-ri,Ti=within(rr?min($i,ci):$i,gi,rr?max(Ii,_i):Ii);mi[Xo]=Ti,pi[Xo]=Ti-gi}if(Pn){var bi,Oi=Xo==="x"?top:left,Fi=Xo==="x"?bottom:right,Pi=mi[hi],Ri=hi==="y"?"height":"width",Si=Pi+Zo[Oi],Di=Pi-Zo[Fi],Gi=[top,left].indexOf(ei)!==-1,ki=(bi=si==null?void 0:si[hi])!=null?bi:0,qi=Gi?Si:Pi-zn[Ri]-oi[Ri]-ki+ni.altAxis,ra=Gi?Pi+zn[Ri]+oi[Ri]-ki-ni.altAxis:Di,fa=rr&&Gi?withinMaxClamp(qi,Pi,ra):within(rr?qi:Si,Pi,rr?ra:Di);mi[hi]=fa,pi[hi]=fa-Pi}Cn.modifiersData[Nn]=pi}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(_n){return{scrollLeft:_n.scrollLeft,scrollTop:_n.scrollTop}}function getNodeScroll(_n){return _n===getWindow(_n)||!isHTMLElement(_n)?getWindowScroll(_n):getHTMLElementScroll(_n)}function isElementScaled(_n){var Cn=_n.getBoundingClientRect(),$n=round(Cn.width)/_n.offsetWidth||1,Nn=round(Cn.height)/_n.offsetHeight||1;return $n!==1||Nn!==1}function getCompositeRect(_n,Cn,$n){$n===void 0&&($n=!1);var Nn=isHTMLElement(Cn),Bn=isHTMLElement(Cn)&&isElementScaled(Cn),Ln=getDocumentElement(Cn),In=getBoundingClientRect(_n,Bn,$n),Pn={scrollLeft:0,scrollTop:0},Dn={x:0,y:0};return(Nn||!Nn&&!$n)&&((getNodeName(Cn)!=="body"||isScrollParent(Ln))&&(Pn=getNodeScroll(Cn)),isHTMLElement(Cn)?(Dn=getBoundingClientRect(Cn,!0),Dn.x+=Cn.clientLeft,Dn.y+=Cn.clientTop):Ln&&(Dn.x=getWindowScrollBarX(Ln))),{x:In.left+Pn.scrollLeft-Dn.x,y:In.top+Pn.scrollTop-Dn.y,width:In.width,height:In.height}}function order(_n){var Cn=new Map,$n=new Set,Nn=[];_n.forEach(function(Ln){Cn.set(Ln.name,Ln)});function Bn(Ln){$n.add(Ln.name);var In=[].concat(Ln.requires||[],Ln.requiresIfExists||[]);In.forEach(function(Pn){if(!$n.has(Pn)){var Dn=Cn.get(Pn);Dn&&Bn(Dn)}}),Nn.push(Ln)}return _n.forEach(function(Ln){$n.has(Ln.name)||Bn(Ln)}),Nn}function orderModifiers(_n){var Cn=order(_n);return modifierPhases.reduce(function($n,Nn){return $n.concat(Cn.filter(function(Bn){return Bn.phase===Nn}))},[])}function debounce$1(_n){var Cn;return function(){return Cn||(Cn=new Promise(function($n){Promise.resolve().then(function(){Cn=void 0,$n(_n())})})),Cn}}function mergeByName(_n){var Cn=_n.reduce(function($n,Nn){var Bn=$n[Nn.name];return $n[Nn.name]=Bn?Object.assign({},Bn,Nn,{options:Object.assign({},Bn.options,Nn.options),data:Object.assign({},Bn.data,Nn.data)}):Nn,$n},{});return Object.keys(Cn).map(function($n){return Cn[$n]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var _n=arguments.length,Cn=new Array(_n),$n=0;$n<_n;$n++)Cn[$n]=arguments[$n];return!Cn.some(function(Nn){return!(Nn&&typeof Nn.getBoundingClientRect=="function")})}function popperGenerator(_n){_n===void 0&&(_n={});var Cn=_n,$n=Cn.defaultModifiers,Nn=$n===void 0?[]:$n,Bn=Cn.defaultOptions,Ln=Bn===void 0?DEFAULT_OPTIONS:Bn;return function(Pn,Dn,Wn){Wn===void 0&&(Wn=Ln);var Hn={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,Ln),modifiersData:{},elements:{reference:Pn,popper:Dn},attributes:{},styles:{}},Yn=[],Gn=!1,rr={state:Hn,setOptions:function(ei){var li=typeof ei=="function"?ei(Hn.options):ei;Yo(),Hn.options=Object.assign({},Ln,Hn.options,li),Hn.scrollParents={reference:isElement$1(Pn)?listScrollParents(Pn):Pn.contextElement?listScrollParents(Pn.contextElement):[],popper:listScrollParents(Dn)};var vi=orderModifiers(mergeByName([].concat(Nn,Hn.options.modifiers)));return Hn.orderedModifiers=vi.filter(function(Xo){return Xo.enabled}),nr(),rr.update()},forceUpdate:function(){if(!Gn){var ei=Hn.elements,li=ei.reference,vi=ei.popper;if(areValidElements(li,vi)){Hn.rects={reference:getCompositeRect(li,getOffsetParent(vi),Hn.options.strategy==="fixed"),popper:getLayoutRect(vi)},Hn.reset=!1,Hn.placement=Hn.options.placement,Hn.orderedModifiers.forEach(function(ni){return Hn.modifiersData[ni.name]=Object.assign({},ni.data)});for(var Xo=0;Xo * * Copyright (c) 2014-2017, Jon Schlinkert. @@ -64,13 +64,13 @@ ${$$1($n)}`),Nn}})}function B$2(_n){return j$1("instanceOf",{type:_n})}function ${$$1($n)}`),Nn}})}function J$1(_n){const Cn=Object.keys(_n),$n=Cn.filter(Bn=>{var Ln;return!((Ln=_n[Bn])===null||Ln===void 0||!Ln.required)}),Nn=j$1("shape",{type:Object,validator(Bn){if(!c$1(Bn))return!1;const Ln=Object.keys(Bn);if($n.length>0&&$n.some(In=>Ln.indexOf(In)===-1)){const In=$n.filter(Pn=>Ln.indexOf(Pn)===-1);return d$1(In.length===1?`shape - required property "${In[0]}" is not defined.`:`shape - required properties "${In.join('", "')}" are not defined.`),!1}return Ln.every(In=>{if(Cn.indexOf(In)===-1)return this._vueTypes_isLoose===!0||(d$1(`shape - shape definition does not include a "${In}" property. Allowed keys: "${Cn.join('", "')}".`),!1);const Pn=m$1(_n[In],Bn[In],!0);return typeof Pn=="string"&&d$1(`shape - "${In}" property validation error: ${$$1(Pn)}`),Pn===!0})}});return Object.defineProperty(Nn,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(Nn,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),Nn}const M$1=["name","validate","getter"],R$1=(()=>{var _n;return(_n=class{static get any(){return w$1()}static get func(){return P$1().def(this.defaults.func)}static get bool(){return x$1().def(this.defaults.bool)}static get string(){return E$1().def(this.defaults.string)}static get number(){return N$1().def(this.defaults.number)}static get array(){return q$1().def(this.defaults.array)}static get object(){return A$1().def(this.defaults.object)}static get integer(){return V$2().def(this.defaults.integer)}static get symbol(){return S$1()}static get nullable(){return{type:null}}static extend(Cn){if(v$1(Cn))return Cn.forEach(Dn=>this.extend(Dn)),this;const{name:$n,validate:Nn=!1,getter:Bn=!1}=Cn,Ln=r$1(Cn,M$1);if(p$1(this,$n))throw new TypeError(`[VueTypes error]: Type "${$n}" already defined`);const{type:In}=Ln;if(b$1(In))return delete Ln.type,Object.defineProperty(this,$n,Bn?{get:()=>T$1($n,In,Ln)}:{value(...Dn){const Wn=T$1($n,In,Ln);return Wn.validator&&(Wn.validator=Wn.validator.bind(Wn,...Dn)),Wn}});let Pn;return Pn=Bn?{get(){const Dn=Object.assign({},Ln);return Nn?_$1($n,Dn):j$1($n,Dn)},enumerable:!0}:{value(...Dn){const Wn=Object.assign({},Ln);let Hn;return Hn=Nn?_$1($n,Wn):j$1($n,Wn),Wn.validator&&(Hn.validator=Wn.validator.bind(Hn,...Dn)),Hn},enumerable:!0},Object.defineProperty(this,$n,Pn)}}).defaults={},_n.sensibleDefaults=void 0,_n.config=n$1,_n.custom=D$1,_n.oneOf=L$2,_n.instanceOf=B$2,_n.oneOfType=F$1,_n.arrayOf=Y$1,_n.objectOf=I$1,_n.shape=J$1,_n.utils={validate:(Cn,$n)=>m$1($n,Cn,!0)===!0,toType:(Cn,$n,Nn=!1)=>Nn?_$1(Cn,$n):j$1(Cn,$n)},_n})();function z$1(_n={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var Cn;return(Cn=class extends R$1{static get sensibleDefaults(){return t$1({},this.defaults)}static set sensibleDefaults($n){this.defaults=$n!==!1?t$1({},$n!==!0?$n:_n):{}}}).defaults=t$1({},_n),Cn}let C$1=class extends z$1(){};var t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function e(_n){var Cn={exports:{}};return _n(Cn,Cn.exports),Cn.exports}var n=function(_n){return _n&&_n.Math==Math&&_n},r=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof t=="object"&&t)||function(){return this}()||Function("return this")(),o=function(_n){try{return!!_n()}catch{return!0}},i$1=!o(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),u={}.propertyIsEnumerable,a$1=Object.getOwnPropertyDescriptor,c={f:a$1&&!u.call({1:2},1)?function(_n){var Cn=a$1(this,_n);return!!Cn&&Cn.enumerable}:u},l=function(_n,Cn){return{enumerable:!(1&_n),configurable:!(2&_n),writable:!(4&_n),value:Cn}},f={}.toString,s=function(_n){return f.call(_n).slice(8,-1)},d="".split,v=o(function(){return!Object("z").propertyIsEnumerable(0)})?function(_n){return s(_n)=="String"?d.call(_n,""):Object(_n)}:Object,p=function(_n){if(_n==null)throw TypeError("Can't call method on "+_n);return _n},g=function(_n){return v(p(_n))},h=function(_n){return typeof _n=="object"?_n!==null:typeof _n=="function"},y=function(_n,Cn){if(!h(_n))return _n;var $n,Nn;if(Cn&&typeof($n=_n.toString)=="function"&&!h(Nn=$n.call(_n))||typeof($n=_n.valueOf)=="function"&&!h(Nn=$n.call(_n))||!Cn&&typeof($n=_n.toString)=="function"&&!h(Nn=$n.call(_n)))return Nn;throw TypeError("Can't convert object to primitive value")},m={}.hasOwnProperty,S=function(_n,Cn){return m.call(_n,Cn)},x=r.document,b=h(x)&&h(x.createElement),E=function(_n){return b?x.createElement(_n):{}},w=!i$1&&!o(function(){return Object.defineProperty(E("div"),"a",{get:function(){return 7}}).a!=7}),O=Object.getOwnPropertyDescriptor,T={f:i$1?O:function(_n,Cn){if(_n=g(_n),Cn=y(Cn,!0),w)try{return O(_n,Cn)}catch{}if(S(_n,Cn))return l(!c.f.call(_n,Cn),_n[Cn])}},A=function(_n){if(!h(_n))throw TypeError(String(_n)+" is not an object");return _n},k=Object.defineProperty,R={f:i$1?k:function(_n,Cn,$n){if(A(_n),Cn=y(Cn,!0),A($n),w)try{return k(_n,Cn,$n)}catch{}if("get"in $n||"set"in $n)throw TypeError("Accessors not supported");return"value"in $n&&(_n[Cn]=$n.value),_n}},I=i$1?function(_n,Cn,$n){return R.f(_n,Cn,l(1,$n))}:function(_n,Cn,$n){return _n[Cn]=$n,_n},j=function(_n,Cn){try{I(r,_n,Cn)}catch{r[_n]=Cn}return Cn},C=r["__core-js_shared__"]||j("__core-js_shared__",{}),L$1=Function.toString;typeof C.inspectSource!="function"&&(C.inspectSource=function(_n){return L$1.call(_n)});var P,M,_,D=C.inspectSource,U=r.WeakMap,N=typeof U=="function"&&/native code/.test(D(U)),F=e(function(_n){(_n.exports=function(Cn,$n){return C[Cn]||(C[Cn]=$n!==void 0?$n:{})})("versions",[]).push({version:"3.8.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),W=0,z=Math.random(),$=function(_n){return"Symbol("+String(_n===void 0?"":_n)+")_"+(++W+z).toString(36)},B$1=F("keys"),Y=function(_n){return B$1[_n]||(B$1[_n]=$(_n))},G={},H=r.WeakMap;if(N){var X$1=C.state||(C.state=new H),V$1=X$1.get,K=X$1.has,q=X$1.set;P=function(_n,Cn){return Cn.facade=_n,q.call(X$1,_n,Cn),Cn},M=function(_n){return V$1.call(X$1,_n)||{}},_=function(_n){return K.call(X$1,_n)}}else{var Q=Y("state");G[Q]=!0,P=function(_n,Cn){return Cn.facade=_n,I(_n,Q,Cn),Cn},M=function(_n){return S(_n,Q)?_n[Q]:{}},_=function(_n){return S(_n,Q)}}var J={set:P,get:M,has:_,enforce:function(_n){return _(_n)?M(_n):P(_n,{})},getterFor:function(_n){return function(Cn){var $n;if(!h(Cn)||($n=M(Cn)).type!==_n)throw TypeError("Incompatible receiver, "+_n+" required");return $n}}},Z=e(function(_n){var Cn=J.get,$n=J.enforce,Nn=String(String).split("String");(_n.exports=function(Bn,Ln,In,Pn){var Dn,Wn=!!Pn&&!!Pn.unsafe,Hn=!!Pn&&!!Pn.enumerable,Yn=!!Pn&&!!Pn.noTargetGet;typeof In=="function"&&(typeof Ln!="string"||S(In,"name")||I(In,"name",Ln),(Dn=$n(In)).source||(Dn.source=Nn.join(typeof Ln=="string"?Ln:""))),Bn!==r?(Wn?!Yn&&Bn[Ln]&&(Hn=!0):delete Bn[Ln],Hn?Bn[Ln]=In:I(Bn,Ln,In)):Hn?Bn[Ln]=In:j(Ln,In)})(Function.prototype,"toString",function(){return typeof this=="function"&&Cn(this).source||D(this)})}),tt$1=r,et=function(_n){return typeof _n=="function"?_n:void 0},nt$1=function(_n,Cn){return arguments.length<2?et(tt$1[_n])||et(r[_n]):tt$1[_n]&&tt$1[_n][Cn]||r[_n]&&r[_n][Cn]},rt$1=Math.ceil,ot$1=Math.floor,it$1=function(_n){return isNaN(_n=+_n)?0:(_n>0?ot$1:rt$1)(_n)},ut$1=Math.min,at$1=function(_n){return _n>0?ut$1(it$1(_n),9007199254740991):0},ct$1=Math.max,lt$1=Math.min,ft$1=function(_n,Cn){var $n=it$1(_n);return $n<0?ct$1($n+Cn,0):lt$1($n,Cn)},st$1=function(_n){return function(Cn,$n,Nn){var Bn,Ln=g(Cn),In=at$1(Ln.length),Pn=ft$1(Nn,In);if(_n&&$n!=$n){for(;In>Pn;)if((Bn=Ln[Pn++])!=Bn)return!0}else for(;In>Pn;Pn++)if((_n||Pn in Ln)&&Ln[Pn]===$n)return _n||Pn||0;return!_n&&-1}},dt$1={includes:st$1(!0),indexOf:st$1(!1)},vt$1=dt$1.indexOf,pt$1=function(_n,Cn){var $n,Nn=g(_n),Bn=0,Ln=[];for($n in Nn)!S(G,$n)&&S(Nn,$n)&&Ln.push($n);for(;Cn.length>Bn;)S(Nn,$n=Cn[Bn++])&&(~vt$1(Ln,$n)||Ln.push($n));return Ln},gt$1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ht$1=gt$1.concat("length","prototype"),yt$1={f:Object.getOwnPropertyNames||function(_n){return pt$1(_n,ht$1)}},mt$1={f:Object.getOwnPropertySymbols},St$1=nt$1("Reflect","ownKeys")||function(_n){var Cn=yt$1.f(A(_n)),$n=mt$1.f;return $n?Cn.concat($n(_n)):Cn},xt$1=function(_n,Cn){for(var $n=St$1(Cn),Nn=R.f,Bn=T.f,Ln=0;Ln<$n.length;Ln++){var In=$n[Ln];S(_n,In)||Nn(_n,In,Bn(Cn,In))}},bt$1=/#|\.prototype\./,Et$1=function(_n,Cn){var $n=Ot$1[wt$1(_n)];return $n==At$1||$n!=Tt$1&&(typeof Cn=="function"?o(Cn):!!Cn)},wt$1=Et$1.normalize=function(_n){return String(_n).replace(bt$1,".").toLowerCase()},Ot$1=Et$1.data={},Tt$1=Et$1.NATIVE="N",At$1=Et$1.POLYFILL="P",kt$1=Et$1,Rt$1=T.f,It$1=function(_n,Cn){var $n,Nn,Bn,Ln,In,Pn=_n.target,Dn=_n.global,Wn=_n.stat;if($n=Dn?r:Wn?r[Pn]||j(Pn,{}):(r[Pn]||{}).prototype)for(Nn in Cn){if(Ln=Cn[Nn],Bn=_n.noTargetGet?(In=Rt$1($n,Nn))&&In.value:$n[Nn],!kt$1(Dn?Nn:Pn+(Wn?".":"#")+Nn,_n.forced)&&Bn!==void 0){if(typeof Ln==typeof Bn)continue;xt$1(Ln,Bn)}(_n.sham||Bn&&Bn.sham)&&I(Ln,"sham",!0),Z($n,Nn,Ln,_n)}},jt$1=function(_n,Cn){var $n=[][_n];return!!$n&&o(function(){$n.call(null,Cn||function(){throw 1},1)})},Ct$1=Object.defineProperty,Lt$1={},Pt$1=function(_n){throw _n},Mt$1=function(_n,Cn){if(S(Lt$1,_n))return Lt$1[_n];Cn||(Cn={});var $n=[][_n],Nn=!!S(Cn,"ACCESSORS")&&Cn.ACCESSORS,Bn=S(Cn,0)?Cn[0]:Pt$1,Ln=S(Cn,1)?Cn[1]:void 0;return Lt$1[_n]=!!$n&&!o(function(){if(Nn&&!i$1)return!0;var In={length:-1};Nn?Ct$1(In,1,{enumerable:!0,get:Pt$1}):In[1]=1,$n.call(In,Bn,Ln)})},_t$1=dt$1.indexOf,Dt$1=[].indexOf,Ut$1=!!Dt$1&&1/[1].indexOf(1,-0)<0,Nt$1=jt$1("indexOf"),Ft$1=Mt$1("indexOf",{ACCESSORS:!0,1:0});function Wt$1(_n,Cn){if(!(_n instanceof Cn))throw new TypeError("Cannot call a class as a function")}function zt$1(_n,Cn){for(var $n=0;$n1?arguments[1]:void 0)}}),function(){function _n(){Wt$1(this,_n)}return $t$1(_n,null,[{key:"isInBrowser",value:function(){return typeof window<"u"}},{key:"isServer",value:function(){return typeof window>"u"}},{key:"getUA",value:function(){return _n.isInBrowser()?window.navigator.userAgent.toLowerCase():""}},{key:"isMobile",value:function(){return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion)}},{key:"isOpera",value:function(){return navigator.userAgent.indexOf("Opera")!==-1}},{key:"isIE",value:function(){var Cn=_n.getUA();return Cn!==""&&Cn.indexOf("msie")>0}},{key:"isIE9",value:function(){var Cn=_n.getUA();return Cn!==""&&Cn.indexOf("msie 9.0")>0}},{key:"isEdge",value:function(){var Cn=_n.getUA();return Cn!==""&&Cn.indexOf("edge/")>0}},{key:"isChrome",value:function(){var Cn=_n.getUA();return Cn!==""&&/chrome\/\d+/.test(Cn)&&!_n.isEdge()}},{key:"isPhantomJS",value:function(){var Cn=_n.getUA();return Cn!==""&&/phantomjs/.test(Cn)}},{key:"isFirefox",value:function(){var Cn=_n.getUA();return Cn!==""&&/firefox/.test(Cn)}}]),_n}();var Yt$1=[].join,Gt$1=v!=Object,Ht$1=jt$1("join",",");It$1({target:"Array",proto:!0,forced:Gt$1||!Ht$1},{join:function(_n){return Yt$1.call(g(this),_n===void 0?",":_n)}});var Xt$1,Vt$1,Kt$1=function(_n){return Object(p(_n))},qt$1=Array.isArray||function(_n){return s(_n)=="Array"},Qt$1=!!Object.getOwnPropertySymbols&&!o(function(){return!String(Symbol())}),Jt$1=Qt$1&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Zt$1=F("wks"),te=r.Symbol,ee=Jt$1?te:te&&te.withoutSetter||$,ne=function(_n){return S(Zt$1,_n)||(Qt$1&&S(te,_n)?Zt$1[_n]=te[_n]:Zt$1[_n]=ee("Symbol."+_n)),Zt$1[_n]},re=ne("species"),oe=function(_n,Cn){var $n;return qt$1(_n)&&(typeof($n=_n.constructor)!="function"||$n!==Array&&!qt$1($n.prototype)?h($n)&&($n=$n[re])===null&&($n=void 0):$n=void 0),new($n===void 0?Array:$n)(Cn===0?0:Cn)},ie$1=function(_n,Cn,$n){var Nn=y(Cn);Nn in _n?R.f(_n,Nn,l(0,$n)):_n[Nn]=$n},ue=nt$1("navigator","userAgent")||"",ae$1=r.process,ce$1=ae$1&&ae$1.versions,le$1=ce$1&&ce$1.v8;le$1?Vt$1=(Xt$1=le$1.split("."))[0]+Xt$1[1]:ue&&(!(Xt$1=ue.match(/Edge\/(\d+)/))||Xt$1[1]>=74)&&(Xt$1=ue.match(/Chrome\/(\d+)/))&&(Vt$1=Xt$1[1]);var fe$1=Vt$1&&+Vt$1,se=ne("species"),de=function(_n){return fe$1>=51||!o(function(){var Cn=[];return(Cn.constructor={})[se]=function(){return{foo:1}},Cn[_n](Boolean).foo!==1})},ve$1=de("splice"),pe$1=Mt$1("splice",{ACCESSORS:!0,0:0,1:2}),ge=Math.max,he$1=Math.min;It$1({target:"Array",proto:!0,forced:!ve$1||!pe$1},{splice:function(_n,Cn){var $n,Nn,Bn,Ln,In,Pn,Dn=Kt$1(this),Wn=at$1(Dn.length),Hn=ft$1(_n,Wn),Yn=arguments.length;if(Yn===0?$n=Nn=0:Yn===1?($n=0,Nn=Wn-Hn):($n=Yn-2,Nn=he$1(ge(it$1(Cn),0),Wn-Hn)),Wn+$n-Nn>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(Bn=oe(Dn,Nn),Ln=0;LnWn-Nn+$n;Ln--)delete Dn[Ln-1]}else if($n>Nn)for(Ln=Wn-Nn;Ln>Hn;Ln--)Pn=Ln+$n-1,(In=Ln+Nn-1)in Dn?Dn[Pn]=Dn[In]:delete Dn[Pn];for(Ln=0;Ln<$n;Ln++)Dn[Ln+Hn]=arguments[Ln+2];return Dn.length=Wn-Nn+$n,Bn}});var ye$1={};ye$1[ne("toStringTag")]="z";var me$1=String(ye$1)==="[object z]",Se=ne("toStringTag"),xe=s(function(){return arguments}())=="Arguments",be$1=me$1?s:function(_n){var Cn,$n,Nn;return _n===void 0?"Undefined":_n===null?"Null":typeof($n=function(Bn,Ln){try{return Bn[Ln]}catch{}}(Cn=Object(_n),Se))=="string"?$n:xe?s(Cn):(Nn=s(Cn))=="Object"&&typeof Cn.callee=="function"?"Arguments":Nn},Ee=me$1?{}.toString:function(){return"[object "+be$1(this)+"]"};me$1||Z(Object.prototype,"toString",Ee,{unsafe:!0});var we=function(){var _n=A(this),Cn="";return _n.global&&(Cn+="g"),_n.ignoreCase&&(Cn+="i"),_n.multiline&&(Cn+="m"),_n.dotAll&&(Cn+="s"),_n.unicode&&(Cn+="u"),_n.sticky&&(Cn+="y"),Cn};function Oe(_n,Cn){return RegExp(_n,Cn)}var Te,Ae$1,ke={UNSUPPORTED_Y:o(function(){var _n=Oe("a","y");return _n.lastIndex=2,_n.exec("abcd")!=null}),BROKEN_CARET:o(function(){var _n=Oe("^r","gy");return _n.lastIndex=2,_n.exec("str")!=null})},Re$1=RegExp.prototype.exec,Ie$1=String.prototype.replace,je=Re$1,Ce$1=(Te=/a/,Ae$1=/b*/g,Re$1.call(Te,"a"),Re$1.call(Ae$1,"a"),Te.lastIndex!==0||Ae$1.lastIndex!==0),Le=ke.UNSUPPORTED_Y||ke.BROKEN_CARET,Pe=/()??/.exec("")[1]!==void 0;(Ce$1||Pe||Le)&&(je=function(_n){var Cn,$n,Nn,Bn,Ln=this,In=Le&&Ln.sticky,Pn=we.call(Ln),Dn=Ln.source,Wn=0,Hn=_n;return In&&((Pn=Pn.replace("y","")).indexOf("g")===-1&&(Pn+="g"),Hn=String(_n).slice(Ln.lastIndex),Ln.lastIndex>0&&(!Ln.multiline||Ln.multiline&&_n[Ln.lastIndex-1]!==` `)&&(Dn="(?: "+Dn+")",Hn=" "+Hn,Wn++),$n=new RegExp("^(?:"+Dn+")",Pn)),Pe&&($n=new RegExp("^"+Dn+"$(?!\\s)",Pn)),Ce$1&&(Cn=Ln.lastIndex),Nn=Re$1.call(In?$n:Ln,Hn),In?Nn?(Nn.input=Nn.input.slice(Wn),Nn[0]=Nn[0].slice(Wn),Nn.index=Ln.lastIndex,Ln.lastIndex+=Nn[0].length):Ln.lastIndex=0:Ce$1&&Nn&&(Ln.lastIndex=Ln.global?Nn.index+Nn[0].length:Cn),Pe&&Nn&&Nn.length>1&&Ie$1.call(Nn[0],$n,function(){for(Bn=1;Bn")!=="7"}),ze$1="a".replace(/./,"$0")==="$0",$e=ne("replace"),Be$1=!!/./[$e]&&/./[$e]("a","$0")==="",Ye=!o(function(){var _n=/(?:)/,Cn=_n.exec;_n.exec=function(){return Cn.apply(this,arguments)};var $n="ab".split(_n);return $n.length!==2||$n[0]!=="a"||$n[1]!=="b"}),Ge$1=function(_n,Cn,$n,Nn){var Bn=ne(_n),Ln=!o(function(){var Yn={};return Yn[Bn]=function(){return 7},""[_n](Yn)!=7}),In=Ln&&!o(function(){var Yn=!1,Gn=/a/;return _n==="split"&&((Gn={}).constructor={},Gn.constructor[Fe]=function(){return Gn},Gn.flags="",Gn[Bn]=/./[Bn]),Gn.exec=function(){return Yn=!0,null},Gn[Bn](""),!Yn});if(!Ln||!In||_n==="replace"&&(!We||!ze$1||Be$1)||_n==="split"&&!Ye){var Pn=/./[Bn],Dn=$n(Bn,""[_n],function(Yn,Gn,rr,nr,Yo){return Gn.exec===Me$1?Ln&&!Yo?{done:!0,value:Pn.call(Gn,rr,nr)}:{done:!0,value:Yn.call(rr,Gn,nr)}:{done:!1}},{REPLACE_KEEPS_$0:ze$1,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Be$1}),Wn=Dn[0],Hn=Dn[1];Z(String.prototype,_n,Wn),Z(RegExp.prototype,Bn,Cn==2?function(Yn,Gn){return Hn.call(Yn,this,Gn)}:function(Yn){return Hn.call(Yn,this)})}Nn&&I(RegExp.prototype[Bn],"sham",!0)},He$1=ne("match"),Xe=function(_n){var Cn;return h(_n)&&((Cn=_n[He$1])!==void 0?!!Cn:s(_n)=="RegExp")},Ve$1=function(_n){if(typeof _n!="function")throw TypeError(String(_n)+" is not a function");return _n},Ke=ne("species"),qe=function(_n){return function(Cn,$n){var Nn,Bn,Ln=String(p(Cn)),In=it$1($n),Pn=Ln.length;return In<0||In>=Pn?_n?"":void 0:(Nn=Ln.charCodeAt(In))<55296||Nn>56319||In+1===Pn||(Bn=Ln.charCodeAt(In+1))<56320||Bn>57343?_n?Ln.charAt(In):Nn:_n?Ln.slice(In,In+2):Bn-56320+(Nn-55296<<10)+65536}},Qe={codeAt:qe(!1),charAt:qe(!0)},Je=Qe.charAt,Ze=function(_n,Cn,$n){return Cn+($n?Je(_n,Cn).length:1)},tn=function(_n,Cn){var $n=_n.exec;if(typeof $n=="function"){var Nn=$n.call(_n,Cn);if(typeof Nn!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return Nn}if(s(_n)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return Me$1.call(_n,Cn)},en=[].push,nn=Math.min,rn=!o(function(){return!RegExp(4294967295,"y")});Ge$1("split",2,function(_n,Cn,$n){var Nn;return Nn="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(Bn,Ln){var In=String(p(this)),Pn=Ln===void 0?4294967295:Ln>>>0;if(Pn===0)return[];if(Bn===void 0)return[In];if(!Xe(Bn))return Cn.call(In,Bn,Pn);for(var Dn,Wn,Hn,Yn=[],Gn=(Bn.ignoreCase?"i":"")+(Bn.multiline?"m":"")+(Bn.unicode?"u":"")+(Bn.sticky?"y":""),rr=0,nr=new RegExp(Bn.source,Gn+"g");(Dn=Me$1.call(nr,In))&&!((Wn=nr.lastIndex)>rr&&(Yn.push(In.slice(rr,Dn.index)),Dn.length>1&&Dn.index=Pn));)nr.lastIndex===Dn.index&&nr.lastIndex++;return rr===In.length?!Hn&&nr.test("")||Yn.push(""):Yn.push(In.slice(rr)),Yn.length>Pn?Yn.slice(0,Pn):Yn}:"0".split(void 0,0).length?function(Bn,Ln){return Bn===void 0&&Ln===0?[]:Cn.call(this,Bn,Ln)}:Cn,[function(Bn,Ln){var In=p(this),Pn=Bn==null?void 0:Bn[_n];return Pn!==void 0?Pn.call(Bn,In,Ln):Nn.call(String(In),Bn,Ln)},function(Bn,Ln){var In=$n(Nn,Bn,this,Ln,Nn!==Cn);if(In.done)return In.value;var Pn=A(Bn),Dn=String(this),Wn=function(Xo,hi){var mi,zn=A(Xo).constructor;return zn===void 0||(mi=A(zn)[Ke])==null?hi:Ve$1(mi)}(Pn,RegExp),Hn=Pn.unicode,Yn=(Pn.ignoreCase?"i":"")+(Pn.multiline?"m":"")+(Pn.unicode?"u":"")+(rn?"y":"g"),Gn=new Wn(rn?Pn:"^(?:"+Pn.source+")",Yn),rr=Ln===void 0?4294967295:Ln>>>0;if(rr===0)return[];if(Dn.length===0)return tn(Gn,Dn)===null?[Dn]:[];for(var nr=0,Yo=0,Zo=[];Yo1?arguments[1]:void 0,Cn.length)),Nn=String(_n);return wn?wn.call(Cn,Nn,$n):Cn.slice($n,$n+Nn.length)===Nn}});var jn=function(_n){return typeof _n=="string"},Mn=function(_n){return _n!==null&&kn(_n)==="object"},Vn=function(){function _n(){Wt$1(this,_n)}return $t$1(_n,null,[{key:"isWindow",value:function(Cn){return Cn===window}},{key:"addEventListener",value:function(Cn,$n,Nn){var Bn=arguments.length>3&&arguments[3]!==void 0&&arguments[3];Cn&&$n&&Nn&&Cn.addEventListener($n,Nn,Bn)}},{key:"removeEventListener",value:function(Cn,$n,Nn){var Bn=arguments.length>3&&arguments[3]!==void 0&&arguments[3];Cn&&$n&&Nn&&Cn.removeEventListener($n,Nn,Bn)}},{key:"triggerDragEvent",value:function(Cn,$n){var Nn=!1,Bn=function(In){var Pn;(Pn=$n.drag)===null||Pn===void 0||Pn.call($n,In)},Ln=function In(Pn){var Dn;_n.removeEventListener(document,"mousemove",Bn),_n.removeEventListener(document,"mouseup",In),document.onselectstart=null,document.ondragstart=null,Nn=!1,(Dn=$n.end)===null||Dn===void 0||Dn.call($n,Pn)};_n.addEventListener(Cn,"mousedown",function(In){var Pn;Nn||(document.onselectstart=function(){return!1},document.ondragstart=function(){return!1},_n.addEventListener(document,"mousemove",Bn),_n.addEventListener(document,"mouseup",Ln),Nn=!0,(Pn=$n.start)===null||Pn===void 0||Pn.call($n,In))})}},{key:"getBoundingClientRect",value:function(Cn){return Cn&&Mn(Cn)&&Cn.nodeType===1?Cn.getBoundingClientRect():null}},{key:"hasClass",value:function(Cn,$n){return!!(Cn&&Mn(Cn)&&jn($n)&&Cn.nodeType===1)&&Cn.classList.contains($n.trim())}},{key:"addClass",value:function(Cn,$n){if(Cn&&Mn(Cn)&&jn($n)&&Cn.nodeType===1&&($n=$n.trim(),!_n.hasClass(Cn,$n))){var Nn=Cn.className;Cn.className=Nn?Nn+" "+$n:$n}}},{key:"removeClass",value:function(Cn,$n){if(Cn&&Mn(Cn)&&jn($n)&&Cn.nodeType===1&&typeof Cn.className=="string"){$n=$n.trim();for(var Nn=Cn.className.trim().split(" "),Bn=Nn.length-1;Bn>=0;Bn--)Nn[Bn]=Nn[Bn].trim(),Nn[Bn]&&Nn[Bn]!==$n||Nn.splice(Bn,1);Cn.className=Nn.join(" ")}}},{key:"toggleClass",value:function(Cn,$n,Nn){Cn&&Mn(Cn)&&jn($n)&&Cn.nodeType===1&&Cn.classList.toggle($n,Nn)}},{key:"replaceClass",value:function(Cn,$n,Nn){Cn&&Mn(Cn)&&jn($n)&&jn(Nn)&&Cn.nodeType===1&&($n=$n.trim(),Nn=Nn.trim(),_n.removeClass(Cn,$n),_n.addClass(Cn,Nn))}},{key:"getScrollTop",value:function(Cn){var $n="scrollTop"in Cn?Cn.scrollTop:Cn.pageYOffset;return Math.max($n,0)}},{key:"setScrollTop",value:function(Cn,$n){"scrollTop"in Cn?Cn.scrollTop=$n:Cn.scrollTo(Cn.scrollX,$n)}},{key:"getRootScrollTop",value:function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}},{key:"setRootScrollTop",value:function(Cn){_n.setScrollTop(window,Cn),_n.setScrollTop(document.body,Cn)}},{key:"getElementTop",value:function(Cn,$n){if(_n.isWindow(Cn))return 0;var Nn=$n?_n.getScrollTop($n):_n.getRootScrollTop();return Cn.getBoundingClientRect().top+Nn}},{key:"getVisibleHeight",value:function(Cn){return _n.isWindow(Cn)?Cn.innerHeight:Cn.getBoundingClientRect().height}},{key:"isHidden",value:function(Cn){if(!Cn)return!1;var $n=window.getComputedStyle(Cn),Nn=$n.display==="none",Bn=Cn.offsetParent===null&&$n.position!=="fixed";return Nn||Bn}},{key:"triggerEvent",value:function(Cn,$n){if("createEvent"in document){var Nn=document.createEvent("HTMLEvents");Nn.initEvent($n,!1,!0),Cn.dispatchEvent(Nn)}}},{key:"calcAngle",value:function(Cn,$n){var Nn=Cn.getBoundingClientRect(),Bn=Nn.left+Nn.width/2,Ln=Nn.top+Nn.height/2,In=Math.abs(Bn-$n.clientX),Pn=Math.abs(Ln-$n.clientY),Dn=Pn/Math.sqrt(Math.pow(In,2)+Math.pow(Pn,2)),Wn=Math.acos(Dn),Hn=Math.floor(180/(Math.PI/Wn));return $n.clientX>Bn&&$n.clientY>Ln&&(Hn=180-Hn),$n.clientX==Bn&&$n.clientY>Ln&&(Hn=180),$n.clientX>Bn&&$n.clientY==Ln&&(Hn=90),$n.clientXLn&&(Hn=180+Hn),$n.clientX1?Nn-1:0),Ln=1;Ln]*>)/g,Jn=/\$([$&'`]|\d\d?)/g,Zn=function(_n,Cn,$n,Nn,Bn,Ln){var In=$n+_n.length,Pn=Nn.length,Dn=Jn;return Bn!==void 0&&(Bn=Kt$1(Bn),Dn=Qn),qn.call(Ln,Dn,function(Wn,Hn){var Yn;switch(Hn.charAt(0)){case"$":return"$";case"&":return _n;case"`":return Cn.slice(0,$n);case"'":return Cn.slice(In);case"<":Yn=Bn[Hn.slice(1,-1)];break;default:var Gn=+Hn;if(Gn===0)return Wn;if(Gn>Pn){var rr=Kn(Gn/10);return rr===0?Wn:rr<=Pn?Nn[rr-1]===void 0?Hn.charAt(1):Nn[rr-1]+Hn.charAt(1):Wn}Yn=Nn[Gn-1]}return Yn===void 0?"":Yn})},tr=Math.max,er=Math.min;Ge$1("replace",2,function(_n,Cn,$n,Nn){var Bn=Nn.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,Ln=Nn.REPLACE_KEEPS_$0,In=Bn?"$":"$0";return[function(Pn,Dn){var Wn=p(this),Hn=Pn==null?void 0:Pn[_n];return Hn!==void 0?Hn.call(Pn,Wn,Dn):Cn.call(String(Wn),Pn,Dn)},function(Pn,Dn){if(!Bn&&Ln||typeof Dn=="string"&&Dn.indexOf(In)===-1){var Wn=$n(Cn,Pn,this,Dn);if(Wn.done)return Wn.value}var Hn=A(Pn),Yn=String(this),Gn=typeof Dn=="function";Gn||(Dn=String(Dn));var rr=Hn.global;if(rr){var nr=Hn.unicode;Hn.lastIndex=0}for(var Yo=[];;){var Zo=tn(Hn,Yn);if(Zo===null||(Yo.push(Zo),!rr))break;String(Zo[0])===""&&(Hn.lastIndex=Ze(Yn,at$1(Hn.lastIndex),nr))}for(var ei,li="",vi=0,Xo=0;Xo=vi&&(li+=Yn.slice(vi,mi)+si,vi=mi+hi.length)}return li+Yn.slice(vi)}]}),function(){function _n(){Wt$1(this,_n)}return $t$1(_n,null,[{key:"camelize",value:function(Cn){return Cn.replace(/-(\w)/g,function($n,Nn){return Nn?Nn.toUpperCase():""})}},{key:"capitalize",value:function(Cn){return Cn.charAt(0).toUpperCase()+Cn.slice(1)}}]),_n}(),function(){function _n(){Wt$1(this,_n)}return $t$1(_n,null,[{key:"_clone",value:function(){}}]),_n}();var or=ne("isConcatSpreadable"),ir=fe$1>=51||!o(function(){var _n=[];return _n[or]=!1,_n.concat()[0]!==_n}),ur=de("concat"),ar=function(_n){if(!h(_n))return!1;var Cn=_n[or];return Cn!==void 0?!!Cn:qt$1(_n)};It$1({target:"Array",proto:!0,forced:!ir||!ur},{concat:function(_n){var Cn,$n,Nn,Bn,Ln,In=Kt$1(this),Pn=oe(In,0),Dn=0;for(Cn=-1,Nn=arguments.length;Cn9007199254740991)throw TypeError("Maximum allowed index exceeded");for($n=0;$n=9007199254740991)throw TypeError("Maximum allowed index exceeded");ie$1(Pn,Dn++,Ln)}return Pn.length=Dn,Pn}});var cr,lr=function(_n,Cn,$n){if(Ve$1(_n),Cn===void 0)return _n;switch($n){case 0:return function(){return _n.call(Cn)};case 1:return function(Nn){return _n.call(Cn,Nn)};case 2:return function(Nn,Bn){return _n.call(Cn,Nn,Bn)};case 3:return function(Nn,Bn,Ln){return _n.call(Cn,Nn,Bn,Ln)}}return function(){return _n.apply(Cn,arguments)}},fr=[].push,sr=function(_n){var Cn=_n==1,$n=_n==2,Nn=_n==3,Bn=_n==4,Ln=_n==6,In=_n==7,Pn=_n==5||Ln;return function(Dn,Wn,Hn,Yn){for(var Gn,rr,nr=Kt$1(Dn),Yo=v(nr),Zo=lr(Wn,Hn,3),ei=at$1(Yo.length),li=0,vi=Yn||oe,Xo=Cn?vi(Dn,ei):$n||In?vi(Dn,0):void 0;ei>li;li++)if((Pn||li in Yo)&&(rr=Zo(Gn=Yo[li],li,nr),_n))if(Cn)Xo[li]=rr;else if(rr)switch(_n){case 3:return!0;case 5:return Gn;case 6:return li;case 2:fr.call(Xo,Gn)}else switch(_n){case 4:return!1;case 7:fr.call(Xo,Gn)}return Ln?-1:Nn||Bn?Bn:Xo}},dr={forEach:sr(0),map:sr(1),filter:sr(2),some:sr(3),every:sr(4),find:sr(5),findIndex:sr(6),filterOut:sr(7)},vr=i$1?Object.defineProperties:function(_n,Cn){A(_n);for(var $n,Nn=yn(Cn),Bn=Nn.length,Ln=0;Bn>Ln;)R.f(_n,$n=Nn[Ln++],Cn[$n]);return _n},pr=nt$1("document","documentElement"),gr=Y("IE_PROTO"),hr=function(){},yr=function(_n){return"","import common from \"@/utils/common\";\n\nexport default {\n data() {\n return {\n autocompleteResults: null,\n autocompleteResultsParent: null,\n\n showAppendList: false,\n appendListStyle: {\n top: 0,\n left: 0,\n },\n appendListSelected: null,\n appendListChildSelected: null,\n appendList: [\n {\n \"type\": \"wrap\",\n \"name\": \"line_break_character\",\n \"icon\": \"wrap\",\n \"children\": []\n },\n /*{\n \"type\": \"lora\",\n \"name\": \"Lora\",\n \"children\": []\n },*/\n /*{\n \"type\": \"favorite\",\n \"name\": \"favorite\",\n \"icon\": \"favorite\",\n \"children\": []\n },\n {\n \"type\": \"history\",\n \"name\": \"history\",\n \"icon\": \"history\",\n \"children\": []\n }*/\n ],\n\n favorites: [],\n autoInputPrompt: 'disabled',\n autoInputPromptKey: '',\n }\n },\n computed: {\n appendListChildItemTags() {\n if (this.appendListSelected === null) return []\n if (this.appendListChildSelected === null) return []\n if (this.appendList[this.appendListSelected].type !== 'favorite' && this.appendList[this.appendListSelected].type !== 'history') return []\n return this.appendList[this.appendListSelected].children[this.appendListChildSelected].tags\n }\n },\n mounted() {\n this.initAutoInputPrompt()\n let temp = [\n {\n 'name': 'txt2img',\n 'type': 'prompt',\n 'key': 'txt2img',\n 'neg': false,\n },\n {\n 'name': 'txt2img',\n 'type': 'negative_prompt',\n 'key': 'txt2img_neg',\n 'neg': true,\n },\n {\n 'name': 'img2img',\n 'type': 'prompt',\n 'key': 'img2img',\n 'neg': false,\n },\n {\n 'name': 'img2img',\n 'type': 'negative_prompt',\n 'key': 'img2img_neg',\n 'neg': true,\n },\n ]\n /*for (let i = 0; i < temp.length; i++) {\n if (temp[i].key === this.favoriteKey) {\n // 排到第一位\n let item = temp[i]\n temp.splice(i, 1)\n temp.unshift(item)\n break\n }\n }*/\n temp.forEach(item => {\n if (item.neg !== this.neg) return\n this.appendList.push({\n 'type': \"favorite\",\n 'name': [\"favorite\", item.name/*, item.type*/],\n \"icon\": \"favorite\",\n \"key\": item.key,\n 'dataKey': 'favorite.' + item.key,\n \"children\": [],\n })\n })\n /*temp.forEach(item => {\n this.appendList.push({\n 'type': \"history\",\n 'name': [\"history\", item.name, item.type],\n \"icon\": \"history\",\n \"key\": item.key,\n 'dataKey': 'history.' + item.key,\n \"children\": [],\n })\n })*/\n },\n methods: {\n onUnfoldClick() {\n if (this.hidePanel) {\n this.$nextTick(() => {\n this.onResize()\n })\n }\n this.$emit(\"update:hidePanel\", !this.hidePanel)\n },\n onTranslatesToLocalClick() {\n if (this.tags.length === 0) return // 没有关键词需要翻译\n if (this.loading['all_local']) {\n // 正在翻译中,取消翻译\n this.cancelMultiTranslate = true\n this.loading['all_local'] = false\n return\n }\n this.loading['all_local'] = true\n let tagIndexes = []\n for (const index in this.tags) {\n if (this.tags[index].type && this.tags[index].type !== 'text') continue\n tagIndexes.push(index)\n }\n return this.translates(tagIndexes, true, true).finally(() => {\n this.loading['all_local'] = false\n this.updateTags()\n })\n },\n onTranslatesToEnglishClick() {\n if (this.tags.length === 0) return // 没有关键词需要翻译\n if (this.loading['all_en']) {\n // 正在翻译中,取消翻译\n this.cancelMultiTranslate = true\n this.loading['all_en'] = false\n return\n }\n this.loading['all_en'] = true\n let tagIndexes = []\n for (const index in this.tags) {\n if (this.tags[index].type && this.tags[index].type !== 'text') continue\n tagIndexes.push(index)\n }\n this.translates(tagIndexes, false, true).finally(() => {\n this.loading['all_en'] = false\n this.updateTags()\n })\n },\n onCopyAllTagsClick() {\n this.copy(this.prompt)\n },\n onDeleteAllTagsClick() {\n if (!confirm(this.getLang('delete_all_keywords_confirm'))) return\n this.tags = []\n this.updateTags()\n },\n onClickLoadWebuiPrompt() {\n this.onTextareaChange(true)\n },\n appendListItemName(item) {\n let names = []\n if (typeof item.name === \"object\") {\n for (let name of item.name) {\n names.push(this.getLang(name))\n }\n } else {\n names = [this.getLang(item.name)]\n }\n return names.join(' / ')\n },\n onAppendTagFocus(e) {\n if (this.$refs.promptTagAppend.value === '' || this.$refs.promptTagAppend.value.trim() === '') {\n this.appendListStyle = {\n top: e.target.offsetTop + e.target.offsetHeight + 'px',\n left: e.target.offsetLeft + 'px',\n }\n this.appendListSelected = null\n this.appendListChildSelected = null\n this.showAppendList = true\n let dataKeys = []\n this.appendList.forEach(item => {\n if (typeof item['dataKey'] === 'string') {\n dataKeys.push(item['dataKey'])\n }\n })\n this.gradioAPI.getDatas(dataKeys).then(res => {\n this.appendList.forEach(item => {\n if (typeof item['dataKey'] !== 'string') return\n item.children = res[item['dataKey']] || []\n // 反转\n item.children.reverse()\n })\n })\n /*this.gradioAPI.getFavorites(this.favoriteKey).then(res => {\n this.appendList.forEach(item => {\n if (item.type !== 'favorite') return\n item.children = res\n })\n })\n this.gradioAPI.getHistories(this.historyKey).then(res => {\n this.appendList.forEach(item => {\n if (item.type !== 'history') return\n item.children = res\n })\n })*/\n }\n this._setTextareaFocus()\n },\n onAppendTagBlur(e) {\n setTimeout(() => {\n this.showAppendList = false\n }, 300)\n },\n selectAppendList(down = true) {\n if (this.appendList.length === 0) return\n if (this.appendListSelected === null) {\n this.appendListSelected = 0\n } else {\n if (down) {\n this.appendListSelected++\n if (this.appendListSelected >= this.appendList.length) {\n this.appendListSelected = 0\n }\n } else {\n this.appendListSelected--\n if (this.appendListSelected < 0) {\n this.appendListSelected = this.appendList.length - 1\n }\n }\n }\n this.appendListChildSelected = null\n },\n selectAppendListChild(down = true) {\n if (this.appendList.length === 0) return\n if (this.appendListSelected === null) return\n if (this.appendList[this.appendListSelected].children.length === 0) return\n if (this.appendListChildSelected === null) {\n this.appendListChildSelected = 0\n } else {\n if (down) {\n this.appendListChildSelected++\n if (this.appendListChildSelected >= this.appendList[this.appendListSelected].children.length) {\n this.appendListChildSelected = 0\n }\n } else {\n this.appendListChildSelected--\n if (this.appendListChildSelected < 0) {\n this.appendListChildSelected = this.appendList[this.appendListSelected].children.length - 1\n }\n }\n }\n this.scrollAppendListChild()\n },\n scrollAppendListChild() {\n if (this.appendListSelected === null) return\n if (this.appendListChildSelected === 0 || this.appendListChildSelected === null) {\n this.$refs.promptAppendListChildren[this.appendListSelected].scrollTop = 0\n } else {\n this.$refs.promptAppendListChild[this.appendListChildSelected].scrollIntoView({\n behavior: 'smooth',\n block: 'center'\n })\n }\n },\n onAppendTagKeyDown(e, localValue = null) {\n if (e.keyCode === 38 || e.keyCode === 40) {\n } else if (e.keyCode === 13) {\n if (this.getAutocompleteResults() && ((this.autocompleteResultsParent && this.autocompleteResultsParent.style.display === 'flex') || this.autocompleteResults.style.display === 'none') && this.getAutocompleteResultsSelected()) {\n let text = this.getAutocompleteResultsSelectedText()\n setTimeout(() => {\n localValue = this.$refs.promptTagAppend.value\n if (text) {\n localValue = text\n } else {\n text = this.getAutocompleteResultsSelectedText()\n if (text) localValue = text\n }\n this.onAppendTagKeyDown(e, localValue)\n }, 300)\n return\n }\n\n let tags = this.$refs.promptTagAppend.value\n this.$refs.promptTagAppend.value = ''\n this.showAppendList = true\n // [night light:magical forest: 5, 15]\n console.log(tags, localValue)\n if (localValue) {\n // 去除末尾的逗号\n tags = tags.replace(/\\s*,\\s*$/, '').trim()\n if (common.hasBrackets(tags)) {\n tags = common.replaceBrackets(tags)\n }\n this._appendTag(tags, localValue)\n this.updateTags()\n } else {\n if (common.hasBrackets(tags)) {\n // 如果已经被英文括号括起来,那么就不需要再分词了\n tags = common.replaceBrackets(tags)\n tags = [tags]\n } else {\n tags = common.splitTags(tags, this.autoBreakBeforeWrap, this.autoBreakAfterWrap)\n }\n let indexes = []\n tags.forEach(tag => {\n let index = -1\n if (tag === \"\\n\") {\n index = this._appendTag(\"\\n\", \"\\n\", false, -1, 'wrap')\n } else {\n index = this._appendTag(tag)\n }\n if (index !== -1) indexes.push(index)\n })\n this.autoTranslateByIndexes(indexes)\n }\n } else {\n // 不是上下键,也不是回车\n this.removeAutocompleteResultsSelected()\n }\n },\n autoTranslateByIndexes(indexes) {\n this.updatePrompt() // 先更新再翻译\n if (this.autoTranslateToEnglish || this.autoTranslateToLocal) {\n this.$nextTick(() => {\n let useNetwork = !(this.tagCompleteFile && this.onlyCsvOnAuto)\n if (this.autoTranslateToEnglish) {\n // 如果开启了自动翻译到英语,那么就自动翻译\n this.translates(indexes, false, useNetwork).finally(() => {\n this.updateTags()\n })\n } else if (this.autoTranslateToLocal) {\n // 如果开启了自动翻译到本地语言,那么就自动翻译\n this.translates(indexes, true, useNetwork).finally(() => {\n this.updateTags()\n })\n }\n })\n } else {\n this.updateTags()\n }\n },\n onAppendTagKeyUp(e) {\n if (this.$refs.promptTagAppend.value === '' || this.$refs.promptTagAppend.value.trim() === '') {\n this.$refs.promptTagAppend.value = ''\n this.showAppendList = true\n\n if (e.keyCode === 38 || e.keyCode === 40) {\n // 如果是上下键\n if (this.appendListChildSelected === null) {\n this.selectAppendList(e.keyCode === 40)\n } else {\n this.selectAppendListChild(e.keyCode === 40)\n }\n } else if (e.keyCode === 37 || e.keyCode === 39) {\n // 如果是左右键\n if (this.appendListSelected !== null) {\n if (e.keyCode === 37) {\n this.appendListChildSelected = null\n this.scrollAppendListChild()\n } else {\n if (this.appendList[this.appendListSelected].children.length === 0) {\n this.appendListChildSelected = null\n } else {\n this.appendListChildSelected = 0\n this.scrollAppendListChild()\n }\n }\n }\n } else if (e.keyCode === 13) {\n // 如果是回车键\n this._appendTagByList()\n this.scrollAppendListChild()\n this.appendListSelected = null\n this.appendListChildSelected = null\n }\n } else {\n this.showAppendList = false\n }\n },\n onAppendGroupClick(index, childIndex, e) {\n if (index === null) return\n this.appendListSelected = index\n if (childIndex === null) {\n // 如果是点击的是父级\n if (this.appendList[this.appendListSelected].children.length > 0) return\n } else {\n this.appendListChildSelected = childIndex\n }\n this._appendTagByList()\n },\n onAppendListChildMouseLeave(index, childIndex, e) {\n this.appendListSelected = null\n this.appendListChildSelected = null\n },\n onAppendListChildMouseEnter(index, childIndex, e) {\n this.appendListSelected = index\n this.appendListChildSelected = childIndex\n },\n _appendTagByList() {\n if (this.appendListSelected === null) return\n const appendItem = this.appendList[this.appendListSelected]\n let appendChildItem = null\n if (appendItem.children.length > 0) {\n if (this.appendListChildSelected !== null) {\n // 有子项并且选中了子项\n appendChildItem = appendItem.children[this.appendListChildSelected]\n }\n } else {\n // 没有子项\n }\n let appendTags = []\n switch (appendItem.type) {\n case 'wrap':\n appendTags.push({\n value: \"\\n\",\n localValue: \"\\n\",\n disabled: false,\n type: 'wrap'\n })\n break\n case 'lora':\n break\n case 'favorite':\n case 'history':\n if (appendChildItem) {\n appendChildItem.tags.forEach(tag => {\n appendTags.push({\n value: tag.value,\n localValue: tag.localValue,\n disabled: tag.disabled,\n type: tag.type || 'text'\n })\n })\n }\n break\n }\n if (appendTags.length <= 0) return\n appendTags.forEach(tag => {\n this._appendTag(tag.value, tag.localValue, tag.disabled, -1, tag.type)\n })\n this.updateTags()\n },\n getAutocompleteResults() {\n if (!this.autocompleteResults) {\n const autocompleteResults = this.$refs.promptTagAppend.parentElement.querySelector('.autocompleteResults')\n if (autocompleteResults) {\n this.autocompleteResults = autocompleteResults\n // 增加mousemove事件\n if (this.autocompleteResults.getAttribute('data-mousemove') !== 'true') {\n this.autocompleteResults.setAttribute('data-mousemove', 'true')\n this.autocompleteResults.addEventListener('mousemove', (e) => {\n this.bindAutocompleteResultsClick()\n })\n }\n const autocompleteParent = this.$refs.promptTagAppend.parentElement.querySelector('.autocompleteParent')\n if (autocompleteParent) {\n this.autocompleteResultsParent = autocompleteParent\n }\n }\n }\n return this.autocompleteResults\n },\n removeAutocompleteResultsSelected() {\n const autocompleteResults = this.getAutocompleteResults()\n if (!autocompleteResults) return false\n autocompleteResults.querySelectorAll('li').forEach(li => {\n li.classList.remove('selected')\n })\n return true\n },\n getAutocompleteResultsSelected() {\n const autocompleteResults = this.getAutocompleteResults()\n if (!autocompleteResults) return null\n const el = autocompleteResults.querySelector('li.selected')\n if (!el) return null\n return el\n },\n getAutocompleteResultsSelectedText(el = null) {\n if (!el) {\n el = this.getAutocompleteResultsSelected()\n if (!el) return null\n }\n const $acListItem = el.querySelector('.acListItem')\n const text = $acListItem.innerText\n const match = text.match(/\\[(.+?)\\]/)\n if (!match) return null\n return match[1]\n },\n bindAutocompleteResultsClick() {\n this.getAutocompleteResults()\n if (!this.autocompleteResults) return\n // 获取列表\n let lis = this.autocompleteResults.querySelectorAll('li')\n // 给每个li绑定点击事件\n lis.forEach(li => {\n // 判断是否已经绑定过\n if (li.getAttribute('physton-on-clicked') === 'true') return\n li.setAttribute('physton-on-clicked', 'true')\n li.addEventListener('click', () => {\n this.onAutocompleteResultsClicked(li)\n })\n })\n },\n onAutocompleteResultsClicked(li) {\n const text = this.getAutocompleteResultsSelectedText(li)\n setTimeout(() => {\n let tags = this.$refs.promptTagAppend.value.replace(/,\\s*$/, '')\n this.$refs.promptTagAppend.value = ''\n // 去除末尾的逗号\n tags = tags.replace(/\\s*,\\s*$/, '').trim()\n if (common.hasBrackets(tags)) {\n tags = common.replaceBrackets(tags)\n }\n this._appendTag(tags, text)\n this.updateTags()\n }, 300)\n },\n onSettingBoxMouseEnter() {\n this.favorites = typeof window.phystonPromptfavorites === 'object' ? window.phystonPromptfavorites : []\n },\n getCurrentTypeFavorites() {\n this.favorites = typeof window.phystonPromptfavorites === 'object' ? window.phystonPromptfavorites : []\n let favorites = []\n this.favorites.forEach(favorite => {\n if (this.neg) {\n if (favorite.type !== 'negative_prompt') return\n } else {\n if (favorite.type !== 'prompt') return\n }\n favorites.push(favorite)\n })\n return favorites\n },\n onAutoInputPromptChange() {\n this.gradioAPI.setData(this.autoInputPromptKey, this.autoInputPrompt).then(() => {\n this.$toastr.success(this.getLang('success'))\n }).catch(() => {\n this.$toastr.error(this.getLang('failed'))\n })\n },\n initAutoInputPrompt() {\n this.autoInputPromptKey = 'autoInputPrompt-' + this.name\n this.gradioAPI.getData(this.autoInputPromptKey).then(res => {\n if (res === null) return\n this.autoInputPrompt = res\n if (this.autoInputPrompt === 'last') {\n this.gradioAPI.getLatestHistory(this.historyKey).then(res => {\n this.useHistory(res)\n })\n } else {\n const getFavorites = () => {\n if (typeof window.phystonPromptfavorites === 'object' && window.phystonPromptfavorites.length > 0) {\n for (let item of window.phystonPromptfavorites) {\n for (let favorite of item.list) {\n if (favorite.id === this.autoInputPrompt) {\n this.useFavorite(favorite)\n return\n }\n }\n }\n return\n }\n setTimeout(getFavorites, 100)\n }\n setTimeout(getFavorites, 100)\n }\n })\n },\n }\n}","export default {\n data() {\n return {\n // 鼠标框选功能\n dropStartX: 0,\n dropStartY: 0,\n dropEndX: 0,\n dropEndY: 0,\n dropOffsetX: 0,\n dropOffsetY: 0,\n dropIsSelecting: false,\n dropIsStart: false,\n dropIsEnd: false,\n dropArea: {\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n },\n dropTags: [],\n dropTimeId: 0,\n }\n },\n methods: {\n _dropOver() {\n this.dropIsSelecting = false\n this.dropIsStart = false\n this.dropIsEnd = false\n this.dropTags = []\n for (let i = 0; i < this.$refs.promptTagsList.children.length; i++) {\n let tag = this.$refs.promptTagsList.children[i]\n if (tag.style.display === 'none') {\n // 删除display:none属性\n tag.style.display = ''\n }\n tag.classList.remove('drop-selected')\n }\n },\n onDropMouseDown(e) {\n if (this.droping) return\n this._dropOver()\n this.dropOffsetX = e.clientX - e.layerX\n this.dropOffsetY = e.clientY - e.layerY\n this.dropStartX = e.clientX - this.dropOffsetX\n this.dropStartY = e.clientY - this.dropOffsetY\n this.dropEndX = e.clientX - this.dropOffsetX\n this.dropEndY = e.clientY - this.dropOffsetY\n this.dropIsStart = true\n },\n onDropMouseMove(e) {\n if (this.dropIsStart) {\n this.dropIsSelecting = true\n this.dropEndX = e.clientX - this.dropOffsetX\n this.dropEndY = e.clientY - this.dropOffsetY\n let left = Math.min(this.dropStartX, this.dropEndX)\n let top = Math.min(this.dropStartY, this.dropEndY)\n let width = Math.abs(this.dropStartX - this.dropEndX)\n let height = Math.abs(this.dropStartY - this.dropEndY)\n // 设置不超过 this.$refs.promptTags 范围\n left = Math.max(left, 0)\n top = Math.max(top, 0)\n width = Math.min(width, this.$refs.promptTags.clientWidth - left)\n height = Math.min(height, this.$refs.promptTags.clientHeight - top)\n\n this.dropArea.top = top\n this.dropArea.left = left\n this.dropArea.width = width\n this.dropArea.height = height\n\n if (this.dropTimeId) clearTimeout(this.dropTimeId)\n this.dropTimeId = setTimeout(this.dropSelectItems, 10)\n }\n this.$emit('hideExtraNetworks')\n },\n dropSelectItems() {\n if (this.dropTimeId) clearTimeout(this.dropTimeId)\n let selectIds = []\n for (let i = 0; i < this.$refs.promptTagsList.children.length; i++) {\n let tag = this.$refs.promptTagsList.children[i]\n if (!tag.classList.contains('prompt-tag')) continue\n let tagLeft = tag.offsetLeft\n let tagTop = tag.offsetTop\n let tagWidth = tag.clientWidth\n let tagHeight = tag.clientHeight\n let tagRight = tagLeft + tagWidth\n let tagBottom = tagTop + tagHeight\n let isSelect = !(tagRight < this.dropArea.left || tagBottom < this.dropArea.top || tagLeft > this.dropArea.left + this.dropArea.width || tagTop > this.dropArea.top + this.dropArea.height)\n if (isSelect) {\n selectIds.push(tag.getAttribute('data-id'))\n tag.classList.add('drop-selected')\n } else {\n tag.classList.remove('drop-selected')\n }\n this.dropTags = selectIds\n }\n },\n onDropMouseUp(e) {\n this.dropIsSelecting = false\n this.dropIsStart = false\n this.dropIsEnd = true\n this.$refs.dropSelectBtns.style.left = this.$refs.dropSelectBox.style.left\n this.$refs.dropSelectBtns.style.top = this.$refs.dropSelectBox.style.top\n },\n _getDropTags() {\n let tags = []\n this.dropTags.forEach(id => {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n tags.push(tag)\n })\n return tags\n },\n _getDropIndexes() {\n let indexes = []\n this.dropTags.forEach(id => {\n let index = this.tags.findIndex(tag => tag.id === id)\n if (index === -1) return\n indexes.push(index)\n })\n return indexes\n },\n _getDropTagsEle() {\n let elements = []\n this.dropTags.forEach(id => {\n let tag = this.$refs.promptTagsList.querySelector(`.prompt-tag[data-id=\"${id}\"]`)\n if (!tag) return\n elements.push(tag)\n })\n return elements\n },\n onDropCopy() {\n let tags = this._getDropTags()\n this._dropOver()\n let prompt = this.genPrompt(tags, true)\n this.copy(prompt)\n },\n onDropFavorite() {\n let tags = this._getDropTags()\n this._dropOver()\n let prompt = this.genPrompt(tags, true)\n this.gradioAPI.pushFavorite(this.favoriteKey, tags, prompt, '').then(res => {\n if (res) {\n this.$toastr.success(this.getLang('success'))\n this.$emit('refreshFavorites', this.favoriteKey)\n } else {\n this.$toastr.error(this.getLang('failed'))\n }\n }).catch(error => {\n this.$toastr.error(this.getLang('failed'))\n })\n },\n onDropDisable() {\n let tags = this._getDropTags()\n this._dropOver()\n tags.forEach(tag => {\n tag.disabled = true\n })\n this.updateTags()\n },\n onDropEnable() {\n let tags = this._getDropTags()\n this._dropOver()\n tags.forEach(tag => {\n tag.disabled = false\n })\n this.updateTags()\n },\n onDropDelete() {\n let indexes = this._getDropIndexes()\n this._dropOver()\n indexes.sort((a, b) => b - a)\n indexes.forEach(index => {\n this.tags.splice(index, 1)\n })\n this.updateTags()\n },\n }\n}","var GHOST_ELEMENT_ID = '__autosizeInputGhost'\n\nvar characterEntities = {\n ' ': 'nbsp',\n '<': 'lt',\n '>': 'gt'\n}\nfunction mapSpecialCharacterToCharacterEntity (specialCharacter) {\n return '&' + characterEntities[specialCharacter] + ';'\n}\nfunction escapeSpecialCharacters (string) {\n return string.replace(/\\s|<|>/g, mapSpecialCharacterToCharacterEntity)\n}\n\n// Create `ghostElement`, with inline styles to hide it and ensure that the text is all\n// on a single line.\nfunction createGhostElement () {\n var ghostElement = document.createElement('div')\n ghostElement.id = GHOST_ELEMENT_ID\n ghostElement.style.cssText =\n 'display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;'\n document.body.appendChild(ghostElement)\n return ghostElement\n}\n\nmodule.exports = function (element, options) {\n var elementStyle = window.getComputedStyle(element)\n // prettier-ignore\n var elementCssText = 'box-sizing:' + elementStyle.boxSizing +\n ';border-left:' + elementStyle.borderLeftWidth + ' solid red' +\n ';border-right:' + elementStyle.borderRightWidth + ' solid red' +\n ';font-family:' + elementStyle.fontFamily +\n ';font-feature-settings:' + elementStyle.fontFeatureSettings +\n ';font-kerning:' + elementStyle.fontKerning +\n ';font-size:' + elementStyle.fontSize +\n ';font-stretch:' + elementStyle.fontStretch +\n ';font-style:' + elementStyle.fontStyle +\n ';font-variant:' + elementStyle.fontVariant +\n ';font-variant-caps:' + elementStyle.fontVariantCaps +\n ';font-variant-ligatures:' + elementStyle.fontVariantLigatures +\n ';font-variant-numeric:' + elementStyle.fontVariantNumeric +\n ';font-weight:' + elementStyle.fontWeight +\n ';letter-spacing:' + elementStyle.letterSpacing +\n ';margin-left:' + elementStyle.marginLeft +\n ';margin-right:' + elementStyle.marginRight +\n ';padding-left:' + elementStyle.paddingLeft +\n ';padding-right:' + elementStyle.paddingRight +\n ';text-indent:' + elementStyle.textIndent +\n ';text-transform:' + elementStyle.textTransform\n\n // Assigns an appropriate width to the given `element` based on its contents.\n function setWidth () {\n var string = element.value || element.getAttribute('placeholder') || ''\n // Check if the `ghostElement` exists. If no, create it.\n var ghostElement =\n document.getElementById(GHOST_ELEMENT_ID) || createGhostElement()\n // Copy all width-affecting styles to the `ghostElement`.\n ghostElement.style.cssText += elementCssText\n ghostElement.innerHTML = escapeSpecialCharacters(string)\n // Copy the width of `ghostElement` to `element`.\n var width = window.getComputedStyle(ghostElement).width\n element.style.width = width\n return width\n }\n\n element.addEventListener('input', setWidth)\n\n var width = setWidth()\n\n // Set `min-width` only if `options.minWidth` was set, and only if the initial\n // width is non-zero.\n if (options && options.minWidth && width !== '0px') {\n element.style.minWidth = width\n }\n\n // Return a function for unbinding the event listener and removing the `ghostElement`.\n return function () {\n element.removeEventListener('input', setWidth)\n var ghostElement = document.getElementById(GHOST_ELEMENT_ID)\n if (ghostElement) {\n ghostElement.parentNode.removeChild(ghostElement)\n }\n }\n}\n","import common from \"@/utils/common\";\nimport autoSizeInput from \"autosize-input\";\n\nexport default {\n data() {\n return {\n tagClickTimeId: 0,\n showExtendId: '',\n }\n },\n mounted() {\n /*common.gradioApp().addEventListener('mousemove', () => {\n this.$refs.highlightPrompt.hide()\n })*/\n },\n methods: {\n _setTag(tag) {\n if (typeof tag['type'] === 'string' && tag.type === 'wrap') {\n tag.weightNum = 1\n tag.incWeight = 0\n tag.decWeight = 0\n } else {\n tag.weightNum = common.getTagWeightNum(tag.value)\n // tag.weightNum = tag.weightNum <= 0 ? 1 : tag.weightNum\n // tag.weightNum = tag.weightNum === 0 ? 1 : tag.weightNum\n tag.incWeight = common.getTagIncWeight(tag.value, this.useNovelAiWeightSymbol)\n tag.decWeight = common.getTagDecWeight(tag.value)\n // const bracket = common.hasBrackets(tag.value)\n\n tag.originalValue = tag.value\n if (!tag.value.match(common.loraRegex) && !tag.value.match(common.lycoRegex)) {\n // tag.weightNum = tag.weightNum <= 0 ? 1 : tag.weightNum\n let value = tag.value\n const bracket = common.hasBrackets(value)\n if ((bracket[0] === '(' && bracket[1] === ')') || (bracket[0] === '[' && bracket[1] === ']') || (this.useNovelAiWeightSymbol && bracket[0] === '{' && bracket[1] === '}')) {\n // 移除括号\n value = common.setLayers(value, 0, bracket[0], bracket[1])\n // 移除权重数\n tag.originalValue = value.replace(common.weightNumRegex, '$1')\n }\n }\n }\n this._setTagClass(tag)\n this.$nextTick(() => {\n this._setTagHeight(tag)\n })\n },\n _setTagHeight(tag) {\n let maxNum = 10\n let interval = setInterval(() => {\n // console.log(maxNum, tag)\n maxNum--\n if (maxNum <= 0) clearInterval(interval)\n if (!this.$refs['promptTagValue-' + tag.id]) return false\n if (!this.$refs['promptTagValue-' + tag.id][0]) return false\n clearInterval(interval)\n let $tag = this.$refs['promptTagValue-' + tag.id][0]\n let height = $tag.offsetHeight\n $tag.parentNode.style.height = height + 'px'\n if (this.$refs['promptTagEdit-' + tag.id]) {\n this.$refs['promptTagEdit-' + tag.id][0].style.height = height + 'px'\n }\n if (this.$refs['promptTagDelete-' + tag.id]) {\n this.$refs['promptTagDelete-' + tag.id][0].style.height = height + 'px'\n }\n }, 50)\n },\n _getTagType(tag) {\n\n },\n _setTagClass(tag) {\n tag.isLora = false\n tag.loraExists = false\n tag.isLyco = false\n tag.lycoExists = false\n tag.isEmbedding = false\n\n if (typeof tag['type'] === 'string' && tag.type === 'wrap') {\n } else {\n // 判断是否lora\n const match = tag.value.match(common.loraRegex)\n if (match) {\n tag.isLora = true\n tag.loraName = match[1]\n const loraName = this.loraExists(match[1])\n if (loraName !== false) {\n tag.loraExists = true\n }\n }\n\n if (!tag.isLora) {\n // 判断是否lyco\n const match = tag.value.match(common.lycoRegex)\n if (match) {\n tag.isLyco = true\n tag.lycoName = match[1]\n const lycoName = this.lycoExists(match[1])\n if (lycoName !== false) {\n tag.lycoExists = true\n }\n }\n }\n\n if (!tag.isLora && !tag.isLyco) {\n // 判断是否embedding\n const embeddingName = this.embeddingExists(tag.value)\n if (embeddingName !== false) {\n tag.isEmbedding = true\n tag.value = embeddingName\n tag.embeddingName = embeddingName\n } else {\n const embeddingName = this.embeddingExists(tag.originalValue)\n if (embeddingName !== false) {\n tag.isEmbedding = true\n // tag.value = embeddingName\n tag.embeddingName = embeddingName\n }\n }\n }\n }\n\n let classes = ['prompt-tag-value']\n if (tag.isLora) {\n classes.push('lora-tag')\n if (!tag.loraExists) {\n classes.push('lora-not-exists')\n }\n } else if (tag.isLyco) {\n classes.push('lyco-tag')\n if (!tag.lycoExists) {\n classes.push('lyco-not-exists')\n }\n } else if (tag.isEmbedding) {\n classes.push('embedding-tag')\n } else if (this.neg) {\n classes.push('neg-tag')\n }\n\n tag.classes = classes\n return classes\n },\n _setTagById(id, value = null, localValue = null) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n if (value !== null) tag.value = value\n if (localValue !== null) tag.localValue = localValue\n return tag\n },\n _isTagBlacklist(tag) {\n if (typeof tag['type'] === 'string' && tag.type === 'wrap') return false\n if (tag.isLora) {\n if (this.blacklist.lora?.includes(tag.loraName.toLowerCase())) return true\n } else if (tag.isLyco) {\n if (this.blacklist.lycoris?.includes(tag.lycoName.toLowerCase())) return true\n } else if (tag.isEmbedding) {\n if (this.blacklist.embedding?.includes(tag.embeddingName.toLowerCase())) return true\n } else {\n if (this.neg) {\n if (this.blacklist.negative_prompt?.includes(tag.originalValue.toLowerCase())) return true\n } else {\n if (this.blacklist.prompt?.includes(tag.originalValue.toLowerCase())) return true\n }\n }\n return false\n },\n _appendTag(value, localValue = '', disabled = false, index = -1, type = 'text') {\n if (value === '') return -1\n // 唯一数:当前时间戳+随机数\n const id = Date.now() + (Math.random() * 1000000).toFixed(0)\n let tag = {\n id,\n value: value === null || value === undefined || value === false ? '' : value,\n localValue: localValue === null || localValue === undefined || localValue === false ? '' : localValue,\n disabled,\n type\n }\n this._setTag(tag)\n // value = common.setLayers(value, 0, '(', ')')\n // value = common.setLayers(value, 0, '[', ']')\n if (this._isTagBlacklist(tag)) return -1\n if (index >= 0) {\n // 插入到指定位置\n this.tags.splice(index, 0, tag)\n } else {\n index = this.tags.push(tag)\n }\n this.$nextTick(() => {\n if (this.$refs['promptTagEdit-' + id]) autoSizeInput(this.$refs['promptTagEdit-' + id][0])\n })\n return index - 1\n },\n renderTag(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return ''\n let value = tag.value\n if (value === 'BREAK' && (this.autoBreakBeforeWrap || this.autoBreakAfterWrap)) {\n value = '
---------------------
BREAK
---------------------
'\n } else {\n value = common.escapeHtml(value)\n if (tag.incWeight > 0) {\n if (this.useNovelAiWeightSymbol) {\n value = common.setLayers(value, 0, '{', '}')\n value = '
' + value + '
'\n let start = '
' + '{'.repeat(tag.incWeight) + '
'\n let end = '
' + '}'.repeat(tag.incWeight) + '
'\n value = start + value + end\n } else {\n value = common.setLayers(value, 0, '(', ')')\n value = '
' + value + '
'\n let start = '
' + '('.repeat(tag.incWeight) + '
'\n let end = '
' + ')'.repeat(tag.incWeight) + '
'\n value = start + value + end\n }\n } else if (tag.decWeight > 0) {\n value = common.setLayers(value, 0, '[', ']')\n value = '
' + value + '
'\n let start = '
' + '['.repeat(tag.decWeight) + '
'\n let end = '
' + ']'.repeat(tag.decWeight) + '
'\n value = start + value + end\n } else {\n value = '
' + value + '
'\n }\n }\n return value\n },\n isFavorite(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n if (typeof window.phystonPromptfavorites === 'object') {\n for (const group of window.phystonPromptfavorites) {\n if (group.key !== this.favoriteKey) continue\n for (const favorite of group.list) {\n if (favorite.tags.length !== 1) continue\n if (favorite.tags[0].value === tag.value) return favorite.id\n }\n }\n }\n return false\n },\n onLoraPopupUseKeywords(keywords) {\n let indexes = []\n for (let keyword of keywords) {\n let temp = keyword.toLowerCase()\n let find = this.tags.find(tag => tag.value.toLowerCase() === temp)\n if (!find) {\n let index = this._appendTag(keyword, '', false, -1, 'text')\n if (index !== -1) indexes.push(index)\n }\n }\n if (indexes.length) {\n this.autoTranslateByIndexes(indexes)\n }\n },\n onTagMouseEnter(id) {\n if (this.isEditing) return false\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n tag.isFavorite = this.isFavorite(tag.id)\n if (this.hotkey.hover === 'extend') this.showExtendId = id\n if (tag.isLora || tag.isLyco || tag.isEmbedding) {\n let name = tag.isLora ? tag.loraName : (tag.isLyco ? tag.lycoName : tag.embeddingName)\n this.$emit('showExtraNetworks', this.$refs['promptTagValue-' + tag.id][0], name, this.onLoraPopupUseKeywords, 'tags')\n }\n },\n onTagMouseMove(id) {\n /*let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n this.$refs.highlightPrompt.show(tag)*/\n },\n onTagMouseLeave(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n if (this.hotkey.hover === 'extend') this.showExtendId = ''\n this.$emit('hideExtraNetworks')\n },\n onTagClick(id) {\n if (this.tagClickTimeId) clearTimeout(this.tagClickTimeId)\n this.tagClickTimeId = setTimeout(() => {\n switch (this.hotkey.click) {\n case 'edit':\n this._handleEditTag(id)\n break\n case 'disable':\n this._handleDisableTag(id)\n break\n case 'extend':\n this._handleHoverTag(id)\n break\n }\n clearTimeout(this.tagClickTimeId)\n }, 250)\n },\n onTagDblclick(id) {\n clearTimeout(this.tagClickTimeId)\n switch (this.hotkey.dblClick) {\n case 'edit':\n this._handleEditTag(id)\n break\n case 'disable':\n this._handleDisableTag(id)\n break\n case 'extend':\n this._handleHoverTag(id)\n break\n }\n },\n onTagRightClick(id, e) {\n switch (this.hotkey.rightClick) {\n case 'edit':\n this._handleEditTag(id)\n break\n case 'disable':\n this._handleDisableTag(id)\n break\n case 'extend':\n this._handleHoverTag(id)\n break\n }\n },\n _handleEditTag(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n this.editing = {}\n this.editing[tag.id] = true\n this.isEditing = true\n this.$forceUpdate()\n this.$nextTick(() => {\n const input = this.$refs['promptTagEdit-' + tag.id][0]\n input.focus()\n input.dispatchEvent(new Event('input'))\n // input.select()\n })\n },\n _handleDisableTag(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n this.onDisabledTagClick(tag.id)\n },\n _handleHoverTag(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n this.showExtendId = id\n },\n onTagInputBlur(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n this.editing[tag.id] = false\n this.isEditing = false\n },\n onTagInputKeyDown(id, e) {\n if (e.keyCode === 13) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n this.editing[tag.id] = false\n this.isEditing = false\n if (tag.value !== e.target.value) {\n tag.value = e.target.value\n this._setTag(tag)\n this.updateTags()\n }\n }\n },\n onTagInputChange(id, e) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n if (tag.value === e.target.value) return\n tag.value = e.target.value\n this._setTag(tag)\n this.updateTags()\n },\n onTagWeightNumChange(id, e) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n e = typeof e === \"number\" || typeof a === \"string\" ? e : e.target.value\n if (tag.weightNum == e) return\n let weightNum = e\n let value = tag.value\n let localValue = tag.localValue\n if (weightNum !== 0) {\n if (weightNum === 1 && !this.autoKeepWeightOne) {\n // 如果权重数是1,那么就去掉权重数\n const bracket = common.hasBrackets(value)\n if (bracket[0] === '(' && bracket[1] === ')' || (this.useNovelAiWeightSymbol && bracket[0] === '{' && bracket[1] === '}')) {\n // 移除括号\n value = common.setLayers(value, 0, bracket[0], bracket[1])\n if (localValue !== '') localValue = common.setLayers(localValue, 0, bracket[0], bracket[1])\n } else {\n // 不移除括号\n }\n // 移除权重数\n value = value.replace(common.weightNumRegex, '$1')\n if (localValue !== '') localValue = localValue.replace(common.weightNumRegex, '$1')\n } else {\n // 如果原来没有权重数,那么就加上权重数\n if (!common.weightNumRegex.test(value)) {\n // 如果原来有括号,就要加到括号内\n let bracket = common.hasBrackets(value)\n if (bracket) {\n value = common.setLayers(value, 1, bracket[0], bracket[1], ':' + weightNum)\n if (localValue !== '') localValue = common.setLayers(localValue, 1, bracket[0], bracket[1], ':' + weightNum)\n } else {\n value = value + ':' + weightNum\n if (localValue !== '') localValue = localValue + ':' + weightNum\n }\n }\n // 如果原来没有括号() [] {} <>,那么就加上括号\n if (!common.hasBrackets(value)) {\n if (this.useNovelAiWeightSymbol) {\n value = common.setLayers(value, 1, '{', '}')\n if (localValue !== '') localValue = common.setLayers(localValue, 1, '{', '}')\n } else {\n value = common.setLayers(value, 1, '(', ')')\n if (localValue !== '') localValue = common.setLayers(localValue, 1, '(', ')')\n }\n }\n }\n if (value !== tag.value) {\n tag.value = value\n if (localValue !== '') tag.localValue = localValue\n this._setTag(tag)\n }\n } else {\n if (this.autoKeepWeightZero) {\n // 保留权重数\n tag.value = value.replace(common.weightNumRegex, '$1:0')\n if (localValue !== '') tag.localValue = tag.localValue.replace(common.weightNumRegex, '$1:0')\n } else {\n // 移除权重数\n tag.value = value.replace(common.weightNumRegex, '$1')\n if (localValue !== '') tag.localValue = tag.localValue.replace(common.weightNumRegex, '$1')\n }\n }\n tag.weightNum = weightNum\n this.updateTags()\n },\n onDeleteTagClick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n let index = this.tags.indexOf(tag)\n this.tags.splice(index, 1)\n this.updateTags()\n },\n onFavoriteTagClick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n let favoriteId = this.isFavorite(tag.id)\n if (!favoriteId) {\n // 收藏\n this.gradioAPI.pushFavorite(this.favoriteKey, [tag], tag.value, tag.localValue === '' ? tag.value : tag.localValue).then(res => {\n if (res) {\n tag.isFavorite = true\n this.$emit('refreshFavorites', this.favoriteKey)\n }\n })\n } else {\n // 取消收藏\n this.gradioAPI.unFavorite(this.favoriteKey, favoriteId).then(res => {\n if (res) {\n tag.isFavorite = false\n this.$emit('refreshFavorites', this.favoriteKey)\n }\n })\n }\n },\n onDisabledTagClick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n tag.disabled = !tag.disabled\n this.updateTags()\n },\n onIncWeightClick(id, num) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n let value = tag.value\n let localValue = tag.localValue\n value = common.setLayers(value, 0, '[', ']')\n if (localValue !== '') localValue = common.setLayers(localValue, 0, '[', ']')\n if (this.useNovelAiWeightSymbol) {\n value = common.setLayers(value, 0, '(', ')')\n if (localValue !== '') localValue = common.setLayers(localValue, 0, '(', ')')\n }\n let incWeight = tag.incWeight\n incWeight += num\n if (incWeight < 0) incWeight = 0\n tag.incWeight = incWeight\n tag.decWeight = 0\n if (this.useNovelAiWeightSymbol) {\n value = common.setLayers(value, incWeight, '{', '}')\n if (localValue !== '') localValue = common.setLayers(localValue, incWeight, '{', '}')\n } else {\n value = common.setLayers(value, incWeight, '(', ')')\n if (localValue !== '') localValue = common.setLayers(localValue, incWeight, '(', ')')\n }\n tag.value = value\n if (localValue !== '') tag.localValue = localValue\n this.updateTags()\n },\n onDecWeightClick(id, num) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n let value = tag.value\n let localValue = tag.localValue\n value = common.setLayers(value, 0, '(', ')')\n if (localValue !== '') localValue = common.setLayers(localValue, 0, '(', ')')\n if (this.useNovelAiWeightSymbol) {\n value = common.setLayers(value, 0, '{', '}')\n if (localValue !== '') localValue = common.setLayers(localValue, 0, '{', '}')\n }\n let decWeight = tag.decWeight\n decWeight += num\n if (decWeight < 0) decWeight = 0\n tag.incWeight = 0\n tag.decWeight = decWeight\n value = common.setLayers(value, decWeight, '[', ']')\n if (localValue !== '') localValue = common.setLayers(localValue, decWeight, '[', ']')\n tag.value = value\n if (localValue !== '') tag.localValue = localValue\n this.updateTags()\n },\n onWrapTagClick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n let index = this.tags.indexOf(tag)\n let wrapIndex = this._appendTag(\"\\n\", \"\\n\", false, -1, 'wrap')\n let wrapTag = this.tags[wrapIndex]\n // 移动到当前标签的下面\n this.tags.splice(wrapIndex, 1);\n // 然后将 'c' 插入到 'e' 后面\n this.tags.splice(index + 1, 0, wrapTag);\n this.updateTags()\n },\n onTranslateToLocalClick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n let index = this.tags.indexOf(tag)\n if (this.loading[tag.id + '_local']) return\n this.translates([index], true, true).finally(() => {\n this.updateTags()\n })\n },\n onTranslateToEnglishClick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n let index = this.tags.indexOf(tag)\n if (this.loading[tag.id + '_en']) return\n this.translates([index], false, true).finally(() => {\n this.updateTags()\n })\n },\n onBlacklistClick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n\n if (!this.cancelBlacklistConfirm) {\n let title = this.getLang('confirm_add_blacklist').replace('{0}', tag.value) + \"\\n\" + this.getLang('blacklist_desc')\n if (!confirm(title)) return\n }\n\n let blacklist = JSON.parse(JSON.stringify(this.blacklist))\n if (tag.isLora) {\n blacklist.lora.push(tag.loraName)\n } else if (tag.isLyco) {\n blacklist.lycoris.push(tag.lycoName)\n } else if (tag.isEmbedding) {\n blacklist.embedding.push(tag.embeddingName)\n } else {\n if (this.neg) {\n blacklist.negative_prompt.push(tag.originalValue)\n } else {\n blacklist.prompt.push(tag.originalValue)\n }\n }\n this.gradioAPI.setData('blacklist', blacklist)\n this.$emit('update:blacklist', blacklist, this.cancelBlacklistConfirm)\n\n this.tags.forEach(item => {\n if (item.value === tag.value) {\n this.onDeleteTagClick(item.id)\n }\n })\n },\n }\n}\n","import common from \"@/utils/common\"\nimport {ref} from \"vue\"\n\nexport default {\n data() {\n return {\n groupTagsActive: '',\n subGroupTagsActive: '',\n groupTagsProcessed: [],\n extraNetworksRefreshing: false,\n }\n },\n watch: {\n groupTags: {\n handler() {\n this.genGroup()\n if (!this.groupTagsActive || !this.subGroupTagsActive) {\n this.groupTagsActive = 'favorite'\n this.subGroupTagsActive = 'favorite-' + this.favoriteKey\n /*for (let item of this.groupTags) {\n this.groupTagsActive = item.tabKey\n for (let group of item.groups) {\n if (group.type && group.typ == 'wrap') continue\n this.subGroupTagsActive = group.tabKey\n break\n }\n break\n }*/\n }\n this._setGroupTagItemWidth()\n },\n deep: true,\n immediate: true,\n },\n favorites: {\n handler() {\n this.genGroup()\n },\n deep: true,\n immediate: true,\n },\n extraNetworks: {\n handler() {\n this.genGroup()\n },\n deep: true,\n immediate: true,\n }\n },\n mounted() {\n this.gradioAPI.getData('groupTagsActive-' + this.name).then((data) => {\n if (data !== null && typeof data === 'object') {\n this.groupTagsActive = data.groupTagsActive\n this.subGroupTagsActive = data.subGroupTagsActive\n }\n })\n },\n methods: {\n genGroup() {\n let processed = []\n let favoriteGroup = {\n name: this.getLang('favorite'),\n tabKey: 'favorite',\n type: 'favorite',\n groups: [],\n }\n this.getCurrentTypeFavorites().forEach(item => {\n let subGroup = {\n color: '',\n name: this.getLang(item.name),\n tabKey: 'favorite-' + item.key,\n type: 'favorite',\n tags: {},\n ori: {},\n }\n item.list.forEach(favorite => {\n subGroup.tags[favorite.prompt] = favorite.name == '' ? favorite.prompt : favorite.name\n subGroup.ori[favorite.prompt] = favorite\n })\n favoriteGroup.groups.push(subGroup)\n })\n processed.push(favoriteGroup)\n\n if (!this.$appMode) {\n let extraNetworksGroup = {\n name: 'Extra Networks',\n tabKey: 'extraNetworks',\n type: 'extraNetworks',\n groups: [],\n }\n this.extraNetworks.forEach(extraNetwork => {\n // if (extraNetwork.name === 'checkpoints') return\n let subGroup = {\n color: '',\n name: extraNetwork.title,\n tabKey: 'extraNetworks-' + extraNetwork.name,\n type: 'extraNetworks',\n subType: extraNetwork.name,\n tags: {},\n datas: [],\n }\n extraNetwork.items.forEach(item => {\n subGroup.datas.push(item)\n })\n extraNetworksGroup.groups.push(subGroup)\n extraNetwork.items.forEach(item => {\n item.dirnameFormat = item.dirname.replaceAll('\\\\', '/')\n })\n let prefixPath = common.getSamePrefixPath([...new Set(extraNetwork.items.map(item => item.dirnameFormat))])\n let baseDirs = []\n extraNetwork.items.forEach(item => {\n let baseDirname = item.dirnameFormat.replace(prefixPath, '')\n if (baseDirname === '') baseDirname = '@root'\n baseDirname = baseDirname.replace(/^\\//, '')\n baseDirs.push(baseDirname)\n item.base_dirname = baseDirname\n })\n baseDirs = [...new Set(baseDirs)]\n\n if (baseDirs.length > 1) {\n baseDirs.forEach(dir => {\n let subDirGroup = {\n color: '',\n name: dir,\n tabKey: 'extraNetworks-' + extraNetwork.name + '-' + dir,\n type: 'extraNetworks',\n subType: extraNetwork.name,\n tags: {},\n datas: [],\n }\n extraNetwork.items.forEach(item => {\n if (item.base_dirname === dir) {\n subDirGroup.datas.push(item)\n }\n })\n extraNetworksGroup.groups.push(subDirGroup)\n })\n }\n extraNetworksGroup.groups.push({\n type: 'wrap',\n })\n })\n processed.push(extraNetworksGroup)\n }\n\n processed = processed.concat(this.groupTags)\n this.groupTagsProcessed = processed\n },\n saveGroupActive() {\n this.gradioAPI.setData('groupTagsActive-' + this.name, {\n groupTagsActive: this.groupTagsActive,\n subGroupTagsActive: this.subGroupTagsActive,\n })\n },\n activeGroupTab(index) {\n this.groupTagsActive = this.groupTagsProcessed[index].tabKey\n this.subGroupTagsActive = this.groupTagsProcessed[index].groups[0].tabKey\n this.saveGroupActive()\n let scrollLeft = this.$refs.groupTabsHeader.children[index].offsetLeft - this.$refs.groupTabsHeader.offsetWidth / 2 + this.$refs.groupTabsHeader.children[index].offsetWidth / 2\n this.$refs.groupTabsHeader.scrollTo({\n left: scrollLeft,\n behavior: 'smooth'\n })\n this._setGroupTagItemWidth()\n },\n activeSubGroupTab(index, subIndex) {\n this.subGroupTagsActive = this.groupTagsProcessed[index].groups[subIndex].tabKey\n this.saveGroupActive()\n this._setGroupTagItemWidth()\n },\n _setGroupTagItemWidth() {\n // this.$refs.groupTagItem\n this.$nextTick(() => {\n if (!this.$refs.groupTagItem) return\n this.$refs.groupTagItem.forEach((item, index) => {\n item.style.width = 'auto'\n })\n let maxWidth = 0\n this.$refs.groupTagItem.forEach((item, index) => {\n maxWidth = Math.max(maxWidth, item.offsetWidth)\n })\n if (maxWidth > 0) {\n this.$refs.groupTagItem.forEach((item, index) => {\n item.style.width = maxWidth + 'px'\n })\n }\n })\n },\n onClickHideGroupTags() {\n this.$emit('update:hideGroupTags', !this.hideGroupTags)\n },\n onClickGroupTag(local, en, group, subGroup) {\n // 判断是否存在 tags 中\n let indexes = []\n this.tags.forEach((tag, index) => {\n if (tag.originalValue === en) {\n indexes.push(index)\n }\n })\n if (indexes.length) {\n indexes.reverse().forEach((index) => {\n this.tags.splice(index, 1)\n })\n this.updateTags()\n } else {\n if (group.type === 'favorite') {\n let favorite = subGroup.ori[en]\n this.onClickGroupTagFavorite(favorite)\n } else {\n this._appendTag(en, local, false, -1, 'text')\n this.updateTags()\n }\n }\n },\n onClickGroupTagFavorite(favorite) {\n favorite.tags.forEach((tag) => {\n this._appendTag(tag.value, tag.localValue, tag.disabled, -1, tag.type)\n })\n this.updateTags()\n },\n onClickGroupTagExtraNetwork(data, group, subGroup) {\n if (subGroup.subType === 'checkpoints') {\n if (data.loading) return\n data.loading = true\n let setLoading = (num) => {\n if (num > 100) {\n data.loading = false\n setTimeout(this.onClickGroupExtraNetworkRefresh, 1000)\n // console.log('超时')\n return\n }\n if (opts && opts.sd_model_checkpoint.indexOf(data.basename) === 0) {\n data.loading = false\n setTimeout(this.onClickGroupExtraNetworkRefresh, 1000)\n // console.log('已加载')\n return\n }\n\n setTimeout(setLoading, 100, num + 1)\n }\n setLoading(0)\n selectCheckpoint(data.basename)\n return\n }\n let indexes = this._groupTagsExtraNetworkTagsIndexes(data)\n if (indexes.length) {\n indexes.reverse().forEach((index) => {\n console.log(index)\n this.tags.splice(index, 1)\n })\n this.updateTags()\n } else {\n let index = this._appendTag(eval(data.prompt), '', false, -1, 'text')\n if (this.autoTranslateToLocal) {\n this.translates([index], true, false).finally(() => {\n this.updateTags()\n })\n } else {\n this.updateTags()\n }\n }\n },\n getGroupTagTooltip(local, en) {\n let html = ''\n if (local && local !== en) {\n html += local + '
'\n }\n html += en\n return html\n },\n getGroupTagStyle(groupName, subGroupName, value) {\n let style = {}\n let colorKey = common.getTagsColorKey(groupName, subGroupName)\n let color = ''\n if (this.groupTagsColor[colorKey]) {\n color = this.groupTagsColor[colorKey]\n if (common.isColorTransparent(color)) {\n // 如果是纯透明,则设为空\n color = ''\n }\n }\n if (color) {\n style = {background: color}\n }\n // 判断是否存在 tags 中\n for (let tag of this.tags) {\n if (tag.originalValue === value) {\n style['filter'] = 'grayscale(1)'\n break\n }\n }\n return style\n },\n _groupTagsExtraNetworkTagsIndexes(data) {\n let name = data.name\n let output_name = data.output_name || undefined\n let indexes = []\n for (let index in this.tags) {\n let tag = this.tags[index]\n if (typeof tag['type'] === 'string' && tag.type === 'wrap') continue\n let find = false\n if (tag.isLora) {\n find = tag.loraName === name || (output_name && tag.loraName === output_name)\n } else if (tag.isLyco) {\n find = tag.lycoName === name || (output_name && tag.lycoName === output_name)\n } else if (tag.isEmbedding) {\n find = tag.embeddingName === name || (output_name && tag.embeddingName === output_name)\n } else {\n find = tag.originalValue === name || (output_name && tag.originalValue === output_name)\n }\n if (find) {\n indexes.push(index)\n }\n }\n return indexes\n },\n getGroupTagExtraNetworkStyle(data) {\n let indexes = this._groupTagsExtraNetworkTagsIndexes(data)\n let style = {\n width: this.extraNetworksWidth + 'px',\n height: this.extraNetworksHeight + 'px',\n }\n if (indexes.length) style['filter'] = 'grayscale(1)'\n return style\n },\n getTagsColorKey(groupName, subGroupName) {\n return common.getTagsColorKey(groupName, subGroupName)\n },\n onTagsColorChange(key) {\n this.$emit('update:groupTagsColor', this.groupTagsColor)\n },\n onClickResetTagsColor(key) {\n for (let item of this.groupTagsProcessed) {\n for (let group of item.groups) {\n if (group.type && group.typ == 'wrap') continue\n let key2 = common.getTagsColorKey(item.name, group.name)\n if (key === key2) {\n this.groupTagsColor[key] = ref(common.fitterInputColor(group.color))\n }\n }\n }\n this.onTagsColorChange(key)\n },\n onClickClearTagsColor(key) {\n this.groupTagsColor[key] = ref('rgba(0,0,0,0)')\n this.onTagsColorChange(key)\n },\n getTagColorStyle(tag) {\n if (tag.isLora || tag.isLyco || tag.isEmbedding) return {}\n if (!this.groupTagsColorKeyCache[tag.value]) return {}\n let key = this.groupTagsColorKeyCache[tag.value]\n if (!this.groupTagsColor[key]) return {}\n let color = this.groupTagsColor[key]\n if (common.isColorTransparent(color)) return {}\n return {background: color}\n },\n onGroupExtraNetworkMouseEnter(e, name) {\n this.$emit('showExtraNetworks', e.target, name, this.onLoraPopupUseKeywords, true, 'groupTags')\n },\n onGroupExtraNetworkMouseMove() {\n },\n onGroupExtraNetworkMouseLeave() {\n this.$emit('hideExtraNetworks')\n },\n onClickGroupExtraNetworkRefresh() {\n this.$emit('refreshExtraNetworks')\n // this.extraNetworksRefreshing = true\n // this._loadExtraNetworks().finally(() => {\n // this.extraNetworksRefreshing = false\n // })\n },\n }\n}\n","\n","\n","import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nvar __defProp$b = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$d.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n if (__getOwnPropSymbols$d)\n for (var prop of __getOwnPropSymbols$d(b)) {\n if (__propIsEnum$d.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, __spreadProps$8(__spreadValues$b({}, options), {\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n }));\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (param) => {\n return Promise.all(Array.from(fns).map((fn) => fn(param)));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nfunction createInjectionState(composable) {\n const key = Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provide(key, state);\n return state;\n };\n const useInjectedState = () => inject(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n return;\n }\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$c.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n if (__getOwnPropSymbols$c)\n for (var prop of __getOwnPropSymbols$c(b)) {\n if (__propIsEnum$c.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n }\n return a;\n};\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = __spreadValues$a({}, obj);\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction toValue(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(\n () => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0])))\n );\n}\n\nconst isClient = typeof window !== \"undefined\";\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n var _a;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = toValue(ms);\n const maxDuration = toValue(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = defaultValue;\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = defaultValue;\n trigger();\n }, toValue(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction syncRef(left, right, options = {}) {\n var _a, _b;\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options;\n let watchLeft;\n let watchRight;\n const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;\n const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;\n if (direction === \"both\" || direction === \"ltr\") {\n watchLeft = watch(\n left,\n (newValue) => right.value = transformLTR(newValue),\n { flush, deep, immediate }\n );\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchRight = watch(\n right,\n (newValue) => left.value = transformRTL(newValue),\n { flush, deep, immediate }\n );\n }\n return () => {\n watchLeft == null ? void 0 : watchLeft();\n watchRight == null ? void 0 : watchRight();\n };\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(\n source,\n (newValue) => targets.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = __spreadProps$7(__spreadValues$9({}, objectRef.value), { [key]: v });\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true) {\n if (getCurrentInstance())\n onBeforeMount(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn) {\n if (getCurrentInstance())\n onBeforeUnmount(fn);\n}\n\nfunction tryOnMounted(fn, sync = true) {\n if (getCurrentInstance())\n onMounted(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn) {\n if (getCurrentInstance())\n onUnmounted(fn);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\nfunction useArrayDifference(...args) {\n var _a;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(\n () => toValue(\n toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n )\n );\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(\n () => toValue(\n !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))\n )\n );\n}\n\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n return computed(\n () => toValue(list).slice(formIndex).some(\n (element, index, array) => comparator(toValue(element), toValue(value), index, toValue(array))\n )\n );\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n return computed(() => {\n const resolved = toValue(list);\n return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue(list).map((element) => toValue(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = ref(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return __spreadValues$8({\n counter,\n reset\n }, controls);\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, toValue(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return __spreadValues$7({\n ready\n }, controls);\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue(truthyValue);\n _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [\n ...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)\n ];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __objRest$5 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchWithFilter(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$5(_a, [\n \"eventFilter\"\n ]);\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __objRest$4 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchAtMost(source, cb, options) {\n const _a = options, {\n count\n } = _a, watchOptions = __objRest$4(_a, [\n \"count\"\n ]);\n const current = ref(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(b)) {\n if (__propIsEnum$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nvar __objRest$3 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchDebounced(source, cb, options = {}) {\n const _a = options, {\n debounce = 0,\n maxWait = void 0\n } = _a, watchOptions = __objRest$3(_a, [\n \"debounce\",\n \"maxWait\"\n ]);\n return watchWithFilter(\n source,\n cb,\n __spreadProps$6(__spreadValues$6({}, watchOptions), {\n eventFilter: debounceFilter(debounce, { maxWait })\n })\n );\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(b)) {\n if (__propIsEnum$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n __spreadProps$5(__spreadValues$5({}, options), {\n deep: true\n })\n );\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchIgnorable(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$2(_a, [\n \"eventFilter\"\n ]);\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter.value++;\n },\n __spreadProps$4(__spreadValues$4({}, watchOptions), { flush: \"sync\" })\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n __spreadProps$3(__spreadValues$3({}, options), {\n immediate: true\n })\n );\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchPausable(source, cb, options = {}) {\n const _a = options, {\n eventFilter: filter\n } = _a, watchOptions = __objRest$1(_a, [\n \"eventFilter\"\n ]);\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(\n source,\n cb,\n __spreadProps$2(__spreadValues$2({}, watchOptions), {\n eventFilter\n })\n );\n return { stop, pause, resume, isActive };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchThrottled(source, cb, options = {}) {\n const _a = options, {\n throttle = 0,\n trailing = true,\n leading = true\n } = _a, watchOptions = __objRest(_a, [\n \"throttle\",\n \"trailing\",\n \"leading\"\n ]);\n return watchWithFilter(\n source,\n cb,\n __spreadProps$1(__spreadValues$1({}, watchOptions), {\n eventFilter: throttleFilter(throttle, trailing, leading)\n })\n );\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return __spreadProps(__spreadValues({}, res), {\n trigger\n });\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue(item));\n return toValue(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(\n source,\n (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n },\n options\n );\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isClient, isDef, isDefined, isIOS, isObject, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, makeDestructurable, camelize, toValue, isClient, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, isObject, objectOmit, promiseTimeout, until, increaseWithUnit, objectEntries, useTimeoutFn, pausableWatch, toRef, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, createSingletonPromise, toRefs, useIntervalFn, notNullish, containsProp, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, isVue3, version, defineComponent, h, TransitionGroup, shallowReactive, Fragment, watch, getCurrentInstance, customRef, onUpdated, onMounted, readonly, nextTick, reactive, markRaw, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = true,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nvar __defProp$q = Object.defineProperty;\nvar __defProps$d = Object.defineProperties;\nvar __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$t = Object.getOwnPropertySymbols;\nvar __hasOwnProp$t = Object.prototype.hasOwnProperty;\nvar __propIsEnum$t = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$q = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$t.call(b, prop))\n __defNormalProp$q(a, prop, b[prop]);\n if (__getOwnPropSymbols$t)\n for (var prop of __getOwnPropSymbols$t(b)) {\n if (__propIsEnum$t.call(b, prop))\n __defNormalProp$q(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));\nfunction createReusableTemplate(options = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createReusableTemplate only works in Vue 2.7 or above.\");\n return;\n }\n const {\n inheritAttrs = true\n } = options;\n const render = shallowRef();\n const define = /* #__PURE__ */ defineComponent({\n setup(_, { slots }) {\n return () => {\n render.value = slots.default;\n };\n }\n });\n const reuse = /* #__PURE__ */ defineComponent({\n inheritAttrs,\n setup(_, { attrs, slots }) {\n return () => {\n var _a;\n if (!render.value && process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n const vnode = (_a = render.value) == null ? void 0 : _a.call(render, __spreadProps$d(__spreadValues$q({}, keysToCamelKebabCase(attrs)), { $slots: slots }));\n return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n };\n }\n });\n return makeDestructurable(\n { define, reuse },\n [define, reuse]\n );\n}\nfunction keysToCamelKebabCase(obj) {\n const newObj = {};\n for (const key in obj)\n newObj[camelize(key)] = obj[key];\n return newObj;\n}\n\nfunction createTemplatePromise(options = {}) {\n if (!isVue3) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createTemplatePromise only works in Vue 3 or above.\");\n return;\n }\n let index = 0;\n const instances = ref([]);\n function create(...args) {\n const props = shallowReactive({\n key: index++,\n args,\n promise: void 0,\n resolve: () => {\n },\n reject: () => {\n },\n isResolving: false,\n options\n });\n instances.value.push(props);\n props.promise = new Promise((_resolve, _reject) => {\n props.resolve = (v) => {\n props.isResolving = true;\n return _resolve(v);\n };\n props.reject = _reject;\n }).finally(() => {\n props.promise = void 0;\n const index2 = instances.value.indexOf(props);\n if (index2 !== -1)\n instances.value.splice(index2, 1);\n });\n return props.promise;\n }\n function start(...args) {\n if (options.singleton && instances.value.length > 0)\n return instances.value[0].promise;\n return create(...args);\n }\n const component = /* #__PURE__ */ defineComponent((_, { slots }) => {\n const renderList = () => instances.value.map((props) => {\n var _a;\n return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props));\n });\n if (options.transition)\n return () => h(TransitionGroup, options.transition, renderList);\n return renderList;\n });\n component.start = start;\n return component;\n}\n\nfunction createUnrefFn(fn) {\n return function(...args) {\n return fn.apply(this, args.map((i) => toValue(i)));\n };\n}\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = toValue(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (typeof args[0] === \"string\" || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(\n () => [unrefElement(target), toValue(options)],\n ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n cleanups.push(\n ...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, options2));\n })\n );\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n window.document.documentElement.addEventListener(\"click\", noop);\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n if (el)\n shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n setTimeout(() => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n handler(event);\n }, 0);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nvar __defProp$p = Object.defineProperty;\nvar __defProps$c = Object.defineProperties;\nvar __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$s = Object.getOwnPropertySymbols;\nvar __hasOwnProp$s = Object.prototype.hasOwnProperty;\nvar __propIsEnum$s = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$p = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$s.call(b, prop))\n __defNormalProp$p(a, prop, b[prop]);\n if (__getOwnPropSymbols$s)\n for (var prop of __getOwnPropSymbols$s(b)) {\n if (__propIsEnum$s.call(b, prop))\n __defNormalProp$p(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));\nfunction createKeyPredicate(keyFilter) {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n}\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const {\n target = defaultWindow,\n eventName = \"keydown\",\n passive = false,\n dedupe = false\n } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (e.repeat && toValue(dedupe))\n return;\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$c(__spreadValues$p({}, options), { eventName: \"keydown\" }));\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$c(__spreadValues$p({}, options), { eventName: \"keypress\" }));\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$c(__spreadValues$p({}, options), { eventName: \"keyup\" }));\n}\n\nconst DEFAULT_DELAY = 500;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n timeout = setTimeout(\n () => handler(ev),\n (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY\n );\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions);\n useEventListener(elementRef, [\"pointerup\", \"pointerleave\"], clear, listenerOptions);\n}\n\nfunction isFocusedElementEditable() {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n if (keyCode >= 97 && keyCode <= 122)\n return true;\n return false;\n}\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const {\n window = defaultWindow,\n deep = true\n } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const getDeepActiveElement = () => {\n var _a2;\n let element = document == null ? void 0 : document.activeElement;\n if (deep) {\n while (element == null ? void 0 : element.shadowRoot)\n element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;\n }\n return element;\n };\n const activeElement = computedWithControl(\n () => null,\n () => getDeepActiveElement()\n );\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n activeElement.trigger();\n }, true);\n useEventListener(window, \"focus\", activeElement.trigger, true);\n }\n return activeElement;\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n if (getCurrentInstance()) {\n onMounted(() => {\n isMounted.value = true;\n });\n }\n return isMounted;\n}\n\nfunction useSupported(callback) {\n const isMounted = useMounted();\n return computed(() => {\n isMounted.value;\n return Boolean(callback());\n });\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n const delta = timestamp - (previousFrameTimestamp || timestamp);\n fn({ delta, timestamp });\n previousFrameTimestamp = timestamp;\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nfunction useAnimate(target, keyframes, options) {\n let config;\n let animateOptions;\n if (isObject(options)) {\n config = options;\n animateOptions = objectOmit(options, [\"window\", \"immediate\", \"commitStyles\", \"persist\", \"onReady\", \"onError\"]);\n } else {\n config = { duration: options };\n animateOptions = options;\n }\n const {\n window = defaultWindow,\n immediate = true,\n commitStyles,\n persist,\n playbackRate: _playbackRate = 1,\n onReady,\n onError = (e) => {\n console.error(e);\n }\n } = config;\n const isSupported = useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n const animate = shallowRef(void 0);\n const store = shallowReactive({\n startTime: null,\n currentTime: null,\n timeline: null,\n playbackRate: _playbackRate,\n pending: false,\n playState: immediate ? \"idle\" : \"paused\",\n replaceState: \"active\"\n });\n const pending = computed(() => store.pending);\n const playState = computed(() => store.playState);\n const replaceState = computed(() => store.replaceState);\n const startTime = computed({\n get() {\n return store.startTime;\n },\n set(value) {\n store.startTime = value;\n if (animate.value)\n animate.value.startTime = value;\n }\n });\n const currentTime = computed({\n get() {\n return store.currentTime;\n },\n set(value) {\n store.currentTime = value;\n if (animate.value) {\n animate.value.currentTime = value;\n syncResume();\n }\n }\n });\n const timeline = computed({\n get() {\n return store.timeline;\n },\n set(value) {\n store.timeline = value;\n if (animate.value)\n animate.value.timeline = value;\n }\n });\n const playbackRate = computed({\n get() {\n return store.playbackRate;\n },\n set(value) {\n store.playbackRate = value;\n if (animate.value)\n animate.value.playbackRate = value;\n }\n });\n const play = () => {\n if (animate.value) {\n try {\n animate.value.play();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n } else {\n update();\n }\n };\n const pause = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.pause();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const reverse = () => {\n var _a;\n !animate.value && update();\n try {\n (_a = animate.value) == null ? void 0 : _a.reverse();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n };\n const finish = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.finish();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const cancel = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.cancel();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n watch(() => unrefElement(target), (el) => {\n el && update();\n });\n watch(() => keyframes, (value) => {\n !animate.value && update();\n if (!unrefElement(target) && animate.value) {\n animate.value.effect = new KeyframeEffect(\n unrefElement(target),\n toValue(value),\n animateOptions\n );\n }\n }, { deep: true });\n tryOnMounted(() => {\n nextTick(() => update(true));\n });\n tryOnScopeDispose(cancel);\n function update(init) {\n const el = unrefElement(target);\n if (!isSupported.value || !el)\n return;\n animate.value = el.animate(toValue(keyframes), animateOptions);\n if (commitStyles)\n animate.value.commitStyles();\n if (persist)\n animate.value.persist();\n if (_playbackRate !== 1)\n animate.value.playbackRate = _playbackRate;\n if (init && !immediate)\n animate.value.pause();\n else\n syncResume();\n onReady == null ? void 0 : onReady(animate.value);\n }\n useEventListener(animate, [\"cancel\", \"finish\", \"remove\"], syncPause);\n const { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n if (!animate.value)\n return;\n store.pending = animate.value.pending;\n store.playState = animate.value.playState;\n store.replaceState = animate.value.replaceState;\n store.startTime = animate.value.startTime;\n store.currentTime = animate.value.currentTime;\n store.timeline = animate.value.timeline;\n store.playbackRate = animate.value.playbackRate;\n }, { immediate: false });\n function syncResume() {\n if (isSupported.value)\n resumeRef();\n }\n function syncPause() {\n if (isSupported.value && window)\n window.requestAnimationFrame(pauseRef);\n }\n return {\n isSupported,\n animate,\n // actions\n play,\n pause,\n reverse,\n finish,\n cancel,\n // state\n pending,\n playState,\n replaceState,\n startTime,\n currentTime,\n timeline,\n playbackRate\n };\n}\n\nfunction useAsyncQueue(tasks, options = {}) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop,\n signal\n } = options;\n const promiseState = {\n aborted: \"aborted\",\n fulfilled: \"fulfilled\",\n pending: \"pending\",\n rejected: \"rejected\"\n };\n const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, new Error(\"aborted\"));\n return;\n }\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n const done = curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n if (!signal)\n return done;\n return Promise.race([done, whenAborted(signal)]);\n }).catch((e) => {\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, e);\n return e;\n }\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\nfunction whenAborted(signal) {\n return new Promise((resolve, reject) => {\n const error = new Error(\"aborted\");\n if (signal.aborted)\n reject(error);\n else\n signal.addEventListener(\"abort\", () => reject(error), { once: true });\n });\n}\n\nvar __defProp$o = Object.defineProperty;\nvar __defProps$b = Object.defineProperties;\nvar __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$r = Object.getOwnPropertySymbols;\nvar __hasOwnProp$r = Object.prototype.hasOwnProperty;\nvar __propIsEnum$r = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$o = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$r.call(b, prop))\n __defNormalProp$o(a, prop, b[prop]);\n if (__getOwnPropSymbols$r)\n for (var prop of __getOwnPropSymbols$r(b)) {\n if (__propIsEnum$r.call(b, prop))\n __defNormalProp$o(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = shallowRef(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw e;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n const shell = {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n function waitUntilIsLoaded() {\n return new Promise((resolve, reject) => {\n until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n });\n }\n return __spreadProps$b(__spreadValues$o({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilIsLoaded().then(onFulfilled, onRejected);\n }\n });\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = toValue(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || typeof target === \"function\")\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useBattery({ navigator = defaultNavigator } = {}) {\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator);\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n useEventListener(battery, events, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n // Device:\n device,\n requestDevice,\n // Server:\n server,\n // Errors:\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const handler = (event) => {\n matches.value = event.matches;\n };\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", handler);\n else\n mediaQuery.removeListener(handler);\n };\n const stopWatch = watchEffect(() => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(toValue(query));\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", handler);\n else\n mediaQuery.addListener(handler);\n matches.value = mediaQuery.matches;\n });\n tryOnScopeDispose(() => {\n stopWatch();\n cleanup();\n mediaQuery = void 0;\n });\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\n\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = breakpoints[k];\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(`(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greaterOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return Object.assign(shortcutMethods, {\n greater(k) {\n return useMediaQuery(`(min-width: ${getValue(k, 0.1)})`, options);\n },\n greaterOrEqual,\n smaller(k) {\n return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);\n },\n smallerOrEqual(k) {\n return useMediaQuery(`(max-width: ${getValue(k)})`, options);\n },\n between(a, b) {\n return useMediaQuery(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n },\n current() {\n const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);\n return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n }\n });\n}\n\nfunction useBroadcastChannel(options) {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = shallowRef(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n}\n\nvar __defProp$n = Object.defineProperty;\nvar __getOwnPropSymbols$q = Object.getOwnPropertySymbols;\nvar __hasOwnProp$q = Object.prototype.hasOwnProperty;\nvar __propIsEnum$q = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$n = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$q.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n if (__getOwnPropSymbols$q)\n for (var prop of __getOwnPropSymbols$q(b)) {\n if (__propIsEnum$q.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n }\n return a;\n};\nconst WRITABLE_PROPERTIES = [\n \"hash\",\n \"host\",\n \"hostname\",\n \"href\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"search\"\n];\nfunction useBrowserLocation({ window = defaultWindow } = {}) {\n const refs = Object.fromEntries(\n WRITABLE_PROPERTIES.map((key) => [key, ref()])\n );\n for (const [key, ref2] of objectEntries(refs)) {\n watch(ref2, (value) => {\n if (!(window == null ? void 0 : window.location) || window.location[key] === value)\n return;\n window.location[key] = value;\n });\n }\n const buildState = (trigger) => {\n var _a;\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { origin } = (window == null ? void 0 : window.location) || {};\n for (const key of WRITABLE_PROPERTIES)\n refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key];\n return reactive(__spreadValues$n({\n trigger,\n state: state2,\n length,\n origin\n }, refs));\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateText);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value)\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nvar __defProp$m = Object.defineProperty;\nvar __defProps$a = Object.defineProperties;\nvar __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$p = Object.getOwnPropertySymbols;\nvar __hasOwnProp$p = Object.prototype.hasOwnProperty;\nvar __propIsEnum$p = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$m = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$p.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n if (__getOwnPropSymbols$p)\n for (var prop of __getOwnPropSymbols$p(b)) {\n if (__propIsEnum$p.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n // watch options\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(toValue(source));\n }\n if (!manual && (isRef(source) || typeof source === \"function\")) {\n watch(source, sync, __spreadProps$a(__spreadValues$m({}, options), {\n deep,\n immediate\n }));\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n if (!(globalKey in _global))\n _global[globalKey] = _global[globalKey] || {};\n return _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nvar __defProp$l = Object.defineProperty;\nvar __getOwnPropSymbols$o = Object.getOwnPropertySymbols;\nvar __hasOwnProp$o = Object.prototype.hasOwnProperty;\nvar __propIsEnum$o = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$l = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$o.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n if (__getOwnPropSymbols$o)\n for (var prop of __getOwnPropSymbols$o(b)) {\n if (__propIsEnum$o.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n }\n return a;\n};\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const data = (shallow ? shallowRef : ref)(defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = toValue(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(\n data,\n () => write(data.value),\n { flush, deep, eventFilter }\n );\n if (window && listenToStorageChanges) {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n }\n update();\n return data;\n function write(v) {\n try {\n if (v == null) {\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n const oldValue = storage.getItem(key);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue: serialized,\n storageArea: storage\n }\n }));\n }\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit !== null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return __spreadValues$l(__spreadValues$l({}, rawInit), value);\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nvar __defProp$k = Object.defineProperty;\nvar __getOwnPropSymbols$n = Object.getOwnPropertySymbols;\nvar __hasOwnProp$n = Object.prototype.hasOwnProperty;\nvar __propIsEnum$n = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$k = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$n.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n if (__getOwnPropSymbols$n)\n for (var prop of __getOwnPropSymbols$n(b)) {\n if (__propIsEnum$n.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n }\n return a;\n};\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto,\n disableTransition = true\n } = options;\n const modes = __spreadValues$k({\n auto: \"\",\n light: \"light\",\n dark: \"dark\"\n }, options.modes || {});\n const preferredDark = usePreferredDark({ window });\n const system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed(\n () => store.value === \"auto\" ? system.value : store.value\n );\n const updateHTMLAttrs = getSSRHandler(\n \"updateHTMLAttrs\",\n (selector2, attribute2, value) => {\n const el = typeof selector2 === \"string\" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);\n if (!el)\n return;\n let style;\n if (disableTransition) {\n style = window.document.createElement(\"style\");\n const styleString = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\n style.appendChild(document.createTextNode(styleString));\n window.document.head.appendChild(style);\n }\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n if (disableTransition) {\n window.getComputedStyle(style).opacity;\n document.head.removeChild(style);\n }\n }\n );\n function defaultOnChanged(mode) {\n var _a;\n updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n tryOnMounted(() => onChanged(state.value));\n const auto = computed({\n get() {\n return emitAuto ? store.value : state.value;\n },\n set(v) {\n store.value = v;\n }\n });\n try {\n return Object.assign(auto, { store, system, state });\n } catch (e) {\n return auto;\n }\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nvar __getOwnPropSymbols$m = Object.getOwnPropertySymbols;\nvar __hasOwnProp$m = Object.prototype.hasOwnProperty;\nvar __propIsEnum$m = Object.prototype.propertyIsEnumerable;\nvar __objRest$3 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$m)\n for (var prop of __getOwnPropSymbols$m(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useMutationObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest$3(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(\n () => unrefElement(target),\n (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n },\n { immediate: true }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useCssVar(prop, target, options = {}) {\n const { window = defaultWindow, initialValue = \"\", observe = false } = options;\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n function updateCssVar() {\n var _a;\n const key = toValue(prop);\n const el = toValue(elRef);\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }\n if (observe) {\n useMutationObserver(elRef, updateCssVar, {\n attributeFilter: [\"style\", \"class\"],\n window\n });\n }\n watch(\n [elRef, () => toValue(prop)],\n updateCssVar,\n { immediate: true }\n );\n watch(\n variable,\n (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(toValue(prop), val);\n }\n );\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(\n () => null,\n () => vm.proxy.$el\n );\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n const state = shallowRef(getInitialValue());\n const listRef = toRef(list);\n const index = computed({\n get() {\n var _a;\n const targetList = listRef.value;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const targetList = listRef.value;\n const length = targetList.length;\n const index2 = (i % length + length) % length;\n const value = targetList[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n function getInitialValue() {\n var _a, _b;\n return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0;\n }\n watch(listRef, () => set(index.value));\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nvar __defProp$j = Object.defineProperty;\nvar __defProps$9 = Object.defineProperties;\nvar __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$l = Object.getOwnPropertySymbols;\nvar __hasOwnProp$l = Object.prototype.hasOwnProperty;\nvar __propIsEnum$l = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$j = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n if (__getOwnPropSymbols$l)\n for (var prop of __getOwnPropSymbols$l(b)) {\n if (__propIsEnum$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\"\n } = options;\n const mode = useColorMode(__spreadProps$9(__spreadValues$j({}, options), {\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\", defaultHandler, mode2);\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n }));\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n const modeVal = v ? \"dark\" : \"light\";\n if (mode.system.value === modeVal)\n mode.value = \"auto\";\n else\n mode.value = modeVal;\n }\n });\n return isDark;\n}\n\nfunction fnBypass(v) {\n return v;\n}\nfunction fnSetSource(source, value) {\n return source.value = value;\n}\nfunction defaultDump(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nvar __defProp$i = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$k = Object.getOwnPropertySymbols;\nvar __hasOwnProp$k = Object.prototype.hasOwnProperty;\nvar __propIsEnum$k = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$i = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n if (__getOwnPropSymbols$k)\n for (var prop of __getOwnPropSymbols$k(b)) {\n if (__propIsEnum$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(\n source,\n commit,\n { deep, flush, eventFilter: composedFilter }\n );\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, __spreadProps$8(__spreadValues$i({}, options), { clone: options.clone || deep, setSource }));\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return __spreadProps$8(__spreadValues$i({}, manualHistory), {\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n });\n}\n\nvar __defProp$h = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$j = Object.getOwnPropertySymbols;\nvar __hasOwnProp$j = Object.prototype.hasOwnProperty;\nvar __propIsEnum$j = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$h = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n if (__getOwnPropSymbols$j)\n for (var prop of __getOwnPropSymbols$j(b)) {\n if (__propIsEnum$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, __spreadProps$7(__spreadValues$h({}, options), { eventFilter: filter }));\n return __spreadValues$h({}, history);\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(\n eventFilter,\n (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n }\n );\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio({\n window = defaultWindow\n} = {}) {\n const pixelRatio = ref(1);\n if (window) {\n let observe = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe, { once: true });\n }, cleanup = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe);\n };\n let media;\n observe();\n tryOnScopeDispose(cleanup);\n }\n return { pixelRatio };\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n let stream;\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n if (stream) {\n stream.getTracks().forEach((t) => t.stop());\n stream = null;\n }\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n stream = await navigator.mediaDevices.getUserMedia(constraints);\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility({ document = defaultDocument } = {}) {\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nvar __defProp$g = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$i = Object.getOwnPropertySymbols;\nvar __hasOwnProp$i = Object.prototype.hasOwnProperty;\nvar __propIsEnum$i = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$g = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n if (__getOwnPropSymbols$i)\n for (var prop of __getOwnPropSymbols$i(b)) {\n if (__propIsEnum$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction useDraggable(target, options = {}) {\n var _a, _b;\n const {\n pointerTypes,\n preventDefault,\n stopPropagation,\n exact,\n onMove,\n onEnd,\n onStart,\n initialValue,\n axis = \"both\",\n draggingElement = defaultWindow,\n handle: draggingHandle = target\n } = options;\n const position = ref(\n (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }\n );\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (pointerTypes)\n return pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (toValue(preventDefault))\n e.preventDefault();\n if (toValue(stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n if (!filterEvent(e))\n return;\n if (toValue(exact) && e.target !== toValue(target))\n return;\n const rect = toValue(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - rect.left,\n y: e.clientY - rect.top\n };\n if ((onStart == null ? void 0 : onStart(pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n let { x, y } = position.value;\n if (axis === \"x\" || axis === \"both\")\n x = e.clientX - pressedDelta.value.x;\n if (axis === \"y\" || axis === \"both\")\n y = e.clientY - pressedDelta.value.y;\n position.value = {\n x,\n y\n };\n onMove == null ? void 0 : onMove(position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n onEnd == null ? void 0 : onEnd(position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n const config = { capture: (_b = options.capture) != null ? _b : true };\n useEventListener(draggingHandle, \"pointerdown\", start, config);\n useEventListener(draggingElement, \"pointermove\", move, config);\n useEventListener(draggingElement, \"pointerup\", end, config);\n }\n return __spreadProps$6(__spreadValues$g({}, toRefs(position)), {\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(\n () => `left:${position.value.x}px;top:${position.value.y}px;`\n )\n });\n}\n\nfunction useDropZone(target, options = {}) {\n const isOverDropZone = ref(false);\n const files = shallowRef(null);\n let counter = 0;\n if (isClient) {\n const _options = typeof options === \"function\" ? { onDrop: options } : options;\n const getFiles = (event) => {\n var _a, _b;\n const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n return files.value = list.length === 0 ? null : list;\n };\n useEventListener(target, \"dragenter\", (event) => {\n var _a;\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n (_a = _options.onEnter) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragover\", (event) => {\n var _a;\n event.preventDefault();\n (_a = _options.onOver) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragleave\", (event) => {\n var _a;\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n (_a = _options.onLeave) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"drop\", (event) => {\n var _a;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n (_a = _options.onDrop) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n }\n return {\n files,\n isOverDropZone\n };\n}\n\nvar __getOwnPropSymbols$h = Object.getOwnPropertySymbols;\nvar __hasOwnProp$h = Object.prototype.hasOwnProperty;\nvar __propIsEnum$h = Object.prototype.propertyIsEnumerable;\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$h)\n for (var prop of __getOwnPropSymbols$h(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useResizeObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$2(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(\n () => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]\n );\n const stopWatch = watch(\n targets,\n (els) => {\n cleanup();\n if (isSupported.value && window) {\n observer = new ResizeObserver(callback);\n for (const _el of els)\n _el && observer.observe(_el, observerOptions);\n }\n },\n { immediate: true, flush: \"post\", deep: true }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nvar __defProp$f = Object.defineProperty;\nvar __getOwnPropSymbols$g = Object.getOwnPropertySymbols;\nvar __hasOwnProp$g = Object.prototype.hasOwnProperty;\nvar __propIsEnum$g = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$f = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$g.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n if (__getOwnPropSymbols$g)\n for (var prop of __getOwnPropSymbols$g(b)) {\n if (__propIsEnum$g.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n }\n return a;\n};\nfunction useElementByPoint(options) {\n const {\n x,\n y,\n document = defaultDocument,\n multiple,\n interval = \"requestAnimationFrame\",\n immediate = true\n } = options;\n const isSupported = useSupported(() => {\n if (toValue(multiple))\n return document && \"elementsFromPoint\" in document;\n return document && \"elementFromPoint\" in document;\n });\n const element = ref(null);\n const cb = () => {\n var _a, _b;\n element.value = toValue(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null;\n };\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n return __spreadValues$f({\n isSupported,\n element\n }, controls);\n}\n\nfunction useElementHover(el, options = {}) {\n const {\n delayEnter = 0,\n delayLeave = 0,\n window = defaultWindow\n } = options;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n useResizeObserver(\n target,\n ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const styles = window.getComputedStyle($elem);\n width.value = Number.parseFloat(styles.width);\n height.value = Number.parseFloat(styles.height);\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n },\n options\n );\n watch(\n () => unrefElement(target),\n (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n }\n );\n return {\n width,\n height\n };\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow,\n immediate = true\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n const targets = computed(() => {\n const _target = toValue(target);\n return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);\n });\n let cleanup = noop;\n const isActive = ref(immediate);\n const stopWatch = isSupported.value ? watch(\n () => [targets.value, unrefElement(root), isActive.value],\n ([targets2, root2]) => {\n cleanup();\n if (!isActive.value)\n return;\n if (!targets2.length)\n return;\n const observer = new IntersectionObserver(\n callback,\n {\n root: unrefElement(root2),\n rootMargin,\n threshold\n }\n );\n targets2.forEach((el) => el && observer.observe(el));\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n },\n { immediate, flush: \"post\" }\n ) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n isActive.value = false;\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n isActive,\n pause() {\n cleanup();\n isActive.value = false;\n },\n resume() {\n isActive.value = true;\n },\n stop\n };\n}\n\nfunction useElementVisibility(element, { window = defaultWindow, scrollTarget } = {}) {\n const elementIsVisible = ref(false);\n useIntersectionObserver(\n element,\n ([{ isIntersecting }]) => {\n elementIsVisible.value = isIntersecting;\n },\n {\n root: scrollTarget,\n window\n }\n );\n return elementIsVisible;\n}\n\nconst events = /* @__PURE__ */ new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || /* @__PURE__ */ new Set();\n listeners.add(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n listeners.delete(listener);\n if (!listeners.size)\n reset();\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = shallowRef(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = toRef(newIcon);\n const applyIcon = (icon) => {\n document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`).forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(\n favicon,\n (i, o) => {\n if (typeof i === \"string\" && i !== o)\n applyIcon(i);\n },\n { immediate: true }\n );\n return favicon;\n}\n\nvar __defProp$e = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$f = Object.getOwnPropertySymbols;\nvar __hasOwnProp$f = Object.prototype.hasOwnProperty;\nvar __propIsEnum$f = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$e = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n if (__getOwnPropSymbols$f)\n for (var prop of __getOwnPropSymbols$f(b)) {\n if (__propIsEnum$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\");\n}\nfunction isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback)\n return __spreadValues$e(__spreadValues$e({}, ctx), await callback(ctx));\n return ctx;\n };\n } else {\n return async (ctx) => {\n for (const callback of callbacks) {\n if (callback)\n ctx = __spreadValues$e(__spreadValues$e({}, ctx), await callback(ctx));\n }\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = toValue(config.baseUrl);\n const targetUrl = toValue(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = __spreadProps$5(__spreadValues$e(__spreadValues$e({}, options), args[0]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n });\n } else {\n fetchOptions = __spreadProps$5(__spreadValues$e(__spreadValues$e({}, fetchOptions), args[0]), {\n headers: __spreadValues$e(__spreadValues$e({}, headersToObject(fetchOptions.headers) || {}), headersToObject(args[0].headers) || {})\n });\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = __spreadProps$5(__spreadValues$e(__spreadValues$e({}, options), args[1]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n });\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = { immediate: true, refetch: false, timeout: 0 };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = __spreadValues$e(__spreadValues$e({}, options), args[0]);\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = __spreadValues$e(__spreadValues$e({}, options), args[1]);\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData || null);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort) {\n controller == null ? void 0 : controller.abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = __spreadProps$5(__spreadValues$e({}, fetchOptions), {\n signal: controller.signal\n });\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n const execute = async (throwOnFailed = false) => {\n var _a2;\n abort();\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n const payload = toValue(config.payload);\n if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData))\n config.payloadType = \"json\";\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: toValue(url),\n options: __spreadValues$e(__spreadValues$e({}, defaultFetchOptions), fetchOptions),\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return new Promise((resolve, reject) => {\n var _a3;\n fetch(\n context.url,\n __spreadProps$5(__spreadValues$e(__spreadValues$e({}, defaultFetchOptions), context.options), {\n headers: __spreadValues$e(__spreadValues$e({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))\n })\n ).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse[config.type]();\n if (!fetchResponse.ok) {\n data.value = initialData || null;\n throw new Error(fetchResponse.statusText);\n }\n if (options.afterFetch)\n ({ data: responseData } = await options.afterFetch({ data: responseData, response: fetchResponse }));\n data.value = responseData;\n responseEvent.trigger(fetchResponse);\n return resolve(fetchResponse);\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError)\n ({ error: errorData } = await options.onFetchError({ data: responseData, error: fetchError, response: response.value }));\n error.value = errorData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n return reject(fetchError);\n return resolve(null);\n }).finally(() => {\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n });\n };\n const refetch = toRef(options.refetch);\n watch(\n [\n refetch,\n toRef(url)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n // method\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n // type\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch(\n [\n refetch,\n toRef(config.payload)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n }\n return __spreadProps$5(__spreadValues$e({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return __spreadProps$5(__spreadValues$e({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n if (options.immediate)\n Promise.resolve().then(() => execute());\n return __spreadProps$5(__spreadValues$e({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nvar __defProp$d = Object.defineProperty;\nvar __getOwnPropSymbols$e = Object.getOwnPropertySymbols;\nvar __hasOwnProp$e = Object.prototype.hasOwnProperty;\nvar __propIsEnum$e = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$d = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n if (__getOwnPropSymbols$e)\n for (var prop of __getOwnPropSymbols$e(b)) {\n if (__propIsEnum$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n }\n return a;\n};\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\",\n reset: false\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n const { on: onChange, trigger } = createEventHook();\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n trigger(files.value);\n };\n }\n const reset = () => {\n files.value = null;\n if (input)\n input.value = \"\";\n };\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = __spreadValues$d(__spreadValues$d(__spreadValues$d({}, DEFAULT_OPTIONS), options), localOptions);\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n if (_options.reset)\n reset();\n input.click();\n };\n return {\n files: readonly(files),\n open,\n reset,\n onChange\n };\n}\n\nvar __defProp$c = Object.defineProperty;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$c = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n if (__getOwnPropSymbols$d)\n for (var prop of __getOwnPropSymbols$d(b)) {\n if (__propIsEnum$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n }\n return a;\n};\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = options;\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker(__spreadValues$c(__spreadValues$c({}, toValue(options)), _options));\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$c(__spreadValues$c({}, options), _options));\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$c(__spreadValues$c({}, options), _options));\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n const type = toValue(dataType);\n if (type === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n else if (type === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n else if (type === \"Blob\")\n data.value = file.value;\n }\n watch(() => toValue(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false, focusVisible = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", (event) => {\n var _a, _b;\n if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, \":focus-visible\")))\n innerFocused.value = true;\n });\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(\n targetElement,\n () => {\n focused.value = initialValue;\n },\n { immediate: true, flush: \"post\" }\n );\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst eventHandlers = [\n \"fullscreenchange\",\n \"webkitfullscreenchange\",\n \"webkitendfullscreen\",\n \"mozfullscreenchange\",\n \"MSFullscreenChange\"\n];\nfunction useFullscreen(target, options = {}) {\n const {\n document = defaultDocument,\n autoExit = false\n } = options;\n const targetRef = computed(() => {\n var _a;\n return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector(\"html\");\n });\n const isFullscreen = ref(false);\n const requestMethod = computed(() => {\n return [\n \"requestFullscreen\",\n \"webkitRequestFullscreen\",\n \"webkitEnterFullscreen\",\n \"webkitEnterFullScreen\",\n \"webkitRequestFullScreen\",\n \"mozRequestFullScreen\",\n \"msRequestFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const exitMethod = computed(() => {\n return [\n \"exitFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitExitFullScreen\",\n \"webkitCancelFullScreen\",\n \"mozCancelFullScreen\",\n \"msExitFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenEnabled = computed(() => {\n return [\n \"fullScreen\",\n \"webkitIsFullScreen\",\n \"webkitDisplayingFullscreen\",\n \"mozFullScreen\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenElementMethod = [\n \"fullscreenElement\",\n \"webkitFullscreenElement\",\n \"mozFullScreenElement\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document);\n const isSupported = useSupported(\n () => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0\n );\n const isCurrentElementFullScreen = () => {\n if (fullscreenElementMethod)\n return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n return false;\n };\n const isElementFullScreen = () => {\n if (fullscreenEnabled.value) {\n if (document && document[fullscreenEnabled.value] != null) {\n return document[fullscreenEnabled.value];\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {\n return Boolean(target2[fullscreenEnabled.value]);\n }\n }\n }\n return false;\n };\n async function exit() {\n if (!isSupported.value || !isFullscreen.value)\n return;\n if (exitMethod.value) {\n if ((document == null ? void 0 : document[exitMethod.value]) != null) {\n await document[exitMethod.value]();\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[exitMethod.value]) != null)\n await target2[exitMethod.value]();\n }\n }\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value || isFullscreen.value)\n return;\n if (isElementFullScreen())\n await exit();\n const target2 = targetRef.value;\n if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) {\n await target2[requestMethod.value]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n await (isFullscreen.value ? exit() : enter());\n }\n const handlerCallback = () => {\n const isElementFullScreenValue = isElementFullScreen();\n if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen())\n isFullscreen.value = isElementFullScreenValue;\n };\n useEventListener(document, eventHandlers, handlerCallback, false);\n useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false);\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nvar __defProp$b = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n if (__getOwnPropSymbols$c)\n for (var prop of __getOwnPropSymbols$c(b)) {\n if (__propIsEnum$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return __spreadProps$4(__spreadValues$b({}, gamepad), {\n id: gamepad.id,\n hapticActuators,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n });\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = shallowRef(null);\n const coords = ref({\n accuracy: 0,\n latitude: Number.POSITIVE_INFINITY,\n longitude: Number.POSITIVE_INFINITY,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(\n updatePosition,\n (err) => error.value = err,\n {\n enableHighAccuracy,\n maximumAge,\n timeout\n }\n );\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const reset = () => {\n idle.value = false;\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n };\n const onEvent = createFilterWrapper(\n eventFilter,\n () => {\n lastActive.value = timestamp();\n reset();\n }\n );\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n reset();\n }\n return {\n idle,\n lastActive,\n reset\n };\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n }\n return a;\n};\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n if (clazz)\n img.className = clazz;\n if (loading)\n img.loading = loading;\n if (crossorigin)\n img.crossOrigin = crossorigin;\n if (referrerPolicy)\n img.referrerPolicy = referrerPolicy;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nfunction useImage(options, asyncStateOptions = {}) {\n const state = useAsyncState(\n () => loadImage(toValue(options)),\n void 0,\n __spreadValues$a({\n resetOnExecute: true\n }, asyncStateOptions)\n );\n watch(\n () => toValue(options),\n () => state.execute(asyncStateOptions.delay),\n { deep: true }\n );\n return state;\n}\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\",\n window = defaultWindow\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c;\n if (!window)\n return;\n const _element = toValue(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = toValue(_y)) != null ? _a : y.value,\n left: (_b = toValue(_x)) != null ? _b : x.value,\n behavior: toValue(behavior)\n });\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const setArrivedState = (target) => {\n if (!window)\n return;\n const el = target === window ? target.document.documentElement : target === window.document ? target.documentElement : target;\n const { display, flexDirection } = getComputedStyle(el);\n const scrollLeft = el.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalX.value;\n const left = Math.abs(scrollLeft) <= 0 + (offset.left || 0);\n const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"row-reverse\") {\n arrivedState.left = right;\n arrivedState.right = left;\n } else {\n arrivedState.left = left;\n arrivedState.right = right;\n }\n internalX.value = scrollLeft;\n let scrollTop = el.scrollTop;\n if (target === window.document && !scrollTop)\n scrollTop = window.document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n const top = Math.abs(scrollTop) <= 0 + (offset.top || 0);\n const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"column-reverse\") {\n arrivedState.top = bottom;\n arrivedState.bottom = top;\n } else {\n arrivedState.top = top;\n arrivedState.bottom = bottom;\n }\n internalY.value = scrollTop;\n };\n const onScrollHandler = (e) => {\n if (!window)\n return;\n const eventTarget = e.target === window.document ? e.target.documentElement : e.target;\n setArrivedState(eventTarget);\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(\n element,\n \"scroll\",\n throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,\n eventListenerOptions\n );\n useEventListener(\n element,\n \"scrollend\",\n onScrollEnd,\n eventListenerOptions\n );\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions,\n measure() {\n const _element = toValue(element);\n if (window && _element)\n setArrivedState(_element);\n }\n };\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a;\n const {\n direction = \"bottom\",\n interval = 100\n } = options;\n const state = reactive(useScroll(\n element,\n __spreadProps$3(__spreadValues$9({}, options), {\n offset: __spreadValues$9({\n [direction]: (_a = options.distance) != null ? _a : 0\n }, options.offset)\n })\n ));\n const promise = ref();\n const isLoading = computed(() => !!promise.value);\n const observedElement = computed(() => {\n const el = toValue(element);\n if (el instanceof Window)\n return window.document.documentElement;\n if (el instanceof Document)\n return document.documentElement;\n return el;\n });\n const isElementVisible = useElementVisibility(observedElement);\n function checkAndLoad() {\n state.measure();\n if (!observedElement.value || !isElementVisible.value)\n return;\n const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n const isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n if (state.arrivedState[direction] || isNarrower) {\n if (!promise.value) {\n promise.value = Promise.all([\n onLoadMore(state),\n new Promise((resolve) => setTimeout(resolve, interval))\n ]).finally(() => {\n promise.value = null;\n nextTick(() => checkAndLoad());\n });\n }\n }\n }\n watch(\n () => [state.arrivedState[direction], isElementVisible.value],\n checkAndLoad,\n { immediate: true }\n );\n return {\n isLoading\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(/* @__PURE__ */ new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = /* @__PURE__ */ new Set();\n const usedKeys = /* @__PURE__ */ new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(\n refs,\n {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => toValue(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? toValue(r) : r;\n }\n }\n );\n return proxy;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction usingElRef(source, cb) {\n if (toValue(source))\n cb(toValue(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = __spreadValues$8(__spreadValues$8({}, defaultOptions), options);\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = typeof track === \"number\" ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = typeof track === \"number\" ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = toValue(target);\n if (!el)\n return;\n const src = toValue(options.src);\n let sources = [];\n if (!src)\n return;\n if (typeof src === \"string\")\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = toValue(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch([target, volume], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.volume = volume.value;\n });\n watch([target, muted], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.muted = muted.value;\n });\n watch([target, rate], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.playbackRate = rate.value;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = toValue(options.tracks);\n const el = toValue(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = toValue(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = toValue(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, [\"waiting\", \"loadstart\"], () => {\n waiting.value = true;\n ignorePlayingUpdates(() => playing.value = false);\n });\n useEventListener(target, \"loadeddata\", () => waiting.value = false);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n ignorePlayingUpdates(() => playing.value = true);\n });\n useEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = toValue(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = toValue(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n // Volume\n volume,\n muted,\n // Tracks\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n // Picture in Picture\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n // Events\n onSourceError: sourceErrorEvent.on\n };\n}\n\nfunction getMapVue2Compat() {\n const data = reactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n}\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return reactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return reactive(/* @__PURE__ */ new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nconst BuiltinExtractors = {\n page: (event) => [event.pageX, event.pageY],\n client: (event) => [event.clientX, event.clientY],\n screen: (event) => [event.screenX, event.screenY],\n movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY]\n};\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n target = window,\n eventFilter\n } = options;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const extractor = typeof type === \"function\" ? type : BuiltinExtractors[type];\n const mouseHandler = (event) => {\n const result = extractor(event);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"mouse\";\n }\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const result = extractor(event.touches[0]);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"touch\";\n }\n }\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n if (touch && type !== \"movement\") {\n useEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n if (resetOnTouchEnds)\n useEventListener(target, \"touchend\", reset, listenerOptions);\n }\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch(\n [targetRef, x, y],\n () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + window.pageXOffset;\n elementPositionY.value = top + window.pageYOffset;\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n },\n { immediate: true }\n );\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true });\n useEventListener(window, \"mouseup\", onReleased, { passive: true });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"drop\", onReleased, { passive: true });\n useEventListener(window, \"dragend\", onReleased, { passive: true });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true });\n useEventListener(window, \"touchend\", onReleased, { passive: true });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nfunction useNavigatorLanguage(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n}\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$8.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(b)) {\n if (__propIsEnum$8.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(/* @__PURE__ */ new Date());\n const update = () => now.value = /* @__PURE__ */ new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return __spreadValues$7({\n now\n }, controls);\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(\n () => toValue(object),\n (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n },\n { immediate: true }\n );\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (typeof value === \"function\" || isReadonly(value))\n return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, toValue(min), toValue(max));\n },\n set(value2) {\n _value.value = clamp(value2, toValue(min), toValue(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Number.POSITIVE_INFINITY,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n const pageCount = computed(() => Math.max(\n 1,\n Math.ceil(toValue(total) / toValue(currentPageSize))\n ));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page))\n syncRef(page, currentPage);\n if (isRef(pageSize))\n syncRef(pageSize, currentPageSize);\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nfunction useParentElement(element = useCurrentElement()) {\n const parentElement = shallowRef();\n const update = () => {\n const el = unrefElement(element);\n if (el)\n parentElement.value = el.parentElement;\n };\n tryOnMounted(update);\n watch(() => toValue(element), update);\n return parentElement;\n}\n\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction usePerformanceObserver(options, callback) {\n const _a = options, {\n window = defaultWindow,\n immediate = true\n } = _a, performanceOptions = __objRest$1(_a, [\n \"window\",\n \"immediate\"\n ]);\n const isSupported = useSupported(() => window && \"PerformanceObserver\" in window);\n let observer;\n const stop = () => {\n observer == null ? void 0 : observer.disconnect();\n };\n const start = () => {\n if (isSupported.value) {\n stop();\n observer = new PerformanceObserver(callback);\n observer.observe(performanceOptions);\n }\n };\n tryOnScopeDispose(stop);\n if (immediate)\n start();\n return {\n isSupported,\n start,\n stop\n };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(b)) {\n if (__propIsEnum$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"pointerdown\", \"pointermove\", \"pointerup\"], handler, listenerOptions);\n useEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n }\n return __spreadProps$2(__spreadValues$6({}, toRefs(state)), {\n isInside\n });\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument, pointerLockOptions } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e, options2) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = toRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? \"left\" : \"right\";\n } else {\n return distanceY.value > 0 ? \"up\" : \"down\";\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"initial\");\n })\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(\n toRef(value),\n (_, oldValue) => {\n previous.value = oldValue;\n },\n { flush: \"sync\" }\n );\n return readonly(previous);\n}\n\nfunction useScreenOrientation(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (!isSupported.value)\n return Promise.reject(new Error(\"Not supported\"));\n return screenOrientation.lock(type);\n };\n const unlockOrientation = () => {\n if (isSupported.value)\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n}\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = toValue(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(toRef(element), (el) => {\n if (el) {\n const ele = el;\n initialOverflow = ele.style.overflow;\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const ele = toValue(element);\n if (!ele || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(\n ele,\n \"touchmove\",\n (e) => {\n preventDefault(e);\n },\n { passive: false }\n );\n }\n ele.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const ele = toValue(element);\n if (!ele || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n ele.style.overflow = initialOverflow;\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(b)) {\n if (__propIsEnum$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = __spreadValues$5(__spreadValues$5({}, toValue(shareOptions)), toValue(overrideOptions));\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...toValue(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(toValue(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = toRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = toValue(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = toValue(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = toRef(text || \"\");\n const lang = toRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = toValue(lang);\n utterance2.voice = toValue(options.voice) || null;\n utterance2.pitch = toValue(pitch);\n utterance2.rate = toValue(rate);\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = toValue(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = __spreadValues$4(__spreadValues$4({}, rawInit), value);\n else\n data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)));\n if (storage) {\n watchWithFilter(\n data,\n async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n },\n {\n flush,\n deep,\n eventFilter\n }\n );\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(\n cssRef,\n (value) => {\n el.textContent = value;\n },\n { immediate: true }\n );\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? \"left\" : \"right\";\n } else {\n return diffY.value > 0 ? \"up\" : \"down\";\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (e.touches.length !== 1)\n return;\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n if (e.touches.length !== 1)\n return;\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(\n document.querySelector(selector),\n () => dir.value = getValue(),\n { attributes: true }\n );\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n const textareaScrollHeight = ref(1);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n let height = \"\";\n textarea.value.style.height = \"1px\";\n textareaScrollHeight.value = (_a = textarea.value) == null ? void 0 : _a.scrollHeight;\n if (options == null ? void 0 : options.styleTarget)\n toValue(options.styleTarget).style.height = `${textareaScrollHeight.value}px`;\n else\n height = `${textareaScrollHeight.value}px`;\n textarea.value.style.height = height;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, __spreadProps$1(__spreadValues$3({}, options), { eventFilter: filter }));\n return __spreadValues$3({}, history);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Number.POSITIVE_INFINITY, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n return date.toISOString().slice(0, 10);\n}\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const _a = useNow({ interval: updateInterval, controls: true }), { now } = _a, controls = __objRest(_a, [\"now\"]);\n const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n if (exposeControls) {\n return __spreadValues$2({\n timeAgo\n }, controls);\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval, { immediate: false });\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$1({\n timestamp: ts\n }, controls);\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b;\n const {\n document = defaultDocument\n } = options;\n const title = toRef((_a = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _a : null);\n const isReadonly = newTitle && typeof newTitle === \"function\";\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n }\n watch(\n title,\n (t, o) => {\n if (t !== o && document)\n document.title = format(typeof t === \"string\" ? t : \"\");\n },\n { immediate: true }\n );\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver(\n (_b = document.head) == null ? void 0 : _b.querySelector(\"title\"),\n () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n },\n { childList: true }\n );\n }\n return title;\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n return a + alpha * (b - a);\n}\nfunction toVec(t) {\n return (typeof t === \"number\" ? [t] : t) || [];\n}\nfunction executeTransition(source, from, to, options = {}) {\n var _a, _b;\n const fromVal = toValue(from);\n const toVal = toValue(to);\n const v1 = toVec(fromVal);\n const v2 = toVec(toVal);\n const duration = (_a = toValue(options.duration)) != null ? _a : 1e3;\n const startedAt = Date.now();\n const endAt = Date.now() + duration;\n const trans = typeof options.transition === \"function\" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity;\n const ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n return new Promise((resolve) => {\n source.value = fromVal;\n const tick = () => {\n var _a2;\n if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) {\n resolve();\n return;\n }\n const now = Date.now();\n const alpha = ease((now - startedAt) / duration);\n const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha));\n if (Array.isArray(source.value))\n source.value = arr.map((n, i) => {\n var _a3, _b2;\n return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha);\n });\n else if (typeof source.value === \"number\")\n source.value = arr[0];\n if (now < endAt) {\n requestAnimationFrame(tick);\n } else {\n source.value = toVal;\n resolve();\n }\n };\n tick();\n });\n}\nfunction useTransition(source, options = {}) {\n let currentId = 0;\n const sourceVal = () => {\n const v = toValue(source);\n return typeof v === \"number\" ? v : v.map(toValue);\n };\n const outputRef = ref(sourceVal());\n watch(sourceVal, async (to) => {\n var _a, _b;\n if (toValue(options.disabled))\n return;\n const id = ++currentId;\n if (options.delay)\n await promiseTimeout(toValue(options.delay));\n if (id !== currentId)\n return;\n const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to);\n (_a = options.onStarted) == null ? void 0 : _a.call(options);\n await executeTransition(outputRef, outputRef.value, toVal, __spreadProps(__spreadValues({}, options), {\n abort: () => {\n var _a2;\n return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options));\n }\n }));\n (_b = options.onFinished) == null ? void 0 : _b.call(options);\n }, { deep: true });\n watch(() => toValue(options.disabled), (disabled) => {\n if (disabled) {\n currentId++;\n outputRef.value = sourceVal();\n }\n });\n tryOnScopeDispose(() => {\n currentId++;\n });\n return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(\n state,\n () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n },\n { deep: true }\n );\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(\n window.history.state,\n window.document.title,\n window.location.pathname + constructQuery(params)\n );\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const constraints = ref(options.constraints);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(type) {\n switch (type) {\n case \"video\": {\n if (constraints.value)\n return constraints.value.video || false;\n break;\n }\n case \"audio\": {\n if (constraints.value)\n return constraints.value.audio || false;\n break;\n }\n }\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(\"video\"),\n audio: getDeviceOptions(\"audio\")\n });\n return stream.value;\n }\n function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n watch(\n constraints,\n () => {\n if (autoSwitch.value && stream.value)\n restart();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n constraints,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue,\n shouldEmit\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n const triggerEmit = (value) => {\n if (shouldEmit) {\n if (shouldEmit(value))\n _emit(event, value);\n } else {\n _emit(event, value);\n }\n };\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n watch(\n () => props[key],\n (v) => proxy.value = cloneFn(v)\n );\n watch(\n proxy,\n (v) => {\n if (v !== props[key] || deep)\n triggerEmit(v);\n },\n { deep }\n );\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n triggerEmit(value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props)\n ret[key] = useVModel(props, key, emit, options);\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = toRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(\n vibrate,\n interval,\n {\n immediate: false,\n immediateCallback: false\n }\n );\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nfunction useWakeLock(options = {}) {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n}\n\nfunction useWebNotification(defaultOptions = {}) {\n const {\n window = defaultWindow\n } = defaultOptions;\n const isSupported = useSupported(() => !!window && \"Notification\" in window);\n const notification = ref(null);\n const requestPermission = async () => {\n if (!isSupported.value)\n return;\n if (\"permission\" in Notification && Notification.permission !== \"denied\")\n await Notification.requestPermission();\n };\n const { on: onClick, trigger: clickTrigger } = createEventHook();\n const { on: onShow, trigger: showTrigger } = createEventHook();\n const { on: onError, trigger: errorTrigger } = createEventHook();\n const { on: onClose, trigger: closeTrigger } = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value)\n return;\n await requestPermission();\n const options = Object.assign({}, defaultOptions, overrides);\n notification.value = new Notification(options.title || \"\", options);\n notification.value.onclick = clickTrigger;\n notification.value.onshow = showTrigger;\n notification.value.onerror = errorTrigger;\n notification.value.onclose = closeTrigger;\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n tryOnMounted(async () => {\n if (isSupported.value)\n await requestPermission();\n });\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n}\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = toRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const close = (code = 1e3, reason) => {\n if (!wsRef.value)\n return;\n explicitlyClosed = true;\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(\n () => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n }, pongTimeout);\n },\n interval,\n { immediate: false }\n );\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n useEventListener(window, \"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = (...args) => {\n if (!worker.value)\n return;\n worker.value.postMessage(...args);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (typeof arg0 === \"string\")\n worker.value = new Worker(arg0, workerOptions);\n else if (typeof arg0 === \"function\")\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nfunction jobRunner(userFunc) {\n return (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n };\n}\n\nfunction depsParser(deps) {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n}\n\nfunction createWorkerBlobUrl(fn, deps) {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n}\n\nfunction useWebWorkerFn(fn, options = {}) {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(\n () => workerTerminate(\"TIMEOUT_EXPIRED\"),\n timeout\n );\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\n \"[useWebWorkerFn] You can only run one instance of the worker at a time.\"\n );\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n}\n\nfunction useWindowFocus({ window = defaultWindow } = {}) {\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll({ window = defaultWindow } = {}) {\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const x = ref(window.scrollX);\n const y = ref(window.scrollY);\n useEventListener(\n window,\n \"scroll\",\n () => {\n x.value = window.scrollX;\n y.value = window.scrollY;\n },\n {\n capture: false,\n passive: true\n }\n );\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Number.POSITIVE_INFINITY,\n initialHeight = Number.POSITIVE_INFINITY,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation) {\n const matches = useMediaQuery(\"(orientation: portrait)\");\n watch(matches, () => update());\n }\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","// Copyright (c) 2014 Rafael Caricio. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar GradientParser = (GradientParser || {});\n\nGradientParser.stringify = (function() {\n\n var visitor = {\n\n 'visit_linear-gradient': function(node) {\n return visitor.visit_gradient(node);\n },\n\n 'visit_repeating-linear-gradient': function(node) {\n return visitor.visit_gradient(node);\n },\n\n 'visit_radial-gradient': function(node) {\n return visitor.visit_gradient(node);\n },\n\n 'visit_repeating-radial-gradient': function(node) {\n return visitor.visit_gradient(node);\n },\n\n 'visit_gradient': function(node) {\n var orientation = visitor.visit(node.orientation);\n if (orientation) {\n orientation += ', ';\n }\n\n return node.type + '(' + orientation + visitor.visit(node.colorStops) + ')';\n },\n\n 'visit_shape': function(node) {\n var result = node.value,\n at = visitor.visit(node.at),\n style = visitor.visit(node.style);\n\n if (style) {\n result += ' ' + style;\n }\n\n if (at) {\n result += ' at ' + at;\n }\n\n return result;\n },\n\n 'visit_default-radial': function(node) {\n var result = '',\n at = visitor.visit(node.at);\n\n if (at) {\n result += at;\n }\n return result;\n },\n\n 'visit_extent-keyword': function(node) {\n var result = node.value,\n at = visitor.visit(node.at);\n\n if (at) {\n result += ' at ' + at;\n }\n\n return result;\n },\n\n 'visit_position-keyword': function(node) {\n return node.value;\n },\n\n 'visit_position': function(node) {\n return visitor.visit(node.value.x) + ' ' + visitor.visit(node.value.y);\n },\n\n 'visit_%': function(node) {\n return node.value + '%';\n },\n\n 'visit_em': function(node) {\n return node.value + 'em';\n },\n\n 'visit_px': function(node) {\n return node.value + 'px';\n },\n\n 'visit_literal': function(node) {\n return visitor.visit_color(node.value, node);\n },\n\n 'visit_hex': function(node) {\n return visitor.visit_color('#' + node.value, node);\n },\n\n 'visit_rgb': function(node) {\n return visitor.visit_color('rgb(' + node.value.join(', ') + ')', node);\n },\n\n 'visit_rgba': function(node) {\n return visitor.visit_color('rgba(' + node.value.join(', ') + ')', node);\n },\n\n 'visit_color': function(resultColor, node) {\n var result = resultColor,\n length = visitor.visit(node.length);\n\n if (length) {\n result += ' ' + length;\n }\n return result;\n },\n\n 'visit_angular': function(node) {\n return node.value + 'deg';\n },\n\n 'visit_directional': function(node) {\n return 'to ' + node.value;\n },\n\n 'visit_array': function(elements) {\n var result = '',\n size = elements.length;\n\n elements.forEach(function(element, i) {\n result += visitor.visit(element);\n if (i < size - 1) {\n result += ', ';\n }\n });\n\n return result;\n },\n\n 'visit': function(element) {\n if (!element) {\n return '';\n }\n var result = '';\n\n if (element instanceof Array) {\n return visitor.visit_array(element, result);\n } else if (element.type) {\n var nodeVisitor = visitor['visit_' + element.type];\n if (nodeVisitor) {\n return nodeVisitor(element);\n } else {\n throw Error('Missing visitor visit_' + element.type);\n }\n } else {\n throw Error('Invalid node.');\n }\n }\n\n };\n\n return function(root) {\n return visitor.visit(root);\n };\n})();\n\n// Copyright (c) 2014 Rafael Caricio. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar GradientParser = (GradientParser || {});\n\nGradientParser.parse = (function() {\n\n var tokens = {\n linearGradient: /^(\\-(webkit|o|ms|moz)\\-)?(linear\\-gradient)/i,\n repeatingLinearGradient: /^(\\-(webkit|o|ms|moz)\\-)?(repeating\\-linear\\-gradient)/i,\n radialGradient: /^(\\-(webkit|o|ms|moz)\\-)?(radial\\-gradient)/i,\n repeatingRadialGradient: /^(\\-(webkit|o|ms|moz)\\-)?(repeating\\-radial\\-gradient)/i,\n sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,\n extentKeywords: /^(closest\\-side|closest\\-corner|farthest\\-side|farthest\\-corner|contain|cover)/,\n positionKeywords: /^(left|center|right|top|bottom)/i,\n pixelValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))px/,\n percentageValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))\\%/,\n emValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))em/,\n angleValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))deg/,\n startCall: /^\\(/,\n endCall: /^\\)/,\n comma: /^,/,\n hexColor: /^\\#([0-9a-fA-F]+)/,\n literalColor: /^([a-zA-Z]+)/,\n rgbColor: /^rgb/i,\n rgbaColor: /^rgba/i,\n number: /^(([0-9]*\\.[0-9]+)|([0-9]+\\.?))/\n };\n\n var input = '';\n\n function error(msg) {\n var err = new Error(input + ': ' + msg);\n err.source = input;\n throw err;\n }\n\n function getAST() {\n var ast = matchListDefinitions();\n\n if (input.length > 0) {\n error('Invalid input not EOF');\n }\n\n return ast;\n }\n\n function matchListDefinitions() {\n return matchListing(matchDefinition);\n }\n\n function matchDefinition() {\n return matchGradient(\n 'linear-gradient',\n tokens.linearGradient,\n matchLinearOrientation) ||\n\n matchGradient(\n 'repeating-linear-gradient',\n tokens.repeatingLinearGradient,\n matchLinearOrientation) ||\n\n matchGradient(\n 'radial-gradient',\n tokens.radialGradient,\n matchListRadialOrientations) ||\n\n matchGradient(\n 'repeating-radial-gradient',\n tokens.repeatingRadialGradient,\n matchListRadialOrientations);\n }\n\n function matchGradient(gradientType, pattern, orientationMatcher) {\n return matchCall(pattern, function(captures) {\n\n var orientation = orientationMatcher();\n if (orientation) {\n if (!scan(tokens.comma)) {\n error('Missing comma before color stops');\n }\n }\n\n return {\n type: gradientType,\n orientation: orientation,\n colorStops: matchListing(matchColorStop)\n };\n });\n }\n\n function matchCall(pattern, callback) {\n var captures = scan(pattern);\n\n if (captures) {\n if (!scan(tokens.startCall)) {\n error('Missing (');\n }\n\n var result = callback(captures);\n\n if (!scan(tokens.endCall)) {\n error('Missing )');\n }\n\n return result;\n }\n }\n\n function matchLinearOrientation() {\n return matchSideOrCorner() ||\n matchAngle();\n }\n\n function matchSideOrCorner() {\n return match('directional', tokens.sideOrCorner, 1);\n }\n\n function matchAngle() {\n return match('angular', tokens.angleValue, 1);\n }\n\n function matchListRadialOrientations() {\n var radialOrientations,\n radialOrientation = matchRadialOrientation(),\n lookaheadCache;\n\n if (radialOrientation) {\n radialOrientations = [];\n radialOrientations.push(radialOrientation);\n\n lookaheadCache = input;\n if (scan(tokens.comma)) {\n radialOrientation = matchRadialOrientation();\n if (radialOrientation) {\n radialOrientations.push(radialOrientation);\n } else {\n input = lookaheadCache;\n }\n }\n }\n\n return radialOrientations;\n }\n\n function matchRadialOrientation() {\n var radialType = matchCircle() ||\n matchEllipse();\n\n if (radialType) {\n radialType.at = matchAtPosition();\n } else {\n var extent = matchExtentKeyword();\n if (extent) {\n radialType = extent;\n var positionAt = matchAtPosition();\n if (positionAt) {\n radialType.at = positionAt;\n }\n } else {\n var defaultPosition = matchPositioning();\n if (defaultPosition) {\n radialType = {\n type: 'default-radial',\n at: defaultPosition\n };\n }\n }\n }\n\n return radialType;\n }\n\n function matchCircle() {\n var circle = match('shape', /^(circle)/i, 0);\n\n if (circle) {\n circle.style = matchLength() || matchExtentKeyword();\n }\n\n return circle;\n }\n\n function matchEllipse() {\n var ellipse = match('shape', /^(ellipse)/i, 0);\n\n if (ellipse) {\n ellipse.style = matchDistance() || matchExtentKeyword();\n }\n\n return ellipse;\n }\n\n function matchExtentKeyword() {\n return match('extent-keyword', tokens.extentKeywords, 1);\n }\n\n function matchAtPosition() {\n if (match('position', /^at/, 0)) {\n var positioning = matchPositioning();\n\n if (!positioning) {\n error('Missing positioning value');\n }\n\n return positioning;\n }\n }\n\n function matchPositioning() {\n var location = matchCoordinates();\n\n if (location.x || location.y) {\n return {\n type: 'position',\n value: location\n };\n }\n }\n\n function matchCoordinates() {\n return {\n x: matchDistance(),\n y: matchDistance()\n };\n }\n\n function matchListing(matcher) {\n var captures = matcher(),\n result = [];\n\n if (captures) {\n result.push(captures);\n while (scan(tokens.comma)) {\n captures = matcher();\n if (captures) {\n result.push(captures);\n } else {\n error('One extra comma');\n }\n }\n }\n\n return result;\n }\n\n function matchColorStop() {\n var color = matchColor();\n\n if (!color) {\n error('Expected color definition');\n }\n\n color.length = matchDistance();\n return color;\n }\n\n function matchColor() {\n return matchHexColor() ||\n matchRGBAColor() ||\n matchRGBColor() ||\n matchLiteralColor();\n }\n\n function matchLiteralColor() {\n return match('literal', tokens.literalColor, 0);\n }\n\n function matchHexColor() {\n return match('hex', tokens.hexColor, 1);\n }\n\n function matchRGBColor() {\n return matchCall(tokens.rgbColor, function() {\n return {\n type: 'rgb',\n value: matchListing(matchNumber)\n };\n });\n }\n\n function matchRGBAColor() {\n return matchCall(tokens.rgbaColor, function() {\n return {\n type: 'rgba',\n value: matchListing(matchNumber)\n };\n });\n }\n\n function matchNumber() {\n return scan(tokens.number)[1];\n }\n\n function matchDistance() {\n return match('%', tokens.percentageValue, 1) ||\n matchPositionKeyword() ||\n matchLength();\n }\n\n function matchPositionKeyword() {\n return match('position-keyword', tokens.positionKeywords, 1);\n }\n\n function matchLength() {\n return match('px', tokens.pixelValue, 1) ||\n match('em', tokens.emValue, 1);\n }\n\n function match(type, pattern, captureIndex) {\n var captures = scan(pattern);\n if (captures) {\n return {\n type: type,\n value: captures[captureIndex]\n };\n }\n }\n\n function scan(regexp) {\n var captures,\n blankCaptures;\n\n blankCaptures = /^[\\n\\r\\t\\s]+/.exec(input);\n if (blankCaptures) {\n consume(blankCaptures[0].length);\n }\n\n captures = regexp.exec(input);\n if (captures) {\n consume(captures[0].length);\n }\n\n return captures;\n }\n\n function consume(size) {\n input = input.substr(size);\n }\n\n return function(code) {\n input = code.toString();\n return getAST();\n };\n})();\n\nexports.parse = GradientParser.parse;\nexports.stringify = GradientParser.stringify;\n","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","/*!\n * is-plain-object \n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexport { isPlainObject };\n","import{isPlainObject as e}from\"is-plain-object\";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}const n={silent:!1,logLevel:\"warn\"},i=[\"validator\"],o=Object.prototype,a=o.toString,s=o.hasOwnProperty,u=/^\\s*function (\\w+)/;function l(e){var t;const r=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(r){const e=r.toString().match(u);return e?e[1]:\"\"}return\"\"}const c=e,f=e=>e;let d=f;if(\"production\"!==process.env.NODE_ENV){const e=\"undefined\"!=typeof console;d=e?function(e,t=n.logLevel){!1===n.silent&&console[t](`[VueTypes warn]: ${e}`)}:f}const p=(e,t)=>s.call(e,t),y=Number.isInteger||function(e){return\"number\"==typeof e&&isFinite(e)&&Math.floor(e)===e},v=Array.isArray||function(e){return\"[object Array]\"===a.call(e)},h=e=>\"[object Function]\"===a.call(e),b=e=>c(e)&&p(e,\"_vueTypes_name\"),g=e=>c(e)&&(p(e,\"type\")||[\"_vueTypes_name\",\"validator\",\"default\",\"required\"].some(t=>p(e,t)));function O(e,t){return Object.defineProperty(e.bind(t),\"__original\",{value:e})}function m(e,t,r=!1){let n,i=!0,o=\"\";n=c(e)?e:{type:e};const a=b(n)?n._vueTypes_name+\" - \":\"\";if(g(n)&&null!==n.type){if(void 0===n.type||!0===n.type)return i;if(!n.required&&void 0===t)return i;v(n.type)?(i=n.type.some(e=>!0===m(e,t,!0)),o=n.type.map(e=>l(e)).join(\" or \")):(o=l(n),i=\"Array\"===o?v(t):\"Object\"===o?c(t):\"String\"===o||\"Number\"===o||\"Boolean\"===o||\"Function\"===o?function(e){if(null==e)return\"\";const t=e.constructor.toString().match(u);return t?t[1]:\"\"}(t)===o:t instanceof n.type)}if(!i){const e=`${a}value \"${t}\" should be of type \"${o}\"`;return!1===r?(d(e),!1):e}if(p(n,\"validator\")&&h(n.validator)){const e=d,o=[];if(d=e=>{o.push(e)},i=n.validator(t),d=e,!i){const e=(o.length>1?\"* \":\"\")+o.join(\"\\n* \");return o.length=0,!1===r?(d(e),i):e}}return i}function j(e,t){const r=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(e){return void 0===e?(p(this,\"default\")&&delete this.default,this):h(e)||!0===m(this,e,!0)?(this.default=v(e)?()=>[...e]:c(e)?()=>Object.assign({},e):e,this):(d(`${this._vueTypes_name} - invalid default value: \"${e}\"`),this)}}}),{validator:n}=r;return h(n)&&(r.validator=O(n,r)),r}function _(e,t){const r=j(e,t);return Object.defineProperty(r,\"validate\",{value(e){return h(this.validator)&&d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\\n${JSON.stringify(this)}`),this.validator=O(e,this),this}})}function T(e,t,n){const o=function(e){const t={};return Object.getOwnPropertyNames(e).forEach(r=>{t[r]=Object.getOwnPropertyDescriptor(e,r)}),Object.defineProperties({},t)}(t);if(o._vueTypes_name=e,!c(n))return o;const{validator:a}=n,s=r(n,i);if(h(a)){let{validator:e}=o;e&&(e=null!==(l=(u=e).__original)&&void 0!==l?l:u),o.validator=O(e?function(t){return e.call(this,t)&&a.call(this,t)}:a,o)}var u,l;return Object.assign(o,s)}function $(e){return e.replace(/^(?!\\s*$)/gm,\" \")}const w=()=>_(\"any\",{}),P=()=>_(\"function\",{type:Function}),x=()=>_(\"boolean\",{type:Boolean}),E=()=>_(\"string\",{type:String}),N=()=>_(\"number\",{type:Number}),q=()=>_(\"array\",{type:Array}),A=()=>_(\"object\",{type:Object}),V=()=>j(\"integer\",{type:Number,validator:e=>y(e)}),S=()=>j(\"symbol\",{validator:e=>\"symbol\"==typeof e}),k=()=>({type:null});function D(e,t=\"custom validation failed\"){if(\"function\"!=typeof e)throw new TypeError(\"[VueTypes error]: You must provide a function as argument\");return j(e.name||\"<>\",{type:null,validator(r){const n=e(r);return n||d(`${this._vueTypes_name} - ${t}`),n}})}function L(e){if(!v(e))throw new TypeError(\"[VueTypes error]: You must provide an array as argument.\");const t=`oneOf - value should be one of \"${e.join('\", \"')}\".`,r=e.reduce((e,t)=>{if(null!=t){const r=t.constructor;-1===e.indexOf(r)&&e.push(r)}return e},[]);return j(\"oneOf\",{type:r.length>0?r:void 0,validator(r){const n=-1!==e.indexOf(r);return n||d(t),n}})}function F(e){if(!v(e))throw new TypeError(\"[VueTypes error]: You must provide an array as argument\");let t=!1,r=[];for(let n=0;nr.indexOf(e)===t);const n=r.length>0?r:null;return j(\"oneOfType\",t?{type:n,validator(t){const r=[],n=e.some(e=>{const n=m(b(e)&&\"oneOf\"===e._vueTypes_name?e.type||null:e,t,!0);return\"string\"==typeof n&&r.push(n),!0===n});return n||d(`oneOfType - provided value does not match any of the ${r.length} passed-in validators:\\n${$(r.join(\"\\n\"))}`),n}}:{type:n})}function Y(e){return j(\"arrayOf\",{type:Array,validator(t){let r=\"\";const n=t.every(t=>(r=m(e,t,!0),!0===r));return n||d(`arrayOf - value validation error:\\n${$(r)}`),n}})}function B(e){return j(\"instanceOf\",{type:e})}function I(e){return j(\"objectOf\",{type:Object,validator(t){let r=\"\";const n=Object.keys(t).every(n=>(r=m(e,t[n],!0),!0===r));return n||d(`objectOf - value validation error:\\n${$(r)}`),n}})}function J(e){const t=Object.keys(e),r=t.filter(t=>{var r;return!(null===(r=e[t])||void 0===r||!r.required)}),n=j(\"shape\",{type:Object,validator(n){if(!c(n))return!1;const i=Object.keys(n);if(r.length>0&&r.some(e=>-1===i.indexOf(e))){const e=r.filter(e=>-1===i.indexOf(e));return d(1===e.length?`shape - required property \"${e[0]}\" is not defined.`:`shape - required properties \"${e.join('\", \"')}\" are not defined.`),!1}return i.every(r=>{if(-1===t.indexOf(r))return!0===this._vueTypes_isLoose||(d(`shape - shape definition does not include a \"${r}\" property. Allowed keys: \"${t.join('\", \"')}\".`),!1);const i=m(e[r],n[r],!0);return\"string\"==typeof i&&d(`shape - \"${r}\" property validation error:\\n ${$(i)}`),!0===i})}});return Object.defineProperty(n,\"_vueTypes_isLoose\",{writable:!0,value:!1}),Object.defineProperty(n,\"loose\",{get(){return this._vueTypes_isLoose=!0,this}}),n}const M=[\"name\",\"validate\",\"getter\"],R=/*#__PURE__*/(()=>{var e;return(e=class{static get any(){return w()}static get func(){return P().def(this.defaults.func)}static get bool(){return x().def(this.defaults.bool)}static get string(){return E().def(this.defaults.string)}static get number(){return N().def(this.defaults.number)}static get array(){return q().def(this.defaults.array)}static get object(){return A().def(this.defaults.object)}static get integer(){return V().def(this.defaults.integer)}static get symbol(){return S()}static get nullable(){return{type:null}}static extend(e){if(v(e))return e.forEach(e=>this.extend(e)),this;const{name:t,validate:n=!1,getter:i=!1}=e,o=r(e,M);if(p(this,t))throw new TypeError(`[VueTypes error]: Type \"${t}\" already defined`);const{type:a}=o;if(b(a))return delete o.type,Object.defineProperty(this,t,i?{get:()=>T(t,a,o)}:{value(...e){const r=T(t,a,o);return r.validator&&(r.validator=r.validator.bind(r,...e)),r}});let s;return s=i?{get(){const e=Object.assign({},o);return n?_(t,e):j(t,e)},enumerable:!0}:{value(...e){const r=Object.assign({},o);let i;return i=n?_(t,r):j(t,r),r.validator&&(i.validator=r.validator.bind(i,...e)),i},enumerable:!0},Object.defineProperty(this,t,s)}}).defaults={},e.sensibleDefaults=void 0,e.config=n,e.custom=D,e.oneOf=L,e.instanceOf=B,e.oneOfType=F,e.arrayOf=Y,e.objectOf=I,e.shape=J,e.utils={validate:(e,t)=>!0===m(t,e,!0),toType:(e,t,r=!1)=>r?_(e,t):j(e,t)},e})();function z(e={func:()=>{},bool:!0,string:\"\",number:0,array:()=>[],object:()=>({}),integer:0}){var r;return(r=class extends R{static get sensibleDefaults(){return t({},this.defaults)}static set sensibleDefaults(r){this.defaults=!1!==r?t({},!0!==r?r:e):{}}}).defaults=t({},e),r}class C extends(z()){}export{w as any,q as array,Y as arrayOf,x as bool,n as config,z as createTypes,D as custom,C as default,T as fromType,P as func,B as instanceOf,V as integer,k as nullable,N as number,A as object,I as objectOf,L as oneOf,F as oneOfType,J as shape,E as string,S as symbol,j as toType,_ as toValidableType,m as validateType};\n//# sourceMappingURL=vue-types.modern.js.map\n","var t=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};function e(t){var e={exports:{}};return t(e,e.exports),e.exports}var n=function(t){return t&&t.Math==Math&&t},r=n(\"object\"==typeof globalThis&&globalThis)||n(\"object\"==typeof window&&window)||n(\"object\"==typeof self&&self)||n(\"object\"==typeof t&&t)||function(){return this}()||Function(\"return this\")(),o=function(t){try{return!!t()}catch(t){return!0}},i=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,c={f:a&&!u.call({1:2},1)?function(t){var e=a(this,t);return!!e&&e.enumerable}:u},l=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},f={}.toString,s=function(t){return f.call(t).slice(8,-1)},d=\"\".split,v=o((function(){return!Object(\"z\").propertyIsEnumerable(0)}))?function(t){return\"String\"==s(t)?d.call(t,\"\"):Object(t)}:Object,p=function(t){if(null==t)throw TypeError(\"Can't call method on \"+t);return t},g=function(t){return v(p(t))},h=function(t){return\"object\"==typeof t?null!==t:\"function\"==typeof t},y=function(t,e){if(!h(t))return t;var n,r;if(e&&\"function\"==typeof(n=t.toString)&&!h(r=n.call(t)))return r;if(\"function\"==typeof(n=t.valueOf)&&!h(r=n.call(t)))return r;if(!e&&\"function\"==typeof(n=t.toString)&&!h(r=n.call(t)))return r;throw TypeError(\"Can't convert object to primitive value\")},m={}.hasOwnProperty,S=function(t,e){return m.call(t,e)},x=r.document,b=h(x)&&h(x.createElement),E=function(t){return b?x.createElement(t):{}},w=!i&&!o((function(){return 7!=Object.defineProperty(E(\"div\"),\"a\",{get:function(){return 7}}).a})),O=Object.getOwnPropertyDescriptor,T={f:i?O:function(t,e){if(t=g(t),e=y(e,!0),w)try{return O(t,e)}catch(t){}if(S(t,e))return l(!c.f.call(t,e),t[e])}},A=function(t){if(!h(t))throw TypeError(String(t)+\" is not an object\");return t},k=Object.defineProperty,R={f:i?k:function(t,e,n){if(A(t),e=y(e,!0),A(n),w)try{return k(t,e,n)}catch(t){}if(\"get\"in n||\"set\"in n)throw TypeError(\"Accessors not supported\");return\"value\"in n&&(t[e]=n.value),t}},I=i?function(t,e,n){return R.f(t,e,l(1,n))}:function(t,e,n){return t[e]=n,t},j=function(t,e){try{I(r,t,e)}catch(n){r[t]=e}return e},C=r[\"__core-js_shared__\"]||j(\"__core-js_shared__\",{}),L=Function.toString;\"function\"!=typeof C.inspectSource&&(C.inspectSource=function(t){return L.call(t)});var P,M,_,D=C.inspectSource,U=r.WeakMap,N=\"function\"==typeof U&&/native code/.test(D(U)),F=e((function(t){(t.exports=function(t,e){return C[t]||(C[t]=void 0!==e?e:{})})(\"versions\",[]).push({version:\"3.8.3\",mode:\"global\",copyright:\"© 2021 Denis Pushkarev (zloirock.ru)\"})})),W=0,z=Math.random(),$=function(t){return\"Symbol(\"+String(void 0===t?\"\":t)+\")_\"+(++W+z).toString(36)},B=F(\"keys\"),Y=function(t){return B[t]||(B[t]=$(t))},G={},H=r.WeakMap;if(N){var X=C.state||(C.state=new H),V=X.get,K=X.has,q=X.set;P=function(t,e){return e.facade=t,q.call(X,t,e),e},M=function(t){return V.call(X,t)||{}},_=function(t){return K.call(X,t)}}else{var Q=Y(\"state\");G[Q]=!0,P=function(t,e){return e.facade=t,I(t,Q,e),e},M=function(t){return S(t,Q)?t[Q]:{}},_=function(t){return S(t,Q)}}var J={set:P,get:M,has:_,enforce:function(t){return _(t)?M(t):P(t,{})},getterFor:function(t){return function(e){var n;if(!h(e)||(n=M(e)).type!==t)throw TypeError(\"Incompatible receiver, \"+t+\" required\");return n}}},Z=e((function(t){var e=J.get,n=J.enforce,o=String(String).split(\"String\");(t.exports=function(t,e,i,u){var a,c=!!u&&!!u.unsafe,l=!!u&&!!u.enumerable,f=!!u&&!!u.noTargetGet;\"function\"==typeof i&&(\"string\"!=typeof e||S(i,\"name\")||I(i,\"name\",e),(a=n(i)).source||(a.source=o.join(\"string\"==typeof e?e:\"\"))),t!==r?(c?!f&&t[e]&&(l=!0):delete t[e],l?t[e]=i:I(t,e,i)):l?t[e]=i:j(e,i)})(Function.prototype,\"toString\",(function(){return\"function\"==typeof this&&e(this).source||D(this)}))})),tt=r,et=function(t){return\"function\"==typeof t?t:void 0},nt=function(t,e){return arguments.length<2?et(tt[t])||et(r[t]):tt[t]&&tt[t][e]||r[t]&&r[t][e]},rt=Math.ceil,ot=Math.floor,it=function(t){return isNaN(t=+t)?0:(t>0?ot:rt)(t)},ut=Math.min,at=function(t){return t>0?ut(it(t),9007199254740991):0},ct=Math.max,lt=Math.min,ft=function(t,e){var n=it(t);return n<0?ct(n+e,0):lt(n,e)},st=function(t){return function(e,n,r){var o,i=g(e),u=at(i.length),a=ft(r,u);if(t&&n!=n){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},dt={includes:st(!0),indexOf:st(!1)},vt=dt.indexOf,pt=function(t,e){var n,r=g(t),o=0,i=[];for(n in r)!S(G,n)&&S(r,n)&&i.push(n);for(;e.length>o;)S(r,n=e[o++])&&(~vt(i,n)||i.push(n));return i},gt=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"],ht=gt.concat(\"length\",\"prototype\"),yt={f:Object.getOwnPropertyNames||function(t){return pt(t,ht)}},mt={f:Object.getOwnPropertySymbols},St=nt(\"Reflect\",\"ownKeys\")||function(t){var e=yt.f(A(t)),n=mt.f;return n?e.concat(n(t)):e},xt=function(t,e){for(var n=St(e),r=R.f,o=T.f,i=0;i1?arguments[1]:void 0)}});var Bt=function(){function t(){Wt(this,t)}return $t(t,null,[{key:\"isInBrowser\",value:function(){return\"undefined\"!=typeof window}},{key:\"isServer\",value:function(){return\"undefined\"==typeof window}},{key:\"getUA\",value:function(){return t.isInBrowser()?window.navigator.userAgent.toLowerCase():\"\"}},{key:\"isMobile\",value:function(){return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion)}},{key:\"isOpera\",value:function(){return-1!==navigator.userAgent.indexOf(\"Opera\")}},{key:\"isIE\",value:function(){var e=t.getUA();return\"\"!==e&&e.indexOf(\"msie\")>0}},{key:\"isIE9\",value:function(){var e=t.getUA();return\"\"!==e&&e.indexOf(\"msie 9.0\")>0}},{key:\"isEdge\",value:function(){var e=t.getUA();return\"\"!==e&&e.indexOf(\"edge/\")>0}},{key:\"isChrome\",value:function(){var e=t.getUA();return\"\"!==e&&/chrome\\/\\d+/.test(e)&&!t.isEdge()}},{key:\"isPhantomJS\",value:function(){var e=t.getUA();return\"\"!==e&&/phantomjs/.test(e)}},{key:\"isFirefox\",value:function(){var e=t.getUA();return\"\"!==e&&/firefox/.test(e)}}]),t}(),Yt=[].join,Gt=v!=Object,Ht=jt(\"join\",\",\");It({target:\"Array\",proto:!0,forced:Gt||!Ht},{join:function(t){return Yt.call(g(this),void 0===t?\",\":t)}});var Xt,Vt,Kt=function(t){return Object(p(t))},qt=Array.isArray||function(t){return\"Array\"==s(t)},Qt=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())})),Jt=Qt&&!Symbol.sham&&\"symbol\"==typeof Symbol.iterator,Zt=F(\"wks\"),te=r.Symbol,ee=Jt?te:te&&te.withoutSetter||$,ne=function(t){return S(Zt,t)||(Qt&&S(te,t)?Zt[t]=te[t]:Zt[t]=ee(\"Symbol.\"+t)),Zt[t]},re=ne(\"species\"),oe=function(t,e){var n;return qt(t)&&(\"function\"!=typeof(n=t.constructor)||n!==Array&&!qt(n.prototype)?h(n)&&null===(n=n[re])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},ie=function(t,e,n){var r=y(e);r in t?R.f(t,r,l(0,n)):t[r]=n},ue=nt(\"navigator\",\"userAgent\")||\"\",ae=r.process,ce=ae&&ae.versions,le=ce&&ce.v8;le?Vt=(Xt=le.split(\".\"))[0]+Xt[1]:ue&&(!(Xt=ue.match(/Edge\\/(\\d+)/))||Xt[1]>=74)&&(Xt=ue.match(/Chrome\\/(\\d+)/))&&(Vt=Xt[1]);var fe=Vt&&+Vt,se=ne(\"species\"),de=function(t){return fe>=51||!o((function(){var e=[];return(e.constructor={})[se]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},ve=de(\"splice\"),pe=Mt(\"splice\",{ACCESSORS:!0,0:0,1:2}),ge=Math.max,he=Math.min;It({target:\"Array\",proto:!0,forced:!ve||!pe},{splice:function(t,e){var n,r,o,i,u,a,c=Kt(this),l=at(c.length),f=ft(t,l),s=arguments.length;if(0===s?n=r=0:1===s?(n=0,r=l-f):(n=s-2,r=he(ge(it(e),0),l-f)),l+n-r>9007199254740991)throw TypeError(\"Maximum allowed length exceeded\");for(o=oe(c,r),i=0;il-r+n;i--)delete c[i-1]}else if(n>r)for(i=l-r;i>f;i--)a=i+n-1,(u=i+r-1)in c?c[a]=c[u]:delete c[a];for(i=0;i0&&(!i.multiline||i.multiline&&\"\\n\"!==t[i.lastIndex-1])&&(c=\"(?: \"+c+\")\",f=\" \"+f,l++),n=new RegExp(\"^(?:\"+c+\")\",a)),Pe&&(n=new RegExp(\"^\"+c+\"$(?!\\\\s)\",a)),Ce&&(e=i.lastIndex),r=Re.call(u?n:i,f),u?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:Ce&&r&&(i.lastIndex=i.global?r.index+r[0].length:e),Pe&&r&&r.length>1&&Ie.call(r[0],n,(function(){for(o=1;o\")})),ze=\"$0\"===\"a\".replace(/./,\"$0\"),$e=ne(\"replace\"),Be=!!/./[$e]&&\"\"===/./[$e](\"a\",\"$0\"),Ye=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n=\"ab\".split(t);return 2!==n.length||\"a\"!==n[0]||\"b\"!==n[1]})),Ge=function(t,e,n,r){var i=ne(t),u=!o((function(){var e={};return e[i]=function(){return 7},7!=\"\"[t](e)})),a=u&&!o((function(){var e=!1,n=/a/;return\"split\"===t&&((n={}).constructor={},n.constructor[Fe]=function(){return n},n.flags=\"\",n[i]=/./[i]),n.exec=function(){return e=!0,null},n[i](\"\"),!e}));if(!u||!a||\"replace\"===t&&(!We||!ze||Be)||\"split\"===t&&!Ye){var c=/./[i],l=n(i,\"\"[t],(function(t,e,n,r,o){return e.exec===Me?u&&!o?{done:!0,value:c.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:ze,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Be}),f=l[0],s=l[1];Z(String.prototype,t,f),Z(RegExp.prototype,i,2==e?function(t,e){return s.call(t,this,e)}:function(t){return s.call(t,this)})}r&&I(RegExp.prototype[i],\"sham\",!0)},He=ne(\"match\"),Xe=function(t){var e;return h(t)&&(void 0!==(e=t[He])?!!e:\"RegExp\"==s(t))},Ve=function(t){if(\"function\"!=typeof t)throw TypeError(String(t)+\" is not a function\");return t},Ke=ne(\"species\"),qe=function(t){return function(e,n){var r,o,i=String(p(e)),u=it(n),a=i.length;return u<0||u>=a?t?\"\":void 0:(r=i.charCodeAt(u))<55296||r>56319||u+1===a||(o=i.charCodeAt(u+1))<56320||o>57343?t?i.charAt(u):r:t?i.slice(u,u+2):o-56320+(r-55296<<10)+65536}},Qe={codeAt:qe(!1),charAt:qe(!0)},Je=Qe.charAt,Ze=function(t,e,n){return e+(n?Je(t,e).length:1)},tn=function(t,e){var n=t.exec;if(\"function\"==typeof n){var r=n.call(t,e);if(\"object\"!=typeof r)throw TypeError(\"RegExp exec method returned something other than an Object or null\");return r}if(\"RegExp\"!==s(t))throw TypeError(\"RegExp#exec called on incompatible receiver\");return Me.call(t,e)},en=[].push,nn=Math.min,rn=!o((function(){return!RegExp(4294967295,\"y\")}));Ge(\"split\",2,(function(t,e,n){var r;return r=\"c\"==\"abbc\".split(/(b)*/)[1]||4!=\"test\".split(/(?:)/,-1).length||2!=\"ab\".split(/(?:ab)*/).length||4!=\".\".split(/(.?)(.?)/).length||\".\".split(/()()/).length>1||\"\".split(/.?/).length?function(t,n){var r=String(p(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===t)return[r];if(!Xe(t))return e.call(r,t,o);for(var i,u,a,c=[],l=(t.ignoreCase?\"i\":\"\")+(t.multiline?\"m\":\"\")+(t.unicode?\"u\":\"\")+(t.sticky?\"y\":\"\"),f=0,s=new RegExp(t.source,l+\"g\");(i=Me.call(s,r))&&!((u=s.lastIndex)>f&&(c.push(r.slice(f,i.index)),i.length>1&&i.index=o));)s.lastIndex===i.index&&s.lastIndex++;return f===r.length?!a&&s.test(\"\")||c.push(\"\"):c.push(r.slice(f)),c.length>o?c.slice(0,o):c}:\"0\".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var o=p(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,o,n):r.call(String(o),e,n)},function(t,o){var i=n(r,t,this,o,r!==e);if(i.done)return i.value;var u=A(t),a=String(this),c=function(t,e){var n,r=A(t).constructor;return void 0===r||null==(n=A(r)[Ke])?e:Ve(n)}(u,RegExp),l=u.unicode,f=(u.ignoreCase?\"i\":\"\")+(u.multiline?\"m\":\"\")+(u.unicode?\"u\":\"\")+(rn?\"y\":\"g\"),s=new c(rn?u:\"^(?:\"+u.source+\")\",f),d=void 0===o?4294967295:o>>>0;if(0===d)return[];if(0===a.length)return null===tn(s,a)?[a]:[];for(var v=0,p=0,g=[];p1?arguments[1]:void 0,e.length)),r=String(t);return wn?wn.call(e,r,n):e.slice(n,n+r.length)===r}});var Rn=function(t){return t instanceof Date},In=function(t){return\"function\"==typeof t},jn=function(t){return\"string\"==typeof t},Cn=function(t){return\"symbol\"===kn(t)},Ln=function(t){return\"boolean\"==typeof t},Pn=function(t){return\"number\"==typeof t},Mn=function(t){return null!==t&&\"object\"===kn(t)},_n=Object.prototype.toString,Dn=function(t){return _n.call(t)},Un=Object.prototype.hasOwnProperty,Nn=function(t,e){return Un.call(t,e)},Fn=Array.isArray,Wn=function(t){return\"[object Map]\"===Dn(t)},zn=function(t){return\"[object Set]\"===Dn(t)},$n=function(t){return Dn(t).slice(8,-1)},Bn=function(t){return $n(t).startsWith(\"HTML\")},Yn=function(t){return Mn(t)&&In(t.then)&&In(t.catch)},Gn=function(t){return null===t},Hn=function(t){return void 0===t},Xn=function(t){return!t&&0!==t&&\"\"!==t||Fn(t)&&!t.length||Mn(t)&&!Object.keys(t).length},Vn=function(){function t(){Wt(this,t)}return $t(t,null,[{key:\"isWindow\",value:function(t){return t===window}},{key:\"addEventListener\",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t&&e&&n&&t.addEventListener(e,n,r)}},{key:\"removeEventListener\",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t&&e&&n&&t.removeEventListener(e,n,r)}},{key:\"triggerDragEvent\",value:function(e,n){var r=!1,o=function(t){var e;null===(e=n.drag)||void 0===e||e.call(n,t)},i=function e(i){var u;t.removeEventListener(document,\"mousemove\",o),t.removeEventListener(document,\"mouseup\",e),document.onselectstart=null,document.ondragstart=null,r=!1,null===(u=n.end)||void 0===u||u.call(n,i)};t.addEventListener(e,\"mousedown\",(function(e){var u;r||(document.onselectstart=function(){return!1},document.ondragstart=function(){return!1},t.addEventListener(document,\"mousemove\",o),t.addEventListener(document,\"mouseup\",i),r=!0,null===(u=n.start)||void 0===u||u.call(n,e))}))}},{key:\"getBoundingClientRect\",value:function(t){return t&&Mn(t)&&1===t.nodeType?t.getBoundingClientRect():null}},{key:\"hasClass\",value:function(t,e){return!!(t&&Mn(t)&&jn(e)&&1===t.nodeType)&&t.classList.contains(e.trim())}},{key:\"addClass\",value:function(e,n){if(e&&Mn(e)&&jn(n)&&1===e.nodeType&&(n=n.trim(),!t.hasClass(e,n))){var r=e.className;e.className=r?r+\" \"+n:n}}},{key:\"removeClass\",value:function(t,e){if(t&&Mn(t)&&jn(e)&&1===t.nodeType&&\"string\"==typeof t.className){e=e.trim();for(var n=t.className.trim().split(\" \"),r=n.length-1;r>=0;r--)n[r]=n[r].trim(),n[r]&&n[r]!==e||n.splice(r,1);t.className=n.join(\" \")}}},{key:\"toggleClass\",value:function(t,e,n){t&&Mn(t)&&jn(e)&&1===t.nodeType&&t.classList.toggle(e,n)}},{key:\"replaceClass\",value:function(e,n,r){e&&Mn(e)&&jn(n)&&jn(r)&&1===e.nodeType&&(n=n.trim(),r=r.trim(),t.removeClass(e,n),t.addClass(e,r))}},{key:\"getScrollTop\",value:function(t){var e=\"scrollTop\"in t?t.scrollTop:t.pageYOffset;return Math.max(e,0)}},{key:\"setScrollTop\",value:function(t,e){\"scrollTop\"in t?t.scrollTop=e:t.scrollTo(t.scrollX,e)}},{key:\"getRootScrollTop\",value:function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}},{key:\"setRootScrollTop\",value:function(e){t.setScrollTop(window,e),t.setScrollTop(document.body,e)}},{key:\"getElementTop\",value:function(e,n){if(t.isWindow(e))return 0;var r=n?t.getScrollTop(n):t.getRootScrollTop();return e.getBoundingClientRect().top+r}},{key:\"getVisibleHeight\",value:function(e){return t.isWindow(e)?e.innerHeight:e.getBoundingClientRect().height}},{key:\"isHidden\",value:function(t){if(!t)return!1;var e=window.getComputedStyle(t),n=\"none\"===e.display,r=null===t.offsetParent&&\"fixed\"!==e.position;return n||r}},{key:\"triggerEvent\",value:function(t,e){if(\"createEvent\"in document){var n=document.createEvent(\"HTMLEvents\");n.initEvent(e,!1,!0),t.dispatchEvent(n)}}},{key:\"calcAngle\",value:function(t,e){var n=t.getBoundingClientRect(),r=n.left+n.width/2,o=n.top+n.height/2,i=Math.abs(r-e.clientX),u=Math.abs(o-e.clientY),a=u/Math.sqrt(Math.pow(i,2)+Math.pow(u,2)),c=Math.acos(a),l=Math.floor(180/(Math.PI/c));return e.clientX>r&&e.clientY>o&&(l=180-l),e.clientX==r&&e.clientY>o&&(l=180),e.clientX>r&&e.clientY==o&&(l=90),e.clientXo&&(l=180+l),e.clientX1?n-1:0),o=1;o]*>)/g,Jn=/\\$([$&'`]|\\d\\d?)/g,Zn=function(t,e,n,r,o,i){var u=n+t.length,a=r.length,c=Jn;return void 0!==o&&(o=Kt(o),c=Qn),qn.call(i,c,(function(i,c){var l;switch(c.charAt(0)){case\"$\":return\"$\";case\"&\":return t;case\"`\":return e.slice(0,n);case\"'\":return e.slice(u);case\"<\":l=o[c.slice(1,-1)];break;default:var f=+c;if(0===f)return i;if(f>a){var s=Kn(f/10);return 0===s?i:s<=a?void 0===r[s-1]?c.charAt(1):r[s-1]+c.charAt(1):i}l=r[f-1]}return void 0===l?\"\":l}))},tr=Math.max,er=Math.min;Ge(\"replace\",2,(function(t,e,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,u=o?\"$\":\"$0\";return[function(n,r){var o=p(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):e.call(String(o),n,r)},function(t,r){if(!o&&i||\"string\"==typeof r&&-1===r.indexOf(u)){var a=n(e,t,this,r);if(a.done)return a.value}var c=A(t),l=String(this),f=\"function\"==typeof r;f||(r=String(r));var s=c.global;if(s){var d=c.unicode;c.lastIndex=0}for(var v=[];;){var p=tn(c,l);if(null===p)break;if(v.push(p),!s)break;\"\"===String(p[0])&&(c.lastIndex=Ze(l,at(c.lastIndex),d))}for(var g,h=\"\",y=0,m=0;m=y&&(h+=l.slice(y,x)+T,y=x+S.length)}return h+l.slice(y)}]}));var nr=function(){function t(){Wt(this,t)}return $t(t,null,[{key:\"camelize\",value:function(t){return t.replace(/-(\\w)/g,(function(t,e){return e?e.toUpperCase():\"\"}))}},{key:\"capitalize\",value:function(t){return t.charAt(0).toUpperCase()+t.slice(1)}}]),t}(),rr=function(){function t(){Wt(this,t)}return $t(t,null,[{key:\"_clone\",value:function(){}}]),t}(),or=ne(\"isConcatSpreadable\"),ir=fe>=51||!o((function(){var t=[];return t[or]=!1,t.concat()[0]!==t})),ur=de(\"concat\"),ar=function(t){if(!h(t))return!1;var e=t[or];return void 0!==e?!!e:qt(t)};It({target:\"Array\",proto:!0,forced:!ir||!ur},{concat:function(t){var e,n,r,o,i,u=Kt(this),a=oe(u,0),c=0;for(e=-1,r=arguments.length;e9007199254740991)throw TypeError(\"Maximum allowed index exceeded\");for(n=0;n=9007199254740991)throw TypeError(\"Maximum allowed index exceeded\");ie(a,c++,i)}return a.length=c,a}});var cr,lr=function(t,e,n){if(Ve(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},fr=[].push,sr=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,l,f,s){for(var d,p,g=Kt(c),h=v(g),y=lr(l,f,3),m=at(h.length),S=0,x=s||oe,b=e?x(c,m):n||u?x(c,0):void 0;m>S;S++)if((a||S in h)&&(p=y(d=h[S],S,g),t))if(e)b[S]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return S;case 2:fr.call(b,d)}else switch(t){case 4:return!1;case 7:fr.call(b,d)}return i?-1:r||o?o:b}},dr={forEach:sr(0),map:sr(1),filter:sr(2),some:sr(3),every:sr(4),find:sr(5),findIndex:sr(6),filterOut:sr(7)},vr=i?Object.defineProperties:function(t,e){A(t);for(var n,r=yn(e),o=r.length,i=0;o>i;)R.f(t,n=r[i++],e[n]);return t},pr=nt(\"document\",\"documentElement\"),gr=Y(\"IE_PROTO\"),hr=function(){},yr=function(t){return\"\n","\n","\n","\n","\n","\n","\n","\n\n","\n","\n","\n","\n/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\nvar isNothing_1 = isNothing;\nvar isObject_1 = isObject;\nvar toArray_1 = toArray;\nvar repeat_1 = repeat;\nvar isNegativeZero_1 = isNegativeZero;\nvar extend_1 = extend;\n\nvar common = {\n\tisNothing: isNothing_1,\n\tisObject: isObject_1,\n\ttoArray: toArray_1,\n\trepeat: repeat_1,\n\tisNegativeZero: isNegativeZero_1,\n\textend: extend_1\n};\n\n// YAML error class. http://stackoverflow.com/questions/8458984\n\n\nfunction formatError(exception, compact) {\n var where = '', message = exception.reason || '(unknown reason)';\n\n if (!exception.mark) return message;\n\n if (exception.mark.name) {\n where += 'in \"' + exception.mark.name + '\" ';\n }\n\n where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')';\n\n if (!compact && exception.mark.snippet) {\n where += '\\n\\n' + exception.mark.snippet;\n }\n\n return message + ' ' + where;\n}\n\n\nfunction YAMLException$1(reason, mark) {\n // Super constructor\n Error.call(this);\n\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = formatError(this, false);\n\n // Include stack trace in error object\n if (Error.captureStackTrace) {\n // Chrome and NodeJS\n Error.captureStackTrace(this, this.constructor);\n } else {\n // FF, IE 10+ and Safari 6+. Fallback for others\n this.stack = (new Error()).stack || '';\n }\n}\n\n\n// Inherit from Error\nYAMLException$1.prototype = Object.create(Error.prototype);\nYAMLException$1.prototype.constructor = YAMLException$1;\n\n\nYAMLException$1.prototype.toString = function toString(compact) {\n return this.name + ': ' + formatError(this, compact);\n};\n\n\nvar exception = YAMLException$1;\n\n// get snippet for a single line, respecting maxLength\nfunction getLine(buffer, lineStart, lineEnd, position, maxLineLength) {\n var head = '';\n var tail = '';\n var maxHalfLength = Math.floor(maxLineLength / 2) - 1;\n\n if (position - lineStart > maxHalfLength) {\n head = ' ... ';\n lineStart = position - maxHalfLength + head.length;\n }\n\n if (lineEnd - position > maxHalfLength) {\n tail = ' ...';\n lineEnd = position + maxHalfLength - tail.length;\n }\n\n return {\n str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '→') + tail,\n pos: position - lineStart + head.length // relative position\n };\n}\n\n\nfunction padStart(string, max) {\n return common.repeat(' ', max - string.length) + string;\n}\n\n\nfunction makeSnippet(mark, options) {\n options = Object.create(options || null);\n\n if (!mark.buffer) return null;\n\n if (!options.maxLength) options.maxLength = 79;\n if (typeof options.indent !== 'number') options.indent = 1;\n if (typeof options.linesBefore !== 'number') options.linesBefore = 3;\n if (typeof options.linesAfter !== 'number') options.linesAfter = 2;\n\n var re = /\\r?\\n|\\r|\\0/g;\n var lineStarts = [ 0 ];\n var lineEnds = [];\n var match;\n var foundLineNo = -1;\n\n while ((match = re.exec(mark.buffer))) {\n lineEnds.push(match.index);\n lineStarts.push(match.index + match[0].length);\n\n if (mark.position <= match.index && foundLineNo < 0) {\n foundLineNo = lineStarts.length - 2;\n }\n }\n\n if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;\n\n var result = '', i, line;\n var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;\n var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);\n\n for (i = 1; i <= options.linesBefore; i++) {\n if (foundLineNo - i < 0) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo - i],\n lineEnds[foundLineNo - i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),\n maxLineLength\n );\n result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n' + result;\n }\n\n line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);\n result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\\n';\n\n for (i = 1; i <= options.linesAfter; i++) {\n if (foundLineNo + i >= lineEnds.length) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo + i],\n lineEnds[foundLineNo + i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),\n maxLineLength\n );\n result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n }\n\n return result.replace(/\\n$/, '');\n}\n\n\nvar snippet = makeSnippet;\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'multi',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'representName',\n 'defaultStyle',\n 'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\n\nfunction compileStyleAliases(map) {\n var result = {};\n\n if (map !== null) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n\n return result;\n}\n\nfunction Type$1(tag, options) {\n options = options || {};\n\n Object.keys(options).forEach(function (name) {\n if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n throw new exception('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.options = options; // keep original options in case user wants to extend this type later\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.representName = options['representName'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.multi = options['multi'] || false;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n\n if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n throw new exception('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n}\n\nvar type = Type$1;\n\n/*eslint-disable max-len*/\n\n\n\n\n\nfunction compileList(schema, name) {\n var result = [];\n\n schema[name].forEach(function (currentType) {\n var newIndex = result.length;\n\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag &&\n previousType.kind === currentType.kind &&\n previousType.multi === currentType.multi) {\n\n newIndex = previousIndex;\n }\n });\n\n result[newIndex] = currentType;\n });\n\n return result;\n}\n\n\nfunction compileMap(/* lists... */) {\n var result = {\n scalar: {},\n sequence: {},\n mapping: {},\n fallback: {},\n multi: {\n scalar: [],\n sequence: [],\n mapping: [],\n fallback: []\n }\n }, index, length;\n\n function collectType(type) {\n if (type.multi) {\n result.multi[type.kind].push(type);\n result.multi['fallback'].push(type);\n } else {\n result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n }\n }\n\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\n\n\nfunction Schema$1(definition) {\n return this.extend(definition);\n}\n\n\nSchema$1.prototype.extend = function extend(definition) {\n var implicit = [];\n var explicit = [];\n\n if (definition instanceof type) {\n // Schema.extend(type)\n explicit.push(definition);\n\n } else if (Array.isArray(definition)) {\n // Schema.extend([ type1, type2, ... ])\n explicit = explicit.concat(definition);\n\n } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {\n // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })\n if (definition.implicit) implicit = implicit.concat(definition.implicit);\n if (definition.explicit) explicit = explicit.concat(definition.explicit);\n\n } else {\n throw new exception('Schema.extend argument should be a Type, [ Type ], ' +\n 'or a schema definition ({ implicit: [...], explicit: [...] })');\n }\n\n implicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n\n if (type$1.loadKind && type$1.loadKind !== 'scalar') {\n throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n\n if (type$1.multi) {\n throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');\n }\n });\n\n explicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n });\n\n var result = Object.create(Schema$1.prototype);\n\n result.implicit = (this.implicit || []).concat(implicit);\n result.explicit = (this.explicit || []).concat(explicit);\n\n result.compiledImplicit = compileList(result, 'implicit');\n result.compiledExplicit = compileList(result, 'explicit');\n result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);\n\n return result;\n};\n\n\nvar schema = Schema$1;\n\nvar str = new type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return data !== null ? data : ''; }\n});\n\nvar seq = new type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return data !== null ? data : []; }\n});\n\nvar map = new type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return data !== null ? data : {}; }\n});\n\nvar failsafe = new schema({\n explicit: [\n str,\n seq,\n map\n ]\n});\n\nfunction resolveYamlNull(data) {\n if (data === null) return true;\n\n var max = data.length;\n\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n return null;\n}\n\nfunction isNull(object) {\n return object === null;\n}\n\nvar _null = new type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; },\n empty: function () { return ''; }\n },\n defaultStyle: 'lowercase'\n});\n\nfunction resolveYamlBoolean(data) {\n if (data === null) return false;\n\n var max = data.length;\n\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n return Object.prototype.toString.call(object) === '[object Boolean]';\n}\n\nvar bool = new type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n\nfunction isHexCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n if (data === null) return false;\n\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n\n if (!max) return false;\n\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n\n if (ch === '0') {\n // 0\n if (index + 1 === max) return true;\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch !== '0' && ch !== '1') return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'x') {\n // base 16\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isHexCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'o') {\n // base 8\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isOctCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n }\n\n // base 10 (except 0)\n\n // value should not start with `_`;\n if (ch === '_') return false;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n // Should have digits and should not end with `_`\n if (!hasDigits || ch === '_') return false;\n\n return true;\n}\n\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch;\n\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n\n ch = value[0];\n\n if (ch === '-' || ch === '+') {\n if (ch === '-') sign = -1;\n value = value.slice(1);\n ch = value[0];\n }\n\n if (value === '0') return 0;\n\n if (ch === '0') {\n if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);\n if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);\n }\n\n return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n return (Object.prototype.toString.call(object)) === '[object Number]' &&\n (object % 1 === 0 && !common.isNegativeZero(object));\n}\n\nvar int = new type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },\n octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); },\n decimal: function (obj) { return obj.toString(10); },\n /* eslint-disable max-len */\n hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [ 2, 'bin' ],\n octal: [ 8, 'oct' ],\n decimal: [ 10, 'dec' ],\n hexadecimal: [ 16, 'hex' ]\n }\n});\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n // special case, seems not from spec\n '|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n if (data === null) return false;\n\n if (!YAML_FLOAT_PATTERN.test(data) ||\n // Quick hack to not allow integers end with `_`\n // Probably should update regexp & check speed\n data[data.length - 1] === '_') {\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlFloat(data) {\n var value, sign;\n\n value = data.replace(/_/g, '').toLowerCase();\n sign = value[0] === '-' ? -1 : 1;\n\n if ('+-'.indexOf(value[0]) >= 0) {\n value = value.slice(1);\n }\n\n if (value === '.inf') {\n return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n } else if (value === '.nan') {\n return NaN;\n }\n return sign * parseFloat(value, 10);\n}\n\n\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\n\nfunction representYamlFloat(object, style) {\n var res;\n\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase': return '.nan';\n case 'uppercase': return '.NAN';\n case 'camelcase': return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '.inf';\n case 'uppercase': return '.INF';\n case 'camelcase': return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '-.inf';\n case 'uppercase': return '-.INF';\n case 'camelcase': return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n\n res = object.toString(10);\n\n // JS stringifier can build scientific format without dots: 5e-100,\n // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\n\nfunction isFloat(object) {\n return (Object.prototype.toString.call(object) === '[object Number]') &&\n (object % 1 !== 0 || common.isNegativeZero(object));\n}\n\nvar float = new type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n\nvar json = failsafe.extend({\n implicit: [\n _null,\n bool,\n int,\n float\n ]\n});\n\nvar core = json;\n\nvar YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9])' + // [2] month\n '-([0-9][0-9])$'); // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9]?)' + // [2] month\n '-([0-9][0-9]?)' + // [3] day\n '(?:[Tt]|[ \\\\t]+)' + // ...\n '([0-9][0-9]?)' + // [4] hour\n ':([0-9][0-9])' + // [5] minute\n ':([0-9][0-9])' + // [6] second\n '(?:\\\\.([0-9]*))?' + // [7] fraction\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n '(?::([0-9][0-9]))?))?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (data === null) return false;\n if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n return false;\n}\n\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_DATE_REGEXP.exec(data);\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (match === null) throw new Error('Date resolve error');\n\n // match: [1] year [2] month [3] day\n\n year = +(match[1]);\n month = +(match[2]) - 1; // JS month starts with 0\n day = +(match[3]);\n\n if (!match[4]) { // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) { // milli-seconds\n fraction += '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if (match[9] === '-') delta = -delta;\n }\n\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n if (delta) date.setTime(date.getTime() - delta);\n\n return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\n\nvar timestamp = new type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n\nfunction resolveYamlMerge(data) {\n return data === '<<' || data === null;\n}\n\nvar merge = new type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n\n/*eslint-disable no-bitwise*/\n\n\n\n\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\n\n\nfunction resolveYamlBinary(data) {\n if (data === null) return false;\n\n var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;\n\n // Convert one by one.\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n\n // Skip CR/LF\n if (code > 64) continue;\n\n // Fail on illegal characters\n if (code < 0) return false;\n\n bitlen += 6;\n }\n\n // If there are any bits left, source was corrupted\n return (bitlen % 8) === 0;\n}\n\nfunction constructYamlBinary(data) {\n var idx, tailbits,\n input = data.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n max = input.length,\n map = BASE64_MAP,\n bits = 0,\n result = [];\n\n // Collect by 6*4 bits (3 bytes)\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n\n bits = (bits << 6) | map.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n tailbits = (max % 4) * 6;\n\n if (tailbits === 0) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n } else if (tailbits === 18) {\n result.push((bits >> 10) & 0xFF);\n result.push((bits >> 2) & 0xFF);\n } else if (tailbits === 12) {\n result.push((bits >> 4) & 0xFF);\n }\n\n return new Uint8Array(result);\n}\n\nfunction representYamlBinary(object /*, style*/) {\n var result = '', bits = 0, idx, tail,\n max = object.length,\n map = BASE64_MAP;\n\n // Convert every three bytes to 4 ASCII characters.\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 3 === 0) && idx) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n\n bits = (bits << 8) + object[idx];\n }\n\n // Dump tail\n\n tail = max % 3;\n\n if (tail === 0) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n } else if (tail === 2) {\n result += map[(bits >> 10) & 0x3F];\n result += map[(bits >> 4) & 0x3F];\n result += map[(bits << 2) & 0x3F];\n result += map[64];\n } else if (tail === 1) {\n result += map[(bits >> 2) & 0x3F];\n result += map[(bits << 4) & 0x3F];\n result += map[64];\n result += map[64];\n }\n\n return result;\n}\n\nfunction isBinary(obj) {\n return Object.prototype.toString.call(obj) === '[object Uint8Array]';\n}\n\nvar binary = new type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\n\nvar _hasOwnProperty$3 = Object.prototype.hasOwnProperty;\nvar _toString$2 = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n if (data === null) return true;\n\n var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n object = data;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n\n if (_toString$2.call(pair) !== '[object Object]') return false;\n\n for (pairKey in pair) {\n if (_hasOwnProperty$3.call(pair, pairKey)) {\n if (!pairHasKey) pairHasKey = true;\n else return false;\n }\n }\n\n if (!pairHasKey) return false;\n\n if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\n else return false;\n }\n\n return true;\n}\n\nfunction constructYamlOmap(data) {\n return data !== null ? data : [];\n}\n\nvar omap = new type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n\nvar _toString$1 = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n if (data === null) return true;\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n if (_toString$1.call(pair) !== '[object Object]') return false;\n\n keys = Object.keys(pair);\n\n if (keys.length !== 1) return false;\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return true;\n}\n\nfunction constructYamlPairs(data) {\n if (data === null) return [];\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n keys = Object.keys(pair);\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return result;\n}\n\nvar pairs = new type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n\nvar _hasOwnProperty$2 = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n if (data === null) return true;\n\n var key, object = data;\n\n for (key in object) {\n if (_hasOwnProperty$2.call(object, key)) {\n if (object[key] !== null) return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlSet(data) {\n return data !== null ? data : {};\n}\n\nvar set = new type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n\nvar _default = core.extend({\n implicit: [\n timestamp,\n merge\n ],\n explicit: [\n binary,\n omap,\n pairs,\n set\n ]\n});\n\n/*eslint-disable max-len,no-use-before-define*/\n\n\n\n\n\n\n\nvar _hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\n\n\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction is_EOL(c) {\n return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09/* Tab */) ||\n (c === 0x20/* Space */) ||\n (c === 0x0A/* LF */) ||\n (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */;\n}\n\nfunction fromHexCode(c) {\n var lc;\n\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n\n if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n return lc - 0x61 + 10;\n }\n\n return -1;\n}\n\nfunction escapedHexLen(c) {\n if (c === 0x78/* x */) { return 2; }\n if (c === 0x75/* u */) { return 4; }\n if (c === 0x55/* U */) { return 8; }\n return 0;\n}\n\nfunction fromDecimalCode(c) {\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n /* eslint-disable indent */\n return (c === 0x30/* 0 */) ? '\\x00' :\n (c === 0x61/* a */) ? '\\x07' :\n (c === 0x62/* b */) ? '\\x08' :\n (c === 0x74/* t */) ? '\\x09' :\n (c === 0x09/* Tab */) ? '\\x09' :\n (c === 0x6E/* n */) ? '\\x0A' :\n (c === 0x76/* v */) ? '\\x0B' :\n (c === 0x66/* f */) ? '\\x0C' :\n (c === 0x72/* r */) ? '\\x0D' :\n (c === 0x65/* e */) ? '\\x1B' :\n (c === 0x20/* Space */) ? ' ' :\n (c === 0x22/* \" */) ? '\\x22' :\n (c === 0x2F/* / */) ? '/' :\n (c === 0x5C/* \\ */) ? '\\x5C' :\n (c === 0x4E/* N */) ? '\\x85' :\n (c === 0x5F/* _ */) ? '\\xA0' :\n (c === 0x4C/* L */) ? '\\u2028' :\n (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n );\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\n\n\nfunction State$1(input, options) {\n this.input = input;\n\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || _default;\n this.onWarning = options['onWarning'] || null;\n // (Hidden) Remove? makes the loader to expect YAML 1.1 documents\n // if such documents have no explicit %YAML directive\n this.legacy = options['legacy'] || false;\n\n this.json = options['json'] || false;\n this.listener = options['listener'] || null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n // position of first leading tab in the current line,\n // used to make sure there are no tabs in the indentation\n this.firstTabInLine = -1;\n\n this.documents = [];\n\n /*\n this.version;\n this.checkLineBreaks;\n this.tagMap;\n this.anchorMap;\n this.tag;\n this.anchor;\n this.kind;\n this.result;*/\n\n}\n\n\nfunction generateError(state, message) {\n var mark = {\n name: state.filename,\n buffer: state.input.slice(0, -1), // omit trailing \\0\n position: state.position,\n line: state.line,\n column: state.position - state.lineStart\n };\n\n mark.snippet = snippet(mark);\n\n return new exception(message, mark);\n}\n\nfunction throwError(state, message) {\n throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n if (state.onWarning) {\n state.onWarning.call(null, generateError(state, message));\n }\n}\n\n\nvar directiveHandlers = {\n\n YAML: function handleYamlDirective(state, name, args) {\n\n var match, major, minor;\n\n if (state.version !== null) {\n throwError(state, 'duplication of %YAML directive');\n }\n\n if (args.length !== 1) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n if (match === null) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n\n if (major !== 1) {\n throwError(state, 'unacceptable YAML version of the document');\n }\n\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n\n if (minor !== 1 && minor !== 2) {\n throwWarning(state, 'unsupported YAML version of the document');\n }\n },\n\n TAG: function handleTagDirective(state, name, args) {\n\n var handle, prefix;\n\n if (args.length !== 2) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n\n handle = args[0];\n prefix = args[1];\n\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n\n if (_hasOwnProperty$1.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n\n try {\n prefix = decodeURIComponent(prefix);\n } catch (err) {\n throwError(state, 'tag prefix is malformed: ' + prefix);\n }\n\n state.tagMap[handle] = prefix;\n }\n};\n\n\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n\n if (start < end) {\n _result = state.input.slice(start, end);\n\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(_character === 0x09 ||\n (0x20 <= _character && _character <= 0x10FFFF))) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n\n state.result += _result;\n }\n}\n\nfunction mergeMappings(state, destination, source, overridableKeys) {\n var sourceKeys, key, index, quantity;\n\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n\n sourceKeys = Object.keys(source);\n\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n\n if (!_hasOwnProperty$1.call(destination, key)) {\n destination[key] = source[key];\n overridableKeys[key] = true;\n }\n }\n}\n\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode,\n startLine, startLineStart, startPos) {\n\n var index, quantity;\n\n // The output is a plain object here, so keys can only be strings.\n // We need to convert keyNode to a string, but doing so can hang the process\n // (deeply nested arrays that explode exponentially using aliases).\n if (Array.isArray(keyNode)) {\n keyNode = Array.prototype.slice.call(keyNode);\n\n for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {\n if (Array.isArray(keyNode[index])) {\n throwError(state, 'nested arrays are not supported inside keys');\n }\n\n if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {\n keyNode[index] = '[object Object]';\n }\n }\n }\n\n // Avoid code execution in load() via toString property\n // (still use its own toString for arrays, timestamps,\n // and whatever user schema extensions happen to have @@toStringTag)\n if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {\n keyNode = '[object Object]';\n }\n\n\n keyNode = String(keyNode);\n\n if (_result === null) {\n _result = {};\n }\n\n if (keyTag === 'tag:yaml.org,2002:merge') {\n if (Array.isArray(valueNode)) {\n for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n mergeMappings(state, _result, valueNode[index], overridableKeys);\n }\n } else {\n mergeMappings(state, _result, valueNode, overridableKeys);\n }\n } else {\n if (!state.json &&\n !_hasOwnProperty$1.call(overridableKeys, keyNode) &&\n _hasOwnProperty$1.call(_result, keyNode)) {\n state.line = startLine || state.line;\n state.lineStart = startLineStart || state.lineStart;\n state.position = startPos || state.position;\n throwError(state, 'duplicated mapping key');\n }\n\n // used for this specific key only because Object.defineProperty is slow\n if (keyNode === '__proto__') {\n Object.defineProperty(_result, keyNode, {\n configurable: true,\n enumerable: true,\n writable: true,\n value: valueNode\n });\n } else {\n _result[keyNode] = valueNode;\n }\n delete overridableKeys[keyNode];\n }\n\n return _result;\n}\n\nfunction readLineBreak(state) {\n var ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x0A/* LF */) {\n state.position++;\n } else if (ch === 0x0D/* CR */) {\n state.position++;\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n\n state.line += 1;\n state.lineStart = state.position;\n state.firstTabInLine = -1;\n}\n\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {\n state.firstTabInLine = state.position;\n }\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (allowComments && ch === 0x23/* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\n }\n\n if (is_EOL(ch)) {\n readLineBreak(state);\n\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n\n if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n\n return lineBreaks;\n}\n\nfunction testDocumentSeparator(state) {\n var _position = state.position,\n ch;\n\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(_position + 1) &&\n ch === state.input.charCodeAt(_position + 2)) {\n\n _position += 3;\n\n ch = state.input.charCodeAt(_position);\n\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction writeFoldedLines(state, count) {\n if (count === 1) {\n state.result += ' ';\n } else if (count > 1) {\n state.result += common.repeat('\\n', count - 1);\n }\n}\n\n\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */) {\n return false;\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n\n state.kind = 'scalar';\n state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n\n while (ch !== 0) {\n if (ch === 0x3A/* : */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n\n } else if (ch === 0x23/* # */) {\n preceding = state.input.charCodeAt(state.position - 1);\n\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n\n } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, captureEnd, false);\n\n if (state.result) {\n return true;\n }\n\n state.kind = _kind;\n state.result = _result;\n return false;\n}\n\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch,\n captureStart, captureEnd;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x27/* ' */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x27/* ' */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x27/* ' */) {\n captureStart = state.position;\n state.position++;\n captureEnd = state.position;\n } else {\n return true;\n }\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart,\n captureEnd,\n hexLength,\n hexResult,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x22/* \" */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x22/* \" */) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n return true;\n\n } else if (ch === 0x5C/* \\ */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && simpleEscapeCheck[ch]) {\n state.result += simpleEscapeMap[ch];\n state.position++;\n\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n\n state.result += charFromCodepoint(hexResult);\n\n state.position++;\n\n } else {\n throwError(state, 'unknown escape sequence');\n }\n\n captureStart = captureEnd = state.position;\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true,\n _line,\n _lineStart,\n _pos,\n _tag = state.tag,\n _result,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n overridableKeys = Object.create(null),\n keyNode,\n keyTag,\n valueNode,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x5B/* [ */) {\n terminator = 0x5D;/* ] */\n isMapping = false;\n _result = [];\n } else if (ch === 0x7B/* { */) {\n terminator = 0x7D;/* } */\n isMapping = true;\n _result = {};\n } else {\n return false;\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n while (ch !== 0) {\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n return true;\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries');\n } else if (ch === 0x2C/* , */) {\n // \"flow collection entries can never be completely empty\", as per YAML 1.2, section 7.4\n throwError(state, \"expected the node content, but found ','\");\n }\n\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n\n if (ch === 0x3F/* ? */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n\n _line = state.line; // Save the current line.\n _lineStart = state.lineStart;\n _pos = state.position;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n\n if (isMapping) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);\n } else if (isPair) {\n _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));\n } else {\n _result.push(keyNode);\n }\n\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x2C/* , */) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n didReadContent = false,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x7C/* | */) {\n folding = false;\n } else if (ch === 0x3E/* > */) {\n folding = true;\n } else {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n\n while (ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n\n } else {\n break;\n }\n }\n\n if (is_WHITE_SPACE(ch)) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (is_WHITE_SPACE(ch));\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (!is_EOL(ch) && (ch !== 0));\n }\n }\n\n while (ch !== 0) {\n readLineBreak(state);\n state.lineIndent = 0;\n\n ch = state.input.charCodeAt(state.position);\n\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (ch === 0x20/* Space */)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (didReadContent) { // i.e. only if the scalar is not empty.\n state.result += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n // except for the first content line (cf. Example 8.1)\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n state.result += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (emptyLines === 0) {\n if (didReadContent) { // i.e. only if we have already read some scalar content.\n state.result += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n state.result += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else {\n // Keep all line breaks except the header line break.\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n }\n\n didReadContent = true;\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n\n while (!is_EOL(ch) && (ch !== 0)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, state.position, false);\n }\n\n return true;\n}\n\nfunction readBlockSequence(state, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = [],\n following,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n if (ch !== 0x2D/* - */) {\n break;\n }\n\n following = state.input.charCodeAt(state.position + 1);\n\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n\n detected = true;\n state.position++;\n\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n _result.push(state.result);\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n return true;\n }\n return false;\n}\n\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _keyLine,\n _keyLineStart,\n _keyPos,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = {},\n overridableKeys = Object.create(null),\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (!atExplicitKey && state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n }\n\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n\n if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n // Neither implicit nor explicit notation.\n // Reading is done. Go to the epilogue.\n break;\n }\n\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position);\n\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (atExplicitKey) {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n }\n\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n\n if (!atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n\n return detected;\n}\n\nfunction readTagProperty(state) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x21/* ! */) return false;\n\n if (state.tag !== null) {\n throwError(state, 'duplication of a tag property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n\n } else if (ch === 0x21/* ! */) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n\n } else {\n tagHandle = '!';\n }\n\n _position = state.position;\n\n if (isVerbatim) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && ch !== 0x3E/* > */);\n\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n tagName = state.input.slice(_position, state.position);\n\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n\n try {\n tagName = decodeURIComponent(tagName);\n } catch (err) {\n throwError(state, 'tag name is malformed: ' + tagName);\n }\n\n if (isVerbatim) {\n state.tag = tagName;\n\n } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n\n } else if (tagHandle === '!') {\n state.tag = '!' + tagName;\n\n } else if (tagHandle === '!!') {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n\n return true;\n}\n\nfunction readAnchorProperty(state) {\n var _position,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x26/* & */) return false;\n\n if (state.anchor !== null) {\n throwError(state, 'duplication of an anchor property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\n\nfunction readAlias(state) {\n var _position, alias,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x2A/* * */) return false;\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n }\n\n alias = state.input.slice(_position, state.position);\n\n if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n }\n\n state.result = state.anchorMap[alias];\n skipSeparationSpace(state, true, -1);\n return true;\n}\n\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n\n if (indentStatus === 1) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n\n if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n\n blockIndent = state.position - state.lineStart;\n\n if (indentStatus === 1) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n\n } else if (readAlias(state)) {\n hasContent = true;\n\n if (state.tag !== null || state.anchor !== null) {\n throwError(state, 'alias node should not have any properties');\n }\n\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n\n if (state.tag === null) {\n state.tag = '?';\n }\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else if (indentStatus === 0) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n\n if (state.tag === null) {\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n\n } else if (state.tag === '?') {\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only automatically assigned to plain scalars.\n //\n // We only need to check kind conformity in case user explicitly assigns '?'\n // tag, for example like this: \"! [0]\"\n //\n if (state.result !== null && state.kind !== 'scalar') {\n throwError(state, 'unacceptable node kind for ! tag; it should be \"scalar\", not \"' + state.kind + '\"');\n }\n\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n\n if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\n state.result = type.construct(state.result);\n state.tag = type.tag;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (state.tag !== '!') {\n if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n type = state.typeMap[state.kind || 'fallback'][state.tag];\n } else {\n // looking for multi type\n type = null;\n typeList = state.typeMap.multi[state.kind || 'fallback'];\n\n for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {\n if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {\n type = typeList[typeIndex];\n break;\n }\n }\n }\n\n if (!type) {\n throwError(state, 'unknown tag !<' + state.tag + '>');\n }\n\n if (state.result !== null && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n\n if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result, state.tag);\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n }\n\n if (state.listener !== null) {\n state.listener('close', state);\n }\n return state.tag !== null || state.anchor !== null || hasContent;\n}\n\nfunction readDocument(state) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = Object.create(null);\n state.anchorMap = Object.create(null);\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if (state.lineIndent > 0 || ch !== 0x25/* % */) {\n break;\n }\n\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && !is_EOL(ch));\n break;\n }\n\n if (is_EOL(ch)) break;\n\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n\n if (ch !== 0) readLineBreak(state);\n\n if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n }\n }\n\n skipSeparationSpace(state, true, -1);\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n\n state.documents.push(state.result);\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\n\n\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n\n if (input.length !== 0) {\n\n // Add tailing `\\n` if not exists\n if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\n input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n\n var state = new State$1(input, options);\n\n var nullpos = input.indexOf('\\0');\n\n if (nullpos !== -1) {\n state.position = nullpos;\n throwError(state, 'null byte is not allowed in input');\n }\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n\n while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\n state.lineIndent += 1;\n state.position += 1;\n }\n\n while (state.position < (state.length - 1)) {\n readDocument(state);\n }\n\n return state.documents;\n}\n\n\nfunction loadAll$1(input, iterator, options) {\n if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {\n options = iterator;\n iterator = null;\n }\n\n var documents = loadDocuments(input, options);\n\n if (typeof iterator !== 'function') {\n return documents;\n }\n\n for (var index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\n\n\nfunction load$1(input, options) {\n var documents = loadDocuments(input, options);\n\n if (documents.length === 0) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (documents.length === 1) {\n return documents[0];\n }\n throw new exception('expected a single document in the stream, but found more');\n}\n\n\nvar loadAll_1 = loadAll$1;\nvar load_1 = load$1;\n\nvar loader = {\n\tloadAll: loadAll_1,\n\tload: load_1\n};\n\n/*eslint-disable no-use-before-define*/\n\n\n\n\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_BOM = 0xFEFF;\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_CARRIAGE_RETURN = 0x0D; /* CR */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_EQUALS = 0x3D; /* = */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nvar DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;\n\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n\n if (map === null) return {};\n\n result = {};\n keys = Object.keys(map);\n\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n\n if (tag.slice(0, 2) === '!!') {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap['fallback'][tag];\n\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n\n result[tag] = style;\n }\n\n return result;\n}\n\nfunction encodeHex(character) {\n var string, handle, length;\n\n string = character.toString(16).toUpperCase();\n\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new exception('code point within a string may not be greater than 0xFFFFFFFF');\n }\n\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\n\nvar QUOTING_TYPE_SINGLE = 1,\n QUOTING_TYPE_DOUBLE = 2;\n\nfunction State(options) {\n this.schema = options['schema'] || _default;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.noArrayIndent = options['noArrayIndent'] || false;\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.sortKeys = options['sortKeys'] || false;\n this.lineWidth = options['lineWidth'] || 80;\n this.noRefs = options['noRefs'] || false;\n this.noCompatMode = options['noCompatMode'] || false;\n this.condenseFlow = options['condenseFlow'] || false;\n this.quotingType = options['quotingType'] === '\"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;\n this.forceQuotes = options['forceQuotes'] || false;\n this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n\n this.tag = null;\n this.result = '';\n\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n\n if (line.length && line !== '\\n') result += ind;\n\n result += line;\n }\n\n return result;\n}\n\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n\n if (type.resolve(str)) {\n return true;\n }\n }\n\n return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn’t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n return (0x00020 <= c && c <= 0x00007E)\n || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)\n || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)\n || (0x10000 <= c && c <= 0x10FFFF);\n}\n\n// [34] ns-char ::= nb-char - s-white\n// [27] nb-char ::= c-printable - b-char - c-byte-order-mark\n// [26] b-char ::= b-line-feed | b-carriage-return\n// Including s-white (for some reason, examples doesn't match specs in this aspect)\n// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark\nfunction isNsCharOrWhitespace(c) {\n return isPrintable(c)\n && c !== CHAR_BOM\n // - b-char\n && c !== CHAR_CARRIAGE_RETURN\n && c !== CHAR_LINE_FEED;\n}\n\n// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out\n// c = flow-in ⇒ ns-plain-safe-in\n// c = block-key ⇒ ns-plain-safe-out\n// c = flow-key ⇒ ns-plain-safe-in\n// [128] ns-plain-safe-out ::= ns-char\n// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator\n// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” )\n// | ( /* An ns-char preceding */ “#” )\n// | ( “:” /* Followed by an ns-plain-safe(c) */ )\nfunction isPlainSafe(c, prev, inblock) {\n var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);\n var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);\n return (\n // ns-plain-safe\n inblock ? // c = flow-in\n cIsNsCharOrWhitespace\n : cIsNsCharOrWhitespace\n // - c-flow-indicator\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n )\n // ns-plain-char\n && c !== CHAR_SHARP // false on '#'\n && !(prev === CHAR_COLON && !cIsNsChar) // false on ': '\n || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'\n || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}\n\n// Simplified test for values allowed as the last character in plain style.\nfunction isPlainSafeLast(c) {\n // just not whitespace or colon, it will be checked to be plain character later\n return !isWhitespace(c) && c !== CHAR_COLON;\n}\n\n// Same as 'string'.codePointAt(pos), but works in older browsers.\nfunction codePointAt(string, pos) {\n var first = string.charCodeAt(pos), second;\n if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {\n second = string.charCodeAt(pos + 1);\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n }\n }\n return first;\n}\n\n// Determines whether block indentation indicator is required.\nfunction needIndentIndicator(string) {\n var leadingSpaceRe = /^\\n* /;\n return leadingSpaceRe.test(string);\n}\n\nvar STYLE_PLAIN = 1,\n STYLE_SINGLE = 2,\n STYLE_LITERAL = 3,\n STYLE_FOLDED = 4,\n STYLE_DOUBLE = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n// STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,\n testAmbiguousType, quotingType, forceQuotes, inblock) {\n\n var i;\n var char = 0;\n var prevChar = null;\n var hasLineBreak = false;\n var hasFoldableLine = false; // only checked if shouldTrackWidth\n var shouldTrackWidth = lineWidth !== -1;\n var previousLineBreak = -1; // count the first line correctly\n var plain = isPlainSafeFirst(codePointAt(string, 0))\n && isPlainSafeLast(codePointAt(string, string.length - 1));\n\n if (singleLineOnly || forceQuotes) {\n // Case: no block styles.\n // Check for disallowed characters to rule out plain and single.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n } else {\n // Case: block styles permitted.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (char === CHAR_LINE_FEED) {\n hasLineBreak = true;\n // Check if any line can be folded.\n if (shouldTrackWidth) {\n hasFoldableLine = hasFoldableLine ||\n // Foldable line = too long, and not more-indented.\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' ');\n previousLineBreak = i;\n }\n } else if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n // in case the end is missing a \\n\n hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' '));\n }\n // Although every style can represent \\n without escaping, prefer block styles\n // for multiline, since they're more readable and they don't add empty lines.\n // Also prefer folding a super-long line.\n if (!hasLineBreak && !hasFoldableLine) {\n // Strings interpretable as another type have to be quoted;\n // e.g. the string 'true' vs. the boolean true.\n if (plain && !forceQuotes && !testAmbiguousType(string)) {\n return STYLE_PLAIN;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n }\n // Edge case: block indentation indicator can only have one digit.\n if (indentPerLevel > 9 && needIndentIndicator(string)) {\n return STYLE_DOUBLE;\n }\n // At this point we know block styles are valid.\n // Prefer literal style unless we want to fold.\n if (!forceQuotes) {\n return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n// since the dumper adds its own newline. This always works:\n// • No ending newline => unaffected; already using strip \"-\" chomping.\n// • Ending newline => removed then restored.\n// Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey, inblock) {\n state.dump = (function () {\n if (string.length === 0) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? '\"\"' : \"''\";\n }\n if (!state.noCompatMode) {\n if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? ('\"' + string + '\"') : (\"'\" + string + \"'\");\n }\n }\n\n var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n // As indentation gets deeper, let the width decrease monotonically\n // to the lower bound min(state.lineWidth, 40).\n // Note that this implies\n // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.\n // state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n // This behaves better than a constant minimum width which disallows narrower options,\n // or an indent threshold which causes the width to suddenly increase.\n var lineWidth = state.lineWidth === -1\n ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n // Without knowing if keys are implicit/explicit, assume implicit for safety.\n var singleLineOnly = iskey\n // No block styles in flow mode.\n || (state.flowLevel > -1 && level >= state.flowLevel);\n function testAmbiguity(string) {\n return testImplicitResolving(state, string);\n }\n\n switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,\n testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {\n\n case STYLE_PLAIN:\n return string;\n case STYLE_SINGLE:\n return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n case STYLE_LITERAL:\n return '|' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(string, indent));\n case STYLE_FOLDED:\n return '>' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n case STYLE_DOUBLE:\n return '\"' + escapeString(string) + '\"';\n default:\n throw new exception('impossible error: invalid scalar style');\n }\n }());\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';\n\n // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n var clip = string[string.length - 1] === '\\n';\n var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n var chomp = keep ? '+' : (clip ? '' : '-');\n\n return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n // In folded style, $k$ consecutive newlines output as $k+1$ newlines—\n // unless they're before or after a more-indented line, or at the very\n // beginning or end, in which case $k$ maps to $k$.\n // Therefore, parse each chunk as newline(s) followed by a content line.\n var lineRe = /(\\n+)([^\\n]*)/g;\n\n // first line (possibly an empty line)\n var result = (function () {\n var nextLF = string.indexOf('\\n');\n nextLF = nextLF !== -1 ? nextLF : string.length;\n lineRe.lastIndex = nextLF;\n return foldLine(string.slice(0, nextLF), width);\n }());\n // If we haven't reached the first content line yet, don't add an extra \\n.\n var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n var moreIndented;\n\n // rest of the lines\n var match;\n while ((match = lineRe.exec(string))) {\n var prefix = match[1], line = match[2];\n moreIndented = (line[0] === ' ');\n result += prefix\n + (!prevMoreIndented && !moreIndented && line !== ''\n ? '\\n' : '')\n + foldLine(line, width);\n prevMoreIndented = moreIndented;\n }\n\n return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n if (line === '' || line[0] === ' ') return line;\n\n // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n var match;\n // start is an inclusive index. end, curr, and next are exclusive.\n var start = 0, end, curr = 0, next = 0;\n var result = '';\n\n // Invariants: 0 <= start <= length-1.\n // 0 <= curr <= next <= max(0, length-2). curr - start <= width.\n // Inside the loop:\n // A match implies length >= 2, so curr and next are <= length-2.\n while ((match = breakRe.exec(line))) {\n next = match.index;\n // maintain invariant: curr - start <= width\n if (next - start > width) {\n end = (curr > start) ? curr : next; // derive end <= length-2\n result += '\\n' + line.slice(start, end);\n // skip the space that was output as \\n\n start = end + 1; // derive start <= length-1\n }\n curr = next;\n }\n\n // By the invariants, start <= length-1, so there is something left over.\n // It is either the whole string or a part starting from non-whitespace.\n result += '\\n';\n // Insert a break if the remainder is too long and there is a break available.\n if (line.length - start > width && curr > start) {\n result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n } else {\n result += line.slice(start);\n }\n\n return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n var result = '';\n var char = 0;\n var escapeSeq;\n\n for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n escapeSeq = ESCAPE_SEQUENCES[char];\n\n if (!escapeSeq && isPrintable(char)) {\n result += string[i];\n if (char >= 0x10000) result += string[i + 1];\n } else {\n result += escapeSeq || encodeHex(char);\n }\n }\n\n return result;\n}\n\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level, value, false, false) ||\n (typeof value === 'undefined' &&\n writeNode(state, level, null, false, false))) {\n\n if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level + 1, value, true, true, false, true) ||\n (typeof value === 'undefined' &&\n writeNode(state, level + 1, null, true, true, false, true))) {\n\n if (!compact || _result !== '') {\n _result += generateNextLine(state, level);\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n _result += '-';\n } else {\n _result += '- ';\n }\n\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n\n pairBuffer = '';\n if (_result !== '') pairBuffer += ', ';\n\n if (state.condenseFlow) pairBuffer += '\"';\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n\n if (state.dump.length > 1024) pairBuffer += '? ';\n\n pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n // Allow sorting keys so that the output file is deterministic\n if (state.sortKeys === true) {\n // Default sorting\n objectKeyList.sort();\n } else if (typeof state.sortKeys === 'function') {\n // Custom sort function\n objectKeyList.sort(state.sortKeys);\n } else if (state.sortKeys) {\n // Something is wrong\n throw new exception('sortKeys must be a boolean or a function');\n }\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (!compact || _result !== '') {\n pairBuffer += generateNextLine(state, level);\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n\n explicitPair = (state.tag !== null && state.tag !== '?') ||\n (state.dump && state.dump.length > 1024);\n\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n\n pairBuffer += state.dump;\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n\n if (explicit) {\n if (type.multi && type.representName) {\n state.tag = type.representName(object);\n } else {\n state.tag = type.tag;\n }\n } else {\n state.tag = '?';\n }\n\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n\n if (_toString.call(type.represent) === '[object Function]') {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new exception('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n\n state.dump = _result;\n }\n\n return true;\n }\n }\n\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey, isblockseq) {\n state.tag = null;\n state.dump = object;\n\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n\n var type = _toString.call(state.dump);\n var inblock = block;\n var tagStr;\n\n if (block) {\n block = (state.flowLevel < 0 || state.flowLevel > level);\n }\n\n var objectOrArray = type === '[object Object]' || type === '[object Array]',\n duplicateIndex,\n duplicate;\n\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n\n if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\n compact = false;\n }\n\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if (type === '[object Object]') {\n if (block && (Object.keys(state.dump).length !== 0)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object Array]') {\n if (block && (state.dump.length !== 0)) {\n if (state.noArrayIndent && !isblockseq && level > 0) {\n writeBlockSequence(state, level - 1, state.dump, compact);\n } else {\n writeBlockSequence(state, level, state.dump, compact);\n }\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowSequence(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object String]') {\n if (state.tag !== '?') {\n writeScalar(state, state.dump, level, iskey, inblock);\n }\n } else if (type === '[object Undefined]') {\n return false;\n } else {\n if (state.skipInvalid) return false;\n throw new exception('unacceptable kind of an object to dump ' + type);\n }\n\n if (state.tag !== null && state.tag !== '?') {\n // Need to encode all characters except those allowed by the spec:\n //\n // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */\n // [36] ns-hex-digit ::= ns-dec-digit\n // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */\n // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */\n // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-”\n // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#”\n // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,”\n // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]”\n //\n // Also need to encode '!' because it has special meaning (end of tag prefix).\n //\n tagStr = encodeURI(\n state.tag[0] === '!' ? state.tag.slice(1) : state.tag\n ).replace(/!/g, '%21');\n\n if (state.tag[0] === '!') {\n tagStr = '!' + tagStr;\n } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {\n tagStr = '!!' + tagStr.slice(18);\n } else {\n tagStr = '!<' + tagStr + '>';\n }\n\n state.dump = tagStr + ' ' + state.dump;\n }\n }\n\n return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n\n inspectNode(object, objects, duplicatesIndexes);\n\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var objectKeyList,\n index,\n length;\n\n if (object !== null && typeof object === 'object') {\n index = objects.indexOf(object);\n if (index !== -1) {\n if (duplicatesIndexes.indexOf(index) === -1) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\n\nfunction dump$1(input, options) {\n options = options || {};\n\n var state = new State(options);\n\n if (!state.noRefs) getDuplicateReferences(input, state);\n\n var value = input;\n\n if (state.replacer) {\n value = state.replacer.call({ '': value }, '', value);\n }\n\n if (writeNode(state, 0, value, true, true)) return state.dump + '\\n';\n\n return '';\n}\n\nvar dump_1 = dump$1;\n\nvar dumper = {\n\tdump: dump_1\n};\n\nfunction renamed(from, to) {\n return function () {\n throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' +\n 'Use yaml.' + to + ' instead, which is now safe by default.');\n };\n}\n\n\nvar Type = type;\nvar Schema = schema;\nvar FAILSAFE_SCHEMA = failsafe;\nvar JSON_SCHEMA = json;\nvar CORE_SCHEMA = core;\nvar DEFAULT_SCHEMA = _default;\nvar load = loader.load;\nvar loadAll = loader.loadAll;\nvar dump = dumper.dump;\nvar YAMLException = exception;\n\n// Re-export all types in case user wants to create custom schema\nvar types = {\n binary: binary,\n float: float,\n map: map,\n null: _null,\n pairs: pairs,\n set: set,\n timestamp: timestamp,\n bool: bool,\n int: int,\n merge: merge,\n omap: omap,\n seq: seq,\n str: str\n};\n\n// Removed functions from JS-YAML 3.0.x\nvar safeLoad = renamed('safeLoad', 'load');\nvar safeLoadAll = renamed('safeLoadAll', 'loadAll');\nvar safeDump = renamed('safeDump', 'dump');\n\nvar jsYaml = {\n\tType: Type,\n\tSchema: Schema,\n\tFAILSAFE_SCHEMA: FAILSAFE_SCHEMA,\n\tJSON_SCHEMA: JSON_SCHEMA,\n\tCORE_SCHEMA: CORE_SCHEMA,\n\tDEFAULT_SCHEMA: DEFAULT_SCHEMA,\n\tload: load,\n\tloadAll: loadAll,\n\tdump: dump,\n\tYAMLException: YAMLException,\n\ttypes: types,\n\tsafeLoad: safeLoad,\n\tsafeLoadAll: safeLoadAll,\n\tsafeDump: safeDump\n};\n\nexport default jsYaml;\nexport { CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types };\n","\n\n","\n","\n\n\n","/*!\n * jQuery JavaScript Library v3.6.4\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2023-03-08T15:28Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.6.4\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.10\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://js.foundation/\n *\n * Date: 2023-02-14\n */\n( function( window ) {\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ( {} ).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpushNative = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[ i ] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|\" +\n\t\t\"ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5]\n\t\t// or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" +\n\t\twhitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trleadingCombinator = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace +\n\t\t\"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trhtml = /HTML$/i,\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace + \"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\treturn nonHex ?\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\tnonHex :\n\n\t\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t\t// Support: IE <=11+\n\t\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t\t// surrogate pair\n\t\t\thigh < 0 ?\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" +\n\t\t\t\tch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && elem.nodeName.toLowerCase() === \"fieldset\";\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( ( target[ j++ ] = els[ i++ ] ) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&\n\n\t\t\t\t// Support: IE 8 only\n\t\t\t\t// Exclude object elements\n\t\t\t\t( nodeType !== 1 || context.nodeName.toLowerCase() !== \"object\" ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\tif ( newContext !== context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split( \"|\" ),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[ i ] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( ( cur = cur.nextSibling ) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn ( name === \"input\" || name === \"button\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\tvar namespace = elem && elem.namespaceURI,\n\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t// Support: IE <=8\n\t// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes\n\t// https://bugs.jquery.com/ticket/4833\n\treturn !rhtml.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( preferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,\n\t// Safari 4 - 5 only, Opera <=11.6 - 12.x only\n\t// IE/Edge & older browsers don't support the :scope pseudo-class.\n\t// Support: Safari 6.0 only\n\t// Safari 6.0 supports :scope but it's an alias of :root there.\n\tsupport.scope = assert( function( el ) {\n\t\tdocElem.appendChild( el ).appendChild( document.createElement( \"div\" ) );\n\t\treturn typeof el.querySelectorAll !== \"undefined\" &&\n\t\t\t!el.querySelectorAll( \":scope fieldset div\" ).length;\n\t} );\n\n\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n\t// Make sure the the `:has()` argument is parsed unforgivingly.\n\t// We include `*` in the test to detect buggy implementations that are\n\t// _selectively_ forgiving (specifically when the list includes at least\n\t// one valid selector).\n\t// Note that we treat complete lack of support for `:has()` as if it were\n\t// spec-compliant support, which is fine because use of `:has()` in such\n\t// environments will fail in the qSA path and fall back to jQuery traversal\n\t// anyway.\n\tsupport.cssHas = assert( function() {\n\t\ttry {\n\t\t\tdocument.querySelector( \":has(*,:jqfake)\" );\n\t\t\treturn false;\n\t\t} catch ( e ) {\n\t\t\treturn true;\n\t\t}\n\t} );\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert( function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute( \"className\" );\n\t} );\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert( function( el ) {\n\t\tel.appendChild( document.createComment( \"\" ) );\n\t\treturn !el.getElementsByTagName( \"*\" ).length;\n\t} );\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter[ \"ID\" ] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter[ \"ID\" ] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[ \"TAG\" ] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[ \"CLASS\" ] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {\n\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert( function( el ) {\n\n\t\t\tvar input;\n\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"\" +\n\t\t\t\t\"\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll( \"[msallowcapture^='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"~=\" );\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t\t// Adding a temporary attribute to the document before the selection works\n\t\t\t// around the issue.\n\t\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\t\tinput = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"name\", \"\" );\n\t\t\tel.appendChild( input );\n\t\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\t\trbuggyQSA.push( \":checked\" );\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t\t}\n\n\t\t\t// Support: Firefox <=3.6 - 5 only\n\t\t\t// Old Firefox doesn't throw on a badly-escaped identifier.\n\t\t\tel.querySelectorAll( \"\\\\\\f\" );\n\t\t\trbuggyQSA.push( \"[\\\\r\\\\n\\\\f]\" );\n\t\t} );\n\n\t\tassert( function( el ) {\n\t\t\tel.innerHTML = \"\" +\n\t\t\t\t\"\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll( \"[name=d]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll( \":enabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: Opera 10 - 11 only\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll( \"*,:x\" );\n\t\t\trbuggyQSA.push( \",.*:\" );\n\t\t} );\n\t}\n\n\tif ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector ) ) ) ) {\n\n\t\tassert( function( el ) {\n\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t} );\n\t}\n\n\tif ( !support.cssHas ) {\n\n\t\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n\t\t// Our regular `try-catch` mechanism fails to detect natively-unsupported\n\t\t// pseudo-classes inside `:has()` (such as `:has(:contains(\"Foo\"))`)\n\t\t// in browsers that parse the `:has()` argument as a forgiving selector list.\n\t\t// https://drafts.csswg.org/selectors/#relational now requires the argument\n\t\t// to be parsed unforgivingly, but browsers have not yet fully adjusted.\n\t\trbuggyQSA.push( \":has\" );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( \"|\" ) );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\n\t\t\t// Support: IE <9 only\n\t\t\t// IE doesn't have `contains` on `document` so we need to check for\n\t\t\t// `documentElement` presence.\n\t\t\t// We need to fall back to `a` when `documentElement` is missing\n\t\t\t// as `ownerDocument` of elements within `