6 lines
19 KiB
JavaScript
6 lines
19 KiB
JavaScript
|
|
/**
|
||
|
|
* @vue/reactivity v3.5.25
|
||
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
|
|
* @license MIT
|
||
|
|
**/let e,t,i,s,r;let n={},l=()=>{},o=Object.assign,a=Object.prototype.hasOwnProperty,u=Array.isArray,c=e=>"symbol"==typeof e,h=e=>null!==e&&"object"==typeof e,f=Object.prototype.toString,p=e=>"string"==typeof e&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e;class _{constructor(t=!1){this.detached=t,this._active=!0,this._on=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(){1==++this._on&&(this.prevScope=e,e=this)}off(){this._on>0&&0==--this._on&&(e=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){let t,i;for(t=0,this._active=!1,i=this.effects.length;t<i;t++)this.effects[t].stop();for(t=0,this.effects.length=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].stop(!0);this.scopes.length=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}}}function d(e){return new _(e)}function v(){return e}function g(t,i=!1){e&&e.cleanups.push(t)}let y={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",EVALUATED:128,128:"EVALUATED"},b=new WeakSet;class w{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,e&&e.active&&e.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,b.has(this)&&(b.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||S(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,N(this),x(this);let e=t,i=j;t=this,j=!0;try{return this.fn()}finally{k(this),t=e,j=i,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)A(e);this.deps=this.depsTail=void 0,N(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?b.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){T(this)&&this.run()}get dirty(){return T(this)}}let R=0;function S(e,t=!1){if(e.flags|=8,t){e.next=s,s=e;return}e.next=i,i=e}function E(){let e;if(!(--R>0)){if(s){let e=s;for(s=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;i;){let t=i;for(i=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 x(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function k(e){let t,i=e.depsTail,s=i;for(;s;){let e=s.prevDep;-1===s.version?(s===i&&(i=e),A(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 T(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(m(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function m(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===M)||(e.globalVersion=M,!e.isSSR&&128&e.flags&&(!e.deps&&!e._dirty||!T(e))))return;e.flags|=2;let i=e.dep,s=t,r=j;t=e,j=!0;try{let t;x(e);let s=e.fn(e._value);(0===i.version||(t=e._value,!Object.is(s,t)))&&(e.flags|=128,e._value=s,i.version++)}catch(e){throw i.version++,e}finally{t=s,j=r,k(e),e.flags&=-3}}function A(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,!s&&i.computed)){i.comput
|