UNPKG

@pontem/liquidswap-widget

Version:
1,481 lines 3.08 MB
import { g as getDefaultExportFromCjs, a as getAugmentedNamespace, c as commonjsGlobal } from "./__commonjsHelpers__-c5d32002.js"; function makeMap(a, s) { const o = /* @__PURE__ */ Object.create(null), c = a.split(","); for (let g = 0; g < c.length; g++) o[c[g]] = !0; return s ? (g) => !!o[g.toLowerCase()] : (g) => !!o[g]; } const GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt", isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED), specialBooleanAttrs = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly", isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); function includeBooleanAttr(a) { return !!a || a === ""; } function normalizeStyle(a) { if (isArray$d(a)) { const s = {}; for (let o = 0; o < a.length; o++) { const c = a[o], g = isString$5(c) ? parseStringStyle(c) : normalizeStyle(c); if (g) for (const _ in g) s[_] = g[_]; } return s; } else { if (isString$5(a)) return a; if (isObject$8(a)) return a; } } const listDelimiterRE = /;(?![^(]*\))/g, propertyDelimiterRE = /:(.+)/; function parseStringStyle(a) { const s = {}; return a.split(listDelimiterRE).forEach((o) => { if (o) { const c = o.split(propertyDelimiterRE); c.length > 1 && (s[c[0].trim()] = c[1].trim()); } }), s; } function normalizeClass(a) { let s = ""; if (isString$5(a)) s = a; else if (isArray$d(a)) for (let o = 0; o < a.length; o++) { const c = normalizeClass(a[o]); c && (s += c + " "); } else if (isObject$8(a)) for (const o in a) a[o] && (s += o + " "); return s.trim(); } function normalizeProps(a) { if (!a) return null; let { class: s, style: o } = a; return s && !isString$5(s) && (a.class = normalizeClass(s)), o && (a.style = normalizeStyle(o)), a; } function looseCompareArrays(a, s) { if (a.length !== s.length) return !1; let o = !0; for (let c = 0; o && c < a.length; c++) o = looseEqual(a[c], s[c]); return o; } function looseEqual(a, s) { if (a === s) return !0; let o = isDate$1(a), c = isDate$1(s); if (o || c) return o && c ? a.getTime() === s.getTime() : !1; if (o = isSymbol$5(a), c = isSymbol$5(s), o || c) return a === s; if (o = isArray$d(a), c = isArray$d(s), o || c) return o && c ? looseCompareArrays(a, s) : !1; if (o = isObject$8(a), c = isObject$8(s), o || c) { if (!o || !c) return !1; const g = Object.keys(a).length, _ = Object.keys(s).length; if (g !== _) return !1; for (const b in a) { const $ = a.hasOwnProperty(b), j = s.hasOwnProperty(b); if ($ && !j || !$ && j || !looseEqual(a[b], s[b])) return !1; } } return String(a) === String(s); } function looseIndexOf(a, s) { return a.findIndex((o) => looseEqual(o, s)); } const toDisplayString = (a) => isString$5(a) ? a : a == null ? "" : isArray$d(a) || isObject$8(a) && (a.toString === objectToString$2 || !isFunction$5(a.toString)) ? JSON.stringify(a, replacer, 2) : String(a), replacer = (a, s) => s && s.__v_isRef ? replacer(a, s.value) : isMap$2(s) ? { [`Map(${s.size})`]: [...s.entries()].reduce((o, [c, g]) => (o[`${c} =>`] = g, o), {}) } : isSet$2(s) ? { [`Set(${s.size})`]: [...s.values()] } : isObject$8(s) && !isArray$d(s) && !isPlainObject$2(s) ? String(s) : s, EMPTY_OBJ = {}, EMPTY_ARR = [], NOOP = () => { }, NO = () => !1, onRE = /^on[^a-z]/, isOn = (a) => onRE.test(a), isModelListener = (a) => a.startsWith("onUpdate:"), extend$1 = Object.assign, remove$1 = (a, s) => { const o = a.indexOf(s); o > -1 && a.splice(o, 1); }, hasOwnProperty$d = Object.prototype.hasOwnProperty, hasOwn = (a, s) => hasOwnProperty$d.call(a, s), isArray$d = Array.isArray, isMap$2 = (a) => toTypeString(a) === "[object Map]", isSet$2 = (a) => toTypeString(a) === "[object Set]", isDate$1 = (a) => toTypeString(a) === "[object Date]", isFunction$5 = (a) => typeof a == "function", isString$5 = (a) => typeof a == "string", isSymbol$5 = (a) => typeof a == "symbol", isObject$8 = (a) => a !== null && typeof a == "object", isPromise = (a) => isObject$8(a) && isFunction$5(a.then) && isFunction$5(a.catch), objectToString$2 = Object.prototype.toString, toTypeString = (a) => objectToString$2.call(a), toRawType = (a) => toTypeString(a).slice(8, -1), isPlainObject$2 = (a) => toTypeString(a) === "[object Object]", isIntegerKey = (a) => isString$5(a) && a !== "NaN" && a[0] !== "-" && "" + parseInt(a, 10) === a, isReservedProp = /* @__PURE__ */ makeMap( // the leading comma is intentional so empty string "" is also included ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" ), cacheStringFunction = (a) => { const s = /* @__PURE__ */ Object.create(null); return (o) => s[o] || (s[o] = a(o)); }, camelizeRE = /-(\w)/g, camelize = cacheStringFunction((a) => a.replace(camelizeRE, (s, o) => o ? o.toUpperCase() : "")), hyphenateRE = /\B([A-Z])/g, hyphenate = cacheStringFunction((a) => a.replace(hyphenateRE, "-$1").toLowerCase()), capitalize = cacheStringFunction((a) => a.charAt(0).toUpperCase() + a.slice(1)), toHandlerKey = cacheStringFunction((a) => a ? `on${capitalize(a)}` : ""), hasChanged = (a, s) => !Object.is(a, s), invokeArrayFns = (a, s) => { for (let o = 0; o < a.length; o++) a[o](s); }, def = (a, s, o) => { Object.defineProperty(a, s, { configurable: !0, enumerable: !1, value: o }); }, toNumber = (a) => { const s = parseFloat(a); return isNaN(s) ? a : s; }; let _globalThis; const getGlobalThis = () => _globalThis || (_globalThis = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {}); let activeEffectScope; class EffectScope { constructor(s = !1) { this.active = !0, this.effects = [], this.cleanups = [], !s && activeEffectScope && (this.parent = activeEffectScope, this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1); } run(s) { if (this.active) { const o = activeEffectScope; try { return activeEffectScope = this, s(); } finally { activeEffectScope = o; } } } /** * This should only be called on non-detached scopes * @internal */ on() { activeEffectScope = this; } /** * This should only be called on non-detached scopes * @internal */ off() { activeEffectScope = this.parent; } stop(s) { if (this.active) { let o, c; for (o = 0, c = this.effects.length; o < c; o++) this.effects[o].stop(); for (o = 0, c = this.cleanups.length; o < c; o++) this.cleanups[o](); if (this.scopes) for (o = 0, c = this.scopes.length; o < c; o++) this.scopes[o].stop(!0); if (this.parent && !s) { const g = this.parent.scopes.pop(); g && g !== this && (this.parent.scopes[this.index] = g, g.index = this.index); } this.active = !1; } } } function effectScope(a) { return new EffectScope(a); } function recordEffectScope(a, s = activeEffectScope) { s && s.active && s.effects.push(a); } function getCurrentScope() { return activeEffectScope; } function onScopeDispose(a) { activeEffectScope && activeEffectScope.cleanups.push(a); } const createDep = (a) => { const s = new Set(a); return s.w = 0, s.n = 0, s; }, wasTracked = (a) => (a.w & trackOpBit) > 0, newTracked = (a) => (a.n & trackOpBit) > 0, initDepMarkers = ({ deps: a }) => { if (a.length) for (let s = 0; s < a.length; s++) a[s].w |= trackOpBit; }, finalizeDepMarkers = (a) => { const { deps: s } = a; if (s.length) { let o = 0; for (let c = 0; c < s.length; c++) { const g = s[c]; wasTracked(g) && !newTracked(g) ? g.delete(a) : s[o++] = g, g.w &= ~trackOpBit, g.n &= ~trackOpBit; } s.length = o; } }, targetMap = /* @__PURE__ */ new WeakMap(); let effectTrackDepth = 0, trackOpBit = 1; const maxMarkerBits = 30; let activeEffect; const ITERATE_KEY = Symbol(""), MAP_KEY_ITERATE_KEY = Symbol(""); class ReactiveEffect { constructor(s, o = null, c) { this.fn = s, this.scheduler = o, this.active = !0, this.deps = [], this.parent = void 0, recordEffectScope(this, c); } run() { if (!this.active) return this.fn(); let s = activeEffect, o = shouldTrack; for (; s; ) { if (s === this) return; s = s.parent; } try { return this.parent = activeEffect, activeEffect = this, shouldTrack = !0, trackOpBit = 1 << ++effectTrackDepth, effectTrackDepth <= maxMarkerBits ? initDepMarkers(this) : cleanupEffect(this), this.fn(); } finally { effectTrackDepth <= maxMarkerBits && finalizeDepMarkers(this), trackOpBit = 1 << --effectTrackDepth, activeEffect = this.parent, shouldTrack = o, this.parent = void 0, this.deferStop && this.stop(); } } stop() { activeEffect === this ? this.deferStop = !0 : this.active && (cleanupEffect(this), this.onStop && this.onStop(), this.active = !1); } } function cleanupEffect(a) { const { deps: s } = a; if (s.length) { for (let o = 0; o < s.length; o++) s[o].delete(a); s.length = 0; } } function effect(a, s) { a.effect && (a = a.effect.fn); const o = new ReactiveEffect(a); s && (extend$1(o, s), s.scope && recordEffectScope(o, s.scope)), (!s || !s.lazy) && o.run(); const c = o.run.bind(o); return c.effect = o, c; } function stop(a) { a.effect.stop(); } let shouldTrack = !0; const trackStack = []; function pauseTracking() { trackStack.push(shouldTrack), shouldTrack = !1; } function resetTracking() { const a = trackStack.pop(); shouldTrack = a === void 0 ? !0 : a; } function track(a, s, o) { if (shouldTrack && activeEffect) { let c = targetMap.get(a); c || targetMap.set(a, c = /* @__PURE__ */ new Map()); let g = c.get(o); g || c.set(o, g = createDep()), trackEffects(g); } } function trackEffects(a, s) { let o = !1; effectTrackDepth <= maxMarkerBits ? newTracked(a) || (a.n |= trackOpBit, o = !wasTracked(a)) : o = !a.has(activeEffect), o && (a.add(activeEffect), activeEffect.deps.push(a)); } function trigger(a, s, o, c, g, _) { const b = targetMap.get(a); if (!b) return; let $ = []; if (s === "clear") $ = [...b.values()]; else if (o === "length" && isArray$d(a)) b.forEach((j, X) => { (X === "length" || X >= c) && $.push(j); }); else switch (o !== void 0 && $.push(b.get(o)), s) { case "add": isArray$d(a) ? isIntegerKey(o) && $.push(b.get("length")) : ($.push(b.get(ITERATE_KEY)), isMap$2(a) && $.push(b.get(MAP_KEY_ITERATE_KEY))); break; case "delete": isArray$d(a) || ($.push(b.get(ITERATE_KEY)), isMap$2(a) && $.push(b.get(MAP_KEY_ITERATE_KEY))); break; case "set": isMap$2(a) && $.push(b.get(ITERATE_KEY)); break; } if ($.length === 1) $[0] && triggerEffects($[0]); else { const j = []; for (const X of $) X && j.push(...X); triggerEffects(createDep(j)); } } function triggerEffects(a, s) { const o = isArray$d(a) ? a : [...a]; for (const c of o) c.computed && triggerEffect(c); for (const c of o) c.computed || triggerEffect(c); } function triggerEffect(a, s) { (a !== activeEffect || a.allowRecurse) && (a.scheduler ? a.scheduler() : a.run()); } const isNonTrackableKeys = /* @__PURE__ */ makeMap("__proto__,__v_isRef,__isVue"), builtInSymbols = new Set( /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((a) => a !== "arguments" && a !== "caller").map((a) => Symbol[a]).filter(isSymbol$5) ), get$3 = /* @__PURE__ */ createGetter(), shallowGet = /* @__PURE__ */ createGetter(!1, !0), readonlyGet = /* @__PURE__ */ createGetter(!0), shallowReadonlyGet = /* @__PURE__ */ createGetter(!0, !0), arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { const a = {}; return ["includes", "indexOf", "lastIndexOf"].forEach((s) => { a[s] = function(...o) { const c = toRaw(this); for (let _ = 0, b = this.length; _ < b; _++) track(c, "get", _ + ""); const g = c[s](...o); return g === -1 || g === !1 ? c[s](...o.map(toRaw)) : g; }; }), ["push", "pop", "shift", "unshift", "splice"].forEach((s) => { a[s] = function(...o) { pauseTracking(); const c = toRaw(this)[s].apply(this, o); return resetTracking(), c; }; }), a; } function createGetter(a = !1, s = !1) { return function(c, g, _) { if (g === "__v_isReactive") return !a; if (g === "__v_isReadonly") return a; if (g === "__v_isShallow") return s; if (g === "__v_raw" && _ === (a ? s ? shallowReadonlyMap : readonlyMap : s ? shallowReactiveMap : reactiveMap).get(c)) return c; const b = isArray$d(c); if (!a && b && hasOwn(arrayInstrumentations, g)) return Reflect.get(arrayInstrumentations, g, _); const $ = Reflect.get(c, g, _); return (isSymbol$5(g) ? builtInSymbols.has(g) : isNonTrackableKeys(g)) || (a || track(c, "get", g), s) ? $ : isRef($) ? b && isIntegerKey(g) ? $ : $.value : isObject$8($) ? a ? readonly($) : reactive($) : $; }; } const set = /* @__PURE__ */ createSetter(), shallowSet = /* @__PURE__ */ createSetter(!0); function createSetter(a = !1) { return function(o, c, g, _) { let b = o[c]; if (isReadonly(b) && isRef(b) && !isRef(g)) return !1; if (!a && (!isShallow(g) && !isReadonly(g) && (b = toRaw(b), g = toRaw(g)), !isArray$d(o) && isRef(b) && !isRef(g))) return b.value = g, !0; const $ = isArray$d(o) && isIntegerKey(c) ? Number(c) < o.length : hasOwn(o, c), j = Reflect.set(o, c, g, _); return o === toRaw(_) && ($ ? hasChanged(g, b) && trigger(o, "set", c, g) : trigger(o, "add", c, g)), j; }; } function deleteProperty(a, s) { const o = hasOwn(a, s); a[s]; const c = Reflect.deleteProperty(a, s); return c && o && trigger(a, "delete", s, void 0), c; } function has(a, s) { const o = Reflect.has(a, s); return (!isSymbol$5(s) || !builtInSymbols.has(s)) && track(a, "has", s), o; } function ownKeys(a) { return track(a, "iterate", isArray$d(a) ? "length" : ITERATE_KEY), Reflect.ownKeys(a); } const mutableHandlers = { get: get$3, set, deleteProperty, has, ownKeys }, readonlyHandlers = { get: readonlyGet, set(a, s) { return !0; }, deleteProperty(a, s) { return !0; } }, shallowReactiveHandlers = /* @__PURE__ */ extend$1({}, mutableHandlers, { get: shallowGet, set: shallowSet }), shallowReadonlyHandlers = /* @__PURE__ */ extend$1({}, readonlyHandlers, { get: shallowReadonlyGet }), toShallow = (a) => a, getProto = (a) => Reflect.getPrototypeOf(a); function get$1$1(a, s, o = !1, c = !1) { a = a.__v_raw; const g = toRaw(a), _ = toRaw(s); o || (s !== _ && track(g, "get", s), track(g, "get", _)); const { has: b } = getProto(g), $ = c ? toShallow : o ? toReadonly : toReactive; if (b.call(g, s)) return $(a.get(s)); if (b.call(g, _)) return $(a.get(_)); a !== g && a.get(s); } function has$1(a, s = !1) { const o = this.__v_raw, c = toRaw(o), g = toRaw(a); return s || (a !== g && track(c, "has", a), track(c, "has", g)), a === g ? o.has(a) : o.has(a) || o.has(g); } function size(a, s = !1) { return a = a.__v_raw, !s && track(toRaw(a), "iterate", ITERATE_KEY), Reflect.get(a, "size", a); } function add$2(a) { a = toRaw(a); const s = toRaw(this); return getProto(s).has.call(s, a) || (s.add(a), trigger(s, "add", a, a)), this; } function set$1(a, s) { s = toRaw(s); const o = toRaw(this), { has: c, get: g } = getProto(o); let _ = c.call(o, a); _ || (a = toRaw(a), _ = c.call(o, a)); const b = g.call(o, a); return o.set(a, s), _ ? hasChanged(s, b) && trigger(o, "set", a, s) : trigger(o, "add", a, s), this; } function deleteEntry(a) { const s = toRaw(this), { has: o, get: c } = getProto(s); let g = o.call(s, a); g || (a = toRaw(a), g = o.call(s, a)), c && c.call(s, a); const _ = s.delete(a); return g && trigger(s, "delete", a, void 0), _; } function clear$4() { const a = toRaw(this), s = a.size !== 0, o = a.clear(); return s && trigger(a, "clear", void 0, void 0), o; } function createForEach(a, s) { return function(c, g) { const _ = this, b = _.__v_raw, $ = toRaw(b), j = s ? toShallow : a ? toReadonly : toReactive; return !a && track($, "iterate", ITERATE_KEY), b.forEach((X, Y) => c.call(g, j(X), j(Y), _)); }; } function createIterableMethod(a, s, o) { return function(...c) { const g = this.__v_raw, _ = toRaw(g), b = isMap$2(_), $ = a === "entries" || a === Symbol.iterator && b, j = a === "keys" && b, X = g[a](...c), Y = o ? toShallow : s ? toReadonly : toReactive; return !s && track(_, "iterate", j ? MAP_KEY_ITERATE_KEY : ITERATE_KEY), { // iterator protocol next() { const { value: Z, done: ee } = X.next(); return ee ? { value: Z, done: ee } : { value: $ ? [Y(Z[0]), Y(Z[1])] : Y(Z), done: ee }; }, // iterable protocol [Symbol.iterator]() { return this; } }; }; } function createReadonlyMethod(a) { return function(...s) { return a === "delete" ? !1 : this; }; } function createInstrumentations() { const a = { get(_) { return get$1$1(this, _); }, get size() { return size(this); }, has: has$1, add: add$2, set: set$1, delete: deleteEntry, clear: clear$4, forEach: createForEach(!1, !1) }, s = { get(_) { return get$1$1(this, _, !1, !0); }, get size() { return size(this); }, has: has$1, add: add$2, set: set$1, delete: deleteEntry, clear: clear$4, forEach: createForEach(!1, !0) }, o = { get(_) { return get$1$1(this, _, !0); }, get size() { return size(this, !0); }, has(_) { return has$1.call(this, _, !0); }, add: createReadonlyMethod( "add" /* TriggerOpTypes.ADD */ ), set: createReadonlyMethod( "set" /* TriggerOpTypes.SET */ ), delete: createReadonlyMethod( "delete" /* TriggerOpTypes.DELETE */ ), clear: createReadonlyMethod( "clear" /* TriggerOpTypes.CLEAR */ ), forEach: createForEach(!0, !1) }, c = { get(_) { return get$1$1(this, _, !0, !0); }, get size() { return size(this, !0); }, has(_) { return has$1.call(this, _, !0); }, add: createReadonlyMethod( "add" /* TriggerOpTypes.ADD */ ), set: createReadonlyMethod( "set" /* TriggerOpTypes.SET */ ), delete: createReadonlyMethod( "delete" /* TriggerOpTypes.DELETE */ ), clear: createReadonlyMethod( "clear" /* TriggerOpTypes.CLEAR */ ), forEach: createForEach(!0, !0) }; return ["keys", "values", "entries", Symbol.iterator].forEach((_) => { a[_] = createIterableMethod(_, !1, !1), o[_] = createIterableMethod(_, !0, !1), s[_] = createIterableMethod(_, !1, !0), c[_] = createIterableMethod(_, !0, !0); }), [ a, o, s, c ]; } const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(a, s) { const o = s ? a ? shallowReadonlyInstrumentations : shallowInstrumentations : a ? readonlyInstrumentations : mutableInstrumentations; return (c, g, _) => g === "__v_isReactive" ? !a : g === "__v_isReadonly" ? a : g === "__v_raw" ? c : Reflect.get(hasOwn(o, g) && g in c ? o : c, g, _); } const mutableCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(!1, !1) }, shallowCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(!1, !0) }, readonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(!0, !1) }, shallowReadonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(!0, !0) }, reactiveMap = /* @__PURE__ */ new WeakMap(), shallowReactiveMap = /* @__PURE__ */ new WeakMap(), readonlyMap = /* @__PURE__ */ new WeakMap(), shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); function targetTypeMap(a) { switch (a) { case "Object": case "Array": return 1; case "Map": case "Set": case "WeakMap": case "WeakSet": return 2; default: return 0; } } function getTargetType(a) { return a.__v_skip || !Object.isExtensible(a) ? 0 : targetTypeMap(toRawType(a)); } function reactive(a) { return isReadonly(a) ? a : createReactiveObject(a, !1, mutableHandlers, mutableCollectionHandlers, reactiveMap); } function shallowReactive(a) { return createReactiveObject(a, !1, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); } function readonly(a) { return createReactiveObject(a, !0, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); } function shallowReadonly(a) { return createReactiveObject(a, !0, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap); } function createReactiveObject(a, s, o, c, g) { if (!isObject$8(a) || a.__v_raw && !(s && a.__v_isReactive)) return a; const _ = g.get(a); if (_) return _; const b = getTargetType(a); if (b === 0) return a; const $ = new Proxy(a, b === 2 ? c : o); return g.set(a, $), $; } function isReactive(a) { return isReadonly(a) ? isReactive(a.__v_raw) : !!(a && a.__v_isReactive); } function isReadonly(a) { return !!(a && a.__v_isReadonly); } function isShallow(a) { return !!(a && a.__v_isShallow); } function isProxy(a) { return isReactive(a) || isReadonly(a); } function toRaw(a) { const s = a && a.__v_raw; return s ? toRaw(s) : a; } function markRaw(a) { return def(a, "__v_skip", !0), a; } const toReactive = (a) => isObject$8(a) ? reactive(a) : a, toReadonly = (a) => isObject$8(a) ? readonly(a) : a; function trackRefValue(a) { shouldTrack && activeEffect && (a = toRaw(a), trackEffects(a.dep || (a.dep = createDep()))); } function triggerRefValue(a, s) { a = toRaw(a), a.dep && triggerEffects(a.dep); } function isRef(a) { return !!(a && a.__v_isRef === !0); } function ref(a) { return createRef(a, !1); } function shallowRef(a) { return createRef(a, !0); } function createRef(a, s) { return isRef(a) ? a : new RefImpl(a, s); } class RefImpl { constructor(s, o) { this.__v_isShallow = o, this.dep = void 0, this.__v_isRef = !0, this._rawValue = o ? s : toRaw(s), this._value = o ? s : toReactive(s); } get value() { return trackRefValue(this), this._value; } set value(s) { const o = this.__v_isShallow || isShallow(s) || isReadonly(s); s = o ? s : toRaw(s), hasChanged(s, this._rawValue) && (this._rawValue = s, this._value = o ? s : toReactive(s), triggerRefValue(this)); } } function triggerRef(a) { triggerRefValue(a); } function unref(a) { return isRef(a) ? a.value : a; } const shallowUnwrapHandlers = { get: (a, s, o) => unref(Reflect.get(a, s, o)), set: (a, s, o, c) => { const g = a[s]; return isRef(g) && !isRef(o) ? (g.value = o, !0) : Reflect.set(a, s, o, c); } }; function proxyRefs(a) { return isReactive(a) ? a : new Proxy(a, shallowUnwrapHandlers); } class CustomRefImpl { constructor(s) { this.dep = void 0, this.__v_isRef = !0; const { get: o, set: c } = s(() => trackRefValue(this), () => triggerRefValue(this)); this._get = o, this._set = c; } get value() { return this._get(); } set value(s) { this._set(s); } } function customRef(a) { return new CustomRefImpl(a); } function toRefs$1(a) { const s = isArray$d(a) ? new Array(a.length) : {}; for (const o in a) s[o] = toRef(a, o); return s; } class ObjectRefImpl { constructor(s, o, c) { this._object = s, this._key = o, this._defaultValue = c, this.__v_isRef = !0; } get value() { const s = this._object[this._key]; return s === void 0 ? this._defaultValue : s; } set value(s) { this._object[this._key] = s; } } function toRef(a, s, o) { const c = a[s]; return isRef(c) ? c : new ObjectRefImpl(a, s, o); } var _a$2; class ComputedRefImpl { constructor(s, o, c, g) { this._setter = o, this.dep = void 0, this.__v_isRef = !0, this[_a$2] = !1, this._dirty = !0, this.effect = new ReactiveEffect(s, () => { this._dirty || (this._dirty = !0, triggerRefValue(this)); }), this.effect.computed = this, this.effect.active = this._cacheable = !g, this.__v_isReadonly = c; } get value() { const s = toRaw(this); return trackRefValue(s), (s._dirty || !s._cacheable) && (s._dirty = !1, s._value = s.effect.run()), s._value; } set value(s) { this._setter(s); } } _a$2 = "__v_isReadonly"; function computed$1(a, s, o = !1) { let c, g; const _ = isFunction$5(a); return _ ? (c = a, g = NOOP) : (c = a.get, g = a.set), new ComputedRefImpl(c, g, _ || !g, o); } const stack = []; function warn(a, ...s) { pauseTracking(); const o = stack.length ? stack[stack.length - 1].component : null, c = o && o.appContext.config.warnHandler, g = getComponentTrace(); if (c) callWithErrorHandling(c, o, 11, [ a + s.join(""), o && o.proxy, g.map(({ vnode: _ }) => `at <${formatComponentName(o, _.type)}>`).join(` `), g ]); else { const _ = [`[Vue warn]: ${a}`, ...s]; g.length && _.push(` `, ...formatTrace(g)), console.warn(..._); } resetTracking(); } function getComponentTrace() { let a = stack[stack.length - 1]; if (!a) return []; const s = []; for (; a; ) { const o = s[0]; o && o.vnode === a ? o.recurseCount++ : s.push({ vnode: a, recurseCount: 0 }); const c = a.component && a.component.parent; a = c && c.vnode; } return s; } function formatTrace(a) { const s = []; return a.forEach((o, c) => { s.push(...c === 0 ? [] : [` `], ...formatTraceEntry(o)); }), s; } function formatTraceEntry({ vnode: a, recurseCount: s }) { const o = s > 0 ? `... (${s} recursive calls)` : "", c = a.component ? a.component.parent == null : !1, g = ` at <${formatComponentName(a.component, a.type, c)}`, _ = ">" + o; return a.props ? [g, ...formatProps(a.props), _] : [g + _]; } function formatProps(a) { const s = [], o = Object.keys(a); return o.slice(0, 3).forEach((c) => { s.push(...formatProp(c, a[c])); }), o.length > 3 && s.push(" ..."), s; } function formatProp(a, s, o) { return isString$5(s) ? (s = JSON.stringify(s), o ? s : [`${a}=${s}`]) : typeof s == "number" || typeof s == "boolean" || s == null ? o ? s : [`${a}=${s}`] : isRef(s) ? (s = formatProp(a, toRaw(s.value), !0), o ? s : [`${a}=Ref<`, s, ">"]) : isFunction$5(s) ? [`${a}=fn${s.name ? `<${s.name}>` : ""}`] : (s = toRaw(s), o ? s : [`${a}=`, s]); } function callWithErrorHandling(a, s, o, c) { let g; try { g = c ? a(...c) : a(); } catch (_) { handleError(_, s, o); } return g; } function callWithAsyncErrorHandling(a, s, o, c) { if (isFunction$5(a)) { const _ = callWithErrorHandling(a, s, o, c); return _ && isPromise(_) && _.catch((b) => { handleError(b, s, o); }), _; } const g = []; for (let _ = 0; _ < a.length; _++) g.push(callWithAsyncErrorHandling(a[_], s, o, c)); return g; } function handleError(a, s, o, c = !0) { const g = s ? s.vnode : null; if (s) { let _ = s.parent; const b = s.proxy, $ = o; for (; _; ) { const X = _.ec; if (X) { for (let Y = 0; Y < X.length; Y++) if (X[Y](a, b, $) === !1) return; } _ = _.parent; } const j = s.appContext.config.errorHandler; if (j) { callWithErrorHandling(j, null, 10, [a, b, $]); return; } } logError(a, o, g, c); } function logError(a, s, o, c = !0) { console.error(a); } let isFlushing = !1, isFlushPending = !1; const queue = []; let flushIndex = 0; const pendingPostFlushCbs = []; let activePostFlushCbs = null, postFlushIndex = 0; const resolvedPromise = /* @__PURE__ */ Promise.resolve(); let currentFlushPromise = null; function nextTick(a) { const s = currentFlushPromise || resolvedPromise; return a ? s.then(this ? a.bind(this) : a) : s; } function findInsertionIndex(a) { let s = flushIndex + 1, o = queue.length; for (; s < o; ) { const c = s + o >>> 1; getId(queue[c]) < a ? s = c + 1 : o = c; } return s; } function queueJob(a) { (!queue.length || !queue.includes(a, isFlushing && a.allowRecurse ? flushIndex + 1 : flushIndex)) && (a.id == null ? queue.push(a) : queue.splice(findInsertionIndex(a.id), 0, a), queueFlush()); } function queueFlush() { !isFlushing && !isFlushPending && (isFlushPending = !0, currentFlushPromise = resolvedPromise.then(flushJobs)); } function invalidateJob(a) { const s = queue.indexOf(a); s > flushIndex && queue.splice(s, 1); } function queuePostFlushCb(a) { isArray$d(a) ? pendingPostFlushCbs.push(...a) : (!activePostFlushCbs || !activePostFlushCbs.includes(a, a.allowRecurse ? postFlushIndex + 1 : postFlushIndex)) && pendingPostFlushCbs.push(a), queueFlush(); } function flushPreFlushCbs(a, s = isFlushing ? flushIndex + 1 : 0) { for (; s < queue.length; s++) { const o = queue[s]; o && o.pre && (queue.splice(s, 1), s--, o()); } } function flushPostFlushCbs(a) { if (pendingPostFlushCbs.length) { const s = [...new Set(pendingPostFlushCbs)]; if (pendingPostFlushCbs.length = 0, activePostFlushCbs) { activePostFlushCbs.push(...s); return; } for (activePostFlushCbs = s, activePostFlushCbs.sort((o, c) => getId(o) - getId(c)), postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) activePostFlushCbs[postFlushIndex](); activePostFlushCbs = null, postFlushIndex = 0; } } const getId = (a) => a.id == null ? 1 / 0 : a.id, comparator = (a, s) => { const o = getId(a) - getId(s); if (o === 0) { if (a.pre && !s.pre) return -1; if (s.pre && !a.pre) return 1; } return o; }; function flushJobs(a) { isFlushPending = !1, isFlushing = !0, queue.sort(comparator); const s = NOOP; try { for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { const o = queue[flushIndex]; o && o.active !== !1 && callWithErrorHandling( o, null, 14 /* ErrorCodes.SCHEDULER */ ); } } finally { flushIndex = 0, queue.length = 0, flushPostFlushCbs(), isFlushing = !1, currentFlushPromise = null, (queue.length || pendingPostFlushCbs.length) && flushJobs(); } } let devtools, buffer$1 = []; function setDevtoolsHook(a, s) { var o, c; devtools = a, devtools ? (devtools.enabled = !0, buffer$1.forEach(({ event: g, args: _ }) => devtools.emit(g, ..._)), buffer$1 = []) : /* handle late devtools injection - only do this if we are in an actual */ /* browser environment to avoid the timer handle stalling test runner exit */ /* (#4815) */ typeof window < "u" && // some envs mock window but not fully window.HTMLElement && // also exclude jsdom !(!((c = (o = window.navigator) === null || o === void 0 ? void 0 : o.userAgent) === null || c === void 0) && c.includes("jsdom")) ? ((s.__VUE_DEVTOOLS_HOOK_REPLAY__ = s.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((_) => { setDevtoolsHook(_, s); }), setTimeout(() => { devtools || (s.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, buffer$1 = []); }, 3e3)) : buffer$1 = []; } function emit$1(a, s, ...o) { if (a.isUnmounted) return; const c = a.vnode.props || EMPTY_OBJ; let g = o; const _ = s.startsWith("update:"), b = _ && s.slice(7); if (b && b in c) { const Y = `${b === "modelValue" ? "model" : b}Modifiers`, { number: Z, trim: ee } = c[Y] || EMPTY_OBJ; ee && (g = o.map((re) => re.trim())), Z && (g = o.map(toNumber)); } let $, j = c[$ = toHandlerKey(s)] || // also try camelCase event handler (#2249) c[$ = toHandlerKey(camelize(s))]; !j && _ && (j = c[$ = toHandlerKey(hyphenate(s))]), j && callWithAsyncErrorHandling(j, a, 6, g); const X = c[$ + "Once"]; if (X) { if (!a.emitted) a.emitted = {}; else if (a.emitted[$]) return; a.emitted[$] = !0, callWithAsyncErrorHandling(X, a, 6, g); } } function normalizeEmitsOptions(a, s, o = !1) { const c = s.emitsCache, g = c.get(a); if (g !== void 0) return g; const _ = a.emits; let b = {}, $ = !1; if (!isFunction$5(a)) { const j = (X) => { const Y = normalizeEmitsOptions(X, s, !0); Y && ($ = !0, extend$1(b, Y)); }; !o && s.mixins.length && s.mixins.forEach(j), a.extends && j(a.extends), a.mixins && a.mixins.forEach(j); } return !_ && !$ ? (isObject$8(a) && c.set(a, null), null) : (isArray$d(_) ? _.forEach((j) => b[j] = null) : extend$1(b, _), isObject$8(a) && c.set(a, b), b); } function isEmitListener(a, s) { return !a || !isOn(s) ? !1 : (s = s.slice(2).replace(/Once$/, ""), hasOwn(a, s[0].toLowerCase() + s.slice(1)) || hasOwn(a, hyphenate(s)) || hasOwn(a, s)); } let currentRenderingInstance = null, currentScopeId = null; function setCurrentRenderingInstance(a) { const s = currentRenderingInstance; return currentRenderingInstance = a, currentScopeId = a && a.type.__scopeId || null, s; } function pushScopeId(a) { currentScopeId = a; } function popScopeId() { currentScopeId = null; } const withScopeId = (a) => withCtx; function withCtx(a, s = currentRenderingInstance, o) { if (!s || a._n) return a; const c = (...g) => { c._d && setBlockTracking(-1); const _ = setCurrentRenderingInstance(s), b = a(...g); return setCurrentRenderingInstance(_), c._d && setBlockTracking(1), b; }; return c._n = !0, c._c = !0, c._d = !0, c; } function markAttrsAccessed() { } function renderComponentRoot(a) { const { type: s, vnode: o, proxy: c, withProxy: g, props: _, propsOptions: [b], slots: $, attrs: j, emit: X, render: Y, renderCache: Z, data: ee, setupState: re, ctx: ne, inheritAttrs: ie } = a; let se, ce; const he = setCurrentRenderingInstance(a); try { if (o.shapeFlag & 4) { const fe = g || c; se = normalizeVNode(Y.call(fe, fe, Z, _, re, ee, ne)), ce = j; } else { const fe = s; se = normalizeVNode(fe.length > 1 ? fe(_, { attrs: j, slots: $, emit: X }) : fe( _, null /* we know it doesn't need it */ )), ce = s.props ? j : getFunctionalFallthrough(j); } } catch (fe) { blockStack.length = 0, handleError( fe, a, 1 /* ErrorCodes.RENDER_FUNCTION */ ), se = createVNode(Comment); } let pe = se; if (ce && ie !== !1) { const fe = Object.keys(ce), { shapeFlag: me } = pe; fe.length && me & 7 && (b && fe.some(isModelListener) && (ce = filterModelListeners(ce, b)), pe = cloneVNode(pe, ce)); } return o.dirs && (pe = cloneVNode(pe), pe.dirs = pe.dirs ? pe.dirs.concat(o.dirs) : o.dirs), o.transition && (pe.transition = o.transition), se = pe, setCurrentRenderingInstance(he), se; } function filterSingleRoot(a) { let s; for (let o = 0; o < a.length; o++) { const c = a[o]; if (isVNode(c)) { if (c.type !== Comment || c.children === "v-if") { if (s) return; s = c; } } else return; } return s; } const getFunctionalFallthrough = (a) => { let s; for (const o in a) (o === "class" || o === "style" || isOn(o)) && ((s || (s = {}))[o] = a[o]); return s; }, filterModelListeners = (a, s) => { const o = {}; for (const c in a) (!isModelListener(c) || !(c.slice(9) in s)) && (o[c] = a[c]); return o; }; function shouldUpdateComponent(a, s, o) { const { props: c, children: g, component: _ } = a, { props: b, children: $, patchFlag: j } = s, X = _.emitsOptions; if (s.dirs || s.transition) return !0; if (o && j >= 0) { if (j & 1024) return !0; if (j & 16) return c ? hasPropsChanged(c, b, X) : !!b; if (j & 8) { const Y = s.dynamicProps; for (let Z = 0; Z < Y.length; Z++) { const ee = Y[Z]; if (b[ee] !== c[ee] && !isEmitListener(X, ee)) return !0; } } } else return (g || $) && (!$ || !$.$stable) ? !0 : c === b ? !1 : c ? b ? hasPropsChanged(c, b, X) : !0 : !!b; return !1; } function hasPropsChanged(a, s, o) { const c = Object.keys(s); if (c.length !== Object.keys(a).length) return !0; for (let g = 0; g < c.length; g++) { const _ = c[g]; if (s[_] !== a[_] && !isEmitListener(o, _)) return !0; } return !1; } function updateHOCHostEl({ vnode: a, parent: s }, o) { for (; s && s.subTree === a; ) (a = s.vnode).el = o, s = s.parent; } const isSuspense = (a) => a.__isSuspense, SuspenseImpl = { name: "Suspense", // In order to make Suspense tree-shakable, we need to avoid importing it // directly in the renderer. The renderer checks for the __isSuspense flag // on a vnode's type and calls the `process` method, passing in renderer // internals. __isSuspense: !0, process(a, s, o, c, g, _, b, $, j, X) { a == null ? mountSuspense(s, o, c, g, _, b, $, j, X) : patchSuspense(a, s, o, c, g, b, $, j, X); }, hydrate: hydrateSuspense, create: createSuspenseBoundary, normalize: normalizeSuspenseChildren }, Suspense = SuspenseImpl; function triggerEvent(a, s) { const o = a.props && a.props[s]; isFunction$5(o) && o(); } function mountSuspense(a, s, o, c, g, _, b, $, j) { const { p: X, o: { createElement: Y } } = j, Z = Y("div"), ee = a.suspense = createSuspenseBoundary(a, g, c, s, Z, o, _, b, $, j); X(null, ee.pendingBranch = a.ssContent, Z, null, c, ee, _, b), ee.deps > 0 ? (triggerEvent(a, "onPending"), triggerEvent(a, "onFallback"), X( null, a.ssFallback, s, o, c, null, // fallback tree will not have suspense context _, b ), setActiveBranch(ee, a.ssFallback)) : ee.resolve(); } function patchSuspense(a, s, o, c, g, _, b, $, { p: j, um: X, o: { createElement: Y } }) { const Z = s.suspense = a.suspense; Z.vnode = s, s.el = a.el; const ee = s.ssContent, re = s.ssFallback, { activeBranch: ne, pendingBranch: ie, isInFallback: se, isHydrating: ce } = Z; if (ie) Z.pendingBranch = ee, isSameVNodeType(ee, ie) ? (j(ie, ee, Z.hiddenContainer, null, g, Z, _, b, $), Z.deps <= 0 ? Z.resolve() : se && (j( ne, re, o, c, g, null, // fallback tree will not have suspense context _, b, $ ), setActiveBranch(Z, re))) : (Z.pendingId++, ce ? (Z.isHydrating = !1, Z.activeBranch = ie) : X(ie, g, Z), Z.deps = 0, Z.effects.length = 0, Z.hiddenContainer = Y("div"), se ? (j(null, ee, Z.hiddenContainer, null, g, Z, _, b, $), Z.deps <= 0 ? Z.resolve() : (j( ne, re, o, c, g, null, // fallback tree will not have suspense context _, b, $ ), setActiveBranch(Z, re))) : ne && isSameVNodeType(ee, ne) ? (j(ne, ee, o, c, g, Z, _, b, $), Z.resolve(!0)) : (j(null, ee, Z.hiddenContainer, null, g, Z, _, b, $), Z.deps <= 0 && Z.resolve())); else if (ne && isSameVNodeType(ee, ne)) j(ne, ee, o, c, g, Z, _, b, $), setActiveBranch(Z, ee); else if (triggerEvent(s, "onPending"), Z.pendingBranch = ee, Z.pendingId++, j(null, ee, Z.hiddenContainer, null, g, Z, _, b, $), Z.deps <= 0) Z.resolve(); else { const { timeout: he, pendingId: pe } = Z; he > 0 ? setTimeout(() => { Z.pendingId === pe && Z.fallback(re); }, he) : he === 0 && Z.fallback(re); } } function createSuspenseBoundary(a, s, o, c, g, _, b, $, j, X, Y = !1) { const { p: Z, m: ee, um: re, n: ne, o: { parentNode: ie, remove: se } } = X, ce = toNumber(a.props && a.props.timeout), he = { vnode: a, parent: s, parentComponent: o, isSVG: b, container: c, hiddenContainer: g, anchor: _, deps: 0, pendingId: 0, timeout: typeof ce == "number" ? ce : -1, activeBranch: null, pendingBranch: null, isInFallback: !0, isHydrating: Y, isUnmounted: !1, effects: [], resolve(pe = !1) { const { vnode: fe, activeBranch: me, pendingBranch: He, pendingId: qe, effects: Pe, parentComponent: Ke, container: Be } = he; if (he.isHydrating) he.isHydrating = !1; else if (!pe) { const Ue = me && He.transition && He.transition.mode === "out-in"; Ue && (me.transition.afterLeave = () => { qe === he.pendingId && ee( He, Be, Ye, 0 /* MoveType.ENTER */ ); }); let { anchor: Ye } = he; me && (Ye = ne(me), re(me, Ke, he, !0)), Ue || ee( He, Be, Ye, 0 /* MoveType.ENTER */ ); } setActiveBranch(he, He), he.pendingBranch = null, he.isInFallback = !1; let _e = he.parent, $e = !1; for (; _e; ) { if (_e.pendingBranch) { _e.effects.push(...Pe), $e = !0; break; } _e = _e.parent; } $e || queuePostFlushCb(Pe), he.effects = [], triggerEvent(fe, "onResolve"); }, fallback(pe) { if (!he.pendingBranch) return; const { vnode: fe, activeBranch: me, parentComponent: He, container: qe, isSVG: Pe } = he; triggerEvent(fe, "onFallback"); const Ke = ne(me), Be = () => { he.isInFallback && (Z( null, pe, qe, Ke, He, null, // fallback tree will not have suspense context Pe, $, j ), setActiveBranch(he, pe)); }, _e = pe.transition && pe.transition.mode === "out-in"; _e && (me.transition.afterLeave = Be), he.isInFallback = !0, re( me, He, null, // no suspense so unmount hooks fire now !0 // shouldRemove ), _e || Be(); }, move(pe, fe, me) { he.activeBranch && ee(he.activeBranch, pe, fe, me), he.container = pe; }, next() { return he.activeBranch && ne(he.activeBranch); }, registerDep(pe, fe) { const me = !!he.pendingBranch; me && he.deps++; const He = pe.vnode.el; pe.asyncDep.catch((qe) => { handleError( qe, pe, 0 /* ErrorCodes.SETUP_FUNCTION */ ); }).then((qe) => { if (pe.isUnmounted || he.isUnmounted || he.pendingId !== pe.suspenseId) return; pe.asyncResolved = !0; const { vnode: Pe } = pe; handleSetupResult(pe, qe, !1), He && (Pe.el = He); const Ke = !He && pe.subTree.el; fe( pe, Pe, // component may have been moved before resolve. // if this is not a hydration, instance.subTree will be the comment // placeholder. ie(He || pe.subTree.el), // anchor will not be used if this is hydration, so only need to // consider the comment placeholder case. He ? null : ne(pe.subTree), he, b, j ), Ke && se(Ke), updateHOCHostEl(pe, Pe.el), me && --he.deps === 0 && he.resolve(); }); }, unmount(pe, fe) { he.isUnmounted = !0, he.activeBranch && re(he.activeBranch, o, pe, fe), he.pendingBranch && re(he.pendingBranch, o, pe, fe); } }; return he; } function hydrateSuspense(a, s, o, c, g, _, b, $, j) { const X = s.suspense = createSuspenseBoundary( s, c, o, a.parentNode, document.createElement("div"), null, g, _, b, $, !0 /* hydrating */ ), Y = j(a, X.pendingBranch = s.ssContent, o, X, _, b); return X.deps === 0 && X.resolve(), Y; } function normalizeSuspenseChildren(a) { const { shapeFlag: s, children: o } = a, c = s & 32; a.ssContent = normalizeSuspenseSlot(c ? o.default : o), a.ssFallback = c ? normalizeSuspenseSlot(o.fallback) : createVNode(Comment); } function normalizeSuspenseSlot(a) { let s; if (isFunction$5(a)) { const o = isBlockTreeEnabled && a._c; o && (a._d = !1, openBlock()), a = a(), o && (a._d = !0, s = currentBlock, closeBlock()); } return isArray$d(a) && (a = filterSingleRoot(a)), a = normalizeVNode(a), s && !a.dynamicChildren && (a.dynamicChildren = s.filter((o) => o !== a)), a; } function queueEffectWithSuspense(a, s) { s && s.pendingBranch ? isArray$d(a) ? s.effects.push(...a) : s.effects.push(a) : queuePostFlushCb(a); } function setActiveBranch(a, s) { a.activeBranch = s; const { vnode: o, parentComponent: c } = a, g = o.el = s.el; c && c.subTree === o && (c.vnode.el = g, updateHOCHostEl(c, g)); } function provide(a, s) { if (currentInstance) { let o = currentInstance.provides; const c = currentInstance.parent && currentInstance.parent.provides; c === o && (o = currentInstance.provides = Object.create(c)), o[a] = s; } } function inject(a, s, o = !1) { const c = currentInstance || currentRenderingInstance; if (c) { const g = c.parent == null ? c.vnode.appContext && c.vnode.appContext.provides : c.parent.provides; if (g && a in g) return g[a]; if (arguments.length > 1) return o && isFunction$5(s) ? s.call(c.proxy) : s; } } function watchEffect(a, s) { return doWatch(a, null, s); } function watchPostEffect(a, s) { return doWatch(a, null, { flush: "post" }); } function watchSyncEffect(a, s) { return doWatch(a, null, { flush: "sync" }); } const INITIAL_WATCHER_VALUE = {}; function watch(a, s, o) { return doWatch(a, s, o); } function doWatch(a, s, { immediate: o, deep: c, flush: g, onTrack: _, onTrigger: b } = EMPTY_OBJ) { const $ = currentInstance; let j, X = !1, Y = !1; if (isRef(a) ? (j = () => a.value, X = isShallow(a)) : isReactive(a) ? (j = () => a, c = !0) : isArray$d(a) ? (Y = !0, X = a.some((ce) => isReactive(ce) || isShallow(ce)), j = () => a.map((ce) => { if (isRef(ce)) return ce.value; if (isReactive(ce)) return traverse(ce); if (isFunction$5(ce)) return callWithErrorHandling( ce, $, 2 /* ErrorCodes.WATCH_GETTER */ ); })) : isFunction$5(a) ? s ? j = () => callWithErrorHandling( a, $, 2 /* ErrorCodes.WATCH_GETTER */ ) : j = () => { if (!($ && $.isUnmounted)) return Z && Z(), callWithAsyncErrorHandling(a, $, 3, [ee]); } : j = NOOP, s && c) { const ce = j; j = () => traverse(ce()); } let Z, ee = (ce) => { Z = se.onStop = () => { callWithErrorHandling( ce, $, 4 /* ErrorCodes.WATCH_CLEANUP */ ); }; }; if (isInSSRComponentSetup) return ee = NOOP, s ? o && callWithAsyncErrorHandling(s, $, 3, [ j(), Y ? [] : void 0, ee ]) : j(), NOOP; let re = Y ? [] : INITIAL_WATCHER_VALUE; const ne = () => { if (se.active) if (s) { const ce = se.run(); (c || X || (Y ? ce.some((he, pe) => hasChanged(he, re[pe])) : hasChanged(ce, re))) && (Z && Z(), callWithAsyncErrorHandling(s, $, 3, [ ce, // pass undefined as the old value when it's changed for the first time re === INITIAL_WATCHER_VALUE ? void 0 : re, ee ]), re = ce); } else se.run(); }; ne.allowRecurse = !!s; let ie; g === "sync" ? ie = ne : g === "post" ? ie = () => queuePostRenderEffect(ne, $ && $.suspense) : (ne.pre = !0, $ && (ne.id = $.uid), ie = () => queueJob(ne)); const se = new ReactiveEffect(j, ie); return s ? o ? ne() : re = se.run() : g === "post" ? queuePostRenderEffect(se.run.bind(se), $ && $.suspense) : se.run(), () => { se.stop(), $ && $.scope && remove$1($.scope.effects, se); }; } function instanceWatch(a, s, o) { const c = this.proxy, g = isString$5(a) ? a.includes(".") ? createPathGetter(c, a) : () => c[a] : a.bind(c, c); let _; isFunction$5(s) ? _ = s : (_ = s.handler, o = s); const b = currentInstance; setCurrentInstance(this); const $ = doWatch(g, _.bind(c), o); return b ? setCurrentInstance(b) : unsetCurrentInstance(), $; } function createPathGetter(a, s) { const o = s.split("."); return () => { let c = a; for (let g = 0; g < o.length && c; g++) c = c[o[g]]; return c; }; } function traverse(a, s) { if (!isObject$8(a) || a.__v_skip || (s = s || /* @__PURE__ */ new Set(), s.has(a))) return a; if (s.add(a), isRef(a)) traverse(a.value, s); else if (isArray$d(a)) for (let o = 0; o < a.length; o++) traverse(a[o], s); else if (isSet$2(a) || isMap$2(a)) a.forEach((o) => { traverse(o, s); }); else if (isPlainObject$2(a)) for (const o in a) traverse(a[o], s); return a; } function useTransitionState() { const a = { isMounted: !1, isLeaving: !1, isUnmounting: !1, leavingVNodes: /* @__PURE__ */ new Map() }; return onMounted(() => { a.isMounted = !0; }), onBeforeUnmount(() => { a.isUnmounting = !0; }), a; } const TransitionHookValidator = [Function, Array], BaseTransitionImpl = { name: "BaseTransition", props: { mode: String, appear: Boolean, persisted: Boolean, // enter onBeforeEnter: TransitionHookValidator, onEnter: TransitionHookValidator, onAfterEnter: TransitionHookValidator, onEnterCancelled: TransitionHookValidator, // leave onBeforeLeave: TransitionHookValidator, onLeave: TransitionHookValidator, onAfterLeave: TransitionHookValidator, onLeaveCancelled: TransitionHookValidator, // appear onBeforeAppear: TransitionHookValidator, onAppear: TransitionHookValidator, onAfterAppear: TransitionHookValidator, onAppearCancelled: TransitionHookValidator }, setup(a, { slots: s }) { const o = getCurrentInstance(), c = useTransitionState();