my-idlers/node_modules/@vue/reactivity/dist/reactivity.global.prod.js

2 lines
8.9 KiB
JavaScript
Raw Normal View History

var VueReactivity=function(t){"use strict";function e(t,e){const n=Object.create(null),r=t.split(",");for(let s=0;s<r.length;s++)n[r[s]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const n={},r=()=>{},s=Object.assign,i=Object.prototype.hasOwnProperty,o=(t,e)=>i.call(t,e),c=Array.isArray,u=t=>"[object Map]"===_(t),a=t=>"function"==typeof t,l=t=>"symbol"==typeof t,f=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,_=t=>h.call(t),d=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,v=(t,e)=>t!==e&&(t==t||e==e),g=new WeakMap,p=[];let y;const w=Symbol(""),R=Symbol("");function b(t,e=n){(function(t){return t&&!0===t._isEffect})(t)&&(t=t.raw);const r=function(t,e){const n=function(){if(!n.active)return t();if(!p.includes(n)){E(n);try{return O(),p.push(n),y=n,t()}finally{p.pop(),P(),y=p[p.length-1]}}};return n.id=k++,n.allowRecurse=!!e.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=t,n.deps=[],n.options=e,n}(t,e);return e.lazy||r(),r}let k=0;function E(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let m=!0;const S=[];function j(){S.push(m),m=!1}function O(){S.push(m),m=!0}function P(){const t=S.pop();m=void 0===t||t}function M(t,e,n){if(!m||void 0===y)return;let r=g.get(t);r||g.set(t,r=new Map);let s=r.get(n);s||r.set(n,s=new Set),s.has(y)||(s.add(y),y.deps.push(s))}function x(t,e,n,r,s,i){const o=g.get(t);if(!o)return;const a=new Set,l=t=>{t&&t.forEach((t=>{(t!==y||t.allowRecurse)&&a.add(t)}))};if("clear"===e)o.forEach(l);else if("length"===n&&c(t))o.forEach(((t,e)=>{("length"===e||e>=r)&&l(t)}));else switch(void 0!==n&&l(o.get(n)),e){case"add":c(t)?d(n)&&l(o.get("length")):(l(o.get(w)),u(t)&&l(o.get(R)));break;case"delete":c(t)||(l(o.get(w)),u(t)&&l(o.get(R)));break;case"set":u(t)&&l(o.get(w))}a.forEach((t=>{t.options.scheduler?t.options.scheduler(t):t()}))}const z=e("__proto__,__v_isRef,__isVue"),W=new Set(Object.getOwnPropertyNames(Symbol).map((t=>Symbol[t])).filter(l)),A=B(),T=B(!1,!0),V=B(!0),N=B(!0,!0),I=K();function K(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=St(this);for(let e=0,s=this.length;e<s;e++)M(n,0,e+"");const r=n[e](...t);return-1===r||!1===r?n[e](...t.map(St)):r}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){j();const n=St(this)[e].apply(this,t);return P(),n}})),t}function B(t=!1,e=!1){return function(n,r,s){if("__v_isReactive"===r)return!t;if("__v_isReadonly"===r)return t;if("__v_raw"===r&&s===(t?e?yt:pt:e?gt:vt).get(n))return n;const i=c(n);if(!t&&i&&o(I,r))return Reflect.get(I,r,s);const u=Reflect.get(n,r,s);if(l(r)?W.has(r):z(r))return u;if(t||M(n,0,r),e)return u;if(Ot(u)){return!i||!d(r)?u.value:u}return f(u)?t?bt(u):Rt(u):u}}function C(t=!1){return function(e,n,r,s){let i=e[n];if(!t&&(r=St(r),i=St(i),!c(e)&&Ot(i)&&!Ot(r)))return i.value=r,!0;const u=c(e)&&d(n)?Number(n)<e.length:o(e,n),a=Reflect.set(e,n,r,s);return e===St(s)&&(u?v(r,i)&&x(e,"set",n,r):x(e,"add",n,r)),a}}const L={get:A,set:C(),deleteProperty:function(t,e){const n=o(t,e),r=Reflect.deleteProperty(t,e);return r&&n&&x(t,"delete",e,void 0),r},has:function(t,e){const n=Reflect.has(t,e);return l(e)&&W.has(e)||M(t,0,e),n},ownKeys:function(t){return M(t,0,c(t)?"length":w),Reflect.ownKeys(t)}},Y={get:V,set:(t,e)=>!0,deleteProperty:(t,e)=>!0},q=s({},L,{get:T,set:C(!0)}),D=s({},Y,{get:N}),F=t=>f(t)?Rt(t):t,G=t=>f(t)?bt(t):t,H=t=>t,J=t=>Reflect.getPrototypeOf(t);function Q(t,e,n=!1,r=!1){const s=St(t=t.__v_raw),i=St(e);e!==i&&!n&&M(s,0,e),!n&&M(s,0,i);const{has:o}=J(s),c=r?H:n?G:F;return o.call(s,e)?c(t.get(e)):o.call(s,i)?c(t.get(i)):void(t!==s&&t.get(e))}function U(t,e=!1){const n=this.__v_raw,r=St(n),s=St(t);return t!==s&&!e&&M(r,0,t),!e&&M(r,0,s),t===s?n.has(t):n.has(t)||n.has(s)}function X(t,e=!1){return t=t.__v_raw,!e&&M(St(t),0,w),Reflect.get(t,"size",t)}function Z(t){t=St(t);const e=St(this);return J(e).has.call(e,t)||(e.add(t),x(e,"add",t,t)),this}function $(t,e){e=St(e);const n=St(this),{has:r,get:s}=J(n);let i=r.call(n,t);i||(t=St(t),i=r.call(n,t));const o=s.call(n,t);return n.set(t,e),