@rzl-zone/utils-js 3.2.6-beta.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -16
- package/dist/NumberRangeUnion-B6bhM2s7.d.ts +33 -0
- package/dist/{any-BmdI8UbK.d.ts → any-v4TsK9ES.d.ts} +25 -26
- package/dist/{arrays-normalize-recursive-CnjYJ9xg.d.ts → arrays-normalize-recursive-BqmVuFlD.d.ts} +20 -20
- package/dist/assertions/index.cjs +1 -1
- package/dist/assertions/index.d.ts +96 -70
- package/dist/assertions/index.js +1 -1
- package/dist/chunk-2CQX5CBG.js +1 -0
- package/dist/chunk-2IOOEY45.cjs +1 -0
- package/dist/chunk-3IBQ5MOM.js +1 -0
- package/dist/{chunk-OGPPP2S3.js → chunk-3VA554KW.js} +1 -1
- package/dist/{chunk-FV7SEBKD.cjs → chunk-5757UBXJ.cjs} +1 -1
- package/dist/{chunk-MTUBDVJ2.js → chunk-5IGC6PBH.js} +1 -1
- package/dist/{chunk-O7UT5AN3.cjs → chunk-5KJFVIQT.cjs} +1 -1
- package/dist/chunk-6JFCSH7J.js +1 -0
- package/dist/{chunk-VHAPTHEA.cjs → chunk-6JFZL7YE.cjs} +1 -1
- package/dist/chunk-7ODAAXX5.cjs +1 -0
- package/dist/{chunk-6C3ATUGM.cjs → chunk-CAH33WOQ.cjs} +1 -1
- package/dist/{chunk-ECRNH4FW.js → chunk-CKTLUNWX.js} +1 -1
- package/dist/chunk-CMW2TBOQ.js +1 -0
- package/dist/chunk-D3ENH7H6.cjs +1 -0
- package/dist/{chunk-3YCFMGRB.js → chunk-DEZZUYE2.js} +1 -1
- package/dist/chunk-DWF2R5GD.cjs +1 -0
- package/dist/chunk-E55EQK2U.cjs +1 -0
- package/dist/chunk-E74U6CYP.cjs +1 -0
- package/dist/{chunk-XC3QHAK2.cjs → chunk-EL6A35UR.cjs} +1 -1
- package/dist/chunk-F6IPNNSJ.cjs +1 -0
- package/dist/chunk-FJZGG54N.cjs +1 -0
- package/dist/chunk-FWCKOJZM.js +1 -0
- package/dist/{chunk-IMCLPT5V.cjs → chunk-FWHNWL2P.cjs} +1 -1
- package/dist/chunk-GGEADHZO.js +1 -0
- package/dist/{chunk-IRGE5W7L.js → chunk-GQR4R5WY.js} +1 -1
- package/dist/chunk-H66AC7GK.cjs +1 -0
- package/dist/{chunk-M47QIBXI.cjs → chunk-HQWOFR56.cjs} +1 -1
- package/dist/{chunk-VCFXNV3Q.cjs → chunk-HYRQMTRH.cjs} +1 -1
- package/dist/{chunk-EUANTHVN.js → chunk-IRFL4MAX.js} +1 -1
- package/dist/{chunk-GGWPB23G.cjs → chunk-IVL7CKVH.cjs} +1 -1
- package/dist/chunk-IZPBKKPO.js +1 -0
- package/dist/chunk-JBQMXC5I.cjs +1 -0
- package/dist/chunk-JEQEF5WD.js +1 -0
- package/dist/chunk-JMJQCN74.js +1 -0
- package/dist/chunk-JYQTCICM.js +1 -0
- package/dist/chunk-KVAL5PAG.cjs +1 -0
- package/dist/chunk-LS6U7FAY.cjs +1 -0
- package/dist/chunk-NBZWMBO6.js +1 -0
- package/dist/chunk-NRF6LWBC.cjs +1 -0
- package/dist/chunk-OI5XKNZO.js +1 -0
- package/dist/chunk-OYTYSY7G.js +1 -0
- package/dist/chunk-PET42Z7W.js +1 -0
- package/dist/chunk-PZQ6I4JJ.cjs +1 -0
- package/dist/chunk-QBKAEVYG.js +1 -0
- package/dist/{chunk-YV3K2EKJ.js → chunk-RIPKY4RU.js} +1 -1
- package/dist/chunk-RZW35UN5.cjs +1 -0
- package/dist/chunk-SBFNXGTJ.js +1 -0
- package/dist/{chunk-T4CIAKEK.js → chunk-SBKGWRS5.js} +1 -1
- package/dist/{chunk-5Z2G23WP.js → chunk-SIM77PU4.js} +1 -1
- package/dist/chunk-T2T7K3KR.js +1 -0
- package/dist/chunk-T7PU2V7X.cjs +1 -0
- package/dist/chunk-V45XJKHW.cjs +1 -0
- package/dist/chunk-W2WNBUDE.js +1 -0
- package/dist/chunk-XABCB3Y7.cjs +1 -0
- package/dist/chunk-XEDXFSGI.js +1 -0
- package/dist/chunk-YKPSRP5G.js +1 -0
- package/dist/chunk-YLA3DURS.cjs +1 -0
- package/dist/chunk-ZETAZZLD.cjs +1 -0
- package/dist/conversions/index.cjs +1 -1
- package/dist/conversions/index.d.ts +515 -321
- package/dist/conversions/index.js +1 -1
- package/dist/events/index.cjs +1 -1
- package/dist/events/index.d.ts +25 -20
- package/dist/events/index.js +1 -1
- package/dist/{extends-Bk_SBGdT.d.ts → extends-DtdRjDyU.d.ts} +63 -87
- package/dist/{formatting → formatters}/index.cjs +1 -1
- package/dist/formatters/index.d.ts +2106 -0
- package/dist/formatters/index.js +1 -0
- package/dist/generators/index.cjs +1 -0
- package/dist/{generator → generators}/index.d.ts +57 -59
- package/dist/generators/index.js +1 -0
- package/dist/{if-CvT4R7Kh.d.ts → if-ChM35c_q.d.ts} +6 -5
- package/dist/index.d.ts +14 -0
- package/dist/{is-array--YjXV-Wx.d.ts → is-array-BJeHxPM3.d.ts} +287 -542
- package/dist/{isPlainObject-BVhBAPHX.d.ts → isPlainObject-DGJkcFYw.d.ts} +6 -6
- package/dist/{never-BfayMBF9.d.ts → never-D89PbPh5.d.ts} +10 -19
- package/dist/next/index.cjs +1 -1
- package/dist/next/index.d.ts +15 -12
- package/dist/next/index.js +1 -1
- package/dist/next/server/index.cjs +1 -1
- package/dist/next/server/index.d.ts +1 -1
- package/dist/next/server/index.js +1 -1
- package/dist/{nils-DMz3kU7M.d.ts → nils-CO8zLHSB.d.ts} +39 -65
- package/dist/operations/index.cjs +1 -1
- package/dist/operations/index.d.ts +4 -4
- package/dist/operations/index.js +1 -1
- package/dist/or-C6qzKt2I.d.ts +82 -0
- package/dist/override-CL2olHE5.d.ts +59 -0
- package/dist/parsers/index.cjs +1 -1
- package/dist/parsers/index.js +1 -1
- package/dist/pick-BSMX6Xe2.d.ts +15 -0
- package/dist/predicates/index.cjs +1 -1
- package/dist/predicates/index.d.ts +425 -106
- package/dist/predicates/index.js +1 -1
- package/dist/prettify-3o8_Kw6b.d.ts +564 -0
- package/dist/promises/index.cjs +1 -0
- package/dist/promises/index.d.ts +107 -0
- package/dist/promises/index.js +1 -0
- package/dist/promises-LU7K00H0.d.ts +72 -0
- package/dist/rzl-utils.global.js +1 -1
- package/dist/{string-XA-til3C.d.ts → string-B1jlOnws.d.ts} +82 -121
- package/dist/strings/index.cjs +1 -1
- package/dist/strings/index.d.ts +209 -210
- package/dist/strings/index.js +1 -1
- package/dist/tailwind/index.cjs +1 -1
- package/dist/tailwind/index.d.ts +23 -17
- package/dist/tailwind/index.js +1 -1
- package/dist/types/index.d.ts +899 -1181
- package/dist/urls/index.cjs +1 -1
- package/dist/urls/index.d.ts +113 -108
- package/dist/urls/index.js +1 -1
- package/package.json +33 -40
- package/dist/NumberRangeUnion-DC-C3_Kq.d.ts +0 -26
- package/dist/chunk-2HSNUPEO.cjs +0 -1
- package/dist/chunk-4Z75R3IT.cjs +0 -1
- package/dist/chunk-AJ25PWXX.cjs +0 -1
- package/dist/chunk-BHIBDDQF.js +0 -1
- package/dist/chunk-CE4JI2YB.js +0 -1
- package/dist/chunk-CMJ6UYWW.cjs +0 -1
- package/dist/chunk-D3VSHABU.cjs +0 -1
- package/dist/chunk-DG2GWBTS.cjs +0 -1
- package/dist/chunk-EKS4IZJR.cjs +0 -1
- package/dist/chunk-EOZKYR5S.cjs +0 -1
- package/dist/chunk-EW3I4O7X.js +0 -1
- package/dist/chunk-F3E77L46.js +0 -1
- package/dist/chunk-G5LXIEFO.js +0 -0
- package/dist/chunk-GVWGQNLF.js +0 -1
- package/dist/chunk-H3FXL4DU.cjs +0 -1
- package/dist/chunk-HHPDLSX2.cjs +0 -1
- package/dist/chunk-JARPXKBM.cjs +0 -1
- package/dist/chunk-JFJUPYDT.cjs +0 -1
- package/dist/chunk-JLP56WSM.js +0 -1
- package/dist/chunk-K3MV4AIN.cjs +0 -1
- package/dist/chunk-KOVO72OM.js +0 -1
- package/dist/chunk-LJ4M3VGE.js +0 -1
- package/dist/chunk-LJVGJLP4.js +0 -1
- package/dist/chunk-MISCBZJC.js +0 -1
- package/dist/chunk-MMSYCIJ2.cjs +0 -1
- package/dist/chunk-OLPKAX7F.cjs +0 -1
- package/dist/chunk-ORZFHBEY.js +0 -1
- package/dist/chunk-OWV2P376.js +0 -1
- package/dist/chunk-RV2WK5E6.js +0 -1
- package/dist/chunk-SBF43G3B.cjs +0 -1
- package/dist/chunk-X74TUJSE.cjs +0 -1
- package/dist/chunk-XLDAIZRK.js +0 -1
- package/dist/chunk-XZJ7C4N6.js +0 -1
- package/dist/chunk-ZHV5ZYVN.cjs +0 -1
- package/dist/chunk-ZL7J6GTP.js +0 -1
- package/dist/chunk-ZTCLKKMB.js +0 -1
- package/dist/env/index.cjs +0 -1
- package/dist/env/index.d.ts +0 -16
- package/dist/env/index.js +0 -1
- package/dist/formatting/index.d.ts +0 -950
- package/dist/formatting/index.js +0 -1
- package/dist/generator/index.cjs +0 -1
- package/dist/generator/index.js +0 -1
- package/dist/omit-VvmIsZmX.d.ts +0 -28
- package/dist/prettify-C4xLcYOP.d.ts +0 -353
- package/dist/promise/index.cjs +0 -1
- package/dist/promise/index.d.ts +0 -31
- package/dist/promise/index.js +0 -1
- package/dist/type-data-DDs-u2kq.d.ts +0 -261
- /package/dist/{chunk-5C2SMIGX.cjs → chunk-BAV5T2E3.cjs} +0 -0
- /package/dist/{chunk-MC3LXMCQ.js → chunk-L5RDAVVH.js} +0 -0
- /package/dist/{chunk-J2RGTPGK.cjs → chunk-VJDDGRIK.cjs} +0 -0
- /package/dist/{chunk-FIAAX3UE.js → chunk-YWHHVDT4.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNonEmptyString as r}from"./chunk-CMW2TBOQ.js";var o=(o,m={})=>!r(o,m);export{o as isEmptyString};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-2IOOEY45.cjs"),t=require("./chunk-5KJFVIQT.cjs"),r=require("./chunk-V45XJKHW.cjs"),n=require("./chunk-DVMHRLKP.cjs"),i=require("./chunk-E55EQK2U.cjs"),s=require("./chunk-HYRQMTRH.cjs"),a=require("./chunk-T7PU2V7X.cjs"),o=require("./chunk-PZQ6I4JJ.cjs"),p=require("libphonenumber-js/max"),u=require("date-fns/locale"),c=require("date-fns");var l=(e,t,r,n)=>{if(e.length<=t)return"*".repeat(e.length);const i=e.split(""),s=Math.max(t,Math.ceil(e.length*r)),a=new Set;let p=0;for(;a.size<s;){const t=o.isUndefined(n)?Math.floor(Math.random()*e.length):(n+e.length+31*p)%e.length;a.add(t),p++}for(const e of a)i[e]="*";return i.join("")};exports.censorEmail=(e,t={})=>{if(!o.isNonEmptyString(e))return"";o.assertIsPlainObject(t,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=o.hasOwnProp(t,"mode")?t.mode:"fixed";if("random"!==r&&"fixed"!==r)throw new TypeError(`Parameter \`mode\` property of the \`options\` (second parameter) must be one of "fixed" or "random", but received: \`${o.getPreciseType(r)}\`, with value: \`${a.safeStableStringify(r)}\`.`);if(!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e))return"";const[n,i]=e.split("@"),s=i.split(".");if(s.length<2)return"";const[p,...u]=s,c=u.join("."),m=((e,t)=>"fixed"===e?(()=>{let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return Math.abs(e)})():void 0)(r,e),f=n.length<4?1:2,d=p.length<4?1:2;return`${l(n,f,.6,m)}@${l(p,d,.5,m)}.${c.length<=2?c:l(c,1,.4,m)}`},exports.chunkString=function(t,r,i={}){if(o.isNil(t)||r<=0)return t;if(s.assertIsString(t,{message:({currentType:e,validType:t})=>`First parameter (\`subject\`) must be of type \`${t}\`, but received: \`${e}\`.`}),!n.isInteger(r))throw new TypeError(`Second parameter (\`limiter\`) must be of type \`integer-number\`, but received: \`${o.getPreciseType(r)}\`, with value: \`${a.safeStableStringify(r)}\`.`);o.assertIsPlainObject(i,{message:({currentType:e,validType:t})=>`Third parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const p=o.hasOwnProp(i,"separator")?i.separator:" ",u=!!o.hasOwnProp(i,"reCountAfterSpace")&&i.reCountAfterSpace;if(s.assertIsString(p,{message:({currentType:e,validType:t})=>`Parameter \`separator\` property of the \`options\` (third parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),o.assertIsBoolean(u,{message:({currentType:e,validType:t})=>`Parameter \`reCountAfterSpace\` property of the \`options\` (third parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),t=e.normalizeSpaces(t),!u){let e="",n=0;for(let i=0;i<t.length;i++){n===r&&(e+=p,n=0),e+=t[i],n++}return e}const c=t.split(" "),l=[];let m=[],f=0;for(let e=0;e<c.length;e++){const t=c[e];let n="",i=0;for(let e=0;e<t.length;e++)n+=t[e],i++,i===r&&e<t.length-1&&(n+=p,i=0);m.push(n),f++,f!==r&&e!==c.length-1||(l.push(m.join(p)),m=[],f=0)}return l.join(" ")},exports.formatCurrency=(e,i={})=>{if(!o.isString(e)&&!r.isFinite(e))throw new TypeError(`First parameter (\`value\`) must be of type \`string\` or \`primitive-number\`, but received: \`${o.getPreciseType(e)}\`, with value: \`${a.safeStableStringify(e)}\`.`);o.assertIsPlainObject(i,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const p=!!o.hasOwnProp(i,"decimal")&&i.decimal,u=o.hasOwnProp(i,"totalDecimal")?i.totalDecimal:2,c=!o.hasOwnProp(i,"endDecimal")||i.endDecimal,l=!!o.hasOwnProp(i,"indianFormat")&&i.indianFormat,m=o.hasOwnProp(i,"suffixCurrency")?i.suffixCurrency:"",f=o.hasOwnProp(i,"suffixDecimal")?i.suffixDecimal:"",d=o.hasOwnProp(i,"roundedDecimal")?i.roundedDecimal:"round",y=o.hasOwnProp(i,"negativeFormat")?i.negativeFormat:"dash";let g=o.hasOwnProp(i,"separatorDecimals")?i.separatorDecimals:",",h=o.hasOwnProp(i,"separator")?i.separator:".";if(!(o.isString(h)&&o.isString(g)&&o.isString(m)&&o.isString(f)))throw new TypeError(`Parameter \`separator\`, \`separatorDecimals\`, \`suffixCurrency\` and \`suffixDecimal\` property of the \`options\` (second parameter) must be of type \`string\`, but received: ['separator': \`${o.getPreciseType(h)}\`, 'separatorDecimals': \`${o.getPreciseType(g)}\`, 'suffixCurrency': \`${o.getPreciseType(m)}\`, 'suffixDecimal': \`${o.getPreciseType(f)}\`].`);if(!o.isBoolean(p)||!o.isBoolean(c)||!o.isBoolean(l))throw new TypeError(`Parameter \`decimal\`, \`endDecimal\` and \`indianFormat\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['decimal': \`${o.getPreciseType(p)}\`, 'endDecimal': \`${o.getPreciseType(c)}\`, 'indianFormat': \`${o.getPreciseType(l)}\`].`);if(!n.isInteger(u))throw new TypeError(`Parameter \`totalDecimal\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${o.getPreciseType(u)}\`, with value: \`${a.safeStableStringify(length)}\`.`);if(!1!==d&&"round"!==d&&"ceil"!==d&&"floor"!==d)throw new TypeError(`Parameter \`roundedDecimal\` property of the \`options\` (second parameter) must be of type \`false\` or \`string\` must be one of "round" | "ceil" | "floor", but received: \`${o.getPreciseType(d)}\`, with value: \`${a.safeStableStringify(d)}\`.`);if("abs"!==y&&"brackets"!==y&&"dash"!==y&&!o.isPlainObject(y))throw new TypeError(`Parameter \`negativeFormat\` property of the \`options\` (second parameter) must be of type \`string\` must be one of "abs" | "brackets" | "dash" or \`plain-object\` type, but received: \`${o.getPreciseType(y)}\`, with value: \`${a.safeStableStringify(y)}\`.`);const b=o.isString(e)?t.parseCurrencyString(e):e;if(o.isNaN(b))throw new TypeError("First parameter (`value`) could not be parsed into a valid `number`.");let T="",P="",w=Math.abs(b);const S=Math.pow(10,u);if(d){const e=w*S;switch(d){case"round":w=Math.round(e)/S;break;case"ceil":w=Math.ceil(e)/S;break;case"floor":w=Math.floor(e)/S}}if(d)[T,P]=w.toFixed(u).split("."),P=P??"".padEnd(u,"0");else{const e=String(w).split(".");T=e[0],P=(e[1]||"").slice(0,u).padEnd(u,"0")}let $;if(l?(h=",",g=".",$=(m.trim().length?m:"")+((e,t)=>{const r=e.slice(-3),n=e.slice(0,-3);return n?n.replace(/\B(?=(\d{2})+(?!\d))/g,t)+t+r:r})(T,h)):$=(m.trim().length?m:"")+T.replace(/\B(?=(\d{3})+(?!\d))/g,h),p&&!o.isUndefined(P)&&u>0){let e=g+P;c&&(e+=f),$+=e}if(b<0)if("dash"===y)$="-"+$;else if("brackets"===y)$="("+$+")";else if("abs"===y);else if(o.isPlainObject(y))if(o.hasOwnProp(y,"custom")){const e=y.custom;if(!o.isFunction(e))throw new TypeError(`Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) must be of type function: \`(formatted: string) => string\`, but received: \`${o.getPreciseType(e)}\`.`);const t=e($);s.assertIsString(t,{message:({currentType:e,validType:t})=>`Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) expected return a \`${t}\` type value, but received: \`${e}\`.`}),$=t}else{const e=y.style||"dash",t=!o.isUndefined(y.space)&&y.space;if(o.assertIsBoolean(t,{message:({currentType:e,validType:t})=>`Parameter \`negativeFormat.space\` property of the \`options\` (second parameter) must be of type \`${t} or undefined\`, but received: \`${e}\`.`}),"abs"!==e&&"brackets"!==e&&"dash"!==e)throw new TypeError(`Parameter \`negativeFormat.style\` property of the \`options\` (second parameter) must be of type \`string\` must be of type "abs" | "brackets" | "dash", but received: \`${o.getPreciseType(e)}\`, with value: \`${a.safeStableStringify(e)}\`.`);switch(e){case"dash":$="-"+(t?" ":"")+$;break;case"brackets":$=t?`( ${$} )`:`(${$})`}}return $},exports.formatDateFns=(e,t={})=>{if(o.isNil(e)||!a.isDate(e)&&!o.isNonEmptyString(e))return null;o.isPlainObject(t)||(t={});const{inputFormat:r,locale:n="en",inputLocale:i="en",...s}=t,p=o.hasOwnProp(t,"format")&&o.isNonEmptyString(t.format)?t.format:"dd MMM yyyy - HH:mm:ss";let l;try{if(o.isNonEmptyString(e)&&r&&i){const t=o.isNonEmptyString(i)?"id"===i?u.id:u.enUS:i;l=c.parse(e,r,new Date,{locale:t})}else l=new Date(e);if(o.isNaN(l.getTime()))return null;const t=o.isNonEmptyString(n)?"id"===n?u.id:u.enUS:n;return c.format(l,p,{...s,locale:t})}catch{return null}},exports.formatDateIntl=(e,t)=>{if(o.isNil(e)||!a.isDate(e)&&!o.isNonEmptyString(e))return null;const r=new Date(e);if(o.isNaN(r.getTime()))return null;o.isPlainObject(t)||(t={});const{locale:n="en-US",...i}=t;try{return new Intl.DateTimeFormat(o.isNonEmptyString(n)?n.trim():"en-US",i).format(r)}catch{return null}},exports.formatDateTime=(e,t)=>{if(o.isNil(t)&&(t="YYYY-MM-DD hh:mm:ss"),!o.isString(t))return null;if(o.isNil(e)||!a.isDate(e)&&!o.isNonEmptyString(e))return null;try{const r=new Date(e);if(o.isNaN(r.getTime()))return null;const n=e=>e.toString().padStart(2,"0"),i={YYYY:r.getFullYear().toString(),MM:n(r.getMonth()+1),DD:n(r.getDate()),hh:n(r.getHours()),mm:n(r.getMinutes()),ss:n(r.getSeconds())},s=Object.entries(i).reduce((e,[t,r])=>e.split(t).join(r),t);return s.includes("NaN")?null:s}catch{return null}},exports.formatNumber=(e,t=",")=>{if(!o.isString(e)&&!r.isFinite(e))throw new TypeError(`First parameter (\`value\`) must be of type \`string\` or \`primitive number\`, but received: \`${o.getPreciseType(e)}\`.`);if(!o.isString(t))throw new TypeError(`Second parameter (\`separator\`) must be of type \`string\` or empty as \`undefined\`, but received: \`${o.getPreciseType(t)}\`.`);const n="."===(t=o.isString(t)?t:",")?",":".",i=e.toString().trim(),s=i.lastIndexOf("."),a=i.lastIndexOf(",");let p="";s>a?p=".":a>s&&(p=",");let u=i,c="";if(p){const e=i.split(p);u=e.slice(0,-1).join(p),c=e.slice(-1)[0]}u=u.replace(/[^\d]/g,"");const l=u.replace(/\B(?=(\d{3})+(?!\d))/g,t);return c?`${l}${n}${c}`:l},exports.formatPhoneNumber=function(e,t={}){if(o.isNil(e))return"";if(!o.isString(e)&&!o.isNumber(e))throw new TypeError(`First parameter (\`value\`) must be of type \`string\`, \`number\`, \`null\` or \`undefined\`, but received: \`${o.getPreciseType(e)}\`.`);o.assertIsPlainObject(t,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=!!o.hasOwnProp(t,"takeNumberOnly")&&t.takeNumberOnly,n=!!o.hasOwnProp(t,"checkValidOnly")&&t.checkValidOnly,i=o.hasOwnProp(t,"defaultCountry")?t.defaultCountry:void 0,s=o.hasOwnProp(t,"separator")?t.separator:" ",u=!o.hasOwnProp(t,"prependPlusCountryCode")||t.prependPlusCountryCode,c=o.hasOwnProp(t,"outputFormat")?t.outputFormat:"INTERNATIONAL",l=o.hasOwnProp(t,"openingNumberCountry")?t.openingNumberCountry:"",m=o.hasOwnProp(t,"closingNumberCountry")?t.closingNumberCountry:"";if(!o.isBoolean(r)||!o.isBoolean(n)||!o.isBoolean(u))throw new TypeError(`Parameter \`takeNumberOnly\`, \`checkValidOnly\` and \`prependPlusCountryCode\` property of the \`options\` (second parameter) must be of type \`boolean\` or unset as \`undefined\` value, but received: ['takeNumberOnly': \`${o.getPreciseType(r)}\`, 'checkValidOnly': \`${o.getPreciseType(n)}\`, 'prependPlusCountryCode': \`${o.getPreciseType(u)}\`].`);if(!o.isUndefined(i)&&!p.isSupportedCountry(i))throw new TypeError(`Parameter \`defaultCountry\` property of the \`options\` (second parameter) must be of type \`string\` as \`CountryCode\` (ISO-3166-1 alpha-2) or unset as \`undefined\` value, but received: \`${o.getPreciseType(i)}\`, with value: \`${a.safeStableStringify(i,{keepUndefined:!0})}\`.\n\nSee: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements, for all ISO 3166-1 alpha-2 code.`);if(!["INTERNATIONAL","NATIONAL","RFC3966","E.164"].includes(c))throw new TypeError(`Parameter \`outputFormat\` property of the \`options\` (second parameter) must be of type \`string\` as \`OutputFormat\` ("NATIONAL" | "INTERNATIONAL" | "E.164" | "RFC3966") or unset as \`undefined\` (default value to: \`INTERNATIONAL\`) value, but received: \`${o.getPreciseType(c)}\`, with value: ${a.safeStableStringify(c,{keepUndefined:!0})}.`);if(!o.isString(s)||!o.isString(l)||!o.isString(m))throw new TypeError(`Parameter \`separator\`, \`plusNumberCountry\`, \`openingNumberCountry\` and \`closingNumberCountry\` property of the \`options\` (second parameter) must be of type \`string\` or unset as \`undefined\` value, but received: ['separator': \`${o.getPreciseType(s)}\`,'openingNumberCountry': \`${o.getPreciseType(l)}\`, 'closingNumberCountry': \`${o.getPreciseType(m)}\`].`);o.isString(e)||(e=String(e));const f=((e,t)=>{let r;try{return r=new p.AsYouType(t),r.input(e),r}catch{return void r?.reset()}})(e,i),d=(y=f,!!y?.isValid()&&!!y.getNumber());var y;if(n)return d;if(!d)return"";if(r)return f.getNumber().formatNational().replace(/\D/g,"");const g=f.getNumber().format(c);if("INTERNATIONAL"===c){const[e,...t]=g.split(" "),r=u?e:e.replace(/^\++/,""),n=t.join(s);return o.isNonEmptyString(l)&&o.isNonEmptyString(m)?`${l}${r}${m} ${n}`:`${r} ${n}`}if("NATIONAL"===c){return`${g.split(" ").join(s)}`}return g},exports.getGMTOffset=e=>{try{if(o.isNil(e)||o.isString(e)&&i.isEmptyString(e))e=new Date;else if(!a.isDate(e)&&!o.isNonEmptyString(e))return"0";const t=new Date(e);if(o.isNaN(t.getTime()))return"0";const r=e=>e.toString().padStart(2,"0");let n=t.getTimezoneOffset();const s=n<0?"+":"-";return n=Math.abs(n),`${s}${r(Math.floor(n/60))}${r(n%60)}`}catch{return"0"}},exports.truncateString=(e,t={})=>{if(!o.isNonEmptyString(e))return"";o.assertIsPlainObject(t,{message:({currentType:e,validType:t})=>`Seconds parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=!o.hasOwnProp(t,"trim")||t.trim,p=o.hasOwnProp(t,"length")?t.length:10;let u=o.hasOwnProp(t,"ending")?t.ending:"...";if(!n.isInteger(p))throw new TypeError(`Parameter \`length\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${o.getPreciseType(p)}\`, with value: \`${a.safeStableStringify(p)}\`.`);if(p<1)return"";s.assertIsString(u,{message:({currentType:e,validType:t})=>`Parameter \`ending\` property of the \`options\` (second parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),o.assertIsBoolean(r,{message:({currentType:e,validType:t})=>`Parameter \`trim\` property of the \`options\` (second parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),u=i.isEmptyString(u)?"...":u.trim();const c=r?e.trim():e;if(c.length<=p)return c;const l=c.slice(0,p);return(r?l:l.trimEnd())+u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNonEmptyString as r,isPlainObject as t}from"./chunk-CMW2TBOQ.js";var n=(n,e={trimOnly:!1})=>{if(!r(n))return"";t(e)||(e={});const{trimOnly:i=!1}=e;return i?n.trim():n.replace(/\s+/g,"")};export{n as removeSpaces};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{normalizeSpaces as e}from"./chunk-T2T7K3KR.js";import{parseCurrencyString as t}from"./chunk-IRFL4MAX.js";import{isFinite as r}from"./chunk-3IBQ5MOM.js";import{isInteger as o}from"./chunk-WVSPXFTY.js";import{isEmptyString as n}from"./chunk-W2WNBUDE.js";import{assertIsString as a}from"./chunk-SBKGWRS5.js";import{safeStableStringify as i,isDate as s}from"./chunk-PET42Z7W.js";import{isString as u,getPreciseType as p,assertIsPlainObject as l,hasOwnProp as m,isBoolean as c,isPlainObject as d,isNaN as f,isUndefined as y,isFunction as h,assertIsBoolean as b,isNil as g,isNumber as $,isNonEmptyString as v}from"./chunk-CMW2TBOQ.js";import{isSupportedCountry as T,AsYouType as w}from"libphonenumber-js/max";import{id as N,enUS as C}from"date-fns/locale";import{parse as D,format as E}from"date-fns";var k=(e,n={})=>{if(!u(e)&&!r(e))throw new TypeError(`First parameter (\`value\`) must be of type \`string\` or \`primitive-number\`, but received: \`${p(e)}\`, with value: \`${i(e)}\`.`);l(n,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const s=!!m(n,"decimal")&&n.decimal,g=m(n,"totalDecimal")?n.totalDecimal:2,$=!m(n,"endDecimal")||n.endDecimal,v=!!m(n,"indianFormat")&&n.indianFormat,T=m(n,"suffixCurrency")?n.suffixCurrency:"",w=m(n,"suffixDecimal")?n.suffixDecimal:"",N=m(n,"roundedDecimal")?n.roundedDecimal:"round",C=m(n,"negativeFormat")?n.negativeFormat:"dash";let D=m(n,"separatorDecimals")?n.separatorDecimals:",",E=m(n,"separator")?n.separator:".";if(!(u(E)&&u(D)&&u(T)&&u(w)))throw new TypeError(`Parameter \`separator\`, \`separatorDecimals\`, \`suffixCurrency\` and \`suffixDecimal\` property of the \`options\` (second parameter) must be of type \`string\`, but received: ['separator': \`${p(E)}\`, 'separatorDecimals': \`${p(D)}\`, 'suffixCurrency': \`${p(T)}\`, 'suffixDecimal': \`${p(w)}\`].`);if(!c(s)||!c($)||!c(v))throw new TypeError(`Parameter \`decimal\`, \`endDecimal\` and \`indianFormat\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['decimal': \`${p(s)}\`, 'endDecimal': \`${p($)}\`, 'indianFormat': \`${p(v)}\`].`);if(!o(g))throw new TypeError(`Parameter \`totalDecimal\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${p(g)}\`, with value: \`${i(length)}\`.`);if(!1!==N&&"round"!==N&&"ceil"!==N&&"floor"!==N)throw new TypeError(`Parameter \`roundedDecimal\` property of the \`options\` (second parameter) must be of type \`false\` or \`string\` must be one of "round" | "ceil" | "floor", but received: \`${p(N)}\`, with value: \`${i(N)}\`.`);if("abs"!==C&&"brackets"!==C&&"dash"!==C&&!d(C))throw new TypeError(`Parameter \`negativeFormat\` property of the \`options\` (second parameter) must be of type \`string\` must be one of "abs" | "brackets" | "dash" or \`plain-object\` type, but received: \`${p(C)}\`, with value: \`${i(C)}\`.`);const k=u(e)?t(e):e;if(f(k))throw new TypeError("First parameter (`value`) could not be parsed into a valid `number`.");let F="",S="",O=Math.abs(k);const M=Math.pow(10,g);if(N){const e=O*M;switch(N){case"round":O=Math.round(e)/M;break;case"ceil":O=Math.ceil(e)/M;break;case"floor":O=Math.floor(e)/M}}if(N)[F,S]=O.toFixed(g).split("."),S=S??"".padEnd(g,"0");else{const e=String(O).split(".");F=e[0],S=(e[1]||"").slice(0,g).padEnd(g,"0")}let P;if(v?(E=",",D=".",P=(T.trim().length?T:"")+((e,t)=>{const r=e.slice(-3),o=e.slice(0,-3);return o?o.replace(/\B(?=(\d{2})+(?!\d))/g,t)+t+r:r})(F,E)):P=(T.trim().length?T:"")+F.replace(/\B(?=(\d{3})+(?!\d))/g,E),s&&!y(S)&&g>0){let e=D+S;$&&(e+=w),P+=e}if(k<0)if("dash"===C)P="-"+P;else if("brackets"===C)P="("+P+")";else if("abs"===C);else if(d(C))if(m(C,"custom")){const e=C.custom;if(!h(e))throw new TypeError(`Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) must be of type function: \`(formatted: string) => string\`, but received: \`${p(e)}\`.`);const t=e(P);a(t,{message:({currentType:e,validType:t})=>`Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) expected return a \`${t}\` type value, but received: \`${e}\`.`}),P=t}else{const e=C.style||"dash",t=!y(C.space)&&C.space;if(b(t,{message:({currentType:e,validType:t})=>`Parameter \`negativeFormat.space\` property of the \`options\` (second parameter) must be of type \`${t} or undefined\`, but received: \`${e}\`.`}),"abs"!==e&&"brackets"!==e&&"dash"!==e)throw new TypeError(`Parameter \`negativeFormat.style\` property of the \`options\` (second parameter) must be of type \`string\` must be of type "abs" | "brackets" | "dash", but received: \`${p(e)}\`, with value: \`${i(e)}\`.`);switch(e){case"dash":P="-"+(t?" ":"")+P;break;case"brackets":P=t?`( ${P} )`:`(${P})`}}return P},F=(e,t=",")=>{if(!u(e)&&!r(e))throw new TypeError(`First parameter (\`value\`) must be of type \`string\` or \`primitive number\`, but received: \`${p(e)}\`.`);if(!u(t))throw new TypeError(`Second parameter (\`separator\`) must be of type \`string\` or empty as \`undefined\`, but received: \`${p(t)}\`.`);const o="."===(t=u(t)?t:",")?",":".",n=e.toString().trim(),a=n.lastIndexOf("."),i=n.lastIndexOf(",");let s="";a>i?s=".":i>a&&(s=",");let l=n,m="";if(s){const e=n.split(s);l=e.slice(0,-1).join(s),m=e.slice(-1)[0]}l=l.replace(/[^\d]/g,"");const c=l.replace(/\B(?=(\d{3})+(?!\d))/g,t);return m?`${c}${o}${m}`:c};function S(e,t={}){if(g(e))return"";if(!u(e)&&!$(e))throw new TypeError(`First parameter (\`value\`) must be of type \`string\`, \`number\`, \`null\` or \`undefined\`, but received: \`${p(e)}\`.`);l(t,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=!!m(t,"takeNumberOnly")&&t.takeNumberOnly,o=!!m(t,"checkValidOnly")&&t.checkValidOnly,n=m(t,"defaultCountry")?t.defaultCountry:void 0,a=m(t,"separator")?t.separator:" ",s=!m(t,"prependPlusCountryCode")||t.prependPlusCountryCode,d=m(t,"outputFormat")?t.outputFormat:"INTERNATIONAL",f=m(t,"openingNumberCountry")?t.openingNumberCountry:"",h=m(t,"closingNumberCountry")?t.closingNumberCountry:"";if(!c(r)||!c(o)||!c(s))throw new TypeError(`Parameter \`takeNumberOnly\`, \`checkValidOnly\` and \`prependPlusCountryCode\` property of the \`options\` (second parameter) must be of type \`boolean\` or unset as \`undefined\` value, but received: ['takeNumberOnly': \`${p(r)}\`, 'checkValidOnly': \`${p(o)}\`, 'prependPlusCountryCode': \`${p(s)}\`].`);if(!y(n)&&!T(n))throw new TypeError(`Parameter \`defaultCountry\` property of the \`options\` (second parameter) must be of type \`string\` as \`CountryCode\` (ISO-3166-1 alpha-2) or unset as \`undefined\` value, but received: \`${p(n)}\`, with value: \`${i(n,{keepUndefined:!0})}\`.\n\nSee: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements, for all ISO 3166-1 alpha-2 code.`);if(!["INTERNATIONAL","NATIONAL","RFC3966","E.164"].includes(d))throw new TypeError(`Parameter \`outputFormat\` property of the \`options\` (second parameter) must be of type \`string\` as \`OutputFormat\` ("NATIONAL" | "INTERNATIONAL" | "E.164" | "RFC3966") or unset as \`undefined\` (default value to: \`INTERNATIONAL\`) value, but received: \`${p(d)}\`, with value: ${i(d,{keepUndefined:!0})}.`);if(!u(a)||!u(f)||!u(h))throw new TypeError(`Parameter \`separator\`, \`plusNumberCountry\`, \`openingNumberCountry\` and \`closingNumberCountry\` property of the \`options\` (second parameter) must be of type \`string\` or unset as \`undefined\` value, but received: ['separator': \`${p(a)}\`,'openingNumberCountry': \`${p(f)}\`, 'closingNumberCountry': \`${p(h)}\`].`);u(e)||(e=String(e));const b=((e,t)=>{let r;try{return r=new w(t),r.input(e),r}catch{return void r?.reset()}})(e,n),N=(C=b,!!C?.isValid()&&!!C.getNumber());var C;if(o)return N;if(!N)return"";if(r)return b.getNumber().formatNational().replace(/\D/g,"");const D=b.getNumber().format(d);if("INTERNATIONAL"===d){const[e,...t]=D.split(" "),r=s?e:e.replace(/^\++/,""),o=t.join(a);return v(f)&&v(h)?`${f}${r}${h} ${o}`:`${r} ${o}`}if("NATIONAL"===d){return`${D.split(" ").join(a)}`}return D}var O=(e,t,r,o)=>{if(e.length<=t)return"*".repeat(e.length);const n=e.split(""),a=Math.max(t,Math.ceil(e.length*r)),i=new Set;let s=0;for(;i.size<a;){const t=y(o)?Math.floor(Math.random()*e.length):(o+e.length+31*s)%e.length;i.add(t),s++}for(const e of i)n[e]="*";return n.join("")},M=(e,t={})=>{if(!v(e))return"";l(t,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=m(t,"mode")?t.mode:"fixed";if("random"!==r&&"fixed"!==r)throw new TypeError(`Parameter \`mode\` property of the \`options\` (second parameter) must be one of "fixed" or "random", but received: \`${p(r)}\`, with value: \`${i(r)}\`.`);if(!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e))return"";const[o,n]=e.split("@"),a=n.split(".");if(a.length<2)return"";const[s,...u]=a,c=u.join("."),d=((e,t)=>"fixed"===e?(()=>{let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return Math.abs(e)})():void 0)(r,e),f=o.length<4?1:2,y=s.length<4?1:2;return`${O(o,f,.6,d)}@${O(s,y,.5,d)}.${c.length<=2?c:O(c,1,.4,d)}`};function P(t,r,n={}){if(g(t)||r<=0)return t;if(a(t,{message:({currentType:e,validType:t})=>`First parameter (\`subject\`) must be of type \`${t}\`, but received: \`${e}\`.`}),!o(r))throw new TypeError(`Second parameter (\`limiter\`) must be of type \`integer-number\`, but received: \`${p(r)}\`, with value: \`${i(r)}\`.`);l(n,{message:({currentType:e,validType:t})=>`Third parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const s=m(n,"separator")?n.separator:" ",u=!!m(n,"reCountAfterSpace")&&n.reCountAfterSpace;if(a(s,{message:({currentType:e,validType:t})=>`Parameter \`separator\` property of the \`options\` (third parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),b(u,{message:({currentType:e,validType:t})=>`Parameter \`reCountAfterSpace\` property of the \`options\` (third parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),t=e(t),!u){let e="",o=0;for(let n=0;n<t.length;n++){o===r&&(e+=s,o=0),e+=t[n],o++}return e}const c=t.split(" "),d=[];let f=[],y=0;for(let e=0;e<c.length;e++){const t=c[e];let o="",n=0;for(let e=0;e<t.length;e++)o+=t[e],n++,n===r&&e<t.length-1&&(o+=s,n=0);f.push(o),y++,y!==r&&e!==c.length-1||(d.push(f.join(s)),f=[],y=0)}return d.join(" ")}var A=(e,t={})=>{if(!v(e))return"";l(t,{message:({currentType:e,validType:t})=>`Seconds parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=!m(t,"trim")||t.trim,s=m(t,"length")?t.length:10;let u=m(t,"ending")?t.ending:"...";if(!o(s))throw new TypeError(`Parameter \`length\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${p(s)}\`, with value: \`${i(s)}\`.`);if(s<1)return"";a(u,{message:({currentType:e,validType:t})=>`Parameter \`ending\` property of the \`options\` (second parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),b(r,{message:({currentType:e,validType:t})=>`Parameter \`trim\` property of the \`options\` (second parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),u=n(u)?"...":u.trim();const c=r?e.trim():e;if(c.length<=s)return c;const d=c.slice(0,s);return(r?d:d.trimEnd())+u},I=(e,t={})=>{if(g(e)||!s(e)&&!v(e))return null;d(t)||(t={});const{inputFormat:r,locale:o="en",inputLocale:n="en",...a}=t,i=m(t,"format")&&v(t.format)?t.format:"dd MMM yyyy - HH:mm:ss";let u;try{if(v(e)&&r&&n){const t=v(n)?"id"===n?N:C:n;u=D(e,r,new Date,{locale:t})}else u=new Date(e);if(f(u.getTime()))return null;const t=v(o)?"id"===o?N:C:o;return E(u,i,{...a,locale:t})}catch{return null}},j=(e,t)=>{if(g(e)||!s(e)&&!v(e))return null;const r=new Date(e);if(f(r.getTime()))return null;d(t)||(t={});const{locale:o="en-US",...n}=t;try{return new Intl.DateTimeFormat(v(o)?o.trim():"en-US",n).format(r)}catch{return null}},x=(e,t)=>{if(g(t)&&(t="YYYY-MM-DD hh:mm:ss"),!u(t))return null;if(g(e)||!s(e)&&!v(e))return null;try{const r=new Date(e);if(f(r.getTime()))return null;const o=e=>e.toString().padStart(2,"0"),n={YYYY:r.getFullYear().toString(),MM:o(r.getMonth()+1),DD:o(r.getDate()),hh:o(r.getHours()),mm:o(r.getMinutes()),ss:o(r.getSeconds())},a=Object.entries(n).reduce((e,[t,r])=>e.split(t).join(r),t);return a.includes("NaN")?null:a}catch{return null}},L=e=>{try{if(g(e)||u(e)&&n(e))e=new Date;else if(!s(e)&&!v(e))return"0";const t=new Date(e);if(f(t.getTime()))return"0";const r=e=>e.toString().padStart(2,"0");let o=t.getTimezoneOffset();const a=o<0?"+":"-";return o=Math.abs(o),`${a}${r(Math.floor(o/60))}${r(o%60)}`}catch{return"0"}};export{M as censorEmail,P as chunkString,k as formatCurrency,I as formatDateFns,j as formatDateIntl,x as formatDateTime,F as formatNumber,S as formatPhoneNumber,L as getGMTOffset,A as truncateString};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-6JFZL7YE.cjs"),i=require("./chunk-PZQ6I4JJ.cjs"),r=require("tailwind-merge-v3"),s=require("tailwind-merge-v4");function t(e){var i,r,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(i=0;i<o;i++)e[i]&&(r=t(e[i]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}var o=function(){for(var e,i,r=0,s="",o=arguments.length;r<o;r++)(e=arguments[r])&&(i=t(e))&&(s&&(s+=" "),s+=i);return s},n=e=>{i.isPlainObject(e)||(e={});let{config:r,prefix:s,extend:t,override:o,cacheSize:n,experimentalParseClassName:a}=e;i.isPlainObject(r)||(r={}),i.isPlainObject(t)||(t={}),i.isPlainObject(o)||(o={}),i.isNumber(n)||(n=void 0),i.isNonEmptyString(s)||(s=void 0),i.isFunction(a)||(a=void 0);return{config:r,override:o,cacheSize:n,prefix:s,experimentalParseClassName:a,theme:i.hasOwnProp(t,"theme")?t.theme:{},classGroups:i.hasOwnProp(t,"classGroups")?t.classGroups:{},conflictingClassGroupModifiers:i.hasOwnProp(t,"conflictingClassGroupModifiers")?t.conflictingClassGroupModifiers:{},conflictingClassGroups:i.hasOwnProp(t,"conflictingClassGroups")?t.conflictingClassGroups:{},orderSensitiveModifiers:i.hasOwnProp(t,"orderSensitiveModifiers")&&i.isNonEmptyArray(t.orderSensitiveModifiers)?t.orderSensitiveModifiers:[]}},a=r.getDefaultConfig(),c=(e={})=>{i.isPlainObject(e)||(e={});const{cacheSize:s,classGroups:t,config:o,conflictingClassGroupModifiers:c,conflictingClassGroups:l,override:f,prefix:p,theme:u,experimentalParseClassName:d}=n(e);return r.extendTailwindMerge({prefix:p??o.prefix,cacheSize:s||a.cacheSize,experimentalParseClassName:d,override:f,extend:{conflictingClassGroupModifiers:{...a.conflictingClassGroupModifiers,...c},theme:{...a.theme,...u},conflictingClassGroups:{...a.conflictingClassGroups,...l},classGroups:{...a.classGroups,...t,"text-shadow":["","-sm","-md","-lg","-xl","-xxl","-none","-default"].map(e=>`text-shadow${e}`),"font-size":Object.keys({...o.theme?.fontSize||{},...o.theme?.extend?.fontSize||{}}).map(e=>`text-${e}`)}}})},l=s.getDefaultConfig(),f=(e={})=>{i.isPlainObject(e)||(e={});const{cacheSize:r,classGroups:t,config:o,conflictingClassGroupModifiers:a,conflictingClassGroups:c,orderSensitiveModifiers:f,override:p,prefix:u,theme:d,experimentalParseClassName:m}=n(e);return s.extendTailwindMerge({prefix:u||o.prefix,cacheSize:r||l.cacheSize,experimentalParseClassName:m,override:p,extend:{conflictingClassGroupModifiers:{...l.conflictingClassGroupModifiers,...a},theme:{...l.theme,...d},conflictingClassGroups:{...l.conflictingClassGroups,...c},orderSensitiveModifiers:[...l.orderSensitiveModifiers,...f],classGroups:{...l.classGroups,...t,"text-shadow":["","-sm","-md","-lg","-xl","-xxl","-none","-default"].map(e=>`text-shadow${e}`),"font-size":Object.keys({...o.theme?.fontSize||{},...o.theme?.extend?.fontSize||{}}).map(e=>`text-${e}`)}}})},p=c(),u=f();exports.cnV3=(...e)=>p(o(...e)),exports.cnV4=(...e)=>u(o(...e)),exports.customCnV3=(e,...r)=>{if(!i.isFunction(e))throw new TypeError(`first Parameter (\`customTwMergeV3\`) must be of type \`function\`, but received: \`${i.getPreciseType(e)}\`.`);return e(o(...r))},exports.customCnV4=(e,...r)=>{if(!i.isFunction(e))throw new TypeError(`first Parameter (\`customTwMergeV4\`) must be of type \`function\`, but received: \`${i.getPreciseType(e)}\`.`);return e(o(...r))},exports.shouldForwardProp=i=>(e.assertIsArray(i,{message:({currentType:e,validType:i})=>`First parameter (\`props\`) must be of type \`${i}\`, but received: \`${e}\`.`}),e=>!i.map(e=>e.toString()).includes(e.toString())),exports.twMergeDefaultV3=c,exports.twMergeDefaultV4=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-PZQ6I4JJ.cjs");exports.isEmptyArray=t=>!e.isArray(t)||0===t.length,exports.isEmptyObject=function(t,r={}){if(!e.isObject(t))return!0;e.assertIsPlainObject(r,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const s=!!e.hasOwnProp(r,"checkSymbols")&&r.checkSymbols;e.assertIsBoolean(s,{message:({currentType:e,validType:t})=>`Parameter \`checkSymbols\` property of the \`options\` (second parameter) must be of type \`${t}\`, but received: \`${e}\`.`});const c=0===Object.keys(t).length;return s?c&&0===Object.getOwnPropertySymbols(t).length:c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../chunk-
|
|
1
|
+
"use strict";var e=require("../chunk-F6IPNNSJ.cjs");require("../chunk-CAH33WOQ.cjs");var r=require("../chunk-NRF6LWBC.cjs");require("../chunk-HQWOFR56.cjs");var t=require("../chunk-5KJFVIQT.cjs");require("../chunk-V45XJKHW.cjs"),require("../chunk-E55EQK2U.cjs"),require("../chunk-HYRQMTRH.cjs");var n=require("../chunk-FJZGG54N.cjs");require("../chunk-JBQMXC5I.cjs"),require("../chunk-ZETAZZLD.cjs"),require("../chunk-6JFZL7YE.cjs"),require("../chunk-BAV5T2E3.cjs");var o=require("../chunk-T7PU2V7X.cjs");require("../chunk-UDA26MCU.cjs"),require("../chunk-PZQ6I4JJ.cjs"),Object.defineProperty(exports,"convertType",{enumerable:!0,get:function(){return e.convertType}}),Object.defineProperty(exports,"dedupeArray",{enumerable:!0,get:function(){return e.dedupeArray}}),Object.defineProperty(exports,"removeObjectPaths",{enumerable:!0,get:function(){return e.removeObjectPaths}}),Object.defineProperty(exports,"toBooleanContent",{enumerable:!0,get:function(){return e.toBooleanContent}}),Object.defineProperty(exports,"toBooleanContentDeep",{enumerable:!0,get:function(){return e.toBooleanContentDeep}}),Object.defineProperty(exports,"toBooleanExplicit",{enumerable:!0,get:function(){return e.toBooleanExplicit}}),Object.defineProperty(exports,"toBooleanLoose",{enumerable:!0,get:function(){return e.toBooleanLoose}}),Object.defineProperty(exports,"toNumberArrayUnRecursive",{enumerable:!0,get:function(){return e.toNumberArrayUnRecursive}}),Object.defineProperty(exports,"toNumberDeep",{enumerable:!0,get:function(){return e.toNumberDeep}}),Object.defineProperty(exports,"toStringDeep",{enumerable:!0,get:function(){return e.toStringDeep}}),Object.defineProperty(exports,"toStringDeepForce",{enumerable:!0,get:function(){return e.toStringDeepForce}}),Object.defineProperty(exports,"filterNilArray",{enumerable:!0,get:function(){return r.filterNilArray}}),Object.defineProperty(exports,"toStringArrayUnRecursive",{enumerable:!0,get:function(){return r.toStringArrayUnRecursive}}),Object.defineProperty(exports,"parseCurrencyString",{enumerable:!0,get:function(){return t.parseCurrencyString}}),Object.defineProperty(exports,"cleanParsedData",{enumerable:!0,get:function(){return n.cleanParsedData}}),Object.defineProperty(exports,"extractDigits",{enumerable:!0,get:function(){return n.extractDigits}}),Object.defineProperty(exports,"parseCustomDate",{enumerable:!0,get:function(){return n.parseCustomDate}}),Object.defineProperty(exports,"safeJsonParse",{enumerable:!0,get:function(){return n.safeJsonParse}}),Object.defineProperty(exports,"safeStableStringify",{enumerable:!0,get:function(){return o.safeStableStringify}});
|