wevu 6.18.5 → 6.18.7
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/index.mjs +2 -2
- package/dist/dev/internal-runtime.mjs +2 -2
- package/dist/dev/{router-BD-ovqV2.mjs → router-D0JQfgyN.mjs} +83 -66
- package/dist/dev/router-D0JQfgyN.mjs.map +1 -0
- package/dist/dev/router.mjs +114 -48
- package/dist/dev/router.mjs.map +1 -1
- package/dist/dev/{templateRef-DvxMB5FK.mjs → templateRef-BLnYcEH0.mjs} +7 -3
- package/dist/dev/templateRef-BLnYcEH0.mjs.map +1 -0
- package/dist/dev/vue-demi.mjs +2 -2
- package/dist/index.mjs +1 -1
- package/dist/internal-runtime.mjs +1 -1
- package/dist/router-D4W4lEXM.mjs +1 -0
- package/dist/router.mjs +1 -1
- package/dist/templateRef-DOTHWzZ5.mjs +1 -0
- package/dist/vue-demi.mjs +1 -1
- package/package.json +2 -2
- package/dist/dev/router-BD-ovqV2.mjs.map +0 -1
- package/dist/dev/templateRef-DvxMB5FK.mjs.map +0 -1
- package/dist/router-DLOOLAqv.mjs +0 -1
- package/dist/templateRef-D6aBJONi.mjs +0 -1
package/dist/router-DLOOLAqv.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,c as t,f as n,g as r,h as i,i as a,l as o,m as s,n as c,o as l,s as u,t as d,v as f}from"./base-BxKbbKVO.mjs";import{WEVU_APP_PROVIDES_KEY as p,WEVU_IS_APP_INSTANCE_KEY as ee,WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as m,WEVU_PARENT_INSTANCE_KEY as h,WEVU_PROVIDES_KEY as g,WEVU_RUNTIME_APP_KEY as te}from"@weapp-core/constants";function _(e,t,n){o(d(e),e,t,n)}function ne(e){_(`onLaunch`,e)}function re(e){_(`onPageNotFound`,e)}function ie(e){_(`onUnhandledRejection`,e)}function ae(e){_(`onThemeChange`,e)}function oe(e){_(`onMemoryWarning`,e)}function se(e){_(`onShow`,e)}function ce(e){_(`onLoad`,e)}function le(e){_(`onHide`,e)}function ue(e){_(`onUnload`,e)}function de(e){_(`onReady`,e)}function fe(e){_(`onPullDownRefresh`,e)}function pe(e){_(`onReachBottom`,e)}function me(e){let t=d(`onPageScroll`);o(t,`onPageScroll`,e),a(t,`onPageScroll`)}function he(e){_(`onRouteDone`,e)}function ge(e){_(`onTabItemTap`,e)}function _e(e){_(`onResize`,e)}function ve(e){_(`onMoved`,e)}function ye(e){_(`onAttached`,e)}function be(e){_(`onDetached`,e)}function xe(e){_(`onError`,e)}function Se(e){_(`onSaveExitState`,e,{single:!0})}function Ce(t){let n=d(`onShareAppMessage`);o(n,`onShareAppMessage`,t,{single:!0}),l(n,`onShareAppMessage`),e(n)}function we(t){let n=d(`onShareTimeline`);o(n,`onShareTimeline`,t,{single:!0}),l(n,`onShareTimeline`),e(n)}function Te(e){let t=d(`onAddToFavorites`);o(t,`onAddToFavorites`,e,{single:!0}),l(t,`onAddToFavorites`)}const v=new Map;function y(e,t){v.set(e,t)}function b(e){return v.has(e)}function x(e){return v.get(e)}function S(e){return!!(e&&typeof e==`object`&&e[ee]===!0)}function C(e){return Object.create(e==null?null:e)}function w(e){if(!e)return C();let t=e[p];if(t&&typeof t==`object`)return t;let n=C();try{Object.defineProperty(e,p,{value:n,configurable:!0,enumerable:!1,writable:!1})}catch(t){e[p]=n}return n}function T(e,t){try{Object.defineProperty(e,g,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(n){e[g]=t}}function E(e){var t,n;let r=e[g];if(r&&typeof r==`object`)return r;let i=e[te],a=(t=(n=e[h])==null?void 0:n[g])==null?w(i):t,o=S(e)?w(i):C(a);return T(e,o),o}function Ee(e){return w(e)}function De(e,t,n){w(e)[t]=n,y(t,n)}function Oe(e,t,n){var r;let i=w(t),a=(r=n==null?void 0:n[g])==null?i:r,o=S(e)?i:C(a);if(n)try{Object.defineProperty(e,h,{value:n,configurable:!0,enumerable:!1,writable:!0})}catch(t){e[h]=n}T(e,o)}function D(e,t){let n=Object.getPrototypeOf(e);for(;n;){if(n===t)return!0;n=Object.getPrototypeOf(n)}return!1}function ke(e,t){let n=E(e),r=E(t);if(!(n===r||D(n,r)||D(r,n))){Object.setPrototypeOf(r,n);try{Object.defineProperty(t,h,{value:e,configurable:!0,enumerable:!1,writable:!0})}catch(n){t[h]=e}}}let O=!1,k;function A(){return k}function Ae(e){k=e}function je(e){k===e&&(k=void 0)}function j(e,t){var n;e[m]=Number((n=e[m])==null?0:n)+1;try{return t()}finally{var r;let t=Number((r=e[m])==null?1:r)-1;t<=0?delete e[m]:e[m]=t}}function Me(e){let t=e.options;if(t&&typeof t==`object`)return t;let n=s(),r=n[n.length-1],i=r&&typeof r==`object`?r.options:void 0;return i&&typeof i==`object`?i:{}}function Ne(){if(O)return;O=!0;let e=r();if(!(!e||typeof e!=`object`)){if(f(`pullDownRefreshApi`)){let t=e.startPullDownRefresh;typeof t==`function`&&(e.startPullDownRefresh=function(...e){let n=t.apply(this,e);return k&&c(k,`onPullDownRefresh`,[]),n})}if(f(`pageScrollApi`)){let t=e.pageScrollTo;typeof t==`function`&&(e.pageScrollTo=function(e,...n){let r=t.apply(this,[e,...n]);if(k){let t=k;j(t,()=>{c(t,`onPageScroll`,[e==null?{}:e])})}return r})}}}function Pe(e){let{enableOnShareAppMessage:t,enableOnShareTimeline:n}=e;if(!t&&!n||!f(`pageShareMenu`))return;let a=r();if(!a||typeof a.showShareMenu!=`function`)return;let o=i().shareTimelineRequiresShareAppMessage?t||n:t;if(!o&&!n)return;let s=[];o&&s.push(`shareAppMessage`),n&&s.push(`shareTimeline`);let c=[{withShareTicket:!0,menus:s},{menus:s},n?{withShareTicket:!0}:void 0,n?{}:void 0,void 0];for(let e of c)try{e===void 0?a.showShareMenu():a.showShareMenu(e);break}catch(e){}}function Fe(){return!!u()}function Ie(e,t){let n=u();n?(E(n)[e]=t,S(n)&&y(e,t)):y(e,t)}function Le(e,t){var n;let r=u();if(r){let t=E(r);if(e in t)return t[e]}if(b(e))return x(e);if(arguments.length>=2)return t;let i=(n=globalThis.console)==null?void 0:n.warn;typeof i==`function`&&i(`wevu.inject:未找到对应 key 的值:${String(e)}`)}function Re(e,t){y(e,t)}function ze(e,t){if(b(e))return x(e);if(arguments.length>=2)return t;throw Error(`injectGlobal():未找到对应 key 的 provider:${String(e)}`)}const Be=[`switchTab`,`reLaunch`,`redirectTo`,`navigateTo`,`navigateBack`],M=new Set,N=new WeakSet;function Ve(e){return M.add(e),()=>{M.delete(e)}}function P(e){for(let t of M)try{t(e)}catch(e){}}function He(e,t){if(e!==`navigateBack`&&t&&typeof t==`object`){let e=t.url;if(typeof e==`string`)return{url:e}}}function Ue(e){if(!e||typeof e!=`object`)return;let t=e;if(!N.has(t)){N.add(t);for(let e of Be){let n=t[e];typeof n==`function`&&(t[e]=function(t,...r){let i=!1,a=()=>{i||(i=!0,P(He(e,t)))},o=t&&typeof t==`object`?{...t,success:(...e)=>{a();let n=t.success;return typeof n==`function`?n(...e):void 0}}:t,s=n.call(this,o,...r);return s&&typeof s.then==`function`&&s.then(a,()=>{}),s})}}}function F(e){let t=[];for(let n of e.split(`/`))if(!(!n||n===`.`)){if(n===`..`){t.length>0&&t.pop();continue}t.push(n)}return t}function I(e,t){if(!e)return F(t).join(`/`);if(e.startsWith(`/`))return F(e).join(`/`);if(e.startsWith(`./`)||e.startsWith(`../`)){let n=F(t);n.length>0&&n.pop();for(let t of e.split(`/`))if(!(!t||t===`.`)){if(t===`..`){n.length>0&&n.pop();continue}n.push(t)}return n.join(`/`)}return F(e).join(`/`)}function L(e){return e?`/${e}`:`/`}const We=/(?:^|\/):/;function Ge(e){return We.test(e)}const Ke=/\+/g;function R(e){return decodeURIComponent(e.replace(Ke,` `))}function z(e){return encodeURIComponent(e)}function B(e,t,n){let r=e[t];if(r===void 0){e[t]=n;return}if(Array.isArray(r)){r.push(n);return}e[t]=[r,n]}function V(e,t,n){let r=e[t];if(r===void 0){e[t]=n;return}if(Array.isArray(r)){r.push(n);return}e[t]=[r,n]}function H(e){if(e!==void 0)return e===null?null:String(e)}function U(e){let t={};for(let n of Object.keys(e)){let r=e[n];if(Array.isArray(r)){for(let e of r){let r=H(e);r!==void 0&&B(t,n,r)}continue}let i=H(r);i!==void 0&&B(t,n,i)}return t}function W(e){if(e!=null)return String(e)}function qe(e){let t={};for(let n of Object.keys(e)){let r=e[n];if(Array.isArray(r)){for(let e of r){let r=W(e);r!==void 0&&V(t,n,r)}continue}let i=W(r);i!==void 0&&V(t,n,i)}return t}function G(e){return e?e.startsWith(`#`)?e:`#${e}`:``}function K(e){let t=e.startsWith(`?`)?e.slice(1):e,n={};if(!t)return n;for(let e of t.split(`&`)){if(!e)continue;let t=e.indexOf(`=`),r=t>=0?e.slice(0,t):e;r&&B(n,R(r),t>=0?R(e.slice(t+1)):null)}return n}function q(e={}){let t=U(e),n=[];for(let e of Object.keys(t)){let r=z(e),i=t[e];if(Array.isArray(i)){for(let e of i)e===null?n.push(r):n.push(`${r}=${z(e)}`);continue}if(i===null){n.push(r);continue}n.push(`${r}=${z(i)}`)}return n.join(`&`)}const Je={parseQuery:K,stringifyQuery:q};function J(e,t=Je){let n=e.indexOf(`#`),r=n>=0?e.slice(0,n):e,i=n>=0?G(e.slice(n+1)):``,a=r.indexOf(`?`);return a<0?{path:r,query:{},hash:i}:{path:r.slice(0,a),query:U(t.parseQuery(r.slice(a+1))),hash:i}}function Y(e,t,n=``,r,i={},a=q){let o=I(e,``),s=a(t),c=L(o),l=G(n),u=s?`${c}?${s}`:c,d={path:o,fullPath:l?`${u}${l}`:u,query:t,hash:l,params:i};return r!==void 0&&(d.name=r),d}function X(e){return typeof(e==null?void 0:e.route)==`string`&&e.route.length>0||typeof(e==null?void 0:e.__route__)==`string`&&e.__route__.length>0}function Ye(e){let t=s();if(Array.isArray(t)&&t.length>0){let e=t[t.length-1];if(X(e))return e}let n=A();return X(n)?n:e}function Xe(e,t){var n;let r=Ye(t);return r?Y(typeof r.route==`string`?r.route:typeof r.__route__==`string`?r.__route__:``,U(e==null?(n=r.options)==null?{}:n:e),``,void 0,{}):Y(``,{})}const Z=[`switchTab`,`reLaunch`,`redirectTo`,`navigateTo`,`navigateBack`],Ze=new WeakMap;function Qe(e){return!e||typeof e!=`object`?!1:Z.every(t=>typeof e[t]==`function`)}function $e(){return n()}function et(e){if(!(typeof e!=`string`||!e))return I(e,``)||void 0}function tt(e,t){let n=t===`pageRouter`?[e.route,e.__route__,e.is]:[e.is,e.route,e.__route__];for(let e of n){let t=et(e);if(t)return t}}function nt(e,t){if(!t||!e.startsWith(`./`)&&!e.startsWith(`../`))return e;let{path:n,query:r,hash:i}=J(e),a=L(I(n,t)),o=q(r);return`${a}${o?`?${o}`:``}${i}`}function Q(e,t){let n=t==null?``:t,r=Ze.get(e),i=r==null?void 0:r.get(n);if(i)return i;let a=Object.create(null);for(let n of Z)a[n]=r=>{let i=e[n];if(n===`navigateBack`||!r||typeof r!=`object`)return i.call(e,r);let a=typeof r.url==`string`?nt(r.url,t):r.url,o=r.success,s={...r,url:a,success:(...e)=>(typeof a==`string`&&P({url:a}),typeof o==`function`?o(...e):void 0)};return i.call(e,s)};let o=r==null?new Map:r;return o.set(n,a),Ze.set(e,o),a}function $(e,n,r){let i=t();if(!(i!=null&&i.instance))throw Error(`${r}() 必须在 setup() 的同步阶段调用`);let a=i.instance,o=tt(a,e),s=a[e];if(Qe(s))return Q(s,o);let c=a[n];if(Qe(c))return Q(c,o);let l=$e();if(l)return Q(l,o);throw Error(`当前运行环境不支持 Router,请升级宿主基础库或检查平台路由能力`)}function rt(){return $(`router`,`pageRouter`,`useNativeRouter`)}function it(){return $(`pageRouter`,`router`,`useNativePageRouter`)}export{se as $,Oe as A,ce as B,Ne as C,Me as D,je as E,ye as F,fe as G,ve as H,be as I,_e as J,pe as K,xe as L,De as M,y as N,j as O,Te as P,we as Q,le as R,Ae as S,A as T,re as U,oe as V,me as W,Se as X,he as Y,Ce as Z,Fe as _,Xe as a,Ie as b,qe as c,L as d,ge as et,Ge as f,Ve as g,P as h,J as i,Ee as j,ke as k,K as l,Ue as m,rt as n,ie as nt,G as o,I as p,de as q,Y as r,ue as rt,U as s,it as t,ae as tt,q as u,Le as v,Pe as w,Re as x,ze as y,ne as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as e,l as t,m as n,p as r,t as i}from"./watch-Bbd-gmEg.mjs";import{A as a,B as o,M as s,N as c,R as l,a as u,d,i as f,k as p,l as m,n as h,o as g,r as _,s as v,t as y,v as b,z as x}from"./ref-D37CknuD.mjs";import{i as S,n as C,r as w,t as T}from"./computed-Xoi9XEUx.mjs";import{_ as E,c as D,d as O,g as k,h as A,l as j,m as M,n as N,p as P,r as F,s as I,t as L,u as R,v as z,x as B}from"./base-BxKbbKVO.mjs";import{$ as V,A as H,C as U,D as W,E as G,F as ee,G as te,I as ne,M as re,O as ie,S as ae,T as K,W as oe,j as se,k as ce,rt as le,w as ue}from"./router-DLOOLAqv.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as de,WEVU_ATTRS_KEY as fe,WEVU_EFFECT_SCOPE_KEY as pe,WEVU_EXPOSED_KEY as me,WEVU_FUNCTION_PROP_PATHS_KEY as he,WEVU_HOOKS_KEY as ge,WEVU_INLINE_HANDLER as _e,WEVU_INLINE_MAP_KEY as ve,WEVU_IS_APP_INSTANCE_KEY as ye,WEVU_LAYOUT_BRIDGE_PAGE_KEYS as be,WEVU_LAYOUT_HOST_BRIDGE_KEY as xe,WEVU_MODEL_HANDLER as Se,WEVU_NATIVE_INSTANCE_KEY as q,WEVU_ON_BEFORE_UPDATE_HOOK as Ce,WEVU_ON_LOAD_CALLED_KEY as we,WEVU_ON_UPDATED_HOOK as Te,WEVU_OWNER_HANDLER as Ee,WEVU_PAGE_LAYOUT_NAME_KEY as J,WEVU_PAGE_LAYOUT_NONE as De,WEVU_PAGE_LAYOUT_PROPS_KEY as Oe,WEVU_PAGE_LAYOUT_SETTER_KEY as ke,WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as Ae,WEVU_PARENT_INSTANCE_KEY as je,WEVU_PENDING_PROP_VALUES_KEY as Me,WEVU_PROPS_ALIASES_KEY as Ne,WEVU_PROPS_DERIVED_KEYS_KEY as Pe,WEVU_PROPS_KEY as Y,WEVU_PROP_KEYS_KEY as Fe,WEVU_PUBLIC_RUNTIME_KEY as X,WEVU_READY_CALLED_KEY as Ie,WEVU_RESERVED_METHOD_PREFIX as Le,WEVU_ROUTE_DONE_CALLED_KEY as Re,WEVU_ROUTE_DONE_IN_TICK_KEY as ze,WEVU_RUNTIME_APP_KEY as Be,WEVU_RUNTIME_KEY as Ve,WEVU_SCOPED_SLOT_CREATOR_KEY as He,WEVU_SCOPED_SLOT_OWNER_SEED_KEY as Ue,WEVU_SCOPED_SLOT_OWNER_STORE_KEY as We,WEVU_SETUP_CONTEXT_INSTANCE_KEY as Ge,WEVU_SETUP_STATE_KEY as Ke,WEVU_SLOT_NAMES_PROP as qe,WEVU_SLOT_OWNER_ID_KEY as Z,WEVU_SLOT_OWNER_ID_PROP as Je,WEVU_SLOT_OWNER_KEY as Ye,WEVU_SLOT_OWNER_PROXY_KEY as Xe,WEVU_SLOT_PROPS_DATA_KEY as Ze,WEVU_SLOT_PROPS_KEY as Qe,WEVU_SLOT_SCOPE_KEY as $e,WEVU_TEMPLATE_REFS_CALLBACKS_KEY as et,WEVU_TEMPLATE_REFS_KEY as tt,WEVU_TEMPLATE_REFS_PENDING_KEY as nt,WEVU_TEMPLATE_REF_MAP_KEY as rt,WEVU_WATCH_STOPS_KEY as it}from"@weapp-core/constants";import{wpi as at}from"@wevu/api";function ot(e){j(L(`onMounted`),`onReady`,e)}function st(e){j(L(`onUpdated`),Te,e)}function ct(e){L(`onBeforeUnmount`),e()}function lt(e){j(L(`onUnmounted`),`onUnload`,e)}function ut(e){L(`onBeforeMount`),e()}function dt(e){j(L(`onBeforeUpdate`),Ce,e)}function ft(e){let t=L(`onErrorCaptured`);j(t,`onError`,n=>e(n,t,``))}function pt(e){j(L(`onActivated`),`onShow`,e)}function mt(e){j(L(`onDeactivated`),`onHide`,e)}function ht(e){L(`onServerPrefetch`)}function gt(e,t){N(e,t===`before`?Ce:Te)}const _t=`6.18.5`;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];h(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=>{let n=t.parser(e);l(n)};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 h(e)||m(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(h(e)){let n=e.value;m(n)&&S(n),jt(n,t);return}if(m(e)){S(e),jt(b(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(e){let t=Object.create(null),n=Object.create(null),r=new Set;return{computedRefs:t,computedSetters:n,dirtyComputedKeys:r,createTrackedComputed:(t,n,i)=>{let a,c=!0,l,u={get value(){return c&&(a=l(),c=!1),x(u,`value`),a},set value(e){if(!i)throw Error(`计算属性是只读的`);i(e)}};return _(u),l=s(n,{lazy:!0,scheduler:()=>{c||(c=!0,e.setDataStrategy===`patch`&&e.includeComputed&&r.add(t),o(u,`value`))}}),u},computedProxy:new Proxy({},{get(e,n){if(typeof n==`string`&&t[n])return t[n].value},has(e,n){return typeof n==`string`&&!!t[n]},ownKeys(){return Object.keys(t)},getOwnPropertyDescriptor(e,n){if(typeof n==`string`&&t[n])return{configurable:!0,enumerable:!0,value:t[n].value}}})}}function It(e){let{state:t,setupState:n,computedDefs:r,methodDefs:i,appConfig:a,includeComputed:o,setDataStrategy:s}=e,c={},{computedRefs:l,computedSetters:u,dirtyComputedKeys:d,createTrackedComputed:p,computedProxy:m}=Ft({includeComputed:o,setDataStrategy:s}),g=f(0),_=(e,t)=>{let n=b(e),r=n[Ve],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[Y];if(t&&typeof t==`object`)return t}if(r===`data`||r===`$state`)return t;if(r===`$computed`)return m;if(Q(c,r))return c[r];if(l[r])return l[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`&&l[t])return bt(u,t,r),!0;if(Q(n,t)){let e=Reflect.get(n,t,i);return h(e)&&!h(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 h(o)&&!h(r)?(o.value=r,!0):Q((a=e[Y])==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)||l[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(l).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(l[r])return{configurable:!0,enumerable:!0,get(){return l[r].value},set(e){bt(u,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===ve&&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`)l[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?(u[e]=a,l[e]=p(e,r,a)):l[e]=p(e,r)}}),{boundMethods:c,computedRefs:l,computedSetters:u,dirtyComputedKeys:d,computedProxy:m,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=g(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=m(u),f=d?b(u):u,p=!!r&&d;if(r&&!p){let e=i==null?void 0:i.get(f);p=e==null?!At(f):e,i==null||i.set(f,p)}let h=p?r:void 0;if(a<=0||o.keys<=0)return f;if(h){let e=v(f),t=h.get(f);if(t&&t.version===e)return t.value}if(n.has(f))return;if(t.has(f))return t.get(f);if(f instanceof Date)return f.getTime();if(f instanceof RegExp)return f.toString();if(f instanceof Map){let e=[];return t.set(f,e),n.add(f),f.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(f),e}if(f instanceof Set){let e=[];return t.set(f,e),n.add(f),f.forEach(r=>{e.push(Ht(r,t,n,void 0,void 0,1/0,{keys:1/0},s,void 0,``))}),n.delete(f),e}if(typeof ArrayBuffer<`u`){if(f instanceof ArrayBuffer)return f.byteLength;if(ArrayBuffer.isView(f)){let e=f;if(typeof e[Symbol.iterator]==`function`){let r=[...e];return t.set(f,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(f,r),r}}if(f instanceof Error)return{name:f.name,message:f.message};if(Array.isArray(f)){let e=[];t.set(f,e),n.add(f);let u=a-1;for(let a=0;a<f.length;a+=1){let d=l?`${l}.${a}`:String(a),p=Ht(f[a],t,n,r,i,u,o,s,c,d);e[a]=p===void 0?null:p}return n.delete(f),h&&h.set(f,{version:v(f),value:e}),e}let _={};t.set(f,_),n.add(f);let y=a-1;for(let e of Object.keys(f)){if(--o.keys,o.keys<=0)break;let a=l?`${l}.${e}`:e,u=Ht(f[e],t,n,r,i,y,o,s,c,a);u!==void 0&&(_[e]=u)}return n.delete(f),h&&h.set(f,{version:v(f),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||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,f=new WeakMap,p={},h=Number.isFinite(l)?{keys:l}:void 0,g=m(t)?b(t):t,_=n&&typeof n==`object`?m(n)?b(n):n:void 0,v=Object.keys(g),y=_?Object.keys(_):[],x=i?Object.keys(r):[];for(let e of v)a(e)&&(p[e]=Ut(g[e],f,{cache:o,cacheEligibility:s,maxDepth:c,includeFunctions:u,functionPaths:d,_budget:h,_path:e}));for(let e of y)a(e)&&(p[e]=Ut(_[e],f,{cache:o,cacheEligibility:s,maxDepth:c,includeFunctions:u,functionPaths:d,_budget:h,_path:e}));for(let e of x)a(e)&&(p[e]=Ut(r[e].value,f,{cache:o,cacheEligibility:s,maxDepth:c,includeFunctions:u,functionPaths:d,_budget:h,_path:e}));return p}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 z=0;if(i&&r.size){let e=Object.create(null),t=[...r];r.clear(),z=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 B=Xt(M),V=0;if(f){let e=$t({input:B,entryMap:I,getPlainByPath:R,mergeSiblingThreshold:f,mergeSiblingSkipArray:h,mergeSiblingMaxParentBytes:m,mergeSiblingMaxInflationRatio:p});V=e.merged,B=Xt(e.out)}let H=Qt(B,d),U=H.fallback;if(O({mode:U?`diff`:`patch`,reason:U?`maxPayloadBytes`:`patch`,pendingPatchKeys:F.length,payloadKeys:Object.keys(B).length,mergedSiblingParents:V||void 0,computedDirtyKeys:z||void 0,estimatedBytes:H.estimatedBytes,bytes:H.bytes}),U){D.value=!0,C.clear(),r.clear(),k(`maxPayloadBytes`);return}if(Object.keys(B).length){for(let[e,t]of Object.entries(B)){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(B);e&&typeof e.then==`function`&&e.catch(()=>{})}O({mode:`patch`,reason:`patch`,pendingPatchKeys:F.length,payloadKeys:Object.keys(B).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:f,maxPatchKeys:p,maxPayloadBytes:g,mergeSiblingThreshold:_,mergeSiblingMaxInflationRatio:y,mergeSiblingMaxParentBytes:x,mergeSiblingSkipArray:S,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={},z=Object.create(null),B=Object.create(null),V=Object.create(null),H={value:s===`patch`},U=new Map,W=new Set,G=[],ee=-1/0,te=new Set(F&&typeof F==`object`?Object.keys(F):[]),ne=e=>{if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype},re=(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)=>re(e,t[n]));if(ne(e)&&ne(t)){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>Q(t,n)&&re(e[n],t[n]))}return!1},ie=e=>{let t=h(e)?e.value:e;if(typeof t!=`object`||!t)return t;if(!m(t)&&At(t))return{snapshot:Ut(t,new WeakMap,{cacheEligibility:L,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D})};let n=m(t)?b(t):t;return{raw:n,version:v(n)}},ae=(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`)?re(e.snapshot,t.snapshot):!1:e.raw===t.raw&&e.version===t.version,K=e=>f(e)&&!(r!=null&&r.has(e));if(P)for(let[e,t]of Object.entries(P))K(e)&&(R[e]=t);let oe=()=>{if(!P)return;let e=m(t)?b(t):t,r=n&&typeof n==`object`?m(n)?b(n):n:void 0;for(let t of Object.keys(P))if(K(t)){if(r&&Q(r,t)){B[t]=ie(r[t]);continue}if(Q(e,t)){if(te.has(t))continue;e[t]=P[t],B[t]=ie(e[t])}}},se=e=>{let r=[],i=n&&typeof n==`object`?m(n)?b(n):n:void 0;for(let n of new Set([...Object.keys(t),...i?Object.keys(i):[]])){if(!K(n))continue;let a=i&&Q(i,n)?i[n]:t[n],o=h(a)?a.value:a;!o||typeof o!=`object`||b(o)===e&&r.push(n)}return r},ce=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();G.push(e);let t=e-j.sampleWindowMs;for(;G.length&&G[0]<t;)G.shift();G.length<=j.maxFlushes||j.coolDownMs>0&&e-ee<j.coolDownMs||(ee=e,ce({mode:s,reason:`loopWarning`,pendingPatchKeys:U.size+W.size,payloadKeys:0,computedDirtyKeys:o?a.size:0,flushCount:G.length,windowMs:j.sampleWindowMs,message:`疑似运行时更新循环:${G.length} 次 setData flush/${j.sampleWindowMs}ms`}))},ue=()=>sn({state:t,setupState:n,computedRefs:i,includeComputed:o,shouldIncludeKey:K,plainCache:I,plainCacheEligibility:L,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E,functionPaths:D});oe();let de=()=>{let e=m(t)?b(t):t,r=n&&typeof n==`object`?m(n)?b(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(!K(t))continue;c.add(t);let n=r&&Q(r,t)?r:e,i=ie(n[t]),o=B[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),(!ae(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})),B[t]=i}for(let e of Object.keys(B))c.has(e)||(delete B[e],(!o||!Q(i,e))&&delete a[e]);if(!o){for(let e of Object.keys(V))delete V[e];return{snapshot:a,replacedTopLevelKeys:u}}for(let e of Object.keys(i)){if(!K(e))continue;l.add(e);let t=i[e].value,n=ie(t);(!ae(V[e],n)||!Q(R,e))&&(a[e]=Ut(t,s,{cache:I,cacheEligibility:L,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D,_path:e})),V[e]=n}for(let t of Object.keys(V))l.has(t)||(delete V[t],(!Q(e,t)||!K(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,H.value=!1,U.clear(),s===`patch`&&o){z=Object.create(null);for(let e of Object.keys(i))K(e)&&(z[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(()=>{})}ce({mode:`diff`,reason:e,pendingPatchKeys:0,payloadKeys:Object.keys(c).length})}};return{job:e=>{if(N())if(le(),M(),s===`patch`&&!H.value){if(!(U.size>0||W.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:K,maxPatchKeys:p,maxPayloadBytes:g,mergeSiblingThreshold:_,mergeSiblingMaxInflationRatio:y,mergeSiblingMaxParentBytes:x,mergeSiblingSkipArray:S,elevateTopKeyThreshold:C,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E,functionPaths:D,plainCache:I,plainCacheEligibility:L,pendingPatches:U,fallbackTopKeys:W,latestSnapshot:R,latestComputedSnapshot:z,needsFullSnapshot:H,emitDebug:ce,runDiffUpdate:fe})}else fe(H.value?`needsFullSnapshot`:`diff`)},mutationRecorder:(e,t)=>{if(!N())return;if(e.root!==t){let t=se(e.root);if(t.length)for(let e of t)W.add(e);return}if(!e.path){if(Array.isArray(e.fallbackTopKeys)&&e.fallbackTopKeys.length)for(let t of e.fallbackTopKeys)W.add(t);else H.value=!0;return}let n=e.path.split(`.`,1)[0];K(n)&&U.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||t,l=(n=e==null?void 0:e.suspendWhenHidden)!=null&&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||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(t){let{data:r,resolvedComputed:o,resolvedMethods:c,appConfig:u,setDataOptions:f}=t;return t=>{let h=fn(r);if(h&&typeof h==`object`&&!Q(h,Y))try{Object.defineProperty(h,Y,{value:e(Object.create(null)),configurable:!0,enumerable:!1,writable:!1})}catch(e){}let g=d(h),_=d(Object.create(null)),v=t==null?void 0:t.__wevu_snapshotOmitKeys,y=!!(t!=null&&t.__wevu_deferInitialSnapshot),x=t==null?void 0:t.__wevu_initialSnapshot,T=t==null?void 0:t.__wevu_initialState,E=new Set(v instanceof Set||Array.isArray(v)?v:[]);if(h&&typeof h==`object`&&!Q(h,Ke))try{Object.defineProperty(h,Ke,{value:_,configurable:!0,enumerable:!1,writable:!1})}catch(e){}if(h&&typeof h==`object`&&T&&typeof T==`object`)for(let[e,t]of Object.entries(T))E.has(e)||(h[e]=t);let D=o,O=c,k=!0,A=[],j=new Set;Object.keys(g).forEach(e=>{let t=g[e];At(t)&&j.add(e)});let{includeComputed:M,setDataStrategy:N,maxPatchKeys:P,maxPayloadBytes:F,mergeSiblingThreshold:I,mergeSiblingMaxInflationRatio:L,mergeSiblingMaxParentBytes:R,mergeSiblingSkipArray:z,computedCompare:B,computedCompareMaxDepth:V,computedCompareMaxKeys:H,prelinkMaxDepth:U,prelinkMaxKeys:W,debug:G,diagnostics:ee,loopWarning:te,debugWhen:ne,debugSampleRate:re,elevateTopKeyThreshold:ie,toPlainMaxDepth:ae,toPlainMaxKeys:K,includeFunctions:oe,functionPaths:se,shouldIncludeKey:ce}=un(f),le=Rt(ee),ue=ee===`off`&&te?Rt(`fallback`):void 0,de=G||le||ue?e=>{typeof G==`function`&&G(e),le==null||le(e),e.reason===`loopWarning`&&(ue==null||ue(e))}:void 0,pe=ee===`always`?`always`:ne,{boundMethods:me,computedRefs:he,computedSetters:ge,dirtyComputedKeys:_e,computedProxy:ve,publicInstance:ye,touchSetupMethodsVersion:be}=It({state:g,setupState:_,computedDefs:D,methodDefs:O,appConfig:u,includeComputed:M,setDataStrategy:N}),xe=t==null?{setData:()=>{}}:t,Se=b(g),q,Ce=ln({state:g,setupState:_,snapshotOmitKeys:E,computedRefs:he,dirtyComputedKeys:_e,includeComputed:M,setDataStrategy:N,computedCompare:B,computedCompareMaxDepth:V,computedCompareMaxKeys:H,currentAdapter:xe,shouldIncludeKey:ce,maxPatchKeys:P,maxPayloadBytes:F,mergeSiblingThreshold:I,mergeSiblingMaxInflationRatio:L,mergeSiblingMaxParentBytes:R,mergeSiblingSkipArray:z,elevateTopKeyThreshold:ie,toPlainMaxDepth:ae,toPlainMaxKeys:K,includeFunctions:oe,functionPaths:se,debug:de,debugWhen:pe,debugSampleRate:re,loopWarning:te,runTracker:()=>q==null?void 0:q(),isMounted:()=>k,initialSnapshot:x&&typeof x==`object`?x:void 0,initialState:T&&typeof T==`object`?T:void 0}),we=()=>Ce.job(Se),Te=e=>Ce.mutationRecorder(e,Se);q=s(()=>{S(g);let e=g[Y];m(e)&&S(e);let t=g[fe];m(t)&&S(t),j.forEach(e=>{var t;jt((t=_[e])==null?g[e]:t)})},{lazy:!0,scheduler:()=>n(we)}),y||we(),A.push(dn(()=>l(q))),N===`patch`&&(w(g,{shouldIncludeTopKey:ce,maxDepth:U,maxKeys:W}),p(Te),A.push(dn(()=>a(Te))),A.push(dn(()=>C(g))));function Ee(e,t,n){let r=i(e,(e,n)=>t(e,n),n);return A.push(r),dn(()=>{r();let e=A.indexOf(r);e>=0&&A.splice(e,1)},r)}let J={get state(){return g},get setupState(){return _},get proxy(){return ye},get methods(){return me},get computed(){return ve},get adapter(){return xe},bindModel:Et(ye,g,he,ge,_),watch:Ee,snapshot:()=>Ce.snapshot(),unmount:()=>{k&&(k=!1,A.forEach(e=>{try{e()}catch(e){}}),A.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=>{j.add(e)},configurable:!0,enumerable:!1,writable:!1})}catch(e){J.__wevu_trackSetupReactiveKey=e=>{j.add(e)}}try{Object.defineProperty(J,Pe,{value:E,configurable:!0,enumerable:!1,writable:!1})}catch(e){J[Pe]=E}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=h(e)?e.value:e;for(let e of n){if(h(r)&&(r=r.value),r==null)return;r=r[e]}return h(r)?r.value:r}function Wn(e){if(typeof e!=`object`||!e||h(e)||m(e))return e;try{return d(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=K();if(e)return e;let t=M();return t[t.length-1]}function qn(e){return e!==De&&e}function Jn(){var e,t;if(!D())throw Error(`usePageLayout() 必须在 setup() 的同步阶段调用`);let n=I(),r=n==null||(e=n.__wevu)==null?void 0:e.state,i=d({name:qn(r==null?void 0:r[J]),props:{...(t=r==null?void 0:r[Oe])==null?{}:t}});return n&&(n.__wevuPageLayoutState=i),B(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[J]),r.props={...(n=i[Oe])==null?{}:n})}function Zn(e,t){let n=I(),r=n==null?void 0:n[ke];if(typeof r==`function`){r(e,t);return}let i=Kn(),a=i==null?void 0:i[ke];if(typeof a==`function`){a(e,t);return}throw Error(`setPageLayout() 未找到当前页面实例。请在页面 setup()、事件回调或当前页面上下文中调用。`)}function Qn(e){return e===!1?De:e}function $n(){let e=globalThis;return e[We]instanceof Map||(e[We]=new Map),typeof e[Ue]!=`number`&&(e[Ue]=0),{globalObject:e,ownerStore:e[We]}}function er(){let{globalObject:e}=$n();return e[Ue]+=1,`wv${e[Ue]}`}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[Pe];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[Y])==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 h(r)?r.value:r},set(e,t,n,r){let i=e[t];return h(i)&&!h(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[me];return r&&typeof r==`object`?fr(n,r):(t=n[X])!=null&&t.proxy?n[X].proxy:e}function hr(e){return e[rt]}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}:h(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(!z(`globalCreateSelectorQuery`))return null;let n=k();if(n&&typeof n.createSelectorQuery==`function`){let e=n.createSelectorQuery();return e?A().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[tt];if(!n||!n.length){t==null||t();return}if(!e[Ie]){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 n=e[tt];if(!n||!n.length){t==null||t();return}if(t){var i;let n=(i=e[et])==null?[]:i;n.push(t),e[et]||Object.defineProperty(e,et,{value:n,configurable:!0,enumerable:!1,writable:!0})}e[nt]||(e[nt]=!0,r(()=>{e[nt]=!1,wr(e,()=>{let t=e[et];!t||!t.length||t.splice(0).forEach(e=>{try{e()}catch(e){}})})}))}function Er(e){var t,n;let r=e[tt];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,qe))return Or();let t=()=>Ar(e[qe]),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`?b(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[Ge];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=k();if(!z(`globalCreateSelectorQuery`)||!a||typeof a.createSelectorQuery!=`function`)return;let o=a.createSelectorQuery();if(!o||!A().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=k();if(!z(`globalCreateIntersectionObserver`)||!o||typeof o.createIntersectionObserver!=`function`)return;let s=(r=Ir(t,e,`setData`))==null?e:r;return A().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,Ge,{value:a,configurable:!0,enumerable:!1,writable:!0})}catch(t){e[Ge]=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[X])==null?e[X]: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[je];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=M(),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=M(),n=t[t.length-1];n&&n!==e&&typeof n==`object`&&n.__wevu&&ce(e,n)}function qr(e,t){e[Be]=t,H(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,Y,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch(n){e[Y]=t}}function Xr(e,t){try{Object.defineProperty(e,Ke,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch(n){e[Ke]=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,Ve,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(n){e[Ve]=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[Ge],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(t,n,r=t.properties||{}){let i=n&&typeof n==`object`?n[Y]:void 0,a=i&&typeof i==`object`?i:e({});ri(a,r),n&&typeof n==`object`&&Yr(n,a);try{Object.defineProperty(t,Y,{value:a,configurable:!0,enumerable:!1,writable:!0})}catch(e){t[Y]=a}return a}function ai(e){return e.includes(`:`)?e.replaceAll(`:`,`-`).toLowerCase():e}function oi(e){return e.startsWith(`__wv_`)}function si(t){var n;let{target:r,runtime:i,runtimeWithDefaults:a,runtimeState:o,runtimeProxy:s,setup:l}=t,u=ii(r,o,r.properties||{}),d=e(Object.create(null)),f=new Set(Array.isArray(r[Fe])?r[Fe]:[]),p=e=>typeof o==`object`&&!!o&&Q(o,e);(()=>{let e=r.properties&&typeof r.properties==`object`?r.properties:void 0;for(let t of Object.keys(d))(!e||!Q(e,t)||oi(t)||f.has(t)||p(t))&&delete d[t];if(e)for(let[t,n]of Object.entries(e))oi(t)||f.has(t)||p(t)||(d[t]=n)})();try{Object.defineProperty(r,fe,{value:d,configurable:!0,enumerable:!1,writable:!1})}catch(e){r[fe]=d}let h=Rr(r,a),g=jr(u);Xr(o,(n=a.setupState)==null?Object.create(null):n);try{Object.defineProperty(o,"$slots",{value:g,configurable:!0,enumerable:!1,writable:!1})}catch(e){o.$slots=g}let _=Nr({props:u,runtime:a,state:o,proxy:s,bindModel:i.bindModel.bind(a),watch:i.watch.bind(a),instance:h,emit:(e,...t)=>{let{detail:n,options:r}=Fr(t),i=ai(e);h.triggerEvent(i,n,r)},expose:e=>{r[me]=e},attrs:d,slots:g}),v=c(!0);r[pe]=v,R(r),O(_);try{let e=v.run(()=>Jr(l,u,_)),t=!1;if(e&&typeof e==`object`){let n=i.setupState&&typeof i.setupState==`object`?m(i.setupState)?b(i.setupState):i.setupState:Object.create(null);Object.keys(e).forEach(r=>{let a=e[r];if(typeof a==`function`)i.methods[r]=(...e)=>a.apply(i.proxy,e),i.state[r]=(...e)=>a.apply(i.proxy,e),t=!0;else{if(At(a)){var o;(o=i.__wevu_trackSetupReactiveKey)==null||o.call(i,r)}i.state[r]=a,n[r]=a}})}if(t){var y;(y=i.__wevu_touchSetupMethodsVersion)==null||y.call(i)}}catch(e){throw v.stop(),r[pe]=void 0,e}finally{O(void 0),R(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||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=P();if((e==null?void 0:e.debug)===!0||(e==null?void 0:e.envVersion)===`develop`)return!0;let t=k();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&&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[ke]=(t,n)=>{var r;let i=(r=e.__wevu)==null?void 0:r.state;if(!i||typeof i!=`object`)return;i[J]=Qn(t);let a=t===!1||n==null?{}:n;i[Oe]=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[Ae])==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=(r=!1)=>{n=!0,r&&(t=void 0);let i=ei(e);if(t&&Object.keys(t).length&&i){let n=t;t=void 0,ni(e,i,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[Y])==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,z=(p=N==null?void 0:N.watch)==null?(()=>Mr()):p,B=(m=N==null?void 0:N.bindModel)==null?(()=>{}):m,V={...N==null?{}:N,state:F,setupState:I,proxy:P,methods:R,computed:L,watch:z,bindModel:B,snapshot:(h=N==null?void 0:N.snapshot)==null?(()=>Object.create(null)):h,unmount:(g=N==null?void 0:N.unmount)==null?(()=>{}):g},H=V,U={__wevu_flushSetupSnapshotSync:N.__wevu_flushSetupSnapshotSync,__wevu_touchSetupMethodsVersion:N.__wevu_touchSetupMethodsVersion,__wevu_trackSetupReactiveKey:N.__wevu_trackSetupReactiveKey,[Pe]:N[Pe]};for(let[e,t]of Object.entries(U))t&&Object.defineProperty(V,e,{configurable:!0,enumerable:!1,value:t,writable:!0});if(Object.defineProperty(e,X,{value:V,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=V,vi(e),ii(e,F),lr(e,V,v),k(),n){let t=mi(V,n,e);t.length&&(e[it]=t)}if(r){if(si({target:e,runtime:N,runtimeWithDefaults:V,runtimeState:F,runtimeProxy:P,setup:r}),!(i!=null&&i.deferSetData)){var W;(W=H.__wevu_flushSetupSnapshotSync)==null||W.call(H)}O()}else if(e.properties&&typeof e.properties==`object`&&Object.keys(e.properties).length>0){var G;(G=H.__wevu_flushSetupSnapshotSync)==null||G.call(H),O()}return Hr(e,N),N}function bi(e,t,n){for(let e of Reflect.ownKeys(t))if(!Reflect.has(n,e)){let n=Reflect.getOwnPropertyDescriptor(t,e);n!=null&&n.configurable&&Reflect.deleteProperty(t,e)}for(let e of Reflect.ownKeys(n)){let r=Reflect.getOwnPropertyDescriptor(n,e);if(r)try{Reflect.defineProperty(t,e,r)}catch(r){try{t[e]=n[e]}catch(e){}}}return Qr(t.state,t),e.__wevu=t,Object.defineProperty(e,X,{value:t,configurable:!0,enumerable:!1,writable:!1}),t}function xi(e,t,n,r,i){let a=e.__wevu;Ti(e,{skipHooks:!0});let o=yi(e,t,n,r,{deferSetData:!0,snapshotOmitKeys:i==null?void 0:i.snapshotOmitKeys});return!a||a===o?o:bi(e,a,o)}function Si(e,t){let n=e.__wevu,r=n==null?void 0:n.state,i=n==null?void 0:n.setupState,a=e.data;if(!(!r||typeof r!=`object`||!a||typeof a!=`object`)){for(let[e,n]of Object.entries(a))if(!(!e||e===`undefined`)&&Object.prototype.hasOwnProperty.call(r,e))try{let a=i==null?void 0:i[e];if(!(t!=null&&t.includeSetupState)&&i&&Object.prototype.hasOwnProperty.call(i,e))continue;if(h(a)){a.value=n;continue}r[e]=n}catch(e){}}}function Ci(e,t){var n,r,i;let a=(n=e.__wevu)==null?void 0:n.adapter;Si(e,{includeSetupState:t==null?void 0:t.rehydrateSetupState}),a&&typeof a.__wevu_enableSetData==`function`&&a.__wevu_enableSetData(!0),(r=e.__wevu)==null||(i=r.__wevu_flushSetupSnapshotSync)==null||i.call(r)}function wi(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 Ti(e,t){var n;let r=e.__wevu,i=e[Z];i&&nr(i),Er(e),!(t!=null&&t.skipHooks)&&r&&e[ge]&&N(e,`onUnload`,[]),e[ge]&&(e[ge]=void 0);let a=e[it];if(Array.isArray(a))for(let e of a)try{e()}catch(e){}e[it]=void 0,(n=e[pe])==null||n.stop(),e[pe]=void 0,r&&r.unmount(),delete e.__wevu,X in e&&delete e[X]}const Ei=`__wevuAppGlobalListeners`,Di=`__wevuOnMemoryWarningListener`;function Oi(e){let t=e[ge],n=!!(t!=null&&t.onMemoryWarning);if(!z(`appMemoryWarningListener`)){delete e[Di];return}let r=k(),i=r==null?void 0:r.onMemoryWarning,a=r==null?void 0:r.offMemoryWarning;if(typeof i!=`function`)return;let o=e[Di];if(typeof o==`function`&&typeof a==`function`)try{a(o)}catch(e){}if(!n){delete e[Di];return}let s=t=>{N(e,`onMemoryWarning`,[t])};e[Di]=s,i(s)}function ki(e,t){var n,r;let{hookName:i,onApiName:a,offApiName:o,capabilityName:s,userHandler:c}=t,l=e[ge],u=!!(l!=null&&l[i]),d=(r=(n=e)[Ei])==null?n[Ei]=Object.create(null):r,f=d[i];if(!z(s)){delete d[i],delete e[i];return}let p=k(),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)=>{N(e,i,t),typeof c==`function`&&c.apply(e,t)};e[i]=g,d[i]=g,typeof m==`function`&&m(g)}function Ai(e,t){ki(e,{hookName:`onError`,onApiName:`onError`,offApiName:`offError`,capabilityName:`appErrorListener`,userHandler:t.onError}),ki(e,{hookName:`onPageNotFound`,onApiName:`onPageNotFound`,offApiName:`offPageNotFound`,capabilityName:`appPageNotFoundListener`,userHandler:t.onPageNotFound}),ki(e,{hookName:`onUnhandledRejection`,onApiName:`onUnhandledRejection`,offApiName:`offUnhandledRejection`,capabilityName:`appUnhandledRejectionListener`,userHandler:t.onUnhandledRejection}),ki(e,{hookName:`onThemeChange`,onApiName:`onThemeChange`,offApiName:`offThemeChange`,capabilityName:`appThemeChangeListener`,userHandler:t.onThemeChange})}function ji(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[_e]||(s[_e]=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[ve])});let c=s.onLaunch,l=s.onError,u=s.onPageNotFound,d=s.onUnhandledRejection,f=s.onThemeChange;s.onLaunch=function(...t){this[ye]=!0,yi(this,e,n,r),Oi(this),Ai(this,{onError:l,onPageNotFound:u,onUnhandledRejection:d,onThemeChange:f}),N(this,`onLaunch`,t),typeof c==`function`&&c.apply(this,t)};let p=s.onShow;s.onShow=function(...e){N(this,`onShow`,e),typeof p==`function`&&p.apply(this,e)};let m=s.onHide;s.onHide=function(...e){N(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 Mi(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 Ni(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=F(this,`onSaveExitState`,e);return t===void 0?f.apply(this,e):t}),r&&(e.onPullDownRefresh=function(...e){if(N(this,`onPullDownRefresh`,e),!S(this,`onPullDownRefresh`))return p.apply(this,e)}),i&&(e.onReachBottom=function(...e){if(N(this,`onReachBottom`,e),!S(this,`onReachBottom`))return m.apply(this,e)}),a&&(e.onPageScroll=function(...e){return ie(this,()=>{if(N(this,`onPageScroll`,e),!S(this,`onPageScroll`))return h.apply(this,e)})}),o&&(e.onRouteDone=function(...e){if(!this[ze]&&(this[ze]=!0,Promise.resolve().then(()=>{this[ze]=!1}),this[Re]=!0,N(this,`onRouteDone`,e),!S(this,`onRouteDone`)))return g.apply(this,e)}),s&&(e.onTabItemTap=function(...e){if(N(this,`onTabItemTap`,e),!S(this,`onTabItemTap`))return _.apply(this,e)}),c&&(e.onResize=function(...e){if(N(this,`onResize`,e),!S(this,`onResize`))return v.apply(this,e)}),l&&(e.onShareAppMessage=function(...e){let t=F(this,`onShareAppMessage`,e);return t===void 0?y.apply(this,e):t}),u&&(e.onShareTimeline=function(...e){let t=F(this,`onShareTimeline`,e);return t===void 0?b.apply(this,e):t}),d&&(e.onAddToFavorites=function(...e){let t=F(this,`onAddToFavorites`,e);return t===void 0?x.apply(this,e):t})}function Pi(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:j,hasHook:M}=e,P=e=>{var t,n;(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)},F={onLoad(...e){if(this[we])return;this[we]=!0,yi(this,t,n,r);let a=e[0]&&typeof e[0]==`object`?e[0]:W(this);if(x==null||x(this,a),P(this),Ci(this),l&&ue({enableOnShareAppMessage:v,enableOnShareTimeline:y}),N(this,`onLoad`,e),typeof i==`function`)return i.apply(this,e.length?e:[a])},onUnload(...e){if(l&&G(this),Ti(this),typeof a==`function`)return a.apply(this,e)},onShow(...e){if(l&&(U(),ae(this),this[we]||F.onLoad.call(this,W(this)),x==null||x(this,W(this)),P(this),ue({enableOnShareAppMessage:v,enableOnShareTimeline:y}),this[Re]=!1),wi(this,!0),N(this,`onShow`,e),typeof o==`function`)return o.apply(this,e)},onHide(...e){if(l&&G(this),wi(this,!1),N(this,`onHide`,e),typeof s==`function`)return s.apply(this,e)},onReady(...e){if(l&&(this[we]||F.onLoad.call(this,W(this)),x==null||x(this,W(this)),P(this),ue({enableOnShareAppMessage:v,enableOnShareTimeline:y})),!this[Ie]){if(this[Ie]=!0,l&&m&&h){let e=this;setTimeout(()=>{if(!e[Re]){var t;(t=F.onRouteDone)==null||t.call(e)}},0)}Tr(this,()=>{N(this,`onReady`,e),typeof c==`function`&&c.apply(this,e)});return}if(typeof c==`function`)return c.apply(this,e)}};return Ni(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:j,hasHook:M}),F}function Fi(e){let{userMethods:t,runtimeMethods:n}=e,r={...t};r[_e]||(r[_e]=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[ve])}),r[Se]||(r[Se]=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[Ee]&&typeof(n==null?void 0:n[Ee])==`function`&&(r[Ee]=n[Ee]);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[Ve]}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===ve||e.startsWith(Le))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 Ii(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(Ii(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=Ii(i,t);return n}function Li(e){let t=e.route;if(typeof t==`string`&&t)return t;let n=e.is;return typeof n==`string`&&n?n:`unknown`}function Ri(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`,Ne,Pe,`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]=Ii(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[Ne];delete T[Ne];let P=T[Pe];delete T[Pe];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 zi(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[Y])==null?e.properties:t,n),tr(r,i,n.proxy)}function Bi(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([qe,Je,$e]),f=new WeakMap,p=e=>e.startsWith(`__wv_`),m=e=>{let t=e.__wevu,n=t==null?void 0:t[Pe];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,Fe,{value:a,configurable:!0,enumerable:!1,writable:!1})}catch(t){e[Fe]=a}},b=e=>{let t=e[fe];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){zi(e);return}for(let[e,r]of Object.entries(i))if(!(p(e)||o.has(e)||n(e)))try{t[e]=r}catch(e){}zi(e)},x=e=>{let t=e[Y],n=e.properties,r=e[Me];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),zi(e)}r&&delete e[Me],b(e)},S=(e,t)=>{if(!t||typeof t!=`object`)return;let n=e[Y];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),zi(e),b(e))},C=(e,t,n)=>{var r,i;let a=e[Y];if(!a||typeof a!=`object`)return;try{a[t]=n}catch(e){}g(e,t,n);let o=(i=(r=e)[Me])==null?r[Me]=Object.create(null):i;o[t]=n,v(e,a),_(e,a),zi(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}}function Vi(e){return Array.from(new Set(Array.isArray(e)?e:[e])).filter(e=>typeof e==`string`&&e.length>0)}function Hi(e){if(!e||typeof e!=`object`)return[];let t=[],n=typeof e.route==`string`?e.route.replace(/^\/+/,``):``;n&&t.push(`route:${n}`);for(let[n,r]of[[`webview`,`__wxWebviewId__`],[`exparser`,`__wxExparserNodeId__`]]){let i=e[r];(typeof i==`number`||typeof i==`string`)&&t.push(`${n}:${String(i)}`)}return Array.from(new Set(t))}function Ui(){let e=new Map;function t(t,n,r){let i=Vi(t);if(i.length===0||r.length===0)return null;for(let t of r){var a;let r=(a=e.get(t))==null?new Map:a;for(let e of i)r.set(e,n);e.set(t,r)}return i}function n(t,n,r){let i=Vi(t);if(i.length===0||r.length===0)return!1;let a=!1;for(let t of r){let r=e.get(t);if(r){for(let e of i)r.get(e)===n&&(r.delete(e),a=!0);r.size===0&&e.delete(t)}}return a}function r(t,n){return n.map(n=>{var r;return(r=e.get(n))==null?void 0:r.get(t)}).find(Boolean)}function i(e,t,n){var i;let a=r(e,t);return a?(i=n(a,e))==null?null:i:null}function a(e,t,n,r={}){var o,s;let c=(o=r.retries)==null?20:o,l=(s=r.interval)==null?16:s,u=i(e,t(),n);return u||c<=0?Promise.resolve(u):new Promise(i=>{setTimeout(()=>{i(a(e,t,n,{...r,retries:c-1}))},l)})}return{register:t,resolveBridge:r,resolveHost:i,unregister:n,waitForHost:a}}const Wi=Ui();function Gi(){let e=M();return e[e.length-1]}function Ki(e){return Hi(e)}function qi(e){return e&&typeof e.__wevuSetPageLayout==`function`?e:Gi()}function Ji(e){var t,n;if(!e||typeof e!=`object`)return;let r=(t=e[X])==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 Yi(e){return typeof e==`function`?e():h(e)?e.value:e}function Xi(e,t){return e.find(e=>e.key===t)}function Zi(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 Qi(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[X])==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 $i(e,t){let n=Ji(t),r=n&&typeof n==`object`?Object.create(n):{};return Object.assign(r,{selectComponent(r){let i=Xi(e,r);if(!i)return null;if(i.kind===`component`||!i.kind){var a,o;return Qi(i,t)||((a=(o=Zi(n,i.selector))==null?Zi(Gi(),i.selector):o)==null?null:a)}return null}})}function ea(e,t){let n=t==null?I():t,r=qi(n),i=Ki(r);return!n||!r||i.length===0||!Wi.register(e,n,i)?!1:(n[be]=i,!0)}function ta(e,t){var n;let r=t==null?I():t,i=qi(r),a=(n=r==null?void 0:r[be])==null?Ki(i):n;if(!r||!Array.isArray(a)||a.length===0)return!1;let o=Wi.unregister(e,r,a);return delete r[be],o}function na(e,t){var n,r;let i=(n=Gi())==null?qi(t):n,a=Wi.resolveBridge(e,Ki(i));return(r=a==null?t:a)==null?I():r}function ra(e,t={}){var n,r;let i=(n=t.context)==null?t.fallbackContext:n,a=(r=Gi())==null?qi(i):r;return Wi.resolveHost(e,Ki(a),(e,t)=>{var n;return(n=e.selectComponent)==null?void 0:n.call(e,t)})}function ia(e,t={}){var n;let r=(n=t.context)==null?t.fallbackContext:n;return Wi.waitForHost(e,()=>{var e;return Ki((e=Gi())==null?qi(r):e)},(e,t)=>{var n;return(n=e.selectComponent)==null?void 0:n.call(e,t)},t)}function aa(e,t={}){if(!D())throw Error(`useLayoutBridge() 必须在 setup() 的同步阶段调用`);let n=I(),r=Vi(e),i=t.resolveComponent,a=Ji(n),o=a&&typeof a==`object`?Object.create(a):{},s=Object.assign(o,{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=Ji(n),l=c==null||(t=c.selectComponent)==null?void 0:t.call(c,e);if(l)return l;let u=Gi();return(a=u==null||(o=u.selectComponent)==null?void 0:o.call(u,e))==null?null:a}});ea(r,s),ee(()=>{ea(r,s)}),ne(()=>{ta(r,s)})}function oa(e,t){if(!e.length)return null;let n=t==null?I():t;if(!n)return null;let r=$i(e,n);return ea(e.map(e=>e.key),r),r}function sa(e,t){if(!e.length)return!1;let n=t==null?I():t;return n?ta(e.map(e=>e.key),n):!1}function ca(e){aa(Object.keys(e),{resolveComponent(t){return Yi(e[t])}})}function la(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[xe])return;let t=oa(p,e);t&&(e[xe]=t)},C=e=>{v&&(e[ke]=(t,n)=>{var r;let i=(r=e.__wevu)==null?void 0:r.state;if(!i||typeof i!=`object`)return;i[J]=Qn(t);let a=t===!1||n==null?{}:n;i[Oe]=a,Yn(e,t,a)})};if(v)for(let e of[`onPullDownRefresh`,`onReachBottom`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]){let t=a[e];typeof t==`function`&&typeof l[e]!=`function`&&(x[e]=function(...e){return t.apply(this,e)})}let w={...i,...a,observers:o,lifetimes:{...s,created:function(...e){if(d(this),Array.isArray(f)&&f.length&&Object.defineProperty(this,tt,{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){N(this,`onMoved`,e),typeof s.moved==`function`&&s.moved.apply(this,e)},attached:function(...e){if(d(this),Array.isArray(f)&&f.length&&!this[tt]&&Object.defineProperty(this,tt,{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`&&Ci(this),N(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[Ie]){this[Ie]=!0,g(this),Tr(this,()=>{N(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(N(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[xe]&&(sa(p,this[xe]),delete this[xe]),Ti(this),typeof s.detached==`function`&&s.detached.apply(this,e)},error:function(...e){N(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}wi(this,!0),N(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}wi(this,!1),N(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}N(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}N(this,`onRouteDone`,e),typeof c.routeDone==`function`&&c.routeDone.apply(this,e)}},methods:{...x,...l},options:u},T=globalThis[de];if(typeof(T==null?void 0:T.trackWevuComponent)==`function`){let e=T.trackWevuComponent(w,e=>{xi(e,t,n,r,{snapshotOmitKeys:_}),g(e),C(e),S(e),Ci(e,{rehydrateSetupState:!0})});T.isApplying()||Component(e)}else Component(w)}function ua(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}=Ri(i),{enableOnPullDownRefresh:L,enableOnReachBottom:R,enableOnPageScroll:z,enableOnRouteDone:B,enableOnRouteDoneFallback:V,enableOnTabItemTap:H,enableOnResize:U,enableOnShareAppMessage:W,enableOnShareTimeline:G,enableOnAddToFavorites:ee,enableOnSaveExitState:te,effectiveOnSaveExitState:ne,effectiveOnPullDownRefresh:re,effectiveOnReachBottom:ie,effectiveOnPageScroll:ae,effectiveOnRouteDone:K,effectiveOnTabItemTap:oe,effectiveOnResize:se,effectiveOnShareAppMessage:ce,effectiveOnShareTimeline:le,effectiveOnAddToFavorites:ue}=Mi({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[ge];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[me])==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||a,...l},{attachWevuPropKeys:pe,directPropsDerivedKeys:he,syncWevuPropsFromInstance:_e,syncWevuPropsFromValues:ve,finalObservers:ye}=Bi({restOptions:u,propsAliases:m,propsDerivedKeys:h,userObservers:g}),{finalMethods:be}=Fi({userMethods:{...d,...o},runtimeMethods:t});la({runtimeApp:e,watch:n,setup:r,restOptions:u,pageLifecycleHooks:Pi({runtimeApp:e,watch:n,setup:r,userOnLoad:x,userOnUnload:S,userOnShow:C,userOnHide:w,userOnReady:T,isPage:y,enableOnSaveExitState:te,enableOnPullDownRefresh:L,enableOnReachBottom:R,enableOnPageScroll:z,enableOnRouteDone:B,enableOnRouteDoneFallback:V,enableOnTabItemTap:H,enableOnResize:U,enableOnShareAppMessage:W,enableOnShareTimeline:G,enableOnAddToFavorites:ee,syncWevuPropsFromValues:ve,effectiveOnSaveExitState:ne,effectiveOnPullDownRefresh:re,effectiveOnReachBottom:ie,effectiveOnPageScroll:ae,effectiveOnRouteDone:K,effectiveOnTabItemTap:oe,effectiveOnResize:se,effectiveOnShareAppMessage:ce,effectiveOnShareTimeline:le,effectiveOnAddToFavorites:ue,hasHook:de}),finalObservers:ye,userLifetimes:s,userPageLifetimes:c,finalMethods:be,finalOptions:fe,applyExtraInstanceFields:I,templateRefs:f,layoutHosts:p,attachWevuPropKeys:pe,setupLifecycle:_,syncWevuPropsFromInstance:_e,syncWevuPropsFromValues:ve,directPropsDerivedKeys:he,isPage:y,legacyCreated:v,getRuntimeOwnerLabel:Li})}function da(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 re(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{se(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=k(),t=`__wevuAppRegistered`;e&&e[t]||(e&&(e[t]=!0),ji(h,i==null?{}:i,o,s,c))}return h}var fa=class extends Error{};function pa(e){if(typeof e==`function`)return e;let t=e==null?void 0:e.get;return typeof t==`function`?t:void 0}function ma(e){return e.startsWith(`__wv_bind_`)||e.startsWith(`__wv_cls_`)||e.startsWith(`__wv_style_`)}function ha(e,t){if(!e.startsWith(`__wv_bind_`))return!1;try{return!/\bthis\b/.test(Function.prototype.toString.call(t))}catch(e){return!1}}function ga(e){if(e===Z)return``;if(e.startsWith(`__wv_bind_`))return null;if(e.startsWith(`__wv_cls_`)||e.startsWith(`__wv_style_`))return``}function _a(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=ga(t);n!==void 0&&(i[t]=n)}return Object.keys(i).length?i:void 0}function va(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=pa(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 fa;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 fa}throw new fa}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=pa(n[e]);ma(e)&&(!t||!ha(e,t))||m(e)}return Object.keys(d).length?d:void 0}function ya(e,t,n){if(!e||typeof e!=`object`)return e;let r=va({data:e,computed:t,setData:n}),i=_a(e,n);return r||i?{...e,...i,...r}:e}const ba=`__wevu_allowNullPropInput`,xa=`allowNullPropInput`,Sa=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 Ca(e){return Sa.get(e)}function wa(e){if(e===void 0)return[];let t=Array.isArray(e)?e:[e],n=[];t.forEach(e=>{let t=Ca(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 Ta(e,t){let n=wa(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 Ea(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 Da(e){if(!Array.isArray(e))return[];let t=[];return e.forEach(e=>{let n=Ca(e);n==null||t.includes(n)||t.push(n)}),t}function Oa(e,t){if(e===void 0)return;if(e===null)return{type:null};if(Array.isArray(e)||typeof e==`function`){let n={};return Ta(n,e),t&&n.type!==null&&Ea(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=wa(n.type);n.type=(r=e[0])==null?null:r;let t=Da(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&&Ea(n,null),n}function ka(e,t){let n={};return Object.entries(e).forEach(([e,r])=>{let i=Oa(r,t);i!==void 0&&(n[e]=i)}),n}function Aa(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={};Ta(i,r),t&&i.type!==null&&Ea(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&&Ta(i,r.type),Array.isArray(r.optionalTypes)){let e=r.optionalTypes.map(e=>Ca(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&&Ea(i,null),Q(i,`type`)||(i.type=null),n[e]=i}}}),n}function ja(e,t,n){var r;let i=!!((r=e[ba])==null?e[xa]:r),{[ba]:a,[xa]: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,Je)||(t[Je]={type:String,value:``}),Q(t,$e)||(t[$e]={type:null,value:null}),Q(t,qe)||(t[qe]={type:null,value:null}),t):t};if(u){let{properties:e,...n}=s,r=u?i?ka(u,i):u:void 0,a=Aa(t,i);return{...n,properties:f({...a,...r})}}return{...s,properties:f(Aa(t,i))}}const Ma=[Z,Je,Xe,Ye,Ze,Qe,$e],Na=/&/g,Pa=/"/g,Fa=/"/g,Ia=/'/g,La=/'/g,Ra=/</g,za=/>/g;function Ba(e){return e.replace(Na,`&`).replace(Pa,`"`).replace(Fa,`"`).replace(Ia,`'`).replace(La,`'`).replace(Ra,`<`).replace(za,`>`)}function Va(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(Ba(a))}catch(e){o=[]}}return Array.isArray(o)||(o=[]),o.map(t=>t===`$event`?e:t)}function Ha(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 Ua(e){var t,n,r,i;return(t=(n=e==null||(r=e.__wevu)==null?void 0:r.proxy)==null?e==null||(i=e[X])==null?void 0:i.proxy:n)==null?e:t}function Wa(e,t){if(!t||Object.keys(t).length===0)return;let n=Ua(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 Ga(e){var t,n;e==null||(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)}function Ka(e,t){Ga(e);let n=Wa(e,t);n&&Object.keys(n).length>0&&typeof(e==null?void 0:e.setData)==`function`&&e.setData(n)}function qa(e,t){var n,r,i;let a=Q(t==null?{}:t,$e)?t[$e]:e==null||(n=e.properties)==null?void 0:n[$e],o=Q(t==null?{}:t,Qe)?t[Qe]:e==null||(r=e.properties)==null?void 0:r[Qe],s=Ha(a),c=Ha(o),l={...s,...c};e[Ze]=l;let u=e==null||(i=e.__wevu)==null?void 0:i.state;return u&&typeof u==`object`&&(u[Ze]=l),l}function Ja(e,t,n){let r=qa(e,n);typeof(e==null?void 0:e.setData)==`function`&&e.setData({[Ze]:r}),Ka(e,t)}function Ya(e,t){var n;e[Xe]=t;let r=e==null?void 0:e.data;if(r&&typeof r==`object`)try{Object.defineProperty(r,Xe,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(e){r[Xe]=t}let i=e==null||(n=e.__wevu)==null?void 0:n.state;i&&typeof i==`object`&&(i[Xe]=t)}function Xa(e,t,n,r){var i;Ya(e,n),qa(e),e[Ye]=t||{};let a=e==null||(i=e.__wevu)==null?void 0:i.state;a&&typeof a==`object`&&(a[Ye]=t||{}),typeof(e==null?void 0:e.setData)==`function`&&e.setData({[Ye]:t||{}}),Ka(e,r)}function Za(e,t,n){if(!t){typeof(e==null?void 0:e.__wvOwnerUnsub)==`function`&&e.__wvOwnerUnsub(),e.__wvOwnerUnsub=void 0,e.__wvOwnerBoundId=``,Ya(e,void 0);return}let r=(t,r)=>{Xa(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 Qa(e){var t,n,r,i;return(t=(n=e==null||(r=e.properties)==null?void 0:r[Je])==null?e==null||(i=e.properties)==null?void 0:i[Z]:n)==null?``:t}function $a(e,t){Ja(e,t);let n=Qa(e);n&&Za(e,n,t)}function eo(){let e={[Ye]:{},[Ze]:{}};return Object.defineProperty(e,Xe,{value:void 0,configurable:!0,enumerable:!1,writable:!0}),e}function to(e){let t=e==null?void 0:e.computed,n={options:{virtualHost:!0},setData:{omit:Ma},[Pe]:Ma,properties:{[Je]:{type:String,value:``,observer(e){Za(this,e||``,t)}},[Z]:{type:String,value:``,observer(e){Za(this,e||``,t)}},[Qe]:{type:null,value:null,observer(e){Ja(this,t,{[Qe]:e})}},[$e]:{type:null,value:null,observer(e){Ja(this,t,{[$e]:e})}}},data:eo,lifetimes:{attached(){$a(this,t)},ready(){$a(this,t)},detached(){typeof this.__wvOwnerUnsub==`function`&&this.__wvOwnerUnsub(),this.__wvOwnerUnsub=void 0,this.__wvOwnerBoundId=``,Ya(this,void 0)}},methods:{[Ee](e){var t,n,r,i,a;let o=this[Xe],s=Gn(o,void 0,e,(t=this.__wevu)==null||(t=t.methods)==null?void 0:t[ve]);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=Va(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,[ve]:e.inlineMap}),n}function no(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function ro(e){return typeof e!=`object`||!e||h(e)||m(e)||Array.isArray(e)?!0:no(e)}function io(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,f=m(u)?b(u):u,p=!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),p=!0}else{if(At(i)){var a;e==null||(a=e.__wevu_trackSetupReactiveKey)==null||a.call(e,r)}if(u[r]=i,i===t||!ro(i))try{Object.defineProperty(f,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,p){var _;(_=e.__wevu_touchSetupMethodsVersion)==null||_.call(e)}}}let ao;function oo(){let e=E();if(!e)return;let t=e;ao&&t[He]!==ao&&(t[He]=ao)}function so(e,t){return!!e.__wevu_isPage&&Array.isArray(t==null?void 0:t.pick)&&t.pick.includes(Z)}function co(e){return Array.isArray(e==null?void 0:e.pick)&&e.pick.includes(Z)}function lo(e){let t=e.properties;return!!(t&&typeof t==`object`&&(Je in t||$e in t))}function uo(e,t){return(t==null?void 0:t.strategy)!==`patch`||!lo(e)?t:{...t,strategy:`diff`}}function fo(e){oo();let{__typeProps:t,data:n,computed:r,methods:i,setData:a,watch:o,setup:s,props:c,allowFunctionProps:l,...u}=Cn(e),d=u[he],f=Array.isArray(d)?[...new Set(d.filter(e=>typeof e==`string`&&e.length>0))]:[];delete u[he];let p=uo(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=da({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&&io(t.runtime,t.instance,n,{includeFunctionsInState:l===!0,functionPropPaths:l===!1?void 0:m}),n}):void 0,_=typeof n==`function`?n():n,v=ya(co(p)?{..._&&typeof _==`object`?_:{},[Z]:so(u,p)?(_==null?void 0:_[Z])||er():(_==null?void 0:_[Z])||``}:_,r,p),y=ja(v===void 0?u:{...u,data:v},c),b={data:n,computed:r,methods:i,setData:p,watch:o,setup:g,mpOptions:y};return ua(h,i==null?{}:i,o,g,y),{__wevu_runtime:h,__wevu_options:b}}function po(e){var t;oo();let{properties:n,props:r,...i}=e;fo(ja({...i,allowNullPropInput:(t=i.allowNullPropInput)==null||t,__wevu_allowNullPropInput:!0},r,n))}function mo(e){po(to(e))}ao=mo,oo();const ho=[`dispose`,`abort`,`cancel`,`stop`,`disconnect`,`destroy`,`close`];function go(e){if(e){if(typeof e==`function`)return e;for(let t of ho){let n=e[t];if(typeof n==`function`)return()=>n.call(e)}}}function _o(){if(!I())throw Error(`useDisposables() 必须在 setup() 的同步阶段调用`);let e=new Set,t=!1,n=n=>{let r=go(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 le(r),ne(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 vo(e,t){let n=e,r=n.createIntersectionObserver;if(typeof r==`function`)return r.call(n,t);if(!z(`globalCreateIntersectionObserver`))return;let i=k(),a=i==null?void 0:i.createIntersectionObserver;if(typeof a==`function`)return A().intersectionObserverScopeByParameter?a.call(i,e,t):a.call(i,t)}function yo(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 bo(e){var t;let n=(t=e.context)==null?I():t;if(!n||!D())throw Error(`useElementIntersectionObserver() 必须在 setup() 的同步阶段调用`);let r=null,a=()=>{if(r){try{r.disconnect()}catch(e){}r=null}},o=()=>{var t,i;a();let o=u(e.selector);if(!(e.enabled==null||u(e.enabled))||!o)return null;let s=vo(n,u((t=e.observerOptions)==null?{}:t));return!s||typeof s.observe!=`function`?null:(r=yo(s,(i=e.relativeToViewport)==null||i),r.observe(o,t=>{var n;return(n=e.onObserve)==null?void 0:n.call(e,t)}),r)};return i(()=>{var t;return[u(e.selector),e.enabled==null||u(e.enabled),u((t=e.observerOptions)==null?{}:t),e.relativeToViewport]},()=>{o()},{deep:!0}),ot(o),lt(a),le(a),ne(a),{disconnect:a,observe:o,get observer(){return r}}}function xo(e,t){let n=e,r=n.createIntersectionObserver;if(typeof r==`function`)return r.call(n,t)}function So(e,t){if(!z(`globalCreateIntersectionObserver`))return;let n=k(),r=n==null?void 0:n.createIntersectionObserver;if(typeof r==`function`)return A().intersectionObserverScopeByParameter?r.call(n,e,t):r.call(n,t)}function Co(e={}){var t;let n=I();if(!n)throw Error(`useIntersectionObserver() 必须在 setup() 的同步阶段调用`);let r=(t=xo(n,e))==null?So(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 le(a),ne(a),r}function wo(e){var t,n;return e?(t=(n=e.split(`?`)[0])==null?void 0:n.replace(/^\/+/,``))==null?``:t:``}function To(){let e=M(),t=e[e.length-1],n=e.length||1;return{canGoBack:n>1,currentRoute:wo(t==null?void 0:t.route),stackLength:n}}function Eo(e={}){var t;if(!D())throw Error(`usePageStack() 必须在 setup() 的同步阶段调用`);let n=To(),r=f(n.currentRoute),i=f(n.stackLength),a=T(()=>i.value>1),o=()=>{let e=To();r.value=e.currentRoute,i.value=e.stackLength};return((t=e.autoRefresh)==null||t)&&(ee(o),V(o)),{canGoBack:a,currentRoute:r,refresh:o,stackLength:i}}function Do(e={}){var t,n;let r=(t=e.defaultStatusBarHeight)==null?20:t,i=(n=e.defaultNavigationBarHeight)==null?44:n,a=k(),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 Oo(e={}){var t;if(!D())throw Error(`useNavigationBarMetrics() 必须在 setup() 的同步阶段调用`);let n=Do(e),r=f(n.statusBarHeight),i=f(n.navigationBarHeight),a=T(()=>r.value+i.value),o=()=>{let t=Do(e);r.value=t.statusBarHeight,i.value=t.navigationBarHeight};return((t=e.autoRefresh)==null||t)&&ee(o),{navigationBarHeight:i,navigationHeight:a,refresh:o,statusBarHeight:r}}function ko(e){return typeof e!=`number`||!Number.isFinite(e)?80:Math.max(0,e)}function Ao(e){if(!(typeof e!=`number`||!Number.isFinite(e)))return Math.max(0,e)}function jo(e,t={}){var n,r;if(!I())throw Error(`usePageScrollThrottle() 必须在 setup() 的同步阶段调用`);if(typeof e!=`function`)throw TypeError(`usePageScrollThrottle() 需要传入回调函数`);let i=ko(t.interval),a=(n=t.leading)==null||n,o=(r=t.trailing)==null||r,s=Ao(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)};oe(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 le(b),ne(b),b}function Mo(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 No(e,t){let n=t==null?I():t;if(!n||!D())throw Error(`${e}() 必须在 setup() 的同步阶段调用`);return n}function Po(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 Fo(e={}){let t=No(`useSelectorQuery`,e.context);return()=>yr(t)}function Io(e={}){var t;let n=No(`useBoundingClientRect`,e.context),r=(t=e.all)!=null&&t;return e=>Po(n,e,r,e=>e.boundingClientRect())}function Lo(e){var t;let n=No(`useSelectorFields`,e.context),r=(t=e.all)!=null&&t;return t=>Po(n,t,r,t=>t.fields(e.fields))}function Ro(e={}){var t;let n=No(`useScrollOffset`,e.context),r=(t=e.all)!=null&&t;return e=>Po(n,e,r,e=>e.scrollOffset())}function zo(e){let t=e,n=t.setUpdatePerformanceListener;if(typeof n==`function`)return e=>{n.call(t,e)}}function Bo(e){let t=I();if(!t)throw Error(`useUpdatePerformanceListener() 必须在 setup() 的同步阶段调用`);if(typeof e!=`function`)throw TypeError(`useUpdatePerformanceListener() 需要传入监听函数`);let n=zo(t);if(!n)throw Error(`当前实例不支持 setUpdatePerformanceListener,请检查基础库版本或组件上下文`);n(e);let r=!1,i=()=>{if(!r){r=!0;try{n(void 0)}catch(e){}}};return le(i),ne(i),i}function Vo(){let e=I();if(e!=null&&e[ye]&&e[Be])return e[Be];throw Error(`defineAppSetup() / use() 只能在 app setup 上下文中调用`)}function Ho(e){return e(Vo())}function Uo(e,...t){return Vo().use(e,...t)}const Wo=Object.freeze(Object.create(null));function Go(){var e;let t=D();if(!t)throw Error(`useAttrs() 必须在 setup() 的同步阶段调用`);return(e=t.attrs)==null?{}:e}function Ko(){var e;let t=D();if(!t)throw Error(`useSlots() 必须在 setup() 的同步阶段调用`);return(e=t.slots)==null?Wo:e}function qo(){let e=D();if(!(e!=null&&e.instance))throw Error(`useNativeInstance() 必须在 setup() 的同步阶段调用`);return e.instance}const Jo=Object.freeze(Object.create(null));function Yo(e,t){let n=t===`modelValue`?`modelModifiers`:`${t}Modifiers`,r=e==null?void 0:e[n];return!r||typeof r!=`object`?Jo:r}function Xo(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 Zo(e,t,n={}){let r=D();if(!r)throw Error(`useModel() 必须在 setup() 的同步阶段调用`);let i=r.emit,a=`update:${t}`,o=()=>Yo(e,t);return Xo(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 Qo(e){let t=I();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)=>{if(!e)return n(t,r);let i={...e,...r};return n(t,i)});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 $o(){let e=Qo({event:`change`});return function(t,n){return e.model(t,n)}}function es(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 ts(e){let t=e[rt];if(t)return t;let n=new Map;try{Object.defineProperty(e,rt,{value:n,configurable:!0,enumerable:!1,writable:!1})}catch(t){e[rt]=n}return n}function ns(e){let n=I();if(!n)throw Error(`useTemplateRef() 必须在 setup() 的同步阶段调用`);let r=typeof e==`string`?e.trim():``;if(!r)throw Error(`useTemplateRef() 需要传入有效的模板 ref 名称`);let i=ts(n),a=i.get(r);if(a)return a;let o=t(null);return i.set(r,o),o}export{_t as $,ea as A,yi as B,bo as C,fo as D,mo as E,sa as F,Zn as G,Ti as H,aa as I,Jn as J,Yn as K,ca as L,na as M,ra as N,da as O,ta as P,$ as Q,ia as R,Co as S,po as T,Jr as U,wi as V,Qn as W,bn as X,xn as Y,Bt as Z,jo as _,Zo as a,mt as at,Oo as b,Ko as c,ht as ct,Bo as d,gt as et,Io as f,Mo as g,Fo as h,$o as i,dt as it,oa as j,ua as k,Ho as l,lt,Lo as m,es as n,ut as nt,Go as o,ft as ot,Ro as p,Xn as q,Qo as r,ct as rt,qo as s,ot as st,ns as t,pt as tt,Uo as u,st as ut,To as v,_o as w,Eo as x,Do as y,ji as z};
|