mirror of
https://github.com/silenty4ng/k5web
synced 2024-11-14 14:33:23 +00:00
100 lines
24 KiB
JavaScript
100 lines
24 KiB
JavaScript
import{w as N,a1 as Pe,a2 as sr,Q as or,P as Ee,a3 as Te,a4 as lr,a5 as ur,J as z,a6 as cr,a7 as fr,a8 as vr,a9 as dr,aa as xe,V as gr,E as hr,ab as mr,O as yr,z as Ie,ac as Le,M as R,K as Me,ad as le,ae as pr,af as _r,y as Fe,ag as br,ah as Ne,ai as Cr,aj as wr,B as Ar}from"./index.be7548bc.js";import{c as d,d as ne,o as ae,g as Or,n as Sr,aI as m,f as H,w as Re,t as $r,bB as G,bD as ue,r as Pr,h as Er,b4 as Tr}from"./arco.f43727df.js";/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function J(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=new Array(r);n<r;n++)a[n]=e[n];return a}function De(e,r){if(!!e){if(typeof e=="string")return J(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,r)}}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function xr(e){if(Array.isArray(e))return J(e)}function Ir(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Lr(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q(e){return xr(e)||Ir(e)||De(e)||Lr()}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Mr(e,r){if(N(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r||"default");if(N(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Fr(e){var r=Mr(e,"string");return N(r)=="symbol"?r:r+""}function F(e,r,n){return r=Fr(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Nr="__lodash_hash_undefined__";function Rr(e){return this.__data__.set(e,Nr),this}var Dr=Rr;function zr(e){return this.__data__.has(e)}var Gr=zr,Kr=Pe,qr=Dr,Br=Gr;function U(e){var r=-1,n=e==null?0:e.length;for(this.__data__=new Kr;++r<n;)this.add(e[r])}U.prototype.add=U.prototype.push=qr;U.prototype.has=Br;var Hr=U;function Ur(e,r){return e.has(r)}var Wr=Ur;/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Xr(e){var r=-1,n=Array(e.size);return e.forEach(function(a){n[++r]=a}),n}var Zr=Xr;/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function jr(e,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(e[n],n,e))return!0;return!1}var Yr=jr,Jr=Hr,Qr=Yr,Vr=Wr,kr=1,en=2;function rn(e,r,n,a,t,i){var s=n&kr,o=e.length,l=r.length;if(o!=l&&!(s&&l>o))return!1;var u=i.get(e),c=i.get(r);if(u&&c)return u==r&&c==e;var f=-1,v=!0,p=n&en?new Jr:void 0;for(i.set(e,r),i.set(r,e);++f<o;){var g=e[f],h=r[f];if(a)var b=s?a(h,g,f,r,e,i):a(g,h,f,e,r,i);if(b!==void 0){if(b)continue;v=!1;break}if(p){if(!Qr(r,function(C,w){if(!Vr(p,w)&&(g===C||t(g,C,n,a,i)))return p.push(w)})){v=!1;break}}else if(!(g===h||t(g,h,n,a,i))){v=!1;break}}return i.delete(e),i.delete(r),v}var ze=rn;function nn(e){var r=-1,n=Array(e.size);return e.forEach(function(a,t){n[++r]=[t,a]}),n}var an=nn,ce=or,fe=cr,tn=fr,sn=ze,on=an,ln=Zr,un=1,cn=2,fn="[object Boolean]",vn="[object Date]",dn="[object Error]",gn="[object Map]",hn="[object Number]",mn="[object RegExp]",yn="[object Set]",pn="[object String]",_n="[object Symbol]",bn="[object ArrayBuffer]",Cn="[object DataView]",ve=ce?ce.prototype:void 0,Z=ve?ve.valueOf:void 0;function wn(e,r,n,a,t,i,s){switch(n){case Cn:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case bn:return!(e.byteLength!=r.byteLength||!i(new fe(e),new fe(r)));case fn:case vn:case hn:return tn(+e,+r);case dn:return e.name==r.name&&e.message==r.message;case mn:case pn:return e==r+"";case gn:var o=on;case yn:var l=a&un;if(o||(o=ln),e.size!=r.size&&!l)return!1;var u=s.get(e);if(u)return u==r;a|=cn,s.set(e,r);var c=sn(o(e),o(r),a,t,i,s);return s.delete(e),c;case _n:if(Z)return Z.call(e)==Z.call(r)}return!1}var An=wn,de=vr,On=1,Sn=Object.prototype,$n=Sn.hasOwnProperty;function Pn(e,r,n,a,t,i){var s=n&On,o=de(e),l=o.length,u=de(r),c=u.length;if(l!=c&&!s)return!1;for(var f=l;f--;){var v=o[f];if(!(s?v in r:$n.call(r,v)))return!1}var p=i.get(e),g=i.get(r);if(p&&g)return p==r&&g==e;var h=!0;i.set(e,r),i.set(r,e);for(var b=s;++f<l;){v=o[f];var C=e[v],w=r[v];if(a)var O=s?a(w,C,v,r,e,i):a(C,w,v,e,r,i);if(!(O===void 0?C===w||t(C,w,n,a,i):O)){h=!1;break}b||(b=v=="constructor")}if(h&&!b){var P=e.constructor,S=r.constructor;P!=S&&"constructor"in e&&"constructor"in r&&!(typeof P=="function"&&P instanceof P&&typeof S=="function"&&S instanceof S)&&(h=!1)}return i.delete(e),i.delete(r),h}var En=Pn,j=Te,Tn=ze,xn=An,In=En,ge=lr,he=z,me=sr.exports,Ln=ur,Mn=1,ye="[object Arguments]",pe="[object Array]",K="[object Object]",Fn=Object.prototype,_e=Fn.hasOwnProperty;function Nn(e,r,n,a,t,i){var s=he(e),o=he(r),l=s?pe:ge(e),u=o?pe:ge(r);l=l==ye?K:l,u=u==ye?K:u;var c=l==K,f=u==K,v=l==u;if(v&&me(e)){if(!me(r))return!1;s=!0,c=!1}if(v&&!c)return i||(i=new j),s||Ln(e)?Tn(e,r,n,a,t,i):xn(e,r,l,n,a,t,i);if(!(n&Mn)){var p=c&&_e.call(e,"__wrapped__"),g=f&&_e.call(r,"__wrapped__");if(p||g){var h=p?e.value():e,b=g?r.value():r;return i||(i=new j),t(h,b,n,a,i)}}return v?(i||(i=new j),In(e,r,n,a,t,i)):!1}var Rn=Nn,Dn=Rn,be=Ee;function Ge(e,r,n,a,t){return e===r?!0:e==null||r==null||!be(e)&&!be(r)?e!==e&&r!==r:Dn(e,r,n,a,Ge,t)}var te=Ge,zn=te;function Gn(e,r){return zn(e,r)}var Kn=Gn;/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var qn=z,Bn=xe,Hn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Un=/^\w*$/;function Wn(e,r){if(qn(e))return!1;var n=N(e);return n=="number"||n=="symbol"||n=="boolean"||e==null||Bn(e)?!0:Un.test(e)||!Hn.test(e)||r!=null&&e in Object(r)}var ie=Wn,Ke=Pe,Xn="Expected a function";function se(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(Xn);var n=function a(){var t=arguments,i=r?r.apply(this,t):t[0],s=a.cache;if(s.has(i))return s.get(i);var o=e.apply(this,t);return a.cache=s.set(i,o)||s,o};return n.cache=new(se.Cache||Ke),n}se.Cache=Ke;var Zn=se,jn=Zn,Yn=500;function Jn(e){var r=jn(e,function(a){return n.size===Yn&&n.clear(),a}),n=r.cache;return r}var Qn=Jn,Vn=Qn,kn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ea=/\\(\\)?/g,ra=Vn(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(kn,function(n,a,t,i){r.push(t?i.replace(ea,"$1"):a||n)}),r}),na=ra,aa=z,ta=ie,ia=na,sa=dr;function oa(e,r){return aa(e)?e:ta(e,r)?[e]:ia(sa(e))}var qe=oa,la=xe,ua=1/0;function ca(e){if(typeof e=="string"||la(e))return e;var r=e+"";return r=="0"&&1/e==-ua?"-0":r}var W=ca,fa=qe,va=W;function da(e,r){r=fa(r,e);for(var n=0,a=r.length;e!=null&&n<a;)e=e[va(r[n++])];return n&&n==a?e:void 0}var Be=da;/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var ga=Be;function ha(e,r,n){var a=e==null?void 0:ga(e,r);return a===void 0?n:a}var ma=ha;/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function ya(e,r){return e!=null&&r in Object(e)}var pa=ya,_a=qe,ba=gr,Ca=z,wa=hr,Aa=mr,Oa=W;function Sa(e,r,n){r=_a(r,e);for(var a=-1,t=r.length,i=!1;++a<t;){var s=Oa(r[a]);if(!(i=e!=null&&n(e,s)))break;e=e[s]}return i||++a!=t?i:(t=e==null?0:e.length,!!t&&Aa(t)&&wa(s,t)&&(Ca(e)||ba(e)))}var $a=Sa,Pa=pa,Ea=$a;function Ta(e,r){return e!=null&&Ea(e,r,Pa)}var xa=Ta;/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Ia(e){return function(r){return r==null?void 0:r[e]}}var La=Ia;/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Ma(e){if(Array.isArray(e))return e}function Fa(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,t,i,s,o=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,r===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(o.push(a.value),o.length!==r);l=!0);}catch(c){u=!0,t=c}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw t}}return o}}function Na(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ra(e,r){return Ma(e)||Fa(e,r)||De(e,r)||Na()}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Ce(e,r){var n=Object.keys(r);n.forEach(function(a){e.style[a]=r[a]})}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Da=yr,za=Ee,Ga="[object Number]";function Ka(e){return typeof e=="number"||za(e)&&Da(e)==Ga}var qa=Ka;/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function He(){if(typeof navigator>"u"||!navigator)return Number.MAX_SAFE_INTEGER;var e=navigator,r=e.userAgent,n=r.indexOf("compatible")>-1&&r.indexOf("MSIE")>-1,a=r.indexOf("Trident")>-1&&r.indexOf("rv:11.0")>-1;if(n){var t=new RegExp("MSIE (\\d+\\.\\d+);"),i=r.match(t);if(!i)return-1;var s=parseFloat(i[1]);return s<7?6:s}return a?11:Number.MAX_SAFE_INTEGER}function ii(){var e,r,n;if(typeof navigator>"u"||!navigator)return!1;var a=navigator.userAgent,t=a.match(/AppleWebKit.+Chrome\/(.+) Safari\/.+/i);if(Number(t==null||(e=t[1])===null||e===void 0?void 0:e.split(".")[0])<100)return!0;var i=a.match(/AppleWebKit.+Version\/(.+) Safari\/.+/i);if(Number(i==null||(r=i[1])===null||r===void 0?void 0:r.split(".")[0])<12)return!0;var s=He();if(s<=11)return!0;var o=a.match(/Firefox\/(.+)/i);return Number(o==null||(n=o[1])===null||n===void 0?void 0:n.split(".")[0])<100}function si(e,r){var n=qa(r);if(!e||e.length===0)return n?{length:0,characters:e}:0;for(var a=0,t=0;t<e.length;t++){var i=0;if(e.charCodeAt(t)>127?i=2:i=1,n&&a+i>r)return{length:a,characters:e.slice(0,t)};a+=i}return n?{length:a,characters:e}:a}function oi(e){return Q(e!=null?e:"").length}function li(e,r,n){return Q(n!=null?n:"").slice().length===r?n||"":Q(e!=null?e:"").slice(0,r).join("")}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function we(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function q(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?we(Object(n),!0).forEach(function(a){F(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ba(e){var r,n,a,t={};if(!(!e||typeof window>"u")){var i=(r=window)===null||r===void 0||(n=r.getComputedStyle)===null||n===void 0?void 0:n.call(r,e),s=i.color,o=i.fontSize,l=(a=window)===null||a===void 0||(a=a.navigator)===null||a===void 0?void 0:a.userAgent,u=/Safari/.test(l)&&!/Chrome/.test(l),c=/(?=.*iPhone)[?=.*MicroMessenger]/.test(l)&&!/Chrome/.test(l);if((u||c)&&(t={transformOrigin:"0px 0px",transform:"scale(".concat(parseInt(o,10)/12,")")}),s&&He()>11){var f=s.match(/[\d.]+/g),v=f?"rgba(".concat(f[0],", ").concat(f[1],", ").concat(f[2],", 0)"):"";Ce(e,q(q({},t),{},{background:"conic-gradient(from 90deg at 50% 50%,".concat(v," 0deg, ").concat(s," 360deg)")}))}else Ce(e,q(q({},t),{},{background:""}))}}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function y(e){var r=Ie("classPrefix"),n=r.classPrefix;return d(function(){return e?"".concat(n.value,"-").concat(e):n.value})}function Ha(){var e=Ie("classPrefix"),r=e.classPrefix;return{SIZE:d(function(){return{small:"".concat(r.value,"-size-s"),medium:"".concat(r.value,"-size-m"),large:"".concat(r.value,"-size-l"),default:"",xs:"".concat(r.value,"-size-xs"),xl:"".concat(r.value,"-size-xl"),block:"".concat(r.value,"-size-full-width")}}),STATUS:d(function(){return{loading:"".concat(r.value,"-is-loading"),loadMore:"".concat(r.value,"-is-load-more"),disabled:"".concat(r.value,"-is-disabled"),focused:"".concat(r.value,"-is-focused"),success:"".concat(r.value,"-is-success"),error:"".concat(r.value,"-is-error"),warning:"".concat(r.value,"-is-warning"),selected:"".concat(r.value,"-is-selected"),active:"".concat(r.value,"-is-active"),checked:"".concat(r.value,"-is-checked"),current:"".concat(r.value,"-is-current"),hidden:"".concat(r.value,"-is-hidden"),visible:"".concat(r.value,"-is-visible"),expanded:"".concat(r.value,"-is-expanded"),indeterminate:"".concat(r.value,"-is-indeterminate")}})}}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Ua=ne({name:"TLoadingGradient",setup:function(){var r=y();return ae(function(){var n=Or().refs.circle;Sr(function(){Ba(n)})}),{classPrefix:r}},render:function(){var r=this.classPrefix,n="".concat(r,"-loading__gradient"),a=[n,"".concat(r,"-icon-loading")];return m("svg",{class:a,viewBox:"0 0 12 12",version:"1.1",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg"},[m("foreignObject",{x:"0",y:"0",width:"12",height:"12"},[m("div",{class:"".concat(n,"-conic"),ref:"circle"},null)])])}});/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var oe={exports:{}},M={exports:{}};(function(){var e,r,n,a,t,i;typeof performance<"u"&&performance!==null&&performance.now?M.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(M.exports=function(){return(e()-t)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},a=e(),i=process.uptime()*1e9,t=a-i):Date.now?(M.exports=function(){return Date.now()-n},n=Date.now()):(M.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Le);var Wa=M.exports,A=typeof window>"u"?Le:window,B=["moz","webkit"],T="AnimationFrame",x=A["request"+T],D=A["cancel"+T]||A["cancelRequest"+T];for(var L=0;!x&&L<B.length;L++)x=A[B[L]+"Request"+T],D=A[B[L]+"Cancel"+T]||A[B[L]+"CancelRequest"+T];if(!x||!D){var Y=0,Ae=0,$=[],Xa=1e3/60;x=function(r){if($.length===0){var n=Wa(),a=Math.max(0,Xa-(n-Y));Y=a+n,setTimeout(function(){var t=$.slice(0);$.length=0;for(var i=function(){if(!t[s].cancelled)try{t[s].callback(Y)}catch(l){setTimeout(function(){throw l},0)}},s=0;s<t.length;s++)i()},Math.round(a))}return $.push({handle:++Ae,callback:r,cancelled:!1}),Ae},D=function(r){for(var n=0;n<$.length;n++)$[n].handle===r&&($[n].cancelled=!0)}}oe.exports=function(e){return x.call(A,e)};oe.exports.cancel=function(){D.apply(A,arguments)};oe.exports.polyfill=function(e){e||(e=A),e.requestAnimationFrame=x,e.cancelAnimationFrame=D};var Ue=typeof window>"u",Za=function(r){return(r||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},ja=function(){return!Ue&&document.addEventListener?function(e,r,n,a){e&&r&&n&&e.addEventListener(r,n,a)}:function(e,r,n){e&&r&&n&&e.attachEvent("on".concat(r),n)}}(),Ya=function(){return!Ue&&document.removeEventListener?function(e,r,n,a){e&&r&&e.removeEventListener(r,n,a)}:function(e,r,n){e&&r&&e.detachEvent("on".concat(r),n)}}();function ui(e,r,n,a){var t=R(n)?n:n.handleEvent,i=function s(o){t(o),Ya(e,r,s,a)};ja(e,r,i,a)}function We(e,r){if(!e||!r)return!1;if(r.indexOf(" ")!==-1)throw new Error("className should not contain space.");return e.classList?e.classList.contains(r):" ".concat(e.className," ").indexOf(" ".concat(r," "))>-1}function V(e,r){if(!!e){for(var n=e.className,a=(r||"").split(" "),t=0,i=a.length;t<i;t++){var s=a[t];!s||(e.classList?e.classList.add(s):We(e,s)||(n+=" ".concat(s)))}e.classList||(e.className=n)}}function k(e,r){if(!(!e||!r)){for(var n=r.split(" "),a=" ".concat(e.className," "),t=0,i=n.length;t<i;t++){var s=n[t];!s||(e.classList?e.classList.remove(s):We(e,s)&&(a=a.replace(" ".concat(s," ")," ")))}e.classList||(e.className=Za(a))}}var Xe=function(r,n){var a=R(r)?r(n):r;return a?Me(a)?document.querySelector(a):a instanceof HTMLElement?a:document.body:document.body},Ja=function(){},ci=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"body";return Me(r)?document.querySelector(r):R(r)?r():r},fi=function(r){var n=r.clientWidth,a=n===void 0?0:n,t=r.scrollWidth,i=t===void 0?0:t;return i>a},vi=function(r){if(!(r instanceof HTMLFormElement))throw new Error("target must be HTMLFormElement");var n=document.createElement("input");n.type="submit",n.hidden=!0,r.appendChild(n),n.click(),r.removeChild(n)};/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Qa={attach:{type:[String,Function],default:""},content:{type:[String,Function]},default:{type:[String,Function]},delay:{type:Number,default:0},fullscreen:Boolean,indicator:{type:[Boolean,Function],default:!0},inheritColor:Boolean,loading:{type:Boolean,default:!0},preventScrollThrough:{type:Boolean,default:!0},showOverlay:{type:Boolean,default:!0},size:{type:String,default:"medium"},text:{type:[String,Function]},zIndex:{type:Number}};/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Va=function(r,n){var a=R(r)?d(r):H(r),t=R(n)?d(n):H(n),i=H(),s=function(){i.value=Ja()||Xe(a.value,t.value)};return ae(function(){return s()}),Re([a,t],function(){return s()}),i};/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var ka=function(){return{name:y("loading"),centerClass:y("loading--center"),fullscreenClass:y("loading__fullscreen"),lockClass:y("loading--lock"),overlayClass:y("loading__overlay"),relativeClass:y("loading__parent"),fullClass:y("loading--full"),inheritColorClass:y("loading--inherit-color")}},ee=ne({name:"TLoading",inheritAttrs:!1,props:Qa,setup:function(r,n){var a=n.slots,t=H(!1),i=ka(),s=i.name,o=i.centerClass,l=i.fullscreenClass,u=i.lockClass,c=i.overlayClass,f=i.relativeClass,v=i.fullClass,p=i.inheritColorClass,g=y(),h=Ha(),b=h.SIZE,C=function(){t.value=!1;var I=setTimeout(function(){t.value=!0,clearTimeout(I)},r.delay)},w=Va(function(){return r.attach}),O=d(function(){return Boolean(!r.delay||r.delay&&t.value)}),P=d(function(){var _={};return r.zIndex!==void 0&&(_.zIndex=r.zIndex),["small","medium","large"].includes(r.size)||(_["font-size"]=r.size),_}),S=d(function(){return Boolean(r.default||a.default||r.content||a.content)}),X=d(function(){return r.preventScrollThrough&&r.fullscreen}),Qe=d(function(){return Boolean(r.text||a.text)}),Ve=d(function(){return S.value&&r.loading&&O.value}),ke=d(function(){return r.fullscreen&&r.loading&&O.value}),er=d(function(){return r.attach&&r.loading&&O.value}),rr=d(function(){return r.attach&&r.loading&&O.value}),nr=d(function(){var _=[o.value,b.value[r.size],F({},p.value,r.inheritColor)],I=[s.value,l.value,o.value,c.value];return{baseClasses:_,attachClasses:_.concat([s.value,v.value,F({},c.value,r.showOverlay)]),withContentClasses:_.concat([s.value,v.value,F({},c.value,r.showOverlay)]),fullScreenClasses:I,normalClasses:_.concat([s.value])}}),ar=$r(r),tr=ar.loading;return Re([tr],function(_){var I=Ra(_,1),ir=I[0];ir?(C(),X.value&&V(document.body,u.value)):X.value&&k(document.body,u.value)}),ae(function(){r.delay&&C()}),{classPrefix:g,relativeClass:f,delayShowLoading:t,styles:P,showText:Qe,hasContent:S,classes:nr,lockFullscreen:X,showWrapLoading:Ve,showNormalLoading:er,showFullScreenLoading:ke,showAttachedLoading:rr,teleportElement:w}},render:function(){var r=this,n=this.classes,a=n.fullScreenClasses,t=n.baseClasses,i=n.withContentClasses,s=n.attachClasses,o=n.normalClasses,l=m(Ua,{size:this.size},null),u=this.loading&&le(this,"indicator",l),c=this.showText&&m("div",{class:"".concat(this.classPrefix,"-loading__text")},[le(this,"text")]);return this.fullscreen?!this.showFullScreenLoading||!this.loading?null:m(ue,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[m("div",G({class:a,style:r.styles},r.$attrs),[m("div",{class:t},[u,c])])]}}):this.hasContent?m("div",G({class:this.relativeClass},this.$attrs),[pr(this,"default","content"),this.showWrapLoading&&m("div",{class:i,style:this.styles},[u,c])]):this.attach?!this.showAttachedLoading||!this.loading?null:m(ue,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[m("div",G({class:s,style:r.styles},r.$attrs),[u,c])]}}):this.loading?m("div",G({class:o,style:this.styles},this.$attrs),[u,c]):null}});/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Oe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function et(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Oe(Object(n),!0).forEach(function(a){F(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}var E=null;function rt(e){var r=_r({fullscreen:!1,attach:"body",loading:!0,preventScrollThrough:!0},e);return r}function Se(e){var r=rt(e);if(r.fullscreen&&E)return E;var n=ne({setup:function(){var f=Pr(r);return{loadingOptions:f}},render:function(){return Er(ee,et({},this.loadingOptions))}}),a=Xe(r.fullscreen?"body":r.attach),t=Tr(n),i=t.mount(document.createElement("div")),s=y("loading__parent--relative").value,o=y("loading--lock"),l=r.preventScrollThrough&&r.fullscreen;l&&V(document.body,o.value),a?V(a,s):console.error("attach is not exist");var u={hide:function(){i.loading=!1,k(a,s),k(document.body,o.value),t.unmount()}};return u}function Ze(e){if(e===!0)return E=Se({fullscreen:!0,loading:!0,attach:"body",preventScrollThrough:!0}),E;if(e===!1){var r;(r=E)===null||r===void 0||r.hide(),E=null;return}return Se(e)}var je=Ze;je.install=function(e){e.config.globalProperties.$loading=Ze};/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var nt=br,at=Ne;function tt(e,r){return e&&nt(e,r,at)}var it=tt,st=Te,ot=te,lt=1,ut=2;function ct(e,r,n,a){var t=n.length,i=t,s=!a;if(e==null)return!i;for(e=Object(e);t--;){var o=n[t];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++t<i;){o=n[t];var l=o[0],u=e[l],c=o[1];if(s&&o[2]){if(u===void 0&&!(l in e))return!1}else{var f=new st;if(a)var v=a(u,c,l,e,r,f);if(!(v===void 0?ot(c,u,lt|ut,a,f):v))return!1}}return!0}var ft=ct,vt=Fe;function dt(e){return e===e&&!vt(e)}var Ye=dt,gt=Ye,ht=Ne;function mt(e){for(var r=ht(e),n=r.length;n--;){var a=r[n],t=e[a];r[n]=[a,t,gt(t)]}return r}var yt=mt;function pt(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}var Je=pt,_t=ft,bt=yt,Ct=Je;function wt(e){var r=bt(e);return r.length==1&&r[0][2]?Ct(r[0][0],r[0][1]):function(n){return n===e||_t(n,e,r)}}var At=wt,Ot=te,St=ma,$t=xa,Pt=ie,Et=Ye,Tt=Je,xt=W,It=1,Lt=2;function Mt(e,r){return Pt(e)&&Et(r)?Tt(xt(e),r):function(n){var a=St(n,e);return a===void 0&&a===r?$t(n,e):Ot(r,a,It|Lt)}}var Ft=Mt,Nt=Be;function Rt(e){return function(r){return Nt(r,e)}}var Dt=Rt,zt=La,Gt=Dt,Kt=ie,qt=W;function Bt(e){return Kt(e)?zt(qt(e)):Gt(e)}var Ht=Bt,Ut=At,Wt=Ft,Xt=Cr,Zt=z,jt=Ht;function Yt(e){return typeof e=="function"?e:e==null?Xt:N(e)=="object"?Zt(e)?Wt(e[0],e[1]):Ut(e):jt(e)}var Jt=Yt,Qt=wr,Vt=it,kt=Jt;function ei(e,r){var n={};return r=kt(r),Vt(e,function(a,t,i){Qt(n,r(a,t,i),a)}),n}var ri=ei,re=Symbol("TdLoading"),$e=function(r,n){var a=n.modifiers,t=a.fullscreen,i=a.inheritColor,s={attach:function(){return r},fullscreen:t!=null?t:!1,inheritColor:i!=null?i:!1,loading:n.value};Fe(n.value)&&ri(n.value,function(o,l){s[l]=o}),r[re]={options:s,instance:je(s)}},ni={mounted:function(r,n){n.value&&$e(r,n)},updated:function(r,n){var a=r[re],t=n.value,i=n.oldValue;if(!Kn(t,i)){var s,o=(s=t==null?void 0:t.loading)!==null&&s!==void 0?s:t;o?$e(r,n):a==null||a.instance.hide()}},unmounted:function(r){var n;(n=r[re])===null||n===void 0||n.instance.hide()}};/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var di=Ar(ee,ee.name,{name:"loading",comp:ni});export{Ja as A,ui as B,Ce as C,xa as D,Ma as E,Ir as F,De as G,Na as H,ii as I,di as L,Ra as _,si as a,Ha as b,F as c,qe as d,W as e,Q as f,oi as g,ma as h,qa as i,Be as j,He as k,li as l,Va as m,ci as n,Ya as o,ja as p,Hr as q,vi as r,Wr as s,Fr as t,y as u,Xe as v,fi as w,Zr as x,Ue as y,We as z};
|