2025-07-08 17:21:25 +08:00
|
|
|
**/var VueReactivity=function(e){"use strict";let t,i,s,r,n,l={},o=()=>{},a=Object.assign,u=Object.prototype.hasOwnProperty,c=(e,t)=>u.call(e,t),f=Array.isArray,h=e=>"[object Map]"===v(e),p=e=>"symbol"==typeof e,d=e=>null!==e&&"object"==typeof e,_=Object.prototype.toString,v=e=>_.call(e),g=e=>"string"==typeof e&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,y=(e,t)=>!Object.is(e,t);class R{constructor(e=!1){this.detached=e,this._active=!0,this._on=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(){1==++this._on&&(this.prevScope=t,t=this)}off(){this._on>0&&0==--this._on&&(t=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}}}let b=new WeakSet;class w{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,b.has(this)&&(b.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||E(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,C(this),T(this);let e=i,t=O;i=this,O=!0;try{return this.fn()}finally{m(this),i=e,O=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)D(e);this.deps=this.depsTail=void 0,C(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?b.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){A(this)&&this.run()}get dirty(){return A(this)}}let S=0;function E(e,t=!1){if(e.flags|=8,t){e.next=r,r=e;return}e.next=s,s=e}function x(){let e;if(!(--S>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 T(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function m(e){let t,i=e.depsTail,s=i;for(;s;){let e=s.prevDep;-1===s.version?(s===i&&(i=e),D(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 A(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(k(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function k(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===P)||(e.globalVersion=P,!e.isSSR&&128&e.flags&&(!e.deps&&!e._dirty||!A(e))))return;e.flags|=2;let t=e.dep,s=i,r=O;i=e,O=!0;try{T(e);let i=e.fn(e._value);(0===t.version||y(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(e){throw t.version++,e}finally{i=s,O=r,m(e),e.flags&=-3}}function D(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.computed.flags&=-5;for(let e=i.computed.deps;e;e=e.nextDep)D(e,!0)}t||--i.sc||!i.map||i.map.delete(i.key)}let O=!0,I=[];function L(){I.push(O),O=!1}function j(){let e=I.pop();O=void 0===e||e}func
|