@vue-mini/core 1.2.9 → 1.3.0-beta.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.9
2
+ * vue-mini v1.3.0-beta.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,_=t=>null!==t&&"object"==typeof t,l=Object.prototype.toString,u=t=>l.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 v{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,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 O(){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,U(this),y(this);const t=E,e=P;E=this,P=!0;try{return this.fn()}finally{D(this),E=t,P=e,this.flags&=-3}}stop(){if(1&this.flags){for(let t=this.deps;t;t=t.nextDep)I(t);this.deps=this.depsTail=void 0,U(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),I(n),L(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&&(w(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function w(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=P;E=t,P=!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,P=n,D(t),t.flags&=-3}}function I(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)I(t,!0)}e||--s.sc||!s.map||s.map.delete(s.key)}function L(t){const{prevDep:e,nextDep:s}=t;e&&(e.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=e,t.nextDep=void 0)}let P=!0;const H=[];function k(){H.push(P),P=!1}function C(){const t=H.pop();P=void 0===t||t}function U(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||!P||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(P&&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 _=t=>{t&&t.trigger()};if(b(),"clear"===e)a.forEach(_);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)&&_(e)})}else switch((void 0!==s||a.has(void 0))&&_(a.get(s)),o&&_(a.get(Q)),e){case"add":i?o&&_(a.get("length")):(_(a.get(F)),c(t)&&_(a.get(B)));break;case"delete":i||(_(a.get(F)),c(t)&&_(a.get(B)));break;case"set":c(t)&&_(a.get(F))}}m()}function Z(t){const e=Ct(t);return e===t?e:(Y(e,0,Q),Ht(t)?e:e.map(Ut))}function z(t){return Y(t=Ct(t),0,Q),t}function J(t,e){return Pt(t)?Lt(t)?Mt(Ut(e)):Mt(e):Ut(e)}const K={__proto__:null,[Symbol.iterator](){return $(this,Symbol.iterator,t=>J(this,t))},concat(...t){return Z(this).concat(...t.map(t=>r(t)?Z(t):t))},entries(){return $(this,"entries",t=>(t[1]=J(this,t[1]),t))},every(t,e){return tt(this,"every",t,e,void 0,arguments)},filter(t,e){return tt(this,"filter",t,e,t=>t.map(t=>J(this,t)),arguments)},find(t,e){return tt(this,"find",t,e,t=>J(this,t),arguments)},findIndex(t,e){return tt(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return tt(this,"findLast",t,e,t=>J(this,t),arguments)},findLastIndex(t,e){return tt(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return tt(this,"forEach",t,e,void 0,arguments)},includes(...t){return st(this,"includes",t)},indexOf(...t){return st(this,"indexOf",t)},join(t){return Z(this).join(t)},lastIndexOf(...t){return st(this,"lastIndexOf",t)},map(t,e){return tt(this,"map",t,e,void 0,arguments)},pop(){return nt(this,"pop")},push(...t){return nt(this,"push",t)},reduce(t,...e){return et(this,"reduce",t,e)},reduceRight(t,...e){return et(this,"reduceRight",t,e)},shift(){return nt(this,"shift")},some(t,e){return tt(this,"some",t,e,void 0,arguments)},splice(...t){return nt(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 nt(this,"unshift",t)},values(){return $(this,"values",t=>J(this,t))}};function $(t,e,s){const n=z(t),i=n[e]();return n===t||Ht(t)||(i._next=i.next,i.next=()=>{const t=i._next();return t.done||(t.value=s(t.value)),t}),i}const q=Array.prototype;function tt(t,e,s,n,i,o){const r=z(t),c=r!==t&&!Ht(t),a=r[e];if(a!==q[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,J(t,e),n,t)}:s.length>2&&(h=function(e,n){return s.call(this,e,n,t)}));const _=a.call(r,h,n);return c&&i?i(_):_}function et(t,e,s,n){const i=z(t);let o=s;return i!==t&&(Ht(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,J(t,n),i,t)}),i[e](o,...n)}function st(t,e,s){const n=Ct(t);Y(n,0,Q);const i=n[e](...s);return-1!==i&&!1!==i||!kt(s[0])?i:(s[0]=Ct(s[0]),n[e](...s))}function nt(t,e,s=[]){k(),b();const n=Ct(t)[e].apply(t,s);return m(),C(),n}const it=t("__proto__,__v_isRef,__isVue"),ot=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>"arguments"!==t&&"caller"!==t).map(t=>Symbol[t]).filter(h));function rt(t){h(t)||(t=String(t));const e=Ct(this);return Y(e,0,t),e.hasOwnProperty(t)}class ct{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?mt:bt:i?Tt:Rt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){let t;if(o&&(t=K[e]))return t;if("hasOwnProperty"===e)return rt}const c=Reflect.get(t,e,jt(t)?t:s);if(h(e)?ot.has(e):it(e))return c;if(n||Y(t,0,e),i)return c;if(jt(c)){const t=o&&f(e)?c:c.value;return n&&_(t)?wt(t):t}return _(c)?n?wt(c):Dt(c):c}}class at extends ct{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=Pt(i);if(Ht(s)||Pt(s)||(i=Ct(i),s=Ct(s)),!c&&jt(i)&&!jt(s))return t||(i.value=s),!0}const a=c?Number(e)<t.length:o(t,e),h=Reflect.set(t,e,s,jt(t)?t:n);return t===Ct(n)&&(a?p(s,i)&&X(t,"set",e,s):X(t,"add",e,s)),h}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)&&ot.has(e)||Y(t,0,e),s}ownKeys(t){return Y(t,0,r(t)?"length":F),Reflect.ownKeys(t)}}class ht extends ct{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const _t=new at,lt=new ht,ut=new at(!0),ft=new ht(!0),pt=t=>t,dt=t=>Reflect.getPrototypeOf(t);function Et(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function vt(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}=dt(i),c=e?pt:t?Mt: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?pt:t?Mt:Ut;return!t&&Y(r,0,F),o.forEach((t,e)=>s.call(n,c(t),c(e),i))}};n(s,t?{add:Et("add"),set:Et("set"),delete:Et("delete"),clear:Et("clear")}:{add(t){e||Ht(t)||Pt(t)||(t=Ct(t));const s=Ct(this);return dt(s).has.call(s,t)||(s.add(t),X(s,"add",t,t)),this},set(t,s){e||Ht(s)||Pt(s)||(s=Ct(s));const n=Ct(this),{has:i,get:o}=dt(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}=dt(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(i=>{s[i]=function(t,e,s){return function(...i){const o=this.__v_raw,r=Ct(o),a=c(r),h="entries"===t||t===Symbol.iterator&&a,_="keys"===t&&a,l=o[t](...i),u=s?pt:e?Mt:Ut;return!e&&Y(r,0,_?B:F),n(Object.create(l),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:h?[u(t[0]),u(t[1])]:u(t),done:e}}})}}(i,t,e)}),s}function Ot(t,e){const s=vt(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 gt={get:Ot(!1,!1)},St={get:Ot(!1,!0)},At={get:Ot(!0,!1)},Nt={get:Ot(!0,!0)},Rt=new WeakMap,Tt=new WeakMap,bt=new WeakMap,mt=new WeakMap;function yt(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 Dt(t){return Pt(t)?t:It(t,!1,_t,gt,Rt)}function xt(t){return It(t,!1,ut,St,Tt)}function wt(t){return It(t,!0,lt,At,bt)}function It(t,e,s,n,i){if(!_(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const o=yt(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 Ht(t){return!(!t||!t.__v_isShallow)}function kt(t){return!!t&&!!t.__v_raw}function Ct(t){const e=t&&t.__v_raw;return e?Ct(e):t}const Ut=t=>_(t)?Dt(t):t,Mt=t=>_(t)?wt(t):t;function jt(t){return!!t&&!0===t.__v_isRef}function Wt(t){return Vt(t,!1)}function Vt(t,e){return jt(t)?t:new Gt(t,e)}class Gt{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||Ht(t)||Pt(t);t=s?t:Ct(t),p(t,e)&&(this._rawValue=t,this._value=s?t:Ut(t),this.dep.trigger())}}function Ft(t){return jt(t)?t.value:t}const Bt={get:(t,e,s)=>"__v_raw"===e?t:Ft(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return jt(i)&&!jt(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};class Qt{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 Yt{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=Ct(t);let n=!0,i=t;if(!r(t)||!f(String(e)))do{n=!kt(i)||Ht(i)}while(n&&(i=i.__v_raw));this._shallow=n}get value(){let t=this._object[this._key];return this._shallow&&(t=Ft(t)),this._value=void 0===t?this._defaultValue:t}set value(t){if(this._shallow&&jt(this._raw[this._key])){const e=this._object[this._key];if(jt(e))return void(e.value=t)}this._object[this._key]=t}get dep(){return function(t,e){const s=G.get(t);return s&&s.get(e)}(this._raw,this._key)}}class Xt{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 Zt(t,e,s){return new Yt(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 w(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}const Jt={},Kt=new WeakMap;let $t;function qt(t,e=!1,s=$t){if(s){let e=Kt.get(s);e||Kt.set(s,e=[]),e.push(t)}}function te(t,e=1/0,s){if(e<=0||!_(t)||t.__v_skip)return t;if(((s=s||new Map).get(t)||0)>=e)return t;if(s.set(t,e),e--,jt(t))te(t.value,e,s);else if(r(t))for(let n=0;n<t.length;n++)te(t[n],e,s);else if("[object Set]"===u(t)||c(t))t.forEach(t=>{te(t,e,s)});else if((t=>"[object Object]"===u(t))(t)){for(const n in t)te(t[n],e,s);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&te(t[n],e,s)}return t}const ee={},se=Array.isArray,ne=Object.assign;function ie(t,e){const s={};return Object.keys(t).forEach(n=>{e.includes(n)||(s[n]=t[n])}),s}function oe(t){return Object.prototype.toString.call(t).slice(8,-1)}function re(t){return"function"==typeof t}function ce(t){return`__${t}__`}var ae;!function(t){t[t.QUEUED=1]="QUEUED",t[t.ALLOW_RECURSE=4]="ALLOW_RECURSE"}(ae||(ae={}));const he=[];let _e=-1;const le=[];let ue=null,fe=0;const pe=Promise.resolve();let de=null;function Ee(t){t.flags&ae.QUEUED||(he.push(t),t.flags|=ae.QUEUED,de||(de=pe.then(Oe)))}function ve(){if(le.length>0){for(ue=[...new Set(le)],le.length=0,fe=0;fe<ue.length;fe++){const t=ue[fe];t.flags&ae.ALLOW_RECURSE&&(t.flags&=~ae.QUEUED),t(),t.flags&=~ae.QUEUED}ue=null,fe=0}}function Oe(){try{for(_e=0;_e<he.length;_e++){const t=he[_e];0,t.flags&ae.ALLOW_RECURSE&&(t.flags&=~ae.QUEUED),t(),t.flags&ae.ALLOW_RECURSE||(t.flags&=~ae.QUEUED)}}finally{for(;_e<he.length;_e++){he[_e].flags&=~ae.QUEUED}_e=-1,he.length=0,de=null}}function ge(t,e,s){return Se(t,e,s)}function Se(t,n,i=ee){const{flush:o}=i,c=ne({},i);"post"===o?c.scheduler=t=>{!function(t){t.flags&ae.QUEUED||(le.push(t),t.flags|=ae.QUEUED)}(t)}:"sync"!==o&&(c.scheduler=(t,e)=>{e?t():Ee(t)}),c.augmentJob=t=>{n&&(t.flags|=ae.ALLOW_RECURSE)};const h=function(t,n,i=e){const{immediate:o,deep:c,once:h,scheduler:_,augmentJob:l,call:u}=i,f=t=>c?t:Ht(t)||!1===c||0===c?te(t,1):te(t);let d,E,v,g,A=!1,N=!1;if(jt(t)?(E=()=>t.value,A=Ht(t)):Lt(t)?(E=()=>f(t),A=!0):r(t)?(N=!0,A=t.some(t=>Lt(t)||Ht(t)),E=()=>t.map(t=>jt(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(v){k();try{v()}finally{C()}}const e=$t;$t=d;try{return u?u(t,3,[g]):t(g)}finally{$t=e}}:s,n&&c){const t=E,e=!0===c?1/0:c;E=()=>te(t(),e)}const R=O(),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(Jt):Jt;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))){v&&v();const e=$t;$t=d;try{const e=[t,b===Jt?void 0:N&&b[0]===Jt?[]:b,g];b=t,u?u(n,3,e):n(...e)}finally{$t=e}}}else d.run()};return l&&l(m),d=new S(E),d.scheduler=_?()=>_(m,!1):m,g=t=>qt(t,!1,d),v=d.onStop=()=>{const t=Kt.get(d);if(t){if(u)u(t,4);else for(const e of t)e();Kt.delete(d)}},n?o?m(!0):b=d.run():_?_(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 Ae=Object.create(null);let Ne=null,Re=null,Te=null;function be(){return Re||Te}var me,ye,De;function xe(t,e){const s=t[e];return function(...t){const n=this[ce(e)];n&&n.forEach(e=>e(...t)),void 0!==s&&s.call(this,...t)}}function we(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(jt(t))return we(t.value);if(kt(t))return we(Ct(t));if(se(t))return t.map(t=>we(t));if(function(t){return"Object"===oe(t)}(t)){const e={};return Object.keys(t).forEach(s=>{e[s]=we(t[s])}),e}throw new TypeError(`${oe(t)} value is not supported`)}function Ie(t,e){var s;null!==(s=e)&&"object"==typeof s&&ge(jt(e)?e:()=>e,()=>{this.setData({[t]:we(e)},ve)},{deep:!0})}function Le(t,e){const s=t[e];return function(...t){const n=this[ce(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"}(me||(me={})),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"}(ye||(ye={})),function(t){t.ATTACHED="attached",t.READY="ready",t.MOVED="moved",t.DETACHED="detached",t.ERROR="error"}(De||(De={}));const Pe={[ye.ON_SHOW]:"show",[ye.ON_HIDE]:"hide",[ye.ON_RESIZE]:"resize",[ye.ON_ROUTE_DONE]:"routeDone",[De.READY]:ye.ON_READY};function He(t,e){return Ue(e,t.lifetimes[e]||t[e])}function ke(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=ce(t);return function(...t){const n=this[s];n&&n.forEach(e=>e(...t)),void 0!==e&&e.call(this,...t)}}const Me=ss(me.ON_SHOW),je=ss(me.ON_HIDE),We=ss(me.ON_ERROR),Ve=ss(me.ON_PAGE_NOT_FOUND),Ge=ss(me.ON_UNHANDLED_REJECTION),Fe=ss(me.ON_THEME_CHANGE),Be=ns(ye.ON_SHOW),Qe=ns(ye.ON_HIDE),Ye=ns(ye.ON_UNLOAD),Xe=ns(ye.ON_ROUTE_DONE),Ze=ns(ye.ON_PULL_DOWN_REFRESH),ze=ns(ye.ON_REACH_BOTTOM),Je=ns(ye.ON_RESIZE),Ke=ns(ye.ON_TAB_ITEM_TAP),$e=is(ye.ON_LOAD),qe=is(De.MOVED),ts=is(De.DETACHED),es=is(De.ERROR);function ss(t){return e=>{Ne&&os(Ne,t,e)}}function ns(t){return e=>{const s=be();s&&os(s,t,e)}}function is(t){return e=>{Te&&os(Te,t,e)}}function os(t,e,s){const n=ce(e);void 0===t[n]&&(t[n]=[]),t[n].push(s)}exports.EffectScope=v,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(re(t))e=t,s={};else{if(void 0===t.setup)return void App(t);e=t.setup,s=ie(t,["setup"])}const n=s[me.ON_LAUNCH];s[me.ON_LAUNCH]=function(t){Ne=this;const s=e(t);void 0!==s&&Object.keys(s).forEach(t=>{this[t]=s[t]}),Ne=null,void 0!==n&&n.call(this,t)},s[me.ON_SHOW]=xe(s,me.ON_SHOW),s[me.ON_HIDE]=xe(s,me.ON_HIDE),s[me.ON_ERROR]=xe(s,me.ON_ERROR),s[me.ON_PAGE_NOT_FOUND]=xe(s,me.ON_PAGE_NOT_FOUND),s[me.ON_UNHANDLED_REJECTION]=xe(s,me.ON_UNHANDLED_REJECTION),s[me.ON_THEME_CHANGE]=xe(s,me.ON_THEME_CHANGE),App(s)},exports.customRef=function(t){return new Qt(t)},exports.defineComponent=function(t,e){let s,n;e=ne({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=ie(t,["setup"]),n.properties&&(i=Object.keys(n.properties))}void 0===n.lifetimes&&(n.lifetimes={});const o=n.lifetimes[De.ATTACHED]||n[De.ATTACHED];n.lifetimes[De.ATTACHED]=function(){var t;this.__scope__=new v,Te=t=this,t.__scope__.on();const e={};i&&i.forEach(t=>{e[t]=this.data[t]}),this.__props__=xt(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];re(s)?this[e]=s:(t=t||{},t[e]=we(s),Ie.call(this,e,s))}),void 0!==t&&this.setData(t,ve)}Te&&Te.__scope__.off(),Te=null,void 0!==o&&o.call(this)};const r=He(n,De.DETACHED);return n.lifetimes[De.DETACHED]=function(){r.call(this),this.__scope__.stop()},n.lifetimes[De.READY]=Ue(Pe[De.READY],n.lifetimes[De.READY]||n[De.READY]),n.lifetimes[De.MOVED]=He(n,De.MOVED),n.lifetimes[De.ERROR]=He(n,De.ERROR),void 0===n.methods&&(n.methods={}),(n.methods[ye.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n.methods[ye.ON_PAGE_SCROLL]=ke(n,ye.ON_PAGE_SCROLL),n.methods.__listenPageScroll__=()=>!0),void 0===n.methods[ye.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n.methods[ye.ON_SHARE_APP_MESSAGE]=function(t){const e=this[ce(ye.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.methods.__isInjectedShareToOthersHook__=()=>!0),void 0===n.methods[ye.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n.methods[ye.ON_SHARE_TIMELINE]=function(){const t=this[ce(ye.ON_SHARE_TIMELINE)];return t?t():{}},n.methods.__isInjectedShareToTimelineHook__=()=>!0),void 0===n.methods[ye.ON_ADD_TO_FAVORITES]&&(n.methods[ye.ON_ADD_TO_FAVORITES]=function(t){const e=this[ce(ye.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.methods.__isInjectedFavoritesHook__=()=>!0),void 0===n.methods[ye.ON_SAVE_EXIT_STATE]&&(n.methods[ye.ON_SAVE_EXIT_STATE]=function(){const t=this[ce(ye.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.methods.__isInjectedExitStateHook__=()=>!0),n.methods[ye.ON_LOAD]=ke(n,ye.ON_LOAD),n.methods[ye.ON_PULL_DOWN_REFRESH]=ke(n,ye.ON_PULL_DOWN_REFRESH),n.methods[ye.ON_REACH_BOTTOM]=ke(n,ye.ON_REACH_BOTTOM),n.methods[ye.ON_TAB_ITEM_TAP]=ke(n,ye.ON_TAB_ITEM_TAP),void 0===n.pageLifetimes&&(n.pageLifetimes={}),n.pageLifetimes[Pe[ye.ON_SHOW]]=Ce(n,ye.ON_SHOW),n.pageLifetimes[Pe[ye.ON_HIDE]]=Ce(n,ye.ON_HIDE),n.pageLifetimes[Pe[ye.ON_RESIZE]]=Ce(n,ye.ON_RESIZE),n.pageLifetimes[Pe[ye.ON_ROUTE_DONE]]=Ce(n,ye.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=ne({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=ie(t,["setup"])}const i=n[ye.ON_LOAD];n[ye.ON_LOAD]=function(t){var e;this.__scope__=new v,Re=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];re(s)?this[e]=s:(t=t||{},t[e]=we(s),Ie.call(this,e,s))}),void 0!==t&&this.setData(t,ve)}Re&&Re.__scope__.off(),Re=null,void 0!==i&&i.call(this,t)};const o=Le(n,ye.ON_UNLOAD);n[ye.ON_UNLOAD]=function(){o.call(this),this.__scope__.stop()},(n[ye.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n[ye.ON_PAGE_SCROLL]=Le(n,ye.ON_PAGE_SCROLL),n.__listenPageScroll__=()=>!0),void 0===n[ye.ON_SHARE_APP_MESSAGE]&&e.canShareToOthers&&(n[ye.ON_SHARE_APP_MESSAGE]=function(t){const e=this[ce(ye.ON_SHARE_APP_MESSAGE)];return e?e(t):{}},n.__isInjectedShareToOthersHook__=()=>!0),void 0===n[ye.ON_SHARE_TIMELINE]&&e.canShareToTimeline&&(n[ye.ON_SHARE_TIMELINE]=function(){const t=this[ce(ye.ON_SHARE_TIMELINE)];return t?t():{}},n.__isInjectedShareToTimelineHook__=()=>!0),void 0===n[ye.ON_ADD_TO_FAVORITES]&&(n[ye.ON_ADD_TO_FAVORITES]=function(t){const e=this[ce(ye.ON_ADD_TO_FAVORITES)];return e?e(t):{}},n.__isInjectedFavoritesHook__=()=>!0),void 0===n[ye.ON_SAVE_EXIT_STATE]&&(n[ye.ON_SAVE_EXIT_STATE]=function(){const t=this[ce(ye.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.__isInjectedExitStateHook__=()=>!0),n[ye.ON_SHOW]=Le(n,ye.ON_SHOW),n[ye.ON_READY]=Le(n,ye.ON_READY),n[ye.ON_HIDE]=Le(n,ye.ON_HIDE),n[ye.ON_ROUTE_DONE]=Le(n,ye.ON_ROUTE_DONE),n[ye.ON_PULL_DOWN_REFRESH]=Le(n,ye.ON_PULL_DOWN_REFRESH),n[ye.ON_REACH_BOTTOM]=Le(n,ye.ON_REACH_BOTTOM),n[ye.ON_RESIZE]=Le(n,ye.ON_RESIZE),n[ye.ON_TAB_ITEM_TAP]=Le(n,ye.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 v(t)},exports.getCurrentScope=O,exports.getCurrentWatcher=function(){return $t},exports.inject=function(t,e,s=!1){return t in Ae?Ae[t]:arguments.length>1?s&&re(e)?e():e:void 0},exports.isProxy=kt,exports.isReactive=Lt,exports.isReadonly=Pt,exports.isRef=jt,exports.isShallow=Ht,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=de||pe;return t?e.then(t):e},exports.onAddToFavorites=t=>{const e=be();if(e&&e.__isInjectedFavoritesHook__){const s=ce(ye.ON_ADD_TO_FAVORITES);void 0===e[s]&&(e[s]=t)}},exports.onAppError=We,exports.onAppHide=je,exports.onAppShow=Me,exports.onDetach=ts,exports.onError=es,exports.onHide=Qe,exports.onLoad=$e,exports.onMove=qe,exports.onPageNotFound=Ve,exports.onPageScroll=t=>{const e=be();e&&e.__listenPageScroll__&&os(e,ye.ON_PAGE_SCROLL,t)},exports.onPullDownRefresh=Ze,exports.onReachBottom=ze,exports.onReady=t=>{const e=be();e&&os(e,ye.ON_READY,t)},exports.onResize=Je,exports.onRouteDone=Xe,exports.onSaveExitState=t=>{const e=be();if(e&&e.__isInjectedExitStateHook__){const s=ce(ye.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=be();if(e&&e[ye.ON_SHARE_APP_MESSAGE]&&e.__isInjectedShareToOthersHook__){const s=ce(ye.ON_SHARE_APP_MESSAGE);void 0===e[s]&&(e[s]=t)}},exports.onShareTimeline=t=>{const e=be();if(e&&e[ye.ON_SHARE_TIMELINE]&&e.__isInjectedShareToTimelineHook__){const s=ce(ye.ON_SHARE_TIMELINE);void 0===e[s]&&(e[s]=t)}},exports.onShow=Be,exports.onTabItemTap=Ke,exports.onThemeChange=Fe,exports.onUnhandledRejection=Ge,exports.onUnload=Ye,exports.onWatcherCleanup=qt,exports.provide=function(t,e){Ae[t]=e},exports.proxyRefs=function(t){return Lt(t)?t:new Proxy(t,Bt)},exports.reactive=Dt,exports.readonly=wt,exports.ref=Wt,exports.shallowReactive=xt,exports.shallowReadonly=function(t){return It(t,!0,ft,Nt,mt)},exports.shallowRef=function(t){return Vt(t,!0)},exports.stop=function(t){t.effect.stop()},exports.toRaw=Ct,exports.toRef=function(t,e,s){return jt(t)?t:a(t)?new Xt(t):_(t)&&arguments.length>1?Zt(t,e,s):Wt(t)},exports.toRefs=function(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=Zt(t,s);return e},exports.toValue=function(t){return a(t)?t():Ft(t)},exports.triggerRef=function(t){t.dep&&t.dep.trigger()},exports.unref=Ft,exports.watch=ge,exports.watchEffect=function(t,e){return Se(t,null,e)},exports.watchPostEffect=function(t,e){return Se(t,null,{flush:"post"})},exports.watchSyncEffect=function(t,e){return Se(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,a=t=>"[object Map]"===_(t),c=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),p=0,v=1,E=16,O=32,g=[];let S,A=0,N=0,b=0,R=0;function T(t){try{return S}finally{S=t}}function y(){++A}function m(){! --A&&R&&H()}function D(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=N,void(e.depsTail=n);const i=t.subsTail;if(void 0!==i&&i.version===N&&i.sub===e)return;const o=e.depsTail=t.subsTail={version:N,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 x(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=x(t,s)}while(void 0!==t);s.flags|=16}}return i}function w(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||!U(t,n)?i=0:(n.flags=40|i,i&=1):n.flags=-9&i|32:i=0:n.flags=32|i,2&i&&(g[R++]=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 I(t){return++N,t.depsTail=void 0,t.flags=-57&t.flags|4,T(t)}function L(t,e){S=e;const s=t.depsTail;let n=void 0!==s?s.nextDep:t.deps;for(;void 0!==n;)n=x(n,t);t.flags&=-5}function H(){for(;b<R;){const t=g[b];g[b++]=void 0,t.notify()}b=0,R=0}function P(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&&C(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&&C(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 C(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 U(t,e){let s=e.depsTail;for(;void 0!==s;){if(s===t)return!0;s=s.prevDep}return!1}var M=class{constructor(t,e){this.map=t,this.key=e,this._subs=void 0,this.subsTail=void 0,this.flags=0}get subs(){return this._subs}set subs(t){this._subs=t,void 0===t&&this.map.delete(this.key)}};const j=new WeakMap,k=Symbol(""),V=Symbol(""),W=Symbol("");function G(t,e,s){if(void 0!==S){let e=j.get(t);e||j.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=new M(e,s)),D(n,S)}}function F(t,e,s,n,i,o){const c=j.get(t);if(!c)return;const l=t=>{void 0!==t&&void 0!==t.subs&&(w(t.subs),C(t.subs))};if(y(),"clear"===e)c.forEach(l);else{const i=r(t),o=i&&f(s);if(i&&"length"===s){const t=Number(n);c.forEach((e,s)=>{("length"===s||s===W||!u(s)&&s>=t)&&l(e)})}else switch((void 0!==s||c.has(void 0))&&l(c.get(s)),o&&l(c.get(W)),e){case"add":i?o&&l(c.get("length")):(l(c.get(k)),a(t)&&l(c.get(V)));break;case"delete":i||(l(c.get(k)),a(t)&&l(c.get(V)));break;case"set":a(t)&&l(c.get(k))}}m()}function B(t){const e=Lt(t);return e===t?e:(G(e,0,W),wt(t)?e:e.map(Ht))}function Q(t){return G(t=Lt(t),0,W),t}function Y(t,e){return xt(t)?Pt(Dt(t)?Ht(e):e):Ht(e)}const X={__proto__:null,[Symbol.iterator](){return Z(this,Symbol.iterator,t=>Y(this,t))},concat(...t){return B(this).concat(...t.map(t=>r(t)?B(t):t))},entries(){return Z(this,"entries",t=>(t[1]=Y(this,t[1]),t))},every(t,e){return J(this,"every",t,e,void 0,arguments)},filter(t,e){return J(this,"filter",t,e,t=>t.map(t=>Y(this,t)),arguments)},find(t,e){return J(this,"find",t,e,t=>Y(this,t),arguments)},findIndex(t,e){return J(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return J(this,"findLast",t,e,t=>Y(this,t),arguments)},findLastIndex(t,e){return J(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return J(this,"forEach",t,e,void 0,arguments)},includes(...t){return $(this,"includes",t)},indexOf(...t){return $(this,"indexOf",t)},join(t){return B(this).join(t)},lastIndexOf(...t){return $(this,"lastIndexOf",t)},map(t,e){return J(this,"map",t,e,void 0,arguments)},pop(){return q(this,"pop")},push(...t){return q(this,"push",t)},reduce(t,...e){return K(this,"reduce",t,e)},reduceRight(t,...e){return K(this,"reduceRight",t,e)},shift(){return q(this,"shift")},some(t,e){return J(this,"some",t,e,void 0,arguments)},splice(...t){return q(this,"splice",t)},toReversed(){return B(this).toReversed()},toSorted(t){return B(this).toSorted(t)},toSpliced(...t){return B(this).toSpliced(...t)},unshift(...t){return q(this,"unshift",t)},values(){return Z(this,"values",t=>Y(this,t))}};function Z(t,e,s){const n=Q(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 z=Array.prototype;function J(t,e,s,n,i,o){const r=Q(t),a=r!==t&&!wt(t),c=r[e];if(c!==z[e]){const e=c.apply(t,o);return a?Ht(e):e}let u=s;r!==t&&(a?u=function(e,n){return s.call(this,Y(t,e),n,t)}:s.length>2&&(u=function(e,n){return s.call(this,e,n,t)}));const l=c.call(r,u,n);return a&&i?i(l):l}function K(t,e,s,n){const i=Q(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,Y(t,n),i,t)}),i[e](o,...n)}function $(t,e,s){const n=Lt(t);G(n,0,W);const i=n[e](...s);return-1!==i&&!1!==i||!It(s[0])?i:(s[0]=Lt(s[0]),n[e](...s))}function q(t,e,s=[]){y();const n=T(),i=Lt(t)[e].apply(t,s);return T(n),m(),i}const tt=t("__proto__,__v_isRef,__isVue"),et=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>"arguments"!==t&&"caller"!==t).map(t=>Symbol[t]).filter(u));function st(t){u(t)||(t=String(t));const e=Lt(this);return G(e,0,t),e.hasOwnProperty(t)}var nt=class{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?Nt:At:i?St:gt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){let t;if(o&&(t=X[e]))return t;if("hasOwnProperty"===e)return st}const a=Ct(t),c=Reflect.get(t,e,a?t:s);if(a&&"value"!==e)return c;if(u(e)?et.has(e):tt(e))return c;if(n||G(t,0,e),i)return c;if(Ct(c)){const t=o&&f(e)?c:c.value;return n&&l(t)?yt(t):t}return l(c)?n?yt(c):Rt(c):c}},it=class extends nt{constructor(t=!1){super(!1,t)}set(t,e,s,n){let i=t[e];const a=r(t)&&f(e);if(!this._isShallow){const t=xt(i);if(wt(s)||xt(s)||(i=Lt(i),s=Lt(s)),!a&&Ct(i)&&!Ct(s))return t||(i.value=s),!0}const c=a?Number(e)<t.length:o(t,e),u=Reflect.set(t,e,s,Ct(t)?t:n);return t===Lt(n)&&(c?d(s,i)&&F(t,"set",e,s):F(t,"add",e,s)),u}deleteProperty(t,e){const s=o(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&F(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return u(e)&&et.has(e)||G(t,0,e),s}ownKeys(t){return G(t,0,r(t)?"length":k),Reflect.ownKeys(t)}},ot=class extends nt{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}};const rt=new it,at=new ot,ct=new it(!0),ut=new ot(!0),lt=t=>t,ht=t=>Reflect.getPrototypeOf(t);function _t(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function ft(t,e){const s={get(s){const n=this.__v_raw,i=Lt(n),o=Lt(s);t||(d(s,o)&&G(i,0,s),G(i,0,o));const{has:r}=ht(i),a=e?lt:t?Pt:Ht;return r.call(i,s)?a(n.get(s)):r.call(i,o)?a(n.get(o)):void(n!==i&&n.get(s))},get size(){const e=this.__v_raw;return!t&&G(Lt(e),0,k),e.size},has(e){const s=this.__v_raw,n=Lt(s),i=Lt(e);return t||(d(e,i)&&G(n,0,e),G(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=e?lt:t?Pt:Ht;return!t&&G(Lt(o),0,k),o.forEach((t,e)=>s.call(n,r(t),r(e),i))}};return n(s,t?{add:_t("add"),set:_t("set"),delete:_t("delete"),clear:_t("clear")}:{add(t){e||wt(t)||xt(t)||(t=Lt(t));const s=Lt(this);return ht(s).has.call(s,t)||(s.add(t),F(s,"add",t,t)),this},set(t,s){e||wt(s)||xt(s)||(s=Lt(s));const n=Lt(this),{has:i,get:o}=ht(n);let r=i.call(n,t);r||(r=i.call(n,t=Lt(t)));const a=o.call(n,t);return n.set(t,s),r?d(s,a)&&F(n,"set",t,s):F(n,"add",t,s),this},delete(t){const e=Lt(this),{has:s,get:n}=ht(e);let i=s.call(e,t);i||(i=s.call(e,t=Lt(t))),n&&n.call(e,t);const o=e.delete(t);return i&&F(e,"delete",t,void 0),o},clear(){const t=Lt(this),e=0!==t.size,s=t.clear();return e&&F(t,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{s[i]=function(t,e,s){return function(...i){const o=this.__v_raw,r=Lt(o),c=a(r),u="entries"===t||t===Symbol.iterator&&c,l="keys"===t&&c,h=o[t](...i),_=s?lt:e?Pt:Ht;return!e&&G(r,0,l?V:k),n(Object.create(h),{next(){const{value:t,done:e}=h.next();return e?{value:t,done:e}:{value:u?[_(t[0]),_(t[1])]:_(t),done:e}}})}}(i,t,e)}),s}function dt(t,e){const s=ft(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 pt={get:dt(!1,!1)},vt={get:dt(!1,!0)},Et={get:dt(!0,!1)},Ot={get:dt(!0,!0)},gt=new WeakMap,St=new WeakMap,At=new WeakMap,Nt=new WeakMap;function bt(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 Rt(t){return xt(t)?t:mt(t,!1,rt,pt,gt)}function Tt(t){return mt(t,!1,ct,vt,St)}function yt(t){return mt(t,!0,at,Et,At)}function mt(t,e,s,n,i){if(!l(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const o=bt(t);if(0===o)return t;const r=i.get(t);if(r)return r;const a=new Proxy(t,2===o?n:s);return i.set(t,a),a}function Dt(t){return xt(t)?Dt(t.__v_raw):!(!t||!t.__v_isReactive)}function xt(t){return!(!t||!t.__v_isReadonly)}function wt(t){return!(!t||!t.__v_isShallow)}function It(t){return!!t&&!!t.__v_raw}function Lt(t){const e=t&&t.__v_raw;return e?Lt(e):t}const Ht=t=>l(t)?Rt(t):t,Pt=t=>l(t)?yt(t):t;function Ct(t){return!!t&&!0===t.__v_isRef}function Ut(t){return Mt(t,Ht)}function Mt(t,e){return Ct(t)?t:new jt(t,e)}var jt=class{constructor(t,e){this.subs=void 0,this.subsTail=void 0,this.flags=v,this.__v_isRef=!0,this.__v_isShallow=!1,this._oldValue=this._rawValue=e?Lt(t):t,this._value=e?e(t):t,this._wrap=e,this.__v_isShallow=!e}get dep(){return this}get value(){if(Vt(this),this.flags&E&&this.update()){const t=this.subs;void 0!==t&&C(t)}return this._value}set value(t){const e=this._rawValue,s=this.__v_isShallow||wt(t)||xt(t);if(d(t=s?t:Lt(t),e)){this.flags|=E,this._rawValue=t,this._value=!s&&this._wrap?this._wrap(t):t;const e=this.subs;void 0!==e&&(w(e),A||H())}}update(){return this.flags&=-17,d(this._oldValue,this._oldValue=this._rawValue)}};function kt(t){const e=t.dep;void 0!==e&&void 0!==e.subs&&(w(e.subs),C(e.subs),A||H())}function Vt(t){void 0!==S&&D(t,S)}function Wt(t){return Ct(t)?t.value:t}const Gt={get:(t,e,s)=>"__v_raw"===e?t:Wt(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Ct(i)&&!Ct(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};var Ft=class{constructor(t){this.subs=void 0,this.subsTail=void 0,this.flags=p,this.__v_isRef=!0,this._value=void 0;const{get:e,set:s}=t(()=>Vt(this),()=>kt(this));this._get=e,this._set=s}get dep(){return this}get value(){return this._value=this._get()}set value(t){this._set(t)}};var Bt=class{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=Lt(t);let n=!0,i=t;if(!r(t)||!f(String(e)))do{n=!It(i)||wt(i)}while(n&&(i=i.__v_raw));this._shallow=n}get value(){let t=this._object[this._key];return this._shallow&&(t=Wt(t)),this._value=void 0===t?this._defaultValue:t}set value(t){if(this._shallow&&Ct(this._raw[this._key])){const e=this._object[this._key];if(Ct(e))return void(e.value=t)}this._object[this._key]=t}get dep(){return function(t,e){const s=j.get(t);return s&&s.get(e)}(this._raw,this._key)}},Qt=class{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 Yt(t,e,s){return new Bt(t,e,s)}const Xt=128,Zt=256;var zt=class{fn(){}constructor(t){this.deps=void 0,this.depsTail=void 0,this.subs=void 0,this.subsTail=void 0,this.flags=18,this.cleanups=[],this.cleanupsLength=0,void 0!==t&&(this.fn=t),Kt&&D(this,Kt)}get active(){return!(1024&this.flags)}pause(){this.flags|=256}resume(){48&(this.flags&=-257)&&this.notify()}notify(){256&this.flags||!this.dirty||this.run()}run(){if(!this.active)return this.fn();Jt(this);const t=I(this);try{return this.fn()}finally{L(this,t);const e=this.flags;136&~e||(this.flags=-9&e,this.notify())}}stop(){if(!this.active)return;this.flags=1024;let t=this.deps;for(;void 0!==t;)t=x(t,this);const e=this.subs;void 0!==e&&x(e),Jt(this)}get dirty(){const t=this.flags;if(16&t)return!0;if(32&t){if(P(this.deps,this))return this.flags=16|t,!0;this.flags=-33&t}return!1}};function Jt(t){const e=t.cleanupsLength;if(e){for(let s=0;s<e;s++)t.cleanups[s]();t.cleanupsLength=0}}let Kt;var $t=class{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&&Kt&&D(this,Kt)}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=Kt;try{return Kt=this,t()}finally{Kt=e}}stop(){if(!this.active)return;this.flags=1024,this.reset();const t=this.subs;void 0!==t&&x(t)}reset(){let t=this.deps;for(;void 0!==t;){const e=t.dep;"stop"in e?(t=t.nextDep,e.stop()):t=x(t,this)}Jt(this)}};function qt(t){try{return Kt}finally{Kt=t}}var te=class{get effect(){return this}get dep(){return this}get _dirty(){const t=this.flags;if(t&E)return!0;if(t&O){if(P(this.deps,this))return this.flags=t|E,!0;this.flags=-33&t}return!1}set _dirty(t){t?this.flags|=E:this.flags&=-49}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=v|E,this.__v_isRef=!0,this.__v_isReadonly=!e}get value(){const t=this.flags;if(t&E||t&O&&P(this.deps,this)){if(this.update()){const t=this.subs;void 0!==t&&C(t)}}else t&O&&(this.flags=-33&t);return void 0!==S?D(this,S):void 0!==Kt&&D(this,Kt),this._value}set value(t){this.setter&&this.setter(t)}update(){const t=I(this);try{const t=this._value,e=this.fn(t);return!!d(t,e)&&(this._value=e,!0)}finally{L(this,t)}}};const ee={};let se;function ne(t,e=!1,s=se){if(s){const{call:e}=s.options;s.cleanups[s.cleanupsLength++]=e?()=>e(t,4):t}}var ie,oe=class extends zt{constructor(t,n,i=e){const{deep:o,once:a,call:u}=i;let l,h=!1,_=!1;if(Ct(t)?(l=()=>t.value,h=wt(t)):Dt(t)?(l=()=>re(t,o),h=!0):r(t)?(_=!0,h=t.some(t=>Dt(t)||wt(t)),l=()=>t.map(t=>Ct(t)?t.value:Dt(t)?re(t,o):c(t)?u?u(t,2):t():void 0)):l=c(t)?n?u?()=>u(t,2):t:()=>{if(this.cleanupsLength){const t=T();try{Jt(this)}finally{T(t)}}const e=se;se=this;try{return u?u(t,3,[this.boundCleanup]):t(this.boundCleanup)}finally{se=e}}:s,n&&o){const t=l,e=!0===o?1/0:o;l=()=>ae(t(),e)}if(super(l),this.cb=n,this.options=i,this.boundCleanup=t=>ne(t,!1,this),this.forceTrigger=h,this.isMultiSource=_,a&&n){const t=n;n=(...e)=>{t(...e),this.stop()}}this.cb=n,this.oldValue=_?new Array(t.length).fill(ee):ee}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)))){Jt(this);const t=se;se=this;try{const t=[s,e===ee?void 0:this.isMultiSource&&e[0]===ee?[]:e,this.boundCleanup];o?o(this.cb,3,t):this.cb(...t)}finally{se=t}}}};function re(t,e){return e?t:wt(t)||!1===e||0===e?ae(t,1):ae(t)}function ae(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--,Ct(t))ae(t.value,e,s);else if(r(t))for(let n=0;n<t.length;n++)ae(t[n],e,s);else if("[object Set]"===_(t)||a(t))t.forEach(t=>{ae(t,e,s)});else if((t=>"[object Object]"===_(t))(t)){for(const n in t)ae(t[n],e,s);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&ae(t[n],e,s)}return t}!function(t){t[t.QUEUED=1]="QUEUED",t[t.ALLOW_RECURSE=2]="ALLOW_RECURSE"}(ie||(ie={}));const ce=[];let ue=[],le=null,he=null,_e=0,fe=0,de=0;const pe=Promise.resolve();function ve(t){Ee(t,ce,_e)&&(_e++,he||(he=pe.then(Se)))}function Ee(t,e,s){const n=t.flags;return!(n&ie.QUEUED)&&(t.flags=n|ie.QUEUED,e[s]=t,!0)}function Oe(t){Ee(t,ue,ue.length)}function ge(){if(ue.length){for(le=ue,ue=[];de<le.length;){const t=le[de++];t.flags&ie.ALLOW_RECURSE&&(t.flags&=~ie.QUEUED);try{t()}finally{t.flags&=~ie.QUEUED}}le=null,de=0}}function Se(){try{for(;fe<_e;){const t=ce[fe];ce[fe++]=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(;fe<_e;)ce[fe].flags&=~ie.QUEUED,ce[fe++]=void 0;fe=0,_e=0,he=null}}const Ae={},Ne=Array.isArray,be=Object.assign;function Re(t,e){const s={};return Object.keys(t).forEach(n=>{e.includes(n)||(s[n]=t[n])}),s}function Te(t){return Object.prototype.toString.call(t).slice(8,-1)}function ye(t){return"function"==typeof t}function me(t){return`__${t}__`}function De(t,e,s){return we(t,e,s)}class xe extends oe{constructor(t,e,s,n){super(t,e,s),this.flush=n;const i=()=>{this.dirty&&this.run()};e&&(this.flags|=Xt,i.flags|=ie.ALLOW_RECURSE),this.job=i}notify(){if(!(this.flags&Zt)){const t=this.flush,e=this.job;"post"===t?Oe(e):"pre"===t?ve(e):e()}}}function we(t,e,s=Ae){const{flush:n="pre"}=s,i=be({},s),o=new xe(t,e,i,n);e?o.run(!0):"post"===n?Oe(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 Ie=Object.create(null);let Le=null,He=null,Pe=null;function Ce(){return He||Pe}var Ue,Me,je;function ke(t,e){const s=t[e];return function(...t){const n=this[me(e)];n&&n.forEach(e=>e(...t)),void 0!==s&&s.call(this,...t)}}function Ve(t){if(function(t){const e=new Set(["undefined","boolean","number","string"]);return null===t||e.has(typeof t)}(t)||ye(t))return t;if(Ct(t))return Ve(t.value);if(It(t))return Ve(Lt(t));if(Ne(t))return t.map(t=>Ve(t));if(function(t){return"Object"===Te(t)}(t)){const e={};return Object.keys(t).forEach(s=>{e[s]=Ve(t[s])}),e}throw new TypeError(`${Te(t)} value is not supported`)}function We(t,e){var s;null!==(s=e)&&"object"==typeof s&&De(Ct(e)?e:()=>e,()=>{this.setData({[t]:Ve(e)},ge)},{deep:!0})}function Ge(t,e){const s=t[e];return function(...t){const n=this[me(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"}(Ue||(Ue={})),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"}(je||(je={}));const Fe={[Me.ON_SHOW]:"show",[Me.ON_HIDE]:"hide",[Me.ON_RESIZE]:"resize",[Me.ON_ROUTE_DONE]:"routeDone",[je.READY]:Me.ON_READY};function Be(t,e){return Xe(e,t.lifetimes[e]||t[e])}function Qe(t,e){return Xe(e,t.methods[e])}function Ye(t,e){return Xe(e,t.pageLifetimes[Fe[e]])}function Xe(t,e){const s=me(t);return function(...t){const n=this[s];n&&n.forEach(e=>e(...t)),void 0!==e&&e.call(this,...t)}}const Ze=_s(Ue.ON_SHOW),ze=_s(Ue.ON_HIDE),Je=_s(Ue.ON_ERROR),Ke=_s(Ue.ON_PAGE_NOT_FOUND),$e=_s(Ue.ON_UNHANDLED_REJECTION),qe=_s(Ue.ON_THEME_CHANGE),ts=fs(Me.ON_SHOW),es=fs(Me.ON_HIDE),ss=fs(Me.ON_UNLOAD),ns=fs(Me.ON_ROUTE_DONE),is=fs(Me.ON_PULL_DOWN_REFRESH),os=fs(Me.ON_REACH_BOTTOM),rs=fs(Me.ON_RESIZE),as=fs(Me.ON_TAB_ITEM_TAP),cs=ds(Me.ON_LOAD),us=ds(je.MOVED),ls=ds(je.DETACHED),hs=ds(je.ERROR);function _s(t){return e=>{Le&&ps(Le,t,e)}}function fs(t){return e=>{const s=Ce();s&&ps(s,t,e)}}function ds(t){return e=>{Pe&&ps(Pe,t,e)}}function ps(t,e,s){const n=me(e);void 0===t[n]&&(t[n]=[]),t[n].push(s)}exports.EffectScope=$t,exports.ReactiveEffect=zt,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 c(t)?n=t:(n=t.get,i=t.set),new te(n,i)},exports.createApp=function(t){let e,s;if(ye(t))e=t,s={};else{if(void 0===t.setup)return void App(t);e=t.setup,s=Re(t,["setup"])}const n=s[Ue.ON_LAUNCH];s[Ue.ON_LAUNCH]=function(t){Le=this;const s=e(t);void 0!==s&&Object.keys(s).forEach(t=>{this[t]=s[t]}),Le=null,void 0!==n&&n.call(this,t)},s[Ue.ON_SHOW]=ke(s,Ue.ON_SHOW),s[Ue.ON_HIDE]=ke(s,Ue.ON_HIDE),s[Ue.ON_ERROR]=ke(s,Ue.ON_ERROR),s[Ue.ON_PAGE_NOT_FOUND]=ke(s,Ue.ON_PAGE_NOT_FOUND),s[Ue.ON_UNHANDLED_REJECTION]=ke(s,Ue.ON_UNHANDLED_REJECTION),s[Ue.ON_THEME_CHANGE]=ke(s,Ue.ON_THEME_CHANGE),App(s)},exports.customRef=function(t){return new Ft(t)},exports.defineComponent=function(t,e){let s,n;e=be({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e);let i=null;if(ye(t))s=t,n={};else{if(void 0===t.setup)return Component(t);s=t.setup,n=Re(t,["setup"]),n.properties&&(i=Object.keys(n.properties))}void 0===n.lifetimes&&(n.lifetimes={});const o=n.lifetimes[je.ATTACHED]||n[je.ATTACHED];n.lifetimes[je.ATTACHED]=function(){this.__scope__=new $t;const t=(Pe=e=this,qt(e.__scope__));var e;const n={};i&&i.forEach(t=>{n[t]=this.data[t]}),this.__props__=Tt(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)},a=s(this.__props__,r);if(void 0!==a){let t;Object.keys(a).forEach(e=>{const s=a[e];ye(s)?this[e]=s:(t=t||{},t[e]=Ve(s),We.call(this,e,s))}),void 0!==t&&this.setData(t,ge)}!function(t){qt(t),Pe=null}(t),void 0!==o&&o.call(this)};const r=Be(n,je.DETACHED);return n.lifetimes[je.DETACHED]=function(){r.call(this),this.__scope__.stop()},n.lifetimes[je.READY]=Xe(Fe[je.READY],n.lifetimes[je.READY]||n[je.READY]),n.lifetimes[je.MOVED]=Be(n,je.MOVED),n.lifetimes[je.ERROR]=Be(n,je.ERROR),void 0===n.methods&&(n.methods={}),(n.methods[Me.ON_PAGE_SCROLL]||e.listenPageScroll)&&(n.methods[Me.ON_PAGE_SCROLL]=Qe(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[me(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[me(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[me(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[me(Me.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.methods.__isInjectedExitStateHook__=()=>!0),n.methods[Me.ON_LOAD]=Qe(n,Me.ON_LOAD),n.methods[Me.ON_PULL_DOWN_REFRESH]=Qe(n,Me.ON_PULL_DOWN_REFRESH),n.methods[Me.ON_REACH_BOTTOM]=Qe(n,Me.ON_REACH_BOTTOM),n.methods[Me.ON_TAB_ITEM_TAP]=Qe(n,Me.ON_TAB_ITEM_TAP),void 0===n.pageLifetimes&&(n.pageLifetimes={}),n.pageLifetimes[Fe[Me.ON_SHOW]]=Ye(n,Me.ON_SHOW),n.pageLifetimes[Fe[Me.ON_HIDE]]=Ye(n,Me.ON_HIDE),n.pageLifetimes[Fe[Me.ON_RESIZE]]=Ye(n,Me.ON_RESIZE),n.pageLifetimes[Fe[Me.ON_ROUTE_DONE]]=Ye(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=be({listenPageScroll:!1,canShareToOthers:!1,canShareToTimeline:!1},e),ye(t))s=t,n={};else{if(void 0===t.setup)return void Page(t);s=t.setup,n=Re(t,["setup"])}const i=n[Me.ON_LOAD];n[Me.ON_LOAD]=function(t){this.__scope__=new $t;const e=(He=n=this,qt(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];ye(s)?this[e]=s:(t=t||{},t[e]=Ve(s),We.call(this,e,s))}),void 0!==t&&this.setData(t,ge)}!function(t){qt(t),He=null}(e),void 0!==i&&i.call(this,t)};const o=Ge(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]=Ge(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[me(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[me(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[me(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[me(Me.ON_SAVE_EXIT_STATE)];return t?t():{data:void 0}},n.__isInjectedExitStateHook__=()=>!0),n[Me.ON_SHOW]=Ge(n,Me.ON_SHOW),n[Me.ON_READY]=Ge(n,Me.ON_READY),n[Me.ON_HIDE]=Ge(n,Me.ON_HIDE),n[Me.ON_ROUTE_DONE]=Ge(n,Me.ON_ROUTE_DONE),n[Me.ON_PULL_DOWN_REFRESH]=Ge(n,Me.ON_PULL_DOWN_REFRESH),n[Me.ON_REACH_BOTTOM]=Ge(n,Me.ON_REACH_BOTTOM),n[Me.ON_RESIZE]=Ge(n,Me.ON_RESIZE),n[Me.ON_TAB_ITEM_TAP]=Ge(n,Me.ON_TAB_ITEM_TAP),Page(n)},exports.effect=function(t,e){t.effect instanceof zt&&(t=t.effect.fn);const s=new zt(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 $t(t)},exports.getCurrentScope=function(){return Kt},exports.getCurrentWatcher=function(){return se},exports.inject=function(t,e,s=!1){return t in Ie?Ie[t]:arguments.length>1?s&&ye(e)?e():e:void 0},exports.isProxy=It,exports.isReactive=Dt,exports.isReadonly=xt,exports.isRef=Ct,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=he||pe;return t?e.then(t):e},exports.onAddToFavorites=t=>{const e=Ce();if(e&&e.__isInjectedFavoritesHook__){const s=me(Me.ON_ADD_TO_FAVORITES);void 0===e[s]&&(e[s]=t)}},exports.onAppError=Je,exports.onAppHide=ze,exports.onAppShow=Ze,exports.onDetach=ls,exports.onError=hs,exports.onHide=es,exports.onLoad=cs,exports.onMove=us,exports.onPageNotFound=Ke,exports.onPageScroll=t=>{const e=Ce();e&&e.__listenPageScroll__&&ps(e,Me.ON_PAGE_SCROLL,t)},exports.onPullDownRefresh=is,exports.onReachBottom=os,exports.onReady=t=>{const e=Ce();e&&ps(e,Me.ON_READY,t)},exports.onResize=rs,exports.onRouteDone=ns,exports.onSaveExitState=t=>{const e=Ce();if(e&&e.__isInjectedExitStateHook__){const s=me(Me.ON_SAVE_EXIT_STATE);void 0===e[s]&&(e[s]=t)}},exports.onScopeDispose=function(t,e=!1){void 0!==Kt&&(Kt.cleanups[Kt.cleanupsLength++]=t)},exports.onShareAppMessage=t=>{const e=Ce();if(e&&e[Me.ON_SHARE_APP_MESSAGE]&&e.__isInjectedShareToOthersHook__){const s=me(Me.ON_SHARE_APP_MESSAGE);void 0===e[s]&&(e[s]=t)}},exports.onShareTimeline=t=>{const e=Ce();if(e&&e[Me.ON_SHARE_TIMELINE]&&e.__isInjectedShareToTimelineHook__){const s=me(Me.ON_SHARE_TIMELINE);void 0===e[s]&&(e[s]=t)}},exports.onShow=ts,exports.onTabItemTap=as,exports.onThemeChange=qe,exports.onUnhandledRejection=$e,exports.onUnload=ss,exports.onWatcherCleanup=ne,exports.provide=function(t,e){Ie[t]=e},exports.proxyRefs=function(t){return Dt(t)?t:new Proxy(t,Gt)},exports.reactive=Rt,exports.readonly=yt,exports.ref=Ut,exports.shallowReactive=Tt,exports.shallowReadonly=function(t){return mt(t,!0,ut,Ot,Nt)},exports.shallowRef=function(t){return Mt(t)},exports.stop=function(t){t.effect.stop()},exports.toRaw=Lt,exports.toRef=function(t,e,s){return Ct(t)?t:c(t)?new Qt(t):l(t)&&arguments.length>1?Yt(t,e,s):Ut(t)},exports.toRefs=function(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=Yt(t,s);return e},exports.toValue=function(t){return c(t)?t():Wt(t)},exports.triggerRef=kt,exports.unref=Wt,exports.watch=De,exports.watchEffect=function(t,e){return we(t,null,e)},exports.watchPostEffect=function(t,e){return we(t,null,{flush:"post"})},exports.watchSyncEffect=function(t,e){return we(t,null,{flush:"sync"})};
@@ -94,7 +94,7 @@ declare const onReady: (hook: () => unknown) => void;
94
94
  declare const onLoad: (hook: (query: Query) => unknown) => void;
95
95
  declare const onMove: (hook: () => unknown) => void;
96
96
  declare const onDetach: (hook: () => unknown) => void;
97
- declare const onError: (hook: (error: WechatMiniprogram.Error) => unknown) => void;
97
+ declare const onError: (hook: (error: Error) => unknown) => void;
98
98
 
99
99
  export { createApp, defineComponent, definePage, inject, nextTick, onAddToFavorites, onAppError, onAppHide, onAppShow, onDetach, onError, onHide, onLoad, onMove, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, provide, watch, watchEffect, watchPostEffect, watchSyncEffect };
100
100
  export type { AppOptions, AppSetup, Bindings, ComponentContext, ComponentOptions, ComponentSetup, Config, InjectionKey, MultiWatchSources, PageContext, PageOptions, PageSetup, Query, WatchOptions, WatchEffectOptions as WatchOptionsBase };
@@ -1,131 +1,110 @@
1
1
  /*!
2
- * vue-mini v1.2.9
2
+ * vue-mini v1.3.0-beta.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,42 @@ function watch(source, cb, options) {
165
176
  }
166
177
  return doWatch(source, cb, options);
167
178
  }
179
+ class RenderWatcherEffect extends WatcherEffect {
180
+ constructor(source, cb, options, flush) {
181
+ super(source, cb, options);
182
+ this.flush = flush;
183
+ const job = () => {
184
+ if (this.dirty) {
185
+ this.run();
186
+ }
187
+ };
188
+ // Important: mark the job as a watcher callback so that scheduler knows
189
+ // it is allowed to self-trigger (#1727)
190
+ if (cb) {
191
+ this.flags |= EffectFlags.ALLOW_RECURSE;
192
+ job.flags |= SchedulerJobFlags.ALLOW_RECURSE;
193
+ }
194
+ this.job = job;
195
+ }
196
+ notify() {
197
+ const flags = this.flags;
198
+ if (!(flags & EffectFlags.PAUSED)) {
199
+ const flush = this.flush;
200
+ const job = this.job;
201
+ if (flush === 'post') {
202
+ queuePostFlushCb(job);
203
+ }
204
+ else if (flush === 'pre') {
205
+ queueJob(job);
206
+ }
207
+ else {
208
+ job();
209
+ }
210
+ }
211
+ }
212
+ }
168
213
  function doWatch(source, cb, options = EMPTY_OBJ) {
169
- const { immediate, deep, flush, once } = options;
214
+ const { immediate, deep, flush = 'pre', once } = options;
170
215
  if ((process.env.NODE_ENV !== 'production') && !cb) {
171
216
  if (immediate !== undefined) {
172
217
  console.warn(`watch() "immediate" option is only respected when using the ` +
@@ -182,32 +227,22 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
182
227
  }
183
228
  }
184
229
  const baseWatchOptions = extend({}, options);
185
- // Scheduler
186
- if (flush === 'post') {
187
- baseWatchOptions.scheduler = (job) => {
188
- queuePostFlushCb(job);
189
- };
230
+ const effect = new RenderWatcherEffect(source, cb, baseWatchOptions, flush);
231
+ // Initial run
232
+ if (cb) {
233
+ effect.run(true);
190
234
  }
191
- else if (flush !== 'sync') {
192
- baseWatchOptions.scheduler = (job, isFirstRun) => {
193
- if (isFirstRun) {
194
- job();
195
- }
196
- else {
197
- queueJob(job);
198
- }
199
- };
235
+ else if (flush === 'post') {
236
+ queuePostFlushCb(effect.job);
200
237
  }
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;
238
+ else {
239
+ effect.run(true);
240
+ }
241
+ const stop = effect.stop.bind(effect);
242
+ stop.pause = effect.pause.bind(effect);
243
+ stop.resume = effect.resume.bind(effect);
244
+ stop.stop = stop;
245
+ return stop;
211
246
  }
212
247
 
213
248
  const provides = Object.create(null);
@@ -244,28 +279,18 @@ function unsetCurrentApp() {
244
279
  }
245
280
  function setCurrentPage(page) {
246
281
  currentPage = page;
247
- // @ts-expect-error
248
- page.__scope__.on();
282
+ return setCurrentScope(page.__scope__);
249
283
  }
250
- function unsetCurrentPage() {
251
- /* istanbul ignore else -- @preserve */
252
- if (currentPage) {
253
- // @ts-expect-error
254
- currentPage.__scope__.off();
255
- }
284
+ function unsetCurrentPage(scope) {
285
+ setCurrentScope(scope);
256
286
  currentPage = null;
257
287
  }
258
288
  function setCurrentComponent(component) {
259
289
  currentComponent = component;
260
- // @ts-expect-error
261
- component.__scope__.on();
290
+ return setCurrentScope(component.__scope__);
262
291
  }
263
- function unsetCurrentComponent() {
264
- /* istanbul ignore else -- @preserve */
265
- if (currentComponent) {
266
- // @ts-expect-error
267
- currentComponent.__scope__.off();
268
- }
292
+ function unsetCurrentComponent(scope) {
293
+ setCurrentScope(scope);
269
294
  currentComponent = null;
270
295
  }
271
296
 
@@ -403,7 +428,7 @@ function definePage(optionsOrSetup, config) {
403
428
  const originOnLoad = options[PageLifecycle.ON_LOAD];
404
429
  options[PageLifecycle.ON_LOAD] = function (query) {
405
430
  this.__scope__ = new EffectScope();
406
- setCurrentPage(this);
431
+ const scope = setCurrentPage(this);
407
432
  const context = {
408
433
  is: this.is,
409
434
  route: this.route,
@@ -447,7 +472,7 @@ function definePage(optionsOrSetup, config) {
447
472
  this.setData(data, flushPostFlushCbs);
448
473
  }
449
474
  }
450
- unsetCurrentPage();
475
+ unsetCurrentPage(scope);
451
476
  if (originOnLoad !== undefined) {
452
477
  originOnLoad.call(this, query);
453
478
  }
@@ -576,7 +601,7 @@ function defineComponent(optionsOrSetup, config) {
576
601
  options[ComponentLifecycle.ATTACHED];
577
602
  options.lifetimes[ComponentLifecycle.ATTACHED] = function () {
578
603
  this.__scope__ = new EffectScope();
579
- setCurrentComponent(this);
604
+ const scope = setCurrentComponent(this);
580
605
  const rawProps = {};
581
606
  if (properties) {
582
607
  properties.forEach((property) => {
@@ -632,7 +657,7 @@ function defineComponent(optionsOrSetup, config) {
632
657
  this.setData(data, flushPostFlushCbs);
633
658
  }
634
659
  }
635
- unsetCurrentComponent();
660
+ unsetCurrentComponent(scope);
636
661
  if (originAttached !== undefined) {
637
662
  originAttached.call(this);
638
663
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-mini/core",
3
- "version": "1.2.9",
3
+ "version": "1.3.0-beta.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.29",
36
- "miniprogram-api-typings": "~4.0.8"
35
+ "@vue/reactivity": "3.6.0-beta.7",
36
+ "miniprogram-api-typings": "~5.1.1"
37
37
  }
38
38
  }