import{d as e,aY as t,a_ as r,H as n,I as o,K as a,bz as i,aO as s,l,aP as c,bA as u,bB as f,E as d,F as p,bC as g,M as b,az as $,bi as h,bb as v,bl as x,bD as y,bE as m,bF as j,bp as z,bG as A,bh as w,bm as C,bH as S,bq as B,bo as O}from"./main-BO_qvVyv.js";const T=e({name:"Flex",props:Object.assign(Object.assign({},a.props),{align:String,justify:{type:String,default:"start"},inline:Boolean,vertical:Boolean,reverse:Boolean,size:{type:[String,Number,Array],default:"medium"},wrap:{type:Boolean,default:!0}}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:r}=o(e),n=a("Flex","-flex",void 0,i,e,t);return{rtlEnabled:s("Flex",r,t),mergedClsPrefix:t,margin:l((()=>{const{size:t}=e;if(Array.isArray(t))return{horizontal:t[0],vertical:t[1]};if("number"==typeof t)return{horizontal:t,vertical:t};const{self:{[c("gap",t)]:r}}=n.value,{row:o,col:a}=u(r);return{horizontal:f(a),vertical:f(o)}}))}},render(){const{vertical:e,reverse:o,align:a,inline:i,justify:s,margin:l,wrap:c,mergedClsPrefix:u,rtlEnabled:f}=this,d=t(r(this),!1);return d.length?n("div",{role:"none",class:[`${u}-flex`,f&&`${u}-flex--rtl`],style:{display:i?"inline-flex":"flex",flexDirection:e&&!o?"column":e&&o?"column-reverse":!e&&o?"row-reverse":"row",justifyContent:s,flexWrap:!c||e?"nowrap":"wrap",alignItems:a,gap:`${l.vertical}px ${l.horizontal}px`}},d):null}}),Z=d("text","\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n",[p("strong","\n font-weight: var(--n-font-weight-strong);\n "),p("italic",{fontStyle:"italic"}),p("underline",{textDecoration:"underline"}),p("code","\n line-height: 1.4;\n display: inline-block;\n font-family: var(--n-font-famliy-mono);\n transition: \n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n box-sizing: border-box;\n padding: .05em .35em 0 .35em;\n border-radius: var(--n-code-border-radius);\n font-size: .9em;\n color: var(--n-code-text-color);\n background-color: var(--n-code-color);\n border: var(--n-code-border);\n ")]),F=e({name:"Text",props:Object.assign(Object.assign({},a.props),{code:Boolean,type:{type:String,default:"default"},delete:Boolean,strong:Boolean,italic:Boolean,underline:Boolean,depth:[String,Number],tag:String,as:{type:String,validator:()=>!0,default:void 0}}),setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=o(e),n=a("Typography","-text",Z,g,e,t),i=l((()=>{const{depth:t,type:r}=e,o="default"===r?void 0===t?"textColor":`textColor${t}Depth`:c("textColor",r),{common:{fontWeightStrong:a,fontFamilyMono:i,cubicBezierEaseInOut:s},self:{codeTextColor:l,codeBorderRadius:u,codeColor:f,codeBorder:d,[o]:p}}=n.value;return{"--n-bezier":s,"--n-text-color":p,"--n-font-weight-strong":a,"--n-font-famliy-mono":i,"--n-code-border-radius":u,"--n-code-text-color":l,"--n-code-color":f,"--n-code-border":d}})),s=r?b("text",l((()=>`${e.type[0]}${e.depth||""}`)),i,e):void 0;return{mergedClsPrefix:t,compitableTag:$(e,["as","tag"]),cssVars:r?void 0:i,themeClass:null==s?void 0:s.themeClass,onRender:null==s?void 0:s.onRender}},render(){var e,t,r;const{mergedClsPrefix:o}=this;null===(e=this.onRender)||void 0===e||e.call(this);const a=[`${o}-text`,this.themeClass,{[`${o}-text--code`]:this.code,[`${o}-text--delete`]:this.delete,[`${o}-text--strong`]:this.strong,[`${o}-text--italic`]:this.italic,[`${o}-text--underline`]:this.underline}],i=null===(r=(t=this.$slots).default)||void 0===r?void 0:r.call(t);return this.code?n("code",{class:a,style:this.cssVars},this.delete?n("del",null,i):i):this.delete?n("del",{class:a,style:this.cssVars},i):n(this.compitableTag||"span",{class:a,style:this.cssVars},i)}});function R(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}var E=function(){function e(e,t){this.xf=t,this.f=e,this.all=!0}return e.prototype["@@transducer/init"]=h.init,e.prototype["@@transducer/result"]=function(e){return this.all&&(e=this.xf["@@transducer/step"](e,!0)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.f(t)||(this.all=!1,e=R(this.xf["@@transducer/step"](e,!1))),e},e}();function N(e){return function(t){return new E(e,t)}}var D=v(x(["all"],N,(function(e,t){for(var r=0;r=0}function U(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var P=function(e){return(e<10?"0":"")+e},I="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+P(e.getUTCMonth()+1)+"-"+P(e.getUTCDate())+"T"+P(e.getUTCHours())+":"+P(e.getUTCMinutes())+":"+P(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};var k=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=h.init,e.prototype["@@transducer/result"]=h.result,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function V(e){return function(t){return new k(e,t)}}var H=v(x(["fantasy-land/filter","filter"],V,(function(e,t){return j(t)?m((function(r,n){return e(t[n])&&(r[n]=t[n]),r}),{},z(t)):function(e,t){for(var r=0,n=t.length,o=[];r":G(r,n)},n=function(e,t){return A((function(t){return U(t)+": "+r(e[t])}),t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+A(r,e).join(", ")+"))";case"[object Array]":return"["+A(r,e).concat(n(e,q((function(e){return/^\d+$/.test(e)}),z(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+r(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?r(NaN):U(I(e)))+")";case"[object Map]":return"new Map("+r(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+r(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+r(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+r(e.valueOf())+")":U(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var o=e.toString();if("[object Object]"!==o)return o}return"{"+n(e,z(e)).join(", ")+"}"}}var K=w((function(e){return G(e,[])}));function W(e){return new RegExp(e.source,e.flags?e.flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")+(e.dotAll?"s":""))}var Y=v((function(e,t){return C(e+1,(function(){var r=arguments[e];if(null!=r&&S(r[t]))return r[t].apply(r,Array.prototype.slice.call(arguments,0,e));throw new TypeError(K(r)+' does not have a method named "'+t+'"')}))}))(1,"split");var _=v((function(e,t){if(r=e,"[object RegExp]"!==Object.prototype.toString.call(r))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+K(e));var r;return W(e).test(t)}));const X="(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])",J=new RegExp(`^${X}\\.${X}\\.${X}\\.${X}$`),L="[0-9A-Fa-f]{1,4}",Q=new RegExp([`^(${L}:){7}${L}$`,`^(${L}:){1,7}:$`,"^:((:[0-9A-Fa-f]{1,4}){1,7}|:)$",`^(${L}:){1,6}:${L}$`,`^(${L}:){1,5}(:${L}){1,2}$`,`^(${L}:){1,4}(:${L}){1,3}$`,`^(${L}:){1,3}(:${L}){1,4}$`,`^(${L}:){1,2}(:${L}){1,5}$`,`^${L}:(:${L}){1,6}$`,"^fe80:(:[0-9A-Fa-f]{1,4}){0,4}%[0-9A-Za-z]{1,}$",`^::((ffff(:0{1,4})?:)?${X}\\.${X}\\.${X}\\.${X})$`,`^(${L}:){1,4}:${X}\\.${X}\\.${X}\\.${X}$`].join("|")),ee=new RegExp(`^${X}\\.${X}\\.${X}\\.${X}(\\/([1-2][0-9]|3[0-2]|[1-9]))?$`),te=_(/^[^\s@]+@[^\s@]+\.[^\s@]+$/);_(/^1[3-9]\d{9}$/),_(/^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/);const re=_(/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/),ne=_(J),oe=_(Q),ae=e=>ne(e)||oe(e);_(ee);const ie=_(/^([1-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/);_(/^([0-9A-Fa-f]{2}-){5}[0-9A-Fa-f]{2}$/),_(/^[\u4e00-\u9fa5]+$/);const se=_(/^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/),le=_(/^(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)|(?:\*))\.)+(?:[a-zA-Z\u00a1-\uffff]{2,}|xn--[a-zA-Z0-9]+)$/),ce=_(/^\*\.(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/),ue=(e,t=",")=>D(y(!0),B((e=>se(e)||ce(e)||le(e)),Y(t,e)));O(((e,t=2,r=!0,n="")=>{if(0===e)return r?"0 B":"0";const o=["B","KB","MB","GB","TB"],a=(e,i)=>{const s=o[i],l=0===i||0===t?Math.round(e).toString():e.toFixed(t);return n&&s===n||e<1024||i>=o.length-1?r?`${l} ${s}`:l:a(e/1024,i+1)};return a(e,0)}));export{ie as H,T as N,ae as O,re as T,ue as W,W as _,F as a,se as b,R as c,M as d,D as e,ce as q,_ as t,te as w};