oceanpress 1.0.3 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,283 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();const scriptRel="modulepreload",assetsURL=function(e,t){return new URL(e,t).href},seen={},__vitePreload=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){let u=function(f){return Promise.all(f.map(d=>Promise.resolve(d).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};const i=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");s=u(n.map(f=>{if(f=assetsURL(f,r),f in seen)return;seen[f]=!0;const d=f.endsWith(".css"),m=d?'[rel="stylesheet"]':"";if(!!r)for(let S=i.length-1;S>=0;S--){const R=i[S];if(R.href===f&&(!d||R.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${m}`))return;const b=document.createElement("link");if(b.rel=d?"stylesheet":scriptRel,d||(b.as="script"),b.crossOrigin="",b.href=f,l&&b.setAttribute("nonce",l),document.head.appendChild(b),d)return new Promise((S,R)=>{b.addEventListener("load",S),b.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return s.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})},isFunction$3=e=>typeof e=="function",dual=function(e,t){if(typeof e=="function")return function(){return e(arguments)?t.apply(this,arguments):n=>t(n,...arguments)};switch(e){case 0:case 1:throw new RangeError(`Invalid arity ${e}`);case 2:return function(n,r){return arguments.length>=2?t(n,r):function(s){return t(s,n)}};case 3:return function(n,r,s){return arguments.length>=3?t(n,r,s):function(o){return t(o,n,r)}};case 4:return function(n,r,s,o){return arguments.length>=4?t(n,r,s,o):function(i){return t(i,n,r,s)}};case 5:return function(n,r,s,o,i){return arguments.length>=5?t(n,r,s,o,i):function(a){return t(a,n,r,s,o)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);const n=arguments;return function(r){return t(r,...n)}}}},identity$1=e=>e,constant$1=e=>()=>e,constTrue=constant$1(!0),constFalse=constant$1(!1),constUndefined=constant$1(void 0),constVoid=constUndefined;function pipe(e,t,n,r,s,o,i,a,l){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return s(r(n(t(e))));case 6:return o(s(r(n(t(e)))));case 7:return i(o(s(r(n(t(e))))));case 8:return a(i(o(s(r(n(t(e)))))));case 9:return l(a(i(o(s(r(n(t(e))))))));default:{let u=arguments[0];for(let f=1;f<arguments.length;f++)u=arguments[f](u);return u}}}const make$o=e=>(t,n)=>t===n||e(t,n),mapInput$1=dual(2,(e,t)=>make$o((n,r)=>e(t(n),t(r)))),array$1=e=>make$o((t,n)=>{if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1;return!0}),globalStoreId="effect/GlobalValue";let globalStore;const globalValue=(e,t)=>(globalStore||(globalThis[globalStoreId]??=new Map,globalStore=globalThis[globalStoreId]),globalStore.has(e)||globalStore.set(e,t()),globalStore.get(e)),isString$1=e=>typeof e=="string",isNumber=e=>typeof e=="number",isBigInt=e=>typeof e=="bigint",isFunction$2=isFunction$3,isRecordOrArray=e=>typeof e=="object"&&e!==null,isObject$2=e=>isRecordOrArray(e)||isFunction$2(e),hasProperty=dual(2,(e,t)=>isObject$2(e)&&t in e),isTagged=dual(2,(e,t)=>hasProperty(e,"_tag")&&e._tag===t),isNullable=e=>e==null,isIterable=e=>hasProperty(e,Symbol.iterator),isPromiseLike=e=>hasProperty(e,"then")&&isFunction$2(e.then),getBugErrorMessage=e=>`BUG: ${e} - please report an issue at https://github.com/Effect-TS/effect/issues`;let SingleShotGen$1=class Ce{self;called=!1;constructor(t){this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new Ce(this.self)}};const defaultIncHi=335903614,defaultIncLo=4150755663,MUL_HI=1481765933,MUL_LO=1284865837,BIT_53=9007199254740992,BIT_27=134217728;class PCGRandom{_state;constructor(t,n,r,s){return isNullable(n)&&isNullable(t)?(n=Math.random()*4294967295>>>0,t=0):isNullable(n)&&(n=t,t=0),isNullable(s)&&isNullable(r)?(s=this._state?this._state[3]:defaultIncLo,r=this._state?this._state[2]:defaultIncHi):isNullable(s)&&(s=r,r=0),this._state=new Int32Array([0,0,r>>>0,((s||0)|1)>>>0]),this._next(),add64(this._state,this._state[0],this._state[1],t>>>0,n>>>0),this._next(),this}getState(){return[this._state[0],this._state[1],this._state[2],this._state[3]]}setState(t){this._state[0]=t[0],this._state[1]=t[1],this._state[2]=t[2],this._state[3]=t[3]|1}integer(t){return Math.round(this.number()*Number.MAX_SAFE_INTEGER)%t}number(){const t=(this._next()&67108863)*1,n=(this._next()&134217727)*1;return(t*BIT_27+n)/BIT_53}_next(){const t=this._state[0]>>>0,n=this._state[1]>>>0;mul64(this._state,t,n,MUL_HI,MUL_LO),add64(this._state,this._state[0],this._state[1],this._state[2],this._state[3]);let r=t>>>18,s=(n>>>18|t<<14)>>>0;r=(r^t)>>>0,s=(s^n)>>>0;const o=(s>>>27|r<<5)>>>0,i=t>>>27,a=(-i>>>0&31)>>>0;return(o>>>i|o<<a)>>>0}}function mul64(e,t,n,r,s){let o=(n>>>16)*(s&65535)>>>0,i=(n&65535)*(s>>>16)>>>0,a=(n&65535)*(s&65535)>>>0,l=(n>>>16)*(s>>>16)+((i>>>16)+(o>>>16))>>>0;i=i<<16>>>0,a=a+i>>>0,a>>>0<i>>>0&&(l=l+1>>>0),o=o<<16>>>0,a=a+o>>>0,a>>>0<o>>>0&&(l=l+1>>>0),l=l+Math.imul(n,r)>>>0,l=l+Math.imul(t,s)>>>0,e[0]=l,e[1]=a}function add64(e,t,n,r,s){let o=t+r>>>0;const i=n+s>>>0;i>>>0<n>>>0&&(o=o+1|0),e[0]=o,e[1]=i}const YieldWrapTypeId=Symbol.for("effect/Utils/YieldWrap");class YieldWrap{#e;constructor(t){this.#e=t}[YieldWrapTypeId](){return this.#e}}function yieldWrapGet(e){if(typeof e=="object"&&e!==null&&YieldWrapTypeId in e)return e[YieldWrapTypeId]();throw new Error(getBugErrorMessage("yieldWrapGet"))}const structuralRegionState=globalValue("effect/Utils/isStructuralRegion",()=>({enabled:!1,tester:void 0})),standard={effect_internal_function:e=>e()},forced={effect_internal_function:e=>{try{return e()}finally{}}},isNotOptimizedAway=standard.effect_internal_function(()=>new Error().stack)?.includes("effect_internal_function")===!0,internalCall=isNotOptimizedAway?standard.effect_internal_function:forced.effect_internal_function,randomHashCache=globalValue(Symbol.for("effect/Hash/randomHashCache"),()=>new WeakMap),symbol$1=Symbol.for("effect/Hash"),hash=e=>{if(structuralRegionState.enabled===!0)return 0;switch(typeof e){case"number":return number$1(e);case"bigint":return string(e.toString(10));case"boolean":return string(String(e));case"symbol":return string(String(e));case"string":return string(e);case"undefined":return string("undefined");case"function":case"object":return e===null?string("null"):e instanceof Date?hash(e.toISOString()):e instanceof URL?hash(e.href):isHash(e)?e[symbol$1]():random(e);default:throw new Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},random=e=>(randomHashCache.has(e)||randomHashCache.set(e,number$1(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))),randomHashCache.get(e)),combine$5=e=>t=>t*53^e,optimize=e=>e&3221225471|e>>>1&1073741824,isHash=e=>hasProperty(e,symbol$1),number$1=e=>{if(e!==e||e===1/0)return 0;let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return optimize(t)},string=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return optimize(t)},structureKeys=(e,t)=>{let n=12289;for(let r=0;r<t.length;r++)n^=pipe(string(t[r]),combine$5(hash(e[t[r]])));return optimize(n)},structure=e=>structureKeys(e,Object.keys(e)),array=e=>{let t=6151;for(let n=0;n<e.length;n++)t=pipe(t,combine$5(hash(e[n])));return optimize(t)},cached=function(){if(arguments.length===1){const n=arguments[0];return function(r){return Object.defineProperty(n,symbol$1,{value(){return r},enumerable:!1}),r}}const e=arguments[0],t=arguments[1];return Object.defineProperty(e,symbol$1,{value(){return t},enumerable:!1}),t},symbol=Symbol.for("effect/Equal");function equals$1(){return arguments.length===1?e=>compareBoth(e,arguments[0]):compareBoth(arguments[0],arguments[1])}function compareBoth(e,t){if(e===t)return!0;const n=typeof e;if(n!==typeof t)return!1;if(n==="object"||n==="function"){if(e!==null&&t!==null){if(isEqual(e)&&isEqual(t))return hash(e)===hash(t)&&e[symbol](t)?!0:structuralRegionState.enabled&&structuralRegionState.tester?structuralRegionState.tester(e,t):!1;if(e instanceof Date&&t instanceof Date)return e.toISOString()===t.toISOString();if(e instanceof URL&&t instanceof URL)return e.href===t.href}if(structuralRegionState.enabled){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((r,s)=>compareBoth(r,t[s]));if(Object.getPrototypeOf(e)===Object.prototype&&Object.getPrototypeOf(e)===Object.prototype){const r=Object.keys(e),s=Object.keys(t);if(r.length===s.length){for(const o of r)if(!(o in t&&compareBoth(e[o],t[o])))return structuralRegionState.tester?structuralRegionState.tester(e,t):!1;return!0}}return structuralRegionState.tester?structuralRegionState.tester(e,t):!1}}return structuralRegionState.enabled&&structuralRegionState.tester?structuralRegionState.tester(e,t):!1}const isEqual=e=>hasProperty(e,symbol),equivalence=()=>equals$1,NodeInspectSymbol=Symbol.for("nodejs.util.inspect.custom"),toJSON=e=>{try{if(hasProperty(e,"toJSON")&&isFunction$2(e.toJSON)&&e.toJSON.length===0)return e.toJSON();if(Array.isArray(e))return e.map(toJSON)}catch{return{}}return redact(e)},format$2=e=>JSON.stringify(e,null,2),toStringUnknown=(e,t=2)=>{if(typeof e=="string")return e;try{return typeof e=="object"?stringifyCircular(e,t):String(e)}catch{return String(e)}},stringifyCircular=(e,t)=>{let n=[];const r=JSON.stringify(e,(s,o)=>typeof o=="object"&&o!==null?n.includes(o)?void 0:n.push(o)&&(redactableState.fiberRefs!==void 0&&isRedactable(o)?o[symbolRedactable](redactableState.fiberRefs):o):o,t);return n=void 0,r},symbolRedactable=Symbol.for("effect/Inspectable/Redactable"),isRedactable=e=>typeof e=="object"&&e!==null&&symbolRedactable in e,redactableState=globalValue("effect/Inspectable/redactableState",()=>({fiberRefs:void 0})),withRedactableContext=(e,t)=>{const n=redactableState.fiberRefs;redactableState.fiberRefs=e;try{return t()}finally{redactableState.fiberRefs=n}},redact=e=>isRedactable(e)&&redactableState.fiberRefs!==void 0?e[symbolRedactable](redactableState.fiberRefs):e,pipeArguments=(e,t)=>{switch(t.length){case 0:return e;case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let n=e;for(let r=0,s=t.length;r<s;r++)n=t[r](n);return n}}},OP_ASYNC="Async",OP_COMMIT="Commit",OP_FAILURE="Failure",OP_ON_FAILURE="OnFailure",OP_ON_SUCCESS="OnSuccess",OP_ON_SUCCESS_AND_FAILURE="OnSuccessAndFailure",OP_SUCCESS="Success",OP_SYNC="Sync",OP_TAG="Tag",OP_UPDATE_RUNTIME_FLAGS="UpdateRuntimeFlags",OP_WHILE="While",OP_ITERATOR="Iterator",OP_WITH_RUNTIME="WithRuntime",OP_YIELD="Yield",OP_REVERT_FLAGS="RevertFlags";let moduleVersion="3.17.7";const getCurrentVersion=()=>moduleVersion,EffectTypeId$1=Symbol.for("effect/Effect"),StreamTypeId=Symbol.for("effect/Stream"),SinkTypeId=Symbol.for("effect/Sink"),ChannelTypeId=Symbol.for("effect/Channel"),effectVariance={_R:e=>e,_E:e=>e,_A:e=>e,_V:getCurrentVersion()},sinkVariance={_A:e=>e,_In:e=>e,_L:e=>e,_E:e=>e,_R:e=>e},channelVariance={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutElem:e=>e,_OutDone:e=>e},EffectPrototype$1={[EffectTypeId$1]:effectVariance,[StreamTypeId]:effectVariance,[SinkTypeId]:sinkVariance,[ChannelTypeId]:channelVariance,[symbol](e){return this===e},[symbol$1](){return cached(this,random(this))},[Symbol.iterator](){return new SingleShotGen$1(new YieldWrap(this))},pipe(){return pipeArguments(this,arguments)}},StructuralPrototype={[symbol$1](){return cached(this,structure(this))},[symbol](e){const t=Object.keys(this),n=Object.keys(e);if(t.length!==n.length)return!1;for(const r of t)if(!(r in e&&equals$1(this[r],e[r])))return!1;return!0}},CommitPrototype={...EffectPrototype$1,_op:OP_COMMIT},StructuralCommitPrototype={...CommitPrototype,...StructuralPrototype},Base$1=function(){function e(){}return e.prototype=CommitPrototype,e}(),TypeId$b=Symbol.for("effect/Option"),CommonProto$1={...EffectPrototype$1,[TypeId$b]:{_A:e=>e},[NodeInspectSymbol](){return this.toJSON()},toString(){return format$2(this.toJSON())}},SomeProto=Object.assign(Object.create(CommonProto$1),{_tag:"Some",_op:"Some",[symbol](e){return isOption(e)&&isSome$1(e)&&equals$1(this.value,e.value)},[symbol$1](){return cached(this,combine$5(hash(this._tag))(hash(this.value)))},toJSON(){return{_id:"Option",_tag:this._tag,value:toJSON(this.value)}}}),NoneHash=hash("None"),NoneProto=Object.assign(Object.create(CommonProto$1),{_tag:"None",_op:"None",[symbol](e){return isOption(e)&&isNone$1(e)},[symbol$1](){return NoneHash},toJSON(){return{_id:"Option",_tag:this._tag}}}),isOption=e=>hasProperty(e,TypeId$b),isNone$1=e=>e._tag==="None",isSome$1=e=>e._tag==="Some",none$5=Object.create(NoneProto),some$1=e=>{const t=Object.create(SomeProto);return t.value=e,t},TypeId$a=Symbol.for("effect/Either"),CommonProto={...EffectPrototype$1,[TypeId$a]:{_R:e=>e},[NodeInspectSymbol](){return this.toJSON()},toString(){return format$2(this.toJSON())}},RightProto=Object.assign(Object.create(CommonProto),{_tag:"Right",_op:"Right",[symbol](e){return isEither(e)&&isRight$1(e)&&equals$1(this.right,e.right)},[symbol$1](){return combine$5(hash(this._tag))(hash(this.right))},toJSON(){return{_id:"Either",_tag:this._tag,right:toJSON(this.right)}}}),LeftProto=Object.assign(Object.create(CommonProto),{_tag:"Left",_op:"Left",[symbol](e){return isEither(e)&&isLeft$1(e)&&equals$1(this.left,e.left)},[symbol$1](){return combine$5(hash(this._tag))(hash(this.left))},toJSON(){return{_id:"Either",_tag:this._tag,left:toJSON(this.left)}}}),isEither=e=>hasProperty(e,TypeId$a),isLeft$1=e=>e._tag==="Left",isRight$1=e=>e._tag==="Right",left$1=e=>{const t=Object.create(LeftProto);return t.left=e,t},right$1=e=>{const t=Object.create(RightProto);return t.right=e,t},right=right$1,left=left$1,isLeft=isLeft$1,isRight=isRight$1,match$4=dual(2,(e,{onLeft:t,onRight:n})=>isLeft(e)?t(e.left):n(e.right)),merge$5=match$4({onLeft:identity$1,onRight:identity$1}),isNonEmptyArray$1=e=>e.length>0,make$n=e=>(t,n)=>t===n?0:e(t,n),number=make$n((e,t)=>e<t?-1:1),mapInput=dual(2,(e,t)=>make$n((n,r)=>e(t(n),t(r)))),greaterThan$1=e=>dual(2,(t,n)=>e(t,n)===1),none$4=()=>none$5,some=some$1,isNone=isNone$1,isSome=isSome$1,match$3=dual(2,(e,{onNone:t,onSome:n})=>isNone(e)?t():n(e.value)),getOrElse=dual(2,(e,t)=>isNone(e)?t():e.value),orElseSome=dual(2,(e,t)=>isNone(e)?some(t()):e),fromNullable=e=>e==null?none$4():some(e),getOrUndefined=getOrElse(constUndefined),map$4=dual(2,(e,t)=>isNone(e)?none$4():some(t(e.value))),flatMap$3=dual(2,(e,t)=>isNone(e)?none$4():t(e.value)),containsWith=e=>dual(2,(t,n)=>isNone(t)?!1:e(t.value,n)),_equivalence$3=equivalence(),contains=containsWith(_equivalence$3),make$m=(...e)=>e,allocate=e=>new Array(e),makeBy=dual(2,(e,t)=>{const n=Math.max(1,Math.floor(e)),r=new Array(n);for(let s=0;s<n;s++)r[s]=t(s);return r}),fromIterable$6=e=>Array.isArray(e)?e:Array.from(e),ensure=e=>Array.isArray(e)?e:[e],prepend$2=dual(2,(e,t)=>[t,...e]),append$1=dual(2,(e,t)=>[...e,t]),appendAll$2=dual(2,(e,t)=>fromIterable$6(e).concat(fromIterable$6(t))),isEmptyArray=e=>e.length===0,isEmptyReadonlyArray=isEmptyArray,isNonEmptyArray=isNonEmptyArray$1,isNonEmptyReadonlyArray=isNonEmptyArray$1,isOutOfBounds=(e,t)=>e<0||e>=t.length,clamp=(e,t)=>Math.floor(Math.min(Math.max(0,e),t.length)),get$8=dual(2,(e,t)=>{const n=Math.floor(t);return isOutOfBounds(n,e)?none$4():some(e[n])}),unsafeGet$3=dual(2,(e,t)=>{const n=Math.floor(t);if(isOutOfBounds(n,e))throw new Error(`Index ${n} out of bounds`);return e[n]}),head=get$8(0),headNonEmpty$1=unsafeGet$3(0),last=e=>isNonEmptyReadonlyArray(e)?some(lastNonEmpty(e)):none$4(),lastNonEmpty=e=>e[e.length-1],tailNonEmpty$1=e=>e.slice(1),spanIndex=(e,t)=>{let n=0;for(const r of e){if(!t(r,n))break;n++}return n},span=dual(2,(e,t)=>splitAt(e,spanIndex(e,t))),drop$1=dual(2,(e,t)=>{const n=fromIterable$6(e);return n.slice(clamp(t,n),n.length)}),reverse$2=e=>Array.from(e).reverse(),sort=dual(2,(e,t)=>{const n=Array.from(e);return n.sort(t),n}),zip$1=dual(2,(e,t)=>zipWith$2(e,t,make$m)),zipWith$2=dual(3,(e,t,n)=>{const r=fromIterable$6(e),s=fromIterable$6(t);if(isNonEmptyReadonlyArray(r)&&isNonEmptyReadonlyArray(s)){const o=[n(headNonEmpty$1(r),headNonEmpty$1(s))],i=Math.min(r.length,s.length);for(let a=1;a<i;a++)o[a]=n(r[a],s[a]);return o}return[]}),_equivalence$2=equivalence(),splitAt=dual(2,(e,t)=>{const n=Array.from(e),r=Math.floor(t);return isNonEmptyReadonlyArray(n)?r>=1?splitNonEmptyAt(n,r):[[],n]:[n,[]]}),splitNonEmptyAt=dual(2,(e,t)=>{const n=Math.max(1,Math.floor(t));return n>=e.length?[copy$1(e),[]]:[prepend$2(e.slice(1,n),headNonEmpty$1(e)),e.slice(n)]}),copy$1=e=>e.slice(),unionWith=dual(3,(e,t,n)=>{const r=fromIterable$6(e),s=fromIterable$6(t);return isNonEmptyReadonlyArray(r)?isNonEmptyReadonlyArray(s)?dedupeWith(n)(appendAll$2(r,s)):r:s}),union$2=dual(2,(e,t)=>unionWith(e,t,_equivalence$2)),empty$j=()=>[],of$2=e=>[e],map$3=dual(2,(e,t)=>e.map(t)),flatMap$2=dual(2,(e,t)=>{if(isEmptyReadonlyArray(e))return[];const n=[];for(let r=0;r<e.length;r++){const s=t(e[r],r);for(let o=0;o<s.length;o++)n.push(s[o])}return n}),flatten$2=flatMap$2(identity$1),reduce$7=dual(3,(e,t,n)=>fromIterable$6(e).reduce((r,s,o)=>n(r,s,o),t)),unfold=(e,t)=>{const n=[];let r=e,s;for(;isSome(s=t(r));){const[o,i]=s.value;n.push(o),r=i}return n},getEquivalence$2=array$1,dedupeWith=dual(2,(e,t)=>{const n=fromIterable$6(e);if(isNonEmptyReadonlyArray(n)){const r=[headNonEmpty$1(n)],s=tailNonEmpty$1(n);for(const o of s)r.every(i=>!t(o,i))&&r.push(o);return r}return[]}),dedupe=e=>dedupeWith(e,equivalence()),join$1=dual(2,(e,t)=>fromIterable$6(e).join(t)),Order$1=number,escape=e=>e.replace(/[/\\^$*+?.()|[\]{}]/g,"\\$&"),TagTypeId=Symbol.for("effect/Context/Tag"),ReferenceTypeId=Symbol.for("effect/Context/Reference"),STMSymbolKey="effect/STM",STMTypeId=Symbol.for(STMSymbolKey),TagProto={...EffectPrototype$1,_op:"Tag",[STMTypeId]:effectVariance,[TagTypeId]:{_Service:e=>e,_Identifier:e=>e},toString(){return format$2(this.toJSON())},toJSON(){return{_id:"Tag",key:this.key,stack:this.stack}},[NodeInspectSymbol](){return this.toJSON()},of(e){return e},context(e){return make$l(this,e)}},ReferenceProto={...TagProto,[ReferenceTypeId]:ReferenceTypeId},makeGenericTag=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;Error.stackTraceLimit=t;const r=Object.create(TagProto);return Object.defineProperty(r,"stack",{get(){return n.stack}}),r.key=e,r},Tag$1=e=>()=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;Error.stackTraceLimit=t;function r(){}return Object.setPrototypeOf(r,TagProto),r.key=e,Object.defineProperty(r,"stack",{get(){return n.stack}}),r},Reference$1=()=>(e,t)=>{const n=Error.stackTraceLimit;Error.stackTraceLimit=2;const r=new Error;Error.stackTraceLimit=n;function s(){}return Object.setPrototypeOf(s,ReferenceProto),s.key=e,s.defaultValue=t.defaultValue,Object.defineProperty(s,"stack",{get(){return r.stack}}),s},TypeId$9=Symbol.for("effect/Context"),ContextProto={[TypeId$9]:{_Services:e=>e},[symbol](e){if(isContext$1(e)&&this.unsafeMap.size===e.unsafeMap.size){for(const t of this.unsafeMap.keys())if(!e.unsafeMap.has(t)||!equals$1(this.unsafeMap.get(t),e.unsafeMap.get(t)))return!1;return!0}return!1},[symbol$1](){return cached(this,number$1(this.unsafeMap.size))},pipe(){return pipeArguments(this,arguments)},toString(){return format$2(this.toJSON())},toJSON(){return{_id:"Context",services:Array.from(this.unsafeMap).map(toJSON)}},[NodeInspectSymbol](){return this.toJSON()}},makeContext=e=>{const t=Object.create(ContextProto);return t.unsafeMap=e,t},serviceNotFoundError=e=>{const t=new Error(`Service not found${e.key?`: ${String(e.key)}`:""}`);if(e.stack){const n=e.stack.split(`
2
+ `);if(n.length>2){const r=n[2].match(/at (.*)/);r&&(t.message=t.message+` (defined at ${r[1]})`)}}if(t.stack){const n=t.stack.split(`
3
+ `);n.splice(1,3),t.stack=n.join(`
4
+ `)}return t},isContext$1=e=>hasProperty(e,TypeId$9),isReference=e=>hasProperty(e,ReferenceTypeId),_empty$6=makeContext(new Map),empty$i=()=>_empty$6,make$l=(e,t)=>makeContext(new Map([[e.key,t]])),add$3=dual(3,(e,t,n)=>{const r=new Map(e.unsafeMap);return r.set(t.key,n),makeContext(r)}),defaultValueCache=globalValue("effect/Context/defaultValueCache",()=>new Map),getDefaultValue=e=>{if(defaultValueCache.has(e.key))return defaultValueCache.get(e.key);const t=e.defaultValue();return defaultValueCache.set(e.key,t),t},unsafeGetReference=(e,t)=>e.unsafeMap.has(t.key)?e.unsafeMap.get(t.key):getDefaultValue(t),unsafeGet$2=dual(2,(e,t)=>{if(!e.unsafeMap.has(t.key)){if(ReferenceTypeId in t)return getDefaultValue(t);throw serviceNotFoundError(t)}return e.unsafeMap.get(t.key)}),get$7=unsafeGet$2,getOption$1=dual(2,(e,t)=>e.unsafeMap.has(t.key)?some$1(e.unsafeMap.get(t.key)):isReference(t)?some$1(getDefaultValue(t)):none$5),merge$4=dual(2,(e,t)=>{const n=new Map(e.unsafeMap);for(const[r,s]of t.unsafeMap)n.set(r,s);return makeContext(n)}),GenericTag=makeGenericTag,isContext=isContext$1,empty$h=empty$i,make$k=make$l,add$2=add$3,get$6=get$7,unsafeGet$1=unsafeGet$2,getOption=getOption$1,merge$3=merge$4,Tag=Tag$1,Reference=Reference$1,TypeId$8=Symbol.for("effect/Chunk");function copy(e,t,n,r,s){for(let o=t;o<Math.min(e.length,t+s);o++)n[r+o-t]=e[o];return n}const emptyArray=[],getEquivalence$1=e=>make$o((t,n)=>t.length===n.length&&toReadonlyArray(t).every((r,s)=>e(r,unsafeGet(n,s)))),_equivalence$1=getEquivalence$1(equals$1),ChunkProto={[TypeId$8]:{_A:e=>e},toString(){return format$2(this.toJSON())},toJSON(){return{_id:"Chunk",values:toReadonlyArray(this).map(toJSON)}},[NodeInspectSymbol](){return this.toJSON()},[symbol](e){return isChunk(e)&&_equivalence$1(this,e)},[symbol$1](){return cached(this,array(toReadonlyArray(this)))},[Symbol.iterator](){switch(this.backing._tag){case"IArray":return this.backing.array[Symbol.iterator]();case"IEmpty":return emptyArray[Symbol.iterator]();default:return toReadonlyArray(this)[Symbol.iterator]()}},pipe(){return pipeArguments(this,arguments)}},makeChunk=e=>{const t=Object.create(ChunkProto);switch(t.backing=e,e._tag){case"IEmpty":{t.length=0,t.depth=0,t.left=t,t.right=t;break}case"IConcat":{t.length=e.left.length+e.right.length,t.depth=1+Math.max(e.left.depth,e.right.depth),t.left=e.left,t.right=e.right;break}case"IArray":{t.length=e.array.length,t.depth=0,t.left=_empty$5,t.right=_empty$5;break}case"ISingleton":{t.length=1,t.depth=0,t.left=_empty$5,t.right=_empty$5;break}case"ISlice":{t.length=e.length,t.depth=e.chunk.depth+1,t.left=_empty$5,t.right=_empty$5;break}}return t},isChunk=e=>hasProperty(e,TypeId$8),_empty$5=makeChunk({_tag:"IEmpty"}),empty$g=()=>_empty$5,make$j=(...e)=>unsafeFromNonEmptyArray(e),of$1=e=>makeChunk({_tag:"ISingleton",a:e}),fromIterable$5=e=>isChunk(e)?e:unsafeFromArray(fromIterable$6(e)),copyToArray=(e,t,n)=>{switch(e.backing._tag){case"IArray":{copy(e.backing.array,0,t,n,e.length);break}case"IConcat":{copyToArray(e.left,t,n),copyToArray(e.right,t,n+e.left.length);break}case"ISingleton":{t[n]=e.backing.a;break}case"ISlice":{let r=0,s=n;for(;r<e.length;)t[s]=unsafeGet(e,r),r+=1,s+=1;break}}},toReadonlyArray_=e=>{switch(e.backing._tag){case"IEmpty":return emptyArray;case"IArray":return e.backing.array;default:{const t=new Array(e.length);return copyToArray(e,t,0),e.backing={_tag:"IArray",array:t},e.left=_empty$5,e.right=_empty$5,e.depth=0,t}}},toReadonlyArray=toReadonlyArray_,reverseChunk=e=>{switch(e.backing._tag){case"IEmpty":case"ISingleton":return e;case"IArray":return makeChunk({_tag:"IArray",array:reverse$2(e.backing.array)});case"IConcat":return makeChunk({_tag:"IConcat",left:reverse$1(e.backing.right),right:reverse$1(e.backing.left)});case"ISlice":return unsafeFromArray(reverse$2(toReadonlyArray(e)))}},reverse$1=reverseChunk,unsafeFromArray=e=>e.length===0?empty$g():e.length===1?of$1(e[0]):makeChunk({_tag:"IArray",array:e}),unsafeFromNonEmptyArray=e=>unsafeFromArray(e),unsafeGet=dual(2,(e,t)=>{switch(e.backing._tag){case"IEmpty":throw new Error("Index out of bounds");case"ISingleton":{if(t!==0)throw new Error("Index out of bounds");return e.backing.a}case"IArray":{if(t>=e.length||t<0)throw new Error("Index out of bounds");return e.backing.array[t]}case"IConcat":return t<e.left.length?unsafeGet(e.left,t):unsafeGet(e.right,t-e.left.length);case"ISlice":return unsafeGet(e.backing.chunk,t+e.backing.offset)}}),append=dual(2,(e,t)=>appendAll$1(e,of$1(t))),prepend$1=dual(2,(e,t)=>appendAll$1(of$1(t),e)),drop=dual(2,(e,t)=>{if(t<=0)return e;if(t>=e.length)return _empty$5;switch(e.backing._tag){case"ISlice":return makeChunk({_tag:"ISlice",chunk:e.backing.chunk,offset:e.backing.offset+t,length:e.backing.length-t});case"IConcat":return t>e.left.length?drop(e.right,t-e.left.length):makeChunk({_tag:"IConcat",left:drop(e.left,t),right:e.right});default:return makeChunk({_tag:"ISlice",chunk:e,offset:t,length:e.length-t})}}),appendAll$1=dual(2,(e,t)=>{if(e.backing._tag==="IEmpty")return t;if(t.backing._tag==="IEmpty")return e;const n=t.depth-e.depth;if(Math.abs(n)<=1)return makeChunk({_tag:"IConcat",left:e,right:t});if(n<-1)if(e.left.depth>=e.right.depth){const r=appendAll$1(e.right,t);return makeChunk({_tag:"IConcat",left:e.left,right:r})}else{const r=appendAll$1(e.right.right,t);if(r.depth===e.depth-3){const s=makeChunk({_tag:"IConcat",left:e.right.left,right:r});return makeChunk({_tag:"IConcat",left:e.left,right:s})}else{const s=makeChunk({_tag:"IConcat",left:e.left,right:e.right.left});return makeChunk({_tag:"IConcat",left:s,right:r})}}else if(t.right.depth>=t.left.depth){const r=appendAll$1(e,t.left);return makeChunk({_tag:"IConcat",left:r,right:t.right})}else{const r=appendAll$1(e,t.left.left);if(r.depth===t.depth-3){const s=makeChunk({_tag:"IConcat",left:r,right:t.left.right});return makeChunk({_tag:"IConcat",left:s,right:t.right})}else{const s=makeChunk({_tag:"IConcat",left:t.left.right,right:t.right});return makeChunk({_tag:"IConcat",left:r,right:s})}}}),isEmpty$3=e=>e.length===0,isNonEmpty=e=>e.length>0,unsafeHead=e=>unsafeGet(e,0),headNonEmpty=unsafeHead,tailNonEmpty=e=>drop(e,1),TypeId$7=Symbol.for("effect/Duration"),bigint0$1=BigInt(0),bigint24=BigInt(24),bigint60=BigInt(60),bigint1e3=BigInt(1e3),bigint1e6=BigInt(1e6),bigint1e9=BigInt(1e9),DURATION_REGEX=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,decode$1=e=>{if(isDuration(e))return e;if(isNumber(e))return millis(e);if(isBigInt(e))return nanos(e);if(Array.isArray(e)&&e.length===2&&e.every(isNumber))return e[0]===-1/0||e[1]===-1/0||Number.isNaN(e[0])||Number.isNaN(e[1])?zero:e[0]===1/0||e[1]===1/0?infinity:nanos(BigInt(Math.round(e[0]*1e9))+BigInt(Math.round(e[1])));if(isString$1(e)){const t=DURATION_REGEX.exec(e);if(t){const[n,r,s]=t,o=Number(r);switch(s){case"nano":case"nanos":return nanos(BigInt(r));case"micro":case"micros":return micros(BigInt(r));case"milli":case"millis":return millis(o);case"second":case"seconds":return seconds(o);case"minute":case"minutes":return minutes(o);case"hour":case"hours":return hours(o);case"day":case"days":return days(o);case"week":case"weeks":return weeks(o)}}}throw new Error("Invalid DurationInput")},zeroValue={_tag:"Millis",millis:0},infinityValue={_tag:"Infinity"},DurationProto={[TypeId$7]:TypeId$7,[symbol$1](){return cached(this,structure(this.value))},[symbol](e){return isDuration(e)&&equals(this,e)},toString(){return`Duration(${format$1(this)})`},toJSON(){switch(this.value._tag){case"Millis":return{_id:"Duration",_tag:"Millis",millis:this.value.millis};case"Nanos":return{_id:"Duration",_tag:"Nanos",hrtime:toHrTime(this)};case"Infinity":return{_id:"Duration",_tag:"Infinity"}}},[NodeInspectSymbol](){return this.toJSON()},pipe(){return pipeArguments(this,arguments)}},make$i=e=>{const t=Object.create(DurationProto);return isNumber(e)?isNaN(e)||e<=0?t.value=zeroValue:Number.isFinite(e)?Number.isInteger(e)?t.value={_tag:"Millis",millis:e}:t.value={_tag:"Nanos",nanos:BigInt(Math.round(e*1e6))}:t.value=infinityValue:e<=bigint0$1?t.value=zeroValue:t.value={_tag:"Nanos",nanos:e},t},isDuration=e=>hasProperty(e,TypeId$7),isZero=e=>{switch(e.value._tag){case"Millis":return e.value.millis===0;case"Nanos":return e.value.nanos===bigint0$1;case"Infinity":return!1}},zero=make$i(0),infinity=make$i(1/0),nanos=e=>make$i(e),micros=e=>make$i(e*bigint1e3),millis=e=>make$i(e),seconds=e=>make$i(e*1e3),minutes=e=>make$i(e*6e4),hours=e=>make$i(e*36e5),days=e=>make$i(e*864e5),weeks=e=>make$i(e*6048e5),toMillis=e=>match$2(e,{onMillis:t=>t,onNanos:t=>Number(t)/1e6}),unsafeToNanos=e=>{const t=decode$1(e);switch(t.value._tag){case"Infinity":throw new Error("Cannot convert infinite duration to nanos");case"Nanos":return t.value.nanos;case"Millis":return BigInt(Math.round(t.value.millis*1e6))}},toHrTime=e=>{const t=decode$1(e);switch(t.value._tag){case"Infinity":return[1/0,0];case"Nanos":return[Number(t.value.nanos/bigint1e9),Number(t.value.nanos%bigint1e9)];case"Millis":return[Math.floor(t.value.millis/1e3),Math.round(t.value.millis%1e3*1e6)]}},match$2=dual(2,(e,t)=>{const n=decode$1(e);switch(n.value._tag){case"Nanos":return t.onNanos(n.value.nanos);case"Infinity":return t.onMillis(1/0);case"Millis":return t.onMillis(n.value.millis)}}),matchWith=dual(3,(e,t,n)=>{const r=decode$1(e),s=decode$1(t);if(r.value._tag==="Infinity"||s.value._tag==="Infinity")return n.onMillis(toMillis(r),toMillis(s));if(r.value._tag==="Nanos"||s.value._tag==="Nanos"){const o=r.value._tag==="Nanos"?r.value.nanos:BigInt(Math.round(r.value.millis*1e6)),i=s.value._tag==="Nanos"?s.value.nanos:BigInt(Math.round(s.value.millis*1e6));return n.onNanos(o,i)}return n.onMillis(r.value.millis,s.value.millis)}),Equivalence=(e,t)=>matchWith(e,t,{onMillis:(n,r)=>n===r,onNanos:(n,r)=>n===r}),lessThanOrEqualTo=dual(2,(e,t)=>matchWith(e,t,{onMillis:(n,r)=>n<=r,onNanos:(n,r)=>n<=r})),greaterThanOrEqualTo=dual(2,(e,t)=>matchWith(e,t,{onMillis:(n,r)=>n>=r,onNanos:(n,r)=>n>=r})),equals=dual(2,(e,t)=>Equivalence(decode$1(e),decode$1(t))),parts=e=>{const t=decode$1(e);if(t.value._tag==="Infinity")return{days:1/0,hours:1/0,minutes:1/0,seconds:1/0,millis:1/0,nanos:1/0};const n=unsafeToNanos(t),r=n/bigint1e6,s=r/bigint1e3,o=s/bigint60,i=o/bigint60,a=i/bigint24;return{days:Number(a),hours:Number(i%bigint24),minutes:Number(o%bigint60),seconds:Number(s%bigint60),millis:Number(r%bigint1e3),nanos:Number(n%bigint1e6)}},format$1=e=>{const t=decode$1(e);if(t.value._tag==="Infinity")return"Infinity";if(isZero(t))return"0";const n=parts(t),r=[];return n.days!==0&&r.push(`${n.days}d`),n.hours!==0&&r.push(`${n.hours}h`),n.minutes!==0&&r.push(`${n.minutes}m`),n.seconds!==0&&r.push(`${n.seconds}s`),n.millis!==0&&r.push(`${n.millis}ms`),n.nanos!==0&&r.push(`${n.nanos}ns`),r.join(" ")},SIZE=5,BUCKET_SIZE=Math.pow(2,SIZE),MASK=BUCKET_SIZE-1,MAX_INDEX_NODE=BUCKET_SIZE/2,MIN_ARRAY_NODE=BUCKET_SIZE/4;function popcount(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,e&127}function hashFragment(e,t){return t>>>e&MASK}function toBitmap(e){return 1<<e}function fromBitmap(e,t){return popcount(e&t-1)}const make$h=(e,t)=>({value:e,previous:t});function arrayUpdate(e,t,n,r){let s=r;if(!e){const o=r.length;s=new Array(o);for(let i=0;i<o;++i)s[i]=r[i]}return s[t]=n,s}function arraySpliceOut(e,t,n){const r=n.length-1;let s=0,o=0,i=n;if(e)s=o=t;else for(i=new Array(r);s<t;)i[o++]=n[s++];for(++s;s<=r;)i[o++]=n[s++];return e&&(i.length=r),i}function arraySpliceIn(e,t,n,r){const s=r.length;if(e){let l=s;for(;l>=t;)r[l--]=r[l];return r[t]=n,r}let o=0,i=0;const a=new Array(s+1);for(;o<t;)a[i++]=r[o++];for(a[t]=n;o<s;)a[++i]=r[o++];return a}class EmptyNode{_tag="EmptyNode";modify(t,n,r,s,o,i){const a=r(none$4());return isNone(a)?new EmptyNode:(++i.value,new LeafNode(t,s,o,a))}}function isEmptyNode(e){return isTagged(e,"EmptyNode")}function isLeafNode(e){return isEmptyNode(e)||e._tag==="LeafNode"||e._tag==="CollisionNode"}function canEditNode(e,t){return isEmptyNode(e)?!1:t===e.edit}class LeafNode{edit;hash;key;value;_tag="LeafNode";constructor(t,n,r,s){this.edit=t,this.hash=n,this.key=r,this.value=s}modify(t,n,r,s,o,i){if(equals$1(o,this.key)){const l=r(this.value);return l===this.value?this:isNone(l)?(--i.value,new EmptyNode):canEditNode(this,t)?(this.value=l,this):new LeafNode(t,s,o,l)}const a=r(none$4());return isNone(a)?this:(++i.value,mergeLeaves(t,n,this.hash,this,s,new LeafNode(t,s,o,a)))}}class CollisionNode{edit;hash;children;_tag="CollisionNode";constructor(t,n,r){this.edit=t,this.hash=n,this.children=r}modify(t,n,r,s,o,i){if(s===this.hash){const l=canEditNode(this,t),u=this.updateCollisionList(l,t,this.hash,this.children,r,o,i);return u===this.children?this:u.length>1?new CollisionNode(t,this.hash,u):u[0]}const a=r(none$4());return isNone(a)?this:(++i.value,mergeLeaves(t,n,this.hash,this,s,new LeafNode(t,s,o,a)))}updateCollisionList(t,n,r,s,o,i,a){const l=s.length;for(let f=0;f<l;++f){const d=s[f];if("key"in d&&equals$1(i,d.key)){const m=d.value,g=o(m);return g===m?s:isNone(g)?(--a.value,arraySpliceOut(t,f,s)):arrayUpdate(t,f,new LeafNode(n,r,i,g),s)}}const u=o(none$4());return isNone(u)?s:(++a.value,arrayUpdate(t,l,new LeafNode(n,r,i,u),s))}}class IndexedNode{edit;mask;children;_tag="IndexedNode";constructor(t,n,r){this.edit=t,this.mask=n,this.children=r}modify(t,n,r,s,o,i){const a=this.mask,l=this.children,u=hashFragment(n,s),f=toBitmap(u),d=fromBitmap(a,f),m=a&f,g=canEditNode(this,t);if(!m){const O=new EmptyNode().modify(t,n+SIZE,r,s,o,i);return O?l.length>=MAX_INDEX_NODE?expand(t,u,O,a,l):new IndexedNode(t,a|f,arraySpliceIn(g,d,O,l)):this}const b=l[d],S=b.modify(t,n+SIZE,r,s,o,i);if(b===S)return this;let R=a,T;if(isEmptyNode(S)){if(R&=~f,!R)return new EmptyNode;if(l.length<=2&&isLeafNode(l[d^1]))return l[d^1];T=arraySpliceOut(g,d,l)}else T=arrayUpdate(g,d,S,l);return g?(this.mask=R,this.children=T,this):new IndexedNode(t,R,T)}}class ArrayNode{edit;size;children;_tag="ArrayNode";constructor(t,n,r){this.edit=t,this.size=n,this.children=r}modify(t,n,r,s,o,i){let a=this.size;const l=this.children,u=hashFragment(n,s),f=l[u],d=(f||new EmptyNode).modify(t,n+SIZE,r,s,o,i);if(f===d)return this;const m=canEditNode(this,t);let g;if(isEmptyNode(f)&&!isEmptyNode(d))++a,g=arrayUpdate(m,u,d,l);else if(!isEmptyNode(f)&&isEmptyNode(d)){if(--a,a<=MIN_ARRAY_NODE)return pack(t,a,u,l);g=arrayUpdate(m,u,new EmptyNode,l)}else g=arrayUpdate(m,u,d,l);return m?(this.size=a,this.children=g,this):new ArrayNode(t,a,g)}}function pack(e,t,n,r){const s=new Array(t-1);let o=0,i=0;for(let a=0,l=r.length;a<l;++a)if(a!==n){const u=r[a];u&&!isEmptyNode(u)&&(s[o++]=u,i|=1<<a)}return new IndexedNode(e,i,s)}function expand(e,t,n,r,s){const o=[];let i=r,a=0;for(let l=0;i;++l)i&1&&(o[l]=s[a++]),i>>>=1;return o[t]=n,new ArrayNode(e,a+1,o)}function mergeLeavesInner(e,t,n,r,s,o){if(n===s)return new CollisionNode(e,n,[o,r]);const i=hashFragment(t,n),a=hashFragment(t,s);if(i===a)return l=>new IndexedNode(e,toBitmap(i)|toBitmap(a),[l]);{const l=i<a?[r,o]:[o,r];return new IndexedNode(e,toBitmap(i)|toBitmap(a),l)}}function mergeLeaves(e,t,n,r,s,o){let i,a=t;for(;;){const l=mergeLeavesInner(e,a,n,r,s,o);if(typeof l=="function")i=make$h(l,i),a=a+SIZE;else{let u=l;for(;i!=null;)u=i.value(u),i=i.previous;return u}}}const HashMapSymbolKey="effect/HashMap",HashMapTypeId=Symbol.for(HashMapSymbolKey),HashMapProto={[HashMapTypeId]:HashMapTypeId,[Symbol.iterator](){return new HashMapIterator(this,(e,t)=>[e,t])},[symbol$1](){let e=hash(HashMapSymbolKey);for(const t of this)e^=pipe(hash(t[0]),combine$5(hash(t[1])));return cached(this,e)},[symbol](e){if(isHashMap(e)){if(e._size!==this._size)return!1;for(const t of this){const n=pipe(e,getHash(t[0],hash(t[0])));if(isNone(n))return!1;if(!equals$1(t[1],n.value))return!1}return!0}return!1},toString(){return format$2(this.toJSON())},toJSON(){return{_id:"HashMap",values:Array.from(this).map(toJSON)}},[NodeInspectSymbol](){return this.toJSON()},pipe(){return pipeArguments(this,arguments)}},makeImpl$1=(e,t,n,r)=>{const s=Object.create(HashMapProto);return s._editable=e,s._edit=t,s._root=n,s._size=r,s};class HashMapIterator{map;f;v;constructor(t,n){this.map=t,this.f=n,this.v=visitLazy(this.map._root,this.f,void 0)}next(){if(isNone(this.v))return{done:!0,value:void 0};const t=this.v.value;return this.v=applyCont(t.cont),{done:!1,value:t.value}}[Symbol.iterator](){return new HashMapIterator(this.map,this.f)}}const applyCont=e=>e?visitLazyChildren(e[0],e[1],e[2],e[3],e[4]):none$4(),visitLazy=(e,t,n=void 0)=>{switch(e._tag){case"LeafNode":return isSome(e.value)?some({value:t(e.key,e.value.value),cont:n}):applyCont(n);case"CollisionNode":case"ArrayNode":case"IndexedNode":{const r=e.children;return visitLazyChildren(r.length,r,0,t,n)}default:return applyCont(n)}},visitLazyChildren=(e,t,n,r,s)=>{for(;n<e;){const o=t[n++];if(o&&!isEmptyNode(o))return visitLazy(o,r,[e,t,n,r,s])}return applyCont(s)},_empty$4=makeImpl$1(!1,0,new EmptyNode,0),empty$f=()=>_empty$4,fromIterable$4=e=>{const t=beginMutation$1(empty$f());for(const n of e)set$4(t,n[0],n[1]);return endMutation$1(t)},isHashMap=e=>hasProperty(e,HashMapTypeId),isEmpty$2=e=>e&&isEmptyNode(e._root),get$5=dual(2,(e,t)=>getHash(e,t,hash(t))),getHash=dual(3,(e,t,n)=>{let r=e._root,s=0;for(;;)switch(r._tag){case"LeafNode":return equals$1(t,r.key)?r.value:none$4();case"CollisionNode":{if(n===r.hash){const o=r.children;for(let i=0,a=o.length;i<a;++i){const l=o[i];if("key"in l&&equals$1(t,l.key))return l.value}}return none$4()}case"IndexedNode":{const o=hashFragment(s,n),i=toBitmap(o);if(r.mask&i){r=r.children[fromBitmap(r.mask,i)],s+=SIZE;break}return none$4()}case"ArrayNode":{if(r=r.children[hashFragment(s,n)],r){s+=SIZE;break}return none$4()}default:return none$4()}}),has$3=dual(2,(e,t)=>isSome(getHash(e,t,hash(t)))),set$4=dual(3,(e,t,n)=>modifyAt$1(e,t,()=>some(n))),setTree=dual(3,(e,t,n)=>e._editable?(e._root=t,e._size=n,e):t===e._root?e:makeImpl$1(e._editable,e._edit,t,n)),keys$1=e=>new HashMapIterator(e,t=>t),size$2=e=>e._size,beginMutation$1=e=>makeImpl$1(!0,e._edit+1,e._root,e._size),endMutation$1=e=>(e._editable=!1,e),modifyAt$1=dual(3,(e,t,n)=>modifyHash(e,t,hash(t),n)),modifyHash=dual(4,(e,t,n,r)=>{const s={value:e._size},o=e._root.modify(e._editable?e._edit:NaN,0,r,n,t,s);return pipe(e,setTree(o,s.value))}),remove$3=dual(2,(e,t)=>modifyAt$1(e,t,none$4)),map$2=dual(2,(e,t)=>reduce$6(e,empty$f(),(n,r,s)=>set$4(n,s,t(r,s)))),forEach$3=dual(2,(e,t)=>reduce$6(e,void 0,(n,r,s)=>t(r,s))),reduce$6=dual(3,(e,t,n)=>{const r=e._root;if(r._tag==="LeafNode")return isSome(r.value)?n(t,r.value.value,r.key):t;if(r._tag==="EmptyNode")return t;const s=[r.children];let o;for(;o=s.pop();)for(let i=0,a=o.length;i<a;){const l=o[i++];l&&!isEmptyNode(l)&&(l._tag==="LeafNode"?isSome(l.value)&&(t=n(t,l.value.value,l.key)):s.push(l.children))}return t}),HashSetSymbolKey="effect/HashSet",HashSetTypeId=Symbol.for(HashSetSymbolKey),HashSetProto={[HashSetTypeId]:HashSetTypeId,[Symbol.iterator](){return keys$1(this._keyMap)},[symbol$1](){return cached(this,combine$5(hash(this._keyMap))(hash(HashSetSymbolKey)))},[symbol](e){return isHashSet(e)?size$2(this._keyMap)===size$2(e._keyMap)&&equals$1(this._keyMap,e._keyMap):!1},toString(){return format$2(this.toJSON())},toJSON(){return{_id:"HashSet",values:Array.from(this).map(toJSON)}},[NodeInspectSymbol](){return this.toJSON()},pipe(){return pipeArguments(this,arguments)}},makeImpl=e=>{const t=Object.create(HashSetProto);return t._keyMap=e,t},isHashSet=e=>hasProperty(e,HashSetTypeId),_empty$3=makeImpl(empty$f()),empty$e=()=>_empty$3,fromIterable$3=e=>{const t=beginMutation(empty$e());for(const n of e)add$1(t,n);return endMutation(t)},make$g=(...e)=>{const t=beginMutation(empty$e());for(const n of e)add$1(t,n);return endMutation(t)},has$2=dual(2,(e,t)=>has$3(e._keyMap,t)),size$1=e=>size$2(e._keyMap),beginMutation=e=>makeImpl(beginMutation$1(e._keyMap)),endMutation=e=>(e._keyMap._editable=!1,e),mutate=dual(2,(e,t)=>{const n=beginMutation(e);return t(n),endMutation(n)}),add$1=dual(2,(e,t)=>e._keyMap._editable?(set$4(t,!0)(e._keyMap),e):makeImpl(set$4(t,!0)(e._keyMap))),remove$2=dual(2,(e,t)=>e._keyMap._editable?(remove$3(t)(e._keyMap),e):makeImpl(remove$3(t)(e._keyMap))),difference$1=dual(2,(e,t)=>mutate(e,n=>{for(const r of t)remove$2(n,r)})),union$1=dual(2,(e,t)=>mutate(empty$e(),n=>{forEach$2(e,r=>add$1(n,r));for(const r of t)add$1(n,r)})),forEach$2=dual(2,(e,t)=>forEach$3(e._keyMap,(n,r)=>t(r))),reduce$5=dual(3,(e,t,n)=>reduce$6(e._keyMap,t,(r,s,o)=>n(r,o))),empty$d=empty$e,fromIterable$2=fromIterable$3,make$f=make$g,has$1=has$2,size=size$1,add=add$1,remove$1=remove$2,difference=difference$1,union=union$1,reduce$4=reduce$5,TypeId$6=Symbol.for("effect/MutableRef"),MutableRefProto={[TypeId$6]:TypeId$6,toString(){return format$2(this.toJSON())},toJSON(){return{_id:"MutableRef",current:toJSON(this.current)}},[NodeInspectSymbol](){return this.toJSON()},pipe(){return pipeArguments(this,arguments)}},make$e=e=>{const t=Object.create(MutableRefProto);return t.current=e,t},get$4=e=>e.current,set$3=dual(2,(e,t)=>(e.current=t,e)),FiberIdSymbolKey="effect/FiberId",FiberIdTypeId=Symbol.for(FiberIdSymbolKey),OP_NONE="None",OP_RUNTIME="Runtime",OP_COMPOSITE="Composite",emptyHash=string(`${FiberIdSymbolKey}-${OP_NONE}`);let None$2=class{[FiberIdTypeId]=FiberIdTypeId;_tag=OP_NONE;id=-1;startTimeMillis=-1;[symbol$1](){return emptyHash}[symbol](t){return isFiberId(t)&&t._tag===OP_NONE}toString(){return format$2(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag}}[NodeInspectSymbol](){return this.toJSON()}};class Runtime{id;startTimeMillis;[FiberIdTypeId]=FiberIdTypeId;_tag=OP_RUNTIME;constructor(t,n){this.id=t,this.startTimeMillis=n}[symbol$1](){return cached(this,string(`${FiberIdSymbolKey}-${this._tag}-${this.id}-${this.startTimeMillis}`))}[symbol](t){return isFiberId(t)&&t._tag===OP_RUNTIME&&this.id===t.id&&this.startTimeMillis===t.startTimeMillis}toString(){return format$2(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,id:this.id,startTimeMillis:this.startTimeMillis}}[NodeInspectSymbol](){return this.toJSON()}}const none$3=new None$2,isFiberId=e=>hasProperty(e,FiberIdTypeId),ids=e=>{switch(e._tag){case OP_NONE:return empty$d();case OP_RUNTIME:return make$f(e.id);case OP_COMPOSITE:return pipe(ids(e.left),union(ids(e.right)))}},_fiberCounter=globalValue(Symbol.for("effect/Fiber/Id/_fiberCounter"),()=>make$e(0)),threadName$1=e=>Array.from(ids(e)).map(n=>`#${n}`).join(","),unsafeMake$5=()=>{const e=get$4(_fiberCounter);return pipe(_fiberCounter,set$3(e+1)),new Runtime(e,Date.now())},none$2=none$3,threadName=threadName$1,unsafeMake$4=unsafeMake$5,empty$c=empty$f,fromIterable$1=fromIterable$4,isEmpty$1=isEmpty$2,get$3=get$5,set$2=set$4,keys=keys$1,modifyAt=modifyAt$1,map$1=map$2,reduce$3=reduce$6,TypeId$5=Symbol.for("effect/List"),toArray=e=>fromIterable$6(e),getEquivalence=e=>mapInput$1(getEquivalence$2(e),toArray),_equivalence=getEquivalence(equals$1),ConsProto={[TypeId$5]:TypeId$5,_tag:"Cons",toString(){return format$2(this.toJSON())},toJSON(){return{_id:"List",_tag:"Cons",values:toArray(this).map(toJSON)}},[NodeInspectSymbol](){return this.toJSON()},[symbol](e){return isList(e)&&this._tag===e._tag&&_equivalence(this,e)},[symbol$1](){return cached(this,array(toArray(this)))},[Symbol.iterator](){let e=!1,t=this;return{next(){if(e)return this.return();if(t._tag==="Nil")return e=!0,this.return();const n=t.head;return t=t.tail,{done:e,value:n}},return(n){return e||(e=!0),{done:!0,value:n}}}},pipe(){return pipeArguments(this,arguments)}},makeCons=(e,t)=>{const n=Object.create(ConsProto);return n.head=e,n.tail=t,n},NilHash=string("Nil"),NilProto={[TypeId$5]:TypeId$5,_tag:"Nil",toString(){return format$2(this.toJSON())},toJSON(){return{_id:"List",_tag:"Nil"}},[NodeInspectSymbol](){return this.toJSON()},[symbol$1](){return NilHash},[symbol](e){return isList(e)&&this._tag===e._tag},[Symbol.iterator](){return{next(){return{done:!0,value:void 0}}}},pipe(){return pipeArguments(this,arguments)}},_Nil=Object.create(NilProto),isList=e=>hasProperty(e,TypeId$5),isNil=e=>e._tag==="Nil",isCons=e=>e._tag==="Cons",nil=()=>_Nil,cons=(e,t)=>makeCons(e,t),empty$b=nil,of=e=>makeCons(e,_Nil),appendAll=dual(2,(e,t)=>prependAll(t,e)),prepend=dual(2,(e,t)=>cons(t,e)),prependAll=dual(2,(e,t)=>{if(isNil(e))return t;if(isNil(t))return e;{const n=makeCons(t.head,e);let r=n,s=t.tail;for(;!isNil(s);){const o=makeCons(s.head,e);r.tail=o,r=o,s=s.tail}return n}}),reduce$2=dual(3,(e,t,n)=>{let r=t,s=e;for(;!isNil(s);)r=n(r,s.head),s=s.tail;return r}),reverse=e=>{let t=empty$b(),n=e;for(;!isNil(n);)t=prepend(t,n.head),n=n.tail;return t},Structural=function(){function e(t){t&&Object.assign(this,t)}return e.prototype=StructuralPrototype,e}(),ContextPatchTypeId=Symbol.for("effect/DifferContextPatch");function variance$3(e){return e}const PatchProto$2={...Structural.prototype,[ContextPatchTypeId]:{_Value:variance$3,_Patch:variance$3}},EmptyProto$2=Object.assign(Object.create(PatchProto$2),{_tag:"Empty"}),_empty$2=Object.create(EmptyProto$2),empty$a=()=>_empty$2,AndThenProto$2=Object.assign(Object.create(PatchProto$2),{_tag:"AndThen"}),makeAndThen$2=(e,t)=>{const n=Object.create(AndThenProto$2);return n.first=e,n.second=t,n},AddServiceProto=Object.assign(Object.create(PatchProto$2),{_tag:"AddService"}),makeAddService=(e,t)=>{const n=Object.create(AddServiceProto);return n.key=e,n.service=t,n},RemoveServiceProto=Object.assign(Object.create(PatchProto$2),{_tag:"RemoveService"}),makeRemoveService=e=>{const t=Object.create(RemoveServiceProto);return t.key=e,t},UpdateServiceProto=Object.assign(Object.create(PatchProto$2),{_tag:"UpdateService"}),makeUpdateService=(e,t)=>{const n=Object.create(UpdateServiceProto);return n.key=e,n.update=t,n},diff$6=(e,t)=>{const n=new Map(e.unsafeMap);let r=empty$a();for(const[s,o]of t.unsafeMap.entries())if(n.has(s)){const i=n.get(s);n.delete(s),equals$1(i,o)||(r=combine$4(makeUpdateService(s,()=>o))(r))}else n.delete(s),r=combine$4(makeAddService(s,o))(r);for(const[s]of n.entries())r=combine$4(makeRemoveService(s))(r);return r},combine$4=dual(2,(e,t)=>makeAndThen$2(e,t)),patch$7=dual(2,(e,t)=>{if(e._tag==="Empty")return t;let n=!1,r=of$1(e);const s=new Map(t.unsafeMap);for(;isNonEmpty(r);){const i=headNonEmpty(r),a=tailNonEmpty(r);switch(i._tag){case"Empty":{r=a;break}case"AddService":{s.set(i.key,i.service),r=a;break}case"AndThen":{r=prepend$1(prepend$1(a,i.second),i.first);break}case"RemoveService":{s.delete(i.key),r=a;break}case"UpdateService":{s.set(i.key,i.update(s.get(i.key))),n=!0,r=a;break}}}if(!n)return makeContext(s);const o=new Map;for(const[i]of t.unsafeMap)s.has(i)&&(o.set(i,s.get(i)),s.delete(i));for(const[i,a]of s)o.set(i,a);return makeContext(o)}),HashSetPatchTypeId=Symbol.for("effect/DifferHashSetPatch");function variance$2(e){return e}const PatchProto$1={...Structural.prototype,[HashSetPatchTypeId]:{_Value:variance$2,_Key:variance$2,_Patch:variance$2}},EmptyProto$1=Object.assign(Object.create(PatchProto$1),{_tag:"Empty"}),_empty$1=Object.create(EmptyProto$1),empty$9=()=>_empty$1,AndThenProto$1=Object.assign(Object.create(PatchProto$1),{_tag:"AndThen"}),makeAndThen$1=(e,t)=>{const n=Object.create(AndThenProto$1);return n.first=e,n.second=t,n},AddProto=Object.assign(Object.create(PatchProto$1),{_tag:"Add"}),makeAdd=e=>{const t=Object.create(AddProto);return t.value=e,t},RemoveProto=Object.assign(Object.create(PatchProto$1),{_tag:"Remove"}),makeRemove=e=>{const t=Object.create(RemoveProto);return t.value=e,t},diff$5=(e,t)=>{const[n,r]=reduce$4([e,empty$9()],([s,o],i)=>has$1(i)(s)?[remove$1(i)(s),o]:[s,combine$3(makeAdd(i))(o)])(t);return reduce$4(r,(s,o)=>combine$3(makeRemove(o))(s))(n)},combine$3=dual(2,(e,t)=>makeAndThen$1(e,t)),patch$6=dual(2,(e,t)=>{if(e._tag==="Empty")return t;let n=t,r=of$1(e);for(;isNonEmpty(r);){const s=headNonEmpty(r),o=tailNonEmpty(r);switch(s._tag){case"Empty":{r=o;break}case"AndThen":{r=prepend$1(s.first)(prepend$1(s.second)(o));break}case"Add":{n=add(s.value)(n),r=o;break}case"Remove":n=remove$1(s.value)(n),r=o}}return n}),ReadonlyArrayPatchTypeId=Symbol.for("effect/DifferReadonlyArrayPatch");function variance$1(e){return e}const PatchProto={...Structural.prototype,[ReadonlyArrayPatchTypeId]:{_Value:variance$1,_Patch:variance$1}},EmptyProto=Object.assign(Object.create(PatchProto),{_tag:"Empty"}),_empty=Object.create(EmptyProto),empty$8=()=>_empty,AndThenProto=Object.assign(Object.create(PatchProto),{_tag:"AndThen"}),makeAndThen=(e,t)=>{const n=Object.create(AndThenProto);return n.first=e,n.second=t,n},AppendProto=Object.assign(Object.create(PatchProto),{_tag:"Append"}),makeAppend=e=>{const t=Object.create(AppendProto);return t.values=e,t},SliceProto=Object.assign(Object.create(PatchProto),{_tag:"Slice"}),makeSlice=(e,t)=>{const n=Object.create(SliceProto);return n.from=e,n.until=t,n},UpdateProto=Object.assign(Object.create(PatchProto),{_tag:"Update"}),makeUpdate=(e,t)=>{const n=Object.create(UpdateProto);return n.index=e,n.patch=t,n},diff$4=e=>{let t=0,n=empty$8();for(;t<e.oldValue.length&&t<e.newValue.length;){const r=e.oldValue[t],s=e.newValue[t],o=e.differ.diff(r,s);equals$1(o,e.differ.empty)||(n=combine$2(n,makeUpdate(t,o))),t=t+1}return t<e.oldValue.length&&(n=combine$2(n,makeSlice(0,t))),t<e.newValue.length&&(n=combine$2(n,makeAppend(drop$1(t)(e.newValue)))),n},combine$2=dual(2,(e,t)=>makeAndThen(e,t)),patch$5=dual(3,(e,t,n)=>{if(e._tag==="Empty")return t;let r=t.slice(),s=of$2(e);for(;isNonEmptyArray(s);){const o=headNonEmpty$1(s),i=tailNonEmpty$1(s);switch(o._tag){case"Empty":{s=i;break}case"AndThen":{i.unshift(o.first,o.second),s=i;break}case"Append":{for(const a of o.values)r.push(a);s=i;break}case"Slice":{r=r.slice(o.from,o.until),s=i;break}case"Update":{r[o.index]=n.patch(o.patch,r[o.index]),s=i;break}}}return r}),DifferTypeId=Symbol.for("effect/Differ"),DifferProto={[DifferTypeId]:{_P:identity$1,_V:identity$1},pipe(){return pipeArguments(this,arguments)}},make$d=e=>{const t=Object.create(DifferProto);return t.empty=e.empty,t.diff=e.diff,t.combine=e.combine,t.patch=e.patch,t},environment=()=>make$d({empty:empty$a(),combine:(e,t)=>combine$4(t)(e),diff:(e,t)=>diff$6(e,t),patch:(e,t)=>patch$7(t)(e)}),hashSet$1=()=>make$d({empty:empty$9(),combine:(e,t)=>combine$3(t)(e),diff:(e,t)=>diff$5(e,t),patch:(e,t)=>patch$6(t)(e)}),readonlyArray=e=>make$d({empty:empty$8(),combine:(t,n)=>combine$2(t,n),diff:(t,n)=>diff$4({oldValue:t,newValue:n,differ:e}),patch:(t,n)=>patch$5(t,n,e)}),update$2=()=>updateWith((e,t)=>t),updateWith=e=>make$d({empty:identity$1,combine:(t,n)=>t===identity$1?n:n===identity$1?t:r=>n(t(r)),diff:(t,n)=>equals$1(t,n)?identity$1:constant$1(n),patch:(t,n)=>e(n,t(n))}),BIT_MASK=255,BIT_SHIFT=8,active=e=>e&BIT_MASK,enabled=e=>e>>BIT_SHIFT&BIT_MASK,make$c=(e,t)=>(e&BIT_MASK)+((t&e&BIT_MASK)<<BIT_SHIFT),empty$7=make$c(0,0),enable$2=e=>make$c(e,e),disable$1=e=>make$c(e,0),exclude$1=dual(2,(e,t)=>make$c(active(e)&~t,enabled(e))),andThen=dual(2,(e,t)=>e|t),invert=e=>~e>>>0&BIT_MASK,None$1=0,Interruption=1,OpSupervision=2,RuntimeMetrics=4,WindDown=16,CooperativeYielding=32,cooperativeYielding=e=>isEnabled(e,CooperativeYielding),enable$1=dual(2,(e,t)=>e|t),interruptible$2=e=>interruption(e)&&!windDown(e),interruption=e=>isEnabled(e,Interruption),isEnabled=dual(2,(e,t)=>(e&t)!==0),make$b=(...e)=>e.reduce((t,n)=>t|n,0),none$1=make$b(None$1),runtimeMetrics=e=>isEnabled(e,RuntimeMetrics),windDown=e=>isEnabled(e,WindDown),diff$3=dual(2,(e,t)=>make$c(e^t,t)),patch$4=dual(2,(e,t)=>e&(invert(active(t))|enabled(t))|active(t)&enabled(t)),differ$1=make$d({empty:empty$7,diff:(e,t)=>diff$3(e,t),combine:(e,t)=>andThen(t)(e),patch:(e,t)=>patch$4(t,e)}),enable=enable$2,disable=disable$1,exclude=exclude$1,par=(e,t)=>({_tag:"Par",left:e,right:t}),seq=(e,t)=>({_tag:"Seq",left:e,right:t}),flatten$1=e=>{let t=of(e),n=empty$b();for(;;){const[r,s]=reduce$2(t,[parallelCollectionEmpty(),empty$b()],([o,i],a)=>{const[l,u]=step$1(a);return[parallelCollectionCombine(o,l),appendAll(i,u)]});if(n=merge$2(n,r),isNil(s))return reverse(n);t=s}throw new Error("BUG: BlockedRequests.flatten - please report an issue at https://github.com/Effect-TS/effect/issues")},step$1=e=>{let t=e,n=parallelCollectionEmpty(),r=empty$b(),s=empty$b();for(;;)switch(t._tag){case"Empty":{if(isNil(r))return[n,s];t=r.head,r=r.tail;break}case"Par":{r=cons(t.right,r),t=t.left;break}case"Seq":{const o=t.left,i=t.right;switch(o._tag){case"Empty":{t=i;break}case"Par":{const a=o.left,l=o.right;t=par(seq(a,i),seq(l,i));break}case"Seq":{const a=o.left,l=o.right;t=seq(a,seq(l,i));break}case"Single":{t=o,s=cons(i,s);break}}break}case"Single":{if(n=parallelCollectionAdd(n,t),isNil(r))return[n,s];t=r.head,r=r.tail;break}}throw new Error("BUG: BlockedRequests.step - please report an issue at https://github.com/Effect-TS/effect/issues")},merge$2=(e,t)=>{if(isNil(e))return of(parallelCollectionToSequentialCollection(t));if(parallelCollectionIsEmpty(t))return e;const n=sequentialCollectionKeys(e.head),r=parallelCollectionKeys(t);return n.length===1&&r.length===1&&equals$1(n[0],r[0])?cons(sequentialCollectionCombine(e.head,parallelCollectionToSequentialCollection(t)),e.tail):cons(parallelCollectionToSequentialCollection(t),e)},RequestBlockParallelTypeId=Symbol.for("effect/RequestBlock/RequestBlockParallel"),parallelVariance={_R:e=>e};class ParallelImpl{map;[RequestBlockParallelTypeId]=parallelVariance;constructor(t){this.map=t}}const parallelCollectionEmpty=()=>new ParallelImpl(empty$c()),parallelCollectionAdd=(e,t)=>new ParallelImpl(modifyAt(e.map,t.dataSource,n=>orElseSome(map$4(n,append(t.blockedRequest)),()=>of$1(t.blockedRequest)))),parallelCollectionCombine=(e,t)=>new ParallelImpl(reduce$3(e.map,t.map,(n,r,s)=>set$2(n,s,match$3(get$3(n,s),{onNone:()=>r,onSome:o=>appendAll$1(r,o)})))),parallelCollectionIsEmpty=e=>isEmpty$1(e.map),parallelCollectionKeys=e=>Array.from(keys(e.map)),parallelCollectionToSequentialCollection=e=>sequentialCollectionMake(map$1(e.map,t=>of$1(t))),SequentialCollectionTypeId=Symbol.for("effect/RequestBlock/RequestBlockSequential"),sequentialVariance={_R:e=>e};class SequentialImpl{map;[SequentialCollectionTypeId]=sequentialVariance;constructor(t){this.map=t}}const sequentialCollectionMake=e=>new SequentialImpl(e),sequentialCollectionCombine=(e,t)=>new SequentialImpl(reduce$3(t.map,e.map,(n,r,s)=>set$2(n,s,match$3(get$3(n,s),{onNone:()=>empty$g(),onSome:o=>appendAll$1(o,r)})))),sequentialCollectionKeys=e=>Array.from(keys(e.map)),sequentialCollectionToChunk=e=>Array.from(e.map),OP_DIE="Die",OP_EMPTY$2="Empty",OP_FAIL$1="Fail",OP_INTERRUPT="Interrupt",OP_PARALLEL$1="Parallel",OP_SEQUENTIAL$1="Sequential",CauseSymbolKey="effect/Cause",CauseTypeId=Symbol.for(CauseSymbolKey),variance={_E:e=>e},proto$2={[CauseTypeId]:variance,[symbol$1](){return pipe(hash(CauseSymbolKey),combine$5(hash(flattenCause(this))),cached(this))},[symbol](e){return isCause(e)&&causeEquals(this,e)},pipe(){return pipeArguments(this,arguments)},toJSON(){switch(this._tag){case"Empty":return{_id:"Cause",_tag:this._tag};case"Die":return{_id:"Cause",_tag:this._tag,defect:toJSON(this.defect)};case"Interrupt":return{_id:"Cause",_tag:this._tag,fiberId:this.fiberId.toJSON()};case"Fail":return{_id:"Cause",_tag:this._tag,failure:toJSON(this.error)};case"Sequential":case"Parallel":return{_id:"Cause",_tag:this._tag,left:toJSON(this.left),right:toJSON(this.right)}}},toString(){return pretty(this)},[NodeInspectSymbol](){return this.toJSON()}},empty$6=(()=>{const e=Object.create(proto$2);return e._tag=OP_EMPTY$2,e})(),fail$1=e=>{const t=Object.create(proto$2);return t._tag=OP_FAIL$1,t.error=e,t},die$1=e=>{const t=Object.create(proto$2);return t._tag=OP_DIE,t.defect=e,t},interrupt=e=>{const t=Object.create(proto$2);return t._tag=OP_INTERRUPT,t.fiberId=e,t},parallel$2=(e,t)=>{const n=Object.create(proto$2);return n._tag=OP_PARALLEL$1,n.left=e,n.right=t,n},sequential$2=(e,t)=>{const n=Object.create(proto$2);return n._tag=OP_SEQUENTIAL$1,n.left=e,n.right=t,n},isCause=e=>hasProperty(e,CauseTypeId),isEmptyType=e=>e._tag===OP_EMPTY$2,isEmpty=e=>e._tag===OP_EMPTY$2?!0:reduce$1(e,!0,(t,n)=>{switch(n._tag){case OP_EMPTY$2:return some(t);case OP_DIE:case OP_FAIL$1:case OP_INTERRUPT:return some(!1);default:return none$4()}}),isInterrupted=e=>isSome(interruptOption(e)),isInterruptedOnly=e=>reduceWithContext(void 0,IsInterruptedOnlyCauseReducer)(e),failures=e=>reverse$1(reduce$1(e,empty$g(),(t,n)=>n._tag===OP_FAIL$1?some(pipe(t,prepend$1(n.error))):none$4())),defects=e=>reverse$1(reduce$1(e,empty$g(),(t,n)=>n._tag===OP_DIE?some(pipe(t,prepend$1(n.defect))):none$4())),interruptors=e=>reduce$1(e,empty$d(),(t,n)=>n._tag===OP_INTERRUPT?some(pipe(t,add(n.fiberId))):none$4()),failureOption=e=>find$1(e,t=>t._tag===OP_FAIL$1?some(t.error):none$4()),failureOrCause=e=>{const t=failureOption(e);switch(t._tag){case"None":return right(e);case"Some":return left(t.value)}},interruptOption=e=>find$1(e,t=>t._tag===OP_INTERRUPT?some(t.fiberId):none$4()),stripFailures=e=>match$1(e,{onEmpty:empty$6,onFail:()=>empty$6,onDie:die$1,onInterrupt:interrupt,onSequential:sequential$2,onParallel:parallel$2}),electFailures=e=>match$1(e,{onEmpty:empty$6,onFail:die$1,onDie:die$1,onInterrupt:interrupt,onSequential:sequential$2,onParallel:parallel$2}),causeEquals=(e,t)=>{let n=of$1(e),r=of$1(t);for(;isNonEmpty(n)&&isNonEmpty(r);){const[s,o]=pipe(headNonEmpty(n),reduce$1([empty$d(),empty$g()],([l,u],f)=>{const[d,m]=evaluateCause(f);return some([pipe(l,union(d)),pipe(u,appendAll$1(m))])})),[i,a]=pipe(headNonEmpty(r),reduce$1([empty$d(),empty$g()],([l,u],f)=>{const[d,m]=evaluateCause(f);return some([pipe(l,union(d)),pipe(u,appendAll$1(m))])}));if(!equals$1(s,i))return!1;n=o,r=a}return!0},flattenCause=e=>flattenCauseLoop(of$1(e),empty$g()),flattenCauseLoop=(e,t)=>{for(;;){const[n,r]=pipe(e,reduce$7([empty$d(),empty$g()],([o,i],a)=>{const[l,u]=evaluateCause(a);return[pipe(o,union(l)),pipe(i,appendAll$1(u))]})),s=size(n)>0?pipe(t,prepend$1(n)):t;if(isEmpty$3(r))return reverse$1(s);e=r,t=s}throw new Error(getBugErrorMessage("Cause.flattenCauseLoop"))},find$1=dual(2,(e,t)=>{const n=[e];for(;n.length>0;){const r=n.pop(),s=t(r);switch(s._tag){case"None":{switch(r._tag){case OP_SEQUENTIAL$1:case OP_PARALLEL$1:{n.push(r.right),n.push(r.left);break}}break}case"Some":return s}}return none$4()}),evaluateCause=e=>{let t=e;const n=[];let r=empty$d(),s=empty$g();for(;t!==void 0;)switch(t._tag){case OP_EMPTY$2:{if(n.length===0)return[r,s];t=n.pop();break}case OP_FAIL$1:{if(r=add(r,make$j(t._tag,t.error)),n.length===0)return[r,s];t=n.pop();break}case OP_DIE:{if(r=add(r,make$j(t._tag,t.defect)),n.length===0)return[r,s];t=n.pop();break}case OP_INTERRUPT:{if(r=add(r,make$j(t._tag,t.fiberId)),n.length===0)return[r,s];t=n.pop();break}case OP_SEQUENTIAL$1:{switch(t.left._tag){case OP_EMPTY$2:{t=t.right;break}case OP_SEQUENTIAL$1:{t=sequential$2(t.left.left,sequential$2(t.left.right,t.right));break}case OP_PARALLEL$1:{t=parallel$2(sequential$2(t.left.left,t.right),sequential$2(t.left.right,t.right));break}default:{s=prepend$1(s,t.right),t=t.left;break}}break}case OP_PARALLEL$1:{n.push(t.right),t=t.left;break}}throw new Error(getBugErrorMessage("Cause.evaluateCauseLoop"))},IsInterruptedOnlyCauseReducer={emptyCase:constTrue,failCase:constFalse,dieCase:constFalse,interruptCase:constTrue,sequentialCase:(e,t,n)=>t&&n,parallelCase:(e,t,n)=>t&&n},OP_SEQUENTIAL_CASE="SequentialCase",OP_PARALLEL_CASE="ParallelCase",match$1=dual(2,(e,{onDie:t,onEmpty:n,onFail:r,onInterrupt:s,onParallel:o,onSequential:i})=>reduceWithContext(e,void 0,{emptyCase:()=>n,failCase:(a,l)=>r(l),dieCase:(a,l)=>t(l),interruptCase:(a,l)=>s(l),sequentialCase:(a,l,u)=>i(l,u),parallelCase:(a,l,u)=>o(l,u)})),reduce$1=dual(3,(e,t,n)=>{let r=t,s=e;const o=[];for(;s!==void 0;){const i=n(r,s);switch(r=isSome(i)?i.value:r,s._tag){case OP_SEQUENTIAL$1:{o.push(s.right),s=s.left;break}case OP_PARALLEL$1:{o.push(s.right),s=s.left;break}default:{s=void 0;break}}s===void 0&&o.length>0&&(s=o.pop())}return r}),reduceWithContext=dual(3,(e,t,n)=>{const r=[e],s=[];for(;r.length>0;){const i=r.pop();switch(i._tag){case OP_EMPTY$2:{s.push(right(n.emptyCase(t)));break}case OP_FAIL$1:{s.push(right(n.failCase(t,i.error)));break}case OP_DIE:{s.push(right(n.dieCase(t,i.defect)));break}case OP_INTERRUPT:{s.push(right(n.interruptCase(t,i.fiberId)));break}case OP_SEQUENTIAL$1:{r.push(i.right),r.push(i.left),s.push(left({_tag:OP_SEQUENTIAL_CASE}));break}case OP_PARALLEL$1:{r.push(i.right),r.push(i.left),s.push(left({_tag:OP_PARALLEL_CASE}));break}}}const o=[];for(;s.length>0;){const i=s.pop();switch(i._tag){case"Left":{switch(i.left._tag){case OP_SEQUENTIAL_CASE:{const a=o.pop(),l=o.pop(),u=n.sequentialCase(t,a,l);o.push(u);break}case OP_PARALLEL_CASE:{const a=o.pop(),l=o.pop(),u=n.parallelCase(t,a,l);o.push(u);break}}break}case"Right":{o.push(i.right);break}}}if(o.length===0)throw new Error("BUG: Cause.reduceWithContext - please report an issue at https://github.com/Effect-TS/effect/issues");return o.pop()}),pretty=(e,t)=>isInterruptedOnly(e)?"All fibers interrupted without errors.":prettyErrors(e).map(function(n){return t?.renderErrorCause!==!0||n.cause===void 0?n.stack:`${n.stack} {
5
+ ${renderErrorCause(n.cause," ")}
6
+ }`}).join(`
7
+ `),renderErrorCause=(e,t)=>{const n=e.stack.split(`
8
+ `);let r=`${t}[cause]: ${n[0]}`;for(let s=1,o=n.length;s<o;s++)r+=`
9
+ ${t}${n[s]}`;return e.cause&&(r+=` {
10
+ ${renderErrorCause(e.cause,`${t} `)}
11
+ ${t}}`),r};class PrettyError extends globalThis.Error{span=void 0;constructor(t){const n=typeof t=="object"&&t!==null,r=Error.stackTraceLimit;Error.stackTraceLimit=1,super(prettyErrorMessage(t),n&&"cause"in t&&typeof t.cause<"u"?{cause:new PrettyError(t.cause)}:void 0),this.message===""&&(this.message="An error has occurred"),Error.stackTraceLimit=r,this.name=t instanceof Error?t.name:"Error",n&&(spanSymbol in t&&(this.span=t[spanSymbol]),Object.keys(t).forEach(s=>{s in this||(this[s]=t[s])})),this.stack=prettyErrorStack(`${this.name}: ${this.message}`,t instanceof Error&&t.stack?t.stack:"",this.span)}}const prettyErrorMessage=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e!==null&&e instanceof Error)return e.message;try{if(hasProperty(e,"toString")&&isFunction$2(e.toString)&&e.toString!==Object.prototype.toString&&e.toString!==globalThis.Array.prototype.toString)return e.toString()}catch{}return stringifyCircular(e)},locationRegex=/\((.*)\)/g,spanToTrace=globalValue("effect/Tracer/spanToTrace",()=>new WeakMap),prettyErrorStack=(e,t,n)=>{const r=[e],s=t.startsWith(e)?t.slice(e.length).split(`
12
+ `):t.split(`
13
+ `);for(let o=1;o<s.length;o++){if(s[o].includes(" at new BaseEffectError")||s[o].includes(" at new YieldableError")){o++;continue}if(s[o].includes("Generator.next")||s[o].includes("effect_internal_function"))break;r.push(s[o].replace(/at .*effect_instruction_i.*\((.*)\)/,"at $1").replace(/EffectPrimitive\.\w+/,"<anonymous>"))}if(n){let o=n,i=0;for(;o&&o._tag==="Span"&&i<10;){const a=spanToTrace.get(o);if(typeof a=="function"){const l=a();if(typeof l=="string"){const u=l.matchAll(locationRegex);let f=!1;for(const[,d]of u)f=!0,r.push(` at ${o.name} (${d})`);f||r.push(` at ${o.name} (${l.replace(/^at /,"")})`)}else r.push(` at ${o.name}`)}else r.push(` at ${o.name}`);o=getOrUndefined(o.parent),i++}}return r.join(`
14
+ `)},spanSymbol=Symbol.for("effect/SpanAnnotation"),prettyErrors=e=>reduceWithContext(e,void 0,{emptyCase:()=>[],dieCase:(t,n)=>[new PrettyError(n)],failCase:(t,n)=>[new PrettyError(n)],interruptCase:()=>[],parallelCase:(t,n,r)=>[...n,...r],sequentialCase:(t,n,r)=>[...n,...r]}),OP_STATE_PENDING="Pending",OP_STATE_DONE="Done",DeferredSymbolKey="effect/Deferred",DeferredTypeId=Symbol.for(DeferredSymbolKey),deferredVariance={_E:e=>e,_A:e=>e},pending=e=>({_tag:OP_STATE_PENDING,joiners:e}),done$2=e=>({_tag:OP_STATE_DONE,effect:e});class SingleShotGen{self;called=!1;constructor(t){this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new SingleShotGen(this.self)}}const blocked=(e,t)=>{const n=new EffectPrimitive("Blocked");return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n},runRequestBlock=e=>{const t=new EffectPrimitive("RunBlocked");return t.effect_instruction_i0=e,t},EffectTypeId=Symbol.for("effect/Effect");class RevertFlags{patch;op;_op=OP_REVERT_FLAGS;constructor(t,n){this.patch=t,this.op=n}}class EffectPrimitive{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[EffectTypeId]=effectVariance;constructor(t){this._op=t}[symbol](t){return this===t}[symbol$1](){return cached(this,random(this))}pipe(){return pipeArguments(this,arguments)}toJSON(){return{_id:"Effect",_op:this._op,effect_instruction_i0:toJSON(this.effect_instruction_i0),effect_instruction_i1:toJSON(this.effect_instruction_i1),effect_instruction_i2:toJSON(this.effect_instruction_i2)}}toString(){return format$2(this.toJSON())}[NodeInspectSymbol](){return this.toJSON()}[Symbol.iterator](){return new SingleShotGen(new YieldWrap(this))}}class EffectPrimitiveFailure{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[EffectTypeId]=effectVariance;constructor(t){this._op=t,this._tag=t}[symbol](t){return exitIsExit(t)&&t._op==="Failure"&&equals$1(this.effect_instruction_i0,t.effect_instruction_i0)}[symbol$1](){return pipe(string(this._tag),combine$5(hash(this.effect_instruction_i0)),cached(this))}get cause(){return this.effect_instruction_i0}pipe(){return pipeArguments(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,cause:this.cause.toJSON()}}toString(){return format$2(this.toJSON())}[NodeInspectSymbol](){return this.toJSON()}[Symbol.iterator](){return new SingleShotGen(new YieldWrap(this))}}class EffectPrimitiveSuccess{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[EffectTypeId]=effectVariance;constructor(t){this._op=t,this._tag=t}[symbol](t){return exitIsExit(t)&&t._op==="Success"&&equals$1(this.effect_instruction_i0,t.effect_instruction_i0)}[symbol$1](){return pipe(string(this._tag),combine$5(hash(this.effect_instruction_i0)),cached(this))}get value(){return this.effect_instruction_i0}pipe(){return pipeArguments(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,value:toJSON(this.value)}}toString(){return format$2(this.toJSON())}[NodeInspectSymbol](){return this.toJSON()}[Symbol.iterator](){return new SingleShotGen(new YieldWrap(this))}}const isEffect=e=>hasProperty(e,EffectTypeId),withFiberRuntime=e=>{const t=new EffectPrimitive(OP_WITH_RUNTIME);return t.effect_instruction_i0=e,t},acquireUseRelease=dual(3,(e,t,n)=>uninterruptibleMask$1(r=>flatMap$1(e,s=>flatMap$1(exit(suspend$1(()=>r(t(s)))),o=>suspend$1(()=>n(s,o)).pipe(matchCauseEffect$1({onFailure:i=>{switch(o._tag){case OP_FAILURE:return failCause$1(sequential$2(o.effect_instruction_i0,i));case OP_SUCCESS:return failCause$1(i)}},onSuccess:()=>o})))))),as=dual(2,(e,t)=>flatMap$1(e,()=>succeed$1(t))),asVoid=e=>as(e,void 0),custom=function(){const e=new EffectPrimitive(OP_COMMIT);switch(arguments.length){case 2:{e.effect_instruction_i0=arguments[0],e.commit=arguments[1];break}case 3:{e.effect_instruction_i0=arguments[0],e.effect_instruction_i1=arguments[1],e.commit=arguments[2];break}case 4:{e.effect_instruction_i0=arguments[0],e.effect_instruction_i1=arguments[1],e.effect_instruction_i2=arguments[2],e.commit=arguments[3];break}default:throw new Error(getBugErrorMessage("you're not supposed to end up here"))}return e},unsafeAsync=(e,t=none$2)=>{const n=new EffectPrimitive(OP_ASYNC);let r;return n.effect_instruction_i0=s=>{r=e(s)},n.effect_instruction_i1=t,onInterrupt(n,s=>isEffect(r)?r:void_$1)},asyncInterrupt=(e,t=none$2)=>suspend$1(()=>unsafeAsync(e,t)),async_=(e,t=none$2)=>custom(e,function(){let n,r;function s(l){n?n(l):r===void 0&&(r=l)}const o=new EffectPrimitive(OP_ASYNC);o.effect_instruction_i0=l=>{n=l,r&&l(r)},o.effect_instruction_i1=t;let i,a;return this.effect_instruction_i0.length!==1?(a=new AbortController,i=internalCall(()=>this.effect_instruction_i0(s,a.signal))):i=internalCall(()=>this.effect_instruction_i0(s)),i||a?onInterrupt(o,l=>(a&&a.abort(),i??void_$1)):o}),catchAll=dual(2,(e,t)=>matchEffect(e,{onFailure:t,onSuccess:succeed$1})),originalSymbol=Symbol.for("effect/OriginalAnnotation"),capture=(e,t)=>isSome(t)?new Proxy(e,{has(n,r){return r===spanSymbol||r===originalSymbol||r in n},get(n,r){return r===spanSymbol?t.value:r===originalSymbol?e:n[r]}}):e,die=e=>isObject$2(e)&&!(spanSymbol in e)?withFiberRuntime(t=>failCause$1(die$1(capture(e,currentSpanFromFiber(t))))):failCause$1(die$1(e)),dieMessage=e=>failCauseSync(()=>die$1(new RuntimeException(e))),either=e=>matchEffect(e,{onFailure:t=>succeed$1(left(t)),onSuccess:t=>succeed$1(right(t))}),exit=e=>matchCause(e,{onFailure:exitFailCause$1,onSuccess:exitSucceed$1}),fail=e=>isObject$2(e)&&!(spanSymbol in e)?withFiberRuntime(t=>failCause$1(fail$1(capture(e,currentSpanFromFiber(t))))):failCause$1(fail$1(e)),failSync=e=>flatMap$1(sync(e),fail),failCause$1=e=>{const t=new EffectPrimitiveFailure(OP_FAILURE);return t.effect_instruction_i0=e,t},failCauseSync=e=>flatMap$1(sync(e),failCause$1),fiberId=withFiberRuntime(e=>succeed$1(e.id())),fiberIdWith=e=>withFiberRuntime(t=>e(t.id())),flatMap$1=dual(2,(e,t)=>{const n=new EffectPrimitive(OP_ON_SUCCESS);return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n}),step=e=>{const t=new EffectPrimitive("OnStep");return t.effect_instruction_i0=e,t},flatten=e=>flatMap$1(e,identity$1),matchCause=dual(2,(e,t)=>matchCauseEffect$1(e,{onFailure:n=>succeed$1(t.onFailure(n)),onSuccess:n=>succeed$1(t.onSuccess(n))})),matchCauseEffect$1=dual(2,(e,t)=>{const n=new EffectPrimitive(OP_ON_SUCCESS_AND_FAILURE);return n.effect_instruction_i0=e,n.effect_instruction_i1=t.onFailure,n.effect_instruction_i2=t.onSuccess,n}),matchEffect=dual(2,(e,t)=>matchCauseEffect$1(e,{onFailure:n=>{if(defects(n).length>0)return failCause$1(electFailures(n));const s=failures(n);return s.length>0?t.onFailure(unsafeHead(s)):failCause$1(n)},onSuccess:t.onSuccess})),forEachSequential=dual(2,(e,t)=>suspend$1(()=>{const n=fromIterable$6(e),r=allocate(n.length);let s=0;return as(whileLoop({while:()=>s<n.length,body:()=>t(n[s],s),step:o=>{r[s++]=o}}),r)})),forEachSequentialDiscard=dual(2,(e,t)=>suspend$1(()=>{const n=fromIterable$6(e);let r=0;return whileLoop({while:()=>r<n.length,body:()=>t(n[r],r),step:()=>{r++}})})),interruptible$1=e=>{const t=new EffectPrimitive(OP_UPDATE_RUNTIME_FLAGS);return t.effect_instruction_i0=enable(Interruption),t.effect_instruction_i1=()=>e,t},map=dual(2,(e,t)=>flatMap$1(e,n=>sync(()=>t(n)))),mapBoth=dual(2,(e,t)=>matchEffect(e,{onFailure:n=>failSync(()=>t.onFailure(n)),onSuccess:n=>sync(()=>t.onSuccess(n))})),mapError=dual(2,(e,t)=>matchCauseEffect$1(e,{onFailure:n=>{const r=failureOrCause(n);switch(r._tag){case"Left":return failSync(()=>t(r.left));case"Right":return failCause$1(r.right)}},onSuccess:succeed$1})),onExit$1=dual(2,(e,t)=>uninterruptibleMask$1(n=>matchCauseEffect$1(n(e),{onFailure:r=>{const s=exitFailCause$1(r);return matchCauseEffect$1(t(s),{onFailure:o=>exitFailCause$1(sequential$2(r,o)),onSuccess:()=>s})},onSuccess:r=>{const s=exitSucceed$1(r);return zipRight(t(s),s)}}))),onInterrupt=dual(2,(e,t)=>onExit$1(e,exitMatch({onFailure:n=>isInterruptedOnly(n)?asVoid(t(interruptors(n))):void_$1,onSuccess:()=>void_$1}))),succeed$1=e=>{const t=new EffectPrimitiveSuccess(OP_SUCCESS);return t.effect_instruction_i0=e,t},suspend$1=e=>{const t=new EffectPrimitive(OP_COMMIT);return t.commit=e,t},sync=e=>{const t=new EffectPrimitive(OP_SYNC);return t.effect_instruction_i0=e,t},tap=dual(e=>e.length===3||e.length===2&&!(isObject$2(e[1])&&"onlyEffect"in e[1]),(e,t)=>flatMap$1(e,n=>{const r=typeof t=="function"?t(n):t;return isEffect(r)?as(r,n):isPromiseLike(r)?unsafeAsync(s=>{r.then(o=>s(succeed$1(n)),o=>s(fail(new UnknownException(o,"An unknown error occurred in Effect.tap"))))}):succeed$1(n)})),transplant=e=>withFiberRuntime(t=>{const n=t.getFiberRef(currentForkScopeOverride),r=pipe(n,getOrElse(()=>t.scope()));return e(fiberRefLocally(currentForkScopeOverride,some(r)))}),uninterruptible=e=>{const t=new EffectPrimitive(OP_UPDATE_RUNTIME_FLAGS);return t.effect_instruction_i0=disable(Interruption),t.effect_instruction_i1=()=>e,t},uninterruptibleMask$1=e=>custom(e,function(){const t=new EffectPrimitive(OP_UPDATE_RUNTIME_FLAGS);return t.effect_instruction_i0=disable(Interruption),t.effect_instruction_i1=n=>interruption(n)?internalCall(()=>this.effect_instruction_i0(interruptible$1)):internalCall(()=>this.effect_instruction_i0(uninterruptible)),t}),void_$1=succeed$1(void 0),updateRuntimeFlags=e=>{const t=new EffectPrimitive(OP_UPDATE_RUNTIME_FLAGS);return t.effect_instruction_i0=e,t.effect_instruction_i1=void 0,t},whenEffect=dual(2,(e,t)=>flatMap$1(t,n=>n?pipe(e,map(some)):succeed$1(none$4()))),whileLoop=e=>{const t=new EffectPrimitive(OP_WHILE);return t.effect_instruction_i0=e.while,t.effect_instruction_i1=e.body,t.effect_instruction_i2=e.step,t},fromIterator=e=>suspend$1(()=>{const t=new EffectPrimitive(OP_ITERATOR);return t.effect_instruction_i0=e(),t}),gen$1=function(){const e=arguments.length===1?arguments[0]:arguments[1].bind(arguments[0]);return fromIterator(()=>e(pipe))},yieldNow$2=e=>{const t=new EffectPrimitive(OP_YIELD);return typeof e?.priority<"u"?withSchedulingPriority(t,e.priority):t},zip=dual(2,(e,t)=>flatMap$1(e,n=>map(t,r=>[n,r]))),zipLeft=dual(2,(e,t)=>flatMap$1(e,n=>as(t,n))),zipRight=dual(2,(e,t)=>flatMap$1(e,()=>t)),zipWith$1=dual(3,(e,t,n)=>flatMap$1(e,r=>map(t,s=>n(r,s)))),interruptFiber=e=>flatMap$1(fiberId,t=>pipe(e,interruptAsFiber(t))),interruptAsFiber=dual(2,(e,t)=>flatMap$1(e.interruptAsFork(t),()=>e.await)),logLevelAll={_tag:"All",syslog:0,label:"ALL",ordinal:Number.MIN_SAFE_INTEGER,pipe(){return pipeArguments(this,arguments)}},logLevelFatal={_tag:"Fatal",syslog:2,label:"FATAL",ordinal:5e4,pipe(){return pipeArguments(this,arguments)}},logLevelError={_tag:"Error",syslog:3,label:"ERROR",ordinal:4e4,pipe(){return pipeArguments(this,arguments)}},logLevelWarning={_tag:"Warning",syslog:4,label:"WARN",ordinal:3e4,pipe(){return pipeArguments(this,arguments)}},logLevelInfo={_tag:"Info",syslog:6,label:"INFO",ordinal:2e4,pipe(){return pipeArguments(this,arguments)}},logLevelDebug={_tag:"Debug",syslog:7,label:"DEBUG",ordinal:1e4,pipe(){return pipeArguments(this,arguments)}},logLevelTrace={_tag:"Trace",syslog:7,label:"TRACE",ordinal:0,pipe(){return pipeArguments(this,arguments)}},logLevelNone={_tag:"None",syslog:7,label:"OFF",ordinal:Number.MAX_SAFE_INTEGER,pipe(){return pipeArguments(this,arguments)}},FiberRefSymbolKey="effect/FiberRef",FiberRefTypeId=Symbol.for(FiberRefSymbolKey),fiberRefVariance={_A:e=>e},fiberRefGet=e=>withFiberRuntime(t=>exitSucceed$1(t.getFiberRef(e))),fiberRefGetWith=dual(2,(e,t)=>flatMap$1(fiberRefGet(e),t)),fiberRefSet=dual(2,(e,t)=>fiberRefModify(e,()=>[void 0,t])),fiberRefModify=dual(2,(e,t)=>withFiberRuntime(n=>{const[r,s]=t(n.getFiberRef(e));return n.setFiberRef(e,s),succeed$1(r)})),fiberRefLocally=dual(3,(e,t,n)=>acquireUseRelease(zipLeft(fiberRefGet(t),fiberRefSet(t,n)),()=>e,r=>fiberRefSet(t,r))),fiberRefLocallyWith=dual(3,(e,t,n)=>fiberRefGetWith(t,r=>fiberRefLocally(e,t,n(r)))),fiberRefUnsafeMake=(e,t)=>fiberRefUnsafeMakePatch(e,{differ:update$2(),fork:t?.fork??identity$1,join:t?.join}),fiberRefUnsafeMakeHashSet=e=>{const t=hashSet$1();return fiberRefUnsafeMakePatch(e,{differ:t,fork:t.empty})},fiberRefUnsafeMakeReadonlyArray=e=>{const t=readonlyArray(update$2());return fiberRefUnsafeMakePatch(e,{differ:t,fork:t.empty})},fiberRefUnsafeMakeContext=e=>{const t=environment();return fiberRefUnsafeMakePatch(e,{differ:t,fork:t.empty})},fiberRefUnsafeMakePatch=(e,t)=>({...CommitPrototype,[FiberRefTypeId]:fiberRefVariance,initial:e,commit(){return fiberRefGet(this)},diff:(r,s)=>t.differ.diff(r,s),combine:(r,s)=>t.differ.combine(r,s),patch:r=>s=>t.differ.patch(r,s),fork:t.fork,join:t.join??((r,s)=>s)}),fiberRefUnsafeMakeRuntimeFlags=e=>fiberRefUnsafeMakePatch(e,{differ:differ$1,fork:differ$1.empty}),currentContext=globalValue(Symbol.for("effect/FiberRef/currentContext"),()=>fiberRefUnsafeMakeContext(empty$h())),currentSchedulingPriority=globalValue(Symbol.for("effect/FiberRef/currentSchedulingPriority"),()=>fiberRefUnsafeMake(0)),currentMaxOpsBeforeYield=globalValue(Symbol.for("effect/FiberRef/currentMaxOpsBeforeYield"),()=>fiberRefUnsafeMake(2048)),currentLogAnnotations=globalValue(Symbol.for("effect/FiberRef/currentLogAnnotation"),()=>fiberRefUnsafeMake(empty$c())),currentLogLevel=globalValue(Symbol.for("effect/FiberRef/currentLogLevel"),()=>fiberRefUnsafeMake(logLevelInfo)),currentLogSpan=globalValue(Symbol.for("effect/FiberRef/currentLogSpan"),()=>fiberRefUnsafeMake(empty$b())),withSchedulingPriority=dual(2,(e,t)=>fiberRefLocally(e,currentSchedulingPriority,t)),currentConcurrency=globalValue(Symbol.for("effect/FiberRef/currentConcurrency"),()=>fiberRefUnsafeMake("unbounded")),currentRequestBatching=globalValue(Symbol.for("effect/FiberRef/currentRequestBatching"),()=>fiberRefUnsafeMake(!0)),currentUnhandledErrorLogLevel=globalValue(Symbol.for("effect/FiberRef/currentUnhandledErrorLogLevel"),()=>fiberRefUnsafeMake(some(logLevelDebug))),currentVersionMismatchErrorLogLevel=globalValue(Symbol.for("effect/FiberRef/versionMismatchErrorLogLevel"),()=>fiberRefUnsafeMake(some(logLevelWarning))),currentMetricLabels=globalValue(Symbol.for("effect/FiberRef/currentMetricLabels"),()=>fiberRefUnsafeMakeReadonlyArray(empty$j())),currentForkScopeOverride=globalValue(Symbol.for("effect/FiberRef/currentForkScopeOverride"),()=>fiberRefUnsafeMake(none$4(),{fork:()=>none$4(),join:(e,t)=>e})),currentInterruptedCause=globalValue(Symbol.for("effect/FiberRef/currentInterruptedCause"),()=>fiberRefUnsafeMake(empty$6,{fork:()=>empty$6,join:(e,t)=>e})),ScopeTypeId=Symbol.for("effect/Scope"),CloseableScopeTypeId=Symbol.for("effect/CloseableScope"),scopeAddFinalizer=(e,t)=>e.addFinalizer(()=>asVoid(t)),scopeAddFinalizerExit=(e,t)=>e.addFinalizer(t),scopeClose=(e,t)=>e.close(t),scopeFork=(e,t)=>e.fork(t),YieldableError=function(){class e extends globalThis.Error{commit(){return fail(this)}toJSON(){const n={...this};return this.message&&(n.message=this.message),this.cause&&(n.cause=this.cause),n}[NodeInspectSymbol](){return this.toString!==globalThis.Error.prototype.toString?this.stack?`${this.toString()}
15
+ ${this.stack.split(`
16
+ `).slice(1).join(`
17
+ `)}`:this.toString():"Bun"in globalThis?pretty(fail$1(this),{renderErrorCause:!0}):this}}return Object.assign(e.prototype,StructuralCommitPrototype),e}(),makeException=(e,t)=>{class n extends YieldableError{_tag=t}return Object.assign(n.prototype,e),n.prototype.name=t,n},RuntimeExceptionTypeId=Symbol.for("effect/Cause/errors/RuntimeException"),RuntimeException=makeException({[RuntimeExceptionTypeId]:RuntimeExceptionTypeId},"RuntimeException"),InterruptedExceptionTypeId=Symbol.for("effect/Cause/errors/InterruptedException"),isInterruptedException=e=>hasProperty(e,InterruptedExceptionTypeId),NoSuchElementExceptionTypeId=Symbol.for("effect/Cause/errors/NoSuchElement"),NoSuchElementException=makeException({[NoSuchElementExceptionTypeId]:NoSuchElementExceptionTypeId},"NoSuchElementException"),UnknownExceptionTypeId=Symbol.for("effect/Cause/errors/UnknownException"),UnknownException=function(){class e extends YieldableError{_tag="UnknownException";error;constructor(n,r){super(r??"An unknown error occurred",{cause:n}),this.error=n}}return Object.assign(e.prototype,{[UnknownExceptionTypeId]:UnknownExceptionTypeId,name:"UnknownException"}),e}(),exitIsExit=e=>isEffect(e)&&"_tag"in e&&(e._tag==="Success"||e._tag==="Failure"),exitAs=dual(2,(e,t)=>{switch(e._tag){case OP_FAILURE:return exitFailCause$1(e.effect_instruction_i0);case OP_SUCCESS:return exitSucceed$1(t)}}),exitAsVoid=e=>exitAs(e,void 0),exitCollectAll=(e,t)=>exitCollectAllInternal(e,t?.parallel?parallel$2:sequential$2),exitFail=e=>exitFailCause$1(fail$1(e)),exitFailCause$1=e=>{const t=new EffectPrimitiveFailure(OP_FAILURE);return t.effect_instruction_i0=e,t},exitInterrupt$1=e=>exitFailCause$1(interrupt(e)),exitMap=dual(2,(e,t)=>{switch(e._tag){case OP_FAILURE:return exitFailCause$1(e.effect_instruction_i0);case OP_SUCCESS:return exitSucceed$1(t(e.effect_instruction_i0))}}),exitMatch=dual(2,(e,{onFailure:t,onSuccess:n})=>{switch(e._tag){case OP_FAILURE:return t(e.effect_instruction_i0);case OP_SUCCESS:return n(e.effect_instruction_i0)}}),exitMatchEffect=dual(2,(e,{onFailure:t,onSuccess:n})=>{switch(e._tag){case OP_FAILURE:return t(e.effect_instruction_i0);case OP_SUCCESS:return n(e.effect_instruction_i0)}}),exitSucceed$1=e=>{const t=new EffectPrimitiveSuccess(OP_SUCCESS);return t.effect_instruction_i0=e,t},exitVoid$1=exitSucceed$1(void 0),exitZipWith=dual(3,(e,t,{onFailure:n,onSuccess:r})=>{switch(e._tag){case OP_FAILURE:switch(t._tag){case OP_SUCCESS:return exitFailCause$1(e.effect_instruction_i0);case OP_FAILURE:return exitFailCause$1(n(e.effect_instruction_i0,t.effect_instruction_i0))}case OP_SUCCESS:switch(t._tag){case OP_SUCCESS:return exitSucceed$1(r(e.effect_instruction_i0,t.effect_instruction_i0));case OP_FAILURE:return exitFailCause$1(t.effect_instruction_i0)}}}),exitCollectAllInternal=(e,t)=>{const n=fromIterable$5(e);return isNonEmpty(n)?pipe(tailNonEmpty(n),reduce$7(pipe(headNonEmpty(n),exitMap(of$1)),(r,s)=>pipe(r,exitZipWith(s,{onSuccess:(o,i)=>pipe(o,prepend$1(i)),onFailure:t}))),exitMap(reverse$1),exitMap(r=>toReadonlyArray(r)),some):none$4()},deferredUnsafeMake=e=>({...CommitPrototype,[DeferredTypeId]:deferredVariance,state:make$e(pending([])),commit(){return deferredAwait(this)},blockingOn:e}),deferredMake=()=>flatMap$1(fiberId,e=>deferredMakeAs(e)),deferredMakeAs=e=>sync(()=>deferredUnsafeMake(e)),deferredAwait=e=>asyncInterrupt(t=>{const n=get$4(e.state);switch(n._tag){case OP_STATE_DONE:return t(n.effect);case OP_STATE_PENDING:return n.joiners.push(t),deferredInterruptJoiner(e,t)}},e.blockingOn),deferredCompleteWith=dual(2,(e,t)=>sync(()=>{const n=get$4(e.state);switch(n._tag){case OP_STATE_DONE:return!1;case OP_STATE_PENDING:{set$3(e.state,done$2(t));for(let r=0,s=n.joiners.length;r<s;r++)n.joiners[r](t);return!0}}})),deferredFailCause=dual(2,(e,t)=>deferredCompleteWith(e,failCause$1(t))),deferredSucceed=dual(2,(e,t)=>deferredCompleteWith(e,succeed$1(t))),deferredUnsafeDone=(e,t)=>{const n=get$4(e.state);if(n._tag===OP_STATE_PENDING){set$3(e.state,done$2(t));for(let r=0,s=n.joiners.length;r<s;r++)n.joiners[r](t)}},deferredInterruptJoiner=(e,t)=>sync(()=>{const n=get$4(e.state);if(n._tag===OP_STATE_PENDING){const r=n.joiners.indexOf(t);r>=0&&n.joiners.splice(r,1)}}),constContext=withFiberRuntime(e=>exitSucceed$1(e.currentContext)),context=()=>constContext,contextWithEffect=e=>flatMap$1(context(),e),provideContext$1=dual(2,(e,t)=>fiberRefLocally(currentContext,t)(e)),provideSomeContext=dual(2,(e,t)=>fiberRefLocallyWith(currentContext,n=>merge$3(n,t))(e)),mapInputContext=dual(2,(e,t)=>contextWithEffect(n=>provideContext$1(e,t(n)))),currentSpanFromFiber=e=>{const t=e.currentSpan;return t!==void 0&&t._tag==="Span"?some(t):none$4()},TypeId$4=Symbol.for("effect/MutableHashMap"),MutableHashMapProto={[TypeId$4]:TypeId$4,[Symbol.iterator](){return new MutableHashMapIterator(this)},toString(){return format$2(this.toJSON())},toJSON(){return{_id:"MutableHashMap",values:Array.from(this).map(toJSON)}},[NodeInspectSymbol](){return this.toJSON()},pipe(){return pipeArguments(this,arguments)}};class MutableHashMapIterator{self;referentialIterator;bucketIterator;constructor(t){this.self=t,this.referentialIterator=t.referential[Symbol.iterator]()}next(){if(this.bucketIterator!==void 0)return this.bucketIterator.next();const t=this.referentialIterator.next();return t.done?(this.bucketIterator=new BucketIterator(this.self.buckets.values()),this.next()):t}[Symbol.iterator](){return new MutableHashMapIterator(this.self)}}class BucketIterator{backing;constructor(t){this.backing=t}currentBucket;next(){if(this.currentBucket===void 0){const n=this.backing.next();if(n.done)return n;this.currentBucket=n.value[Symbol.iterator]()}const t=this.currentBucket.next();return t.done?(this.currentBucket=void 0,this.next()):t}}const empty$5=()=>{const e=Object.create(MutableHashMapProto);return e.referential=new Map,e.buckets=new Map,e.bucketsSize=0,e},get$2=dual(2,(e,t)=>{if(isEqual(t)===!1)return e.referential.has(t)?some(e.referential.get(t)):none$4();const n=t[symbol$1](),r=e.buckets.get(n);return r===void 0?none$4():getFromBucket(e,r,t)}),getFromBucket=(e,t,n,r=!1)=>{for(let s=0,o=t.length;s<o;s++)if(n[symbol](t[s][0])){const i=t[s][1];return r&&(t.splice(s,1),e.bucketsSize--),some(i)}return none$4()},has=dual(2,(e,t)=>isSome(get$2(e,t))),set$1=dual(3,(e,t,n)=>{if(isEqual(t)===!1)return e.referential.set(t,n),e;const r=t[symbol$1](),s=e.buckets.get(r);return s===void 0?(e.buckets.set(r,[[t,n]]),e.bucketsSize++,e):(removeFromBucket(e,s,t),s.push([t,n]),e.bucketsSize++,e)}),removeFromBucket=(e,t,n)=>{for(let r=0,s=t.length;r<s;r++)if(n[symbol](t[r][0])){t.splice(r,1),e.bucketsSize--;return}},ClockSymbolKey="effect/Clock",ClockTypeId=Symbol.for(ClockSymbolKey),clockTag=GenericTag("effect/Clock"),MAX_TIMER_MILLIS=2**31-1,globalClockScheduler={unsafeSchedule(e,t){const n=toMillis(t);if(n>MAX_TIMER_MILLIS)return constFalse;let r=!1;const s=setTimeout(()=>{r=!0,e()},n);return()=>(clearTimeout(s),!r)}},performanceNowNanos=function(){const e=BigInt(1e6);if(typeof performance>"u")return()=>BigInt(Date.now())*e;let t;return()=>(t===void 0&&(t=BigInt(Date.now())*e-BigInt(Math.round(performance.now()*1e6))),t+BigInt(Math.round(performance.now()*1e6)))}(),processOrPerformanceNow=function(){const e=typeof process=="object"&&"hrtime"in process&&typeof process.hrtime.bigint=="function"?process.hrtime:void 0;if(!e)return performanceNowNanos;const t=performanceNowNanos()-e.bigint();return()=>t+e.bigint()}();class ClockImpl{[ClockTypeId]=ClockTypeId;unsafeCurrentTimeMillis(){return Date.now()}unsafeCurrentTimeNanos(){return processOrPerformanceNow()}currentTimeMillis=sync(()=>this.unsafeCurrentTimeMillis());currentTimeNanos=sync(()=>this.unsafeCurrentTimeNanos());scheduler(){return succeed$1(globalClockScheduler)}sleep(t){return async_(n=>{const r=globalClockScheduler.unsafeSchedule(()=>n(void_$1),t);return asVoid(sync(r))})}}const make$a=()=>new ClockImpl,OP_AND="And",OP_OR="Or",OP_INVALID_DATA="InvalidData",OP_MISSING_DATA="MissingData",OP_SOURCE_UNAVAILABLE="SourceUnavailable",OP_UNSUPPORTED="Unsupported",ConfigErrorSymbolKey="effect/ConfigError",ConfigErrorTypeId=Symbol.for(ConfigErrorSymbolKey),proto$1={_tag:"ConfigError",[ConfigErrorTypeId]:ConfigErrorTypeId},And=(e,t)=>{const n=Object.create(proto$1);return n._op=OP_AND,n.left=e,n.right=t,Object.defineProperty(n,"toString",{enumerable:!1,value(){return`${this.left} and ${this.right}`}}),Object.defineProperty(n,"message",{enumerable:!1,get(){return this.toString()}}),n},Or=(e,t)=>{const n=Object.create(proto$1);return n._op=OP_OR,n.left=e,n.right=t,Object.defineProperty(n,"toString",{enumerable:!1,value(){return`${this.left} or ${this.right}`}}),Object.defineProperty(n,"message",{enumerable:!1,get(){return this.toString()}}),n},InvalidData=(e,t,n={pathDelim:"."})=>{const r=Object.create(proto$1);return r._op=OP_INVALID_DATA,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Invalid data at ${pipe(this.path,join$1(n.pathDelim))}: "${this.message}")`}}),r},MissingData=(e,t,n={pathDelim:"."})=>{const r=Object.create(proto$1);return r._op=OP_MISSING_DATA,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Missing data at ${pipe(this.path,join$1(n.pathDelim))}: "${this.message}")`}}),r},SourceUnavailable=(e,t,n,r={pathDelim:"."})=>{const s=Object.create(proto$1);return s._op=OP_SOURCE_UNAVAILABLE,s.path=e,s.message=t,s.cause=n,Object.defineProperty(s,"toString",{enumerable:!1,value(){return`(Source unavailable at ${pipe(this.path,join$1(r.pathDelim))}: "${this.message}")`}}),s},Unsupported=(e,t,n={pathDelim:"."})=>{const r=Object.create(proto$1);return r._op=OP_UNSUPPORTED,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Unsupported operation at ${pipe(this.path,join$1(n.pathDelim))}: "${this.message}")`}}),r},prefixed=dual(2,(e,t)=>{switch(e._op){case OP_AND:return And(prefixed(e.left,t),prefixed(e.right,t));case OP_OR:return Or(prefixed(e.left,t),prefixed(e.right,t));case OP_INVALID_DATA:return InvalidData([...t,...e.path],e.message);case OP_MISSING_DATA:return MissingData([...t,...e.path],e.message);case OP_SOURCE_UNAVAILABLE:return SourceUnavailable([...t,...e.path],e.message,e.cause);case OP_UNSUPPORTED:return Unsupported([...t,...e.path],e.message)}}),empty$4={_tag:"Empty"},patch$3=dual(2,(e,t)=>{let n=of(t),r=e;for(;isCons(n);){const s=n.head;switch(s._tag){case"Empty":{n=n.tail;break}case"AndThen":{n=cons(s.first,cons(s.second,n.tail));break}case"MapName":{r=map$3(r,s.f),n=n.tail;break}case"Nested":{r=prepend$2(r,s.name),n=n.tail;break}case"Unnested":{if(pipe(head(r),contains(s.name)))r=tailNonEmpty$1(r),n=n.tail;else return left(MissingData(r,`Expected ${s.name} to be in path in ConfigProvider#unnested`));break}}}return right(r)}),OP_CONSTANT="Constant",OP_FAIL="Fail",OP_FALLBACK="Fallback",OP_DESCRIBED="Described",OP_LAZY="Lazy",OP_MAP_OR_FAIL="MapOrFail",OP_NESTED="Nested",OP_PRIMITIVE="Primitive",OP_SEQUENCE="Sequence",OP_HASHMAP="HashMap",OP_ZIP_WITH$1="ZipWith";var define_process_env_default={};const concat=(e,t)=>[...e,...t],ConfigProviderSymbolKey="effect/ConfigProvider",ConfigProviderTypeId=Symbol.for(ConfigProviderSymbolKey),configProviderTag=GenericTag("effect/ConfigProvider"),FlatConfigProviderSymbolKey="effect/ConfigProviderFlat",FlatConfigProviderTypeId=Symbol.for(FlatConfigProviderSymbolKey),make$9=e=>({[ConfigProviderTypeId]:ConfigProviderTypeId,pipe(){return pipeArguments(this,arguments)},...e}),makeFlat=e=>({[FlatConfigProviderTypeId]:FlatConfigProviderTypeId,patch:e.patch,load:(t,n,r=!0)=>e.load(t,n,r),enumerateChildren:e.enumerateChildren}),fromFlat=e=>make$9({load:t=>flatMap$1(fromFlatLoop(e,empty$j(),t,!1),n=>match$3(head(n),{onNone:()=>fail(MissingData(empty$j(),`Expected a single value having structure: ${t}`)),onSome:succeed$1})),flattened:e}),fromEnv=e=>{const{pathDelim:t,seqDelim:n}=Object.assign({},{pathDelim:"_",seqDelim:","},e),r=l=>pipe(l,join$1(t)),s=l=>l.split(t),o=()=>typeof process<"u"&&"env"in process&&typeof define_process_env_default=="object"?define_process_env_default:{};return fromFlat(makeFlat({load:(l,u,f=!0)=>{const d=r(l),m=o(),g=d in m?some(m[d]):none$4();return pipe(g,mapError(()=>MissingData(l,`Expected ${d} to exist in the process context`)),flatMap$1(b=>parsePrimitive(b,l,u,n,f)))},enumerateChildren:l=>sync(()=>{const u=o(),m=Object.keys(u).map(g=>s(g.toUpperCase())).filter(g=>{for(let b=0;b<l.length;b++){const S=pipe(l,unsafeGet$3(b)),R=g[b];if(R===void 0||S!==R)return!1}return!0}).flatMap(g=>g.slice(l.length,l.length+1));return fromIterable$2(m)}),patch:empty$4}))},extend$1=(e,t,n,r)=>{const s=unfold(n.length,l=>l>=r.length?none$4():some([e(l),l+1])),o=unfold(r.length,l=>l>=n.length?none$4():some([t(l),l+1])),i=concat(n,s),a=concat(r,o);return[i,a]},appendConfigPath=(e,t)=>{let n=t;if(n._tag==="Nested"){const r=e.slice();for(;n._tag==="Nested";)r.push(n.name),n=n.config;return r}return e},fromFlatLoop=(e,t,n,r)=>{const s=n;switch(s._tag){case OP_CONSTANT:return succeed$1(of$2(s.value));case OP_DESCRIBED:return suspend$1(()=>fromFlatLoop(e,t,s.config,r));case OP_FAIL:return fail(MissingData(t,s.message));case OP_FALLBACK:return pipe(suspend$1(()=>fromFlatLoop(e,t,s.first,r)),catchAll(o=>s.condition(o)?pipe(fromFlatLoop(e,t,s.second,r),catchAll(i=>fail(Or(o,i)))):fail(o)));case OP_LAZY:return suspend$1(()=>fromFlatLoop(e,t,s.config(),r));case OP_MAP_OR_FAIL:return suspend$1(()=>pipe(fromFlatLoop(e,t,s.original,r),flatMap$1(forEachSequential(o=>pipe(s.mapOrFail(o),mapError(prefixed(appendConfigPath(t,s.original))))))));case OP_NESTED:return suspend$1(()=>fromFlatLoop(e,concat(t,of$2(s.name)),s.config,r));case OP_PRIMITIVE:return pipe(patch$3(t,e.patch),flatMap$1(o=>pipe(e.load(o,s,r),flatMap$1(i=>{if(i.length===0){const a=pipe(last(o),getOrElse(()=>"<n/a>"));return fail(MissingData([],`Expected ${s.description} with name ${a}`))}return succeed$1(i)}))));case OP_SEQUENCE:return pipe(patch$3(t,e.patch),flatMap$1(o=>pipe(e.enumerateChildren(o),flatMap$1(indicesFrom),flatMap$1(i=>i.length===0?suspend$1(()=>map(fromFlatLoop(e,t,s.config,!0),of$2)):pipe(forEachSequential(i,a=>fromFlatLoop(e,append$1(t,`[${a}]`),s.config,!0)),map(a=>{const l=flatten$2(a);return l.length===0?of$2(empty$j()):of$2(l)}))))));case OP_HASHMAP:return suspend$1(()=>pipe(patch$3(t,e.patch),flatMap$1(o=>pipe(e.enumerateChildren(o),flatMap$1(i=>pipe(i,forEachSequential(a=>fromFlatLoop(e,concat(o,of$2(a)),s.valueConfig,r)),map(a=>a.length===0?of$2(empty$c()):pipe(transpose(a),map$3(l=>fromIterable$1(zip$1(fromIterable$6(i),l)))))))))));case OP_ZIP_WITH$1:return suspend$1(()=>pipe(fromFlatLoop(e,t,s.left,r),either,flatMap$1(o=>pipe(fromFlatLoop(e,t,s.right,r),either,flatMap$1(i=>{if(isLeft(o)&&isLeft(i))return fail(And(o.left,i.left));if(isLeft(o)&&isRight(i))return fail(o.left);if(isRight(o)&&isLeft(i))return fail(i.left);if(isRight(o)&&isRight(i)){const a=pipe(t,join$1(".")),l=fromFlatLoopFail(t,a),[u,f]=extend$1(l,l,pipe(o.right,map$3(right)),pipe(i.right,map$3(right)));return pipe(u,zip$1(f),forEachSequential(([d,m])=>pipe(zip(d,m),map(([g,b])=>s.zip(g,b)))))}throw new Error("BUG: ConfigProvider.fromFlatLoop - please report an issue at https://github.com/Effect-TS/effect/issues")})))))}},fromFlatLoopFail=(e,t)=>n=>left(MissingData(e,`The element at index ${n} in a sequence at path "${t}" was missing`)),splitPathString=(e,t)=>e.split(new RegExp(`\\s*${escape(t)}\\s*`)),parsePrimitive=(e,t,n,r,s)=>s?pipe(splitPathString(e,r),forEachSequential(o=>n.parse(o.trim())),mapError(prefixed(t))):pipe(n.parse(e),mapBoth({onFailure:prefixed(t),onSuccess:of$2})),transpose=e=>Object.keys(e[0]).map(t=>e.map(n=>n[t])),indicesFrom=e=>pipe(forEachSequential(e,parseQuotedIndex),mapBoth({onFailure:()=>empty$j(),onSuccess:sort(Order$1)}),either,map(merge$5)),QUOTED_INDEX_REGEX=/^(\[(\d+)\])$/,parseQuotedIndex=e=>{const t=e.match(QUOTED_INDEX_REGEX);if(t!==null){const n=t[2];return pipe(n!==void 0&&n.length>0?some(n):none$4(),flatMap$3(parseInteger))}return none$4()},parseInteger=e=>{const t=Number.parseInt(e);return Number.isNaN(t)?none$4():some(t)},TypeId$3=Symbol.for("effect/Console"),consoleTag=GenericTag("effect/Console"),defaultConsole={[TypeId$3]:TypeId$3,assert(e,...t){return sync(()=>{console.assert(e,...t)})},clear:sync(()=>{console.clear()}),count(e){return sync(()=>{console.count(e)})},countReset(e){return sync(()=>{console.countReset(e)})},debug(...e){return sync(()=>{console.debug(...e)})},dir(e,t){return sync(()=>{console.dir(e,t)})},dirxml(...e){return sync(()=>{console.dirxml(...e)})},error(...e){return sync(()=>{console.error(...e)})},group(e){return e?.collapsed?sync(()=>console.groupCollapsed(e?.label)):sync(()=>console.group(e?.label))},groupEnd:sync(()=>{console.groupEnd()}),info(...e){return sync(()=>{console.info(...e)})},log(...e){return sync(()=>{console.log(...e)})},table(e,t){return sync(()=>{console.table(e,t)})},time(e){return sync(()=>console.time(e))},timeEnd(e){return sync(()=>console.timeEnd(e))},timeLog(e,...t){return sync(()=>{console.timeLog(e,...t)})},trace(...e){return sync(()=>{console.trace(...e)})},warn(...e){return sync(()=>{console.warn(...e)})},unsafe:console},RandomSymbolKey="effect/Random",RandomTypeId=Symbol.for(RandomSymbolKey),randomTag=GenericTag("effect/Random");class RandomImpl{seed;[RandomTypeId]=RandomTypeId;PRNG;constructor(t){this.seed=t,this.PRNG=new PCGRandom(t)}get next(){return sync(()=>this.PRNG.number())}get nextBoolean(){return map(this.next,t=>t>.5)}get nextInt(){return sync(()=>this.PRNG.integer(Number.MAX_SAFE_INTEGER))}nextRange(t,n){return map(this.next,r=>(n-t)*r+t)}nextIntBetween(t,n){return sync(()=>this.PRNG.integer(n-t)+t)}shuffle(t){return shuffleWith(t,n=>this.nextIntBetween(0,n))}}const shuffleWith=(e,t)=>suspend$1(()=>pipe(sync(()=>Array.from(e)),flatMap$1(n=>{const r=[];for(let s=n.length;s>=2;s=s-1)r.push(s);return pipe(r,forEachSequentialDiscard(s=>pipe(t(s),map(o=>swap(n,s-1,o)))),as(fromIterable$5(n)))}))),swap=(e,t,n)=>{const r=e[t];return e[t]=e[n],e[n]=r,e},make$8=e=>new RandomImpl(hash(e)),TracerTypeId=Symbol.for("effect/Tracer"),make$7=e=>({[TracerTypeId]:TracerTypeId,...e}),tracerTag=GenericTag("effect/Tracer"),spanTag=GenericTag("effect/ParentSpan"),randomHexString=function(){const e="abcdef0123456789",t=e.length;return function(n){let r="";for(let s=0;s<n;s++)r+=e.charAt(Math.floor(Math.random()*t));return r}}();class NativeSpan{name;parent;context;startTime;kind;_tag="Span";spanId;traceId="native";sampled=!0;status;attributes;events=[];links;constructor(t,n,r,s,o,i){this.name=t,this.parent=n,this.context=r,this.startTime=o,this.kind=i,this.status={_tag:"Started",startTime:o},this.attributes=new Map,this.traceId=n._tag==="Some"?n.value.traceId:randomHexString(32),this.spanId=randomHexString(16),this.links=Array.from(s)}end(t,n){this.status={_tag:"Ended",endTime:t,exit:n,startTime:this.status.startTime}}attribute(t,n){this.attributes.set(t,n)}event(t,n,r){this.events.push([t,n,r??{}])}addLinks(t){this.links.push(...t)}}const nativeTracer=make$7({span:(e,t,n,r,s,o)=>new NativeSpan(e,t,n,r,s,o),context:e=>e()}),liveServices=pipe(empty$h(),add$2(clockTag,make$a()),add$2(consoleTag,defaultConsole),add$2(randomTag,make$8(Math.random())),add$2(configProviderTag,fromEnv()),add$2(tracerTag,nativeTracer)),currentServices=globalValue(Symbol.for("effect/DefaultServices/currentServices"),()=>fiberRefUnsafeMakeContext(liveServices));function unsafeMake$3(e){return new FiberRefsImpl(e)}function empty$3(){return unsafeMake$3(new Map)}const FiberRefsSym=Symbol.for("effect/FiberRefs");class FiberRefsImpl{locals;[FiberRefsSym]=FiberRefsSym;constructor(t){this.locals=t}pipe(){return pipeArguments(this,arguments)}}const findAncestor=(e,t,n,r=!1)=>{const s=e;let o=t,i=n,a=r,l;for(;l===void 0;)if(isNonEmptyReadonlyArray(o)&&isNonEmptyReadonlyArray(i)){const u=headNonEmpty$1(o)[0],f=tailNonEmpty$1(o),d=headNonEmpty$1(i)[0],m=headNonEmpty$1(i)[1],g=tailNonEmpty$1(i);u.startTimeMillis<d.startTimeMillis?(i=g,a=!0):u.startTimeMillis>d.startTimeMillis?o=f:u.id<d.id?(i=g,a=!0):u.id>d.id?o=f:l=[m,a]}else l=[s.initial,!0];return l},joinAs=dual(3,(e,t,n)=>{const r=new Map(e.locals);return n.locals.forEach((s,o)=>{const i=s[0][1];if(!s[0][0][symbol](t)){if(!r.has(o)){if(equals$1(i,o.initial))return;r.set(o,[[t,o.join(o.initial,i)]]);return}const a=r.get(o),[l,u]=findAncestor(o,a,s);if(u){const f=o.diff(l,i),d=a[0][1],m=o.join(d,o.patch(f)(d));if(!equals$1(d,m)){let g;const b=a[0][0];b[symbol](t)?g=[[b,m],...a.slice(1)]:g=[[t,m],...a],r.set(o,g)}}}}),new FiberRefsImpl(r)}),forkAs=dual(2,(e,t)=>{const n=new Map;return unsafeForkAs(e,n,t),new FiberRefsImpl(n)}),unsafeForkAs=(e,t,n)=>{e.locals.forEach((r,s)=>{const o=r[0][1],i=s.patch(s.fork)(o);equals$1(o,i)?t.set(s,r):t.set(s,[[n,i],...r])})},delete_=dual(2,(e,t)=>{const n=new Map(e.locals);return n.delete(t),new FiberRefsImpl(n)}),get$1=dual(2,(e,t)=>e.locals.has(t)?some(headNonEmpty$1(e.locals.get(t))[1]):none$4()),getOrDefault$1=dual(2,(e,t)=>pipe(get$1(e,t),getOrElse(()=>t.initial))),updateAs=dual(2,(e,{fiberId:t,fiberRef:n,value:r})=>{if(e.locals.size===0)return new FiberRefsImpl(new Map([[n,[[t,r]]]]));const s=new Map(e.locals);return unsafeUpdateAs(s,t,n,r),new FiberRefsImpl(s)}),unsafeUpdateAs=(e,t,n,r)=>{const s=e.get(n)??[];let o;if(isNonEmptyReadonlyArray(s)){const[i,a]=headNonEmpty$1(s);if(i[symbol](t)){if(equals$1(a,r))return;o=[[t,r],...s.slice(1)]}else o=[[t,r],...s]}else o=[[t,r]];e.set(n,o)},updateManyAs$1=dual(2,(e,{entries:t,forkAs:n})=>{if(e.locals.size===0)return new FiberRefsImpl(new Map(t));const r=new Map(e.locals);return n!==void 0&&unsafeForkAs(e,r,n),t.forEach(([s,o])=>{o.length===1?unsafeUpdateAs(r,o[0][0],s,o[0][1]):o.forEach(([i,a])=>{unsafeUpdateAs(r,i,s,a)})}),new FiberRefsImpl(r)}),getOrDefault=getOrDefault$1,updateManyAs=updateManyAs$1,empty$2=empty$3,All=logLevelAll,Fatal=logLevelFatal,Error$1=logLevelError,Warning=logLevelWarning,Info=logLevelInfo,Debug=logLevelDebug,Trace=logLevelTrace,None=logLevelNone,Order=pipe(Order$1,mapInput(e=>e.ordinal)),greaterThan=greaterThan$1(Order),fromLiteral=e=>{switch(e){case"All":return All;case"Debug":return Debug;case"Error":return Error$1;case"Fatal":return Fatal;case"Info":return Info;case"Trace":return Trace;case"None":return None;case"Warning":return Warning}},formatLabel=e=>e.replace(/[\s="]/g,"_"),render$2=e=>t=>`${formatLabel(t.label)}=${e-t.startTime}ms`,EffectPrototype=EffectPrototype$1,Base=Base$1;class Class extends Base{}const TypeId$2=Symbol.for("effect/Readable"),RefTypeId=Symbol.for("effect/Ref"),refVariance={_A:e=>e};let RefImpl$1=class extends Class{ref;commit(){return this.get}[RefTypeId]=refVariance;[TypeId$2]=TypeId$2;constructor(t){super(),this.ref=t,this.get=sync(()=>get$4(this.ref))}get;modify(t){return sync(()=>{const n=get$4(this.ref),[r,s]=t(n);return n!==s&&set$3(s)(this.ref),r})}};const unsafeMake$2=e=>new RefImpl$1(make$e(e)),make$6=e=>sync(()=>unsafeMake$2(e)),get=e=>e.get,set=dual(2,(e,t)=>e.modify(()=>[void 0,t])),modify=dual(2,(e,t)=>e.modify(t)),update$1=dual(2,(e,t)=>e.modify(n=>[void 0,t(n)])),OP_EMPTY$1="Empty",OP_ADD="Add",OP_REMOVE="Remove",OP_UPDATE="Update",OP_AND_THEN$1="AndThen",empty$1={_tag:OP_EMPTY$1},diff$2=(e,t)=>{const n=new Map(e.locals);let r=empty$1;for(const[s,o]of t.locals.entries()){const i=headNonEmpty$1(o)[1],a=n.get(s);if(a!==void 0){const l=headNonEmpty$1(a)[1];equals$1(l,i)||(r=combine$1({_tag:OP_UPDATE,fiberRef:s,patch:s.diff(l,i)})(r))}else r=combine$1({_tag:OP_ADD,fiberRef:s,value:i})(r);n.delete(s)}for(const[s]of n.entries())r=combine$1({_tag:OP_REMOVE,fiberRef:s})(r);return r},combine$1=dual(2,(e,t)=>({_tag:OP_AND_THEN$1,first:e,second:t})),patch$2=dual(3,(e,t,n)=>{let r=n,s=of$2(e);for(;isNonEmptyReadonlyArray(s);){const o=headNonEmpty$1(s),i=tailNonEmpty$1(s);switch(o._tag){case OP_EMPTY$1:{s=i;break}case OP_ADD:{r=updateAs(r,{fiberId:t,fiberRef:o.fiberRef,value:o.value}),s=i;break}case OP_REMOVE:{r=delete_(r,o.fiberRef),s=i;break}case OP_UPDATE:{const a=getOrDefault$1(r,o.fiberRef);r=updateAs(r,{fiberId:t,fiberRef:o.fiberRef,value:o.fiberRef.patch(o.patch)(a)}),s=i;break}case OP_AND_THEN$1:{s=prepend$2(o.first)(prepend$2(o.second)(i));break}}}return r}),MetricLabelSymbolKey="effect/MetricLabel",MetricLabelTypeId=Symbol.for(MetricLabelSymbolKey);class MetricLabelImpl{key;value;[MetricLabelTypeId]=MetricLabelTypeId;_hash;constructor(t,n){this.key=t,this.value=n,this._hash=string(MetricLabelSymbolKey+this.key+this.value)}[symbol$1](){return this._hash}[symbol](t){return isMetricLabel(t)&&this.key===t.key&&this.value===t.value}pipe(){return pipeArguments(this,arguments)}}const make$5=(e,t)=>new MetricLabelImpl(e,t),isMetricLabel=e=>hasProperty(e,MetricLabelTypeId),asSome=e=>map(e,some),diffFiberRefs=e=>summarized(e,fiberRefs,diff$2),fiberRefs=withFiberRuntime(e=>succeed$1(e.getFiberRefs())),patchFiberRefs=e=>updateFiberRefs((t,n)=>pipe(e,patch$2(t,n))),provideService$1=dual(3,(e,t,n)=>contextWithEffect(r=>provideContext$1(e,add$2(r,t,n)))),succeedNone=succeed$1(none$4()),summarized=dual(3,(e,t,n)=>flatMap$1(t,r=>flatMap$1(e,s=>map(t,o=>[n(r,o),s])))),tryPromise$1=e=>{let t,n;typeof e=="function"?t=e:(t=e.try,n=e.catch);const r=s=>n?failSync(()=>n(s)):fail(new UnknownException(s,"An unknown error occurred in Effect.tryPromise"));return t.length>=1?async_((s,o)=>{try{t(o).then(i=>s(exitSucceed$1(i)),i=>s(r(i)))}catch(i){s(r(i))}}):async_(s=>{try{t().then(o=>s(exitSucceed$1(o)),o=>s(r(o)))}catch(o){s(r(o))}})},updateFiberRefs=e=>withFiberRuntime(t=>(t.setFiberRefs(e(t.id(),t.getFiberRefs())),void_$1)),OP_SEQUENTIAL="Sequential",OP_PARALLEL="Parallel",OP_PARALLEL_N="ParallelN",sequential$1={_tag:OP_SEQUENTIAL},parallel$1={_tag:OP_PARALLEL},parallelN$1=e=>({_tag:OP_PARALLEL_N,parallelism:e}),isSequential=e=>e._tag===OP_SEQUENTIAL,isParallel=e=>e._tag===OP_PARALLEL,sequential=sequential$1,parallel=parallel$1,parallelN=parallelN$1,diff$1=diff$2,patch$1=patch$2,FiberStatusSymbolKey="effect/FiberStatus",FiberStatusTypeId=Symbol.for(FiberStatusSymbolKey),OP_DONE="Done",OP_RUNNING="Running",OP_SUSPENDED="Suspended",DoneHash=string(`${FiberStatusSymbolKey}-${OP_DONE}`);class Done{[FiberStatusTypeId]=FiberStatusTypeId;_tag=OP_DONE;[symbol$1](){return DoneHash}[symbol](t){return isFiberStatus(t)&&t._tag===OP_DONE}}class Running{runtimeFlags;[FiberStatusTypeId]=FiberStatusTypeId;_tag=OP_RUNNING;constructor(t){this.runtimeFlags=t}[symbol$1](){return pipe(hash(FiberStatusSymbolKey),combine$5(hash(this._tag)),combine$5(hash(this.runtimeFlags)),cached(this))}[symbol](t){return isFiberStatus(t)&&t._tag===OP_RUNNING&&this.runtimeFlags===t.runtimeFlags}}class Suspended{runtimeFlags;blockingOn;[FiberStatusTypeId]=FiberStatusTypeId;_tag=OP_SUSPENDED;constructor(t,n){this.runtimeFlags=t,this.blockingOn=n}[symbol$1](){return pipe(hash(FiberStatusSymbolKey),combine$5(hash(this._tag)),combine$5(hash(this.runtimeFlags)),combine$5(hash(this.blockingOn)),cached(this))}[symbol](t){return isFiberStatus(t)&&t._tag===OP_SUSPENDED&&this.runtimeFlags===t.runtimeFlags&&equals$1(this.blockingOn,t.blockingOn)}}const done$1=new Done,running$1=e=>new Running(e),suspended$1=(e,t)=>new Suspended(e,t),isFiberStatus=e=>hasProperty(e,FiberStatusTypeId),isDone$1=e=>e._tag===OP_DONE,done=done$1,running=running$1,suspended=suspended$1,isDone=isDone$1,TypeId$1=Symbol.for("effect/Micro"),MicroExitTypeId=Symbol.for("effect/Micro/MicroExit"),MicroCauseTypeId=Symbol.for("effect/Micro/MicroCause"),microCauseVariance={_E:identity$1};class MicroCauseImpl extends globalThis.Error{_tag;traces;[MicroCauseTypeId];constructor(t,n,r){const s=`MicroCause.${t}`;let o,i,a;if(n instanceof globalThis.Error){o=`(${s}) ${n.name}`,i=n.message;const l=i.split(`
18
+ `).length;a=n.stack?`(${s}) ${n.stack.split(`
19
+ `).slice(0,l+3).join(`
20
+ `)}`:`${o}: ${i}`}else o=s,i=toStringUnknown(n,0),a=`${o}: ${i}`;r.length>0&&(a+=`
21
+ ${r.join(`
22
+ `)}`),super(i),this._tag=t,this.traces=r,this[MicroCauseTypeId]=microCauseVariance,this.name=o,this.stack=a}pipe(){return pipeArguments(this,arguments)}toString(){return this.stack}[NodeInspectSymbol](){return this.stack}}class Die extends MicroCauseImpl{defect;constructor(t,n=[]){super("Die",t,n),this.defect=t}}const causeDie=(e,t=[])=>new Die(e,t);class Interrupt extends MicroCauseImpl{constructor(t=[]){super("Interrupt","interrupted",t)}}const causeInterrupt=(e=[])=>new Interrupt(e),causeIsInterrupt=e=>e._tag==="Interrupt",MicroFiberTypeId=Symbol.for("effect/Micro/MicroFiber"),fiberVariance$1={_A:identity$1,_E:identity$1};class MicroFiberImpl{context;interruptible;[MicroFiberTypeId];_stack=[];_observers=[];_exit;_children;currentOpCount=0;constructor(t,n=!0){this.context=t,this.interruptible=n,this[MicroFiberTypeId]=fiberVariance$1}getRef(t){return unsafeGetReference(this.context,t)}addObserver(t){return this._exit?(t(this._exit),constVoid):(this._observers.push(t),()=>{const n=this._observers.indexOf(t);n>=0&&this._observers.splice(n,1)})}_interrupted=!1;unsafeInterrupt(){this._exit||(this._interrupted=!0,this.interruptible&&this.evaluate(exitInterrupt))}unsafePoll(){return this._exit}evaluate(t){if(this._exit)return;if(this._yielded!==void 0){const s=this._yielded;this._yielded=void 0,s()}const n=this.runLoop(t);if(n===Yield)return;const r=fiberMiddleware.interruptChildren&&fiberMiddleware.interruptChildren(this);if(r!==void 0)return this.evaluate(flatMap(r,()=>n));this._exit=n;for(let s=0;s<this._observers.length;s++)this._observers[s](n);this._observers.length=0}runLoop(t){let n=!1,r=t;this.currentOpCount=0;try{for(;;){if(this.currentOpCount++,!n&&this.getRef(CurrentScheduler).shouldYield(this)){n=!0;const s=r;r=flatMap(yieldNow$1,()=>s)}if(r=r[evaluate](this),r===Yield){const s=this._yielded;return MicroExitTypeId in s?(this._yielded=void 0,s):Yield}}}catch(s){return hasProperty(r,evaluate)?exitDie(s):exitDie(`MicroFiber.runLoop: Not a valid effect: ${String(r)}`)}}getCont(t){for(;;){const n=this._stack.pop();if(!n)return;const r=n[ensureCont]&&n[ensureCont](this);if(r)return{[t]:r};if(n[t])return n}}_yielded=void 0;yieldWith(t){return this._yielded=t,Yield}children(){return this._children??=new Set}}const fiberMiddleware=globalValue("effect/Micro/fiberMiddleware",()=>({interruptChildren:void 0})),identifier=Symbol.for("effect/Micro/identifier"),args=Symbol.for("effect/Micro/args"),evaluate=Symbol.for("effect/Micro/evaluate"),successCont=Symbol.for("effect/Micro/successCont"),failureCont=Symbol.for("effect/Micro/failureCont"),ensureCont=Symbol.for("effect/Micro/ensureCont"),Yield=Symbol.for("effect/Micro/Yield"),microVariance={_A:identity$1,_E:identity$1,_R:identity$1},MicroProto={...EffectPrototype,_op:"Micro",[TypeId$1]:microVariance,pipe(){return pipeArguments(this,arguments)},[Symbol.iterator](){return new SingleShotGen$1(new YieldWrap(this))},toJSON(){return{_id:"Micro",op:this[identifier],...args in this?{args:this[args]}:void 0}},toString(){return format$2(this)},[NodeInspectSymbol](){return format$2(this)}};function defaultEvaluate(e){return exitDie("Micro.evaluate: Not implemented")}const makePrimitiveProto=e=>({...MicroProto,[identifier]:e.op,[evaluate]:e.eval??defaultEvaluate,[successCont]:e.contA,[failureCont]:e.contE,[ensureCont]:e.ensure}),makePrimitive=e=>{const t=makePrimitiveProto(e);return function(){const n=Object.create(t);return n[args]=e.single===!1?arguments:arguments[0],n}},makeExit=e=>{const t={...makePrimitiveProto(e),[MicroExitTypeId]:MicroExitTypeId,_tag:e.op,get[e.prop](){return this[args]},toJSON(){return{_id:"MicroExit",_tag:e.op,[e.prop]:this[args]}},[symbol](n){return isMicroExit(n)&&n._tag===e.op&&equals$1(this[args],n[args])},[symbol$1](){return cached(this,combine$5(string(e.op))(hash(this[args])))}};return function(n){const r=Object.create(t);return r[args]=n,r[successCont]=void 0,r[failureCont]=void 0,r[ensureCont]=void 0,r}},succeed=makeExit({op:"Success",prop:"value",eval(e){const t=e.getCont(successCont);return t?t[successCont](this[args],e):e.yieldWith(this)}}),failCause=makeExit({op:"Failure",prop:"cause",eval(e){let t=e.getCont(failureCont);for(;causeIsInterrupt(this[args])&&t&&e.interruptible;)t=e.getCont(failureCont);return t?t[failureCont](this[args],e):e.yieldWith(this)}}),yieldNowWith=makePrimitive({op:"Yield",eval(e){let t=!1;return e.getRef(CurrentScheduler).scheduleTask(()=>{t||e.evaluate(exitVoid)},this[args]??0),e.yieldWith(()=>{t=!0})}}),yieldNow$1=yieldNowWith(0),void_=succeed(void 0),withMicroFiber=makePrimitive({op:"WithMicroFiber",eval(e){return this[args](e)}}),flatMap=dual(2,(e,t)=>{const n=Object.create(OnSuccessProto);return n[args]=e,n[successCont]=t,n}),OnSuccessProto=makePrimitiveProto({op:"OnSuccess",eval(e){return e._stack.push(this),this[args]}}),isMicroExit=e=>hasProperty(e,MicroExitTypeId),exitSucceed=succeed,exitFailCause=failCause,exitInterrupt=exitFailCause(causeInterrupt()),exitDie=e=>exitFailCause(causeDie(e)),exitVoid=exitSucceed(void 0),setImmediate="setImmediate"in globalThis?globalThis.setImmediate:e=>setTimeout(e,0);class MicroSchedulerDefault{tasks=[];running=!1;scheduleTask(t,n){this.tasks.push(t),this.running||(this.running=!0,setImmediate(this.afterScheduled))}afterScheduled=()=>{this.running=!1,this.runTasks()};runTasks(){const t=this.tasks;this.tasks=[];for(let n=0,r=t.length;n<r;n++)t[n]()}shouldYield(t){return t.currentOpCount>=t.getRef(MaxOpsBeforeYield)}flush(){for(;this.tasks.length>0;)this.runTasks()}}const updateContext=dual(2,(e,t)=>withMicroFiber(n=>{const r=n.context;return n.context=t(r),onExit(e,()=>(n.context=r,void_))})),provideContext=dual(2,(e,t)=>updateContext(e,merge$3(t)));class MaxOpsBeforeYield extends Reference()("effect/Micro/currentMaxOpsBeforeYield",{defaultValue:()=>2048}){}class CurrentScheduler extends Reference()("effect/Micro/currentScheduler",{defaultValue:()=>new MicroSchedulerDefault}){}const matchCauseEffect=dual(2,(e,t)=>{const n=Object.create(OnSuccessAndFailureProto);return n[args]=e,n[successCont]=t.onSuccess,n[failureCont]=t.onFailure,n}),OnSuccessAndFailureProto=makePrimitiveProto({op:"OnSuccessAndFailure",eval(e){return e._stack.push(this),this[args]}}),onExit=dual(2,(e,t)=>uninterruptibleMask(n=>matchCauseEffect(n(e),{onFailure:r=>flatMap(t(exitFailCause(r)),()=>failCause(r)),onSuccess:r=>flatMap(t(exitSucceed(r)),()=>succeed(r))}))),setInterruptible=makePrimitive({op:"SetInterruptible",ensure(e){if(e.interruptible=this[args],e._interrupted&&e.interruptible)return()=>exitInterrupt}}),interruptible=e=>withMicroFiber(t=>t.interruptible?e:(t.interruptible=!0,t._stack.push(setInterruptible(!1)),t._interrupted?exitInterrupt:e)),uninterruptibleMask=e=>withMicroFiber(t=>t.interruptible?(t.interruptible=!1,t._stack.push(setInterruptible(!0)),e(interruptible)):e(identity$1)),runFork=(e,t)=>{const n=new MicroFiberImpl(CurrentScheduler.context(new MicroSchedulerDefault));return n.evaluate(e),n};class PriorityBuckets{buckets=[];scheduleTask(t,n){const r=this.buckets.length;let s,o=0;for(;o<r&&this.buckets[o][0]<=n;o++)s=this.buckets[o];s&&s[0]===n?s[1].push(t):o===r?this.buckets.push([n,[t]]):this.buckets.splice(o,0,[n,[t]])}}class MixedScheduler{maxNextTickBeforeTimer;running=!1;tasks=new PriorityBuckets;constructor(t){this.maxNextTickBeforeTimer=t}starveInternal(t){const n=this.tasks.buckets;this.tasks.buckets=[];for(const[r,s]of n)for(let o=0;o<s.length;o++)s[o]();this.tasks.buckets.length===0?this.running=!1:this.starve(t)}starve(t=0){t>=this.maxNextTickBeforeTimer?setTimeout(()=>this.starveInternal(0),0):Promise.resolve(void 0).then(()=>this.starveInternal(t+1))}shouldYield(t){return t.currentOpCount>t.getFiberRef(currentMaxOpsBeforeYield)?t.getFiberRef(currentSchedulingPriority):!1}scheduleTask(t,n){this.tasks.scheduleTask(t,n),this.running||(this.running=!0,this.starve())}}const defaultScheduler=globalValue(Symbol.for("effect/Scheduler/defaultScheduler"),()=>new MixedScheduler(2048)),currentScheduler=globalValue(Symbol.for("effect/FiberRef/currentScheduler"),()=>fiberRefUnsafeMake(defaultScheduler)),currentRequestMap=globalValue(Symbol.for("effect/FiberRef/currentRequestMap"),()=>fiberRefUnsafeMake(new Map)),match=(e,t,n,r)=>{switch(e){case void 0:return t();case"unbounded":return n();case"inherit":return fiberRefGetWith(currentConcurrency,s=>s==="unbounded"?n():s>1?r(s):t());default:return e>1?r(e):t()}},OP_INTERRUPT_SIGNAL="InterruptSignal",OP_STATEFUL="Stateful",OP_RESUME="Resume",OP_YIELD_NOW="YieldNow",interruptSignal=e=>({_tag:OP_INTERRUPT_SIGNAL,cause:e}),stateful=e=>({_tag:OP_STATEFUL,onFiber:e}),resume=e=>({_tag:OP_RESUME,effect:e}),yieldNow=()=>({_tag:OP_YIELD_NOW}),FiberScopeSymbolKey="effect/FiberScope",FiberScopeTypeId=Symbol.for(FiberScopeSymbolKey);class Global{[FiberScopeTypeId]=FiberScopeTypeId;fiberId=none$2;roots=new Set;add(t,n){this.roots.add(n),n.addObserver(()=>{this.roots.delete(n)})}}class Local{fiberId;parent;[FiberScopeTypeId]=FiberScopeTypeId;constructor(t,n){this.fiberId=t,this.parent=n}add(t,n){this.parent.tell(stateful(r=>{r.addChild(n),n.addObserver(()=>{r.removeChild(n)})}))}}const unsafeMake$1=e=>new Local(e.id(),e),globalScope=globalValue(Symbol.for("effect/FiberScope/Global"),()=>new Global),FiberSymbolKey="effect/Fiber",FiberTypeId=Symbol.for(FiberSymbolKey),fiberVariance={_E:e=>e,_A:e=>e},RuntimeFiberSymbolKey="effect/Fiber",RuntimeFiberTypeId=Symbol.for(RuntimeFiberSymbolKey),join=e=>zipLeft(flatten(e.await),e.inheritAll);({...CommitPrototype});const currentFiberURI="effect/FiberCurrent",LoggerSymbolKey="effect/Logger",LoggerTypeId=Symbol.for(LoggerSymbolKey),loggerVariance={_Message:e=>e,_Output:e=>e},makeLogger=e=>({[LoggerTypeId]:loggerVariance,log:e,pipe(){return pipeArguments(this,arguments)}}),textOnly=/^[^\s"=]*$/,format=(e,t)=>({annotations:n,cause:r,date:s,fiberId:o,logLevel:i,message:a,spans:l})=>{const u=b=>b.match(textOnly)?b:e(b),f=(b,S)=>`${formatLabel(b)}=${u(S)}`,d=(b,S)=>" "+f(b,S);let m=f("timestamp",s.toISOString());m+=d("level",i.label),m+=d("fiber",threadName$1(o));const g=ensure(a);for(let b=0;b<g.length;b++)m+=d("message",toStringUnknown(g[b],t));isEmptyType(r)||(m+=d("cause",pretty(r,{renderErrorCause:!0})));for(const b of l)m+=" "+render$2(s.getTime())(b);for(const[b,S]of n)m+=d(b,toStringUnknown(S,t));return m},escapeDoubleQuotes=e=>`"${e.replace(/\\([\s\S])|(")/g,"\\$1$2")}"`,stringLogger=makeLogger(format(escapeDoubleQuotes)),hasProcessStdout=typeof process=="object"&&process!==null&&typeof process.stdout=="object"&&process.stdout!==null;hasProcessStdout&&process.stdout.isTTY;const MetricBoundariesSymbolKey="effect/MetricBoundaries",MetricBoundariesTypeId=Symbol.for(MetricBoundariesSymbolKey);class MetricBoundariesImpl{values;[MetricBoundariesTypeId]=MetricBoundariesTypeId;constructor(t){this.values=t,this._hash=pipe(string(MetricBoundariesSymbolKey),combine$5(array(this.values)))}_hash;[symbol$1](){return this._hash}[symbol](t){return isMetricBoundaries(t)&&equals$1(this.values,t.values)}pipe(){return pipeArguments(this,arguments)}}const isMetricBoundaries=e=>hasProperty(e,MetricBoundariesTypeId),fromIterable=e=>{const t=pipe(e,appendAll$2(of$1(Number.POSITIVE_INFINITY)),dedupe);return new MetricBoundariesImpl(t)},exponential=e=>pipe(makeBy(e.count-1,t=>e.start*Math.pow(e.factor,t)),unsafeFromArray,fromIterable),MetricKeyTypeSymbolKey="effect/MetricKeyType",MetricKeyTypeTypeId=Symbol.for(MetricKeyTypeSymbolKey),CounterKeyTypeSymbolKey="effect/MetricKeyType/Counter",CounterKeyTypeTypeId=Symbol.for(CounterKeyTypeSymbolKey),FrequencyKeyTypeSymbolKey="effect/MetricKeyType/Frequency",FrequencyKeyTypeTypeId=Symbol.for(FrequencyKeyTypeSymbolKey),GaugeKeyTypeSymbolKey="effect/MetricKeyType/Gauge",GaugeKeyTypeTypeId=Symbol.for(GaugeKeyTypeSymbolKey),HistogramKeyTypeSymbolKey="effect/MetricKeyType/Histogram",HistogramKeyTypeTypeId=Symbol.for(HistogramKeyTypeSymbolKey),SummaryKeyTypeSymbolKey="effect/MetricKeyType/Summary",SummaryKeyTypeTypeId=Symbol.for(SummaryKeyTypeSymbolKey),metricKeyTypeVariance={_In:e=>e,_Out:e=>e};class CounterKeyType{incremental;bigint;[MetricKeyTypeTypeId]=metricKeyTypeVariance;[CounterKeyTypeTypeId]=CounterKeyTypeTypeId;constructor(t,n){this.incremental=t,this.bigint=n,this._hash=string(CounterKeyTypeSymbolKey)}_hash;[symbol$1](){return this._hash}[symbol](t){return isCounterKey(t)}pipe(){return pipeArguments(this,arguments)}}class HistogramKeyType{boundaries;[MetricKeyTypeTypeId]=metricKeyTypeVariance;[HistogramKeyTypeTypeId]=HistogramKeyTypeTypeId;constructor(t){this.boundaries=t,this._hash=pipe(string(HistogramKeyTypeSymbolKey),combine$5(hash(this.boundaries)))}_hash;[symbol$1](){return this._hash}[symbol](t){return isHistogramKey(t)&&equals$1(this.boundaries,t.boundaries)}pipe(){return pipeArguments(this,arguments)}}const counter$4=e=>new CounterKeyType(e?.incremental??!1,e?.bigint??!1),histogram$4=e=>new HistogramKeyType(e),isCounterKey=e=>hasProperty(e,CounterKeyTypeTypeId),isFrequencyKey=e=>hasProperty(e,FrequencyKeyTypeTypeId),isGaugeKey=e=>hasProperty(e,GaugeKeyTypeTypeId),isHistogramKey=e=>hasProperty(e,HistogramKeyTypeTypeId),isSummaryKey=e=>hasProperty(e,SummaryKeyTypeTypeId),MetricKeySymbolKey="effect/MetricKey",MetricKeyTypeId=Symbol.for(MetricKeySymbolKey),metricKeyVariance={_Type:e=>e},arrayEquivilence=getEquivalence$2(equals$1);class MetricKeyImpl{name;keyType;description;tags;[MetricKeyTypeId]=metricKeyVariance;constructor(t,n,r,s=[]){this.name=t,this.keyType=n,this.description=r,this.tags=s,this._hash=pipe(string(this.name+this.description),combine$5(hash(this.keyType)),combine$5(array(this.tags)))}_hash;[symbol$1](){return this._hash}[symbol](t){return isMetricKey(t)&&this.name===t.name&&equals$1(this.keyType,t.keyType)&&equals$1(this.description,t.description)&&arrayEquivilence(this.tags,t.tags)}pipe(){return pipeArguments(this,arguments)}}const isMetricKey=e=>hasProperty(e,MetricKeyTypeId),counter$3=(e,t)=>new MetricKeyImpl(e,counter$4(t),fromNullable(t?.description)),histogram$3=(e,t,n)=>new MetricKeyImpl(e,histogram$4(t),fromNullable(n)),taggedWithLabels$1=dual(2,(e,t)=>t.length===0?e:new MetricKeyImpl(e.name,e.keyType,e.description,union$2(e.tags,t))),MetricStateSymbolKey="effect/MetricState",MetricStateTypeId=Symbol.for(MetricStateSymbolKey),CounterStateSymbolKey="effect/MetricState/Counter",CounterStateTypeId=Symbol.for(CounterStateSymbolKey),FrequencyStateSymbolKey="effect/MetricState/Frequency",FrequencyStateTypeId=Symbol.for(FrequencyStateSymbolKey),GaugeStateSymbolKey="effect/MetricState/Gauge",GaugeStateTypeId=Symbol.for(GaugeStateSymbolKey),HistogramStateSymbolKey="effect/MetricState/Histogram",HistogramStateTypeId=Symbol.for(HistogramStateSymbolKey),SummaryStateSymbolKey="effect/MetricState/Summary",SummaryStateTypeId=Symbol.for(SummaryStateSymbolKey),metricStateVariance={_A:e=>e};class CounterState{count;[MetricStateTypeId]=metricStateVariance;[CounterStateTypeId]=CounterStateTypeId;constructor(t){this.count=t}[symbol$1](){return pipe(hash(CounterStateSymbolKey),combine$5(hash(this.count)),cached(this))}[symbol](t){return isCounterState(t)&&this.count===t.count}pipe(){return pipeArguments(this,arguments)}}const arrayEquals=getEquivalence$2(equals$1);class FrequencyState{occurrences;[MetricStateTypeId]=metricStateVariance;[FrequencyStateTypeId]=FrequencyStateTypeId;constructor(t){this.occurrences=t}_hash;[symbol$1](){return pipe(string(FrequencyStateSymbolKey),combine$5(array(fromIterable$6(this.occurrences.entries()))),cached(this))}[symbol](t){return isFrequencyState(t)&&arrayEquals(fromIterable$6(this.occurrences.entries()),fromIterable$6(t.occurrences.entries()))}pipe(){return pipeArguments(this,arguments)}}class GaugeState{value;[MetricStateTypeId]=metricStateVariance;[GaugeStateTypeId]=GaugeStateTypeId;constructor(t){this.value=t}[symbol$1](){return pipe(hash(GaugeStateSymbolKey),combine$5(hash(this.value)),cached(this))}[symbol](t){return isGaugeState(t)&&this.value===t.value}pipe(){return pipeArguments(this,arguments)}}class HistogramState{buckets;count;min;max;sum;[MetricStateTypeId]=metricStateVariance;[HistogramStateTypeId]=HistogramStateTypeId;constructor(t,n,r,s,o){this.buckets=t,this.count=n,this.min=r,this.max=s,this.sum=o}[symbol$1](){return pipe(hash(HistogramStateSymbolKey),combine$5(hash(this.buckets)),combine$5(hash(this.count)),combine$5(hash(this.min)),combine$5(hash(this.max)),combine$5(hash(this.sum)),cached(this))}[symbol](t){return isHistogramState(t)&&equals$1(this.buckets,t.buckets)&&this.count===t.count&&this.min===t.min&&this.max===t.max&&this.sum===t.sum}pipe(){return pipeArguments(this,arguments)}}class SummaryState{error;quantiles;count;min;max;sum;[MetricStateTypeId]=metricStateVariance;[SummaryStateTypeId]=SummaryStateTypeId;constructor(t,n,r,s,o,i){this.error=t,this.quantiles=n,this.count=r,this.min=s,this.max=o,this.sum=i}[symbol$1](){return pipe(hash(SummaryStateSymbolKey),combine$5(hash(this.error)),combine$5(hash(this.quantiles)),combine$5(hash(this.count)),combine$5(hash(this.min)),combine$5(hash(this.max)),combine$5(hash(this.sum)),cached(this))}[symbol](t){return isSummaryState(t)&&this.error===t.error&&equals$1(this.quantiles,t.quantiles)&&this.count===t.count&&this.min===t.min&&this.max===t.max&&this.sum===t.sum}pipe(){return pipeArguments(this,arguments)}}const counter$2=e=>new CounterState(e),frequency$1=e=>new FrequencyState(e),gauge$1=e=>new GaugeState(e),histogram$2=e=>new HistogramState(e.buckets,e.count,e.min,e.max,e.sum),summary$1=e=>new SummaryState(e.error,e.quantiles,e.count,e.min,e.max,e.sum),isCounterState=e=>hasProperty(e,CounterStateTypeId),isFrequencyState=e=>hasProperty(e,FrequencyStateTypeId),isGaugeState=e=>hasProperty(e,GaugeStateTypeId),isHistogramState=e=>hasProperty(e,HistogramStateTypeId),isSummaryState=e=>hasProperty(e,SummaryStateTypeId),MetricHookSymbolKey="effect/MetricHook",MetricHookTypeId=Symbol.for(MetricHookSymbolKey),metricHookVariance={_In:e=>e,_Out:e=>e},make$4=e=>({[MetricHookTypeId]:metricHookVariance,pipe(){return pipeArguments(this,arguments)},...e}),bigint0=BigInt(0),counter$1=e=>{let t=e.keyType.bigint?bigint0:0;const n=e.keyType.incremental?e.keyType.bigint?s=>s>=bigint0:s=>s>=0:s=>!0,r=s=>{n(s)&&(t=t+s)};return make$4({get:()=>counter$2(t),update:r,modify:r})},frequency=e=>{const t=new Map;for(const r of e.keyType.preregisteredWords)t.set(r,0);const n=r=>{const s=t.get(r)??0;t.set(r,s+1)};return make$4({get:()=>frequency$1(t),update:n,modify:n})},gauge=(e,t)=>{let n=t;return make$4({get:()=>gauge$1(n),update:r=>{n=r},modify:r=>{n=n+r}})},histogram$1=e=>{const t=e.keyType.boundaries.values,n=t.length,r=new Uint32Array(n+1),s=new Float32Array(n);let o=0,i=0,a=Number.MAX_VALUE,l=Number.MIN_VALUE;pipe(t,sort(Order$1),map$3((d,m)=>{s[m]=d}));const u=d=>{let m=0,g=n;for(;m!==g;){const b=Math.floor(m+(g-m)/2),S=s[b];d<=S?g=b:m=b,g===m+1&&(d<=s[m]?g=m:m=g)}r[m]=r[m]+1,o=o+1,i=i+d,d<a&&(a=d),d>l&&(l=d)},f=()=>{const d=allocate(n);let m=0;for(let g=0;g<n;g++){const b=s[g],S=r[g];m=m+S,d[g]=[b,m]}return d};return make$4({get:()=>histogram$2({buckets:f(),count:o,min:a,max:l,sum:i}),update:u,modify:u})},summary=e=>{const{error:t,maxAge:n,maxSize:r,quantiles:s}=e.keyType,o=pipe(s,sort(Order$1)),i=allocate(r);let a=0,l=0,u=0,f=0,d=0;const m=b=>{const S=[];let R=0;for(;R!==r-1;){const T=i[R];if(T!=null){const[O,w]=T,A=millis(b-O);greaterThanOrEqualTo(A,zero)&&lessThanOrEqualTo(A,n)&&S.push(w)}R=R+1}return calculateQuantiles(t,o,sort(S,Order$1))},g=(b,S)=>{if(r>0){a=a+1;const R=a%r;i[R]=[S,b]}f=l===0?b:Math.min(f,b),d=l===0?b:Math.max(d,b),l=l+1,u=u+b};return make$4({get:()=>summary$1({error:t,quantiles:m(Date.now()),count:l,min:f,max:d,sum:u}),update:([b,S])=>g(b,S),modify:([b,S])=>g(b,S)})},calculateQuantiles=(e,t,n)=>{const r=n.length;if(!isNonEmptyReadonlyArray(t))return empty$j();const s=t[0],o=t.slice(1),i=resolveQuantile(e,r,none$4(),0,s,n),a=of$2(i);return o.forEach(l=>{a.push(resolveQuantile(e,r,i.value,i.consumed,l,i.rest))}),map$3(a,l=>[l.quantile,l.value])},resolveQuantile=(e,t,n,r,s,o)=>{let i=e,a=t,l=n,u=r,f=s,d=o,m=e,g=t,b=n,S=r,R=s,T=o;for(;;){if(!isNonEmptyReadonlyArray(d))return{quantile:f,value:none$4(),consumed:u,rest:[]};if(f===1)return{quantile:f,value:some(lastNonEmpty(d)),consumed:u+d.length,rest:[]};const O=headNonEmpty$1(d),w=span(d,q=>q===O),A=f*a,K=i/2*A,z=u+w[0].length,Y=Math.abs(z-A);if(z<A-K){m=i,g=a,b=head(d),S=z,R=f,T=w[1],i=m,a=g,l=b,u=S,f=R,d=T;continue}if(z>A+K){const q=isNone(l)?some(O):l;return{quantile:f,value:q,consumed:u,rest:d}}switch(l._tag){case"None":{m=i,g=a,b=head(d),S=z,R=f,T=w[1],i=m,a=g,l=b,u=S,f=R,d=T;continue}case"Some":{const q=Math.abs(A-l.value);if(Y<q){m=i,g=a,b=head(d),S=z,R=f,T=w[1],i=m,a=g,l=b,u=S,f=R,d=T;continue}return{quantile:f,value:some(l.value),consumed:u,rest:d}}}}throw new Error("BUG: MetricHook.resolveQuantiles - please report an issue at https://github.com/Effect-TS/effect/issues")},MetricPairSymbolKey="effect/MetricPair",MetricPairTypeId=Symbol.for(MetricPairSymbolKey),metricPairVariance={_Type:e=>e},unsafeMake=(e,t)=>({[MetricPairTypeId]:metricPairVariance,metricKey:e,metricState:t,pipe(){return pipeArguments(this,arguments)}}),MetricRegistrySymbolKey="effect/MetricRegistry",MetricRegistryTypeId=Symbol.for(MetricRegistrySymbolKey);class MetricRegistryImpl{[MetricRegistryTypeId]=MetricRegistryTypeId;map=empty$5();snapshot(){const t=[];for(const[n,r]of this.map)t.push(unsafeMake(n,r.get()));return t}get(t){const n=pipe(this.map,get$2(t),getOrUndefined);if(n==null){if(isCounterKey(t.keyType))return this.getCounter(t);if(isGaugeKey(t.keyType))return this.getGauge(t);if(isFrequencyKey(t.keyType))return this.getFrequency(t);if(isHistogramKey(t.keyType))return this.getHistogram(t);if(isSummaryKey(t.keyType))return this.getSummary(t);throw new Error("BUG: MetricRegistry.get - unknown MetricKeyType - please report an issue at https://github.com/Effect-TS/effect/issues")}else return n}getCounter(t){let n=pipe(this.map,get$2(t),getOrUndefined);if(n==null){const r=counter$1(t);pipe(this.map,has(t))||pipe(this.map,set$1(t,r)),n=r}return n}getFrequency(t){let n=pipe(this.map,get$2(t),getOrUndefined);if(n==null){const r=frequency(t);pipe(this.map,has(t))||pipe(this.map,set$1(t,r)),n=r}return n}getGauge(t){let n=pipe(this.map,get$2(t),getOrUndefined);if(n==null){const r=gauge(t,t.keyType.bigint?BigInt(0):0);pipe(this.map,has(t))||pipe(this.map,set$1(t,r)),n=r}return n}getHistogram(t){let n=pipe(this.map,get$2(t),getOrUndefined);if(n==null){const r=histogram$1(t);pipe(this.map,has(t))||pipe(this.map,set$1(t,r)),n=r}return n}getSummary(t){let n=pipe(this.map,get$2(t),getOrUndefined);if(n==null){const r=summary(t);pipe(this.map,has(t))||pipe(this.map,set$1(t,r)),n=r}return n}}const make$3=()=>new MetricRegistryImpl,MetricSymbolKey="effect/Metric",MetricTypeId=Symbol.for(MetricSymbolKey),metricVariance={_Type:e=>e,_In:e=>e,_Out:e=>e},globalMetricRegistry=globalValue(Symbol.for("effect/Metric/globalMetricRegistry"),()=>make$3()),make$2=function(e,t,n,r){const s=Object.assign(o=>tap(o,i=>update(s,i)),{[MetricTypeId]:metricVariance,keyType:e,unsafeUpdate:t,unsafeValue:n,unsafeModify:r,register(){return this.unsafeValue([]),this},pipe(){return pipeArguments(this,arguments)}});return s},counter=(e,t)=>fromMetricKey(counter$3(e,t)),fromMetricKey=e=>{let t;const n=new WeakMap,r=s=>{if(s.length===0)return t!==void 0||(t=globalMetricRegistry.get(e)),t;let o=n.get(s);return o!==void 0||(o=globalMetricRegistry.get(taggedWithLabels$1(e,s)),n.set(s,o)),o};return make$2(e.keyType,(s,o)=>r(o).update(s),s=>r(s).get(),(s,o)=>r(o).modify(s))},histogram=(e,t,n)=>fromMetricKey(histogram$3(e,t,n)),tagged=dual(3,(e,t,n)=>taggedWithLabels(e,[make$5(t,n)])),taggedWithLabels=dual(2,(e,t)=>make$2(e.keyType,(n,r)=>e.unsafeUpdate(n,union$2(t,r)),n=>e.unsafeValue(union$2(t,n)),(n,r)=>e.unsafeModify(n,union$2(t,r)))),update=dual(2,(e,t)=>fiberRefGetWith(currentMetricLabels,n=>sync(()=>e.unsafeUpdate(t,n))));({...StructuralPrototype});const complete=dual(2,(e,t)=>fiberRefGetWith(currentRequestMap,n=>sync(()=>{if(n.has(e)){const r=n.get(e);r.state.completed||(r.state.completed=!0,deferredUnsafeDone(r.result,t))}}))),SupervisorSymbolKey="effect/Supervisor",SupervisorTypeId=Symbol.for(SupervisorSymbolKey),supervisorVariance={_T:e=>e};class ProxySupervisor{underlying;value0;[SupervisorTypeId]=supervisorVariance;constructor(t,n){this.underlying=t,this.value0=n}get value(){return this.value0}onStart(t,n,r,s){this.underlying.onStart(t,n,r,s)}onEnd(t,n){this.underlying.onEnd(t,n)}onEffect(t,n){this.underlying.onEffect(t,n)}onSuspend(t){this.underlying.onSuspend(t)}onResume(t){this.underlying.onResume(t)}map(t){return new ProxySupervisor(this,pipe(this.value,map(t)))}zip(t){return new Zip(this,t)}}class Zip{left;right;_tag="Zip";[SupervisorTypeId]=supervisorVariance;constructor(t,n){this.left=t,this.right=n}get value(){return zip(this.left.value,this.right.value)}onStart(t,n,r,s){this.left.onStart(t,n,r,s),this.right.onStart(t,n,r,s)}onEnd(t,n){this.left.onEnd(t,n),this.right.onEnd(t,n)}onEffect(t,n){this.left.onEffect(t,n),this.right.onEffect(t,n)}onSuspend(t){this.left.onSuspend(t),this.right.onSuspend(t)}onResume(t){this.left.onResume(t),this.right.onResume(t)}map(t){return new ProxySupervisor(this,pipe(this.value,map(t)))}zip(t){return new Zip(this,t)}}const isZip=e=>hasProperty(e,SupervisorTypeId)&&isTagged(e,"Zip");class Const{effect;[SupervisorTypeId]=supervisorVariance;constructor(t){this.effect=t}get value(){return this.effect}onStart(t,n,r,s){}onEnd(t,n){}onEffect(t,n){}onSuspend(t){}onResume(t){}map(t){return new ProxySupervisor(this,pipe(this.value,map(t)))}zip(t){return new Zip(this,t)}onRun(t,n){return t()}}const fromEffect=e=>new Const(e),none=globalValue("effect/Supervisor/none",()=>fromEffect(void_$1)),make$1=make$d,OP_EMPTY="Empty",OP_ADD_SUPERVISOR="AddSupervisor",OP_REMOVE_SUPERVISOR="RemoveSupervisor",OP_AND_THEN="AndThen",empty={_tag:OP_EMPTY},combine=(e,t)=>({_tag:OP_AND_THEN,first:e,second:t}),patch=(e,t)=>patchLoop(t,of$1(e)),patchLoop=(e,t)=>{let n=e,r=t;for(;isNonEmpty(r);){const s=headNonEmpty(r);switch(s._tag){case OP_EMPTY:{r=tailNonEmpty(r);break}case OP_ADD_SUPERVISOR:{n=n.zip(s.supervisor),r=tailNonEmpty(r);break}case OP_REMOVE_SUPERVISOR:{n=removeSupervisor(n,s.supervisor),r=tailNonEmpty(r);break}case OP_AND_THEN:{r=prepend$1(s.first)(prepend$1(s.second)(tailNonEmpty(r)));break}}}return n},removeSupervisor=(e,t)=>equals$1(e,t)?none:isZip(e)?removeSupervisor(e.left,t).zip(removeSupervisor(e.right,t)):e,toSet=e=>equals$1(e,none)?empty$d():isZip(e)?pipe(toSet(e.left),union(toSet(e.right))):make$f(e),diff=(e,t)=>{if(equals$1(e,t))return empty;const n=toSet(e),r=toSet(t),s=pipe(r,difference(n),reduce$4(empty,(i,a)=>combine(i,{_tag:OP_ADD_SUPERVISOR,supervisor:a}))),o=pipe(n,difference(r),reduce$4(empty,(i,a)=>combine(i,{_tag:OP_REMOVE_SUPERVISOR,supervisor:a})));return combine(s,o)},differ=make$1({empty,patch,combine,diff}),fiberStarted=counter("effect_fiber_started",{incremental:!0}),fiberActive=counter("effect_fiber_active"),fiberSuccesses=counter("effect_fiber_successes",{incremental:!0}),fiberFailures=counter("effect_fiber_failures",{incremental:!0}),fiberLifetimes=tagged(histogram("effect_fiber_lifetimes",exponential({start:.5,factor:2,count:35})),"time_unit","milliseconds"),EvaluationSignalContinue="Continue",EvaluationSignalDone="Done",EvaluationSignalYieldNow="Yield",runtimeFiberVariance={_E:e=>e,_A:e=>e},absurd=e=>{throw new Error(`BUG: FiberRuntime - ${toStringUnknown(e)} - please report an issue at https://github.com/Effect-TS/effect/issues`)},YieldedOp=Symbol.for("effect/internal/fiberRuntime/YieldedOp"),yieldedOpChannel=globalValue("effect/internal/fiberRuntime/yieldedOpChannel",()=>({currentOp:null})),contOpSuccess={[OP_ON_SUCCESS]:(e,t,n)=>internalCall(()=>t.effect_instruction_i1(n)),OnStep:(e,t,n)=>exitSucceed$1(exitSucceed$1(n)),[OP_ON_SUCCESS_AND_FAILURE]:(e,t,n)=>internalCall(()=>t.effect_instruction_i2(n)),[OP_REVERT_FLAGS]:(e,t,n)=>(e.patchRuntimeFlags(e.currentRuntimeFlags,t.patch),interruptible$2(e.currentRuntimeFlags)&&e.isInterrupted()?exitFailCause$1(e.getInterruptedCause()):exitSucceed$1(n)),[OP_WHILE]:(e,t,n)=>(internalCall(()=>t.effect_instruction_i2(n)),internalCall(()=>t.effect_instruction_i0())?(e.pushStack(t),internalCall(()=>t.effect_instruction_i1())):void_$1),[OP_ITERATOR]:(e,t,n)=>{const r=internalCall(()=>t.effect_instruction_i0.next(n));return r.done?exitSucceed$1(r.value):(e.pushStack(t),yieldWrapGet(r.value))}},drainQueueWhileRunningTable={[OP_INTERRUPT_SIGNAL]:(e,t,n,r)=>(e.processNewInterruptSignal(r.cause),interruptible$2(t)?exitFailCause$1(r.cause):n),[OP_RESUME]:(e,t,n,r)=>{throw new Error("It is illegal to have multiple concurrent run loops in a single fiber")},[OP_STATEFUL]:(e,t,n,r)=>(r.onFiber(e,running(t)),n),[OP_YIELD_NOW]:(e,t,n,r)=>flatMap$1(yieldNow$2(),()=>n)},runBlockedRequests=e=>forEachSequentialDiscard(flatten$1(e),t=>forEachConcurrentDiscard(sequentialCollectionToChunk(t),([n,r])=>{const s=new Map,o=[];for(const a of r){o.push(toReadonlyArray(a));for(const l of a)s.set(l.request,l)}const i=o.flat();return fiberRefLocally(invokeWithInterrupt(n.runAll(o),i,()=>i.forEach(a=>{a.listeners.interrupted=!0})),currentRequestMap,s)},!1,!1)),_version=getCurrentVersion();class FiberRuntime extends Class{[FiberTypeId]=fiberVariance;[RuntimeFiberTypeId]=runtimeFiberVariance;_fiberRefs;_fiberId;_queue=new Array;_children=null;_observers=new Array;_running=!1;_stack=[];_asyncInterruptor=null;_asyncBlockingOn=null;_exitValue=null;_steps=[];_isYielding=!1;currentRuntimeFlags;currentOpCount=0;currentSupervisor;currentScheduler;currentTracer;currentSpan;currentContext;currentDefaultServices;constructor(t,n,r){if(super(),this.currentRuntimeFlags=r,this._fiberId=t,this._fiberRefs=n,runtimeMetrics(r)){const s=this.getFiberRef(currentMetricLabels);fiberStarted.unsafeUpdate(1,s),fiberActive.unsafeUpdate(1,s)}this.refreshRefCache()}commit(){return join(this)}id(){return this._fiberId}resume(t){this.tell(resume(t))}get status(){return this.ask((t,n)=>n)}get runtimeFlags(){return this.ask((t,n)=>isDone(n)?t.currentRuntimeFlags:n.runtimeFlags)}scope(){return unsafeMake$1(this)}get children(){return this.ask(t=>Array.from(t.getChildren()))}getChildren(){return this._children===null&&(this._children=new Set),this._children}getInterruptedCause(){return this.getFiberRef(currentInterruptedCause)}fiberRefs(){return this.ask(t=>t.getFiberRefs())}ask(t){return suspend$1(()=>{const n=deferredUnsafeMake(this._fiberId);return this.tell(stateful((r,s)=>{deferredUnsafeDone(n,sync(()=>t(r,s)))})),deferredAwait(n)})}tell(t){this._queue.push(t),this._running||(this._running=!0,this.drainQueueLaterOnExecutor())}get await(){return async_(t=>{const n=r=>t(succeed$1(r));return this.tell(stateful((r,s)=>{r._exitValue!==null?n(this._exitValue):r.addObserver(n)})),sync(()=>this.tell(stateful((r,s)=>{r.removeObserver(n)})))},this.id())}get inheritAll(){return withFiberRuntime((t,n)=>{const r=t.id(),s=t.getFiberRefs(),o=n.runtimeFlags,i=this.getFiberRefs(),a=joinAs(s,r,i);t.setFiberRefs(a);const l=t.getFiberRef(currentRuntimeFlags),u=pipe(diff$3(o,l),exclude(Interruption),exclude(WindDown));return updateRuntimeFlags(u)})}get poll(){return sync(()=>fromNullable(this._exitValue))}unsafePoll(){return this._exitValue}interruptAsFork(t){return sync(()=>this.tell(interruptSignal(interrupt(t))))}unsafeInterruptAsFork(t){this.tell(interruptSignal(interrupt(t)))}addObserver(t){this._exitValue!==null?t(this._exitValue):this._observers.push(t)}removeObserver(t){this._observers=this._observers.filter(n=>n!==t)}getFiberRefs(){return this.setFiberRef(currentRuntimeFlags,this.currentRuntimeFlags),this._fiberRefs}unsafeDeleteFiberRef(t){this._fiberRefs=delete_(this._fiberRefs,t)}getFiberRef(t){return this._fiberRefs.locals.has(t)?this._fiberRefs.locals.get(t)[0][1]:t.initial}setFiberRef(t,n){this._fiberRefs=updateAs(this._fiberRefs,{fiberId:this._fiberId,fiberRef:t,value:n}),this.refreshRefCache()}refreshRefCache(){this.currentDefaultServices=this.getFiberRef(currentServices),this.currentTracer=this.currentDefaultServices.unsafeMap.get(tracerTag.key),this.currentSupervisor=this.getFiberRef(currentSupervisor),this.currentScheduler=this.getFiberRef(currentScheduler),this.currentContext=this.getFiberRef(currentContext),this.currentSpan=this.currentContext.unsafeMap.get(spanTag.key)}setFiberRefs(t){this._fiberRefs=t,this.refreshRefCache()}addChild(t){this.getChildren().add(t)}removeChild(t){this.getChildren().delete(t)}transferChildren(t){const n=this._children;if(this._children=null,n!==null&&n.size>0)for(const r of n)r._exitValue===null&&t.add(this.currentRuntimeFlags,r)}drainQueueOnCurrentThread(){let t=!0;for(;t;){let n=EvaluationSignalContinue;const r=globalThis[currentFiberURI];globalThis[currentFiberURI]=this;try{for(;n===EvaluationSignalContinue;)n=this._queue.length===0?EvaluationSignalDone:this.evaluateMessageWhileSuspended(this._queue.splice(0,1)[0])}finally{this._running=!1,globalThis[currentFiberURI]=r}this._queue.length>0&&!this._running?(this._running=!0,n===EvaluationSignalYieldNow?(this.drainQueueLaterOnExecutor(),t=!1):t=!0):t=!1}}drainQueueLaterOnExecutor(){this.currentScheduler.scheduleTask(this.run,this.getFiberRef(currentSchedulingPriority))}drainQueueWhileRunning(t,n){let r=n;for(;this._queue.length>0;){const s=this._queue.splice(0,1)[0];r=drainQueueWhileRunningTable[s._tag](this,t,r,s)}return r}isInterrupted(){return!isEmpty(this.getFiberRef(currentInterruptedCause))}addInterruptedCause(t){const n=this.getFiberRef(currentInterruptedCause);this.setFiberRef(currentInterruptedCause,sequential$2(n,t))}processNewInterruptSignal(t){this.addInterruptedCause(t),this.sendInterruptSignalToAllChildren()}sendInterruptSignalToAllChildren(){if(this._children===null||this._children.size===0)return!1;let t=!1;for(const n of this._children)n.tell(interruptSignal(interrupt(this.id()))),t=!0;return t}interruptAllChildren(){if(this.sendInterruptSignalToAllChildren()){const t=this._children.values();this._children=null;let n=!1;return whileLoop({while:()=>!n,body:()=>{const s=t.next();return s.done?sync(()=>{n=!0}):asVoid(s.value.await)},step:()=>{}})}return null}reportExitValue(t){if(runtimeMetrics(this.currentRuntimeFlags)){const n=this.getFiberRef(currentMetricLabels),r=this.id().startTimeMillis,s=Date.now();switch(fiberLifetimes.unsafeUpdate(s-r,n),fiberActive.unsafeUpdate(-1,n),t._tag){case OP_SUCCESS:{fiberSuccesses.unsafeUpdate(1,n);break}case OP_FAILURE:{fiberFailures.unsafeUpdate(1,n);break}}}if(t._tag==="Failure"){const n=this.getFiberRef(currentUnhandledErrorLogLevel);!isInterruptedOnly(t.cause)&&n._tag==="Some"&&this.log("Fiber terminated with an unhandled error",t.cause,n)}}setExitValue(t){this._exitValue=t,this.reportExitValue(t);for(let n=this._observers.length-1;n>=0;n--)this._observers[n](t);this._observers=[]}getLoggers(){return this.getFiberRef(currentLoggers)}log(t,n,r){const s=isSome(r)?r.value:this.getFiberRef(currentLogLevel),o=this.getFiberRef(currentMinimumLogLevel);if(greaterThan(o,s))return;const i=this.getFiberRef(currentLogSpan),a=this.getFiberRef(currentLogAnnotations),l=this.getLoggers(),u=this.getFiberRefs();if(size(l)>0){const f=get$6(this.getFiberRef(currentServices),clockTag),d=new Date(f.unsafeCurrentTimeMillis());withRedactableContext(u,()=>{for(const m of l)m.log({fiberId:this.id(),logLevel:s,message:t,cause:n,context:u,spans:i,annotations:a,date:d})})}}evaluateMessageWhileSuspended(t){switch(t._tag){case OP_YIELD_NOW:return EvaluationSignalYieldNow;case OP_INTERRUPT_SIGNAL:return this.processNewInterruptSignal(t.cause),this._asyncInterruptor!==null&&(this._asyncInterruptor(exitFailCause$1(t.cause)),this._asyncInterruptor=null),EvaluationSignalContinue;case OP_RESUME:return this._asyncInterruptor=null,this._asyncBlockingOn=null,this.evaluateEffect(t.effect),EvaluationSignalContinue;case OP_STATEFUL:return t.onFiber(this,this._exitValue!==null?done:suspended(this.currentRuntimeFlags,this._asyncBlockingOn)),EvaluationSignalContinue;default:return absurd(t)}}evaluateEffect(t){this.currentSupervisor.onResume(this);try{let n=interruptible$2(this.currentRuntimeFlags)&&this.isInterrupted()?exitFailCause$1(this.getInterruptedCause()):t;for(;n!==null;){const r=n,s=this.runLoop(r);if(s===YieldedOp){const o=yieldedOpChannel.currentOp;yieldedOpChannel.currentOp=null,o._op===OP_YIELD?cooperativeYielding(this.currentRuntimeFlags)?(this.tell(yieldNow()),this.tell(resume(exitVoid$1)),n=null):n=exitVoid$1:o._op===OP_ASYNC&&(n=null)}else{this.currentRuntimeFlags=pipe(this.currentRuntimeFlags,enable$1(WindDown));const o=this.interruptAllChildren();o!==null?n=flatMap$1(o,()=>s):(this._queue.length===0?this.setExitValue(s):this.tell(resume(s)),n=null)}}}finally{this.currentSupervisor.onSuspend(this)}}start(t){if(this._running)this.tell(resume(t));else{this._running=!0;const n=globalThis[currentFiberURI];globalThis[currentFiberURI]=this;try{this.evaluateEffect(t)}finally{this._running=!1,globalThis[currentFiberURI]=n,this._queue.length>0&&this.drainQueueLaterOnExecutor()}}}startFork(t){this.tell(resume(t))}patchRuntimeFlags(t,n){const r=patch$4(t,n);return globalThis[currentFiberURI]=this,this.currentRuntimeFlags=r,r}initiateAsync(t,n){let r=!1;const s=o=>{r||(r=!0,this.tell(resume(o)))};interruptible$2(t)&&(this._asyncInterruptor=s);try{n(s)}catch(o){s(failCause$1(die$1(o)))}}pushStack(t){this._stack.push(t),t._op==="OnStep"&&this._steps.push({refs:this.getFiberRefs(),flags:this.currentRuntimeFlags})}popStack(){const t=this._stack.pop();if(t)return t._op==="OnStep"&&this._steps.pop(),t}getNextSuccessCont(){let t=this.popStack();for(;t;){if(t._op!==OP_ON_FAILURE)return t;t=this.popStack()}}getNextFailCont(){let t=this.popStack();for(;t;){if(t._op!==OP_ON_SUCCESS&&t._op!==OP_WHILE&&t._op!==OP_ITERATOR)return t;t=this.popStack()}}[OP_TAG](t){return sync(()=>unsafeGet$1(this.currentContext,t))}Left(t){return fail(t.left)}None(t){return fail(new NoSuchElementException)}Right(t){return exitSucceed$1(t.right)}Some(t){return exitSucceed$1(t.value)}Micro(t){return unsafeAsync(n=>{let r=n;const s=runFork(provideContext(t,this.currentContext));return s.addObserver(o=>{if(o._tag==="Success")return r(exitSucceed$1(o.value));switch(o.cause._tag){case"Interrupt":return r(exitFailCause$1(interrupt(none$2)));case"Fail":return r(fail(o.cause.error));case"Die":return r(die(o.cause.defect))}}),unsafeAsync(o=>{r=i=>{o(void_$1)},s.unsafeInterrupt()})})}[OP_SYNC](t){const n=internalCall(()=>t.effect_instruction_i0()),r=this.getNextSuccessCont();return r!==void 0?(r._op in contOpSuccess||absurd(r),contOpSuccess[r._op](this,r,n)):(yieldedOpChannel.currentOp=exitSucceed$1(n),YieldedOp)}[OP_SUCCESS](t){const n=t,r=this.getNextSuccessCont();return r!==void 0?(r._op in contOpSuccess||absurd(r),contOpSuccess[r._op](this,r,n.effect_instruction_i0)):(yieldedOpChannel.currentOp=n,YieldedOp)}[OP_FAILURE](t){const n=t.effect_instruction_i0,r=this.getNextFailCont();if(r!==void 0)switch(r._op){case OP_ON_FAILURE:case OP_ON_SUCCESS_AND_FAILURE:return interruptible$2(this.currentRuntimeFlags)&&this.isInterrupted()?exitFailCause$1(stripFailures(n)):internalCall(()=>r.effect_instruction_i1(n));case"OnStep":return interruptible$2(this.currentRuntimeFlags)&&this.isInterrupted()?exitFailCause$1(stripFailures(n)):exitSucceed$1(exitFailCause$1(n));case OP_REVERT_FLAGS:return this.patchRuntimeFlags(this.currentRuntimeFlags,r.patch),interruptible$2(this.currentRuntimeFlags)&&this.isInterrupted()?exitFailCause$1(sequential$2(n,this.getInterruptedCause())):exitFailCause$1(n);default:absurd(r)}else return yieldedOpChannel.currentOp=exitFailCause$1(n),YieldedOp}[OP_WITH_RUNTIME](t){return internalCall(()=>t.effect_instruction_i0(this,running(this.currentRuntimeFlags)))}Blocked(t){const n=this.getFiberRefs(),r=this.currentRuntimeFlags;if(this._steps.length>0){const s=[],o=this._steps[this._steps.length-1];let i=this.popStack();for(;i&&i._op!=="OnStep";)s.push(i),i=this.popStack();this.setFiberRefs(o.refs),this.currentRuntimeFlags=o.flags;const a=diff$1(o.refs,n),l=diff$3(o.flags,r);return exitSucceed$1(blocked(t.effect_instruction_i0,withFiberRuntime(u=>{for(;s.length>0;)u.pushStack(s.pop());return u.setFiberRefs(patch$1(u.id(),u.getFiberRefs())(a)),u.currentRuntimeFlags=patch$4(l)(u.currentRuntimeFlags),t.effect_instruction_i1})))}return uninterruptibleMask$1(s=>flatMap$1(forkDaemon(runRequestBlock(t.effect_instruction_i0)),()=>s(t.effect_instruction_i1)))}RunBlocked(t){return runBlockedRequests(t.effect_instruction_i0)}[OP_UPDATE_RUNTIME_FLAGS](t){const n=t.effect_instruction_i0,r=this.currentRuntimeFlags,s=patch$4(r,n);if(interruptible$2(s)&&this.isInterrupted())return exitFailCause$1(this.getInterruptedCause());if(this.patchRuntimeFlags(this.currentRuntimeFlags,n),t.effect_instruction_i1){const o=diff$3(s,r);return this.pushStack(new RevertFlags(o,t)),internalCall(()=>t.effect_instruction_i1(r))}else return exitVoid$1}[OP_ON_SUCCESS](t){return this.pushStack(t),t.effect_instruction_i0}OnStep(t){return this.pushStack(t),t.effect_instruction_i0}[OP_ON_FAILURE](t){return this.pushStack(t),t.effect_instruction_i0}[OP_ON_SUCCESS_AND_FAILURE](t){return this.pushStack(t),t.effect_instruction_i0}[OP_ASYNC](t){return this._asyncBlockingOn=t.effect_instruction_i1,this.initiateAsync(this.currentRuntimeFlags,t.effect_instruction_i0),yieldedOpChannel.currentOp=t,YieldedOp}[OP_YIELD](t){return this._isYielding=!1,yieldedOpChannel.currentOp=t,YieldedOp}[OP_WHILE](t){const n=t.effect_instruction_i0,r=t.effect_instruction_i1;return n()?(this.pushStack(t),r()):exitVoid$1}[OP_ITERATOR](t){return contOpSuccess[OP_ITERATOR](this,t,void 0)}[OP_COMMIT](t){return internalCall(()=>t.commit())}runLoop(t){let n=t;for(this.currentOpCount=0;;){if((this.currentRuntimeFlags&OpSupervision)!==0&&this.currentSupervisor.onEffect(this,n),this._queue.length>0&&(n=this.drainQueueWhileRunning(this.currentRuntimeFlags,n)),!this._isYielding){this.currentOpCount+=1;const r=this.currentScheduler.shouldYield(this);if(r!==!1){this._isYielding=!0,this.currentOpCount=0;const s=n;n=flatMap$1(yieldNow$2({priority:r}),()=>s)}}try{if(n=this.currentTracer.context(()=>{if(_version!==n[EffectTypeId]._V){const r=this.getFiberRef(currentVersionMismatchErrorLogLevel);if(r._tag==="Some"){const s=n[EffectTypeId]._V;this.log(`Executing an Effect versioned ${s} with a Runtime of version ${getCurrentVersion()}, you may want to dedupe the effect dependencies, you can use the language service plugin to detect this at compile time: https://github.com/Effect-TS/language-service`,empty$6,r)}}return this[n._op](n)},this),n===YieldedOp){const r=yieldedOpChannel.currentOp;return r._op===OP_YIELD||r._op===OP_ASYNC?YieldedOp:(yieldedOpChannel.currentOp=null,r._op===OP_SUCCESS||r._op===OP_FAILURE?r:exitFailCause$1(die$1(r)))}}catch(r){n!==YieldedOp&&!hasProperty(n,"_op")||!(n._op in this)?n=dieMessage(`Not a valid effect: ${toStringUnknown(n)}`):isInterruptedException(r)?n=exitFailCause$1(sequential$2(die$1(r),interrupt(none$2))):n=die(r)}}}run=()=>{this.drainQueueOnCurrentThread()}}const currentMinimumLogLevel=globalValue("effect/FiberRef/currentMinimumLogLevel",()=>fiberRefUnsafeMake(fromLiteral("Info"))),loggerWithConsoleLog=e=>makeLogger(t=>{const n=getOrDefault(t.context,currentServices);get$6(n,consoleTag).unsafe.log(e.log(t))}),defaultLogger=globalValue(Symbol.for("effect/Logger/defaultLogger"),()=>loggerWithConsoleLog(stringLogger)),tracerLogger=globalValue(Symbol.for("effect/Logger/tracerLogger"),()=>makeLogger(({annotations:e,cause:t,context:n,fiberId:r,logLevel:s,message:o})=>{const i=getOption(getOrDefault$1(n,currentContext),spanTag);if(i._tag==="None"||i.value._tag==="ExternalSpan")return;const a=unsafeGet$1(getOrDefault$1(n,currentServices),clockTag),l={};for(const[u,f]of e)l[u]=f;l["effect.fiberId"]=threadName(r),l["effect.logLevel"]=s.label,t!==null&&t._tag!=="Empty"&&(l["effect.cause"]=pretty(t,{renderErrorCause:!0})),i.value.event(toStringUnknown(Array.isArray(o)?o[0]:o),a.unsafeCurrentTimeNanos(),l)})),currentLoggers=globalValue(Symbol.for("effect/FiberRef/currentLoggers"),()=>fiberRefUnsafeMakeHashSet(make$f(defaultLogger,tracerLogger))),allResolveInput=e=>{if(Array.isArray(e)||isIterable(e))return[e,none$4()];const t=Object.keys(e),n=t.length;return[t.map(r=>e[r]),some(r=>{const s={};for(let o=0;o<n;o++)s[t[o]]=r[o];return s})]},allValidate=(e,t,n)=>{const r=[];for(const s of e)r.push(either(s));return flatMap$1(forEach$1(r,identity$1,{concurrency:n?.concurrency,batching:n?.batching,concurrentFinalizers:n?.concurrentFinalizers}),s=>{const o=none$4(),i=s.length,a=new Array(i),l=new Array(i);let u=!1;for(let f=0;f<i;f++){const d=s[f];d._tag==="Left"?(a[f]=some(d.left),u=!0):(l[f]=d.right,a[f]=o)}return u?t._tag==="Some"?fail(t.value(a)):fail(a):n?.discard?void_$1:t._tag==="Some"?succeed$1(t.value(l)):succeed$1(l)})},allEither=(e,t,n)=>{const r=[];for(const s of e)r.push(either(s));return n?.discard?forEach$1(r,identity$1,{concurrency:n?.concurrency,batching:n?.batching,discard:!0,concurrentFinalizers:n?.concurrentFinalizers}):map(forEach$1(r,identity$1,{concurrency:n?.concurrency,batching:n?.batching,concurrentFinalizers:n?.concurrentFinalizers}),s=>t._tag==="Some"?t.value(s):s)},all=(e,t)=>{const[n,r]=allResolveInput(e);return t?.mode==="validate"?allValidate(n,r,t):t?.mode==="either"?allEither(n,r,t):t?.discard!==!0&&r._tag==="Some"?map(forEach$1(n,identity$1,t),r.value):forEach$1(n,identity$1,t)},forEach$1=dual(e=>isIterable(e[0]),(e,t,n)=>withFiberRuntime(r=>{const s=n?.batching===!0||n?.batching==="inherit"&&r.getFiberRef(currentRequestBatching);return n?.discard?match(n.concurrency,()=>finalizersMaskInternal(sequential,n?.concurrentFinalizers)(o=>s?forEachConcurrentDiscard(e,(i,a)=>o(t(i,a)),!0,!1,1):forEachSequentialDiscard(e,(i,a)=>o(t(i,a)))),()=>finalizersMaskInternal(parallel,n?.concurrentFinalizers)(o=>forEachConcurrentDiscard(e,(i,a)=>o(t(i,a)),s,!1)),o=>finalizersMaskInternal(parallelN(o),n?.concurrentFinalizers)(i=>forEachConcurrentDiscard(e,(a,l)=>i(t(a,l)),s,!1,o))):match(n?.concurrency,()=>finalizersMaskInternal(sequential,n?.concurrentFinalizers)(o=>s?forEachParN(e,1,(i,a)=>o(t(i,a)),!0):forEachSequential(e,(i,a)=>o(t(i,a)))),()=>finalizersMaskInternal(parallel,n?.concurrentFinalizers)(o=>forEachParUnbounded(e,(i,a)=>o(t(i,a)),s)),o=>finalizersMaskInternal(parallelN(o),n?.concurrentFinalizers)(i=>forEachParN(e,o,(a,l)=>i(t(a,l)),s)))})),forEachParUnbounded=(e,t,n)=>suspend$1(()=>{const r=fromIterable$6(e),s=new Array(r.length);return zipRight(forEachConcurrentDiscard(r,(i,a)=>flatMap$1(t(i,a),l=>sync(()=>s[a]=l)),n,!1),succeed$1(s))}),forEachConcurrentDiscard=(e,t,n,r,s)=>uninterruptibleMask$1(o=>transplant(i=>withFiberRuntime(a=>{let l=Array.from(e).reverse(),u=l.length;if(u===0)return void_$1;let f=0,d=!1;const m=s?Math.min(l.length,s):l.length,g=new Set,b=new Array,S=()=>g.forEach(q=>{q.currentScheduler.scheduleTask(()=>{q.unsafeInterruptAsFork(a.id())},0)}),R=new Array,T=new Array,O=new Array,w=()=>{const q=b.filter(({exit:N})=>N._tag==="Failure").sort((N,U)=>N.index<U.index?-1:N.index===U.index?0:1).map(({exit:N})=>N);return q.length===0&&q.push(exitVoid$1),q},A=(q,N=!1)=>{const U=uninterruptible(i(q)),W=unsafeForkUnstarted(U,a,a.currentRuntimeFlags,globalScope);return a.currentScheduler.scheduleTask(()=>{N&&W.unsafeInterruptAsFork(a.id()),W.resume(U)},0),W},K=()=>{r||(u-=l.length,l=[]),d=!0,S()},z=n?step:exit,Y=A(async_(q=>{const N=(W,M)=>{W._op==="Blocked"?O.push(W):(b.push({index:M,exit:W}),W._op==="Failure"&&!d&&K())},U=()=>{if(l.length>0){const W=l.pop();let M=f++;const Q=()=>{const J=l.pop();return M=f++,flatMap$1(yieldNow$2(),()=>flatMap$1(z(o(t(J,M))),ne))},ne=J=>l.length>0&&(N(J,M),l.length>0)?Q():succeed$1(J),oe=flatMap$1(z(o(t(W,M))),ne),X=A(oe);R.push(X),g.add(X),d&&X.currentScheduler.scheduleTask(()=>{X.unsafeInterruptAsFork(a.id())},0),X.addObserver(J=>{let Z;if(J._op==="Failure"?Z=J:Z=J.effect_instruction_i0,T.push(X),g.delete(X),N(Z,M),b.length===u)q(succeed$1(getOrElse(exitCollectAll(w(),{parallel:!0}),()=>exitVoid$1)));else if(O.length+b.length===u){const ae=w(),pe=O.map(ie=>ie.effect_instruction_i0).reduce(par);q(succeed$1(blocked(pe,forEachConcurrentDiscard([getOrElse(exitCollectAll(ae,{parallel:!0}),()=>exitVoid$1),...O.map(ie=>ie.effect_instruction_i1)],ie=>ie,n,!0,s))))}else U()})}};for(let W=0;W<m;W++)U()}));return asVoid(onExit$1(flatten(o(join(Y))),exitMatch({onFailure:q=>{K();const N=O.length+1,U=Math.min(typeof s=="number"?s:O.length,O.length),W=Array.from(O);return async_(M=>{let Q=0,ne=0;const oe=(J,Z)=>ae=>{Q++,Q===N&&M(exitSucceed$1(exitFailCause$1(q))),W.length>0&&Z&&X()},X=()=>{A(W.pop(),!0).addObserver(oe(ne,!0)),ne++};Y.addObserver(oe(ne,!1)),ne++;for(let J=0;J<U;J++)X()})},onSuccess:()=>forEachSequential(T,q=>q.inheritAll)})))}))),forEachParN=(e,t,n,r)=>suspend$1(()=>{const s=fromIterable$6(e),o=new Array(s.length);return zipRight(forEachConcurrentDiscard(s,(a,l)=>map(n(a,l),u=>o[l]=u),r,!1,t),succeed$1(o))}),forkDaemon=e=>forkWithScopeOverride(e,globalScope),unsafeFork$1=(e,t,n,r=null)=>{const s=unsafeMakeChildFiber(e,t,n,r);return s.resume(e),s},unsafeForkUnstarted=(e,t,n,r=null)=>unsafeMakeChildFiber(e,t,n,r),unsafeMakeChildFiber=(e,t,n,r=null)=>{const s=unsafeMake$4(),o=t.getFiberRefs(),i=forkAs(o,s),a=new FiberRuntime(s,i,n),l=getOrDefault$1(i,currentContext),u=a.currentSupervisor;return u.onStart(l,e,some(t),a),a.addObserver(d=>u.onEnd(d,a)),(r!==null?r:pipe(t.getFiberRef(currentForkScopeOverride),getOrElse(()=>t.scope()))).add(n,a),a},forkWithScopeOverride=(e,t)=>withFiberRuntime((n,r)=>succeed$1(unsafeFork$1(e,n,r.runtimeFlags,t))),parallelFinalizers=e=>contextWithEffect(t=>match$3(getOption(t,scopeTag),{onNone:()=>e,onSome:n=>{switch(n.strategy._tag){case"Parallel":return e;case"Sequential":case"ParallelN":return flatMap$1(scopeFork(n,parallel),r=>scopeExtend(e,r))}}})),parallelNFinalizers=e=>t=>contextWithEffect(n=>match$3(getOption(n,scopeTag),{onNone:()=>t,onSome:r=>r.strategy._tag==="ParallelN"&&r.strategy.parallelism===e?t:flatMap$1(scopeFork(r,parallelN(e)),s=>scopeExtend(t,s))})),finalizersMaskInternal=(e,t)=>n=>contextWithEffect(r=>match$3(getOption(r,scopeTag),{onNone:()=>n(identity$1),onSome:s=>{if(t===!0){const o=e._tag==="Parallel"?parallelFinalizers:e._tag==="Sequential"?sequentialFinalizers:parallelNFinalizers(e.parallelism);switch(s.strategy._tag){case"Parallel":return o(n(parallelFinalizers));case"Sequential":return o(n(sequentialFinalizers));case"ParallelN":return o(n(parallelNFinalizers(s.strategy.parallelism)))}}else return n(identity$1)}})),scopeWith=e=>flatMap$1(scopeTag,e),scopedWith=e=>flatMap$1(scopeMake(),t=>onExit$1(e(t),n=>t.close(n))),sequentialFinalizers=e=>contextWithEffect(t=>match$3(getOption(t,scopeTag),{onNone:()=>e,onSome:n=>{switch(n.strategy._tag){case"Sequential":return e;case"Parallel":case"ParallelN":return flatMap$1(scopeFork(n,sequential),r=>scopeExtend(e,r))}}})),zipWithOptions=dual(e=>isEffect(e[1]),(e,t,n,r)=>map(all([e,t],{concurrency:r?.concurrent?2:1,batching:r?.batching,concurrentFinalizers:r?.concurrentFinalizers}),([s,o])=>n(s,o))),scopeTag=GenericTag("effect/Scope"),scopeUnsafeAddFinalizer=(e,t)=>{e.state._tag==="Open"&&e.state.finalizers.set({},t)},ScopeImplProto={[ScopeTypeId]:ScopeTypeId,[CloseableScopeTypeId]:CloseableScopeTypeId,pipe(){return pipeArguments(this,arguments)},fork(e){return sync(()=>{const t=scopeUnsafeMake(e);if(this.state._tag==="Closed")return t.state=this.state,t;const n={},r=s=>t.close(s);return this.state.finalizers.set(n,r),scopeUnsafeAddFinalizer(t,s=>sync(()=>{this.state._tag==="Open"&&this.state.finalizers.delete(n)})),t})},close(e){return suspend$1(()=>{if(this.state._tag==="Closed")return void_$1;const t=Array.from(this.state.finalizers.values()).reverse();return this.state={_tag:"Closed",exit:e},t.length===0?void_$1:isSequential(this.strategy)?pipe(forEachSequential(t,n=>exit(n(e))),flatMap$1(n=>pipe(exitCollectAll(n),map$4(exitAsVoid),getOrElse(()=>exitVoid$1)))):isParallel(this.strategy)?pipe(forEachParUnbounded(t,n=>exit(n(e)),!1),flatMap$1(n=>pipe(exitCollectAll(n,{parallel:!0}),map$4(exitAsVoid),getOrElse(()=>exitVoid$1)))):pipe(forEachParN(t,this.strategy.parallelism,n=>exit(n(e)),!1),flatMap$1(n=>pipe(exitCollectAll(n,{parallel:!0}),map$4(exitAsVoid),getOrElse(()=>exitVoid$1))))})},addFinalizer(e){return suspend$1(()=>this.state._tag==="Closed"?e(this.state.exit):(this.state.finalizers.set({},e),void_$1))}},scopeUnsafeMake=(e=sequential$1)=>{const t=Object.create(ScopeImplProto);return t.strategy=e,t.state={_tag:"Open",finalizers:new Map},t},scopeMake=(e=sequential$1)=>sync(()=>scopeUnsafeMake(e)),scopeExtend=dual(2,(e,t)=>mapInputContext(e,merge$3(make$k(scopeTag,t)))),fiberRefUnsafeMakeSupervisor=e=>fiberRefUnsafeMakePatch(e,{differ,fork:empty}),currentRuntimeFlags=fiberRefUnsafeMakeRuntimeFlags(none$1),currentSupervisor=fiberRefUnsafeMakeSupervisor(none),ensuring=dual(2,(e,t)=>uninterruptibleMask$1(n=>matchCauseEffect$1(n(e),{onFailure:r=>matchCauseEffect$1(t,{onFailure:s=>failCause$1(sequential$2(r,s)),onSuccess:()=>failCause$1(r)}),onSuccess:r=>as(t,r)}))),invokeWithInterrupt=(e,t,n)=>fiberIdWith(r=>flatMap$1(flatMap$1(forkDaemon(interruptible$1(e)),s=>async_(o=>{const i=t.map(u=>u.listeners.count),a=()=>{i.every(u=>u===0)&&t.every(u=>u.result.state.current._tag==="Pending"?!0:!!(u.result.state.current._tag==="Done"&&exitIsExit(u.result.state.current.effect)&&u.result.state.current.effect._tag==="Failure"&&isInterrupted(u.result.state.current.effect.cause)))&&(l.forEach(u=>u()),n?.(),o(interruptFiber(s)))};s.addObserver(u=>{l.forEach(f=>f()),o(u)});const l=t.map((u,f)=>{const d=m=>{i[f]=m,a()};return u.listeners.addObserver(d),()=>u.listeners.removeObserver(d)});return a(),sync(()=>{l.forEach(u=>u())})})),()=>suspend$1(()=>{const s=t.flatMap(o=>o.state.completed?[]:[o]);return forEachSequentialDiscard(s,o=>complete(o.request,exitInterrupt$1(r)))}))),close=scopeClose,fork=scopeFork;class Semaphore{permits;waiters=new Set;taken=0;constructor(t){this.permits=t}get free(){return this.permits-this.taken}take=t=>asyncInterrupt(n=>{if(this.free<t){const r=()=>{this.free<t||(this.waiters.delete(r),this.taken+=t,n(succeed$1(t)))};return this.waiters.add(r),sync(()=>{this.waiters.delete(r)})}return this.taken+=t,n(succeed$1(t))});updateTaken=t=>withFiberRuntime(n=>(this.taken=t(this.taken),this.waiters.size>0&&n.getFiberRef(currentScheduler).scheduleTask(()=>{const r=this.waiters.values();let s=r.next();for(;s.done===!1&&this.free>0;)s.value(),s=r.next()},n.getFiberRef(currentSchedulingPriority)),succeed$1(this.free)));release=t=>this.updateTaken(n=>n-t);releaseAll=this.updateTaken(t=>0);withPermits=t=>n=>uninterruptibleMask$1(r=>flatMap$1(r(this.take(t)),s=>ensuring(r(n),this.release(s))));withPermitsIfAvailable=t=>n=>uninterruptibleMask$1(r=>suspend$1(()=>this.free<t?succeedNone:(this.taken+=t,ensuring(r(asSome(n)),this.release(t)))))}const unsafeMakeSemaphore=e=>new Semaphore(e),SynchronizedSymbolKey="effect/Ref/SynchronizedRef",SynchronizedTypeId=Symbol.for(SynchronizedSymbolKey),synchronizedVariance={_A:e=>e};class SynchronizedImpl extends Class{ref;withLock;[SynchronizedTypeId]=synchronizedVariance;[RefTypeId]=refVariance;[TypeId$2]=TypeId$2;constructor(t,n){super(),this.ref=t,this.withLock=n,this.get=get(this.ref)}get;commit(){return this.get}modify(t){return this.modifyEffect(n=>succeed$1(t(n)))}modifyEffect(t){return this.withLock(pipe(flatMap$1(get(this.ref),t),flatMap$1(([n,r])=>as(set(this.ref,r),n))))}}const makeSynchronized=e=>sync(()=>unsafeMakeSynchronized(e)),unsafeMakeSynchronized=e=>{const t=unsafeMake$2(e),n=unsafeMakeSemaphore(1);return new SynchronizedImpl(t,n.withPermits(1))},TypeId=Symbol.for("effect/ManagedRuntime"),OP_FRESH="Fresh",OP_SUSPEND="Suspend",OP_ZIP_WITH="ZipWith",makeDual=e=>function(){if(arguments.length===1){const t=arguments[0];return(n,...r)=>e(t,n,...r)}return e.apply(this,arguments)},unsafeFork=makeDual((e,t,n)=>{const r=unsafeMake$4(),s=[[currentContext,[[r,e.context]]]];n?.scheduler&&s.push([currentScheduler,[[r,n.scheduler]]]);let o=updateManyAs(e.fiberRefs,{entries:s,forkAs:r});n?.updateRefs&&(o=n.updateRefs(o,r));const i=new FiberRuntime(r,o,e.runtimeFlags);let a=t;n?.scope&&(a=flatMap$1(fork(n.scope,sequential$1),u=>zipRight(scopeAddFinalizer(u,fiberIdWith(f=>equals$1(f,i.id())?void_$1:interruptAsFiber(i,f))),onExit$1(t,f=>close(u,f)))));const l=i.currentSupervisor;return l!==none&&(l.onStart(e.context,a,none$4(),i),i.addObserver(u=>l.onEnd(u,i))),globalScope.add(e.runtimeFlags,i),n?.immediate===!1?i.resume(a):i.start(a),i}),FiberFailureId=Symbol.for("effect/Runtime/FiberFailure"),FiberFailureCauseId=Symbol.for("effect/Runtime/FiberFailure/Cause");class FiberFailureImpl extends Error{[FiberFailureId];[FiberFailureCauseId];constructor(t){const n=prettyErrors(t)[0];super(n?.message||"An error has occurred"),this[FiberFailureId]=FiberFailureId,this[FiberFailureCauseId]=t,this.name=n?`(FiberFailure) ${n.name}`:"FiberFailure",n?.stack&&(this.stack=n.stack)}toJSON(){return{_id:"FiberFailure",cause:this[FiberFailureCauseId].toJSON()}}toString(){return"(FiberFailure) "+pretty(this[FiberFailureCauseId],{renderErrorCause:!0})}[NodeInspectSymbol](){return this.toString()}}const fiberFailure=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new FiberFailureImpl(e);return Error.stackTraceLimit=t,n},fastPath=e=>{const t=e;switch(t._op){case"Failure":case"Success":return t;case"Left":return exitFail(t.left);case"Right":return exitSucceed$1(t.right);case"Some":return exitSucceed$1(t.value);case"None":return exitFail(NoSuchElementException())}},unsafeRunPromise=makeDual((e,t,n)=>unsafeRunPromiseExit(e,t,n).then(r=>{switch(r._tag){case OP_SUCCESS:return r.effect_instruction_i0;case OP_FAILURE:throw fiberFailure(r.effect_instruction_i0)}})),unsafeRunPromiseExit=makeDual((e,t,n)=>new Promise(r=>{const s=fastPath(t);s&&r(s);const o=unsafeFork(e)(t);o.addObserver(i=>{r(i)}),n?.signal!==void 0&&(n.signal.aborted?o.unsafeInterruptAsFork(o.id()):n.signal.addEventListener("abort",()=>{o.unsafeInterruptAsFork(o.id())},{once:!0}))}));class RuntimeImpl{context;runtimeFlags;fiberRefs;constructor(t,n,r){this.context=t,this.runtimeFlags=n,this.fiberRefs=r}pipe(){return pipeArguments(this,arguments)}}const make=e=>new RuntimeImpl(e.context,e.runtimeFlags,e.fiberRefs),defaultRuntimeFlags=make$b(Interruption,CooperativeYielding,RuntimeMetrics),defaultRuntime=make({context:empty$h(),runtimeFlags:defaultRuntimeFlags,fiberRefs:empty$2()}),unsafeRunPromiseEffect=unsafeRunPromise(defaultRuntime),modifyEffect=dual(2,(e,t)=>e.modifyEffect(t)),LayerSymbolKey="effect/Layer",LayerTypeId=Symbol.for(LayerSymbolKey),layerVariance={_RIn:e=>e,_E:e=>e,_ROut:e=>e},proto={[LayerTypeId]:layerVariance,pipe(){return pipeArguments(this,arguments)}},MemoMapTypeIdKey="effect/Layer/MemoMap",MemoMapTypeId=Symbol.for(MemoMapTypeIdKey),CurrentMemoMap=Reference()("effect/Layer/CurrentMemoMap",{defaultValue:()=>unsafeMakeMemoMap()}),isLayer=e=>hasProperty(e,LayerTypeId),isFresh=e=>e._op_layer===OP_FRESH;class MemoMapImpl{ref;[MemoMapTypeId];constructor(t){this.ref=t,this[MemoMapTypeId]=MemoMapTypeId}getOrElseMemoize(t,n){return pipe(modifyEffect(this.ref,r=>{const s=r.get(t);if(s!==void 0){const[o,i]=s,a=pipe(o,flatMap$1(([l,u])=>pipe(patchFiberRefs(l),as(u))),onExit$1(exitMatch({onFailure:()=>void_$1,onSuccess:()=>scopeAddFinalizerExit(n,i)})));return succeed$1([a,r])}return pipe(make$6(0),flatMap$1(o=>pipe(deferredMake(),flatMap$1(i=>pipe(make$6(()=>void_$1),map(a=>{const l=uninterruptibleMask$1(f=>pipe(scopeMake(),flatMap$1(d=>pipe(f(flatMap$1(makeBuilder(t,d,!0),m=>diffFiberRefs(m(this)))),exit,flatMap$1(m=>{switch(m._tag){case OP_FAILURE:return pipe(deferredFailCause(i,m.effect_instruction_i0),zipRight(scopeClose(d,m)),zipRight(failCause$1(m.effect_instruction_i0)));case OP_SUCCESS:return pipe(set(a,g=>pipe(scopeClose(d,g),whenEffect(modify(o,b=>[b===1,b-1])),asVoid)),zipRight(update$1(o,g=>g+1)),zipRight(scopeAddFinalizerExit(n,g=>pipe(sync(()=>r.delete(t)),zipRight(get(a)),flatMap$1(b=>b(g))))),zipRight(deferredSucceed(i,m.effect_instruction_i0)),as(m.effect_instruction_i0[1]))}}))))),u=[pipe(deferredAwait(i),onExit$1(exitMatchEffect({onFailure:()=>void_$1,onSuccess:()=>update$1(o,f=>f+1)}))),f=>pipe(get(a),flatMap$1(d=>d(f)))];return[l,isFresh(t)?r:r.set(t,u)]}))))))}),flatten)}}const makeMemoMap=suspend$1(()=>map(makeSynchronized(new Map),e=>new MemoMapImpl(e))),unsafeMakeMemoMap=()=>new MemoMapImpl(unsafeMakeSynchronized(new Map)),buildWithScope=dual(2,(e,t)=>flatMap$1(makeMemoMap,n=>buildWithMemoMap(e,n,t))),buildWithMemoMap=dual(3,(e,t,n)=>flatMap$1(makeBuilder(e,n),r=>provideService$1(r(t),CurrentMemoMap,t))),makeBuilder=(e,t,n=!1)=>{const r=e;switch(r._op_layer){case"Locally":return sync(()=>s=>r.f(s.getOrElseMemoize(r.self,t)));case"ExtendScope":return sync(()=>s=>scopeWith(o=>s.getOrElseMemoize(r.layer,o)));case"Fold":return sync(()=>s=>pipe(s.getOrElseMemoize(r.layer,t),matchCauseEffect$1({onFailure:o=>s.getOrElseMemoize(r.failureK(o),t),onSuccess:o=>s.getOrElseMemoize(r.successK(o),t)})));case"Fresh":return sync(()=>s=>pipe(r.layer,buildWithScope(t)));case"FromEffect":return sync(n?()=>s=>r.effect:()=>s=>s.getOrElseMemoize(e,t));case"Provide":return sync(()=>s=>pipe(s.getOrElseMemoize(r.first,t),flatMap$1(o=>pipe(s.getOrElseMemoize(r.second,t),provideContext$1(o)))));case"Scoped":return sync(n?()=>s=>scopeExtend(r.effect,t):()=>s=>s.getOrElseMemoize(e,t));case"Suspend":return sync(()=>s=>s.getOrElseMemoize(r.evaluate(),t));case"ProvideMerge":return sync(()=>s=>pipe(s.getOrElseMemoize(r.first,t),zipWith$1(s.getOrElseMemoize(r.second,t),r.zipK)));case"ZipWith":return sync(()=>s=>pipe(s.getOrElseMemoize(r.first,t),zipWithOptions(s.getOrElseMemoize(r.second,t),r.zipK,{concurrent:!0})))}},merge$1=dual(2,(e,t)=>zipWith(e,t,(n,r)=>merge$3(n,r))),mergeAll=(...e)=>{let t=e[0];for(let n=1;n<e.length;n++)t=merge$1(t,e[n]);return t},suspend=e=>{const t=Object.create(proto);return t._op_layer=OP_SUSPEND,t.evaluate=e,t},zipWith=dual(3,(e,t,n)=>suspend(()=>{const r=Object.create(proto);return r._op_layer=OP_ZIP_WITH,r.first=e,r.second=t,r.zipK=n,r})),provideSomeLayer=dual(2,(e,t)=>scopedWith(n=>flatMap$1(buildWithScope(t,n),r=>provideSomeContext(e,r)))),provideSomeRuntime=dual(2,(e,t)=>{const n=diff$1(defaultRuntime.fiberRefs,t.fiberRefs),r=diff$3(defaultRuntime.runtimeFlags,t.runtimeFlags);return uninterruptibleMask$1(s=>withFiberRuntime(o=>{const i=o.getFiberRef(currentContext),a=o.getFiberRefs(),l=patch$1(o.id(),a)(n),u=o.currentRuntimeFlags,f=patch$4(r)(u),d=diff$1(l,a),m=diff$3(f,u);return o.setFiberRefs(l),o.currentRuntimeFlags=f,ensuring(provideSomeContext(s(e),merge$3(i,t.context)),withFiberRuntime(g=>(g.setFiberRefs(patch$1(g.id(),g.getFiberRefs())(d)),g.currentRuntimeFlags=patch$4(m)(g.currentRuntimeFlags),void_$1)))}))}),effect_provide=dual(2,(e,t)=>Array.isArray(t)?provideSomeLayer(e,mergeAll(...t)):isLayer(t)?provideSomeLayer(e,t):isContext(t)?provideSomeContext(e,t):TypeId in t?flatMap$1(t.runtimeEffect,n=>provideSomeRuntime(e,n)):provideSomeRuntime(e,t)),forEach=forEach$1,gen=gen$1,tryPromise=tryPromise$1,provide$1=effect_provide,provideService=provideService$1,runPromise=unsafeRunPromiseEffect;/**
23
+ * @vue/shared v3.5.18
24
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
25
+ * @license MIT
26
+ **//*! #__NO_SIDE_EFFECTS__ */function makeMap(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),isModelListener=e=>e.startsWith("onUpdate:"),extend=Object.assign,remove=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},hasOwnProperty$9=Object.prototype.hasOwnProperty,hasOwn=(e,t)=>hasOwnProperty$9.call(e,t),isArray$2=Array.isArray,isMap=e=>toTypeString(e)==="[object Map]",isSet=e=>toTypeString(e)==="[object Set]",isFunction$1=e=>typeof e=="function",isString=e=>typeof e=="string",isSymbol$1=e=>typeof e=="symbol",isObject$1=e=>e!==null&&typeof e=="object",isPromise=e=>(isObject$1(e)||isFunction$1(e))&&isFunction$1(e.then)&&isFunction$1(e.catch),objectToString$1=Object.prototype.toString,toTypeString=e=>objectToString$1.call(e),toRawType=e=>toTypeString(e).slice(8,-1),isPlainObject$1=e=>toTypeString(e)==="[object Object]",isIntegerKey=e=>isString(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(e=>e.replace(camelizeRE,(t,n)=>n?n.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(e=>e.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(e=>e.charAt(0).toUpperCase()+e.slice(1)),toHandlerKey=cacheStringFunction(e=>e?`on${capitalize(e)}`:""),hasChanged=(e,t)=>!Object.is(e,t),invokeArrayFns=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},def=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},looseToNumber=e=>{const t=parseFloat(e);return isNaN(t)?e:t},toNumber=e=>{const t=isString(e)?Number(e):NaN;return isNaN(t)?e:t};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function normalizeStyle(e){if(isArray$2(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=isString(r)?parseStringStyle(r):normalizeStyle(r);if(s)for(const o in s)t[o]=s[o]}return t}else if(isString(e)||isObject$1(e))return e}const listDelimiterRE=/;(?![^(]*\))/g,propertyDelimiterRE=/:([^]+)/,styleCommentRE=/\/\*[^]*?\*\//g;function parseStringStyle(e){const t={};return e.replace(styleCommentRE,"").split(listDelimiterRE).forEach(n=>{if(n){const r=n.split(propertyDelimiterRE);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function normalizeClass(e){let t="";if(isString(e))t=e;else if(isArray$2(e))for(let n=0;n<e.length;n++){const r=normalizeClass(e[n]);r&&(t+=r+" ")}else if(isObject$1(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const specialBooleanAttrs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",isSpecialBooleanAttr=makeMap(specialBooleanAttrs);function includeBooleanAttr(e){return!!e||e===""}/**
27
+ * @vue/reactivity v3.5.18
28
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
29
+ * @license MIT
30
+ **/let activeEffectScope;class EffectScope{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=activeEffectScope,!t&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=activeEffectScope;try{return activeEffectScope=this,t()}finally{activeEffectScope=n}}}on(){++this._on===1&&(this.prevScope=activeEffectScope,activeEffectScope=this)}off(){this._on>0&&--this._on===0&&(activeEffectScope=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function getCurrentScope(){return activeEffectScope}let activeSub;const pausedQueueEffects=new WeakSet;class ReactiveEffect{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,activeEffectScope&&activeEffectScope.active&&activeEffectScope.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,pausedQueueEffects.has(this)&&(pausedQueueEffects.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||batch(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,cleanupEffect(this),prepareDeps(this);const t=activeSub,n=shouldTrack;activeSub=this,shouldTrack=!0;try{return this.fn()}finally{cleanupDeps(this),activeSub=t,shouldTrack=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)removeSub(t);this.deps=this.depsTail=void 0,cleanupEffect(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?pausedQueueEffects.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){isDirty(this)&&this.run()}get dirty(){return isDirty(this)}}let batchDepth=0,batchedSub,batchedComputed;function batch(e,t=!1){if(e.flags|=8,t){e.next=batchedComputed,batchedComputed=e;return}e.next=batchedSub,batchedSub=e}function startBatch(){batchDepth++}function endBatch(){if(--batchDepth>0)return;if(batchedComputed){let t=batchedComputed;for(batchedComputed=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;batchedSub;){let t=batchedSub;for(batchedSub=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function prepareDeps(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function cleanupDeps(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),removeSub(r),removeDep(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function isDirty(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(refreshComputed(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function refreshComputed(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===globalVersion)||(e.globalVersion=globalVersion,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!isDirty(e))))return;e.flags|=2;const t=e.dep,n=activeSub,r=shouldTrack;activeSub=e,shouldTrack=!0;try{prepareDeps(e);const s=e.fn(e._value);(t.version===0||hasChanged(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{activeSub=n,shouldTrack=r,cleanupDeps(e),e.flags&=-3}}function removeSub(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)removeSub(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function removeDep(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let shouldTrack=!0;const trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){const e=trackStack.pop();shouldTrack=e===void 0?!0:e}function cleanupEffect(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=activeSub;activeSub=void 0;try{t()}finally{activeSub=n}}}let globalVersion=0;class Link{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Dep{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!activeSub||!shouldTrack||activeSub===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==activeSub)n=this.activeLink=new Link(activeSub,this),activeSub.deps?(n.prevDep=activeSub.depsTail,activeSub.depsTail.nextDep=n,activeSub.depsTail=n):activeSub.deps=activeSub.depsTail=n,addSub(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=activeSub.depsTail,n.nextDep=void 0,activeSub.depsTail.nextDep=n,activeSub.depsTail=n,activeSub.deps===n&&(activeSub.deps=r)}return n}trigger(t){this.version++,globalVersion++,this.notify(t)}notify(t){startBatch();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{endBatch()}}}function addSub(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)addSub(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const targetMap=new WeakMap,ITERATE_KEY=Symbol(""),MAP_KEY_ITERATE_KEY=Symbol(""),ARRAY_ITERATE_KEY=Symbol("");function track(e,t,n){if(shouldTrack&&activeSub){let r=targetMap.get(e);r||targetMap.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new Dep),s.map=r,s.key=n),s.track()}}function trigger(e,t,n,r,s,o){const i=targetMap.get(e);if(!i){globalVersion++;return}const a=l=>{l&&l.trigger()};if(startBatch(),t==="clear")i.forEach(a);else{const l=isArray$2(e),u=l&&isIntegerKey(n);if(l&&n==="length"){const f=Number(r);i.forEach((d,m)=>{(m==="length"||m===ARRAY_ITERATE_KEY||!isSymbol$1(m)&&m>=f)&&a(d)})}else switch((n!==void 0||i.has(void 0))&&a(i.get(n)),u&&a(i.get(ARRAY_ITERATE_KEY)),t){case"add":l?u&&a(i.get("length")):(a(i.get(ITERATE_KEY)),isMap(e)&&a(i.get(MAP_KEY_ITERATE_KEY)));break;case"delete":l||(a(i.get(ITERATE_KEY)),isMap(e)&&a(i.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(e)&&a(i.get(ITERATE_KEY));break}}endBatch()}function getDepFromReactive(e,t){const n=targetMap.get(e);return n&&n.get(t)}function reactiveReadArray(e){const t=toRaw(e);return t===e?t:(track(t,"iterate",ARRAY_ITERATE_KEY),isShallow(e)?t:t.map(toReactive))}function shallowReadArray(e){return track(e=toRaw(e),"iterate",ARRAY_ITERATE_KEY),e}const arrayInstrumentations={__proto__:null,[Symbol.iterator](){return iterator(this,Symbol.iterator,toReactive)},concat(...e){return reactiveReadArray(this).concat(...e.map(t=>isArray$2(t)?reactiveReadArray(t):t))},entries(){return iterator(this,"entries",e=>(e[1]=toReactive(e[1]),e))},every(e,t){return apply$1(this,"every",e,t,void 0,arguments)},filter(e,t){return apply$1(this,"filter",e,t,n=>n.map(toReactive),arguments)},find(e,t){return apply$1(this,"find",e,t,toReactive,arguments)},findIndex(e,t){return apply$1(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return apply$1(this,"findLast",e,t,toReactive,arguments)},findLastIndex(e,t){return apply$1(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return apply$1(this,"forEach",e,t,void 0,arguments)},includes(...e){return searchProxy(this,"includes",e)},indexOf(...e){return searchProxy(this,"indexOf",e)},join(e){return reactiveReadArray(this).join(e)},lastIndexOf(...e){return searchProxy(this,"lastIndexOf",e)},map(e,t){return apply$1(this,"map",e,t,void 0,arguments)},pop(){return noTracking(this,"pop")},push(...e){return noTracking(this,"push",e)},reduce(e,...t){return reduce(this,"reduce",e,t)},reduceRight(e,...t){return reduce(this,"reduceRight",e,t)},shift(){return noTracking(this,"shift")},some(e,t){return apply$1(this,"some",e,t,void 0,arguments)},splice(...e){return noTracking(this,"splice",e)},toReversed(){return reactiveReadArray(this).toReversed()},toSorted(e){return reactiveReadArray(this).toSorted(e)},toSpliced(...e){return reactiveReadArray(this).toSpliced(...e)},unshift(...e){return noTracking(this,"unshift",e)},values(){return iterator(this,"values",toReactive)}};function iterator(e,t,n){const r=shallowReadArray(e),s=r[t]();return r!==e&&!isShallow(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.value&&(o.value=n(o.value)),o}),s}const arrayProto$1=Array.prototype;function apply$1(e,t,n,r,s,o){const i=shallowReadArray(e),a=i!==e&&!isShallow(e),l=i[t];if(l!==arrayProto$1[t]){const d=l.apply(e,o);return a?toReactive(d):d}let u=n;i!==e&&(a?u=function(d,m){return n.call(this,toReactive(d),m,e)}:n.length>2&&(u=function(d,m){return n.call(this,d,m,e)}));const f=l.call(i,u,r);return a&&s?s(f):f}function reduce(e,t,n,r){const s=shallowReadArray(e);let o=n;return s!==e&&(isShallow(e)?n.length>3&&(o=function(i,a,l){return n.call(this,i,a,l,e)}):o=function(i,a,l){return n.call(this,i,toReactive(a),l,e)}),s[t](o,...r)}function searchProxy(e,t,n){const r=toRaw(e);track(r,"iterate",ARRAY_ITERATE_KEY);const s=r[t](...n);return(s===-1||s===!1)&&isProxy(n[0])?(n[0]=toRaw(n[0]),r[t](...n)):s}function noTracking(e,t,n=[]){pauseTracking(),startBatch();const r=toRaw(e)[t].apply(e,n);return endBatch(),resetTracking(),r}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(isSymbol$1));function hasOwnProperty$8(e){isSymbol$1(e)||(e=String(e));const t=toRaw(this);return track(t,"has",e),t.hasOwnProperty(e)}class BaseReactiveHandler{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?shallowReadonlyMap:readonlyMap:o?shallowReactiveMap:reactiveMap).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=isArray$2(t);if(!s){let l;if(i&&(l=arrayInstrumentations[n]))return l;if(n==="hasOwnProperty")return hasOwnProperty$8}const a=Reflect.get(t,n,isRef(t)?t:r);return(isSymbol$1(n)?builtInSymbols.has(n):isNonTrackableKeys(n))||(s||track(t,"get",n),o)?a:isRef(a)?i&&isIntegerKey(n)?a:a.value:isObject$1(a)?s?readonly(a):reactive(a):a}}class MutableReactiveHandler extends BaseReactiveHandler{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];if(!this._isShallow){const l=isReadonly(o);if(!isShallow(r)&&!isReadonly(r)&&(o=toRaw(o),r=toRaw(r)),!isArray$2(t)&&isRef(o)&&!isRef(r))return l?!1:(o.value=r,!0)}const i=isArray$2(t)&&isIntegerKey(n)?Number(n)<t.length:hasOwn(t,n),a=Reflect.set(t,n,r,isRef(t)?t:s);return t===toRaw(s)&&(i?hasChanged(r,o)&&trigger(t,"set",n,r):trigger(t,"add",n,r)),a}deleteProperty(t,n){const r=hasOwn(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&trigger(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!isSymbol$1(n)||!builtInSymbols.has(n))&&track(t,"has",n),r}ownKeys(t){return track(t,"iterate",isArray$2(t)?"length":ITERATE_KEY),Reflect.ownKeys(t)}}class ReadonlyReactiveHandler extends BaseReactiveHandler{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const mutableHandlers=new MutableReactiveHandler,readonlyHandlers=new ReadonlyReactiveHandler,shallowReactiveHandlers=new MutableReactiveHandler(!0),shallowReadonlyHandlers=new ReadonlyReactiveHandler(!0),toShallow=e=>e,getProto=e=>Reflect.getPrototypeOf(e);function createIterableMethod(e,t,n){return function(...r){const s=this.__v_raw,o=toRaw(s),i=isMap(o),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,u=s[e](...r),f=n?toShallow:t?toReadonly:toReactive;return!t&&track(o,"iterate",l?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:d,done:m}=u.next();return m?{value:d,done:m}:{value:a?[f(d[0]),f(d[1])]:f(d),done:m}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function createInstrumentations(e,t){const n={get(s){const o=this.__v_raw,i=toRaw(o),a=toRaw(s);e||(hasChanged(s,a)&&track(i,"get",s),track(i,"get",a));const{has:l}=getProto(i),u=t?toShallow:e?toReadonly:toReactive;if(l.call(i,s))return u(o.get(s));if(l.call(i,a))return u(o.get(a));o!==i&&o.get(s)},get size(){const s=this.__v_raw;return!e&&track(toRaw(s),"iterate",ITERATE_KEY),Reflect.get(s,"size",s)},has(s){const o=this.__v_raw,i=toRaw(o),a=toRaw(s);return e||(hasChanged(s,a)&&track(i,"has",s),track(i,"has",a)),s===a?o.has(s):o.has(s)||o.has(a)},forEach(s,o){const i=this,a=i.__v_raw,l=toRaw(a),u=t?toShallow:e?toReadonly:toReactive;return!e&&track(l,"iterate",ITERATE_KEY),a.forEach((f,d)=>s.call(o,u(f),u(d),i))}};return extend(n,e?{add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear")}:{add(s){!t&&!isShallow(s)&&!isReadonly(s)&&(s=toRaw(s));const o=toRaw(this);return getProto(o).has.call(o,s)||(o.add(s),trigger(o,"add",s,s)),this},set(s,o){!t&&!isShallow(o)&&!isReadonly(o)&&(o=toRaw(o));const i=toRaw(this),{has:a,get:l}=getProto(i);let u=a.call(i,s);u||(s=toRaw(s),u=a.call(i,s));const f=l.call(i,s);return i.set(s,o),u?hasChanged(o,f)&&trigger(i,"set",s,o):trigger(i,"add",s,o),this},delete(s){const o=toRaw(this),{has:i,get:a}=getProto(o);let l=i.call(o,s);l||(s=toRaw(s),l=i.call(o,s)),a&&a.call(o,s);const u=o.delete(s);return l&&trigger(o,"delete",s,void 0),u},clear(){const s=toRaw(this),o=s.size!==0,i=s.clear();return o&&trigger(s,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=createIterableMethod(s,e,t)}),n}function createInstrumentationGetter(e,t){const n=createInstrumentations(e,t);return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(hasOwn(n,s)&&s in r?n:r,s,o)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},shallowReadonlyCollectionHandlers={get:createInstrumentationGetter(!0,!0)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(e){return e.__v_skip||!Object.isExtensible(e)?0:targetTypeMap(toRawType(e))}function reactive(e){return isReadonly(e)?e:createReactiveObject(e,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(e){return createReactiveObject(e,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(e){return createReactiveObject(e,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function shallowReadonly(e){return createReactiveObject(e,!0,shallowReadonlyHandlers,shallowReadonlyCollectionHandlers,shallowReadonlyMap)}function createReactiveObject(e,t,n,r,s){if(!isObject$1(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=getTargetType(e);if(o===0)return e;const i=s.get(e);if(i)return i;const a=new Proxy(e,o===2?r:n);return s.set(e,a),a}function isReactive(e){return isReadonly(e)?isReactive(e.__v_raw):!!(e&&e.__v_isReactive)}function isReadonly(e){return!!(e&&e.__v_isReadonly)}function isShallow(e){return!!(e&&e.__v_isShallow)}function isProxy(e){return e?!!e.__v_raw:!1}function toRaw(e){const t=e&&e.__v_raw;return t?toRaw(t):e}function markRaw(e){return!hasOwn(e,"__v_skip")&&Object.isExtensible(e)&&def(e,"__v_skip",!0),e}const toReactive=e=>isObject$1(e)?reactive(e):e,toReadonly=e=>isObject$1(e)?readonly(e):e;function isRef(e){return e?e.__v_isRef===!0:!1}function ref(e){return createRef(e,!1)}function shallowRef(e){return createRef(e,!0)}function createRef(e,t){return isRef(e)?e:new RefImpl(e,t)}class RefImpl{constructor(t,n){this.dep=new Dep,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:toRaw(t),this._value=n?t:toReactive(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||isShallow(t)||isReadonly(t);t=r?t:toRaw(t),hasChanged(t,n)&&(this._rawValue=t,this._value=r?t:toReactive(t),this.dep.trigger())}}function unref(e){return isRef(e)?e.value:e}const shallowUnwrapHandlers={get:(e,t,n)=>t==="__v_raw"?e:unref(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return isRef(s)&&!isRef(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function proxyRefs(e){return isReactive(e)?e:new Proxy(e,shallowUnwrapHandlers)}class CustomRefImpl{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Dep,{get:r,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function customRef(e){return new CustomRefImpl(e)}class ObjectRefImpl{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return getDepFromReactive(toRaw(this._object),this._key)}}class GetterRefImpl{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function toRef(e,t,n){return isRef(e)?e:isFunction$1(e)?new GetterRefImpl(e):isObject$1(e)&&arguments.length>1?propertyToRef(e,t,n):ref(e)}function propertyToRef(e,t,n){const r=e[t];return isRef(r)?r:new ObjectRefImpl(e,t,n)}class ComputedRefImpl{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Dep(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=globalVersion-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&activeSub!==this)return batch(this,!0),!0}get value(){const t=this.dep.track();return refreshComputed(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function computed$1(e,t,n=!1){let r,s;return isFunction$1(e)?r=e:(r=e.get,s=e.set),new ComputedRefImpl(r,s,n)}const INITIAL_WATCHER_VALUE={},cleanupMap=new WeakMap;let activeWatcher;function onWatcherCleanup(e,t=!1,n=activeWatcher){if(n){let r=cleanupMap.get(n);r||cleanupMap.set(n,r=[]),r.push(e)}}function watch$1(e,t,n=EMPTY_OBJ){const{immediate:r,deep:s,once:o,scheduler:i,augmentJob:a,call:l}=n,u=A=>s?A:isShallow(A)||s===!1||s===0?traverse(A,1):traverse(A);let f,d,m,g,b=!1,S=!1;if(isRef(e)?(d=()=>e.value,b=isShallow(e)):isReactive(e)?(d=()=>u(e),b=!0):isArray$2(e)?(S=!0,b=e.some(A=>isReactive(A)||isShallow(A)),d=()=>e.map(A=>{if(isRef(A))return A.value;if(isReactive(A))return u(A);if(isFunction$1(A))return l?l(A,2):A()})):isFunction$1(e)?t?d=l?()=>l(e,2):e:d=()=>{if(m){pauseTracking();try{m()}finally{resetTracking()}}const A=activeWatcher;activeWatcher=f;try{return l?l(e,3,[g]):e(g)}finally{activeWatcher=A}}:d=NOOP,t&&s){const A=d,K=s===!0?1/0:s;d=()=>traverse(A(),K)}const R=getCurrentScope(),T=()=>{f.stop(),R&&R.active&&remove(R.effects,f)};if(o&&t){const A=t;t=(...K)=>{A(...K),T()}}let O=S?new Array(e.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const w=A=>{if(!(!(f.flags&1)||!f.dirty&&!A))if(t){const K=f.run();if(s||b||(S?K.some((z,Y)=>hasChanged(z,O[Y])):hasChanged(K,O))){m&&m();const z=activeWatcher;activeWatcher=f;try{const Y=[K,O===INITIAL_WATCHER_VALUE?void 0:S&&O[0]===INITIAL_WATCHER_VALUE?[]:O,g];O=K,l?l(t,3,Y):t(...Y)}finally{activeWatcher=z}}}else f.run()};return a&&a(w),f=new ReactiveEffect(d),f.scheduler=i?()=>i(w,!1):w,g=A=>onWatcherCleanup(A,!1,f),m=f.onStop=()=>{const A=cleanupMap.get(f);if(A){if(l)l(A,4);else for(const K of A)K();cleanupMap.delete(f)}},t?r?w(!0):O=f.run():i?i(w.bind(null,!0),!0):f.run(),T.pause=f.pause.bind(f),T.resume=f.resume.bind(f),T.stop=T,T}function traverse(e,t=1/0,n){if(t<=0||!isObject$1(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,isRef(e))traverse(e.value,t,n);else if(isArray$2(e))for(let r=0;r<e.length;r++)traverse(e[r],t,n);else if(isSet(e)||isMap(e))e.forEach(r=>{traverse(r,t,n)});else if(isPlainObject$1(e)){for(const r in e)traverse(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&traverse(e[r],t,n)}return e}/**
31
+ * @vue/runtime-core v3.5.18
32
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
33
+ * @license MIT
34
+ **/const stack=[];let isWarning=!1;function warn$1(e,...t){if(isWarning)return;isWarning=!0,pauseTracking();const n=stack.length?stack[stack.length-1].component:null,r=n&&n.appContext.config.warnHandler,s=getComponentTrace();if(r)callWithErrorHandling(r,n,11,[e+t.map(o=>{var i,a;return(a=(i=o.toString)==null?void 0:i.call(o))!=null?a:JSON.stringify(o)}).join(""),n&&n.proxy,s.map(({vnode:o})=>`at <${formatComponentName(n,o.type)}>`).join(`
35
+ `),s]);else{const o=[`[Vue warn]: ${e}`,...t];s.length&&o.push(`
36
+ `,...formatTrace(s)),console.warn(...o)}resetTracking(),isWarning=!1}function getComponentTrace(){let e=stack[stack.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function formatTrace(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
37
+ `],...formatTraceEntry(n))}),t}function formatTraceEntry({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,s=` at <${formatComponentName(e.component,e.type,r)}`,o=">"+n;return e.props?[s,...formatProps(e.props),o]:[s+o]}function formatProps(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...formatProp(r,e[r]))}),n.length>3&&t.push(" ..."),t}function formatProp(e,t,n){return isString(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:isRef(t)?(t=formatProp(e,toRaw(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):isFunction$1(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=toRaw(t),n?t:[`${e}=`,t])}function callWithErrorHandling(e,t,n,r){try{return r?e(...r):e()}catch(s){handleError(s,t,n)}}function callWithAsyncErrorHandling(e,t,n,r){if(isFunction$1(e)){const s=callWithErrorHandling(e,t,n,r);return s&&isPromise(s)&&s.catch(o=>{handleError(o,t,n)}),s}if(isArray$2(e)){const s=[];for(let o=0;o<e.length;o++)s.push(callWithAsyncErrorHandling(e[o],t,n,r));return s}}function handleError(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||EMPTY_OBJ;if(t){let a=t.parent;const l=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const f=a.ec;if(f){for(let d=0;d<f.length;d++)if(f[d](e,l,u)===!1)return}a=a.parent}if(o){pauseTracking(),callWithErrorHandling(o,null,10,[e,l,u]),resetTracking();return}}logError(e,n,s,r,i)}function logError(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const queue=[];let flushIndex=-1;const pendingPostFlushCbs=[];let activePostFlushCbs=null,postFlushIndex=0;const resolvedPromise=Promise.resolve();let currentFlushPromise=null;function nextTick(e){const t=currentFlushPromise||resolvedPromise;return e?t.then(this?e.bind(this):e):t}function findInsertionIndex$1(e){let t=flushIndex+1,n=queue.length;for(;t<n;){const r=t+n>>>1,s=queue[r],o=getId(s);o<e||o===e&&s.flags&2?t=r+1:n=r}return t}function queueJob(e){if(!(e.flags&1)){const t=getId(e),n=queue[queue.length-1];!n||!(e.flags&2)&&t>=getId(n)?queue.push(e):queue.splice(findInsertionIndex$1(t),0,e),e.flags|=1,queueFlush()}}function queueFlush(){currentFlushPromise||(currentFlushPromise=resolvedPromise.then(flushJobs))}function queuePostFlushCb(e){isArray$2(e)?pendingPostFlushCbs.push(...e):activePostFlushCbs&&e.id===-1?activePostFlushCbs.splice(postFlushIndex+1,0,e):e.flags&1||(pendingPostFlushCbs.push(e),e.flags|=1),queueFlush()}function flushPreFlushCbs(e,t,n=flushIndex+1){for(;n<queue.length;n++){const r=queue[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;queue.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function flushPostFlushCbs(e){if(pendingPostFlushCbs.length){const t=[...new Set(pendingPostFlushCbs)].sort((n,r)=>getId(n)-getId(r));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...t);return}for(activePostFlushCbs=t,postFlushIndex=0;postFlushIndex<activePostFlushCbs.length;postFlushIndex++){const n=activePostFlushCbs[postFlushIndex];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}activePostFlushCbs=null,postFlushIndex=0}}const getId=e=>e.id==null?e.flags&2?-1:1/0:e.id;function flushJobs(e){try{for(flushIndex=0;flushIndex<queue.length;flushIndex++){const t=queue[flushIndex];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),callWithErrorHandling(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;flushIndex<queue.length;flushIndex++){const t=queue[flushIndex];t&&(t.flags&=-2)}flushIndex=-1,queue.length=0,flushPostFlushCbs(),currentFlushPromise=null,(queue.length||pendingPostFlushCbs.length)&&flushJobs()}}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(e){const t=currentRenderingInstance;return currentRenderingInstance=e,currentScopeId=e&&e.type.__scopeId||null,t}function withCtx(e,t=currentRenderingInstance,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&setBlockTracking(-1);const o=setCurrentRenderingInstance(t);let i;try{i=e(...s)}finally{setCurrentRenderingInstance(o),r._d&&setBlockTracking(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function withDirectives(e,t){if(currentRenderingInstance===null)return e;const n=getComponentPublicInstance(currentRenderingInstance),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[o,i,a,l=EMPTY_OBJ]=t[s];o&&(isFunction$1(o)&&(o={mounted:o,updated:o}),o.deep&&traverse(i),r.push({dir:o,instance:n,value:i,oldValue:void 0,arg:a,modifiers:l}))}return e}function invokeDirectiveHook(e,t,n,r){const s=e.dirs,o=t&&t.dirs;for(let i=0;i<s.length;i++){const a=s[i];o&&(a.oldValue=o[i].value);let l=a.dir[r];l&&(pauseTracking(),callWithAsyncErrorHandling(l,n,8,[e.el,a,e,t]),resetTracking())}}const TeleportEndKey=Symbol("_vte"),isTeleport=e=>e.__isTeleport,isTeleportDisabled=e=>e&&(e.disabled||e.disabled===""),isTeleportDeferred=e=>e&&(e.defer||e.defer===""),isTargetSVG=e=>typeof SVGElement<"u"&&e instanceof SVGElement,isTargetMathML=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,resolveTarget=(e,t)=>{const n=e&&e.to;return isString(n)?t?t(n):null:n},TeleportImpl={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,o,i,a,l,u){const{mc:f,pc:d,pbc:m,o:{insert:g,querySelector:b,createText:S,createComment:R}}=u,T=isTeleportDisabled(t.props);let{shapeFlag:O,children:w,dynamicChildren:A}=t;if(e==null){const K=t.el=S(""),z=t.anchor=S("");g(K,n,r),g(z,n,r);const Y=(N,U)=>{O&16&&(s&&s.isCE&&(s.ce._teleportTarget=N),f(w,N,U,s,o,i,a,l))},q=()=>{const N=t.target=resolveTarget(t.props,b),U=prepareAnchor(N,t,S,g);N&&(i!=="svg"&&isTargetSVG(N)?i="svg":i!=="mathml"&&isTargetMathML(N)&&(i="mathml"),T||(Y(N,U),updateCssVars(t,!1)))};T&&(Y(n,z),updateCssVars(t,!0)),isTeleportDeferred(t.props)?(t.el.__isMounted=!1,queuePostRenderEffect(()=>{q(),delete t.el.__isMounted},o)):q()}else{if(isTeleportDeferred(t.props)&&e.el.__isMounted===!1){queuePostRenderEffect(()=>{TeleportImpl.process(e,t,n,r,s,o,i,a,l,u)},o);return}t.el=e.el,t.targetStart=e.targetStart;const K=t.anchor=e.anchor,z=t.target=e.target,Y=t.targetAnchor=e.targetAnchor,q=isTeleportDisabled(e.props),N=q?n:z,U=q?K:Y;if(i==="svg"||isTargetSVG(z)?i="svg":(i==="mathml"||isTargetMathML(z))&&(i="mathml"),A?(m(e.dynamicChildren,A,N,s,o,i,a),traverseStaticChildren(e,t,!0)):l||d(e,t,N,U,s,o,i,a,!1),T)q?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):moveTeleport(t,n,K,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const W=t.target=resolveTarget(t.props,b);W&&moveTeleport(t,W,null,u,0)}else q&&moveTeleport(t,z,Y,u,1);updateCssVars(t,T)}},remove(e,t,n,{um:r,o:{remove:s}},o){const{shapeFlag:i,children:a,anchor:l,targetStart:u,targetAnchor:f,target:d,props:m}=e;if(d&&(s(u),s(f)),o&&s(l),i&16){const g=o||!isTeleportDisabled(m);for(let b=0;b<a.length;b++){const S=a[b];r(S,t,n,g,!!S.dynamicChildren)}}},move:moveTeleport,hydrate:hydrateTeleport};function moveTeleport(e,t,n,{o:{insert:r},m:s},o=2){o===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:l,children:u,props:f}=e,d=o===2;if(d&&r(i,t,n),(!d||isTeleportDisabled(f))&&l&16)for(let m=0;m<u.length;m++)s(u[m],t,n,2);d&&r(a,t,n)}function hydrateTeleport(e,t,n,r,s,o,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:u,createText:f}},d){const m=t.target=resolveTarget(t.props,l);if(m){const g=isTeleportDisabled(t.props),b=m._lpa||m.firstChild;if(t.shapeFlag&16)if(g)t.anchor=d(i(e),t,a(e),n,r,s,o),t.targetStart=b,t.targetAnchor=b&&i(b);else{t.anchor=i(e);let S=b;for(;S;){if(S&&S.nodeType===8){if(S.data==="teleport start anchor")t.targetStart=S;else if(S.data==="teleport anchor"){t.targetAnchor=S,m._lpa=t.targetAnchor&&i(t.targetAnchor);break}}S=i(S)}t.targetAnchor||prepareAnchor(m,t,f,u),d(b&&i(b),t,m,n,r,s,o)}updateCssVars(t,g)}return t.anchor&&i(t.anchor)}const Teleport=TeleportImpl;function updateCssVars(e,t){const n=e.ctx;if(n&&n.ut){let r,s;for(t?(r=e.el,s=e.anchor):(r=e.targetStart,s=e.targetAnchor);r&&r!==s;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function prepareAnchor(e,t,n,r){const s=t.targetStart=n(""),o=t.targetAnchor=n("");return s[TeleportEndKey]=o,e&&(r(s,e),r(o,e)),o}const leaveCbKey=Symbol("_leaveCb"),enterCbKey$1=Symbol("_enterCb");function useTransitionState(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return onMounted(()=>{e.isMounted=!0}),onBeforeUnmount(()=>{e.isUnmounting=!0}),e}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},recursiveGetSubtree=e=>{const t=e.subTree;return t.component?recursiveGetSubtree(t.component):t},BaseTransitionImpl={name:"BaseTransition",props:BaseTransitionPropsValidators,setup(e,{slots:t}){const n=getCurrentInstance(),r=useTransitionState();return()=>{const s=t.default&&getTransitionRawChildren(t.default(),!0);if(!s||!s.length)return;const o=findNonCommentChild(s),i=toRaw(e),{mode:a}=i;if(r.isLeaving)return emptyPlaceholder(o);const l=getInnerChild$1(o);if(!l)return emptyPlaceholder(o);let u=resolveTransitionHooks(l,i,r,n,d=>u=d);l.type!==Comment&&setTransitionHooks(l,u);let f=n.subTree&&getInnerChild$1(n.subTree);if(f&&f.type!==Comment&&!isSameVNodeType(l,f)&&recursiveGetSubtree(n).type!==Comment){let d=resolveTransitionHooks(f,i,r,n);if(setTransitionHooks(f,d),a==="out-in"&&l.type!==Comment)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,f=void 0},emptyPlaceholder(o);a==="in-out"&&l.type!==Comment?d.delayLeave=(m,g,b)=>{const S=getLeavingNodesForType(r,f);S[String(f.key)]=f,m[leaveCbKey]=()=>{g(),m[leaveCbKey]=void 0,delete u.delayedLeave,f=void 0},u.delayedLeave=()=>{b(),delete u.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return o}}};function findNonCommentChild(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Comment){t=n;break}}return t}const BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function resolveTransitionHooks(e,t,n,r,s){const{appear:o,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:f,onEnterCancelled:d,onBeforeLeave:m,onLeave:g,onAfterLeave:b,onLeaveCancelled:S,onBeforeAppear:R,onAppear:T,onAfterAppear:O,onAppearCancelled:w}=t,A=String(e.key),K=getLeavingNodesForType(n,e),z=(N,U)=>{N&&callWithAsyncErrorHandling(N,r,9,U)},Y=(N,U)=>{const W=U[1];z(N,U),isArray$2(N)?N.every(M=>M.length<=1)&&W():N.length<=1&&W()},q={mode:i,persisted:a,beforeEnter(N){let U=l;if(!n.isMounted)if(o)U=R||l;else return;N[leaveCbKey]&&N[leaveCbKey](!0);const W=K[A];W&&isSameVNodeType(e,W)&&W.el[leaveCbKey]&&W.el[leaveCbKey](),z(U,[N])},enter(N){let U=u,W=f,M=d;if(!n.isMounted)if(o)U=T||u,W=O||f,M=w||d;else return;let Q=!1;const ne=N[enterCbKey$1]=oe=>{Q||(Q=!0,oe?z(M,[N]):z(W,[N]),q.delayedLeave&&q.delayedLeave(),N[enterCbKey$1]=void 0)};U?Y(U,[N,ne]):ne()},leave(N,U){const W=String(e.key);if(N[enterCbKey$1]&&N[enterCbKey$1](!0),n.isUnmounting)return U();z(m,[N]);let M=!1;const Q=N[leaveCbKey]=ne=>{M||(M=!0,U(),ne?z(S,[N]):z(b,[N]),N[leaveCbKey]=void 0,K[W]===e&&delete K[W])};K[W]=e,g?Y(g,[N,Q]):Q()},clone(N){const U=resolveTransitionHooks(N,t,n,r,s);return s&&s(U),U}};return q}function emptyPlaceholder(e){if(isKeepAlive(e))return e=cloneVNode(e),e.children=null,e}function getInnerChild$1(e){if(!isKeepAlive(e))return isTeleport(e.type)&&e.children?findNonCommentChild(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&isFunction$1(n.default))return n.default()}}function setTransitionHooks(e,t){e.shapeFlag&6&&e.component?(e.transition=t,setTransitionHooks(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function getTransitionRawChildren(e,t=!1,n){let r=[],s=0;for(let o=0;o<e.length;o++){let i=e[o];const a=n==null?i.key:String(n)+String(i.key!=null?i.key:o);i.type===Fragment?(i.patchFlag&128&&s++,r=r.concat(getTransitionRawChildren(i.children,t,a))):(t||i.type!==Comment)&&r.push(a!=null?cloneVNode(i,{key:a}):i)}if(s>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function defineComponent(e,t){return isFunction$1(e)?extend({name:e.name},t,{setup:e}):e}function markAsyncBoundary(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function setRef(e,t,n,r,s=!1){if(isArray$2(e)){e.forEach((b,S)=>setRef(b,t&&(isArray$2(t)?t[S]:t),n,r,s));return}if(isAsyncWrapper(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&setRef(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?getComponentPublicInstance(r.component):r.el,i=s?null:o,{i:a,r:l}=e,u=t&&t.r,f=a.refs===EMPTY_OBJ?a.refs={}:a.refs,d=a.setupState,m=toRaw(d),g=d===EMPTY_OBJ?()=>!1:b=>hasOwn(m,b);if(u!=null&&u!==l&&(isString(u)?(f[u]=null,g(u)&&(d[u]=null)):isRef(u)&&(u.value=null)),isFunction$1(l))callWithErrorHandling(l,a,12,[i,f]);else{const b=isString(l),S=isRef(l);if(b||S){const R=()=>{if(e.f){const T=b?g(l)?d[l]:f[l]:l.value;s?isArray$2(T)&&remove(T,o):isArray$2(T)?T.includes(o)||T.push(o):b?(f[l]=[o],g(l)&&(d[l]=f[l])):(l.value=[o],e.k&&(f[e.k]=l.value))}else b?(f[l]=i,g(l)&&(d[l]=i)):S&&(l.value=i,e.k&&(f[e.k]=i))};i?(R.id=-1,queuePostRenderEffect(R,n)):R()}}}getGlobalThis().requestIdleCallback;getGlobalThis().cancelIdleCallback;const isAsyncWrapper=e=>!!e.type.__asyncLoader,isKeepAlive=e=>e.type.__isKeepAlive;function onActivated(e,t){registerKeepAliveHook(e,"a",t)}function onDeactivated(e,t){registerKeepAliveHook(e,"da",t)}function registerKeepAliveHook(e,t,n=currentInstance){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(injectHook(t,r,n),n){let s=n.parent;for(;s&&s.parent;)isKeepAlive(s.parent.vnode)&&injectToKeepAliveRoot(r,t,n,s),s=s.parent}}function injectToKeepAliveRoot(e,t,n,r){const s=injectHook(t,e,r,!0);onUnmounted(()=>{remove(r[t],s)},n)}function injectHook(e,t,n=currentInstance,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{pauseTracking();const a=setCurrentInstance(n),l=callWithAsyncErrorHandling(t,n,e,i);return a(),resetTracking(),l});return r?s.unshift(o):s.push(o),o}}const createHook=e=>(t,n=currentInstance)=>{(!isInSSRComponentSetup||e==="sp")&&injectHook(e,(...r)=>t(...r),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(e,t=currentInstance){injectHook("ec",e,t)}const COMPONENTS="components";function resolveComponent(e,t){return resolveAsset(COMPONENTS,e,!0,t)||e}const NULL_DYNAMIC_COMPONENT=Symbol.for("v-ndc");function resolveAsset(e,t,n=!0,r=!1){const s=currentRenderingInstance||currentInstance;if(s){const o=s.type;{const a=getComponentName(o,!1);if(a&&(a===t||a===camelize(t)||a===capitalize(camelize(t))))return o}const i=resolve(s[e]||o[e],t)||resolve(s.appContext[e],t);return!i&&r?o:i}}function resolve(e,t){return e&&(e[t]||e[camelize(t)]||e[capitalize(camelize(t))])}function renderSlot(e,t,n={},r,s){if(currentRenderingInstance.ce||currentRenderingInstance.parent&&isAsyncWrapper(currentRenderingInstance.parent)&&currentRenderingInstance.parent.ce)return openBlock(),createBlock(Fragment,null,[createVNode("slot",n,r)],64);let o=e[t];o&&o._c&&(o._d=!1),openBlock();const i=o&&ensureValidVNode(o(n)),a=n.key||i&&i.key,l=createBlock(Fragment,{key:(a&&!isSymbol$1(a)?a:`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function ensureValidVNode(e){return e.some(t=>isVNode(t)?!(t.type===Comment||t.type===Fragment&&!ensureValidVNode(t.children)):!0)?e:null}const getPublicInstance=e=>e?isStatefulComponent(e)?getComponentPublicInstance(e):getPublicInstance(e.parent):null,publicPropertiesMap=extend(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>getPublicInstance(e.parent),$root:e=>getPublicInstance(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>resolveMergedOptions(e),$forceUpdate:e=>e.f||(e.f=()=>{queueJob(e.update)}),$nextTick:e=>e.n||(e.n=nextTick.bind(e.proxy)),$watch:e=>instanceWatch.bind(e)}),hasSetupBinding=(e,t)=>e!==EMPTY_OBJ&&!e.__isScriptSetup&&hasOwn(e,t),PublicInstanceProxyHandlers={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:a,appContext:l}=e;let u;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(hasSetupBinding(r,t))return i[t]=1,r[t];if(s!==EMPTY_OBJ&&hasOwn(s,t))return i[t]=2,s[t];if((u=e.propsOptions[0])&&hasOwn(u,t))return i[t]=3,o[t];if(n!==EMPTY_OBJ&&hasOwn(n,t))return i[t]=4,n[t];shouldCacheAccess&&(i[t]=0)}}const f=publicPropertiesMap[t];let d,m;if(f)return t==="$attrs"&&track(e.attrs,"get",""),f(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==EMPTY_OBJ&&hasOwn(n,t))return i[t]=4,n[t];if(m=l.config.globalProperties,hasOwn(m,t))return m[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return hasSetupBinding(s,t)?(s[t]=n,!0):r!==EMPTY_OBJ&&hasOwn(r,t)?(r[t]=n,!0):hasOwn(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:o}},i){let a;return!!n[i]||e!==EMPTY_OBJ&&hasOwn(e,i)||hasSetupBinding(t,i)||(a=o[0])&&hasOwn(a,i)||hasOwn(r,i)||hasOwn(publicPropertiesMap,i)||hasOwn(s.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:hasOwn(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function normalizePropsOrEmits(e){return isArray$2(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let shouldCacheAccess=!0;function applyOptions(e){const t=resolveMergedOptions(e),n=e.proxy,r=e.ctx;shouldCacheAccess=!1,t.beforeCreate&&callHook$1(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:a,provide:l,inject:u,created:f,beforeMount:d,mounted:m,beforeUpdate:g,updated:b,activated:S,deactivated:R,beforeDestroy:T,beforeUnmount:O,destroyed:w,unmounted:A,render:K,renderTracked:z,renderTriggered:Y,errorCaptured:q,serverPrefetch:N,expose:U,inheritAttrs:W,components:M,directives:Q,filters:ne}=t;if(u&&resolveInjections(u,r,null),i)for(const J in i){const Z=i[J];isFunction$1(Z)&&(r[J]=Z.bind(n))}if(s){const J=s.call(n,n);isObject$1(J)&&(e.data=reactive(J))}if(shouldCacheAccess=!0,o)for(const J in o){const Z=o[J],ae=isFunction$1(Z)?Z.bind(n,n):isFunction$1(Z.get)?Z.get.bind(n,n):NOOP,pe=!isFunction$1(Z)&&isFunction$1(Z.set)?Z.set.bind(n):NOOP,ie=computed({get:ae,set:pe});Object.defineProperty(r,J,{enumerable:!0,configurable:!0,get:()=>ie.value,set:ce=>ie.value=ce})}if(a)for(const J in a)createWatcher(a[J],r,n,J);if(l){const J=isFunction$1(l)?l.call(n):l;Reflect.ownKeys(J).forEach(Z=>{provide(Z,J[Z])})}f&&callHook$1(f,e,"c");function X(J,Z){isArray$2(Z)?Z.forEach(ae=>J(ae.bind(n))):Z&&J(Z.bind(n))}if(X(onBeforeMount,d),X(onMounted,m),X(onBeforeUpdate,g),X(onUpdated,b),X(onActivated,S),X(onDeactivated,R),X(onErrorCaptured,q),X(onRenderTracked,z),X(onRenderTriggered,Y),X(onBeforeUnmount,O),X(onUnmounted,A),X(onServerPrefetch,N),isArray$2(U))if(U.length){const J=e.exposed||(e.exposed={});U.forEach(Z=>{Object.defineProperty(J,Z,{get:()=>n[Z],set:ae=>n[Z]=ae,enumerable:!0})})}else e.exposed||(e.exposed={});K&&e.render===NOOP&&(e.render=K),W!=null&&(e.inheritAttrs=W),M&&(e.components=M),Q&&(e.directives=Q),N&&markAsyncBoundary(e)}function resolveInjections(e,t,n=NOOP){isArray$2(e)&&(e=normalizeInject(e));for(const r in e){const s=e[r];let o;isObject$1(s)?"default"in s?o=inject(s.from||r,s.default,!0):o=inject(s.from||r):o=inject(s),isRef(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[r]=o}}function callHook$1(e,t,n){callWithAsyncErrorHandling(isArray$2(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function createWatcher(e,t,n,r){let s=r.includes(".")?createPathGetter(n,r):()=>n[r];if(isString(e)){const o=t[e];isFunction$1(o)&&watch(s,o)}else if(isFunction$1(e))watch(s,e.bind(n));else if(isObject$1(e))if(isArray$2(e))e.forEach(o=>createWatcher(o,t,n,r));else{const o=isFunction$1(e.handler)?e.handler.bind(n):t[e.handler];isFunction$1(o)&&watch(s,o,e)}}function resolveMergedOptions(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,a=o.get(t);let l;return a?l=a:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(u=>mergeOptions$1(l,u,i,!0)),mergeOptions$1(l,t,i)),isObject$1(t)&&o.set(t,l),l}function mergeOptions$1(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&mergeOptions$1(e,o,n,!0),s&&s.forEach(i=>mergeOptions$1(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const a=internalOptionMergeStrats[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(e,t){return t?e?function(){return extend(isFunction$1(e)?e.call(this,this):e,isFunction$1(t)?t.call(this,this):t)}:t:e}function mergeInject(e,t){return mergeObjectOptions(normalizeInject(e),normalizeInject(t))}function normalizeInject(e){if(isArray$2(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function mergeAsArray(e,t){return e?[...new Set([].concat(e,t))]:t}function mergeObjectOptions(e,t){return e?extend(Object.create(null),e,t):t}function mergeEmitsOrPropsOptions(e,t){return e?isArray$2(e)&&isArray$2(t)?[...new Set([...e,...t])]:extend(Object.create(null),normalizePropsOrEmits(e),normalizePropsOrEmits(t??{})):t}function mergeWatchOptions(e,t){if(!e)return t;if(!t)return e;const n=extend(Object.create(null),e);for(const r in t)n[r]=mergeAsArray(e[r],t[r]);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(e,t){return function(r,s=null){isFunction$1(r)||(r=extend({},r)),s!=null&&!isObject$1(s)&&(s=null);const o=createAppContext(),i=new WeakSet,a=[];let l=!1;const u=o.app={_uid:uid$1++,_component:r,_props:s,_container:null,_context:o,_instance:null,version:version$2,get config(){return o.config},set config(f){},use(f,...d){return i.has(f)||(f&&isFunction$1(f.install)?(i.add(f),f.install(u,...d)):isFunction$1(f)&&(i.add(f),f(u,...d))),u},mixin(f){return o.mixins.includes(f)||o.mixins.push(f),u},component(f,d){return d?(o.components[f]=d,u):o.components[f]},directive(f,d){return d?(o.directives[f]=d,u):o.directives[f]},mount(f,d,m){if(!l){const g=u._ceVNode||createVNode(r,s);return g.appContext=o,m===!0?m="svg":m===!1&&(m=void 0),e(g,f,m),l=!0,u._container=f,f.__vue_app__=u,getComponentPublicInstance(g.component)}},onUnmount(f){a.push(f)},unmount(){l&&(callWithAsyncErrorHandling(a,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(f,d){return o.provides[f]=d,u},runWithContext(f){const d=currentApp;currentApp=u;try{return f()}finally{currentApp=d}}};return u}}let currentApp=null;function provide(e,t){if(currentInstance){let n=currentInstance.provides;const r=currentInstance.parent&&currentInstance.parent.provides;r===n&&(n=currentInstance.provides=Object.create(r)),n[e]=t}}function inject(e,t,n=!1){const r=getCurrentInstance();if(r||currentApp){let s=currentApp?currentApp._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&isFunction$1(t)?t.call(r&&r.proxy):t}}const internalObjectProto={},createInternalObject=()=>Object.create(internalObjectProto),isInternalObject=e=>Object.getPrototypeOf(e)===internalObjectProto;function initProps(e,t,n,r=!1){const s={},o=createInternalObject();e.propsDefaults=Object.create(null),setFullProps(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:shallowReactive(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function updateProps(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,a=toRaw(s),[l]=e.propsOptions;let u=!1;if((r||i>0)&&!(i&16)){if(i&8){const f=e.vnode.dynamicProps;for(let d=0;d<f.length;d++){let m=f[d];if(isEmitListener(e.emitsOptions,m))continue;const g=t[m];if(l)if(hasOwn(o,m))g!==o[m]&&(o[m]=g,u=!0);else{const b=camelize(m);s[b]=resolvePropValue(l,a,b,g,e,!1)}else g!==o[m]&&(o[m]=g,u=!0)}}}else{setFullProps(e,t,s,o)&&(u=!0);let f;for(const d in a)(!t||!hasOwn(t,d)&&((f=hyphenate(d))===d||!hasOwn(t,f)))&&(l?n&&(n[d]!==void 0||n[f]!==void 0)&&(s[d]=resolvePropValue(l,a,d,void 0,e,!0)):delete s[d]);if(o!==a)for(const d in o)(!t||!hasOwn(t,d))&&(delete o[d],u=!0)}u&&trigger(e.attrs,"set","")}function setFullProps(e,t,n,r){const[s,o]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(isReservedProp(l))continue;const u=t[l];let f;s&&hasOwn(s,f=camelize(l))?!o||!o.includes(f)?n[f]=u:(a||(a={}))[f]=u:isEmitListener(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,i=!0)}if(o){const l=toRaw(n),u=a||EMPTY_OBJ;for(let f=0;f<o.length;f++){const d=o[f];n[d]=resolvePropValue(s,l,d,u[d],e,!hasOwn(u,d))}}return i}function resolvePropValue(e,t,n,r,s,o){const i=e[n];if(i!=null){const a=hasOwn(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&isFunction$1(l)){const{propsDefaults:u}=s;if(n in u)r=u[n];else{const f=setCurrentInstance(s);r=u[n]=l.call(null,t),f()}}else r=l;s.ce&&s.ce._setProp(n,r)}i[0]&&(o&&!a?r=!1:i[1]&&(r===""||r===hyphenate(n))&&(r=!0))}return r}const mixinPropsCache=new WeakMap;function normalizePropsOptions(e,t,n=!1){const r=n?mixinPropsCache:t.propsCache,s=r.get(e);if(s)return s;const o=e.props,i={},a=[];let l=!1;if(!isFunction$1(e)){const f=d=>{l=!0;const[m,g]=normalizePropsOptions(d,t,!0);extend(i,m),g&&a.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!o&&!l)return isObject$1(e)&&r.set(e,EMPTY_ARR),EMPTY_ARR;if(isArray$2(o))for(let f=0;f<o.length;f++){const d=camelize(o[f]);validatePropName(d)&&(i[d]=EMPTY_OBJ)}else if(o)for(const f in o){const d=camelize(f);if(validatePropName(d)){const m=o[f],g=i[d]=isArray$2(m)||isFunction$1(m)?{type:m}:extend({},m),b=g.type;let S=!1,R=!0;if(isArray$2(b))for(let T=0;T<b.length;++T){const O=b[T],w=isFunction$1(O)&&O.name;if(w==="Boolean"){S=!0;break}else w==="String"&&(R=!1)}else S=isFunction$1(b)&&b.name==="Boolean";g[0]=S,g[1]=R,(S||hasOwn(g,"default"))&&a.push(d)}}const u=[i,a];return isObject$1(e)&&r.set(e,u),u}function validatePropName(e){return e[0]!=="$"&&!isReservedProp(e)}const isInternalKey=e=>e==="_"||e==="__"||e==="_ctx"||e==="$stable",normalizeSlotValue=e=>isArray$2(e)?e.map(normalizeVNode):[normalizeVNode(e)],normalizeSlot$1=(e,t,n)=>{if(t._n)return t;const r=withCtx((...s)=>normalizeSlotValue(t(...s)),n);return r._c=!1,r},normalizeObjectSlots=(e,t,n)=>{const r=e._ctx;for(const s in e){if(isInternalKey(s))continue;const o=e[s];if(isFunction$1(o))t[s]=normalizeSlot$1(s,o,r);else if(o!=null){const i=normalizeSlotValue(o);t[s]=()=>i}}},normalizeVNodeSlots=(e,t)=>{const n=normalizeSlotValue(t);e.slots.default=()=>n},assignSlots=(e,t,n)=>{for(const r in t)(n||!isInternalKey(r))&&(e[r]=t[r])},initSlots=(e,t,n)=>{const r=e.slots=createInternalObject();if(e.vnode.shapeFlag&32){const s=t.__;s&&def(r,"__",s,!0);const o=t._;o?(assignSlots(r,t,n),n&&def(r,"_",o,!0)):normalizeObjectSlots(t,r)}else t&&normalizeVNodeSlots(e,t)},updateSlots=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=EMPTY_OBJ;if(r.shapeFlag&32){const a=t._;a?n&&a===1?o=!1:assignSlots(s,t,n):(o=!t.$stable,normalizeObjectSlots(t,s)),i=t}else t&&(normalizeVNodeSlots(e,t),i={default:1});if(o)for(const a in s)!isInternalKey(a)&&i[a]==null&&delete s[a]},queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(e){return baseCreateRenderer(e)}function baseCreateRenderer(e,t){const n=getGlobalThis();n.__VUE__=!0;const{insert:r,remove:s,patchProp:o,createElement:i,createText:a,createComment:l,setText:u,setElementText:f,parentNode:d,nextSibling:m,setScopeId:g=NOOP,insertStaticContent:b}=e,S=(y,_,$,v=null,I=null,C=null,F=void 0,k=null,x=!!_.dynamicChildren)=>{if(y===_)return;y&&!isSameVNodeType(y,_)&&(v=E(y),ce(y,I,C,!0),y=null),_.patchFlag===-2&&(x=!1,_.dynamicChildren=null);const{type:P,ref:V,shapeFlag:D}=_;switch(P){case Text:R(y,_,$,v);break;case Comment:T(y,_,$,v);break;case Static:y==null&&O(_,$,v,F);break;case Fragment:M(y,_,$,v,I,C,F,k,x);break;default:D&1?K(y,_,$,v,I,C,F,k,x):D&6?Q(y,_,$,v,I,C,F,k,x):(D&64||D&128)&&P.process(y,_,$,v,I,C,F,k,x,j)}V!=null&&I?setRef(V,y&&y.ref,C,_||y,!_):V==null&&y&&y.ref!=null&&setRef(y.ref,null,C,y,!0)},R=(y,_,$,v)=>{if(y==null)r(_.el=a(_.children),$,v);else{const I=_.el=y.el;_.children!==y.children&&u(I,_.children)}},T=(y,_,$,v)=>{y==null?r(_.el=l(_.children||""),$,v):_.el=y.el},O=(y,_,$,v)=>{[y.el,y.anchor]=b(y.children,_,$,v,y.el,y.anchor)},w=({el:y,anchor:_},$,v)=>{let I;for(;y&&y!==_;)I=m(y),r(y,$,v),y=I;r(_,$,v)},A=({el:y,anchor:_})=>{let $;for(;y&&y!==_;)$=m(y),s(y),y=$;s(_)},K=(y,_,$,v,I,C,F,k,x)=>{_.type==="svg"?F="svg":_.type==="math"&&(F="mathml"),y==null?z(_,$,v,I,C,F,k,x):N(y,_,I,C,F,k,x)},z=(y,_,$,v,I,C,F,k)=>{let x,P;const{props:V,shapeFlag:D,transition:H,dirs:G}=y;if(x=y.el=i(y.type,C,V&&V.is,V),D&8?f(x,y.children):D&16&&q(y.children,x,null,v,I,resolveChildrenNamespace(y,C),F,k),G&&invokeDirectiveHook(y,null,v,"created"),Y(x,y,y.scopeId,F,v),V){for(const se in V)se!=="value"&&!isReservedProp(se)&&o(x,se,null,V[se],C,v);"value"in V&&o(x,"value",null,V.value,C),(P=V.onVnodeBeforeMount)&&invokeVNodeHook(P,v,y)}G&&invokeDirectiveHook(y,null,v,"beforeMount");const ee=needTransition(I,H);ee&&H.beforeEnter(x),r(x,_,$),((P=V&&V.onVnodeMounted)||ee||G)&&queuePostRenderEffect(()=>{P&&invokeVNodeHook(P,v,y),ee&&H.enter(x),G&&invokeDirectiveHook(y,null,v,"mounted")},I)},Y=(y,_,$,v,I)=>{if($&&g(y,$),v)for(let C=0;C<v.length;C++)g(y,v[C]);if(I){let C=I.subTree;if(_===C||isSuspense(C.type)&&(C.ssContent===_||C.ssFallback===_)){const F=I.vnode;Y(y,F,F.scopeId,F.slotScopeIds,I.parent)}}},q=(y,_,$,v,I,C,F,k,x=0)=>{for(let P=x;P<y.length;P++){const V=y[P]=k?cloneIfMounted(y[P]):normalizeVNode(y[P]);S(null,V,_,$,v,I,C,F,k)}},N=(y,_,$,v,I,C,F)=>{const k=_.el=y.el;let{patchFlag:x,dynamicChildren:P,dirs:V}=_;x|=y.patchFlag&16;const D=y.props||EMPTY_OBJ,H=_.props||EMPTY_OBJ;let G;if($&&toggleRecurse($,!1),(G=H.onVnodeBeforeUpdate)&&invokeVNodeHook(G,$,_,y),V&&invokeDirectiveHook(_,y,$,"beforeUpdate"),$&&toggleRecurse($,!0),(D.innerHTML&&H.innerHTML==null||D.textContent&&H.textContent==null)&&f(k,""),P?U(y.dynamicChildren,P,k,$,v,resolveChildrenNamespace(_,I),C):F||Z(y,_,k,null,$,v,resolveChildrenNamespace(_,I),C,!1),x>0){if(x&16)W(k,D,H,$,I);else if(x&2&&D.class!==H.class&&o(k,"class",null,H.class,I),x&4&&o(k,"style",D.style,H.style,I),x&8){const ee=_.dynamicProps;for(let se=0;se<ee.length;se++){const te=ee[se],le=D[te],ue=H[te];(ue!==le||te==="value")&&o(k,te,le,ue,I,$)}}x&1&&y.children!==_.children&&f(k,_.children)}else!F&&P==null&&W(k,D,H,$,I);((G=H.onVnodeUpdated)||V)&&queuePostRenderEffect(()=>{G&&invokeVNodeHook(G,$,_,y),V&&invokeDirectiveHook(_,y,$,"updated")},v)},U=(y,_,$,v,I,C,F)=>{for(let k=0;k<_.length;k++){const x=y[k],P=_[k],V=x.el&&(x.type===Fragment||!isSameVNodeType(x,P)||x.shapeFlag&198)?d(x.el):$;S(x,P,V,null,v,I,C,F,!0)}},W=(y,_,$,v,I)=>{if(_!==$){if(_!==EMPTY_OBJ)for(const C in _)!isReservedProp(C)&&!(C in $)&&o(y,C,_[C],null,I,v);for(const C in $){if(isReservedProp(C))continue;const F=$[C],k=_[C];F!==k&&C!=="value"&&o(y,C,k,F,I,v)}"value"in $&&o(y,"value",_.value,$.value,I)}},M=(y,_,$,v,I,C,F,k,x)=>{const P=_.el=y?y.el:a(""),V=_.anchor=y?y.anchor:a("");let{patchFlag:D,dynamicChildren:H,slotScopeIds:G}=_;G&&(k=k?k.concat(G):G),y==null?(r(P,$,v),r(V,$,v),q(_.children||[],$,V,I,C,F,k,x)):D>0&&D&64&&H&&y.dynamicChildren?(U(y.dynamicChildren,H,$,I,C,F,k),(_.key!=null||I&&_===I.subTree)&&traverseStaticChildren(y,_,!0)):Z(y,_,$,V,I,C,F,k,x)},Q=(y,_,$,v,I,C,F,k,x)=>{_.slotScopeIds=k,y==null?_.shapeFlag&512?I.ctx.activate(_,$,v,F,x):ne(_,$,v,I,C,F,x):oe(y,_,x)},ne=(y,_,$,v,I,C,F)=>{const k=y.component=createComponentInstance(y,v,I);if(isKeepAlive(y)&&(k.ctx.renderer=j),setupComponent(k,!1,F),k.asyncDep){if(I&&I.registerDep(k,X,F),!y.el){const x=k.subTree=createVNode(Comment);T(null,x,_,$),y.placeholder=x.el}}else X(k,y,_,$,I,C,F)},oe=(y,_,$)=>{const v=_.component=y.component;if(shouldUpdateComponent(y,_,$))if(v.asyncDep&&!v.asyncResolved){J(v,_,$);return}else v.next=_,v.update();else _.el=y.el,v.vnode=_},X=(y,_,$,v,I,C,F)=>{const k=()=>{if(y.isMounted){let{next:D,bu:H,u:G,parent:ee,vnode:se}=y;{const me=locateNonHydratedAsyncRoot(y);if(me){D&&(D.el=se.el,J(y,D,F)),me.asyncDep.then(()=>{y.isUnmounted||k()});return}}let te=D,le;toggleRecurse(y,!1),D?(D.el=se.el,J(y,D,F)):D=se,H&&invokeArrayFns(H),(le=D.props&&D.props.onVnodeBeforeUpdate)&&invokeVNodeHook(le,ee,D,se),toggleRecurse(y,!0);const ue=renderComponentRoot(y),he=y.subTree;y.subTree=ue,S(he,ue,d(he.el),E(he),y,I,C),D.el=ue.el,te===null&&updateHOCHostEl(y,ue.el),G&&queuePostRenderEffect(G,I),(le=D.props&&D.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(le,ee,D,se),I)}else{let D;const{el:H,props:G}=_,{bm:ee,m:se,parent:te,root:le,type:ue}=y,he=isAsyncWrapper(_);toggleRecurse(y,!1),ee&&invokeArrayFns(ee),!he&&(D=G&&G.onVnodeBeforeMount)&&invokeVNodeHook(D,te,_),toggleRecurse(y,!0);{le.ce&&le.ce._def.shadowRoot!==!1&&le.ce._injectChildStyle(ue);const me=y.subTree=renderComponentRoot(y);S(null,me,$,v,y,I,C),_.el=me.el}if(se&&queuePostRenderEffect(se,I),!he&&(D=G&&G.onVnodeMounted)){const me=_;queuePostRenderEffect(()=>invokeVNodeHook(D,te,me),I)}(_.shapeFlag&256||te&&isAsyncWrapper(te.vnode)&&te.vnode.shapeFlag&256)&&y.a&&queuePostRenderEffect(y.a,I),y.isMounted=!0,_=$=v=null}};y.scope.on();const x=y.effect=new ReactiveEffect(k);y.scope.off();const P=y.update=x.run.bind(x),V=y.job=x.runIfDirty.bind(x);V.i=y,V.id=y.uid,x.scheduler=()=>queueJob(V),toggleRecurse(y,!0),P()},J=(y,_,$)=>{_.component=y;const v=y.vnode.props;y.vnode=_,y.next=null,updateProps(y,_.props,v,$),updateSlots(y,_.children,$),pauseTracking(),flushPreFlushCbs(y),resetTracking()},Z=(y,_,$,v,I,C,F,k,x=!1)=>{const P=y&&y.children,V=y?y.shapeFlag:0,D=_.children,{patchFlag:H,shapeFlag:G}=_;if(H>0){if(H&128){pe(P,D,$,v,I,C,F,k,x);return}else if(H&256){ae(P,D,$,v,I,C,F,k,x);return}}G&8?(V&16&&de(P,I,C),D!==P&&f($,D)):V&16?G&16?pe(P,D,$,v,I,C,F,k,x):de(P,I,C,!0):(V&8&&f($,""),G&16&&q(D,$,v,I,C,F,k,x))},ae=(y,_,$,v,I,C,F,k,x)=>{y=y||EMPTY_ARR,_=_||EMPTY_ARR;const P=y.length,V=_.length,D=Math.min(P,V);let H;for(H=0;H<D;H++){const G=_[H]=x?cloneIfMounted(_[H]):normalizeVNode(_[H]);S(y[H],G,$,null,I,C,F,k,x)}P>V?de(y,I,C,!0,!1,D):q(_,$,v,I,C,F,k,x,D)},pe=(y,_,$,v,I,C,F,k,x)=>{let P=0;const V=_.length;let D=y.length-1,H=V-1;for(;P<=D&&P<=H;){const G=y[P],ee=_[P]=x?cloneIfMounted(_[P]):normalizeVNode(_[P]);if(isSameVNodeType(G,ee))S(G,ee,$,null,I,C,F,k,x);else break;P++}for(;P<=D&&P<=H;){const G=y[D],ee=_[H]=x?cloneIfMounted(_[H]):normalizeVNode(_[H]);if(isSameVNodeType(G,ee))S(G,ee,$,null,I,C,F,k,x);else break;D--,H--}if(P>D){if(P<=H){const G=H+1,ee=G<V?_[G].el:v;for(;P<=H;)S(null,_[P]=x?cloneIfMounted(_[P]):normalizeVNode(_[P]),$,ee,I,C,F,k,x),P++}}else if(P>H)for(;P<=D;)ce(y[P],I,C,!0),P++;else{const G=P,ee=P,se=new Map;for(P=ee;P<=H;P++){const fe=_[P]=x?cloneIfMounted(_[P]):normalizeVNode(_[P]);fe.key!=null&&se.set(fe.key,P)}let te,le=0;const ue=H-ee+1;let he=!1,me=0;const _e=new Array(ue);for(P=0;P<ue;P++)_e[P]=0;for(P=G;P<=D;P++){const fe=y[P];if(le>=ue){ce(fe,I,C,!0);continue}let ge;if(fe.key!=null)ge=se.get(fe.key);else for(te=ee;te<=H;te++)if(_e[te-ee]===0&&isSameVNodeType(fe,_[te])){ge=te;break}ge===void 0?ce(fe,I,C,!0):(_e[ge-ee]=P+1,ge>=me?me=ge:he=!0,S(fe,_[ge],$,null,I,C,F,k,x),le++)}const Se=he?getSequence(_e):EMPTY_ARR;for(te=Se.length-1,P=ue-1;P>=0;P--){const fe=ee+P,ge=_[fe],ve=_[fe+1],Ee=fe+1<V?ve.el||ve.placeholder:v;_e[P]===0?S(null,ge,$,Ee,I,C,F,k,x):he&&(te<0||P!==Se[te]?ie(ge,$,Ee,2):te--)}}},ie=(y,_,$,v,I=null)=>{const{el:C,type:F,transition:k,children:x,shapeFlag:P}=y;if(P&6){ie(y.component.subTree,_,$,v);return}if(P&128){y.suspense.move(_,$,v);return}if(P&64){F.move(y,_,$,j);return}if(F===Fragment){r(C,_,$);for(let D=0;D<x.length;D++)ie(x[D],_,$,v);r(y.anchor,_,$);return}if(F===Static){w(y,_,$);return}if(v!==2&&P&1&&k)if(v===0)k.beforeEnter(C),r(C,_,$),queuePostRenderEffect(()=>k.enter(C),I);else{const{leave:D,delayLeave:H,afterLeave:G}=k,ee=()=>{y.ctx.isUnmounted?s(C):r(C,_,$)},se=()=>{D(C,()=>{ee(),G&&G()})};H?H(C,ee,se):se()}else r(C,_,$)},ce=(y,_,$,v=!1,I=!1)=>{const{type:C,props:F,ref:k,children:x,dynamicChildren:P,shapeFlag:V,patchFlag:D,dirs:H,cacheIndex:G}=y;if(D===-2&&(I=!1),k!=null&&(pauseTracking(),setRef(k,null,$,y,!0),resetTracking()),G!=null&&(_.renderCache[G]=void 0),V&256){_.ctx.deactivate(y);return}const ee=V&1&&H,se=!isAsyncWrapper(y);let te;if(se&&(te=F&&F.onVnodeBeforeUnmount)&&invokeVNodeHook(te,_,y),V&6)$e(y.component,$,v);else{if(V&128){y.suspense.unmount($,v);return}ee&&invokeDirectiveHook(y,null,_,"beforeUnmount"),V&64?y.type.remove(y,_,$,j,v):P&&!P.hasOnce&&(C!==Fragment||D>0&&D&64)?de(P,_,$,!1,!0):(C===Fragment&&D&384||!I&&V&16)&&de(x,_,$),v&&ye(y)}(se&&(te=F&&F.onVnodeUnmounted)||ee)&&queuePostRenderEffect(()=>{te&&invokeVNodeHook(te,_,y),ee&&invokeDirectiveHook(y,null,_,"unmounted")},$)},ye=y=>{const{type:_,el:$,anchor:v,transition:I}=y;if(_===Fragment){be($,v);return}if(_===Static){A(y);return}const C=()=>{s($),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(y.shapeFlag&1&&I&&!I.persisted){const{leave:F,delayLeave:k}=I,x=()=>F($,C);k?k(y.el,C,x):x()}else C()},be=(y,_)=>{let $;for(;y!==_;)$=m(y),s(y),y=$;s(_)},$e=(y,_,$)=>{const{bum:v,scope:I,job:C,subTree:F,um:k,m:x,a:P,parent:V,slots:{__:D}}=y;invalidateMount(x),invalidateMount(P),v&&invokeArrayFns(v),V&&isArray$2(D)&&D.forEach(H=>{V.renderCache[H]=void 0}),I.stop(),C&&(C.flags|=8,ce(F,y,_,$)),k&&queuePostRenderEffect(k,_),queuePostRenderEffect(()=>{y.isUnmounted=!0},_),_&&_.pendingBranch&&!_.isUnmounted&&y.asyncDep&&!y.asyncResolved&&y.suspenseId===_.pendingId&&(_.deps--,_.deps===0&&_.resolve())},de=(y,_,$,v=!1,I=!1,C=0)=>{for(let F=C;F<y.length;F++)ce(y[F],_,$,v,I)},E=y=>{if(y.shapeFlag&6)return E(y.component.subTree);if(y.shapeFlag&128)return y.suspense.next();const _=m(y.anchor||y.el),$=_&&_[TeleportEndKey];return $?m($):_};let B=!1;const L=(y,_,$)=>{y==null?_._vnode&&ce(_._vnode,null,null,!0):S(_._vnode||null,y,_,null,null,null,$),_._vnode=y,B||(B=!0,flushPreFlushCbs(),flushPostFlushCbs(),B=!1)},j={p:S,um:ce,m:ie,r:ye,mt:ne,mc:q,pc:Z,pbc:U,n:E,o:e};return{render:L,hydrate:void 0,createApp:createAppAPI(L)}}function resolveChildrenNamespace({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function toggleRecurse({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function needTransition(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function traverseStaticChildren(e,t,n=!1){const r=e.children,s=t.children;if(isArray$2(r)&&isArray$2(s))for(let o=0;o<r.length;o++){const i=r[o];let a=s[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[o]=cloneIfMounted(s[o]),a.el=i.el),!n&&a.patchFlag!==-2&&traverseStaticChildren(i,a)),a.type===Text&&(a.el=i.el),a.type===Comment&&!a.el&&(a.el=i.el)}}function getSequence(e){const t=e.slice(),n=[0];let r,s,o,i,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(s=n[n.length-1],e[s]<u){t[r]=s,n.push(r);continue}for(o=0,i=n.length-1;o<i;)a=o+i>>1,e[n[a]]<u?o=a+1:i=a;u<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function locateNonHydratedAsyncRoot(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:locateNonHydratedAsyncRoot(t)}function invalidateMount(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const ssrContextKey$1=Symbol.for("v-scx"),useSSRContext=()=>inject(ssrContextKey$1);function watchEffect(e,t){return doWatch(e,null,t)}function watch(e,t,n){return doWatch(e,t,n)}function doWatch(e,t,n=EMPTY_OBJ){const{immediate:r,deep:s,flush:o,once:i}=n,a=extend({},n),l=t&&r||!t&&o!=="post";let u;if(isInSSRComponentSetup){if(o==="sync"){const g=useSSRContext();u=g.__watcherHandles||(g.__watcherHandles=[])}else if(!l){const g=()=>{};return g.stop=NOOP,g.resume=NOOP,g.pause=NOOP,g}}const f=currentInstance;a.call=(g,b,S)=>callWithAsyncErrorHandling(g,f,b,S);let d=!1;o==="post"?a.scheduler=g=>{queuePostRenderEffect(g,f&&f.suspense)}:o!=="sync"&&(d=!0,a.scheduler=(g,b)=>{b?g():queueJob(g)}),a.augmentJob=g=>{t&&(g.flags|=4),d&&(g.flags|=2,f&&(g.id=f.uid,g.i=f))};const m=watch$1(e,t,a);return isInSSRComponentSetup&&(u?u.push(m):l&&m()),m}function instanceWatch(e,t,n){const r=this.proxy,s=isString(e)?e.includes(".")?createPathGetter(r,e):()=>r[e]:e.bind(r,r);let o;isFunction$1(t)?o=t:(o=t.handler,n=t);const i=setCurrentInstance(this),a=doWatch(s,o.bind(r),n);return i(),a}function createPathGetter(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}const getModelModifiers=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${camelize(t)}Modifiers`]||e[`${hyphenate(t)}Modifiers`];function emit(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||EMPTY_OBJ;let s=n;const o=t.startsWith("update:"),i=o&&getModelModifiers(r,t.slice(7));i&&(i.trim&&(s=n.map(f=>isString(f)?f.trim():f)),i.number&&(s=n.map(looseToNumber)));let a,l=r[a=toHandlerKey(t)]||r[a=toHandlerKey(camelize(t))];!l&&o&&(l=r[a=toHandlerKey(hyphenate(t))]),l&&callWithAsyncErrorHandling(l,e,6,s);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,callWithAsyncErrorHandling(u,e,6,s)}}function normalizeEmitsOptions(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const o=e.emits;let i={},a=!1;if(!isFunction$1(e)){const l=u=>{const f=normalizeEmitsOptions(u,t,!0);f&&(a=!0,extend(i,f))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(isObject$1(e)&&r.set(e,null),null):(isArray$2(o)?o.forEach(l=>i[l]=null):extend(i,o),isObject$1(e)&&r.set(e,i),i)}function isEmitListener(e,t){return!e||!isOn(t)?!1:(t=t.slice(2).replace(/Once$/,""),hasOwn(e,t[0].toLowerCase()+t.slice(1))||hasOwn(e,hyphenate(t))||hasOwn(e,t))}function markAttrsAccessed(){}function renderComponentRoot(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:a,emit:l,render:u,renderCache:f,props:d,data:m,setupState:g,ctx:b,inheritAttrs:S}=e,R=setCurrentRenderingInstance(e);let T,O;try{if(n.shapeFlag&4){const A=s||r,K=A;T=normalizeVNode(u.call(K,A,f,d,g,m,b)),O=a}else{const A=t;T=normalizeVNode(A.length>1?A(d,{attrs:a,slots:i,emit:l}):A(d,null)),O=t.props?a:getFunctionalFallthrough(a)}}catch(A){blockStack.length=0,handleError(A,e,1),T=createVNode(Comment)}let w=T;if(O&&S!==!1){const A=Object.keys(O),{shapeFlag:K}=w;A.length&&K&7&&(o&&A.some(isModelListener)&&(O=filterModelListeners(O,o)),w=cloneVNode(w,O,!1,!0))}return n.dirs&&(w=cloneVNode(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&setTransitionHooks(w,n.transition),T=w,setCurrentRenderingInstance(R),T}const getFunctionalFallthrough=e=>{let t;for(const n in e)(n==="class"||n==="style"||isOn(n))&&((t||(t={}))[n]=e[n]);return t},filterModelListeners=(e,t)=>{const n={};for(const r in e)(!isModelListener(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function shouldUpdateComponent(e,t,n){const{props:r,children:s,component:o}=e,{props:i,children:a,patchFlag:l}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?hasPropsChanged(r,i,u):!!i;if(l&8){const f=t.dynamicProps;for(let d=0;d<f.length;d++){const m=f[d];if(i[m]!==r[m]&&!isEmitListener(u,m))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?hasPropsChanged(r,i,u):!0:!!i;return!1}function hasPropsChanged(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let s=0;s<r.length;s++){const o=r[s];if(t[o]!==e[o]&&!isEmitListener(n,o))return!0}return!1}function updateHOCHostEl({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const isSuspense=e=>e.__isSuspense;function queueEffectWithSuspense(e,t){t&&t.pendingBranch?isArray$2(e)?t.effects.push(...e):t.effects.push(e):queuePostFlushCb(e)}const Fragment=Symbol.for("v-fgt"),Text=Symbol.for("v-txt"),Comment=Symbol.for("v-cmt"),Static=Symbol.for("v-stc"),blockStack=[];let currentBlock=null;function openBlock(e=!1){blockStack.push(currentBlock=e?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(e,t=!1){isBlockTreeEnabled+=e,e<0&&currentBlock&&t&&(currentBlock.hasOnce=!0)}function setupBlock(e){return e.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&&currentBlock&&currentBlock.push(e),e}function createBlock(e,t,n,r,s){return setupBlock(createVNode(e,t,n,r,s,!0))}function isVNode(e){return e?e.__v_isVNode===!0:!1}function isSameVNodeType(e,t){return e.type===t.type&&e.key===t.key}const normalizeKey=({key:e})=>e??null,normalizeRef=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?isString(e)||isRef(e)||isFunction$1(e)?{i:currentRenderingInstance,r:e,k:t,f:!!n}:e:null);function createBaseVNode(e,t=null,n=null,r=0,s=null,o=e===Fragment?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&normalizeKey(t),ref:t&&normalizeRef(t),scopeId:currentScopeId,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return a?(normalizeChildren(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=isString(n)?8:16),isBlockTreeEnabled>0&&!i&&currentBlock&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&currentBlock.push(l),l}const createVNode=_createVNode;function _createVNode(e,t=null,n=null,r=0,s=null,o=!1){if((!e||e===NULL_DYNAMIC_COMPONENT)&&(e=Comment),isVNode(e)){const a=cloneVNode(e,t,!0);return n&&normalizeChildren(a,n),isBlockTreeEnabled>0&&!o&&currentBlock&&(a.shapeFlag&6?currentBlock[currentBlock.indexOf(e)]=a:currentBlock.push(a)),a.patchFlag=-2,a}if(isClassComponent(e)&&(e=e.__vccOpts),t){t=guardReactiveProps(t);let{class:a,style:l}=t;a&&!isString(a)&&(t.class=normalizeClass(a)),isObject$1(l)&&(isProxy(l)&&!isArray$2(l)&&(l=extend({},l)),t.style=normalizeStyle(l))}const i=isString(e)?1:isSuspense(e)?128:isTeleport(e)?64:isObject$1(e)?4:isFunction$1(e)?2:0;return createBaseVNode(e,t,n,r,s,i,o,!0)}function guardReactiveProps(e){return e?isProxy(e)||isInternalObject(e)?extend({},e):e:null}function cloneVNode(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:a,transition:l}=e,u=t?mergeProps(s||{},t):s,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&normalizeKey(u),ref:t&&t.ref?n&&o?isArray$2(o)?o.concat(normalizeRef(t)):[o,normalizeRef(t)]:normalizeRef(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Fragment?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&cloneVNode(e.ssContent),ssFallback:e.ssFallback&&cloneVNode(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&setTransitionHooks(f,l.clone(f)),f}function createTextVNode(e=" ",t=0){return createVNode(Text,null,e,t)}function normalizeVNode(e){return e==null||typeof e=="boolean"?createVNode(Comment):isArray$2(e)?createVNode(Fragment,null,e.slice()):isVNode(e)?cloneIfMounted(e):createVNode(Text,null,String(e))}function cloneIfMounted(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:cloneVNode(e)}function normalizeChildren(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(isArray$2(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),normalizeChildren(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!isInternalObject(t)?t._ctx=currentRenderingInstance:s===3&&currentRenderingInstance&&(currentRenderingInstance.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else isFunction$1(t)?(t={default:t,_ctx:currentRenderingInstance},n=32):(t=String(t),r&64?(n=16,t=[createTextVNode(t)]):n=8);e.children=t,e.shapeFlag|=n}function mergeProps(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const s in r)if(s==="class")t.class!==r.class&&(t.class=normalizeClass([t.class,r.class]));else if(s==="style")t.style=normalizeStyle([t.style,r.style]);else if(isOn(s)){const o=t[s],i=r[s];i&&o!==i&&!(isArray$2(o)&&o.includes(i))&&(t[s]=o?[].concat(o,i):i)}else s!==""&&(t[s]=r[s])}return t}function invokeVNodeHook(e,t,n,r=null){callWithAsyncErrorHandling(e,t,7,[n,r])}const emptyAppContext=createAppContext();let uid=0;function createComponentInstance(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||emptyAppContext,o={uid:uid++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new EffectScope(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:normalizePropsOptions(r,s),emitsOptions:normalizeEmitsOptions(r,s),emit:null,emitted:null,propsDefaults:EMPTY_OBJ,inheritAttrs:r.inheritAttrs,ctx:EMPTY_OBJ,data:EMPTY_OBJ,props:EMPTY_OBJ,attrs:EMPTY_OBJ,slots:EMPTY_OBJ,refs:EMPTY_OBJ,setupState:EMPTY_OBJ,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=emit.bind(null,o),e.ce&&e.ce(o),o}let currentInstance=null;const getCurrentInstance=()=>currentInstance||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{const e=getGlobalThis(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),o=>{s.length>1?s.forEach(i=>i(o)):s[0](o)}};internalSetCurrentInstance=t("__VUE_INSTANCE_SETTERS__",n=>currentInstance=n),setInSSRSetupState=t("__VUE_SSR_SETTERS__",n=>isInSSRComponentSetup=n)}const setCurrentInstance=e=>{const t=currentInstance;return internalSetCurrentInstance(e),e.scope.on(),()=>{e.scope.off(),internalSetCurrentInstance(t)}},unsetCurrentInstance=()=>{currentInstance&&currentInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(e){return e.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(e,t=!1,n=!1){t&&setInSSRSetupState(t);const{props:r,children:s}=e.vnode,o=isStatefulComponent(e);initProps(e,r,o,t),initSlots(e,s,n||t);const i=o?setupStatefulComponent(e,t):void 0;return t&&setInSSRSetupState(!1),i}function setupStatefulComponent(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,PublicInstanceProxyHandlers);const{setup:r}=n;if(r){pauseTracking();const s=e.setupContext=r.length>1?createSetupContext(e):null,o=setCurrentInstance(e),i=callWithErrorHandling(r,e,0,[e.props,s]),a=isPromise(i);if(resetTracking(),o(),(a||e.sp)&&!isAsyncWrapper(e)&&markAsyncBoundary(e),a){if(i.then(unsetCurrentInstance,unsetCurrentInstance),t)return i.then(l=>{handleSetupResult(e,l)}).catch(l=>{handleError(l,e,0)});e.asyncDep=i}else handleSetupResult(e,i)}else finishComponentSetup(e)}function handleSetupResult(e,t,n){isFunction$1(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:isObject$1(t)&&(e.setupState=proxyRefs(t)),finishComponentSetup(e)}function finishComponentSetup(e,t,n){const r=e.type;e.render||(e.render=r.render||NOOP);{const s=setCurrentInstance(e);pauseTracking();try{applyOptions(e)}finally{resetTracking(),s()}}}const attrsProxyHandlers={get(e,t){return track(e,"get",""),e[t]}};function createSetupContext(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,attrsProxyHandlers),slots:e.slots,emit:e.emit,expose:t}}function getComponentPublicInstance(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(proxyRefs(markRaw(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in publicPropertiesMap)return publicPropertiesMap[n](e)},has(t,n){return n in t||n in publicPropertiesMap}})):e.proxy}const classifyRE=/(?:^|[-_])(\w)/g,classify=e=>e.replace(classifyRE,t=>t.toUpperCase()).replace(/[-_]/g,"");function getComponentName(e,t=!0){return isFunction$1(e)?e.displayName||e.name:e.name||t&&e.__name}function formatComponentName(e,t,n=!1){let r=getComponentName(t);if(!r&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(r=s[1])}if(!r&&e&&e.parent){const s=o=>{for(const i in o)if(o[i]===t)return i};r=s(e.components||e.parent.type.components)||s(e.appContext.components)}return r?classify(r):n?"App":"Anonymous"}function isClassComponent(e){return isFunction$1(e)&&"__vccOpts"in e}const computed=(e,t)=>computed$1(e,t,isInSSRComponentSetup);function h(e,t,n){const r=arguments.length;return r===2?isObject$1(t)&&!isArray$2(t)?isVNode(t)?createVNode(e,null,[t]):createVNode(e,t):createVNode(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&isVNode(n)&&(n=[n]),createVNode(e,t,n))}const version$2="3.5.18";/**
38
+ * @vue/runtime-dom v3.5.18
39
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
40
+ * @license MIT
41
+ **/let policy;const tt=typeof window<"u"&&window.trustedTypes;if(tt)try{policy=tt.createPolicy("vue",{createHTML:e=>e})}catch{}const unsafeToTrustedHTML=policy?e=>policy.createHTML(e):e=>e,svgNS="http://www.w3.org/2000/svg",mathmlNS="http://www.w3.org/1998/Math/MathML",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?doc.createElementNS(svgNS,e):t==="mathml"?doc.createElementNS(mathmlNS,e):n?doc.createElement(e,{is:n}):doc.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>doc.createTextNode(e),createComment:e=>doc.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>doc.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{templateContainer.innerHTML=unsafeToTrustedHTML(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=templateContainer.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},TRANSITION="transition",ANIMATION="animation",vtcKey=Symbol("_vtc"),DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=extend({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),decorate$1=e=>(e.displayName="Transition",e.props=TransitionPropsValidators,e),Transition=decorate$1((e,{slots:t})=>h(BaseTransition,resolveTransitionProps(e),t)),callHook=(e,t=[])=>{isArray$2(e)?e.forEach(n=>n(...t)):e&&e(...t)},hasExplicitCallback=e=>e?isArray$2(e)?e.some(t=>t.length>1):e.length>1:!1;function resolveTransitionProps(e){const t={};for(const M in e)M in DOMTransitionPropsValidators||(t[M]=e[M]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:u=i,appearToClass:f=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=e,b=normalizeDuration(s),S=b&&b[0],R=b&&b[1],{onBeforeEnter:T,onEnter:O,onEnterCancelled:w,onLeave:A,onLeaveCancelled:K,onBeforeAppear:z=T,onAppear:Y=O,onAppearCancelled:q=w}=t,N=(M,Q,ne,oe)=>{M._enterCancelled=oe,removeTransitionClass(M,Q?f:a),removeTransitionClass(M,Q?u:i),ne&&ne()},U=(M,Q)=>{M._isLeaving=!1,removeTransitionClass(M,d),removeTransitionClass(M,g),removeTransitionClass(M,m),Q&&Q()},W=M=>(Q,ne)=>{const oe=M?Y:O,X=()=>N(Q,M,ne);callHook(oe,[Q,X]),nextFrame(()=>{removeTransitionClass(Q,M?l:o),addTransitionClass(Q,M?f:a),hasExplicitCallback(oe)||whenTransitionEnds(Q,r,S,X)})};return extend(t,{onBeforeEnter(M){callHook(T,[M]),addTransitionClass(M,o),addTransitionClass(M,i)},onBeforeAppear(M){callHook(z,[M]),addTransitionClass(M,l),addTransitionClass(M,u)},onEnter:W(!1),onAppear:W(!0),onLeave(M,Q){M._isLeaving=!0;const ne=()=>U(M,Q);addTransitionClass(M,d),M._enterCancelled?(addTransitionClass(M,m),forceReflow()):(forceReflow(),addTransitionClass(M,m)),nextFrame(()=>{M._isLeaving&&(removeTransitionClass(M,d),addTransitionClass(M,g),hasExplicitCallback(A)||whenTransitionEnds(M,r,R,ne))}),callHook(A,[M,ne])},onEnterCancelled(M){N(M,!1,void 0,!0),callHook(w,[M])},onAppearCancelled(M){N(M,!0,void 0,!0),callHook(q,[M])},onLeaveCancelled(M){U(M),callHook(K,[M])}})}function normalizeDuration(e){if(e==null)return null;if(isObject$1(e))return[NumberOf(e.enter),NumberOf(e.leave)];{const t=NumberOf(e);return[t,t]}}function NumberOf(e){return toNumber(e)}function addTransitionClass(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[vtcKey]||(e[vtcKey]=new Set)).add(t)}function removeTransitionClass(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[vtcKey];n&&(n.delete(t),n.size||(e[vtcKey]=void 0))}function nextFrame(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let endId=0;function whenTransitionEnds(e,t,n,r){const s=e._endId=++endId,o=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:a,propCount:l}=getTransitionInfo(e,t);if(!i)return r();const u=i+"end";let f=0;const d=()=>{e.removeEventListener(u,m),o()},m=g=>{g.target===e&&++f>=l&&d()};setTimeout(()=>{f<l&&d()},a+1),e.addEventListener(u,m)}function getTransitionInfo(e,t){const n=window.getComputedStyle(e),r=b=>(n[b]||"").split(", "),s=r(`${TRANSITION}Delay`),o=r(`${TRANSITION}Duration`),i=getTimeout(s,o),a=r(`${ANIMATION}Delay`),l=r(`${ANIMATION}Duration`),u=getTimeout(a,l);let f=null,d=0,m=0;t===TRANSITION?i>0&&(f=TRANSITION,d=i,m=o.length):t===ANIMATION?u>0&&(f=ANIMATION,d=u,m=l.length):(d=Math.max(i,u),f=d>0?i>u?TRANSITION:ANIMATION:null,m=f?f===TRANSITION?o.length:l.length:0);const g=f===TRANSITION&&/\b(transform|all)(,|$)/.test(r(`${TRANSITION}Property`).toString());return{type:f,timeout:d,propCount:m,hasTransform:g}}function getTimeout(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>toMs(n)+toMs(e[r])))}function toMs(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function forceReflow(){return document.body.offsetHeight}function patchClass(e,t,n){const r=e[vtcKey];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const vShowOriginalDisplay=Symbol("_vod"),vShowHidden=Symbol("_vsh"),vShow={beforeMount(e,{value:t},{transition:n}){e[vShowOriginalDisplay]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):setDisplay(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),setDisplay(e,!0),r.enter(e)):r.leave(e,()=>{setDisplay(e,!1)}):setDisplay(e,t))},beforeUnmount(e,{value:t}){setDisplay(e,t)}};function setDisplay(e,t){e.style.display=t?e[vShowOriginalDisplay]:"none",e[vShowHidden]=!t}const CSS_VAR_TEXT=Symbol(""),displayRE=/(^|;)\s*display\s*:/;function patchStyle(e,t,n){const r=e.style,s=isString(n);let o=!1;if(n&&!s){if(t)if(isString(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&setStyle(r,a,"")}else for(const i in t)n[i]==null&&setStyle(r,i,"");for(const i in n)i==="display"&&(o=!0),setStyle(r,i,n[i])}else if(s){if(t!==n){const i=r[CSS_VAR_TEXT];i&&(n+=";"+i),r.cssText=n,o=displayRE.test(n)}}else t&&e.removeAttribute("style");vShowOriginalDisplay in e&&(e[vShowOriginalDisplay]=o?r.display:"",e[vShowHidden]&&(r.display="none"))}const importantRE=/\s*!important$/;function setStyle(e,t,n){if(isArray$2(n))n.forEach(r=>setStyle(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=autoPrefix(e,t);importantRE.test(n)?e.setProperty(hyphenate(r),n.replace(importantRE,""),"important"):e[r]=n}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(e,t){const n=prefixCache[t];if(n)return n;let r=camelize(t);if(r!=="filter"&&r in e)return prefixCache[t]=r;r=capitalize(r);for(let s=0;s<prefixes.length;s++){const o=prefixes[s]+r;if(o in e)return prefixCache[t]=o}return t}const xlinkNS="http://www.w3.org/1999/xlink";function patchAttr(e,t,n,r,s,o=isSpecialBooleanAttr(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(xlinkNS,t.slice(6,t.length)):e.setAttributeNS(xlinkNS,t,n):n==null||o&&!includeBooleanAttr(n)?e.removeAttribute(t):e.setAttribute(t,o?"":isSymbol$1(n)?String(n):n)}function patchDOMProp(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?unsafeToTrustedHTML(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const a=o==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=includeBooleanAttr(n):n==null&&a==="string"?(n="",i=!0):a==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(s||t)}function addEventListener(e,t,n,r){e.addEventListener(t,n,r)}function removeEventListener(e,t,n,r){e.removeEventListener(t,n,r)}const veiKey=Symbol("_vei");function patchEvent(e,t,n,r,s=null){const o=e[veiKey]||(e[veiKey]={}),i=o[t];if(r&&i)i.value=r;else{const[a,l]=parseName(t);if(r){const u=o[t]=createInvoker(r,s);addEventListener(e,a,u,l)}else i&&(removeEventListener(e,a,i,l),o[t]=void 0)}}const optionsModifierRE=/(?:Once|Passive|Capture)$/;function parseName(e){let t;if(optionsModifierRE.test(e)){t={};let r;for(;r=e.match(optionsModifierRE);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):hyphenate(e.slice(2)),t]}let cachedNow=0;const p=Promise.resolve(),getNow=()=>cachedNow||(p.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(r,n.value),t,5,[r])};return n.value=e,n.attached=getNow(),n}function patchStopImmediatePropagation(e,t){if(isArray$2(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const isNativeOn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,patchProp=(e,t,n,r,s,o)=>{const i=s==="svg";t==="class"?patchClass(e,r,i):t==="style"?patchStyle(e,n,r):isOn(t)?isModelListener(t)||patchEvent(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):shouldSetAsProp(e,t,r,i))?(patchDOMProp(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&patchAttr(e,t,r,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!isString(r))?patchDOMProp(e,camelize(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),patchAttr(e,t,r,i))};function shouldSetAsProp(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&isNativeOn(t)&&isFunction$1(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return isNativeOn(t)&&isString(n)?!1:t in e}const positionMap=new WeakMap,newPositionMap=new WeakMap,moveCbKey=Symbol("_moveCb"),enterCbKey=Symbol("_enterCb"),decorate=e=>(delete e.props.mode,e),TransitionGroupImpl=decorate({name:"TransitionGroup",props:extend({},TransitionPropsValidators,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=getCurrentInstance(),r=useTransitionState();let s,o;return onUpdated(()=>{if(!s.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!hasCSSTransform(s[0].el,n.vnode.el,i)){s=[];return}s.forEach(callPendingCbs),s.forEach(recordPosition);const a=s.filter(applyTranslation);forceReflow(),a.forEach(l=>{const u=l.el,f=u.style;addTransitionClass(u,i),f.transform=f.webkitTransform=f.transitionDuration="";const d=u[moveCbKey]=m=>{m&&m.target!==u||(!m||/transform$/.test(m.propertyName))&&(u.removeEventListener("transitionend",d),u[moveCbKey]=null,removeTransitionClass(u,i))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const i=toRaw(e),a=resolveTransitionProps(i);let l=i.tag||Fragment;if(s=[],o)for(let u=0;u<o.length;u++){const f=o[u];f.el&&f.el instanceof Element&&(s.push(f),setTransitionHooks(f,resolveTransitionHooks(f,a,r,n)),positionMap.set(f,f.el.getBoundingClientRect()))}o=t.default?getTransitionRawChildren(t.default()):[];for(let u=0;u<o.length;u++){const f=o[u];f.key!=null&&setTransitionHooks(f,resolveTransitionHooks(f,a,r,n))}return createVNode(l,null,o)}}}),TransitionGroup=TransitionGroupImpl;function callPendingCbs(e){const t=e.el;t[moveCbKey]&&t[moveCbKey](),t[enterCbKey]&&t[enterCbKey]()}function recordPosition(e){newPositionMap.set(e,e.el.getBoundingClientRect())}function applyTranslation(e){const t=positionMap.get(e),n=newPositionMap.get(e),r=t.left-n.left,s=t.top-n.top;if(r||s){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${r}px,${s}px)`,o.transitionDuration="0s",e}}function hasCSSTransform(e,t,n){const r=e.cloneNode(),s=e[vtcKey];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(r);const{hasTransform:i}=getTransitionInfo(r);return o.removeChild(r),i}const rendererOptions=extend({patchProp},nodeOps);let renderer;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}const createApp=(...e)=>{const t=ensureRenderer().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=normalizeContainer(r);if(!s)return;const o=t._component;!isFunction$1(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const i=n(s,!1,resolveRootNamespace(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},t};function resolveRootNamespace(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function normalizeContainer(e){return isString(e)?document.querySelector(e):e}const version$1="1.0.6",packageJson={version:version$1};function deepAssign(e,t,n={add:!0,update:!0}){for(let r in t)t.hasOwnProperty(r)&&(t[r]instanceof Object&&!Array.isArray(t[r])?(e.hasOwnProperty(r)||(e[r]={}),deepAssign(e[r],t[r],n)):(!e.hasOwnProperty(r)&&n.add||n.update)&&(e[r]=t[r]));return e}class EffectRender extends Tag("EffectDep")(){}class EffectLocalStorageDep extends Tag("EffectLocalStorageDep")(){}class EffectLogDep extends Tag("EffectLogDep")(){}class EffectConfigDep extends Tag("EffectConfigDep")(){}const version=packageJson.version;console.log("[version]",version);const defaultConfig={name:"default",notebook:{},authorized:"",apiPrefix:"http://127.0.0.1:6806",compressedZip:!0,excludeAssetsCopy:!1,sitemap:{enable:!0,sitePrefix:".",siteLink:"",description:"",title:"",rss:!0},enableIncrementalCompilation:!1,enableIncrementalCompilation_doc:!0,__skipBuilds__:{},s3:{enable:!1,bucket:"",region:"",pathPrefix:"",endpoint:"",accessKeyId:"",secretAccessKey:""},oceanPressServer:{enable:!1,apiBase:"",apiKey:""},meilisearch:{enable:!1,host:"",apiKey:"",indexName:""},embedCode:{head:"",beforeBody:"",afterBody:`<footer>
42
+ <p style="text-align:center;margin:15px 0;">
43
+ 技术支持:
44
+ <a target="_blank" href="https://github.com/2234839/oceanPress_js">OceanPress</a> |
45
+ 开发者:
46
+ <a target="_blank" href="https://shenzilong.cn">崮生(子虚)</a>
47
+ </p>
48
+ </footer>`},sidebarCode:{enableDocTree:!0,leftCode:"",rightCode:""},OceanPress:{version}},configs=reactive({__current__:"default",__init__:!0,default:deepAssign({},defaultConfig)});function addConfig(e,t){configs[e]=deepAssign({},defaultConfig)}const loadConfigFile=e=>gen(function*(){const t=yield*EffectLocalStorageDep;if(e)deepAssign(configs,e);else{const o=t.getItem("configs");o&&deepAssign(configs,JSON.parse(o))}Object.entries(configs).filter(([o])=>o.startsWith("__")===!1).forEach(([o,i])=>{deepAssign(i,defaultConfig,{update:!1,add:!0})});const n=()=>{configs.__init__===!1&&t.setItem("configs",JSON.stringify(configs,null,2))};let r=null;return watch(configs,()=>{r&&clearTimeout(r),r=setTimeout(()=>{n(),r=null},700)},{deep:!0}),configs}),currentConfig=computed(()=>configs[configs.__current__]),tempConfig={cdn:{siyuanPrefix:`https://fastly.jsdelivr.net/gh/siyuan-note/oceanpress@${version}/apps/frontend/public/notebook/`,publicZip:"https://fastly.jsdelivr.net/gh/siyuan-note/oceanpress@v0.0.7/apps/frontend/public/public.zip"},withoutPublicZip:!0};configs.__init__=!1;class PromiseObj{pending=!1;fulfilled=!1;rejected=!1;data={};error={};_p=Promise.resolve();setP(t){this._p=t}equalP(t){return this._p===t}reLoad(){}setValue(t){}}const continueLoading=Symbol();function usePromiseComputed({deps:e,getter:t,dataMergeFun:n=(s,o)=>o,defaultData:r}){const s=new PromiseObj;return r!==void 0&&(s.data=r),customRef((o,i)=>{if(!e&&t)watchEffect(()=>a(t()));else if(e&&t)if(e instanceof Function){const l=e();Array.isArray(l)&&l.length===0||watch(e,()=>a(t()),{immediate:!0})}else watch(e,()=>a(t()),{immediate:!0});function a(l){if(s.pending=!0,s.fulfilled=!1,s.rejected=!1,l===continueLoading){nextTick(i);return}s.setP(l),nextTick(i),l.then(u=>{s.equalP(l)&&(s.pending=!1,s.fulfilled=!0,s.data=n(s.data,u))}).catch(u=>{s.equalP(l)&&(s.pending=!1,s.rejected=!0,s.error=u)}).finally(()=>{s.equalP(l)&&i()})}return s.reLoad=()=>{t&&a(t())},s.setValue=l=>{s.pending=!1,s.fulfilled=!0,s.data=n(s.data,l),i()},{get(){return o(),s},set(l){console.warn("不可设置值")}}})}(e=>{function t(r){return e({deps:()=>[],getter:r})}e.nullDeps=t;function n(r){return e({getter(){return r()}})}e.fn=n})(usePromiseComputed||(usePromiseComputed={}));async function rpc(e,t){const n=currentConfig.value.apiPrefix,r=currentConfig.value.authorized;if(e==="get_assets")return fetch(`${n}/${t[0].path}`,{headers:{Authorization:`Token ${r}`},body:null,method:"GET",mode:"cors"}).then(i=>i.arrayBuffer());const s=await fetch(`${n}/api/${e.replace(/_/g,"/")}`,{headers:{Authorization:`Token ${r}`},body:JSON.stringify(t[0]),method:"POST"}).catch(i=>{throw i.message="访问思源接口时出错了,请检查思源服务是否启动以及配置接口地址是否正确。",i});if(e==="file_getFile"){const i=t[0].path;if(i.endsWith(".sy"))return await s.json();{const a=await s.arrayBuffer();if(a.byteLength<200){const u=new TextDecoder().decode(a);if(JSON.parse(u).code===404)throw new Error(`文件不存在: ${i}`)}return a}}const o=await s.json();if(o.code!==0)throw new Error(o.msg);return o.data}const API=new Proxy({},{get(e,t){return(...n)=>rpc(t,n)}}),vApi=new Proxy({},{get(e,t){return(...n)=>usePromiseComputed.fn(()=>rpc(t,n))}});/*!
49
+ * vue-router v4.5.1
50
+ * (c) 2025 Eduardo San Martin Morote
51
+ * @license MIT
52
+ */const isBrowser$1=typeof document<"u";function isRouteComponent(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function isESModule(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&isRouteComponent(e.default)}const assign=Object.assign;function applyToParams(e,t){const n={};for(const r in t){const s=t[r];n[r]=isArray$1(s)?s.map(e):e(s)}return n}const noop=()=>{},isArray$1=Array.isArray,HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(e){return encodeURI(""+e).replace(ENC_PIPE_RE,"|").replace(ENC_BRACKET_OPEN_RE,"[").replace(ENC_BRACKET_CLOSE_RE,"]")}function encodeHash(e){return commonEncode(e).replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryValue(e){return commonEncode(e).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryKey(e){return encodeQueryValue(e).replace(EQUAL_RE,"%3D")}function encodePath(e){return commonEncode(e).replace(HASH_RE,"%23").replace(IM_RE,"%3F")}function encodeParam(e){return e==null?"":encodePath(e).replace(SLASH_RE,"%2F")}function decode(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=e=>e.replace(TRAILING_SLASH_RE,"");function parseURL(e,t,n="/"){let r,s={},o="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(r=t.slice(0,l),o=t.slice(l+1,a>-1?a:t.length),s=e(o)),a>-1&&(r=r||t.slice(0,a),i=t.slice(a,t.length)),r=resolveRelativePath(r??t,n),{fullPath:r+(o&&"?")+o+i,path:r,query:s,hash:decode(i)}}function stringifyURL(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function stripBase(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function isSameRouteLocation(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&isSameRouteRecord(t.matched[r],n.matched[s])&&isSameRouteLocationParams(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function isSameRouteRecord(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function isSameRouteLocationParams(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!isSameRouteLocationParamsValue(e[n],t[n]))return!1;return!0}function isSameRouteLocationParamsValue(e,t){return isArray$1(e)?isEquivalentArray(e,t):isArray$1(t)?isEquivalentArray(t,e):e===t}function isEquivalentArray(e,t){return isArray$1(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function resolveRelativePath(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,i,a;for(i=0;i<r.length;i++)if(a=r[i],a!==".")if(a==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(i).join("/")}const START_LOCATION_NORMALIZED={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var NavigationType;(function(e){e.pop="pop",e.push="push"})(NavigationType||(NavigationType={}));var NavigationDirection;(function(e){e.back="back",e.forward="forward",e.unknown=""})(NavigationDirection||(NavigationDirection={}));function normalizeBase(e){if(!e)if(isBrowser$1){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),removeTrailingSlash(e)}const BEFORE_HASH_RE=/^[^#]+#/;function createHref(e,t){return e.replace(BEFORE_HASH_RE,"#")+t}function getElementPosition(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const computeScrollPosition=()=>({left:window.scrollX,top:window.scrollY});function scrollToPosition(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=getElementPosition(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function getScrollKey(e,t){return(history.state?history.state.position-t:-1)+e}const scrollPositions=new Map;function saveScrollPosition(e,t){scrollPositions.set(e,t)}function getSavedScrollPosition(e){const t=scrollPositions.get(e);return scrollPositions.delete(e),t}let createBaseLocation=()=>location.protocol+"//"+location.host;function createCurrentLocation(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let a=s.includes(e.slice(o))?e.slice(o).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),stripBase(l,"")}return stripBase(n,e)+r+s}function useHistoryListeners(e,t,n,r){let s=[],o=[],i=null;const a=({state:m})=>{const g=createCurrentLocation(e,location),b=n.value,S=t.value;let R=0;if(m){if(n.value=g,t.value=m,i&&i===b){i=null;return}R=S?m.position-S.position:0}else r(g);s.forEach(T=>{T(n.value,b,{delta:R,type:NavigationType.pop,direction:R?R>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function l(){i=n.value}function u(m){s.push(m);const g=()=>{const b=s.indexOf(m);b>-1&&s.splice(b,1)};return o.push(g),g}function f(){const{history:m}=window;m.state&&m.replaceState(assign({},m.state,{scroll:computeScrollPosition()}),"")}function d(){for(const m of o)m();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",f,{passive:!0}),{pauseListeners:l,listen:u,destroy:d}}function buildState(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?computeScrollPosition():null}}function useHistoryStateNavigation(e){const{history:t,location:n}=window,r={value:createCurrentLocation(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,u,f){const d=e.indexOf("#"),m=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:createBaseLocation()+e+l;try{t[f?"replaceState":"pushState"](u,"",m),s.value=u}catch(g){console.error(g),n[f?"replace":"assign"](m)}}function i(l,u){const f=assign({},t.state,buildState(s.value.back,l,s.value.forward,!0),u,{position:s.value.position});o(l,f,!0),r.value=l}function a(l,u){const f=assign({},s.value,t.state,{forward:l,scroll:computeScrollPosition()});o(f.current,f,!0);const d=assign({},buildState(r.value,l,null),{position:f.position+1},u);o(l,d,!1),r.value=l}return{location:r,state:s,push:a,replace:i}}function createWebHistory(e){e=normalizeBase(e);const t=useHistoryStateNavigation(e),n=useHistoryListeners(e,t.state,t.location,t.replace);function r(o,i=!0){i||n.pauseListeners(),history.go(o)}const s=assign({location:"",base:e,go:r,createHref:createHref.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function createWebHashHistory(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),createWebHistory(e)}function isRouteLocation(e){return typeof e=="string"||e&&typeof e=="object"}function isRouteName(e){return typeof e=="string"||typeof e=="symbol"}const NavigationFailureSymbol=Symbol("");var NavigationFailureType;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(NavigationFailureType||(NavigationFailureType={}));function createRouterError(e,t){return assign(new Error,{type:e,[NavigationFailureSymbol]:!0},t)}function isNavigationFailure(e,t){return e instanceof Error&&NavigationFailureSymbol in e&&(t==null||!!(e.type&t))}const BASE_PARAM_PATTERN="[^/]+?",BASE_PATH_PARSER_OPTIONS={sensitive:!1,strict:!1,start:!0,end:!0},REGEX_CHARS_RE=/[.+*?^${}()[\]/\\]/g;function tokensToParser(e,t){const n=assign({},BASE_PATH_PARSER_OPTIONS,t),r=[];let s=n.start?"^":"";const o=[];for(const u of e){const f=u.length?[]:[90];n.strict&&!u.length&&(s+="/");for(let d=0;d<u.length;d++){const m=u[d];let g=40+(n.sensitive?.25:0);if(m.type===0)d||(s+="/"),s+=m.value.replace(REGEX_CHARS_RE,"\\$&"),g+=40;else if(m.type===1){const{value:b,repeatable:S,optional:R,regexp:T}=m;o.push({name:b,repeatable:S,optional:R});const O=T||BASE_PARAM_PATTERN;if(O!==BASE_PARAM_PATTERN){g+=10;try{new RegExp(`(${O})`)}catch(A){throw new Error(`Invalid custom RegExp for param "${b}" (${O}): `+A.message)}}let w=S?`((?:${O})(?:/(?:${O}))*)`:`(${O})`;d||(w=R&&u.length<2?`(?:/${w})`:"/"+w),R&&(w+="?"),s+=w,g+=20,R&&(g+=-8),S&&(g+=-20),O===".*"&&(g+=-50)}f.push(g)}r.push(f)}if(n.strict&&n.end){const u=r.length-1;r[u][r[u].length-1]+=.7000000000000001}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const i=new RegExp(s,n.sensitive?"":"i");function a(u){const f=u.match(i),d={};if(!f)return null;for(let m=1;m<f.length;m++){const g=f[m]||"",b=o[m-1];d[b.name]=g&&b.repeatable?g.split("/"):g}return d}function l(u){let f="",d=!1;for(const m of e){(!d||!f.endsWith("/"))&&(f+="/"),d=!1;for(const g of m)if(g.type===0)f+=g.value;else if(g.type===1){const{value:b,repeatable:S,optional:R}=g,T=b in u?u[b]:"";if(isArray$1(T)&&!S)throw new Error(`Provided param "${b}" is an array but it is not repeatable (* or + modifiers)`);const O=isArray$1(T)?T.join("/"):T;if(!O)if(R)m.length<2&&(f.endsWith("/")?f=f.slice(0,-1):d=!0);else throw new Error(`Missing required param "${b}"`);f+=O}}return f||"/"}return{re:i,score:r,keys:o,parse:a,stringify:l}}function compareScoreArray(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function comparePathParserScore(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const o=compareScoreArray(r[n],s[n]);if(o)return o;n++}if(Math.abs(s.length-r.length)===1){if(isLastScoreNegative(r))return 1;if(isLastScoreNegative(s))return-1}return s.length-r.length}function isLastScoreNegative(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const ROOT_TOKEN={type:0,value:""},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(e){if(!e)return[[]];if(e==="/")return[[ROOT_TOKEN]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${u}": ${g}`)}let n=0,r=n;const s=[];let o;function i(){o&&s.push(o),o=[]}let a=0,l,u="",f="";function d(){u&&(n===0?o.push({type:0,value:u}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:u,regexp:f,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function m(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:l==="/"?(u&&d(),i()):l===":"?(d(),n=1):m();break;case 4:m(),n=r;break;case 1:l==="("?n=2:VALID_PARAM_RE.test(l)?m():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?f[f.length-1]=="\\"?f=f.slice(0,-1)+l:n=3:f+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,f="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),i(),s}function createRouteRecordMatcher(e,t,n){const r=tokensToParser(tokenizePath(e.path),n),s=assign(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function createRouterMatcher(e,t){const n=[],r=new Map;t=mergeOptions({strict:!1,end:!0,sensitive:!1},t);function s(d){return r.get(d)}function o(d,m,g){const b=!g,S=normalizeRouteRecord(d);S.aliasOf=g&&g.record;const R=mergeOptions(t,d),T=[S];if("alias"in d){const A=typeof d.alias=="string"?[d.alias]:d.alias;for(const K of A)T.push(normalizeRouteRecord(assign({},S,{components:g?g.record.components:S.components,path:K,aliasOf:g?g.record:S})))}let O,w;for(const A of T){const{path:K}=A;if(m&&K[0]!=="/"){const z=m.record.path,Y=z[z.length-1]==="/"?"":"/";A.path=m.record.path+(K&&Y+K)}if(O=createRouteRecordMatcher(A,m,R),g?g.alias.push(O):(w=w||O,w!==O&&w.alias.push(O),b&&d.name&&!isAliasRecord(O)&&i(d.name)),isMatchable(O)&&l(O),S.children){const z=S.children;for(let Y=0;Y<z.length;Y++)o(z[Y],O,g&&g.children[Y])}g=g||O}return w?()=>{i(w)}:noop}function i(d){if(isRouteName(d)){const m=r.get(d);m&&(r.delete(d),n.splice(n.indexOf(m),1),m.children.forEach(i),m.alias.forEach(i))}else{const m=n.indexOf(d);m>-1&&(n.splice(m,1),d.record.name&&r.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function a(){return n}function l(d){const m=findInsertionIndex(d,n);n.splice(m,0,d),d.record.name&&!isAliasRecord(d)&&r.set(d.record.name,d)}function u(d,m){let g,b={},S,R;if("name"in d&&d.name){if(g=r.get(d.name),!g)throw createRouterError(1,{location:d});R=g.record.name,b=assign(paramsFromLocation(m.params,g.keys.filter(w=>!w.optional).concat(g.parent?g.parent.keys.filter(w=>w.optional):[]).map(w=>w.name)),d.params&&paramsFromLocation(d.params,g.keys.map(w=>w.name))),S=g.stringify(b)}else if(d.path!=null)S=d.path,g=n.find(w=>w.re.test(S)),g&&(b=g.parse(S),R=g.record.name);else{if(g=m.name?r.get(m.name):n.find(w=>w.re.test(m.path)),!g)throw createRouterError(1,{location:d,currentLocation:m});R=g.record.name,b=assign({},m.params,d.params),S=g.stringify(b)}const T=[];let O=g;for(;O;)T.unshift(O.record),O=O.parent;return{name:R,path:S,params:b,matched:T,meta:mergeMetaFields(T)}}e.forEach(d=>o(d));function f(){n.length=0,r.clear()}return{addRoute:o,resolve:u,removeRoute:i,clearRoutes:f,getRoutes:a,getRecordMatcher:s}}function paramsFromLocation(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function normalizeRouteRecord(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:normalizeRecordProps(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function normalizeRecordProps(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function isAliasRecord(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function mergeMetaFields(e){return e.reduce((t,n)=>assign(t,n.meta),{})}function mergeOptions(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function findInsertionIndex(e,t){let n=0,r=t.length;for(;n!==r;){const o=n+r>>1;comparePathParserScore(e,t[o])<0?r=o:n=o+1}const s=getInsertionAncestor(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function getInsertionAncestor(e){let t=e;for(;t=t.parent;)if(isMatchable(t)&&comparePathParserScore(e,t)===0)return t}function isMatchable({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function parseQuery(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;s<r.length;++s){const o=r[s].replace(PLUS_RE," "),i=o.indexOf("="),a=decode(i<0?o:o.slice(0,i)),l=i<0?null:decode(o.slice(i+1));if(a in t){let u=t[a];isArray$1(u)||(u=t[a]=[u]),u.push(l)}else t[a]=l}return t}function stringifyQuery(e){let t="";for(let n in e){const r=e[n];if(n=encodeQueryKey(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(isArray$1(r)?r.map(o=>o&&encodeQueryValue(o)):[r&&encodeQueryValue(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function normalizeQuery(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=isArray$1(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const matchedRouteKey=Symbol(""),viewDepthKey=Symbol(""),routerKey=Symbol(""),routeLocationKey=Symbol(""),routerViewLocationKey=Symbol("");function useCallbacks(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function guardToPromiseFn(e,t,n,r,s,o=i=>i()){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const u=m=>{m===!1?l(createRouterError(4,{from:n,to:t})):m instanceof Error?l(m):isRouteLocation(m)?l(createRouterError(2,{from:t,to:m})):(i&&r.enterCallbacks[s]===i&&typeof m=="function"&&i.push(m),a())},f=o(()=>e.call(r&&r.instances[s],t,n,u));let d=Promise.resolve(f);e.length<3&&(d=d.then(u)),d.catch(m=>l(m))})}function extractComponentsGuards(e,t,n,r,s=o=>o()){const o=[];for(const i of e)for(const a in i.components){let l=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(isRouteComponent(l)){const f=(l.__vccOpts||l)[t];f&&o.push(guardToPromiseFn(f,n,r,i,a,s))}else{let u=l();o.push(()=>u.then(f=>{if(!f)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const d=isESModule(f)?f.default:f;i.mods[a]=f,i.components[a]=d;const g=(d.__vccOpts||d)[t];return g&&guardToPromiseFn(g,n,r,i,a,s)()}))}}return o}function useLink(e){const t=inject(routerKey),n=inject(routeLocationKey),r=computed(()=>{const l=unref(e.to);return t.resolve(l)}),s=computed(()=>{const{matched:l}=r.value,{length:u}=l,f=l[u-1],d=n.matched;if(!f||!d.length)return-1;const m=d.findIndex(isSameRouteRecord.bind(null,f));if(m>-1)return m;const g=getOriginalPath(l[u-2]);return u>1&&getOriginalPath(f)===g&&d[d.length-1].path!==g?d.findIndex(isSameRouteRecord.bind(null,l[u-2])):m}),o=computed(()=>s.value>-1&&includesParams(n.params,r.value.params)),i=computed(()=>s.value>-1&&s.value===n.matched.length-1&&isSameRouteLocationParams(n.params,r.value.params));function a(l={}){if(guardEvent(l)){const u=t[unref(e.replace)?"replace":"push"](unref(e.to)).catch(noop);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:r,href:computed(()=>r.value.href),isActive:o,isExactActive:i,navigate:a}}function preferSingleVNode(e){return e.length===1?e[0]:e}const RouterLinkImpl=defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink,setup(e,{slots:t}){const n=reactive(useLink(e)),{options:r}=inject(routerKey),s=computed(()=>({[getLinkClass(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[getLinkClass(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&preferSingleVNode(t.default(n));return e.custom?o:h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),RouterLink=RouterLinkImpl;function guardEvent(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function includesParams(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!isArray$1(s)||s.length!==r.length||r.some((o,i)=>o!==s[i]))return!1}return!0}function getOriginalPath(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const getLinkClass=(e,t,n)=>e??t??n,RouterViewImpl=defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=inject(routerViewLocationKey),s=computed(()=>e.route||r.value),o=inject(viewDepthKey,0),i=computed(()=>{let u=unref(o);const{matched:f}=s.value;let d;for(;(d=f[u])&&!d.components;)u++;return u}),a=computed(()=>s.value.matched[i.value]);provide(viewDepthKey,computed(()=>i.value+1)),provide(matchedRouteKey,a),provide(routerViewLocationKey,s);const l=ref();return watch(()=>[l.value,a.value,e.name],([u,f,d],[m,g,b])=>{f&&(f.instances[d]=u,g&&g!==f&&u&&u===m&&(f.leaveGuards.size||(f.leaveGuards=g.leaveGuards),f.updateGuards.size||(f.updateGuards=g.updateGuards))),u&&f&&(!g||!isSameRouteRecord(f,g)||!m)&&(f.enterCallbacks[d]||[]).forEach(S=>S(u))},{flush:"post"}),()=>{const u=s.value,f=e.name,d=a.value,m=d&&d.components[f];if(!m)return normalizeSlot(n.default,{Component:m,route:u});const g=d.props[f],b=g?g===!0?u.params:typeof g=="function"?g(u):g:null,R=h(m,assign({},b,t,{onVnodeUnmounted:T=>{T.component.isUnmounted&&(d.instances[f]=null)},ref:l}));return normalizeSlot(n.default,{Component:R,route:u})||R}}});function normalizeSlot(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const RouterView=RouterViewImpl;function createRouter(e){const t=createRouterMatcher(e.routes,e),n=e.parseQuery||parseQuery,r=e.stringifyQuery||stringifyQuery,s=e.history,o=useCallbacks(),i=useCallbacks(),a=useCallbacks(),l=shallowRef(START_LOCATION_NORMALIZED);let u=START_LOCATION_NORMALIZED;isBrowser$1&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=applyToParams.bind(null,E=>""+E),d=applyToParams.bind(null,encodeParam),m=applyToParams.bind(null,decode);function g(E,B){let L,j;return isRouteName(E)?(L=t.getRecordMatcher(E),j=B):j=E,t.addRoute(j,L)}function b(E){const B=t.getRecordMatcher(E);B&&t.removeRoute(B)}function S(){return t.getRoutes().map(E=>E.record)}function R(E){return!!t.getRecordMatcher(E)}function T(E,B){if(B=assign({},B||l.value),typeof E=="string"){const $=parseURL(n,E,B.path),v=t.resolve({path:$.path},B),I=s.createHref($.fullPath);return assign($,v,{params:m(v.params),hash:decode($.hash),redirectedFrom:void 0,href:I})}let L;if(E.path!=null)L=assign({},E,{path:parseURL(n,E.path,B.path).path});else{const $=assign({},E.params);for(const v in $)$[v]==null&&delete $[v];L=assign({},E,{params:d($)}),B.params=d(B.params)}const j=t.resolve(L,B),re=E.hash||"";j.params=f(m(j.params));const y=stringifyURL(r,assign({},E,{hash:encodeHash(re),path:j.path})),_=s.createHref(y);return assign({fullPath:y,hash:re,query:r===stringifyQuery?normalizeQuery(E.query):E.query||{}},j,{redirectedFrom:void 0,href:_})}function O(E){return typeof E=="string"?parseURL(n,E,l.value.path):assign({},E)}function w(E,B){if(u!==E)return createRouterError(8,{from:B,to:E})}function A(E){return Y(E)}function K(E){return A(assign(O(E),{replace:!0}))}function z(E){const B=E.matched[E.matched.length-1];if(B&&B.redirect){const{redirect:L}=B;let j=typeof L=="function"?L(E):L;return typeof j=="string"&&(j=j.includes("?")||j.includes("#")?j=O(j):{path:j},j.params={}),assign({query:E.query,hash:E.hash,params:j.path!=null?{}:E.params},j)}}function Y(E,B){const L=u=T(E),j=l.value,re=E.state,y=E.force,_=E.replace===!0,$=z(L);if($)return Y(assign(O($),{state:typeof $=="object"?assign({},re,$.state):re,force:y,replace:_}),B||L);const v=L;v.redirectedFrom=B;let I;return!y&&isSameRouteLocation(r,j,L)&&(I=createRouterError(16,{to:v,from:j}),ie(j,j,!0,!1)),(I?Promise.resolve(I):U(v,j)).catch(C=>isNavigationFailure(C)?isNavigationFailure(C,2)?C:pe(C):Z(C,v,j)).then(C=>{if(C){if(isNavigationFailure(C,2))return Y(assign({replace:_},O(C.to),{state:typeof C.to=="object"?assign({},re,C.to.state):re,force:y}),B||v)}else C=M(v,j,!0,_,re);return W(v,j,C),C})}function q(E,B){const L=w(E,B);return L?Promise.reject(L):Promise.resolve()}function N(E){const B=be.values().next().value;return B&&typeof B.runWithContext=="function"?B.runWithContext(E):E()}function U(E,B){let L;const[j,re,y]=extractChangingRecords(E,B);L=extractComponentsGuards(j.reverse(),"beforeRouteLeave",E,B);for(const $ of j)$.leaveGuards.forEach(v=>{L.push(guardToPromiseFn(v,E,B))});const _=q.bind(null,E,B);return L.push(_),de(L).then(()=>{L=[];for(const $ of o.list())L.push(guardToPromiseFn($,E,B));return L.push(_),de(L)}).then(()=>{L=extractComponentsGuards(re,"beforeRouteUpdate",E,B);for(const $ of re)$.updateGuards.forEach(v=>{L.push(guardToPromiseFn(v,E,B))});return L.push(_),de(L)}).then(()=>{L=[];for(const $ of y)if($.beforeEnter)if(isArray$1($.beforeEnter))for(const v of $.beforeEnter)L.push(guardToPromiseFn(v,E,B));else L.push(guardToPromiseFn($.beforeEnter,E,B));return L.push(_),de(L)}).then(()=>(E.matched.forEach($=>$.enterCallbacks={}),L=extractComponentsGuards(y,"beforeRouteEnter",E,B,N),L.push(_),de(L))).then(()=>{L=[];for(const $ of i.list())L.push(guardToPromiseFn($,E,B));return L.push(_),de(L)}).catch($=>isNavigationFailure($,8)?$:Promise.reject($))}function W(E,B,L){a.list().forEach(j=>N(()=>j(E,B,L)))}function M(E,B,L,j,re){const y=w(E,B);if(y)return y;const _=B===START_LOCATION_NORMALIZED,$=isBrowser$1?history.state:{};L&&(j||_?s.replace(E.fullPath,assign({scroll:_&&$&&$.scroll},re)):s.push(E.fullPath,re)),l.value=E,ie(E,B,L,_),pe()}let Q;function ne(){Q||(Q=s.listen((E,B,L)=>{if(!$e.listening)return;const j=T(E),re=z(j);if(re){Y(assign(re,{replace:!0,force:!0}),j).catch(noop);return}u=j;const y=l.value;isBrowser$1&&saveScrollPosition(getScrollKey(y.fullPath,L.delta),computeScrollPosition()),U(j,y).catch(_=>isNavigationFailure(_,12)?_:isNavigationFailure(_,2)?(Y(assign(O(_.to),{force:!0}),j).then($=>{isNavigationFailure($,20)&&!L.delta&&L.type===NavigationType.pop&&s.go(-1,!1)}).catch(noop),Promise.reject()):(L.delta&&s.go(-L.delta,!1),Z(_,j,y))).then(_=>{_=_||M(j,y,!1),_&&(L.delta&&!isNavigationFailure(_,8)?s.go(-L.delta,!1):L.type===NavigationType.pop&&isNavigationFailure(_,20)&&s.go(-1,!1)),W(j,y,_)}).catch(noop)}))}let oe=useCallbacks(),X=useCallbacks(),J;function Z(E,B,L){pe(E);const j=X.list();return j.length?j.forEach(re=>re(E,B,L)):console.error(E),Promise.reject(E)}function ae(){return J&&l.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise((E,B)=>{oe.add([E,B])})}function pe(E){return J||(J=!E,ne(),oe.list().forEach(([B,L])=>E?L(E):B()),oe.reset()),E}function ie(E,B,L,j){const{scrollBehavior:re}=e;if(!isBrowser$1||!re)return Promise.resolve();const y=!L&&getSavedScrollPosition(getScrollKey(E.fullPath,0))||(j||!L)&&history.state&&history.state.scroll||null;return nextTick().then(()=>re(E,B,y)).then(_=>_&&scrollToPosition(_)).catch(_=>Z(_,E,B))}const ce=E=>s.go(E);let ye;const be=new Set,$e={currentRoute:l,listening:!0,addRoute:g,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:R,getRoutes:S,resolve:T,options:e,push:A,replace:K,go:ce,back:()=>ce(-1),forward:()=>ce(1),beforeEach:o.add,beforeResolve:i.add,afterEach:a.add,onError:X.add,isReady:ae,install(E){const B=this;E.component("RouterLink",RouterLink),E.component("RouterView",RouterView),E.config.globalProperties.$router=B,Object.defineProperty(E.config.globalProperties,"$route",{enumerable:!0,get:()=>unref(l)}),isBrowser$1&&!ye&&l.value===START_LOCATION_NORMALIZED&&(ye=!0,A(s.location).catch(re=>{}));const L={};for(const re in START_LOCATION_NORMALIZED)Object.defineProperty(L,re,{get:()=>l.value[re],enumerable:!0});E.provide(routerKey,B),E.provide(routeLocationKey,shallowReactive(L)),E.provide(routerViewLocationKey,l);const j=E.unmount;be.add(E),E.unmount=function(){be.delete(E),be.size<1&&(u=START_LOCATION_NORMALIZED,Q&&Q(),Q=null,l.value=START_LOCATION_NORMALIZED,ye=!1,J=!1),j()}}};function de(E){return E.reduce((B,L)=>B.then(()=>N(L)),Promise.resolve())}return $e}function extractChangingRecords(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;i<o;i++){const a=t.matched[i];a&&(e.matched.find(u=>isSameRouteRecord(u,a))?r.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(u=>isSameRouteRecord(u,l))||s.push(l))}return[n,r,s]}function plugin$1(e){let t=".",n="__",r="--",s;if(e){let b=e.blockPrefix;b&&(t=b),b=e.elementPrefix,b&&(n=b),b=e.modifierPrefix,b&&(r=b)}const o={install(b){s=b.c;const S=b.context;S.bem={},S.bem.b=null,S.bem.els=null}};function i(b){let S,R;return{before(T){S=T.bem.b,R=T.bem.els,T.bem.els=null},after(T){T.bem.b=S,T.bem.els=R},$({context:T,props:O}){return b=typeof b=="string"?b:b({context:T,props:O}),T.bem.b=b,`${O?.bPrefix||t}${T.bem.b}`}}}function a(b){let S;return{before(R){S=R.bem.els},after(R){R.bem.els=S},$({context:R,props:T}){return b=typeof b=="string"?b:b({context:R,props:T}),R.bem.els=b.split(",").map(O=>O.trim()),R.bem.els.map(O=>`${T?.bPrefix||t}${R.bem.b}${n}${O}`).join(", ")}}}function l(b){return{$({context:S,props:R}){b=typeof b=="string"?b:b({context:S,props:R});const T=b.split(",").map(A=>A.trim());function O(A){return T.map(K=>`&${R?.bPrefix||t}${S.bem.b}${A!==void 0?`${n}${A}`:""}${r}${K}`).join(", ")}const w=S.bem.els;return w!==null?O(w[0]):O()}}}function u(b){return{$({context:S,props:R}){b=typeof b=="string"?b:b({context:S,props:R});const T=S.bem.els;return`&:not(${R?.bPrefix||t}${S.bem.b}${T!==null&&T.length>0?`${n}${T[0]}`:""}${r}${b})`}}}return Object.assign(o,{cB:(...b)=>s(i(b[0]),b[1],b[2]),cE:(...b)=>s(a(b[0]),b[1],b[2]),cM:(...b)=>s(l(b[0]),b[1],b[2]),cNotM:(...b)=>s(u(b[0]),b[1],b[2])}),o}function ampCount(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const separatorRegex=/\s*,(?![^(]*\))\s*/g,extraSpaceRegex=/\s+/g;function resolveSelectorWithAmp(e,t){const n=[];return t.split(separatorRegex).forEach(r=>{let s=ampCount(r);if(s){if(s===1){e.forEach(i=>{n.push(r.replace("&",i))});return}}else{e.forEach(i=>{n.push((i&&i+" ")+r)});return}let o=[r];for(;s--;){const i=[];o.forEach(a=>{e.forEach(l=>{i.push(a.replace("&",l))})}),o=i}o.forEach(i=>n.push(i))}),n}function resolveSelector(e,t){const n=[];return t.split(separatorRegex).forEach(r=>{e.forEach(s=>{n.push((s&&s+" ")+r)})}),n}function parseSelectorPath(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=resolveSelectorWithAmp(t,n):t=resolveSelector(t,n))}),t.join(", ").replace(extraSpaceRegex," ")}function removeElement(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function queryElement(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function createElement(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function isMediaOrSupports(e){return e?/^\s*@(s|m)/.test(e):!1}const kebabRegex=/[A-Z]/g;function kebabCase(e){return e.replace(kebabRegex,t=>"-"+t.toLowerCase())}function unwrapProperty(e,t=" "){return typeof e=="object"&&e!==null?` {
53
+ `+Object.entries(e).map(n=>t+` ${kebabCase(n[0])}: ${n[1]};`).join(`
54
+ `)+`
55
+ `+t+"}":`: ${e};`}function unwrapProperties(e,t,n){return typeof e=="function"?e({context:t.context,props:n}):e}function createStyle(e,t,n,r){if(!t)return"";const s=unwrapProperties(t,n,r);if(!s)return"";if(typeof s=="string")return`${e} {
56
+ ${s}
57
+ }`;const o=Object.keys(s);if(o.length===0)return n.config.keepEmptyBlock?e+` {
58
+ }`:"";const i=e?[e+" {"]:[];return o.forEach(a=>{const l=s[a];if(a==="raw"){i.push(`
59
+ `+l+`
60
+ `);return}a=kebabCase(a),l!=null&&i.push(` ${a}${unwrapProperty(l)}`)}),e&&i.push("}"),i.join(`
61
+ `)}function loopCNodeListWithCallback(e,t,n){e&&e.forEach(r=>{if(Array.isArray(r))loopCNodeListWithCallback(r,t,n);else if(typeof r=="function"){const s=r(t);Array.isArray(s)?loopCNodeListWithCallback(s,t,n):s&&n(s)}else r&&n(r)})}function traverseCNode(e,t,n,r,s){const o=e.$;let i="";if(!o||typeof o=="string")isMediaOrSupports(o)?i=o:t.push(o);else if(typeof o=="function"){const u=o({context:r.context,props:s});isMediaOrSupports(u)?i=u:t.push(u)}else if(o.before&&o.before(r.context),!o.$||typeof o.$=="string")isMediaOrSupports(o.$)?i=o.$:t.push(o.$);else if(o.$){const u=o.$({context:r.context,props:s});isMediaOrSupports(u)?i=u:t.push(u)}const a=parseSelectorPath(t),l=createStyle(a,e.props,r,s);i?n.push(`${i} {`):l.length&&n.push(l),e.children&&loopCNodeListWithCallback(e.children,{context:r.context,props:s},u=>{if(typeof u=="string"){const f=createStyle(a,{raw:u},r,s);n.push(f)}else traverseCNode(u,t,n,r,s)}),t.pop(),i&&n.push("}"),o&&o.after&&o.after(r.context)}function render$1(e,t,n){const r=[];return traverseCNode(e,[],r,t,n),r.join(`
62
+
63
+ `)}function murmur2(e){for(var t=0,n,r=0,s=e.length;s>=4;++r,s-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function unmount(e,t,n,r){const{els:s}=t;if(n===void 0)s.forEach(removeElement),t.els=[];else{const o=queryElement(n,r);o&&s.includes(o)&&(removeElement(o),t.els=s.filter(i=>i!==o))}}function addElementToList(e,t){e.push(t)}function mount(e,t,n,r,s,o,i,a,l){let u;if(n===void 0&&(u=t.render(r),n=murmur2(u)),l){l.adapter(n,u??t.render(r));return}a===void 0&&(a=document.head);const f=queryElement(n,a);if(f!==null&&!o)return f;const d=f??createElement(n);if(u===void 0&&(u=t.render(r)),d.textContent=u,f!==null)return f;if(i){const m=a.querySelector(`meta[name="${i}"]`);if(m)return a.insertBefore(d,m),addElementToList(t.els,d),d}return s?a.insertBefore(d,a.querySelector("style, link")):a.appendChild(d),addElementToList(t.els,d),d}function wrappedRender(e){return render$1(this,this.instance,e)}function wrappedMount(e={}){const{id:t,ssr:n,props:r,head:s=!1,force:o=!1,anchorMetaName:i,parent:a}=e;return mount(this.instance,this,t,r,s,o,i,a,n)}function wrappedUnmount(e={}){const{id:t,parent:n}=e;unmount(this.instance,this,t,n)}const createCNode=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:wrappedRender,mount:wrappedMount,unmount:wrappedUnmount}},c$1=function(e,t,n,r){return Array.isArray(t)?createCNode(e,{$:null},null,t):Array.isArray(n)?createCNode(e,t,null,n):Array.isArray(r)?createCNode(e,t,n,r):createCNode(e,t,n,null)};function CssRender(e={}){const t={c:(...n)=>c$1(t,...n),use:(n,...r)=>n.install(t,...r),find:queryElement,context:{},config:e};return t}function exists(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return queryElement(e)!==null}const namespace="n",prefix$1=`.${namespace}-`,elementPrefix="__",modifierPrefix="--",cssr=CssRender(),plugin=plugin$1({blockPrefix:prefix$1,elementPrefix,modifierPrefix});cssr.use(plugin);const{c,find}=cssr,{cB,cE,cM,cNotM}=plugin;function insideModal(e){return c(({props:{bPrefix:t}})=>`${t||prefix$1}modal, ${t||prefix$1}drawer`,[e])}function insidePopover(e){return c(({props:{bPrefix:t}})=>`${t||prefix$1}popover`,[e])}function asModal(e){return c(({props:{bPrefix:t}})=>`&${t||prefix$1}modal`,e)}function createKey(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}const colors={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#0FF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000",blanchedalmond:"#FFEBCD",blue:"#00F",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#0FF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#F0F",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#0F0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#F0F",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#F00",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFF",whitesmoke:"#F5F5F5",yellow:"#FF0",yellowgreen:"#9ACD32",transparent:"#0000"};function hsv2rgb(e,t,n){t/=100,n/=100;let r=(s,o=(s+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5)*255,r(3)*255,r(1)*255]}function hsl2rgb(e,t,n){t/=100,n/=100;let r=t*Math.min(n,1-n),s=(o,i=(o+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[s(0)*255,s(8)*255,s(4)*255]}const prefix="^\\s*",suffix="\\s*$",percent="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",float="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",hex="([0-9A-Fa-f])",dhex="([0-9A-Fa-f]{2})",hslRegex=new RegExp(`${prefix}hsl\\s*\\(${float},${percent},${percent}\\)${suffix}`),hsvRegex=new RegExp(`${prefix}hsv\\s*\\(${float},${percent},${percent}\\)${suffix}`),hslaRegex=new RegExp(`${prefix}hsla\\s*\\(${float},${percent},${percent},${float}\\)${suffix}`),hsvaRegex=new RegExp(`${prefix}hsva\\s*\\(${float},${percent},${percent},${float}\\)${suffix}`),rgbRegex=new RegExp(`${prefix}rgb\\s*\\(${float},${float},${float}\\)${suffix}`),rgbaRegex=new RegExp(`${prefix}rgba\\s*\\(${float},${float},${float},${float}\\)${suffix}`),sHexRegex=new RegExp(`${prefix}#${hex}${hex}${hex}${suffix}`),hexRegex=new RegExp(`${prefix}#${dhex}${dhex}${dhex}${suffix}`),sHexaRegex=new RegExp(`${prefix}#${hex}${hex}${hex}${hex}${suffix}`),hexaRegex=new RegExp(`${prefix}#${dhex}${dhex}${dhex}${dhex}${suffix}`);function parseHex(e){return parseInt(e,16)}function hsla(e){try{let t;if(t=hslaRegex.exec(e))return[roundDeg(t[1]),roundPercent(t[5]),roundPercent(t[9]),roundAlpha(t[13])];if(t=hslRegex.exec(e))return[roundDeg(t[1]),roundPercent(t[5]),roundPercent(t[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(t){throw t}}function hsva(e){try{let t;if(t=hsvaRegex.exec(e))return[roundDeg(t[1]),roundPercent(t[5]),roundPercent(t[9]),roundAlpha(t[13])];if(t=hsvRegex.exec(e))return[roundDeg(t[1]),roundPercent(t[5]),roundPercent(t[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(t){throw t}}function rgba(e){try{let t;if(t=hexRegex.exec(e))return[parseHex(t[1]),parseHex(t[2]),parseHex(t[3]),1];if(t=rgbRegex.exec(e))return[roundChannel(t[1]),roundChannel(t[5]),roundChannel(t[9]),1];if(t=rgbaRegex.exec(e))return[roundChannel(t[1]),roundChannel(t[5]),roundChannel(t[9]),roundAlpha(t[13])];if(t=sHexRegex.exec(e))return[parseHex(t[1]+t[1]),parseHex(t[2]+t[2]),parseHex(t[3]+t[3]),1];if(t=hexaRegex.exec(e))return[parseHex(t[1]),parseHex(t[2]),parseHex(t[3]),roundAlpha(parseHex(t[4])/255)];if(t=sHexaRegex.exec(e))return[parseHex(t[1]+t[1]),parseHex(t[2]+t[2]),parseHex(t[3]+t[3]),roundAlpha(parseHex(t[4]+t[4])/255)];if(e in colors)return rgba(colors[e]);if(hslRegex.test(e)||hslaRegex.test(e)){const[n,r,s,o]=hsla(e);return[...hsl2rgb(n,r,s),o]}else if(hsvRegex.test(e)||hsvaRegex.test(e)){const[n,r,s,o]=hsva(e);return[...hsv2rgb(n,r,s),o]}throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function normalizeAlpha(e){return e>1?1:e<0?0:e}function stringifyRgba(e,t,n,r){return`rgba(${roundChannel(e)}, ${roundChannel(t)}, ${roundChannel(n)}, ${normalizeAlpha(r)})`}function compositeChannel(e,t,n,r,s){return roundChannel((e*t*(1-r)+n*r)/s)}function composite(e,t){Array.isArray(e)||(e=rgba(e)),Array.isArray(t)||(t=rgba(t));const n=e[3],r=t[3],s=roundAlpha(n+r-n*r);return stringifyRgba(compositeChannel(e[0],n,t[0],r,s),compositeChannel(e[1],n,t[1],r,s),compositeChannel(e[2],n,t[2],r,s),s)}function changeColor(e,t){const[n,r,s,o=1]=Array.isArray(e)?e:rgba(e);return typeof t.alpha=="number"?stringifyRgba(n,r,s,t.alpha):stringifyRgba(n,r,s,o)}function scaleColor(e,t){const[n,r,s,o=1]=Array.isArray(e)?e:rgba(e),{lightness:i=1,alpha:a=1}=t;return toRgbaString([n*i,r*i,s*i,o*a])}function roundAlpha(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function roundDeg(e){const t=Math.round(Number(e));return t>=360||t<0?0:t}function roundChannel(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function roundPercent(e){const t=Math.round(Number(e));return t>100?100:t<0?0:t}function toRgbaString(e){const[t,n,r]=e;return 3 in e?`rgba(${roundChannel(t)}, ${roundChannel(n)}, ${roundChannel(r)}, ${roundAlpha(e[3])})`:`rgba(${roundChannel(t)}, ${roundChannel(n)}, ${roundChannel(r)}, 1)`}function createId(e=8){return Math.random().toString(16).slice(2,2+e)}function isMounted(){const e=ref(!1);return onMounted(()=>{e.value=!0}),readonly(e)}function createInjectionKey(e){return e}const ssrContextKey="@css-render/vue3-ssr";function createStyleString(e,t){return`<style cssr-id="${e}">
64
+ ${t}
65
+ </style>`}function ssrAdapter(e,t,n){const{styles:r,ids:s}=n;s.has(e)||r!==null&&(s.add(e),r.push(createStyleString(e,t)))}const isBrowser=typeof document<"u";function useSsrAdapter(){if(isBrowser)return;const e=inject(ssrContextKey,null);if(e!==null)return{adapter:(t,n)=>ssrAdapter(t,n,e),context:e}}function warn(e,t){console.error(`[naive/${e}]: ${t}`)}function throwError(e,t){throw new Error(`[naive/${e}]: ${t}`)}function omit(e,t=[],n){const r={};return Object.getOwnPropertyNames(e).forEach(o=>{t.includes(o)||(r[o]=e[o])}),Object.assign(r,n)}function render(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?createTextVNode(e):typeof e=="number"?createTextVNode(String(e)):null}const configProviderInjectionKey="n-config-provider",defaultClsPrefix="n";function useConfig(e={},t={defaultBordered:!0}){const n=inject(configProviderInjectionKey,null);return{inlineThemeDisabled:n?.inlineThemeDisabled,mergedRtlRef:n?.mergedRtlRef,mergedComponentPropsRef:n?.mergedComponentPropsRef,mergedBreakpointsRef:n?.mergedBreakpointsRef,mergedBorderedRef:computed(()=>{var r,s;const{bordered:o}=e;return o!==void 0?o:(s=(r=n?.mergedBorderedRef.value)!==null&&r!==void 0?r:t.defaultBordered)!==null&&s!==void 0?s:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:shallowRef(defaultClsPrefix),namespaceRef:computed(()=>n?.mergedNamespaceRef.value)}}function useThemeClass(e,t,n,r){n||throwError("useThemeClass","cssVarsRef is not passed");const s=inject(configProviderInjectionKey,null),o=s?.mergedThemeHashRef,i=s?.styleMountTarget,a=ref(""),l=useSsrAdapter();let u;const f=`__${e}`,d=()=>{let m=f;const g=t?t.value:void 0,b=o?.value;b&&(m+=`-${b}`),g&&(m+=`-${g}`);const{themeOverrides:S,builtinThemeOverrides:R}=r;S&&(m+=`-${murmur2(JSON.stringify(S))}`),R&&(m+=`-${murmur2(JSON.stringify(R))}`),a.value=m,u=()=>{const T=n.value;let O="";for(const w in T)O+=`${w}: ${T[w]};`;c(`.${m}`,O).mount({id:m,ssr:l,parent:i}),u=void 0}};return watchEffect(()=>{d()}),{themeClass:a,onRender:()=>{u?.()}}}var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),Symbol$1=root.Symbol,objectProto$9=Object.prototype,hasOwnProperty$7=objectProto$9.hasOwnProperty,nativeObjectToString$1=objectProto$9.toString,symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(e){var t=hasOwnProperty$7.call(e,symToStringTag$1),n=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var r=!0}catch{}var s=nativeObjectToString$1.call(e);return r&&(t?e[symToStringTag$1]=n:delete e[symToStringTag$1]),s}var objectProto$8=Object.prototype,nativeObjectToString=objectProto$8.toString;function objectToString(e){return nativeObjectToString.call(e)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(e){return e==null?e===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}function isObjectLike(e){return e!=null&&typeof e=="object"}var symbolTag="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||isObjectLike(e)&&baseGetTag(e)==symbolTag}function arrayMap(e,t){for(var n=-1,r=e==null?0:e.length,s=Array(r);++n<r;)s[n]=t(e[n],n,e);return s}var isArray=Array.isArray,symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString(e){if(typeof e=="string")return e;if(isArray(e))return arrayMap(e,baseToString)+"";if(isSymbol(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function isObject(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function identity(e){return e}var asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==funcTag$1||t==genTag||t==asyncTag||t==proxyTag}var coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource(e){if(e!=null){try{return funcToString$2.call(e)}catch{}try{return e+""}catch{}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$7=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$6=objectProto$7.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$6).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(e){if(!isObject(e)||isMasked(e))return!1;var t=isFunction(e)?reIsNative:reIsHostCtor;return t.test(toSource(e))}function getValue(e,t){return e?.[t]}function getNative(e,t){var n=getValue(e,t);return baseIsNative(n)?n:void 0}var objectCreate=Object.create,baseCreate=function(){function e(){}return function(t){if(!isObject(t))return{};if(objectCreate)return objectCreate(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function apply(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function copyArray(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut(e){var t=0,n=0;return function(){var r=nativeNow(),s=HOT_SPAN-(r-n);if(n=r,s>0){if(++t>=HOT_COUNT)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function constant(e){return function(){return e}}var defineProperty=function(){try{var e=getNative(Object,"defineProperty");return e({},"",{}),e}catch{}}(),baseSetToString=defineProperty?function(e,t){return defineProperty(e,"toString",{configurable:!0,enumerable:!1,value:constant(t),writable:!0})}:identity,setToString=shortOut(baseSetToString),MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(e,t){var n=typeof e;return t=t??MAX_SAFE_INTEGER$1,!!t&&(n=="number"||n!="symbol"&&reIsUint.test(e))&&e>-1&&e%1==0&&e<t}function baseAssignValue(e,t,n){t=="__proto__"&&defineProperty?defineProperty(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function eq(e,t){return e===t||e!==e&&t!==t}var objectProto$6=Object.prototype,hasOwnProperty$5=objectProto$6.hasOwnProperty;function assignValue(e,t,n){var r=e[t];(!(hasOwnProperty$5.call(e,t)&&eq(r,n))||n===void 0&&!(t in e))&&baseAssignValue(e,t,n)}function copyObject(e,t,n,r){var s=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],l=void 0;l===void 0&&(l=e[a]),s?baseAssignValue(n,a,l):assignValue(n,a,l)}return n}var nativeMax=Math.max;function overRest(e,t,n){return t=nativeMax(t===void 0?e.length-1:t,0),function(){for(var r=arguments,s=-1,o=nativeMax(r.length-t,0),i=Array(o);++s<o;)i[s]=r[t+s];s=-1;for(var a=Array(t+1);++s<t;)a[s]=r[s];return a[t]=n(i),apply(e,this,a)}}function baseRest(e,t){return setToString(overRest(e,t,identity),e+"")}var MAX_SAFE_INTEGER=9007199254740991;function isLength(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER}function isArrayLike(e){return e!=null&&isLength(e.length)&&!isFunction(e)}function isIterateeCall(e,t,n){if(!isObject(n))return!1;var r=typeof t;return(r=="number"?isArrayLike(n)&&isIndex(t,n.length):r=="string"&&t in n)?eq(n[t],e):!1}function createAssigner(e){return baseRest(function(t,n){var r=-1,s=n.length,o=s>1?n[s-1]:void 0,i=s>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(s--,o):void 0,i&&isIterateeCall(n[0],n[1],i)&&(o=s<3?void 0:o,s=1),t=Object(t);++r<s;){var a=n[r];a&&e(t,a,r,o)}return t})}var objectProto$5=Object.prototype;function isPrototype(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||objectProto$5;return e===n}function baseTimes(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var argsTag$1="[object Arguments]";function baseIsArguments(e){return isObjectLike(e)&&baseGetTag(e)==argsTag$1}var objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty,propertyIsEnumerable=objectProto$4.propertyIsEnumerable,isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike(e)&&hasOwnProperty$4.call(e,"callee")&&!propertyIsEnumerable.call(e,"callee")};function stubFalse(){return!1}var freeExports$2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$2=freeExports$2&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$2=freeModule$2&&freeModule$2.exports===freeExports$2,Buffer$1=moduleExports$2?root.Buffer:void 0,nativeIsBuffer=Buffer$1?Buffer$1.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag$1="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag$1]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;function baseIsTypedArray(e){return isObjectLike(e)&&isLength(e.length)&&!!typedArrayTags[baseGetTag(e)]}function baseUnary(e){return function(t){return e(t)}}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,freeProcess=moduleExports$1&&freeGlobal.process,nodeUtil=function(){try{var e=freeModule$1&&freeModule$1.require&&freeModule$1.require("util").types;return e||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;function arrayLikeKeys(e,t){var n=isArray(e),r=!n&&isArguments(e),s=!n&&!r&&isBuffer(e),o=!n&&!r&&!s&&isTypedArray(e),i=n||r||s||o,a=i?baseTimes(e.length,String):[],l=a.length;for(var u in e)i&&(u=="length"||s&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||isIndex(u,l))||a.push(u);return a}function overArg(e,t){return function(n){return e(t(n))}}function nativeKeysIn(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var objectProto$3=Object.prototype,hasOwnProperty$3=objectProto$3.hasOwnProperty;function baseKeysIn(e){if(!isObject(e))return nativeKeysIn(e);var t=isPrototype(e),n=[];for(var r in e)r=="constructor"&&(t||!hasOwnProperty$3.call(e,r))||n.push(r);return n}function keysIn(e){return isArrayLike(e)?arrayLikeKeys(e):baseKeysIn(e)}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty;function hashGet(e){var t=this.__data__;if(nativeCreate){var n=t[e];return n===HASH_UNDEFINED$1?void 0:n}return hasOwnProperty$2.call(t,e)?t[e]:void 0}var objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashHas(e){var t=this.__data__;return nativeCreate?t[e]!==void 0:hasOwnProperty$1.call(t,e)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=nativeCreate&&t===void 0?HASH_UNDEFINED:t,this}function Hash(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Hash.prototype.clear=hashClear;Hash.prototype.delete=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function listCacheClear(){this.__data__=[],this.size=0}function assocIndexOf(e,t){for(var n=e.length;n--;)if(eq(e[n][0],t))return n;return-1}var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(e){var t=this.__data__,n=assocIndexOf(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():splice.call(t,n,1),--this.size,!0}function listCacheGet(e){var t=this.__data__,n=assocIndexOf(t,e);return n<0?void 0:t[n][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var n=this.__data__,r=assocIndexOf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ListCache(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ListCache.prototype.clear=listCacheClear;ListCache.prototype.delete=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;var Map$1=getNative(root,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function getMapData(e,t){var n=e.__data__;return isKeyable(t)?n[typeof t=="string"?"string":"hash"]:n.map}function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){var n=getMapData(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function MapCache(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}MapCache.prototype.clear=mapCacheClear;MapCache.prototype.delete=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;function toString(e){return e==null?"":baseToString(e)}var getPrototype=overArg(Object.getPrototypeOf,Object),objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject(e){if(!isObjectLike(e)||baseGetTag(e)!=objectTag)return!1;var t=getPrototype(e);if(t===null)return!0;var n=hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&funcToString.call(n)==objectCtorString}function baseSlice(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++r<s;)o[r]=e[r+t];return o}function castSlice(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:baseSlice(e,t,n)}var rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsVarRange$1="\\ufe0e\\ufe0f",rsZWJ$1="\\u200d",reHasUnicode=RegExp("["+rsZWJ$1+rsAstralRange$1+rsComboRange$1+rsVarRange$1+"]");function hasUnicode(e){return reHasUnicode.test(e)}function asciiToArray(e){return e.split("")}var rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsVarRange="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange+"]",rsCombo="["+rsComboRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ="\\u200d",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g");function unicodeToArray(e){return e.match(reUnicode)||[]}function stringToArray(e){return hasUnicode(e)?unicodeToArray(e):asciiToArray(e)}function createCaseFirst(e){return function(t){t=toString(t);var n=hasUnicode(t)?stringToArray(t):void 0,r=n?n[0]:t.charAt(0),s=n?castSlice(n,1).join(""):t.slice(1);return r[e]()+s}}var upperFirst=createCaseFirst("toUpperCase");function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function stackGet(e){return this.__data__.get(e)}function stackHas(e){return this.__data__.has(e)}var LARGE_ARRAY_SIZE=200;function stackSet(e,t){var n=this.__data__;if(n instanceof ListCache){var r=n.__data__;if(!Map$1||r.length<LARGE_ARRAY_SIZE-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new MapCache(r)}return n.set(e,t),this.size=n.size,this}function Stack(e){var t=this.__data__=new ListCache(e);this.size=t.size}Stack.prototype.clear=stackClear;Stack.prototype.delete=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,Buffer=moduleExports?root.Buffer:void 0;Buffer&&Buffer.allocUnsafe;function cloneBuffer(e,t){return e.slice()}var Uint8Array$1=root.Uint8Array;function cloneArrayBuffer(e){var t=new e.constructor(e.byteLength);return new Uint8Array$1(t).set(new Uint8Array$1(e)),t}function cloneTypedArray(e,t){var n=cloneArrayBuffer(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function initCloneObject(e){return typeof e.constructor=="function"&&!isPrototype(e)?baseCreate(getPrototype(e)):{}}function createBaseFor(e){return function(t,n,r){for(var s=-1,o=Object(t),i=r(t),a=i.length;a--;){var l=i[++s];if(n(o[l],l,o)===!1)break}return t}}var baseFor=createBaseFor();function assignMergeValue(e,t,n){(n!==void 0&&!eq(e[t],n)||n===void 0&&!(t in e))&&baseAssignValue(e,t,n)}function isArrayLikeObject(e){return isObjectLike(e)&&isArrayLike(e)}function safeGet(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function toPlainObject(e){return copyObject(e,keysIn(e))}function baseMergeDeep(e,t,n,r,s,o,i){var a=safeGet(e,n),l=safeGet(t,n),u=i.get(l);if(u){assignMergeValue(e,n,u);return}var f=o?o(a,l,n+"",e,t,i):void 0,d=f===void 0;if(d){var m=isArray(l),g=!m&&isBuffer(l),b=!m&&!g&&isTypedArray(l);f=l,m||g||b?isArray(a)?f=a:isArrayLikeObject(a)?f=copyArray(a):g?(d=!1,f=cloneBuffer(l)):b?(d=!1,f=cloneTypedArray(l)):f=[]:isPlainObject(l)||isArguments(l)?(f=a,isArguments(a)?f=toPlainObject(a):(!isObject(a)||isFunction(a))&&(f=initCloneObject(l))):d=!1}d&&(i.set(l,f),s(f,l,r,o,i),i.delete(l)),assignMergeValue(e,n,f)}function baseMerge(e,t,n,r,s){e!==t&&baseFor(t,function(o,i){if(s||(s=new Stack),isObject(o))baseMergeDeep(e,t,i,n,baseMerge,r,s);else{var a=r?r(safeGet(e,i),o,i+"",e,t,s):void 0;a===void 0&&(a=o),assignMergeValue(e,i,a)}},keysIn)}var merge=createAssigner(function(e,t,n){baseMerge(e,t,n)});const cssrAnchorMetaName="naive-ui-style";function useRtl(e,t,n){if(!t)return;const r=useSsrAdapter(),s=computed(()=>{const{value:a}=t;if(!a)return;const l=a[e];if(l)return l}),o=inject(configProviderInjectionKey,null),i=()=>{watchEffect(()=>{const{value:a}=n,l=`${a}${e}Rtl`;if(exists(l,r))return;const{value:u}=s;u&&u.style.mount({id:l,head:!0,anchorMetaName:cssrAnchorMetaName,props:{bPrefix:a?`.${a}-`:void 0},ssr:r,parent:o?.styleMountTarget})})};return r?i():onBeforeMount(i),s}const commonVariables$1={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize,fontFamily,lineHeight}=commonVariables$1,globalStyle=c("body",`
66
+ margin: 0;
67
+ font-size: ${fontSize};
68
+ font-family: ${fontFamily};
69
+ line-height: ${lineHeight};
70
+ -webkit-text-size-adjust: 100%;
71
+ -webkit-tap-highlight-color: transparent;
72
+ `,[c("input",`
73
+ font-family: inherit;
74
+ font-size: inherit;
75
+ `)]);function useStyle(e,t,n){if(!t)return;const r=useSsrAdapter(),s=inject(configProviderInjectionKey,null),o=()=>{const i=n.value;t.mount({id:i===void 0?e:i+e,head:!0,anchorMetaName:cssrAnchorMetaName,props:{bPrefix:i?`.${i}-`:void 0},ssr:r,parent:s?.styleMountTarget}),s?.preflightStyleDisabled||globalStyle.mount({id:"n-global",head:!0,anchorMetaName:cssrAnchorMetaName,ssr:r,parent:s?.styleMountTarget})};r?o():onBeforeMount(o)}function createTheme(e){return e}function useTheme(e,t,n,r,s,o){const i=useSsrAdapter(),a=inject(configProviderInjectionKey,null);if(n){const u=()=>{const f=o?.value;n.mount({id:f===void 0?t:f+t,head:!0,props:{bPrefix:f?`.${f}-`:void 0},anchorMetaName:cssrAnchorMetaName,ssr:i,parent:a?.styleMountTarget}),a?.preflightStyleDisabled||globalStyle.mount({id:"n-global",head:!0,anchorMetaName:cssrAnchorMetaName,ssr:i,parent:a?.styleMountTarget})};i?u():onBeforeMount(u)}return computed(()=>{var u;const{theme:{common:f,self:d,peers:m={}}={},themeOverrides:g={},builtinThemeOverrides:b={}}=s,{common:S,peers:R}=g,{common:T=void 0,[e]:{common:O=void 0,self:w=void 0,peers:A={}}={}}=a?.mergedThemeRef.value||{},{common:K=void 0,[e]:z={}}=a?.mergedThemeOverridesRef.value||{},{common:Y,peers:q={}}=z,N=merge({},f||O||T||r.common,K,Y,S),U=merge((u=d||w||r.self)===null||u===void 0?void 0:u(N),b,z,g);return{common:N,self:U,peers:merge({},r.peers,A,m),peerOverrides:merge({},b.peers,q,R)}})}useTheme.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};const style$3=cB("base-icon",`
76
+ height: 1em;
77
+ width: 1em;
78
+ line-height: 1em;
79
+ text-align: center;
80
+ display: inline-block;
81
+ position: relative;
82
+ fill: currentColor;
83
+ `,[c("svg",`
84
+ height: 1em;
85
+ width: 1em;
86
+ `)]),NBaseIcon=defineComponent({name:"BaseIcon",props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){useStyle("-base-icon",style$3,toRef(e,"clsPrefix"))},render(){return h("i",{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}}),NIconSwitchTransition=defineComponent({name:"BaseIconSwitchTransition",setup(e,{slots:t}){const n=isMounted();return()=>h(Transition,{name:"icon-switch-transition",appear:n.value},t)}});function replaceable(e,t){const n=defineComponent({render(){return t()}});return defineComponent({name:upperFirst(e),setup(){var r;const s=(r=inject(configProviderInjectionKey,null))===null||r===void 0?void 0:r.mergedIconsRef;return()=>{var o;const i=(o=s?.value)===null||o===void 0?void 0:o[e];return i?i():h(n,null)}}})}const ErrorIcon$1=replaceable("close",()=>h("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},h("g",{fill:"currentColor","fill-rule":"nonzero"},h("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"}))))),ErrorIcon=replaceable("error",()=>h("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},h("g",{"fill-rule":"nonzero"},h("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),InfoIcon=replaceable("info",()=>h("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},h("g",{"fill-rule":"nonzero"},h("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),SuccessIcon=replaceable("success",()=>h("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},h("g",{"fill-rule":"nonzero"},h("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.6338835,17.6161165 C32.1782718,17.1605048 31.4584514,17.1301307 30.9676119,17.5249942 L30.8661165,17.6161165 L20.75,27.732233 L17.1338835,24.1161165 C16.6457281,23.6279612 15.8542719,23.6279612 15.3661165,24.1161165 C14.9105048,24.5717282 14.8801307,25.2915486 15.2749942,25.7823881 L15.3661165,25.8838835 L19.8661165,30.3838835 C20.3217282,30.8394952 21.0415486,30.8698693 21.5323881,30.4750058 L21.6338835,30.3838835 L32.6338835,19.3838835 C33.1220388,18.8957281 33.1220388,18.1042719 32.6338835,17.6161165 Z"}))))),WarningIcon=replaceable("warning",()=>h("svg",{viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},h("g",{"fill-rule":"nonzero"},h("path",{d:"M12,2 C17.523,2 22,6.478 22,12 C22,17.522 17.523,22 12,22 C6.477,22 2,17.522 2,12 C2,6.478 6.477,2 12,2 Z M12.0018002,15.0037242 C11.450254,15.0037242 11.0031376,15.4508407 11.0031376,16.0023869 C11.0031376,16.553933 11.450254,17.0010495 12.0018002,17.0010495 C12.5533463,17.0010495 13.0004628,16.553933 13.0004628,16.0023869 C13.0004628,15.4508407 12.5533463,15.0037242 12.0018002,15.0037242 Z M11.99964,7 C11.4868042,7.00018474 11.0642719,7.38637706 11.0066858,7.8837365 L11,8.00036004 L11.0018003,13.0012393 L11.00857,13.117858 C11.0665141,13.6151758 11.4893244,14.0010638 12.0021602,14.0008793 C12.514996,14.0006946 12.9375283,13.6145023 12.9951144,13.1171428 L13.0018002,13.0005193 L13,7.99964009 L12.9932303,7.8830214 C12.9352861,7.38570354 12.5124758,6.99981552 11.99964,7 Z"}))))),{cubicBezierEaseInOut:cubicBezierEaseInOut$1}=commonVariables$1;function iconSwitchTransition({originalTransform:e="",left:t=0,top:n=0,transition:r=`all .3s ${cubicBezierEaseInOut$1} !important`}={}){return[c("&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to",{transform:`${e} scale(0.75)`,left:t,top:n,opacity:0}),c("&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from",{transform:`scale(1) ${e}`,left:t,top:n,opacity:1}),c("&.icon-switch-transition-enter-active, &.icon-switch-transition-leave-active",{transformOrigin:"center",position:"absolute",left:t,top:n,transition:r})]}const style$2=cB("base-close",`
87
+ display: flex;
88
+ align-items: center;
89
+ justify-content: center;
90
+ cursor: pointer;
91
+ background-color: transparent;
92
+ color: var(--n-close-icon-color);
93
+ border-radius: var(--n-close-border-radius);
94
+ height: var(--n-close-size);
95
+ width: var(--n-close-size);
96
+ font-size: var(--n-close-icon-size);
97
+ outline: none;
98
+ border: none;
99
+ position: relative;
100
+ padding: 0;
101
+ `,[cM("absolute",`
102
+ height: var(--n-close-icon-size);
103
+ width: var(--n-close-icon-size);
104
+ `),c("&::before",`
105
+ content: "";
106
+ position: absolute;
107
+ width: var(--n-close-size);
108
+ height: var(--n-close-size);
109
+ left: 50%;
110
+ top: 50%;
111
+ transform: translateY(-50%) translateX(-50%);
112
+ transition: inherit;
113
+ border-radius: inherit;
114
+ `),cNotM("disabled",[c("&:hover",`
115
+ color: var(--n-close-icon-color-hover);
116
+ `),c("&:hover::before",`
117
+ background-color: var(--n-close-color-hover);
118
+ `),c("&:focus::before",`
119
+ background-color: var(--n-close-color-hover);
120
+ `),c("&:active",`
121
+ color: var(--n-close-icon-color-pressed);
122
+ `),c("&:active::before",`
123
+ background-color: var(--n-close-color-pressed);
124
+ `)]),cM("disabled",`
125
+ cursor: not-allowed;
126
+ color: var(--n-close-icon-color-disabled);
127
+ background-color: transparent;
128
+ `),cM("round",[c("&::before",`
129
+ border-radius: 50%;
130
+ `)])]),NBaseClose=defineComponent({name:"BaseClose",props:{isButtonTag:{type:Boolean,default:!0},clsPrefix:{type:String,required:!0},disabled:{type:Boolean,default:void 0},focusable:{type:Boolean,default:!0},round:Boolean,onClick:Function,absolute:Boolean},setup(e){return useStyle("-base-close",style$2,toRef(e,"clsPrefix")),()=>{const{clsPrefix:t,disabled:n,absolute:r,round:s,isButtonTag:o}=e;return h(o?"button":"div",{type:o?"button":void 0,tabindex:n||!e.focusable?-1:0,"aria-disabled":n,"aria-label":"close",role:o?void 0:"button",disabled:n,class:[`${t}-base-close`,r&&`${t}-base-close--absolute`,n&&`${t}-base-close--disabled`,s&&`${t}-base-close--round`],onMousedown:a=>{e.focusable||a.preventDefault()},onClick:e.onClick},h(NBaseIcon,{clsPrefix:t},{default:()=>h(ErrorIcon$1,null)}))}}}),NFadeInExpandTransition=defineComponent({name:"FadeInExpandTransition",props:{appear:Boolean,group:Boolean,mode:String,onLeave:Function,onAfterLeave:Function,onAfterEnter:Function,width:Boolean,reverse:Boolean},setup(e,{slots:t}){function n(a){e.width?a.style.maxWidth=`${a.offsetWidth}px`:a.style.maxHeight=`${a.offsetHeight}px`,a.offsetWidth}function r(a){e.width?a.style.maxWidth="0":a.style.maxHeight="0",a.offsetWidth;const{onLeave:l}=e;l&&l()}function s(a){e.width?a.style.maxWidth="":a.style.maxHeight="";const{onAfterLeave:l}=e;l&&l()}function o(a){if(a.style.transition="none",e.width){const l=a.offsetWidth;a.style.maxWidth="0",a.offsetWidth,a.style.transition="",a.style.maxWidth=`${l}px`}else if(e.reverse)a.style.maxHeight=`${a.offsetHeight}px`,a.offsetHeight,a.style.transition="",a.style.maxHeight="0";else{const l=a.offsetHeight;a.style.maxHeight="0",a.offsetWidth,a.style.transition="",a.style.maxHeight=`${l}px`}a.offsetWidth}function i(a){var l;e.width?a.style.maxWidth="":e.reverse||(a.style.maxHeight=""),(l=e.onAfterEnter)===null||l===void 0||l.call(e)}return()=>{const{group:a,width:l,appear:u,mode:f}=e,d=a?TransitionGroup:Transition,m={name:l?"fade-in-width-expand-transition":"fade-in-height-expand-transition",appear:u,onEnter:o,onAfterEnter:i,onBeforeLeave:n,onLeave:r,onAfterLeave:s};return a||(m.mode=f),h(d,m,t)}}}),style$1=c([c("@keyframes rotator",`
131
+ 0% {
132
+ -webkit-transform: rotate(0deg);
133
+ transform: rotate(0deg);
134
+ }
135
+ 100% {
136
+ -webkit-transform: rotate(360deg);
137
+ transform: rotate(360deg);
138
+ }`),cB("base-loading",`
139
+ position: relative;
140
+ line-height: 0;
141
+ width: 1em;
142
+ height: 1em;
143
+ `,[cE("transition-wrapper",`
144
+ position: absolute;
145
+ width: 100%;
146
+ height: 100%;
147
+ `,[iconSwitchTransition()]),cE("placeholder",`
148
+ position: absolute;
149
+ left: 50%;
150
+ top: 50%;
151
+ transform: translateX(-50%) translateY(-50%);
152
+ `,[iconSwitchTransition({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})]),cE("container",`
153
+ animation: rotator 3s linear infinite both;
154
+ `,[cE("icon",`
155
+ height: 1em;
156
+ width: 1em;
157
+ `)])])]),duration="1.6s",exposedLoadingProps={strokeWidth:{type:Number,default:28},stroke:{type:String,default:void 0}},NBaseLoading=defineComponent({name:"BaseLoading",props:Object.assign({clsPrefix:{type:String,required:!0},show:{type:Boolean,default:!0},scale:{type:Number,default:1},radius:{type:Number,default:100}},exposedLoadingProps),setup(e){useStyle("-base-loading",style$1,toRef(e,"clsPrefix"))},render(){const{clsPrefix:e,radius:t,strokeWidth:n,stroke:r,scale:s}=this,o=t/s;return h("div",{class:`${e}-base-loading`,role:"img","aria-label":"loading"},h(NIconSwitchTransition,null,{default:()=>this.show?h("div",{key:"icon",class:`${e}-base-loading__transition-wrapper`},h("div",{class:`${e}-base-loading__container`},h("svg",{class:`${e}-base-loading__icon`,viewBox:`0 0 ${2*o} ${2*o}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},h("g",null,h("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${o} ${o};270 ${o} ${o}`,begin:"0s",dur:duration,fill:"freeze",repeatCount:"indefinite"}),h("circle",{class:`${e}-base-loading__icon`,fill:"none",stroke:"currentColor","stroke-width":n,"stroke-linecap":"round",cx:o,cy:o,r:t-n/2,"stroke-dasharray":5.67*t,"stroke-dashoffset":18.48*t},h("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${o} ${o};135 ${o} ${o};450 ${o} ${o}`,begin:"0s",dur:duration,fill:"freeze",repeatCount:"indefinite"}),h("animate",{attributeName:"stroke-dashoffset",values:`${5.67*t};${1.42*t};${5.67*t}`,begin:"0s",dur:duration,fill:"freeze",repeatCount:"indefinite"})))))):h("div",{key:"placeholder",class:`${e}-base-loading__placeholder`},this.$slots)}))}}),base={neutralBase:"#FFF",neutralInvertBase:"#000",neutralTextBase:"#000",neutralPopover:"#fff",neutralCard:"#fff",neutralModal:"#fff",neutralBody:"#fff",alpha1:"0.82",alpha2:"0.72",alpha3:"0.38",alpha4:"0.24",alpha5:"0.18",alphaClose:"0.6",alphaDisabled:"0.5",alphaAvatar:"0.2",alphaProgressRail:".08",alphaInput:"0",alphaScrollbar:"0.25",alphaScrollbarHover:"0.4",primaryHover:"#36ad6a",primaryDefault:"#18a058",primaryActive:"#0c7a43",primarySuppl:"#36ad6a",infoHover:"#4098fc",infoDefault:"#2080f0",infoActive:"#1060c9",infoSuppl:"#4098fc",errorHover:"#de576d",errorDefault:"#d03050",errorActive:"#ab1f3f",errorSuppl:"#de576d",warningHover:"#fcb040",warningDefault:"#f0a020",warningActive:"#c97c10",warningSuppl:"#fcb040",successHover:"#36ad6a",successDefault:"#18a058",successActive:"#0c7a43",successSuppl:"#36ad6a"},baseBackgroundRgb=rgba(base.neutralBase),baseInvertBackgroundRgb=rgba(base.neutralInvertBase),overlayPrefix=`rgba(${baseInvertBackgroundRgb.slice(0,3).join(", ")}, `;function overlay(e){return`${overlayPrefix+String(e)})`}function neutral(e){const t=Array.from(baseInvertBackgroundRgb);return t[3]=Number(e),composite(baseBackgroundRgb,t)}const derived=Object.assign(Object.assign({name:"common"},commonVariables$1),{baseColor:base.neutralBase,primaryColor:base.primaryDefault,primaryColorHover:base.primaryHover,primaryColorPressed:base.primaryActive,primaryColorSuppl:base.primarySuppl,infoColor:base.infoDefault,infoColorHover:base.infoHover,infoColorPressed:base.infoActive,infoColorSuppl:base.infoSuppl,successColor:base.successDefault,successColorHover:base.successHover,successColorPressed:base.successActive,successColorSuppl:base.successSuppl,warningColor:base.warningDefault,warningColorHover:base.warningHover,warningColorPressed:base.warningActive,warningColorSuppl:base.warningSuppl,errorColor:base.errorDefault,errorColorHover:base.errorHover,errorColorPressed:base.errorActive,errorColorSuppl:base.errorSuppl,textColorBase:base.neutralTextBase,textColor1:"rgb(31, 34, 37)",textColor2:"rgb(51, 54, 57)",textColor3:"rgb(118, 124, 130)",textColorDisabled:neutral(base.alpha4),placeholderColor:neutral(base.alpha4),placeholderColorDisabled:neutral(base.alpha5),iconColor:neutral(base.alpha4),iconColorHover:scaleColor(neutral(base.alpha4),{lightness:.75}),iconColorPressed:scaleColor(neutral(base.alpha4),{lightness:.9}),iconColorDisabled:neutral(base.alpha5),opacity1:base.alpha1,opacity2:base.alpha2,opacity3:base.alpha3,opacity4:base.alpha4,opacity5:base.alpha5,dividerColor:"rgb(239, 239, 245)",borderColor:"rgb(224, 224, 230)",closeIconColor:neutral(Number(base.alphaClose)),closeIconColorHover:neutral(Number(base.alphaClose)),closeIconColorPressed:neutral(Number(base.alphaClose)),closeColorHover:"rgba(0, 0, 0, .09)",closeColorPressed:"rgba(0, 0, 0, .13)",clearColor:neutral(base.alpha4),clearColorHover:scaleColor(neutral(base.alpha4),{lightness:.75}),clearColorPressed:scaleColor(neutral(base.alpha4),{lightness:.9}),scrollbarColor:overlay(base.alphaScrollbar),scrollbarColorHover:overlay(base.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:neutral(base.alphaProgressRail),railColor:"rgb(219, 219, 223)",popoverColor:base.neutralPopover,tableColor:base.neutralCard,cardColor:base.neutralCard,modalColor:base.neutralModal,bodyColor:base.neutralBody,tagColor:"#eee",avatarColor:neutral(base.alphaAvatar),invertedColor:"rgb(0, 20, 40)",inputColor:neutral(base.alphaInput),codeColor:"rgb(244, 244, 248)",tabColor:"rgb(247, 247, 250)",actionColor:"rgb(250, 250, 252)",tableHeaderColor:"rgb(250, 250, 252)",hoverColor:"rgb(243, 243, 245)",tableColorHover:"rgba(0, 0, 100, 0.03)",tableColorStriped:"rgba(0, 0, 100, 0.02)",pressedColor:"rgb(237, 237, 239)",opacityDisabled:base.alphaDisabled,inputColorDisabled:"rgb(250, 250, 252)",buttonColor2:"rgba(46, 51, 56, .05)",buttonColor2Hover:"rgba(46, 51, 56, .09)",buttonColor2Pressed:"rgba(46, 51, 56, .13)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),{cubicBezierEaseInOut,cubicBezierEaseOut,cubicBezierEaseIn}=commonVariables$1;function fadeInHeightExpandTransition({overflow:e="hidden",duration:t=".3s",originalTransition:n="",leavingDelay:r="0s",foldPadding:s=!1,enterToProps:o=void 0,leaveToProps:i=void 0,reverse:a=!1}={}){const l=a?"leave":"enter",u=a?"enter":"leave";return[c(`&.fade-in-height-expand-transition-${u}-from,
158
+ &.fade-in-height-expand-transition-${l}-to`,Object.assign(Object.assign({},o),{opacity:1})),c(`&.fade-in-height-expand-transition-${u}-to,
159
+ &.fade-in-height-expand-transition-${l}-from`,Object.assign(Object.assign({},i),{opacity:0,marginTop:"0 !important",marginBottom:"0 !important",paddingTop:s?"0 !important":void 0,paddingBottom:s?"0 !important":void 0})),c(`&.fade-in-height-expand-transition-${u}-active`,`
160
+ overflow: ${e};
161
+ transition:
162
+ max-height ${t} ${cubicBezierEaseInOut} ${r},
163
+ opacity ${t} ${cubicBezierEaseOut} ${r},
164
+ margin-top ${t} ${cubicBezierEaseInOut} ${r},
165
+ margin-bottom ${t} ${cubicBezierEaseInOut} ${r},
166
+ padding-top ${t} ${cubicBezierEaseInOut} ${r},
167
+ padding-bottom ${t} ${cubicBezierEaseInOut} ${r}
168
+ ${n?`,${n}`:""}
169
+ `),c(`&.fade-in-height-expand-transition-${l}-active`,`
170
+ overflow: ${e};
171
+ transition:
172
+ max-height ${t} ${cubicBezierEaseInOut},
173
+ opacity ${t} ${cubicBezierEaseIn},
174
+ margin-top ${t} ${cubicBezierEaseInOut},
175
+ margin-bottom ${t} ${cubicBezierEaseInOut},
176
+ padding-top ${t} ${cubicBezierEaseInOut},
177
+ padding-bottom ${t} ${cubicBezierEaseInOut}
178
+ ${n?`,${n}`:""}
179
+ `)]}const messageApiInjectionKey="n-message-api",messageProviderInjectionKey="n-message-provider",commonVariables={margin:"0 0 8px 0",padding:"10px 20px",maxWidth:"720px",minWidth:"420px",iconMargin:"0 10px 0 0",closeMargin:"0 0 0 10px",closeSize:"20px",closeIconSize:"16px",iconSize:"20px",fontSize:"14px"};function self$1(e){const{textColor2:t,closeIconColor:n,closeIconColorHover:r,closeIconColorPressed:s,infoColor:o,successColor:i,errorColor:a,warningColor:l,popoverColor:u,boxShadow2:f,primaryColor:d,lineHeight:m,borderRadius:g,closeColorHover:b,closeColorPressed:S}=e;return Object.assign(Object.assign({},commonVariables),{closeBorderRadius:g,textColor:t,textColorInfo:t,textColorSuccess:t,textColorError:t,textColorWarning:t,textColorLoading:t,color:u,colorInfo:u,colorSuccess:u,colorError:u,colorWarning:u,colorLoading:u,boxShadow:f,boxShadowInfo:f,boxShadowSuccess:f,boxShadowError:f,boxShadowWarning:f,boxShadowLoading:f,iconColor:t,iconColorInfo:o,iconColorSuccess:i,iconColorWarning:l,iconColorError:a,iconColorLoading:d,closeColorHover:b,closeColorPressed:S,closeIconColor:n,closeIconColorHover:r,closeIconColorPressed:s,closeColorHoverInfo:b,closeColorPressedInfo:S,closeIconColorInfo:n,closeIconColorHoverInfo:r,closeIconColorPressedInfo:s,closeColorHoverSuccess:b,closeColorPressedSuccess:S,closeIconColorSuccess:n,closeIconColorHoverSuccess:r,closeIconColorPressedSuccess:s,closeColorHoverError:b,closeColorPressedError:S,closeIconColorError:n,closeIconColorHoverError:r,closeIconColorPressedError:s,closeColorHoverWarning:b,closeColorPressedWarning:S,closeIconColorWarning:n,closeIconColorHoverWarning:r,closeIconColorPressedWarning:s,closeColorHoverLoading:b,closeColorPressedLoading:S,closeIconColorLoading:n,closeIconColorHoverLoading:r,closeIconColorPressedLoading:s,loadingColor:d,lineHeight:m,borderRadius:g})}const messageLight={common:derived,self:self$1},messageProps={icon:Function,type:{type:String,default:"info"},content:[String,Number,Function],showIcon:{type:Boolean,default:!0},closable:Boolean,keepAliveOnHover:Boolean,onClose:Function,onMouseenter:Function,onMouseleave:Function},style=c([cB("message-wrapper",`
180
+ margin: var(--n-margin);
181
+ z-index: 0;
182
+ transform-origin: top center;
183
+ display: flex;
184
+ `,[fadeInHeightExpandTransition({overflow:"visible",originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.85)"}})]),cB("message",`
185
+ box-sizing: border-box;
186
+ display: flex;
187
+ align-items: center;
188
+ transition:
189
+ color .3s var(--n-bezier),
190
+ box-shadow .3s var(--n-bezier),
191
+ background-color .3s var(--n-bezier),
192
+ opacity .3s var(--n-bezier),
193
+ transform .3s var(--n-bezier),
194
+ margin-bottom .3s var(--n-bezier);
195
+ padding: var(--n-padding);
196
+ border-radius: var(--n-border-radius);
197
+ flex-wrap: nowrap;
198
+ overflow: hidden;
199
+ max-width: var(--n-max-width);
200
+ color: var(--n-text-color);
201
+ background-color: var(--n-color);
202
+ box-shadow: var(--n-box-shadow);
203
+ `,[cE("content",`
204
+ display: inline-block;
205
+ line-height: var(--n-line-height);
206
+ font-size: var(--n-font-size);
207
+ `),cE("icon",`
208
+ position: relative;
209
+ margin: var(--n-icon-margin);
210
+ height: var(--n-icon-size);
211
+ width: var(--n-icon-size);
212
+ font-size: var(--n-icon-size);
213
+ flex-shrink: 0;
214
+ `,[["default","info","success","warning","error","loading"].map(e=>cM(`${e}-type`,[c("> *",`
215
+ color: var(--n-icon-color-${e});
216
+ transition: color .3s var(--n-bezier);
217
+ `)])),c("> *",`
218
+ position: absolute;
219
+ left: 0;
220
+ top: 0;
221
+ right: 0;
222
+ bottom: 0;
223
+ `,[iconSwitchTransition()])]),cE("close",`
224
+ margin: var(--n-close-margin);
225
+ transition:
226
+ background-color .3s var(--n-bezier),
227
+ color .3s var(--n-bezier);
228
+ flex-shrink: 0;
229
+ `,[c("&:hover",`
230
+ color: var(--n-close-icon-color-hover);
231
+ `),c("&:active",`
232
+ color: var(--n-close-icon-color-pressed);
233
+ `)])]),cB("message-container",`
234
+ z-index: 6000;
235
+ position: fixed;
236
+ height: 0;
237
+ overflow: visible;
238
+ display: flex;
239
+ flex-direction: column;
240
+ align-items: center;
241
+ `,[cM("top",`
242
+ top: 12px;
243
+ left: 0;
244
+ right: 0;
245
+ `),cM("top-left",`
246
+ top: 12px;
247
+ left: 12px;
248
+ right: 0;
249
+ align-items: flex-start;
250
+ `),cM("top-right",`
251
+ top: 12px;
252
+ left: 0;
253
+ right: 12px;
254
+ align-items: flex-end;
255
+ `),cM("bottom",`
256
+ bottom: 4px;
257
+ left: 0;
258
+ right: 0;
259
+ justify-content: flex-end;
260
+ `),cM("bottom-left",`
261
+ bottom: 4px;
262
+ left: 12px;
263
+ right: 0;
264
+ justify-content: flex-end;
265
+ align-items: flex-start;
266
+ `),cM("bottom-right",`
267
+ bottom: 4px;
268
+ left: 0;
269
+ right: 12px;
270
+ justify-content: flex-end;
271
+ align-items: flex-end;
272
+ `)])]),iconRenderMap={info:()=>h(InfoIcon,null),success:()=>h(SuccessIcon,null),warning:()=>h(WarningIcon,null),error:()=>h(ErrorIcon,null),default:()=>null},NMessage=defineComponent({name:"Message",props:Object.assign(Object.assign({},messageProps),{render:Function}),setup(e){const{inlineThemeDisabled:t,mergedRtlRef:n}=useConfig(e),{props:r,mergedClsPrefixRef:s}=inject(messageProviderInjectionKey),o=useRtl("Message",n,s),i=useTheme("Message","-message",style,messageLight,r,s),a=computed(()=>{const{type:u}=e,{common:{cubicBezierEaseInOut:f},self:{padding:d,margin:m,maxWidth:g,iconMargin:b,closeMargin:S,closeSize:R,iconSize:T,fontSize:O,lineHeight:w,borderRadius:A,iconColorInfo:K,iconColorSuccess:z,iconColorWarning:Y,iconColorError:q,iconColorLoading:N,closeIconSize:U,closeBorderRadius:W,[createKey("textColor",u)]:M,[createKey("boxShadow",u)]:Q,[createKey("color",u)]:ne,[createKey("closeColorHover",u)]:oe,[createKey("closeColorPressed",u)]:X,[createKey("closeIconColor",u)]:J,[createKey("closeIconColorPressed",u)]:Z,[createKey("closeIconColorHover",u)]:ae}}=i.value;return{"--n-bezier":f,"--n-margin":m,"--n-padding":d,"--n-max-width":g,"--n-font-size":O,"--n-icon-margin":b,"--n-icon-size":T,"--n-close-icon-size":U,"--n-close-border-radius":W,"--n-close-size":R,"--n-close-margin":S,"--n-text-color":M,"--n-color":ne,"--n-box-shadow":Q,"--n-icon-color-info":K,"--n-icon-color-success":z,"--n-icon-color-warning":Y,"--n-icon-color-error":q,"--n-icon-color-loading":N,"--n-close-color-hover":oe,"--n-close-color-pressed":X,"--n-close-icon-color":J,"--n-close-icon-color-pressed":Z,"--n-close-icon-color-hover":ae,"--n-line-height":w,"--n-border-radius":A}}),l=t?useThemeClass("message",computed(()=>e.type[0]),a,{}):void 0;return{mergedClsPrefix:s,rtlEnabled:o,messageProviderProps:r,handleClose(){var u;(u=e.onClose)===null||u===void 0||u.call(e)},cssVars:t?void 0:a,themeClass:l?.themeClass,onRender:l?.onRender,placement:r.placement}},render(){const{render:e,type:t,closable:n,content:r,mergedClsPrefix:s,cssVars:o,themeClass:i,onRender:a,icon:l,handleClose:u,showIcon:f}=this;a?.();let d;return h("div",{class:[`${s}-message-wrapper`,i],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith("top")?"flex-start":"flex-end"},o]},e?e(this.$props):h("div",{class:[`${s}-message ${s}-message--${t}-type`,this.rtlEnabled&&`${s}-message--rtl`]},(d=createIconVNode(l,t,s))&&f?h("div",{class:`${s}-message__icon ${s}-message__icon--${t}-type`},h(NIconSwitchTransition,null,{default:()=>d})):null,h("div",{class:`${s}-message__content`},render(r)),n?h(NBaseClose,{clsPrefix:s,class:`${s}-message__close`,onClick:u,absolute:!0}):null))}});function createIconVNode(e,t,n){if(typeof e=="function")return e();{const r=t==="loading"?h(NBaseLoading,{clsPrefix:n,strokeWidth:24,scale:.85}):iconRenderMap[t]();return r?h(NBaseIcon,{clsPrefix:n,key:t},{default:()=>r}):null}}const MessageEnvironment=defineComponent({name:"MessageEnvironment",props:Object.assign(Object.assign({},messageProps),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(e){let t=null;const n=ref(!0);onMounted(()=>{r()});function r(){const{duration:f}=e;f&&(t=window.setTimeout(i,f))}function s(f){f.currentTarget===f.target&&t!==null&&(window.clearTimeout(t),t=null)}function o(f){f.currentTarget===f.target&&r()}function i(){const{onHide:f}=e;n.value=!1,t&&(window.clearTimeout(t),t=null),f&&f()}function a(){const{onClose:f}=e;f&&f(),i()}function l(){const{onAfterLeave:f,onInternalAfterLeave:d,onAfterHide:m,internalKey:g}=e;f&&f(),d&&d(g),m&&m()}function u(){i()}return{show:n,hide:i,handleClose:a,handleAfterLeave:l,handleMouseleave:o,handleMouseenter:s,deactivate:u}},render(){return h(NFadeInExpandTransition,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?h(NMessage,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),messageProviderProps=Object.assign(Object.assign({},useTheme.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:"top"},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),NMessageProvider=defineComponent({name:"MessageProvider",props:messageProviderProps,setup(e){const{mergedClsPrefixRef:t}=useConfig(e),n=ref([]),r=ref({}),s={create(l,u){return o(l,Object.assign({type:"default"},u))},info(l,u){return o(l,Object.assign(Object.assign({},u),{type:"info"}))},success(l,u){return o(l,Object.assign(Object.assign({},u),{type:"success"}))},warning(l,u){return o(l,Object.assign(Object.assign({},u),{type:"warning"}))},error(l,u){return o(l,Object.assign(Object.assign({},u),{type:"error"}))},loading(l,u){return o(l,Object.assign(Object.assign({},u),{type:"loading"}))},destroyAll:a};provide(messageProviderInjectionKey,{props:e,mergedClsPrefixRef:t}),provide(messageApiInjectionKey,s);function o(l,u){const f=createId(),d=reactive(Object.assign(Object.assign({},u),{content:l,key:f,destroy:()=>{var g;(g=r.value[f])===null||g===void 0||g.hide()}})),{max:m}=e;return m&&n.value.length>=m&&n.value.shift(),n.value.push(d),d}function i(l){n.value.splice(n.value.findIndex(u=>u.key===l),1),delete r.value[l]}function a(){Object.values(r.value).forEach(l=>{l.hide()})}return Object.assign({mergedClsPrefix:t,messageRefs:r,messageList:n,handleAfterLeave:i},s)},render(){var e,t,n;return h(Fragment,null,(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e),this.messageList.length?h(Teleport,{to:(n=this.to)!==null&&n!==void 0?n:"body"},h("div",{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:"message-container",style:this.containerStyle},this.messageList.map(r=>h(MessageEnvironment,Object.assign({ref:s=>{s&&(this.messageRefs[r.key]=s)},internalKey:r.key,onInternalAfterLeave:this.handleAfterLeave},omit(r,["destroy"],void 0),{duration:r.duration===void 0?this.duration:r.duration,keepAliveOnHover:r.keepAliveOnHover===void 0?this.keepAliveOnHover:r.keepAliveOnHover,closable:r.closable===void 0?this.closable:r.closable}))))):null)}}),search=new URLSearchParams(location.search),model=search.get("model")||"",isSiyuanPlugin=model==="siyuan_plugin"||!1;console.log("[isSiyuanPlugin]",isSiyuanPlugin);const app$1=()=>createVNode(Fragment,null,[createVNode(NMessageProvider,null,{default:()=>[createVNode(resolveComponent("router-view"),null,null)]}),createVNode("div",null,[createTextVNode("可关注"),createVNode("a",{href:"https://ld246.com/article/1693989505448"},[createTextVNode("OceanPress_js 版的开发记录")]),createTextVNode("获取最新进展")]),isSiyuanPlugin?null:createVNode("div",null,[createTextVNode("查看OceanPress生成的效果:"),createVNode("a",{href:"/notebook/请从这里开始.html#20210428212840-859h45j"},[createTextVNode("《思源笔记用户指南》: 请从这里开始.html")]),createVNode("br",null,null),createVNode("a",{href:"/notebook/请从这里开始/编辑器/排版元素.html"},[createTextVNode("《思源笔记用户指南》: 排版元素.html")])]),createVNode("hr",null,null),createVNode("div",null,[createVNode("div",null,[createTextVNode("由"),createVNode("a",{href:"https://shenzilong.cn"},[createTextVNode("崮生(子虚")]),createTextVNode("开发")]),createVNode("div",null,[createVNode("a",{href:"https://oceanpress-js.heartstack.space"},[createTextVNode("项目地址")])]),createVNode("div",null,[createVNode("a",{href:"https://github.com/siyuan-note/oceanpress"},[createTextVNode("开源代码仓库")])])])]),router=createRouter({history:createWebHashHistory(),routes:[{path:"/",component:()=>__vitePreload(()=>import("./steps-Cpyl02WI.js"),[],import.meta.url)}]}),app=createApp(app$1);app.use(router);app.mount("#app");eval(`(function (c, l, a, r, i, t, y) {
273
+ c[a] =
274
+ c[a] ||
275
+ function () {
276
+ ;(c[a].q = c[a].q || []).push(arguments)
277
+ }
278
+ t = l.createElement(r)
279
+ t.async = 1
280
+ t.src = 'https://www.clarity.ms/tag/' + i
281
+ y = l.getElementsByTagName(r)[0]
282
+ y.parentNode.insertBefore(t, y)
283
+ })(window, document, 'clarity', 'script', 'kdd1bzgo7w')`);export{createKey as $,API as A,configProviderInjectionKey as B,CssRender as C,replaceable as D,cB as E,Fragment as F,c as G,cE as H,iconSwitchTransition as I,useStyle as J,NBaseIcon as K,commonVariables$1 as L,derived as M,NIconSwitchTransition as N,cM as O,useConfig as P,useRtl as Q,useTheme as R,watchEffect as S,Teleport as T,useThemeClass as U,Transition as V,mergeProps as W,NBaseLoading as X,nextTick as Y,changeColor as Z,cNotM as _,readonly as a,composite as a0,NFadeInExpandTransition as a1,insideModal as a2,insidePopover as a3,asModal as a4,NBaseClose as a5,fadeInHeightExpandTransition as a6,withDirectives as a7,vShow as a8,throwError as a9,deepAssign as aA,currentConfig as aB,createVNode as aC,configs as aD,addConfig as aE,provideService as aF,loadConfigFile as aG,EffectLocalStorageDep as aH,vApi as aI,createTheme as aa,render as ab,ErrorIcon as ac,WarningIcon as ad,SuccessIcon as ae,InfoIcon as af,onUnmounted as ag,cloneVNode as ah,normalizeClass as ai,isMounted as aj,messageApiInjectionKey as ak,ErrorIcon$1 as al,omit as am,TransitionGroup as an,gen as ao,EffectConfigDep as ap,tryPromise as aq,tempConfig as ar,EffectRender as as,empty$h as at,add$2 as au,runPromise as av,provide$1 as aw,EffectLogDep as ax,packageJson as ay,forEach as az,onBeforeUnmount as b,computed as c,onBeforeMount as d,createInjectionKey as e,onActivated as f,getCurrentInstance as g,onDeactivated as h,defineComponent as i,h as j,renderSlot as k,createId as l,createTextVNode as m,Comment as n,onMounted as o,warn as p,isVNode as q,ref as r,inject as s,toRef as t,useSsrAdapter as u,provide as v,watch as w,isSymbol as x,isObject as y,root as z};