@vue-mini/core 1.2.7 → 1.3.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * vue-mini v1.2.7
2
+ * vue-mini v1.3.0-alpha.1
3
3
  * https://github.com/vue-mini/vue-mini
4
4
  * (c) 2019-present Yang Mingshan
5
5
  * @license MIT
6
6
  */
7
- "use strict";function t(t){const e=Object.create(null);for(const s of t.split(","))e[s]=1;return t=>t in e}const e={},s=()=>{},n=Object.assign,i=Object.prototype.hasOwnProperty,o=(t,e)=>i.call(t,e),r=Array.isArray,c=t=>"[object Map]"===u(t),a=t=>"function"==typeof t,h=t=>"symbol"==typeof t,l=t=>null!==t&&"object"==typeof t,_=Object.prototype.toString,u=t=>_.call(t),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,p=(t,e)=>!Object.is(t,e);let d,E;class O{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=d,!t&&d&&(this.index=(d.scopes||(d.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let t,e;if(this._isPaused=!0,this.scopes)for(t=0,e=this.scopes.length;t<e;t++)this.scopes[t].pause();for(t=0,e=this.effects.length;t<e;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){let t,e;if(this._isPaused=!1,this.scopes)for(t=0,e=this.scopes.length;t<e;t++)this.scopes[t].resume();for(t=0,e=this.effects.length;t<e;t++)this.effects[t].resume()}}run(t){if(this._active){const e=d;try{return d=this,t()}finally{d=e}}}on(){1===++this._on&&(this.prevScope=d,d=this)}off(){this._on>0&&0===--this._on&&(d=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){let e,s;for(this._active=!1,e=0,s=this.effects.length;e<s;e++)this.effects[e].stop();for(this.effects.length=0,e=0,s=this.cleanups.length;e<s;e++)this.cleanups[e]();if(this.cleanups.length=0,this.scopes){for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0}}}function v(){return d}const g=new WeakSet;class S{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,d&&d.active&&d.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,g.has(this)&&(g.delete(this),this.trigger()))}notify(){2&this.flags&&!(32&this.flags)||8&this.flags||T(this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,k(this),y(this);const t=E,e=w;E=this,w=!0;try{return this.fn()}finally{D(this),E=t,w=e,this.flags&=-3}}stop(){if(1&this.flags){for(let t=this.deps;t;t=t.nextDep)L(t);this.deps=this.depsTail=void 0,k(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?g.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){x(this)&&this.run()}get dirty(){return x(this)}}let A,N,R=0;function T(t,e=!1){if(t.flags|=8,e)return t.next=N,void(N=t);t.next=A,A=t}function b(){R++}function m(){if(--R>0)return;if(N){let t=N;for(N=void 0;t;){const e=t.next;t.next=void 0,t.flags&=-9,t=e}}let t;for(;A;){let e=A;for(A=void 0;e;){const s=e.next;if(e.next=void 0,e.flags&=-9,1&e.flags)try{e.trigger()}catch(e){t||(t=e)}e=s}}if(t)throw t}function y(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function D(t){let e,s=t.depsTail,n=s;for(;n;){const t=n.prevDep;-1===n.version?(n===s&&(s=t),L(n),P(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=t}t.deps=e,t.depsTail=s}function x(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(I(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function I(t){if(4&t.flags&&!(16&t.flags))return;if(t.flags&=-17,t.globalVersion===M)return;if(t.globalVersion=M,!t.isSSR&&128&t.flags&&(!t.deps&&!t._dirty||!x(t)))return;t.flags|=2;const e=t.dep,s=E,n=w;E=t,w=!0;try{y(t);const s=t.fn(t._value);(0===e.version||p(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(t){throw e.version++,t}finally{E=s,w=n,D(t),t.flags&=-3}}function L(t,e=!1){const{dep:s,prevSub:n,nextSub:i}=t;if(n&&(n.nextSub=i,t.prevSub=void 0),i&&(i.prevSub=n,t.nextSub=void 0),s.subs===t&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let t=s.computed.deps;t;t=t.nextDep)L(t,!0)}e||--s.sc||!s.map||s.map.delete(s.key)}function P(t){const{prevDep:e,nextDep:s}=t;e&&(e.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=e,t.nextDep=void 0)}let w=!0;const H=[];function C(){H.push(w),w=!1}function U(){const t=H.pop();w=void 0===t||t}function k(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const t=E;E=void 0;try{e()}finally{E=t}}}let M=0;class j{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class W{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!E||!w||E===this.computed)return;let e=this.activeLink;if(void 0===e||e.sub!==E)e=this.activeLink=new j(E,this),E.deps?(e.prevDep=E.depsTail,E.depsTail.nextDep=e,E.depsTail=e):E.deps=E.depsTail=e,V(e);else if(-1===e.version&&(e.version=this.version,e.nextDep)){const t=e.nextDep;t.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=t),e.prevDep=E.depsTail,e.nextDep=void 0,E.depsTail.nextDep=e,E.depsTail=e,E.deps===e&&(E.deps=t)}return e}trigger(t){this.version++,M++,this.notify(t)}notify(t){b();try{0;for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{m()}}}function V(t){if(t.dep.sc++,4&t.sub.flags){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let t=e.deps;t;t=t.nextDep)V(t)}const s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}const G=new WeakMap,F=Symbol(""),B=Symbol(""),Q=Symbol("");function Y(t,e,s){if(w&&E){let e=G.get(t);e||G.set(t,e=new Map);let n=e.get(s);n||(e.set(s,n=new W),n.map=e,n.key=s),n.track()}}function X(t,e,s,n,i,o){const a=G.get(t);if(!a)return void M++;const l=t=>{t&&t.trigger()};if(b(),"clear"===e)a.forEach(l);else{const i=r(t),o=i&&f(s);if(i&&"length"===s){const t=Number(n);a.forEach((e,s)=>{("length"===s||s===Q||!h(s)&&s>=t)&&l(e)})}else switch((void 0!==s||a.has(void 0))&&l(a.get(s)),o&&l(a.get(Q)),e){case"add":i?o&&l(a.get("length")):(l(a.get(F)),c(t)&&l(a.get(B)));break;case"delete":i||(l(a.get(F)),c(t)&&l(a.get(B)));break;case"set":c(t)&&l(a.get(F))}}m()}function Z(t){const e=Ct(t);return e===t?e:(Y(e,0,Q),wt(t)?e:e.map(Ut))}function z(t){return Y(t=Ct(t),0,Q),t}const J={__proto__:null,[Symbol.iterator](){return K(this,Symbol.iterator,Ut)},concat(...t){return Z(this).concat(...t.map(t=>r(t)?Z(t):t))},entries(){return K(this,"entries",t=>(t[1]=Ut(t[1]),t))},every(t,e){return q(this,"every",t,e,void 0,arguments)},filter(t,e){return q(this,"filter",t,e,t=>t.map(Ut),arguments)},find(t,e){return q(this,"find",t,e,Ut,arguments)},findIndex(t,e){return q(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return q(this,"findLast",t,e,Ut,arguments)},findLastIndex(t,e){return q(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return q(this,"forEach",t,e,void 0,arguments)},includes(...t){return et(this,"includes",t)},indexOf(...t){return et(this,"indexOf",t)},join(t){return Z(this).join(t)},lastIndexOf(...t){return et(this,"lastIndexOf",t)},map(t,e){return q(this,"map",t,e,void 0,arguments)},pop(){return st(this,"pop")},push(...t){return st(this,"push",t)},reduce(t,...e){return tt(this,"reduce",t,e)},reduceRight(t,...e){return tt(this,"reduceRight",t,e)},shift(){return st(this,"shift")},some(t,e){return q(this,"some",t,e,void 0,arguments)},splice(...t){return st(this,"splice",t)},toReversed(){return Z(this).toReversed()},toSorted(t){return Z(this).toSorted(t)},toSpliced(...t){return Z(this).toSpliced(...t)},unshift(...t){return st(this,"unshift",t)},values(){return K(this,"values",Ut)}};function K(t,e,s){const n=z(t),i=n[e]();return n===t||wt(t)||(i._next=i.next,i.next=()=>{const t=i._next();return t.done||(t.value=s(t.value)),t}),i}const $=Array.prototype;function q(t,e,s,n,i,o){const r=z(t),c=r!==t&&!wt(t),a=r[e];if(a!==$[e]){const e=a.apply(t,o);return c?Ut(e):e}let h=s;r!==t&&(c?h=function(e,n){return s.call(this,Ut(e),n,t)}:s.length>2&&(h=function(e,n){return s.call(this,e,n,t)}));const l=a.call(r,h,n);return c&&i?i(l):l}function tt(t,e,s,n){const i=z(t);let o=s;return i!==t&&(wt(t)?s.length>3&&(o=function(e,n,i){return s.call(this,e,n,i,t)}):o=function(e,n,i){return s.call(this,e,Ut(n),i,t)}),i[e](o,...n)}function et(t,e,s){const n=Ct(t);Y(n,0,Q);const i=n[e](...s);return-1!==i&&!1!==i||!Ht(s[0])?i:(s[0]=Ct(s[0]),n[e](...s))}function st(t,e,s=[]){C(),b();const n=Ct(t)[e].apply(t,s);return m(),U(),n}const nt=t("__proto__,__v_isRef,__isVue"),it=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>"arguments"!==t&&"caller"!==t).map(t=>Symbol[t]).filter(h));function ot(t){h(t)||(t=String(t));const e=Ct(this);return Y(e,0,t),e.hasOwnProperty(t)}class rt{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,s){if("__v_skip"===e)return t.__v_skip;const n=this._isReadonly,i=this._isShallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return i;if("__v_raw"===e)return s===(n?i?bt:Tt:i?Rt:Nt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){let t;if(o&&(t=J[e]))return t;if("hasOwnProperty"===e)return ot}const c=Reflect.get(t,e,Mt(t)?t:s);if(h(e)?it.has(e):nt(e))return c;if(n||Y(t,0,e),i)return c;if(Mt(c)){const t=o&&f(e)?c:c.value;return n&&l(t)?xt(t):t}return l(c)?n?xt(c):yt(c):c}}class ct extends rt{constructor(t=!1){super(!1,t)}set(t,e,s,n){let i=t[e];if(!this._isShallow){const e=Pt(i);if(wt(s)||Pt(s)||(i=Ct(i),s=Ct(s)),!r(t)&&Mt(i)&&!Mt(s))return e||(i.value=s),!0}const c=r(t)&&f(e)?Number(e)<t.length:o(t,e),a=Reflect.set(t,e,s,Mt(t)?t:n);return t===Ct(n)&&(c?p(s,i)&&X(t,"set",e,s):X(t,"add",e,s)),a}deleteProperty(t,e){const s=o(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&X(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return h(e)&&it.has(e)||Y(t,0,e),s}ownKeys(t){return Y(t,0,r(t)?"length":F),Reflect.ownKeys(t)}}class at extends rt{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const ht=new ct,lt=new at,_t=new ct(!0),ut=new at(!0),ft=t=>t,pt=t=>Reflect.getPrototypeOf(t);function dt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function Et(t,e){const s={get(s){const n=this.__v_raw,i=Ct(n),o=Ct(s);t||(p(s,o)&&Y(i,0,s),Y(i,0,o));const{has:r}=pt(i),c=e?ft:t?kt:Ut;return r.call(i,s)?c(n.get(s)):r.call(i,o)?c(n.get(o)):void(n!==i&&n.get(s))},get size(){const e=this.__v_raw;return!t&&Y(Ct(e),0,F),e.size},has(e){const s=this.__v_raw,n=Ct(s),i=Ct(e);return t||(p(e,i)&&Y(n,0,e),Y(n,0,i)),e===i?s.has(e):s.has(e)||s.has(i)},forEach(s,n){const i=this,o=i.__v_raw,r=Ct(o),c=e?ft:t?kt:Ut;return!t&&Y(r,0,F),o.forEach((t,e)=>s.call(n,c(t),c(e),i))}};n(s,t?{add:dt("add"),set:dt("set"),delete:dt("delete"),clear:dt("clear")}:{add(t){e||wt(t)||Pt(t)||(t=Ct(t));const s=Ct(this);return pt(s).has.call(s,t)||(s.add(t),X(s,"add",t,t)),this},set(t,s){e||wt(s)||Pt(s)||(s=Ct(s));const n=Ct(this),{has:i,get:o}=pt(n);let r=i.call(n,t);r||(t=Ct(t),r=i.call(n,t));const c=o.call(n,t);return n.set(t,s),r?p(s,c)&&X(n,"set",t,s):X(n,"add",t,s),this},delete(t){const e=Ct(this),{has:s,get:n}=pt(e);let i=s.call(e,t);i||(t=Ct(t),i=s.call(e,t)),n&&n.call(e,t);const o=e.delete(t);return i&&X(e,"delete",t,void 0),o},clear(){const t=Ct(this),e=0!==t.size,s=t.clear();return e&&X(t,"clear",void 0,void 0),s}});return["keys","values","entries",Symbol.iterator].forEach(n=>{s[n]=function(t,e,s){return function(...n){const i=this.__v_raw,o=Ct(i),r=c(o),a="entries"===t||t===Symbol.iterator&&r,h="keys"===t&&r,l=i[t](...n),_=s?ft:e?kt:Ut;return!e&&Y(o,0,h?B:F),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:a?[_(t[0]),_(t[1])]:_(t),done:e}},[Symbol.iterator](){return this}}}}(n,t,e)}),s}function Ot(t,e){const s=Et(t,e);return(e,n,i)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(o(s,n)&&n in e?s:e,n,i)}const vt={get:Ot(!1,!1)},gt={get:Ot(!1,!0)},St={get:Ot(!0,!1)},At={get:Ot(!0,!0)},Nt=new WeakMap,Rt=new WeakMap,Tt=new WeakMap,bt=new WeakMap;function mt(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>u(t).slice(8,-1))(t))}function yt(t){return Pt(t)?t:It(t,!1,ht,vt,Nt)}function Dt(t){return It(t,!1,_t,gt,Rt)}function xt(t){return It(t,!0,lt,St,Tt)}function It(t,e,s,n,i){if(!l(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const o=mt(t);if(0===o)return t;const r=i.get(t);if(r)return r;const c=new Proxy(t,2===o?n:s);return i.set(t,c),c}function Lt(t){return Pt(t)?Lt(t.__v_raw):!(!t||!t.__v_isReactive)}function Pt(t){return!(!t||!t.__v_isReadonly)}function wt(t){return!(!t||!t.__v_isShallow)}function Ht(t){return!!t&&!!t.__v_raw}function Ct(t){const e=t&&t.__v_raw;return e?Ct(e):t}const Ut=t=>l(t)?yt(t):t,kt=t=>l(t)?xt(t):t;function Mt(t){return!!t&&!0===t.__v_isRef}function jt(t){return Wt(t,!1)}function Wt(t,e){return Mt(t)?t:new Vt(t,e)}class Vt{constructor(t,e){this.dep=new W,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:Ct(t),this._value=e?t:Ut(t),this.__v_isShallow=e}get value(){return this.dep.track(),this._value}set value(t){const e=this._rawValue,s=this.__v_isShallow||wt(t)||Pt(t);t=s?t:Ct(t),p(t,e)&&(this._rawValue=t,this._value=s?t:Ut(t),this.dep.trigger())}}function Gt(t){return Mt(t)?t.value:t}const Ft={get:(t,e,s)=>"__v_raw"===e?t:Gt(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Mt(i)&&!Mt(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};class Bt{constructor(t){this.__v_isRef=!0,this._value=void 0;const e=this.dep=new W,{get:s,set:n}=t(e.track.bind(e),e.trigger.bind(e));this._get=s,this._set=n}get value(){return this._value=this._get()}set value(t){this._set(t)}}class Qt{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return function(t,e){const s=G.get(t);return s&&s.get(e)}(Ct(this._object),this._key)}}class Yt{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Xt(t,e,s){const n=t[e];return Mt(n)?n:new Qt(t,e,s)}class Zt{constructor(t,e,s){this.fn=t,this.setter=e,this._value=void 0,this.dep=new W(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=M-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!e,this.isSSR=s}notify(){if(this.flags|=16,!(8&this.flags)&&E!==this)return T(this,!0),!0}get value(){const t=this.dep.track();return I(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}const zt={},Jt=new WeakMap;let Kt;function $t(t,e=!1,s=Kt){if(s){let e=Jt.get(s);e||Jt.set(s,e=[]),e.push(t)}}function qt(t,e=1/0,s){if(e<=0||!l(t)||t.__v_skip)return t;if(((s=s||new Map).get(t)||0)>=e)return t;if(s.set(t,e),e--,Mt(t))qt(t.value,e,s);else if(r(t))for(let n=0;n<t.length;n++)qt(t[n],e,s);else if("[object Set]"===u(t)||c(t))t.forEach(t=>{qt(t,e,s)});else if((t=>"[object Object]"===u(t))(t)){for(const n in t)qt(t[n],e,s);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&qt(t[n],e,s)}return t}const te={},ee=Array.isArray,se=Object.assign;function ne(t,e){const s={};return Object.keys(t).forEach(n=>{e.includes(n)||(s[n]=t[n])}),s}function ie(t){return Object.prototype.toString.call(t).slice(8,-1)}function oe(t){return"function"==typeof t}function re(t){return`__${t}__`}var ce;!function(t){t[t.QUEUED=1]="QUEUED",t[t.ALLOW_RECURSE=4]="ALLOW_RECURSE"}(ce||(ce={}));const ae=[];let he=-1;const le=[];let _e=null,ue=0;const fe=Promise.resolve();let pe=null;function de(t){t.flags&ce.QUEUED||(ae.push(t),t.flags|=ce.QUEUED,pe||(pe=fe.then(Oe)))}function Ee(){if(le.length>0){for(_e=[...new Set(le)],le.length=0,ue=0;ue<_e.length;ue++){const t=_e[ue];t.flags&ce.ALLOW_RECURSE&&(t.flags&=~ce.QUEUED),t(),t.flags&=~ce.QUEUED}_e=null,ue=0}}function Oe(){try{for(he=0;he<ae.length;he++){const t=ae[he];0,t.flags&ce.ALLOW_RECURSE&&(t.flags&=~ce.QUEUED),t(),t.flags&ce.ALLOW_RECURSE||(t.flags&=~ce.QUEUED)}}finally{for(;he<ae.length;he++){ae[he].flags&=~ce.QUEUED}he=-1,ae.length=0,pe=null}}function ve(t,e,s){return ge(t,e,s)}function ge(t,n,i=te){const{flush:o}=i,c=se({},i);"post"===o?c.scheduler=t=>{!function(t){t.flags&ce.QUEUED||(le.push(t),t.flags|=ce.QUEUED)}(t)}:"sync"!==o&&(c.scheduler=(t,e)=>{e?t():de(t)}),c.augmentJob=t=>{n&&(t.flags|=ce.ALLOW_RECURSE)};const h=function(t,n,i=e){const{immediate:o,deep:c,once:h,scheduler:l,augmentJob:_,call:u}=i,f=t=>c?t:wt(t)||!1===c||0===c?qt(t,1):qt(t);let d,E,O,g,A=!1,N=!1;if(Mt(t)?(E=()=>t.value,A=wt(t)):Lt(t)?(E=()=>f(t),A=!0):r(t)?(N=!0,A=t.some(t=>Lt(t)||wt(t)),E=()=>t.map(t=>Mt(t)?t.value:Lt(t)?f(t):a(t)?u?u(t,2):t():void 0)):E=a(t)?n?u?()=>u(t,2):t:()=>{if(O){C();try{O()}finally{U()}}const e=Kt;Kt=d;try{return u?u(t,3,[g]):t(g)}finally{Kt=e}}:s,n&&c){const t=E,e=!0===c?1/0:c;E=()=>qt(t(),e)}const R=v(),T=()=>{d.stop(),R&&R.active&&((t,e)=>{const s=t.indexOf(e);s>-1&&t.splice(s,1)})(R.effects,d)};if(h&&n){const t=n;n=(...e)=>{t(...e),T()}}let b=N?new Array(t.length).fill(zt):zt;const m=t=>{if(1&d.flags&&(d.dirty||t))if(n){const t=d.run();if(c||A||(N?t.some((t,e)=>p(t,b[e])):p(t,b))){O&&O();const e=Kt;Kt=d;try{const e=[t,b===zt?void 0:N&&b[0]===zt?[]:b,g];b=t,u?u(n,3,e):n(...e)}finally{Kt=e}}}else d.run()};return _&&_(m),d=new S(E),d.scheduler=l?()=>l(m,!1):m,g=t=>$t(t,!1,d),O=d.onStop=()=>{const t=Jt.get(d);if(t){if(u)u(t,4);else for(const e of t)e();Jt.delete(d)}},n?o?m(!0):b=d.run():l?l(m.bind(null,!0),!0):d.run(),T.pause=d.pause.bind(d),T.resume=d.resume.bind(d),T.stop=T,T}(t,n,c);return h}const Se=Object.create(null);let Ae=null,Ne=null,Re=null;function Te(){return Ne||Re}var be,me,ye;function De(t,e){const s=t[e];return function(...t){const n=this[re(e)];n&&n.forEach(e=>e(...t)),void 0!==s&&s.call(this,...t)}}function xe(t){if(function(t){const e=new Set(["undefined","boolean","number","string"]);return null===t||e.has(typeof t)}(t)||oe(t))return t;if(Mt(t))return xe(t.value);if(Ht(t))return xe(Ct(t));if(ee(t))return t.map(t=>xe(t));if(function(t){return"Object"===ie(t)}(t)){const e={};return Object.keys(t).forEach(s=>{e[s]=xe(t[s])}),e}throw new TypeError(`${ie(t)} value is not supported`)}function Ie(t,e){var s;null!==(s=e)&&"object"==typeof s&&ve(Mt(e)?e:()=>e,()=>{this.setData({[t]:xe(e)},Ee)},{deep:!0})}function Le(t,e){const s=t[e];return function(...t){const n=this[re(e)];n&&n.forEach(e=>e(...t)),void 0!==s&&s.call(this,...t)}}!function(t){t.ON_LAUNCH="onLaunch",t.ON_SHOW="onShow",t.ON_HIDE="onHide",t.ON_ERROR="onError",t.ON_PAGE_NOT_FOUND="onPageNotFound",t.ON_UNHANDLED_REJECTION="onUnhandledRejection",t.ON_THEME_CHANGE="onThemeChange"}(be||(be={})),function(t){t.ON_LOAD="onLoad",t.ON_SHOW="onShow",t.ON_READY="onReady",t.ON_HIDE="onHide",t.ON_UNLOAD="onUnload",t.ON_ROUTE_DONE="onRouteDone",t.ON_PULL_DOWN_REFRESH="onPullDownRefresh",t.ON_REACH_BOTTOM="onReachBottom",t.ON_PAGE_SCROLL="onPageScroll",t.ON_SHARE_APP_MESSAGE="onShareAppMessage",t.ON_SHARE_TIMELINE="onShareTimeline",t.ON_ADD_TO_FAVORITES="onAddToFavorites",t.ON_RESIZE="onResize",t.ON_TAB_ITEM_TAP="onTabItemTap",t.ON_SAVE_EXIT_STATE="onSaveExitState"}(me||(me={})),function(t){t.ATTACHED="attached",t.READY="ready",t.MOVED="moved",t.DETACHED="detached",t.ERROR="error"}(ye||(ye={}));const Pe={[me.ON_SHOW]:"show",[me.ON_HIDE]:"hide",[me.ON_RESIZE]:"resize",[me.ON_ROUTE_DONE]:"routeDone",[ye.READY]:me.ON_READY};function we(t,e){return Ue(e,t.lifetimes[e]||t[e])}function He(t,e){return Ue(e,t.methods[e])}function Ce(t,e){return Ue(e,t.pageLifetimes[Pe[e]])}function Ue(t,e){const s=re(t);return function(...t){const n=this[s];n&&n.forEach(e=>e(...t)),void 0!==e&&e.call(this,...t)}}const ke=es(be.ON_SHOW),Me=es(be.ON_HIDE),je=es(be.ON_ERROR),We=es(be.ON_PAGE_NOT_FOUND),Ve=es(be.ON_UNHANDLED_REJECTION),Ge=es(be.ON_THEME_CHANGE),Fe=ss(me.ON_SHOW),Be=ss(me.ON_HIDE),Qe=ss(me.ON_UNLOAD),Ye=ss(me.ON_ROUTE_DONE),Xe=ss(me.ON_PULL_DOWN_REFRESH),Ze=ss(me.ON_REACH_BOTTOM),ze=ss(me.ON_RESIZE),Je=ss(me.ON_TAB_ITEM_TAP),Ke=ns(me.ON_LOAD),$e=ns(ye.MOVED),qe=ns(ye.DETACHED),ts=ns(ye.ERROR);function es(t){return e=>{Ae&&is(Ae,t,e)}}function ss(t){return e=>{const s=Te();s&&is(s,t,e)}}function ns(t){return e=>{Re&&is(Re,t,e)}}function is(t,e,s){const n=re(e);void 0===t[n]&&(t[n]=[]),t[n].push(s)}exports.EffectScope=O,exports.ReactiveEffect=S,exports.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},exports.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},exports.computed=function(t,e,s=!1){let n,i;return a(t)?n=t:(n=t.get,i=t.set),new Zt(n,i,s)},exports.createApp=function(t){let e,s;if(oe(t))e=t,s={};else{if(void 0===t.setup)return void App(t);e=t.setup,s=ne(t,["setup"])}const n=s[be.ON_LAUNCH];s[be.ON_LAUNCH]=function(t){Ae=this;const s=e(t);void 0!==s&&Object.keys(s).forEach(t=>{this[t]=s[t]}),Ae=null,void 0!==n&&n.call(this,t)},s[be.ON_SHOW]=De(s,be.ON_SHOW),s[be.ON_HIDE]=De(s,be.ON_HIDE),s[be.ON_ERROR]=De(s,be.ON_ERROR),s[be.ON_PAGE_NOT_FOUND]=De(s,be.ON_PAGE_NOT_FOUND),s[be.ON_UNHANDLED_REJECTION]=De(s,be.ON_UNHANDLED_REJECTION),s[be.ON_THEME_CHANGE]=De(s,be.ON_THEME_CHANGE),App(s)},exports.customRef=function(t){return new Bt(t)},exports.defineComponent=function(t,e){let s,n;e=se({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e);let i=null;if(oe(t))s=t,n={};else{if(void 0===t.setup)return Component(t);s=t.setup,n=ne(t,["setup"]),n.properties&&(i=Object.keys(n.properties))}void 0===n.lifetimes&&(n.lifetimes={});const o=n.lifetimes[ye.ATTACHED]||n[ye.ATTACHED];n.lifetimes[ye.ATTACHED]=function(){var t;this.__scope__=new O,Re=t=this,t.__scope__.on();const e={};i&&i.forEach(t=>{e[t]=this.data[t]}),this.__props__=Dt(e);const n={is:this.is,id:this.id,dataset:this.dataset,exitState:this.exitState,router:this.router,pageRouter:this.pageRouter,renderer:this.renderer,triggerEvent:this.triggerEvent.bind(this),createSelectorQuery:this.createSelectorQuery.bind(this),createIntersectionObserver:this.createIntersectionObserver.bind(this),createMediaQueryObserver:this.createMediaQueryObserver.bind(this),selectComponent:this.selectComponent.bind(this),selectAllComponents:this.selectAllComponents.bind(this),selectOwnerComponent:this.selectOwnerComponent.bind(this),getRelationNodes:this.getRelationNodes.bind(this),getTabBar:this.getTabBar.bind(this),getPageId:this.getPageId.bind(this),animate:this.animate.bind(this),clearAnimation:this.clearAnimation.bind(this),getOpenerEventChannel:this.getOpenerEventChannel.bind(this),applyAnimatedStyle:this.applyAnimatedStyle.bind(this),clearAnimatedStyle:this.clearAnimatedStyle.bind(this),setUpdatePerformanceListener:this.setUpdatePerformanceListener.bind(this),getPassiveEvent:this.getPassiveEvent.bind(this),setPassiveEvent:this.setPassiveEvent.bind(this),setInitialRenderingCache:this.setInitialRenderingCache.bind(this),getAppBar:this.getAppBar&&this.getAppBar.bind(this)},r=s(this.__props__,n);if(void 0!==r){let t;Object.keys(r).forEach(e=>{const s=r[e];oe(s)?this[e]=s:(t=t||{},t[e]=xe(s),Ie.call(this,e,s))}),void 0!==t&&this.setData(t,Ee)}Re&&Re.__scope__.off(),Re=null,void 0!==o&&o.call(this)};const r=we(n,ye.DETACHED);return n.lifetimes[ye.DETACHED]=function(){r.call(this),this.__scope__.stop()},n.lifetimes[ye.READY]=Ue(Pe[ye.READY],n.lifetimes[ye.READY]||n[ye.READY]),n.lifetimes[ye.MOVED]=we(n,ye.MOVED),n.lifetimes[ye.ERROR]=we(n,ye.ERROR),void 0===n.methods&&(n.methods={}),(n.methods[me.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n.methods[me.ON_PAGE_SCROLL]=He(n,me.ON_PAGE_SCROLL),n.methods.__listenPageScroll__=()=>!0),void 0===n.methods[me.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n.methods[me.ON_SHARE_APP_MESSAGE]=function(t){const e=this[re(me.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.methods.__isInjectedShareToOthersHook__=()=>!0),void 0===n.methods[me.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n.methods[me.ON_SHARE_TIMELINE]=function(){const t=this[re(me.ON_SHARE_TIMELINE)];return t?t():{}},n.methods.__isInjectedShareToTimelineHook__=()=>!0),void 0===n.methods[me.ON_ADD_TO_FAVORITES]&&(n.methods[me.ON_ADD_TO_FAVORITES]=function(t){const e=this[re(me.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.methods.__isInjectedFavoritesHook__=()=>!0),void 0===n.methods[me.ON_SAVE_EXIT_STATE]&&(n.methods[me.ON_SAVE_EXIT_STATE]=function(){const t=this[re(me.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.methods.__isInjectedExitStateHook__=()=>!0),n.methods[me.ON_LOAD]=He(n,me.ON_LOAD),n.methods[me.ON_PULL_DOWN_REFRESH]=He(n,me.ON_PULL_DOWN_REFRESH),n.methods[me.ON_REACH_BOTTOM]=He(n,me.ON_REACH_BOTTOM),n.methods[me.ON_TAB_ITEM_TAP]=He(n,me.ON_TAB_ITEM_TAP),void 0===n.pageLifetimes&&(n.pageLifetimes={}),n.pageLifetimes[Pe[me.ON_SHOW]]=Ce(n,me.ON_SHOW),n.pageLifetimes[Pe[me.ON_HIDE]]=Ce(n,me.ON_HIDE),n.pageLifetimes[Pe[me.ON_RESIZE]]=Ce(n,me.ON_RESIZE),n.pageLifetimes[Pe[me.ON_ROUTE_DONE]]=Ce(n,me.ON_ROUTE_DONE),i&&(void 0===n.observers&&(n.observers={}),i.forEach(t=>{const e=n.observers[t];n.observers[t]=function(s){this.__props__&&(this.__props__[t]=s),void 0!==e&&e.call(this,s)}})),Component(n)},exports.definePage=function(t,e){let s,n;if(e=se({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e),oe(t))s=t,n={};else{if(void 0===t.setup)return void Page(t);s=t.setup,n=ne(t,["setup"])}const i=n[me.ON_LOAD];n[me.ON_LOAD]=function(t){var e;this.__scope__=new O,Ne=e=this,e.__scope__.on();const n={is:this.is,route:this.route,options:this.options,exitState:this.exitState,router:this.router,pageRouter:this.pageRouter,renderer:this.renderer,createSelectorQuery:this.createSelectorQuery.bind(this),createIntersectionObserver:this.createIntersectionObserver.bind(this),createMediaQueryObserver:this.createMediaQueryObserver.bind(this),selectComponent:this.selectComponent.bind(this),selectAllComponents:this.selectAllComponents.bind(this),getTabBar:this.getTabBar.bind(this),getPageId:this.getPageId.bind(this),animate:this.animate.bind(this),clearAnimation:this.clearAnimation.bind(this),getOpenerEventChannel:this.getOpenerEventChannel.bind(this),applyAnimatedStyle:this.applyAnimatedStyle.bind(this),clearAnimatedStyle:this.clearAnimatedStyle.bind(this),setUpdatePerformanceListener:this.setUpdatePerformanceListener.bind(this),getPassiveEvent:this.getPassiveEvent.bind(this),setPassiveEvent:this.setPassiveEvent.bind(this),setInitialRenderingCache:this.setInitialRenderingCache.bind(this),getAppBar:this.getAppBar&&this.getAppBar.bind(this)},o=s(t,n);if(void 0!==o){let t;Object.keys(o).forEach(e=>{const s=o[e];oe(s)?this[e]=s:(t=t||{},t[e]=xe(s),Ie.call(this,e,s))}),void 0!==t&&this.setData(t,Ee)}Ne&&Ne.__scope__.off(),Ne=null,void 0!==i&&i.call(this,t)};const o=Le(n,me.ON_UNLOAD);n[me.ON_UNLOAD]=function(){o.call(this),this.__scope__.stop()},(n[me.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n[me.ON_PAGE_SCROLL]=Le(n,me.ON_PAGE_SCROLL),n.__listenPageScroll__=()=>!0),void 0===n[me.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n[me.ON_SHARE_APP_MESSAGE]=function(t){const e=this[re(me.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.__isInjectedShareToOthersHook__=()=>!0),void 0===n[me.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n[me.ON_SHARE_TIMELINE]=function(){const t=this[re(me.ON_SHARE_TIMELINE)];return t?t():{}},n.__isInjectedShareToTimelineHook__=()=>!0),void 0===n[me.ON_ADD_TO_FAVORITES]&&(n[me.ON_ADD_TO_FAVORITES]=function(t){const e=this[re(me.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.__isInjectedFavoritesHook__=()=>!0),void 0===n[me.ON_SAVE_EXIT_STATE]&&(n[me.ON_SAVE_EXIT_STATE]=function(){const t=this[re(me.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.__isInjectedExitStateHook__=()=>!0),n[me.ON_SHOW]=Le(n,me.ON_SHOW),n[me.ON_READY]=Le(n,me.ON_READY),n[me.ON_HIDE]=Le(n,me.ON_HIDE),n[me.ON_ROUTE_DONE]=Le(n,me.ON_ROUTE_DONE),n[me.ON_PULL_DOWN_REFRESH]=Le(n,me.ON_PULL_DOWN_REFRESH),n[me.ON_REACH_BOTTOM]=Le(n,me.ON_REACH_BOTTOM),n[me.ON_RESIZE]=Le(n,me.ON_RESIZE),n[me.ON_TAB_ITEM_TAP]=Le(n,me.ON_TAB_ITEM_TAP),Page(n)},exports.effect=function(t,e){t.effect instanceof S&&(t=t.effect.fn);const s=new S(t);e&&n(s,e);try{s.run()}catch(t){throw s.stop(),t}const i=s.run.bind(s);return i.effect=s,i},exports.effectScope=function(t){return new O(t)},exports.getCurrentScope=v,exports.getCurrentWatcher=function(){return Kt},exports.inject=function(t,e,s=!1){return t in Se?Se[t]:arguments.length>1?s&&oe(e)?e():e:void 0},exports.isProxy=Ht,exports.isReactive=Lt,exports.isReadonly=Pt,exports.isRef=Mt,exports.isShallow=wt,exports.markRaw=function(t){return!o(t,"__v_skip")&&Object.isExtensible(t)&&((t,e,s,n=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:s})})(t,"__v_skip",!0),t},exports.nextTick=function(t){const e=pe||fe;return t?e.then(t):e},exports.onAddToFavorites=t=>{const e=Te();if(e&&e.__isInjectedFavoritesHook__){const s=re(me.ON_ADD_TO_FAVORITES);void 0===e[s]&&(e[s]=t)}},exports.onAppError=je,exports.onAppHide=Me,exports.onAppShow=ke,exports.onDetach=qe,exports.onError=ts,exports.onHide=Be,exports.onLoad=Ke,exports.onMove=$e,exports.onPageNotFound=We,exports.onPageScroll=t=>{const e=Te();e&&e.__listenPageScroll__&&is(e,me.ON_PAGE_SCROLL,t)},exports.onPullDownRefresh=Xe,exports.onReachBottom=Ze,exports.onReady=t=>{const e=Te();e&&is(e,me.ON_READY,t)},exports.onResize=ze,exports.onRouteDone=Ye,exports.onSaveExitState=t=>{const e=Te();if(e&&e.__isInjectedExitStateHook__){const s=re(me.ON_SAVE_EXIT_STATE);void 0===e[s]&&(e[s]=t)}},exports.onScopeDispose=function(t,e=!1){d&&d.cleanups.push(t)},exports.onShareAppMessage=t=>{const e=Te();if(e&&e[me.ON_SHARE_APP_MESSAGE]&&e.__isInjectedShareToOthersHook__){const s=re(me.ON_SHARE_APP_MESSAGE);void 0===e[s]&&(e[s]=t)}},exports.onShareTimeline=t=>{const e=Te();if(e&&e[me.ON_SHARE_TIMELINE]&&e.__isInjectedShareToTimelineHook__){const s=re(me.ON_SHARE_TIMELINE);void 0===e[s]&&(e[s]=t)}},exports.onShow=Fe,exports.onTabItemTap=Je,exports.onThemeChange=Ge,exports.onUnhandledRejection=Ve,exports.onUnload=Qe,exports.onWatcherCleanup=$t,exports.provide=function(t,e){Se[t]=e},exports.proxyRefs=function(t){return Lt(t)?t:new Proxy(t,Ft)},exports.reactive=yt,exports.readonly=xt,exports.ref=jt,exports.shallowReactive=Dt,exports.shallowReadonly=function(t){return It(t,!0,ut,At,bt)},exports.shallowRef=function(t){return Wt(t,!0)},exports.stop=function(t){t.effect.stop()},exports.toRaw=Ct,exports.toRef=function(t,e,s){return Mt(t)?t:a(t)?new Yt(t):l(t)&&arguments.length>1?Xt(t,e,s):jt(t)},exports.toRefs=function(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=Xt(t,s);return e},exports.toValue=function(t){return a(t)?t():Gt(t)},exports.triggerRef=function(t){t.dep&&t.dep.trigger()},exports.unref=Gt,exports.watch=ve,exports.watchEffect=function(t,e){return ge(t,null,e)},exports.watchPostEffect=function(t,e){return ge(t,null,{flush:"post"})},exports.watchSyncEffect=function(t,e){return ge(t,null,{flush:"sync"})};
7
+ "use strict";function t(t){const e=Object.create(null);for(const s of t.split(","))e[s]=1;return t=>t in e}const e={},s=()=>{},n=Object.assign,i=Object.prototype.hasOwnProperty,o=(t,e)=>i.call(t,e),r=Array.isArray,c=t=>"[object Map]"===_(t),a=t=>"function"==typeof t,u=t=>"symbol"==typeof t,l=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,_=t=>h.call(t),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,d=(t,e)=>!Object.is(t,e);var p=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(p||{});const E=[];let v,O=0,g=0,S=0,N=0;function b(t){try{return v}finally{v=t}}function R(){++O}function A(){! --O&&N&&P()}function T(t,e){const s=e.depsTail;if(void 0!==s&&s.dep===t)return;const n=void 0!==s?s.nextDep:e.deps;if(void 0!==n&&n.dep===t)return n.version=g,void(e.depsTail=n);const i=t.subsTail;if(void 0!==i&&i.version===g&&i.sub===e)return;const o=e.depsTail=t.subsTail={version:g,dep:t,sub:e,prevDep:s,nextDep:n,prevSub:i,nextSub:void 0};void 0!==n&&(n.prevDep=o),void 0!==s?s.nextDep=o:e.deps=o,void 0!==i?i.nextSub=o:t.subs=o}function y(t,e=t.sub){const s=t.dep,n=t.prevDep,i=t.nextDep,o=t.nextSub,r=t.prevSub;if(void 0!==i?i.prevDep=n:e.depsTail=n,void 0!==n?n.nextDep=i:e.deps=i,void 0!==o?o.prevSub=r:s.subsTail=r,void 0!==r)r.nextSub=o;else if(void 0===(s.subs=o)){let t=s.deps;if(void 0!==t){do{t=y(t,s)}while(void 0!==t);s.flags|=16}}return i}function D(t){let e,s=t.nextSub;t:for(;;){const n=t.sub;let i=n.flags;if(3&i&&(60&i?12&i?4&i?48&i||!L(t,n)?i=0:(n.flags=40|i,i&=1):n.flags=-9&i|32:i=0:n.flags=32|i,2&i&&(E[N++]=n),1&i)){const i=n.subs;if(void 0!==i){t=i,void 0!==i.nextSub&&(e={value:s,prev:e},s=t.nextSub);continue}}if(void 0===(t=s)){for(;void 0!==e;)if(t=e.value,e=e.prev,void 0!==t){s=t.nextSub;continue t}break}s=t.nextSub}}function m(t){return++g,t.depsTail=void 0,t.flags=-57&t.flags|4,b(t)}function x(t,e){v=e;const s=t.depsTail;let n=void 0!==s?s.nextDep:t.deps;for(;void 0!==n;)n=y(n,t);t.flags&=-5}function P(){for(;S<N;){const t=E[S];E[S++]=void 0,t.notify()}S=0,N=0}function w(t,e){let s,n=0;t:for(;;){const i=t.dep,o=i.flags;let r=!1;if(16&e.flags)r=!0;else if(17&~o){if(!(33&~o)){void 0===t.nextSub&&void 0===t.prevSub||(s={value:t,prev:s}),t=i.deps,e=i,++n;continue}}else if(i.update()){const t=i.subs;void 0!==t.nextSub&&I(t),r=!0}if(r||void 0===t.nextDep){for(;n;){--n;const i=e.subs,o=void 0!==i.nextSub;if(o?(t=s.value,s=s.prev):t=i,r){if(e.update()){o&&I(i),e=t.sub;continue}}else e.flags&=-33;if(e=t.sub,void 0!==t.nextDep){t=t.nextDep;continue t}r=!1}return r}t=t.nextDep}}function I(t){do{const e=t.sub,s=t.nextSub,n=e.flags;32==(48&n)&&(e.flags=16|n),t=s}while(void 0!==t)}function L(t,e){let s=e.depsTail;for(;void 0!==s;){if(s===t)return!0;s=s.prevDep}return!1}class H{constructor(t,e){this.map=t,this.key=e,this._subs=void 0,this.subsTail=void 0,this.flags=p.None}get subs(){return this._subs}set subs(t){this._subs=t,void 0===t&&this.map.delete(this.key)}}const C=new WeakMap,M=Symbol(""),U=Symbol(""),j=Symbol("");function k(t,e,s){if(void 0!==v){let e=C.get(t);e||C.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=new H(e,s)),T(n,v)}}function W(t,e,s,n,i,o){const a=C.get(t);if(!a)return;const l=t=>{void 0!==t&&void 0!==t.subs&&(D(t.subs),I(t.subs))};if(R(),"clear"===e)a.forEach(l);else{const i=r(t),o=i&&f(s);if(i&&"length"===s){const t=Number(n);a.forEach((e,s)=>{("length"===s||s===j||!u(s)&&s>=t)&&l(e)})}else switch((void 0!==s||a.has(void 0))&&l(a.get(s)),o&&l(a.get(j)),e){case"add":i?o&&l(a.get("length")):(l(a.get(M)),c(t)&&l(a.get(U)));break;case"delete":i||(l(a.get(M)),c(t)&&l(a.get(U)));break;case"set":c(t)&&l(a.get(M))}}A()}function V(t){const e=xt(t);return e===t?e:(k(e,0,j),Dt(t)?e:e.map(Pt))}function G(t){return k(t=xt(t),0,j),t}function F(t,e){return yt(t)?Tt(t)?wt(Pt(e)):wt(e):Pt(e)}const B={__proto__:null,[Symbol.iterator](){return Q(this,Symbol.iterator,t=>F(this,t))},concat(...t){return V(this).concat(...t.map(t=>r(t)?V(t):t))},entries(){return Q(this,"entries",t=>(t[1]=F(this,t[1]),t))},every(t,e){return X(this,"every",t,e,void 0,arguments)},filter(t,e){return X(this,"filter",t,e,t=>t.map(t=>F(this,t)),arguments)},find(t,e){return X(this,"find",t,e,t=>F(this,t),arguments)},findIndex(t,e){return X(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return X(this,"findLast",t,e,t=>F(this,t),arguments)},findLastIndex(t,e){return X(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return X(this,"forEach",t,e,void 0,arguments)},includes(...t){return z(this,"includes",t)},indexOf(...t){return z(this,"indexOf",t)},join(t){return V(this).join(t)},lastIndexOf(...t){return z(this,"lastIndexOf",t)},map(t,e){return X(this,"map",t,e,void 0,arguments)},pop(){return J(this,"pop")},push(...t){return J(this,"push",t)},reduce(t,...e){return Z(this,"reduce",t,e)},reduceRight(t,...e){return Z(this,"reduceRight",t,e)},shift(){return J(this,"shift")},some(t,e){return X(this,"some",t,e,void 0,arguments)},splice(...t){return J(this,"splice",t)},toReversed(){return V(this).toReversed()},toSorted(t){return V(this).toSorted(t)},toSpliced(...t){return V(this).toSpliced(...t)},unshift(...t){return J(this,"unshift",t)},values(){return Q(this,"values",t=>F(this,t))}};function Q(t,e,s){const n=G(t),i=n[e]();return n===t||Dt(t)||(i._next=i.next,i.next=()=>{const t=i._next();return t.done||(t.value=s(t.value)),t}),i}const Y=Array.prototype;function X(t,e,s,n,i,o){const r=G(t),c=r!==t&&!Dt(t),a=r[e];if(a!==Y[e]){const e=a.apply(t,o);return c?Pt(e):e}let u=s;r!==t&&(c?u=function(e,n){return s.call(this,F(t,e),n,t)}:s.length>2&&(u=function(e,n){return s.call(this,e,n,t)}));const l=a.call(r,u,n);return c&&i?i(l):l}function Z(t,e,s,n){const i=G(t);let o=s;return i!==t&&(Dt(t)?s.length>3&&(o=function(e,n,i){return s.call(this,e,n,i,t)}):o=function(e,n,i){return s.call(this,e,F(t,n),i,t)}),i[e](o,...n)}function z(t,e,s){const n=xt(t);k(n,0,j);const i=n[e](...s);return-1!==i&&!1!==i||!mt(s[0])?i:(s[0]=xt(s[0]),n[e](...s))}function J(t,e,s=[]){R();const n=b(),i=xt(t)[e].apply(t,s);return b(n),A(),i}const K=t("__proto__,__v_isRef,__isVue"),$=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>"arguments"!==t&&"caller"!==t).map(t=>Symbol[t]).filter(u));function q(t){u(t)||(t=String(t));const e=xt(this);return k(e,0,t),e.hasOwnProperty(t)}class tt{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,s){if("__v_skip"===e)return t.__v_skip;const n=this._isReadonly,i=this._isShallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return i;if("__v_raw"===e)return s===(n?i?gt:Ot:i?vt:Et).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){let t;if(o&&(t=B[e]))return t;if("hasOwnProperty"===e)return q}const c=It(t),a=Reflect.get(t,e,c?t:s);if(c&&"value"!==e)return a;if(u(e)?$.has(e):K(e))return a;if(n||k(t,0,e),i)return a;if(It(a)){const t=o&&f(e)?a:a.value;return n&&l(t)?Rt(t):t}return l(a)?n?Rt(a):Nt(a):a}}class et extends tt{constructor(t=!1){super(!1,t)}set(t,e,s,n){let i=t[e];const c=r(t)&&f(e);if(!this._isShallow){const t=yt(i);if(Dt(s)||yt(s)||(i=xt(i),s=xt(s)),!c&&It(i)&&!It(s))return t||(i.value=s),!0}const a=c?Number(e)<t.length:o(t,e),u=Reflect.set(t,e,s,It(t)?t:n);return t===xt(n)&&(a?d(s,i)&&W(t,"set",e,s):W(t,"add",e,s)),u}deleteProperty(t,e){const s=o(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&W(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return u(e)&&$.has(e)||k(t,0,e),s}ownKeys(t){return k(t,0,r(t)?"length":M),Reflect.ownKeys(t)}}class st extends tt{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const nt=new et,it=new st,ot=new et(!0),rt=new st(!0),ct=t=>t,at=t=>Reflect.getPrototypeOf(t);function ut(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function lt(t,e){const s={get(s){const n=this.__v_raw,i=xt(n),o=xt(s);t||(d(s,o)&&k(i,0,s),k(i,0,o));const{has:r}=at(i),c=e?ct:t?wt:Pt;return r.call(i,s)?c(n.get(s)):r.call(i,o)?c(n.get(o)):void(n!==i&&n.get(s))},get size(){const e=this.__v_raw;return!t&&k(xt(e),0,M),e.size},has(e){const s=this.__v_raw,n=xt(s),i=xt(e);return t||(d(e,i)&&k(n,0,e),k(n,0,i)),e===i?s.has(e):s.has(e)||s.has(i)},forEach(s,n){const i=this,o=i.__v_raw,r=xt(o),c=e?ct:t?wt:Pt;return!t&&k(r,0,M),o.forEach((t,e)=>s.call(n,c(t),c(e),i))}};n(s,t?{add:ut("add"),set:ut("set"),delete:ut("delete"),clear:ut("clear")}:{add(t){e||Dt(t)||yt(t)||(t=xt(t));const s=xt(this);return at(s).has.call(s,t)||(s.add(t),W(s,"add",t,t)),this},set(t,s){e||Dt(s)||yt(s)||(s=xt(s));const n=xt(this),{has:i,get:o}=at(n);let r=i.call(n,t);r||(t=xt(t),r=i.call(n,t));const c=o.call(n,t);return n.set(t,s),r?d(s,c)&&W(n,"set",t,s):W(n,"add",t,s),this},delete(t){const e=xt(this),{has:s,get:n}=at(e);let i=s.call(e,t);i||(t=xt(t),i=s.call(e,t)),n&&n.call(e,t);const o=e.delete(t);return i&&W(e,"delete",t,void 0),o},clear(){const t=xt(this),e=0!==t.size,s=t.clear();return e&&W(t,"clear",void 0,void 0),s}});return["keys","values","entries",Symbol.iterator].forEach(n=>{s[n]=function(t,e,s){return function(...n){const i=this.__v_raw,o=xt(i),r=c(o),a="entries"===t||t===Symbol.iterator&&r,u="keys"===t&&r,l=i[t](...n),h=s?ct:e?wt:Pt;return!e&&k(o,0,u?U:M),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:a?[h(t[0]),h(t[1])]:h(t),done:e}},[Symbol.iterator](){return this}}}}(n,t,e)}),s}function ht(t,e){const s=lt(t,e);return(e,n,i)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(o(s,n)&&n in e?s:e,n,i)}const _t={get:ht(!1,!1)},ft={get:ht(!1,!0)},dt={get:ht(!0,!1)},pt={get:ht(!0,!0)},Et=new WeakMap,vt=new WeakMap,Ot=new WeakMap,gt=new WeakMap;function St(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>_(t).slice(8,-1))(t))}function Nt(t){return yt(t)?t:At(t,!1,nt,_t,Et)}function bt(t){return At(t,!1,ot,ft,vt)}function Rt(t){return At(t,!0,it,dt,Ot)}function At(t,e,s,n,i){if(!l(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const o=St(t);if(0===o)return t;const r=i.get(t);if(r)return r;const c=new Proxy(t,2===o?n:s);return i.set(t,c),c}function Tt(t){return yt(t)?Tt(t.__v_raw):!(!t||!t.__v_isReactive)}function yt(t){return!(!t||!t.__v_isReadonly)}function Dt(t){return!(!t||!t.__v_isShallow)}function mt(t){return!!t&&!!t.__v_raw}function xt(t){const e=t&&t.__v_raw;return e?xt(e):t}const Pt=t=>l(t)?Nt(t):t,wt=t=>l(t)?Rt(t):t;function It(t){return!!t&&!0===t.__v_isRef}function Lt(t){return Ht(t,Pt)}function Ht(t,e){return It(t)?t:new Ct(t,e)}class Ct{constructor(t,e){this.subs=void 0,this.subsTail=void 0,this.flags=p.Mutable,this.__v_isRef=!0,this.__v_isShallow=!1,this._oldValue=this._rawValue=e?xt(t):t,this._value=e?e(t):t,this._wrap=e,this.__v_isShallow=!e}get dep(){return this}get value(){if(Ut(this),this.flags&p.Dirty&&this.update()){const t=this.subs;void 0!==t&&I(t)}return this._value}set value(t){const e=this._rawValue,s=this.__v_isShallow||Dt(t)||yt(t);if(t=s?t:xt(t),d(t,e)){this.flags|=p.Dirty,this._rawValue=t,this._value=!s&&this._wrap?this._wrap(t):t;const e=this.subs;void 0!==e&&(D(e),O||P())}}update(){return this.flags&=~p.Dirty,d(this._oldValue,this._oldValue=this._rawValue)}}function Mt(t){const e=t.dep;void 0!==e&&void 0!==e.subs&&(D(e.subs),I(e.subs),O||P())}function Ut(t){void 0!==v&&T(t,v)}function jt(t){return It(t)?t.value:t}const kt={get:(t,e,s)=>"__v_raw"===e?t:jt(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return It(i)&&!It(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};class Wt{constructor(t){this.subs=void 0,this.subsTail=void 0,this.flags=p.None,this.__v_isRef=!0,this._value=void 0;const{get:e,set:s}=t(()=>Ut(this),()=>Mt(this));this._get=e,this._set=s}get dep(){return this}get value(){return this._value=this._get()}set value(t){this._set(t)}}class Vt{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=xt(t);let n=!0,i=t;if(!r(t)||!f(String(e)))do{n=!mt(i)||Dt(i)}while(n&&(i=i.__v_raw));this._shallow=n}get value(){let t=this._object[this._key];return this._shallow&&(t=jt(t)),this._value=void 0===t?this._defaultValue:t}set value(t){if(this._shallow&&It(this._raw[this._key])){const e=this._object[this._key];if(It(e))return void(e.value=t)}this._object[this._key]=t}get dep(){return function(t,e){const s=C.get(t);return s&&s.get(e)}(this._raw,this._key)}}class Gt{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Ft(t,e,s){return new Vt(t,e,s)}const Bt=128,Qt=256;class Yt{constructor(t){this.deps=void 0,this.depsTail=void 0,this.subs=void 0,this.subsTail=void 0,this.flags=p.Watching|p.Dirty,this.cleanups=[],this.cleanupsLength=0,void 0!==t&&(this.fn=t),Zt&&T(this,Zt)}fn(){}get active(){return!(1024&this.flags)}pause(){this.flags|=256}resume(){(this.flags&=-257)&(p.Dirty|p.Pending)&&this.notify()}notify(){256&this.flags||!this.dirty||this.run()}run(){if(!this.active)return this.fn();Xt(this);const t=m(this);try{return this.fn()}finally{x(this,t);const e=this.flags;(e&(128|p.Recursed))==(128|p.Recursed)&&(this.flags=e&~p.Recursed,this.notify())}}stop(){if(!this.active)return;this.flags=1024;let t=this.deps;for(;void 0!==t;)t=y(t,this);const e=this.subs;void 0!==e&&y(e),Xt(this)}get dirty(){const t=this.flags;if(t&p.Dirty)return!0;if(t&p.Pending){if(w(this.deps,this))return this.flags=t|p.Dirty,!0;this.flags=t&~p.Pending}return!1}}function Xt(t){const e=t.cleanupsLength;if(e){for(let s=0;s<e;s++)t.cleanups[s]();t.cleanupsLength=0}}let Zt;class zt{constructor(t=!1){this.deps=void 0,this.depsTail=void 0,this.subs=void 0,this.subsTail=void 0,this.flags=0,this.cleanups=[],this.cleanupsLength=0,!t&&Zt&&T(this,Zt)}get active(){return!(1024&this.flags)}pause(){if(!(256&this.flags)){this.flags|=256;for(let t=this.deps;void 0!==t;t=t.nextDep){const e=t.dep;"pause"in e&&e.pause()}}}resume(){const t=this.flags;if(256&t){this.flags=-257&t;for(let t=this.deps;void 0!==t;t=t.nextDep){const e=t.dep;"resume"in e&&e.resume()}}}run(t){const e=Zt;try{return Zt=this,t()}finally{Zt=e}}stop(){if(!this.active)return;this.flags=1024;let t=this.deps;for(;void 0!==t;){const e=t.dep;"stop"in e?(t=t.nextDep,e.stop()):t=y(t,this)}const e=this.subs;void 0!==e&&y(e),Xt(this)}}function Jt(t){try{return Zt}finally{Zt=t}}class Kt{constructor(t,e){this.fn=t,this.setter=e,this._value=void 0,this.subs=void 0,this.subsTail=void 0,this.deps=void 0,this.depsTail=void 0,this.flags=p.Mutable|p.Dirty,this.__v_isRef=!0,this.__v_isReadonly=!e}get effect(){return this}get dep(){return this}get _dirty(){const t=this.flags;if(t&p.Dirty)return!0;if(t&p.Pending){if(w(this.deps,this))return this.flags=t|p.Dirty,!0;this.flags=t&~p.Pending}return!1}set _dirty(t){t?this.flags|=p.Dirty:this.flags&=~(p.Dirty|p.Pending)}get value(){const t=this.flags;if(t&p.Dirty||t&p.Pending&&w(this.deps,this)){if(this.update()){const t=this.subs;void 0!==t&&I(t)}}else t&p.Pending&&(this.flags=t&~p.Pending);return void 0!==v?T(this,v):void 0!==Zt&&T(this,Zt),this._value}set value(t){this.setter&&this.setter(t)}update(){const t=m(this);try{const t=this._value,e=this.fn(t);return!!d(t,e)&&(this._value=e,!0)}finally{x(this,t)}}}const $t={};let qt;function te(t,e=!1,s=qt){if(s){const{call:e}=s.options;s.cleanups[s.cleanupsLength++]=e?()=>e(t,4):t}}class ee extends Yt{constructor(t,n,i=e){const{deep:o,once:c,call:u}=i;let l,h=!1,_=!1;if(It(t)?(l=()=>t.value,h=Dt(t)):Tt(t)?(l=()=>se(t,o),h=!0):r(t)?(_=!0,h=t.some(t=>Tt(t)||Dt(t)),l=()=>t.map(t=>It(t)?t.value:Tt(t)?se(t,o):a(t)?u?u(t,2):t():void 0)):l=a(t)?n?u?()=>u(t,2):t:()=>{if(this.cleanupsLength){const t=b();try{Xt(this)}finally{b(t)}}const e=qt;qt=this;try{return u?u(t,3,[this.boundCleanup]):t(this.boundCleanup)}finally{qt=e}}:s,n&&o){const t=l,e=!0===o?1/0:o;l=()=>ne(t(),e)}if(super(l),this.cb=n,this.options=i,this.boundCleanup=t=>te(t,!1,this),this.forceTrigger=h,this.isMultiSource=_,c&&n){const t=n;n=(...e)=>{t(...e),this.stop()}}this.cb=n,this.oldValue=_?new Array(t.length).fill($t):$t}run(t=!1){const e=this.oldValue,s=this.oldValue=super.run();if(!this.cb)return;const{immediate:n,deep:i,call:o}=this.options;if((!t||n)&&(i||this.forceTrigger||(this.isMultiSource?s.some((t,s)=>d(t,e[s])):d(s,e)))){Xt(this);const t=qt;qt=this;try{const t=[s,e===$t?void 0:this.isMultiSource&&e[0]===$t?[]:e,this.boundCleanup];o?o(this.cb,3,t):this.cb(...t)}finally{qt=t}}}}function se(t,e){return e?t:Dt(t)||!1===e||0===e?ne(t,1):ne(t)}function ne(t,e=1/0,s){if(e<=0||!l(t)||t.__v_skip)return t;if(((s=s||new Map).get(t)||0)>=e)return t;if(s.set(t,e),e--,It(t))ne(t.value,e,s);else if(r(t))for(let n=0;n<t.length;n++)ne(t[n],e,s);else if("[object Set]"===_(t)||c(t))t.forEach(t=>{ne(t,e,s)});else if((t=>"[object Object]"===_(t))(t)){for(const n in t)ne(t[n],e,s);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&ne(t[n],e,s)}return t}var ie;!function(t){t[t.QUEUED=1]="QUEUED",t[t.ALLOW_RECURSE=2]="ALLOW_RECURSE"}(ie||(ie={}));const oe=[];let re=[],ce=null,ae=null,ue=0,le=0,he=0;const _e=Promise.resolve();function fe(t){de(t,oe,ue)&&(ue++,ae||(ae=_e.then(ve)))}function de(t,e,s){const n=t.flags;return!(n&ie.QUEUED)&&(t.flags=n|ie.QUEUED,e[s]=t,!0)}function pe(t){de(t,re,re.length)}function Ee(){if(re.length){for(ce=re,re=[];he<ce.length;){const t=ce[he++];t.flags&ie.ALLOW_RECURSE&&(t.flags&=~ie.QUEUED);try{t()}finally{t.flags&=~ie.QUEUED}}ce=null,he=0}}function ve(){try{for(;le<ue;){const t=oe[le];oe[le++]=void 0,t.flags&ie.ALLOW_RECURSE&&(t.flags&=~ie.QUEUED);try{t()}finally{t.flags&ie.ALLOW_RECURSE||(t.flags&=~ie.QUEUED)}}}finally{for(;le<ue;)oe[le].flags&=~ie.QUEUED,oe[le++]=void 0;le=0,ue=0,ae=null}}const Oe={},ge=Array.isArray,Se=Object.assign;function Ne(t,e){const s={};return Object.keys(t).forEach(n=>{e.includes(n)||(s[n]=t[n])}),s}function be(t){return Object.prototype.toString.call(t).slice(8,-1)}function Re(t){return"function"==typeof t}function Ae(t){return`__${t}__`}function Te(t,e,s){return De(t,e,s)}class ye extends ee{constructor(t,e,s,n){super(t,e,s),this.flush=n;const i=()=>{this.dirty&&this.run()};e&&(this.flags|=Bt,i.flags|=ie.ALLOW_RECURSE),this.job=i}notify(){if(!(this.flags&Qt)){const t=this.flush,e=this.job;"post"===t?pe(e):"pre"===t?fe(e):e()}}}function De(t,e,s=Oe){const{flush:n="pre"}=s,i=Se({},s),o=new ye(t,e,i,n);e?o.run(!0):"post"===n?pe(o.job):o.run(!0);const r=o.stop.bind(o);return r.pause=o.pause.bind(o),r.resume=o.resume.bind(o),r.stop=r,r}const me=Object.create(null);let xe=null,Pe=null,we=null;function Ie(){return Pe||we}var Le,He,Ce;function Me(t,e){const s=t[e];return function(...t){const n=this[Ae(e)];n&&n.forEach(e=>e(...t)),void 0!==s&&s.call(this,...t)}}function Ue(t){if(function(t){const e=new Set(["undefined","boolean","number","string"]);return null===t||e.has(typeof t)}(t)||Re(t))return t;if(It(t))return Ue(t.value);if(mt(t))return Ue(xt(t));if(ge(t))return t.map(t=>Ue(t));if(function(t){return"Object"===be(t)}(t)){const e={};return Object.keys(t).forEach(s=>{e[s]=Ue(t[s])}),e}throw new TypeError(`${be(t)} value is not supported`)}function je(t,e){var s;null!==(s=e)&&"object"==typeof s&&Te(It(e)?e:()=>e,()=>{this.setData({[t]:Ue(e)},Ee)},{deep:!0})}function ke(t,e){const s=t[e];return function(...t){const n=this[Ae(e)];n&&n.forEach(e=>e(...t)),void 0!==s&&s.call(this,...t)}}!function(t){t.ON_LAUNCH="onLaunch",t.ON_SHOW="onShow",t.ON_HIDE="onHide",t.ON_ERROR="onError",t.ON_PAGE_NOT_FOUND="onPageNotFound",t.ON_UNHANDLED_REJECTION="onUnhandledRejection",t.ON_THEME_CHANGE="onThemeChange"}(Le||(Le={})),function(t){t.ON_LOAD="onLoad",t.ON_SHOW="onShow",t.ON_READY="onReady",t.ON_HIDE="onHide",t.ON_UNLOAD="onUnload",t.ON_ROUTE_DONE="onRouteDone",t.ON_PULL_DOWN_REFRESH="onPullDownRefresh",t.ON_REACH_BOTTOM="onReachBottom",t.ON_PAGE_SCROLL="onPageScroll",t.ON_SHARE_APP_MESSAGE="onShareAppMessage",t.ON_SHARE_TIMELINE="onShareTimeline",t.ON_ADD_TO_FAVORITES="onAddToFavorites",t.ON_RESIZE="onResize",t.ON_TAB_ITEM_TAP="onTabItemTap",t.ON_SAVE_EXIT_STATE="onSaveExitState"}(He||(He={})),function(t){t.ATTACHED="attached",t.READY="ready",t.MOVED="moved",t.DETACHED="detached",t.ERROR="error"}(Ce||(Ce={}));const We={[He.ON_SHOW]:"show",[He.ON_HIDE]:"hide",[He.ON_RESIZE]:"resize",[He.ON_ROUTE_DONE]:"routeDone",[Ce.READY]:He.ON_READY};function Ve(t,e){return Be(e,t.lifetimes[e]||t[e])}function Ge(t,e){return Be(e,t.methods[e])}function Fe(t,e){return Be(e,t.pageLifetimes[We[e]])}function Be(t,e){const s=Ae(t);return function(...t){const n=this[s];n&&n.forEach(e=>e(...t)),void 0!==e&&e.call(this,...t)}}const Qe=us(Le.ON_SHOW),Ye=us(Le.ON_HIDE),Xe=us(Le.ON_ERROR),Ze=us(Le.ON_PAGE_NOT_FOUND),ze=us(Le.ON_UNHANDLED_REJECTION),Je=us(Le.ON_THEME_CHANGE),Ke=ls(He.ON_SHOW),$e=ls(He.ON_HIDE),qe=ls(He.ON_UNLOAD),ts=ls(He.ON_ROUTE_DONE),es=ls(He.ON_PULL_DOWN_REFRESH),ss=ls(He.ON_REACH_BOTTOM),ns=ls(He.ON_RESIZE),is=ls(He.ON_TAB_ITEM_TAP),os=hs(He.ON_LOAD),rs=hs(Ce.MOVED),cs=hs(Ce.DETACHED),as=hs(Ce.ERROR);function us(t){return e=>{xe&&_s(xe,t,e)}}function ls(t){return e=>{const s=Ie();s&&_s(s,t,e)}}function hs(t){return e=>{we&&_s(we,t,e)}}function _s(t,e,s){const n=Ae(e);void 0===t[n]&&(t[n]=[]),t[n].push(s)}exports.EffectScope=zt,exports.ReactiveEffect=Yt,exports.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},exports.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},exports.computed=function(t,e,s=!1){let n,i;return a(t)?n=t:(n=t.get,i=t.set),new Kt(n,i)},exports.createApp=function(t){let e,s;if(Re(t))e=t,s={};else{if(void 0===t.setup)return void App(t);e=t.setup,s=Ne(t,["setup"])}const n=s[Le.ON_LAUNCH];s[Le.ON_LAUNCH]=function(t){xe=this;const s=e(t);void 0!==s&&Object.keys(s).forEach(t=>{this[t]=s[t]}),xe=null,void 0!==n&&n.call(this,t)},s[Le.ON_SHOW]=Me(s,Le.ON_SHOW),s[Le.ON_HIDE]=Me(s,Le.ON_HIDE),s[Le.ON_ERROR]=Me(s,Le.ON_ERROR),s[Le.ON_PAGE_NOT_FOUND]=Me(s,Le.ON_PAGE_NOT_FOUND),s[Le.ON_UNHANDLED_REJECTION]=Me(s,Le.ON_UNHANDLED_REJECTION),s[Le.ON_THEME_CHANGE]=Me(s,Le.ON_THEME_CHANGE),App(s)},exports.customRef=function(t){return new Wt(t)},exports.defineComponent=function(t,e){let s,n;e=Se({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e);let i=null;if(Re(t))s=t,n={};else{if(void 0===t.setup)return Component(t);s=t.setup,n=Ne(t,["setup"]),n.properties&&(i=Object.keys(n.properties))}void 0===n.lifetimes&&(n.lifetimes={});const o=n.lifetimes[Ce.ATTACHED]||n[Ce.ATTACHED];n.lifetimes[Ce.ATTACHED]=function(){this.__scope__=new zt;const t=(we=e=this,Jt(e.__scope__));var e;const n={};i&&i.forEach(t=>{n[t]=this.data[t]}),this.__props__=bt(n);const r={is:this.is,id:this.id,dataset:this.dataset,exitState:this.exitState,router:this.router,pageRouter:this.pageRouter,renderer:this.renderer,triggerEvent:this.triggerEvent.bind(this),createSelectorQuery:this.createSelectorQuery.bind(this),createIntersectionObserver:this.createIntersectionObserver.bind(this),createMediaQueryObserver:this.createMediaQueryObserver.bind(this),selectComponent:this.selectComponent.bind(this),selectAllComponents:this.selectAllComponents.bind(this),selectOwnerComponent:this.selectOwnerComponent.bind(this),getRelationNodes:this.getRelationNodes.bind(this),getTabBar:this.getTabBar.bind(this),getPageId:this.getPageId.bind(this),animate:this.animate.bind(this),clearAnimation:this.clearAnimation.bind(this),getOpenerEventChannel:this.getOpenerEventChannel.bind(this),applyAnimatedStyle:this.applyAnimatedStyle.bind(this),clearAnimatedStyle:this.clearAnimatedStyle.bind(this),setUpdatePerformanceListener:this.setUpdatePerformanceListener.bind(this),getPassiveEvent:this.getPassiveEvent.bind(this),setPassiveEvent:this.setPassiveEvent.bind(this),setInitialRenderingCache:this.setInitialRenderingCache.bind(this),getAppBar:this.getAppBar&&this.getAppBar.bind(this)},c=s(this.__props__,r);if(void 0!==c){let t;Object.keys(c).forEach(e=>{const s=c[e];Re(s)?this[e]=s:(t=t||{},t[e]=Ue(s),je.call(this,e,s))}),void 0!==t&&this.setData(t,Ee)}!function(t){Jt(t),we=null}(t),void 0!==o&&o.call(this)};const r=Ve(n,Ce.DETACHED);return n.lifetimes[Ce.DETACHED]=function(){r.call(this),this.__scope__.stop()},n.lifetimes[Ce.READY]=Be(We[Ce.READY],n.lifetimes[Ce.READY]||n[Ce.READY]),n.lifetimes[Ce.MOVED]=Ve(n,Ce.MOVED),n.lifetimes[Ce.ERROR]=Ve(n,Ce.ERROR),void 0===n.methods&&(n.methods={}),(n.methods[He.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n.methods[He.ON_PAGE_SCROLL]=Ge(n,He.ON_PAGE_SCROLL),n.methods.__listenPageScroll__=()=>!0),void 0===n.methods[He.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n.methods[He.ON_SHARE_APP_MESSAGE]=function(t){const e=this[Ae(He.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.methods.__isInjectedShareToOthersHook__=()=>!0),void 0===n.methods[He.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n.methods[He.ON_SHARE_TIMELINE]=function(){const t=this[Ae(He.ON_SHARE_TIMELINE)];return t?t():{}},n.methods.__isInjectedShareToTimelineHook__=()=>!0),void 0===n.methods[He.ON_ADD_TO_FAVORITES]&&(n.methods[He.ON_ADD_TO_FAVORITES]=function(t){const e=this[Ae(He.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.methods.__isInjectedFavoritesHook__=()=>!0),void 0===n.methods[He.ON_SAVE_EXIT_STATE]&&(n.methods[He.ON_SAVE_EXIT_STATE]=function(){const t=this[Ae(He.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.methods.__isInjectedExitStateHook__=()=>!0),n.methods[He.ON_LOAD]=Ge(n,He.ON_LOAD),n.methods[He.ON_PULL_DOWN_REFRESH]=Ge(n,He.ON_PULL_DOWN_REFRESH),n.methods[He.ON_REACH_BOTTOM]=Ge(n,He.ON_REACH_BOTTOM),n.methods[He.ON_TAB_ITEM_TAP]=Ge(n,He.ON_TAB_ITEM_TAP),void 0===n.pageLifetimes&&(n.pageLifetimes={}),n.pageLifetimes[We[He.ON_SHOW]]=Fe(n,He.ON_SHOW),n.pageLifetimes[We[He.ON_HIDE]]=Fe(n,He.ON_HIDE),n.pageLifetimes[We[He.ON_RESIZE]]=Fe(n,He.ON_RESIZE),n.pageLifetimes[We[He.ON_ROUTE_DONE]]=Fe(n,He.ON_ROUTE_DONE),i&&(void 0===n.observers&&(n.observers={}),i.forEach(t=>{const e=n.observers[t];n.observers[t]=function(s){this.__props__&&(this.__props__[t]=s),void 0!==e&&e.call(this,s)}})),Component(n)},exports.definePage=function(t,e){let s,n;if(e=Se({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e),Re(t))s=t,n={};else{if(void 0===t.setup)return void Page(t);s=t.setup,n=Ne(t,["setup"])}const i=n[He.ON_LOAD];n[He.ON_LOAD]=function(t){this.__scope__=new zt;const e=(Pe=n=this,Jt(n.__scope__));var n;const o={is:this.is,route:this.route,options:this.options,exitState:this.exitState,router:this.router,pageRouter:this.pageRouter,renderer:this.renderer,createSelectorQuery:this.createSelectorQuery.bind(this),createIntersectionObserver:this.createIntersectionObserver.bind(this),createMediaQueryObserver:this.createMediaQueryObserver.bind(this),selectComponent:this.selectComponent.bind(this),selectAllComponents:this.selectAllComponents.bind(this),getTabBar:this.getTabBar.bind(this),getPageId:this.getPageId.bind(this),animate:this.animate.bind(this),clearAnimation:this.clearAnimation.bind(this),getOpenerEventChannel:this.getOpenerEventChannel.bind(this),applyAnimatedStyle:this.applyAnimatedStyle.bind(this),clearAnimatedStyle:this.clearAnimatedStyle.bind(this),setUpdatePerformanceListener:this.setUpdatePerformanceListener.bind(this),getPassiveEvent:this.getPassiveEvent.bind(this),setPassiveEvent:this.setPassiveEvent.bind(this),setInitialRenderingCache:this.setInitialRenderingCache.bind(this),getAppBar:this.getAppBar&&this.getAppBar.bind(this)},r=s(t,o);if(void 0!==r){let t;Object.keys(r).forEach(e=>{const s=r[e];Re(s)?this[e]=s:(t=t||{},t[e]=Ue(s),je.call(this,e,s))}),void 0!==t&&this.setData(t,Ee)}!function(t){Jt(t),Pe=null}(e),void 0!==i&&i.call(this,t)};const o=ke(n,He.ON_UNLOAD);n[He.ON_UNLOAD]=function(){o.call(this),this.__scope__.stop()},(n[He.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n[He.ON_PAGE_SCROLL]=ke(n,He.ON_PAGE_SCROLL),n.__listenPageScroll__=()=>!0),void 0===n[He.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n[He.ON_SHARE_APP_MESSAGE]=function(t){const e=this[Ae(He.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.__isInjectedShareToOthersHook__=()=>!0),void 0===n[He.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n[He.ON_SHARE_TIMELINE]=function(){const t=this[Ae(He.ON_SHARE_TIMELINE)];return t?t():{}},n.__isInjectedShareToTimelineHook__=()=>!0),void 0===n[He.ON_ADD_TO_FAVORITES]&&(n[He.ON_ADD_TO_FAVORITES]=function(t){const e=this[Ae(He.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.__isInjectedFavoritesHook__=()=>!0),void 0===n[He.ON_SAVE_EXIT_STATE]&&(n[He.ON_SAVE_EXIT_STATE]=function(){const t=this[Ae(He.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.__isInjectedExitStateHook__=()=>!0),n[He.ON_SHOW]=ke(n,He.ON_SHOW),n[He.ON_READY]=ke(n,He.ON_READY),n[He.ON_HIDE]=ke(n,He.ON_HIDE),n[He.ON_ROUTE_DONE]=ke(n,He.ON_ROUTE_DONE),n[He.ON_PULL_DOWN_REFRESH]=ke(n,He.ON_PULL_DOWN_REFRESH),n[He.ON_REACH_BOTTOM]=ke(n,He.ON_REACH_BOTTOM),n[He.ON_RESIZE]=ke(n,He.ON_RESIZE),n[He.ON_TAB_ITEM_TAP]=ke(n,He.ON_TAB_ITEM_TAP),Page(n)},exports.effect=function(t,e){t.effect instanceof Yt&&(t=t.effect.fn);const s=new Yt(t);if(e){const{onStop:t,scheduler:i}=e;if(t){e.onStop=void 0;const n=s.stop.bind(s);s.stop=()=>{n(),t()}}i&&(e.scheduler=void 0,s.notify=()=>{256&s.flags||i()}),n(s,e)}try{s.run()}catch(t){throw s.stop(),t}const i=s.run.bind(s);return i.effect=s,i},exports.effectScope=function(t){return new zt(t)},exports.getCurrentScope=function(){return Zt},exports.getCurrentWatcher=function(){return qt},exports.inject=function(t,e,s=!1){return t in me?me[t]:arguments.length>1?s&&Re(e)?e():e:void 0},exports.isProxy=mt,exports.isReactive=Tt,exports.isReadonly=yt,exports.isRef=It,exports.isShallow=Dt,exports.markRaw=function(t){return!o(t,"__v_skip")&&Object.isExtensible(t)&&((t,e,s,n=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:s})})(t,"__v_skip",!0),t},exports.nextTick=function(t){const e=ae||_e;return t?e.then(t):e},exports.onAddToFavorites=t=>{const e=Ie();if(e&&e.__isInjectedFavoritesHook__){const s=Ae(He.ON_ADD_TO_FAVORITES);void 0===e[s]&&(e[s]=t)}},exports.onAppError=Xe,exports.onAppHide=Ye,exports.onAppShow=Qe,exports.onDetach=cs,exports.onError=as,exports.onHide=$e,exports.onLoad=os,exports.onMove=rs,exports.onPageNotFound=Ze,exports.onPageScroll=t=>{const e=Ie();e&&e.__listenPageScroll__&&_s(e,He.ON_PAGE_SCROLL,t)},exports.onPullDownRefresh=es,exports.onReachBottom=ss,exports.onReady=t=>{const e=Ie();e&&_s(e,He.ON_READY,t)},exports.onResize=ns,exports.onRouteDone=ts,exports.onSaveExitState=t=>{const e=Ie();if(e&&e.__isInjectedExitStateHook__){const s=Ae(He.ON_SAVE_EXIT_STATE);void 0===e[s]&&(e[s]=t)}},exports.onScopeDispose=function(t,e=!1){void 0!==Zt&&(Zt.cleanups[Zt.cleanupsLength++]=t)},exports.onShareAppMessage=t=>{const e=Ie();if(e&&e[He.ON_SHARE_APP_MESSAGE]&&e.__isInjectedShareToOthersHook__){const s=Ae(He.ON_SHARE_APP_MESSAGE);void 0===e[s]&&(e[s]=t)}},exports.onShareTimeline=t=>{const e=Ie();if(e&&e[He.ON_SHARE_TIMELINE]&&e.__isInjectedShareToTimelineHook__){const s=Ae(He.ON_SHARE_TIMELINE);void 0===e[s]&&(e[s]=t)}},exports.onShow=Ke,exports.onTabItemTap=is,exports.onThemeChange=Je,exports.onUnhandledRejection=ze,exports.onUnload=qe,exports.onWatcherCleanup=te,exports.provide=function(t,e){me[t]=e},exports.proxyRefs=function(t){return Tt(t)?t:new Proxy(t,kt)},exports.reactive=Nt,exports.readonly=Rt,exports.ref=Lt,exports.shallowReactive=bt,exports.shallowReadonly=function(t){return At(t,!0,rt,pt,gt)},exports.shallowRef=function(t){return Ht(t)},exports.stop=function(t){t.effect.stop()},exports.toRaw=xt,exports.toRef=function(t,e,s){return It(t)?t:a(t)?new Gt(t):l(t)&&arguments.length>1?Ft(t,e,s):Lt(t)},exports.toRefs=function(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=Ft(t,s);return e},exports.toValue=function(t){return a(t)?t():jt(t)},exports.triggerRef=Mt,exports.unref=jt,exports.watch=Te,exports.watchEffect=function(t,e){return De(t,null,e)},exports.watchPostEffect=function(t,e){return De(t,null,{flush:"post"})},exports.watchSyncEffect=function(t,e){return De(t,null,{flush:"sync"})};
@@ -1,131 +1,110 @@
1
1
  /*!
2
- * vue-mini v1.2.7
2
+ * vue-mini v1.3.0-alpha.1
3
3
  * https://github.com/vue-mini/vue-mini
4
4
  * (c) 2019-present Yang Mingshan
5
5
  * @license MIT
6
6
  */
7
- import { watch as watch$1, isRef, isProxy, toRaw, EffectScope, shallowReactive, shallowReadonly } from '@vue/reactivity';
7
+ import { WatcherEffect, EffectFlags, setCurrentScope, isRef, isProxy, toRaw, EffectScope, shallowReactive, shallowReadonly } from '@vue/reactivity';
8
8
  export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, computed, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
9
9
 
10
- const EMPTY_OBJ = (process.env.NODE_ENV !== 'production') ? Object.freeze({}) : /* istanbul ignore next -- @preserve */ {};
11
- /* istanbul ignore next -- @preserve */
12
- const NOOP = () => { };
13
- const isArray = Array.isArray;
14
- const extend = Object.assign;
15
- function exclude(obj, keys) {
16
- const ret = {};
17
- Object.keys(obj).forEach((key) => {
18
- if (!keys.includes(key)) {
19
- ret[key] = obj[key];
20
- }
21
- });
22
- return ret;
23
- }
24
- function getType(x) {
25
- return Object.prototype.toString.call(x).slice(8, -1);
26
- }
27
- function isSimpleValue(x) {
28
- const simpleTypes = new Set(['undefined', 'boolean', 'number', 'string']);
29
- return x === null || simpleTypes.has(typeof x);
30
- }
31
- function isObject(x) {
32
- return x !== null && typeof x === 'object';
33
- }
34
- function isPlainObject(x) {
35
- return getType(x) === 'Object';
36
- }
37
- function isFunction(x) {
38
- return typeof x === 'function';
39
- }
40
- function toHiddenField(name) {
41
- return `__${name}__`;
42
- }
43
-
44
10
  var SchedulerJobFlags;
45
11
  (function (SchedulerJobFlags) {
46
12
  SchedulerJobFlags[SchedulerJobFlags["QUEUED"] = 1] = "QUEUED";
47
- SchedulerJobFlags[SchedulerJobFlags["ALLOW_RECURSE"] = 4] = "ALLOW_RECURSE";
13
+ SchedulerJobFlags[SchedulerJobFlags["ALLOW_RECURSE"] = 2] = "ALLOW_RECURSE";
48
14
  })(SchedulerJobFlags || (SchedulerJobFlags = {}));
49
- const queue = [];
50
- let flushIndex = -1;
51
- const pendingPostFlushCbs = [];
52
- let activePostFlushCbs = null;
15
+ const jobs = [];
16
+ let postJobs = [];
17
+ let activePostJobs = null;
18
+ let currentFlushPromise = null;
19
+ let jobsLength = 0;
20
+ let flushIndex = 0;
53
21
  let postFlushIndex = 0;
54
22
  const resolvedPromise = /*@__PURE__*/ Promise.resolve();
55
- let currentFlushPromise = null;
56
23
  const RECURSION_LIMIT = 100;
57
24
  function nextTick(fn) {
58
25
  const p = currentFlushPromise || resolvedPromise;
59
26
  return fn ? p.then(fn) : p;
60
27
  }
61
28
  function queueJob(job) {
62
- if (!(job.flags & SchedulerJobFlags.QUEUED)) {
63
- queue.push(job);
64
- job.flags |= SchedulerJobFlags.QUEUED;
29
+ if (queueJobWorker(job, jobs, jobsLength)) {
30
+ jobsLength++;
65
31
  queueFlush();
66
32
  }
67
33
  }
34
+ function queueJobWorker(job, queue, length) {
35
+ const flags = job.flags;
36
+ if (!(flags & SchedulerJobFlags.QUEUED)) {
37
+ job.flags = flags | SchedulerJobFlags.QUEUED;
38
+ queue[length] = job;
39
+ return true;
40
+ }
41
+ return false;
42
+ }
68
43
  function queueFlush() {
69
44
  if (!currentFlushPromise) {
45
+ // We don't flush post jobs on flushJobs's finally block, so we don't need `doFlushJobs` here.
70
46
  currentFlushPromise = resolvedPromise.then(flushJobs);
71
47
  }
72
48
  }
73
- function queuePostFlushCb(cb) {
74
- if (!(cb.flags & SchedulerJobFlags.QUEUED)) {
75
- pendingPostFlushCbs.push(cb);
76
- cb.flags |= SchedulerJobFlags.QUEUED;
77
- }
49
+ function queuePostFlushCb(job) {
50
+ queueJobWorker(job, postJobs, postJobs.length);
78
51
  }
79
52
  function flushPostFlushCbs() {
80
- if (pendingPostFlushCbs.length > 0) {
81
- activePostFlushCbs = [...new Set(pendingPostFlushCbs)];
82
- pendingPostFlushCbs.length = 0;
83
- for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
84
- const cb = activePostFlushCbs[postFlushIndex];
53
+ if (postJobs.length) {
54
+ activePostJobs = postJobs;
55
+ postJobs = [];
56
+ while (postFlushIndex < activePostJobs.length) {
57
+ const cb = activePostJobs[postFlushIndex++];
85
58
  if (cb.flags & SchedulerJobFlags.ALLOW_RECURSE) {
86
59
  cb.flags &= ~SchedulerJobFlags.QUEUED;
87
60
  }
88
- cb();
89
- cb.flags &= ~SchedulerJobFlags.QUEUED;
61
+ try {
62
+ cb();
63
+ }
64
+ finally {
65
+ cb.flags &= ~SchedulerJobFlags.QUEUED;
66
+ }
90
67
  }
91
- activePostFlushCbs = null;
68
+ activePostJobs = null;
92
69
  postFlushIndex = 0;
93
70
  }
94
71
  }
95
72
  function flushJobs() {
96
73
  const seen = (process.env.NODE_ENV !== 'production') ? new Map() : /* istanbul ignore next -- @preserve */ undefined;
97
- // Conditional usage of checkRecursiveUpdate must be determined out of
98
- // try ... catch block since Rollup by default de-optimizes treeshaking
99
- // inside try-catch. This can leave all warning code unshaked. Although
100
- // they would get eventually shaken by a minifier like terser, some minifiers
101
- // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610)
102
- const check = (process.env.NODE_ENV !== 'production') ?
103
- (job) => checkRecursiveUpdates(seen, job)
104
- : /* istanbul ignore next -- @preserve */ NOOP;
105
74
  try {
106
- for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
107
- const job = queue[flushIndex];
75
+ while (flushIndex < jobsLength) {
76
+ const job = jobs[flushIndex];
77
+ jobs[flushIndex++] = undefined;
78
+ // Conditional usage of checkRecursiveUpdate must be determined out of
79
+ // try ... catch block since Rollup by default de-optimizes treeshaking
80
+ // inside try-catch. This can leave all warning code unshaked. Although
81
+ // they would get eventually shaken by a minifier like terser, some minifiers
82
+ // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610)
108
83
  /* istanbul ignore if -- @preserve */
109
- if ((process.env.NODE_ENV !== 'production') && check(job)) {
84
+ if ((process.env.NODE_ENV !== 'production') && checkRecursiveUpdates(seen, job)) {
110
85
  continue;
111
86
  }
112
87
  if (job.flags & SchedulerJobFlags.ALLOW_RECURSE) {
113
88
  job.flags &= ~SchedulerJobFlags.QUEUED;
114
89
  }
115
- job();
116
- if (!(job.flags & SchedulerJobFlags.ALLOW_RECURSE)) {
117
- job.flags &= ~SchedulerJobFlags.QUEUED;
90
+ try {
91
+ job();
92
+ }
93
+ finally {
94
+ if (!(job.flags & SchedulerJobFlags.ALLOW_RECURSE)) {
95
+ job.flags &= ~SchedulerJobFlags.QUEUED;
96
+ }
118
97
  }
119
98
  }
120
99
  }
121
100
  finally {
122
101
  // If there was an error we still need to clear the QUEUED flags
123
- for (; flushIndex < queue.length; flushIndex++) {
124
- const job = queue[flushIndex];
125
- job.flags &= ~SchedulerJobFlags.QUEUED;
102
+ while (flushIndex < jobsLength) {
103
+ jobs[flushIndex].flags &= ~SchedulerJobFlags.QUEUED;
104
+ jobs[flushIndex++] = undefined;
126
105
  }
127
- flushIndex = -1;
128
- queue.length = 0;
106
+ flushIndex = 0;
107
+ jobsLength = 0;
129
108
  currentFlushPromise = null;
130
109
  }
131
110
  }
@@ -142,6 +121,38 @@ function checkRecursiveUpdates(seen, fn) {
142
121
  return false;
143
122
  }
144
123
 
124
+ const EMPTY_OBJ = (process.env.NODE_ENV !== 'production') ? Object.freeze({}) : /* istanbul ignore next -- @preserve */ {};
125
+ const isArray = Array.isArray;
126
+ const extend = Object.assign;
127
+ function exclude(obj, keys) {
128
+ const ret = {};
129
+ Object.keys(obj).forEach((key) => {
130
+ if (!keys.includes(key)) {
131
+ ret[key] = obj[key];
132
+ }
133
+ });
134
+ return ret;
135
+ }
136
+ function getType(x) {
137
+ return Object.prototype.toString.call(x).slice(8, -1);
138
+ }
139
+ function isSimpleValue(x) {
140
+ const simpleTypes = new Set(['undefined', 'boolean', 'number', 'string']);
141
+ return x === null || simpleTypes.has(typeof x);
142
+ }
143
+ function isObject(x) {
144
+ return x !== null && typeof x === 'object';
145
+ }
146
+ function isPlainObject(x) {
147
+ return getType(x) === 'Object';
148
+ }
149
+ function isFunction(x) {
150
+ return typeof x === 'function';
151
+ }
152
+ function toHiddenField(name) {
153
+ return `__${name}__`;
154
+ }
155
+
145
156
  // Simple effect.
146
157
  function watchEffect(effect, options) {
147
158
  return doWatch(effect, null, options);
@@ -165,8 +176,46 @@ function watch(source, cb, options) {
165
176
  }
166
177
  return doWatch(source, cb, options);
167
178
  }
168
- function doWatch(source, cb, options = EMPTY_OBJ) {
169
- const { immediate, deep, flush, once } = options;
179
+ class RenderWatcherEffect extends WatcherEffect {
180
+ constructor(
181
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
182
+ source, cb, options, flush) {
183
+ super(source, cb, options);
184
+ this.flush = flush;
185
+ const job = () => {
186
+ if (this.dirty) {
187
+ this.run();
188
+ }
189
+ };
190
+ // Important: mark the job as a watcher callback so that scheduler knows
191
+ // it is allowed to self-trigger (#1727)
192
+ if (cb) {
193
+ this.flags |= EffectFlags.ALLOW_RECURSE;
194
+ job.flags |= SchedulerJobFlags.ALLOW_RECURSE;
195
+ }
196
+ this.job = job;
197
+ }
198
+ notify() {
199
+ const flags = this.flags;
200
+ if (!(flags & EffectFlags.PAUSED)) {
201
+ const flush = this.flush;
202
+ const job = this.job;
203
+ if (flush === 'post') {
204
+ queuePostFlushCb(job);
205
+ }
206
+ else if (flush === 'pre') {
207
+ queueJob(job);
208
+ }
209
+ else {
210
+ job();
211
+ }
212
+ }
213
+ }
214
+ }
215
+ function doWatch(
216
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
217
+ source, cb, options = EMPTY_OBJ) {
218
+ const { immediate, deep, flush = 'pre', once } = options;
170
219
  if ((process.env.NODE_ENV !== 'production') && !cb) {
171
220
  if (immediate !== undefined) {
172
221
  console.warn(`watch() "immediate" option is only respected when using the ` +
@@ -182,32 +231,22 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
182
231
  }
183
232
  }
184
233
  const baseWatchOptions = extend({}, options);
185
- // Scheduler
186
- if (flush === 'post') {
187
- baseWatchOptions.scheduler = (job) => {
188
- queuePostFlushCb(job);
189
- };
234
+ const effect = new RenderWatcherEffect(source, cb, baseWatchOptions, flush);
235
+ // Initial run
236
+ if (cb) {
237
+ effect.run(true);
190
238
  }
191
- else if (flush !== 'sync') {
192
- baseWatchOptions.scheduler = (job, isFirstRun) => {
193
- if (isFirstRun) {
194
- job();
195
- }
196
- else {
197
- queueJob(job);
198
- }
199
- };
239
+ else if (flush === 'post') {
240
+ queuePostFlushCb(effect.job);
200
241
  }
201
- // @ts-expect-error
202
- baseWatchOptions.augmentJob = (job) => {
203
- // Important: mark the job as a watcher callback so that scheduler knows
204
- // it is allowed to self-trigger
205
- if (cb) {
206
- job.flags |= SchedulerJobFlags.ALLOW_RECURSE;
207
- }
208
- };
209
- const watchHandle = watch$1(source, cb, baseWatchOptions);
210
- return watchHandle;
242
+ else {
243
+ effect.run(true);
244
+ }
245
+ const stop = effect.stop.bind(effect);
246
+ stop.pause = effect.pause.bind(effect);
247
+ stop.resume = effect.resume.bind(effect);
248
+ stop.stop = stop;
249
+ return stop;
211
250
  }
212
251
 
213
252
  const provides = Object.create(null);
@@ -244,28 +283,18 @@ function unsetCurrentApp() {
244
283
  }
245
284
  function setCurrentPage(page) {
246
285
  currentPage = page;
247
- // @ts-expect-error
248
- page.__scope__.on();
286
+ return setCurrentScope(page.__scope__);
249
287
  }
250
- function unsetCurrentPage() {
251
- /* istanbul ignore else -- @preserve */
252
- if (currentPage) {
253
- // @ts-expect-error
254
- currentPage.__scope__.off();
255
- }
288
+ function unsetCurrentPage(scope) {
289
+ setCurrentScope(scope);
256
290
  currentPage = null;
257
291
  }
258
292
  function setCurrentComponent(component) {
259
293
  currentComponent = component;
260
- // @ts-expect-error
261
- component.__scope__.on();
294
+ return setCurrentScope(component.__scope__);
262
295
  }
263
- function unsetCurrentComponent() {
264
- /* istanbul ignore else -- @preserve */
265
- if (currentComponent) {
266
- // @ts-expect-error
267
- currentComponent.__scope__.off();
268
- }
296
+ function unsetCurrentComponent(scope) {
297
+ setCurrentScope(scope);
269
298
  currentComponent = null;
270
299
  }
271
300
 
@@ -403,7 +432,7 @@ function definePage(optionsOrSetup, config) {
403
432
  const originOnLoad = options[PageLifecycle.ON_LOAD];
404
433
  options[PageLifecycle.ON_LOAD] = function (query) {
405
434
  this.__scope__ = new EffectScope();
406
- setCurrentPage(this);
435
+ const scope = setCurrentPage(this);
407
436
  const context = {
408
437
  is: this.is,
409
438
  route: this.route,
@@ -447,7 +476,7 @@ function definePage(optionsOrSetup, config) {
447
476
  this.setData(data, flushPostFlushCbs);
448
477
  }
449
478
  }
450
- unsetCurrentPage();
479
+ unsetCurrentPage(scope);
451
480
  if (originOnLoad !== undefined) {
452
481
  originOnLoad.call(this, query);
453
482
  }
@@ -576,7 +605,7 @@ function defineComponent(optionsOrSetup, config) {
576
605
  options[ComponentLifecycle.ATTACHED];
577
606
  options.lifetimes[ComponentLifecycle.ATTACHED] = function () {
578
607
  this.__scope__ = new EffectScope();
579
- setCurrentComponent(this);
608
+ const scope = setCurrentComponent(this);
580
609
  const rawProps = {};
581
610
  if (properties) {
582
611
  properties.forEach((property) => {
@@ -632,7 +661,7 @@ function defineComponent(optionsOrSetup, config) {
632
661
  this.setData(data, flushPostFlushCbs);
633
662
  }
634
663
  }
635
- unsetCurrentComponent();
664
+ unsetCurrentComponent(scope);
636
665
  if (originAttached !== undefined) {
637
666
  originAttached.call(this);
638
667
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-mini/core",
3
- "version": "1.2.7",
3
+ "version": "1.3.0-alpha.1",
4
4
  "description": "基于 Vue 3 的小程序框架。简单,强大,高性能。 ",
5
5
  "main": "dist/vue-mini.cjs.js",
6
6
  "module": "dist/vue-mini.esm-bundler.js",
@@ -32,7 +32,7 @@
32
32
  "小程序"
33
33
  ],
34
34
  "dependencies": {
35
- "@vue/reactivity": "3.5.24",
36
- "miniprogram-api-typings": "~4.0.8"
35
+ "@vue/reactivity": "3.6.0-alpha.5",
36
+ "miniprogram-api-typings": "~4.1.0"
37
37
  }
38
38
  }