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