k5web/assets/index.8f35e75c.js

70 lines
55 KiB
JavaScript
Raw Normal View History

2024-10-22 17:54:31 +00:00
import{P as We,Q as Ue,S as He,Y as ke,au as Dr,aR as Mr,d as Vr,n as q,k as kr,g as Rt,aS as Br,aT as Fr,b as cr,c as zr,aB as fr,aU as Lr,az as rt,a3 as nt,aV as Dt,f as X,m as ve,i as ft,h as vr,w as vt,aK as Wr,ar as Ur,l as dt,e as Hr,Z as Kr,O as Mt}from"./index.f34f4521.js";import{d as le,c as V,j as L,w as ae,bR as dr,aI as B,o as Ke,aW as Xr,aK as at,aU as pr,bp as qr,aZ as Yr,g as mr,t as pt,i as Vt,p as Zr,aY as gr,n as Gr,a$ as Jr,b0 as Qr,aV as mt,a_ as en}from"./arco.9755215d.js";import{d as hr,b as gt,l as ht,i as it,c as tn,I as rn}from"./index.aaa29523.js";function kt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kt(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var nn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M13 4v7h7v2h-7v7h-2v-7H4v-2h7V4h2z"}}]},an=le({name:"AddIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,t){var{attrs:r}=t,n=V(()=>e.size),{className:a,style:i}=We(n),l=V(()=>["t-icon","t-icon-add",a.value]),o=V(()=>Bt(Bt({},i.value),r.style)),u=V(()=>({class:l.value,style:o.value,onClick:c=>{var s;return(s=e.onClick)===null||s===void 0?void 0:s.call(e,{e:c})}}));return()=>Ue(nn,u.value)}});const on=an;function Ft(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function zt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ft(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ft(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var un={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M17.5 8.09l-5.5 5.5-5.5-5.5L5.09 9.5 12 16.41l6.91-6.91-1.41-1.41z"}}]},ln=le({name:"ChevronDownIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,t){var{attrs:r}=t,n=V(()=>e.size),{className:a,style:i}=We(n),l=V(()=>["t-icon","t-icon-chevron-down",a.value]),o=V(()=>zt(zt({},i.value),r.style)),u=V(()=>({class:l.value,style:o.value,onClick:c=>{var s;return(s=e.onClick)===null||s===void 0?void 0:s.call(e,{e:c})}}));return()=>Ue(un,u.value)}});const sn=ln;function Lt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lt(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var cn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M17.5 15.91l-5.5-5.5-5.5 5.5-1.41-1.41L12 7.59l6.91 6.91-1.41 1.41z"}}]},fn=le({name:"ChevronUpIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,t){var{attrs:r}=t,n=V(()=>e.size),{className:a,style:i}=We(n),l=V(()=>["t-icon","t-icon-chevron-up",a.value]),o=V(()=>Wt(Wt({},i.value),r.style)),u=V(()=>({class:l.value,style:o.value,onClick:c=>{var s;return(s=e.onClick)===null||s===void 0?void 0:s.call(e,{e:c})}}));return()=>Ue(cn,u.value)}});const vn=fn;function Ut(e,t){var r=Obje
2024-10-09 15:16:10 +00:00
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/var xa=/\s/;function Na(e){for(var t=e.length;t--&&xa.test(e.charAt(t)););return t}var Sa=Na,Ca=Sa,Pa=/^\s+/;function $a(e){return e&&e.slice(0,Ca(e)+1).replace(Pa,"")}var ja=$a,Ea=ja,tr=ke,Ia=Dr,rr=0/0,Ta=/^[-+]0x[0-9a-f]+$/i,_a=/^0b[01]+$/i,Aa=/^0o[0-7]+$/i,Ra=parseInt;function Da(e){if(typeof e=="number")return e;if(Ia(e))return rr;if(tr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=tr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ea(e);var r=_a.test(e);return r||Aa.test(e)?Ra(e.slice(2),r?2:8):Ta.test(e)?rr:+e}var Ma=Da;/**
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/var Va=Mr,ka=function(){return Va.Date.now()},Ba=ka,Fa=ke,Ze=Ba,nr=Ma,za="Expected a function",La=Math.max,Wa=Math.min;function Ua(e,t,r){var n,a,i,l,o,u,c=0,s=!1,g=!1,v=!0;if(typeof e!="function")throw new TypeError(za);t=nr(t)||0,Fa(r)&&(s=!!r.leading,g="maxWait"in r,i=g?La(nr(r.maxWait)||0,t):i,v="trailing"in r?!!r.trailing:v);function f(y){var P=n,T=a;return n=a=void 0,c=y,l=e.apply(T,P),l}function m(y){return c=y,o=setTimeout(h,t),s?f(y):l}function p(y){var P=y-u,T=y-c,A=t-P;return g?Wa(A,i-T):A}function b(y){var P=y-u,T=y-c;return u===void 0||P>=t||P<0||g&&T>=i}function h(){var y=Ze();if(b(y))return O(y);o=setTimeout(h,p(y))}function O(y){return o=void 0,v&&n?f(y):(n=a=void 0,l)}function $(){o!==void 0&&clearTimeout(o),c=0,n=u=a=o=void 0}function S(){return o===void 0?l:O(Ze())}function j(){var y=Ze(),P=b(y);if(n=arguments,a=this,u=y,P){if(o===void 0)return m(u);if(g)return clearTimeout(o),o=setTimeout(h,t),f(u)}return o===void 0&&(o=setTimeout(h,t)),l}return j.cancel=$,j.flush=S,j}var Ha=Ua;/**
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/function Ka(){var e=Vr(),t=e.classPrefix,r={small:"".concat(t.value,"-size-s"),medium:"".concat(t.value,"-size-m"),large:"".concat(t.value,"-size-l"),default:"",xs:"".concat(t.value,"-size-xs"),xl:"".concat(t.value,"-size-xl"),block:"".concat(t.value,"-size-full-width")},n={loading:"".concat(t.value,"-is-loading"),loadMore:"".concat(t.value,"-is-load-more"),disabled:"".concat(t.value,"-is-disabled"),focused:"".concat(t.value,"-is-focused"),success:"".concat(t.value,"-is-success"),error:"".concat(t.value,"-is-error"),warning:"".concat(t.value,"-is-warning"),selected:"".concat(t.value,"-is-selected"),active:"".concat(t.value,"-is-active"),checked:"".concat(t.value,"-is-checked"),current:"".concat(t.value,"-is-current"),hidden:"".concat(t.value,"-is-hidden"),visible:"".concat(t.value,"-is-visible"),expanded:"".concat(t.value,"-is-expanded"),indeterminate:"".concat(t.value,"-is-indeterminate")};return{classPrefix:t,sizeClassNames:r,statusClassNames:n,classNames:{size:r,status:n}}}/**
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/var Ct={attach:{type:[String,Function],default:"body"},content:{type:[String,Function]},default:{type:[String,Function]},delay:{type:[Number,Array]},destroyOnClose:Boolean,disabled:Boolean,hideEmptyPopup:Boolean,overlayClassName:{type:[String,Object,Array]},overlayInnerClassName:{type:[String,Object,Array]},overlayInnerStyle:{type:[Boolean,Object,Function]},overlayStyle:{type:[Boolean,Object,Function]},placement:{type:String,default:"top"},popperOptions:{type:Object},showArrow:Boolean,trigger:{type:String,default:"hover",validator:function(t){return t?["hover","click","focus","mousedown","context-menu"].includes(t):!0}},triggerElement:{type:[String,Function]},visible:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultVisible:Boolean,zIndex:{type:Number},onOverlayClick:Function,onScroll:Function,onScrollToBottom:Function,onVisibleChange:Function};/**
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/function Xa(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!pr(e)}function $r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=[];return e.forEach(function(r){kr(r)?t.push.apply(t,Rt(r)):r.type===at?t.push.apply(t,Rt($r(r.children))):t.push(r)}),t.filter(function(r){return!(r&&(r.type===qr||r.type===at&&r.children.length===0||r.type===dr&&r.children.trim()===""))})}function qa(e,t){return!e&&!t?!1:!!(!e||!t||["width","height","x","y"].some(function(r){return e[r]!==t[r]}))}function jr(e){var t=mr(),r=L();return Ke(function(){r.value=e(t)}),Yr(function(){var n=e(t);r.value!==n&&(r.value=n)}),r}var Ya=le({name:"TPopupTrigger",props:{forwardRef:Function},emits:["resize"],setup:function(t,r){var n=r.emit,a=r.slots,i=jr(function(o){var u=o.parent.vnode;return u.el.nextElementSibling}),l=L();return ae(i,function(){var o;(o=t.forwardRef)===null||o===void 0||o.call(t,i.value)}),hr(i,function(o){var u=q(o,1),c=u[0].contentRect;l.value=c}),ae(l,function(o,u){qa(o,u)&&n("resize")}),function(){var o,u,c=$r((o=a.default)===null||o===void 0?void 0:o.call(a));return c.length>1||((u=c[0])===null||u===void 0?void 0:u.type)===dr?B("span",null,[c]):c[0]}}}),Za=le({name:"TPopupContent",emits:["resize"],setup:function(t,r){var n=r.emit,a=r.slots,i=jr(function(l){return l.vnode.el.children[0]});return hr(i,function(){n("resize")}),function(){return B("div",{style:"position: absolute; top: 0px; left: 0px; width: 100%"},[a.default()])}}}),Ga=le({name:"TPopupContainer",inheritAttrs:!1,props:{parent:Object,visible:Boolean,attach:Ct.attach,forwardRef:Function},emits:["resize","contentMounted"],setup:function(t,r){var n=r.emit,a=r.attrs,i=r.slots,l=r.expose,o=L(),u=L(!1);function c(){n("resize")}return Ke(function(){requestAnimationFrame(function(){u.value=t.visible})}),ae(function(){return t.visible},function(s){s&&(u.value=t.visible)}),l({unmountContent:function(){u.value=!1}}),function(){var s,g=function(){return Br()||Fr(t.attach,o.value)};return B(at,null,[B(Ya,{class:a.class,forwardRef:function(f){t.forwardRef(f),o.value=f},onResize:c},Xa(s=i.default())?s:{default:function(){return[s]}}),u.value&&B(Xr,{disabled:!g(),to:g()},{default:function(){return[B(Za,{onResize:c,onVnodeMounted:function(){return n("contentMounted")}},{default:function(){return[i.content&&i.content()]}})]}})])}}});/**
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/function ar(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ar(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ar(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ja(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!pr(e)}var Er="data-td-popup",lt="data-td-popup-parent";function Je(e,t){var r=[],n=[lt,Er];if(!e)return r;return t&&n.unshift(n.pop()),a(e),r;function a(i){var l=document.querySelectorAll("[".concat(n[0],'="').concat(i,'"]'));l.forEach(function(o){r.push(o);var u=o.getAttribute(n[1]);u&&u!==i&&a(u)})}}var ir=Symbol();function Qa(e){return e.replace(/-(left|top)$/,"-start").replace(/-(right|bottom)$/,"-end")}function ei(e){var t=[];return{add:function(n,a){!n||(fr(e.value,n,a),t.push(function(){rt(e.value,n,a)}))},clean:function(){t.forEach(function(n){return n==null?void 0:n()}),t.length=0}}}var ti=le({name:"TPopup",props:Ge(Ge({},Ct),{},{expandAnimation:{type:Boolean}}),setup:function(t,r){var n,a=r.expose,i=pt(t),l=i.visible,o=i.modelValue,u=gt(l,o,t.defaultVisible,t.onVisibleChange,"visible"),c=q(u,2),s=c[0],g=c[1],v=ft(),f=vr(),m,p,b,h=L(null),O=L(null),$=L(null),S=L(null),j=L(!1),y=typeof process<"u"&&(n={})!==null&&n!==void 0&&n.TEST?"":Date.now().toString(36),P=Vt(ir,void 0);Zr(ir,{id:y,assertMouseLeave:R});var T=cr("popup"),A=zr(),E=A.STATUS,_=V(function(){var d,N,D=t.trigger!=="hover"?[0,0]:[].concat((d=t.delay)!==null&&d!==void 0?d:[250,150]);return{show:D[0],hide:(N=D[1])!==null&&N!==void 0?N:D[0]}}),W=ei(h);ae(function(){return[t.trigger,h.value]},function(){!h.value||(W.clean(),W.add({hover:"mouseenter",focus:"focusin","context-menu":"contextmenu",click:"click"}[t.trigger],function(d){if(!t.disabled){if(d.type==="contextmenu"&&d.preventDefault(),(d.type==="click"||d.type==="contextmenu")&&s.value){G(d);return}H(d)}}),W.add({hover:"mouseleave",focus:"focusout"}[t.trigger],G))}),ae(function(){return[t.overlayStyle,t.overlayInnerStyle,O.value]},function(){ee(),U()}),ae(function(){return t.placement},function(){z(),U()}),ae(function(){return s.value},function(d){if(d){fr(document,"mousedown",se,!0),t.trigger==="focus"&&Lr(h.value,"keydown",function(N){var D,M=typeof process<"u"&&(D={})!==null&&D!==void 0&&D.TEST?"27":"Escape";N.code===M&&G(N)});return}rt(document,"mousedown",se,!0)}),gr(function(){z(),K(),rt(document,"mousedown",se,!0)}),a({update:U,getOverlay:function(){return O.value},getOverlayState:function(){return{hover:j.value}},close:function(){return G()}});function F(){var d=t.overlayStyle;if(!(!h.value||!O.value)){if(nt(d))return d(h.value,O.value);if(ke(d))return d}}function ee(){var d=t.overlayInnerStyle;!h.value||!O.value||(nt(d)?Dt(O.value,d(h.value,O.value)):ke(d)&&Dt(O.value,d))}function U(){if(!(!$.value||!s.value)){if(m){if(h.value.getRootNode()instanceof ShadowRoot)m.state.elements.reference=h.value,m.update();else{for(var d=h.value.getBoundingClientRect(),N=h.value;N&&N!==document.body;)N=N.parentElement;var D=N!==document.body||d.width===0&&d.height===0;D?g(!1,{trigger:ie({type:"mouseenter"})}):(m.state.elements.reference=h.value,m.update())}return}m=Oa(h.value,$.value,Ge({placement:Qa(t.placement),onFirstUpdate:function(){Gr(U)}},t.popperOptions))}}function z(){if(m){var d;(d=m)===null||d===void 0||d.destroy(),m=null}if(t.destroyOnClose){var N;(N=S.value)===null||N===void 0||N.unmountContent()}}function H(d){K(),p=setTimeout(function(){g(!0,{trigger:ie(d)})},_.value.show)}function G(d){K(),b=setTimeout(function(){g(!1,{trigger:ie(d),e:d})},_.value.hide)}function K(){clearTimeout(p),clearTimeout(b)}function ie(d){switch(d==null?void 0:d.type){case"mouseenter":return"trigger-element-hover";case"mouseleave":return"trigger-elemen
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/var ri=vt(ti);/**
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/var ni={delay:{type:Number},destroyOnClose:{type:Boolean,default:!0},duration:{type:Number},placement:{type:String,default:"top"},showArrow:{type:Boolean,default:!0},theme:{type:String,default:"default",validator:function(t){return t?["default","primary","success","danger","warning","light"].includes(t):!0}}};/**
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/var ai=function(){var t=L(0),r=L(0),n=function(i){t.value=i.clientX,r.value=i.clientY};return Wr||(Ke(function(){window.addEventListener("mousemove",n,{passive:!0})}),gr(function(){window.removeEventListener("mousemove",n)})),{x:t,y:r}};/**
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/function or(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ye(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?or(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):or(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ii=le({name:"TTooltip",props:ye(ye({},Ct),ni),setup:function(t,r){var n=L(null),a=L(null),i=pt(t),l=i.visible,o=i.modelValue,u=gt(l,o,t.defaultVisible,t.onVisibleChange,"visible"),c=q(u,2),s=c[0],g=c[1],v=mr(),f=L(t.visible||t.defaultVisible),m=cr(),p=ft(),b=vr(),h=ai(),O=h.x,$=L(O.value);Ke(function(){t.duration&&f.value&&(n.value=setTimeout(function(){g(!1,{}),clearTimeout(n.value),n.value=null},t.duration))});var S=function(E,_){n.value&&(_==null?void 0:_.trigger)!=="document"||(E&&($.value=O.value),g(E,_))},j=V(function(){return["".concat(m.value,"-tooltip"),X({},"".concat(m.value,"-tooltip--").concat(t.theme),t.theme),t.overlayClassName]}),y=V(function(){return ye(ye({},(v==null?void 0:v.vnode.props)||{}),{},{placement:t.placement==="mouse"?"bottom-left":t.placement,showArrow:t.placement==="mouse"?!1:t.showArrow,overlayClassName:j.value,onVisibleChange:S,disabled:t.disabled})}),P=V(function(){if(t.placement!=="mouse"||$.value===0)return t.overlayInnerStyle;var A=function(_){return{transform:"translateX(".concat($.value-_.getBoundingClientRect().left,"px)")}};return t.overlayInnerStyle?function(E,_){return ye(ye({},A(E)),nt(t.overlayInnerStyle)?t.overlayInnerStyle(E,_):t.overlayInnerStyle)}:A});ae(function(){return f.value},function(){n.value&&!f.value&&(clearTimeout(n.value),n.value=null)});var T=function(){var E,_;(E=a.value)===null||E===void 0||(_=E.update)===null||_===void 0||_.call(E)};return r.expose({updatePopper:T}),function(){var A=p("content");return!A&&!t.content?b("default","triggerElement"):B(ri,mt(Ur(y.value,["content","default"]),{ref:a,overlayInnerStyle:P.value,visible:s.value}),{default:function(){return[b("default","triggerElement")]},content:function(){return A}})}}});/**
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/var Pi=vt(ii);/**
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/var oi={align:{type:String,validator:function(t){return t?["left","center","right"].includes(t):!0}},allowInputOverLimit:{type:Boolean,default:!0},autoWidth:Boolean,decimalPlaces:{type:Number,default:void 0},disabled:{type:Boolean,default:void 0},format:{type:Function},inputProps:{type:Object},label:{type:[String,Function]},largeNumber:Boolean,max:{type:[String,Number],default:1/0},min:{type:[String,Number],default:-1/0},placeholder:{type:String,default:void 0},readonly:{type:Boolean,default:void 0},size:{type:String,default:"medium",validator:function(t){return t?["small","medium","large"].includes(t):!0}},status:{type:String,default:"default",validator:function(t){return t?["default","success","warning","error"].includes(t):!0}},step:{type:[String,Number],default:1},suffix:{type:[String,Function]},theme:{type:String,default:"row",validator:function(t){return t?["column","row","normal"].includes(t):!0}},tips:{type:[String,Function]},value:{type:[String,Number],default:void 0},modelValue:{type:[String,Number],default:void 0},defaultValue:{type:[String,Number]},onBlur:Function,onChange:Function,onEnter:Function,onFocus:Function,onKeydown:Function,onKeypress:Function,onKeyup:Function,onValidate:Function};/**
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/function we(e){return new Array(e).fill(0).join("")}function Ir(e){if(!e)return!0;if(dt(e))return!Number.isNaN(e);var t=/^[0-9|e|E|-]+\.*[0-9|e|E|-]*$/.test(e);if(!t)return!1;for(var r=0,n=0,a=0,i=0,l=e.length;i<l;i++)if(e[i]==="."&&(a+=1,a>1)||/(e|E)+/.test(e[i])&&(r+=1,r>1)||e[i]==="-"&&(n+=1,n>2))return!1;return!0}function J(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return e.indexOf(".")!==-1?(ht.error("InputNumber","num is not a integer number."),e):!e||e==="0"&&t?"":e==="0"?e:(t?e.replace(/0+$/,""):e.replace(/^0+/,""))||"0"}function Qe(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=J(e,r),a=J(t,r),i=n.length>a.length,l=i?n:a,o=i?a:n,u=[],c=[],s=r?0:l.length-o.length,g=r?o.length:l.length,v=g-1;v>=0;v--){var f=v-s,m=Number(l[v])+(Number(o[f])||0)+(c[v]||0);m>=10&&(c[v-1]=1),u.unshift(String(m%10))}return c[-1]&&u.unshift("1"),r?u.concat(l.slice(g,l.length)).join(""):u.join("")}function Ce(e,t){var r=e.split("."),n=q(r,2),a=n[0],i=a===void 0?"0":a,l=n[1],o=l===void 0?"0":l,u=t.split("."),c=q(u,2),s=c[0],g=s===void 0?"0":s,v=c[1],f=v===void 0?"0":v,m=Qe(i,g);if(o==="0"&&f==="0")return m;var p=J(o,!0),b=J(f,!0),h=Qe(p,b,!0),O=h.length;return O>p.length&&O>b.length?[J(Qe(m,"1")),J(h.slice(1),!0)].filter(function($){return $}).join("."):[J(m),J(h,!0)].filter(function($){return $}).join(".")}function Tr(e,t){var r=J(e),n=J(t);if(r.length===n.length){for(var a=0,i=r.length;a<i;a++){if(r[a]>n[a])return 1;if(r[a]<n[a])return-1}return 0}return r.length>n.length?1:-1}function _r(e,t){for(var r=e&&e!=="0"?e.replace(/0+$/,""):"0",n=t&&t!=="0"?t.replace(/0+$/,""):"0",a=Math.max(r.length,n.length),i=0,l=a;i<l;i++){if((r[i]||0)>(n[i]||0))return 1;if((r[i]||0)<(n[i]||0))return-1}return 0}function st(e){var t=e.split("e"),r=q(t,2),n=r[0],a=r[1];if(!a)return e;var i=e.split("."),l=q(i,2),o=l[0],u=l[1],c=u===void 0?"":u,s=Number(a),g=c.split("e"),v=q(g,1),f=v[0];if(s>f.length){var m=we(s-f.length);return n.replace(/(^0+|\.)/g,"")+m}var p=o.replace(/^0+/,"")+f.slice(0,s),b=f.slice(s);return b?[p,b].join("."):p}function ui(e,t){var r=st(e).split("."),n=q(r,2),a=n[0],i=n[1],l=st(t).split("."),o=q(l,2),u=o[0],c=o[1],s=Tr(a.replace("-",""),u.replace("-","")),g=a.includes("-"),v=u.includes("-");return g&&!v?-1:!g&&v?1:g&&v?s===0?0:s>0?-1:1:s===0?_r(i,c):s}function ur(e){return[-1/0,1/0].includes(Number(e))}function lr(e){return Number(e)<Number.MAX_SAFE_INTEGER&&Number(e)>Number.MIN_SAFE_INTEGER}function be(e,t,r){var n=lr(e)&&lr(t)&&!r,a=ur(e)||ur(t);return n||a?Number(e)===Number(t)?0:Number(e)>Number(t)?1:-1:ui(String(e),String(t))}function je(e,t,r){if(e===t)return"0";for(var n=r||{},a=n.decimal,i=n.stayZero,l=J(e),o=J(t),u=Tr(l,o)>0,c=u?l:o,s=u?o:l,g=[],v=[],f=a?0:c.length-s.length,m=a?s.length:c.length,p=m-1;p>=0;p--){var b=p-f,h=Number(c[p])-(Number(s[b])||0)-(v[p]||0);h<0&&(v[p-1]=1,h+=10),g.unshift(String(h))}if(a)return g.concat(c.slice(m,c.length)).join("");var O=g.join("");return i||(O=O.replace(/^0+/,"")),J(u?O:"-".concat(O))}function Fe(e,t){if(e===t)return"0";var r=be(e,t,!0)>0,n=r?e:t,a=r?t:e,i=n.split("."),l=q(i,2),o=l[0],u=l[1],c=u===void 0?"0":u,s=a.split("."),g=q(s,2),v=g[0],f=g[1],m=f===void 0?"0":f,p=je(o,v);if(c==="0"&&m==="0")return r?p:"-".concat(p);var b="",h=c;c.length<m.length&&(h="".concat(c).concat(we(m.length-c.length))),_r(h,m)>=0?b=je(h,m,{decimal:!0}):(c.length<m.length||c==="0"?(b=je("1".concat(h),m,{stayZero:!0}),b=we(m.length-b.length)+b):b=je(c,m,{decimal:!0}),p=je(p,"1"));var O=b?[p,b].join("."):p;return r?O:"-".concat(O)}function li(e,t){var r=e[0]==="-",n=t[0]==="-";if(r&&!n){var a=Ce(e.slice(1),t);return"-".concat(a)}return r&&n?Fe(t.slice(1),e.slice(1)):!r&&n?Ce(e,t.slice(1)):Fe(e,t)}function si(e,t){var r=e[0]==="-",n=t[0]==="-";if(r&&!n)return Fe(t,e.slice(1));if(r&&n){var a=Ce(t.slice(1),e.slice(1));return"-".concat(a)}return!r&&n?Fe(e,t.slice(1)):Ce(e,t)}function ct(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!r)return Number(e).toFixed(t);if(!ve(e))return
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/function ci(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e&&e!==0?!0:r&&ve(e)?be(e,t,r)<0:e<t}function fi(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e&&e!==0?!0:r&&ve(e)?be(e,t,r)>0:e>t}function vi(e,t){if(e!==""){var r=t.max,n=t.min,a=t.lastValue,i=t.largeNumber;return Ir(e)?i&&(ve(r)||r===1/0)&&(ve(n)||n===-1/0)?be(r,e,i)<0?r:be(n,e,i)>0?n:e:Math.max(Number(n),Math.min(Number(r),Number(e))):a}}function ze(e,t){var r,n;if(!e||!t)return(e||0)+(t||0);var a=((r=e.toString().split(".")[1])===null||r===void 0?void 0:r.length)||0,i=((n=t.toString().split(".")[1])===null||n===void 0?void 0:n.length)||0;if(!a&&!i)return e+t;var l=e,o=t,u=Math.abs(a-i),c=Math.pow(10,Math.max(a,i));if(u>0){var s=Math.pow(10,u);a>i?(l=Number(e.toString().replace(".","")),o=Number(t.toString().replace(".",""))*s):(l=Number(e.toString().replace(".",""))*s,o=Number(t.toString().replace(".","")))}else l=Number(e.toString().replace(".","")),o=Number(t.toString().replace(".",""));return(l+o)/c}function Le(e,t){var r,n;if(!e||!t)return(e||0)-(t||0);var a=((r=e.toString().split(".")[1])===null||r===void 0?void 0:r.length)||0,i=((n=t.toString().split(".")[1])===null||n===void 0?void 0:n.length)||0,l=Math.pow(10,Math.max(a,i)),o=a>=i?a:i;return Number(((e*l-t*l)/l).toFixed(o))}function di(e,t){return e<0&&t>0?Le(t,Math.abs(e)):e<0&&t<0?ze(Math.abs(e),Math.abs(t))*-1:e>0&&t<0?Le(e,Math.abs(t)):ze(e,t)}function pi(e,t){return e<0&&t>0?ze(Math.abs(e),t)*-1:e<0&&t<0?Le(Math.abs(t),Math.abs(e)):e>0&&t<0?ze(e,Math.abs(t)):Le(e,t)}function mi(e){var t=e.op,r=e.step,n=e.lastValue,a=e.max,i=e.min,l=e.largeNumber;if(r<=0)return ht.error("InputNumber","step must be larger than 0."),n;var o=dt(r)?String(r):r,u;return t==="add"?l&&ve(n)?u=si(String(n),String(o)):u=di(Number(n||0),Number(r)):t==="reduce"&&(l&&ve(n)?u=li(String(n),String(o)):u=pi(Number(n||0),Number(r))),it(n)&&(u=vi(u,{max:a,min:i,lastValue:n,largeNumber:l})),l?u:Number(u)}function et(e){var t=e.largeNumber,r=e.value,n=e.max,a=e.min;if(!(it(r)||it(t))){t&&dt(r)&&ht.warn("InputNumber","largeNumber value must be a string.");var i;return be(r,n,t)>0?i="exceed-maximum":be(r,a,t)<0?i="below-minimum":i=void 0,i}}var gi=["-",".","e","E","+"];function hi(e,t){var r;if(["",null,void 0].includes(e))return!0;if(e.slice(0,2)==="00"||((r=e.match(/\./g))===null||r===void 0?void 0:r.length)>1)return!1;var n=e.slice(1);if(/(\+|-)/.test(n)&&!/e+/i.test(n))return!1;var a=t&&Ir(e)||!Number.isNaN(Number(e));return!(!a&&!gi.includes(e.slice(-1))||/e/i.test(e)&&!/\de/i.test(e))}function bi(e,t){return parseFloat(e)!==t&&!Number.isNaN(Number(e))}function tt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(["",null,void 0].includes(e)||!/\d+/.test(e))){var r=t.decimalPlaces,n=t.largeNumber,a=t.isToFixed,i=e.replace(/[.|+|\-|e]$/,"");return n&&(i=st(i)),r!==void 0&&(i=ct(i,r,n)),n||a?i:parseFloat(i)}}function yi(e){var t=/^[-+]?\d{1,3}(,\d{3})*(\.(\d*))?$/;return t.test(e)?e.replace(/,/g,""):e}/**
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/function wi(e){var t=Ka(),r=t.classPrefix,n=t.sizeClassNames,a=t.statusClassNames,i=pt(e),l=i.value,o=i.modelValue,u=i.max,c=i.min,s=gt(l,o,e.defaultValue,e.onChange),g=q(s,2),v=g[0],f=g[1],m=L(),p=L(""),b=Hr(),h=tn(),O=L(),$=V(function(){return b.value||!fi(v.value,e.min,e.largeNumber)}),S=V(function(){return b.value||!ci(v.value,e.max,e.largeNumber)}),j=V(function(){return["".concat(r.value,"-input-number"),n[e.size],X(X(X(X({},a.disabled,b.value),"".concat(r.value,"-is-controls-right"),e.theme==="column"),"".concat(r.value,"-input-number--").concat(e.theme),e.theme),"".concat(r.value,"-input-number--auto-width"),e.autoWidth)]}),y=V(function(){return["".concat(r.value,"-input-number__decrease"),X({},a.disabled,$.value)]}),P=V(function(){return["".concat(r.value,"-input-number__increase"),X({},a.disabled,S.value)]}),T=function(C){var x;if(!C&&C!==0)return"";var w=C||C===0?String(C):"";if(!((x=m.value)!==null&&x!==void 0&&(x=x.inputRef)!==null&&x!==void 0&&x.contains(document.activeElement))){var I=tt(w,{decimalPlaces:e.decimalPlaces,largeNumber:e.largeNumber,isToFixed:!0});w=I||I===0?String(I):"",e.format&&(w=String(e.format(C,{fixedNumber:w})))}return w};ae(v,function(R){var C=e.largeNumber,x=e.decimalPlaces,w=[void 0,null].includes(R)?"":String(R);if(!C&&!Number.isNaN(p.value)){parseFloat(p.value)!==R&&(p.value=T(w));var I=Number(ct(w,x,C));x!==void 0&&![void 0,null].includes(R)&&Number(I)!==Number(v.value)&&f(I,{type:"props",e:void 0})}C&&(p.value=T(w),x!==void 0&&ct(w,x,C)!==R&&f(p.value,{type:"props",e:void 0}))},{immediate:!0}),ae([v,u,c],function(){var R;if(![void 0,"",null].includes(v.value)){var C=e.max,x=e.min,w=e.largeNumber,I=et({value:v.value,largeNumber:w,max:C,min:x});O.value=I,(R=e.onValidate)===null||R===void 0||R.call(e,{error:I})}},{immediate:!0});var A=function(C){var x=mi({op:C,step:e.step,max:e.max,min:e.min,lastValue:v.value,largeNumber:e.largeNumber}),w=e.largeNumber,I=e.max,d=e.min,N=et({value:x,largeNumber:w,max:I,min:d});return{overLimit:N,newValue:x}},E=function(C){if(!($.value||h.value)){var x=A("reduce");x.overLimit&&!e.allowInputOverLimit||f(x.newValue,{type:"reduce",e:C})}},_=function(C){if(!(S.value||h.value)){var x=A("add");x.overLimit&&!e.allowInputOverLimit||f(x.newValue,{type:"add",e:C})}},W=function(C,x){var w=x.e,I=yi(C);if(!!hi(I,e.largeNumber)){if(p.value=I,e.largeNumber){f(I,{type:"input",e:w});return}if(bi(String(I),Number(v.value))){var d=I===""?void 0:Number(I);f(d,{type:"input",e:w})}}},F=function(C,x){var w,I=e.largeNumber,d=e.max,N=e.min,D=e.decimalPlaces;if(!e.allowInputOverLimit&&v.value!==void 0){var M=et({value:v.value,largeNumber:I,max:d,min:N});if(M==="below-minimum"){var k;f(N,{type:"blur",e:x.e}),(k=e.onBlur)===null||k===void 0||k.call(e,N,x);return}if(M==="exceed-maximum"){var pe;f(d,{type:"blur",e:x.e}),(pe=e.onBlur)===null||pe===void 0||pe.call(e,d,x);return}}var ce=tt(C,{decimalPlaces:D,largeNumber:I});p.value=T(ce),ce!==v.value&&f(ce,{type:"blur",e:x.e}),(w=e.onBlur)===null||w===void 0||w.call(e,ce,x)},ee=function(C,x){var w;p.value=v.value||v.value===0?String(v.value):"",(w=e.onFocus)===null||w===void 0||w.call(e,C,x)},U=function(C,x){var w;if(!b.value){var I=x.e,d={ArrowUp:_,ArrowDown:E},N=I.code||I.key;d[N]!==void 0&&d[N](I),(w=e.onKeydown)===null||w===void 0||w.call(e,C,x)}},z=function(C,x){var w;(w=e.onKeyup)===null||w===void 0||w.call(e,C,x)},H=function(C,x){var w;(w=e.onKeypress)===null||w===void 0||w.call(e,C,x)},G=function(C,x){var w;p.value=T(C);var I=tt(C,{decimalPlaces:e.decimalPlaces,largeNumber:e.largeNumber});I!==C&&String(I)!==C&&f(I,{type:"enter",e:x.e}),(w=e.onEnter)===null||w===void 0||w.call(e,I,x)},K=function(){m.value.focus()},ie=function(){m.value.blur()},se={onBlur:F,onFocus:ee,onKeydown:U,onKeyup:z,onKeypress:H,onEnter:G,onClick:K};return{classPrefix:r,wrapClasses:j,reduceClasses:y,addClasses:P,tDisabled:b,isError:O,listeners:se,userInput:p,tValue:v,inputRef:m,focus:K,blur:ie,handleReduce:E,handleAdd:_,onInnerInputChange:W,isReadonly:h}}/**
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/function sr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Oi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sr(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var xi=le({name:"TInputNumber",props:oi,setup:function(t,r){var n=ft(),a=Kr({AddIcon:on,RemoveIcon:mn,ChevronDownIcon:sn,ChevronUpIcon:vn}),i=a.AddIcon,l=a.RemoveIcon,o=a.ChevronDownIcon,u=a.ChevronUpIcon,c=wi(t),s=c.inputRef;return r.expose(Oi({},c)),function(){var g=t.theme==="column"?B(o,{size:t.size},null):B(l,{size:t.size},null),v=t.theme==="column"?B(u,{size:t.size},null):B(i,{size:t.size},null),f=c.isError.value?"error":t.status,m=c.classPrefix.value,p=n("tips");return B("div",{class:c.wrapClasses.value},[t.theme!=="normal"&&B(Mt,{class:c.reduceClasses.value,disabled:c.tDisabled.value,onClick:c.handleReduce,variant:"outline",shape:"square",icon:function(){return g}},null),B(rn,mt({ref:s,disabled:c.tDisabled.value,readonly:c.isReadonly.value,autocomplete:"off",placeholder:t.placeholder,unselectable:c.isReadonly.value?"on":"off",autoWidth:t.autoWidth,align:t.align||(t.theme==="row"?"center":void 0),status:f,label:t.label,suffix:t.suffix},c.listeners,t.inputProps,{value:c.userInput.value,onChange:c.onInnerInputChange}),r.slots),t.theme!=="normal"&&B(Mt,{class:c.addClasses.value,disabled:c.tDisabled.value,onClick:c.handleAdd,variant:"outline",shape:"square",icon:function(){return v}},null),p&&B("div",{class:"".concat(m,"-input__tips ").concat(m,"-tips ").concat(m,"-is-").concat(f)},[p])])}}});/**
* tdesign v1.9.9
* (c) 2024 tdesign
* @license MIT
*/var $i=vt(xi);export{on as A,vn as C,$i as I,ri as P,Pi as T,sn as a,Le as b,Ha as d,ct as l,ze as p,Ka as u};