wevu 6.16.7 → 6.16.8

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.
@@ -1,7 +1,7 @@
1
- import { A as track, C as effect, D as onScopeDispose, E as getCurrentScope, M as triggerEffects, N as nextTick, O as startBatch, P as queueJob, 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, j as trigger, k as stop, l as isReactive, m as clearPatchIndices, n as isRef, o as unref, p as shallowReactive, r as markAsRef, s as getReactiveVersion, t as customRef, u as markRaw, v as isObject$1, w as effectScope, x as removeMutationRecorder, y as toRaw } from "./ref-oJCdOWf7.mjs";
2
- import { i as computed, n as defineStore, r as createStore, t as storeToRefs } from "./store-BhOds5RF.mjs";
3
- import { $ as onUnhandledRejection, A as setGlobalProvidedValue, B as onPageNotFound, C as releaseCurrentPageInstance, D as attachRuntimeProvideContext, E as attachRuntimeLayoutProvideContext, 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, O as ensureRuntimeAppProvides, P as onError, Q as onThemeChange, R as onMemoryWarning, S as getCurrentPageInstance, T as runInPageScrollHook, U as onReachBottom, V as onPageScroll, W as onReady, X as onShow, Y as onShareTimeline, Z as onTabItemTap, _ as provide, _t as readonly, at as getCurrentSetupContext, b as ensureMiniProgramGlobalPatched, ct as setCurrentSetupContext, dt as getCurrentMiniProgramRuntimeCapabilities, et as onUnload, ft as getMiniProgramGlobalObject, g as injectGlobal, gt as isReadonly, h as inject, ht as isProxy, it as getCurrentInstance, j as onAddToFavorites, k as setRuntimeAppProvidedValue, lt as getCurrentMiniProgramHostConfig, m as hasInjectionContext, mt as supportsCurrentMiniProgramRuntimeCapability, n as useNativeRouter, nt as callHookList, ot as pushHook, pt as getScopedSlotHostGlobalObject, q as onSaveExitState, rt as callHookReturn, st as setCurrentInstance, t as useNativePageRouter, tt as assertInSetup, ut as getCurrentMiniProgramPages, v as provideGlobal, vt as shallowReadonly, w as resolvePageOptions, x as ensurePageShareMenus, y as bindCurrentPageInstance, z as onMoved } from "./router-CXNNN43P.mjs";
4
- import { WEVU_ATTRS_KEY, WEVU_EFFECT_SCOPE_KEY, WEVU_EXPOSED_KEY, WEVU_HOOKS_KEY, WEVU_INLINE_HANDLER, WEVU_INLINE_MAP_KEY, WEVU_IS_APP_INSTANCE_KEY, WEVU_LAYOUT_BRIDGE_PAGE_KEYS, WEVU_LAYOUT_HOST_BRIDGE_KEY, WEVU_MODEL_HANDLER, WEVU_NATIVE_INSTANCE_KEY, WEVU_ON_BEFORE_UPDATE_HOOK, WEVU_ON_LOAD_CALLED_KEY, WEVU_ON_UPDATED_HOOK, WEVU_OWNER_HANDLER, WEVU_PAGE_LAYOUT_NAME_KEY, WEVU_PAGE_LAYOUT_NONE, WEVU_PAGE_LAYOUT_PROPS_KEY, WEVU_PAGE_LAYOUT_SETTER_KEY, WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY, WEVU_PARENT_INSTANCE_KEY, WEVU_PENDING_PROP_VALUES_KEY, WEVU_PROPS_KEY, WEVU_PROP_KEYS_KEY, WEVU_PUBLIC_RUNTIME_KEY, WEVU_READY_CALLED_KEY, WEVU_RESERVED_METHOD_PREFIX, WEVU_ROUTE_DONE_CALLED_KEY, WEVU_ROUTE_DONE_IN_TICK_KEY, WEVU_RUNTIME_APP_KEY, WEVU_RUNTIME_KEY, WEVU_SCOPED_SLOT_CREATOR_KEY, WEVU_SETUP_CONTEXT_INSTANCE_KEY, WEVU_SLOT_NAMES_PROP, WEVU_SLOT_OWNER_ID_KEY, WEVU_SLOT_OWNER_ID_PROP, WEVU_SLOT_OWNER_KEY, WEVU_SLOT_PROPS_DATA_KEY, WEVU_SLOT_PROPS_KEY, WEVU_SLOT_SCOPE_KEY, WEVU_TEMPLATE_REFS_CALLBACKS_KEY, WEVU_TEMPLATE_REFS_KEY, WEVU_TEMPLATE_REFS_PENDING_KEY, WEVU_TEMPLATE_REF_MAP_KEY, WEVU_WATCH_STOPS_KEY } from "@weapp-core/constants";
1
+ import { A as track, C as effect, D as onScopeDispose, E as getCurrentScope, M as triggerEffects, N as nextTick, O as startBatch, P as queueJob, 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, j as trigger, k as stop, l as isReactive, m as clearPatchIndices, n as isRef, o as unref, p as shallowReactive, r as markAsRef, s as getReactiveVersion, t as customRef, u as markRaw, v as isObject$1, w as effectScope, x as removeMutationRecorder, y as toRaw } from "./ref-Dui1TzOR.mjs";
2
+ import { i as computed, n as defineStore, r as createStore, t as storeToRefs } from "./store-Brqfb7LU.mjs";
3
+ import { $ as onUnhandledRejection, A as setGlobalProvidedValue, B as onPageNotFound, C as releaseCurrentPageInstance, D as attachRuntimeProvideContext, E as attachRuntimeLayoutProvideContext, 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, O as ensureRuntimeAppProvides, P as onError, Q as onThemeChange, R as onMemoryWarning, S as getCurrentPageInstance, T as runInPageScrollHook, U as onReachBottom, V as onPageScroll, W as onReady, X as onShow, Y as onShareTimeline, Z as onTabItemTap, _ as provide, _t as readonly, at as getCurrentSetupContext, b as ensureMiniProgramGlobalPatched, ct as setCurrentSetupContext, dt as getCurrentMiniProgramRuntimeCapabilities, et as onUnload, ft as getMiniProgramGlobalObject, g as injectGlobal, gt as isReadonly, h as inject, ht as isProxy, it as getCurrentInstance, j as onAddToFavorites, k as setRuntimeAppProvidedValue, lt as getCurrentMiniProgramHostConfig, m as hasInjectionContext, mt as supportsCurrentMiniProgramRuntimeCapability, n as useNativeRouter, nt as callHookList, ot as pushHook, pt as getScopedSlotHostGlobalObject, q as onSaveExitState, rt as callHookReturn, st as setCurrentInstance, t as useNativePageRouter, tt as assertInSetup, ut as getCurrentMiniProgramPages, v as provideGlobal, vt as shallowReadonly, w as resolvePageOptions, x as ensurePageShareMenus, y as bindCurrentPageInstance, z as onMoved } from "./router-DFQw3LKA.mjs";
4
+ import { WEVU_ATTRS_KEY, WEVU_EFFECT_SCOPE_KEY, WEVU_EXPOSED_KEY, WEVU_GENERIC_SLOT_OWNER_DATA_KEY, WEVU_GENERIC_SLOT_OWNER_ID_ATTR, WEVU_GENERIC_SLOT_OWNER_ID_PROP, WEVU_GENERIC_SLOT_OWNER_PROPS_ATTR, WEVU_GENERIC_SLOT_OWNER_PROP_PREFIX, WEVU_GENERIC_SLOT_PROPS_ATTR, WEVU_GENERIC_SLOT_PROPS_DATA_ATTR, WEVU_GENERIC_SLOT_PROPS_DATA_KEY, WEVU_GENERIC_SLOT_PROPS_PROP, WEVU_GENERIC_SLOT_SCOPE_ATTR, WEVU_GENERIC_SLOT_SCOPE_PROP, WEVU_HOOKS_KEY, WEVU_INLINE_HANDLER, WEVU_INLINE_MAP_KEY, WEVU_IS_APP_INSTANCE_KEY, WEVU_LAYOUT_BRIDGE_PAGE_KEYS, WEVU_LAYOUT_HOST_BRIDGE_KEY, WEVU_MODEL_HANDLER, WEVU_NATIVE_INSTANCE_KEY, WEVU_NATIVE_SLOT_SCOPE_DATA_KEY, WEVU_ON_BEFORE_UPDATE_HOOK, WEVU_ON_LOAD_CALLED_KEY, WEVU_ON_UPDATED_HOOK, WEVU_OWNER_HANDLER, WEVU_PAGE_LAYOUT_NAME_KEY, WEVU_PAGE_LAYOUT_NONE, WEVU_PAGE_LAYOUT_PROPS_KEY, WEVU_PAGE_LAYOUT_SETTER_KEY, WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY, WEVU_PARENT_INSTANCE_KEY, WEVU_PENDING_PROP_VALUES_KEY, WEVU_PROPS_KEY, WEVU_PROP_KEYS_KEY, WEVU_PUBLIC_RUNTIME_KEY, WEVU_READY_CALLED_KEY, WEVU_RESERVED_METHOD_PREFIX, WEVU_ROUTE_DONE_CALLED_KEY, WEVU_ROUTE_DONE_IN_TICK_KEY, WEVU_RUNTIME_APP_KEY, WEVU_RUNTIME_KEY, WEVU_SCOPED_SLOT_CREATOR_KEY, WEVU_SETUP_CONTEXT_INSTANCE_KEY, WEVU_SLOT_NAMES_PROP, WEVU_SLOT_OWNER_ATTR, WEVU_SLOT_OWNER_ID_ATTR, WEVU_SLOT_OWNER_ID_KEY, WEVU_SLOT_OWNER_ID_PROP, WEVU_SLOT_OWNER_KEY, WEVU_SLOT_OWNER_PROXY_KEY, WEVU_SLOT_PROPS_DATA_KEY, WEVU_SLOT_PROPS_KEY, WEVU_SLOT_SCOPE_KEY, WEVU_TEMPLATE_REFS_CALLBACKS_KEY, WEVU_TEMPLATE_REFS_KEY, WEVU_TEMPLATE_REFS_PENDING_KEY, WEVU_TEMPLATE_REF_MAP_KEY, WEVU_WATCH_STOPS_KEY } from "@weapp-core/constants";
5
5
  import { resolveMiniProgramPageKeys } from "@weapp-core/shared";
6
6
  import { wpi } from "@wevu/api";
7
7
 
@@ -478,7 +478,7 @@ function watchSyncEffect(effectFn, options = {}) {
478
478
 
479
479
  //#endregion
480
480
  //#region package.json
481
- var version$1 = "6.16.7";
481
+ var version$1 = "6.16.8";
482
482
 
483
483
  //#endregion
484
484
  //#region src/version.ts
@@ -790,7 +790,7 @@ function createRuntimeContext(options) {
790
790
  return nativeValue;
791
791
  }
792
792
  }
793
- return Reflect.get(target, key, receiver);
793
+ return unref(Reflect.get(target, key, receiver));
794
794
  },
795
795
  set(target, key, value, receiver) {
796
796
  if (typeof key === "string" && computedRefs[key]) {
@@ -938,7 +938,7 @@ function isPlainObject$1(value) {
938
938
  return proto === null || proto === Object.prototype;
939
939
  }
940
940
  function toPlainInternal(value, seen, cache, depth, budget) {
941
- const unwrapped = unref(value);
941
+ const unwrapped = isRef(value) || value && typeof value === "object" && value.__v_isRef === true && "value" in value ? value.value : unref(value);
942
942
  if (typeof unwrapped === "bigint") {
943
943
  const asNumber = Number(unwrapped);
944
944
  return Number.isSafeInteger(asNumber) ? asNumber : unwrapped.toString();
@@ -946,6 +946,7 @@ function toPlainInternal(value, seen, cache, depth, budget) {
946
946
  if (typeof unwrapped === "symbol") return unwrapped.toString();
947
947
  if (typeof unwrapped === "function") return;
948
948
  if (typeof unwrapped !== "object" || unwrapped === null) return unwrapped;
949
+ if (unwrapped.__v_isRef === true && "value" in unwrapped) return toPlainInternal(unwrapped.value, seen, cache, depth, budget);
949
950
  if (isNoSetData(unwrapped)) return;
950
951
  const raw = isReactive(unwrapped) ? toRaw(unwrapped) : unwrapped;
951
952
  const cacheRef = Boolean(cache) && (isReactive(unwrapped) || !hasTrackableSetupBinding(raw)) ? cache : void 0;
@@ -1252,6 +1253,7 @@ function normalizeSetDataValue(value) {
1252
1253
  return value === void 0 ? null : value;
1253
1254
  }
1254
1255
  function cloneSnapshotValue(value) {
1256
+ if (isRef(value) || value && typeof value === "object" && value.__v_isRef === true && "value" in value) return cloneSnapshotValue(value.value);
1255
1257
  if (Array.isArray(value)) return value.map((item) => cloneSnapshotValue(item));
1256
1258
  if (!isPlainObjectLike(value)) return value;
1257
1259
  const out = {};
@@ -1568,6 +1570,15 @@ function createSetDataScheduler(options) {
1568
1570
  toPlainMaxDepth,
1569
1571
  toPlainMaxKeys
1570
1572
  });
1573
+ const collectOwnerSnapshot = () => collectSnapshot({
1574
+ state,
1575
+ computedRefs,
1576
+ includeComputed: true,
1577
+ shouldIncludeKey: () => true,
1578
+ plainCache,
1579
+ toPlainMaxDepth,
1580
+ toPlainMaxKeys
1581
+ });
1571
1582
  const collectDiffSnapshot = () => {
1572
1583
  const rawState = isReactive(state) ? toRaw(state) : state;
1573
1584
  const nextSnapshot = { ...latestSnapshot };
@@ -1718,6 +1729,7 @@ function createSetDataScheduler(options) {
1718
1729
  job,
1719
1730
  mutationRecorder,
1720
1731
  snapshot,
1732
+ collectOwnerSnapshot,
1721
1733
  cloneLatestSnapshot,
1722
1734
  getLatestSnapshot: () => latestSnapshot
1723
1735
  };
@@ -1751,7 +1763,7 @@ function resolveSetDataOptions(setDataOptions) {
1751
1763
  const pickSet = Array.isArray(setDataOptions === null || setDataOptions === void 0 ? void 0 : setDataOptions.pick) && setDataOptions.pick.length > 0 ? new Set(setDataOptions.pick) : void 0;
1752
1764
  const omitSet = Array.isArray(setDataOptions === null || setDataOptions === void 0 ? void 0 : setDataOptions.omit) && setDataOptions.omit.length > 0 ? new Set(setDataOptions.omit) : void 0;
1753
1765
  const shouldIncludeKey = (key) => {
1754
- if (pickSet && !pickSet.has(key)) return false;
1766
+ if (pickSet && !pickSet.has(key) && !key.startsWith(WEVU_GENERIC_SLOT_OWNER_PROP_PREFIX)) return false;
1755
1767
  if (omitSet && omitSet.has(key)) return false;
1756
1768
  return true;
1757
1769
  };
@@ -1959,6 +1971,16 @@ function createRuntimeMount(options) {
1959
1971
  } catch (_unused4) {
1960
1972
  runtimeInstance.__wevu_flushSetupSnapshotSync = job;
1961
1973
  }
1974
+ try {
1975
+ Object.defineProperty(runtimeInstance, "__wevu_collectOwnerSnapshot", {
1976
+ value: scheduler.collectOwnerSnapshot,
1977
+ configurable: true,
1978
+ enumerable: false,
1979
+ writable: false
1980
+ });
1981
+ } catch (_unused5) {
1982
+ runtimeInstance.__wevu_collectOwnerSnapshot = scheduler.collectOwnerSnapshot;
1983
+ }
1962
1984
  try {
1963
1985
  Object.defineProperty(runtimeInstance, "__wevu_cloneLatestSnapshot", {
1964
1986
  value: scheduler.cloneLatestSnapshot,
@@ -1966,7 +1988,7 @@ function createRuntimeMount(options) {
1966
1988
  enumerable: false,
1967
1989
  writable: false
1968
1990
  });
1969
- } catch (_unused5) {
1991
+ } catch (_unused6) {
1970
1992
  runtimeInstance.__wevu_cloneLatestSnapshot = scheduler.cloneLatestSnapshot;
1971
1993
  }
1972
1994
  try {
@@ -1978,7 +2000,7 @@ function createRuntimeMount(options) {
1978
2000
  enumerable: false,
1979
2001
  writable: false
1980
2002
  });
1981
- } catch (_unused6) {
2003
+ } catch (_unused7) {
1982
2004
  runtimeInstance.__wevu_trackSetupReactiveKey = (key) => {
1983
2005
  trackedSetupReactiveKeys.add(key);
1984
2006
  };
@@ -2252,6 +2274,7 @@ function resolveRuntimePageLayoutName(layout) {
2252
2274
  //#region src/runtime/scopedSlots.ts
2253
2275
  const ownerStore = /* @__PURE__ */ new Map();
2254
2276
  let ownerSeed = 0;
2277
+ let fallbackSlotOwnerId = "";
2255
2278
  function allocateOwnerId() {
2256
2279
  ownerSeed += 1;
2257
2280
  return `wv${ownerSeed}`;
@@ -2296,22 +2319,46 @@ function getOwnerSnapshot(ownerId) {
2296
2319
  var _ownerStore$get4;
2297
2320
  return (_ownerStore$get4 = ownerStore.get(ownerId)) === null || _ownerStore$get4 === void 0 ? void 0 : _ownerStore$get4.snapshot;
2298
2321
  }
2299
- function resolveOwnerSnapshot(runtime) {
2300
- const fastSnapshot = runtime.__wevu_cloneLatestSnapshot;
2301
- if (typeof fastSnapshot === "function") return fastSnapshot();
2302
- return typeof runtime.snapshot === "function" ? runtime.snapshot() : {};
2322
+ function rememberSlotOwnerId(ownerId) {
2323
+ if (typeof ownerId === "string" && ownerId) fallbackSlotOwnerId = ownerId;
2324
+ }
2325
+ function getFallbackSlotOwnerId() {
2326
+ return fallbackSlotOwnerId;
2327
+ }
2328
+ function resolveOwnerSnapshot(runtime, options = {}) {
2329
+ const runtimeWithOwnerSnapshot = runtime;
2330
+ const snapshot = options.full && typeof runtimeWithOwnerSnapshot.__wevu_collectOwnerSnapshot === "function" ? runtimeWithOwnerSnapshot.__wevu_collectOwnerSnapshot() : typeof runtimeWithOwnerSnapshot.__wevu_cloneLatestSnapshot === "function" ? runtimeWithOwnerSnapshot.__wevu_cloneLatestSnapshot() : typeof runtime.snapshot === "function" ? runtime.snapshot() : {};
2331
+ const proxy = runtime.proxy;
2332
+ if (!proxy || typeof proxy !== "object") return snapshot;
2333
+ const seen = /* @__PURE__ */ new WeakMap();
2334
+ for (const key of Reflect.ownKeys(proxy)) {
2335
+ if (typeof key !== "string") continue;
2336
+ let value;
2337
+ try {
2338
+ value = proxy[key];
2339
+ } catch (_unused2) {
2340
+ continue;
2341
+ }
2342
+ if (typeof value === "function") continue;
2343
+ const plain = toPlain(value, seen);
2344
+ if (plain !== void 0) snapshot[key] = plain;
2345
+ }
2346
+ return snapshot;
2303
2347
  }
2304
2348
  function attachOwnerSnapshot(target, runtime, ownerId) {
2305
2349
  var _WEVU_PROPS_KEY;
2306
2350
  try {
2307
2351
  runtime.state[WEVU_SLOT_OWNER_ID_KEY] = ownerId;
2308
- } catch (_unused2) {}
2352
+ } catch (_unused3) {}
2309
2353
  try {
2310
2354
  target[WEVU_SLOT_OWNER_ID_KEY] = ownerId;
2311
- } catch (_unused3) {}
2312
- const snapshot = resolveOwnerSnapshot(runtime);
2355
+ } catch (_unused4) {}
2356
+ const snapshot = resolveOwnerSnapshot(runtime, { full: true });
2313
2357
  const propsSource = (_WEVU_PROPS_KEY = target[WEVU_PROPS_KEY]) !== null && _WEVU_PROPS_KEY !== void 0 ? _WEVU_PROPS_KEY : target.properties;
2314
- if (propsSource && typeof propsSource === "object") for (const [key, value] of Object.entries(propsSource)) snapshot[key] = value;
2358
+ if (propsSource && typeof propsSource === "object") {
2359
+ for (const [key, value] of Object.entries(propsSource)) snapshot[key] = value;
2360
+ rememberSlotOwnerId(propsSource[WEVU_SLOT_OWNER_ID_PROP] || propsSource[WEVU_GENERIC_SLOT_OWNER_ID_PROP] || propsSource[WEVU_GENERIC_SLOT_OWNER_ID_ATTR]);
2361
+ }
2315
2362
  updateOwnerSnapshot(ownerId, snapshot, runtime.proxy);
2316
2363
  }
2317
2364
 
@@ -3403,11 +3450,25 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
3403
3450
  ...payload
3404
3451
  });
3405
3452
  const refreshOwnerSnapshot = () => {
3406
- var _WEVU_PROPS_KEY;
3453
+ var _wevu_cloneLatestSnap, _wevu_cloneLatestSnap2, _WEVU_PROPS_KEY;
3407
3454
  if (!runtimeRef) return;
3408
- const snapshot = resolveOwnerSnapshot(runtimeRef);
3455
+ const snapshot = (_wevu_cloneLatestSnap = (_wevu_cloneLatestSnap2 = runtimeRef.__wevu_cloneLatestSnapshot) === null || _wevu_cloneLatestSnap2 === void 0 ? void 0 : _wevu_cloneLatestSnap2.call(runtimeRef)) !== null && _wevu_cloneLatestSnap !== void 0 ? _wevu_cloneLatestSnap : resolveOwnerSnapshot(runtimeRef);
3409
3456
  const propsSource = (_WEVU_PROPS_KEY = target[WEVU_PROPS_KEY]) !== null && _WEVU_PROPS_KEY !== void 0 ? _WEVU_PROPS_KEY : target.properties;
3410
- if (propsSource && typeof propsSource === "object") for (const [key, value] of Object.entries(propsSource)) snapshot[key] = value;
3457
+ if (propsSource && typeof propsSource === "object") {
3458
+ for (const [key, value] of Object.entries(propsSource)) snapshot[key] = value;
3459
+ rememberSlotOwnerId(propsSource[WEVU_SLOT_OWNER_ID_PROP] || propsSource[WEVU_GENERIC_SLOT_OWNER_ID_PROP] || propsSource[WEVU_GENERIC_SLOT_OWNER_ID_ATTR]);
3460
+ }
3461
+ updateOwnerSnapshot(ownerId, snapshot, runtimeRef.proxy);
3462
+ };
3463
+ const refreshFullOwnerSnapshot = () => {
3464
+ var _WEVU_PROPS_KEY2;
3465
+ if (!runtimeRef) return;
3466
+ const snapshot = resolveOwnerSnapshot(runtimeRef, { full: true });
3467
+ const propsSource = (_WEVU_PROPS_KEY2 = target[WEVU_PROPS_KEY]) !== null && _WEVU_PROPS_KEY2 !== void 0 ? _WEVU_PROPS_KEY2 : target.properties;
3468
+ if (propsSource && typeof propsSource === "object") {
3469
+ for (const [key, value] of Object.entries(propsSource)) snapshot[key] = value;
3470
+ rememberSlotOwnerId(propsSource[WEVU_SLOT_OWNER_ID_PROP] || propsSource[WEVU_GENERIC_SLOT_OWNER_ID_PROP] || propsSource[WEVU_GENERIC_SLOT_OWNER_ID_ATTR]);
3471
+ }
3411
3472
  updateOwnerSnapshot(ownerId, snapshot, runtimeRef.proxy);
3412
3473
  };
3413
3474
  const adapter = {
@@ -3467,6 +3528,8 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
3467
3528
  const internalRuntimeFields = {
3468
3529
  __wevu_flushSetupSnapshotSync: runtime.__wevu_flushSetupSnapshotSync,
3469
3530
  __wevu_touchSetupMethodsVersion: runtime.__wevu_touchSetupMethodsVersion,
3531
+ __wevu_collectOwnerSnapshot: runtime.__wevu_collectOwnerSnapshot,
3532
+ __wevu_cloneLatestSnapshot: runtime.__wevu_cloneLatestSnapshot,
3470
3533
  __wevu_trackSetupReactiveKey: runtime.__wevu_trackSetupReactiveKey
3471
3534
  };
3472
3535
  for (const [key, value] of Object.entries(internalRuntimeFields)) {
@@ -3503,7 +3566,9 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
3503
3566
  syncRuntimeProps,
3504
3567
  attachRuntimeProxyProps
3505
3568
  });
3569
+ if (!hasOwn(runtimeState, WEVU_SLOT_OWNER_ID_KEY)) runtimeState[WEVU_SLOT_OWNER_ID_KEY] = ownerId;
3506
3570
  (_runtimeWithSyncFlush = runtimeWithSyncFlush.__wevu_flushSetupSnapshotSync) === null || _runtimeWithSyncFlush === void 0 || _runtimeWithSyncFlush.call(runtimeWithSyncFlush);
3571
+ refreshFullOwnerSnapshot();
3507
3572
  }
3508
3573
  bridgeRuntimeMethodsToTarget(target, runtime);
3509
3574
  return runtime;
@@ -4139,7 +4204,7 @@ function refreshOwnerSnapshotFromInstance(instance) {
4139
4204
  const runtime = instance.__wevu;
4140
4205
  const ownerId = instance[WEVU_SLOT_OWNER_ID_KEY];
4141
4206
  if (!runtime || !ownerId || typeof runtime.snapshot !== "function") return;
4142
- const snapshot = runtime.snapshot();
4207
+ const snapshot = resolveOwnerSnapshot(runtime);
4143
4208
  const propsSource = (_WEVU_PROPS_KEY = instance[WEVU_PROPS_KEY]) !== null && _WEVU_PROPS_KEY !== void 0 ? _WEVU_PROPS_KEY : instance.properties;
4144
4209
  if (propsSource && typeof propsSource === "object") for (const [key, value] of Object.entries(propsSource)) snapshot[key] = value;
4145
4210
  updateOwnerSnapshot(ownerId, snapshot, runtime.proxy);
@@ -4151,6 +4216,7 @@ function createPropsSync(options) {
4151
4216
  const { restOptions, userObservers } = options;
4152
4217
  const propKeys = restOptions.properties && typeof restOptions.properties === "object" ? Object.keys(restOptions.properties) : [];
4153
4218
  const propKeySet = new Set(propKeys);
4219
+ const isInternalDashedSlotKey = (key) => key === WEVU_SLOT_OWNER_ATTR || key === WEVU_SLOT_OWNER_ID_ATTR;
4154
4220
  const attachWevuPropKeys = (instance) => {
4155
4221
  try {
4156
4222
  Object.defineProperty(instance, WEVU_PROP_KEYS_KEY, {
@@ -4174,7 +4240,7 @@ function createPropsSync(options) {
4174
4240
  const properties = instance.properties;
4175
4241
  const next = properties && typeof properties === "object" ? properties : void 0;
4176
4242
  const currentKeys = Object.keys(attrsProxy);
4177
- for (const existingKey of currentKeys) if (!next || !hasOwn(next, existingKey) || propKeySet.has(existingKey) || hasRuntimeStateKey(existingKey)) try {
4243
+ for (const existingKey of currentKeys) if (!next || !hasOwn(next, existingKey) || isInternalDashedSlotKey(existingKey) || propKeySet.has(existingKey) || hasRuntimeStateKey(existingKey)) try {
4178
4244
  delete attrsProxy[existingKey];
4179
4245
  } catch (_unused2) {}
4180
4246
  if (!next) {
@@ -4182,7 +4248,7 @@ function createPropsSync(options) {
4182
4248
  return;
4183
4249
  }
4184
4250
  for (const [key, value] of Object.entries(next)) {
4185
- if (propKeySet.has(key) || hasRuntimeStateKey(key)) continue;
4251
+ if (isInternalDashedSlotKey(key) || propKeySet.has(key) || hasRuntimeStateKey(key)) continue;
4186
4252
  try {
4187
4253
  attrsProxy[key] = value;
4188
4254
  } catch (_unused3) {}
@@ -4196,17 +4262,18 @@ function createPropsSync(options) {
4196
4262
  if (propsProxy && typeof propsProxy === "object" && properties && typeof properties === "object") {
4197
4263
  const next = properties;
4198
4264
  const currentKeys = Object.keys(propsProxy);
4199
- for (const existingKey of currentKeys) if (!hasOwn(next, existingKey)) try {
4265
+ for (const existingKey of currentKeys) if (isInternalDashedSlotKey(existingKey) || !hasOwn(next, existingKey)) try {
4200
4266
  delete propsProxy[existingKey];
4201
4267
  } catch (_unused4) {}
4202
4268
  for (const [k, v] of Object.entries(next)) {
4269
+ if (isInternalDashedSlotKey(k)) continue;
4203
4270
  const nextValue = pendingPropValues && hasOwn(pendingPropValues, k) ? pendingPropValues[k] : v;
4204
4271
  try {
4205
4272
  propsProxy[k] = nextValue;
4206
4273
  } catch (_unused5) {}
4207
4274
  }
4208
4275
  if (pendingPropValues) {
4209
- for (const [k, v] of Object.entries(pendingPropValues)) if (!hasOwn(next, k)) try {
4276
+ for (const [k, v] of Object.entries(pendingPropValues)) if (!isInternalDashedSlotKey(k) && !hasOwn(next, k)) try {
4210
4277
  propsProxy[k] = v;
4211
4278
  } catch (_unused6) {}
4212
4279
  }
@@ -4218,7 +4285,7 @@ function createPropsSync(options) {
4218
4285
  const syncWevuPropValue = (instance, key, value) => {
4219
4286
  var _ref, _ref$WEVU_PENDING_PRO;
4220
4287
  const propsProxy = instance[WEVU_PROPS_KEY];
4221
- if (!propsProxy || typeof propsProxy !== "object") return;
4288
+ if (!propsProxy || typeof propsProxy !== "object" || isInternalDashedSlotKey(key)) return;
4222
4289
  try {
4223
4290
  propsProxy[key] = value;
4224
4291
  } catch (_unused7) {}
@@ -4913,6 +4980,51 @@ function normalizeExplicitProperties(properties, allowNullPropInput) {
4913
4980
  });
4914
4981
  return normalizedProperties;
4915
4982
  }
4983
+ function syncSlotOwnerId(next) {
4984
+ var _this, _this$setData;
4985
+ rememberSlotOwnerId(next);
4986
+ if (typeof next !== "string") return;
4987
+ (_this = this) === null || _this === void 0 || (_this$setData = _this.setData) === null || _this$setData === void 0 || _this$setData.call(_this, {
4988
+ [WEVU_SLOT_OWNER_ID_KEY]: next,
4989
+ [WEVU_SLOT_OWNER_ID_PROP]: next,
4990
+ [WEVU_GENERIC_SLOT_OWNER_ID_PROP]: next,
4991
+ [WEVU_GENERIC_SLOT_OWNER_ID_ATTR]: next
4992
+ });
4993
+ }
4994
+ function normalizeSlotScopeValue(value) {
4995
+ if (!value || typeof value !== "object") return {};
4996
+ if (!Array.isArray(value)) return value;
4997
+ const result = {};
4998
+ for (let i = 0; i < value.length; i += 2) {
4999
+ const key = value[i];
5000
+ if (typeof key === "string" && key) result[key] = value[i + 1];
5001
+ }
5002
+ return result;
5003
+ }
5004
+ function syncNativeSlotScope(next) {
5005
+ var _this2, _this2$setData;
5006
+ const slotScope = normalizeSlotScopeValue(next);
5007
+ const payload = { [WEVU_NATIVE_SLOT_SCOPE_DATA_KEY]: slotScope };
5008
+ for (const [key, value] of Object.entries(slotScope)) if (value !== void 0) payload[key] = value;
5009
+ (_this2 = this) === null || _this2 === void 0 || (_this2$setData = _this2.setData) === null || _this2$setData === void 0 || _this2$setData.call(_this2, payload);
5010
+ }
5011
+ function syncSlotOwnerProps(next) {
5012
+ var _this$data$WEVU_SLOT_, _this3, _this$data$WEVU_GENER, _this4, _this5, _this5$setData;
5013
+ const payload = { [WEVU_GENERIC_SLOT_OWNER_PROPS_ATTR]: next };
5014
+ const ownerProps = normalizeSlotScopeValue(next);
5015
+ payload[WEVU_SLOT_OWNER_KEY] = {
5016
+ ...(_this$data$WEVU_SLOT_ = (_this3 = this) === null || _this3 === void 0 || (_this3 = _this3.data) === null || _this3 === void 0 ? void 0 : _this3[WEVU_SLOT_OWNER_KEY]) !== null && _this$data$WEVU_SLOT_ !== void 0 ? _this$data$WEVU_SLOT_ : {},
5017
+ ...ownerProps
5018
+ };
5019
+ payload[WEVU_GENERIC_SLOT_OWNER_DATA_KEY] = {
5020
+ ...(_this$data$WEVU_GENER = (_this4 = this) === null || _this4 === void 0 || (_this4 = _this4.data) === null || _this4 === void 0 ? void 0 : _this4[WEVU_GENERIC_SLOT_OWNER_DATA_KEY]) !== null && _this$data$WEVU_GENER !== void 0 ? _this$data$WEVU_GENER : {},
5021
+ ...ownerProps
5022
+ };
5023
+ payload[WEVU_SLOT_PROPS_DATA_KEY] = ownerProps;
5024
+ payload[WEVU_GENERIC_SLOT_PROPS_DATA_KEY] = ownerProps;
5025
+ for (const [key, value] of Object.entries(ownerProps)) if (value !== void 0) payload[`${WEVU_GENERIC_SLOT_OWNER_PROP_PREFIX}${key}`] = value;
5026
+ (_this5 = this) === null || _this5 === void 0 || (_this5$setData = _this5.setData) === null || _this5$setData === void 0 || _this5$setData.call(_this5, payload);
5027
+ }
4916
5028
  function normalizeProps(baseOptions, props, explicitProperties) {
4917
5029
  var _ALLOW_NULL_PROP_INPU;
4918
5030
  const allowNullPropInput = Boolean((_ALLOW_NULL_PROP_INPU = baseOptions[ALLOW_NULL_PROP_INPUT_KEY]) !== null && _ALLOW_NULL_PROP_INPU !== void 0 ? _ALLOW_NULL_PROP_INPU : baseOptions[PUBLIC_ALLOW_NULL_PROP_INPUT_KEY]);
@@ -4923,11 +5035,38 @@ function normalizeProps(baseOptions, props, explicitProperties) {
4923
5035
  const next = { ...source !== null && source !== void 0 ? source : {} };
4924
5036
  if (!hasOwn(next, WEVU_SLOT_OWNER_ID_PROP)) next[WEVU_SLOT_OWNER_ID_PROP] = {
4925
5037
  type: String,
4926
- value: ""
5038
+ value: "",
5039
+ observer: syncSlotOwnerId
5040
+ };
5041
+ if (!hasOwn(next, WEVU_GENERIC_SLOT_OWNER_ID_PROP)) next[WEVU_GENERIC_SLOT_OWNER_ID_PROP] = {
5042
+ type: String,
5043
+ value: "",
5044
+ observer: syncSlotOwnerId
5045
+ };
5046
+ if (!hasOwn(next, WEVU_GENERIC_SLOT_OWNER_ID_ATTR)) next[WEVU_GENERIC_SLOT_OWNER_ID_ATTR] = {
5047
+ type: String,
5048
+ value: "",
5049
+ observer: syncSlotOwnerId
5050
+ };
5051
+ if (!hasOwn(next, WEVU_GENERIC_SLOT_OWNER_PROPS_ATTR)) next[WEVU_GENERIC_SLOT_OWNER_PROPS_ATTR] = {
5052
+ type: null,
5053
+ value: null,
5054
+ observer: syncSlotOwnerProps
4927
5055
  };
4928
5056
  if (!hasOwn(next, WEVU_SLOT_SCOPE_KEY)) next[WEVU_SLOT_SCOPE_KEY] = {
4929
5057
  type: null,
4930
- value: null
5058
+ value: null,
5059
+ observer: syncNativeSlotScope
5060
+ };
5061
+ if (!hasOwn(next, WEVU_GENERIC_SLOT_SCOPE_PROP)) next[WEVU_GENERIC_SLOT_SCOPE_PROP] = {
5062
+ type: null,
5063
+ value: null,
5064
+ observer: syncNativeSlotScope
5065
+ };
5066
+ if (!hasOwn(next, WEVU_GENERIC_SLOT_SCOPE_ATTR)) next[WEVU_GENERIC_SLOT_SCOPE_ATTR] = {
5067
+ type: null,
5068
+ value: null,
5069
+ observer: syncNativeSlotScope
4931
5070
  };
4932
5071
  if (!hasOwn(next, WEVU_SLOT_NAMES_PROP)) next[WEVU_SLOT_NAMES_PROP] = {
4933
5072
  type: null,
@@ -5002,6 +5141,9 @@ const APOS_RE = /&apos;/g;
5002
5141
  const NUM_APOS_RE = /&#39;/g;
5003
5142
  const LT_RE = /&lt;/g;
5004
5143
  const GT_RE = /&gt;/g;
5144
+ const OWNER_PROPS_OVERRIDE_KEY = "__wvOwnerPropsOverride";
5145
+ const SLOT_PROPS_OVERRIDE_KEY = "__wvSlotPropsOverride";
5146
+ const SLOT_SCOPE_OVERRIDE_KEY = "__wvSlotScopeOverride";
5005
5147
  function decodeWxmlEntities(value) {
5006
5148
  return value.replace(AMP_RE, "&").replace(QUOT_RE, "\"").replace(NUM_QUOT_RE, "\"").replace(APOS_RE, "'").replace(NUM_APOS_RE, "'").replace(LT_RE, "<").replace(GT_RE, ">");
5007
5149
  }
@@ -5035,24 +5177,388 @@ function normalizeSlotBindings(value) {
5035
5177
  return value;
5036
5178
  }
5037
5179
  function mergeSlotProps(instance, override) {
5038
- var _instance$properties, _instance$properties2;
5039
- const scopeSource = hasOwn(override !== null && override !== void 0 ? override : {}, WEVU_SLOT_SCOPE_KEY) ? override[WEVU_SLOT_SCOPE_KEY] : instance === null || instance === void 0 || (_instance$properties = instance.properties) === null || _instance$properties === void 0 ? void 0 : _instance$properties[WEVU_SLOT_SCOPE_KEY];
5040
- const propsSource = hasOwn(override !== null && override !== void 0 ? override : {}, WEVU_SLOT_PROPS_KEY) ? override[WEVU_SLOT_PROPS_KEY] : instance === null || instance === void 0 || (_instance$properties2 = instance.properties) === null || _instance$properties2 === void 0 ? void 0 : _instance$properties2[WEVU_SLOT_PROPS_KEY];
5180
+ var _ref2, _instance$properties$, _instance$properties, _instance$properties2, _instance$properties3, _ref3, _instance$properties$2, _instance$properties4, _instance$properties5, _instance$properties6;
5181
+ if (hasOwn(override !== null && override !== void 0 ? override : {}, WEVU_SLOT_SCOPE_KEY)) instance[SLOT_SCOPE_OVERRIDE_KEY] = override[WEVU_SLOT_SCOPE_KEY];
5182
+ else if (hasOwn(override !== null && override !== void 0 ? override : {}, WEVU_GENERIC_SLOT_SCOPE_PROP)) instance[SLOT_SCOPE_OVERRIDE_KEY] = override[WEVU_GENERIC_SLOT_SCOPE_PROP];
5183
+ else if (hasOwn(override !== null && override !== void 0 ? override : {}, WEVU_GENERIC_SLOT_SCOPE_ATTR)) instance[SLOT_SCOPE_OVERRIDE_KEY] = override[WEVU_GENERIC_SLOT_SCOPE_ATTR];
5184
+ if (hasOwn(override !== null && override !== void 0 ? override : {}, WEVU_SLOT_PROPS_KEY)) instance[SLOT_PROPS_OVERRIDE_KEY] = override[WEVU_SLOT_PROPS_KEY];
5185
+ else if (hasOwn(override !== null && override !== void 0 ? override : {}, WEVU_GENERIC_SLOT_PROPS_PROP)) instance[SLOT_PROPS_OVERRIDE_KEY] = override[WEVU_GENERIC_SLOT_PROPS_PROP];
5186
+ else if (hasOwn(override !== null && override !== void 0 ? override : {}, WEVU_GENERIC_SLOT_PROPS_ATTR)) instance[SLOT_PROPS_OVERRIDE_KEY] = override[WEVU_GENERIC_SLOT_PROPS_ATTR];
5187
+ const scopeSource = hasOwn(override !== null && override !== void 0 ? override : {}, WEVU_SLOT_SCOPE_KEY) ? override[WEVU_SLOT_SCOPE_KEY] : hasOwn(override !== null && override !== void 0 ? override : {}, WEVU_GENERIC_SLOT_SCOPE_PROP) ? override[WEVU_GENERIC_SLOT_SCOPE_PROP] : hasOwn(override !== null && override !== void 0 ? override : {}, WEVU_GENERIC_SLOT_SCOPE_ATTR) ? override[WEVU_GENERIC_SLOT_SCOPE_ATTR] : hasOwn(instance !== null && instance !== void 0 ? instance : {}, SLOT_SCOPE_OVERRIDE_KEY) ? instance[SLOT_SCOPE_OVERRIDE_KEY] : (_ref2 = (_instance$properties$ = instance === null || instance === void 0 || (_instance$properties = instance.properties) === null || _instance$properties === void 0 ? void 0 : _instance$properties[WEVU_SLOT_SCOPE_KEY]) !== null && _instance$properties$ !== void 0 ? _instance$properties$ : instance === null || instance === void 0 || (_instance$properties2 = instance.properties) === null || _instance$properties2 === void 0 ? void 0 : _instance$properties2[WEVU_GENERIC_SLOT_SCOPE_PROP]) !== null && _ref2 !== void 0 ? _ref2 : instance === null || instance === void 0 || (_instance$properties3 = instance.properties) === null || _instance$properties3 === void 0 ? void 0 : _instance$properties3[WEVU_GENERIC_SLOT_SCOPE_ATTR];
5188
+ const propsSource = hasOwn(override !== null && override !== void 0 ? override : {}, WEVU_SLOT_PROPS_KEY) ? override[WEVU_SLOT_PROPS_KEY] : hasOwn(override !== null && override !== void 0 ? override : {}, WEVU_GENERIC_SLOT_PROPS_PROP) ? override[WEVU_GENERIC_SLOT_PROPS_PROP] : hasOwn(override !== null && override !== void 0 ? override : {}, WEVU_GENERIC_SLOT_PROPS_ATTR) ? override[WEVU_GENERIC_SLOT_PROPS_ATTR] : hasOwn(instance !== null && instance !== void 0 ? instance : {}, SLOT_PROPS_OVERRIDE_KEY) ? instance[SLOT_PROPS_OVERRIDE_KEY] : (_ref3 = (_instance$properties$2 = instance === null || instance === void 0 || (_instance$properties4 = instance.properties) === null || _instance$properties4 === void 0 ? void 0 : _instance$properties4[WEVU_SLOT_PROPS_KEY]) !== null && _instance$properties$2 !== void 0 ? _instance$properties$2 : instance === null || instance === void 0 || (_instance$properties5 = instance.properties) === null || _instance$properties5 === void 0 ? void 0 : _instance$properties5[WEVU_GENERIC_SLOT_PROPS_PROP]) !== null && _ref3 !== void 0 ? _ref3 : instance === null || instance === void 0 || (_instance$properties6 = instance.properties) === null || _instance$properties6 === void 0 ? void 0 : _instance$properties6[WEVU_GENERIC_SLOT_PROPS_ATTR];
5041
5189
  const scope = normalizeSlotBindings(scopeSource);
5042
5190
  const slotProps = normalizeSlotBindings(propsSource);
5043
5191
  const merged = {
5044
5192
  ...scope,
5045
5193
  ...slotProps
5046
5194
  };
5047
- if (typeof (instance === null || instance === void 0 ? void 0 : instance.setData) === "function") instance.setData({ [WEVU_SLOT_PROPS_DATA_KEY]: merged });
5195
+ syncScopedSlotData(instance, {
5196
+ [WEVU_SLOT_PROPS_DATA_KEY]: merged,
5197
+ [WEVU_GENERIC_SLOT_PROPS_DATA_KEY]: merged
5198
+ });
5199
+ }
5200
+ function resolveOwnerPropsOverride(instance, override) {
5201
+ if (override !== void 0) {
5202
+ const ownerProps = normalizeSlotBindings(override);
5203
+ instance[OWNER_PROPS_OVERRIDE_KEY] = ownerProps;
5204
+ return ownerProps;
5205
+ }
5206
+ if (hasOwn(instance !== null && instance !== void 0 ? instance : {}, OWNER_PROPS_OVERRIDE_KEY)) return normalizeSlotBindings(instance[OWNER_PROPS_OVERRIDE_KEY]);
5207
+ const properties = instance === null || instance === void 0 ? void 0 : instance.properties;
5208
+ if (!properties || typeof properties !== "object") return {};
5209
+ return normalizeSlotBindings(properties[WEVU_GENERIC_SLOT_OWNER_PROPS_ATTR]);
5210
+ }
5211
+ function syncOwnerPropsOverride(instance, override) {
5212
+ var _instance$__wevu$stat, _instance$__wevu, _instance$__wevu$stat2, _instance$__wevu2;
5213
+ const ownerProps = resolveOwnerPropsOverride(instance, override);
5214
+ if (!Object.keys(ownerProps).length) return ownerProps;
5215
+ syncRuntimeState(instance, {
5216
+ [WEVU_SLOT_OWNER_KEY]: {
5217
+ ...(_instance$__wevu$stat = instance === null || instance === void 0 || (_instance$__wevu = instance.__wevu) === null || _instance$__wevu === void 0 || (_instance$__wevu = _instance$__wevu.state) === null || _instance$__wevu === void 0 ? void 0 : _instance$__wevu[WEVU_SLOT_OWNER_KEY]) !== null && _instance$__wevu$stat !== void 0 ? _instance$__wevu$stat : {},
5218
+ ...ownerProps
5219
+ },
5220
+ [WEVU_GENERIC_SLOT_OWNER_DATA_KEY]: {
5221
+ ...(_instance$__wevu$stat2 = instance === null || instance === void 0 || (_instance$__wevu2 = instance.__wevu) === null || _instance$__wevu2 === void 0 || (_instance$__wevu2 = _instance$__wevu2.state) === null || _instance$__wevu2 === void 0 ? void 0 : _instance$__wevu2[WEVU_GENERIC_SLOT_OWNER_DATA_KEY]) !== null && _instance$__wevu$stat2 !== void 0 ? _instance$__wevu$stat2 : {},
5222
+ ...ownerProps
5223
+ }
5224
+ });
5225
+ syncNativeData(instance, createScopedSlotOwnerSetDataPayload(ownerProps));
5226
+ return ownerProps;
5227
+ }
5228
+ function syncRuntimeState(instance, payload) {
5229
+ var _instance$__wevu3;
5230
+ const state = instance === null || instance === void 0 || (_instance$__wevu3 = instance.__wevu) === null || _instance$__wevu3 === void 0 ? void 0 : _instance$__wevu3.state;
5231
+ if (!state || typeof state !== "object") return;
5232
+ for (const [key, value] of Object.entries(payload)) try {
5233
+ state[key] = value;
5234
+ } catch (_unused3) {}
5235
+ }
5236
+ function syncScopedSlotData(instance, payload) {
5237
+ syncRuntimeState(instance, payload);
5238
+ if (typeof (instance === null || instance === void 0 ? void 0 : instance.setData) === "function") instance.setData(payload);
5239
+ }
5240
+ function syncSlotPropsDataSource(instance, source) {
5241
+ const slotProps = normalizeSlotBindings(source);
5242
+ instance[SLOT_PROPS_OVERRIDE_KEY] = {
5243
+ ...normalizeSlotBindings(instance === null || instance === void 0 ? void 0 : instance[SLOT_PROPS_OVERRIDE_KEY]),
5244
+ ...slotProps
5245
+ };
5246
+ syncScopedSlotData(instance, {
5247
+ [WEVU_SLOT_PROPS_DATA_KEY]: slotProps,
5248
+ [WEVU_GENERIC_SLOT_PROPS_DATA_KEY]: slotProps
5249
+ });
5250
+ }
5251
+ function syncNativeData(instance, payload) {
5252
+ if (typeof (instance === null || instance === void 0 ? void 0 : instance.setData) === "function") {
5253
+ instance.setData(payload);
5254
+ return;
5255
+ }
5256
+ const data = instance === null || instance === void 0 ? void 0 : instance.data;
5257
+ if (!data || typeof data !== "object") return;
5258
+ Object.assign(data, payload);
5259
+ }
5260
+ function assignDefinedBinding(target, key, value) {
5261
+ if (typeof key === "string" && key && value !== void 0) target[key] = value;
5262
+ }
5263
+ function mergeDefinedBindings(target, value) {
5264
+ const bindings = normalizeSlotBindings(value);
5265
+ for (const [key, bindingValue] of Object.entries(bindings)) assignDefinedBinding(target, key, bindingValue);
5266
+ }
5267
+ function createScopedSlotOwnerSetDataPayload(ownerSnapshot) {
5268
+ const payload = {
5269
+ [WEVU_SLOT_OWNER_KEY]: ownerSnapshot,
5270
+ [WEVU_GENERIC_SLOT_OWNER_DATA_KEY]: ownerSnapshot,
5271
+ [WEVU_SLOT_PROPS_DATA_KEY]: ownerSnapshot,
5272
+ [WEVU_GENERIC_SLOT_PROPS_DATA_KEY]: ownerSnapshot
5273
+ };
5274
+ for (const [key, value] of Object.entries(ownerSnapshot)) {
5275
+ if (value === void 0) continue;
5276
+ payload[`${WEVU_SLOT_OWNER_KEY}.${key}`] = value;
5277
+ payload[`${WEVU_GENERIC_SLOT_OWNER_DATA_KEY}.${key}`] = value;
5278
+ payload[`${WEVU_GENERIC_SLOT_OWNER_PROP_PREFIX}${key}`] = value;
5279
+ }
5280
+ return payload;
5281
+ }
5282
+ function resolveMergedSlotPropsData(instance, ownerSnapshot) {
5283
+ return {
5284
+ ...ownerSnapshot,
5285
+ ...normalizeSlotBindings(instance === null || instance === void 0 ? void 0 : instance[SLOT_SCOPE_OVERRIDE_KEY]),
5286
+ ...normalizeSlotBindings(instance === null || instance === void 0 ? void 0 : instance[SLOT_PROPS_OVERRIDE_KEY])
5287
+ };
5288
+ }
5289
+ function collectScopedSlotOwnerComponentState(instance) {
5290
+ const owner = typeof (instance === null || instance === void 0 ? void 0 : instance.selectOwnerComponent) === "function" ? instance.selectOwnerComponent() : void 0;
5291
+ const parent = typeof (owner === null || owner === void 0 ? void 0 : owner.selectOwnerComponent) === "function" ? owner.selectOwnerComponent() : void 0;
5292
+ const ownerProps = {};
5293
+ const slotProps = {};
5294
+ const collectSource = (source) => {
5295
+ if (!source || typeof source !== "object") return;
5296
+ mergeDefinedBindings(ownerProps, source[WEVU_SLOT_OWNER_KEY]);
5297
+ mergeDefinedBindings(ownerProps, source[WEVU_GENERIC_SLOT_OWNER_DATA_KEY]);
5298
+ mergeDefinedBindings(ownerProps, source[WEVU_GENERIC_SLOT_OWNER_PROPS_ATTR]);
5299
+ mergeDefinedBindings(slotProps, source[WEVU_SLOT_PROPS_DATA_KEY]);
5300
+ mergeDefinedBindings(slotProps, source[WEVU_GENERIC_SLOT_PROPS_DATA_KEY]);
5301
+ mergeDefinedBindings(slotProps, source[WEVU_GENERIC_SLOT_PROPS_DATA_ATTR]);
5302
+ for (const [key, value] of Object.entries(source)) if (key.startsWith(WEVU_GENERIC_SLOT_OWNER_PROP_PREFIX)) assignDefinedBinding(ownerProps, key.slice(WEVU_GENERIC_SLOT_OWNER_PROP_PREFIX.length), value);
5303
+ else if (key.startsWith(`${WEVU_GENERIC_SLOT_PROPS_DATA_ATTR}_`)) mergeDefinedBindings(slotProps, value);
5304
+ };
5305
+ for (const component of [parent, owner]) {
5306
+ collectSource(component === null || component === void 0 ? void 0 : component.properties);
5307
+ collectSource(component === null || component === void 0 ? void 0 : component.data);
5308
+ collectSource(component);
5309
+ }
5310
+ return {
5311
+ ownerProps,
5312
+ slotProps
5313
+ };
5314
+ }
5315
+ function syncOwnerComponentScopedSlotState(instance) {
5316
+ var _instance$__wevu$stat3, _instance$__wevu4, _instance$__wevu$stat4, _instance$__wevu5;
5317
+ const { ownerProps, slotProps } = collectScopedSlotOwnerComponentState(instance);
5318
+ const merged = {
5319
+ ...slotProps,
5320
+ ...ownerProps
5321
+ };
5322
+ if (!Object.keys(merged).length) return;
5323
+ instance[OWNER_PROPS_OVERRIDE_KEY] = {
5324
+ ...normalizeSlotBindings(instance[OWNER_PROPS_OVERRIDE_KEY]),
5325
+ ...merged
5326
+ };
5327
+ syncRuntimeState(instance, {
5328
+ [WEVU_SLOT_OWNER_KEY]: {
5329
+ ...(_instance$__wevu$stat3 = instance === null || instance === void 0 || (_instance$__wevu4 = instance.__wevu) === null || _instance$__wevu4 === void 0 || (_instance$__wevu4 = _instance$__wevu4.state) === null || _instance$__wevu4 === void 0 ? void 0 : _instance$__wevu4[WEVU_SLOT_OWNER_KEY]) !== null && _instance$__wevu$stat3 !== void 0 ? _instance$__wevu$stat3 : {},
5330
+ ...merged
5331
+ },
5332
+ [WEVU_GENERIC_SLOT_OWNER_DATA_KEY]: {
5333
+ ...(_instance$__wevu$stat4 = instance === null || instance === void 0 || (_instance$__wevu5 = instance.__wevu) === null || _instance$__wevu5 === void 0 || (_instance$__wevu5 = _instance$__wevu5.state) === null || _instance$__wevu5 === void 0 ? void 0 : _instance$__wevu5[WEVU_GENERIC_SLOT_OWNER_DATA_KEY]) !== null && _instance$__wevu$stat4 !== void 0 ? _instance$__wevu$stat4 : {},
5334
+ ...merged
5335
+ },
5336
+ [WEVU_SLOT_PROPS_DATA_KEY]: merged,
5337
+ [WEVU_GENERIC_SLOT_PROPS_DATA_KEY]: merged
5338
+ });
5339
+ syncNativeData(instance, createScopedSlotOwnerSetDataPayload(merged));
5340
+ }
5341
+ function createScopedSlotComputedContext(instance, ownerSnapshot, ownerProxy) {
5342
+ var _instance$__wevu6;
5343
+ const state = instance === null || instance === void 0 || (_instance$__wevu6 = instance.__wevu) === null || _instance$__wevu6 === void 0 ? void 0 : _instance$__wevu6.state;
5344
+ return new Proxy(Object.create(null), {
5345
+ get(_target, key) {
5346
+ if (key === WEVU_SLOT_OWNER_PROXY_KEY) return ownerProxy;
5347
+ if (key === WEVU_SLOT_OWNER_KEY || key === WEVU_GENERIC_SLOT_OWNER_DATA_KEY) return ownerSnapshot;
5348
+ if (state && typeof state === "object" && key in state) return state[key];
5349
+ return instance === null || instance === void 0 ? void 0 : instance[key];
5350
+ },
5351
+ has(_target, key) {
5352
+ return key === WEVU_SLOT_OWNER_PROXY_KEY || key === WEVU_SLOT_OWNER_KEY || key === WEVU_GENERIC_SLOT_OWNER_DATA_KEY || Boolean(state && typeof state === "object" && key in state) || Boolean(instance && key in instance);
5353
+ }
5354
+ });
5355
+ }
5356
+ function collectScopedSlotComputedDataFromDefs(instance, ownerSnapshot, ownerProxy, computedDefs) {
5357
+ const payload = {};
5358
+ const context = createScopedSlotComputedContext(instance, ownerSnapshot, ownerProxy);
5359
+ for (const [key, definition] of Object.entries(computedDefs)) try {
5360
+ const getter = typeof definition === "function" ? definition : definition === null || definition === void 0 ? void 0 : definition.get;
5361
+ if (typeof getter !== "function") continue;
5362
+ const value = getter.call(context);
5363
+ if (value !== void 0) payload[key] = cloneSnapshotValue(value);
5364
+ } catch (_unused4) {}
5365
+ return payload;
5366
+ }
5367
+ function collectScopedSlotComputedData(instance, ownerSnapshot, ownerProxy, computedDefs) {
5368
+ var _instance$__wevu7;
5369
+ if (computedDefs && typeof computedDefs === "object") return collectScopedSlotComputedDataFromDefs(instance, ownerSnapshot, ownerProxy, computedDefs);
5370
+ const computed = instance === null || instance === void 0 || (_instance$__wevu7 = instance.__wevu) === null || _instance$__wevu7 === void 0 ? void 0 : _instance$__wevu7.computed;
5371
+ if (!computed || typeof computed !== "object") return {};
5372
+ const payload = {};
5373
+ for (const key of Object.keys(computed)) try {
5374
+ const value = computed[key];
5375
+ if (value !== void 0) payload[key] = cloneSnapshotValue(value);
5376
+ } catch (_unused5) {}
5377
+ return payload;
5378
+ }
5379
+ function syncScopedSlotOwnerSnapshot(instance, snapshot, proxy, computedDefs) {
5380
+ var _instance$__wevu8;
5381
+ const ownerSnapshot = {
5382
+ ...cloneSnapshotValue(snapshot || {}),
5383
+ ...resolveOwnerPropsOverride(instance)
5384
+ };
5385
+ const ownerProxy = proxy && typeof proxy === "object" ? markRaw(proxy) : proxy;
5386
+ instance[WEVU_SLOT_OWNER_PROXY_KEY] = ownerProxy;
5387
+ syncRuntimeState(instance, {
5388
+ [WEVU_SLOT_OWNER_KEY]: ownerSnapshot,
5389
+ [WEVU_SLOT_OWNER_PROXY_KEY]: ownerProxy
5390
+ });
5391
+ const flushSetupSnapshot = (_instance$__wevu8 = instance.__wevu) === null || _instance$__wevu8 === void 0 ? void 0 : _instance$__wevu8.__wevu_flushSetupSnapshotSync;
5392
+ if (typeof flushSetupSnapshot === "function") flushSetupSnapshot();
5393
+ const computedPayload = collectScopedSlotComputedData(instance, ownerSnapshot, ownerProxy, computedDefs);
5394
+ const mergedOwnerSnapshot = {
5395
+ ...ownerSnapshot,
5396
+ ...computedPayload
5397
+ };
5398
+ for (const [key, value] of Object.entries(computedPayload)) ownerSnapshot[key] = value;
5399
+ syncRuntimeState(instance, { [WEVU_SLOT_OWNER_KEY]: mergedOwnerSnapshot });
5400
+ const payload = {
5401
+ ...computedPayload,
5402
+ ...createScopedSlotOwnerSetDataPayload(mergedOwnerSnapshot)
5403
+ };
5404
+ const slotPropsData = resolveMergedSlotPropsData(instance, mergedOwnerSnapshot);
5405
+ payload[WEVU_SLOT_PROPS_DATA_KEY] = slotPropsData;
5406
+ payload[WEVU_GENERIC_SLOT_PROPS_DATA_KEY] = slotPropsData;
5407
+ syncNativeData(instance, payload);
5408
+ }
5409
+ function enqueueScopedSlotOwnerSync(instance, snapshot, proxy, computedDefs) {
5410
+ instance.__wvOwnerPendingSnapshot = snapshot;
5411
+ instance.__wvOwnerPendingProxy = proxy;
5412
+ if (instance.__wvOwnerSyncTimer) return;
5413
+ const flush = () => {
5414
+ instance.__wvOwnerSyncTimer = void 0;
5415
+ const pendingSnapshot = instance.__wvOwnerPendingSnapshot;
5416
+ const pendingProxy = instance.__wvOwnerPendingProxy;
5417
+ instance.__wvOwnerPendingSnapshot = void 0;
5418
+ instance.__wvOwnerPendingProxy = void 0;
5419
+ syncScopedSlotOwnerSnapshot(instance, pendingSnapshot || {}, pendingProxy, computedDefs);
5420
+ };
5421
+ if (typeof setTimeout === "function") instance.__wvOwnerSyncTimer = setTimeout(flush, 0);
5422
+ else flush();
5423
+ }
5424
+ function subscribeScopedSlotOwner(instance, ownerId, computedDefs) {
5425
+ if (instance.__wvOwnerIdCurrent === ownerId) return;
5426
+ if (typeof instance.__wvOwnerUnsub === "function") instance.__wvOwnerUnsub();
5427
+ instance.__wvOwnerUnsub = void 0;
5428
+ instance.__wvOwnerIdCurrent = ownerId;
5429
+ if (!ownerId) return;
5430
+ const updateOwner = (snapshot, proxy) => {
5431
+ enqueueScopedSlotOwnerSync(instance, snapshot, proxy, computedDefs);
5432
+ };
5433
+ instance.__wvOwnerUnsub = subscribeOwner(ownerId, updateOwner);
5434
+ const snapshot = getOwnerSnapshot(ownerId);
5435
+ if (snapshot) updateOwner(snapshot, getOwnerProxy(ownerId));
5436
+ }
5437
+ function resolveScopedSlotOwnerId(instance) {
5438
+ var _instance$properties7, _instance$properties8, _instance$properties9, _instance$properties10;
5439
+ const ownOwnerId = resolveScopedSlotOwnOwnerId(instance);
5440
+ const resolveCandidate = (...values) => {
5441
+ for (const value of values) if (typeof value === "string" && value && value !== ownOwnerId) {
5442
+ rememberSlotOwnerId(value);
5443
+ return value;
5444
+ }
5445
+ return "";
5446
+ };
5447
+ const selfCandidate = (instance === null || instance === void 0 || (_instance$properties7 = instance.properties) === null || _instance$properties7 === void 0 ? void 0 : _instance$properties7[WEVU_SLOT_OWNER_ID_KEY]) || (instance === null || instance === void 0 ? void 0 : instance[WEVU_SLOT_OWNER_ID_KEY]);
5448
+ const resolveComponentOwnerId = (component) => {
5449
+ var _data$WEVU_SLOT_OWNER, _data$WEVU_SLOT_OWNER2, _data$WEVU_SLOT_OWNER3, _data$WEVU_SLOT_OWNER4, _data$WEVU_SLOT_OWNER5, _data$WEVU_SLOT_OWNER6, _data$WEVU_SLOT_OWNER7, _data$WEVU_SLOT_OWNER8;
5450
+ const data = component === null || component === void 0 ? void 0 : component.data;
5451
+ const properties = component === null || component === void 0 ? void 0 : component.properties;
5452
+ return resolveCandidate(properties === null || properties === void 0 ? void 0 : properties[WEVU_GENERIC_SLOT_OWNER_ID_ATTR], properties === null || properties === void 0 ? void 0 : properties[WEVU_GENERIC_SLOT_OWNER_ID_PROP], properties === null || properties === void 0 ? void 0 : properties[WEVU_SLOT_OWNER_ID_PROP], properties === null || properties === void 0 ? void 0 : properties[WEVU_SLOT_OWNER_ID_KEY], data === null || data === void 0 ? void 0 : data[WEVU_GENERIC_SLOT_OWNER_ID_ATTR], data === null || data === void 0 ? void 0 : data[WEVU_GENERIC_SLOT_OWNER_ID_PROP], data === null || data === void 0 ? void 0 : data[WEVU_SLOT_OWNER_ID_PROP], data === null || data === void 0 || (_data$WEVU_SLOT_OWNER = data[WEVU_SLOT_OWNER_KEY]) === null || _data$WEVU_SLOT_OWNER === void 0 ? void 0 : _data$WEVU_SLOT_OWNER[WEVU_GENERIC_SLOT_OWNER_ID_ATTR], data === null || data === void 0 || (_data$WEVU_SLOT_OWNER2 = data[WEVU_SLOT_OWNER_KEY]) === null || _data$WEVU_SLOT_OWNER2 === void 0 ? void 0 : _data$WEVU_SLOT_OWNER2[WEVU_GENERIC_SLOT_OWNER_ID_PROP], data === null || data === void 0 || (_data$WEVU_SLOT_OWNER3 = data[WEVU_SLOT_OWNER_KEY]) === null || _data$WEVU_SLOT_OWNER3 === void 0 ? void 0 : _data$WEVU_SLOT_OWNER3[WEVU_SLOT_OWNER_ID_PROP], data === null || data === void 0 || (_data$WEVU_SLOT_OWNER4 = data[WEVU_SLOT_OWNER_KEY]) === null || _data$WEVU_SLOT_OWNER4 === void 0 ? void 0 : _data$WEVU_SLOT_OWNER4[WEVU_SLOT_OWNER_ID_KEY], data === null || data === void 0 || (_data$WEVU_SLOT_OWNER5 = data[WEVU_SLOT_OWNER_KEY]) === null || _data$WEVU_SLOT_OWNER5 === void 0 || (_data$WEVU_SLOT_OWNER5 = _data$WEVU_SLOT_OWNER5[WEVU_SLOT_OWNER_KEY]) === null || _data$WEVU_SLOT_OWNER5 === void 0 ? void 0 : _data$WEVU_SLOT_OWNER5[WEVU_GENERIC_SLOT_OWNER_ID_ATTR], data === null || data === void 0 || (_data$WEVU_SLOT_OWNER6 = data[WEVU_SLOT_OWNER_KEY]) === null || _data$WEVU_SLOT_OWNER6 === void 0 || (_data$WEVU_SLOT_OWNER6 = _data$WEVU_SLOT_OWNER6[WEVU_SLOT_OWNER_KEY]) === null || _data$WEVU_SLOT_OWNER6 === void 0 ? void 0 : _data$WEVU_SLOT_OWNER6[WEVU_GENERIC_SLOT_OWNER_ID_PROP], data === null || data === void 0 || (_data$WEVU_SLOT_OWNER7 = data[WEVU_SLOT_OWNER_KEY]) === null || _data$WEVU_SLOT_OWNER7 === void 0 || (_data$WEVU_SLOT_OWNER7 = _data$WEVU_SLOT_OWNER7[WEVU_SLOT_OWNER_KEY]) === null || _data$WEVU_SLOT_OWNER7 === void 0 ? void 0 : _data$WEVU_SLOT_OWNER7[WEVU_SLOT_OWNER_ID_PROP], data === null || data === void 0 || (_data$WEVU_SLOT_OWNER8 = data[WEVU_SLOT_OWNER_KEY]) === null || _data$WEVU_SLOT_OWNER8 === void 0 || (_data$WEVU_SLOT_OWNER8 = _data$WEVU_SLOT_OWNER8[WEVU_SLOT_OWNER_KEY]) === null || _data$WEVU_SLOT_OWNER8 === void 0 ? void 0 : _data$WEVU_SLOT_OWNER8[WEVU_SLOT_OWNER_ID_KEY], component === null || component === void 0 ? void 0 : component[WEVU_GENERIC_SLOT_OWNER_ID_ATTR], component === null || component === void 0 ? void 0 : component[WEVU_GENERIC_SLOT_OWNER_ID_PROP], component === null || component === void 0 ? void 0 : component[WEVU_SLOT_OWNER_ID_PROP], data === null || data === void 0 ? void 0 : data[WEVU_SLOT_OWNER_ID_KEY], component === null || component === void 0 ? void 0 : component[WEVU_SLOT_OWNER_ID_KEY]);
5453
+ };
5454
+ const propertyOwnerId = resolveCandidate(instance === null || instance === void 0 || (_instance$properties8 = instance.properties) === null || _instance$properties8 === void 0 ? void 0 : _instance$properties8[WEVU_GENERIC_SLOT_OWNER_ID_ATTR], instance === null || instance === void 0 || (_instance$properties9 = instance.properties) === null || _instance$properties9 === void 0 ? void 0 : _instance$properties9[WEVU_GENERIC_SLOT_OWNER_ID_PROP], instance === null || instance === void 0 || (_instance$properties10 = instance.properties) === null || _instance$properties10 === void 0 ? void 0 : _instance$properties10[WEVU_SLOT_OWNER_ID_PROP]);
5455
+ if (propertyOwnerId) return propertyOwnerId;
5456
+ const owner = typeof (instance === null || instance === void 0 ? void 0 : instance.selectOwnerComponent) === "function" ? instance.selectOwnerComponent() : void 0;
5457
+ const ownerId = resolveComponentOwnerId(owner);
5458
+ if (ownerId) return ownerId;
5459
+ const parentOwnerId = resolveComponentOwnerId(typeof (owner === null || owner === void 0 ? void 0 : owner.selectOwnerComponent) === "function" ? owner.selectOwnerComponent() : void 0);
5460
+ if (parentOwnerId) return parentOwnerId;
5461
+ const directOwnerId = resolveCandidate(selfCandidate);
5462
+ if (directOwnerId) return directOwnerId;
5463
+ const fallbackOwnerId = getFallbackSlotOwnerId();
5464
+ return fallbackOwnerId && fallbackOwnerId !== ownOwnerId ? fallbackOwnerId : "";
5465
+ }
5466
+ function enqueueScopedSlotOwnerPropertySubscription(instance, ownerId, computedDefs) {
5467
+ const ownOwnerId = resolveScopedSlotOwnOwnerId(instance);
5468
+ if (typeof ownerId !== "string" || !ownerId || ownerId === ownOwnerId) return;
5469
+ rememberSlotOwnerId(ownerId);
5470
+ enqueueScopedSlotOwnerSubscription(instance, ownerId, {}, computedDefs);
5471
+ }
5472
+ function resolveScopedSlotOwnerPropertyCandidate(instance, ...values) {
5473
+ const ownOwnerId = resolveScopedSlotOwnOwnerId(instance);
5474
+ for (const value of values) if (typeof value === "string" && value && value !== ownOwnerId) return value;
5475
+ return "";
5476
+ }
5477
+ function resolveScopedSlotOwnOwnerId(instance) {
5478
+ var _instance$properties11;
5479
+ const directOwnerId = instance === null || instance === void 0 ? void 0 : instance[WEVU_SLOT_OWNER_ID_KEY];
5480
+ if (typeof directOwnerId === "string" && directOwnerId && directOwnerId !== (instance === null || instance === void 0 || (_instance$properties11 = instance.properties) === null || _instance$properties11 === void 0 ? void 0 : _instance$properties11[WEVU_SLOT_OWNER_ID_KEY])) return directOwnerId;
5481
+ return "";
5482
+ }
5483
+ function enqueueScopedSlotOwnerSubscription(instance, ownerId, options = {}, computedDefs) {
5484
+ if (options.preservePendingOwnerId && !ownerId && instance.__wvOwnerSubscribeTimer && typeof instance.__wvOwnerPendingId === "string" && instance.__wvOwnerPendingId) return;
5485
+ instance.__wvOwnerPendingId = ownerId;
5486
+ if (instance.__wvOwnerSubscribeTimer) return;
5487
+ const flush = () => {
5488
+ instance.__wvOwnerSubscribeTimer = void 0;
5489
+ const pendingOwnerId = instance.__wvOwnerPendingId;
5490
+ instance.__wvOwnerPendingId = void 0;
5491
+ subscribeScopedSlotOwner(instance, typeof pendingOwnerId === "string" ? pendingOwnerId : "", computedDefs);
5492
+ };
5493
+ if (typeof setTimeout === "function") instance.__wvOwnerSubscribeTimer = setTimeout(flush, 0);
5494
+ else flush();
5495
+ }
5496
+ function retryScopedSlotOwnerSubscription(instance, computedDefs, remaining = 4) {
5497
+ if (remaining <= 0 || instance.__wvOwnerIdCurrent) return;
5498
+ const retry = () => {
5499
+ const ownerId = resolveScopedSlotOwnerId(instance);
5500
+ if (ownerId) {
5501
+ enqueueScopedSlotOwnerSubscription(instance, ownerId, { preservePendingOwnerId: true }, computedDefs);
5502
+ return;
5503
+ }
5504
+ retryScopedSlotOwnerSubscription(instance, computedDefs, remaining - 1);
5505
+ };
5506
+ if (typeof setTimeout === "function") instance.__wvOwnerRetryTimer = setTimeout(retry, 16);
5507
+ else retry();
5048
5508
  }
5049
5509
  function createScopedSlotOptions(overrides) {
5510
+ var _overrides$computed;
5511
+ const computedKeys = Object.keys((_overrides$computed = overrides === null || overrides === void 0 ? void 0 : overrides.computed) !== null && _overrides$computed !== void 0 ? _overrides$computed : {});
5512
+ const scopedSlotComputed = overrides === null || overrides === void 0 ? void 0 : overrides.computed;
5050
5513
  const baseOptions = {
5051
- options: { virtualHost: true },
5052
5514
  properties: {
5053
5515
  [WEVU_SLOT_OWNER_ID_KEY]: {
5054
5516
  type: String,
5055
- value: ""
5517
+ value: "",
5518
+ observer(next) {
5519
+ var _this$properties, _this$properties2, _this$properties3;
5520
+ const ownerId = resolveScopedSlotOwnerPropertyCandidate(this, (_this$properties = this.properties) === null || _this$properties === void 0 ? void 0 : _this$properties[WEVU_GENERIC_SLOT_OWNER_ID_ATTR], (_this$properties2 = this.properties) === null || _this$properties2 === void 0 ? void 0 : _this$properties2[WEVU_GENERIC_SLOT_OWNER_ID_PROP], (_this$properties3 = this.properties) === null || _this$properties3 === void 0 ? void 0 : _this$properties3[WEVU_SLOT_OWNER_ID_PROP], next);
5521
+ enqueueScopedSlotOwnerPropertySubscription(this, ownerId, scopedSlotComputed);
5522
+ }
5523
+ },
5524
+ [WEVU_SLOT_OWNER_ID_PROP]: {
5525
+ type: String,
5526
+ value: "",
5527
+ observer(next) {
5528
+ var _this$properties4, _this$properties5, _this$properties6;
5529
+ const ownerId = resolveScopedSlotOwnerPropertyCandidate(this, next, (_this$properties4 = this.properties) === null || _this$properties4 === void 0 ? void 0 : _this$properties4[WEVU_GENERIC_SLOT_OWNER_ID_ATTR], (_this$properties5 = this.properties) === null || _this$properties5 === void 0 ? void 0 : _this$properties5[WEVU_GENERIC_SLOT_OWNER_ID_PROP], (_this$properties6 = this.properties) === null || _this$properties6 === void 0 ? void 0 : _this$properties6[WEVU_SLOT_OWNER_ID_KEY]);
5530
+ enqueueScopedSlotOwnerPropertySubscription(this, ownerId, scopedSlotComputed);
5531
+ }
5532
+ },
5533
+ [WEVU_GENERIC_SLOT_OWNER_ID_PROP]: {
5534
+ type: String,
5535
+ value: "",
5536
+ observer(next) {
5537
+ var _this$properties7, _this$properties8, _this$properties9;
5538
+ const ownerId = resolveScopedSlotOwnerPropertyCandidate(this, next, (_this$properties7 = this.properties) === null || _this$properties7 === void 0 ? void 0 : _this$properties7[WEVU_GENERIC_SLOT_OWNER_ID_ATTR], (_this$properties8 = this.properties) === null || _this$properties8 === void 0 ? void 0 : _this$properties8[WEVU_SLOT_OWNER_ID_PROP], (_this$properties9 = this.properties) === null || _this$properties9 === void 0 ? void 0 : _this$properties9[WEVU_SLOT_OWNER_ID_KEY]);
5539
+ enqueueScopedSlotOwnerPropertySubscription(this, ownerId, scopedSlotComputed);
5540
+ }
5541
+ },
5542
+ [WEVU_GENERIC_SLOT_OWNER_ID_ATTR]: {
5543
+ type: String,
5544
+ value: "",
5545
+ observer(next) {
5546
+ var _this$properties10, _this$properties11, _this$properties12;
5547
+ const ownerId = resolveScopedSlotOwnerPropertyCandidate(this, next, (_this$properties10 = this.properties) === null || _this$properties10 === void 0 ? void 0 : _this$properties10[WEVU_GENERIC_SLOT_OWNER_ID_PROP], (_this$properties11 = this.properties) === null || _this$properties11 === void 0 ? void 0 : _this$properties11[WEVU_SLOT_OWNER_ID_PROP], (_this$properties12 = this.properties) === null || _this$properties12 === void 0 ? void 0 : _this$properties12[WEVU_SLOT_OWNER_ID_KEY]);
5548
+ enqueueScopedSlotOwnerPropertySubscription(this, ownerId, scopedSlotComputed);
5549
+ }
5550
+ },
5551
+ [WEVU_GENERIC_SLOT_OWNER_PROPS_ATTR]: {
5552
+ type: null,
5553
+ value: null,
5554
+ observer(next) {
5555
+ syncOwnerPropsOverride(this, next);
5556
+ if (this.__wvOwnerIdCurrent) {
5557
+ var _getOwnerSnapshot;
5558
+ const snapshot = (_getOwnerSnapshot = getOwnerSnapshot(this.__wvOwnerIdCurrent)) !== null && _getOwnerSnapshot !== void 0 ? _getOwnerSnapshot : {};
5559
+ syncScopedSlotOwnerSnapshot(this, snapshot, getOwnerProxy(this.__wvOwnerIdCurrent), scopedSlotComputed);
5560
+ }
5561
+ }
5056
5562
  },
5057
5563
  [WEVU_SLOT_PROPS_KEY]: {
5058
5564
  type: null,
@@ -5061,45 +5567,114 @@ function createScopedSlotOptions(overrides) {
5061
5567
  mergeSlotProps(this, { [WEVU_SLOT_PROPS_KEY]: next });
5062
5568
  }
5063
5569
  },
5570
+ [WEVU_GENERIC_SLOT_PROPS_PROP]: {
5571
+ type: null,
5572
+ value: null,
5573
+ observer(next) {
5574
+ mergeSlotProps(this, { [WEVU_GENERIC_SLOT_PROPS_PROP]: next });
5575
+ }
5576
+ },
5577
+ [WEVU_GENERIC_SLOT_PROPS_ATTR]: {
5578
+ type: null,
5579
+ value: null,
5580
+ observer(next) {
5581
+ mergeSlotProps(this, { [WEVU_GENERIC_SLOT_PROPS_ATTR]: next });
5582
+ }
5583
+ },
5584
+ [WEVU_GENERIC_SLOT_PROPS_DATA_ATTR]: {
5585
+ type: null,
5586
+ value: null,
5587
+ observer(next) {
5588
+ syncSlotPropsDataSource(this, next);
5589
+ }
5590
+ },
5064
5591
  [WEVU_SLOT_SCOPE_KEY]: {
5065
5592
  type: null,
5066
5593
  value: null,
5067
5594
  observer(next) {
5068
5595
  mergeSlotProps(this, { [WEVU_SLOT_SCOPE_KEY]: next });
5069
5596
  }
5597
+ },
5598
+ [WEVU_GENERIC_SLOT_SCOPE_PROP]: {
5599
+ type: null,
5600
+ value: null,
5601
+ observer(next) {
5602
+ mergeSlotProps(this, { [WEVU_GENERIC_SLOT_SCOPE_PROP]: next });
5603
+ }
5604
+ },
5605
+ [WEVU_GENERIC_SLOT_SCOPE_ATTR]: {
5606
+ type: null,
5607
+ value: null,
5608
+ observer(next) {
5609
+ mergeSlotProps(this, { [WEVU_GENERIC_SLOT_SCOPE_ATTR]: next });
5610
+ }
5070
5611
  }
5071
5612
  },
5072
- data: () => ({
5073
- [WEVU_SLOT_OWNER_KEY]: {},
5074
- [WEVU_SLOT_PROPS_DATA_KEY]: {}
5075
- }),
5613
+ data: () => {
5614
+ const initialData = {
5615
+ [WEVU_SLOT_OWNER_KEY]: {},
5616
+ [WEVU_GENERIC_SLOT_OWNER_DATA_KEY]: {},
5617
+ [WEVU_SLOT_PROPS_DATA_KEY]: {},
5618
+ [WEVU_GENERIC_SLOT_PROPS_DATA_KEY]: {}
5619
+ };
5620
+ for (const key of computedKeys) initialData[key] = null;
5621
+ return initialData;
5622
+ },
5623
+ options: { virtualHost: true },
5624
+ setData: computedKeys.length ? {
5625
+ includeComputed: true,
5626
+ pick: [
5627
+ ...computedKeys,
5628
+ WEVU_SLOT_OWNER_KEY,
5629
+ WEVU_GENERIC_SLOT_OWNER_DATA_KEY,
5630
+ WEVU_SLOT_PROPS_DATA_KEY,
5631
+ WEVU_GENERIC_SLOT_PROPS_DATA_KEY
5632
+ ]
5633
+ } : void 0,
5076
5634
  lifetimes: {
5077
5635
  attached() {
5078
- var _this$properties$WEVU, _this$properties;
5079
- const ownerId = (_this$properties$WEVU = (_this$properties = this.properties) === null || _this$properties === void 0 ? void 0 : _this$properties[WEVU_SLOT_OWNER_ID_KEY]) !== null && _this$properties$WEVU !== void 0 ? _this$properties$WEVU : "";
5636
+ const ownerId = resolveScopedSlotOwnerId(this);
5080
5637
  mergeSlotProps(this);
5081
- if (!ownerId) return;
5082
- const updateOwner = (snapshot, proxy) => {
5083
- this.__wvOwnerProxy = proxy;
5084
- if (typeof this.setData === "function") this.setData({ [WEVU_SLOT_OWNER_KEY]: snapshot || {} });
5085
- };
5086
- this.__wvOwnerUnsub = subscribeOwner(ownerId, updateOwner);
5087
- const snapshot = getOwnerSnapshot(ownerId);
5088
- if (snapshot) updateOwner(snapshot, getOwnerProxy(ownerId));
5638
+ syncOwnerPropsOverride(this);
5639
+ syncOwnerComponentScopedSlotState(this);
5640
+ enqueueScopedSlotOwnerSubscription(this, ownerId, { preservePendingOwnerId: true }, scopedSlotComputed);
5641
+ if (!ownerId) retryScopedSlotOwnerSubscription(this, scopedSlotComputed);
5642
+ },
5643
+ ready() {
5644
+ const ownerId = resolveScopedSlotOwnerId(this);
5645
+ mergeSlotProps(this);
5646
+ syncOwnerPropsOverride(this);
5647
+ syncOwnerComponentScopedSlotState(this);
5648
+ enqueueScopedSlotOwnerSubscription(this, ownerId, { preservePendingOwnerId: true }, scopedSlotComputed);
5649
+ if (!ownerId) retryScopedSlotOwnerSubscription(this, scopedSlotComputed);
5089
5650
  },
5090
5651
  detached() {
5091
5652
  if (typeof this.__wvOwnerUnsub === "function") this.__wvOwnerUnsub();
5653
+ if (this.__wvOwnerSubscribeTimer && typeof clearTimeout === "function") clearTimeout(this.__wvOwnerSubscribeTimer);
5654
+ if (this.__wvOwnerSyncTimer && typeof clearTimeout === "function") clearTimeout(this.__wvOwnerSyncTimer);
5655
+ if (this.__wvOwnerRetryTimer && typeof clearTimeout === "function") clearTimeout(this.__wvOwnerRetryTimer);
5092
5656
  this.__wvOwnerUnsub = void 0;
5093
- this.__wvOwnerProxy = void 0;
5657
+ this.__wvOwnerIdCurrent = void 0;
5658
+ this.__wvOwnerSubscribeTimer = void 0;
5659
+ this.__wvOwnerPendingId = void 0;
5660
+ this.__wvOwnerSyncTimer = void 0;
5661
+ this.__wvOwnerPendingSnapshot = void 0;
5662
+ this.__wvOwnerPendingProxy = void 0;
5663
+ this.__wvOwnerRetryTimer = void 0;
5664
+ this[WEVU_SLOT_OWNER_PROXY_KEY] = void 0;
5665
+ this[OWNER_PROPS_OVERRIDE_KEY] = void 0;
5666
+ this[SLOT_PROPS_OVERRIDE_KEY] = void 0;
5667
+ this[SLOT_SCOPE_OVERRIDE_KEY] = void 0;
5094
5668
  }
5095
5669
  },
5096
5670
  methods: { [WEVU_OWNER_HANDLER](event) {
5097
- var _wevu, _ref2, _event$currentTarget$2, _event$currentTarget2, _event$target2;
5098
- const owner = this.__wvOwnerProxy;
5099
- const result = runInlineExpression(owner, void 0, event, (_wevu = this.__wevu) === null || _wevu === void 0 || (_wevu = _wevu.methods) === null || _wevu === void 0 ? void 0 : _wevu[WEVU_INLINE_MAP_KEY]);
5100
- if (result !== void 0) return result;
5671
+ var _wevu, _ref4, _event$currentTarget$2, _event$currentTarget2, _event$target2;
5672
+ const owner = this[WEVU_SLOT_OWNER_PROXY_KEY];
5673
+ const inlineMap = (_wevu = this.__wevu) === null || _wevu === void 0 || (_wevu = _wevu.methods) === null || _wevu === void 0 ? void 0 : _wevu[WEVU_INLINE_MAP_KEY];
5674
+ const dataset = (_ref4 = (_event$currentTarget$2 = event === null || event === void 0 || (_event$currentTarget2 = event.currentTarget) === null || _event$currentTarget2 === void 0 ? void 0 : _event$currentTarget2.dataset) !== null && _event$currentTarget$2 !== void 0 ? _event$currentTarget$2 : event === null || event === void 0 || (_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.dataset) !== null && _ref4 !== void 0 ? _ref4 : {};
5675
+ if (resolveDatasetEventValue(dataset, "wvInlineId", event) && inlineMap) return runInlineExpression(owner, void 0, event, inlineMap);
5101
5676
  if (!owner) return;
5102
- const handlerName = resolveDatasetEventValue((_ref2 = (_event$currentTarget$2 = event === null || event === void 0 || (_event$currentTarget2 = event.currentTarget) === null || _event$currentTarget2 === void 0 ? void 0 : _event$currentTarget2.dataset) !== null && _event$currentTarget$2 !== void 0 ? _event$currentTarget$2 : event === null || event === void 0 || (_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.dataset) !== null && _ref2 !== void 0 ? _ref2 : {}, "wvHandler", event);
5677
+ const handlerName = resolveDatasetEventValue(dataset, "wvHandler", event);
5103
5678
  if (typeof handlerName !== "string" || !handlerName) return;
5104
5679
  const handler = owner === null || owner === void 0 ? void 0 : owner[handlerName];
5105
5680
  if (typeof handler !== "function") return;
@@ -5269,7 +5844,7 @@ function createWevuComponent(options) {
5269
5844
  * @internal
5270
5845
  */
5271
5846
  function createWevuScopedSlotComponent(overrides) {
5272
- createWevuComponent(createScopedSlotOptions(overrides));
5847
+ defineComponent(createScopedSlotOptions(overrides));
5273
5848
  }
5274
5849
  scopedSlotCreator = createWevuScopedSlotComponent;
5275
5850
  ensureScopedSlotComponentGlobal();
@@ -6007,4 +6582,4 @@ function useTemplateRef(name) {
6007
6582
 
6008
6583
  //#endregion
6009
6584
  export { isNoSetData as $, createApp as A, waitForLayoutHost as B, usePageStack as C, shallowRef as Ct, createWevuComponent as D, useDisposables as E, __reExport as Et, resolveLayoutHost as F, runSetupFunction as G, mountRuntimeInstance as H, unregisterPageLayoutBridge as I, syncRuntimePageLayoutState as J, resolveRuntimePageLayoutName as K, unregisterRuntimeLayoutHosts as L, registerPageLayoutBridge as M, registerRuntimeLayoutHosts as N, createWevuScopedSlotComponent as O, resolveLayoutBridge as P, setWevuDefaults as Q, useLayoutBridge as R, useNavigationBarMetrics as S, isShallowRef as St, useElementIntersectionObserver as T, __exportAll as Tt, setRuntimeSetDataVisibility as U, registerApp as V, teardownRuntimeInstance as W, usePageLayout as X, syncRuntimePageLayoutStateFromRuntime as Y, resetWevuDefaults as Z, useSelectorQuery as _, onUnmounted as _t, useModel as a, watchSyncEffect as at, getCurrentPageStackSnapshot as b, toRef as bt, useSlots as c, callUpdateHooks as ct, useUpdatePerformanceListener as d, onBeforeUnmount as dt, markNoSetData as et, normalizeClass as f, onBeforeUpdate as ft, useSelectorFields as g, onServerPrefetch as gt, useScrollOffset as h, onMounted as ht, useChangeModel as i, watchPostEffect as it, registerComponent as j, defineComponent as k, defineAppSetup as l, onActivated as lt, useBoundingClientRect as m, onErrorCaptured as mt, mergeModels as n, watch as nt, useAttrs as o, getDeepWatchStrategy as ot, normalizeStyle as p, onDeactivated as pt, setPageLayout as q, useBindModel as r, watchEffect as rt, useNativeInstance as s, setDeepWatchStrategy as st, useTemplateRef as t, version as tt, use as u, onBeforeMount as ut, useAsyncPullDownRefresh as v, onUpdated as vt, useIntersectionObserver as w, triggerRef as wt, getNavigationBarMetrics as x, toRefs as xt, usePageScrollThrottle as y, traverse as yt, useLayoutHosts as z };
6010
- //# sourceMappingURL=src-C3ttY2ue.mjs.map
6585
+ //# sourceMappingURL=src-Bg6AVYQe.mjs.map