(function(u,m){typeof exports=="object"&&typeof module<"u"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):(u=typeof globalThis<"u"?globalThis:u||self,m(u["conversion-library"]={}))})(this,function(u){"use strict";var ya=Object.defineProperty;var ma=(u,m,N)=>m in u?ya(u,m,{enumerable:!0,configurable:!0,writable:!0,value:N}):u[m]=N;var je=(u,m,N)=>ma(u,typeof m!="symbol"?m+"":m,N);function m(t,n){return t.padStart(n,"0")}function N(t){const n={};if(t<10)return n;const a=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];let o=10;for(;o36||n<2)return String(t);const a=N(n);let o="";for(;t>0;){const c=t%n;o=(c>9?a[c]:c)+o,t=~~(t/n)}return o}const z=xe;function Be(t,n){if(n===10||n>36||n<2)return Number(t);t=t.toLowerCase();let a=0,o=0;const c=Nt(n);for(let s=t.length-1;s>-1;s--){const l=t[s],h=c[l]?c[l]:l;a+=Number(h)*Math.pow(n,o),o+=1}return a}const A=Be;function le(t){let n="";for(;t>0;)n=t%2+n,t=~~(t/2);return n}const Ft=le;function he(t){let n=0,a=0;for(let o=t.length-1;o>-1;o--)n+=Number(t[o])*Math.pow(2,a),a+=1;return n}const Ut=he;function Ie(t){let n="";for(let a=0;a0?m(o,3):o}return n}const Vt=Ie;function $e(t){let n="";for(let a=t.length-1;a>-1;a-=3){const o=a-2;n=he(t.slice(o<0?0:o,a+1))+n}return n}const Dt=$e;class ge{constructor(n,a){je(this,"value");je(this,"next");this.value=n,this.next=a??null}}function Kt(t){let n=null,a=null;return t.map(o=>{n?(a.next=new ge(o),a=a.next):n=a=new ge(o)}),n}function Ht(t){const n=[];if(t)for(n.push(t.value);t!=null&&t.next;)t=t.next,n.push(t.value);return n}var te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ne={exports:{}};ne.exports,function(t,n){var a=200,o="__lodash_hash_undefined__",c=9007199254740991,s="[object Arguments]",l="[object Array]",h="[object Boolean]",g="[object Date]",b="[object Error]",_="[object Function]",V="[object GeneratorFunction]",y="[object Map]",D="[object Number]",K="[object Object]",E="[object Promise]",x="[object RegExp]",S="[object Set]",R="[object String]",B="[object Symbol]",I="[object WeakMap]",Z="[object ArrayBuffer]",J="[object DataView]",rt="[object Float32Array]",at="[object Float64Array]",ot="[object Int8Array]",it="[object Int16Array]",ct="[object Int32Array]",st="[object Uint8Array]",ut="[object Uint8ClampedArray]",ft="[object Uint16Array]",lt="[object Uint32Array]",kn=/[\\^$.*+?()[\]{}|]/g,zn=/\w*$/,Xn=/^\[object .+?Constructor\]$/,qn=/^(?:0|[1-9]\d*)$/,d={};d[s]=d[l]=d[Z]=d[J]=d[h]=d[g]=d[rt]=d[at]=d[ot]=d[it]=d[ct]=d[y]=d[D]=d[K]=d[x]=d[S]=d[R]=d[B]=d[st]=d[ut]=d[ft]=d[lt]=!0,d[b]=d[_]=d[I]=!1;var Yn=typeof te=="object"&&te&&te.Object===Object&&te,Zn=typeof self=="object"&&self&&self.Object===Object&&self,O=Yn||Zn||Function("return this")(),ht=n&&!n.nodeType&&n,gt=ht&&!0&&t&&!t.nodeType&&t,Jn=gt&>.exports===ht;function Qn(e,r){return e.set(r[0],r[1]),e}function er(e,r){return e.add(r),e}function tr(e,r){for(var i=-1,f=e?e.length:0;++i-1}function vr(e,r){var i=this.__data__,f=ce(i,e);return f<0?i.push([e,r]):i[f][1]=r,this}v.prototype.clear=Ar,v.prototype.delete=Er,v.prototype.get=Rr,v.prototype.has=Or,v.prototype.set=vr;function H(e){var r=-1,i=e?e.length:0;for(this.clear();++r-1&&e%1==0&&e-1&&e%1==0&&e<=c}function ue(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function ga(e){return!!e&&typeof e=="object"}function ve(e){return xt(e)?Ur(e):Wr(e)}function da(){return[]}function ba(){return!1}t.exports=sa}(ne,ne.exports);var Wt=ne.exports;const kt=Gt(Wt);function zt(t,n,a,o=null){if(t=kt(t),o===null)for(let c=0;c{t[c]={...t[c],[`row${c}col${l}`]:[0,0]}});a.forEach(l=>{t[s]={...t[s],[`row${s}col${l}`]:[c-s+1,1]}})}else for(let c=0;c{t[h]={...t[h],[`row${h}col${b}`]:[0,0]}});a.forEach(b=>{t[g]={...t[g],[`row${g}col${b}`]:[h-g+1,1]}})}}return t}function Xt(t){const n=[];function a(o,c){if(o.length===t.length){n.push(o);return}const s=t[c];for(let l=0;l(h[String(g[a])]=g,h),{});return Object.values(s).forEach(h=>{const g=h[o];if(g){const b=s[g];b[c]||(b[c]=[]),b[c].push(h)}}),Object.values(s).filter(h=>!h[o])}function Yt(t,n={}){const{idKey:a="id"}=n,o=[],c=[];for(c.push({node:null,children:t,parentId:null});c.length;){const{node:s,children:l,parentId:h}=c.pop();if(s){const{children:g,...b}=s,_=b;_.parentId=h,o.push(_)}l&&l.length&&l.forEach(g=>{c.push({node:g,children:g.children||[],parentId:s?s[a]:null})})}return o}function de(t){"@babel/helpers - typeof";return de=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},de(t)}function Zt(t){var n=typeof t=="string"||t instanceof String;if(!n){var a=de(t);throw t===null?a="null":a==="object"&&(a=t.constructor.name),new TypeError("Expected a string but received a ".concat(a))}}var Jt=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;function X(t){return Zt(t),Jt.test(t)}function Me(t){t=t.trim();const n=t.length;if(X(t)&&[7,9].includes(n)&&t.startsWith("#")){let a="#",o=!0;for(let c=0,s=Math.floor(n/2);cNumber(n));throw new Error("rgb format error")}function tn(t){const n=ye(t),a={r:n[0],g:n[1],b:n[2]};return n.length===4&&(a.a=n[3]),a}function nn(t){t=t.replace(/\s/g,"");const n=ye(t);let a=`#${m(z(n[0],16),2)}${m(z(n[1],16),2)}${m(z(n[2],16),2)}`;return t.startsWith("rgba")&&(a=`${a}${m(z(Math.floor(n[3]*255),16),2)}`),Me(a)}function Ne(t){const n=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];let a="";for(const[o,c]of n){for(;t>=o;)t-=o,a+=c;if(t===0)break}return a}function rn(t){return t.map(Ne)}function Fe(t){const n=[["M",1e3],["CM",900],["D",500],["CD",400],["C",100],["XC",90],["L",50],["XL",40],["X",10],["IX",9],["V",5],["IV",4],["I",1]];let a=0;for(const[o,c]of n)for(;t.startsWith(o);)t=t.replace(o,""),a+=c;return a}function an(t){return t.map(Fe)}function on(t,n){const a=t.toString().replace(/\B(?=(\d{3})+\b)/g,",");return n?a.replace(/^/,`${n} `):a}function cn(t){return(t-32)*5/9}function sn(t){return t*9/5+32}function un(t,n,a){const _=11805916207174113e5,V=1024*_,y={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776,PB:0x4000000000000,EB:1152921504606847e3,ZB:_,YB:V};return t*y[n]/y[a]}function Ue(t,n){const a=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],o=[];let c=n,s=a.indexOf(c);for(;t>0;){if(s===a.length-1)return o.push({value:t,unit:c,label:`${t}${c}`}),o;const l=t%1024;o.unshift({value:l,unit:c,label:`${l}${c}`}),t=Math.floor(t/1024),s++,c=a[s]}return o}function fn(t,n,a=""){return Ue(t,n).map(c=>c.label).join(a)}function ln(t,n,a){const o={nm:1e-9,纳米:1e-9,μm:1e-6,微米:1e-6,mm:.001,毫米:.001,cm:.01,厘米:.01,dm:.1,分米:.1,m:1,米:1,km:1e3,千米:1e3,公里:1e3,mile:1609.344,英里:1609.344,yd:.9144,码:.9144,ft:.3048,英尺:.3048,in:.0254,英寸:.0254,里:500,丈:3.33,尺:.333,寸:.0333,分:.00333,"n mile":1852,海里:1852};return t*o[n]/o[a]}function hn(t,n,a){const o={"m㎡":1e-6,平方毫米:1e-6,"c㎡":1e-4,平方厘米:1e-4,"d㎡":.01,平方分米:.01,"㎡":1,平方米:1,"h㎡":1e4,公顷:1e4,"k㎡":1e6,平方千米:1e6,"sq.in":64516e-8,平方英寸:64516e-8,"sq.ft":.092903,平方英尺:.092903,"sq.yd":.836127,平方码:.836127,acre:4046.86,英亩:4046.86,"sq.mi":2589988110336e-6,平方英里:2589988110336e-6,平方丈:11.1111,平方尺:.1111,平方寸:.0011,亩:666.67,分:66.667};return t*o[n]/o[a]}function gn(t,n,a){const o={μg:1e-9,微克:1e-9,mg:1e-6,毫克:1e-6,g:.001,克:.001,kg:1,千克:1,t:1e3,吨:1e3,lb:.4536,磅:.4536,oz:.0283495,盎司:.0283495,担:50,斤:.5,两:.05,钱:.005,克拉:2e-4};return t*o[n]/o[a]}function dn(t,n){return t.toExponential(n)}function bn(t){return Number(t)}const yn=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),mn=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),Tn=new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d","u"),_n=/[^\p{L}\d]+/giu,Ve="$1\0$2",De="";function me(t){let n=t.trim();n=n.replace(yn,Ve).replace(mn,Ve),n=n.replace(_n,"\0");let a=0,o=n.length;for(;n.charAt(a)==="\0";)a++;if(a===o)return[];for(;n.charAt(o-1)==="\0";)o--;return n.slice(a,o).split(/\0/g)}function Ke(t){const n=me(t);for(let a=0;ab===0?s(g):h(g,b)).join((n==null?void 0:n.delimiter)??"")+c}function Ge(t,n){const[a,o,c]=U(t,n),s=q(n==null?void 0:n.locale),l=Y(n==null?void 0:n.locale),h=n!=null&&n.mergeAmbiguousCharacters?ae(s,l):Je(s,l);return a+o.map(h).join((n==null?void 0:n.delimiter)??"")+c}function wn(t,n){return re(t,{delimiter:"_",...n})}function re(t,n){const[a,o,c]=U(t,n),s=q(n==null?void 0:n.locale),l=Y(n==null?void 0:n.locale);return a+o.map(ae(s,l)).join((n==null?void 0:n.delimiter)??" ")+c}function We(t,n){const[a,o,c]=U(t,n);return a+o.map(Y(n==null?void 0:n.locale)).join((n==null?void 0:n.delimiter)??"_")+c}function ke(t,n){return F(t,{delimiter:".",...n})}function ze(t,n){return F(t,{delimiter:"-",...n})}function Xe(t,n){return F(t,{delimiter:"/",...n})}function qe(t,n){const[a,o,c]=U(t,n),s=q(n==null?void 0:n.locale),l=Y(n==null?void 0:n.locale),h=ae(s,l);return a+o.map((g,b)=>b===0?h(g):s(g)).join((n==null?void 0:n.delimiter)??" ")+c}function Ye(t,n){return F(t,{delimiter:"_",...n})}function Ze(t,n){return re(t,{delimiter:"-",...n})}function q(t){return t===!1?n=>n.toLowerCase():n=>n.toLocaleLowerCase(t)}function Y(t){return t===!1?n=>n.toUpperCase():n=>n.toLocaleUpperCase(t)}function ae(t,n){return a=>`${n(a[0])}${t(a.slice(1))}`}function Je(t,n){return(a,o)=>{const c=a[0];return(o>0&&c>="0"&&c<="9"?"_"+c:n(c))+t(a.slice(1))}}function U(t,n={}){const a=n.split??(n.separateNumbers?Ke:me),o=n.prefixCharacters??De,c=n.suffixCharacters??De;let s=0,l=t.length;for(;ss;){const h=l-1,g=t.charAt(h);if(!c.includes(g))break;l=h}return[t.slice(0,s),a(t.slice(s,l)),t.slice(l)]}const Cn=Object.freeze(Object.defineProperty({__proto__:null,camelCase:He,capitalCase:re,constantCase:We,dotCase:ke,kebabCase:ze,noCase:F,pascalCase:Ge,pascalSnakeCase:wn,pathCase:Xe,sentenceCase:qe,snakeCase:Ye,split:me,splitSeparateNumbers:Ke,trainCase:Ze},Symbol.toStringTag,{value:"Module"})),pn=t=>t!==null&&typeof t=="object";function p(t){return function n(a,o=1,c){if(o===0||!pn(a))return a;if(Array.isArray(a))return a.map(l=>n(l,o-1,c));const s=Object.create(Object.getPrototypeOf(a));return Object.keys(a).forEach(l=>{const h=a[l],g=t(l,c),b=n(h,o-1,c);s[g]=b}),s}}const Sn=p(He),An=p(re),En=p(We),Rn=p(ke),On=p(Ze),vn=p(F),Ln=p(ze),jn=p(Ge),xn=p(Xe),Bn=p(qe),In=p(Ye),$n=Object.freeze(Object.defineProperty({__proto__:null,camelCase:Sn,capitalCase:An,constantCase:En,dotCase:Rn,kebabCase:Ln,noCase:vn,pascalCase:jn,pathCase:xn,sentenceCase:Bn,snakeCase:In,trainCase:On},Symbol.toStringTag,{value:"Module"}));function Mn(t,n){let a="";for(const o of t)a+=Math.random()>.5?o.toLocaleUpperCase(n):o.toLocaleLowerCase(n);return a}const Pn=Object.freeze(Object.defineProperty({__proto__:null,spongeCase:Mn},Symbol.toStringTag,{value:"Module"}));function Nn(t,n){let a="";for(const o of t){const c=o.toLocaleLowerCase(n);a+=o===c?o.toLocaleUpperCase(n):c}return a}const Fn=Object.freeze(Object.defineProperty({__proto__:null,swapCase:Nn},Symbol.toStringTag,{value:"Module"})),Un=/(\S+)|(.)/g,Vn=/[\.#][\p{L}\p{N}]/u,Dn=new RegExp("\\p{Ll}(?=[\\p{Lu}])","u"),Kn=/[\p{L}\p{N}]+/gu,Hn=new RegExp("^([^\\p{L}])*(?:\\p{L}\\.){2,}([^\\p{L}])*$","u"),Qe=new Set(["—","–","-","―","/"]),Te=new Set([".","!","?"]),et=new Set([...Te,":",'"',"'","”"]),tt=new Set(["a","an","and","as","at","because","but","by","en","for","if","in","neither","nor","of","on","only","or","over","per","so","some","than","that","the","to","up","upon","v","versus","via","vs","when","with","without","yet"]);function Gn(t,n={}){const{locale:a=void 0,sentenceCase:o=!1,sentenceTerminators:c=Te,titleTerminators:s=et,smallWords:l=tt,wordSeparators:h=Qe}=typeof n=="string"||Array.isArray(n)?{locale:n}:n,g=o?c:s;let b="",_=!0;for(const V of t.matchAll(Un)){const{1:y,2:D,index:K=0}=V;if(D){b+=D;continue}if(Vn.test(y)){const E=y.match(Hn);if(E){const[x,S="",R=""]=E;b+=o&&!_?y:nt(y,S.length,a),_=g.has(R.charAt(0));continue}b+=y,_=g.has(y.charAt(y.length-1))}else{const E=Array.from(y.matchAll(Kn));let x=y,S=!1;for(let R=0;R0&&(!h.has(y.charAt(I-1))||l.has(B)&&h.has(Z)))continue}x=nt(x,I,a)}b+=x,_=S||g.has(y.charAt(y.length-1))}}return b}function nt(t,n,a){return t.slice(0,n)+t.charAt(n).toLocaleUpperCase(a)+t.slice(n+1)}const Wn=Object.freeze(Object.defineProperty({__proto__:null,SENTENCE_TERMINATORS:Te,SMALL_WORDS:tt,TITLE_TERMINATORS:et,WORD_SEPARATORS:Qe,titleCase:Gn},Symbol.toStringTag,{value:"Module"}));u.ListNode=ge,u.areaConversionBase=hn,u.arrayToListNode=Kt,u.arrayToTree=qt,u.binaryToDecimal=he,u.binaryToOctal=$e,u.celsiusToFahrenheit=sn,u.changeCase=Cn,u.changeCaseKeys=$n,u.combinationArrangement=Xt,u.decimalToBinary=le,u.decimalToOtherBase=xe,u.eightToTwo=Vt,u.elTableRowSpan=zt,u.exponentialToNumber=bn,u.fahrenheitToCelsius=cn,u.hexRgbToHexRrggbb=be,u.hexRgbsToRgb=en,u.hexRgbsToRgbArray=Pe,u.hexRgbsToRgbObject=Qt,u.hexRrggbbToHexRgb=Me,u.intArrayToRomanArray=rn,u.intToMoney=on,u.intToRoman=Ne,u.lengthConversionBase=ln,u.listNodeToArray=Ht,u.numberToExponential=dn,u.octalToBinary=Ie,u.otherBaseToDecimal=Be,u.otherToTen=A,u.rgbToHexRgbs=nn,u.rgbToRgbArray=ye,u.rgbToRgbObject=tn,u.romanArrayToIntArray=an,u.romanToInt=Fe,u.sizeConversionArray=Ue,u.sizeConversionBase=un,u.sizeConversionString=fn,u.spongeCase=Pn,u.swapCase=Fn,u.tenToOther=z,u.tenToTwo=Ft,u.titleCase=Wn,u.treeToArray=Yt,u.twoToEight=Dt,u.twoToTen=Ut,u.weightConversionBase=gn,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});