@rzl-zone/utils-js 3.1.1-beta.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -27
- package/dist/assertions/index.cjs +1 -1
- package/dist/assertions/index.js +1 -1
- package/dist/chunk-26XIKDJI.cjs +1 -0
- package/dist/chunk-2NWHDDM5.js +1 -0
- package/dist/chunk-2UIRWYE3.js +1 -0
- package/dist/chunk-4VCRMMAH.cjs +1 -0
- package/dist/chunk-5C2SMIGX.cjs +1 -0
- package/dist/chunk-5I2B5DOG.js +1 -0
- package/dist/chunk-5Y52H4VH.cjs +1 -0
- package/dist/chunk-7BXIZM57.cjs +1 -0
- package/dist/chunk-7H7IODCQ.cjs +1 -0
- package/dist/chunk-7KJBDGEP.js +1 -0
- package/dist/chunk-7PG6YKIY.cjs +1 -0
- package/dist/chunk-7YVINA3U.cjs +1 -0
- package/dist/chunk-AXWJJXJC.js +1 -0
- package/dist/chunk-CPLBRGST.js +1 -0
- package/dist/chunk-DQFU3KLE.cjs +1 -0
- package/dist/chunk-DUK2K4FB.js +1 -0
- package/dist/chunk-DVMHRLKP.cjs +1 -0
- package/dist/chunk-EBMHQW7X.cjs +1 -0
- package/dist/chunk-EXWCTDC3.cjs +1 -0
- package/dist/chunk-FIAAX3UE.js +1 -0
- package/dist/chunk-G2B35D5W.js +1 -0
- package/dist/chunk-GLUYWYOA.cjs +1 -0
- package/dist/chunk-GRSCNTOK.js +1 -0
- package/dist/chunk-I5X5IN4H.js +1 -0
- package/dist/chunk-I6NOFGAK.cjs +1 -0
- package/dist/chunk-INUFZJLX.cjs +1 -0
- package/dist/chunk-IRBPXCMR.js +1 -0
- package/dist/chunk-J2RGTPGK.cjs +1 -0
- package/dist/chunk-KHO2SBNA.cjs +1 -0
- package/dist/chunk-KXIXXSWX.cjs +1 -0
- package/dist/chunk-L73TOPX5.js +1 -0
- package/dist/chunk-MC3LXMCQ.js +1 -0
- package/dist/chunk-MHXVVDRQ.cjs +1 -0
- package/dist/chunk-MMSYCIJ2.cjs +1 -1
- package/dist/chunk-NHNBV5VS.cjs +1 -0
- package/dist/chunk-NXWPZDDX.js +1 -0
- package/dist/chunk-ODZQXH7E.cjs +1 -0
- package/dist/chunk-ONZFBJVW.js +1 -0
- package/dist/chunk-Q6NHYWVX.js +1 -0
- package/dist/chunk-QNKGP5DY.js +1 -0
- package/dist/chunk-QVRTHAM2.js +1 -0
- package/dist/chunk-RF34NETZ.js +1 -0
- package/dist/chunk-SAW7XS4K.js +1 -0
- package/dist/chunk-TSLYDPBJ.js +1 -0
- package/dist/chunk-UDA26MCU.cjs +1 -0
- package/dist/chunk-UET567YM.cjs +1 -0
- package/dist/chunk-URGK5UQT.js +1 -0
- package/dist/chunk-VEYMQ3UA.js +1 -0
- package/dist/chunk-W2W3L2M5.js +1 -0
- package/dist/chunk-WFPQO7KN.js +1 -0
- package/dist/chunk-WVSPXFTY.js +1 -0
- package/dist/chunk-WZE3XLKY.cjs +1 -0
- package/dist/chunk-X4PD3I5U.js +1 -0
- package/dist/chunk-XC2PYCT4.cjs +1 -0
- package/dist/chunk-XIXA5KDF.cjs +1 -0
- package/dist/chunk-XSFPU3YT.js +1 -0
- package/dist/chunk-XVHPXRUH.cjs +1 -0
- package/dist/chunk-Y44ZD3GG.js +1 -0
- package/dist/chunk-Y4O5KZF6.cjs +1 -0
- package/dist/chunk-YT3MSZKK.cjs +1 -0
- package/dist/chunk-YZR5OGJA.cjs +1 -0
- package/dist/chunk-ZR7GTJQX.cjs +1 -0
- package/dist/chunk-ZXIWDFEQ.js +1 -0
- package/dist/conversions/index.cjs +1 -1
- package/dist/conversions/index.d.ts +175 -40
- package/dist/conversions/index.js +1 -1
- package/dist/env/index.cjs +1 -1
- package/dist/env/index.js +1 -1
- package/dist/events/index.cjs +1 -1
- package/dist/events/index.js +1 -1
- package/dist/formatting/index.cjs +1 -1
- package/dist/formatting/index.js +1 -1
- package/dist/generator/index.cjs +1 -1
- package/dist/generator/index.js +1 -1
- package/dist/{is-array--YjXV-Wx.d.ts → is-array-Cymwrsmm.d.ts} +2 -90
- package/dist/next/index.cjs +1 -8
- package/dist/next/index.js +1 -8
- package/dist/next/server/index.cjs +1 -2
- package/dist/next/server/index.js +1 -2
- package/dist/operations/index.cjs +1 -1
- package/dist/operations/index.js +1 -1
- package/dist/or-DyZCRvaU.d.ts +89 -0
- package/dist/parsers/index.cjs +1 -1
- package/dist/parsers/index.js +1 -1
- package/dist/predicates/index.cjs +1 -1
- package/dist/predicates/index.d.ts +111 -17
- package/dist/predicates/index.js +1 -1
- package/dist/promise/index.cjs +1 -1
- package/dist/promise/index.js +1 -1
- package/dist/rzl-utils.global.js +1 -4
- package/dist/strings/index.cjs +1 -1
- package/dist/strings/index.js +1 -1
- package/dist/tailwind/index.cjs +1 -0
- package/dist/tailwind/index.d.ts +565 -0
- package/dist/tailwind/index.js +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/urls/index.cjs +1 -1
- package/dist/urls/index.js +1 -1
- package/package.json +24 -23
- package/dist/chunk-26W3VZIK.cjs +0 -1
- package/dist/chunk-2KRCHXFG.cjs +0 -2
- package/dist/chunk-33ZLH266.js +0 -1
- package/dist/chunk-4L4EJTNZ.js +0 -1
- package/dist/chunk-56QBKKRE.js +0 -1
- package/dist/chunk-5Q37AP7P.js +0 -1
- package/dist/chunk-5SZUSNGZ.js +0 -1
- package/dist/chunk-7CHFAMS2.js +0 -1
- package/dist/chunk-7MMJZ6HS.js +0 -1
- package/dist/chunk-7TC6DE3J.cjs +0 -1
- package/dist/chunk-7VX33E3V.js +0 -1
- package/dist/chunk-7YWAQOA4.cjs +0 -1
- package/dist/chunk-BEZPD44N.cjs +0 -1
- package/dist/chunk-BI263OHW.js +0 -1
- package/dist/chunk-CII6WWLO.cjs +0 -1
- package/dist/chunk-D5TYPCWU.cjs +0 -1
- package/dist/chunk-EEQY5QUG.js +0 -1
- package/dist/chunk-ELDDNERR.js +0 -1
- package/dist/chunk-ESJYBIYH.js +0 -1
- package/dist/chunk-EWYPSKKM.js +0 -1
- package/dist/chunk-EXCOQLWX.cjs +0 -1
- package/dist/chunk-FIEZKTAZ.cjs +0 -1
- package/dist/chunk-FWQVTMYA.cjs +0 -1
- package/dist/chunk-G4EWCRKS.js +0 -1
- package/dist/chunk-G7R5XZRM.cjs +0 -1
- package/dist/chunk-GGEV7LXX.cjs +0 -1
- package/dist/chunk-HJOZOENU.cjs +0 -1
- package/dist/chunk-IRDZVLNZ.cjs +0 -1
- package/dist/chunk-IW73G523.cjs +0 -1
- package/dist/chunk-IY5OZAB3.cjs +0 -1
- package/dist/chunk-J4NCYYGS.js +0 -1
- package/dist/chunk-J7JAZAJD.js +0 -1
- package/dist/chunk-JYNSO7ZY.js +0 -1
- package/dist/chunk-K3UVKYEU.js +0 -1
- package/dist/chunk-LQ76EDZG.js +0 -1
- package/dist/chunk-MROH35V3.cjs +0 -1
- package/dist/chunk-NJSAV73S.js +0 -1
- package/dist/chunk-NNM7QCNB.js +0 -1
- package/dist/chunk-NR44SNYE.js +0 -1
- package/dist/chunk-NXMTWY77.js +0 -1
- package/dist/chunk-OZCQZO2V.cjs +0 -4
- package/dist/chunk-PUQXRLZH.cjs +0 -1
- package/dist/chunk-Q3NTKN5I.cjs +0 -1
- package/dist/chunk-QDNSC57Z.js +0 -4
- package/dist/chunk-QGXTL5ZH.js +0 -2
- package/dist/chunk-QSQDP7L2.cjs +0 -1
- package/dist/chunk-RV2VULM7.cjs +0 -1
- package/dist/chunk-S5M33A4O.js +0 -1
- package/dist/chunk-SGTHOQQ2.js +0 -1
- package/dist/chunk-SL3RQOWA.js +0 -1
- package/dist/chunk-SW6HYEW7.cjs +0 -1
- package/dist/chunk-SYJC7UAW.js +0 -1
- package/dist/chunk-SZPWZZYG.cjs +0 -1
- package/dist/chunk-UA4B7JBO.cjs +0 -1
- package/dist/chunk-UQDJF5RR.cjs +0 -1
- package/dist/chunk-UTQUYABU.cjs +0 -1
- package/dist/chunk-VPW3DRV5.js +0 -1
- package/dist/chunk-W32WALNU.js +0 -1
- package/dist/chunk-XGZ6K753.cjs +0 -1
- package/dist/chunk-YFTR64N5.cjs +0 -1
- package/dist/chunk-ZFDS7W6B.cjs +0 -1
- package/dist/chunk-ZQOLZE6Z.cjs +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/stylings/index.cjs +0 -1
- package/dist/stylings/index.d.ts +0 -41
- package/dist/stylings/index.js +0 -1
package/README.md
CHANGED
|
@@ -6,18 +6,34 @@
|
|
|
6
6
|
🚀 <strong>Rzl Utility JavaScript</strong> 🚀<br/>
|
|
7
7
|
A lightweight, modern TypeScript utility library for Node.js & browser (via bundlers like Webpack/Vite).<br/>
|
|
8
8
|
Provides reusable helpers to simplify your JavaScript / TypeScript projects.<br/>
|
|
9
|
-
<strong>Built with ❤️ by <a href="https://github.com/rzl-app">@rzl-app</a>.</strong>
|
|
9
|
+
<strong>Built with ❤️ by <a href="https://github.com/rzl-app" target="_blank" rel="nofollow noreferrer noopener">@rzl-app</a>.</strong>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<div align="center">
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
<p>
|
|
15
|
+
<a href="https://npmjs.com/package/@rzl-zone/utils-js" target="_blank" rel="nofollow noreferrer noopener">
|
|
16
|
+
<img src="https://img.shields.io/npm/v/@rzl-zone/utils-js?color=blue&style=flat-rounded" alt="Latest Version on NPM" data-canonical-src="https://img.shields.io/npm/v/@rzl-zone/utils-js?color=blue&style=flat-rounded">
|
|
17
|
+
</a>
|
|
18
|
+
<a href="https://npmjs.com/package/@rzl-zone/utils-js" target="_blank" rel="nofollow noreferrer noopener">
|
|
19
|
+
<img src="https://img.shields.io/npm/dt/@rzl-zone/utils-js?style=flat-rounded" alt="Downloads">
|
|
20
|
+
</a>
|
|
21
|
+
<a href="https://nodejs.org/en/" target="_blank" rel="nofollow noreferrer noopener">
|
|
22
|
+
<img src="https://img.shields.io/badge/node-≥16.0.0%20%7C%20≥18.17.0-blue.svg?logo=node.js&style=flat-rounded" alt="Node.js">
|
|
23
|
+
</a>
|
|
24
|
+
<a href="https://github.com/rzl-zone/utils-js/blob/main/CONTRIBUTING.md" target="_blank" rel="nofollow noreferrer noopener">
|
|
25
|
+
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome">
|
|
26
|
+
</a>
|
|
27
|
+
<a href="https://github.com/rzl-zone/utils-js/blob/main/LICENSE.md" target="_blank" rel="nofollow noreferrer noopener">
|
|
28
|
+
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="GitHub license">
|
|
29
|
+
</a>
|
|
30
|
+
<a href="https://github.com/rzl-zone/utils-js" target="_blank" rel="nofollow noreferrer noopener">
|
|
31
|
+
<img src="https://img.shields.io/badge/GitHub-rzl--zone%2Futils--js-181717?logo=github" alt="GitHub">
|
|
32
|
+
</a>
|
|
33
|
+
<a href="https://github.com/rzl-app" target="_blank" rel="nofollow noreferrer noopener">
|
|
34
|
+
<img src="https://img.shields.io/badge/Repo-on%20GitHub-181717?logo=github&style=flat-rounded" alt="Repo on GitHub">
|
|
35
|
+
</a>
|
|
36
|
+
</p>
|
|
21
37
|
|
|
22
38
|
</div>
|
|
23
39
|
|
|
@@ -34,7 +50,7 @@ Provides reusable helpers to simplify your JavaScript / TypeScript projects.<br/
|
|
|
34
50
|
- ❤️ [Sponsor](#sponsor-this-package)
|
|
35
51
|
- 📜 [Changelog](#changelog)
|
|
36
52
|
- 🤝 [Contributing](#contributing)
|
|
37
|
-
-
|
|
53
|
+
- 🔒 [Security](#security)
|
|
38
54
|
- 🙌 [Credits](#credits)
|
|
39
55
|
- 📄 [License](#license)
|
|
40
56
|
|
|
@@ -42,12 +58,14 @@ Provides reusable helpers to simplify your JavaScript / TypeScript projects.<br/
|
|
|
42
58
|
|
|
43
59
|
<h2 id="requirements">💻 Requirements</h2>
|
|
44
60
|
|
|
45
|
-
- **Node.js
|
|
46
|
-
This package leverages modern JavaScript & TypeScript features that require Node.js version 16.0.0 if not using
|
|
61
|
+
- **Node.js `≥16.0.0` or `≥18.17.0`**
|
|
62
|
+
This package leverages modern JavaScript & TypeScript features that require Node.js version 16.0.0 if not using Next.js, and for Next.js it must follow the official minimum Node.js version requirement depending on the version you use.
|
|
63
|
+
- 🔗 See official Next.js documentation:
|
|
64
|
+
<a href="https://nextjs.org/docs/getting-started/installation#system-requirements" target="_blank" rel="nofollow noreferrer noopener">NextJS Installation Requirements</a>
|
|
47
65
|
|
|
48
66
|
- Works with:
|
|
49
67
|
- ✅ Node.js (16.0.0+) - Without NextJS
|
|
50
|
-
- ✅ Node.js (18.17.0
|
|
68
|
+
- ✅ Node.js (18.17.0, or higher depending on NextJS version) - With NextJS
|
|
51
69
|
- ✅ Modern browsers (via bundlers like Webpack / Vite)
|
|
52
70
|
|
|
53
71
|
---
|
|
@@ -109,19 +127,30 @@ This package also provides utilities specially built for Next.js environments, n
|
|
|
109
127
|
|
|
110
128
|
<h2 id="detailed-features">💎 Detailed Features</h2>
|
|
111
129
|
|
|
112
|
-
### Full documentation
|
|
113
|
-
#### For now, explore the examples or dive into the source — all utilities are documented via **
|
|
130
|
+
### Full documentation <a href="https://docs-rzl-utils-js.vercel.app" target="_blank" rel="nofollow noreferrer noopener">Rzl UtilsJS</a> is **currently under construction** 🏗️.
|
|
131
|
+
#### For now, explore the examples or dive into the source — all utilities are documented via **TSDoc** and typed properly.
|
|
114
132
|
|
|
115
133
|
```ts
|
|
116
|
-
import { | } from "@rzl-zone/utils-js";
|
|
117
|
-
import { | } from "@rzl-zone/utils-js
|
|
118
|
-
import { | } from "@rzl-zone/utils-js
|
|
119
|
-
import { | } from "@rzl-zone/utils-js
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
134
|
+
import { | } from "@rzl-zone/utils-js/assertions";
|
|
135
|
+
import { | } from "@rzl-zone/utils-js/conversions";
|
|
136
|
+
import { | } from "@rzl-zone/utils-js/env";
|
|
137
|
+
import { | } from "@rzl-zone/utils-js/events";
|
|
138
|
+
import { | } from "@rzl-zone/utils-js/formatting";
|
|
139
|
+
import { | } from "@rzl-zone/utils-js/generator";
|
|
140
|
+
import { | } from "@rzl-zone/utils-js/generator";
|
|
141
|
+
import { | } from "@rzl-zone/utils-js/next";
|
|
142
|
+
import { | } from "@rzl-zone/utils-js/next/server";
|
|
143
|
+
import { | } from "@rzl-zone/utils-js/operations";
|
|
144
|
+
import { | } from "@rzl-zone/utils-js/parsers";
|
|
145
|
+
import { | } from "@rzl-zone/utils-js/predicates";
|
|
146
|
+
import { | } from "@rzl-zone/utils-js/promise";
|
|
147
|
+
import { | } from "@rzl-zone/utils-js/strings";
|
|
148
|
+
import { | } from "@rzl-zone/utils-js/stylings";
|
|
149
|
+
import { | } from "@rzl-zone/utils-js/urls";
|
|
150
|
+
|
|
151
|
+
import type { | } from "@rzl-zone/utils-js/types";
|
|
124
152
|
```
|
|
153
|
+
#### Just place your cursor right inside `{ }` or from after import from `"@rzl-zone/utils-js/"` like the pipe ("|") above then ctrl + space, there are many functions or types and then hover to each function is complete with how to use it because I have added tsDoc.
|
|
125
154
|
|
|
126
155
|
<!-- - <h4 id="detailed-features--assertions">
|
|
127
156
|
Assertions -
|
|
@@ -148,18 +177,18 @@ This package also provides utilities specially built for Next.js environments, n
|
|
|
148
177
|
|
|
149
178
|
<h2 id="usage">🔥 Usage</h2>
|
|
150
179
|
|
|
151
|
-
|
|
180
|
+
### Easy to use, just import on your code base.
|
|
152
181
|
|
|
153
|
-
|
|
182
|
+
#### Example Function Import:
|
|
154
183
|
|
|
155
184
|
```ts
|
|
156
|
-
import { isServer } from "@rzl-zone/utils-js";
|
|
185
|
+
import { isServer } from "@rzl-zone/utils-js/env";
|
|
157
186
|
|
|
158
187
|
console.log(isServer());
|
|
159
188
|
// true if running on Node.js, false if browser
|
|
160
189
|
```
|
|
161
190
|
|
|
162
|
-
|
|
191
|
+
#### Example Types Helper Import:
|
|
163
192
|
|
|
164
193
|
```ts
|
|
165
194
|
import type { OmitStrict } from "@rzl-zone/utils-js/types";
|
|
@@ -189,7 +218,7 @@ See [CONTRIBUTING](CONTRIBUTING.md).
|
|
|
189
218
|
|
|
190
219
|
---
|
|
191
220
|
|
|
192
|
-
<h2 id="security"
|
|
221
|
+
<h2 id="security">🔒 Security</h2>
|
|
193
222
|
|
|
194
223
|
Please report issues to [rizalvindwiky1998@gmail.com](mailto:rizalvindwiky1998@gmail.com).
|
|
195
224
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";var e=require("../chunk-UET567YM.cjs"),r=require("../chunk-YT3MSZKK.cjs"),t=require("../chunk-Y4O5KZF6.cjs");require("../chunk-UDA26MCU.cjs");var s=require("../chunk-INUFZJLX.cjs");Object.defineProperty(exports,"assertIsBigInt",{enumerable:!0,get:function(){return e.assertIsBigInt}}),Object.defineProperty(exports,"assertIsNumber",{enumerable:!0,get:function(){return e.assertIsNumber}}),Object.defineProperty(exports,"assertIsArray",{enumerable:!0,get:function(){return r.assertIsArray}}),Object.defineProperty(exports,"assertIsString",{enumerable:!0,get:function(){return t.assertIsString}}),Object.defineProperty(exports,"assertIsBoolean",{enumerable:!0,get:function(){return s.assertIsBoolean}}),Object.defineProperty(exports,"assertIsPlainObject",{enumerable:!0,get:function(){return s.assertIsPlainObject}});
|
package/dist/assertions/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{assertIsBigInt,assertIsNumber}from"../chunk-I5X5IN4H.js";export{assertIsArray}from"../chunk-ZXIWDFEQ.js";export{assertIsString}from"../chunk-W2W3L2M5.js";import"../chunk-QNKGP5DY.js";export{assertIsBoolean,assertIsPlainObject}from"../chunk-2UIRWYE3.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var s=require("./chunk-INUFZJLX.cjs"),a=new Set(["txt","md","rtf","tex","doc","docx","odt","ott","pdf","djvu","epub","mobi","azw","azw3","xls","xlsx","ods","csv","tsv","ppt","pptx","odp","pps","md","bib","tex","log","jpg","jpeg","png","gif","bmp","tif","tiff","webp","svg","ico","heif","heic","raw","cr2","nef","orf","sr2","dng","dds","psd","exr","xcf","ai","eps","cdr","psd","indd","mp3","wav","ogg","flac","aac","m4a","wma","alac","aiff","amr","mid","midi","opus","au","caf","ape","opus","mp4","mkv","avi","mov","flv","wmv","webm","mpeg","mpg","3gp","3g2","m4v","ts","mts","asf","rm","rmvb","vob","f4v","ogv","m2ts","mod","dav","zip","rar","7z","tar","gz","bz2","xz","tgz","tbz2","txz","lz","lzma","z","cab","arj","ace","iso","dmg","rpm","deb","pkg","apk","jar","iso","img","vhd","vmdk","qcow2","dmg","sql","db","dbf","mdb","accdb","json","xml","yaml","yml","toml","ini","plist","yaml","pkl","msgpack","h5","hdf5","parquet","avro","orc","ndjson","db","pdb","sqlite","sqlite3","dbx","sdf","js","jsx","ts","tsx","c","cpp","h","hpp","java","py","rb","go","rs","php","pl","sh","bat","cmd","ps1","lua","swift","kt","scala","cs","vb","dart","m","r","jl","fs","vbproj","sln","pri","Makefile","html","htm","xhtml","css","scss","sass","less","xml","json","yaml","yml","xlf","xlf","po","pot","jsp","asp","aspx","php","jspf","cgi","cfm","pl","env","conf","config","xml","ini","cfg","toml","yaml","dockerfile","gitignore","gitconfig","gitattributes","npmignore","lock","gradle","pom","yaml","prettierrc","eslintrc","babelrc","editorconfig","ttf","otf","woff","woff2","eot","dwg","dxf","shp","kml","kmz","gpx","stl","step","iges","3ds","3dm","fbx","obj","exe","msi","bin","run","com","cmd","apk","app","deb","rpm","elf","dll","so","dylib","sys","pem","crt","cer","key","der","csr","p12","pfx","jks","iso","cue","bin","nes","sfc","gba","nds","nes","sav","rom","pak","vpk","bik","epub","mobi","azw","azw3","fb2","lit","lrf","cbr","cbz","cbt","cba","opds","fasta","fa","fas","ffn","faa","fna","frn","fastq","fq","gb","gbk","sam","bam","vcf","gff","bed","log","bak","tmp","old","backup","swp","part","crdownload","torrent","ics","vcf","ics","ical","ics","ical","calendar","srt","sub","idx","cue","cdf","hdf","h5","nc","grib","fits","netcdf","sdf","vtk","xmind","drawio","jar","war","ear","crx","xpi","plugin","vsix","safariextz"]),t=new Set(["tar.gz","tar.bz2","tar.xz","tar.lz","tar.lzma","tar.Z","tar.zst","tar.xz"]);exports.extractFileName=r=>{if(!s.isNonEmptyString(r))return;let e=r.split("/").pop();if(""===e)return"";if(e){for(const s of t){const a=`.${s}`;if(e.toLowerCase().endsWith(a))return e.slice(0,-a.length)}for(;;){const s=e.lastIndexOf(".");if(-1===s)break;const t=e.slice(s+1).toLowerCase();if(!a.has(t))break;e=e.slice(0,s)}return e}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNumber as r,isString as e,getPreciseType as t,isNonEmptyString as i}from"./chunk-2UIRWYE3.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=e=>"boolean"==typeof e,r=e=>"function"==typeof e;function t(e){return null==e}function o(e){return Array.isArray(e)}function a(e){return"object"==typeof e&&!t(e)&&!o(e)}function n(e){if(!a(e))return!1;const r=Object.getPrototypeOf(e);return r===Object.prototype||null===r}var i=e=>"string"==typeof e;function s(e){return a(e)&&"[object Number]"===Object.prototype.toString.call(e)}function l(e){return"number"==typeof e?Number.isNaN(e):s(e)&&Number.isNaN(e.valueOf())}var c=e=>null===e,u=(r,t={})=>{if(e(r))return;const o=_({value:r,options:t,requiredValidType:"boolean"});throw new TypeError(o)},f=(r,t={})=>{k(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const o=!(!n(t)||!e(t.includeNaN))&&t.includeNaN;u(o,{message:({currentType:e,validType:r})=>`Parameter \`includeNaN\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const a="number"==typeof r;return o?a:a&&!Number.isNaN(r)},m=e=>"symbol"==typeof e,p=e=>void 0===e;function y(e){return o(e)||a(e)}function b(e,t,o={}){if(!i(e)&&!y(e)&&!r(e))return!1;k(o,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const a=void 0===o.discardUndefined||o.discardUndefined,n=void 0!==o.discardNull&&o.discardNull;u(a,{message:({currentType:e,validType:r})=>`Parameter \`discardUndefined\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),u(n,{message:({currentType:e,validType:r})=>`Parameter \`discardNull\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const s=[];if(i(t)&&t.trim().length>0||f(t,{includeNaN:!0})){(f(t,{includeNaN:!0})?String(t):t).split(".").forEach(e=>{const r=e.match(/^\[(\d+)\]$/),t=e.match(/^Symbol\((.+)\)$/);r?s.push(Number(r[1])):t?s.push(Symbol.for(t[1])):l(Number(e))?s.push(e):s.push(Number(e))})}else{if(!m(t))return!1;s.push(t)}let b=i(e)&&e.trim().length>0?Object(e):e;for(const e of s)if(i(e)&&e.trim().length>0||f(e,{includeNaN:!0})){if(c(b)||!Object.prototype.hasOwnProperty.call(b,e))return!1;b=b[e]}else{if(!m(e))return!1;{if(c(b)||"object"!=typeof b&&!r(b))return!1;const t=Object.getOwnPropertySymbols(b).find(r=>r===e||r.description===e.description);if(!t)return!1;b=b[t]}}return(!a||!p(b))&&(!n||!c(b))}var d=(e,r={})=>{if(!i(e))return!1;k(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const t=!b(r,"trim")||r.trim;u(t,{message:({currentType:e,validType:r})=>`Parameter \`trim\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});return(t?e.trim():e).length>0};function g(e){return"[object Set]"===Object.prototype.toString.call(e)||e instanceof Set}function v(e){return Array.isArray(e)&&e.length>0}var h=(e,r={lowerCaseNextRest:!0,trim:!1})=>{if(!d(e))return"";n(r)||(r={});const t=!1!==r.lowerCaseNextRest;return!0===r.trim&&(e=e.trim()),e[0].toUpperCase()+(t?e.slice(1).toLowerCase():e.slice(1))},j=(e,r={collapseSpaces:!1,trim:!1})=>{var t,o;if(!d(e))return"";let a=e;n(r)||(r={});const i=!0===r.collapseSpaces;if(!0===r.trim&&(a=a.trim()),i){const e=(null==(t=a.match(/^\s*/))?void 0:t[0])??"",r=(null==(o=a.match(/\s*$/))?void 0:o[0])??"";a=a.trim().replace(/\s+/g," "),a=`${e}${a}${r}`}return a.toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},S=e=>{let r="";return o(e)?r=e.map(e=>d(e)?e.trim():"").filter(e=>e.length).join("-"):d(e)&&(r=e.trim()),r.split(/[^\p{L}\p{N}]+/u).filter(Boolean)},C=e=>{const r=new Set([]),t=e=>e.trim().split(/[^\p{L}\p{N}]+/u).filter(Boolean).join("");if(d(e)){const o=t(e);o&&r.add(o)}return v(e)&&e.forEach(e=>{if(d(e)){const o=t(e);o&&r.add(o)}}),g(e)&&e.forEach(e=>{if(d(e)){const o=t(e);o&&r.add(o)}}),r},N=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map((e,r)=>o.has(e)?e:0===r?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")},w=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map(e=>o.has(e)?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")},T=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map(e=>o.has(e)?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")},A=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join(" ")},O=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("-")},P=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("_")},R=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join(".")},L=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("-").replace(/^-+|-+$/g,"")},E=e=>"[object Error]"===Object.prototype.toString.call(e)||e instanceof Error,I=e=>"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e),$=Object.freeze(["URI","URL","HTTP","HTTPS","HTML","XML","CSS","JS","JSON","SVG","DOM","UTC","XHR","RTC","ICE","TLS","TCP","UDP","IDB","ID"]);function U(e){return a(e)&&"[object String]"===Object.prototype.toString.call(e)}function B(e){return a(e)&&"[object Boolean]"===Object.prototype.toString.call(e)}function F(e){if("number"==typeof e||s(e)){const r=Number(e);return r===1/0||r===-1/0}return!1}var D=e=>e.replace(/[\s_\-]+/g,"").toLowerCase(),x=Object.entries({string:"String",number:"Number",boolean:"Boolean",bigint:"Big Int",symbol:"Symbol",undefined:"Undefined",null:"Null",regexp:"Reg Exp",reflect:"Reflect",proxy:"Proxy",atomics:"Atomics",object:"Object",array:"Array",arguments:"Arguments",function:"Function",asyncfunction:"Async Function",generatorfunction:"Generator Function",asyncgeneratorfunction:"Async Generator Function",generator:"Generator",promise:"Promise",evalerror:"Eval Error",rangeerror:"Range Error",referenceerror:"Reference Error",syntaxerror:"Syntax Error",typeerror:"Type Error",urierror:"URI Error",aggregateerror:"Aggregate Error",error:"Error",int8array:"Int 8 Array",uint8array:"Uint 8 Array",uint8clampedarray:"Uint 8 Clamped Array",int16array:"Int 16 Array",uint16array:"Uint 16 Array",int32array:"Int 32 Array",uint32array:"Uint 32 Array",float32array:"Float 32 Array",float64array:"Float 64 Array",bigint64array:"Big Int 64 Array",biguint64array:"Big Uint 64 Array",arraybuffer:"Array Buffer",sharedarraybuffer:"Shared Array Buffer",dataview:"Data View",arraybufferview:"Array Buffer View",map:"Map",set:"Set",weakmap:"Weak Map",weakset:"Weak Set",mapiterator:"Map Iterator",setiterator:"Set Iterator",arrayiterator:"Array Iterator",stringiterator:"String Iterator",readablestream:"Readable Stream",writablestream:"Writable Stream",transformstream:"Transform Stream",readablestreamdefaultreader:"Readable Stream Default Reader",writablestreamdefaultwriter:"Writable Stream Default Writer",readablestreamdefaultcontroller:"Readable Stream Default Controller",transformstreamdefaultcontroller:"Transform Stream Default Controller",abortcontroller:"Abort Controller",abortsignal:"Abort Signal",fetch:"fetch",request:"Request",response:"Response",headers:"Headers",formdata:"FormData",blob:"Blob",file:"File",filelist:"FileList",filereader:"FileReader",intl:"Intl",collator:"Intl. Collator",datetimeformat:"Intl. Date Time Format",listformat:"Intl. List Format",numberformat:"Intl. Number Format",pluralrules:"Intl. Plural Rules",relativetimeformat:"Intl. Relative Time Format",segmenter:"Intl. Segmenter",locale:"Intl. Locale",displaynames:"Intl. Display Names",finalizationregistry:"Finalization Registry",weakref:"Weak Ref",structuredclone:"structured Clone",urlpattern:"URL Pattern",performance:"Performance",performanceobserver:"Performance Observer",performanceentry:"Performance Entry",performancemark:"Performance Mark",performancemeasure:"Performance Measure",webassembly:"Web Assembly",wasmmodule:"WebAssembly .Module",wasminstance:"WebAssembly. Instance",wasmmemory:"WebAssembly. Memory",wasmtable:"WebAssembly. Table",buffer:"Buffer",process:"Process",eventemitter:"Event Emitter",stream:"Stream",fs:"fs",path:"path",url:"URL",urlsearchparams:"URL Search Params",node:"Node",element:"Element",htmlelement:"HTML Element",svgelement:"SVG Element",document:"Document",documentfragment:"Document Fragment",shadowroot:"Shadow Root",nodelist:"Node List",htmlcollection:"HTML Collection",mutationobserver:"Mutation Observer",intersectionobserver:"Intersection Observer",resizeobserver:"Resize Observer"}).reduce((e,[r,t])=>(e[D(r)]=t,e),{});var M=(e,r)=>"toPascalCaseSpace"===r?w(e,$):"slugify"===r?L(e,$):"toCamelCase"===r?N(e,$):"toDotCase"===r?R(e,$):"toKebabCase"===r?O(e,$):"toPascalCase"===r?T(e,$):"toSnakeCase"===r?P(e,$):A(e,$),W=(e,t={formatCase:"toLowerCase"})=>{var o,i;n(t)||(t={});const u=t.formatCase;if(c(e))return M(x[D("null")]??"Null",u);if(l(e))return"NaN";if(F(e))return String(e);if(s(e))return M("Number Constructor",u);if(U(e))return M("String Constructor",u);if(B(e))return M("Boolean Constructor",u);const f=typeof e;if(!y(e)&&!r(e))return M(x[D(f)]??f,u);if(I(e))return M(x[D("buffer")]??"Buffer",u);if(function(e){if("object"!=typeof e||null===e)return!1;const r=Object.prototype.toString.call(e);if(["[object Array]","[object Date]","[object RegExp]","[object Map]","[object Set]","[object WeakMap]","[object WeakSet]","[object Function]","[object Error]","[object Promise]","[object Generator]","[object GeneratorFunction]","[object AsyncFunction]"].includes(r))return!1;try{return Reflect.defineProperty(e,"__proxy_detect__",{configurable:!0,value:1}),Reflect.deleteProperty(e,"__proxy_detect__"),!1}catch{return!0}}(e))return M(x[D("proxy")]??"Proxy",u);if(a(e)&&r(null==e?void 0:e.next)&&r(null==e?void 0:e.throw))return M(x[D("generator")]??"Generator",u);if(E(e)){const r=(null==(o=e.constructor)?void 0:o.name)??"Error";return M(x[D(r)]??x[D(r.replace(/\s+/g,""))]??r,u)}if(c(Object.getPrototypeOf(e)))return M(x[D("object")]??"Object",u);const m=Object.prototype.toString.call(e).slice(8,-1)||"Object",p=x[D(m)];if(p)return M(p,u);const b=null==(i=null==e?void 0:e.constructor)?void 0:i.name;return M(b&&"Object"!==b?x[D(b)]??b:m,u)};function _(e){const{requiredValidType:t,value:o,options:a}=e||{},{message:i,formatCase:s}=n(a)?a:{},l=O(t),c=W(o,{formatCase:s}),u={currentType:c,validType:l},f=`Parameter input (\`value\`) must be of type \`${l}\`, but received: \`${c}\`.`;return r(i)?d(i(u))?i(u).trim():f:d(i)?i.trim():f}function k(e,r={}){if(n(e))return;const t=_({value:e,options:r,requiredValidType:"plain object"});throw new TypeError(t)}export{u as assertIsBoolean,k as assertIsPlainObject,h as capitalizeFirst,j as capitalizeWords,W as getPreciseType,b as hasOwnProp,o as isArray,e as isBoolean,B as isBooleanObject,I as isBuffer,E as isError,r as isFunction,F as isInfinityNumber,l as isNaN,t as isNil,v as isNonEmptyArray,d as isNonEmptyString,c as isNull,f as isNumber,s as isNumberObject,a as isObject,y as isObjectOrArray,n as isPlainObject,g as isSet,i as isString,U as isStringObject,m as isSymbol,p as isUndefined,_ as resolveErrorMessageAssertions,L as slugify,N as toCamelCase,R as toDotCase,O as toKebabCase,A as toLowerCase,T as toPascalCase,w as toPascalCaseSpace,P as toSnakeCase};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-DQFU3KLE.cjs"),r=require("./chunk-INUFZJLX.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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.noop=()=>{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isServer as e}from"./chunk-MC3LXMCQ.js";import{assertIsString as t}from"./chunk-W2W3L2M5.js";import{isPlainObject as o,hasOwnProp as s,isNonEmptyString as r,isNumber as i}from"./chunk-2UIRWYE3.js";var n=(o="on_processing")=>{if(e())return;t(o,{message:({validType:e,currentType:t})=>`First parameter \`className\` must be of type \`${e}\`, but received: \`${t}\`.`});const{documentElement:s}=document;s&&!s.classList.contains(o)&&s.classList.add(o)},m=(o="on_processing")=>{if(e())return;t(o,{message:({validType:e,currentType:t})=>`First parameter \`className\` must be of type \`${e}\`, but received: \`${t}\`.`});const{documentElement:s}=document;s&&s.classList.contains(o)&&s.classList.remove(o)},c=()=>{if(e())return;const t=document.activeElement;t instanceof HTMLElement&&t.blur()},a=t=>{if(e())return;o(t)||(t={});const n=s(t,"behavior")&&r(t.behavior)&&["auto","instant","smooth"].includes(t.behavior.trim())?t.behavior:"smooth";let m=s(t,"timeout")&&i(t.timeout)&&t.timeout>=1?t.timeout:1;m=m>2147483647?2147483647:m,setTimeout(()=>window.scrollTo({top:0,left:0,behavior:n}),m)};export{n as disableUserInteraction,m as enableUserInteraction,c as removeElementFocus,a as scrollToTop};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-7BXIZM57.cjs"),t=require("./chunk-YZR5OGJA.cjs"),r=require("./chunk-XC2PYCT4.cjs"),n=require("./chunk-EBMHQW7X.cjs"),i=require("./chunk-Y4O5KZF6.cjs"),a=require("./chunk-DVMHRLKP.cjs"),s=require("./chunk-DQFU3KLE.cjs"),o=require("./chunk-INUFZJLX.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 $=o.isString(r)?e.parseCurrencyString(r):r;if(o.isNaN($))throw new TypeError("First parameter (`value`) could not be parsed into a valid `number`.");let S="",P="",w=Math.abs($);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)[S,P]=w.toFixed(c).split("."),P=P??"".padEnd(c,"0");else{const e=String(w).split(".");S=e[0],P=(e[1]||"").slice(0,c).padEnd(c,"0")}let v;if(m?(b=",",h=".",v=(f.trim().length?f:"")+l(S,b)):v=(f.trim().length?f:"")+S.replace(/\B(?=(\d{3})+(?!\d))/g,b),p&&!o.isUndefined(P)&&c>0){let e=h+P;u&&(e+=d),v+=e}if($<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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-INUFZJLX.cjs");exports.parseCurrencyString=l=>{if(!e.isNonEmptyString(l))return 0;let c=l.trim().replace(/\u00A0/g,"").replace(/\u202F/g,""),r=!1;/^\(.*\)$/.test(c)&&(r=!0,c=c.slice(1,-1).trim()),c=c.replace(/^[-\s]+/,e=>e.includes("-")?"-":"").replace(/[\s.,-]+$/,""),r=r||/^-/.test(c)||/^[^\d]*-/.test(c);let s=c.replace(/[^0-9.,'\s]/g,"").replace(/[\s']/g,"");const t=s.match(/,\d{2}/g);if(t&&t.length>1)s=s.replace(/,/g,"");else{const e=(s.match(/\./g)||[]).length,l=(s.match(/,/g)||[]).length;if(e>1&&0===l)s=s.replace(/\./g,"");else if(l>1&&0===e)s=s.replace(/,/g,"");else{const e=s.lastIndexOf(","),l=s.lastIndexOf(".");if(e>l)s=s.replace(/\./g,"").replace(",",".");else if(l>e)s=s.replace(/,/g,"");else if(e>l){const l=s.slice(0,e).replace(/,/g,"").replace(/\./g,""),c=s.slice(e+1);s=l+"."+c}else if(l>e){const e=s.slice(0,l).replace(/\./g,"").replace(/,/g,""),c=s.slice(l+1);s=e+"."+c}else-1!==e?s=s.replace(/,/g,""):-1!==l&&(s=s.replace(/\./g,""))}}const a=parseFloat(s)||0;return r?-a:a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-DVMHRLKP.cjs"),t=require("./chunk-DQFU3KLE.cjs"),r=require("./chunk-INUFZJLX.cjs");var n=(n,s)=>{if(!e.isInteger(n)||!e.isInteger(s))throw new TypeError(`First parameter (\`min\`) and second parameter (\`max\`) must be of type \`integer-number\`${i(n,s)}value, but received: ['min': \`${r.getPreciseType(n)}\` - (with value: \`${t.safeStableStringify(n)})\`, 'max': \`${r.getPreciseType(s)}\` - (with value: \`${t.safeStableStringify(s)}\`)].`);if(n>s)throw new RangeError(`First parameter (\`min\`) must be less than or equal to second parameter (\`max\`), but received: ['min': ${a(n)}, 'max': ${a(s)}].`);return n=Math.max(1,n),s=Math.min(Number.MAX_SAFE_INTEGER,s),Math.floor(Math.random()*(s-n+1))+n},a=e=>r.isNumber(e,{includeNaN:!0})?e===Number.MIN_VALUE?"`Number.MIN_VALUE`":`${e}`:`\`${r.getPreciseType(e)}\``,i=(...e)=>e.some(e=>r.isNumber(e,{includeNaN:!0})&&e===Number.MIN_VALUE)?" and can't be `Number.MIN_VALUE` ":" ";exports.getRandomItem=function(e){if(!r.isNonEmptyArray(e))return;return e[Math.floor(Math.random()*(e.length||0))]},exports.randomInt=n,exports.randomIntByLength=a=>{r.isPlainObject(a)||(a={});const{minLength:i=1,maxLength:s=16,avoidZero:m=!1}=a;if(r.assertIsBoolean(m,{message:({currentType:e,validType:t})=>`Parameters \`avoidZero\` must be of type \`${t}\`, but received: \`${e}\`.`}),!e.isInteger(i)||!e.isInteger(s))throw new TypeError(`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${r.getPreciseType(i)}\` - (with value: ${t.safeStableStringify(i)}), 'maxLength': \`${r.getPreciseType(s)}\` - (with value: ${t.safeStableStringify(s)})].`);if(i<1||s>16||i>s)throw new RangeError(`Invalid range at parameters \`minLength\` must be ≥ 1, \`maxLength\` must be ≤ 16, and \`minLength\` ≤ \`maxLength\`, but received: ['minLength': \`${i}\`, 'maxLength': \`${s}\`].`);const o=i===s?i:n(i,s),h=10**(o-1);let u=n(h,10**o-1);return m&&0===u&&(u=h),u},exports.randomStr=a=>{r.isPlainObject(a)||(a={});const{minLength:i=40,maxLength:s=40,type:m="string",avoidWhiteSpace:o=!0}=a;if(r.assertIsBoolean(o,{message:({currentType:e,validType:t})=>`Parameters \`avoidWhiteSpace\` property of the \`options\` (first-parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),!e.isInteger(i)||!e.isInteger(s))throw new TypeError(`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${r.getPreciseType(i)}\` - (with value: ${t.safeStableStringify(i)}), 'maxLength': \`${r.getPreciseType(s)}\` - (with value: ${t.safeStableStringify(s)})].`);if(i<1||s>5e3||i>s)throw new RangeError(`Invalid range at parameters \`minLength\` must be ≥ 1, \`maxLength\` must be ≤ 5000, and \`minLength\` ≤ \`maxLength\`, but received: ['minLength': \`${i}\`, 'maxLength': \`${s}\`].`);if("string"!==m&&"number"!==m)throw new TypeError(`Parameter \`type\` must be of type \`string\` with value one of "string" | "number", but received: \`${r.getPreciseType(m)}\`, with value: ${t.safeStableStringify(m)}.`);const h=n(i,s),u="number"===m?(r.isNaN(Number(a.replaceGenInt))?void 0:a.replaceGenInt)??"0123456789":(a.replaceGenStr?a.replaceGenStr:void 0)??"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",g=(c=u,(o?c.replace(/\s|\n|\t/g,""):c)+(a.addChar||""));var c;if(!g.length){throw new Error(`Character set is empty. ${(()=>"number"===m?o?"If `avoidWhiteSpace` is true, and `replaceGenInt` cant be empty-string value, ensure `replaceGenInt` has valid characters and non-nan string number.":"Ensure `replaceGenInt` has valid characters and not a NaN number string while convert to number.":"Ensure `replaceGenStr` has valid characters and non empty string.")()}`)}let p="";for(let e=0;e<h;e++)p+=g.charAt(Math.floor(Math.random()*g.length));return p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNonEmptyString as s}from"./chunk-2UIRWYE3.js";var a=new Set(["txt","md","rtf","tex","doc","docx","odt","ott","pdf","djvu","epub","mobi","azw","azw3","xls","xlsx","ods","csv","tsv","ppt","pptx","odp","pps","md","bib","tex","log","jpg","jpeg","png","gif","bmp","tif","tiff","webp","svg","ico","heif","heic","raw","cr2","nef","orf","sr2","dng","dds","psd","exr","xcf","ai","eps","cdr","psd","indd","mp3","wav","ogg","flac","aac","m4a","wma","alac","aiff","amr","mid","midi","opus","au","caf","ape","opus","mp4","mkv","avi","mov","flv","wmv","webm","mpeg","mpg","3gp","3g2","m4v","ts","mts","asf","rm","rmvb","vob","f4v","ogv","m2ts","mod","dav","zip","rar","7z","tar","gz","bz2","xz","tgz","tbz2","txz","lz","lzma","z","cab","arj","ace","iso","dmg","rpm","deb","pkg","apk","jar","iso","img","vhd","vmdk","qcow2","dmg","sql","db","dbf","mdb","accdb","json","xml","yaml","yml","toml","ini","plist","yaml","pkl","msgpack","h5","hdf5","parquet","avro","orc","ndjson","db","pdb","sqlite","sqlite3","dbx","sdf","js","jsx","ts","tsx","c","cpp","h","hpp","java","py","rb","go","rs","php","pl","sh","bat","cmd","ps1","lua","swift","kt","scala","cs","vb","dart","m","r","jl","fs","vbproj","sln","pri","Makefile","html","htm","xhtml","css","scss","sass","less","xml","json","yaml","yml","xlf","xlf","po","pot","jsp","asp","aspx","php","jspf","cgi","cfm","pl","env","conf","config","xml","ini","cfg","toml","yaml","dockerfile","gitignore","gitconfig","gitattributes","npmignore","lock","gradle","pom","yaml","prettierrc","eslintrc","babelrc","editorconfig","ttf","otf","woff","woff2","eot","dwg","dxf","shp","kml","kmz","gpx","stl","step","iges","3ds","3dm","fbx","obj","exe","msi","bin","run","com","cmd","apk","app","deb","rpm","elf","dll","so","dylib","sys","pem","crt","cer","key","der","csr","p12","pfx","jks","iso","cue","bin","nes","sfc","gba","nds","nes","sav","rom","pak","vpk","bik","epub","mobi","azw","azw3","fb2","lit","lrf","cbr","cbz","cbt","cba","opds","fasta","fa","fas","ffn","faa","fna","frn","fastq","fq","gb","gbk","sam","bam","vcf","gff","bed","log","bak","tmp","old","backup","swp","part","crdownload","torrent","ics","vcf","ics","ical","ics","ical","calendar","srt","sub","idx","cue","cdf","hdf","h5","nc","grib","fits","netcdf","sdf","vtk","xmind","drawio","jar","war","ear","crx","xpi","plugin","vsix","safariextz"]),t=new Set(["tar.gz","tar.bz2","tar.xz","tar.lz","tar.lzma","tar.Z","tar.zst","tar.xz"]),r=r=>{if(!s(r))return;let p=r.split("/").pop();if(""===p)return"";if(p){for(const s of t){const a=`.${s}`;if(p.toLowerCase().endsWith(a))return p.slice(0,-a.length)}for(;;){const s=p.lastIndexOf(".");if(-1===s)break;const t=p.slice(s+1).toLowerCase();if(!a.has(t))break;p=p.slice(0,s)}return p}};export{r as extractFileName};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-4VCRMMAH.cjs"),r=require("./chunk-YT3MSZKK.cjs"),t=require("./chunk-YZR5OGJA.cjs"),i=require("./chunk-DQFU3KLE.cjs"),s=require("./chunk-UDA26MCU.cjs"),n=require("./chunk-INUFZJLX.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.isNumberObject(r)||n.isBooleanObject(r)||n.isStringObject(r))return"all"===t?r.valueOf().toString():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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t=require("./chunk-EXWCTDC3.cjs"),r=new Set(["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object BigInt64Array]","[object BigUint64Array]"]);exports.isNonEmptyValue=(r,e={})=>!t.isEmptyValue(r,e),exports.isTypedArray=function(t){return null!=t&&"object"==typeof t&&r.has(Object.prototype.toString.call(t))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isURL as r}from"./chunk-ONZFBJVW.js";import{toStringArrayUnRecursive as e}from"./chunk-Y44ZD3GG.js";import{isEmptyValue as t}from"./chunk-X4PD3I5U.js";import{assertIsArray as n}from"./chunk-ZXIWDFEQ.js";import{normalizeString as o}from"./chunk-Q6NHYWVX.js";import{isEmptyString as a}from"./chunk-TSLYDPBJ.js";import{safeStableStringify as s}from"./chunk-L73TOPX5.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-2UIRWYE3.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{assertIsArray as e}from"./chunk-ZXIWDFEQ.js";import{isPlainObject as i,isNumber as r,isNonEmptyString as s,isFunction as o,hasOwnProp as t,isNonEmptyArray as n,getPreciseType as a}from"./chunk-2UIRWYE3.js";import{getDefaultConfig as l,extendTailwindMerge as c}from"tailwind-merge-v3";import{getDefaultConfig as f,extendTailwindMerge as p}from"tailwind-merge-v4";function d(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=d(e[i]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}var u=function(){for(var e,i,r=0,s="",o=arguments.length;r<o;r++)(e=arguments[r])&&(i=d(e))&&(s&&(s+=" "),s+=i);return s},m=e=>{i(e)||(e={});let{config:a,prefix:l,extend:c,override:f,cacheSize:p,experimentalParseClassName:d}=e;i(a)||(a={}),i(c)||(c={}),i(f)||(f={}),r(p)||(p=void 0),s(l)||(l=void 0),o(d)||(d=void 0);return{config:a,override:f,cacheSize:p,prefix:l,experimentalParseClassName:d,theme:t(c,"theme")?c.theme:{},classGroups:t(c,"classGroups")?c.classGroups:{},conflictingClassGroupModifiers:t(c,"conflictingClassGroupModifiers")?c.conflictingClassGroupModifiers:{},conflictingClassGroups:t(c,"conflictingClassGroups")?c.conflictingClassGroups:{},orderSensitiveModifiers:t(c,"orderSensitiveModifiers")&&n(c.orderSensitiveModifiers)?c.orderSensitiveModifiers:[]}},g=l(),v=(e={})=>{var r,s,o;i(e)||(e={});const{cacheSize:t,classGroups:n,config:a,conflictingClassGroupModifiers:l,conflictingClassGroups:f,override:p,prefix:d,theme:u,experimentalParseClassName:v}=m(e);return c({prefix:d??a.prefix,cacheSize:t||g.cacheSize,experimentalParseClassName:v,override:p,extend:{conflictingClassGroupModifiers:{...g.conflictingClassGroupModifiers,...l},theme:{...g.theme,...u},conflictingClassGroups:{...g.conflictingClassGroups,...f},classGroups:{...g.classGroups,...n,"text-shadow":["","-sm","-md","-lg","-xl","-xxl","-none","-default"].map(e=>`text-shadow${e}`),"font-size":Object.keys({...(null==(r=a.theme)?void 0:r.fontSize)||{},...(null==(o=null==(s=a.theme)?void 0:s.extend)?void 0:o.fontSize)||{}}).map(e=>`text-${e}`)}}})},x=f(),h=(e={})=>{var r,s,o;i(e)||(e={});const{cacheSize:t,classGroups:n,config:a,conflictingClassGroupModifiers:l,conflictingClassGroups:c,orderSensitiveModifiers:f,override:d,prefix:u,theme:g,experimentalParseClassName:v}=m(e);return p({prefix:u||a.prefix,cacheSize:t||x.cacheSize,experimentalParseClassName:v,override:d,extend:{conflictingClassGroupModifiers:{...x.conflictingClassGroupModifiers,...l},theme:{...x.theme,...g},conflictingClassGroups:{...x.conflictingClassGroups,...c},orderSensitiveModifiers:[...x.orderSensitiveModifiers,...f],classGroups:{...x.classGroups,...n,"text-shadow":["","-sm","-md","-lg","-xl","-xxl","-none","-default"].map(e=>`text-shadow${e}`),"font-size":Object.keys({...(null==(r=a.theme)?void 0:r.fontSize)||{},...(null==(o=null==(s=a.theme)?void 0:s.extend)?void 0:o.fontSize)||{}}).map(e=>`text-${e}`)}}})},G=v(),C=h(),S=(...e)=>G(u(...e)),M=(...e)=>C(u(...e)),y=(e,...i)=>{if(!o(e))throw new TypeError(`first Parameter (\`customTwMergeV3\`) must be of type \`function\`, but received: \`${a(e)}\`.`);return e(u(...i))},z=(e,...i)=>{if(!o(e))throw new TypeError(`first Parameter (\`customTwMergeV4\`) must be of type \`function\`, but received: \`${a(e)}\`.`);return e(u(...i))},w=i=>(e(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()));export{S as cnV3,M as cnV4,y as customCnV3,z as customCnV4,w as shouldForwardProp,v as twMergeDefaultV3,h as twMergeDefaultV4};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-UDA26MCU.cjs"),r=require("./chunk-INUFZJLX.cjs");function t(e){return"[object Map]"===Object.prototype.toString.call(e)||e instanceof Map}var n=(e,t={})=>{r.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const n=!(!r.isPlainObject(t)||!r.isBoolean(t.skipInvalidDate))&&t.skipInvalidDate,i=e instanceof Date;return n?i:i&&!r.isNaN(e.getTime())};exports.isDate=n,exports.isMap=t,exports.safeStableStringify=(i,s={})=>{r.assertIsPlainObject(s,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const o=!!r.hasOwnProp(s,"pretty")&&s.pretty,a=!r.hasOwnProp(s,"sortKeys")||s.sortKeys,u=!!r.hasOwnProp(s,"sortArray")&&s.sortArray,c=!!r.hasOwnProp(s,"keepUndefined")&&s.keepUndefined;if(!(r.isBoolean(a)&&r.isBoolean(u)&&r.isBoolean(o)&&r.isBoolean(c)))throw new TypeError(`Parameters \`sortKeys\`, \`sortArray\`, \`keepUndefined\` and \`pretty\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: "['sortKeys': \`${r.getPreciseType(a)}\`, 'sortArray': \`${r.getPreciseType(u)}\`, 'keepUndefined': \`${r.getPreciseType(c)}\`, 'pretty': \`${r.getPreciseType(o)}\`]".`);if(r.isUndefined(i))return c?"undefined":"null";const p=new WeakSet,f=e=>r.isNull(e)||!r.isObjectOrArray(e)&&!r.isFunction(e),l=i=>{if(r.isNumberObject(i)){const e=i.valueOf();return r.isNaN(e)||r.isInfinityNumber(e)?null:e}if(r.isStringObject(i))return i.valueOf();if(r.isBooleanObject(i))return i.valueOf();if(!r.isFunction(i)&&!r.isSymbol(i)){if(e.isBigInt(i))return i.toString();if(r.isNaN(i)||r.isInfinityNumber(i))return null;if(r.isUndefined(i))return c?void 0:null;if(r.isObjectOrArray(i)){if(p.has(i))return"[Circular]";if(p.add(i),n(i))return i.toISOString();if(t(i))return{map:Array.from(i.entries()).map(([e,r])=>[e,l(r)])};if(r.isSet(i))return{set:Array.from(i.values()).map(l)};if(r.isArray(i)){const e=i.map(l);if(u){const t=[],n=[];for(const r of e)f(r)?t.push(r):n.push(r);return t.sort((e,t)=>r.isNumber(e)&&r.isNumber(t)?e-t:String(e).localeCompare(String(t))),[...t,...n]}return e}const e=Object.keys(i);a&&e.sort((e,t)=>{const n=Number(e),i=Number(t);return r.isNaN(n)||r.isNaN(i)?e.localeCompare(t):n-i});const s={};if(r.isObject(i))for(const t of e){const e=l(i[t]);r.isUndefined(e)||(s[t]=e)}return s}return i}};try{return JSON.stringify(l(i),null,o?2:0)}catch(e){return console.warn("Error in safeStableStringify:",e),"{}"}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNumber as r}from"./chunk-2UIRWYE3.js";function i(i){return r(i)&&Number.isFinite(i)}export{i as isFinite};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.isInteger=function(e){return"number"==typeof e&&Number.isInteger(e)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var r=require("./chunk-INUFZJLX.cjs");exports.isEmptyString=(t,i={})=>!r.isNonEmptyString(t,i);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-4VCRMMAH.cjs"),s=require("./chunk-EBMHQW7X.cjs"),r=require("./chunk-INUFZJLX.cjs");exports.isEmptyValue=(t,c={})=>{r.assertIsPlainObject(c,{message:({currentType:e,validType:s})=>`Second parameter (\`options\`) must be of type \`${s}\`, but received: \`${e}\`.`});const i=!!r.hasOwnProp(c,"checkSymbols")&&c.checkSymbols;return r.assertIsBoolean(i,{message:({currentType:e,validType:s})=>`Parameter \`checkSymbols\` property of the \`options\` (second parameter) must be of type \`${s}\`, but received: \`${e}\`.`}),!(!r.isNil(t)&&!1!==t&&!r.isNaN(t))||(r.isString(t)?s.isEmptyString(t):r.isArray(t)?e.isEmptyArray(t):!!r.isObject(t)&&e.isEmptyObject(t,{checkSymbols:i}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=()=>{};export{r as noop};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isEmptyArray as e,isEmptyObject as r}from"./chunk-GRSCNTOK.js";import{noop as t}from"./chunk-FIAAX3UE.js";import{safeStableStringify as o}from"./chunk-L73TOPX5.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-2UIRWYE3.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-7YVINA3U.cjs"),r=require("./chunk-7PG6YKIY.cjs"),t=require("./chunk-4VCRMMAH.cjs"),i=require("./chunk-YT3MSZKK.cjs"),s=require("./chunk-EBMHQW7X.cjs"),n=require("./chunk-Y4O5KZF6.cjs"),o=require("./chunk-DQFU3KLE.cjs"),a=require("./chunk-UDA26MCU.cjs"),m=require("./chunk-INUFZJLX.cjs");var y=e=>!m.isNil(e)&&(m.isString(e)?m.isNonEmptyString(e):m.isBoolean(e)?e:m.isNumber(e,{includeNaN:!0})?0!==e:m.isArray(e)?e.some(y):!!m.isObject(e)&&Object.values(e).some(y)),p=(e,r)=>{if(!m.isObjectOrArray(e))return e;const[i,...s]=r;if(m.isArray(e))for(const t of e)m.isObjectOrArray(t)&&p(t,r);else t.isEmptyArray(s)?m.isPlainObject(e)&&delete e[i]:m.isPlainObject(e)&&m.isObjectOrArray(e[i])&&p(e[i],s);return e},c=(e,r)=>{if(!m.isPlainObject(e))return e;const[t,...i]=r;return 0===i.length?m.isPlainObject(e)&&delete e[t]:m.isPlainObject(e[t])&&c(e[t],i),e};exports.convertType=e=>{const r={undefined:void 0,null:null,nan:NaN,true:!0,false:!1,yes:!0,no:!1};if(m.isString(e)){const t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(r,t))return r[t];const i=t.replace(/,/g,""),s=Number(i);return!m.isNaN(s)&&m.isNonEmptyString(i)?s:e.trim()}return e},exports.removeObjectPaths=function(e,r,s=!0){if(t.isEmptyObject(e,{checkSymbols:!0}))return{};if(i.assertIsArray(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: \`${o.safeStableStringify(r)}\`.`}),!r.every(e=>m.isPlainObject(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: \`${o.safeStableStringify(r)}\`.`);let a=s?(e=>{try{if(m.isFunction(structuredClone))return structuredClone(e)}catch{}return JSON.parse(JSON.stringify(e))})(e):e;for(const{key:e,deep:t}of r){if(n.assertIsString(e,{message:({currentType:e,validType:r})=>`Parameter \`key\` at Second Parameter (\`keysToDelete\`) must be of type \`${r}\`, but received: \`${e}\`.`}),!m.isUndefined(t)&&!m.isBoolean(t))throw new TypeError(`Parameter \`deep\` at Second Parameter (\`keysToDelete\`) ➔ (key: "${e}", deep: ${t}) must be of type \`boolean\` or \`undefined\`, but received: \`${m.getPreciseType(t)}\`.`);const r=e.split(".");a=t?p(a,r):c(a,r)}return a},exports.toBooleanContent=r=>!m.isNil(r)&&(m.isString(r)?m.isNonEmptyString(r):m.isBoolean(r)?r:m.isNumber(r,{includeNaN:!0})?0!==r:m.isArray(r)||m.isObject(r)?e.isNonEmptyValue(r):Boolean(r)),exports.toBooleanContentDeep=y,exports.toBooleanExplicit=(e,r={})=>{if(m.isNil(e))return!1;m.isPlainObject(r)||(r={});const t=!!m.hasOwnProp(r,"caseInsensitive")&&r.caseInsensitive,i=!m.hasOwnProp(r,"trimString")||r.trimString,s=!!m.hasOwnProp(r,"includeIndeterminate")&&r.includeIndeterminate;if(!m.isBoolean(t)||!m.isBoolean(i)||!m.isBoolean(s))throw new TypeError(`Parameters \`caseInsensitive\`, \`trimString\` and \`includeIndeterminate\` property of the \`options\` (second parameter) expected to be a \`boolean\` type, but received: ['caseInsensitive': \`${m.getPreciseType(t)}\`, 'trimString': \`${m.getPreciseType(i)}\`, 'includeIndeterminate': \`${m.getPreciseType(s)}\`].`);if(m.isString(e)){let r=e;i&&(r=r.trim()),t&&(r=r.toLowerCase());const n=["true","on","yes","1"];return s&&n.push("indeterminate"),n.includes(r)}return m.isNumber(e)?1===e:!!m.isBoolean(e)&&e},exports.toBooleanLoose=e=>!m.isNil(e)&&(m.isString(e)?!s.isEmptyString(e):m.isBoolean(e)?e:m.isNumber(e,{includeNaN:!0})?0!==e:m.isArray(e)?e.length>0:Boolean(e)),exports.toNumberArrayUnRecursive=function(e,t={}){m.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const i=!m.hasOwnProp(t,"removeInvalidValueNumber")||t.removeInvalidValueNumber;if(m.assertIsBoolean(i,{message:({currentType:e,validType:r})=>`Parameter \`removeInvalidValueNumber\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),m.isArray(e)){const t=Array.from(e,e=>{if(a.isBigInt(e))return Number(e);const r=String(e).trim().match(/-?\d+(\.\d+)?/);return r?Number(r[0]):m.isNull(e)?null:void 0});return i?r.filterNilArray(t):t}},exports.toNumberDeep=function(r,i={}){return m.assertIsPlainObject(i,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`}),function r(i,s){if(m.isNil(i)||t.isRegExp(i))return;const{removeEmptyArrays:n,removeEmptyObjects:a,isRoot:y}=s;if(!m.isBoolean(a)||!m.isBoolean(n))throw new TypeError(`Parameters \`removeEmptyObjects\` and \`removeEmptyArrays\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['removeEmptyObjects': \`${m.getPreciseType(a)}\`, 'removeEmptyArrays': \`${m.getPreciseType(n)}\`].`);if(m.isNumber(i)||m.isBoolean(i)||m.isNonEmptyString(i)){const e=Number(i);return m.isInfinityNumber(e)||m.isNaN(e)?void 0:e}if(m.isNumberObject(i)||m.isStringObject(i)||m.isBooleanObject(i)){const e=Number(i.valueOf());return m.isInfinityNumber(e)||m.isNaN(e)?void 0:e}if(o.isDate(i,{skipInvalidDate:!0}))try{return m.isNaN(i.getTime())?0:i.getTime()}catch{return 0}if(m.isBuffer(i)){const e=Array.from(i).map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}if(e.isTypedArray(i)){if(i instanceof BigInt64Array||i instanceof BigUint64Array){const e=Array.from(i).map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}{const e=Array.from(i).map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}}if(m.isSet(i)){const e=Array.from(i).map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}if(o.isMap(i)){let e=Array.from(i.entries()).map(([e,t])=>{const i=r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1}),s=r(t,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1});return m.isUndefined(i)||m.isUndefined(s)?void 0:[i,s]}).filter(e=>!m.isUndefined(e));if(n&&(e=e.filter(e=>!t.isEmptyArray(e))),n&&t.isEmptyArray(e))return;return e}if(m.isArray(i)){const e=i.map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}if(m.isObject(i)){const e={};for(const[t,s]of Object.entries(i)){const i=r(s,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1});m.isUndefined(i)||(e[t]=i)}return a&&t.isEmptyObject(e)?y?{}:void 0:e}}(r,{removeEmptyObjects:!!m.hasOwnProp(i,"removeEmptyObjects")&&i.removeEmptyObjects,removeEmptyArrays:!!m.hasOwnProp(i,"removeEmptyArrays")&&i.removeEmptyArrays,isRoot:!0})},exports.toStringDeep=function(r,i={}){return m.assertIsPlainObject(i,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`}),function r(i,s){if(m.isNil(i)||m.isInfinityNumber(i))return;const{removeEmptyArrays:n,removeEmptyObjects:a,isRoot:y}=s;if(!m.isBoolean(a)||!m.isBoolean(n))throw new TypeError(`Parameters \`removeEmptyObjects\` and \`removeEmptyArrays\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['removeEmptyObjects': \`${m.getPreciseType(a)}\`, 'removeEmptyArrays': \`${m.getPreciseType(n)}\`].`);if(m.isNumber(i)||m.isString(i)||m.isBoolean(i))return String(i);if(m.isNumberObject(i)){const e=i.valueOf();return m.isInfinityNumber(e)||m.isNaN(e)?void 0:e.toString()}if(m.isStringObject(i))return i.valueOf();if(m.isBooleanObject(i))return i.valueOf().toString();if(o.isDate(i,{skipInvalidDate:!0}))try{return i.toISOString()}catch{return i.toString()}if(t.isRegExp(i))return i.toString();if(m.isBuffer(i))return Array.from(i).map(e=>String(e)).filter(e=>!m.isUndefined(e));if(e.isTypedArray(i)){if(i instanceof BigInt64Array||i instanceof BigUint64Array){const e=Array.from(i).map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).map(e=>String(e)).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}{const e=Array.from(i).map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).map(e=>String(e)).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}}if(m.isSet(i)){const e=Array.from(i).map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}if(o.isMap(i)){const e=Array.from(i.entries()).map(([e,t])=>[r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1}),r(t,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})]).filter(([e,r])=>!m.isUndefined(e)&&!m.isUndefined(r));if(n&&t.isEmptyArray(e))return;return e}if(m.isArray(i)){let e=i.map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).filter(e=>!m.isUndefined(e));if(n&&(e=e.filter(e=>!(m.isArray(e)&&0===e.length))),n&&t.isEmptyArray(e))return;return e}if(m.isObject(i)){const e={};for(const[t,s]of Object.entries(i)){const i=r(s,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1});m.isUndefined(i)?m.isArray(s)&&!n&&(e[t]=[]):e[t]=i}return a&&0===Object.keys(e).length?y?{}:void 0:e}}(r,{removeEmptyObjects:!!m.hasOwnProp(i,"removeEmptyObjects")&&i.removeEmptyObjects,removeEmptyArrays:!!m.hasOwnProp(i,"removeEmptyArrays")&&i.removeEmptyArrays,isRoot:!0})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isDate as e,isMap as r}from"./chunk-L73TOPX5.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-2UIRWYE3.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isBigInt as r}from"./chunk-QNKGP5DY.js";import{resolveErrorMessageAssertions as e,hasOwnProp as o,isNumber as i}from"./chunk-2UIRWYE3.js";var n=(o,i={})=>{if(r(o))return;const n=e({value:o,options:i,requiredValidType:"big int"});throw new TypeError(n)},t=(r,n={})=>{const t=o(n,"includeNaN")?n.includeNaN:void 0;if(i(r,{includeNaN:t}))return;const u=e({value:r,options:n,requiredValidType:"number"});throw new TypeError(u)};export{n as assertIsBigInt,t as assertIsNumber};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-KHO2SBNA.cjs"),r=require("./chunk-7YVINA3U.cjs"),t=require("./chunk-4VCRMMAH.cjs"),s=require("./chunk-7BXIZM57.cjs"),i=require("./chunk-EBMHQW7X.cjs"),n=require("./chunk-Y4O5KZF6.cjs"),a=require("./chunk-DQFU3KLE.cjs"),o=require("./chunk-INUFZJLX.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)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=e=>"boolean"==typeof e,r=e=>"function"==typeof e;function t(e){return null==e}function o(e){return Array.isArray(e)}function a(e){return"object"==typeof e&&!t(e)&&!o(e)}function n(e){if(!a(e))return!1;const r=Object.getPrototypeOf(e);return r===Object.prototype||null===r}var s=e=>"string"==typeof e;function i(e){return a(e)&&"[object Number]"===Object.prototype.toString.call(e)}function l(e){return"number"==typeof e?Number.isNaN(e):i(e)&&Number.isNaN(e.valueOf())}var c=e=>null===e,u=(r,t={})=>{if(e(r))return;const o=M({value:r,options:t,requiredValidType:"boolean"});throw new TypeError(o)},p=(r,t={})=>{W(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const o=!(!n(t)||!e(t.includeNaN))&&t.includeNaN;u(o,{message:({currentType:e,validType:r})=>`Parameter \`includeNaN\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const a="number"==typeof r;return o?a:a&&!Number.isNaN(r)},f=e=>"symbol"==typeof e,m=e=>void 0===e;function b(e){return o(e)||a(e)}function y(e,t,o={}){if(!s(e)&&!b(e)&&!r(e))return!1;W(o,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const a=void 0===o.discardUndefined||o.discardUndefined,n=void 0!==o.discardNull&&o.discardNull;u(a,{message:({currentType:e,validType:r})=>`Parameter \`discardUndefined\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),u(n,{message:({currentType:e,validType:r})=>`Parameter \`discardNull\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const i=[];if(s(t)&&t.trim().length>0||p(t,{includeNaN:!0})){(p(t,{includeNaN:!0})?String(t):t).split(".").forEach(e=>{const r=e.match(/^\[(\d+)\]$/),t=e.match(/^Symbol\((.+)\)$/);r?i.push(Number(r[1])):t?i.push(Symbol.for(t[1])):l(Number(e))?i.push(e):i.push(Number(e))})}else{if(!f(t))return!1;i.push(t)}let y=s(e)&&e.trim().length>0?Object(e):e;for(const e of i)if(s(e)&&e.trim().length>0||p(e,{includeNaN:!0})){if(c(y)||!Object.prototype.hasOwnProperty.call(y,e))return!1;y=y[e]}else{if(!f(e))return!1;{if(c(y)||"object"!=typeof y&&!r(y))return!1;const t=Object.getOwnPropertySymbols(y).find(r=>r===e||r.description===e.description);if(!t)return!1;y=y[t]}}return(!a||!m(y))&&(!n||!c(y))}var d=(e,r={})=>{if(!s(e))return!1;W(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const t=!y(r,"trim")||r.trim;u(t,{message:({currentType:e,validType:r})=>`Parameter \`trim\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});return(t?e.trim():e).length>0};function g(e){return"[object Set]"===Object.prototype.toString.call(e)||e instanceof Set}function j(e){return Array.isArray(e)&&e.length>0}var S=e=>{let r="";return o(e)?r=e.map(e=>d(e)?e.trim():"").filter(e=>e.length).join("-"):d(e)&&(r=e.trim()),r.split(/[^\p{L}\p{N}]+/u).filter(Boolean)},v=e=>{const r=new Set([]),t=e=>e.trim().split(/[^\p{L}\p{N}]+/u).filter(Boolean).join("");if(d(e)){const o=t(e);o&&r.add(o)}return j(e)&&e.forEach(e=>{if(d(e)){const o=t(e);o&&r.add(o)}}),g(e)&&e.forEach(e=>{if(d(e)){const o=t(e);o&&r.add(o)}}),r},h=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map((e,r)=>o.has(e)?e:0===r?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")},C=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map(e=>o.has(e)?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")},N=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map(e=>o.has(e)?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")},x=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join(" ")},w=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("-")},A=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("_")},T=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join(".")},O=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("-").replace(/^-+|-+$/g,"")},P=e=>"[object Error]"===Object.prototype.toString.call(e)||e instanceof Error,E=e=>"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e),R=Object.freeze(["URI","URL","HTTP","HTTPS","HTML","XML","CSS","JS","JSON","SVG","DOM","UTC","XHR","RTC","ICE","TLS","TCP","UDP","IDB","ID"]);function I(e){return a(e)&&"[object String]"===Object.prototype.toString.call(e)}function L(e){return a(e)&&"[object Boolean]"===Object.prototype.toString.call(e)}function B(e){if("number"==typeof e||i(e)){const r=Number(e);return r===1/0||r===-1/0}return!1}var U=e=>e.replace(/[\s_\-]+/g,"").toLowerCase(),$=Object.entries({string:"String",number:"Number",boolean:"Boolean",bigint:"Big Int",symbol:"Symbol",undefined:"Undefined",null:"Null",regexp:"Reg Exp",reflect:"Reflect",proxy:"Proxy",atomics:"Atomics",object:"Object",array:"Array",arguments:"Arguments",function:"Function",asyncfunction:"Async Function",generatorfunction:"Generator Function",asyncgeneratorfunction:"Async Generator Function",generator:"Generator",promise:"Promise",evalerror:"Eval Error",rangeerror:"Range Error",referenceerror:"Reference Error",syntaxerror:"Syntax Error",typeerror:"Type Error",urierror:"URI Error",aggregateerror:"Aggregate Error",error:"Error",int8array:"Int 8 Array",uint8array:"Uint 8 Array",uint8clampedarray:"Uint 8 Clamped Array",int16array:"Int 16 Array",uint16array:"Uint 16 Array",int32array:"Int 32 Array",uint32array:"Uint 32 Array",float32array:"Float 32 Array",float64array:"Float 64 Array",bigint64array:"Big Int 64 Array",biguint64array:"Big Uint 64 Array",arraybuffer:"Array Buffer",sharedarraybuffer:"Shared Array Buffer",dataview:"Data View",arraybufferview:"Array Buffer View",map:"Map",set:"Set",weakmap:"Weak Map",weakset:"Weak Set",mapiterator:"Map Iterator",setiterator:"Set Iterator",arrayiterator:"Array Iterator",stringiterator:"String Iterator",readablestream:"Readable Stream",writablestream:"Writable Stream",transformstream:"Transform Stream",readablestreamdefaultreader:"Readable Stream Default Reader",writablestreamdefaultwriter:"Writable Stream Default Writer",readablestreamdefaultcontroller:"Readable Stream Default Controller",transformstreamdefaultcontroller:"Transform Stream Default Controller",abortcontroller:"Abort Controller",abortsignal:"Abort Signal",fetch:"fetch",request:"Request",response:"Response",headers:"Headers",formdata:"FormData",blob:"Blob",file:"File",filelist:"FileList",filereader:"FileReader",intl:"Intl",collator:"Intl. Collator",datetimeformat:"Intl. Date Time Format",listformat:"Intl. List Format",numberformat:"Intl. Number Format",pluralrules:"Intl. Plural Rules",relativetimeformat:"Intl. Relative Time Format",segmenter:"Intl. Segmenter",locale:"Intl. Locale",displaynames:"Intl. Display Names",finalizationregistry:"Finalization Registry",weakref:"Weak Ref",structuredclone:"structured Clone",urlpattern:"URL Pattern",performance:"Performance",performanceobserver:"Performance Observer",performanceentry:"Performance Entry",performancemark:"Performance Mark",performancemeasure:"Performance Measure",webassembly:"Web Assembly",wasmmodule:"WebAssembly .Module",wasminstance:"WebAssembly. Instance",wasmmemory:"WebAssembly. Memory",wasmtable:"WebAssembly. Table",buffer:"Buffer",process:"Process",eventemitter:"Event Emitter",stream:"Stream",fs:"fs",path:"path",url:"URL",urlsearchparams:"URL Search Params",node:"Node",element:"Element",htmlelement:"HTML Element",svgelement:"SVG Element",document:"Document",documentfragment:"Document Fragment",shadowroot:"Shadow Root",nodelist:"Node List",htmlcollection:"HTML Collection",mutationobserver:"Mutation Observer",intersectionobserver:"Intersection Observer",resizeobserver:"Resize Observer"}).reduce((e,[r,t])=>(e[U(r)]=t,e),{});var F=(e,r)=>"toPascalCaseSpace"===r?C(e,R):"slugify"===r?O(e,R):"toCamelCase"===r?h(e,R):"toDotCase"===r?T(e,R):"toKebabCase"===r?w(e,R):"toPascalCase"===r?N(e,R):"toSnakeCase"===r?A(e,R):x(e,R),D=(e,t={formatCase:"toLowerCase"})=>{var o,s;n(t)||(t={});const u=t.formatCase;if(c(e))return F($[U("null")]??"Null",u);if(l(e))return"NaN";if(B(e))return String(e);if(i(e))return F("Number Constructor",u);if(I(e))return F("String Constructor",u);if(L(e))return F("Boolean Constructor",u);const p=typeof e;if(!b(e)&&!r(e))return F($[U(p)]??p,u);if(E(e))return F($[U("buffer")]??"Buffer",u);if(function(e){if("object"!=typeof e||null===e)return!1;const r=Object.prototype.toString.call(e);if(["[object Array]","[object Date]","[object RegExp]","[object Map]","[object Set]","[object WeakMap]","[object WeakSet]","[object Function]","[object Error]","[object Promise]","[object Generator]","[object GeneratorFunction]","[object AsyncFunction]"].includes(r))return!1;try{return Reflect.defineProperty(e,"__proxy_detect__",{configurable:!0,value:1}),Reflect.deleteProperty(e,"__proxy_detect__"),!1}catch{return!0}}(e))return F($[U("proxy")]??"Proxy",u);if(a(e)&&r(null==e?void 0:e.next)&&r(null==e?void 0:e.throw))return F($[U("generator")]??"Generator",u);if(P(e)){const r=(null==(o=e.constructor)?void 0:o.name)??"Error";return F($[U(r)]??$[U(r.replace(/\s+/g,""))]??r,u)}if(c(Object.getPrototypeOf(e)))return F($[U("object")]??"Object",u);const f=Object.prototype.toString.call(e).slice(8,-1)||"Object",m=$[U(f)];if(m)return F(m,u);const y=null==(s=null==e?void 0:e.constructor)?void 0:s.name;return F(y&&"Object"!==y?$[U(y)]??y:f,u)};function M(e){const{requiredValidType:t,value:o,options:a}=e||{},{message:s,formatCase:i}=n(a)?a:{},l=w(t),c=D(o,{formatCase:i}),u={currentType:c,validType:l},p=`Parameter input (\`value\`) must be of type \`${l}\`, but received: \`${c}\`.`;return r(s)?d(s(u))?s(u).trim():p:d(s)?s.trim():p}function W(e,r={}){if(n(e))return;const t=M({value:e,options:r,requiredValidType:"plain object"});throw new TypeError(t)}exports.assertIsBoolean=u,exports.assertIsPlainObject=W,exports.capitalizeFirst=(e,r={lowerCaseNextRest:!0,trim:!1})=>{if(!d(e))return"";n(r)||(r={});const t=!1!==r.lowerCaseNextRest;return!0===r.trim&&(e=e.trim()),e[0].toUpperCase()+(t?e.slice(1).toLowerCase():e.slice(1))},exports.capitalizeWords=(e,r={collapseSpaces:!1,trim:!1})=>{var t,o;if(!d(e))return"";let a=e;n(r)||(r={});const s=!0===r.collapseSpaces;if(!0===r.trim&&(a=a.trim()),s){const e=(null==(t=a.match(/^\s*/))?void 0:t[0])??"",r=(null==(o=a.match(/\s*$/))?void 0:o[0])??"";a=a.trim().replace(/\s+/g," "),a=`${e}${a}${r}`}return a.toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},exports.getPreciseType=D,exports.hasOwnProp=y,exports.isArray=o,exports.isBoolean=e,exports.isBooleanObject=L,exports.isBuffer=E,exports.isError=P,exports.isFunction=r,exports.isInfinityNumber=B,exports.isNaN=l,exports.isNil=t,exports.isNonEmptyArray=j,exports.isNonEmptyString=d,exports.isNull=c,exports.isNumber=p,exports.isNumberObject=i,exports.isObject=a,exports.isObjectOrArray=b,exports.isPlainObject=n,exports.isSet=g,exports.isString=s,exports.isStringObject=I,exports.isSymbol=f,exports.isUndefined=m,exports.resolveErrorMessageAssertions=M,exports.slugify=O,exports.toCamelCase=h,exports.toDotCase=T,exports.toKebabCase=w,exports.toLowerCase=x,exports.toPascalCase=N,exports.toPascalCaseSpace=C,exports.toSnakeCase=A;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isInteger as e}from"./chunk-WVSPXFTY.js";import{safeStableStringify as r}from"./chunk-L73TOPX5.js";import{isNonEmptyArray as t,getPreciseType as n,isNumber as a,isPlainObject as m,assertIsBoolean as i,isNaN as h}from"./chunk-2UIRWYE3.js";function o(e){if(!t(e))return;return e[Math.floor(Math.random()*(e.length||0))]}var u=(t,a)=>{if(!e(t)||!e(a))throw new TypeError(`First parameter (\`min\`) and second parameter (\`max\`) must be of type \`integer-number\`${c(t,a)}value, but received: ['min': \`${n(t)}\` - (with value: \`${r(t)})\`, 'max': \`${n(a)}\` - (with value: \`${r(a)}\`)].`);if(t>a)throw new RangeError(`First parameter (\`min\`) must be less than or equal to second parameter (\`max\`), but received: ['min': ${s(t)}, 'max': ${s(a)}].`);return t=Math.max(1,t),a=Math.min(Number.MAX_SAFE_INTEGER,a),Math.floor(Math.random()*(a-t+1))+t},s=e=>a(e,{includeNaN:!0})?e===Number.MIN_VALUE?"`Number.MIN_VALUE`":`${e}`:`\`${n(e)}\``,c=(...e)=>e.some(e=>a(e,{includeNaN:!0})&&e===Number.MIN_VALUE)?" and can't be `Number.MIN_VALUE` ":" ",g=t=>{m(t)||(t={});const{minLength:a=1,maxLength:h=16,avoidZero:o=!1}=t;if(i(o,{message:({currentType:e,validType:r})=>`Parameters \`avoidZero\` must be of type \`${r}\`, but received: \`${e}\`.`}),!e(a)||!e(h))throw new TypeError(`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${n(a)}\` - (with value: ${r(a)}), 'maxLength': \`${n(h)}\` - (with value: ${r(h)})].`);if(a<1||h>16||a>h)throw new RangeError(`Invalid range at parameters \`minLength\` must be ≥ 1, \`maxLength\` must be ≤ 16, and \`minLength\` ≤ \`maxLength\`, but received: ['minLength': \`${a}\`, 'maxLength': \`${h}\`].`);const s=a===h?a:u(a,h),c=10**(s-1);let g=u(c,10**s-1);return o&&0===g&&(g=c),g},p=t=>{m(t)||(t={});const{minLength:a=40,maxLength:o=40,type:s="string",avoidWhiteSpace:c=!0}=t;if(i(c,{message:({currentType:e,validType:r})=>`Parameters \`avoidWhiteSpace\` property of the \`options\` (first-parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),!e(a)||!e(o))throw new TypeError(`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${n(a)}\` - (with value: ${r(a)}), 'maxLength': \`${n(o)}\` - (with value: ${r(o)})].`);if(a<1||o>5e3||a>o)throw new RangeError(`Invalid range at parameters \`minLength\` must be ≥ 1, \`maxLength\` must be ≤ 5000, and \`minLength\` ≤ \`maxLength\`, but received: ['minLength': \`${a}\`, 'maxLength': \`${o}\`].`);if("string"!==s&&"number"!==s)throw new TypeError(`Parameter \`type\` must be of type \`string\` with value one of "string" | "number", but received: \`${n(s)}\`, with value: ${r(s)}.`);const g=u(a,o),p="number"===s?(h(Number(t.replaceGenInt))?void 0:t.replaceGenInt)??"0123456789":(t.replaceGenStr?t.replaceGenStr:void 0)??"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",d=(l=p,(c?l.replace(/\s|\n|\t/g,""):l)+(t.addChar||""));var l;if(!d.length){throw new Error(`Character set is empty. ${(()=>"number"===s?c?"If `avoidWhiteSpace` is true, and `replaceGenInt` cant be empty-string value, ensure `replaceGenInt` has valid characters and non-nan string number.":"Ensure `replaceGenInt` has valid characters and not a NaN number string while convert to number.":"Ensure `replaceGenStr` has valid characters and non empty string.")()}`)}let b="";for(let e=0;e<g;e++)b+=d.charAt(Math.floor(Math.random()*d.length));return b};export{o as getRandomItem,u as randomInt,g as randomIntByLength,p as randomStr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.isServer=()=>"undefined"==typeof window||"undefined"==typeof document;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.isURL=s=>s instanceof URL;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-J2RGTPGK.cjs"),t=require("./chunk-Y4O5KZF6.cjs"),s=require("./chunk-INUFZJLX.cjs");exports.disableUserInteraction=(s="on_processing")=>{if(e.isServer())return;t.assertIsString(s,{message:({validType:e,currentType:t})=>`First parameter \`className\` must be of type \`${e}\`, but received: \`${t}\`.`});const{documentElement:r}=document;r&&!r.classList.contains(s)&&r.classList.add(s)},exports.enableUserInteraction=(s="on_processing")=>{if(e.isServer())return;t.assertIsString(s,{message:({validType:e,currentType:t})=>`First parameter \`className\` must be of type \`${e}\`, but received: \`${t}\`.`});const{documentElement:r}=document;r&&r.classList.contains(s)&&r.classList.remove(s)},exports.removeElementFocus=()=>{if(e.isServer())return;const t=document.activeElement;t instanceof HTMLElement&&t.blur()},exports.scrollToTop=t=>{if(e.isServer())return;s.isPlainObject(t)||(t={});const r=s.hasOwnProp(t,"behavior")&&s.isNonEmptyString(t.behavior)&&["auto","instant","smooth"].includes(t.behavior.trim())?t.behavior:"smooth";let i=s.hasOwnProp(t,"timeout")&&s.isNumber(t.timeout)&&t.timeout>=1?t.timeout:1;i=i>2147483647?2147483647:i,setTimeout(()=>window.scrollTo({top:0,left:0,behavior:r}),i)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isBigInt as e}from"./chunk-QNKGP5DY.js";import{assertIsPlainObject as r,isPlainObject as t,isBoolean as n,isNaN as o,hasOwnProp as s,getPreciseType as i,isUndefined as a,isNumberObject as u,isInfinityNumber as f,isStringObject as p,isBooleanObject as c,isFunction as l,isSymbol as y,isObjectOrArray as d,isSet as m,isArray as b,isNull as v,isNumber as S,isObject as g}from"./chunk-2UIRWYE3.js";function k(e){return"[object Map]"===Object.prototype.toString.call(e)||e instanceof Map}var h=(e,s={})=>{r(s,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const i=!(!t(s)||!n(s.skipInvalidDate))&&s.skipInvalidDate,a=e instanceof Date;return i?a:a&&!o(e.getTime())},$=(t,$={})=>{r($,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const O=!!s($,"pretty")&&$.pretty,A=!s($,"sortKeys")||$.sortKeys,T=!!s($,"sortArray")&&$.sortArray,j=!!s($,"keepUndefined")&&$.keepUndefined;if(!(n(A)&&n(T)&&n(O)&&n(j)))throw new TypeError(`Parameters \`sortKeys\`, \`sortArray\`, \`keepUndefined\` and \`pretty\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: "['sortKeys': \`${i(A)}\`, 'sortArray': \`${i(T)}\`, 'keepUndefined': \`${i(j)}\`, 'pretty': \`${i(O)}\`]".`);if(a(t))return j?"undefined":"null";const K=new WeakSet,U=e=>v(e)||!d(e)&&!l(e),w=r=>{if(u(r)){const e=r.valueOf();return o(e)||f(e)?null:e}if(p(r))return r.valueOf();if(c(r))return r.valueOf();if(!l(r)&&!y(r)){if(e(r))return r.toString();if(o(r)||f(r))return null;if(a(r))return j?void 0:null;if(d(r)){if(K.has(r))return"[Circular]";if(K.add(r),h(r))return r.toISOString();if(k(r))return{map:Array.from(r.entries()).map(([e,r])=>[e,w(r)])};if(m(r))return{set:Array.from(r.values()).map(w)};if(b(r)){const e=r.map(w);if(T){const r=[],t=[];for(const n of e)U(n)?r.push(n):t.push(n);return r.sort((e,r)=>S(e)&&S(r)?e-r:String(e).localeCompare(String(r))),[...r,...t]}return e}const e=Object.keys(r);A&&e.sort((e,r)=>{const t=Number(e),n=Number(r);return o(t)||o(n)?e.localeCompare(r):t-n});const t={};if(g(r))for(const n of e){const e=w(r[n]);a(e)||(t[n]=e)}return t}return r}};try{return JSON.stringify(w(t),null,O?2:0)}catch(e){return console.warn("Error in safeStableStringify:",e),"{}"}};export{h as isDate,k as isMap,$ as safeStableStringify};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=()=>"undefined"==typeof window||"undefined"==typeof document;export{e as isServer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-DVMHRLKP.cjs"),r=require("./chunk-DQFU3KLE.cjs"),n=require("./chunk-INUFZJLX.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}))})};
|
package/dist/chunk-MMSYCIJ2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var r=require("./chunk-KHO2SBNA.cjs"),e=require("./chunk-7PG6YKIY.cjs"),t=require("./chunk-EXWCTDC3.cjs"),n=require("./chunk-YT3MSZKK.cjs"),i=require("./chunk-XC2PYCT4.cjs"),s=require("./chunk-EBMHQW7X.cjs"),a=require("./chunk-DQFU3KLE.cjs"),o=require("./chunk-INUFZJLX.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isEmptyValue as t}from"./chunk-X4PD3I5U.js";var r=(r,o={})=>!t(r,o),o=new Set(["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object BigInt64Array]","[object BigUint64Array]"]);function e(t){return null!=t&&"object"==typeof t&&o.has(Object.prototype.toString.call(t))}export{r as isNonEmptyValue,e as isTypedArray};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-YT3MSZKK.cjs"),i=require("./chunk-INUFZJLX.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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=a=>a instanceof URL;export{a as isURL};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isEmptyString as r}from"./chunk-TSLYDPBJ.js";import{isNonEmptyString as t,isPlainObject as i,isString as n}from"./chunk-2UIRWYE3.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=t=>"bigint"==typeof t;export{t as isBigInt};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{safeJsonParse as e}from"./chunk-G2B35D5W.js";import{isEqual as r,isEmptyArray as t}from"./chunk-GRSCNTOK.js";import{assertIsArray as n}from"./chunk-ZXIWDFEQ.js";import{safeStableStringify as s}from"./chunk-L73TOPX5.js";import{isPlainObject as i,isNonEmptyArray as o,isObjectOrArray as c,isArray as a,isNaN as u,isUndefined as m}from"./chunk-2UIRWYE3.js";var f=e=>{n(e,{message:({currentType:e,validType:r})=>`First parameter (\`values\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`});const t=[];return e.forEach((n,s)=>{for(let i=s+1;i<e.length;i++)if(r(n,e[i])){t.some(e=>r(e,n))||t.push(n);break}}),t},p=(e,r)=>{if(!i(e))return{};n(r,{message:({currentType:e,validType:r})=>`Second parameter (\`keysToOmit\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`});const t=f(r);if(t.length>0)throw new Error(`Function "omitKeys" Error: Duplicate keys detected - \`${t}\``);return Object.fromEntries(Object.entries(e).filter(([e])=>!r.includes(e)))},l=(r,p)=>{if(!i(r))return{};n(p,{message:({currentType:e,validType:r})=>`Second parameter (\`keysToOmit\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`});const l=f(p);if(o(l))throw new Error(`Function "omitKeysDeep" Error: Duplicate keys detected - \`${s(l)}\`.`);const y=(e,r)=>{if(!c(e))return e;const[n,...s]=r;if(t(s))if(a(e)){const r=parseInt(n);!u(r)&&r in e&&e.splice(r,1)}else delete e[n];else{const r=e[n];c(r)&&(e[n]=y(r,s))}return e},d=e=>{if(a(e))return e.map(d).filter(e=>!(c(e)&&0===Object.keys(e).length));if(c(e)){return Object.fromEntries(Object.entries(e).map(([e,r])=>[e,d(r)]).filter(([,e])=>!(m(e)||c(e)&&0===Object.keys(e).length)))}return e},b=e(s(r));for(const e of p){const r=e.split(".");y(b,r)}return d(b)};export{f as findDuplicates,p as omitKeys,l as omitKeysDeep};
|