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

1 month ago
/**
* @vue/reactivity v3.5.5
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */let e,t,i,s;let r={},n=()=>{},l=Object.assign,a=(e,t)=>{let i=e.indexOf(t);i>-1&&e.splice(i,1)},o=Object.prototype.hasOwnProperty,u=(e,t)=>o.call(e,t),c=Array.isArray,f=e=>"[object Map]"===y(e),h=e=>"[object Set]"===y(e),p=e=>"function"==typeof e,d=e=>"string"==typeof e,_=e=>"symbol"==typeof e,v=e=>null!==e&&"object"==typeof e,g=Object.prototype.toString,y=e=>g.call(e),R=e=>y(e).slice(8,-1),b=e=>"[object Object]"===y(e),w=e=>d(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,S=(e,t)=>!Object.is(e,t),E=(e,t,i,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:i})};class x{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=e,!t&&e&&(this.index=(e.scopes||(e.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(t){if(this._active){let i=e;try{return e=this,t()}finally{e=i}}}on(){e=this}off(){e=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}}}function T(e){return new x(e)}function m(){return e}function A(t,i=!1){e&&e.cleanups.push(t)}let k={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"},D=/* @__PURE__ */new WeakSet;class O{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,e&&e.active&&e.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,D.has(this)&&(D.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||(this.flags|=8,this.nextEffect=i,i=this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,F(this),j(this);let e=t,i=M;t=this,M=!0;try{return this.fn()}finally{C(this),t=e,M=i,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)N(e);this.deps=this.depsTail=void 0,F(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?D.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){P(this)&&this.run()}get dirty(){return P(this)}}let I=0;function L(){let e;if(!(--I>0)){for(;i;){let t=i;for(i=void 0;t;){let i=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=i}}if(e)throw e}}function j(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function C(e){let t;let i=e.depsTail,s=i;for(;s;){let e=s.prevDep;-1===s.version?(s===i&&(i=e),N(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 P(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&W(t.dep.computed)||t.dep.version!==t.version)return!0;return!!e._dirty}function W(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===B))return;e.globalVersion=B;let i=e.dep;if(e.flags|=2,i.version>0&&!e.isSSR&&!P(e)){e.flags&=-3;return}let s=t,r=M;t=e,M=!0;try{j(e);let t=e.fn(e._value);(0===i.version||S(t,e._value))&&(e._value=t,i.version++)}catch(e){throw i.version++,e}finally{t=s,M=r,C(e),e.flags&=-3}}function N(e){let{dep:t,prevSub:i,nextSub:s}=e;if(i&&(i.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=i,