wevu 6.16.42 → 6.16.44
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.
- package/dist/dev/{base-BPG0sDu-.mjs → base-C_Jux3cz.mjs} +2 -2
- package/dist/dev/{base-BPG0sDu-.mjs.map → base-C_Jux3cz.mjs.map} +1 -1
- package/dist/dev/{computed-njo5yWBk.mjs → computed-DKaBMLFF.mjs} +2 -2
- package/dist/dev/{computed-njo5yWBk.mjs.map → computed-DKaBMLFF.mjs.map} +1 -1
- package/dist/dev/index.mjs +10 -10
- package/dist/dev/internal-reactivity.mjs +5 -5
- package/dist/dev/internal-runtime.mjs +3 -3
- package/dist/dev/internal-template.mjs +1 -1
- package/dist/dev/{ref-DJZWB2im.mjs → ref-Beyx3EmJ.mjs} +5 -5
- package/dist/dev/{ref-DJZWB2im.mjs.map → ref-Beyx3EmJ.mjs.map} +1 -1
- package/dist/dev/rolldown-runtime-BUUfjzRC.mjs +36 -0
- package/dist/dev/{router-pDQKAVqU.mjs → router-CQIgz5Q_.mjs} +2 -2
- package/dist/dev/{router-pDQKAVqU.mjs.map → router-CQIgz5Q_.mjs.map} +1 -1
- package/dist/dev/router.mjs +3 -3
- package/dist/dev/{store-D_seGoEN.mjs → store-Dzij_OWm.mjs} +3 -3
- package/dist/dev/{store-D_seGoEN.mjs.map → store-Dzij_OWm.mjs.map} +1 -1
- package/dist/dev/store.mjs +1 -1
- package/dist/dev/{template-D4K5xTD2.mjs → template-QtiM6Ubi.mjs} +2 -2
- package/dist/dev/{template-D4K5xTD2.mjs.map → template-QtiM6Ubi.mjs.map} +1 -1
- package/dist/dev/{templateRef-DFq1B-ZH.mjs → templateRef-iFlXe1J4.mjs} +43 -23
- package/dist/dev/{templateRef-DFq1B-ZH.mjs.map → templateRef-iFlXe1J4.mjs.map} +1 -1
- package/dist/dev/{toRefs-C9gCs6N3.mjs → toRefs-BNWU48nG.mjs} +2 -2
- package/dist/dev/{toRefs-C9gCs6N3.mjs.map → toRefs-BNWU48nG.mjs.map} +1 -1
- package/dist/dev/vue-demi.mjs +11 -10
- package/dist/dev/vue-demi.mjs.map +1 -1
- package/dist/dev/{watch-CJiD9u34.mjs → watch-BLUHj_gn.mjs} +3 -3
- package/dist/dev/{watch-CJiD9u34.mjs.map → watch-BLUHj_gn.mjs.map} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal-runtime.mjs +1 -1
- package/dist/templateRef-CDJDt62p.mjs +1 -0
- package/dist/vue-demi.mjs +1 -1
- package/package.json +4 -4
- package/dist/dev/src-CLv6p36Y.mjs +0 -46
- package/dist/templateRef-4ukXp8VN.mjs +0 -1
- /package/dist/{chunk-CenpyGzJ.mjs → rolldown-runtime-CenpyGzJ.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as isReactive, n as isRef, t as customRef } from "./ref-
|
|
1
|
+
import { l as isReactive, n as isRef, t as customRef } from "./ref-Beyx3EmJ.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/reactivity/toRefs.ts
|
|
4
4
|
function toRef(object, key, defaultValue) {
|
|
@@ -39,4 +39,4 @@ function toRefs(object) {
|
|
|
39
39
|
|
|
40
40
|
//#endregion
|
|
41
41
|
export { toRefs as n, toRef as t };
|
|
42
|
-
//# sourceMappingURL=toRefs-
|
|
42
|
+
//# sourceMappingURL=toRefs-BNWU48nG.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toRefs-
|
|
1
|
+
{"version":3,"file":"toRefs-BNWU48nG.mjs","names":[],"sources":["../../src/reactivity/toRefs.ts"],"sourcesContent":["import type { Ref } from './ref'\nimport { isReactive } from './reactive'\nimport { customRef, isRef } from './ref'\n\n/**\n * 为源响应式对象的单个属性创建 ref,可读可写并与原属性保持同步。\n *\n * @param object 源响应式对象\n * @param key 属性名\n * @returns 指向该属性的 ref\n *\n * @example\n * ```ts\n * const state = reactive({ foo: 1 })\n * const fooRef = toRef(state, 'foo')\n *\n * fooRef.value++\n * console.log(state.foo) // 2\n * ```\n */\nexport function toRef<T extends object, K extends keyof T>(\n object: T,\n key: K,\n): ToRef<T[K]>\nexport function toRef<T extends object, K extends keyof T>(\n object: T,\n key: K,\n defaultValue: T[K],\n): ToRef<T[K]>\nexport function toRef<T extends object, K extends keyof T>(\n object: T,\n key: K,\n defaultValue?: T[K],\n): ToRef<T[K]> {\n const value = object[key]\n\n if (isRef(value)) {\n return value as ToRef<T[K]>\n }\n\n return customRef<T[K]>((track, trigger) => ({\n get() {\n track()\n return object[key]\n },\n set(newValue) {\n ;(object as any)[key] = newValue\n trigger()\n },\n }), defaultValue) as ToRef<T[K]>\n}\n\n/**\n * 将一个响应式对象转换成“同结构的普通对象”,其中每个字段都是指向原对象对应属性的 ref。\n *\n * @param object 待转换的响应式对象\n * @returns 包含若干 ref 的普通对象\n *\n * @example\n * ```ts\n * const state = reactive({ foo: 1, bar: 2 })\n * const stateAsRefs = toRefs(state)\n *\n * stateAsRefs.foo.value++ // 2\n * state.foo // 2\n * ```\n */\nexport function toRefs<T extends object>(object: T): ToRefs<T> {\n if (!isReactive(object)) {\n // eslint-disable-next-line no-console -- 保持与 Vue 类似的非响应式输入警告\n console.warn('toRefs() 需要响应式对象,但收到的是普通对象。')\n }\n\n const result: any = Array.isArray(object) ? Array.from({ length: object.length }) : {}\n\n for (const key in object) {\n result[key] = toRef(object, key)\n }\n\n return result\n}\n\n/**\n * toRefs 返回值的类型辅助\n */\ntype ToRef<T> = T extends Ref<any> ? T : Ref<T>\n\nexport type ToRefs<T extends object> = {\n [K in keyof T]: ToRef<T[K]>\n}\n"],"mappings":";;;AA6BA,SAAgB,MACd,QACA,KACA,cACa;CACb,MAAM,QAAQ,OAAO;CAErB,IAAI,MAAM,KAAK,GACb,OAAO;CAGT,OAAO,WAAiB,OAAO,aAAa;EAC1C,MAAM;GACJ,MAAM;GACN,OAAO,OAAO;EAChB;EACA,IAAI,UAAU;GACX,AAAC,OAAe,OAAO;GACxB,QAAQ;EACV;CACF,IAAI,YAAY;AAClB;;;;;;;;;;;;;;;;AAiBA,SAAgB,OAAyB,QAAsB;CAC7D,IAAI,CAAC,WAAW,MAAM,GAEpB,QAAQ,KAAK,6BAA6B;CAG5C,MAAM,SAAc,MAAM,QAAQ,MAAM,IAAI,MAAM,KAAK,EAAE,QAAQ,OAAO,OAAO,CAAC,IAAI,CAAC;CAErF,KAAK,MAAM,OAAO,QAChB,OAAO,OAAO,MAAM,QAAQ,GAAG;CAGjC,OAAO;AACT"}
|
package/dist/dev/vue-demi.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { n as __reExport, t as __exportAll } from "./
|
|
2
|
-
import { C as effect, D as onScopeDispose, E as getCurrentScope, N as nextTick, O as startBatch, S as batch, T as endBatch, a as toValue, b as addMutationRecorder, c as isRaw, d as reactive, f as isShallowReactive, g as touchReactive, h as prelinkReactiveTree, i as ref, k as stop, l as isReactive, n as isRef, o as unref, p as shallowReactive, s as getReactiveVersion, t as customRef, u as markRaw, w as effectScope, x as removeMutationRecorder, y as toRaw } from "./ref-
|
|
3
|
-
import { t as computed } from "./computed-
|
|
4
|
-
import { S as shallowReadonly, b as isReadonly, c as getCurrentSetupContext, d as setCurrentSetupContext, n as callHookList, r as callHookReturn, s as getCurrentInstance, u as setCurrentInstance, x as readonly, y as isProxy } from "./base-
|
|
5
|
-
import { a as getDeepWatchStrategy, c as isShallowRef, i as watchSyncEffect, l as shallowRef, n as watchEffect, o as setDeepWatchStrategy, r as watchPostEffect, s as traverse, t as watch, u as triggerRef } from "./watch-
|
|
6
|
-
import { n as toRefs, t as toRef } from "./toRefs-
|
|
7
|
-
import { $ as onUnhandledRejection, A as setGlobalProvidedValue, B as onPageNotFound, F as onHide, G as onResize, H as onPullDownRefresh, I as onLaunch, J as onShareAppMessage, K as onRouteDone, L as onLoad, M as onAttached, N as onDetached, P as onError, Q as onThemeChange, R as onMemoryWarning, U as onReachBottom, V as onPageScroll, W as onReady, X as onShow, Y as onShareTimeline, Z as onTabItemTap, _ as provide, et as onUnload, g as injectGlobal, h as inject, j as onAddToFavorites, m as hasInjectionContext, n as useNativeRouter, q as onSaveExitState, t as useNativePageRouter, v as provideGlobal, z as onMoved } from "./router-
|
|
8
|
-
import { $ as version, A as registerPageLayoutBridge, B as mountRuntimeInstance, C as useElementIntersectionObserver, D as defineComponent, E as createWevuScopedSlotComponent, F as unregisterRuntimeLayoutHosts, G as setPageLayout, H as teardownRuntimeInstance, I as useLayoutBridge, J as usePageLayout, K as syncRuntimePageLayoutState, L as useLayoutHosts, M as resolveLayoutBridge, N as resolveLayoutHost, O as createApp, P as unregisterPageLayoutBridge, Q as markNoSetData, R as waitForLayoutHost, S as useIntersectionObserver, T as createWevuComponent, U as runSetupFunction, V as setRuntimeSetDataVisibility, W as resolveRuntimePageLayoutName, X as setWevuDefaults, Y as resetWevuDefaults, Z as isNoSetData, _ as usePageScrollThrottle, a as useModel, at as onDeactivated, b as useNavigationBarMetrics, c as useSlots, ct as onServerPrefetch, d as useUpdatePerformanceListener, et as callUpdateHooks, f as useBoundingClientRect, g as useAsyncPullDownRefresh, h as useSelectorQuery, i as useChangeModel, it as onBeforeUpdate, j as registerRuntimeLayoutHosts, k as registerComponent, l as defineAppSetup, lt as onUnmounted, m as useSelectorFields, n as mergeModels, nt as onBeforeMount, o as useAttrs, ot as onErrorCaptured, p as useScrollOffset, q as syncRuntimePageLayoutStateFromRuntime, r as useBindModel, rt as onBeforeUnmount, s as useNativeInstance, st as onMounted, t as useTemplateRef, tt as onActivated, u as use, ut as onUpdated, v as getCurrentPageStackSnapshot, w as useDisposables, x as usePageStack, y as getNavigationBarMetrics, z as registerApp } from "./templateRef-
|
|
9
|
-
import { n as normalizeStyle, r as resolvePropValue, t as normalizeClass } from "./template-
|
|
10
|
-
import { n as defineStore, r as createStore, t as storeToRefs } from "./store-
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-BUUfjzRC.mjs";
|
|
2
|
+
import { C as effect, D as onScopeDispose, E as getCurrentScope, N as nextTick, O as startBatch, S as batch, T as endBatch, a as toValue, b as addMutationRecorder, c as isRaw, d as reactive, f as isShallowReactive, g as touchReactive, h as prelinkReactiveTree, i as ref, k as stop, l as isReactive, n as isRef, o as unref, p as shallowReactive, s as getReactiveVersion, t as customRef, u as markRaw, w as effectScope, x as removeMutationRecorder, y as toRaw } from "./ref-Beyx3EmJ.mjs";
|
|
3
|
+
import { t as computed } from "./computed-DKaBMLFF.mjs";
|
|
4
|
+
import { S as shallowReadonly, b as isReadonly, c as getCurrentSetupContext, d as setCurrentSetupContext, n as callHookList, r as callHookReturn, s as getCurrentInstance, u as setCurrentInstance, x as readonly, y as isProxy } from "./base-C_Jux3cz.mjs";
|
|
5
|
+
import { a as getDeepWatchStrategy, c as isShallowRef, i as watchSyncEffect, l as shallowRef, n as watchEffect, o as setDeepWatchStrategy, r as watchPostEffect, s as traverse, t as watch, u as triggerRef } from "./watch-BLUHj_gn.mjs";
|
|
6
|
+
import { n as toRefs, t as toRef } from "./toRefs-BNWU48nG.mjs";
|
|
7
|
+
import { $ as onUnhandledRejection, A as setGlobalProvidedValue, B as onPageNotFound, F as onHide, G as onResize, H as onPullDownRefresh, I as onLaunch, J as onShareAppMessage, K as onRouteDone, L as onLoad, M as onAttached, N as onDetached, P as onError, Q as onThemeChange, R as onMemoryWarning, U as onReachBottom, V as onPageScroll, W as onReady, X as onShow, Y as onShareTimeline, Z as onTabItemTap, _ as provide, et as onUnload, g as injectGlobal, h as inject, j as onAddToFavorites, m as hasInjectionContext, n as useNativeRouter, q as onSaveExitState, t as useNativePageRouter, v as provideGlobal, z as onMoved } from "./router-CQIgz5Q_.mjs";
|
|
8
|
+
import { $ as version, A as registerPageLayoutBridge, B as mountRuntimeInstance, C as useElementIntersectionObserver, D as defineComponent, E as createWevuScopedSlotComponent, F as unregisterRuntimeLayoutHosts, G as setPageLayout, H as teardownRuntimeInstance, I as useLayoutBridge, J as usePageLayout, K as syncRuntimePageLayoutState, L as useLayoutHosts, M as resolveLayoutBridge, N as resolveLayoutHost, O as createApp, P as unregisterPageLayoutBridge, Q as markNoSetData, R as waitForLayoutHost, S as useIntersectionObserver, T as createWevuComponent, U as runSetupFunction, V as setRuntimeSetDataVisibility, W as resolveRuntimePageLayoutName, X as setWevuDefaults, Y as resetWevuDefaults, Z as isNoSetData, _ as usePageScrollThrottle, a as useModel, at as onDeactivated, b as useNavigationBarMetrics, c as useSlots, ct as onServerPrefetch, d as useUpdatePerformanceListener, et as callUpdateHooks, f as useBoundingClientRect, g as useAsyncPullDownRefresh, h as useSelectorQuery, i as useChangeModel, it as onBeforeUpdate, j as registerRuntimeLayoutHosts, k as registerComponent, l as defineAppSetup, lt as onUnmounted, m as useSelectorFields, n as mergeModels, nt as onBeforeMount, o as useAttrs, ot as onErrorCaptured, p as useScrollOffset, q as syncRuntimePageLayoutStateFromRuntime, r as useBindModel, rt as onBeforeUnmount, s as useNativeInstance, st as onMounted, t as useTemplateRef, tt as onActivated, u as use, ut as onUpdated, v as getCurrentPageStackSnapshot, w as useDisposables, x as usePageStack, y as getNavigationBarMetrics, z as registerApp } from "./templateRef-iFlXe1J4.mjs";
|
|
9
|
+
import { n as normalizeStyle, r as resolvePropValue, t as normalizeClass } from "./template-QtiM6Ubi.mjs";
|
|
10
|
+
import { n as defineStore, r as createStore, t as storeToRefs } from "./store-Dzij_OWm.mjs";
|
|
11
|
+
import "./index.mjs";
|
|
11
12
|
|
|
12
13
|
export * from "@wevu/web-apis"
|
|
13
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-demi.mjs","names":[],"sources":["../../src/vue-demi.ts"],"sourcesContent":["export * from './index'\nexport { version } from './version'\n\n/**\n * 标记当前兼容层运行在 Vue 3 风格分支。\n */\nexport const isVue2 = false\n\n/**\n * 标记当前兼容层运行在 Vue 3 风格分支。\n */\nexport const isVue3 = true\n\n/**\n * 与 `vue-demi` 保持一致,Vue 3 分支下不暴露 Vue 2 构造器。\n */\nexport const Vue2 = undefined\n\n/**\n * Vue 3 分支的 `vue-demi.install()` 为 no-op,这里保持同样语义。\n */\nexport function install() {}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"vue-demi.mjs","names":[],"sources":["../../src/vue-demi.ts"],"sourcesContent":["export * from './index'\nexport { version } from './version'\n\n/**\n * 标记当前兼容层运行在 Vue 3 风格分支。\n */\nexport const isVue2 = false\n\n/**\n * 标记当前兼容层运行在 Vue 3 风格分支。\n */\nexport const isVue3 = true\n\n/**\n * 与 `vue-demi` 保持一致,Vue 3 分支下不暴露 Vue 2 构造器。\n */\nexport const Vue2 = undefined\n\n/**\n * Vue 3 分支的 `vue-demi.install()` 为 no-op,这里保持同样语义。\n */\nexport function install() {}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAa,SAAS;;;;AAKtB,MAAa,SAAS;;;;AAKtB,MAAa,OAAO;;;;AAKpB,SAAgB,UAAU,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as effect, D as onScopeDispose, M as triggerEffects, N as nextTick, P as queueJob, g as touchReactive, k as stop, l as isReactive, n as isRef, t as customRef, v as isObject, y as toRaw } from "./ref-
|
|
2
|
-
import { s as getCurrentInstance, u as setCurrentInstance } from "./base-
|
|
1
|
+
import { C as effect, D as onScopeDispose, M as triggerEffects, N as nextTick, P as queueJob, g as touchReactive, k as stop, l as isReactive, n as isRef, t as customRef, v as isObject, y as toRaw } from "./ref-Beyx3EmJ.mjs";
|
|
2
|
+
import { s as getCurrentInstance, u as setCurrentInstance } from "./base-C_Jux3cz.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/reactivity/shallowRef.ts
|
|
5
5
|
/**
|
|
@@ -325,4 +325,4 @@ function watchSyncEffect(effectFn, options = {}) {
|
|
|
325
325
|
|
|
326
326
|
//#endregion
|
|
327
327
|
export { getDeepWatchStrategy as a, isShallowRef as c, watchSyncEffect as i, shallowRef as l, watchEffect as n, setDeepWatchStrategy as o, watchPostEffect as r, traverse as s, watch as t, triggerRef as u };
|
|
328
|
-
//# sourceMappingURL=watch-
|
|
328
|
+
//# sourceMappingURL=watch-BLUHj_gn.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch-CJiD9u34.mjs","names":[],"sources":["../../src/reactivity/shallowRef.ts","../../src/reactivity/traverse.ts","../../src/reactivity/watch/types.ts","../../src/reactivity/watch/helpers.ts","../../src/reactivity/watch.ts"],"sourcesContent":["import type { Ref } from './ref'\nimport { triggerEffects } from './core'\nimport { customRef, isRef } from './ref'\n\nexport function shallowRef<T>(value: T): Ref<T>\nexport function shallowRef<T>(value: T, defaultValue: T): Ref<T>\n/**\n * 创建一个“浅层” ref:它只在 .value 被整体替换时触发依赖,不会对内部对象做深层响应式处理。\n *\n * @param value 初始值\n * @param defaultValue 传递给 customRef 的默认值,可用于兜底\n * @returns 仅跟踪自身 .value 变更的浅层 ref\n *\n * @example\n * ```ts\n * const state = shallowRef({ count: 0 })\n * state.value = { count: 1 } // 会触发依赖\n * state.value.count++ // 不会触发依赖(内部属性未被深度代理)\n * ```\n */\nexport function shallowRef<T>(value: T, defaultValue?: T): Ref<T> {\n return customRef<T>(\n (track, trigger) => ({\n get() {\n track()\n return value\n },\n set(newValue: T) {\n if (Object.is(value, newValue)) {\n return\n }\n value = newValue\n trigger()\n },\n }),\n defaultValue,\n ) as Ref<T>\n}\n\n/**\n * 判断传入值是否为浅层 ref。\n *\n * @param r 待判断的值\n * @returns 若为浅层 ref 则返回 true\n */\nexport function isShallowRef(r: any): r is Ref<any> {\n // 目前凡是用 customRef 创建的 ref 都视为“浅层”,因为不会递归包装内部属性\n return isRef(r) && typeof r.value !== 'function'\n}\n\n/**\n * 主动触发一次浅层 ref 的更新(无需深度比较)。\n *\n * @param ref 需要触发的 ref\n */\nexport function triggerRef<T>(ref: Ref<T>) {\n // 若未来有专用 trigger 机制可替换,此处作为兼容 API 的占位实现\n if (isRef(ref)) {\n const dep = (ref as any).dep\n if (dep) {\n triggerEffects(dep)\n return\n }\n // 通过重新赋值自身触发依赖\n const value = ref.value\n ref.value = value\n }\n}\n","import { isObject, isReactive, toRaw } from './reactive'\nimport { ReactiveFlags } from './reactive/shared'\nimport { isRef } from './ref'\n\n/**\n * 深度遍历工具(框架内部依赖收集使用)。\n * @internal\n */\nexport function traverse(value: any, depth: number = Infinity, seen = new Map<object, number>()): any {\n if (depth <= 0 || !isObject(value)) {\n return value\n }\n if (isRef(value)) {\n traverse(value.value, depth - 1, seen)\n return value\n }\n if ((value as any)[ReactiveFlags.SKIP]) {\n return value\n }\n const existingDepth = seen.get(value)\n if (existingDepth !== undefined && existingDepth >= depth) {\n return value\n }\n seen.set(value, depth)\n const nextDepth = depth - 1\n if (Array.isArray(value)) {\n value.forEach(item => traverse(item, nextDepth, seen))\n return value\n }\n if (value instanceof Map) {\n value.forEach(item => traverse(item, nextDepth, seen))\n return value\n }\n if (value instanceof Set) {\n value.forEach(item => traverse(item, nextDepth, seen))\n return value\n }\n const target = isReactive(value) && depth !== Infinity ? toRaw(value) : value\n for (const key in target as any) {\n traverse((value as any)[key], nextDepth, seen)\n }\n return value\n}\n","import type { ComputedRef } from '../computed'\nimport type { Ref } from '../ref'\n\nexport type OnCleanup = (cleanupFn: () => void) => void\nexport type WatchEffect = (onCleanup: OnCleanup) => void\nexport type WatchSource<T = any> = Ref<T> | ComputedRef<T> | (() => T)\nexport type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => void\nexport type WatchScheduler = (job: () => void, isFirstRun: boolean) => void\nexport type MaybeUndefined<T, Immediate> = Immediate extends true ? T | undefined : T\nexport type MultiWatchSources = (WatchSource<unknown> | object)[]\nexport type MapSources<T, Immediate> = {\n [K in keyof T]: T[K] extends WatchSource<infer V>\n ? MaybeUndefined<V, Immediate>\n : T[K] extends object\n ? MaybeUndefined<T[K], Immediate>\n : never\n}\nexport type WatchSourceValue<S> = S extends WatchSource<infer V>\n ? V\n : S extends object\n ? S\n : never\nexport type WatchSources<T = any>\n = | WatchSource<T>\n | ReadonlyArray<WatchSource<unknown> | object>\n | (T extends object ? T : never)\ntype IsTuple<T extends ReadonlyArray<any>> = number extends T['length'] ? false : true\nexport type WatchMultiSources<T extends ReadonlyArray<WatchSource<unknown> | object>> = IsTuple<T> extends true\n ? { [K in keyof T]: WatchSourceValue<T[K]> }\n : Array<WatchSourceValue<T[number]>>\n\nexport interface WatchEffectOptions {\n flush?: 'pre' | 'post' | 'sync'\n}\n\nexport interface WatchOptions<Immediate extends boolean = false> extends WatchEffectOptions {\n immediate?: Immediate\n deep?: boolean | number\n once?: boolean\n scheduler?: WatchScheduler\n}\n\nexport interface WatchStopHandle {\n (): void\n stop: () => void\n pause: () => void\n resume: () => void\n}\n\nexport type DeepWatchStrategy = 'version' | 'traverse'\n\nlet __deepWatchStrategy: DeepWatchStrategy = 'version'\n\n/**\n * 设置深度 watch 内部策略(测试/框架内部使用)。\n * @internal\n */\nexport function setDeepWatchStrategy(strategy: DeepWatchStrategy) {\n __deepWatchStrategy = strategy\n}\n\n/**\n * 获取深度 watch 内部策略(测试/框架内部使用)。\n * @internal\n */\nexport function getDeepWatchStrategy(): DeepWatchStrategy {\n return __deepWatchStrategy\n}\n","import type { Ref } from '../ref'\nimport type { WatchScheduler, WatchSource, WatchSources } from './types'\nimport { nextTick } from '../../scheduler'\nimport { queueJob } from '../core'\nimport { isReactive, touchReactive } from '../reactive'\nimport { isRef } from '../ref'\nimport { traverse } from '../traverse'\nimport { getDeepWatchStrategy } from './types'\n\ninterface WatchGetterContext {\n getter: () => any\n isMultiSource: boolean\n isReactiveSource: boolean\n}\n\nfunction resolveWatchSource(item: WatchSource<any> | object) {\n if (typeof item === 'function') {\n return (item as () => any)()\n }\n if (isRef(item)) {\n return (item as Ref<any>).value\n }\n if (isReactive(item)) {\n return item\n }\n throw new Error('无效的 watch 源')\n}\n\nexport function createWatchGetter(source: WatchSources<any>): WatchGetterContext {\n const isReactiveSource = isReactive(source)\n const isMultiSource = Array.isArray(source) && !isReactiveSource\n let getter: () => any\n\n if (isMultiSource) {\n const sources = source as ReadonlyArray<WatchSource<any> | object>\n getter = () => sources.map(item => resolveWatchSource(item))\n }\n else if (typeof source === 'function') {\n getter = source as () => any\n }\n else if (isRef(source)) {\n getter = () => (source as Ref<any>).value\n }\n else if (isReactiveSource) {\n getter = () => source as any\n }\n else {\n throw new Error('无效的 watch 源')\n }\n\n return {\n getter,\n isMultiSource,\n isReactiveSource,\n }\n}\n\nexport function applyDeepWatchGetter(\n getter: () => any,\n source: WatchSources<any>,\n isMultiSource: boolean,\n isReactiveSource: boolean,\n deepOption: boolean | number | undefined,\n) {\n const deepDefault = isMultiSource\n ? (source as ReadonlyArray<WatchSource<any> | object>).some(item => isReactive(item))\n : isReactiveSource\n const deep = deepOption ?? deepDefault\n const shouldDeep = deep === true || typeof deep === 'number'\n if (!shouldDeep) {\n return getter\n }\n const depth = typeof deep === 'number' ? deep : (deep ? Infinity : 0)\n return () => {\n const value = getter()\n const strategy = getDeepWatchStrategy()\n if (isMultiSource && Array.isArray(value)) {\n return value.map((item) => {\n if (strategy === 'version' && isReactive(item)) {\n touchReactive(item as any)\n return item\n }\n return traverse(item, depth)\n })\n }\n if (strategy === 'version' && isReactive(value)) {\n touchReactive(value as any)\n return value\n }\n return traverse(value, depth)\n }\n}\n\nexport function dispatchScheduledJob(\n job: () => void,\n flush: 'pre' | 'post' | 'sync',\n isFirstRun: boolean,\n scheduler?: WatchScheduler,\n) {\n if (scheduler) {\n scheduler(job, isFirstRun)\n return\n }\n if (flush === 'sync') {\n job()\n return\n }\n if (flush === 'post') {\n nextTick(() => queueJob(job))\n return\n }\n if (isFirstRun) {\n job()\n }\n else {\n queueJob(job)\n }\n}\n","import type { ReactiveEffect } from './core'\nimport type {\n MapSources,\n MaybeUndefined,\n MultiWatchSources,\n OnCleanup,\n WatchCallback,\n WatchEffect,\n WatchEffectOptions,\n WatchOptions,\n WatchSource,\n WatchSources,\n WatchStopHandle,\n} from './watch/types'\nimport { getCurrentInstance, setCurrentInstance } from '../runtime/hooks'\nimport { effect, onScopeDispose, stop } from './core'\nimport { applyDeepWatchGetter, createWatchGetter, dispatchScheduledJob } from './watch/helpers'\n\nexport type {\n DeepWatchStrategy,\n MapSources,\n MaybeUndefined,\n MultiWatchSources,\n OnCleanup,\n WatchCallback,\n WatchEffect,\n WatchEffectOptions,\n WatchMultiSources,\n WatchOptions,\n WatchScheduler,\n WatchSource,\n WatchSources,\n WatchSourceValue,\n WatchStopHandle,\n} from './watch/types'\nexport { getDeepWatchStrategy, setDeepWatchStrategy } from './watch/types'\n\nexport function watch<T, Immediate extends Readonly<boolean> = false>(\n source: WatchSource<T>,\n cb: WatchCallback<T, MaybeUndefined<T, Immediate>>,\n options?: WatchOptions<Immediate>,\n): WatchStopHandle\nexport function watch<T extends object, Immediate extends Readonly<boolean> = false>(\n source: T extends ReadonlyArray<any> ? never : T,\n cb: WatchCallback<T, MaybeUndefined<T, Immediate>>,\n options?: WatchOptions<Immediate>,\n): WatchStopHandle\nexport function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(\n source: readonly [...T] | T,\n cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>,\n options?: WatchOptions<Immediate>,\n): WatchStopHandle\nexport function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(\n source: [...T],\n cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>,\n options?: WatchOptions<Immediate>,\n): WatchStopHandle\nexport function watch(\n source: WatchSources<any>,\n cb: WatchCallback,\n options: WatchOptions = {},\n): WatchStopHandle {\n const ownerInstance = getCurrentInstance()\n const watchGetterContext = createWatchGetter(source)\n const getter = applyDeepWatchGetter(\n watchGetterContext.getter,\n source,\n watchGetterContext.isMultiSource,\n watchGetterContext.isReactiveSource,\n options.deep,\n )\n\n let cleanup: (() => void) | undefined\n const onCleanup: OnCleanup = (fn) => {\n cleanup = fn\n }\n\n let oldValue: any\n let runner: ReactiveEffect<any>\n let paused = false\n let pauseToken = 0\n let scheduledToken = pauseToken\n let stopHandle: WatchStopHandle\n const cbWithOnce: WatchCallback = options.once\n ? (value, oldVal, cleanupRegister) => {\n cb(value, oldVal, cleanupRegister)\n stopHandle()\n }\n : cb\n const flush = options.flush ?? 'pre'\n\n const runJob = (token: number) => {\n if (!runner.active || paused || token !== pauseToken) {\n return\n }\n const newValue = runner()\n cleanup?.()\n const previousInstance = getCurrentInstance()\n setCurrentInstance(ownerInstance)\n try {\n cbWithOnce(newValue, oldValue, onCleanup)\n }\n finally {\n setCurrentInstance(previousInstance)\n }\n oldValue = newValue\n }\n const scheduledJob = () => runJob(scheduledToken)\n\n const scheduleJob = (isFirstRun: boolean) => {\n scheduledToken = pauseToken\n dispatchScheduledJob(scheduledJob, flush, isFirstRun, options.scheduler)\n }\n\n runner = effect(() => getter(), {\n scheduler: () => {\n if (paused) {\n return\n }\n scheduleJob(false)\n },\n lazy: true,\n })\n\n const doStop = () => {\n cleanup?.()\n cleanup = undefined\n stop(runner)\n }\n stopHandle = doStop as WatchStopHandle\n stopHandle.stop = doStop\n stopHandle.pause = () => {\n if (!paused) {\n paused = true\n pauseToken += 1\n }\n }\n stopHandle.resume = () => {\n if (!paused || !runner.active) {\n return\n }\n paused = false\n oldValue = runner()\n }\n\n if (options.immediate) {\n runJob(pauseToken)\n }\n else {\n oldValue = runner()\n }\n onScopeDispose(stopHandle)\n return stopHandle\n}\n\n/**\n * watchEffect 注册一个响应式副作用,可选清理函数。\n * 副作用会立即执行,并在依赖变化时重新运行。\n */\nexport function watchEffect(\n effectFn: WatchEffect,\n options: WatchEffectOptions = {},\n): WatchStopHandle {\n const ownerInstance = getCurrentInstance()\n let cleanup: (() => void) | undefined\n const onCleanup: OnCleanup = (fn) => {\n cleanup = fn\n }\n let runner: ReactiveEffect\n let paused = false\n let pauseToken = 0\n let scheduledToken = pauseToken\n const flush = options.flush ?? 'pre'\n\n const runJob = (token: number) => {\n if (!runner.active || paused || token !== pauseToken) {\n return\n }\n runner()\n }\n const scheduledJob = () => runJob(scheduledToken)\n\n const scheduleJob = (isFirstRun: boolean) => {\n scheduledToken = pauseToken\n dispatchScheduledJob(scheduledJob, flush, isFirstRun)\n }\n\n runner = effect(\n () => {\n cleanup?.()\n cleanup = undefined\n const previousInstance = getCurrentInstance()\n setCurrentInstance(ownerInstance)\n try {\n effectFn(onCleanup)\n }\n finally {\n setCurrentInstance(previousInstance)\n }\n },\n {\n lazy: true,\n scheduler: () => {\n if (paused) {\n return\n }\n scheduleJob(false)\n },\n },\n )\n scheduleJob(true)\n\n const doStop = () => {\n cleanup?.()\n cleanup = undefined\n stop(runner)\n }\n const stopHandle = doStop as WatchStopHandle\n stopHandle.stop = doStop\n stopHandle.pause = () => {\n if (!paused) {\n paused = true\n pauseToken += 1\n }\n }\n stopHandle.resume = () => {\n if (!paused || !runner.active) {\n return\n }\n paused = false\n scheduleJob(true)\n }\n onScopeDispose(stopHandle)\n return stopHandle\n}\n\n/**\n * 以后置刷新的方式运行副作用,与 Vue 的 `watchPostEffect()` 兼容。\n */\nexport function watchPostEffect(\n effectFn: WatchEffect,\n options: Omit<WatchEffectOptions, 'flush'> = {},\n): WatchStopHandle {\n return watchEffect(effectFn, {\n ...options,\n flush: 'post',\n })\n}\n\n/**\n * 以同步刷新的方式运行副作用,与 Vue 的 `watchSyncEffect()` 兼容。\n */\nexport function watchSyncEffect(\n effectFn: WatchEffect,\n options: Omit<WatchEffectOptions, 'flush'> = {},\n): WatchStopHandle {\n return watchEffect(effectFn, {\n ...options,\n flush: 'sync',\n })\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"watch-BLUHj_gn.mjs","names":[],"sources":["../../src/reactivity/shallowRef.ts","../../src/reactivity/traverse.ts","../../src/reactivity/watch/types.ts","../../src/reactivity/watch/helpers.ts","../../src/reactivity/watch.ts"],"sourcesContent":["import type { Ref } from './ref'\nimport { triggerEffects } from './core'\nimport { customRef, isRef } from './ref'\n\nexport function shallowRef<T>(value: T): Ref<T>\nexport function shallowRef<T>(value: T, defaultValue: T): Ref<T>\n/**\n * 创建一个“浅层” ref:它只在 .value 被整体替换时触发依赖,不会对内部对象做深层响应式处理。\n *\n * @param value 初始值\n * @param defaultValue 传递给 customRef 的默认值,可用于兜底\n * @returns 仅跟踪自身 .value 变更的浅层 ref\n *\n * @example\n * ```ts\n * const state = shallowRef({ count: 0 })\n * state.value = { count: 1 } // 会触发依赖\n * state.value.count++ // 不会触发依赖(内部属性未被深度代理)\n * ```\n */\nexport function shallowRef<T>(value: T, defaultValue?: T): Ref<T> {\n return customRef<T>(\n (track, trigger) => ({\n get() {\n track()\n return value\n },\n set(newValue: T) {\n if (Object.is(value, newValue)) {\n return\n }\n value = newValue\n trigger()\n },\n }),\n defaultValue,\n ) as Ref<T>\n}\n\n/**\n * 判断传入值是否为浅层 ref。\n *\n * @param r 待判断的值\n * @returns 若为浅层 ref 则返回 true\n */\nexport function isShallowRef(r: any): r is Ref<any> {\n // 目前凡是用 customRef 创建的 ref 都视为“浅层”,因为不会递归包装内部属性\n return isRef(r) && typeof r.value !== 'function'\n}\n\n/**\n * 主动触发一次浅层 ref 的更新(无需深度比较)。\n *\n * @param ref 需要触发的 ref\n */\nexport function triggerRef<T>(ref: Ref<T>) {\n // 若未来有专用 trigger 机制可替换,此处作为兼容 API 的占位实现\n if (isRef(ref)) {\n const dep = (ref as any).dep\n if (dep) {\n triggerEffects(dep)\n return\n }\n // 通过重新赋值自身触发依赖\n const value = ref.value\n ref.value = value\n }\n}\n","import { isObject, isReactive, toRaw } from './reactive'\nimport { ReactiveFlags } from './reactive/shared'\nimport { isRef } from './ref'\n\n/**\n * 深度遍历工具(框架内部依赖收集使用)。\n * @internal\n */\nexport function traverse(value: any, depth: number = Infinity, seen = new Map<object, number>()): any {\n if (depth <= 0 || !isObject(value)) {\n return value\n }\n if (isRef(value)) {\n traverse(value.value, depth - 1, seen)\n return value\n }\n if ((value as any)[ReactiveFlags.SKIP]) {\n return value\n }\n const existingDepth = seen.get(value)\n if (existingDepth !== undefined && existingDepth >= depth) {\n return value\n }\n seen.set(value, depth)\n const nextDepth = depth - 1\n if (Array.isArray(value)) {\n value.forEach(item => traverse(item, nextDepth, seen))\n return value\n }\n if (value instanceof Map) {\n value.forEach(item => traverse(item, nextDepth, seen))\n return value\n }\n if (value instanceof Set) {\n value.forEach(item => traverse(item, nextDepth, seen))\n return value\n }\n const target = isReactive(value) && depth !== Infinity ? toRaw(value) : value\n for (const key in target as any) {\n traverse((value as any)[key], nextDepth, seen)\n }\n return value\n}\n","import type { ComputedRef } from '../computed'\nimport type { Ref } from '../ref'\n\nexport type OnCleanup = (cleanupFn: () => void) => void\nexport type WatchEffect = (onCleanup: OnCleanup) => void\nexport type WatchSource<T = any> = Ref<T> | ComputedRef<T> | (() => T)\nexport type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => void\nexport type WatchScheduler = (job: () => void, isFirstRun: boolean) => void\nexport type MaybeUndefined<T, Immediate> = Immediate extends true ? T | undefined : T\nexport type MultiWatchSources = (WatchSource<unknown> | object)[]\nexport type MapSources<T, Immediate> = {\n [K in keyof T]: T[K] extends WatchSource<infer V>\n ? MaybeUndefined<V, Immediate>\n : T[K] extends object\n ? MaybeUndefined<T[K], Immediate>\n : never\n}\nexport type WatchSourceValue<S> = S extends WatchSource<infer V>\n ? V\n : S extends object\n ? S\n : never\nexport type WatchSources<T = any>\n = | WatchSource<T>\n | ReadonlyArray<WatchSource<unknown> | object>\n | (T extends object ? T : never)\ntype IsTuple<T extends ReadonlyArray<any>> = number extends T['length'] ? false : true\nexport type WatchMultiSources<T extends ReadonlyArray<WatchSource<unknown> | object>> = IsTuple<T> extends true\n ? { [K in keyof T]: WatchSourceValue<T[K]> }\n : Array<WatchSourceValue<T[number]>>\n\nexport interface WatchEffectOptions {\n flush?: 'pre' | 'post' | 'sync'\n}\n\nexport interface WatchOptions<Immediate extends boolean = false> extends WatchEffectOptions {\n immediate?: Immediate\n deep?: boolean | number\n once?: boolean\n scheduler?: WatchScheduler\n}\n\nexport interface WatchStopHandle {\n (): void\n stop: () => void\n pause: () => void\n resume: () => void\n}\n\nexport type DeepWatchStrategy = 'version' | 'traverse'\n\nlet __deepWatchStrategy: DeepWatchStrategy = 'version'\n\n/**\n * 设置深度 watch 内部策略(测试/框架内部使用)。\n * @internal\n */\nexport function setDeepWatchStrategy(strategy: DeepWatchStrategy) {\n __deepWatchStrategy = strategy\n}\n\n/**\n * 获取深度 watch 内部策略(测试/框架内部使用)。\n * @internal\n */\nexport function getDeepWatchStrategy(): DeepWatchStrategy {\n return __deepWatchStrategy\n}\n","import type { Ref } from '../ref'\nimport type { WatchScheduler, WatchSource, WatchSources } from './types'\nimport { nextTick } from '../../scheduler'\nimport { queueJob } from '../core'\nimport { isReactive, touchReactive } from '../reactive'\nimport { isRef } from '../ref'\nimport { traverse } from '../traverse'\nimport { getDeepWatchStrategy } from './types'\n\ninterface WatchGetterContext {\n getter: () => any\n isMultiSource: boolean\n isReactiveSource: boolean\n}\n\nfunction resolveWatchSource(item: WatchSource<any> | object) {\n if (typeof item === 'function') {\n return (item as () => any)()\n }\n if (isRef(item)) {\n return (item as Ref<any>).value\n }\n if (isReactive(item)) {\n return item\n }\n throw new Error('无效的 watch 源')\n}\n\nexport function createWatchGetter(source: WatchSources<any>): WatchGetterContext {\n const isReactiveSource = isReactive(source)\n const isMultiSource = Array.isArray(source) && !isReactiveSource\n let getter: () => any\n\n if (isMultiSource) {\n const sources = source as ReadonlyArray<WatchSource<any> | object>\n getter = () => sources.map(item => resolveWatchSource(item))\n }\n else if (typeof source === 'function') {\n getter = source as () => any\n }\n else if (isRef(source)) {\n getter = () => (source as Ref<any>).value\n }\n else if (isReactiveSource) {\n getter = () => source as any\n }\n else {\n throw new Error('无效的 watch 源')\n }\n\n return {\n getter,\n isMultiSource,\n isReactiveSource,\n }\n}\n\nexport function applyDeepWatchGetter(\n getter: () => any,\n source: WatchSources<any>,\n isMultiSource: boolean,\n isReactiveSource: boolean,\n deepOption: boolean | number | undefined,\n) {\n const deepDefault = isMultiSource\n ? (source as ReadonlyArray<WatchSource<any> | object>).some(item => isReactive(item))\n : isReactiveSource\n const deep = deepOption ?? deepDefault\n const shouldDeep = deep === true || typeof deep === 'number'\n if (!shouldDeep) {\n return getter\n }\n const depth = typeof deep === 'number' ? deep : (deep ? Infinity : 0)\n return () => {\n const value = getter()\n const strategy = getDeepWatchStrategy()\n if (isMultiSource && Array.isArray(value)) {\n return value.map((item) => {\n if (strategy === 'version' && isReactive(item)) {\n touchReactive(item as any)\n return item\n }\n return traverse(item, depth)\n })\n }\n if (strategy === 'version' && isReactive(value)) {\n touchReactive(value as any)\n return value\n }\n return traverse(value, depth)\n }\n}\n\nexport function dispatchScheduledJob(\n job: () => void,\n flush: 'pre' | 'post' | 'sync',\n isFirstRun: boolean,\n scheduler?: WatchScheduler,\n) {\n if (scheduler) {\n scheduler(job, isFirstRun)\n return\n }\n if (flush === 'sync') {\n job()\n return\n }\n if (flush === 'post') {\n nextTick(() => queueJob(job))\n return\n }\n if (isFirstRun) {\n job()\n }\n else {\n queueJob(job)\n }\n}\n","import type { ReactiveEffect } from './core'\nimport type {\n MapSources,\n MaybeUndefined,\n MultiWatchSources,\n OnCleanup,\n WatchCallback,\n WatchEffect,\n WatchEffectOptions,\n WatchOptions,\n WatchSource,\n WatchSources,\n WatchStopHandle,\n} from './watch/types'\nimport { getCurrentInstance, setCurrentInstance } from '../runtime/hooks'\nimport { effect, onScopeDispose, stop } from './core'\nimport { applyDeepWatchGetter, createWatchGetter, dispatchScheduledJob } from './watch/helpers'\n\nexport type {\n DeepWatchStrategy,\n MapSources,\n MaybeUndefined,\n MultiWatchSources,\n OnCleanup,\n WatchCallback,\n WatchEffect,\n WatchEffectOptions,\n WatchMultiSources,\n WatchOptions,\n WatchScheduler,\n WatchSource,\n WatchSources,\n WatchSourceValue,\n WatchStopHandle,\n} from './watch/types'\nexport { getDeepWatchStrategy, setDeepWatchStrategy } from './watch/types'\n\nexport function watch<T, Immediate extends Readonly<boolean> = false>(\n source: WatchSource<T>,\n cb: WatchCallback<T, MaybeUndefined<T, Immediate>>,\n options?: WatchOptions<Immediate>,\n): WatchStopHandle\nexport function watch<T extends object, Immediate extends Readonly<boolean> = false>(\n source: T extends ReadonlyArray<any> ? never : T,\n cb: WatchCallback<T, MaybeUndefined<T, Immediate>>,\n options?: WatchOptions<Immediate>,\n): WatchStopHandle\nexport function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(\n source: readonly [...T] | T,\n cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>,\n options?: WatchOptions<Immediate>,\n): WatchStopHandle\nexport function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(\n source: [...T],\n cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>,\n options?: WatchOptions<Immediate>,\n): WatchStopHandle\nexport function watch(\n source: WatchSources<any>,\n cb: WatchCallback,\n options: WatchOptions = {},\n): WatchStopHandle {\n const ownerInstance = getCurrentInstance()\n const watchGetterContext = createWatchGetter(source)\n const getter = applyDeepWatchGetter(\n watchGetterContext.getter,\n source,\n watchGetterContext.isMultiSource,\n watchGetterContext.isReactiveSource,\n options.deep,\n )\n\n let cleanup: (() => void) | undefined\n const onCleanup: OnCleanup = (fn) => {\n cleanup = fn\n }\n\n let oldValue: any\n let runner: ReactiveEffect<any>\n let paused = false\n let pauseToken = 0\n let scheduledToken = pauseToken\n let stopHandle: WatchStopHandle\n const cbWithOnce: WatchCallback = options.once\n ? (value, oldVal, cleanupRegister) => {\n cb(value, oldVal, cleanupRegister)\n stopHandle()\n }\n : cb\n const flush = options.flush ?? 'pre'\n\n const runJob = (token: number) => {\n if (!runner.active || paused || token !== pauseToken) {\n return\n }\n const newValue = runner()\n cleanup?.()\n const previousInstance = getCurrentInstance()\n setCurrentInstance(ownerInstance)\n try {\n cbWithOnce(newValue, oldValue, onCleanup)\n }\n finally {\n setCurrentInstance(previousInstance)\n }\n oldValue = newValue\n }\n const scheduledJob = () => runJob(scheduledToken)\n\n const scheduleJob = (isFirstRun: boolean) => {\n scheduledToken = pauseToken\n dispatchScheduledJob(scheduledJob, flush, isFirstRun, options.scheduler)\n }\n\n runner = effect(() => getter(), {\n scheduler: () => {\n if (paused) {\n return\n }\n scheduleJob(false)\n },\n lazy: true,\n })\n\n const doStop = () => {\n cleanup?.()\n cleanup = undefined\n stop(runner)\n }\n stopHandle = doStop as WatchStopHandle\n stopHandle.stop = doStop\n stopHandle.pause = () => {\n if (!paused) {\n paused = true\n pauseToken += 1\n }\n }\n stopHandle.resume = () => {\n if (!paused || !runner.active) {\n return\n }\n paused = false\n oldValue = runner()\n }\n\n if (options.immediate) {\n runJob(pauseToken)\n }\n else {\n oldValue = runner()\n }\n onScopeDispose(stopHandle)\n return stopHandle\n}\n\n/**\n * watchEffect 注册一个响应式副作用,可选清理函数。\n * 副作用会立即执行,并在依赖变化时重新运行。\n */\nexport function watchEffect(\n effectFn: WatchEffect,\n options: WatchEffectOptions = {},\n): WatchStopHandle {\n const ownerInstance = getCurrentInstance()\n let cleanup: (() => void) | undefined\n const onCleanup: OnCleanup = (fn) => {\n cleanup = fn\n }\n let runner: ReactiveEffect\n let paused = false\n let pauseToken = 0\n let scheduledToken = pauseToken\n const flush = options.flush ?? 'pre'\n\n const runJob = (token: number) => {\n if (!runner.active || paused || token !== pauseToken) {\n return\n }\n runner()\n }\n const scheduledJob = () => runJob(scheduledToken)\n\n const scheduleJob = (isFirstRun: boolean) => {\n scheduledToken = pauseToken\n dispatchScheduledJob(scheduledJob, flush, isFirstRun)\n }\n\n runner = effect(\n () => {\n cleanup?.()\n cleanup = undefined\n const previousInstance = getCurrentInstance()\n setCurrentInstance(ownerInstance)\n try {\n effectFn(onCleanup)\n }\n finally {\n setCurrentInstance(previousInstance)\n }\n },\n {\n lazy: true,\n scheduler: () => {\n if (paused) {\n return\n }\n scheduleJob(false)\n },\n },\n )\n scheduleJob(true)\n\n const doStop = () => {\n cleanup?.()\n cleanup = undefined\n stop(runner)\n }\n const stopHandle = doStop as WatchStopHandle\n stopHandle.stop = doStop\n stopHandle.pause = () => {\n if (!paused) {\n paused = true\n pauseToken += 1\n }\n }\n stopHandle.resume = () => {\n if (!paused || !runner.active) {\n return\n }\n paused = false\n scheduleJob(true)\n }\n onScopeDispose(stopHandle)\n return stopHandle\n}\n\n/**\n * 以后置刷新的方式运行副作用,与 Vue 的 `watchPostEffect()` 兼容。\n */\nexport function watchPostEffect(\n effectFn: WatchEffect,\n options: Omit<WatchEffectOptions, 'flush'> = {},\n): WatchStopHandle {\n return watchEffect(effectFn, {\n ...options,\n flush: 'post',\n })\n}\n\n/**\n * 以同步刷新的方式运行副作用,与 Vue 的 `watchSyncEffect()` 兼容。\n */\nexport function watchSyncEffect(\n effectFn: WatchEffect,\n options: Omit<WatchEffectOptions, 'flush'> = {},\n): WatchStopHandle {\n return watchEffect(effectFn, {\n ...options,\n flush: 'sync',\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAoBA,SAAgB,WAAc,OAAU,cAA0B;CAChE,OAAO,WACJ,OAAO,aAAa;EACnB,MAAM;GACJ,MAAM;GACN,OAAO;EACT;EACA,IAAI,UAAa;GACf,IAAI,OAAO,GAAG,OAAO,QAAQ,GAC3B;GAEF,QAAQ;GACR,QAAQ;EACV;CACF,IACA,YACF;AACF;;;;;;;AAQA,SAAgB,aAAa,GAAuB;CAElD,OAAO,MAAM,CAAC,KAAK,OAAO,EAAE,UAAU;AACxC;;;;;;AAOA,SAAgB,WAAc,KAAa;CAEzC,IAAI,MAAM,GAAG,GAAG;EACd,MAAM,MAAO,IAAY;EACzB,IAAI,KAAK;GACP,eAAe,GAAG;GAClB;EACF;EAGA,IAAI,QADU,IAAI;CAEpB;AACF;;;;;;;;AC3DA,SAAgB,SAAS,OAAY,QAAgB,UAAU,uBAAO,IAAI,IAAoB,GAAQ;CACpG,IAAI,SAAS,KAAK,CAAC,SAAS,KAAK,GAC/B,OAAO;CAET,IAAI,MAAM,KAAK,GAAG;EAChB,SAAS,MAAM,OAAO,QAAQ,GAAG,IAAI;EACrC,OAAO;CACT;CACA,IAAK,mBACH,OAAO;CAET,MAAM,gBAAgB,KAAK,IAAI,KAAK;CACpC,IAAI,kBAAkB,UAAa,iBAAiB,OAClD,OAAO;CAET,KAAK,IAAI,OAAO,KAAK;CACrB,MAAM,YAAY,QAAQ;CAC1B,IAAI,MAAM,QAAQ,KAAK,GAAG;EACxB,MAAM,SAAQ,SAAQ,SAAS,MAAM,WAAW,IAAI,CAAC;EACrD,OAAO;CACT;CACA,IAAI,iBAAiB,KAAK;EACxB,MAAM,SAAQ,SAAQ,SAAS,MAAM,WAAW,IAAI,CAAC;EACrD,OAAO;CACT;CACA,IAAI,iBAAiB,KAAK;EACxB,MAAM,SAAQ,SAAQ,SAAS,MAAM,WAAW,IAAI,CAAC;EACrD,OAAO;CACT;CACA,MAAM,SAAS,WAAW,KAAK,KAAK,UAAU,WAAW,MAAM,KAAK,IAAI;CACxE,KAAK,MAAM,OAAO,QAChB,SAAU,MAAc,MAAM,WAAW,IAAI;CAE/C,OAAO;AACT;;;;ACSA,IAAI,sBAAyC;;;;;AAM7C,SAAgB,qBAAqB,UAA6B;CAChE,sBAAsB;AACxB;;;;;AAMA,SAAgB,uBAA0C;CACxD,OAAO;AACT;;;;ACpDA,SAAS,mBAAmB,MAAiC;CAC3D,IAAI,OAAO,SAAS,YAClB,OAAQ,KAAmB;CAE7B,IAAI,MAAM,IAAI,GACZ,OAAQ,KAAkB;CAE5B,IAAI,WAAW,IAAI,GACjB,OAAO;CAET,MAAM,IAAI,MAAM,aAAa;AAC/B;AAEA,SAAgB,kBAAkB,QAA+C;CAC/E,MAAM,mBAAmB,WAAW,MAAM;CAC1C,MAAM,gBAAgB,MAAM,QAAQ,MAAM,KAAK,CAAC;CAChD,IAAI;CAEJ,IAAI,eAAe;EACjB,MAAM,UAAU;EAChB,eAAe,QAAQ,KAAI,SAAQ,mBAAmB,IAAI,CAAC;CAC7D,OACK,IAAI,OAAO,WAAW,YACzB,SAAS;MAEN,IAAI,MAAM,MAAM,GACnB,eAAgB,OAAoB;MAEjC,IAAI,kBACP,eAAe;MAGf,MAAM,IAAI,MAAM,aAAa;CAG/B,OAAO;EACL;EACA;EACA;CACF;AACF;AAEA,SAAgB,qBACd,QACA,QACA,eACA,kBACA,YACA;CACA,MAAM,cAAc,gBACf,OAAoD,MAAK,SAAQ,WAAW,IAAI,CAAC,IAClF;CACJ,MAAM,OAAO,4DAAc;CAE3B,IAAI,EADe,SAAS,QAAQ,OAAO,SAAS,WAElD,OAAO;CAET,MAAM,QAAQ,OAAO,SAAS,WAAW,OAAQ,OAAO,WAAW;CACnE,aAAa;EACX,MAAM,QAAQ,OAAO;EACrB,MAAM,WAAW,qBAAqB;EACtC,IAAI,iBAAiB,MAAM,QAAQ,KAAK,GACtC,OAAO,MAAM,KAAK,SAAS;GACzB,IAAI,aAAa,aAAa,WAAW,IAAI,GAAG;IAC9C,cAAc,IAAW;IACzB,OAAO;GACT;GACA,OAAO,SAAS,MAAM,KAAK;EAC7B,CAAC;EAEH,IAAI,aAAa,aAAa,WAAW,KAAK,GAAG;GAC/C,cAAc,KAAY;GAC1B,OAAO;EACT;EACA,OAAO,SAAS,OAAO,KAAK;CAC9B;AACF;AAEA,SAAgB,qBACd,KACA,OACA,YACA,WACA;CACA,IAAI,WAAW;EACb,UAAU,KAAK,UAAU;EACzB;CACF;CACA,IAAI,UAAU,QAAQ;EACpB,IAAI;EACJ;CACF;CACA,IAAI,UAAU,QAAQ;EACpB,eAAe,SAAS,GAAG,CAAC;EAC5B;CACF;CACA,IAAI,YACF,IAAI;MAGJ,SAAS,GAAG;AAEhB;;;;AC5DA,SAAgB,MACd,QACA,IACA,UAAwB,CAAC,GACR;;CACjB,MAAM,gBAAgB,mBAAmB;CACzC,MAAM,qBAAqB,kBAAkB,MAAM;CACnD,MAAM,SAAS,qBACb,mBAAmB,QACnB,QACA,mBAAmB,eACnB,mBAAmB,kBACnB,QAAQ,IACV;CAEA,IAAI;CACJ,MAAM,aAAwB,OAAO;EACnC,UAAU;CACZ;CAEA,IAAI;CACJ,IAAI;CACJ,IAAI,SAAS;CACb,IAAI,aAAa;CACjB,IAAI,iBAAiB;CACrB,IAAI;CACJ,MAAM,aAA4B,QAAQ,QACrC,OAAO,QAAQ,oBAAoB;EAClC,GAAG,OAAO,QAAQ,eAAe;EACjC,WAAW;CACb,IACA;CACJ,MAAM,0BAAQ,QAAQ,gEAAS;CAE/B,MAAM,UAAU,UAAkB;EAChC,IAAI,CAAC,OAAO,UAAU,UAAU,UAAU,YACxC;EAEF,MAAM,WAAW,OAAO;EACxB,kDAAU;EACV,MAAM,mBAAmB,mBAAmB;EAC5C,mBAAmB,aAAa;EAChC,IAAI;GACF,WAAW,UAAU,UAAU,SAAS;EAC1C,UACQ;GACN,mBAAmB,gBAAgB;EACrC;EACA,WAAW;CACb;CACA,MAAM,qBAAqB,OAAO,cAAc;CAEhD,MAAM,eAAe,eAAwB;EAC3C,iBAAiB;EACjB,qBAAqB,cAAc,OAAO,YAAY,QAAQ,SAAS;CACzE;CAEA,SAAS,aAAa,OAAO,GAAG;EAC9B,iBAAiB;GACf,IAAI,QACF;GAEF,YAAY,KAAK;EACnB;EACA,MAAM;CACR,CAAC;CAED,MAAM,eAAe;EACnB,kDAAU;EACV,UAAU;EACV,KAAK,MAAM;CACb;CACA,aAAa;CACb,WAAW,OAAO;CAClB,WAAW,cAAc;EACvB,IAAI,CAAC,QAAQ;GACX,SAAS;GACT,cAAc;EAChB;CACF;CACA,WAAW,eAAe;EACxB,IAAI,CAAC,UAAU,CAAC,OAAO,QACrB;EAEF,SAAS;EACT,WAAW,OAAO;CACpB;CAEA,IAAI,QAAQ,WACV,OAAO,UAAU;MAGjB,WAAW,OAAO;CAEpB,eAAe,UAAU;CACzB,OAAO;AACT;;;;;AAMA,SAAgB,YACd,UACA,UAA8B,CAAC,GACd;;CACjB,MAAM,gBAAgB,mBAAmB;CACzC,IAAI;CACJ,MAAM,aAAwB,OAAO;EACnC,UAAU;CACZ;CACA,IAAI;CACJ,IAAI,SAAS;CACb,IAAI,aAAa;CACjB,IAAI,iBAAiB;CACrB,MAAM,2BAAQ,QAAQ,kEAAS;CAE/B,MAAM,UAAU,UAAkB;EAChC,IAAI,CAAC,OAAO,UAAU,UAAU,UAAU,YACxC;EAEF,OAAO;CACT;CACA,MAAM,qBAAqB,OAAO,cAAc;CAEhD,MAAM,eAAe,eAAwB;EAC3C,iBAAiB;EACjB,qBAAqB,cAAc,OAAO,UAAU;CACtD;CAEA,SAAS,aACD;EACJ,kDAAU;EACV,UAAU;EACV,MAAM,mBAAmB,mBAAmB;EAC5C,mBAAmB,aAAa;EAChC,IAAI;GACF,SAAS,SAAS;EACpB,UACQ;GACN,mBAAmB,gBAAgB;EACrC;CACF,GACA;EACE,MAAM;EACN,iBAAiB;GACf,IAAI,QACF;GAEF,YAAY,KAAK;EACnB;CACF,CACF;CACA,YAAY,IAAI;CAEhB,MAAM,eAAe;EACnB,kDAAU;EACV,UAAU;EACV,KAAK,MAAM;CACb;CACA,MAAM,aAAa;CACnB,WAAW,OAAO;CAClB,WAAW,cAAc;EACvB,IAAI,CAAC,QAAQ;GACX,SAAS;GACT,cAAc;EAChB;CACF;CACA,WAAW,eAAe;EACxB,IAAI,CAAC,UAAU,CAAC,OAAO,QACrB;EAEF,SAAS;EACT,YAAY,IAAI;CAClB;CACA,eAAe,UAAU;CACzB,OAAO;AACT;;;;AAKA,SAAgB,gBACd,UACA,UAA6C,CAAC,GAC7B;CACjB,OAAO,YAAY,UAAU;EAC3B,GAAG;EACH,OAAO;CACT,CAAC;AACH;;;;AAKA,SAAgB,gBACd,UACA,UAA6C,CAAC,GAC7B;CACjB,OAAO,YAAY,UAAU;EAC3B,GAAG;EACH,OAAO;CACT,CAAC;AACH"}
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./
|
|
1
|
+
import"./rolldown-runtime-CenpyGzJ.mjs";import{C as e,D as t,E as n,N as r,O as i,S as a,T as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,k as h,l as g,n as _,o as v,p as y,s as b,t as x,u as S,w as C,x as w,y as T}from"./ref-CRwjgX_d.mjs";import{t as E}from"./computed-DdPJb4_M.mjs";import{S as D,b as O,c as k,d as A,n as j,r as M,s as N,u as P,x as F,y as I}from"./base-D-o2Hv6z.mjs";import{a as L,c as R,i as z,l as B,n as V,o as H,r as U,s as W,t as G,u as K}from"./watch-6_s3_f8q.mjs";import{n as q,t as J}from"./toRefs-COgMIEoC.mjs";import{$ as Y,A as X,B as Z,F as Q,G as $,H as ee,I as te,J as ne,K as re,L as ie,M as ae,N as oe,P as se,Q as ce,R as le,U as ue,V as de,W as fe,X as pe,Y as me,Z as he,_ as ge,et as _e,g as ve,h as ye,j as be,m as xe,n as Se,q as Ce,t as we,v as Te,z as Ee}from"./router-BiJKkvy7.mjs";import{$ as De,A as Oe,B as ke,C as Ae,D as je,E as Me,F as Ne,G as Pe,H as Fe,I as Ie,J as Le,K as Re,L as ze,M as Be,N as Ve,O as He,P as Ue,Q as We,R as Ge,S as Ke,T as qe,U as Je,V as Ye,W as Xe,X as Ze,Y as Qe,Z as $e,_ as et,a as tt,at as nt,b as rt,c as it,ct as at,d as ot,et as st,f as ct,g as lt,h as ut,i as dt,it as ft,j as pt,k as mt,l as ht,lt as gt,m as _t,n as vt,nt as yt,o as bt,ot as xt,p as St,q as Ct,r as wt,rt as Tt,s as Et,st as Dt,t as Ot,tt as kt,u as At,ut as jt,v as Mt,w as Nt,x as Pt,y as Ft,z as It}from"./templateRef-CDJDt62p.mjs";import{n as Lt,r as Rt,t as zt}from"./template-CFhlojaH.mjs";import{n as Bt,r as Vt,t as Ht}from"./store-B9C0AuaO.mjs";export*from"@wevu/web-apis";export{c as addMutationRecorder,a as batch,j as callHookList,M as callHookReturn,st as callUpdateHooks,E as computed,He as createApp,Vt as createStore,qe as createWevuComponent,Me as createWevuScopedSlotComponent,x as customRef,ht as defineAppSetup,je as defineComponent,Bt as defineStore,e as effect,C as effectScope,o as endBatch,N as getCurrentInstance,Mt as getCurrentPageStackSnapshot,n as getCurrentScope,k as getCurrentSetupContext,L as getDeepWatchStrategy,Ft as getNavigationBarMetrics,b as getReactiveVersion,xe as hasInjectionContext,ye as inject,ve as injectGlobal,$e as isNoSetData,I as isProxy,l as isRaw,g as isReactive,O as isReadonly,_ as isRef,d as isShallowReactive,R as isShallowRef,We as markNoSetData,S as markRaw,vt as mergeModels,ke as mountRuntimeInstance,r as nextTick,zt as normalizeClass,Lt as normalizeStyle,kt as onActivated,be as onAddToFavorites,ae as onAttached,yt as onBeforeMount,Tt as onBeforeUnmount,ft as onBeforeUpdate,nt as onDeactivated,oe as onDetached,se as onError,xt as onErrorCaptured,Q as onHide,te as onLaunch,ie as onLoad,le as onMemoryWarning,Dt as onMounted,Ee as onMoved,Z as onPageNotFound,de as onPageScroll,ee as onPullDownRefresh,ue as onReachBottom,fe as onReady,$ as onResize,re as onRouteDone,Ce as onSaveExitState,t as onScopeDispose,at as onServerPrefetch,ne as onShareAppMessage,me as onShareTimeline,pe as onShow,he as onTabItemTap,ce as onThemeChange,Y as onUnhandledRejection,_e as onUnload,gt as onUnmounted,jt as onUpdated,p as prelinkReactiveTree,ge as provide,Te as provideGlobal,u as reactive,F as readonly,m as ref,It as registerApp,mt as registerComponent,Oe as registerPageLayoutBridge,pt as registerRuntimeLayoutHosts,w as removeMutationRecorder,Qe as resetWevuDefaults,Be as resolveLayoutBridge,Ve as resolveLayoutHost,Rt as resolvePropValue,Xe as resolveRuntimePageLayoutName,Je as runSetupFunction,P as setCurrentInstance,A as setCurrentSetupContext,H as setDeepWatchStrategy,X as setGlobalProvidedValue,Pe as setPageLayout,Ye as setRuntimeSetDataVisibility,Ze as setWevuDefaults,y as shallowReactive,D as shallowReadonly,B as shallowRef,i as startBatch,h as stop,Ht as storeToRefs,Re as syncRuntimePageLayoutState,Ct as syncRuntimePageLayoutStateFromRuntime,Fe as teardownRuntimeInstance,T as toRaw,J as toRef,q as toRefs,s as toValue,f as touchReactive,W as traverse,K as triggerRef,v as unref,Ue as unregisterPageLayoutBridge,Ne as unregisterRuntimeLayoutHosts,At as use,lt as useAsyncPullDownRefresh,bt as useAttrs,wt as useBindModel,ct as useBoundingClientRect,dt as useChangeModel,Nt as useDisposables,Ae as useElementIntersectionObserver,Ke as useIntersectionObserver,Ie as useLayoutBridge,ze as useLayoutHosts,tt as useModel,Et as useNativeInstance,we as useNativePageRouter,Se as useNativeRouter,rt as useNavigationBarMetrics,Le as usePageLayout,et as usePageScrollThrottle,Pt as usePageStack,St as useScrollOffset,_t as useSelectorFields,ut as useSelectorQuery,it as useSlots,Ot as useTemplateRef,ot as useUpdatePerformanceListener,De as version,Ge as waitForLayoutHost,G as watch,V as watchEffect,U as watchPostEffect,z as watchSyncEffect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,d as t,n,r,s as i,u as a}from"./base-D-o2Hv6z.mjs";import{$ as o,A as s,B as c,F as l,G as u,H as d,I as f,J as p,K as m,L as h,M as g,N as _,P as v,Q as y,R as b,U as x,V as S,W as C,X as w,Y as T,Z as E,_ as D,et as O,g as k,h as A,j,m as M,n as N,q as P,t as F,v as I,z as L}from"./router-BiJKkvy7.mjs";import{$ as R,B as z,C as B,D as V,E as H,G as U,H as W,I as G,J as K,K as q,L as J,M as Y,N as X,O as Z,Q,R as $,S as ee,T as te,U as ne,V as re,W as ie,X as ae,Y as oe,Z as se,_ as ce,a as le,at as ue,b as de,c as fe,ct as pe,d as me,f as he,g as ge,h as _e,i as ve,it as ye,k as be,l as xe,lt as Se,m as Ce,n as we,nt as Te,o as Ee,ot as De,p as Oe,q as ke,r as Ae,rt as je,s as Me,st as Ne,t as Pe,tt as Fe,u as Ie,ut as Le,v as Re,w as ze,x as Be,y as Ve,z as He}from"./templateRef-
|
|
1
|
+
import{c as e,d as t,n,r,s as i,u as a}from"./base-D-o2Hv6z.mjs";import{$ as o,A as s,B as c,F as l,G as u,H as d,I as f,J as p,K as m,L as h,M as g,N as _,P as v,Q as y,R as b,U as x,V as S,W as C,X as w,Y as T,Z as E,_ as D,et as O,g as k,h as A,j,m as M,n as N,q as P,t as F,v as I,z as L}from"./router-BiJKkvy7.mjs";import{$ as R,B as z,C as B,D as V,E as H,G as U,H as W,I as G,J as K,K as q,L as J,M as Y,N as X,O as Z,Q,R as $,S as ee,T as te,U as ne,V as re,W as ie,X as ae,Y as oe,Z as se,_ as ce,a as le,at as ue,b as de,c as fe,ct as pe,d as me,f as he,g as ge,h as _e,i as ve,it as ye,k as be,l as xe,lt as Se,m as Ce,n as we,nt as Te,o as Ee,ot as De,p as Oe,q as ke,r as Ae,rt as je,s as Me,st as Ne,t as Pe,tt as Fe,u as Ie,ut as Le,v as Re,w as ze,x as Be,y as Ve,z as He}from"./templateRef-CDJDt62p.mjs";export{n as callHookList,r as callHookReturn,Z as createApp,te as createWevuComponent,H as createWevuScopedSlotComponent,xe as defineAppSetup,V as defineComponent,i as getCurrentInstance,Re as getCurrentPageStackSnapshot,e as getCurrentSetupContext,Ve as getNavigationBarMetrics,M as hasInjectionContext,A as inject,k as injectGlobal,se as isNoSetData,Q as markNoSetData,we as mergeModels,z as mountRuntimeInstance,Fe as onActivated,j as onAddToFavorites,g as onAttached,Te as onBeforeMount,je as onBeforeUnmount,ye as onBeforeUpdate,ue as onDeactivated,_ as onDetached,v as onError,De as onErrorCaptured,l as onHide,f as onLaunch,h as onLoad,b as onMemoryWarning,Ne as onMounted,L as onMoved,c as onPageNotFound,S as onPageScroll,d as onPullDownRefresh,x as onReachBottom,C as onReady,u as onResize,m as onRouteDone,P as onSaveExitState,pe as onServerPrefetch,p as onShareAppMessage,T as onShareTimeline,w as onShow,E as onTabItemTap,y as onThemeChange,o as onUnhandledRejection,O as onUnload,Se as onUnmounted,Le as onUpdated,D as provide,I as provideGlobal,He as registerApp,be as registerComponent,oe as resetWevuDefaults,Y as resolveLayoutBridge,X as resolveLayoutHost,ie as resolveRuntimePageLayoutName,ne as runSetupFunction,a as setCurrentInstance,t as setCurrentSetupContext,s as setGlobalProvidedValue,U as setPageLayout,re as setRuntimeSetDataVisibility,ae as setWevuDefaults,q as syncRuntimePageLayoutState,ke as syncRuntimePageLayoutStateFromRuntime,W as teardownRuntimeInstance,Ie as use,ge as useAsyncPullDownRefresh,Ee as useAttrs,Ae as useBindModel,he as useBoundingClientRect,ve as useChangeModel,ze as useDisposables,B as useElementIntersectionObserver,ee as useIntersectionObserver,G as useLayoutBridge,J as useLayoutHosts,le as useModel,Me as useNativeInstance,F as useNativePageRouter,N as useNativeRouter,de as useNavigationBarMetrics,K as usePageLayout,ce as usePageScrollThrottle,Be as usePageStack,Oe as useScrollOffset,Ce as useSelectorFields,_e as useSelectorQuery,fe as useSlots,Pe as useTemplateRef,me as useUpdatePerformanceListener,R as version,$ as waitForLayoutHost};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,C as t,N as n,P as r,a as i,b as a,d as o,g as s,h as c,i as l,j as u,k as d,l as f,m as p,n as m,o as h,p as g,r as _,s as v,t as y,w as b,x,y as S}from"./ref-CRwjgX_d.mjs";import{t as C}from"./computed-DdPJb4_M.mjs";import{_ as w,c as T,d as E,g as D,h as O,l as k,m as A,n as j,p as M,r as N,s as P,t as F,u as I,v as L,x as R}from"./base-D-o2Hv6z.mjs";import{l as ee,t as z}from"./watch-6_s3_f8q.mjs";import{C as B,D as V,E as H,H as te,M as U,N as W,O as ne,S as re,T as ie,V as ae,X as oe,b as G,et as se,k as ce,w as K,x as le,y as ue}from"./router-BiJKkvy7.mjs";import{WEVU_ATTRS_KEY as de,WEVU_EFFECT_SCOPE_KEY as fe,WEVU_EXPOSED_KEY as pe,WEVU_FUNCTION_PROP_PATHS_KEY as me,WEVU_HOOKS_KEY as he,WEVU_INLINE_HANDLER as ge,WEVU_INLINE_MAP_KEY as _e,WEVU_IS_APP_INSTANCE_KEY as ve,WEVU_LAYOUT_BRIDGE_PAGE_KEYS as ye,WEVU_LAYOUT_HOST_BRIDGE_KEY as be,WEVU_MODEL_HANDLER as xe,WEVU_NATIVE_INSTANCE_KEY as q,WEVU_ON_BEFORE_UPDATE_HOOK as Se,WEVU_ON_LOAD_CALLED_KEY as Ce,WEVU_ON_UPDATED_HOOK as we,WEVU_OWNER_HANDLER as Te,WEVU_PAGE_LAYOUT_NAME_KEY as Ee,WEVU_PAGE_LAYOUT_NONE as J,WEVU_PAGE_LAYOUT_PROPS_KEY as De,WEVU_PAGE_LAYOUT_SETTER_KEY as Oe,WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as ke,WEVU_PARENT_INSTANCE_KEY as Ae,WEVU_PENDING_PROP_VALUES_KEY as je,WEVU_PROPS_ALIASES_KEY as Me,WEVU_PROPS_DERIVED_KEYS_KEY as Y,WEVU_PROPS_KEY as X,WEVU_PROP_KEYS_KEY as Ne,WEVU_PUBLIC_RUNTIME_KEY as Pe,WEVU_READY_CALLED_KEY as Fe,WEVU_RESERVED_METHOD_PREFIX as Ie,WEVU_ROUTE_DONE_CALLED_KEY as Le,WEVU_ROUTE_DONE_IN_TICK_KEY as Re,WEVU_RUNTIME_APP_KEY as ze,WEVU_RUNTIME_KEY as Be,WEVU_SCOPED_SLOT_CREATOR_KEY as Ve,WEVU_SCOPED_SLOT_OWNER_SEED_KEY as He,WEVU_SCOPED_SLOT_OWNER_STORE_KEY as Ue,WEVU_SETUP_CONTEXT_INSTANCE_KEY as We,WEVU_SETUP_STATE_KEY as Ge,WEVU_SLOT_NAMES_PROP as Ke,WEVU_SLOT_OWNER_ID_KEY as Z,WEVU_SLOT_OWNER_ID_PROP as qe,WEVU_SLOT_OWNER_KEY as Je,WEVU_SLOT_OWNER_PROXY_KEY as Ye,WEVU_SLOT_PROPS_DATA_KEY as Xe,WEVU_SLOT_PROPS_KEY as Ze,WEVU_SLOT_SCOPE_KEY as Qe,WEVU_TEMPLATE_REFS_CALLBACKS_KEY as $e,WEVU_TEMPLATE_REFS_KEY as et,WEVU_TEMPLATE_REFS_PENDING_KEY as tt,WEVU_TEMPLATE_REF_MAP_KEY as nt,WEVU_WATCH_STOPS_KEY as rt}from"@weapp-core/constants";import{resolveMiniProgramPageKeys as it}from"@weapp-core/shared";import{wpi as at}from"@wevu/api";function ot(e){k(F(`onMounted`),`onReady`,e)}function st(e){k(F(`onUpdated`),we,e)}function ct(e){F(`onBeforeUnmount`),e()}function lt(e){k(F(`onUnmounted`),`onUnload`,e)}function ut(e){F(`onBeforeMount`),e()}function dt(e){k(F(`onBeforeUpdate`),Se,e)}function ft(e){let t=F(`onErrorCaptured`);k(t,`onError`,n=>e(n,t,``))}function pt(e){k(F(`onActivated`),`onShow`,e)}function mt(e){k(F(`onDeactivated`),`onHide`,e)}function ht(e){F(`onServerPrefetch`)}function gt(e,t){j(e,t===`before`?Se:we)}const _t=`6.16.44`;function vt(e){return e?e.charAt(0).toUpperCase()+e.slice(1):``}function yt(e){return e?e.split(`.`).map(e=>e.trim()).filter(Boolean):[]}function Q(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function bt(e,t,n){let r=e[t];if(!r)throw Error(`计算属性 "${t}" 是只读的`);r(n)}function xt(e){if(e==null)return e;if(typeof e==`object`){if(`detail`in e&&e.detail&&`value`in e.detail)return e.detail.value;if(`target`in e&&e.target&&`value`in e.target)return e.target.value}return e}function St(e,t,n){let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];(r[n]==null||typeof r[n]!=`object`)&&(r[n]={}),r=r[n]}r[t[t.length-1]]=n}function Ct(e,t,n,r,i,a){if(!i.length)return;let[o,...s]=i;if(!s.length){if(n[o])bt(r,o,a);else{let n=t&&Object.prototype.hasOwnProperty.call(t,o)?t:e,r=n[o];m(r)?r.value=a:n[o]=a}return}if(n[o]){bt(r,o,a);return}let c=t&&Object.prototype.hasOwnProperty.call(t,o)?t:e;(c[o]==null||typeof c[o]!=`object`)&&(c[o]={}),St(c[o],s,a)}function wt(e,t){return t.reduce((e,t)=>e==null?e:e[t],e)}function Tt(e){return xt(e)}function Et(e,t,n,r,i){return(a,o)=>{let s=yt(a);if(!s.length)throw Error(`bindModel 需要非空路径`);let c=()=>wt(e,s),l=e=>{Ct(t,i,n,r,s,e)},u={event:`input`,valueProp:`value`,parser:Tt,formatter:e=>e,...o};return{get value(){return c()},set value(e){l(e)},update(e){l(e)},model(e){let t={...u,...e},n=`on${vt(t.event)}`,r=e=>{l(t.parser(e))};return{[t.valueProp]:t.formatter(c()),[n]:r}}}}}function Dt(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Ot(e){return Array.isArray(e)||Dt(e)}function kt(e){if(Array.isArray(e))return e;let t=[];for(let n of Object.keys(e)){let r=Object.getOwnPropertyDescriptor(e,n);!r||typeof r.get==`function`||t.push(r.value)}return t}function At(e,t=new WeakSet){return m(e)||f(e)?!0:!e||typeof e!=`object`||t.has(e)||(t.add(e),!Ot(e))?!1:kt(e).some(e=>At(e,t))}function jt(e,t=new WeakSet){if(m(e)){let n=e.value;f(n)&&s(n),jt(n,t);return}if(f(e)){s(e),jt(S(e),t);return}!e||typeof e!=`object`||t.has(e)||!Ot(e)||(t.add(e),kt(e).forEach(e=>jt(e,t)))}const Mt=`__wevu_native_bridge__`;function Nt(e){try{Object.defineProperty(e,Mt,{value:!0,configurable:!1,enumerable:!1,writable:!1})}catch(t){e[Mt]=!0}}function Pt(e){return typeof e==`function`&&!!e[Mt]}function Ft(n){let r=Object.create(null),i=Object.create(null),a=new Set;return{computedRefs:r,computedSetters:i,dirtyComputedKeys:a,createTrackedComputed:(r,i,o)=>{let s,c=!0,l,d={get value(){return c&&(s=l(),c=!1),e(d,`value`),s},set value(e){if(!o)throw Error(`计算属性是只读的`);o(e)}};return _(d),l=t(i,{lazy:!0,scheduler:()=>{c||(c=!0,n.setDataStrategy===`patch`&&n.includeComputed&&a.add(r),u(d,`value`))}}),d},computedProxy:new Proxy({},{get(e,t){if(typeof t==`string`&&r[t])return r[t].value},has(e,t){return typeof t==`string`&&!!r[t]},ownKeys(){return Object.keys(r)},getOwnPropertyDescriptor(e,t){if(typeof t==`string`&&r[t])return{configurable:!0,enumerable:!0,value:r[t].value}}})}}function It(e){let{state:t,setupState:n,computedDefs:r,methodDefs:i,appConfig:a,includeComputed:o,setDataStrategy:s}=e,c={},{computedRefs:u,computedSetters:d,dirtyComputedKeys:f,createTrackedComputed:p,computedProxy:h}=Ft({includeComputed:o,setDataStrategy:s}),g=l(0),_=(e,t)=>{let n=S(e),r=n[Be],i=r==null?void 0:r.proxy,a=(e,t)=>{let n=e[t];return Pt(n)},o=n=>!(!n||typeof n!=`object`||n===e||n===t||n===i||a(n,`triggerEvent`)||a(n,`createSelectorQuery`)||a(n,`createIntersectionObserver`)||a(n,`setData`)),s=n[q];if(o(s))return s;let c=r==null?void 0:r.instance;if(o(c))return c},v=e=>{if(Q(c,e))return;let n=(...n)=>{let r=_(t,t);if(!r)return;let i=Reflect.get(r,e);if(typeof i==`function`)return i.apply(r,n)};Nt(n),c[e]=n},y=new Proxy(t,{get(e,r,i){if(typeof r==`string`){if(g.value,Q(n,r))return Reflect.get(n,r,i);if(r===`props`){let t=e[X];if(t&&typeof t==`object`)return t}if(r===`data`||r===`$state`)return t;if(r===`$computed`)return h;if(Q(c,r))return c[r];if(u[r])return u[r].value;if(Q(a.globalProperties,r))return a.globalProperties[r]}if(!Reflect.has(e,r)){let t=_(e,i);if(t&&Reflect.has(t,r)){let e=Reflect.get(t,r);return typeof e==`function`?e.bind(t):e}}let o=Reflect.get(e,r,i);return typeof r==`string`&&Q(n,r)?Reflect.get(n,r,i):o},set(e,t,r,i){if(typeof t==`string`&&u[t])return bt(d,t,r),!0;if(Q(n,t)){let e=Reflect.get(n,t,i);return m(e)&&!m(r)?(e.value=r,!0):Reflect.set(n,t,r,i)}if(Reflect.has(e,t)){var a;let o=Reflect.get(e,t,i);return m(o)&&!m(r)?(o.value=r,!0):Q((a=e[X])==null?{}:a,t)?Reflect.set(n,t,r,i):Reflect.set(e,t,r,i)}let o=_(e,i);return o&&Reflect.has(o,t)?Reflect.set(o,t,r):Reflect.set(e,t,r,i)},has(e,t){if(t===`data`||typeof t==`string`&&(Q(n,t)||u[t]||Q(c,t)))return!0;let r=_(e,e);return r&&Reflect.has(r,t)?!0:Reflect.has(e,t)},ownKeys(e){let t=new Set;return Reflect.ownKeys(e).forEach(e=>{t.add(e)}),Reflect.ownKeys(n).forEach(e=>{t.add(e)}),Object.keys(c).forEach(e=>t.add(e)),Object.keys(u).forEach(e=>t.add(e)),[...t]},getOwnPropertyDescriptor(e,r){if(typeof r==`string`&&Q(n,r))return Object.getOwnPropertyDescriptor(n,r);if(Reflect.has(e,r))return Object.getOwnPropertyDescriptor(e,r);if(typeof r==`string`){if(r===`data`)return{configurable:!0,enumerable:!1,get(){return t}};if(u[r])return{configurable:!0,enumerable:!0,get(){return u[r].value},set(e){bt(d,r,e)}};if(Q(c,r))return{configurable:!0,enumerable:!1,value:c[r]}}}});return Object.keys(i).forEach(e=>{let t=i[e];if(typeof t==`function`){c[e]=(...e)=>t.apply(y,e);return}e===_e&&t&&typeof t==`object`&&(c[e]=t)}),v(`triggerEvent`),v(`createSelectorQuery`),v(`createIntersectionObserver`),v(`setData`),Object.keys(r).forEach(e=>{let t=r[e];if(typeof t==`function`)u[e]=p(e,()=>t.call(y));else{var n,i;let r=(n=t.get)==null?void 0:n.bind(y);if(!r)throw Error(`计算属性 "${e}" 需要提供 getter`);let a=(i=t.set)==null?void 0:i.bind(y);a?(d[e]=a,u[e]=p(e,r,a)):u[e]=p(e,r)}}),{boundMethods:c,computedRefs:u,computedSetters:d,dirtyComputedKeys:f,computedProxy:h,publicInstance:y,touchSetupMethodsVersion(){g.value+=1}}}function Lt(e){return e!==`patch`&&e!==`diff`}function Rt(e){if(e!==`off`)return t=>{if(e===`fallback`&&!Lt(t.reason))return;let n=typeof t.bytes==`number`?t.bytes:t.estimatedBytes,r=typeof n==`number`?`${n}B`:`unknown`,i=[`mode=${t.mode}`,`reason=${t.reason}`,`pending=${t.pendingPatchKeys}`,`keys=${t.payloadKeys}`,`bytes=${r}`];typeof t.mergedSiblingParents==`number`&&i.push(`mergedParents=${t.mergedSiblingParents}`),typeof t.computedDirtyKeys==`number`&&i.push(`computedDirty=${t.computedDirtyKeys}`),typeof t.flushCount==`number`&&i.push(`flushes=${t.flushCount}`),typeof t.windowMs==`number`&&i.push(`window=${t.windowMs}ms`);let a=`[wevu:setData] ${i.join(` `)}`;if(Lt(t.reason)){console.warn(a);return}console.info(a)}}const zt=Symbol(`wevu.noSetData`);function $(e){return Object.defineProperty(e,zt,{value:!0,configurable:!0,enumerable:!1,writable:!1}),e}function Bt(e){return typeof e==`object`&&!!e&&e[zt]===!0}function Vt(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Ht(e,t,n,r,i,a,o,s,c,l){let u=h(e);if(typeof u==`bigint`){let e=Number(u);return Number.isSafeInteger(e)?e:u.toString()}if(typeof u==`symbol`)return u.toString();if(typeof u==`function`)return s||c!=null&&c.has(l)?u:void 0;if(typeof u!=`object`||!u)return u;if(Bt(u))return;let d=f(u),p=d?S(u):u,m=!!r&&d;if(r&&!m){let e=i==null?void 0:i.get(p);m=e==null?!At(p):e,i==null||i.set(p,m)}let g=m?r:void 0;if(a<=0||o.keys<=0)return p;if(g){let e=v(p),t=g.get(p);if(t&&t.version===e)return t.value}if(n.has(p))return;if(t.has(p))return t.get(p);if(p instanceof Date)return p.getTime();if(p instanceof RegExp)return p.toString();if(p instanceof Map){let e=[];return t.set(p,e),n.add(p),p.forEach((r,i)=>{e.push([Ht(i,t,n,void 0,void 0,1/0,{keys:1/0},s,void 0,``),Ht(r,t,n,void 0,void 0,1/0,{keys:1/0},s,void 0,``)])}),n.delete(p),e}if(p instanceof Set){let e=[];return t.set(p,e),n.add(p),p.forEach(r=>{e.push(Ht(r,t,n,void 0,void 0,1/0,{keys:1/0},s,void 0,``))}),n.delete(p),e}if(typeof ArrayBuffer<`u`){if(p instanceof ArrayBuffer)return p.byteLength;if(ArrayBuffer.isView(p)){let e=p;if(typeof e[Symbol.iterator]==`function`){let r=[...e];return t.set(p,r),r.map(e=>Ht(e,t,n,void 0,void 0,1/0,{keys:1/0},s,void 0,``))}let r=[...new Uint8Array(e.buffer,e.byteOffset,e.byteLength)];return t.set(p,r),r}}if(p instanceof Error)return{name:p.name,message:p.message};if(Array.isArray(p)){let e=[];t.set(p,e),n.add(p);let u=a-1;for(let a=0;a<p.length;a+=1){let d=l?`${l}.${a}`:String(a),f=Ht(p[a],t,n,r,i,u,o,s,c,d);e[a]=f===void 0?null:f}return n.delete(p),g&&g.set(p,{version:v(p),value:e}),e}let _={};t.set(p,_),n.add(p);let y=a-1;for(let e of Object.keys(p)){if(--o.keys,o.keys<=0)break;let a=l?`${l}.${e}`:e,u=Ht(p[e],t,n,r,i,y,o,s,c,a);u!==void 0&&(_[e]=u)}return n.delete(p),g&&g.set(p,{version:v(p),value:_}),_}function Ut(e,t=new WeakMap,n){var r,i,a;let o=(r=n==null?void 0:n._depth)==null?typeof(n==null?void 0:n.maxDepth)==`number`?Math.max(0,Math.floor(n.maxDepth)):1/0:r,s=(i=n==null?void 0:n._budget)==null?typeof(n==null?void 0:n.maxKeys)==`number`?{keys:Math.max(0,Math.floor(n.maxKeys))}:{keys:1/0}:i,c=Array.isArray(n==null?void 0:n.functionPaths)&&n.functionPaths.length?new Set(n.functionPaths):void 0;return Ht(e,t,new WeakSet,n==null?void 0:n.cache,n==null?void 0:n.cacheEligibility,o,s,!!(n!=null&&n.includeFunctions),c,(a=n==null?void 0:n._path)==null?``:a)}function Wt(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Gt(e,t,n){let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let i of r)if(!Q(t,i)||!n(e[i],t[i]))return!1;return!0}function Kt(e,t){return Object.is(e,t)?!0:Array.isArray(e)&&Array.isArray(t)?Wt(e,t,Kt):Vt(e)&&Vt(t)?Gt(e,t,Kt):!1}function qt(e){return e===void 0?null:e}function Jt(e,t,n,r){if(!Kt(e,t)){if(Vt(e)&&Vt(t)){for(let i of Object.keys(t)){if(!Q(e,i)){r[`${n}.${i}`]=qt(t[i]);continue}Jt(e[i],t[i],`${n}.${i}`,r)}for(let i of Object.keys(e))Q(t,i)||(r[`${n}.${i}`]=null);return}if(Array.isArray(e)&&Array.isArray(t)){Wt(e,t,Kt)||(r[n]=qt(t));return}r[n]=qt(t)}}function Yt(e,t,n){let r={},i=n==null?void 0:n.skipKeys;for(let n of Object.keys(t))i!=null&&i.has(n)||Jt(e[n],t[n],n,r);for(let n of Object.keys(e))i!=null&&i.has(n)||Q(t,n)||(r[n]=null);return r}function Xt(e){let t=Object.keys(e).sort();if(t.length<=1)return e;let n={},r=[];for(let i of t){for(;r.length;){let e=r[r.length-1];if(i.startsWith(e))break;r.pop()}r.length||(n[i]=e[i],r.push(`${i}.`))}return n}function Zt(e,t,n){if(t<=0)return t+1;if(e===null)return 4;let r=typeof e;if(r===`string`)return 2+e.length;if(r===`number`)return Number.isFinite(e)?String(e).length:4;if(r===`boolean`)return e?4:5;if(r===`undefined`||r===`function`||r===`symbol`||r!==`object`||n.has(e))return 4;if(n.add(e),Array.isArray(e)){let r=2;for(let i=0;i<e.length;i++)if(i&&(r+=1),r+=Zt(e[i],t-r,n),r>t)return r;return r}let i=2;for(let[r,a]of Object.entries(e))if(i>2&&(i+=1),i+=2+r.length+1,i+=Zt(a,t-i,n),i>t)return i;return i}function Qt(e,t){if(t===1/0)return{fallback:!1,estimatedBytes:void 0,bytes:void 0};let n=t,r=Object.keys(e).length,i=Zt(e,n+1,new WeakSet);if(i>n)return{fallback:!0,estimatedBytes:i,bytes:void 0};if(i>=n*.85&&r>2)try{let t=JSON.stringify(e).length;return{fallback:t>n,estimatedBytes:i,bytes:t}}catch(e){return{fallback:!1,estimatedBytes:i,bytes:void 0}}return{fallback:!1,estimatedBytes:i,bytes:void 0}}function $t(e){let{input:t,entryMap:n,getPlainByPath:r,mergeSiblingThreshold:i,mergeSiblingSkipArray:a,mergeSiblingMaxParentBytes:o,mergeSiblingMaxInflationRatio:s}=e;if(!i)return{out:t,merged:0};let c=Object.keys(t);if(c.length<i)return{out:t,merged:0};let l=new Map,u=new Set;for(let e of c){var d;let r=n.get(e);if(!r)continue;if(t[e]===null||r.op===`delete`){let t=e.lastIndexOf(`.`);t>0&&u.add(e.slice(0,t));continue}let i=e.lastIndexOf(`.`);if(i<=0)continue;let a=e.slice(0,i),o=(d=l.get(a))==null?[]:d;o.push(e),l.set(a,o)}let f=[...l.entries()].filter(([e,t])=>t.length>=i&&!u.has(e)).sort((e,t)=>t[0].split(`.`).length-e[0].split(`.`).length);if(!f.length)return{out:t,merged:0};let p={};Object.assign(p,t);let m=0,h=new WeakMap,g=e=>{if(e&&typeof e==`object`){let t=h.get(e);if(t!==void 0)return t;let n=Zt(e,1/0,new WeakSet);return h.set(e,n),n}return Zt(e,1/0,new WeakSet)},_=(e,t)=>2+e.length+1+g(t);for(let[e,t]of f){if(Q(p,e))continue;let n=t.filter(e=>Q(p,e));if(n.length<i)continue;let c=r(e);if(!(a&&Array.isArray(c))&&!(o!==1/0&&_(e,c)>o)){if(s!==1/0){let t=0;for(let e of n)t+=_(e,p[e]);if(_(e,c)>t*s)continue}p[e]=c;for(let e of n)delete p[e];m+=1}}return{out:p,merged:m}}function en(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function tn(e){return e===void 0?null:e}function nn(e){if(Array.isArray(e))return e.map(e=>nn(e));if(!en(e))return e;let t={};for(let n of Object.keys(e))t[n]=nn(e[n]);return t}function rn(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}if(!en(e)||!en(t))return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Q(t,r)||!Object.is(e[r],t[r]))return!1;return!0}function an(e,t,n,r){if(Object.is(e,t))return!0;if(n<=0)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!an(e[i],t[i],n-1,r))return!1;return!0}if(!en(e)||!en(t))return!1;let i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(let a of i)if(--r.keys,r.keys<=0||!Q(t,a)||!an(e[a],t[a],n-1,r))return!1;return!0}function on(e,t,n,r,i){var a;let o=(a=i==null?void 0:i.cloneValue)==null?!0:a,s=t.split(`.`).filter(Boolean);if(!s.length)return;let c=e;for(let e=0;e<s.length-1;e++){let t=s[e];(!Q(c,t)||c[t]==null||typeof c[t]!=`object`)&&(c[t]={}),c=c[t]}let l=s[s.length-1];if(r===`delete`)try{delete c[l]}catch(e){c[l]=null}else c[l]=o?nn(n):n}function sn(e){let{state:t,setupState:n,computedRefs:r,includeComputed:i,shouldIncludeKey:a,plainCache:o,plainCacheEligibility:s,toPlainMaxDepth:c,toPlainMaxKeys:l,includeFunctions:u=!1,functionPaths:d=[]}=e,p=new WeakMap,m={},h=Number.isFinite(l)?{keys:l}:void 0,g=f(t)?S(t):t,_=n&&typeof n==`object`?f(n)?S(n):n:void 0,v=Object.keys(g),y=_?Object.keys(_):[],b=i?Object.keys(r):[];for(let e of v)a(e)&&(m[e]=Ut(g[e],p,{cache:o,cacheEligibility:s,maxDepth:c,includeFunctions:u,functionPaths:d,_budget:h,_path:e}));for(let e of y)a(e)&&(m[e]=Ut(_[e],p,{cache:o,cacheEligibility:s,maxDepth:c,includeFunctions:u,functionPaths:d,_budget:h,_path:e}));for(let e of b)a(e)&&(m[e]=Ut(r[e].value,p,{cache:o,cacheEligibility:s,maxDepth:c,includeFunctions:u,functionPaths:d,_budget:h,_path:e}));return m}function cn(e){let{state:t,computedRefs:n,dirtyComputedKeys:r,includeComputed:i,computedCompare:a,computedCompareMaxDepth:o,computedCompareMaxKeys:s,currentAdapter:c,shouldIncludeKey:l,maxPatchKeys:u,maxPayloadBytes:d,mergeSiblingThreshold:f,mergeSiblingMaxInflationRatio:p,mergeSiblingMaxParentBytes:m,mergeSiblingSkipArray:h,elevateTopKeyThreshold:g,toPlainMaxDepth:_,toPlainMaxKeys:v,includeFunctions:y=!1,functionPaths:b,plainCache:x,plainCacheEligibility:S,pendingPatches:C,fallbackTopKeys:w,latestSnapshot:T,latestComputedSnapshot:E,needsFullSnapshot:D,emitDebug:O,runDiffUpdate:k}=e;if(C.size>u){D.value=!0;let e=C.size;C.clear(),r.clear(),O({mode:`diff`,reason:`maxPatchKeys`,pendingPatchKeys:e,payloadKeys:0}),k(`maxPatchKeys`);return}let A=new WeakMap,j=new Map,M=Object.create(null),N=[...C.entries()];if(Number.isFinite(g)&&g>0){let e=new Map;for(let[t]of N){var P;let n=t.split(`.`,1)[0];e.set(n,((P=e.get(n))==null?0:P)+1)}for(let[t,n]of e)n>=g&&w.add(t)}let F=N.filter(([e])=>{for(let t of w)if(e===t||e.startsWith(`${t}.`))return!1;return!0}),I=new Map(F);C.clear();let L=e=>{let n=e.split(`.`).filter(Boolean),r=t;for(let e of n){if(r==null)return r;r=r[e]}return r},R=e=>{if(j.has(e))return j.get(e);let t=tn(Ut(L(e),A,{cache:x,cacheEligibility:S,maxDepth:_,maxKeys:v,includeFunctions:y,functionPaths:b,_path:e}));return j.set(e,t),t};if(w.size){for(let e of w)l(e)&&(M[e]=R(e),I.set(e,{kind:`property`,op:`set`}));w.clear()}for(let[e,t]of F){if((t.kind===`array`?`set`:t.op)===`delete`){M[e]=null;continue}M[e]=R(e)}let ee=0;if(i&&r.size){let e=Object.create(null),t=[...r];r.clear(),ee=t.length;for(let r of t){if(!l(r))continue;let t=Ut(n[r].value,A,{cache:x,cacheEligibility:S,maxDepth:_,maxKeys:v,includeFunctions:y,functionPaths:b,_path:r}),i=E[r];(a===`deep`?an(i,t,o,{keys:s}):a===`shallow`?rn(i,t):Object.is(i,t))||(e[r]=tn(t),E[r]=nn(t))}Object.assign(M,e)}let z=Xt(M),B=0;if(f){let e=$t({input:z,entryMap:I,getPlainByPath:R,mergeSiblingThreshold:f,mergeSiblingSkipArray:h,mergeSiblingMaxParentBytes:m,mergeSiblingMaxInflationRatio:p});B=e.merged,z=Xt(e.out)}let V=Qt(z,d),H=V.fallback;if(O({mode:H?`diff`:`patch`,reason:H?`maxPayloadBytes`:`patch`,pendingPatchKeys:F.length,payloadKeys:Object.keys(z).length,mergedSiblingParents:B||void 0,computedDirtyKeys:ee||void 0,estimatedBytes:V.estimatedBytes,bytes:V.bytes}),H){D.value=!0,C.clear(),r.clear(),k(`maxPayloadBytes`);return}if(Object.keys(z).length){for(let[e,t]of Object.entries(z)){let n=I.get(e);n?on(T,e,t,n.kind===`array`?`set`:n.op,{cloneValue:!1}):on(T,e,t,`set`,{cloneValue:!1})}if(typeof c.setData==`function`){let e=c.setData(z);e&&typeof e.then==`function`&&e.catch(()=>{})}O({mode:`patch`,reason:`patch`,pendingPatchKeys:F.length,payloadKeys:Object.keys(z).length})}}function ln(e){let{state:t,setupState:n,snapshotOmitKeys:r,computedRefs:i,dirtyComputedKeys:a,includeComputed:o,setDataStrategy:s,computedCompare:c,computedCompareMaxDepth:l,computedCompareMaxKeys:u,currentAdapter:d,shouldIncludeKey:p,maxPatchKeys:h,maxPayloadBytes:g,mergeSiblingThreshold:_,mergeSiblingMaxInflationRatio:y,mergeSiblingMaxParentBytes:b,mergeSiblingSkipArray:x,elevateTopKeyThreshold:C,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E=!1,functionPaths:D,debug:O,debugWhen:k,debugSampleRate:A,loopWarning:j,runTracker:M,isMounted:N,initialSnapshot:P,initialState:F}=e,I=new WeakMap,L=new WeakMap,R={},ee=Object.create(null),z=Object.create(null),B=Object.create(null),V={value:s===`patch`},H=new Map,te=new Set,U=[],W=-1/0,ne=new Set(F&&typeof F==`object`?Object.keys(F):[]),re=e=>{if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype},ie=(e,t)=>{if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length?e.every((e,n)=>ie(e,t[n])):!1;if(re(e)&&re(t)){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?n.every(n=>Q(t,n)&&ie(e[n],t[n])):!1}return!1},ae=e=>{let t=m(e)?e.value:e;if(typeof t!=`object`||!t)return t;if(!f(t)&&At(t))return{snapshot:Ut(t,new WeakMap,{cacheEligibility:L,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D})};let n=f(t)?S(t):t;return{raw:n,version:v(n)}},oe=(e,t)=>Object.is(e,t)?!0:!e||!t||typeof e!=`object`||typeof t!=`object`||!Q(e,`raw`)||!Q(t,`raw`)?e&&t&&typeof e==`object`&&typeof t==`object`&&Q(e,`snapshot`)&&Q(t,`snapshot`)?ie(e.snapshot,t.snapshot):!1:e.raw===t.raw&&e.version===t.version,G=e=>p(e)&&!(r!=null&&r.has(e));if(P)for(let[e,t]of Object.entries(P))G(e)&&(R[e]=t);let se=()=>{if(!P)return;let e=f(t)?S(t):t,r=n&&typeof n==`object`?f(n)?S(n):n:void 0;for(let t of Object.keys(P))if(G(t)){if(r&&Q(r,t)){z[t]=ae(r[t]);continue}if(Q(e,t)){if(ne.has(t))continue;e[t]=P[t],z[t]=ae(e[t])}}},ce=e=>{let r=[],i=n&&typeof n==`object`?f(n)?S(n):n:void 0;for(let n of new Set([...Object.keys(t),...i?Object.keys(i):[]])){if(!G(n))continue;let a=i&&Q(i,n)?i[n]:t[n],o=m(a)?a.value:a;!o||typeof o!=`object`||S(o)===e&&r.push(n)}return r},K=e=>{if(!O)return;let t=e.reason!==`patch`&&e.reason!==`diff`;if(!(k===`fallback`&&!t)&&!(A<1&&Math.random()>A))try{O(e)}catch(e){}},le=()=>{if(!j)return;let e=Date.now();U.push(e);let t=e-j.sampleWindowMs;for(;U.length&&U[0]<t;)U.shift();U.length<=j.maxFlushes||j.coolDownMs>0&&e-W<j.coolDownMs||(W=e,K({mode:s,reason:`loopWarning`,pendingPatchKeys:H.size+te.size,payloadKeys:0,computedDirtyKeys:o?a.size:0,flushCount:U.length,windowMs:j.sampleWindowMs,message:`疑似运行时更新循环:${U.length} 次 setData flush/${j.sampleWindowMs}ms`}))},ue=()=>sn({state:t,setupState:n,computedRefs:i,includeComputed:o,shouldIncludeKey:G,plainCache:I,plainCacheEligibility:L,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E,functionPaths:D});se();let de=()=>{let e=f(t)?S(t):t,r=n&&typeof n==`object`?f(n)?S(n):n:void 0,a={...R},s=new WeakMap,c=new Set,l=new Set,u=new Set;for(let t of new Set([...Object.keys(e),...r?Object.keys(r):[]])){if(!G(t))continue;c.add(t);let n=r&&Q(r,t)?r:e,i=ae(n[t]),o=z[t];o&&i&&typeof o==`object`&&typeof i==`object`&&Q(o,`raw`)&&Q(i,`raw`)&&Array.isArray(o.raw)&&Array.isArray(i.raw)&&o.raw!==i.raw&&u.add(t),(!oe(o,i)||!Q(R,t))&&(a[t]=Ut(n[t],s,{cache:I,cacheEligibility:L,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D,_path:t})),z[t]=i}for(let e of Object.keys(z))c.has(e)||(delete z[e],(!o||!Q(i,e))&&delete a[e]);if(!o){for(let e of Object.keys(B))delete B[e];return{snapshot:a,replacedTopLevelKeys:u}}for(let e of Object.keys(i)){if(!G(e))continue;l.add(e);let t=i[e].value,n=ae(t);(!oe(B[e],n)||!Q(R,e))&&(a[e]=Ut(t,s,{cache:I,cacheEligibility:L,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D,_path:e})),B[e]=n}for(let t of Object.keys(B))l.has(t)||(delete B[t],(!Q(e,t)||!G(t))&&delete a[t]);return{snapshot:a,replacedTopLevelKeys:u}},fe=(e=`diff`)=>{var t;let n=s===`diff`?de():void 0,r=(t=n==null?void 0:n.snapshot)==null?ue():t,c=n?(()=>{let e={};for(let t of n.replacedTopLevelKeys)e[t]=r[t];return{...Yt(R,r,{skipKeys:n.replacedTopLevelKeys}),...e}})():Yt(R,r);if(R=r,V.value=!1,H.clear(),s===`patch`&&o){ee=Object.create(null);for(let e of Object.keys(i))G(e)&&(ee[e]=r[e]);a.clear()}if(Object.keys(c).length){if(typeof d.setData==`function`){let e=d.setData(c);e&&typeof e.then==`function`&&e.catch(()=>{})}K({mode:`diff`,reason:e,pendingPatchKeys:0,payloadKeys:Object.keys(c).length})}};return{job:e=>{if(N())if(le(),M(),s===`patch`&&!V.value){if(!(H.size>0||te.size>0||o&&a.size>0)){fe(`diff`);return}cn({state:t,computedRefs:i,dirtyComputedKeys:a,includeComputed:o,computedCompare:c,computedCompareMaxDepth:l,computedCompareMaxKeys:u,currentAdapter:d,shouldIncludeKey:G,maxPatchKeys:h,maxPayloadBytes:g,mergeSiblingThreshold:_,mergeSiblingMaxInflationRatio:y,mergeSiblingMaxParentBytes:b,mergeSiblingSkipArray:x,elevateTopKeyThreshold:C,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E,functionPaths:D,plainCache:I,plainCacheEligibility:L,pendingPatches:H,fallbackTopKeys:te,latestSnapshot:R,latestComputedSnapshot:ee,needsFullSnapshot:V,emitDebug:K,runDiffUpdate:fe})}else fe(V.value?`needsFullSnapshot`:`diff`)},mutationRecorder:(e,t)=>{if(!N())return;if(e.root!==t){let t=ce(e.root);if(t.length)for(let e of t)te.add(e);return}if(!e.path){if(Array.isArray(e.fallbackTopKeys)&&e.fallbackTopKeys.length)for(let t of e.fallbackTopKeys)te.add(t);else V.value=!0;return}let n=e.path.split(`.`,1)[0];G(n)&&H.set(e.path,{kind:e.kind,op:e.op})},snapshot:()=>s===`patch`?ue():{...R},cloneLatestSnapshot:()=>({...R}),getLatestSnapshot:()=>R}}function un(e){var t,n,r,i,a,o,s;let c=(t=e==null?void 0:e.includeComputed)==null?!0:t,l=(n=e==null?void 0:e.suspendWhenHidden)==null?!1:n,u=(r=e==null?void 0:e.strategy)==null?`diff`:r,d=typeof(e==null?void 0:e.maxPatchKeys)==`number`?Math.max(0,e.maxPatchKeys):1/0,f=typeof(e==null?void 0:e.maxPayloadBytes)==`number`?Math.max(0,e.maxPayloadBytes):1/0,p=typeof(e==null?void 0:e.mergeSiblingThreshold)==`number`?Math.max(2,Math.floor(e.mergeSiblingThreshold)):0,m=typeof(e==null?void 0:e.mergeSiblingMaxInflationRatio)==`number`?Math.max(0,e.mergeSiblingMaxInflationRatio):1.25,h=typeof(e==null?void 0:e.mergeSiblingMaxParentBytes)==`number`?Math.max(0,e.mergeSiblingMaxParentBytes):1/0,g=(i=e==null?void 0:e.mergeSiblingSkipArray)==null?!0:i,_=(a=e==null?void 0:e.computedCompare)==null?u===`patch`?`deep`:`reference`:a,v=typeof(e==null?void 0:e.computedCompareMaxDepth)==`number`?Math.max(0,Math.floor(e.computedCompareMaxDepth)):4,y=typeof(e==null?void 0:e.computedCompareMaxKeys)==`number`?Math.max(0,Math.floor(e.computedCompareMaxKeys)):200,b=e==null?void 0:e.prelinkMaxDepth,x=e==null?void 0:e.prelinkMaxKeys,S=e==null?void 0:e.debug,C=(o=e==null?void 0:e.diagnostics)==null?`off`:o,w=e==null?void 0:e.loopWarning,T=w===!1||w&&typeof w==`object`&&w.enabled===!1?!1:{sampleWindowMs:typeof w==`object`&&typeof w.sampleWindowMs==`number`?Math.max(100,Math.floor(w.sampleWindowMs)):1e3,maxFlushes:typeof w==`object`&&typeof w.maxFlushes==`number`?Math.max(1,Math.floor(w.maxFlushes)):50,coolDownMs:typeof w==`object`&&typeof w.coolDownMs==`number`?Math.max(0,Math.floor(w.coolDownMs)):5e3},E=(s=e==null?void 0:e.debugWhen)==null?`fallback`:s,D=typeof(e==null?void 0:e.debugSampleRate)==`number`?Math.min(1,Math.max(0,e.debugSampleRate)):1,O=typeof(e==null?void 0:e.elevateTopKeyThreshold)==`number`?Math.max(0,Math.floor(e.elevateTopKeyThreshold)):1/0,k=typeof(e==null?void 0:e.toPlainMaxDepth)==`number`?Math.max(0,Math.floor(e.toPlainMaxDepth)):1/0,A=typeof(e==null?void 0:e.toPlainMaxKeys)==`number`?Math.max(0,Math.floor(e.toPlainMaxKeys)):1/0,j=!!(e!=null&&e.includeFunctions),M=Array.isArray(e==null?void 0:e.functionPaths)?[...new Set(e.functionPaths.filter(e=>typeof e==`string`&&e.length>0))]:[],N=Array.isArray(e==null?void 0:e.pick)&&e.pick.length>0?new Set(e.pick):void 0,P=Array.isArray(e==null?void 0:e.omit)&&e.omit.length>0?new Set(e.omit):void 0;return{includeComputed:c,suspendWhenHidden:l,setDataStrategy:u,maxPatchKeys:d,maxPayloadBytes:f,mergeSiblingThreshold:p,mergeSiblingMaxInflationRatio:m,mergeSiblingMaxParentBytes:h,mergeSiblingSkipArray:g,computedCompare:_,computedCompareMaxDepth:v,computedCompareMaxKeys:y,prelinkMaxDepth:b,prelinkMaxKeys:x,debug:S,diagnostics:C,loopWarning:T,debugWhen:E,debugSampleRate:D,elevateTopKeyThreshold:O,toPlainMaxDepth:k,toPlainMaxKeys:A,includeFunctions:j,functionPaths:M,pickSet:N,omitSet:P,shouldIncludeKey:e=>!(N&&!N.has(e)||P&&P.has(e))}}function dn(e,t){let n=(()=>{e()});return n.stop=()=>n(),n.pause=()=>{var e;t==null||(e=t.pause)==null||e.call(t)},n.resume=()=>{var e;t==null||(e=t.resume)==null||e.call(t)},n}function fn(e){return typeof e==`function`?e():e==null?{}:e}function pn(e){let{data:n,resolvedComputed:i,resolvedMethods:l,appConfig:u,setDataOptions:m}=e;return e=>{let h=fn(n);if(h&&typeof h==`object`&&!Q(h,X))try{Object.defineProperty(h,X,{value:g(Object.create(null)),configurable:!0,enumerable:!1,writable:!1})}catch(e){}let _=o(h),v=o(Object.create(null)),y=e==null?void 0:e.__wevu_snapshotOmitKeys,b=!!(e!=null&&e.__wevu_deferInitialSnapshot),C=e==null?void 0:e.__wevu_initialSnapshot,w=e==null?void 0:e.__wevu_initialState,T=new Set(y instanceof Set||Array.isArray(y)?y:[]);if(h&&typeof h==`object`&&!Q(h,Ge))try{Object.defineProperty(h,Ge,{value:v,configurable:!0,enumerable:!1,writable:!1})}catch(e){}if(h&&typeof h==`object`&&w&&typeof w==`object`)for(let[e,t]of Object.entries(w))T.has(e)||(h[e]=t);let E=i,D=l,O=!0,k=[],A=new Set;Object.keys(_).forEach(e=>{let t=_[e];At(t)&&A.add(e)});let{includeComputed:j,setDataStrategy:M,maxPatchKeys:N,maxPayloadBytes:P,mergeSiblingThreshold:F,mergeSiblingMaxInflationRatio:I,mergeSiblingMaxParentBytes:L,mergeSiblingSkipArray:R,computedCompare:ee,computedCompareMaxDepth:B,computedCompareMaxKeys:V,prelinkMaxDepth:H,prelinkMaxKeys:te,debug:U,diagnostics:W,loopWarning:ne,debugWhen:re,debugSampleRate:ie,elevateTopKeyThreshold:ae,toPlainMaxDepth:oe,toPlainMaxKeys:G,includeFunctions:se,functionPaths:ce,shouldIncludeKey:K}=un(m),le=Rt(W),ue=W===`off`&&ne?Rt(`fallback`):void 0,fe=U||le||ue?e=>{typeof U==`function`&&U(e),le==null||le(e),e.reason===`loopWarning`&&(ue==null||ue(e))}:void 0,pe=W===`always`?`always`:re,{boundMethods:me,computedRefs:he,computedSetters:ge,dirtyComputedKeys:_e,computedProxy:ve,publicInstance:ye,touchSetupMethodsVersion:be}=It({state:_,setupState:v,computedDefs:E,methodDefs:D,appConfig:u,includeComputed:j,setDataStrategy:M}),xe=e==null?{setData:()=>{}}:e,q=S(_),Se,Ce=ln({state:_,setupState:v,snapshotOmitKeys:T,computedRefs:he,dirtyComputedKeys:_e,includeComputed:j,setDataStrategy:M,computedCompare:ee,computedCompareMaxDepth:B,computedCompareMaxKeys:V,currentAdapter:xe,shouldIncludeKey:K,maxPatchKeys:N,maxPayloadBytes:P,mergeSiblingThreshold:F,mergeSiblingMaxInflationRatio:I,mergeSiblingMaxParentBytes:L,mergeSiblingSkipArray:R,elevateTopKeyThreshold:ae,toPlainMaxDepth:oe,toPlainMaxKeys:G,includeFunctions:se,functionPaths:ce,debug:fe,debugWhen:pe,debugSampleRate:ie,loopWarning:ne,runTracker:()=>Se==null?void 0:Se(),isMounted:()=>O,initialSnapshot:C&&typeof C==`object`?C:void 0,initialState:w&&typeof w==`object`?w:void 0}),we=()=>Ce.job(q),Te=e=>Ce.mutationRecorder(e,q);Se=t(()=>{s(_);let e=_[X];f(e)&&s(e);let t=_[de];f(t)&&s(t),A.forEach(e=>{var t;jt((t=v[e])==null?_[e]:t)})},{lazy:!0,scheduler:()=>r(we)}),b||we(),k.push(dn(()=>d(Se))),M===`patch`&&(c(_,{shouldIncludeTopKey:K,maxDepth:H,maxKeys:te}),a(Te),k.push(dn(()=>x(Te))),k.push(dn(()=>p(_))));function Ee(e,t,n){let r=z(e,(e,n)=>t(e,n),n);return k.push(r),dn(()=>{r();let e=k.indexOf(r);e>=0&&k.splice(e,1)},r)}let J={get state(){return _},get setupState(){return v},get proxy(){return ye},get methods(){return me},get computed(){return ve},get adapter(){return xe},bindModel:Et(ye,_,he,ge,v),watch:Ee,snapshot:()=>Ce.snapshot(),unmount:()=>{O&&(O=!1,k.forEach(e=>{try{e()}catch(e){}}),k.length=0)}};try{Object.defineProperty(J,"__wevu_touchSetupMethodsVersion",{value:be,configurable:!0,enumerable:!1,writable:!1})}catch(e){J.__wevu_touchSetupMethodsVersion=be}try{Object.defineProperty(J,"__wevu_flushSetupSnapshotSync",{value:we,configurable:!0,enumerable:!1,writable:!1})}catch(e){J.__wevu_flushSetupSnapshotSync=we}try{Object.defineProperty(J,"__wevu_cloneLatestSnapshot",{value:Ce.cloneLatestSnapshot,configurable:!0,enumerable:!1,writable:!1})}catch(e){J.__wevu_cloneLatestSnapshot=Ce.cloneLatestSnapshot}try{Object.defineProperty(J,"__wevu_trackSetupReactiveKey",{value:e=>{A.add(e)},configurable:!0,enumerable:!1,writable:!1})}catch(e){J.__wevu_trackSetupReactiveKey=e=>{A.add(e)}}try{Object.defineProperty(J,Y,{value:T,configurable:!0,enumerable:!1,writable:!1})}catch(e){J[Y]=T}return J}}const mn=`__wevuDefaultsScope`;let hn={};function gn(e){if(!(!e||typeof e!=`object`||Array.isArray(e)))return e}function _n(e,t){if(!e)return t;if(!t)return e;let n={...e,...t},r=gn(e.setData),i=gn(t.setData);(r||i)&&(n.setData={...r==null?{}:r,...i==null?{}:i});let a=gn(e.options),o=gn(t.options);return(a||o)&&(n.options={...a==null?{}:a,...o==null?{}:o}),n}function vn(e,t){return _n(e,t)}function yn(e,t){return{app:_n(e.app,t.app),component:_n(e.component,t.component)}}function bn(e){hn=yn(hn,e)}function xn(){hn={}}function Sn(e){return vn(hn.app,e)}function Cn(e){return vn(hn.component,e)}const wn=/&/g,Tn=/"/g,En=/"/g,Dn=/'/g,On=/'/g,kn=/</g,An=/>/g;function jn(e){return e.replace(wn,`&`).replace(Tn,`"`).replace(En,`"`).replace(Dn,`'`).replace(On,`'`).replace(kn,`<`).replace(An,`>`)}function Mn(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`&&e.trim()){let t=Number(e);if(Number.isFinite(t))return t}}const Nn=/[^a-z0-9]+/gi,Pn=/^-+|-+$/g;function Fn(e){return e.trim().replace(Nn,`-`).replace(Pn,``).toLowerCase()}const In=/-([a-z0-9])/g;function Ln(e,t){let n=Fn(typeof(t==null?void 0:t.type)==`string`?t.type:``);if(!n)return;let r=n.replace(In,(e,t)=>t.toUpperCase());if(r)return`${e}${r[0].toUpperCase()}${r.slice(1)}`}const Rn={wvEventDetail:[`wd`,`wvEventDetail`],wvHandler:[`wh`,`wvHandler`],wvInlineId:[`wi`,`wvInlineId`]};function zn(e,t,n){var r;let i=(r=Rn[t])==null?[t]:r;for(let t of i){let r=Ln(t,n);if(r&&(e==null?void 0:e[r])!==void 0)return e[r]}for(let t of i)if((e==null?void 0:e[t])!==void 0)return e[t]}function Bn(e,t,n){return zn(e,t,n)}function Vn(e,t){let n=Bn(e,`wvEventDetail`,t);return n===!0||n===1||n===`1`||n===`true`}function Hn(e,t){if(!Vn(t,e))return e;if(!(!e||typeof e!=`object`||!(`detail`in e)))return e.detail}function Un(e,t){if(!t)return;let n=t.split(`.`).filter(Boolean),r=m(e)?e.value:e;for(let e of n){if(m(r)&&(r=r.value),r==null)return;r=r[e]}return m(r)?r.value:r}function Wn(e){if(typeof e!=`object`||!e||m(e)||f(e))return e;try{return o(e)}catch(t){return e}}function Gn(e,t,n,r){var i,a,o,s;let c=(i=(a=n==null||(o=n.currentTarget)==null?void 0:o.dataset)==null?n==null||(s=n.target)==null?void 0:s.dataset:a)==null?{}:i,l=Hn(n,c),u=Bn(c,`wvInlineId`,n);if(u&&r){let t=r[u];if(t&&typeof t.fn==`function`){let n={},r=Array.isArray(t.keys)?t.keys:[];for(let e=0;e<r.length;e+=1){let t=r[e];n[t]=c==null?void 0:c[`wvS${e}`]}let i=Array.isArray(t.indexKeys)?t.indexKeys:[];for(let e=0;e<i.length;e+=1){let t=i[e],r=Mn(c==null?void 0:c[`wvI${e}`]);r!==void 0&&(n[t]=r)}let a=Array.isArray(t.scopeResolvers)?t.scopeResolvers:[];for(let t=0;t<r.length;t+=1){let i=r[t],o=a[t];try{let t;if(typeof o==`function`)t=o(e,n,l);else if(o&&typeof o==`object`&&o.type===`for-item`){let r=n[o.indexKey],i=Un(e,o.path);t=i==null?void 0:i[r]}else continue;t!==void 0&&(n[i]=Wn(t))}catch(e){}}let o=t.fn(e,n,l);return typeof o==`function`?o.call(e,l):o}}let d=Bn(c,`wvHandler`,n),f=typeof t==`string`&&t?t:typeof d==`string`?d:void 0;if(!f)return;let p=Bn(c,`wvArgs`,n),m=[];if(Array.isArray(p))m=p;else if(typeof p==`string`)try{m=JSON.parse(p)}catch(e){try{m=JSON.parse(jn(p))}catch(e){m=[]}}Array.isArray(m)||(m=[]);let h=m.map(e=>e===`$event`?l:e),g=e==null?void 0:e[f];if(typeof g==`function`)return g.apply(e,h)}function Kn(){let e=re();if(e)return e;let t=A();return t[t.length-1]}function qn(e){return e===J?!1:e}function Jn(){var e,t;if(!T())throw Error(`usePageLayout() 必须在 setup() 的同步阶段调用`);let n=P(),r=n==null||(e=n.__wevu)==null?void 0:e.state,i=o({name:qn(r==null?void 0:r[Ee]),props:{...(t=r==null?void 0:r[De])==null?{}:t}});return n&&(n.__wevuPageLayoutState=i),R(i)}function Yn(e,t,n){let r=e.__wevuPageLayoutState;r&&(r.name=t,r.props={...n})}function Xn(e){var t,n;let r=e.__wevuPageLayoutState,i=(t=e.__wevu)==null?void 0:t.state;!r||!i||(r.name=qn(i[Ee]),r.props={...(n=i[De])==null?{}:n})}function Zn(e,t){let n=P(),r=n==null?void 0:n[Oe];if(typeof r==`function`){r(e,t);return}let i=Kn(),a=i==null?void 0:i[Oe];if(typeof a==`function`){a(e,t);return}throw Error(`setPageLayout() 未找到当前页面实例。请在页面 setup()、事件回调或当前页面上下文中调用。`)}function Qn(e){return e===!1?J:e}function $n(){let e=globalThis;return e[Ue]instanceof Map||(e[Ue]=new Map),typeof e[He]!=`number`&&(e[He]=0),{globalObject:e,ownerStore:e[Ue]}}function er(){let{globalObject:e}=$n();return e[He]+=1,`wv${e[He]}`}function tr(e,t,n){var r;let{ownerStore:i}=$n(),a=(r=i.get(e))==null?{snapshot:{},proxy:n,subscribers:new Set}:r;if(a.snapshot=t,a.proxy=n,i.set(e,a),a.subscribers.size)for(let e of a.subscribers)try{e(t,n)}catch(e){}}function nr(e){let{ownerStore:t}=$n();t.delete(e)}function rr(e,t){var n;let{ownerStore:r}=$n(),i=(n=r.get(e))==null?{snapshot:{},proxy:void 0,subscribers:new Set}:n;return i.subscribers.add(t),r.set(e,i),()=>{let n=r.get(e);n&&n.subscribers.delete(t)}}function ir(e){var t;let{ownerStore:n}=$n();return(t=n.get(e))==null?void 0:t.proxy}function ar(e){var t;let{ownerStore:n}=$n();return(t=n.get(e))==null?void 0:t.snapshot}function or(e){let t=e.__wevu_cloneLatestSnapshot;return typeof t==`function`?t():typeof e.snapshot==`function`?e.snapshot():{}}function sr(e,t){let n=e[Y];return!(n instanceof Set&&n.has(t))}function cr(e,t,n){if(!(!t||typeof t!=`object`))for(let[r,i]of Object.entries(t))sr(n,r)&&(e[r]=i)}function lr(e,t,n){var r;try{t.state[Z]=n}catch(e){}try{e[Z]=n}catch(e){}try{let t=e.data;t&&typeof t==`object`&&(t[Z]=n)}catch(e){}let i=or(t);cr(i,(r=e[X])==null?e.properties:r,t),tr(n,i,t.proxy)}function ur(e){return e.kind===`component`}function dr(e){return new Proxy(e,{get(e,t,n){let r=Reflect.get(e,t,n);return m(r)?r.value:r},set(e,t,n,r){let i=e[t];return m(i)&&!m(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}})}function fr(e,t){let n=e.__wevuExposeProxy;if(n&&e.__wevuExposeRaw===t)return n;let r=dr(t);try{Object.defineProperty(e,"__wevuExposeProxy",{value:r,configurable:!0,enumerable:!1,writable:!1}),Object.defineProperty(e,"__wevuExposeRaw",{value:t,configurable:!0,enumerable:!1,writable:!1})}catch(n){e.__wevuExposeProxy=r,e.__wevuExposeRaw=t}return r}function pr(e,t){if(!t||typeof t!=`object`)return e;let n=t;return $(new Proxy(e,{get(e,t,r){if(Reflect.has(e,t))return Reflect.get(e,t,r);let i=n[t];return typeof i==`function`?i.bind(n):i},set(e,t,r,i){return Reflect.has(e,t)?Reflect.set(e,t,r,i):(t in n,n[t]=r,!0)},has(e,t){return Reflect.has(e,t)||t in n},ownKeys(e){return[...new Set([...Reflect.ownKeys(e),...Reflect.ownKeys(n)])]},getOwnPropertyDescriptor(e,t){if(Reflect.has(e,t))return Object.getOwnPropertyDescriptor(e,t);let r=Object.getOwnPropertyDescriptor(n,t);return r&&{...r,configurable:!0}}}))}function mr(e){var t;if(!e||typeof e!=`object`)return e==null?null:e;let n=e,r=n[pe];return r&&typeof r==`object`?fr(n,r):(t=n[Pe])!=null&&t.proxy?n[Pe].proxy:e}function hr(e){return e[nt]}function gr(e,t,n){if(!e)return;let r=e.get(t);r&&(r.value=n)}function _r(e,t){var n,r;let i=(n=(r=e.__wevu)==null?void 0:r.proxy)==null?e:n,a;if(t.get)try{a=t.get.call(i)}catch(e){a=void 0}return a==null&&t.name&&(a=t.name),typeof a==`function`?{type:`function`,fn:a}:m(a)?{type:`ref`,ref:a}:typeof a==`string`&&a?{type:`name`,name:a}:t.name?{type:`name`,name:t.name}:{type:`skip`}}function vr(e){var t,n;let r=(t=(n=e.__wevu)==null?void 0:n.state)==null?e:t,i=r.$refs;if(i&&typeof i==`object`)return i;let a=$(Object.create(null));return Object.defineProperty(r,"$refs",{value:a,configurable:!0,enumerable:!1,writable:!1}),a}function yr(e){let t=e;if(t&&typeof t.createSelectorQuery==`function`)return t.createSelectorQuery();if(!L(`globalCreateSelectorQuery`))return null;let n=D();if(n&&typeof n.createSelectorQuery==`function`){let e=n.createSelectorQuery();return e?O().selectorQueryScopeByIn&&typeof e.in==`function`?e.in(t):e:null}return null}function br(e,t,n,r,i){let a=yr(e);return a?(r(n.multiple?a.selectAll(t):a.select(t)),new Promise(e=>{a.exec(t=>{var r;let a=Array.isArray(t)?t[0]:null;if(n.index!=null&&Array.isArray(a)){var o;a=(o=a[n.index])==null?null:o}if(i){var s;i((s=a)==null?null:s)}e((r=a)==null?null:r)})})):(i&&i(null),Promise.resolve(null))}function xr(e,t,n){return $({selector:t,boundingClientRect:r=>br(e,t,n,e=>e.boundingClientRect(),r),scrollOffset:r=>br(e,t,n,e=>e.scrollOffset(),r),fields:(r,i)=>br(e,t,n,e=>e.fields(r),i),node:r=>br(e,t,n,e=>e.node(),r)})}function Sr(e,t){let n=e;if(!n)return t.inFor?$([]):null;if(t.inFor){if(typeof n.selectAllComponents==`function`){let r=n.selectAllComponents(t.selector);return $((Array.isArray(r)?r:[]).map((n,r)=>pr(xr(e,t.selector,{multiple:!0,index:r}),mr(n))))}return $([])}let r=xr(e,t.selector,{multiple:!1});return typeof n.selectComponent==`function`?pr(r,mr(n.selectComponent(t.selector))):r}function Cr(e,t,n){return t.inFor?$((Array.isArray(n)?n:[]).map((n,r)=>xr(e,t.selector,{multiple:!0,index:r}))):n?xr(e,t.selector,{multiple:!1}):null}function wr(e,t){let n=e[et];if(!n||!n.length){t==null||t();return}if(!e[Fe]){t==null||t();return}if(!e.__wevu){t==null||t();return}let r=hr(e),i=n.filter(e=>!ur(e)),a=n.filter(e=>ur(e)).map(t=>({binding:t,value:Sr(e,t)})),o=n=>{var i,a;let o=vr(e),s=new Map,c=new Set,l=(i=(a=e.__wevu)==null?void 0:a.proxy)==null?e:i;n.forEach(t=>{let n=t.binding,r=t.value,i=_r(e,n);if(i.type===`function`){n.inFor&&Array.isArray(r)?r.length?r.forEach(e=>i.fn.call(l,e)):i.fn.call(l,null):i.fn.call(l,r==null?null:r);return}if(i.type===`ref`){i.ref.value=r;return}if(i.type===`name`){var a;c.add(i.name);let e=(a=s.get(i.name))==null?{values:[],count:0,hasFor:!1}:a;e.count+=1,e.hasFor=e.hasFor||n.inFor,n.inFor?Array.isArray(r)&&e.values.push(...r):r!=null&&e.values.push(r),s.set(i.name,e)}});for(let[e,t]of s){let n;n=t.values.length?t.hasFor||t.values.length>1||t.count>1?$(t.values):t.values[0]:t.hasFor?$([]):null,o[e]=n,gr(r,e,n)}for(let e of Object.keys(o))c.has(e)||delete o[e];t==null||t()};if(!i.length){o(a);return}let s=yr(e);if(!s){o(a);return}let c=[];for(let e of i)(e.inFor?s.selectAll(e.selector):s.select(e.selector)).boundingClientRect(),c.push({binding:e});s.exec(t=>{let n=c.map((n,r)=>{let i=Array.isArray(t)?t[r]:null;return{binding:n.binding,value:Cr(e,n.binding,i)}});o([...a,...n])})}function Tr(e,t){let r=e[et];if(!r||!r.length){t==null||t();return}if(t){var i;let n=(i=e[$e])==null?[]:i;n.push(t),e[$e]||Object.defineProperty(e,$e,{value:n,configurable:!0,enumerable:!1,writable:!0})}e[tt]||(e[tt]=!0,n(()=>{e[tt]=!1,wr(e,()=>{let t=e[$e];!t||!t.length||t.splice(0).forEach(e=>{try{e()}catch(e){}})})}))}function Er(e){var t,n;let r=e[et];if(!r||!r.length)return;let i=vr(e),a=(t=(n=e.__wevu)==null?void 0:n.proxy)==null?e:t,o=new Set,s=hr(e);for(let t of r){let n=_r(e,t),r=t.inFor?$([]):null;if(n.type===`function`){n.fn.call(a,null);continue}if(n.type===`ref`){n.ref.value=r;continue}n.type===`name`&&(o.add(n.name),i[n.name]=r,gr(s,n.name,r))}for(let e of Object.keys(i))o.has(e)||delete i[e]}const Dr=[`triggerEvent`,`createSelectorQuery`,`createIntersectionObserver`,`setData`,`setUpdatePerformanceListener`];function Or(){return Object.freeze(Object.create(null))}const kr=()=>[];function Ar(e){return Array.isArray(e)?[...new Set(e.filter(e=>typeof e==`string`&&e.length>0))]:!e||typeof e!=`object`?[]:Object.entries(e).filter(([,e])=>!!e).map(([e])=>e)}function jr(e){if(!Q(e,Ke))return Or();let t=()=>Ar(e[Ke]),n=e=>typeof e==`string`&&t().includes(e);return new Proxy(Object.create(null),{get(e,t){if(n(t))return kr},has(e,t){return n(t)},ownKeys(){return t()},getOwnPropertyDescriptor(e,t){if(n(t))return{configurable:!0,enumerable:!0,value:kr}},set(){return!1},deleteProperty(){return!1}})}function Mr(){let e=(()=>{});return e.stop=()=>{},e.pause=()=>{},e.resume=()=>{},e}function Nr(e){try{return $(e)}catch(t){return e}}function Pr(e){return!e||typeof e!=`object`||Array.isArray(e)?!1:Q(e,`bubbles`)||Q(e,`composed`)||Q(e,`capturePhase`)}function Fr(e){if(e.length===0)return{detail:void 0,options:void 0};if(e.length===1)return{detail:e[0],options:void 0};let t=e[e.length-1];if(Pr(t)){let n=e.slice(0,-1);return{detail:n.length<=1?n[0]:n,options:t}}return{detail:e,options:void 0}}function Ir(e,t,n){let r=e==null?void 0:e.state,i=r&&typeof r==`object`?S(r):void 0,a=e==null?void 0:e.proxy,o=e=>{let r=e[n];if(typeof r!=`function`)return!1;if(Pt(r))return!0;let i=t[n];return typeof i==`function`&&r===i},s=e=>!e||typeof e!=`object`||e===t||e===a||o(e)?!1:typeof e[n]==`function`,c=i?i[q]:void 0;if(s(c))return c;let l=e==null?void 0:e.instance;if(s(l))return l}function Lr(e,t,n){Nt(n);try{Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!1,writable:!0})}catch(r){e[t]=n}}function Rr(e,t){let n=e[We];if(n&&typeof n==`object`)return n;let r=Object.create(null),i=n=>{let r=Ir(t,e,n);if(r)return r;let i=e[n];if(typeof i==`function`&&!Pt(i))return e};Lr(r,`triggerEvent`,(...e)=>{let[t,n,r]=e,a=i(`triggerEvent`);a&&typeof a.triggerEvent==`function`&&(e.length>=3?a.triggerEvent(t,n,r):a.triggerEvent(t,n))}),Lr(r,`createSelectorQuery`,()=>{var n;let r=i(`createSelectorQuery`);if(r&&typeof r.createSelectorQuery==`function`)return r.createSelectorQuery();let a=D();if(!L(`globalCreateSelectorQuery`)||!a||typeof a.createSelectorQuery!=`function`)return;let o=a.createSelectorQuery();if(!o||!O().selectorQueryScopeByIn||typeof o.in!=`function`)return o;let s=(n=Ir(t,e,`setData`))==null?e:n;return o.in(s)}),Lr(r,`createIntersectionObserver`,n=>{var r;let a=i(`createIntersectionObserver`);if(a&&typeof a.createIntersectionObserver==`function`)return a.createIntersectionObserver(n==null?{}:n);let o=D();if(!L(`globalCreateIntersectionObserver`)||!o||typeof o.createIntersectionObserver!=`function`)return;let s=(r=Ir(t,e,`setData`))==null?e:r;return O().intersectionObserverScopeByParameter?o.createIntersectionObserver(s,n==null?{}:n):o.createIntersectionObserver(n==null?{}:n)}),Lr(r,`setData`,(e,n)=>{let r=i(`setData`);if(r&&typeof r.setData==`function`)return r.setData(e,n);let a=t==null?void 0:t.adapter,o=typeof(a==null?void 0:a.setData)==`function`?a.setData(e):void 0;return typeof n==`function`&&n(),o}),Lr(r,`setUpdatePerformanceListener`,e=>{let t=i(`setUpdatePerformanceListener`);if(t&&typeof t.setUpdatePerformanceListener==`function`)return t.setUpdatePerformanceListener(e)});let a=Nr(new Proxy(r,{get(t,n,r){if(Reflect.has(t,n))return Reflect.get(t,n,r);let i=e[n];return typeof i==`function`?i.bind(e):i},has(t,n){return Reflect.has(t,n)||n in e},set(t,n,r){return Reflect.has(t,n)?(t[n]=r,!0):(e[n]=r,!0)}}));try{Object.defineProperty(e,We,{value:a,configurable:!0,enumerable:!1,writable:!0})}catch(t){e[We]=a}return a}function zr(e){return!e||typeof e!=`object`?!1:typeof e.triggerEvent==`function`||typeof e.createSelectorQuery==`function`||typeof e.createIntersectionObserver==`function`||typeof e.setData==`function`}function Br(e,t,n){let r=t==null?void 0:t[n];if(typeof r!=`function`)return!1;if(Pt(r))return!0;let i=e==null?void 0:e.proxy;return typeof(i==null?void 0:i[n])==`function`&&r===i[n]}function Vr(e,t){if(!e||!zr(t)||t===e.proxy)return;let n=t;if(Br(e,n,`triggerEvent`)||Br(e,n,`createSelectorQuery`)||Br(e,n,`createIntersectionObserver`)||Br(e,n,`setData`))return;let r=e.state;if(!(!r||typeof r!=`object`))try{Object.defineProperty(r,q,{value:n,configurable:!0,enumerable:!1,writable:!0})}catch(e){r[q]=n}}function Hr(e,t){try{let n=t.methods;for(let t of Object.keys(n))Dr.includes(t)||typeof e[t]!=`function`&&(e[t]=function(...n){var r,i;let a=(r=this[Pe])==null?e[Pe]:r;Vr(a,this);let o=a==null||(i=a.methods)==null?void 0:i[t];if(typeof o==`function`)return o.apply(a.proxy,n)})}catch(e){}}let Ur=e=>e.startsWith(`layouts/`);function Wr(e){let t=e.is;return typeof t==`string`&&Ur(t,e)}function Gr(e){if(Wr(e))return;let t=e[Ae];if(t&&typeof t==`object`)return t;let n=e.selectOwnerComponent;if(typeof n==`function`)try{let t=n.call(e);if(t&&t!==e&&typeof t==`object`&&t.__wevu)return t}catch(e){}let r=A(),i=r[r.length-1];if(i&&i!==e&&typeof i==`object`&&i.__wevu)return i}function Kr(e){if(!Wr(e))return;let t=A(),n=t[t.length-1];n&&n!==e&&typeof n==`object`&&n.__wevu&&H(e,n)}function qr(e,t){e[ze]=t,V(e,t,Gr(e)),Kr(e)}function Jr(e,t,n){var r;if(typeof e!=`function`)return;let i=(r=n==null?void 0:n.runtime)==null?{methods:Object.create(null),state:{},setupState:{},proxy:{},watch:()=>()=>{},bindModel:()=>{}}:r;return n&&(n.runtime=i),e(t,{...n==null?{}:n,runtime:i})}function Yr(e,t){try{Object.defineProperty(e,X,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch(n){e[X]=t}}function Xr(e,t){try{Object.defineProperty(e,Ge,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch(n){e[Ge]=t}}function Zr(e,t){try{Object.defineProperty(e,q,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(n){e[q]=t}}function Qr(e,t){try{Object.defineProperty(e,Be,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(n){e[Be]=t}}function $r(e,t){try{Object.defineProperty(e,"instance",{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(n){try{e.instance=t}catch(e){}}}function ei(e){let t=e[We],n=t&&typeof t.setData==`function`?t.setData:void 0;if(typeof n==`function`&&!Pt(n))return n;let r=e.setData;if(typeof r==`function`&&!Pt(r))return r}function ti(e){let t=e.route;if(typeof t==`string`&&t)return t;let n=e.is;return typeof n==`string`&&n?n:`unknown`}function ni(e,t,n){try{return t.call(e,n)}catch(t){let n=ti(e);throw Error(`[wevu] setData failed (${n}): ${t instanceof Error?t.message:String(t)}`)}}function ri(e,t){let n=Object.keys(e);for(let r of n)if(!Q(t,r))try{delete e[r]}catch(e){}for(let[n,r]of Object.entries(t))e[n]=r}function ii(e,t,n=e.properties||{}){let r=t&&typeof t==`object`?t[X]:void 0,i=r&&typeof r==`object`?r:g({});ri(i,n),t&&typeof t==`object`&&Yr(t,i);try{Object.defineProperty(e,X,{value:i,configurable:!0,enumerable:!1,writable:!0})}catch(t){e[X]=i}return i}function ai(e){return e.includes(`:`)?e.replaceAll(`:`,`-`).toLowerCase():e}function oi(e){return e.startsWith(`__wv_`)}function si(e){var t;let{target:n,runtime:r,runtimeWithDefaults:i,runtimeState:a,runtimeProxy:o,setup:s}=e,c=ii(n,a,n.properties||{}),l=g(Object.create(null)),u=new Set(Array.isArray(n[Ne])?n[Ne]:[]),d=e=>typeof a==`object`&&!!a&&Q(a,e);(()=>{let e=n.properties&&typeof n.properties==`object`?n.properties:void 0;for(let t of Object.keys(l))(!e||!Q(e,t)||oi(t)||u.has(t)||d(t))&&delete l[t];if(e)for(let[t,n]of Object.entries(e))oi(t)||u.has(t)||d(t)||(l[t]=n)})();try{Object.defineProperty(n,de,{value:l,configurable:!0,enumerable:!1,writable:!1})}catch(e){n[de]=l}let p=Rr(n,i),m=jr(c);Xr(a,(t=i.setupState)==null?Object.create(null):t);try{Object.defineProperty(a,"$slots",{value:m,configurable:!0,enumerable:!1,writable:!1})}catch(e){a.$slots=m}let h=Nr({props:c,runtime:i,state:a,proxy:o,bindModel:r.bindModel.bind(i),watch:r.watch.bind(i),instance:p,emit:(e,...t)=>{let{detail:n,options:r}=Fr(t),i=ai(e);p.triggerEvent(i,n,r)},expose:e=>{n[pe]=e},attrs:l,slots:m}),_=b(!0);n[fe]=_,I(n),E(h);try{let e=_.run(()=>Jr(s,c,h)),t=!1;if(e&&typeof e==`object`){let n=r.setupState&&typeof r.setupState==`object`?f(r.setupState)?S(r.setupState):r.setupState:Object.create(null);Object.keys(e).forEach(i=>{let a=e[i];if(typeof a==`function`)r.methods[i]=(...e)=>a.apply(r.proxy,e),r.state[i]=(...e)=>a.apply(r.proxy,e),t=!0;else{if(At(a)){var o;(o=r.__wevu_trackSetupReactiveKey)==null||o.call(r,i)}r.state[i]=a,n[i]=a}})}if(t){var v;(v=r.__wevu_touchSetupMethodsVersion)==null||v.call(r)}}catch(e){throw _.stop(),n[fe]=void 0,e}finally{E(void 0),I(void 0)}}function ci(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function li(e){var t,n,r;let i={devOnly:!0,sampleWindowMs:1e3,maxCalls:30,coolDownMs:5e3,warnOnPageScroll:!0,pageScrollCoolDownMs:2e3};return e===void 0||e===!1?{...i,enabled:!1}:e===!0?{...i,enabled:!0}:ci(e)?{enabled:(t=e.enabled)==null?!0:t,devOnly:(n=e.devOnly)==null?i.devOnly:n,sampleWindowMs:typeof e.sampleWindowMs==`number`?Math.max(100,Math.floor(e.sampleWindowMs)):i.sampleWindowMs,maxCalls:typeof e.maxCalls==`number`?Math.max(1,Math.floor(e.maxCalls)):i.maxCalls,coolDownMs:typeof e.coolDownMs==`number`?Math.max(0,Math.floor(e.coolDownMs)):i.coolDownMs,warnOnPageScroll:(r=e.warnOnPageScroll)==null?i.warnOnPageScroll:r,pageScrollCoolDownMs:typeof e.pageScrollCoolDownMs==`number`?Math.max(0,Math.floor(e.pageScrollCoolDownMs)):i.pageScrollCoolDownMs}:{...i,enabled:!1}}function ui(){let e=M();if((e==null?void 0:e.debug)===!0||(e==null?void 0:e.envVersion)===`develop`)return!0;let t=D();try{var n;if((t==null||(n=t.getAccountInfoSync)==null||(n=n.call(t))==null||(n=n.miniProgram)==null?void 0:n.envVersion)===`develop`)return!0}catch(e){}return!1}function di(e){var t,n;let r=li(e.option);if(!r.enabled)return;let i=ui();if(r.devOnly&&!i)return;let a=(t=e.now)==null?(()=>Date.now()):t,o=(n=e.logger)==null?(e=>{var t;let n=(t=globalThis)==null||(t=t.console)==null?void 0:t.warn;typeof n==`function`&&n(e)}):n,s=[],c=-1/0,l=-1/0;return()=>{var t,n;let i=a();s.push(i);let u=i-r.sampleWindowMs;for(;s.length>0&&s[0]<u;)s.shift();let d=(t=(n=e.isInPageScrollHook)==null?void 0:n.call(e))==null?!1:t;r.warnOnPageScroll&&d&&(r.pageScrollCoolDownMs<=0||i-l>=r.pageScrollCoolDownMs)&&(l=i,o(`[wevu:setData] 检测到 onPageScroll 回调内调用 setData(${e.targetLabel})。建议改用 IntersectionObserver 监听可见性,或对滚动更新做节流。`)),!(s.length<=r.maxCalls)&&(r.coolDownMs>0&&i-c<r.coolDownMs||(c=i,o(`[wevu:setData] 检测到高频 setData 调用:${s.length} 次/${r.sampleWindowMs}ms(${e.targetLabel})。建议合并更新或降低调用频率。`)))}}function fi(e,t,n){if(typeof e==`function`)return{handler:e.bind(t.proxy),options:{}};if(typeof e==`string`){var r,i;let a=(r=(i=t.methods)==null?void 0:i[e])==null?n[e]:r;return typeof a==`function`?{handler:a.bind(t.proxy),options:{}}:void 0}if(!e||typeof e!=`object`)return;let a=fi(e.handler,t,n);if(!a)return;let o={...a.options};return e.immediate!==void 0&&(o.immediate=e.immediate),e.deep!==void 0&&(o.deep=e.deep),{handler:a.handler,options:o}}function pi(e,t){let n=t.split(`.`).map(e=>e.trim()).filter(Boolean);return n.length?()=>{let t=e;for(let e of n){if(t==null)return t;t=t[e]}return t}:()=>e}function mi(e,t,n){let r=[],i=e.proxy;for(let[a,o]of Object.entries(t)){let t=fi(o,e,n);if(!t)continue;let s=pi(i,a),c=e.watch(s,t.handler,t.options);r.push(c)}return r}function hi(e,t=new WeakMap){if(!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(hi(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=hi(i,t);return n}function gi(e,t,n){let r=e.data;if((!r||typeof r!=`object`)&&(!n||!Object.keys(n).length))return;let i=Array.isArray(t)&&t.length?new Set(t):void 0,a={};if(r&&typeof r==`object`)for(let[e,t]of Object.entries(r))i!=null&&i.has(e)||(a[e]=hi(t));if(n)for(let[e,t]of Object.entries(n))i!=null&&i.has(e)||(a[e]=hi(t));return a}function _i(e){return!!(e!=null&&e.__wevuHasTemplateRuntimeBindings)}function vi(e){typeof e.route!=`string`||!e.route||(e[Oe]=(t,n)=>{var r;let i=(r=e.__wevu)==null?void 0:r.state;if(!i||typeof i!=`object`)return;i[Ee]=Qn(t);let a=t===!1||n==null?{}:n;i[De]=a,Yn(e,t,a)})}function yi(e,t,n,r,i){var a,o,s,c,l,u,d,f,p,m,h,g;if(e.__wevu)return e.__wevu;qr(e,t),Nr(e);let _=(a=e.data)==null?void 0:a[Z],v=typeof _==`string`&&_?_:er(),y=typeof _==`string`&&_!==v,b=!!(!(t==null||(o=t.__wevuSetDataOptions)==null)&&o.suspendWhenHidden),x=typeof e.route==`string`&&e.route?`page:${e.route}`:typeof e.is==`string`&&e.is?`component:${e.is}`:`unknown-target`,S=di({option:t==null||(s=t.__wevuSetDataOptions)==null?void 0:s.highFrequencyWarning,targetLabel:x,isInPageScrollHook:()=>{var t;return Number((t=e[ke])==null?0:t)>0}}),C=i!=null&&i.deferSetData?(e=>{let t,n=!1,r={setData(r){if(!n){var i;t={...(i=t)==null?{}:i,...r};return}let a=ei(e);if(a)return ni(e,a,r)}};return r.__wevu_enableSetData=()=>{n=!0;let r=ei(e);if(t&&Object.keys(t).length&&r){let n=t;t=void 0,ni(e,r,n)}},r})(e):{setData(t){let n=ei(e);if(n)return ni(e,n,t)}},w,T=!0,E,D=(e,t)=>({...e==null?{}:e,...t}),O=()=>{var t;if(!w)return;let n=or(w);cr(n,(t=e[X])==null?e.properties:t,w),tr(v,n,w.proxy)},k=()=>{if(!y)return;let t=e.data;try{t&&typeof t==`object`&&(t[Z]=v)}catch(e){}let n=ei(e);n&&ni(e,n,{[Z]:v})},A={...C,setData(t){if(S==null||S(),b&&!T){E=D(E,t),O(),Tr(e);return}let n=C.setData(t);return O(),Tr(e),n},__wevu_setVisibility(t){if(T=t,!T||!E)return;let n=E;E=void 0;let r=C.setData(n);return O(),Tr(e),r}};Array.isArray(i==null?void 0:i.snapshotOmitKeys)&&i.snapshotOmitKeys.length&&Object.defineProperty(A,"__wevu_snapshotOmitKeys",{configurable:!0,enumerable:!1,value:i.snapshotOmitKeys,writable:!1});let j=gi(e,i==null?void 0:i.snapshotOmitKeys,_i(t)?void 0:{[Z]:v});j&&Object.keys(j).length&&Object.defineProperty(A,"__wevu_initialSnapshot",{configurable:!0,enumerable:!1,value:j,writable:!1}),Object.defineProperty(A,"__wevu_initialState",{configurable:!0,enumerable:!1,value:{[Z]:v},writable:!1});let M=e.properties;(r||M&&typeof M==`object`&&Object.keys(M).length>0)&&Object.defineProperty(A,"__wevu_deferInitialSnapshot",{configurable:!0,enumerable:!1,value:!0,writable:!1});let N=t.mount(A);w=N,$r(N,e);let P=(c=N==null?void 0:N.proxy)==null?{}:c,F=(l=N==null?void 0:N.state)==null?{}:l,I=(u=N==null?void 0:N.setupState)==null?Object.create(null):u;F&&typeof F==`object`&&(Qr(F,N),Zr(F,e));let L=(d=N==null?void 0:N.computed)==null?Object.create(null):d;if(!(N!=null&&N.methods))try{N.methods=Object.create(null)}catch(e){}let R=(f=N==null?void 0:N.methods)==null?Object.create(null):f,ee=(p=N==null?void 0:N.watch)==null?(()=>Mr()):p,z=(m=N==null?void 0:N.bindModel)==null?(()=>{}):m,B={...N==null?{}:N,state:F,setupState:I,proxy:P,methods:R,computed:L,watch:ee,bindModel:z,snapshot:(h=N==null?void 0:N.snapshot)==null?(()=>Object.create(null)):h,unmount:(g=N==null?void 0:N.unmount)==null?(()=>{}):g},V=B,H={__wevu_flushSetupSnapshotSync:N.__wevu_flushSetupSnapshotSync,__wevu_touchSetupMethodsVersion:N.__wevu_touchSetupMethodsVersion,__wevu_trackSetupReactiveKey:N.__wevu_trackSetupReactiveKey,[Y]:N[Y]};for(let[e,t]of Object.entries(H))t&&Object.defineProperty(B,e,{configurable:!0,enumerable:!1,value:t,writable:!0});if(Object.defineProperty(e,Pe,{value:B,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=B,vi(e),ii(e,F),lr(e,B,v),k(),n){let t=mi(B,n,e);t.length&&(e[rt]=t)}if(r){if(si({target:e,runtime:N,runtimeWithDefaults:B,runtimeState:F,runtimeProxy:P,setup:r}),!(i!=null&&i.deferSetData)){var te;(te=V.__wevu_flushSetupSnapshotSync)==null||te.call(V)}O()}else if(e.properties&&typeof e.properties==`object`&&Object.keys(e.properties).length>0){var U;(U=V.__wevu_flushSetupSnapshotSync)==null||U.call(V),O()}return Hr(e,N),N}function bi(e){var t;let n=(t=e.__wevu)==null?void 0:t.state,r=e.data;if(!(!n||typeof n!=`object`||!r||typeof r!=`object`))for(let[e,t]of Object.entries(r))Object.prototype.hasOwnProperty.call(n,e)&&(n[e]=t)}function xi(e){var t,n,r;let i=(t=e.__wevu)==null?void 0:t.adapter;bi(e),(n=e.__wevu)==null||(r=n.__wevu_flushSetupSnapshotSync)==null||r.call(n),i&&typeof i.__wevu_enableSetData==`function`&&i.__wevu_enableSetData()}function Si(e,t){var n;let r=(n=e.__wevu)==null?void 0:n.adapter;r&&typeof r.__wevu_setVisibility==`function`&&r.__wevu_setVisibility(t)}function Ci(e){var t;let n=e.__wevu,r=e[Z];r&&nr(r),Er(e),n&&e[he]&&j(e,`onUnload`,[]),e[he]&&(e[he]=void 0);let i=e[rt];if(Array.isArray(i))for(let e of i)try{e()}catch(e){}e[rt]=void 0,(t=e[fe])==null||t.stop(),e[fe]=void 0,n&&n.unmount(),delete e.__wevu,Pe in e&&delete e[Pe]}const wi=`__wevuAppGlobalListeners`,Ti=`__wevuOnMemoryWarningListener`;function Ei(e){let t=e[he],n=!!(t!=null&&t.onMemoryWarning);if(!L(`appMemoryWarningListener`)){delete e[Ti];return}let r=D(),i=r==null?void 0:r.onMemoryWarning,a=r==null?void 0:r.offMemoryWarning;if(typeof i!=`function`)return;let o=e[Ti];if(typeof o==`function`&&typeof a==`function`)try{a(o)}catch(e){}if(!n){delete e[Ti];return}let s=t=>{j(e,`onMemoryWarning`,[t])};e[Ti]=s,i(s)}function Di(e,t){var n,r;let{hookName:i,onApiName:a,offApiName:o,capabilityName:s,userHandler:c}=t,l=e[he],u=!!(l!=null&&l[i]),d=(r=(n=e)[wi])==null?n[wi]=Object.create(null):r,f=d[i];if(!L(s)){delete d[i],delete e[i];return}let p=D(),m=p==null?void 0:p[a],h=p==null?void 0:p[o];if(typeof f==`function`&&typeof h==`function`)try{h(f)}catch(e){}if(!u&&typeof c!=`function`){delete d[i];return}let g=(...t)=>{j(e,i,t),typeof c==`function`&&c.apply(e,t)};e[i]=g,d[i]=g,typeof m==`function`&&m(g)}function Oi(e,t){Di(e,{hookName:`onError`,onApiName:`onError`,offApiName:`offError`,capabilityName:`appErrorListener`,userHandler:t.onError}),Di(e,{hookName:`onPageNotFound`,onApiName:`onPageNotFound`,offApiName:`offPageNotFound`,capabilityName:`appPageNotFoundListener`,userHandler:t.onPageNotFound}),Di(e,{hookName:`onUnhandledRejection`,onApiName:`onUnhandledRejection`,offApiName:`offUnhandledRejection`,capabilityName:`appUnhandledRejectionListener`,userHandler:t.onUnhandledRejection}),Di(e,{hookName:`onThemeChange`,onApiName:`onThemeChange`,offApiName:`offThemeChange`,capabilityName:`appThemeChangeListener`,userHandler:t.onThemeChange})}function ki(e,t,n,r,i){var a;if(typeof App!=`function`)throw TypeError(`createApp 需要全局 App 构造器可用`);let o=Object.keys(t==null?{}:t),s={...i};s.globalData=(a=s.globalData)==null?{}:a,s[ge]||(s[ge]=function(e){var t,n;let r=this.__wevu;return Gn((t=r==null?void 0:r.proxy)==null?this:t,void 0,e,r==null||(n=r.methods)==null?void 0:n[_e])});let c=s.onLaunch,l=s.onError,u=s.onPageNotFound,d=s.onUnhandledRejection,f=s.onThemeChange;s.onLaunch=function(...t){this[ve]=!0,yi(this,e,n,r),Ei(this),Oi(this,{onError:l,onPageNotFound:u,onUnhandledRejection:d,onThemeChange:f}),j(this,`onLaunch`,t),typeof c==`function`&&c.apply(this,t)};let p=s.onShow;s.onShow=function(...e){j(this,`onShow`,e),typeof p==`function`&&p.apply(this,e)};let m=s.onHide;s.onHide=function(...e){j(this,`onHide`,e),typeof m==`function`&&m.apply(this,e)},delete s.onError,delete s.onPageNotFound,delete s.onUnhandledRejection,delete s.onThemeChange;for(let e of o){let t=s[e];s[e]=function(...n){var r;let i=this.__wevu,a,o=i==null||(r=i.methods)==null?void 0:r[e];return o&&(a=o.apply(i.proxy,n)),typeof t==`function`?t.apply(this,n):a}}App(s)}function Ai(e){let{features:t,userOnSaveExitState:n,userOnPullDownRefresh:r,userOnReachBottom:i,userOnPageScroll:a,userOnRouteDone:o,userOnTabItemTap:s,userOnResize:c,userOnShareAppMessage:l,userOnShareTimeline:u,userOnAddToFavorites:d}=e,f=typeof r==`function`||!!t.enableOnPullDownRefresh,p=typeof i==`function`||!!t.enableOnReachBottom,m=typeof a==`function`||!!t.enableOnPageScroll,h=typeof o==`function`||!!t.enableOnRouteDone,g=!!t.enableOnRouteDoneFallback,_=typeof s==`function`||!!t.enableOnTabItemTap,v=typeof c==`function`||!!t.enableOnResize,y=typeof u==`function`||!!t.enableOnShareTimeline,b=typeof l==`function`||!!t.enableOnShareAppMessage,x=typeof d==`function`||!!t.enableOnAddToFavorites,S=typeof n==`function`||!!t.enableOnSaveExitState,C=()=>{};return{enableOnPullDownRefresh:f,enableOnReachBottom:p,enableOnPageScroll:m,enableOnRouteDone:h,enableOnRouteDoneFallback:g,enableOnTabItemTap:_,enableOnResize:v,enableOnShareAppMessage:b,enableOnShareTimeline:y,enableOnAddToFavorites:x,enableOnSaveExitState:S,effectiveOnSaveExitState:typeof n==`function`?n:(()=>({data:void 0})),effectiveOnPullDownRefresh:typeof r==`function`?r:C,effectiveOnReachBottom:typeof i==`function`?i:C,effectiveOnPageScroll:typeof a==`function`?a:C,effectiveOnRouteDone:typeof o==`function`?o:C,effectiveOnTabItemTap:typeof s==`function`?s:C,effectiveOnResize:typeof c==`function`?c:C,effectiveOnShareAppMessage:typeof l==`function`?l:C,effectiveOnShareTimeline:typeof u==`function`?u:C,effectiveOnAddToFavorites:typeof d==`function`?d:(()=>({}))}}function ji(e,t){let{enableOnSaveExitState:n,enableOnPullDownRefresh:r,enableOnReachBottom:i,enableOnPageScroll:a,enableOnRouteDone:o,enableOnTabItemTap:s,enableOnResize:c,enableOnShareAppMessage:l,enableOnShareTimeline:u,enableOnAddToFavorites:d,effectiveOnSaveExitState:f,effectiveOnPullDownRefresh:p,effectiveOnReachBottom:m,effectiveOnPageScroll:h,effectiveOnRouteDone:g,effectiveOnTabItemTap:_,effectiveOnResize:v,effectiveOnShareAppMessage:y,effectiveOnShareTimeline:b,effectiveOnAddToFavorites:x,hasHook:S}=t;n&&(e.onSaveExitState=function(...e){let t=N(this,`onSaveExitState`,e);return t===void 0?f.apply(this,e):t}),r&&(e.onPullDownRefresh=function(...e){if(j(this,`onPullDownRefresh`,e),!S(this,`onPullDownRefresh`))return p.apply(this,e)}),i&&(e.onReachBottom=function(...e){if(j(this,`onReachBottom`,e),!S(this,`onReachBottom`))return m.apply(this,e)}),a&&(e.onPageScroll=function(...e){return ie(this,()=>{if(j(this,`onPageScroll`,e),!S(this,`onPageScroll`))return h.apply(this,e)})}),o&&(e.onRouteDone=function(...e){if(!this[Re]&&(this[Re]=!0,Promise.resolve().then(()=>{this[Re]=!1}),this[Le]=!0,j(this,`onRouteDone`,e),!S(this,`onRouteDone`)))return g.apply(this,e)}),s&&(e.onTabItemTap=function(...e){if(j(this,`onTabItemTap`,e),!S(this,`onTabItemTap`))return _.apply(this,e)}),c&&(e.onResize=function(...e){if(j(this,`onResize`,e),!S(this,`onResize`))return v.apply(this,e)}),l&&(e.onShareAppMessage=function(...e){let t=N(this,`onShareAppMessage`,e);return t===void 0?y.apply(this,e):t}),u&&(e.onShareTimeline=function(...e){let t=N(this,`onShareTimeline`,e);return t===void 0?b.apply(this,e):t}),d&&(e.onAddToFavorites=function(...e){let t=N(this,`onAddToFavorites`,e);return t===void 0?x.apply(this,e):t})}function Mi(e){let{runtimeApp:t,watch:n,setup:r,userOnLoad:i,userOnUnload:a,userOnShow:o,userOnHide:s,userOnReady:c,isPage:l,enableOnSaveExitState:u,enableOnPullDownRefresh:d,enableOnReachBottom:f,enableOnPageScroll:p,enableOnRouteDone:m,enableOnRouteDoneFallback:h,enableOnTabItemTap:g,enableOnResize:_,enableOnShareAppMessage:v,enableOnShareTimeline:y,enableOnAddToFavorites:b,syncWevuPropsFromValues:x,effectiveOnSaveExitState:S,effectiveOnPullDownRefresh:C,effectiveOnReachBottom:w,effectiveOnPageScroll:T,effectiveOnRouteDone:E,effectiveOnTabItemTap:D,effectiveOnResize:O,effectiveOnShareAppMessage:k,effectiveOnShareTimeline:A,effectiveOnAddToFavorites:M,hasHook:N}=e,P=e=>{var t,n;(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)},F={onLoad(...e){if(this[Ce])return;this[Ce]=!0,yi(this,t,n,r);let a=e[0]&&typeof e[0]==`object`?e[0]:K(this);if(x==null||x(this,a),P(this),xi(this),l&&le({enableOnShareAppMessage:v,enableOnShareTimeline:y}),j(this,`onLoad`,e),typeof i==`function`)return i.apply(this,e.length?e:[a])},onUnload(...e){if(l&&B(this),Ci(this),typeof a==`function`)return a.apply(this,e)},onShow(...e){if(l&&(G(),ue(this),this[Ce]||F.onLoad.call(this,K(this)),x==null||x(this,K(this)),P(this),le({enableOnShareAppMessage:v,enableOnShareTimeline:y}),this[Le]=!1),Si(this,!0),j(this,`onShow`,e),typeof o==`function`)return o.apply(this,e)},onHide(...e){if(l&&B(this),Si(this,!1),j(this,`onHide`,e),typeof s==`function`)return s.apply(this,e)},onReady(...e){if(l&&(this[Ce]||F.onLoad.call(this,K(this)),x==null||x(this,K(this)),P(this),le({enableOnShareAppMessage:v,enableOnShareTimeline:y})),!this[Fe]){if(this[Fe]=!0,l&&m&&h){let e=this;setTimeout(()=>{if(!e[Le]){var t;(t=F.onRouteDone)==null||t.call(e)}},0)}Tr(this,()=>{j(this,`onReady`,e),typeof c==`function`&&c.apply(this,e)});return}if(typeof c==`function`)return c.apply(this,e)}};return ji(F,{enableOnSaveExitState:u,enableOnPullDownRefresh:d,enableOnReachBottom:f,enableOnPageScroll:p,enableOnRouteDone:m,enableOnTabItemTap:g,enableOnResize:_,enableOnShareAppMessage:v,enableOnShareTimeline:y,enableOnAddToFavorites:b,effectiveOnSaveExitState:S,effectiveOnPullDownRefresh:C,effectiveOnReachBottom:w,effectiveOnPageScroll:T,effectiveOnRouteDone:E,effectiveOnTabItemTap:D,effectiveOnResize:O,effectiveOnShareAppMessage:k,effectiveOnShareTimeline:A,effectiveOnAddToFavorites:M,hasHook:N}),F}function Ni(e){let{userMethods:t,runtimeMethods:n}=e,r={...t};r[ge]||(r[ge]=function(e){var t,n;let r=this.__wevu;return Gn((t=r==null?void 0:r.proxy)==null?this:t,void 0,e,r==null||(n=r.methods)==null?void 0:n[_e])}),r[xe]||(r[xe]=function(e){var t,n,r;let i=(t=e==null||(n=e.currentTarget)==null||(n=n.dataset)==null?void 0:n.wvModel)==null?e==null||(r=e.target)==null||(r=r.dataset)==null?void 0:r.wvModel:t;if(typeof i!=`string`||!i)return;let a=this.__wevu;if(!a||typeof a.bindModel!=`function`)return;let o=xt(e);try{a.bindModel(i).update(o)}catch(e){}}),!r[Te]&&typeof(n==null?void 0:n[Te])==`function`&&(r[Te]=n[Te]);let i=Object.keys(n==null?{}:n);function a(e){let t=e.__wevu;if(t)return t;let n=e.$state;if(n&&typeof n==`object`)return n[Be]}function o(e,t){if((e==null?void 0:e.proxy)===t)return;let n=e==null?void 0:e.proxy,r=e=>{let r=t[e];if(typeof r!=`function`)return!1;let i=n==null?void 0:n[e];return typeof i==`function`&&r===i};if(r(`triggerEvent`)||r(`createSelectorQuery`)||r(`createIntersectionObserver`)||r(`setData`)||!(typeof t.triggerEvent==`function`||typeof t.createSelectorQuery==`function`||typeof t.createIntersectionObserver==`function`||typeof t.setData==`function`))return;let i=e==null?void 0:e.state;if(!(!i||typeof i!=`object`)&&t.$state!==i)try{Object.defineProperty(i,q,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(e){i[q]=t}}for(let e of i){if(e===_e||e.startsWith(Ie))continue;let t=r[e];r[e]=function(...n){var r;let i=a(this);o(i,this);let s,c=i==null||(r=i.methods)==null?void 0:r[e];if(c&&(s=c.apply(i.proxy,n)),typeof t==`function`){let e=t.apply(this,n);return e===void 0?s:e}return s}}return{finalMethods:r}}function Pi(e,t=new WeakMap){if(!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(Pi(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=Pi(i,t);return n}function Fi(e){let t=e.route;if(typeof t==`string`&&t)return t;let n=e.is;return typeof n==`string`&&n?n:`unknown`}function Ii(e){var t;let{methods:n={},lifetimes:r={},pageLifetimes:i={},options:a={},...o}=e,s=o.onLoad,c=o.onUnload,l=o.onShow,u=o.onHide,d=o.onReady,f=o.onSaveExitState,p=o.onPullDownRefresh,m=o.onReachBottom,h=o.onPageScroll,g=o.onRouteDone,_=o.onTabItemTap,v=o.onResize,y=o.onShareAppMessage,b=o.onShareTimeline,x=o.onAddToFavorites,S=(t=o.features)==null?{}:t,C=[s,c,l,u,d,f,p,m,h,g,_,v,y,b,x].some(e=>typeof e==`function`),w=!!o.__wevu_isPage||Object.keys(S==null?{}:S).length>0||C,T={...o},E=new Set([`data`,`behaviors`,`relations`,`externalClasses`,`options`,`properties`,`observers`,`pureDataPattern`,`virtualHost`,`definitionFilter`,`export`,`__wevuTemplateRefs`,`__wevuLayoutHosts`,Me,Y,`setupLifecycle`,`features`,`__wevu_isPage`]),D=[];for(let[e,t]of Object.entries(T))E.has(e)||typeof t!=`function`&&(D.push([e,t]),delete T[e]);let O=e=>{if(D.length){for(let[t,n]of D)if(!Q(e,t))try{e[t]=Pi(n)}catch(e){}}},k=new Set([`data`,`export`,`definitionFilter`,`onLoad`,`onUnload`,`onShow`,`onHide`,`onReady`,`onSaveExitState`,`onPullDownRefresh`,`onReachBottom`,`onPageScroll`,`onRouteDone`,`onTabItemTap`,`onResize`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]),A={};for(let[e,t]of Object.entries(T))typeof t!=`function`||k.has(e)||(A[e]=t,delete T[e]);let j=T.__wevuTemplateRefs;delete T.__wevuTemplateRefs;let M=T.__wevuLayoutHosts;delete T.__wevuLayoutHosts;let N=T[Me];delete T[Me];let P=T[Y];delete T[Y];let F=T.observers,I=T.setupLifecycle===`created`?`created`:`attached`;delete T.setupLifecycle;let L=T.created;return delete T.features,delete T.created,delete T.onLoad,delete T.onUnload,delete T.onShow,delete T.onHide,delete T.onReady,{userMethods:n,userLifetimes:r,userPageLifetimes:i,userOptions:a,restOptions:T,topLevelMethods:A,templateRefs:j,layoutHosts:M,propsAliases:N,propsDerivedKeys:P,userObservers:F,setupLifecycle:I,legacyCreated:L,isPage:w,features:S,userOnLoad:s,userOnUnload:c,userOnShow:l,userOnHide:u,userOnReady:d,userOnSaveExitState:f,userOnPullDownRefresh:p,userOnReachBottom:m,userOnPageScroll:h,userOnRouteDone:g,userOnTabItemTap:_,userOnResize:v,userOnShareAppMessage:y,userOnShareTimeline:b,userOnAddToFavorites:x,applyExtraInstanceFields:O}}function Li(e){var t;let n=e.__wevu,r=e[Z];if(!n||!r||typeof n.snapshot!=`function`)return;let i=n.snapshot();cr(i,(t=e[X])==null?e.properties:t,n),tr(r,i,n.proxy)}function Ri(e){let{restOptions:t,propsAliases:n,propsDerivedKeys:r,userObservers:i}=e,a=t.properties&&typeof t.properties==`object`?Object.keys(t.properties):[],o=new Set(a),s=new Set(r==null?[]:r),c=Object.entries(n==null?{}:n).filter(([e,t])=>e&&t),l=new Set(c.map(([e])=>e)),u=[...s].filter(e=>o.has(e)&&!l.has(e)),d=new Set([Ke,qe,Qe]),f=new WeakMap,p=e=>e.startsWith(`__wv_`),m=e=>{let t=e.__wevu,n=t==null?void 0:t[Y];if(n instanceof Set)for(let e of u)n.add(e)},h=(e,t,n)=>Q(e,t)&&Object.is(e[t],n)?!1:(e[t]=n,!0),g=(e,t,n)=>{var r;if(!d.has(t))return;let i=!1,a=(r=e.__wevu)==null?void 0:r.state;try{a&&typeof a==`object`&&h(a,t,n);let r=e.data;r&&typeof r==`object`&&(i=h(r,t,n))}catch(e){}if(!(!i||typeof e.setData!=`function`))try{e.setData({[t]:n})}catch(e){}},_=(e,t)=>{var n;if(!c.length)return;let r=e.__wevu,i=r==null?void 0:r.setupState,a=r==null?void 0:r.state;if(!i||typeof i!=`object`)return;m(e);let o=(n=f.get(e))==null?new Set:n;f.set(e,o);for(let[e,n]of c){if(Q(i,e)&&!o.has(e))continue;let r=t[n];try{h(i,e,r),o.add(e)}catch(e){}if(a&&typeof a==`object`&&(!Q(a,e)||o.has(e)))try{h(a,e,r)}catch(e){}}},v=(e,t)=>{if(!s.size)return;let n=e.__wevu,r=n==null?void 0:n.setupState;if(!r||typeof r!=`object`)return;m(e);let i=new Map(c);for(let e of s){var a;let n=(a=i.get(e))==null?e:a;if(Q(t,n))try{h(r,e,t[n])}catch(e){}}},y=e=>{try{Object.defineProperty(e,Ne,{value:a,configurable:!0,enumerable:!1,writable:!1})}catch(t){e[Ne]=a}},b=e=>{let t=e[de];if(!t||typeof t!=`object`)return;let n=t=>{var n;let r=(n=e.__wevu)==null?void 0:n.state;return typeof r==`object`&&!!r&&Q(r,t)},r=e.properties,i=r&&typeof r==`object`?r:void 0,a=Object.keys(t);for(let e of a)if(!i||!Q(i,e)||p(e)||o.has(e)||n(e))try{delete t[e]}catch(e){}if(!i){Li(e);return}for(let[e,r]of Object.entries(i))if(!(p(e)||o.has(e)||n(e)))try{t[e]=r}catch(e){}Li(e)},x=e=>{let t=e[X],n=e.properties,r=e[je];if(t&&typeof t==`object`&&n&&typeof n==`object`){let i=n,a=Object.keys(t);for(let e of a)if(!Q(i,e))try{delete t[e]}catch(e){}for(let[n,a]of Object.entries(i)){let i=r&&Q(r,n)?r[n]:a;try{t[n]=i}catch(e){}g(e,n,i)}if(r){for(let[n,a]of Object.entries(r))if(!Q(i,n)){try{t[n]=a}catch(e){}g(e,n,a)}}v(e,t),_(e,t),Li(e)}r&&delete e[je],b(e)},S=(e,t)=>{if(!t||typeof t!=`object`)return;let n=e[X];if(!n||typeof n!=`object`)return;let r=!1;for(let i of a)if(Q(t,i)){try{n[i]=t[i],r=!0}catch(e){}g(e,i,t[i])}r&&(v(e,n),_(e,n),Li(e),b(e))},C=(e,t,n)=>{var r,i;let a=e[X];if(!a||typeof a!=`object`)return;try{a[t]=n}catch(e){}g(e,t,n);let o=(i=(r=e)[je])==null?r[je]=Object.create(null):i;o[t]=n,v(e,a),_(e,a),Li(e),b(e)},w={};if(a.length)for(let e of a)w[e]=function(t){C(this,e,t)};let T={...i==null?{}:i};for(let[e,t]of Object.entries(w)){let n=T[e];typeof n==`function`?T[e]=function(...e){n.apply(this,e),t.apply(this,e)}:T[e]=t}let E=T[`**`];return T[`**`]=function(...e){typeof E==`function`&&E.apply(this,e),x(this)},{attachWevuPropKeys:y,directPropsDerivedKeys:u,syncWevuPropsFromInstance:x,syncWevuPropsFromValues:S,finalObservers:T}}const zi=new Map;function Bi(){let e=A();return e[e.length-1]}function Vi(e){return Array.from(new Set(Array.isArray(e)?e:[e])).filter(e=>typeof e==`string`&&e.length>0)}function Hi(e){return it(e)}function Ui(e){return e&&typeof e.__wevuSetPageLayout==`function`?e:Bi()}function Wi(e){var t,n;if(!e||typeof e!=`object`)return;let r=(t=e[Pe])==null||(t=t.state)==null?void 0:t[q];if(r&&typeof r==`object`)return r;let i=(n=e.$state)==null?void 0:n[q];return i&&typeof i==`object`?i:e[q]&&typeof e[q]==`object`?e[q]:e}function Gi(e){return typeof e==`function`?e():m(e)?e.value:e}function Ki(e,t){return e.find(e=>e.key===t)}function qi(e,t){let n=e==null?void 0:e.selectComponent;if(typeof n!=`function`)return null;try{var r;return(r=n.call(e,t))==null?null:r}catch(e){return null}}function Ji(e,t){var n,r,i,a,o,s,c,l;if(!e.refName)return null;let u=hr(t),d=(n=(r=(i=(a=t[Pe])==null||(a=a.state)==null?void 0:a.$refs)==null?(o=t.__wevu)==null||(o=o.state)==null?void 0:o.$refs:i)==null?(s=t.$state)==null?void 0:s.$refs:r)==null?t.$refs:n,f=(c=u==null||(l=u.get(e.refName))==null?void 0:l.value)==null?d==null?void 0:d[e.refName]:c;if(Array.isArray(f)){var p;return(p=f[0])==null?null:p}return f==null?null:f}function Yi(e,t){let n=Wi(t);return Object.assign(n&&typeof n==`object`?Object.create(n):{},{selectComponent(r){let i=Ki(e,r);if(!i)return null;if(i.kind===`component`||!i.kind){var a,o;return Ji(i,t)||((a=(o=qi(n,i.selector))==null?qi(Bi(),i.selector):o)==null?null:a)}return null}})}function Xi(e,t){let n=t==null?P():t,r=Ui(n),i=Hi(r);if(!n||!r||i.length===0)return!1;for(let t of i){var a;let r=(a=zi.get(t))==null?new Map:a;for(let t of Vi(e))r.set(t,n);zi.set(t,r)}return n[ye]=i,!0}function Zi(e,t){var n;let r=t==null?P():t,i=Ui(r),a=(n=r==null?void 0:r[ye])==null?Hi(i):n;if(!r||!Array.isArray(a)||a.length===0)return!1;let o=!1;for(let t of a){let n=zi.get(t);if(n){for(let t of Vi(e))n.get(t)===r&&(n.delete(t),o=!0);n.size===0&&zi.delete(t)}}return delete r[ye],o}function Qi(e,t){var n,r;let i=Hi((n=Bi())==null?Ui(t):n).map(t=>{var n;return(n=zi.get(t))==null?void 0:n.get(e)}).find(Boolean);return(r=i==null?t:i)==null?P():r}function $i(e,t={}){var n,r;let i=Qi(e,(n=t.context)==null?t.fallbackContext:n),a=i==null||(r=i.selectComponent)==null?void 0:r.call(i,e);return a==null?null:a}function ea(e,t={}){var n,r;let i=(n=t.retries)==null?20:n,a=(r=t.interval)==null?16:r,o=$i(e,t);return o||i<=0?Promise.resolve(o):new Promise(n=>{setTimeout(()=>{n(ea(e,{...t,retries:i-1}))},a)})}function ta(e,t={}){if(!T())throw Error(`useLayoutBridge() 必须在 setup() 的同步阶段调用`);let n=P(),r=Vi(e),i=t.resolveComponent,a=Wi(n),o=Object.assign(a&&typeof a==`object`?Object.create(a):{},{selectComponent(e){var t,a,o;if(!r.includes(e))return null;let s=i==null?void 0:i(e);if(s!==void 0)return s;let c=Wi(n),l=c==null||(t=c.selectComponent)==null?void 0:t.call(c,e);if(l)return l;let u=Bi();return(a=u==null||(o=u.selectComponent)==null?void 0:o.call(u,e))==null?null:a}});Xi(r,o),U(()=>{Xi(r,o)}),W(()=>{Zi(r,o)})}function na(e,t){if(!e.length)return null;let n=t==null?P():t;if(!n)return null;let r=Yi(e,n);return Xi(e.map(e=>e.key),r),r}function ra(e,t){if(!e.length)return!1;let n=t==null?P():t;return n?Zi(e.map(e=>e.key),n):!1}function ia(e){ta(Object.keys(e),{resolveComponent(t){return Gi(e[t])}})}function aa(e){let{runtimeApp:t,watch:n,setup:r,restOptions:i,pageLifecycleHooks:a,finalObservers:o,userLifetimes:s,userPageLifetimes:c,finalMethods:l,finalOptions:u,applyExtraInstanceFields:d,templateRefs:f,layoutHosts:p,attachWevuPropKeys:m,setupLifecycle:h,syncWevuPropsFromInstance:g,directPropsDerivedKeys:_,isPage:v,legacyCreated:y,getRuntimeOwnerLabel:b}=e,x={},S=e=>{if(!Array.isArray(p)||!p.length||e[be])return;let t=na(p,e);t&&(e[be]=t)},C=e=>{v&&(e[Oe]=(t,n)=>{var r;let i=(r=e.__wevu)==null?void 0:r.state;if(!i||typeof i!=`object`)return;i[Ee]=Qn(t);let a=t===!1||n==null?{}:n;i[De]=a,Yn(e,t,a)})};if(v)for(let e of[`onReachBottom`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]){let t=a[e];typeof t==`function`&&typeof l[e]!=`function`&&(x[e]=function(...e){return t.apply(this,e)})}Component({...i,...a,observers:o,lifetimes:{...s,created:function(...e){if(d(this),Array.isArray(f)&&f.length&&Object.defineProperty(this,et,{value:f,configurable:!0,enumerable:!1,writable:!1}),m(this),h===`created`){try{yi(this,t,n,r,{deferSetData:!0,snapshotOmitKeys:_})}catch(e){let t=b(this);throw Error(`[wevu] mount runtime failed in created (${t}): ${e instanceof Error?e.message:String(e)}`)}g(this),C(this)}typeof y==`function`&&y.apply(this,e),typeof s.created==`function`&&s.created.apply(this,e)},moved:function(...e){j(this,`onMoved`,e),typeof s.moved==`function`&&s.moved.apply(this,e)},attached:function(...e){if(d(this),Array.isArray(f)&&f.length&&!this[et]&&Object.defineProperty(this,et,{value:f,configurable:!0,enumerable:!1,writable:!1}),m(this),h!==`created`||!this.__wevu)try{yi(this,t,n,r,{snapshotOmitKeys:_})}catch(e){let t=b(this);throw Error(`[wevu] mount runtime failed in attached (${t}): ${e instanceof Error?e.message:String(e)}`)}g(this),C(this),S(this),h===`created`&&xi(this),j(this,`onAttached`,e),typeof s.attached==`function`&&s.attached.apply(this,e)},ready:function(...e){if(v&&typeof a.onReady==`function`){a.onReady.call(this,...e),typeof s.ready==`function`&&s.ready.apply(this,e);return}if(!this[Fe]){this[Fe]=!0,g(this),Tr(this,()=>{j(this,`onReady`,e),typeof s.ready==`function`&&s.ready.apply(this,e)});return}typeof s.ready==`function`&&s.ready.apply(this,e)},detached:function(...e){if(j(this,`onDetached`,e),v&&typeof a.onUnload==`function`){a.onUnload.call(this,...e),typeof s.detached==`function`&&s.detached.apply(this,e);return}Er(this),Array.isArray(p)&&p.length&&this[be]&&(ra(p,this[be]),delete this[be]),Ci(this),typeof s.detached==`function`&&s.detached.apply(this,e)},error:function(...e){j(this,`onError`,e),typeof s.error==`function`&&s.error.apply(this,e)}},pageLifetimes:{...c,show:function(...e){if(v&&typeof a.onShow==`function`){a.onShow.call(this,...e),typeof c.show==`function`&&c.show.apply(this,e);return}Si(this,!0),j(this,`onShow`,e),typeof c.show==`function`&&c.show.apply(this,e)},hide:function(...e){if(v&&typeof a.onHide==`function`){a.onHide.call(this,...e),typeof c.hide==`function`&&c.hide.apply(this,e);return}Si(this,!1),j(this,`onHide`,e),typeof c.hide==`function`&&c.hide.apply(this,e)},resize:function(...e){if(v&&typeof a.onResize==`function`){a.onResize.call(this,...e),typeof c.resize==`function`&&c.resize.apply(this,e);return}j(this,`onResize`,e),typeof c.resize==`function`&&c.resize.apply(this,e)},routeDone:function(...e){if(v&&typeof a.onRouteDone==`function`){a.onRouteDone.call(this,...e),typeof c.routeDone==`function`&&c.routeDone.apply(this,e);return}j(this,`onRouteDone`,e),typeof c.routeDone==`function`&&c.routeDone.apply(this,e)}},methods:{...x,...l},options:u})}function oa(e,t,n,r,i){var a;let{userMethods:o,userLifetimes:s,userPageLifetimes:c,userOptions:l,restOptions:u,topLevelMethods:d,templateRefs:f,layoutHosts:p,propsAliases:m,propsDerivedKeys:h,userObservers:g,setupLifecycle:_,legacyCreated:v,isPage:y,features:b,userOnLoad:x,userOnUnload:S,userOnShow:C,userOnHide:w,userOnReady:T,userOnSaveExitState:E,userOnPullDownRefresh:D,userOnReachBottom:O,userOnPageScroll:k,userOnRouteDone:A,userOnTabItemTap:j,userOnResize:M,userOnShareAppMessage:N,userOnShareTimeline:P,userOnAddToFavorites:F,applyExtraInstanceFields:I}=Ii(i),{enableOnPullDownRefresh:L,enableOnReachBottom:R,enableOnPageScroll:ee,enableOnRouteDone:z,enableOnRouteDoneFallback:B,enableOnTabItemTap:V,enableOnResize:H,enableOnShareAppMessage:te,enableOnShareTimeline:U,enableOnAddToFavorites:W,enableOnSaveExitState:ne,effectiveOnSaveExitState:re,effectiveOnPullDownRefresh:ie,effectiveOnReachBottom:ae,effectiveOnPageScroll:oe,effectiveOnRouteDone:G,effectiveOnTabItemTap:se,effectiveOnResize:ce,effectiveOnShareAppMessage:K,effectiveOnShareTimeline:le,effectiveOnAddToFavorites:ue}=Ai({features:b,userOnSaveExitState:E,userOnPullDownRefresh:D,userOnReachBottom:O,userOnPageScroll:k,userOnRouteDone:A,userOnTabItemTap:j,userOnResize:M,userOnShareAppMessage:N,userOnShareTimeline:P,userOnAddToFavorites:F}),de=(e,t)=>{let n=e[he];if(!n)return!1;let r=n[t];return r?Array.isArray(r)?r.length>0:typeof r==`function`:!1};{let e=u.export;u.export=function(){var t;let n=(t=this[pe])==null?{}:t,r=typeof e==`function`?e.call(this):{};return r&&typeof r==`object`&&!Array.isArray(r)?{...n,...r}:r==null?n:r}}let fe={multipleSlots:(a=l.multipleSlots)==null?!0:a,...l},{attachWevuPropKeys:me,directPropsDerivedKeys:ge,syncWevuPropsFromInstance:_e,syncWevuPropsFromValues:ve,finalObservers:ye}=Ri({restOptions:u,propsAliases:m,propsDerivedKeys:h,userObservers:g}),{finalMethods:be}=Ni({userMethods:{...d,...o},runtimeMethods:t});aa({runtimeApp:e,watch:n,setup:r,restOptions:u,pageLifecycleHooks:Mi({runtimeApp:e,watch:n,setup:r,userOnLoad:x,userOnUnload:S,userOnShow:C,userOnHide:w,userOnReady:T,isPage:y,enableOnSaveExitState:ne,enableOnPullDownRefresh:L,enableOnReachBottom:R,enableOnPageScroll:ee,enableOnRouteDone:z,enableOnRouteDoneFallback:B,enableOnTabItemTap:V,enableOnResize:H,enableOnShareAppMessage:te,enableOnShareTimeline:U,enableOnAddToFavorites:W,syncWevuPropsFromValues:ve,effectiveOnSaveExitState:re,effectiveOnPullDownRefresh:ie,effectiveOnReachBottom:ae,effectiveOnPageScroll:oe,effectiveOnRouteDone:G,effectiveOnTabItemTap:se,effectiveOnResize:ce,effectiveOnShareAppMessage:K,effectiveOnShareTimeline:le,effectiveOnAddToFavorites:ue,hasHook:de}),finalObservers:ye,userLifetimes:s,userPageLifetimes:c,finalMethods:be,finalOptions:fe,applyExtraInstanceFields:I,templateRefs:f,layoutHosts:p,attachWevuPropKeys:me,setupLifecycle:_,syncWevuPropsFromInstance:_e,syncWevuPropsFromValues:ve,directPropsDerivedKeys:ge,isPage:y,legacyCreated:v,getRuntimeOwnerLabel:Fi})}function sa(e){let{[mn]:t,data:n,computed:r,methods:i,setData:a,watch:o,setup:s,...c}=e.__wevuDefaultsScope===`component`?e:Sn(e),l=i==null?{}:i,u=r==null?{}:r,d=new Set,f=new Set,p=!1,m={globalProperties:{}},h={mount:pn({data:n,resolvedComputed:u,resolvedMethods:l,appConfig:m,setDataOptions:a}),use(e,...t){if(!e||d.has(e))return h;if(d.add(e),typeof e==`function`)e(h,...t);else if(typeof e.install==`function`)e.install(h,...t);else throw TypeError(`插件必须是函数,或包含 install 方法的对象`);return h},provide(e,t){return ce(h,e,t),h},onUnmount(e){if(typeof e!=`function`)throw TypeError(`onUnmount 只接受函数`);return p?(e(),h):(f.add(e),h)},unmount(){if(!p){p=!0;for(let e of f)e();f.clear()}},config:m,version:_t},g=typeof App==`function`;try{ne(h),Object.defineProperty(h,"__wevuSetDataOptions",{value:a,configurable:!0,enumerable:!1,writable:!1}),Object.defineProperty(h,"__wevuHasTemplateRuntimeBindings",{value:Object.keys(u).some(e=>e.startsWith(`__wv_bind_`)),configurable:!0,enumerable:!1,writable:!1})}catch(e){h.__wevuSetDataOptions=a,h.__wevuHasTemplateRuntimeBindings=Object.keys(u).some(e=>e.startsWith(`__wv_bind_`))}if(g){let e=D(),t=`__wevuAppRegistered`;e&&e[t]||(e&&(e[t]=!0),ki(h,i==null?{}:i,o,s,c))}return h}var ca=class extends Error{};function la(e){if(typeof e==`function`)return e;let t=e==null?void 0:e.get;return typeof t==`function`?t:void 0}function ua(e){return e.startsWith(`__wv_bind_`)||e.startsWith(`__wv_cls_`)||e.startsWith(`__wv_style_`)}function da(e,t){if(!e.startsWith(`__wv_bind_`))return!1;try{return!/\bthis\b/.test(Function.prototype.toString.call(t))}catch(e){return!1}}function fa(e){if(e===Z)return``;if(e.startsWith(`__wv_bind_`))return null;if(e.startsWith(`__wv_cls_`)||e.startsWith(`__wv_style_`))return``}function pa(e,t){let n=Array.isArray(t==null?void 0:t.pick)?t.pick:[];if(!n.length)return;let r=new Set(Array.isArray(t==null?void 0:t.omit)?t.omit:[]),i={};for(let t of n){if(r.has(t)||Q(e,t))continue;let n=fa(t);n!==void 0&&(i[t]=n)}return Object.keys(i).length?i:void 0}function ma(e){let{data:t,computed:n,setData:r}=e,i=n?Object.keys(n):[];if(!i.length)return;let{includeComputed:a,shouldIncludeKey:o,toPlainMaxDepth:s,toPlainMaxKeys:c,includeFunctions:l,functionPaths:u}=un(r);if(!a)return;let d={},f=new Set,p,m=e=>{if(Q(t,e)||!o(e))return{ok:!1};if(Q(d,e))return{ok:!0,value:d[e]};if(f.has(e))return{ok:!1};let r=la(n[e]);if(!r)return{ok:!1};f.add(e);try{let t=r.call(p);if(t===void 0)return{ok:!1};let n=Ut(t,new WeakMap,{maxDepth:s,maxKeys:c,includeFunctions:l,functionPaths:u,_path:e});return n===void 0?{ok:!1}:(d[e]=n,{ok:!0,value:n})}catch(e){return{ok:!1}}finally{f.delete(e)}};p=new Proxy(t,{get(e,r,i){if(typeof r==`string`){if(r===`data`||r===`$state`)return t;if(r===`props`||r===`$props`||r===`$attrs`)throw new ca;if(Q(t,r))return Reflect.get(e,r,i);if(n&&Q(n,r)){let e=m(r);if(e.ok)return e.value;throw new ca}throw new ca}return Reflect.get(e,r,i)},has(e,t){return Reflect.has(e,t)||typeof t==`string`&&!!(n&&Q(n,t))}});for(let e of i){let t=la(n[e]);ua(e)&&(!t||!da(e,t))||m(e)}return Object.keys(d).length?d:void 0}function ha(e,t,n){if(!e||typeof e!=`object`)return e;let r=ma({data:e,computed:t,setData:n}),i=pa(e,n);return r||i?{...e,...i,...r}:e}const ga=`__wevu_allowNullPropInput`,_a=`allowNullPropInput`,va=new Map([[String,String],[Number,Number],[Boolean,Boolean],[Object,Object],[Array,Array],[Function,Function],[`String`,String],[`Number`,Number],[`Boolean`,Boolean],[`Object`,Object],[`Array`,Array],[`Function`,Function],[null,null],[`null`,null],[`Null`,null]]);function ya(e){return va.get(e)}function ba(e){if(e===void 0)return[];let t=Array.isArray(e)?e:[e],n=[];t.forEach(e=>{let t=ya(e);t!==void 0&&(n.includes(t)||n.push(t))});let r=n.filter(e=>e!==null);return r.length>0?r:(n.includes(null),[null])}function xa(e,t){let n=ba(t);if(n.length!==0&&(e.type=n[0],n.length>1)){let t=[];for(let e of n.slice(1))t.includes(e)||t.push(e);t.length>0&&(e.optionalTypes=t)}}function Sa(e,t){if(t===void 0||e.type===t)return;let n=Array.isArray(e.optionalTypes)?[...e.optionalTypes]:[];n.includes(t)||(n.push(t),e.optionalTypes=n)}function Ca(e){if(!Array.isArray(e))return[];let t=[];return e.forEach(e=>{let n=ya(e);n==null||t.includes(n)||t.push(n)}),t}function wa(e,t){if(e===void 0)return;if(e===null)return{type:null};if(Array.isArray(e)||typeof e==`function`){let n={};return xa(n,e),t&&n.type!==null&&Sa(n,null),Q(n,`type`)||(n.type=null),n}if(typeof e!=`object`)return e;let n={...e};if(`type`in n){var r;let e=ba(n.type);n.type=(r=e[0])==null?null:r;let t=Ca(n.optionalTypes);for(let n of e.slice(1))n!==null&&!t.includes(n)&&t.push(n);t.length>0?n.optionalTypes=t:delete n.optionalTypes}return Q(n,`type`)||(n.type=null),t&&n.type!==null&&Sa(n,null),n}function Ta(e,t){let n={};return Object.entries(e).forEach(([e,r])=>{let i=wa(r,t);i!==void 0&&(n[e]=i)}),n}function Ea(e,t){let n={};return e&&Object.entries(e).forEach(([e,r])=>{if(r!==void 0){if(r===null){n[e]={type:null};return}if(Array.isArray(r)||typeof r==`function`){let i={};xa(i,r),t&&i.type!==null&&Sa(i,null),Q(i,`type`)||(i.type=null),n[e]=i;return}if(typeof r==`object`){if(e.endsWith(`Modifiers`)&&Object.keys(r).length===0){n[e]={type:Object,value:{}};return}let i={};if(`type`in r&&r.type!==void 0&&xa(i,r.type),Array.isArray(r.optionalTypes)){let e=r.optionalTypes.map(e=>ya(e)).filter(e=>e!=null);if(e.length>0){let t=Array.isArray(i.optionalTypes)?i.optionalTypes:[];for(let n of e)n!==i.type&&(t.includes(n)||t.push(n));t.length>0&&(i.optionalTypes=t)}}`observer`in r&&(typeof r.observer==`function`||typeof r.observer==`string`)&&(i.observer=r.observer);let a=`default`in r?r.default:r.value;a!==void 0&&(i.value=typeof a==`function`?a():a),t&&i.type!==null&&Sa(i,null),Q(i,`type`)||(i.type=null),n[e]=i}}}),n}function Da(e,t,n){var r;let i=!!((r=e[ga])==null?e[_a]:r),{[ga]:a,[_a]:o,...s}=e,c=e.properties,l=c&&typeof c==`object`&&Object.keys(c).length>0?c:void 0,u=n==null?l:n,d=!!(t||u),f=e=>{let t={...e==null?{}:e};return d?(Q(t,qe)||(t[qe]={type:String,value:``}),Q(t,Qe)||(t[Qe]={type:null,value:null}),Q(t,Ke)||(t[Ke]={type:null,value:null}),t):t};if(u){let{properties:e,...n}=s,r=u?i?Ta(u,i):u:void 0,a=Ea(t,i);return{...n,properties:f({...a,...r})}}return{...s,properties:f(Ea(t,i))}}const Oa=[Z,qe,Ye,Je,Xe,Ze,Qe],ka=/&/g,Aa=/"/g,ja=/"/g,Ma=/'/g,Na=/'/g,Pa=/</g,Fa=/>/g;function Ia(e){return e.replace(ka,`&`).replace(Aa,`"`).replace(ja,`"`).replace(Ma,`'`).replace(Na,`'`).replace(Pa,`<`).replace(Fa,`>`)}function La(e){var t,n,r,i;let a=Bn((t=(n=e==null||(r=e.currentTarget)==null?void 0:r.dataset)==null?e==null||(i=e.target)==null?void 0:i.dataset:n)==null?{}:t,`wvArgs`,e),o=[];if(Array.isArray(a))o=a;else if(typeof a==`string`)try{o=JSON.parse(a)}catch(e){try{o=JSON.parse(Ia(a))}catch(e){o=[]}}return Array.isArray(o)||(o=[]),o.map(t=>t===`$event`?e:t)}function Ra(e){if(!e||typeof e!=`object`)return{};if(Array.isArray(e)){let t={};for(let n=0;n<e.length;n+=2){let r=e[n];typeof r==`string`&&r&&(t[r]=e[n+1])}return t}return e}function za(e){var t,n,r,i;return(t=(n=e==null||(r=e.__wevu)==null?void 0:r.proxy)==null?e==null||(i=e[Pe])==null?void 0:i.proxy:n)==null?e:t}function Ba(e,t){if(!t||Object.keys(t).length===0)return;let n=za(e),r={};for(let[e,i]of Object.entries(t))try{let t;typeof i==`function`?t=i.call(n):typeof(i==null?void 0:i.get)==`function`&&(t=i.get.call(n)),t!==void 0&&(r[e]=t)}catch(e){}return r}function Va(e){var t,n;e==null||(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)}function Ha(e,t){Va(e);let n=Ba(e,t);n&&Object.keys(n).length>0&&typeof(e==null?void 0:e.setData)==`function`&&e.setData(n)}function Ua(e,t){var n,r,i;let a=Q(t==null?{}:t,Qe)?t[Qe]:e==null||(n=e.properties)==null?void 0:n[Qe],o=Q(t==null?{}:t,Ze)?t[Ze]:e==null||(r=e.properties)==null?void 0:r[Ze],s=Ra(a),c=Ra(o),l={...s,...c};e[Xe]=l;let u=e==null||(i=e.__wevu)==null?void 0:i.state;return u&&typeof u==`object`&&(u[Xe]=l),l}function Wa(e,t,n){let r=Ua(e,n);typeof(e==null?void 0:e.setData)==`function`&&e.setData({[Xe]:r}),Ha(e,t)}function Ga(e,t){var n;e[Ye]=t;let r=e==null?void 0:e.data;if(r&&typeof r==`object`)try{Object.defineProperty(r,Ye,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(e){r[Ye]=t}let i=e==null||(n=e.__wevu)==null?void 0:n.state;i&&typeof i==`object`&&(i[Ye]=t)}function Ka(e,t,n,r){var i;Ga(e,n),Ua(e),e[Je]=t||{};let a=e==null||(i=e.__wevu)==null?void 0:i.state;a&&typeof a==`object`&&(a[Je]=t||{}),typeof(e==null?void 0:e.setData)==`function`&&e.setData({[Je]:t||{}}),Ha(e,r)}function qa(e,t,n){if(!t){typeof(e==null?void 0:e.__wvOwnerUnsub)==`function`&&e.__wvOwnerUnsub(),e.__wvOwnerUnsub=void 0,e.__wvOwnerBoundId=``,Ga(e,void 0);return}let r=(t,r)=>{Ka(e,t,r,n)};e.__wvOwnerBoundId!==t&&(typeof e.__wvOwnerUnsub==`function`&&e.__wvOwnerUnsub(),e.__wvOwnerBoundId=t,e.__wvOwnerUnsub=rr(t,r));let i=ar(t);i&&r(i,ir(t))}function Ja(e){var t,n,r,i;return(t=(n=e==null||(r=e.properties)==null?void 0:r[qe])==null?e==null||(i=e.properties)==null?void 0:i[Z]:n)==null?``:t}function Ya(e,t){Wa(e,t);let n=Ja(e);n&&qa(e,n,t)}function Xa(){let e={[Je]:{},[Xe]:{}};return Object.defineProperty(e,Ye,{value:void 0,configurable:!0,enumerable:!1,writable:!0}),e}function Za(e){let t=e==null?void 0:e.computed,n={options:{virtualHost:!0},setData:{omit:Oa},[Y]:Oa,properties:{[qe]:{type:String,value:``,observer(e){qa(this,e||``,t)}},[Z]:{type:String,value:``,observer(e){qa(this,e||``,t)}},[Ze]:{type:null,value:null,observer(e){Wa(this,t,{[Ze]:e})}},[Qe]:{type:null,value:null,observer(e){Wa(this,t,{[Qe]:e})}}},data:Xa,lifetimes:{attached(){Ya(this,t)},ready(){Ya(this,t)},detached(){typeof this.__wvOwnerUnsub==`function`&&this.__wvOwnerUnsub(),this.__wvOwnerUnsub=void 0,this.__wvOwnerBoundId=``,Ga(this,void 0)}},methods:{[Te](e){var t,n,r,i,a;let o=this[Ye],s=Gn(o,void 0,e,(t=this.__wevu)==null||(t=t.methods)==null?void 0:t[_e]);if(s!==void 0)return s;if(!o)return;let c=Bn((n=(r=e==null||(i=e.currentTarget)==null?void 0:i.dataset)==null?e==null||(a=e.target)==null?void 0:a.dataset:r)==null?{}:n,`wvHandler`,e);if(typeof c!=`string`||!c)return;let l=o==null?void 0:o[c];if(typeof l!=`function`)return;let u=La(e);return l.apply(o,u)}}};return e!=null&&e.computed&&Object.keys(e.computed).length>0&&(n.computed=e.computed),e!=null&&e.inlineMap&&Object.keys(e.inlineMap).length>0&&(n.methods={...n.methods,[_e]:e.inlineMap}),n}function Qa(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function $a(e){return typeof e!=`object`||!e||m(e)||f(e)||Array.isArray(e)?!0:Qa(e)}function eo(e,t,n,r){var i,a,o;let s=!!(r!=null&&r.includeFunctionsInState),c=r==null?void 0:r.functionPropPaths,l=(i=e==null?void 0:e.methods)==null?Object.create(null):i,u=(a=e==null?void 0:e.state)==null?Object.create(null):a,d=(o=e==null?void 0:e.setupState)==null?Object.create(null):o,p=f(u)?S(u):u,m=!1;if(e&&!e.methods)try{e.methods=l}catch(e){}if(e&&!e.state)try{e.state=u}catch(e){}if(e&&!e.setupState)try{e.setupState=d}catch(e){}if(Object.keys(n).forEach(r=>{let i=n[r];if(typeof i==`function`){let t=(...t)=>{var n;return i.apply((n=e==null?void 0:e.proxy)==null?e:n,t)};l[r]=t,u[r]=t,(s||c!=null&&c.has(r))&&(d[r]=t),m=!0}else{if(At(i)){var a;e==null||(a=e.__wevu_trackSetupReactiveKey)==null||a.call(e,r)}if(u[r]=i,i===t||!$a(i))try{Object.defineProperty(p,r,{value:i,configurable:!0,enumerable:!1,writable:!0})}catch(e){}d[r]=i}}),e){var h,g;if(e.methods=(h=e.methods)==null?l:h,e.state=(g=e.state)==null?u:g,m){var _;(_=e.__wevu_touchSetupMethodsVersion)==null||_.call(e)}}}let to;function no(){let e=w();if(!e)return;let t=e;to&&t[Ve]!==to&&(t[Ve]=to)}function ro(e,t){return!!e.__wevu_isPage&&Array.isArray(t==null?void 0:t.pick)&&t.pick.includes(Z)}function io(e){return Array.isArray(e==null?void 0:e.pick)&&e.pick.includes(Z)}function ao(e){let t=e.properties;return!!(t&&typeof t==`object`&&(qe in t||Qe in t))}function oo(e,t){return(t==null?void 0:t.strategy)!==`patch`||!ao(e)?t:{...t,strategy:`diff`}}function so(e){no();let{__typeProps:t,data:n,computed:r,methods:i,setData:a,watch:o,setup:s,props:c,allowFunctionProps:l,...u}=Cn(e),d=u[me],f=Array.isArray(d)?[...new Set(d.filter(e=>typeof e==`string`&&e.length>0))]:[];delete u[me];let p=oo(u,l===!0?{...a==null?{}:a,includeFunctions:!0,functionPaths:f}:l===!1?a:f.length?{...a==null?{}:a,functionPaths:f}:a),m=new Set(f.filter(e=>!e.includes(`.`))),h=sa({data:n,computed:r,methods:i,setData:p,[mn]:`component`}),g=typeof s==`function`?((e,t)=>{let n=Jr(s,e,t);return n&&t&&eo(t.runtime,t.instance,n,{includeFunctionsInState:l===!0,functionPropPaths:l===!1?void 0:m}),n}):void 0,_=typeof n==`function`?n():n,v=ha(io(p)?{..._&&typeof _==`object`?_:{},[Z]:ro(u,p)?(_==null?void 0:_[Z])||er():(_==null?void 0:_[Z])||``}:_,r,p),y=Da(v===void 0?u:{...u,data:v},c),b={data:n,computed:r,methods:i,setData:p,watch:o,setup:g,mpOptions:y};return oa(h,i==null?{}:i,o,g,y),{__wevu_runtime:h,__wevu_options:b}}function co(e){var t;no();let{properties:n,props:r,...i}=e;so(Da({...i,allowNullPropInput:(t=i.allowNullPropInput)==null?!0:t,__wevu_allowNullPropInput:!0},r,n))}function lo(e){co(Za(e))}to=lo,no();const uo=[`dispose`,`abort`,`cancel`,`stop`,`disconnect`,`destroy`,`close`];function fo(e){if(e){if(typeof e==`function`)return e;for(let t of uo){let n=e[t];if(typeof n==`function`)return()=>n.call(e)}}}function po(){if(!P())throw Error(`useDisposables() 必须在 setup() 的同步阶段调用`);let e=new Set,t=!1,n=n=>{let r=fo(n);if(!r)return()=>{};if(t){try{r()}catch(e){}return()=>{}}return e.add(r),()=>{e.delete(r)}},r=()=>{if(t)return;t=!0;let n=[...e];e.clear();for(let e of n)try{e()}catch(e){}};return se(r),W(r),{add:n,dispose:r,setTimeout:(e,t,...r)=>{let i=setTimeout(e,t,...r);return n(()=>{clearTimeout(i)}),i},setInterval:(e,t,...r)=>{let i=setInterval(e,t,...r);return n(()=>{clearInterval(i)}),i}}}function mo(e,t){let n=e,r=n.createIntersectionObserver;if(typeof r==`function`)return r.call(n,t);if(!L(`globalCreateIntersectionObserver`))return;let i=D(),a=i==null?void 0:i.createIntersectionObserver;if(typeof a==`function`)return O().intersectionObserverScopeByParameter?a.call(i,e,t):a.call(i,t)}function ho(e,t){var n;if(t===!1||typeof e.relativeToViewport!=`function`)return e;let r=t&&typeof t==`object`?t:void 0;return(n=e.relativeToViewport(r))==null?e:n}function go(e){var t;let n=(t=e.context)==null?P():t;if(!n||!T())throw Error(`useElementIntersectionObserver() 必须在 setup() 的同步阶段调用`);let r=null,a=()=>{if(r){try{r.disconnect()}catch(e){}r=null}},o=()=>{var t,o;a();let s=i(e.selector);if(!(e.enabled==null||i(e.enabled))||!s)return null;let c=mo(n,i((t=e.observerOptions)==null?{}:t));return!c||typeof c.observe!=`function`?null:(r=ho(c,(o=e.relativeToViewport)==null?!0:o),r.observe(s,t=>{var n;return(n=e.onObserve)==null?void 0:n.call(e,t)}),r)};return z(()=>{var t;return[i(e.selector),e.enabled==null?!0:i(e.enabled),i((t=e.observerOptions)==null?{}:t),e.relativeToViewport]},()=>{o()},{deep:!0}),ot(o),lt(a),se(a),W(a),{disconnect:a,observe:o,get observer(){return r}}}function _o(e,t){let n=e,r=n.createIntersectionObserver;if(typeof r==`function`)return r.call(n,t)}function vo(e,t){if(!L(`globalCreateIntersectionObserver`))return;let n=D(),r=n==null?void 0:n.createIntersectionObserver;if(typeof r==`function`)return O().intersectionObserverScopeByParameter?r.call(n,e,t):r.call(n,t)}function yo(e={}){var t;let n=P();if(!n)throw Error(`useIntersectionObserver() 必须在 setup() 的同步阶段调用`);let r=(t=_o(n,e))==null?vo(n,e):t;if(!r||typeof r.disconnect!=`function`)throw Error(`当前运行环境不支持 IntersectionObserver,请检查基础库版本或平台能力`);let i=!1,a=()=>{if(!i){i=!0;try{r.disconnect()}catch(e){}}};return se(a),W(a),r}function bo(e){var t,n;return e?(t=(n=e.split(`?`)[0])==null?void 0:n.replace(/^\/+/,``))==null?``:t:``}function xo(){let e=A(),t=e[e.length-1],n=e.length||1;return{canGoBack:n>1,currentRoute:bo(t==null?void 0:t.route),stackLength:n}}function So(e={}){var t;if(!T())throw Error(`usePageStack() 必须在 setup() 的同步阶段调用`);let n=xo(),r=l(n.currentRoute),i=l(n.stackLength),a=C(()=>i.value>1),o=()=>{let e=xo();r.value=e.currentRoute,i.value=e.stackLength};return((t=e.autoRefresh)==null||t)&&(U(o),oe(o)),{canGoBack:a,currentRoute:r,refresh:o,stackLength:i}}function Co(e={}){var t,n;let r=(t=e.defaultStatusBarHeight)==null?20:t,i=(n=e.defaultNavigationBarHeight)==null?44:n,a=D(),o=typeof(a==null?void 0:a.getSystemInfoSync)==`function`?a.getSystemInfoSync():{},s=Number((o==null?void 0:o.statusBarHeight)||r),c;try{c=typeof(a==null?void 0:a.getMenuButtonBoundingClientRect)==`function`?a.getMenuButtonBoundingClientRect():void 0}catch(e){}let l=Number((c==null?void 0:c.top)||0),u=Number((c==null?void 0:c.height)||0),d=l>s&&u>0?(l-s)*2+u:i;return{navigationBarHeight:d,navigationHeight:s+d,statusBarHeight:s}}function wo(e={}){var t;if(!T())throw Error(`useNavigationBarMetrics() 必须在 setup() 的同步阶段调用`);let n=Co(e),r=l(n.statusBarHeight),i=l(n.navigationBarHeight),a=C(()=>r.value+i.value),o=()=>{let t=Co(e);r.value=t.statusBarHeight,i.value=t.navigationBarHeight};return((t=e.autoRefresh)==null||t)&&U(o),{navigationBarHeight:i,navigationHeight:a,refresh:o,statusBarHeight:r}}function To(e){return typeof e!=`number`||!Number.isFinite(e)?80:Math.max(0,e)}function Eo(e){if(!(typeof e!=`number`||!Number.isFinite(e)))return Math.max(0,e)}function Do(e,t={}){var n,r;if(!P())throw Error(`usePageScrollThrottle() 必须在 setup() 的同步阶段调用`);if(typeof e!=`function`)throw TypeError(`usePageScrollThrottle() 需要传入回调函数`);let i=To(t.interval),a=(n=t.leading)==null?!0:n,o=(r=t.trailing)==null?!0:r,s=Eo(t.maxWait),c,l,u=!1,d=0,f,p=()=>{c&&(clearTimeout(c),c=void 0)},m=()=>{l&&(clearTimeout(l),l=void 0)},h=t=>{p(),m(),f=void 0,d=Date.now(),e(t)},g=()=>{let e=f;f=void 0,c=void 0,!(!e||u)&&h(e)},_=()=>{let e=f;l=void 0,!(!e||u)&&h(e)},v=e=>{if(!o||c)return;let t=Math.max(0,i-(e-(d===0?e:d)));c=setTimeout(g,t)},y=e=>{if(typeof s!=`number`||l)return;let t=s-(e-(d===0?e:d));if(t<=0){_();return}l=setTimeout(_,t)};ae(e=>{if(u)return;if(i===0){h(e);return}let t=Date.now();if(f=e,a&&(d===0||t-d>=i)){h(e);return}if(typeof s==`number`&&t-(d===0?t:d)>=s){h(e);return}!o&&typeof s!=`number`||(v(t),y(t))});let b=()=>{u||(u=!0,f=void 0,p(),m())};return se(b),W(b),b}function Oo(e,t={}){te(async()=>{try{await e()}catch(e){var n;await((n=t.onError)==null?void 0:n.call(t,e))}finally{var r;await((r=t.stopPullDownRefresh)==null?(()=>at.stopPullDownRefresh()):r)()}})}function ko(e,t){let n=t==null?P():t;if(!n||!T())throw Error(`${e}() 必须在 setup() 的同步阶段调用`);return n}function Ao(e,t,n,r){let i=yr(e);return!i||!t?Promise.resolve(null):(r(n?i.selectAll(t):i.select(t)),new Promise(e=>{i.exec(t=>{let n=Array.isArray(t)?t[0]:null;e(n==null?null:n)})}))}function jo(e={}){let t=ko(`useSelectorQuery`,e.context);return()=>yr(t)}function Mo(e={}){var t;let n=ko(`useBoundingClientRect`,e.context),r=(t=e.all)==null?!1:t;return e=>Ao(n,e,r,e=>e.boundingClientRect())}function No(e){var t;let n=ko(`useSelectorFields`,e.context),r=(t=e.all)==null?!1:t;return t=>Ao(n,t,r,t=>t.fields(e.fields))}function Po(e={}){var t;let n=ko(`useScrollOffset`,e.context),r=(t=e.all)==null?!1:t;return e=>Ao(n,e,r,e=>e.scrollOffset())}function Fo(e){let t=e,n=t.setUpdatePerformanceListener;if(typeof n==`function`)return e=>{n.call(t,e)}}function Io(e){let t=P();if(!t)throw Error(`useUpdatePerformanceListener() 必须在 setup() 的同步阶段调用`);if(typeof e!=`function`)throw TypeError(`useUpdatePerformanceListener() 需要传入监听函数`);let n=Fo(t);if(!n)throw Error(`当前实例不支持 setUpdatePerformanceListener,请检查基础库版本或组件上下文`);n(e);let r=!1,i=()=>{if(!r){r=!0;try{n(void 0)}catch(e){}}};return se(i),W(i),i}function Lo(){let e=P();if(e!=null&&e[ve]&&e[ze])return e[ze];throw Error(`defineAppSetup() / use() 只能在 app setup 上下文中调用`)}function Ro(e){return e(Lo())}function zo(e,...t){return Lo().use(e,...t)}const Bo=Object.freeze(Object.create(null));function Vo(){var e;let t=T();if(!t)throw Error(`useAttrs() 必须在 setup() 的同步阶段调用`);return(e=t.attrs)==null?{}:e}function Ho(){var e;let t=T();if(!t)throw Error(`useSlots() 必须在 setup() 的同步阶段调用`);return(e=t.slots)==null?Bo:e}function Uo(){let e=T();if(!(e!=null&&e.instance))throw Error(`useNativeInstance() 必须在 setup() 的同步阶段调用`);return e.instance}const Wo=Object.freeze(Object.create(null));function Go(e,t){let n=t===`modelValue`?`modelModifiers`:`${t}Modifiers`,r=e==null?void 0:e[n];return!r||typeof r!=`object`?Wo:r}function Ko(e,t){let n=e;try{Object.defineProperty(n,Symbol.iterator,{configurable:!0,value:()=>{let e=0;return{next:()=>e===0?(e+=1,{value:n,done:!1}):e===1?(e+=1,{value:t(),done:!1}):{value:void 0,done:!0}}}})}catch(e){}return n}function qo(e,t,n={}){let r=T();if(!r)throw Error(`useModel() 必须在 setup() 的同步阶段调用`);let i=r.emit,a=`update:${t}`,o=()=>Go(e,t);return Ko(y({get:()=>{let r=e==null?void 0:e[t];return n.get?n.get(r,o()):r},set:e=>{let t=n.set?n.set(e,o()):e;i==null||i(a,t)}}),o)}function Jo(e){let t=P();if(!(t!=null&&t.__wevu)||typeof t.__wevu.bindModel!=`function`)throw Error(`useBindModel() 必须在 setup() 的同步阶段调用`);let n=t.__wevu.bindModel.bind(t.__wevu),r=((t,r)=>e?n(t,{...e,...r}):n(t,r));return r.model=(e,t)=>r(e).model(t),r.value=(t,n)=>{var i;let a={...e,...n},o=(i=a==null?void 0:a.valueProp)==null?`value`:i;return r.model(t,n)[o]},r.on=(t,n)=>{var i;let a={...e,...n},o=`on${vt((i=a==null?void 0:a.event)==null?`input`:i)}`;return r.model(t,n)[o]},r}function Yo(){let e=Jo({event:`change`});return function(t,n){return e.model(t,n)}}function Xo(e,t){return e==null?t:t==null?e:Array.isArray(e)&&Array.isArray(t)?[...new Set([...e,...t])]:typeof e==`object`&&typeof t==`object`?{...e,...t}:t}function Zo(e){let t=e[nt];if(t)return t;let n=new Map;try{Object.defineProperty(e,nt,{value:n,configurable:!0,enumerable:!1,writable:!1})}catch(t){e[nt]=n}return n}function Qo(e){let t=P();if(!t)throw Error(`useTemplateRef() 必须在 setup() 的同步阶段调用`);let n=typeof e==`string`?e.trim():``;if(!n)throw Error(`useTemplateRef() 需要传入有效的模板 ref 名称`);let r=Zo(t),i=r.get(n);if(i)return i;let a=ee(null);return r.set(n,a),a}export{_t as $,Xi as A,yi as B,go as C,so as D,lo as E,ra as F,Zn as G,Ci as H,ta as I,Jn as J,Yn as K,ia as L,Qi as M,$i as N,sa as O,Zi as P,$ as Q,ea as R,yo as S,co as T,Jr as U,Si as V,Qn as W,bn as X,xn as Y,Bt as Z,Do as _,qo as a,mt as at,wo as b,Ho as c,ht as ct,Io as d,gt as et,Mo as f,Oo as g,jo as h,Yo as i,dt as it,na as j,oa as k,Ro as l,lt,No as m,Xo as n,ut as nt,Vo as o,ft as ot,Po as p,Xn as q,Jo as r,ct as rt,Uo as s,ot as st,Qo as t,pt as tt,zo as u,st as ut,xo as v,po as w,So as x,Co as y,ki as z};
|
package/dist/vue-demi.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./
|
|
1
|
+
import"./rolldown-runtime-CenpyGzJ.mjs";import{C as e,D as t,E as n,N as r,O as i,S as a,T as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,k as h,l as g,n as _,o as v,p as y,s as b,t as x,u as S,w as C,x as w,y as T}from"./ref-CRwjgX_d.mjs";import{t as E}from"./computed-DdPJb4_M.mjs";import{S as D,b as O,c as k,d as A,n as j,r as M,s as N,u as P,x as F,y as I}from"./base-D-o2Hv6z.mjs";import{a as L,c as R,i as z,l as B,n as V,o as H,r as U,s as W,t as G,u as K}from"./watch-6_s3_f8q.mjs";import{n as q,t as J}from"./toRefs-COgMIEoC.mjs";import{$ as Y,A as X,B as Z,F as Q,G as $,H as ee,I as te,J as ne,K as re,L as ie,M as ae,N as oe,P as se,Q as ce,R as le,U as ue,V as de,W as fe,X as pe,Y as me,Z as he,_ as ge,et as _e,g as ve,h as ye,j as be,m as xe,n as Se,q as Ce,t as we,v as Te,z as Ee}from"./router-BiJKkvy7.mjs";import{$ as De,A as Oe,B as ke,C as Ae,D as je,E as Me,F as Ne,G as Pe,H as Fe,I as Ie,J as Le,K as Re,L as ze,M as Be,N as Ve,O as He,P as Ue,Q as We,R as Ge,S as Ke,T as qe,U as Je,V as Ye,W as Xe,X as Ze,Y as Qe,Z as $e,_ as et,a as tt,at as nt,b as rt,c as it,ct as at,d as ot,et as st,f as ct,g as lt,h as ut,i as dt,it as ft,j as pt,k as mt,l as ht,lt as gt,m as _t,n as vt,nt as yt,o as bt,ot as xt,p as St,q as Ct,r as wt,rt as Tt,s as Et,st as Dt,t as Ot,tt as kt,u as At,ut as jt,v as Mt,w as Nt,x as Pt,y as Ft,z as It}from"./templateRef-CDJDt62p.mjs";import{n as Lt,r as Rt,t as zt}from"./template-CFhlojaH.mjs";import{n as Bt,r as Vt,t as Ht}from"./store-B9C0AuaO.mjs";import"./index.mjs";export*from"@wevu/web-apis";const Ut=!1,Wt=!0,Gt=void 0;function Kt(){}export{Gt as Vue2,c as addMutationRecorder,a as batch,j as callHookList,M as callHookReturn,st as callUpdateHooks,E as computed,He as createApp,Vt as createStore,qe as createWevuComponent,Me as createWevuScopedSlotComponent,x as customRef,ht as defineAppSetup,je as defineComponent,Bt as defineStore,e as effect,C as effectScope,o as endBatch,N as getCurrentInstance,Mt as getCurrentPageStackSnapshot,n as getCurrentScope,k as getCurrentSetupContext,L as getDeepWatchStrategy,Ft as getNavigationBarMetrics,b as getReactiveVersion,xe as hasInjectionContext,ye as inject,ve as injectGlobal,Kt as install,$e as isNoSetData,I as isProxy,l as isRaw,g as isReactive,O as isReadonly,_ as isRef,d as isShallowReactive,R as isShallowRef,Ut as isVue2,Wt as isVue3,We as markNoSetData,S as markRaw,vt as mergeModels,ke as mountRuntimeInstance,r as nextTick,zt as normalizeClass,Lt as normalizeStyle,kt as onActivated,be as onAddToFavorites,ae as onAttached,yt as onBeforeMount,Tt as onBeforeUnmount,ft as onBeforeUpdate,nt as onDeactivated,oe as onDetached,se as onError,xt as onErrorCaptured,Q as onHide,te as onLaunch,ie as onLoad,le as onMemoryWarning,Dt as onMounted,Ee as onMoved,Z as onPageNotFound,de as onPageScroll,ee as onPullDownRefresh,ue as onReachBottom,fe as onReady,$ as onResize,re as onRouteDone,Ce as onSaveExitState,t as onScopeDispose,at as onServerPrefetch,ne as onShareAppMessage,me as onShareTimeline,pe as onShow,he as onTabItemTap,ce as onThemeChange,Y as onUnhandledRejection,_e as onUnload,gt as onUnmounted,jt as onUpdated,p as prelinkReactiveTree,ge as provide,Te as provideGlobal,u as reactive,F as readonly,m as ref,It as registerApp,mt as registerComponent,Oe as registerPageLayoutBridge,pt as registerRuntimeLayoutHosts,w as removeMutationRecorder,Qe as resetWevuDefaults,Be as resolveLayoutBridge,Ve as resolveLayoutHost,Rt as resolvePropValue,Xe as resolveRuntimePageLayoutName,Je as runSetupFunction,P as setCurrentInstance,A as setCurrentSetupContext,H as setDeepWatchStrategy,X as setGlobalProvidedValue,Pe as setPageLayout,Ye as setRuntimeSetDataVisibility,Ze as setWevuDefaults,y as shallowReactive,D as shallowReadonly,B as shallowRef,i as startBatch,h as stop,Ht as storeToRefs,Re as syncRuntimePageLayoutState,Ct as syncRuntimePageLayoutStateFromRuntime,Fe as teardownRuntimeInstance,T as toRaw,J as toRef,q as toRefs,s as toValue,f as touchReactive,W as traverse,K as triggerRef,v as unref,Ue as unregisterPageLayoutBridge,Ne as unregisterRuntimeLayoutHosts,At as use,lt as useAsyncPullDownRefresh,bt as useAttrs,wt as useBindModel,ct as useBoundingClientRect,dt as useChangeModel,Nt as useDisposables,Ae as useElementIntersectionObserver,Ke as useIntersectionObserver,Ie as useLayoutBridge,ze as useLayoutHosts,tt as useModel,Et as useNativeInstance,we as useNativePageRouter,Se as useNativeRouter,rt as useNavigationBarMetrics,Le as usePageLayout,et as usePageScrollThrottle,Pt as usePageStack,St as useScrollOffset,_t as useSelectorFields,ut as useSelectorQuery,it as useSlots,Ot as useTemplateRef,ot as useUpdatePerformanceListener,De as version,Ge as waitForLayoutHost,G as watch,V as watchEffect,U as watchPostEffect,z as watchSyncEffect};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wevu",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.16.
|
|
4
|
+
"version": "6.16.44",
|
|
5
5
|
"description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -225,12 +225,12 @@
|
|
|
225
225
|
"miniprogram-api-typings": "^5.0.0"
|
|
226
226
|
},
|
|
227
227
|
"dependencies": {
|
|
228
|
-
"vue": "^3.5.
|
|
228
|
+
"vue": "^3.5.38",
|
|
229
229
|
"@weapp-core/constants": "0.1.12",
|
|
230
230
|
"@weapp-core/shared": "3.0.4",
|
|
231
231
|
"@wevu/api": "0.2.9",
|
|
232
|
-
"@wevu/compiler": "6.16.
|
|
233
|
-
"@wevu/web-apis": "1.2.
|
|
232
|
+
"@wevu/compiler": "6.16.44",
|
|
233
|
+
"@wevu/web-apis": "1.2.21"
|
|
234
234
|
},
|
|
235
235
|
"scripts": {
|
|
236
236
|
"dev": "tsdown -w",
|