@rzl-zone/utils-js 3.2.5-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.
Files changed (173) hide show
  1. package/README.md +16 -20
  2. package/dist/NumberRangeUnion-B6bhM2s7.d.ts +33 -0
  3. package/dist/{any-BmdI8UbK.d.ts → any-v4TsK9ES.d.ts} +25 -26
  4. package/dist/{arrays-normalize-recursive-CnjYJ9xg.d.ts → arrays-normalize-recursive-BqmVuFlD.d.ts} +20 -20
  5. package/dist/assertions/index.cjs +1 -1
  6. package/dist/assertions/index.d.ts +96 -70
  7. package/dist/assertions/index.js +1 -1
  8. package/dist/chunk-2CQX5CBG.js +1 -0
  9. package/dist/chunk-2IOOEY45.cjs +1 -0
  10. package/dist/chunk-3IBQ5MOM.js +1 -0
  11. package/dist/{chunk-OGPPP2S3.js → chunk-3VA554KW.js} +1 -1
  12. package/dist/{chunk-FV7SEBKD.cjs → chunk-5757UBXJ.cjs} +1 -1
  13. package/dist/{chunk-MTUBDVJ2.js → chunk-5IGC6PBH.js} +1 -1
  14. package/dist/{chunk-O7UT5AN3.cjs → chunk-5KJFVIQT.cjs} +1 -1
  15. package/dist/chunk-6JFCSH7J.js +1 -0
  16. package/dist/{chunk-VHAPTHEA.cjs → chunk-6JFZL7YE.cjs} +1 -1
  17. package/dist/chunk-7ODAAXX5.cjs +1 -0
  18. package/dist/{chunk-6C3ATUGM.cjs → chunk-CAH33WOQ.cjs} +1 -1
  19. package/dist/{chunk-ECRNH4FW.js → chunk-CKTLUNWX.js} +1 -1
  20. package/dist/chunk-CMW2TBOQ.js +1 -0
  21. package/dist/chunk-D3ENH7H6.cjs +1 -0
  22. package/dist/{chunk-3YCFMGRB.js → chunk-DEZZUYE2.js} +1 -1
  23. package/dist/chunk-DWF2R5GD.cjs +1 -0
  24. package/dist/chunk-E55EQK2U.cjs +1 -0
  25. package/dist/chunk-E74U6CYP.cjs +1 -0
  26. package/dist/{chunk-XC3QHAK2.cjs → chunk-EL6A35UR.cjs} +1 -1
  27. package/dist/chunk-F6IPNNSJ.cjs +1 -0
  28. package/dist/chunk-FJZGG54N.cjs +1 -0
  29. package/dist/chunk-FWCKOJZM.js +1 -0
  30. package/dist/{chunk-IMCLPT5V.cjs → chunk-FWHNWL2P.cjs} +1 -1
  31. package/dist/chunk-GGEADHZO.js +1 -0
  32. package/dist/{chunk-IRGE5W7L.js → chunk-GQR4R5WY.js} +1 -1
  33. package/dist/chunk-H66AC7GK.cjs +1 -0
  34. package/dist/{chunk-M47QIBXI.cjs → chunk-HQWOFR56.cjs} +1 -1
  35. package/dist/{chunk-VCFXNV3Q.cjs → chunk-HYRQMTRH.cjs} +1 -1
  36. package/dist/{chunk-EUANTHVN.js → chunk-IRFL4MAX.js} +1 -1
  37. package/dist/{chunk-GGWPB23G.cjs → chunk-IVL7CKVH.cjs} +1 -1
  38. package/dist/chunk-IZPBKKPO.js +1 -0
  39. package/dist/chunk-JBQMXC5I.cjs +1 -0
  40. package/dist/chunk-JEQEF5WD.js +1 -0
  41. package/dist/chunk-JMJQCN74.js +1 -0
  42. package/dist/chunk-JYQTCICM.js +1 -0
  43. package/dist/chunk-KVAL5PAG.cjs +1 -0
  44. package/dist/chunk-LS6U7FAY.cjs +1 -0
  45. package/dist/chunk-NBZWMBO6.js +1 -0
  46. package/dist/chunk-NRF6LWBC.cjs +1 -0
  47. package/dist/chunk-OI5XKNZO.js +1 -0
  48. package/dist/chunk-OYTYSY7G.js +1 -0
  49. package/dist/chunk-PET42Z7W.js +1 -0
  50. package/dist/chunk-PZQ6I4JJ.cjs +1 -0
  51. package/dist/chunk-QBKAEVYG.js +1 -0
  52. package/dist/{chunk-YV3K2EKJ.js → chunk-RIPKY4RU.js} +1 -1
  53. package/dist/chunk-RZW35UN5.cjs +1 -0
  54. package/dist/chunk-SBFNXGTJ.js +1 -0
  55. package/dist/{chunk-T4CIAKEK.js → chunk-SBKGWRS5.js} +1 -1
  56. package/dist/{chunk-5Z2G23WP.js → chunk-SIM77PU4.js} +1 -1
  57. package/dist/chunk-T2T7K3KR.js +1 -0
  58. package/dist/chunk-T7PU2V7X.cjs +1 -0
  59. package/dist/chunk-V45XJKHW.cjs +1 -0
  60. package/dist/chunk-W2WNBUDE.js +1 -0
  61. package/dist/chunk-XABCB3Y7.cjs +1 -0
  62. package/dist/chunk-XEDXFSGI.js +1 -0
  63. package/dist/chunk-YKPSRP5G.js +1 -0
  64. package/dist/chunk-YLA3DURS.cjs +1 -0
  65. package/dist/chunk-ZETAZZLD.cjs +1 -0
  66. package/dist/conversions/index.cjs +1 -1
  67. package/dist/conversions/index.d.ts +515 -321
  68. package/dist/conversions/index.js +1 -1
  69. package/dist/events/index.cjs +1 -1
  70. package/dist/events/index.d.ts +25 -20
  71. package/dist/events/index.js +1 -1
  72. package/dist/{extends-Bk_SBGdT.d.ts → extends-DtdRjDyU.d.ts} +63 -87
  73. package/dist/{formatting → formatters}/index.cjs +1 -1
  74. package/dist/formatters/index.d.ts +2106 -0
  75. package/dist/formatters/index.js +1 -0
  76. package/dist/generators/index.cjs +1 -0
  77. package/dist/{generator → generators}/index.d.ts +57 -59
  78. package/dist/generators/index.js +1 -0
  79. package/dist/{if-CvT4R7Kh.d.ts → if-ChM35c_q.d.ts} +6 -5
  80. package/dist/index.d.ts +14 -0
  81. package/dist/{is-array--YjXV-Wx.d.ts → is-array-BJeHxPM3.d.ts} +287 -542
  82. package/dist/{isPlainObject-BVhBAPHX.d.ts → isPlainObject-DGJkcFYw.d.ts} +6 -6
  83. package/dist/{never-BfayMBF9.d.ts → never-D89PbPh5.d.ts} +10 -19
  84. package/dist/next/index.cjs +1 -1
  85. package/dist/next/index.d.ts +15 -12
  86. package/dist/next/index.js +1 -1
  87. package/dist/next/server/index.cjs +1 -1
  88. package/dist/next/server/index.d.ts +1 -1
  89. package/dist/next/server/index.js +1 -1
  90. package/dist/{nils-DMz3kU7M.d.ts → nils-CO8zLHSB.d.ts} +39 -65
  91. package/dist/operations/index.cjs +1 -1
  92. package/dist/operations/index.d.ts +4 -4
  93. package/dist/operations/index.js +1 -1
  94. package/dist/or-C6qzKt2I.d.ts +82 -0
  95. package/dist/override-CL2olHE5.d.ts +59 -0
  96. package/dist/parsers/index.cjs +1 -1
  97. package/dist/parsers/index.js +1 -1
  98. package/dist/pick-BSMX6Xe2.d.ts +15 -0
  99. package/dist/predicates/index.cjs +1 -1
  100. package/dist/predicates/index.d.ts +425 -106
  101. package/dist/predicates/index.js +1 -1
  102. package/dist/prettify-3o8_Kw6b.d.ts +564 -0
  103. package/dist/promises/index.cjs +1 -0
  104. package/dist/promises/index.d.ts +107 -0
  105. package/dist/promises/index.js +1 -0
  106. package/dist/promises-LU7K00H0.d.ts +72 -0
  107. package/dist/rzl-utils.global.js +1 -1
  108. package/dist/{string-XA-til3C.d.ts → string-B1jlOnws.d.ts} +82 -121
  109. package/dist/strings/index.cjs +1 -1
  110. package/dist/strings/index.d.ts +209 -210
  111. package/dist/strings/index.js +1 -1
  112. package/dist/tailwind/index.cjs +1 -1
  113. package/dist/tailwind/index.d.ts +23 -17
  114. package/dist/tailwind/index.js +1 -1
  115. package/dist/types/index.d.ts +899 -1181
  116. package/dist/urls/index.cjs +1 -1
  117. package/dist/urls/index.d.ts +113 -108
  118. package/dist/urls/index.js +1 -1
  119. package/package.json +33 -40
  120. package/dist/NumberRangeUnion-DC-C3_Kq.d.ts +0 -26
  121. package/dist/chunk-2HSNUPEO.cjs +0 -1
  122. package/dist/chunk-4Z75R3IT.cjs +0 -1
  123. package/dist/chunk-AJ25PWXX.cjs +0 -1
  124. package/dist/chunk-BHIBDDQF.js +0 -1
  125. package/dist/chunk-CE4JI2YB.js +0 -1
  126. package/dist/chunk-CMJ6UYWW.cjs +0 -1
  127. package/dist/chunk-D3VSHABU.cjs +0 -1
  128. package/dist/chunk-DG2GWBTS.cjs +0 -1
  129. package/dist/chunk-EKS4IZJR.cjs +0 -1
  130. package/dist/chunk-EOZKYR5S.cjs +0 -1
  131. package/dist/chunk-EW3I4O7X.js +0 -1
  132. package/dist/chunk-F3E77L46.js +0 -1
  133. package/dist/chunk-G5LXIEFO.js +0 -0
  134. package/dist/chunk-GVWGQNLF.js +0 -1
  135. package/dist/chunk-H3FXL4DU.cjs +0 -1
  136. package/dist/chunk-HHPDLSX2.cjs +0 -1
  137. package/dist/chunk-JARPXKBM.cjs +0 -1
  138. package/dist/chunk-JFJUPYDT.cjs +0 -1
  139. package/dist/chunk-JLP56WSM.js +0 -1
  140. package/dist/chunk-K3MV4AIN.cjs +0 -1
  141. package/dist/chunk-KOVO72OM.js +0 -1
  142. package/dist/chunk-LJ4M3VGE.js +0 -1
  143. package/dist/chunk-LJVGJLP4.js +0 -1
  144. package/dist/chunk-MISCBZJC.js +0 -1
  145. package/dist/chunk-MMSYCIJ2.cjs +0 -1
  146. package/dist/chunk-OLPKAX7F.cjs +0 -1
  147. package/dist/chunk-ORZFHBEY.js +0 -1
  148. package/dist/chunk-OWV2P376.js +0 -1
  149. package/dist/chunk-RV2WK5E6.js +0 -1
  150. package/dist/chunk-SBF43G3B.cjs +0 -1
  151. package/dist/chunk-X74TUJSE.cjs +0 -1
  152. package/dist/chunk-XLDAIZRK.js +0 -1
  153. package/dist/chunk-XZJ7C4N6.js +0 -1
  154. package/dist/chunk-ZHV5ZYVN.cjs +0 -1
  155. package/dist/chunk-ZL7J6GTP.js +0 -1
  156. package/dist/chunk-ZTCLKKMB.js +0 -1
  157. package/dist/env/index.cjs +0 -1
  158. package/dist/env/index.d.ts +0 -16
  159. package/dist/env/index.js +0 -1
  160. package/dist/formatting/index.d.ts +0 -950
  161. package/dist/formatting/index.js +0 -1
  162. package/dist/generator/index.cjs +0 -1
  163. package/dist/generator/index.js +0 -1
  164. package/dist/omit-VvmIsZmX.d.ts +0 -28
  165. package/dist/prettify-C4xLcYOP.d.ts +0 -353
  166. package/dist/promise/index.cjs +0 -1
  167. package/dist/promise/index.d.ts +0 -31
  168. package/dist/promise/index.js +0 -1
  169. package/dist/type-data-DDs-u2kq.d.ts +0 -261
  170. /package/dist/{chunk-5C2SMIGX.cjs → chunk-BAV5T2E3.cjs} +0 -0
  171. /package/dist/{chunk-MC3LXMCQ.js → chunk-L5RDAVVH.js} +0 -0
  172. /package/dist/{chunk-J2RGTPGK.cjs → chunk-VJDDGRIK.cjs} +0 -0
  173. /package/dist/{chunk-FIAAX3UE.js → chunk-YWHHVDT4.js} +0 -0
File without changes
@@ -1 +0,0 @@
1
- import{isURL as e}from"./chunk-ONZFBJVW.js";import{isTypedArray as r}from"./chunk-MTUBDVJ2.js";import{isEqual as t,isEmptyArray as n,isRegExp as o,baseDeepEqual as i}from"./chunk-ZTCLKKMB.js";import{parseCurrencyString as u}from"./chunk-EUANTHVN.js";import{isEmptyString as a}from"./chunk-KOVO72OM.js";import{assertIsString as s}from"./chunk-T4CIAKEK.js";import{safeStableStringify as f,isDate as c,isMap as p}from"./chunk-BHIBDDQF.js";import{isArray as m,getPreciseType as l,assertIsBoolean as h,isNonEmptyString as y,assertIsPlainObject as g,isObjectOrArray as b,isFunction as d,isString as v,isNumber as T,isSymbol as $,isSet as j,isPlainObject as w,isNil as N,isBoolean as S,isBuffer as k,isNaN as O,isUndefined as E,isObject as A,isNull as M}from"./chunk-EW3I4O7X.js";var P=(e,r,n=!1)=>{if(!m(e)||!m(r))throw new TypeError(`Parameters \`array1\` and \`array2\` property of the \`options\` (second parameter) must be of type \`array\`, but received: ['array1': \`${l(e)}\`, 'array2': \`${l(r)}\`].`);if(h(n,{message:({currentType:e,validType:r})=>`Third parameter \`ignoreOrder\` must be of type \`${r}\`, but received: \`${e}\`.`}),!t(e.length,r.length))return!1;const o=e=>{if(!m(e))return e;return e.map(e=>m(e)?o(e):e).sort((e,r)=>{const t=f(e),n=f(r);return t<n?-1:t>n?1:0})},i=n?o(e):e,u=n?o(r):r;return!!t(i.length,u.length)&&i.every((e,r)=>f(e)===f(u[r]))},x=(e,r)=>t(e,r),R=(r,t)=>{if(!e(r)||!e(t))throw new TypeError("Parameters `urlA` and `urlB` (first and second parameter) must be instance of URL.");return r.protocol+"//"+r.host+r.pathname==t.protocol+"//"+t.host+t.pathname},z=(r,t)=>{if(!e(r)||!e(t))throw new TypeError("Parameters `urlA` and `urlB` (first and second parameter) must be instance of URL.");return r.protocol+"//"+r.host+r.pathname+r.search==t.protocol+"//"+t.host+t.pathname+t.search},B=(e,r,t={})=>{if(!y(e)||!m(r))return!1;g(t,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const{exactMatch:n=!1,flags:o="i"}=t;h(n,{message:({currentType:e,validType:r})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),s(o,{message:({currentType:e,validType:r})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const i=r.filter(e=>y(e)).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));return 0!==i.length&&i.every(r=>new RegExp(n?`(?<!\\S)${r}(?!\\S)`:r,o.includes("u")?o:o+"u").test(e))},I=(e,r,t={})=>{if(!y(e)||!m(r))return!1;g(t,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const{exactMatch:n=!1,flags:o="i"}=t;h(n,{message:({currentType:e,validType:r})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),s(o,{message:({currentType:e,validType:r})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const i=r.filter(e=>y(e)).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));if(0===i.length)return!1;const u=n?`(?<!\\S)(${i.join("|")})(?!\\S)`:`(${i.join("|")})`;return new RegExp(u,o.includes("u")?o:o+"u").test(e)};function K(e){const r=typeof e;return"string"===r||"number"===r||"symbol"===r}var W=(e,r)=>{if(!b(e))return!1;if(!K(r))throw new TypeError(`Second Parameter (\`key\`) must be of type \`string\`, \`number\` or \`symbol\`, but received: \`${l(r)}\`.`);return!!Object.prototype.hasOwnProperty.call(e,r)||(m(e)?e.some(e=>W(e,r)):Object.values(e).some(e=>b(e)&&W(e,r)))},U=(e,r)=>{if(!m(e)||!m(r)||n(e)||n(r))return!1;const t=new Set(e);return r.some(e=>t.has(e))},F=e=>"[object Arguments]"===Object.prototype.toString.call(e);function V(e){return"number"==typeof e&&e>-1&&Number.isInteger(e)&&e<=Number.MAX_SAFE_INTEGER}function Z(e){return!d(e)&&b(e)&&V(null==e?void 0:e.length)}function C(e){return b(e)&&V(e.length)}var D=e=>{if(!v(e)&&!T(e))return!1;return 0!==u(e.toString())||"0"===e.toString().trim()},L=(e,r)=>{if("number"==typeof e&&"number"==typeof r&&Number.isNaN(e)&&Number.isNaN(r))return!0;if(e===r)return!0;if(typeof e!=typeof r)return!1;if(c(e)&&c(r))return e.getTime()===r.getTime();if(o(e)&&o(r))return e.toString()===r.toString();if($(e)&&$(r))return e.toString()===r.toString();if(j(e)&&j(r)){if(e.size!==r.size)return!1;const t=Array.from(r),n=new Set;for(const r of e){let e=!1;for(let o=0;o<t.length;o++)if(!n.has(o)&&L(r,t[o])){n.add(o),e=!0;break}if(!e)return!1}return!0}if(p(e)&&p(r)){if(e.size!==r.size)return!1;const t=Array.from(r),n=new Set;for(const[r,o]of e){let e=!1;for(let i=0;i<t.length;i++){if(n.has(i))continue;const[u,a]=t[i];if(L(r,u)&&L(o,a)){n.add(i),e=!0;break}}if(!e)return!1}return!0}if(m(e)&&m(r))return e.length===r.length&&e.every((e,t)=>L(e,r[t]));if(b(e)&&b(r)&&e&&r){if(m(e)!==m(r))return!1;const t=Object.keys(e),n=Object.keys(r);return t.length===n.length&&t.every(t=>L(e[t],r[t]))}return!1};function _(e){return!!e&&"object"==typeof e&&1===(null==e?void 0:e.nodeType)&&!w(e)}function H(e){return!!N(e)||(!!(S(e)||T(e,{includeNaN:!0})||$(e))||(d(e)?0===Object.keys(e).length:v(e)||m(e)||F(e)||r(e)?0===e.length:p(e)||j(e)?0===e.size:k(e)?0===e.length:!!w(e)&&0===Object.keys(e).length))}var J=e=>{if(v(e))return a(e);if(T(e))return O(e);if(m(e))return n(e)||e.every(J);if(b(e)){const r=Object.keys(e),t=Object.getOwnPropertySymbols(e);return 0===r.length&&0===t.length||[...r,...t].every(r=>J(e[r]))}return!e};function X(e,r,t){return i(e,r,t,new WeakMap)}function G(e,r,t){return q(e,r,t)}function Q(e,r){return e===r||0===e&&0===r||Number.isNaN(e)&&Number.isNaN(r)}function q(e,r,t){if(e===r)return!0;if(!b(r))return Q(e,r);if(!b(e))return!1;const n=Reflect.ownKeys(r).filter(e=>!(m(r)&&"length"===e));for(const o of n){if(!(o in e))return!1;const n=e[o],i=r[o],u=null==t?void 0:t(n,i,o,e,r);if(E(u)){if(b(n)&&b(i)){if(!G(n,i,t))return!1}else if(!Q(n,i))return!1}else if(!u)return!1}return!0}function Y(e,r){return q(e,r)}var ee=Function.prototype.toString,re=/\{\s*\[native code\]\s*\}/;function te(e){if(!d(e))return!1;try{const r=ee.call(e);return re.test(r)}catch{return!1}}function ne(e){return!N(e)&&(b(e)||d(e))}function oe(e){return"number"==typeof e&&Number.isSafeInteger(e)}var ie=e=>{if(!y(e))return!1;let r;try{r=decodeURIComponent(e)}catch{return!1}if(!r.startsWith("http://")&&!r.startsWith("https://"))return!1;return new RegExp(/^https?:\/\/(?:localhost(?::\d+)?(?:[\/?#][^\s]*)?|(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?::\d+)?(?:[\/?#][^\s]*)?)$/).test(r)};function ue(e){return A(e)&&!M(e)&&e instanceof WeakMap}export{P as areArraysEqual,x as areObjectsEqual,R as areURLsEqualPath,z as areURLsIdentical,U as arrayHasAnyMatch,W as doesKeyExist,F as isArguments,Z as isArrayLike,C as isArrayLikeObject,D as isCurrencyLike,L as isDeepEqual,_ as isElement,H as isEmpty,J as isEmptyDeep,X as isEqualWith,V as isLength,Y as isMatch,G as isMatchWith,te as isNative,ne as isObjectLoose,K as isPropertyKey,oe as isSafeInteger,ie as isValidURL,ue as isWeakMap,B as textContainsAll,I as textContainsAny};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./chunk-JARPXKBM.cjs"),r=require("./chunk-VHAPTHEA.cjs"),t=require("./chunk-CMJ6UYWW.cjs"),i=require("./chunk-ZHV5ZYVN.cjs"),s=require("./chunk-UDA26MCU.cjs"),n=require("./chunk-D3VSHABU.cjs");function a(r,t){if(!1!==t&&"stringOrNumber"!==t&&"primitives"!==t&&"all"!==t)throw new TypeError(`Second parameter \`forceToString\` must be of type \`false\` or \`string\` with value one of "stringOrNumber" | "primitives" | "all", but received: \`${n.getPreciseType(t)}\`, with value: \`${i.safeStableStringify(t)}\`.`);if(n.isNaN(r))return"primitives"===t||"all"===t?"NaN":NaN;if(n.isString(r)||n.isNumber(r))return"stringOrNumber"===t||"primitives"===t||"all"===t?String(r):r;if(n.isBoolean(r)||s.isBigInt(r)||n.isNil(r))return"primitives"===t||"all"===t?String(r):r;if(n.isSymbol(r))return"all"===t?r.toString():r;if(n.isFunction(r))return"all"===t?r.toString():r;if(n.isArray(r))return r.map(e=>a(e,t));if(n.isObjectOrArray(r)){if(i.isDate(r))return"all"===t?r.toISOString():r;if(e.isRegExp(r))return"all"===t?r.toString():r;if(n.isError(r)||r instanceof Promise)return"all"===t?r.toString():r;if(n.isSet(r))return"all"===t?[...r].map(e=>a(e,t)):r;if(i.isMap(r))return"all"===t?[...r.entries()].map(([e,r])=>[a(e,t),a(r,t)]):r;const s={};if(n.isObject(r))for(const e of Object.keys(r))s[e]=a(r[e],t);return s}return r}function o(r){if(n.isNil(r))return;if(!n.isArray(r))return[];return r.reduce((r,t)=>{if(!n.isNil(t))if(n.isArray(t)){const i=o(t);i&&!e.isEmptyArray(i)&&r.push(i)}else r.push(t);return r},[])}exports.dedupeArray=(t,s={})=>{r.assertIsArray(t,{message:({currentType:e,validType:r})=>`First parameter (\`inputArray\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`}),n.assertIsPlainObject(s,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const o=!!n.hasOwnProp(s,"flatten")&&s.flatten,u=!!n.hasOwnProp(s,"forceToString")&&s.forceToString;if(!1!==u&&"stringOrNumber"!==u&&"primitives"!==u&&"all"!==u)throw new TypeError(`Parameter \`forceToString\` property of the \`options\` (second parameter) must be of type \`false\` or \`string\` with value one of "stringOrNumber" | "primitives" | "all", but received: \`${n.getPreciseType(u)}\`, with value: \`${i.safeStableStringify(u)}\`.`);n.assertIsBoolean(o,{message:({currentType:e,validType:r})=>`Parameter \`flatten\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const l=r=>{const t=[];return r.reduce((r,i)=>{const s=n.isArray(i)?l(i):a(i,u);return t.some(r=>e.isEqual(r,s))||(t.push(s),r.push(s)),r},[])},p=e=>n.isArray(e)?e.flatMap(p):n.isSet(e)?[...e].flatMap(p):i.isMap(e)?[...e.values()].flatMap(p):[e];return l(o?p(t):t)},exports.filterNilArray=o,exports.toStringArrayUnRecursive=function(e,r={}){n.assertIsPlainObject(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const i=!n.hasOwnProp(r,"removeInvalidValue")||r.removeInvalidValue;if(n.assertIsBoolean(i,{message:({currentType:e,validType:r})=>`Parameter \`removeInvalidValue\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),n.isArray(e)){const r=Array.from(e,e=>n.isString(e)||t.isFinite(e)||n.isBoolean(e)||s.isBigInt(e)?String(e):n.isNull(e)?null:void 0);return i?o(r):r}},exports.toStringDeepForce=a;
@@ -1 +0,0 @@
1
- "use strict";var e=require("./chunk-O7UT5AN3.cjs"),t=require("./chunk-CMJ6UYWW.cjs"),r=require("./chunk-2HSNUPEO.cjs"),n=require("./chunk-4Z75R3IT.cjs"),i=require("./chunk-VCFXNV3Q.cjs"),a=require("./chunk-DVMHRLKP.cjs"),s=require("./chunk-ZHV5ZYVN.cjs"),o=require("./chunk-D3VSHABU.cjs"),p=require("date-fns/locale"),c=require("date-fns"),l=(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};var u=(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,m=(e,t,r,n)=>{if(e.length<=t)return"*".repeat(e.length);const i=e.split(""),a=Math.max(t,Math.ceil(e.length*r)),s=new Set;let p=0;for(;s.size<a;){const t=o.isUndefined(n)?Math.floor(Math.random()*e.length):(n+e.length+31*p)%e.length;s.add(t),p++}for(const e of s)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: \`${s.safeStableStringify(r)}\`.`);if(!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e))return"";const[n,i]=e.split("@"),a=i.split(".");if(a.length<2)return"";const[p,...c]=a,l=c.join("."),f=u(r,e),d=n.length<4?1:2,g=p.length<4?1:2;return`${m(n,d,.6,f)}@${m(p,g,.5,f)}.${l.length<=2?l:m(l,1,.4,f)}`},exports.chunkString=function(e,t,n={}){if(o.isNil(e)||t<=0)return e;if(i.assertIsString(e,{message:({currentType:e,validType:t})=>`First parameter (\`subject\`) must be of type \`${t}\`, but received: \`${e}\`.`}),!a.isInteger(t))throw new TypeError(`Second parameter (\`limiter\`) must be of type \`integer-number\`, but received: \`${o.getPreciseType(t)}\`, with value: \`${s.safeStableStringify(t)}\`.`);o.assertIsPlainObject(n,{message:({currentType:e,validType:t})=>`Third parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const p=o.hasOwnProp(n,"separator")?n.separator:" ",c=!!o.hasOwnProp(n,"reCountAfterSpace")&&n.reCountAfterSpace;if(i.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(c,{message:({currentType:e,validType:t})=>`Parameter \`reCountAfterSpace\` property of the \`options\` (third parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),e=r.normalizeSpaces(e),!c){let r="",n=0;for(let i=0;i<e.length;i++){n===t&&(r+=p,n=0),r+=e[i],n++}return r}const l=e.split(" "),u=[];let m=[],f=0;for(let e=0;e<l.length;e++){const r=l[e];let n="",i=0;for(let e=0;e<r.length;e++)n+=r[e],i++,i===t&&e<r.length-1&&(n+=p,i=0);m.push(n),f++,f!==t&&e!==l.length-1||(u.push(m.join(p)),m=[],f=0)}return u.join(" ")},exports.formatCurrency=(r,n={})=>{if(!o.isString(r)&&!t.isFinite(r))throw new TypeError(`First parameter (\`value\`) must be of type \`string\` or \`primitive-number\`, but received: \`${o.getPreciseType(r)}\`, with value: \`${s.safeStableStringify(r)}\`.`);o.assertIsPlainObject(n,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const p=!!o.hasOwnProp(n,"decimal")&&n.decimal,c=o.hasOwnProp(n,"totalDecimal")?n.totalDecimal:2,u=!o.hasOwnProp(n,"endDecimal")||n.endDecimal,m=!!o.hasOwnProp(n,"indianFormat")&&n.indianFormat,f=o.hasOwnProp(n,"suffixCurrency")?n.suffixCurrency:"",d=o.hasOwnProp(n,"suffixDecimal")?n.suffixDecimal:"",g=o.hasOwnProp(n,"roundedDecimal")?n.roundedDecimal:"round",y=o.hasOwnProp(n,"negativeFormat")?n.negativeFormat:"dash";let h=o.hasOwnProp(n,"separatorDecimals")?n.separatorDecimals:",",b=o.hasOwnProp(n,"separator")?n.separator:".";if(!(o.isString(b)&&o.isString(h)&&o.isString(f)&&o.isString(d)))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(b)}\`, 'separatorDecimals': \`${o.getPreciseType(h)}\`, 'suffixCurrency': \`${o.getPreciseType(f)}\`, 'suffixDecimal': \`${o.getPreciseType(d)}\`].`);if(!o.isBoolean(p)||!o.isBoolean(u)||!o.isBoolean(m))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(u)}\`, 'indianFormat': \`${o.getPreciseType(m)}\`].`);if(!a.isInteger(c))throw new TypeError(`Parameter \`totalDecimal\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${o.getPreciseType(c)}\`, with value: \`${s.safeStableStringify(length)}\`.`);if(!1!==g&&"round"!==g&&"ceil"!==g&&"floor"!==g)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(g)}\`, with value: \`${s.safeStableStringify(g)}\`.`);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: \`${s.safeStableStringify(y)}\`.`);const S=o.isString(r)?e.parseCurrencyString(r):r;if(o.isNaN(S))throw new TypeError("First parameter (`value`) could not be parsed into a valid `number`.");let $="",P="",w=Math.abs(S);const T=Math.pow(10,c);if(g){const e=w*T;switch(g){case"round":w=Math.round(e)/T;break;case"ceil":w=Math.ceil(e)/T;break;case"floor":w=Math.floor(e)/T}}if(g)[$,P]=w.toFixed(c).split("."),P=P??"".padEnd(c,"0");else{const e=String(w).split(".");$=e[0],P=(e[1]||"").slice(0,c).padEnd(c,"0")}let v;if(m?(b=",",h=".",v=(f.trim().length?f:"")+l($,b)):v=(f.trim().length?f:"")+$.replace(/\B(?=(\d{3})+(?!\d))/g,b),p&&!o.isUndefined(P)&&c>0){let e=h+P;u&&(e+=d),v+=e}if(S<0)if("dash"===y)v="-"+v;else if("brackets"===y)v="("+v+")";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(v);i.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}\`.`}),v=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: \`${s.safeStableStringify(e)}\`.`);switch(e){case"dash":v="-"+(t?" ":"")+v;break;case"brackets":v=t?`( ${v} )`:`(${v})`}}return v},exports.formatDateFns=(e,t={})=>{if(o.isNil(e)||!c.isDate(e)&&!o.isNonEmptyString(e))return null;o.isPlainObject(t)||(t={});const{inputFormat:r,locale:n="en",inputLocale:i="en",...a}=t,s=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?p.id:p.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?p.id:p.enUS:n;return c.format(l,s,{...a,locale:t})}catch{return null}},exports.formatDateIntl=(e,t)=>{if(o.isNil(e)||!c.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)||!c.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())},a=Object.entries(i).reduce((e,[t,r])=>e.split(t).join(r),t);return a.includes("NaN")?null:a}catch{return null}},exports.formatNumber=(e,r=",")=>{if(!o.isString(e)&&!t.isFinite(e))throw new TypeError(`First parameter (\`value\`) must be of type \`string\` or \`primitive number\`, but received: \`${o.getPreciseType(e)}\`.`);if(!o.isString(r))throw new TypeError(`Second parameter (\`separator\`) must be of type \`string\` or empty as \`undefined\`, but received: \`${o.getPreciseType(r)}\`.`);const n="."===(r=o.isString(r)?r:",")?",":".",i=e.toString().trim(),a=i.lastIndexOf("."),s=i.lastIndexOf(",");let p="";a>s?p=".":s>a&&(p=",");let c=i,l="";if(p){const e=i.split(p);c=e.slice(0,-1).join(p),l=e.slice(-1)[0]}c=c.replace(/[^\d]/g,"");const u=c.replace(/\B(?=(\d{3})+(?!\d))/g,r);return l?`${u}${n}${l}`:u},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,"separator")?t.separator:" ",n=!!o.hasOwnProp(t,"takeNumberOnly")&&t.takeNumberOnly,i=!!o.hasOwnProp(t,"checkValidOnly")&&t.checkValidOnly,a=o.hasOwnProp(t,"plusNumberCountry")?t.plusNumberCountry:"",s=o.hasOwnProp(t,"openingNumberCountry")?t.openingNumberCountry:"",p=o.hasOwnProp(t,"closingNumberCountry")?t.closingNumberCountry:"";if(!o.isBoolean(n)||!o.isBoolean(i))throw new TypeError(`Parameter \`takeNumberOnly\` and \`checkValidOnly\` property of the \`options\` (second parameter) must be of type \`boolean\` or unset as \`undefined\` value, but received: ['takeNumberOnly': \`${o.getPreciseType(n)}\`, 'checkValidOnly': \`${o.getPreciseType(i)}\`].`);if(!(o.isString(r)&&o.isString(a)&&o.isString(s)&&o.isString(p)))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(r)}\`, 'plusNumberCountry': \`${o.getPreciseType(a)}\`, 'openingNumberCountry': \`${o.getPreciseType(s)}\`, 'closingNumberCountry': \`${o.getPreciseType(p)}\`].`);if(o.isString(e)||(e=String(e)),n)return e.replace(/\D/g,"");if(i)return/^(\+)?[0-9\s().-]+$/.test(e)&&e.replace(/\D/g,"").length<24;e=e.replace(/\D/g,"");let c=a.trim().replace(/\s+/g,"").replace(/[^\d+]/g,"");/^\+/.test(c)&&(c="+"+c.replace(/^\++/,""));let l="",u="";({7:"Russia, Kazakhstan",27:"South Africa",31:"Netherlands",32:"Belgium",33:"France",34:"Spain",36:"Hungary",39:"Italy, San Marino, Vatican",44:"United Kingdom",46:"Sweden",47:"Norway",48:"Poland",49:"Germany",52:"Mexico",54:"Argentina",55:"Brazil",56:"Chile",61:"Australia",62:"Indonesia",64:"New Zealand",81:"Japan",82:"South Korea",86:"China",90:"Turkey",91:"India",92:"Pakistan",351:"Portugal",352:"Luxembourg",971:"UAE"})[c.replace(/^\+/,"").replace(/[^\d]/g,"")]&&e.startsWith("0")?(l=e.slice(1,4),u=e.slice(4)):(l=e.slice(0,4),u=e.slice(4));const m=c.trim(),f=s.trim(),d=p.trim();let g="";g=m?f&&d?`${f}${m}${d} ${l}`:f&&!d?`${f}${m} ${l}`:!f&&d?`${m}${d} ${l}`:`${m} ${l}`:`${l}`;const y={0:r,4:r,8:r,12:r,16:r,20:r,24:r};for(let e=0;e<u.length;e++){g+=(y[e+l.length]||"")+u[e]}return g},exports.getGMTOffset=e=>{try{if(o.isNil(e)||o.isString(e)&&n.isEmptyString(e))e=new Date;else if(!c.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 i=t.getTimezoneOffset();const a=i<0?"+":"-";return i=Math.abs(i),`${a}${r(Math.floor(i/60))}${r(i%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 c=o.hasOwnProp(t,"ending")?t.ending:"...";if(!a.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: \`${s.safeStableStringify(p)}\`.`);if(p<1)return"";i.assertIsString(c,{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}\`.`}),c=n.isEmptyString(c)?"...":c.trim();const l=r?e.trim():e;if(l.length<=p)return l;const u=l.slice(0,p);return(r?u:u.trimEnd())+c};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./chunk-ZHV5ZYVN.cjs"),r=require("./chunk-D3VSHABU.cjs"),t=e=>e instanceof RegExp;function n(e){return e instanceof ArrayBuffer}function s(i,f,o,u=new WeakMap){if(i===f)return!0;if(i!=i&&f!=f)return!0;if(!r.isObjectOrArray(i)||!r.isObjectOrArray(f))return!1;if(u.get(i)===f)return!0;u.set(i,f);const a=(e,t,n,i,f)=>{if(o){const s=o(e,t,n,i,f,u);if(!r.isUndefined(s))return s}return s(e,t,o,u)};if(e.isDate(i)&&e.isDate(f))return i.getTime()===f.getTime();if(t(i)&&t(f))return i.source===f.source&&i.flags===f.flags;if(r.isError(i)&&r.isError(f))return i.name===f.name&&i.message===f.message;if(ArrayBuffer.isView(i)&&ArrayBuffer.isView(f)){const e=new Uint8Array(i.buffer,i.byteOffset,i.byteLength),r=new Uint8Array(f.buffer,f.byteOffset,f.byteLength);if(e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}if(n(i)&&n(f)){if(i.byteLength!==f.byteLength)return!1;const e=new Uint8Array(i),r=new Uint8Array(f);for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}if(e.isMap(i)&&e.isMap(f)){if(i.size!==f.size)return!1;for(const[e,r]of i){if(!f.has(e))return!1;if(!s(r,f.get(e),o,u))return!1}return!0}if(r.isSet(i)&&r.isSet(f)){if(i.size!==f.size)return!1;for(const e of i){let r=!1;for(const t of f)if(s(e,t,o,u)){r=!0;break}if(!r)return!1}return!0}if(r.isArray(i)&&r.isArray(f)){if(i.length!==f.length)return!1;for(let e=0;e<i.length;e++)if(!a(i[e],f[e],e,i,f))return!1;return!0}if(Object.getPrototypeOf(i)!==Object.getPrototypeOf(f))return!1;const c=Reflect.ownKeys(i),y=Reflect.ownKeys(f);if(c.length!==y.length)return!1;for(const e of c){if(!a(i[e],f[e],e,i,f))return!1}return!0}exports.baseDeepEqual=s,exports.isArrayBuffer=n,exports.isEmptyArray=e=>!r.isArray(e)||0===e.length,exports.isEmptyObject=function(e,t={}){if(!r.isObject(e))return!0;r.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const n=!!r.hasOwnProp(t,"checkSymbols")&&t.checkSymbols;r.assertIsBoolean(n,{message:({currentType:e,validType:r})=>`Parameter \`checkSymbols\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const s=0===Object.keys(e).length;return n?s&&0===Object.getOwnPropertySymbols(e).length:s},exports.isEqual=function(e,r){return s(e,r,void 0,new WeakMap)},exports.isRegExp=t;
@@ -1 +0,0 @@
1
- "use strict";var e=require("./chunk-DVMHRLKP.cjs"),r=require("./chunk-ZHV5ZYVN.cjs"),n=require("./chunk-D3VSHABU.cjs");exports.delay=(t=1e3,i)=>{if(!e.isInteger(t)||t<=0)throw new TypeError(`First parameter (\`milliSeconds\`) must be of type \`number\` and value must be a \`non-zero\`, \`non-NaN\`, \`non-negative\`, and \`integer-number\`, but received: \`${n.getPreciseType(t)}\`, with value: \`${r.safeStableStringify(t)}\`.`);if(n.isNull(i)||i&&!(i instanceof AbortSignal))throw new TypeError("Second parameter (`signal`) must be an `instance of AbortSignal` if provided.");return new Promise((e,r)=>{const n=setTimeout(()=>{o(),e()},t),o=()=>{clearTimeout(n),i&&i.removeEventListener("abort",a)},a=()=>{o(),r(new DOMException("Function `delay` aborted","AbortError"))};i&&(i.aborted?a():i.addEventListener("abort",a,{once:!0}))})};
@@ -1 +0,0 @@
1
- import{isURL as r}from"./chunk-ONZFBJVW.js";import{toStringArrayUnRecursive as e}from"./chunk-ORZFHBEY.js";import{isEmptyValue as t}from"./chunk-IRGE5W7L.js";import{assertIsArray as n}from"./chunk-ECRNH4FW.js";import{normalizeString as o}from"./chunk-MISCBZJC.js";import{isEmptyString as a}from"./chunk-KOVO72OM.js";import{safeStableStringify as s}from"./chunk-BHIBDDQF.js";import{isString as i,getPreciseType as c,isUndefined as m,isNonEmptyString as u,isFunction as p,isNumber as h,isError as l}from"./chunk-EW3I4O7X.js";var f=(f,y,d)=>{if(i(f)){if(a(f))throw new TypeError("First parameter (`baseUrl`) cannot be an empty-string.");f=o(f)}else if(!r(f))throw new TypeError(`First parameter (\`baseUrl\`) must be of type an URL instance or a \`string\` and a non empty-string, but received: \`${c(f)}\`, with current value: \`${s(f)}\`.`);if(!m(d)&&(n(d,{message:({currentType:r,validType:e})=>`Third parameter (\`removeParams\`) must be of type \`${e} of strings\`, but received: \`${r}\`.`}),!d.every(r=>u(r))))throw new TypeError("Third parameter (`removeParams`) must be of type `array` and contains `string` only and non empty-string.");try{if(!m(y)&&!p(y[Symbol.iterator]))throw new TypeError(`Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${c(y)}\`, with value: \`${s(y)}\`.`);const r=new URL(f);if(!m(y)){const n=Object.fromEntries(y);if(!t(n)){const t=new URLSearchParams(r.search);for(const[r,e]of Object.entries(n)){if(!u(e)&&!h(e,{includeNaN:!0}))throw new TypeError(`Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${c(y)}\`, with value: \`${s(y)}\`.`);t.set(r,String(e))}(null==d?void 0:d.length)&&e(d).map(r=>{t.delete(r)}),r.search=t.toString()}}return null==d||d.forEach(e=>r.searchParams.delete(e)),r}catch(r){if(l(r))throw r;throw new Error("Failed to construct a valid URL in `constructURL()`, Error:"+r)}},y=r=>{if(!u(r))return null;let e;try{e=decodeURIComponent(r)}catch{return null}const t=e.match(/https?:\/\/.*?(?=https?:\/\/|\s|$)/g);if(!t)return null;const n=t.map(r=>r.replace(/[.,;:!?)]*$/,"")).filter(r=>{try{const e=new URL(r);return"http:"===e.protocol||"https:"===e.protocol}catch{return!1}});return n.length?n:null};export{f as constructURL,y as extractURLs};
@@ -1 +0,0 @@
1
- "use strict";var r=require("./chunk-KHO2SBNA.cjs"),e=require("./chunk-H3FXL4DU.cjs"),t=require("./chunk-M47QIBXI.cjs"),n=require("./chunk-VHAPTHEA.cjs"),i=require("./chunk-2HSNUPEO.cjs"),s=require("./chunk-4Z75R3IT.cjs"),a=require("./chunk-ZHV5ZYVN.cjs"),o=require("./chunk-D3VSHABU.cjs");exports.constructURL=(c,u,l)=>{if(o.isString(c)){if(s.isEmptyString(c))throw new TypeError("First parameter (`baseUrl`) cannot be an empty-string.");c=i.normalizeString(c)}else if(!r.isURL(c))throw new TypeError(`First parameter (\`baseUrl\`) must be of type an URL instance or a \`string\` and a non empty-string, but received: \`${o.getPreciseType(c)}\`, with current value: \`${a.safeStableStringify(c)}\`.`);if(!o.isUndefined(l)&&(n.assertIsArray(l,{message:({currentType:r,validType:e})=>`Third parameter (\`removeParams\`) must be of type \`${e} of strings\`, but received: \`${r}\`.`}),!l.every(r=>o.isNonEmptyString(r))))throw new TypeError("Third parameter (`removeParams`) must be of type `array` and contains `string` only and non empty-string.");try{if(!o.isUndefined(u)&&!o.isFunction(u[Symbol.iterator]))throw new TypeError(`Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${o.getPreciseType(u)}\`, with value: \`${a.safeStableStringify(u)}\`.`);const r=new URL(c);if(!o.isUndefined(u)){const n=Object.fromEntries(u);if(!t.isEmptyValue(n)){const t=new URLSearchParams(r.search);for(const[r,e]of Object.entries(n)){if(!o.isNonEmptyString(e)&&!o.isNumber(e,{includeNaN:!0}))throw new TypeError(`Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${o.getPreciseType(u)}\`, with value: \`${a.safeStableStringify(u)}\`.`);t.set(r,String(e))}(null==l?void 0:l.length)&&e.toStringArrayUnRecursive(l).map(r=>{t.delete(r)}),r.search=t.toString()}}return null==l||l.forEach(e=>r.searchParams.delete(e)),r}catch(r){if(o.isError(r))throw r;throw new Error("Failed to construct a valid URL in `constructURL()`, Error:"+r)}},exports.extractURLs=r=>{if(!o.isNonEmptyString(r))return null;let e;try{e=decodeURIComponent(r)}catch{return null}const t=e.match(/https?:\/\/.*?(?=https?:\/\/|\s|$)/g);if(!t)return null;const n=t.map(r=>r.replace(/[.,;:!?)]*$/,"")).filter(r=>{try{const e=new URL(r);return"http:"===e.protocol||"https:"===e.protocol}catch{return!1}});return n.length?n:null};
@@ -1 +0,0 @@
1
- import{isNonEmptyString as r}from"./chunk-EW3I4O7X.js";var o=(o,m={})=>!r(o,m);export{o as isEmptyString};
@@ -1 +0,0 @@
1
- import{isNonEmptyValue as e,isTypedArray as r}from"./chunk-MTUBDVJ2.js";import{filterNilArray as t}from"./chunk-ORZFHBEY.js";import{isEmptyObject as o,isEmptyArray as n,isRegExp as m}from"./chunk-ZTCLKKMB.js";import{assertIsArray as i}from"./chunk-ECRNH4FW.js";import{isFinite as s}from"./chunk-OWV2P376.js";import{isEmptyString as a}from"./chunk-KOVO72OM.js";import{assertIsString as y}from"./chunk-T4CIAKEK.js";import{safeStableStringify as p,isMap as c,isDate as u}from"./chunk-BHIBDDQF.js";import{isBigInt as f}from"./chunk-QNKGP5DY.js";import{assertIsPlainObject as v,hasOwnProp as l,assertIsBoolean as b,isArray as d,isNull as E,isNil as j,isString as A,isNonEmptyString as O,isBoolean as h,isNumber as g,isObject as T,isPlainObject as $,getPreciseType as k,isNaN as S,isUndefined as R,isSet as N,isBuffer as I,isFunction as w,isObjectOrArray as P}from"./chunk-EW3I4O7X.js";function B(e,r={}){v(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const o=!l(r,"removeInvalidValueNumber")||r.removeInvalidValueNumber;if(b(o,{message:({currentType:e,validType:r})=>`Parameter \`removeInvalidValueNumber\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),d(e)){const r=Array.from(e,e=>{if(f(e))return Number(e);const r=String(e).trim().match(/-?\d+(\.\d+)?/);return r?Number(r[0]):E(e)?null:void 0});return o?t(r):r}}var D=r=>!j(r)&&(A(r)?O(r):h(r)?r:g(r,{includeNaN:!0})?0!==r:d(r)||T(r)?e(r):Boolean(r)),C=e=>!j(e)&&(A(e)?O(e):h(e)?e:g(e,{includeNaN:!0})?0!==e:d(e)?e.some(C):!!T(e)&&Object.values(e).some(C)),K=(e,r={})=>{if(j(e))return!1;$(r)||(r={});const t=!!l(r,"caseInsensitive")&&r.caseInsensitive,o=!l(r,"trimString")||r.trimString,n=!!l(r,"includeIndeterminate")&&r.includeIndeterminate;if(!h(t)||!h(o)||!h(n))throw new TypeError(`Parameters \`caseInsensitive\`, \`trimString\` and \`includeIndeterminate\` property of the \`options\` (second parameter) expected to be a \`boolean\` type, but received: ['caseInsensitive': \`${k(t)}\`, 'trimString': \`${k(o)}\`, 'includeIndeterminate': \`${k(n)}\`].`);if(A(e)){let r=e;o&&(r=r.trim()),t&&(r=r.toLowerCase());const m=["true","on","yes","1"];return n&&m.push("indeterminate"),m.includes(r)}return g(e)?1===e:!!h(e)&&e},V=e=>!j(e)&&(A(e)?!a(e):h(e)?e:g(e,{includeNaN:!0})?0!==e:d(e)?e.length>0:Boolean(e)),F=e=>{const r={undefined:void 0,null:null,nan:NaN,true:!0,false:!1,yes:!0,no:!1};if(A(e)){const t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(r,t))return r[t];const o=t.replace(/,/g,""),n=Number(o);return!S(n)&&O(o)?n:e.trim()}return e},H=(e,r)=>{if(!P(e))return e;const[t,...o]=r;if(d(e))for(const t of e)P(t)&&H(t,r);else n(o)?$(e)&&delete e[t]:$(e)&&P(e[t])&&H(e[t],o);return e},J=(e,r)=>{if(!$(e))return e;const[t,...o]=r;return 0===o.length?$(e)&&delete e[t]:$(e[t])&&J(e[t],o),e};function L(e,r,t=!0){if(o(e,{checkSymbols:!0}))return{};if(i(r,{message:({currentType:e,validType:t})=>`Second parameter (\`keysToDelete\`) must be of type \`${t}\` with value of { key: string, deep?: boolean } plain-object, but received: \`${e}\`, with value: \`${p(r)}\`.`}),!r.every(e=>$(e)&&"key"in e))throw new TypeError(`Each element in Second Parameter (\`keysToDelete\`) must be of type \`plain-object\` with at least a "key" property (optionally "deep"), but received: \`${p(r)}\`.`);let n=t?(e=>{try{if(w(structuredClone))return structuredClone(e)}catch{}return JSON.parse(JSON.stringify(e))})(e):e;for(const{key:e,deep:t}of r){if(y(e,{message:({currentType:e,validType:r})=>`Parameter \`key\` at Second Parameter (\`keysToDelete\`) must be of type \`${r}\`, but received: \`${e}\`.`}),!R(t)&&!h(t))throw new TypeError(`Parameter \`deep\` at Second Parameter (\`keysToDelete\`) ➔ (key: "${e}", deep: ${t}) must be of type \`boolean\` or \`undefined\`, but received: \`${k(t)}\`.`);const r=e.split(".");n=t?H(n,r):J(n,r)}return n}function M(e,t={}){v(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});return function e(t,m){if(j(t))return;const{removeEmptyArrays:i,removeEmptyObjects:a,isRoot:y}=m;if(!h(a)||!h(i))throw new TypeError(`Parameters \`removeEmptyObjects\` and \`removeEmptyArrays\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['removeEmptyObjects': \`${k(a)}\`, 'removeEmptyArrays': \`${k(i)}\`].`);if(g(t)||O(t)&&!S(Number(t))){const e=Number(t);return s(e)?e:void 0}if(d(t)){const r=t.map(r=>e(r,{removeEmptyObjects:a,removeEmptyArrays:i,isRoot:!1})).filter(e=>!R(e));if(i&&n(r))return;return r}if(N(t)){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:a,removeEmptyArrays:i,isRoot:!1})).filter(e=>!R(e));if(i&&n(r))return;return r}if(c(t)){let r=Array.from(t.entries()).map(([r,t])=>{const o=e(r,{removeEmptyObjects:a,removeEmptyArrays:i,isRoot:!1}),n=e(t,{removeEmptyObjects:a,removeEmptyArrays:i,isRoot:!1});return R(o)||R(n)?void 0:[o,n]}).filter(e=>!R(e));if(i&&(r=r.filter(e=>!(d(e)&&0===e.length))),i&&n(r))return;return r}if(I(t)){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:a,removeEmptyArrays:i,isRoot:!1})).filter(e=>!R(e));if(i&&n(r))return;return r}if(r(t)){if(t instanceof BigInt64Array||t instanceof BigUint64Array){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:a,removeEmptyArrays:i,isRoot:!1})).filter(e=>!R(e));if(i&&n(r))return;return r}{const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:a,removeEmptyArrays:i,isRoot:!1})).filter(e=>!R(e));if(i&&n(r))return;return r}}if(u(t))return S(t.getTime())?0:t.getTime();if(T(t)){const r={};for(const[o,n]of Object.entries(t)){const t=e(n,{removeEmptyObjects:a,removeEmptyArrays:i,isRoot:!1});R(t)||(r[o]=t)}return a&&o(r)?y?{}:void 0:r}}(e,{removeEmptyObjects:!!l(t,"removeEmptyObjects")&&t.removeEmptyObjects,removeEmptyArrays:!!l(t,"removeEmptyArrays")&&t.removeEmptyArrays,isRoot:!0})}function U(e,t={}){v(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});return function e(t,o){if(j(t))return;const{removeEmptyArrays:i,removeEmptyObjects:s,isRoot:a}=o;if(!h(s)||!h(i))throw new TypeError(`Parameters \`removeEmptyObjects\` and \`removeEmptyArrays\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['removeEmptyObjects': \`${k(s)}\`, 'removeEmptyArrays': \`${k(i)}\`].`);if(g(t)||A(t))return String(t);if(u(t))return t.toISOString();if(m(t))return t.toString();if(I(t))return Array.from(t).map(e=>String(e)).filter(e=>!R(e));if(r(t)){if(t instanceof BigInt64Array||t instanceof BigUint64Array){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:s,removeEmptyArrays:i,isRoot:!1})).map(e=>String(e)).filter(e=>!R(e));if(i&&n(r))return;return r}{const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:s,removeEmptyArrays:i,isRoot:!1})).map(e=>String(e)).filter(e=>!R(e));if(i&&n(r))return;return r}}if(N(t)){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:s,removeEmptyArrays:i,isRoot:!1})).filter(e=>!R(e));if(i&&n(r))return;return r}if(c(t)){const r=Array.from(t.entries()).map(([r,t])=>[e(r,{removeEmptyObjects:s,removeEmptyArrays:i,isRoot:!1}),e(t,{removeEmptyObjects:s,removeEmptyArrays:i,isRoot:!1})]).filter(([e,r])=>!R(e)&&!R(r));if(i&&n(r))return;return r}if(d(t)){let r=t.map(r=>e(r,{removeEmptyObjects:s,removeEmptyArrays:i,isRoot:!1})).filter(e=>!R(e));if(i&&(r=r.filter(e=>!(d(e)&&0===e.length))),i&&n(r))return;return r}if(T(t)){const r={};for(const[o,n]of Object.entries(t)){const t=e(n,{removeEmptyObjects:s,removeEmptyArrays:i,isRoot:!1});R(t)?d(n)&&!i&&(r[o]=[]):r[o]=t}return s&&0===Object.keys(r).length?a?{}:void 0:r}}(e,{removeEmptyObjects:!!l(t,"removeEmptyObjects")&&t.removeEmptyObjects,removeEmptyArrays:!!l(t,"removeEmptyArrays")&&t.removeEmptyArrays,isRoot:!0})}export{F as convertType,L as removeObjectPaths,D as toBooleanContent,C as toBooleanContentDeep,K as toBooleanExplicit,V as toBooleanLoose,B as toNumberArrayUnRecursive,M as toNumberDeep,U as toStringDeep};
@@ -1 +0,0 @@
1
- import{removeSpaces as e}from"./chunk-MISCBZJC.js";import{isEmptyString as r}from"./chunk-KOVO72OM.js";import{isInteger as t}from"./chunk-WVSPXFTY.js";import{safeStableStringify as n}from"./chunk-BHIBDDQF.js";import{isString as o,isArray as a,getPreciseType as i,isNull as s,isPlainObject as u,isBoolean as p,isNonEmptyArray as c,isNonEmptyString as m,isNil as f,isError as l,assertIsPlainObject as h,hasOwnProp as y}from"./chunk-EW3I4O7X.js";var d=class e extends Error{constructor(r,t){super(r),this.originalError=t,this.name="NormalizePathnameError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},b=(e,r=null,f={})=>{const l=[];o(e)||a(e)||l.push(`First parameter (\`url\`) must be of type \`string\` or \`array-string\`, but received: \`${i(e)}\`.`),o(r)||a(r)||s(r)||l.push(`Second parameter (\`base\`) must be of type \`string\`, \`array-string\` or \`null\`, but received: \`${i(r)}\`.`),u(f)||l.push(`Second parameter (\`options\`) must be of type \`plain-object\`, but received: \`${i(f)}\`.`);const{levels:h=1,removeDuplicates:y=!0}=f;if((!t(h)||t(h)&&h<0)&&l.push(`Parameter \`levels\` property of the \`options\` (second parameter) must be of type \`integer-number\` and minimum is \`0\`, but received: \`${i(h)}\`, with value: \`${n(h)}\`.`),p(y)||l.push(`Parameter \`removeDuplicates\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${i(y)}\`.`),c(l))throw new TypeError(`Invalid parameter(s) in \`getPrefixPathname\` function:\n- ${l.join("\n- ")}`);function d(e){return`/${$(e).split("/").filter(Boolean).slice(0,h).join("/")}`}function b(e){if(r){if(e=$(e),a(r)){for(const t of r)if(e.startsWith($(t)))return d(e)}else if(m(r)&&e.startsWith($(r)))return d(e);return null}return d(e)}if(a(e)){const r=e.map(b).filter(e=>!s(e)),t=y?[...new Set(r)]:r;return 1===t.length?t[0]:t}return b(e)},v=(e,r="/")=>{if(!m(r))throw new TypeError(`Second parameter (\`defaultValue\`) must be of type \`string\` and not an \`empty-string\`, but received: \`${i(r)}\`, with value: \`${n(r)}\`.`);if(a(e)){if(!e.every(e=>o(e)))throw new TypeError(`First parameter (\`result\`) must be of type \`string\` or \`array of string\`, but received: \`${i(e)}\`, with value: \`${n(e)}\`.`);for(const r of e){const e=$(r);if("/"!==e)return e}return $(r)}if(o(e)){const t=$(e);return"/"!==t?t:$(r)}if(!f(e))throw new TypeError(`First parameter (\`result\`) must be of type \`string\`, \`array-string\`, \`null\` or \`undefined\`, but received: \`${i(e)}\`.`);return $(r)},$=(r,t="/")=>{if(!m(t))throw new TypeError(`Second parameter (\`defaultPath\`) must be of type \`string\` and not empty-string, but received: \`${i(t)}\`, with value: \`${n(t)}\`.`);if(!m(r))return t;try{if((r=(r=e(r,{trimOnly:!0})).replace(/\s+/g,"")).startsWith("http://")||r.startsWith("https://")){const e=new URL(r);return`${e.pathname}${e.search}${e.hash}`.replace(/^\/+/,"/")}return"/"+r.replace(/^\/+/,"").replace(/\/{2,}/g,"/")}catch(e){const r=l(e)?e:new Error("Unknown error from function `normalizePathname()`.");throw new d(`Failed to normalize pathname in function \`normalizePathname()\`: ${r.message}`,r)}},w=(e,t={})=>{if(!m(e))return"";h(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const n=!!y(t,"prefixColon")&&t.prefixColon;if(!p(n))throw new TypeError(`Parameter \`prefixColon\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${i(n)}\`.`);const o=e.replace(/\D+/g,"");return r(o)?"":n?`:${o}`:o};export{w as formatEnvPort,v as getFirstPrefixPathname,b as getPrefixPathname,$ as normalizePathname};
@@ -1 +0,0 @@
1
- import{isEmptyString as r}from"./chunk-KOVO72OM.js";import{isNonEmptyString as t,isPlainObject as i,isString as n}from"./chunk-EW3I4O7X.js";var e=(r,n={withTrim:!0,trimOnly:!1})=>{if(!t(r))return"";i(n)||(n={});const{trimOnly:e=!1,withTrim:m=!0}=n;return e?r.trim():(m&&(r=r.trim()),r.replace(/\s+/g," "))},m=r=>t(r)?r.trim():"",u=(r,n={trimOnly:!1})=>{if(!t(r))return"";i(n)||(n={});const{trimOnly:e=!1}=n;return e?r.trim():r.replace(/\s+/g,"")};function c(t){if(!n(t))return;if(r(t))return"";return t.replace(/<\/?[a-zA-Z][^<>]*\/?>/g," ").trim().replace(/\s+/g," ").trim()}export{e as normalizeSpaces,m as normalizeString,u as removeSpaces,c as stripHtmlTags};
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- "use strict";var e=require("./chunk-KHO2SBNA.cjs"),r=require("./chunk-6C3ATUGM.cjs"),t=require("./chunk-JARPXKBM.cjs"),s=require("./chunk-O7UT5AN3.cjs"),i=require("./chunk-4Z75R3IT.cjs"),n=require("./chunk-VCFXNV3Q.cjs"),a=require("./chunk-ZHV5ZYVN.cjs"),o=require("./chunk-D3VSHABU.cjs");function u(e){const r=typeof e;return"string"===r||"number"===r||"symbol"===r}var c=(e,r)=>{if(!o.isObjectOrArray(e))return!1;if(!u(r))throw new TypeError(`Second Parameter (\`key\`) must be of type \`string\`, \`number\` or \`symbol\`, but received: \`${o.getPreciseType(r)}\`.`);return!!Object.prototype.hasOwnProperty.call(e,r)||(o.isArray(e)?e.some(e=>c(e,r)):Object.values(e).some(e=>o.isObjectOrArray(e)&&c(e,r)))},p=e=>"[object Arguments]"===Object.prototype.toString.call(e);function y(e){return"number"==typeof e&&e>-1&&Number.isInteger(e)&&e<=Number.MAX_SAFE_INTEGER}var f=(e,r)=>{if("number"==typeof e&&"number"==typeof r&&Number.isNaN(e)&&Number.isNaN(r))return!0;if(e===r)return!0;if(typeof e!=typeof r)return!1;if(a.isDate(e)&&a.isDate(r))return e.getTime()===r.getTime();if(t.isRegExp(e)&&t.isRegExp(r))return e.toString()===r.toString();if(o.isSymbol(e)&&o.isSymbol(r))return e.toString()===r.toString();if(o.isSet(e)&&o.isSet(r)){if(e.size!==r.size)return!1;const t=Array.from(r),s=new Set;for(const r of e){let e=!1;for(let i=0;i<t.length;i++)if(!s.has(i)&&f(r,t[i])){s.add(i),e=!0;break}if(!e)return!1}return!0}if(a.isMap(e)&&a.isMap(r)){if(e.size!==r.size)return!1;const t=Array.from(r),s=new Set;for(const[r,i]of e){let e=!1;for(let n=0;n<t.length;n++){if(s.has(n))continue;const[a,o]=t[n];if(f(r,a)&&f(i,o)){s.add(n),e=!0;break}}if(!e)return!1}return!0}if(o.isArray(e)&&o.isArray(r))return e.length===r.length&&e.every((e,t)=>f(e,r[t]));if(o.isObjectOrArray(e)&&o.isObjectOrArray(r)&&e&&r){if(o.isArray(e)!==o.isArray(r))return!1;const t=Object.keys(e),s=Object.keys(r);return t.length===s.length&&t.every(t=>f(e[t],r[t]))}return!1};var l=e=>{if(o.isString(e))return i.isEmptyString(e);if(o.isNumber(e))return o.isNaN(e);if(o.isArray(e))return t.isEmptyArray(e)||e.every(l);if(o.isObjectOrArray(e)){const r=Object.keys(e),t=Object.getOwnPropertySymbols(e);return 0===r.length&&0===t.length||[...r,...t].every(r=>l(e[r]))}return!e};function m(e,r,t){return g(e,r,t)}function b(e,r){return e===r||0===e&&0===r||Number.isNaN(e)&&Number.isNaN(r)}function g(e,r,t){if(e===r)return!0;if(!o.isObjectOrArray(r))return b(e,r);if(!o.isObjectOrArray(e))return!1;const s=Reflect.ownKeys(r).filter(e=>!(o.isArray(r)&&"length"===e));for(const i of s){if(!(i in e))return!1;const s=e[i],n=r[i],a=null==t?void 0:t(s,n,i,e,r);if(o.isUndefined(a)){if(o.isObjectOrArray(s)&&o.isObjectOrArray(n)){if(!m(s,n,t))return!1}else if(!b(s,n))return!1}else if(!a)return!1}return!0}var h=Function.prototype.toString,d=/\{\s*\[native code\]\s*\}/;exports.areArraysEqual=(e,r,s=!1)=>{if(!o.isArray(e)||!o.isArray(r))throw new TypeError(`Parameters \`array1\` and \`array2\` property of the \`options\` (second parameter) must be of type \`array\`, but received: ['array1': \`${o.getPreciseType(e)}\`, 'array2': \`${o.getPreciseType(r)}\`].`);if(o.assertIsBoolean(s,{message:({currentType:e,validType:r})=>`Third parameter \`ignoreOrder\` must be of type \`${r}\`, but received: \`${e}\`.`}),!t.isEqual(e.length,r.length))return!1;const i=e=>{if(!o.isArray(e))return e;return e.map(e=>o.isArray(e)?i(e):e).sort((e,r)=>{const t=a.safeStableStringify(e),s=a.safeStableStringify(r);return t<s?-1:t>s?1:0})},n=s?i(e):e,u=s?i(r):r;return!!t.isEqual(n.length,u.length)&&n.every((e,r)=>a.safeStableStringify(e)===a.safeStableStringify(u[r]))},exports.areObjectsEqual=(e,r)=>t.isEqual(e,r),exports.areURLsEqualPath=(r,t)=>{if(!e.isURL(r)||!e.isURL(t))throw new TypeError("Parameters `urlA` and `urlB` (first and second parameter) must be instance of URL.");return r.protocol+"//"+r.host+r.pathname==t.protocol+"//"+t.host+t.pathname},exports.areURLsIdentical=(r,t)=>{if(!e.isURL(r)||!e.isURL(t))throw new TypeError("Parameters `urlA` and `urlB` (first and second parameter) must be instance of URL.");return r.protocol+"//"+r.host+r.pathname+r.search==t.protocol+"//"+t.host+t.pathname+t.search},exports.arrayHasAnyMatch=(e,r)=>{if(!o.isArray(e)||!o.isArray(r)||t.isEmptyArray(e)||t.isEmptyArray(r))return!1;const s=new Set(e);return r.some(e=>s.has(e))},exports.doesKeyExist=c,exports.isArguments=p,exports.isArrayLike=function(e){return!o.isFunction(e)&&o.isObjectOrArray(e)&&y(null==e?void 0:e.length)},exports.isArrayLikeObject=function(e){return o.isObjectOrArray(e)&&y(e.length)},exports.isCurrencyLike=e=>{if(!o.isString(e)&&!o.isNumber(e))return!1;return 0!==s.parseCurrencyString(e.toString())||"0"===e.toString().trim()},exports.isDeepEqual=f,exports.isElement=function(e){return!!e&&"object"==typeof e&&1===(null==e?void 0:e.nodeType)&&!o.isPlainObject(e)},exports.isEmpty=function(e){return!!o.isNil(e)||(!!(o.isBoolean(e)||o.isNumber(e,{includeNaN:!0})||o.isSymbol(e))||(o.isFunction(e)?0===Object.keys(e).length:o.isString(e)||o.isArray(e)||p(e)||r.isTypedArray(e)?0===e.length:a.isMap(e)||o.isSet(e)?0===e.size:o.isBuffer(e)?0===e.length:!!o.isPlainObject(e)&&0===Object.keys(e).length))},exports.isEmptyDeep=l,exports.isEqualWith=function(e,r,s){return t.baseDeepEqual(e,r,s,new WeakMap)},exports.isLength=y,exports.isMatch=function(e,r){return g(e,r)},exports.isMatchWith=m,exports.isNative=function(e){if(!o.isFunction(e))return!1;try{const r=h.call(e);return d.test(r)}catch{return!1}},exports.isObjectLoose=function(e){return!o.isNil(e)&&(o.isObjectOrArray(e)||o.isFunction(e))},exports.isPropertyKey=u,exports.isSafeInteger=function(e){return"number"==typeof e&&Number.isSafeInteger(e)},exports.isValidURL=e=>{if(!o.isNonEmptyString(e))return!1;let r;try{r=decodeURIComponent(e)}catch{return!1}if(!r.startsWith("http://")&&!r.startsWith("https://"))return!1;return new RegExp(/^https?:\/\/(?:localhost(?::\d+)?(?:[\/?#][^\s]*)?|(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?::\d+)?(?:[\/?#][^\s]*)?)$/).test(r)},exports.isWeakMap=function(e){return o.isObject(e)&&!o.isNull(e)&&e instanceof WeakMap},exports.textContainsAll=(e,r,t={})=>{if(!o.isNonEmptyString(e)||!o.isArray(r))return!1;o.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const{exactMatch:s=!1,flags:i="i"}=t;o.assertIsBoolean(s,{message:({currentType:e,validType:r})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),n.assertIsString(i,{message:({currentType:e,validType:r})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const a=r.filter(e=>o.isNonEmptyString(e)).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));return 0!==a.length&&a.every(r=>new RegExp(s?`(?<!\\S)${r}(?!\\S)`:r,i.includes("u")?i:i+"u").test(e))},exports.textContainsAny=(e,r,t={})=>{if(!o.isNonEmptyString(e)||!o.isArray(r))return!1;o.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const{exactMatch:s=!1,flags:i="i"}=t;o.assertIsBoolean(s,{message:({currentType:e,validType:r})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),n.assertIsString(i,{message:({currentType:e,validType:r})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const a=r.filter(e=>o.isNonEmptyString(e)).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));if(0===a.length)return!1;const u=s?`(?<!\\S)(${a.join("|")})(?!\\S)`:`(${a.join("|")})`;return new RegExp(u,i.includes("u")?i:i+"u").test(e)};
@@ -1 +0,0 @@
1
- import{isRegExp as e,isEmptyArray as r,isEqual as t}from"./chunk-ZTCLKKMB.js";import{assertIsArray as i}from"./chunk-ECRNH4FW.js";import{isFinite as n}from"./chunk-OWV2P376.js";import{safeStableStringify as o,isDate as a,isMap as u}from"./chunk-BHIBDDQF.js";import{isBigInt as s}from"./chunk-QNKGP5DY.js";import{getPreciseType as p,isNaN as f,isString as l,isNumber as m,isBoolean as c,isNil as v,isSymbol as y,isFunction as d,isArray as g,isObjectOrArray as b,isError as h,isSet as T,isObject as S,assertIsPlainObject as $,hasOwnProp as N,assertIsBoolean as O,isNull as w}from"./chunk-EW3I4O7X.js";function j(r,t){if(!1!==t&&"stringOrNumber"!==t&&"primitives"!==t&&"all"!==t)throw new TypeError(`Second parameter \`forceToString\` must be of type \`false\` or \`string\` with value one of "stringOrNumber" | "primitives" | "all", but received: \`${p(t)}\`, with value: \`${o(t)}\`.`);if(f(r))return"primitives"===t||"all"===t?"NaN":NaN;if(l(r)||m(r))return"stringOrNumber"===t||"primitives"===t||"all"===t?String(r):r;if(c(r)||s(r)||v(r))return"primitives"===t||"all"===t?String(r):r;if(y(r))return"all"===t?r.toString():r;if(d(r))return"all"===t?r.toString():r;if(g(r))return r.map(e=>j(e,t));if(b(r)){if(a(r))return"all"===t?r.toISOString():r;if(e(r))return"all"===t?r.toString():r;if(h(r)||r instanceof Promise)return"all"===t?r.toString():r;if(T(r))return"all"===t?[...r].map(e=>j(e,t)):r;if(u(r))return"all"===t?[...r.entries()].map(([e,r])=>[j(e,t),j(r,t)]):r;const i={};if(S(r))for(const e of Object.keys(r))i[e]=j(r[e],t);return i}return r}function k(e){if(v(e))return;if(!g(e))return[];return e.reduce((e,t)=>{if(!v(t))if(g(t)){const i=k(t);i&&!r(i)&&e.push(i)}else e.push(t);return e},[])}var I=(e,r={})=>{i(e,{message:({currentType:e,validType:r})=>`First parameter (\`inputArray\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`}),$(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const n=!!N(r,"flatten")&&r.flatten,a=!!N(r,"forceToString")&&r.forceToString;if(!1!==a&&"stringOrNumber"!==a&&"primitives"!==a&&"all"!==a)throw new TypeError(`Parameter \`forceToString\` property of the \`options\` (second parameter) must be of type \`false\` or \`string\` with value one of "stringOrNumber" | "primitives" | "all", but received: \`${p(a)}\`, with value: \`${o(a)}\`.`);O(n,{message:({currentType:e,validType:r})=>`Parameter \`flatten\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const s=e=>{const r=[];return e.reduce((e,i)=>{const n=g(i)?s(i):j(i,a);return r.some(e=>t(e,n))||(r.push(n),e.push(n)),e},[])},f=e=>g(e)?e.flatMap(f):T(e)?[...e].flatMap(f):u(e)?[...e.values()].flatMap(f):[e];return s(n?f(e):e)};function P(e,r={}){$(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const t=!N(r,"removeInvalidValue")||r.removeInvalidValue;if(O(t,{message:({currentType:e,validType:r})=>`Parameter \`removeInvalidValue\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),g(e)){const r=Array.from(e,e=>l(e)||n(e)||c(e)||s(e)?String(e):w(e)?null:void 0);return t?k(r):r}}export{I as dedupeArray,k as filterNilArray,P as toStringArrayUnRecursive,j as toStringDeepForce};
@@ -1 +0,0 @@
1
- import{isNumber as r}from"./chunk-EW3I4O7X.js";function i(i){return r(i)&&Number.isFinite(i)}export{i as isFinite};
@@ -1 +0,0 @@
1
- import{isNumber as r,isString as e,getPreciseType as t,isNonEmptyString as i}from"./chunk-EW3I4O7X.js";var n=(i,n,a)=>{if(!r(i)||!e(a)||!e(n))throw new TypeError(`First parameter (\`index\`) must be of type \`number\`, second parameter (\`originalString\`) and third parameter (\`replaceTo\`) must be of type \`string\`, but received: "['index': \`${t(i)}\`, 'originalString': \`${t(n)}\`, 'replaceTo': \`${t(a)}\`]".`);if(i<0||i>=n.length)throw new RangeError("First parameter (`index`) is out of range from second parameter (`originalString`).");return n.slice(0,i)+a+n.slice(i+1)},a=r=>{if(!i(r))return"";const e=(r=r.replace(/\s+/g," ").trim()).split(" ");return e.length>1?e[0][0]+e[1][0].toUpperCase():r.length>1?r.substring(0,2).toUpperCase():r[0].toUpperCase()};export{a as getInitialsName,n as replaceAt};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./chunk-2HSNUPEO.cjs"),r=require("./chunk-4Z75R3IT.cjs"),t=require("./chunk-DVMHRLKP.cjs"),i=require("./chunk-ZHV5ZYVN.cjs"),n=require("./chunk-D3VSHABU.cjs"),s=class e extends Error{constructor(r,t){super(r),this.originalError=t,this.name="NormalizePathnameError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},a=(r,t="/")=>{if(!n.isNonEmptyString(t))throw new TypeError(`Second parameter (\`defaultPath\`) must be of type \`string\` and not empty-string, but received: \`${n.getPreciseType(t)}\`, with value: \`${i.safeStableStringify(t)}\`.`);if(!n.isNonEmptyString(r))return t;try{if((r=(r=e.removeSpaces(r,{trimOnly:!0})).replace(/\s+/g,"")).startsWith("http://")||r.startsWith("https://")){const e=new URL(r);return`${e.pathname}${e.search}${e.hash}`.replace(/^\/+/,"/")}return"/"+r.replace(/^\/+/,"").replace(/\/{2,}/g,"/")}catch(e){const r=n.isError(e)?e:new Error("Unknown error from function `normalizePathname()`.");throw new s(`Failed to normalize pathname in function \`normalizePathname()\`: ${r.message}`,r)}};exports.formatEnvPort=(e,t={})=>{if(!n.isNonEmptyString(e))return"";n.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const i=!!n.hasOwnProp(t,"prefixColon")&&t.prefixColon;if(!n.isBoolean(i))throw new TypeError(`Parameter \`prefixColon\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${n.getPreciseType(i)}\`.`);const s=e.replace(/\D+/g,"");return r.isEmptyString(s)?"":i?`:${s}`:s},exports.getFirstPrefixPathname=(e,r="/")=>{if(!n.isNonEmptyString(r))throw new TypeError(`Second parameter (\`defaultValue\`) must be of type \`string\` and not an \`empty-string\`, but received: \`${n.getPreciseType(r)}\`, with value: \`${i.safeStableStringify(r)}\`.`);if(n.isArray(e)){if(!e.every(e=>n.isString(e)))throw new TypeError(`First parameter (\`result\`) must be of type \`string\` or \`array of string\`, but received: \`${n.getPreciseType(e)}\`, with value: \`${i.safeStableStringify(e)}\`.`);for(const r of e){const e=a(r);if("/"!==e)return e}return a(r)}if(n.isString(e)){const t=a(e);return"/"!==t?t:a(r)}if(!n.isNil(e))throw new TypeError(`First parameter (\`result\`) must be of type \`string\`, \`array-string\`, \`null\` or \`undefined\`, but received: \`${n.getPreciseType(e)}\`.`);return a(r)},exports.getPrefixPathname=(e,r=null,s={})=>{const o=[];n.isString(e)||n.isArray(e)||o.push(`First parameter (\`url\`) must be of type \`string\` or \`array-string\`, but received: \`${n.getPreciseType(e)}\`.`),n.isString(r)||n.isArray(r)||n.isNull(r)||o.push(`Second parameter (\`base\`) must be of type \`string\`, \`array-string\` or \`null\`, but received: \`${n.getPreciseType(r)}\`.`),n.isPlainObject(s)||o.push(`Second parameter (\`options\`) must be of type \`plain-object\`, but received: \`${n.getPreciseType(s)}\`.`);const{levels:p=1,removeDuplicates:u=!0}=s;if((!t.isInteger(p)||t.isInteger(p)&&p<0)&&o.push(`Parameter \`levels\` property of the \`options\` (second parameter) must be of type \`integer-number\` and minimum is \`0\`, but received: \`${n.getPreciseType(p)}\`, with value: \`${i.safeStableStringify(p)}\`.`),n.isBoolean(u)||o.push(`Parameter \`removeDuplicates\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${n.getPreciseType(u)}\`.`),n.isNonEmptyArray(o))throw new TypeError(`Invalid parameter(s) in \`getPrefixPathname\` function:\n- ${o.join("\n- ")}`);function c(e){return`/${a(e).split("/").filter(Boolean).slice(0,p).join("/")}`}function l(e){if(r){if(e=a(e),n.isArray(r)){for(const t of r)if(e.startsWith(a(t)))return c(e)}else if(n.isNonEmptyString(r)&&e.startsWith(a(r)))return c(e);return null}return c(e)}if(n.isArray(e)){const r=e.map(l).filter(e=>!n.isNull(e)),t=u?[...new Set(r)]:r;return 1===t.length?t[0]:t}return l(e)},exports.normalizePathname=a;
@@ -1 +0,0 @@
1
- "use strict";var e=require("./chunk-VHAPTHEA.cjs"),i=require("./chunk-D3VSHABU.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={})=>{var s,t,o;i.isPlainObject(e)||(e={});const{cacheSize:c,classGroups:l,config:f,conflictingClassGroupModifiers:p,conflictingClassGroups:u,override:d,prefix:m,theme:g,experimentalParseClassName:x}=n(e);return r.extendTailwindMerge({prefix:m??f.prefix,cacheSize:c||a.cacheSize,experimentalParseClassName:x,override:d,extend:{conflictingClassGroupModifiers:{...a.conflictingClassGroupModifiers,...p},theme:{...a.theme,...g},conflictingClassGroups:{...a.conflictingClassGroups,...u},classGroups:{...a.classGroups,...l,"text-shadow":["","-sm","-md","-lg","-xl","-xxl","-none","-default"].map(e=>`text-shadow${e}`),"font-size":Object.keys({...(null==(s=f.theme)?void 0:s.fontSize)||{},...(null==(o=null==(t=f.theme)?void 0:t.extend)?void 0:o.fontSize)||{}}).map(e=>`text-${e}`)}}})},l=s.getDefaultConfig(),f=(e={})=>{var r,t,o;i.isPlainObject(e)||(e={});const{cacheSize:a,classGroups:c,config:f,conflictingClassGroupModifiers:p,conflictingClassGroups:u,orderSensitiveModifiers:d,override:m,prefix:g,theme:x,experimentalParseClassName:h}=n(e);return s.extendTailwindMerge({prefix:g||f.prefix,cacheSize:a||l.cacheSize,experimentalParseClassName:h,override:m,extend:{conflictingClassGroupModifiers:{...l.conflictingClassGroupModifiers,...p},theme:{...l.theme,...x},conflictingClassGroups:{...l.conflictingClassGroups,...u},orderSensitiveModifiers:[...l.orderSensitiveModifiers,...d],classGroups:{...l.classGroups,...c,"text-shadow":["","-sm","-md","-lg","-xl","-xxl","-none","-default"].map(e=>`text-shadow${e}`),"font-size":Object.keys({...(null==(r=f.theme)?void 0:r.fontSize)||{},...(null==(o=null==(t=f.theme)?void 0:t.extend)?void 0:o.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;
@@ -1 +0,0 @@
1
- import{isEmptyArray as e,isEmptyObject as r}from"./chunk-ZTCLKKMB.js";import{noop as t}from"./chunk-FIAAX3UE.js";import{safeStableStringify as o}from"./chunk-BHIBDDQF.js";import{isString as n,isNumber as s,isNull as a,isUndefined as c,isNaN as i,isArray as m,isObject as l,isNonEmptyString as u,getPreciseType as v,isError as f,assertIsPlainObject as d,hasOwnProp as p,isBoolean as N,isFunction as g}from"./chunk-EW3I4O7X.js";var y=e=>{if(!n(e)&&!s(e))return 0;const r=String(e).trim().replace(/[^0-9]/g,"");return Number(r)||0},b=(e={})=>{d(e,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const r=!!p(e,"convertBooleans")&&e.convertBooleans,o=!!p(e,"convertDates")&&e.convertDates,n=!!p(e,"convertNumbers")&&e.convertNumbers,s=!!p(e,"loggingOnFail")&&e.loggingOnFail,a=!!p(e,"removeEmptyArrays")&&e.removeEmptyArrays,c=!!p(e,"removeEmptyObjects")&&e.removeEmptyObjects,i=!!p(e,"removeNulls")&&e.removeNulls,l=!!p(e,"removeUndefined")&&e.removeUndefined,u=!!p(e,"strictMode")&&e.strictMode,f=!!p(e,"checkSymbols")&&e.checkSymbols,y=!!p(e,"convertNaN")&&e.convertNaN,b=p(e,"customDateFormats")?e.customDateFormats:[],E=p(e,"onError")?e.onError:t;if(!(N(r)&&N(o)&&N(n)&&N(y)&&N(f)&&N(s)&&N(a)&&N(c)&&N(i)&&N(l)&&N(u)&&m(b)&&g(E)))throw new TypeError(`Invalid \`options\` parameter (second argument): \`convertBooleans\`, \`convertDates\`, \`convertNumbers\`, \`loggingOnFail\`, \`removeEmptyArrays\`, \`removeEmptyObjects\`, \`removeNulls\`, \`removeUndefined\`, \`strictMode\` expected to be a \`boolean\` type, \`customDateFormats\` expected to be a \`array\` type and \`onError\` expected to be a \`void function\` type. But received: ['convertBooleans': \`${v(r)}\`, 'convertDates': \`${v(o)}\`, 'convertNumbers': \`${v(n)}\`, 'loggingOnFail': \`${v(s)}\`, 'removeEmptyArrays': \`${v(a)}\`, 'removeEmptyObjects': \`${v(c)}\`, 'removeNulls': \`${v(i)}\`, 'removeUndefined': \`${v(l)}\`, 'strictMode': \`${v(u)}\`, 'customDateFormats': \`${v(b)}\`, 'onError': \`${v(E)}\`].`);return{convertBooleans:r,convertDates:o,convertNumbers:n,convertNaN:y,loggingOnFail:s,removeEmptyArrays:a,removeEmptyObjects:c,removeNulls:i,removeUndefined:l,strictMode:u,customDateFormats:b,onError:E,checkSymbols:f}},E=(t,o={})=>{var s;const u=b(o);if(a(t))return u.removeNulls?void 0:null;if(!c(t)){if(n(t)){const e=t.trim();if(u.convertNaN&&"NaN"===e)return NaN;if(u.convertNumbers&&!i(Number(e)))return Number(e);if(u.convertBooleans){if("true"===e)return!0;if("false"===e)return!1}if(u.convertDates){if(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e))return new Date(e);if(null==(s=u.customDateFormats)?void 0:s.length)for(const r of u.customDateFormats){const t=D(e,r);if(t)return t}}return u.strictMode?void 0:e}if(m(t)){const r=t.map(e=>E(e,u)).filter(e=>!c(e));return u.removeEmptyArrays&&e(r)?void 0:r}if(l(t)){const e={};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const o=E(t[r],u);c(o)||(e[r]=o)}return u.removeEmptyObjects&&r(e,{checkSymbols:u.checkSymbols})?void 0:e}return u.strictMode?void 0:t}u.removeUndefined},D=(e,r)=>{if(!u(e)||!u(r))throw new TypeError(`Parameter \`dateString\` and \`format\` must be of type \`string\` and not empty-string, but received: "['dateString': \`${v(e)}\` - (current value: \`${o(e)}\`), 'format': \`${v(r)}\` - (current value: \`${o(r)}\`)]".`);const t=e.split(/[-/]/).map(Number);if(3!==t.length||t.some(i))return null;let n,s,a;if("DD/MM/YYYY"===r)[n,s,a]=t;else{if("MM/DD/YYYY"!==r)return null;[s,n,a]=t}s-=1;const c=new Date(a,s,n);return c.getFullYear()!==a||c.getMonth()!==s||c.getDate()!==n?null:c};function h(e,r={}){if(a(e))return null;const t=b(r);if(t.convertNaN&&(i(e)||u(e)&&"NaN"===e))return NaN;if(t.convertNumbers&&!i(Number(e))&&s(y(e)))return Number(e);if(n(e))try{let r=function(e){const r=new Set(["\\",'"',"/","b","f","n","r","t","u"]);let t="",o=!1,n=!1,s=!1;for(let a=0;a<e.length;a++){const c=e[a];if(s)o?"'"===c?t+="'":r.has(c)?t+="\\"===c?"\\\\":'"'===c?'\\"':"\\"+c:t+="\\\\"+c:n?'"'===c?t+='\\"':r.has(c)?t+="\\"+c:t+="\\\\"+c:t+="\\"+c,s=!1;else if("\\"!==c){if(o||n){if(o){if("'"===c){t+='"',o=!1;continue}}else if(n&&'"'===c){t+='"',n=!1;continue}}else{if("'"===c){t+='"',o=!0;continue}if('"'===c){t+='"',n=!0;continue}}t+=c}else s=!0}return t}(e);r=t.removeUndefined?r.replace(/,\s*"[^"]*"\s*:\s*undefined(?=\s*[},])/g,"").replace(/"[^"]*"\s*:\s*undefined\s*(,)?/g,""):r.replace(/:\s*undefined(?=\s*[,}])/g,":null"),r=t.convertNaN?r.replace(/:\s*NaN(?=\s*[,}])/g,':"NaN"'):r.replace(/:\s*NaN(?=\s*[,}])/g,':"NaN"').replace(/,\s*"[^"]*"\s*:\s*NaN(?=\s*[},])/g,"").replace(/"[^"]*"\s*:\s*NaN\s*(,)?/g,""),r=r.replace(/,(\s*[}\]])/g,"$1");const o=JSON.parse(r);return E(o,t)}catch(e){return t.loggingOnFail&&console.error("Failed to parsing at `safeJsonParse`:",e),void t.onError(f(e)?new Error(e.message.replace(/^JSON\.parse:/,"Failed to parsing")):new Error(String(e)))}}export{E as cleanParsedData,y as extractDigits,D as parseCustomDate,h as safeJsonParse};
@@ -1 +0,0 @@
1
- import{isInteger as e}from"./chunk-WVSPXFTY.js";import{safeStableStringify as r}from"./chunk-BHIBDDQF.js";import{getPreciseType as n,isNull as o}from"./chunk-EW3I4O7X.js";var t=(t=1e3,i)=>{if(!e(t)||t<=0)throw new TypeError(`First parameter (\`milliSeconds\`) must be of type \`number\` and value must be a \`non-zero\`, \`non-NaN\`, \`non-negative\`, and \`integer-number\`, but received: \`${n(t)}\`, with value: \`${r(t)}\`.`);if(o(i)||i&&!(i instanceof AbortSignal))throw new TypeError("Second parameter (`signal`) must be an `instance of AbortSignal` if provided.");return new Promise((e,r)=>{const n=setTimeout(()=>{o(),e()},t),o=()=>{clearTimeout(n),i&&i.removeEventListener("abort",a)},a=()=>{o(),r(new DOMException("Function `delay` aborted","AbortError"))};i&&(i.aborted?a():i.addEventListener("abort",a,{once:!0}))})};export{t as delay};
@@ -1 +0,0 @@
1
- "use strict";var r=require("./chunk-UDA26MCU.cjs"),e=require("./chunk-D3VSHABU.cjs");function t(r){return"[object Map]"===Object.prototype.toString.call(r)||r instanceof Map}var s=r=>r instanceof Date&&!e.isNaN(r.getTime());exports.isDate=s,exports.isMap=t,exports.safeStableStringify=(n,i={})=>{e.assertIsPlainObject(i,{message:({currentType:r,validType:e})=>`Second parameter (\`options\`) must be of type \`${e}\`, but received: \`${r}\`.`});const o=!!e.hasOwnProp(i,"pretty")&&i.pretty,a=!e.hasOwnProp(i,"sortKeys")||i.sortKeys,c=!!e.hasOwnProp(i,"sortArray")&&i.sortArray;if(!e.isBoolean(a)||!e.isBoolean(c)||!e.isBoolean(o))throw new TypeError(`Parameters \`sortKeys\`, \`sortArray\` and \`pretty\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: "['sortKeys': \`${e.getPreciseType(a)}\`, 'sortArray': \`${e.getPreciseType(c)}\`, 'pretty': \`${e.getPreciseType(o)}\`]".`);const u=new WeakSet,f=r=>e.isNull(r)||!e.isObjectOrArray(r)&&!e.isFunction(r),p=n=>{if(n instanceof Number)return Number(n);if(n instanceof String)return String(n);if(n instanceof Boolean)return Boolean(n);if(!e.isFunction(n)&&!e.isSymbol(n)){if(r.isBigInt(n))return n.toString();if(e.isUndefined(n)||e.isNaN(n)||n===1/0||n===-1/0)return null;if(e.isObjectOrArray(n)){if(u.has(n))return"[Circular]";if(u.add(n),s(n))return n.toISOString();if(t(n))return{map:Array.from(n.entries()).map(([r,e])=>[r,p(e)])};if(e.isSet(n))return{set:Array.from(n.values()).map(p)};if(e.isArray(n)){const r=n.map(p);if(c){const t=[],s=[];for(const e of r)f(e)?t.push(e):s.push(e);return t.sort((r,t)=>e.isNumber(r)&&e.isNumber(t)?r-t:String(r).localeCompare(String(t))),[...t,...s]}return r}const r=Object.keys(n);a&&r.sort((r,t)=>{const s=Number(r),n=Number(t);return e.isNaN(s)||e.isNaN(n)?r.localeCompare(t):s-n});const i={};if(e.isObject(n))for(const t of r){const r=p(n[t]);e.isUndefined(r)||(i[t]=r)}return i}return n}};try{return JSON.stringify(p(n),null,o?2:0)}catch(r){return console.warn("Error in safeStableStringify:",r),"{}"}};
@@ -1 +0,0 @@
1
- import{parseCurrencyString as e}from"./chunk-EUANTHVN.js";import{isFinite as t}from"./chunk-OWV2P376.js";import{normalizeSpaces as r}from"./chunk-MISCBZJC.js";import{isEmptyString as n}from"./chunk-KOVO72OM.js";import{assertIsString as o}from"./chunk-T4CIAKEK.js";import{isInteger as a}from"./chunk-WVSPXFTY.js";import{safeStableStringify as i}from"./chunk-BHIBDDQF.js";import{isString as s,getPreciseType as u,assertIsPlainObject as p,hasOwnProp as l,isBoolean as c,isPlainObject as m,isNaN as d,isUndefined as f,isFunction as y,assertIsBoolean as h,isNil as b,isNumber as g,isNonEmptyString as $}from"./chunk-EW3I4O7X.js";import{id as v,enUS as w}from"date-fns/locale";import{isDate as T,parse as D,format as k}from"date-fns";var S=(r,n={})=>{if(!s(r)&&!t(r))throw new TypeError(`First parameter (\`value\`) must be of type \`string\` or \`primitive-number\`, but received: \`${u(r)}\`, with value: \`${i(r)}\`.`);p(n,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const b=!!l(n,"decimal")&&n.decimal,g=l(n,"totalDecimal")?n.totalDecimal:2,$=!l(n,"endDecimal")||n.endDecimal,v=!!l(n,"indianFormat")&&n.indianFormat,w=l(n,"suffixCurrency")?n.suffixCurrency:"",T=l(n,"suffixDecimal")?n.suffixDecimal:"",D=l(n,"roundedDecimal")?n.roundedDecimal:"round",k=l(n,"negativeFormat")?n.negativeFormat:"dash";let S=l(n,"separatorDecimals")?n.separatorDecimals:",",M=l(n,"separator")?n.separator:".";if(!(s(M)&&s(S)&&s(w)&&s(T)))throw new TypeError(`Parameter \`separator\`, \`separatorDecimals\`, \`suffixCurrency\` and \`suffixDecimal\` property of the \`options\` (second parameter) must be of type \`string\`, but received: ['separator': \`${u(M)}\`, 'separatorDecimals': \`${u(S)}\`, 'suffixCurrency': \`${u(w)}\`, 'suffixDecimal': \`${u(T)}\`].`);if(!c(b)||!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': \`${u(b)}\`, 'endDecimal': \`${u($)}\`, 'indianFormat': \`${u(v)}\`].`);if(!a(g))throw new TypeError(`Parameter \`totalDecimal\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${u(g)}\`, with value: \`${i(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: \`${u(D)}\`, with value: \`${i(D)}\`.`);if("abs"!==k&&"brackets"!==k&&"dash"!==k&&!m(k))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: \`${u(k)}\`, with value: \`${i(k)}\`.`);const E=s(r)?e(r):r;if(d(E))throw new TypeError("First parameter (`value`) could not be parsed into a valid `number`.");let F="",N="",P=Math.abs(E);const x=Math.pow(10,g);if(D){const e=P*x;switch(D){case"round":P=Math.round(e)/x;break;case"ceil":P=Math.ceil(e)/x;break;case"floor":P=Math.floor(e)/x}}if(D)[F,N]=P.toFixed(g).split("."),N=N??"".padEnd(g,"0");else{const e=String(P).split(".");F=e[0],N=(e[1]||"").slice(0,g).padEnd(g,"0")}let j;if(v?(M=",",S=".",j=(w.trim().length?w:"")+C(F,M)):j=(w.trim().length?w:"")+F.replace(/\B(?=(\d{3})+(?!\d))/g,M),b&&!f(N)&&g>0){let e=S+N;$&&(e+=T),j+=e}if(E<0)if("dash"===k)j="-"+j;else if("brackets"===k)j="("+j+")";else if("abs"===k);else if(m(k))if(l(k,"custom")){const e=k.custom;if(!y(e))throw new TypeError(`Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) must be of type function: \`(formatted: string) => string\`, but received: \`${u(e)}\`.`);const t=e(j);o(t,{message:({currentType:e,validType:t})=>`Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) expected return a \`${t}\` type value, but received: \`${e}\`.`}),j=t}else{const e=k.style||"dash",t=!f(k.space)&&k.space;if(h(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: \`${u(e)}\`, with value: \`${i(e)}\`.`);switch(e){case"dash":j="-"+(t?" ":"")+j;break;case"brackets":j=t?`( ${j} )`:`(${j})`}}return j},C=(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},M=(e,r=",")=>{if(!s(e)&&!t(e))throw new TypeError(`First parameter (\`value\`) must be of type \`string\` or \`primitive number\`, but received: \`${u(e)}\`.`);if(!s(r))throw new TypeError(`Second parameter (\`separator\`) must be of type \`string\` or empty as \`undefined\`, but received: \`${u(r)}\`.`);const n="."===(r=s(r)?r:",")?",":".",o=e.toString().trim(),a=o.lastIndexOf("."),i=o.lastIndexOf(",");let p="";a>i?p=".":i>a&&(p=",");let l=o,c="";if(p){const e=o.split(p);l=e.slice(0,-1).join(p),c=e.slice(-1)[0]}l=l.replace(/[^\d]/g,"");const m=l.replace(/\B(?=(\d{3})+(?!\d))/g,r);return c?`${m}${n}${c}`:m};function E(e,t={}){if(b(e))return"";if(!s(e)&&!g(e))throw new TypeError(`First parameter (\`value\`) must be of type \`string\`, \`number\`, \`null\` or \`undefined\`, but received: \`${u(e)}\`.`);p(t,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=l(t,"separator")?t.separator:" ",n=!!l(t,"takeNumberOnly")&&t.takeNumberOnly,o=!!l(t,"checkValidOnly")&&t.checkValidOnly,a=l(t,"plusNumberCountry")?t.plusNumberCountry:"",i=l(t,"openingNumberCountry")?t.openingNumberCountry:"",m=l(t,"closingNumberCountry")?t.closingNumberCountry:"";if(!c(n)||!c(o))throw new TypeError(`Parameter \`takeNumberOnly\` and \`checkValidOnly\` property of the \`options\` (second parameter) must be of type \`boolean\` or unset as \`undefined\` value, but received: ['takeNumberOnly': \`${u(n)}\`, 'checkValidOnly': \`${u(o)}\`].`);if(!(s(r)&&s(a)&&s(i)&&s(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': \`${u(r)}\`, 'plusNumberCountry': \`${u(a)}\`, 'openingNumberCountry': \`${u(i)}\`, 'closingNumberCountry': \`${u(m)}\`].`);if(s(e)||(e=String(e)),n)return e.replace(/\D/g,"");if(o)return/^(\+)?[0-9\s().-]+$/.test(e)&&e.replace(/\D/g,"").length<24;e=e.replace(/\D/g,"");let d=a.trim().replace(/\s+/g,"").replace(/[^\d+]/g,"");/^\+/.test(d)&&(d="+"+d.replace(/^\++/,""));let f="",y="";({7:"Russia, Kazakhstan",27:"South Africa",31:"Netherlands",32:"Belgium",33:"France",34:"Spain",36:"Hungary",39:"Italy, San Marino, Vatican",44:"United Kingdom",46:"Sweden",47:"Norway",48:"Poland",49:"Germany",52:"Mexico",54:"Argentina",55:"Brazil",56:"Chile",61:"Australia",62:"Indonesia",64:"New Zealand",81:"Japan",82:"South Korea",86:"China",90:"Turkey",91:"India",92:"Pakistan",351:"Portugal",352:"Luxembourg",971:"UAE"})[d.replace(/^\+/,"").replace(/[^\d]/g,"")]&&e.startsWith("0")?(f=e.slice(1,4),y=e.slice(4)):(f=e.slice(0,4),y=e.slice(4));const h=d.trim(),$=i.trim(),v=m.trim();let w="";w=h?$&&v?`${$}${h}${v} ${f}`:$&&!v?`${$}${h} ${f}`:!$&&v?`${h}${v} ${f}`:`${h} ${f}`:`${f}`;const T={0:r,4:r,8:r,12:r,16:r,20:r,24:r};for(let e=0;e<y.length;e++){w+=(T[e+f.length]||"")+y[e]}return w}var F=(e,t)=>{if(b(t)&&(t="YYYY-MM-DD hh:mm:ss"),!s(t))return null;if(b(e)||!T(e)&&!$(e))return null;try{const r=new Date(e);if(d(r.getTime()))return null;const n=e=>e.toString().padStart(2,"0"),o={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())},a=Object.entries(o).reduce((e,[t,r])=>e.split(t).join(r),t);return a.includes("NaN")?null:a}catch{return null}},N=(e,t)=>{if(b(e)||!T(e)&&!$(e))return null;const r=new Date(e);if(d(r.getTime()))return null;m(t)||(t={});const{locale:n="en-US",...o}=t;try{return new Intl.DateTimeFormat($(n)?n.trim():"en-US",o).format(r)}catch{return null}},P=(e,t={})=>{if(b(e)||!T(e)&&!$(e))return null;m(t)||(t={});const{inputFormat:r,locale:n="en",inputLocale:o="en",...a}=t,i=l(t,"format")&&$(t.format)?t.format:"dd MMM yyyy - HH:mm:ss";let s;try{if($(e)&&r&&o){const t=$(o)?"id"===o?v:w:o;s=D(e,r,new Date,{locale:t})}else s=new Date(e);if(d(s.getTime()))return null;const t=$(n)?"id"===n?v:w:n;return k(s,i,{...a,locale:t})}catch{return null}},x=e=>{try{if(b(e)||s(e)&&n(e))e=new Date;else if(!T(e)&&!$(e))return"0";const t=new Date(e);if(d(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"}},j=(e,t={})=>{if(!$(e))return"";p(t,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=l(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: \`${u(r)}\`, with value: \`${i(r)}\`.`);if(!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e))return"";const[n,o]=e.split("@"),a=o.split(".");if(a.length<2)return"";const[s,...c]=a,m=c.join("."),d=O(r,e),f=n.length<4?1:2,y=s.length<4?1:2;return`${A(n,f,.6,d)}@${A(s,y,.5,d)}.${m.length<=2?m:A(m,1,.4,d)}`},O=(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,A=(e,t,r,n)=>{if(e.length<=t)return"*".repeat(e.length);const o=e.split(""),a=Math.max(t,Math.ceil(e.length*r)),i=new Set;let s=0;for(;i.size<a;){const t=f(n)?Math.floor(Math.random()*e.length):(n+e.length+31*s)%e.length;i.add(t),s++}for(const e of i)o[e]="*";return o.join("")};function I(e,t,n={}){if(b(e)||t<=0)return e;if(o(e,{message:({currentType:e,validType:t})=>`First parameter (\`subject\`) must be of type \`${t}\`, but received: \`${e}\`.`}),!a(t))throw new TypeError(`Second parameter (\`limiter\`) must be of type \`integer-number\`, but received: \`${u(t)}\`, with value: \`${i(t)}\`.`);p(n,{message:({currentType:e,validType:t})=>`Third parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const s=l(n,"separator")?n.separator:" ",c=!!l(n,"reCountAfterSpace")&&n.reCountAfterSpace;if(o(s,{message:({currentType:e,validType:t})=>`Parameter \`separator\` property of the \`options\` (third parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),h(c,{message:({currentType:e,validType:t})=>`Parameter \`reCountAfterSpace\` property of the \`options\` (third parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),e=r(e),!c){let r="",n=0;for(let o=0;o<e.length;o++){n===t&&(r+=s,n=0),r+=e[o],n++}return r}const m=e.split(" "),d=[];let f=[],y=0;for(let e=0;e<m.length;e++){const r=m[e];let n="",o=0;for(let e=0;e<r.length;e++)n+=r[e],o++,o===t&&e<r.length-1&&(n+=s,o=0);f.push(n),y++,y!==t&&e!==m.length-1||(d.push(f.join(s)),f=[],y=0)}return d.join(" ")}var Y=(e,t={})=>{if(!$(e))return"";p(t,{message:({currentType:e,validType:t})=>`Seconds parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=!l(t,"trim")||t.trim,s=l(t,"length")?t.length:10;let c=l(t,"ending")?t.ending:"...";if(!a(s))throw new TypeError(`Parameter \`length\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${u(s)}\`, with value: \`${i(s)}\`.`);if(s<1)return"";o(c,{message:({currentType:e,validType:t})=>`Parameter \`ending\` property of the \`options\` (second parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),h(r,{message:({currentType:e,validType:t})=>`Parameter \`trim\` property of the \`options\` (second parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),c=n(c)?"...":c.trim();const m=r?e.trim():e;if(m.length<=s)return m;const d=m.slice(0,s);return(r?d:d.trimEnd())+c};export{j as censorEmail,I as chunkString,S as formatCurrency,P as formatDateFns,N as formatDateIntl,F as formatDateTime,M as formatNumber,E as formatPhoneNumber,x as getGMTOffset,Y as truncateString};
@@ -1 +0,0 @@
1
- import{isDate as e,isMap as r}from"./chunk-BHIBDDQF.js";import{isObjectOrArray as t,isError as n,isSet as f,isArray as i,isObject as o,assertIsPlainObject as u,hasOwnProp as s,assertIsBoolean as c,isUndefined as a}from"./chunk-EW3I4O7X.js";var g=e=>e instanceof RegExp;function y(e){return e instanceof ArrayBuffer}function l(o,u,s,c=new WeakMap){if(o===u)return!0;if(o!=o&&u!=u)return!0;if(!t(o)||!t(u))return!1;if(c.get(o)===u)return!0;c.set(o,u);const h=(e,r,t,n,f)=>{if(s){const i=s(e,r,t,n,f,c);if(!a(i))return i}return l(e,r,s,c)};if(e(o)&&e(u))return o.getTime()===u.getTime();if(g(o)&&g(u))return o.source===u.source&&o.flags===u.flags;if(n(o)&&n(u))return o.name===u.name&&o.message===u.message;if(ArrayBuffer.isView(o)&&ArrayBuffer.isView(u)){const e=new Uint8Array(o.buffer,o.byteOffset,o.byteLength),r=new Uint8Array(u.buffer,u.byteOffset,u.byteLength);if(e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}if(y(o)&&y(u)){if(o.byteLength!==u.byteLength)return!1;const e=new Uint8Array(o),r=new Uint8Array(u);for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}if(r(o)&&r(u)){if(o.size!==u.size)return!1;for(const[e,r]of o){if(!u.has(e))return!1;if(!l(r,u.get(e),s,c))return!1}return!0}if(f(o)&&f(u)){if(o.size!==u.size)return!1;for(const e of o){let r=!1;for(const t of u)if(l(e,t,s,c)){r=!0;break}if(!r)return!1}return!0}if(i(o)&&i(u)){if(o.length!==u.length)return!1;for(let e=0;e<o.length;e++)if(!h(o[e],u[e],e,o,u))return!1;return!0}if(Object.getPrototypeOf(o)!==Object.getPrototypeOf(u))return!1;const b=Reflect.ownKeys(o),m=Reflect.ownKeys(u);if(b.length!==m.length)return!1;for(const e of b){if(!h(o[e],u[e],e,o,u))return!1}return!0}function h(e,r){return l(e,r,void 0,new WeakMap)}var b=e=>!i(e)||0===e.length;function m(e,r={}){if(!o(e))return!0;u(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const t=!!s(r,"checkSymbols")&&r.checkSymbols;c(t,{message:({currentType:e,validType:r})=>`Parameter \`checkSymbols\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const n=0===Object.keys(e).length;return t?n&&0===Object.getOwnPropertySymbols(e).length:n}export{l as baseDeepEqual,y as isArrayBuffer,b as isEmptyArray,m as isEmptyObject,h as isEqual,g as isRegExp};
@@ -1 +0,0 @@
1
- "use strict";require("../chunk-MMSYCIJ2.cjs");var e=require("../chunk-J2RGTPGK.cjs");Object.defineProperty(exports,"isServer",{enumerable:!0,get:function(){return e.isServer}});
@@ -1,16 +0,0 @@
1
- /** ----------------------------------------
2
- * * ***Utility: `isServer`.***
3
- * ----------------------------------------
4
- * **Checks if the current execution environment is at **server-side** (Node.js)
5
- * or **client-side** (browser).**
6
- * @returns {boolean}
7
- * - `true` ➔ running on the **server-side** (Node.js).
8
- * - `false` ➔ running on the **client-side** (browser).
9
- * @example
10
- * if (isServer()) {
11
- * console.log("Running on Node.js");
12
- * } else {
13
- * console.log("Running in the browser");
14
- * }
15
- */
16
- declare const isServer:()=>boolean;export{isServer};
package/dist/env/index.js DELETED
@@ -1 +0,0 @@
1
- import"../chunk-G5LXIEFO.js";export{isServer}from"../chunk-MC3LXMCQ.js";