2021-12-16 19:56:43 +03:00
|
|
|
var __defProp=Object.defineProperty,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__publicField=(e,t,n)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,n),n),PetiteVue=function(e){"use strict";function t(e,t){const n=Object.create(null),s=e.split(",");for(let r=0;r<s.length;r++)n[s[r]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}function n(e){if(p(e)){const t={};for(let s=0;s<e.length;s++){const r=e[s],o=m(r)?i(r):n(r);if(o)for(const e in o)t[e]=o[e]}return t}return m(e)||v(e)?e:void 0}const s=/;(?![^(]*\))/g,r=/:(.+)/;function i(e){const t={};return e.split(s).forEach((e=>{if(e){const n=e.split(r);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function o(e){let t="";if(m(e))t=e;else if(p(e))for(let n=0;n<e.length;n++){const s=o(e[n]);s&&(t+=s+" ")}else if(v(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function c(e,t){if(e===t)return!0;let n=d(e),s=d(t);if(n||s)return!(!n||!s)&&e.getTime()===t.getTime();if(n=p(e),s=p(t),n||s)return!(!n||!s)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=c(e[s],t[s]);return n}(e,t);if(n=v(e),s=v(t),n||s){if(!n||!s)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const s=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(s&&!r||!s&&r||!c(e[n],t[n]))return!1}}return String(e)===String(t)}function l(e,t){return e.findIndex((e=>c(e,t)))}const f=Object.assign,u=Object.prototype.hasOwnProperty,a=(e,t)=>u.call(e,t),p=Array.isArray,h=e=>"[object Map]"===y(e),d=e=>e instanceof Date,m=e=>"string"==typeof e,g=e=>"symbol"==typeof e,v=e=>null!==e&&"object"==typeof e,b=Object.prototype.toString,y=e=>b.call(e),_=e=>m(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,x=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},w=/-(\w)/g,$=x((e=>e.replace(w,((e,t)=>t?t.toUpperCase():"")))),k=/\B([A-Z])/g,O=x((e=>e.replace(k,"-$1").toLowerCase())),S=e=>{const t=parseFloat(e);return isNaN(t)?e:t};function E(e,t){(t=t||undefined)&&t.active&&t.effects.push(e)}const j=e=>{const t=new Set(e);return t.w=0,t.n=0,t},A=e=>(e.w&C)>0,P=e=>(e.n&C)>0,R=new WeakMap;let N=0,C=1;const T=[];let M;const F=Symbol(""),B=Symbol("");class L{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],E(this,n)}run(){if(!this.active)return this.fn();if(!T.includes(this))try{return T.push(M=this),V.push(K),K=!0,C=1<<++N,N<=30?(({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=C})(this):W(this),this.fn()}finally{N<=30&&(e=>{const{deps:t}=e;if(t.length){let n=0;for(let s=0;s<t.length;s++){const r=t[s];A(r)&&!P(r)?r.delete(e):t[n++]=r,r.w&=~C,r.n&=~C}t.length=n}})(this),C=1<<--N,z(),T.pop();const e=T.length;M=e>0?T[e-1]:void 0}}stop(){this.active&&(W(this),this.onStop&&this.onStop(),this.active=!1)}}function W(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}function I(e){e.effect.stop()}let K=!0;const V=[];function z(){const e=V.pop();K=void 0===e||e}function H(e,t,n){if(!K||void 0===M)return;let s=R.get(e);s||R.set(e,s=new Map);let r=s.get(n);r||s.set(n,r=j()),function(e,t){let n=!1;N<=30?P(e)||(e.n|=C,n=!A(e)):n=!e.has(M);n&&(e.add(M),M.deps.push(e))}(r)}function J(e,t,n,s,r,i){const o=R.get(e);if(!o)return;let c=[];if("clear"===t)c=[...o.values()];else if("length"===n&&p(e))o.forEach(((e,t)=>{("length"===t||t>=s)&&c.push(e)}));else switch(void 0!==n&&c.push(o.get(n)),t){case"add":p(e)?_(n)&&c.push(o.get("length")):(c.push(o.get(F)),h(e)&&c.push(o.get(B)));break;case"delete":p(e)||(c.push(o.get(F)),h(e)&&c.push(o.get(B)));break;case"set":h(e)&&c.push(o.get(F))}if(1===c.length)c[0]&&Z(c[0]);else{const e=[];for(const t of c)t&&e.push(...t);Z(j(e))}}function Z(e,t){for(const n of p(e)?e:[...e])(n!==M||n.allowRecurse)&&(n.scheduler?n.scheduler():n.run())}const q=t("__proto__,__v_isRef,__isVue"),D=new Set(Object.getOwnPropertyNames(Symbol).map((e=>Symbol[e])).filter(g)),G=Y(),U=Y(!0),Q=X();function X(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=ue(this);for(let t=0,r=this.length;t
|