You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
19 KiB
6 lines
19 KiB
/**
|
|
* @vue/reactivity v3.5.11
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/var VueReactivity=function(e){"use strict";let t,i,s,r,n;let l={},a=()=>{},o=Object.assign,u=(e,t)=>{let i=e.indexOf(t);i>-1&&e.splice(i,1)},c=Object.prototype.hasOwnProperty,h=(e,t)=>c.call(e,t),f=Array.isArray,p=e=>"[object Map]"===b(e),d=e=>"[object Set]"===b(e),_=e=>"function"==typeof e,v=e=>"string"==typeof e,g=e=>"symbol"==typeof e,y=e=>null!==e&&"object"==typeof e,R=Object.prototype.toString,b=e=>R.call(e),w=e=>b(e).slice(8,-1),S=e=>"[object Object]"===b(e),E=e=>v(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,x=(e,t)=>!Object.is(e,t),m=(e,t,i,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:i})};class T{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=t,!e&&t&&(this.index=(t.scopes||(t.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let i=t;try{return t=this,e()}finally{t=i}}}on(){t=this}off(){t=this.parent}stop(e){if(this._active){let t,i;for(t=0,i=this.effects.length;t<i;t++)this.effects[t].stop();for(t=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.scopes)for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}let k=/* @__PURE__ */new WeakSet;class A{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,t&&t.active&&t.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,k.has(this)&&(k.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||O(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,H(this),L(this);let e=i,t=N;i=this,N=!0;try{return this.fn()}finally{j(this),i=e,N=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)W(e);this.deps=this.depsTail=void 0,H(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?k.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){C(this)&&this.run()}get dirty(){return C(this)}}let D=0;function O(e,t=!1){if(e.flags|=8,t){e.next=r,r=e;return}e.next=s,s=e}function I(){let e;if(!(--D>0)){if(r){let e=r;for(r=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;s;){let t=s;for(s=void 0;t;){let i=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=i}}if(e)throw e}}function L(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function j(e){let t;let i=e.depsTail,s=i;for(;s;){let e=s.prevDep;-1===s.version?(s===i&&(i=e),W(s),function(e){let{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=e}e.deps=t,e.depsTail=i}function C(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(P(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function P(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===U))return;e.globalVersion=U;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!C(e)){e.flags&=-3;return}let s=i,r=N;i=e,N=!0;try{L(e);let i=e.fn(e._value);(0===t.version||x(i,e._value))&&(e._value=i,t.version++)}catch(e){throw t.version++,e}finally{i=s,N=r,j(e),e.flags&=-3}}function W(e,t=!1){let{dep:i,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),i.subs===e&&(i.subs=s),!i.subs&&i.computed){i.computed.flags&=-5;for(let e=i.computed.deps;e;e=e.nextDep)W(e,!0)}t||--i.sc||!i.map||i.map.delete(i.key)}let N=!0,V=[];function K(){V.push(N),N=!1}function M(){let e=V.pop();N=void 0===e||e}function H(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=i;i=void 0;try{t()}finally{i=e}}}let U=0;class Y{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class G{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!i||!N||i===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==i)t=this.activeLink=new Y(i,this),i.deps?(t.prevDep=i.depsTail,i.depsTail.nextDep=t,i.depsTail=t):i.deps=i.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let i=t.dep.computed;if(i&&!t.dep.subs){i.flags|=20;for(let t=i.deps;t;t=t.nextDep)e(t)}let s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=i.depsTail,t.nextDep=void 0,i.depsTail.nextDep=t,i.depsTail=t,i.deps===t&&(i.deps=e)}return t}trigger(e){this.version++,U++,this.notify(e)}notify(e){D++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{I()}}}let z=/* @__PURE__ */new WeakMap,F=Symbol(""),B=Symbol(""),q=Symbol("");function J(e,t,s){if(N&&i){let t=z.get(e);t||z.set(e,t=/* @__PURE__ */new Map);let i=t.get(s);i||(t.set(s,i=new G),i.map=t,i.key=s),i.track()}}function Q(e,t,i,s,r,n){let l=z.get(e);if(!l){U++;return}let a=e=>{e&&e.trigger()};if(D++,"clear"===t)l.forEach(a);else{let r=f(e),n=r&&E(i);if(r&&"length"===i){let e=Number(s);l.forEach((t,i)=>{("length"===i||i===q||!g(i)&&i>=e)&&a(t)})}else switch(void 0!==i&&a(l.get(i)),n&&a(l.get(q)),t){case"add":r?n&&a(l.get("length")):(a(l.get(F)),p(e)&&a(l.get(B)));break;case"delete":!r&&(a(l.get(F)),p(e)&&a(l.get(B)));break;case"set":p(e)&&a(l.get(F))}}I()}function X(e){let t=eq(e);return t===e?t:(J(t,"iterate",q),eF(e)?t:t.map(eJ))}function Z(e){return J(e=eq(e),"iterate",q),e}let $={__proto__:null,[Symbol.iterator](){return ee(this,Symbol.iterator,eJ)},concat(...e){return X(this).concat(...e.map(e=>f(e)?X(e):e))},entries(){return ee(this,"entries",e=>(e[1]=eJ(e[1]),e))},every(e,t){return ei(this,"every",e,t,void 0,arguments)},filter(e,t){return ei(this,"filter",e,t,e=>e.map(eJ),arguments)},find(e,t){return ei(this,"find",e,t,eJ,arguments)},findIndex(e,t){return ei(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ei(this,"findLast",e,t,eJ,arguments)},findLastIndex(e,t){return ei(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ei(this,"forEach",e,t,void 0,arguments)},includes(...e){return er(this,"includes",e)},indexOf(...e){return er(this,"indexOf",e)},join(e){return X(this).join(e)},lastIndexOf(...e){return er(this,"lastIndexOf",e)},map(e,t){return ei(this,"map",e,t,void 0,arguments)},pop(){return en(this,"pop")},push(...e){return en(this,"push",e)},reduce(e,...t){return es(this,"reduce",e,t)},reduceRight(e,...t){return es(this,"reduceRight",e,t)},shift(){return en(this,"shift")},some(e,t){return ei(this,"some",e,t,void 0,arguments)},splice(...e){return en(this,"splice",e)},toReversed(){return X(this).toReversed()},toSorted(e){return X(this).toSorted(e)},toSpliced(...e){return X(this).toSpliced(...e)},unshift(...e){return en(this,"unshift",e)},values(){return ee(this,"values",eJ)}};function ee(e,t,i){let s=Z(e),r=s[t]();return s===e||eF(e)||(r._next=r.next,r.next=()=>{let e=r._next();return e.value&&(e.value=i(e.value)),e}),r}let et=Array.prototype;function ei(e,t,i,s,r,n){let l=Z(e),a=l!==e&&!eF(e),o=l[t];if(o!==et[t]){let t=o.apply(e,n);return a?eJ(t):t}let u=i;l!==e&&(a?u=function(t,s){return i.call(this,eJ(t),s,e)}:i.length>2&&(u=function(t,s){return i.call(this,t,s,e)}));let c=o.call(l,u,s);return a&&r?r(c):c}function es(e,t,i,s){let r=Z(e),n=i;return r!==e&&(eF(e)?i.length>3&&(n=function(t,s,r){return i.call(this,t,s,r,e)}):n=function(t,s,r){return i.call(this,t,eJ(s),r,e)}),r[t](n,...s)}function er(e,t,i){let s=eq(e);J(s,"iterate",q);let r=s[t](...i);return(-1===r||!1===r)&&eB(i[0])?(i[0]=eq(i[0]),s[t](...i)):r}function en(e,t,i=[]){K(),D++;let s=eq(e)[t].apply(e,i);return I(),M(),s}let el=/* @__PURE__ *//*! #__NO_SIDE_EFFECTS__ */function(e){let t=/* @__PURE__ */Object.create(null);for(let i of e.split(","))t[i]=1;return e=>e in t}("__proto__,__v_isRef,__isVue"),ea=new Set(/* @__PURE__ */Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(g));function eo(e){g(e)||(e=String(e));let t=eq(this);return J(t,"has",e),t.hasOwnProperty(e)}class eu{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){let s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return i===(s?r?eM:eK:r?eV:eN).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;let n=f(e);if(!s){let e;if(n&&(e=$[t]))return e;if("hasOwnProperty"===t)return eo}let l=Reflect.get(e,t,eX(e)?e:i);return(g(t)?ea.has(t):el(t))?l:(s||J(e,"get",t),r)?l:eX(l)?n&&E(t)?l:l.value:y(l)?s?eU(l):eH(l):l}}class ec extends eu{constructor(e=!1){super(!1,e)}set(e,t,i,s){let r=e[t];if(!this._isShallow){let t=ez(r);if(eF(i)||ez(i)||(r=eq(r),i=eq(i)),!f(e)&&eX(r)&&!eX(i))return!t&&(r.value=i,!0)}let n=f(e)&&E(t)?Number(t)<e.length:h(e,t),l=Reflect.set(e,t,i,eX(e)?e:s);return e===eq(s)&&(n?x(i,r)&&Q(e,"set",t,i):Q(e,"add",t,i)),l}deleteProperty(e,t){let i=h(e,t);e[t];let s=Reflect.deleteProperty(e,t);return s&&i&&Q(e,"delete",t,void 0),s}has(e,t){let i=Reflect.has(e,t);return g(t)&&ea.has(t)||J(e,"has",t),i}ownKeys(e){return J(e,"iterate",f(e)?"length":F),Reflect.ownKeys(e)}}class eh extends eu{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let ef=/* @__PURE__ */new ec,ep=/* @__PURE__ */new eh,ed=/* @__PURE__ */new ec(!0),e_=/* @__PURE__ */new eh(!0),ev=e=>e,eg=e=>Reflect.getPrototypeOf(e);function ey(e,t,i=!1,s=!1){let r=eq(e=e.__v_raw),n=eq(t);i||(x(t,n)&&J(r,"get",t),J(r,"get",n));let{has:l}=eg(r),a=s?ev:i?eQ:eJ;return l.call(r,t)?a(e.get(t)):l.call(r,n)?a(e.get(n)):void(e!==r&&e.get(t))}function eR(e,t=!1){let i=this.__v_raw,s=eq(i),r=eq(e);return t||(x(e,r)&&J(s,"has",e),J(s,"has",r)),e===r?i.has(e):i.has(e)||i.has(r)}function eb(e,t=!1){return e=e.__v_raw,t||J(eq(e),"iterate",F),Reflect.get(e,"size",e)}function ew(e,t=!1){t||eF(e)||ez(e)||(e=eq(e));let i=eq(this);return eg(i).has.call(i,e)||(i.add(e),Q(i,"add",e,e)),this}function eS(e,t,i=!1){i||eF(t)||ez(t)||(t=eq(t));let s=eq(this),{has:r,get:n}=eg(s),l=r.call(s,e);l||(e=eq(e),l=r.call(s,e));let a=n.call(s,e);return s.set(e,t),l?x(t,a)&&Q(s,"set",e,t):Q(s,"add",e,t),this}function eE(e){let t=eq(this),{has:i,get:s}=eg(t),r=i.call(t,e);r||(e=eq(e),r=i.call(t,e)),s&&s.call(t,e);let n=t.delete(e);return r&&Q(t,"delete",e,void 0),n}function ex(){let e=eq(this),t=0!==e.size,i=e.clear();return t&&Q(e,"clear",void 0,void 0),i}function em(e,t){return function(i,s){let r=this,n=r.__v_raw,l=eq(n),a=t?ev:e?eQ:eJ;return e||J(l,"iterate",F),n.forEach((e,t)=>i.call(s,a(e),a(t),r))}}function eT(e,t,i){return function(...s){let r=this.__v_raw,n=eq(r),l=p(n),a="entries"===e||e===Symbol.iterator&&l,o=r[e](...s),u=i?ev:t?eQ:eJ;return t||J(n,"iterate","keys"===e&&l?B:F),{next(){let{value:e,done:t}=o.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function ek(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}let[eA,eD,eO,eI]=/* @__PURE__ */function(){let e={get(e){return ey(this,e)},get size(){return eb(this)},has:eR,add:ew,set:eS,delete:eE,clear:ex,forEach:em(!1,!1)},t={get(e){return ey(this,e,!1,!0)},get size(){return eb(this)},has:eR,add(e){return ew.call(this,e,!0)},set(e,t){return eS.call(this,e,t,!0)},delete:eE,clear:ex,forEach:em(!1,!0)},i={get(e){return ey(this,e,!0)},get size(){return eb(this,!0)},has(e){return eR.call(this,e,!0)},add:ek("add"),set:ek("set"),delete:ek("delete"),clear:ek("clear"),forEach:em(!0,!1)},s={get(e){return ey(this,e,!0,!0)},get size(){return eb(this,!0)},has(e){return eR.call(this,e,!0)},add:ek("add"),set:ek("set"),delete:ek("delete"),clear:ek("clear"),forEach:em(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{e[r]=eT(r,!1,!1),i[r]=eT(r,!0,!1),t[r]=eT(r,!1,!0),s[r]=eT(r,!0,!0)}),[e,i,t,s]}();function eL(e,t){let i=t?e?eI:eO:e?eD:eA;return(t,s,r)=>"__v_isReactive"===s?!e:"__v_isReadonly"===s?e:"__v_raw"===s?t:Reflect.get(h(i,s)&&s in t?i:t,s,r)}let ej={get:/* @__PURE__ */eL(!1,!1)},eC={get:/* @__PURE__ */eL(!1,!0)},eP={get:/* @__PURE__ */eL(!0,!1)},eW={get:/* @__PURE__ */eL(!0,!0)},eN=/* @__PURE__ */new WeakMap,eV=/* @__PURE__ */new WeakMap,eK=/* @__PURE__ */new WeakMap,eM=/* @__PURE__ */new WeakMap;function eH(e){return ez(e)?e:eY(e,!1,ef,ej,eN)}function eU(e){return eY(e,!0,ep,eP,eK)}function eY(e,t,i,s,r){if(!y(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let n=r.get(e);if(n)return n;let l=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(w(e));if(0===l)return e;let a=new Proxy(e,2===l?s:i);return r.set(e,a),a}function eG(e){return ez(e)?eG(e.__v_raw):!!(e&&e.__v_isReactive)}function ez(e){return!!(e&&e.__v_isReadonly)}function eF(e){return!!(e&&e.__v_isShallow)}function eB(e){return!!e&&!!e.__v_raw}function eq(e){let t=e&&e.__v_raw;return t?eq(t):e}let eJ=e=>y(e)?eH(e):e,eQ=e=>y(e)?eU(e):e;function eX(e){return!!e&&!0===e.__v_isRef}function eZ(e){return e$(e,!1)}function e$(e,t){return eX(e)?e:new e0(e,t)}class e0{constructor(e,t){this.dep=new G,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:eq(e),this._value=t?e:eJ(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,i=this.__v_isShallow||eF(e)||ez(e);x(e=i?e:eq(e),t)&&(this._rawValue=e,this._value=i?e:eJ(e),this.dep.trigger())}}function e1(e){return eX(e)?e.value:e}let e2={get:(e,t,i)=>"__v_raw"===t?e:e1(Reflect.get(e,t,i)),set:(e,t,i,s)=>{let r=e[t];return eX(r)&&!eX(i)?(r.value=i,!0):Reflect.set(e,t,i,s)}};class e4{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new G,{get:i,set:s}=e(t.track.bind(t),t.trigger.bind(t));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}class e3{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let i=z.get(e);return i&&i.get(t)}(eq(this._object),this._key)}}class e6{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function e8(e,t,i){let s=e[t];return eX(s)?s:new e3(e,t,i)}class e5{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new G(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=U-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(8&this.flags)&&i!==this)return O(this,!0),!0}get value(){let e=this.dep.track();return P(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let e9={},e7=/* @__PURE__ */new WeakMap;function te(e,t=!1,i=n){if(i){let t=e7.get(i);t||e7.set(i,t=[]),t.push(e)}}function tt(e,t=1/0,i){if(t<=0||!y(e)||e.__v_skip||(i=i||/* @__PURE__ */new Set).has(e))return e;if(i.add(e),t--,eX(e))tt(e.value,t,i);else if(f(e))for(let s=0;s<e.length;s++)tt(e[s],t,i);else if(d(e)||p(e))e.forEach(e=>{tt(e,t,i)});else if(S(e)){for(let s in e)tt(e[s],t,i);for(let s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&tt(e[s],t,i)}return e}return e.ARRAY_ITERATE_KEY=q,e.EffectFlags={ACTIVE:1,1:"ACTIVE",RUNNING:2,2:"RUNNING",TRACKING:4,4:"TRACKING",NOTIFIED:8,8:"NOTIFIED",DIRTY:16,16:"DIRTY",ALLOW_RECURSE:32,32:"ALLOW_RECURSE",PAUSED:64,64:"PAUSED"},e.EffectScope=T,e.ITERATE_KEY=F,e.MAP_KEY_ITERATE_KEY=B,e.ReactiveEffect=A,e.ReactiveFlags={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"},e.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},e.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},e.WatchErrorCodes={WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP"},e.computed=function(e,t,i=!1){let s,r;return _(e)?s=e:(s=e.get,r=e.set),new e5(s,r,i)},e.customRef=function(e){return new e4(e)},e.effect=function(e,t){e.effect instanceof A&&(e=e.effect.fn);let i=new A(e);t&&o(i,t);try{i.run()}catch(e){throw i.stop(),e}let s=i.run.bind(i);return s.effect=i,s},e.effectScope=function(e){return new T(e)},e.enableTracking=function(){V.push(N),N=!0},e.getCurrentScope=function(){return t},e.getCurrentWatcher=function(){return n},e.isProxy=eB,e.isReactive=eG,e.isReadonly=ez,e.isRef=eX,e.isShallow=eF,e.markRaw=function(e){return!h(e,"__v_skip")&&Object.isExtensible(e)&&m(e,"__v_skip",!0),e},e.onEffectCleanup=function(e,t=!1){i instanceof A&&(i.cleanup=e)},e.onScopeDispose=function(e,i=!1){t&&t.cleanups.push(e)},e.onWatcherCleanup=te,e.pauseTracking=K,e.proxyRefs=function(e){return eG(e)?e:new Proxy(e,e2)},e.reactive=eH,e.reactiveReadArray=X,e.readonly=eU,e.ref=eZ,e.resetTracking=M,e.shallowReactive=function(e){return eY(e,!1,ed,eC,eV)},e.shallowReadArray=Z,e.shallowReadonly=function(e){return eY(e,!0,e_,eW,eM)},e.shallowRef=function(e){return e$(e,!0)},e.stop=function(e){e.effect.stop()},e.toRaw=eq,e.toReactive=eJ,e.toReadonly=eQ,e.toRef=function(e,t,i){return eX(e)?e:_(e)?new e6(e):y(e)&&arguments.length>1?e8(e,t,i):eZ(e)},e.toRefs=function(e){let t=f(e)?Array(e.length):{};for(let i in e)t[i]=e8(e,i);return t},e.toValue=function(e){return _(e)?e():e1(e)},e.track=J,e.traverse=tt,e.trigger=Q,e.triggerRef=function(e){e.dep&&e.dep.trigger()},e.unref=e1,e.watch=function(e,i,s=l){let r,o,c,h;let{immediate:p,deep:d,once:v,scheduler:g,augmentJob:y,call:R}=s,b=e=>d?e:eF(e)||!1===d||0===d?tt(e,1):tt(e),w=!1,S=!1;if(eX(e)?(o=()=>e.value,w=eF(e)):eG(e)?(o=()=>b(e),w=!0):f(e)?(S=!0,w=e.some(e=>eG(e)||eF(e)),o=()=>e.map(e=>eX(e)?e.value:eG(e)?b(e):_(e)?R?R(e,2):e():void 0)):o=_(e)?i?R?()=>R(e,2):e:()=>{if(c){K();try{c()}finally{M()}}let t=n;n=r;try{return R?R(e,3,[h]):e(h)}finally{n=t}}:a,i&&d){let e=o,t=!0===d?1/0:d;o=()=>tt(e(),t)}let E=t,m=()=>{r.stop(),E&&u(E.effects,r)};if(v&&i){let e=i;i=(...t)=>{e(...t),m()}}let T=S?Array(e.length).fill(e9):e9,k=e=>{if(1&r.flags&&(r.dirty||e)){if(i){let e=r.run();if(d||w||(S?e.some((e,t)=>x(e,T[t])):x(e,T))){c&&c();let t=n;n=r;try{let t=[e,T===e9?void 0:S&&T[0]===e9?[]:T,h];R?R(i,3,t):i(...t),T=e}finally{n=t}}}else r.run()}};return y&&y(k),(r=new A(o)).scheduler=g?()=>g(k,!1):k,h=e=>te(e,!1,r),c=r.onStop=()=>{let e=e7.get(r);if(e){if(R)R(e,4);else for(let t of e)t();e7.delete(r)}},i?p?k(!0):T=r.run():g?g(k.bind(null,!0),!0):r.run(),m.pause=r.pause.bind(r),m.resume=r.resume.bind(r),m.stop=m,m},e}({});
|