2 lines
65 KiB
JavaScript
2 lines
65 KiB
JavaScript
|
|
function e(e,n){const t=Object.create(null),o=e.split(",");for(let s=0;s<o.length;s++)t[o[s]]=!0;return n?e=>!!t[e.toLowerCase()]:e=>!!t[e]}const n=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt");function t(e){if(F(e)){const n={};for(let o=0;o<e.length;o++){const s=e[o],r=R(s)?l(s):t(s);if(r)for(const e in r)n[e]=r[e]}return n}return R(e)||j(e)?e:void 0}const o=/;(?![^(]*\))/g,s=/:([^]+)/,r=/\/\*.*?\*\//gs;function l(e){const n={};return e.replace(r,"").split(o).forEach((e=>{if(e){const t=e.split(s);t.length>1&&(n[t[0].trim()]=t[1].trim())}})),n}function i(e){let n="";if(R(e))n=e;else if(F(e))for(let t=0;t<e.length;t++){const o=i(e[t]);o&&(n+=o+" ")}else if(j(e))for(const t in e)e[t]&&(n+=t+" ");return n.trim()}function c(e){if(!e)return null;let{class:n,style:o}=e;return n&&!R(n)&&(e.class=i(n)),o&&(e.style=t(o)),e}const a=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function u(e){return!!e||""===e}function f(e,n){if(e===n)return!0;let t=A(e),o=A(n);if(t||o)return!(!t||!o)&&e.getTime()===n.getTime();if(t=I(e),o=I(n),t||o)return e===n;if(t=F(e),o=F(n),t||o)return!(!t||!o)&&function(e,n){if(e.length!==n.length)return!1;let t=!0;for(let o=0;t&&o<e.length;o++)t=f(e[o],n[o]);return t}(e,n);if(t=j(e),o=j(n),t||o){if(!t||!o)return!1;if(Object.keys(e).length!==Object.keys(n).length)return!1;for(const t in e){const o=e.hasOwnProperty(t),s=n.hasOwnProperty(t);if(o&&!s||!o&&s||!f(e[t],n[t]))return!1}}return String(e)===String(n)}function p(e,n){return e.findIndex((e=>f(e,n)))}const d=e=>R(e)?e:null==e?"":F(e)||j(e)&&(e.toString===M||!T(e.toString))?JSON.stringify(e,h,2):String(e),h=(e,n)=>n&&n.__v_isRef?h(e,n.value):O(n)?{[`Map(${n.size})`]:[...n.entries()].reduce(((e,[n,t])=>(e[`${n} =>`]=t,e)),{})}:E(n)?{[`Set(${n.size})`]:[...n.values()]}:!j(n)||F(n)||U(n)?n:String(n),g={},v=[],m=()=>{},y=()=>!1,_=/^on[^a-z]/,b=e=>_.test(e),x=e=>e.startsWith("onUpdate:"),C=Object.assign,w=(e,n)=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)},k=Object.prototype.hasOwnProperty,S=(e,n)=>k.call(e,n),F=Array.isArray,O=e=>"[object Map]"===P(e),E=e=>"[object Set]"===P(e),A=e=>"[object Date]"===P(e),T=e=>"function"==typeof e,R=e=>"string"==typeof e,I=e=>"symbol"==typeof e,j=e=>null!==e&&"object"==typeof e,B=e=>j(e)&&T(e.then)&&T(e.catch),M=Object.prototype.toString,P=e=>M.call(e),V=e=>P(e).slice(8,-1),U=e=>"[object Object]"===P(e),L=e=>R(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,$=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),N=e=>{const n=Object.create(null);return t=>n[t]||(n[t]=e(t))},D=/-(\w)/g,H=N((e=>e.replace(D,((e,n)=>n?n.toUpperCase():"")))),z=/\B([A-Z])/g,W=N((e=>e.replace(z,"-$1").toLowerCase())),K=N((e=>e.charAt(0).toUpperCase()+e.slice(1))),G=N((e=>e?`on${K(e)}`:"")),q=(e,n)=>!Object.is(e,n),Y=(e,n)=>{for(let t=0;t<e.length;t++)e[t](n)},J=(e,n,t)=>{Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value:t})},Z=e=>{const n=parseFloat(e);return isNaN(n)?e:n};let Q;let X;class ee{constructor(e=!1){this.detached=e,this.active=!0,this.effects=[],this.cleanups=[],this.parent=X,!e&&X&&(this.index=(X.scopes||(X.scopes=[])).push(this)-1)}run(e){if(this.active){const n=X;try{return X=this,e()}finally{X=n}}}on(){X=this}off(){X=this.parent}stop(e){if(this.active){let n,t;for(n=0,t=this.effects.length;n<t;n++)this.effects[n].stop();for(n=0,t=this.cleanups.length;n<t;n++)this.cleanups[n]();if(this.scopes)for(n=0,t=this.scopes.length;n<t;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!e){const 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 ne(e){return new ee(e)}function te(e,n=X){n&&n.active&&n.effects.push(e)}function oe(){return X}function se(e){X&&X.cleanups.push(e)}const re=e=>{const n=new Set(e);return n.w=0,n.n=0,n},le=e=>(e.w&ue)>0,ie=e=>(e.n&ue)>0,ce=new WeakM
|