@stndrds/constants 0.1.0-alpha.14

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/dist/index.js ADDED
@@ -0,0 +1,2820 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ ALL_MIME_TYPES: () => ALL_MIME_TYPES,
24
+ ARCHIVES: () => ARCHIVES,
25
+ ARCHIVE_MIME_TYPES: () => ARCHIVE_MIME_TYPES,
26
+ ARCHIVE_MIME_TYPES_ARRAY: () => ARCHIVE_MIME_TYPES_ARRAY,
27
+ AUDIO: () => AUDIO,
28
+ AUDIO_MIME_TYPES: () => AUDIO_MIME_TYPES,
29
+ AUDIO_MIME_TYPES_ARRAY: () => AUDIO_MIME_TYPES_ARRAY,
30
+ BYTES: () => BYTES,
31
+ CODE: () => CODE,
32
+ CODE_MIME_TYPES: () => CODE_MIME_TYPES,
33
+ CODE_MIME_TYPES_ARRAY: () => CODE_MIME_TYPES_ARRAY,
34
+ COLORS: () => COLORS,
35
+ COLOR_GROUPS: () => COLOR_GROUPS,
36
+ COUNTRIES: () => COUNTRIES,
37
+ CURRENCIES: () => CURRENCIES,
38
+ DEFAULT_ATTRIBUTE_ICONS: () => DEFAULT_ATTRIBUTE_ICONS,
39
+ DOCUMENTS: () => DOCUMENTS,
40
+ DOCUMENT_MIME_TYPES: () => DOCUMENT_MIME_TYPES,
41
+ DOCUMENT_MIME_TYPES_ARRAY: () => DOCUMENT_MIME_TYPES_ARRAY,
42
+ FILE_SIZE: () => FILE_SIZE,
43
+ FONTS: () => FONTS,
44
+ FONT_MIME_TYPES: () => FONT_MIME_TYPES,
45
+ FONT_MIME_TYPES_ARRAY: () => FONT_MIME_TYPES_ARRAY,
46
+ GIGABYTES: () => GIGABYTES,
47
+ ICONS: () => ICONS,
48
+ IMAGES: () => IMAGES,
49
+ IMAGE_MIME_TYPES: () => IMAGE_MIME_TYPES,
50
+ IMAGE_MIME_TYPES_ARRAY: () => IMAGE_MIME_TYPES_ARRAY,
51
+ KILOBYTES: () => KILOBYTES,
52
+ MEDIA: () => MEDIA,
53
+ MEGABYTES: () => MEGABYTES,
54
+ OFFICE_DOCUMENTS: () => OFFICE_DOCUMENTS,
55
+ OTHER_MIME_TYPES: () => OTHER_MIME_TYPES,
56
+ RECOMMENDED_MAX_SIZES: () => RECOMMENDED_MAX_SIZES,
57
+ STATUS_COLORS: () => STATUS_COLORS,
58
+ VIDEO: () => VIDEO,
59
+ VIDEO_MIME_TYPES: () => VIDEO_MIME_TYPES,
60
+ VIDEO_MIME_TYPES_ARRAY: () => VIDEO_MIME_TYPES_ARRAY,
61
+ WEB_IMAGES: () => WEB_IMAGES,
62
+ bytesToGb: () => bytesToGb,
63
+ bytesToMb: () => bytesToMb,
64
+ formatBytes: () => formatBytes,
65
+ gbToBytes: () => gbToBytes,
66
+ getAllColors: () => getAllColors,
67
+ getAllCountries: () => getAllCountries,
68
+ getAllCurrencies: () => getAllCurrencies,
69
+ getColor: () => getColor,
70
+ getColorIds: () => getColorIds,
71
+ getColorsByGroup: () => getColorsByGroup,
72
+ getCountryByIso2: () => getCountryByIso2,
73
+ getCountryByIso3: () => getCountryByIso3,
74
+ getCountryPhoneCode: () => getCountryPhoneCode,
75
+ getCurrency: () => getCurrency,
76
+ getCurrencySymbol: () => getCurrencySymbol,
77
+ getDefaultAttributeIcon: () => getDefaultAttributeIcon,
78
+ getExtensionFromMimeType: () => getExtensionFromMimeType,
79
+ getIconByAttrType: () => getIconByAttrType,
80
+ getPhoneMaxDigits: () => getPhoneMaxDigits,
81
+ getPhoneTrunkPrefix: () => getPhoneTrunkPrefix,
82
+ isArchiveMimeType: () => isArchiveMimeType,
83
+ isAudioMimeType: () => isAudioMimeType,
84
+ isCodeMimeType: () => isCodeMimeType,
85
+ isDocumentMimeType: () => isDocumentMimeType,
86
+ isImageMimeType: () => isImageMimeType,
87
+ isValidColorId: () => isValidColorId,
88
+ isValidCurrencyCode: () => isValidCurrencyCode,
89
+ isValidIso2: () => isValidIso2,
90
+ isValidIso3: () => isValidIso3,
91
+ isVideoMimeType: () => isVideoMimeType,
92
+ isWithinSizeLimit: () => isWithinSizeLimit,
93
+ mbToBytes: () => mbToBytes
94
+ });
95
+ module.exports = __toCommonJS(index_exports);
96
+
97
+ // src/attribute-icons.ts
98
+ var DEFAULT_ATTRIBUTE_ICONS = {
99
+ text: "text-align-left",
100
+ textarea: "align-left",
101
+ number: "hash",
102
+ checkbox: "check-square",
103
+ date: "calendar",
104
+ phone: "telephone",
105
+ currency: "dollar-circle",
106
+ status: "activity",
107
+ location: "location",
108
+ timestamp: "clock-circle",
109
+ select: "chevron-down-circle",
110
+ multiselect: "list-check",
111
+ file: "file",
112
+ user: "user",
113
+ relation: "link",
114
+ rating: "star"
115
+ };
116
+ function getDefaultAttributeIcon(type) {
117
+ return DEFAULT_ATTRIBUTE_ICONS[type] ?? "circle";
118
+ }
119
+
120
+ // src/colors.ts
121
+ var COLORS = {
122
+ // Neutral & Gray tones
123
+ gray: {
124
+ background: "rgba(107, 114, 128, 0.15)",
125
+ border: "rgba(107, 114, 128, 0.3)",
126
+ text: "#6B7280",
127
+ icon: "#6B7280"
128
+ },
129
+ slate: {
130
+ background: "rgba(100, 116, 139, 0.15)",
131
+ border: "rgba(100, 116, 139, 0.3)",
132
+ text: "#64748B",
133
+ icon: "#64748B"
134
+ },
135
+ // Blue tones (Info, In Progress)
136
+ blue: {
137
+ background: "rgba(59, 130, 246, 0.15)",
138
+ border: "rgba(59, 130, 246, 0.3)",
139
+ text: "#3B82F6",
140
+ icon: "#3B82F6"
141
+ },
142
+ sky: {
143
+ background: "rgba(14, 165, 233, 0.15)",
144
+ border: "rgba(14, 165, 233, 0.3)",
145
+ text: "#0EA5E9",
146
+ icon: "#0EA5E9"
147
+ },
148
+ indigo: {
149
+ background: "rgba(99, 102, 241, 0.15)",
150
+ border: "rgba(99, 102, 241, 0.3)",
151
+ text: "#6366F1",
152
+ icon: "#6366F1"
153
+ },
154
+ // Green tones (Success, Done, Active)
155
+ green: {
156
+ background: "rgba(34, 197, 94, 0.15)",
157
+ border: "rgba(34, 197, 94, 0.3)",
158
+ text: "#22C55E",
159
+ icon: "#22C55E"
160
+ },
161
+ emerald: {
162
+ background: "rgba(16, 185, 129, 0.15)",
163
+ border: "rgba(16, 185, 129, 0.3)",
164
+ text: "#10B981",
165
+ icon: "#10B981"
166
+ },
167
+ teal: {
168
+ background: "rgba(20, 184, 166, 0.15)",
169
+ border: "rgba(20, 184, 166, 0.3)",
170
+ text: "#14B8A6",
171
+ icon: "#14B8A6"
172
+ },
173
+ // Red tones (Error, Danger, Cancelled)
174
+ red: {
175
+ background: "rgba(239, 68, 68, 0.15)",
176
+ border: "rgba(239, 68, 68, 0.3)",
177
+ text: "#EF4444",
178
+ icon: "#EF4444"
179
+ },
180
+ rose: {
181
+ background: "rgba(244, 63, 94, 0.15)",
182
+ border: "rgba(244, 63, 94, 0.3)",
183
+ text: "#F43F5E",
184
+ icon: "#F43F5E"
185
+ },
186
+ // Yellow/Orange tones (Warning, Pending)
187
+ yellow: {
188
+ background: "rgba(234, 179, 8, 0.15)",
189
+ border: "rgba(234, 179, 8, 0.3)",
190
+ text: "#EAB308",
191
+ icon: "#EAB308"
192
+ },
193
+ amber: {
194
+ background: "rgba(245, 158, 11, 0.15)",
195
+ border: "rgba(245, 158, 11, 0.3)",
196
+ text: "#F59E0B",
197
+ icon: "#F59E0B"
198
+ },
199
+ orange: {
200
+ background: "rgba(249, 115, 22, 0.15)",
201
+ border: "rgba(249, 115, 22, 0.3)",
202
+ text: "#F97316",
203
+ icon: "#F97316"
204
+ },
205
+ // Purple tones (Special, Featured)
206
+ purple: {
207
+ background: "rgba(168, 85, 247, 0.15)",
208
+ border: "rgba(168, 85, 247, 0.3)",
209
+ text: "#A855F7",
210
+ icon: "#A855F7"
211
+ },
212
+ violet: {
213
+ background: "rgba(139, 92, 246, 0.15)",
214
+ border: "rgba(139, 92, 246, 0.3)",
215
+ text: "#8B5CF6",
216
+ icon: "#8B5CF6"
217
+ },
218
+ fuchsia: {
219
+ background: "rgba(217, 70, 239, 0.15)",
220
+ border: "rgba(217, 70, 239, 0.3)",
221
+ text: "#D946EF",
222
+ icon: "#D946EF"
223
+ },
224
+ // Pink tones (Accent)
225
+ pink: {
226
+ background: "rgba(236, 72, 153, 0.15)",
227
+ border: "rgba(236, 72, 153, 0.3)",
228
+ text: "#EC4899",
229
+ icon: "#EC4899"
230
+ },
231
+ // Cyan (Alternative Info)
232
+ cyan: {
233
+ background: "rgba(6, 182, 212, 0.15)",
234
+ border: "rgba(6, 182, 212, 0.3)",
235
+ text: "#06B6D4",
236
+ icon: "#06B6D4"
237
+ },
238
+ // Lime (Alternative Success)
239
+ lime: {
240
+ background: "rgba(132, 204, 22, 0.15)",
241
+ border: "rgba(132, 204, 22, 0.3)",
242
+ text: "#84CC16",
243
+ icon: "#84CC16"
244
+ }
245
+ };
246
+ var getColor = (id) => {
247
+ return COLORS[id];
248
+ };
249
+ var getAllColors = () => {
250
+ return Object.values(COLORS);
251
+ };
252
+ var getColorIds = () => {
253
+ return Object.keys(COLORS);
254
+ };
255
+ var isValidColorId = (id) => {
256
+ return id in COLORS;
257
+ };
258
+ var COLOR_GROUPS = {
259
+ neutral: ["gray", "slate"],
260
+ primary: ["blue", "indigo", "sky"],
261
+ success: ["green", "emerald", "teal", "lime"],
262
+ danger: ["red", "rose"],
263
+ warning: ["yellow", "amber", "orange"],
264
+ info: ["blue", "cyan", "sky"],
265
+ special: ["purple", "violet", "fuchsia"],
266
+ accent: ["pink"]
267
+ };
268
+ var getColorsByGroup = (group) => {
269
+ return [...COLOR_GROUPS[group]];
270
+ };
271
+ var STATUS_COLORS = {
272
+ idle: ["gray", "slate"],
273
+ in_progress: ["blue", "indigo", "sky", "cyan", "purple"],
274
+ finished: ["green", "emerald", "teal"],
275
+ cancelled: ["red", "rose"],
276
+ warning: ["yellow", "amber", "orange"]
277
+ };
278
+
279
+ // src/countries.ts
280
+ var COUNTRIES = {
281
+ // Priority countries (most commonly used)
282
+ FR: {
283
+ name: "France",
284
+ iso2: "FR",
285
+ iso3: "FRA",
286
+ numericCode: "250",
287
+ phoneCode: "+33",
288
+ phoneMaxDigits: 10,
289
+ phoneTrunkPrefix: "0"
290
+ },
291
+ US: {
292
+ name: "United States",
293
+ iso2: "US",
294
+ iso3: "USA",
295
+ numericCode: "840",
296
+ phoneCode: "+1",
297
+ phoneMaxDigits: 10,
298
+ phoneTrunkPrefix: ""
299
+ },
300
+ GB: {
301
+ name: "United Kingdom",
302
+ iso2: "GB",
303
+ iso3: "GBR",
304
+ numericCode: "826",
305
+ phoneCode: "+44",
306
+ phoneMaxDigits: 11,
307
+ phoneTrunkPrefix: "0"
308
+ },
309
+ DE: {
310
+ name: "Germany",
311
+ iso2: "DE",
312
+ iso3: "DEU",
313
+ numericCode: "276",
314
+ phoneCode: "+49",
315
+ phoneMaxDigits: 11,
316
+ phoneTrunkPrefix: "0"
317
+ },
318
+ ES: {
319
+ name: "Spain",
320
+ iso2: "ES",
321
+ iso3: "ESP",
322
+ numericCode: "724",
323
+ phoneCode: "+34",
324
+ phoneMaxDigits: 9,
325
+ phoneTrunkPrefix: ""
326
+ },
327
+ IT: {
328
+ name: "Italy",
329
+ iso2: "IT",
330
+ iso3: "ITA",
331
+ numericCode: "380",
332
+ phoneCode: "+39",
333
+ phoneMaxDigits: 10,
334
+ phoneTrunkPrefix: "0"
335
+ },
336
+ BE: {
337
+ name: "Belgium",
338
+ iso2: "BE",
339
+ iso3: "BEL",
340
+ numericCode: "056",
341
+ phoneCode: "+32",
342
+ phoneMaxDigits: 9,
343
+ phoneTrunkPrefix: "0"
344
+ },
345
+ CH: {
346
+ name: "Switzerland",
347
+ iso2: "CH",
348
+ iso3: "CHE",
349
+ numericCode: "756",
350
+ phoneCode: "+41",
351
+ phoneMaxDigits: 10,
352
+ phoneTrunkPrefix: "0"
353
+ },
354
+ NL: {
355
+ name: "Netherlands",
356
+ iso2: "NL",
357
+ iso3: "NLD",
358
+ numericCode: "528",
359
+ phoneCode: "+31",
360
+ phoneMaxDigits: 9,
361
+ phoneTrunkPrefix: "0"
362
+ },
363
+ PT: {
364
+ name: "Portugal",
365
+ iso2: "PT",
366
+ iso3: "PRT",
367
+ numericCode: "620",
368
+ phoneCode: "+351",
369
+ phoneMaxDigits: 9,
370
+ phoneTrunkPrefix: ""
371
+ },
372
+ CA: {
373
+ name: "Canada",
374
+ iso2: "CA",
375
+ iso3: "CAN",
376
+ numericCode: "124",
377
+ phoneCode: "+1",
378
+ phoneMaxDigits: 10,
379
+ phoneTrunkPrefix: ""
380
+ },
381
+ AU: {
382
+ name: "Australia",
383
+ iso2: "AU",
384
+ iso3: "AUS",
385
+ numericCode: "036",
386
+ phoneCode: "+61",
387
+ phoneMaxDigits: 9,
388
+ phoneTrunkPrefix: "0"
389
+ },
390
+ // Europe - Other
391
+ AT: {
392
+ name: "Austria",
393
+ iso2: "AT",
394
+ iso3: "AUT",
395
+ numericCode: "040",
396
+ phoneCode: "+43",
397
+ phoneMaxDigits: 11,
398
+ phoneTrunkPrefix: "0"
399
+ },
400
+ SE: {
401
+ name: "Sweden",
402
+ iso2: "SE",
403
+ iso3: "SWE",
404
+ numericCode: "752",
405
+ phoneCode: "+46",
406
+ phoneMaxDigits: 10,
407
+ phoneTrunkPrefix: "0"
408
+ },
409
+ NO: {
410
+ name: "Norway",
411
+ iso2: "NO",
412
+ iso3: "NOR",
413
+ numericCode: "578",
414
+ phoneCode: "+47",
415
+ phoneMaxDigits: 8,
416
+ phoneTrunkPrefix: ""
417
+ },
418
+ DK: {
419
+ name: "Denmark",
420
+ iso2: "DK",
421
+ iso3: "DNK",
422
+ numericCode: "208",
423
+ phoneCode: "+45",
424
+ phoneMaxDigits: 8,
425
+ phoneTrunkPrefix: ""
426
+ },
427
+ FI: {
428
+ name: "Finland",
429
+ iso2: "FI",
430
+ iso3: "FIN",
431
+ numericCode: "246",
432
+ phoneCode: "+358",
433
+ phoneMaxDigits: 10,
434
+ phoneTrunkPrefix: "0"
435
+ },
436
+ IE: {
437
+ name: "Ireland",
438
+ iso2: "IE",
439
+ iso3: "IRL",
440
+ numericCode: "372",
441
+ phoneCode: "+353",
442
+ phoneMaxDigits: 10,
443
+ phoneTrunkPrefix: "0"
444
+ },
445
+ PL: {
446
+ name: "Poland",
447
+ iso2: "PL",
448
+ iso3: "POL",
449
+ numericCode: "616",
450
+ phoneCode: "+48",
451
+ phoneMaxDigits: 9,
452
+ phoneTrunkPrefix: ""
453
+ },
454
+ CZ: {
455
+ name: "Czech Republic",
456
+ iso2: "CZ",
457
+ iso3: "CZE",
458
+ numericCode: "203",
459
+ phoneCode: "+420",
460
+ phoneMaxDigits: 9,
461
+ phoneTrunkPrefix: ""
462
+ },
463
+ GR: {
464
+ name: "Greece",
465
+ iso2: "GR",
466
+ iso3: "GRC",
467
+ numericCode: "300",
468
+ phoneCode: "+30",
469
+ phoneMaxDigits: 10,
470
+ phoneTrunkPrefix: ""
471
+ },
472
+ RO: {
473
+ name: "Romania",
474
+ iso2: "RO",
475
+ iso3: "ROU",
476
+ numericCode: "642",
477
+ phoneCode: "+40",
478
+ phoneMaxDigits: 10,
479
+ phoneTrunkPrefix: "0"
480
+ },
481
+ HU: {
482
+ name: "Hungary",
483
+ iso2: "HU",
484
+ iso3: "HUN",
485
+ numericCode: "348",
486
+ phoneCode: "+36",
487
+ phoneMaxDigits: 9,
488
+ phoneTrunkPrefix: "06"
489
+ },
490
+ LU: {
491
+ name: "Luxembourg",
492
+ iso2: "LU",
493
+ iso3: "LUX",
494
+ numericCode: "442",
495
+ phoneCode: "+352",
496
+ phoneMaxDigits: 9,
497
+ phoneTrunkPrefix: ""
498
+ },
499
+ SK: {
500
+ name: "Slovakia",
501
+ iso2: "SK",
502
+ iso3: "SVK",
503
+ numericCode: "703",
504
+ phoneCode: "+421",
505
+ phoneMaxDigits: 9,
506
+ phoneTrunkPrefix: "0"
507
+ },
508
+ BG: {
509
+ name: "Bulgaria",
510
+ iso2: "BG",
511
+ iso3: "BGR",
512
+ numericCode: "100",
513
+ phoneCode: "+359",
514
+ phoneMaxDigits: 9,
515
+ phoneTrunkPrefix: "0"
516
+ },
517
+ HR: {
518
+ name: "Croatia",
519
+ iso2: "HR",
520
+ iso3: "HRV",
521
+ numericCode: "191",
522
+ phoneCode: "+385",
523
+ phoneMaxDigits: 9,
524
+ phoneTrunkPrefix: "0"
525
+ },
526
+ SI: {
527
+ name: "Slovenia",
528
+ iso2: "SI",
529
+ iso3: "SVN",
530
+ numericCode: "705",
531
+ phoneCode: "+386",
532
+ phoneMaxDigits: 8,
533
+ phoneTrunkPrefix: "0"
534
+ },
535
+ EE: {
536
+ name: "Estonia",
537
+ iso2: "EE",
538
+ iso3: "EST",
539
+ numericCode: "233",
540
+ phoneCode: "+372",
541
+ phoneMaxDigits: 8,
542
+ phoneTrunkPrefix: ""
543
+ },
544
+ LV: {
545
+ name: "Latvia",
546
+ iso2: "LV",
547
+ iso3: "LVA",
548
+ numericCode: "428",
549
+ phoneCode: "+371",
550
+ phoneMaxDigits: 8,
551
+ phoneTrunkPrefix: ""
552
+ },
553
+ LT: {
554
+ name: "Lithuania",
555
+ iso2: "LT",
556
+ iso3: "LTU",
557
+ numericCode: "440",
558
+ phoneCode: "+370",
559
+ phoneMaxDigits: 8,
560
+ phoneTrunkPrefix: ""
561
+ },
562
+ IS: {
563
+ name: "Iceland",
564
+ iso2: "IS",
565
+ iso3: "ISL",
566
+ numericCode: "352",
567
+ phoneCode: "+354",
568
+ phoneMaxDigits: 7,
569
+ phoneTrunkPrefix: ""
570
+ },
571
+ MT: {
572
+ name: "Malta",
573
+ iso2: "MT",
574
+ iso3: "MLT",
575
+ numericCode: "470",
576
+ phoneCode: "+356",
577
+ phoneMaxDigits: 8,
578
+ phoneTrunkPrefix: ""
579
+ },
580
+ CY: {
581
+ name: "Cyprus",
582
+ iso2: "CY",
583
+ iso3: "CYP",
584
+ numericCode: "196",
585
+ phoneCode: "+357",
586
+ phoneMaxDigits: 8,
587
+ phoneTrunkPrefix: ""
588
+ },
589
+ MC: {
590
+ name: "Monaco",
591
+ iso2: "MC",
592
+ iso3: "MCO",
593
+ numericCode: "492",
594
+ phoneCode: "+377",
595
+ phoneMaxDigits: 8,
596
+ phoneTrunkPrefix: ""
597
+ },
598
+ // Americas - Other
599
+ MX: {
600
+ name: "Mexico",
601
+ iso2: "MX",
602
+ iso3: "MEX",
603
+ numericCode: "484",
604
+ phoneCode: "+52",
605
+ phoneMaxDigits: 10,
606
+ phoneTrunkPrefix: ""
607
+ },
608
+ BR: {
609
+ name: "Brazil",
610
+ iso2: "BR",
611
+ iso3: "BRA",
612
+ numericCode: "076",
613
+ phoneCode: "+55",
614
+ phoneMaxDigits: 11,
615
+ phoneTrunkPrefix: ""
616
+ },
617
+ AR: {
618
+ name: "Argentina",
619
+ iso2: "AR",
620
+ iso3: "ARG",
621
+ numericCode: "032",
622
+ phoneCode: "+54",
623
+ phoneMaxDigits: 10,
624
+ phoneTrunkPrefix: ""
625
+ },
626
+ CL: {
627
+ name: "Chile",
628
+ iso2: "CL",
629
+ iso3: "CHL",
630
+ numericCode: "152",
631
+ phoneCode: "+56",
632
+ phoneMaxDigits: 9,
633
+ phoneTrunkPrefix: ""
634
+ },
635
+ CO: {
636
+ name: "Colombia",
637
+ iso2: "CO",
638
+ iso3: "COL",
639
+ numericCode: "170",
640
+ phoneCode: "+57",
641
+ phoneMaxDigits: 10,
642
+ phoneTrunkPrefix: ""
643
+ },
644
+ PE: {
645
+ name: "Peru",
646
+ iso2: "PE",
647
+ iso3: "PER",
648
+ numericCode: "604",
649
+ phoneCode: "+51",
650
+ phoneMaxDigits: 9,
651
+ phoneTrunkPrefix: ""
652
+ },
653
+ VE: {
654
+ name: "Venezuela",
655
+ iso2: "VE",
656
+ iso3: "VEN",
657
+ numericCode: "862",
658
+ phoneCode: "+58",
659
+ phoneMaxDigits: 10,
660
+ phoneTrunkPrefix: ""
661
+ },
662
+ EC: {
663
+ name: "Ecuador",
664
+ iso2: "EC",
665
+ iso3: "ECU",
666
+ numericCode: "218",
667
+ phoneCode: "+593",
668
+ phoneMaxDigits: 9,
669
+ phoneTrunkPrefix: ""
670
+ },
671
+ UY: {
672
+ name: "Uruguay",
673
+ iso2: "UY",
674
+ iso3: "URY",
675
+ numericCode: "858",
676
+ phoneCode: "+598",
677
+ phoneMaxDigits: 8,
678
+ phoneTrunkPrefix: ""
679
+ },
680
+ PY: {
681
+ name: "Paraguay",
682
+ iso2: "PY",
683
+ iso3: "PRY",
684
+ numericCode: "600",
685
+ phoneCode: "+595",
686
+ phoneMaxDigits: 9,
687
+ phoneTrunkPrefix: ""
688
+ },
689
+ BO: {
690
+ name: "Bolivia",
691
+ iso2: "BO",
692
+ iso3: "BOL",
693
+ numericCode: "068",
694
+ phoneCode: "+591",
695
+ phoneMaxDigits: 8,
696
+ phoneTrunkPrefix: ""
697
+ },
698
+ CR: {
699
+ name: "Costa Rica",
700
+ iso2: "CR",
701
+ iso3: "CRI",
702
+ numericCode: "188",
703
+ phoneCode: "+506",
704
+ phoneMaxDigits: 8,
705
+ phoneTrunkPrefix: ""
706
+ },
707
+ PA: {
708
+ name: "Panama",
709
+ iso2: "PA",
710
+ iso3: "PAN",
711
+ numericCode: "591",
712
+ phoneCode: "+507",
713
+ phoneMaxDigits: 8,
714
+ phoneTrunkPrefix: ""
715
+ },
716
+ // Asia
717
+ CN: {
718
+ name: "China",
719
+ iso2: "CN",
720
+ iso3: "CHN",
721
+ numericCode: "156",
722
+ phoneCode: "+86",
723
+ phoneMaxDigits: 11,
724
+ phoneTrunkPrefix: ""
725
+ },
726
+ JP: {
727
+ name: "Japan",
728
+ iso2: "JP",
729
+ iso3: "JPN",
730
+ numericCode: "392",
731
+ phoneCode: "+81",
732
+ phoneMaxDigits: 11,
733
+ phoneTrunkPrefix: "0"
734
+ },
735
+ IN: {
736
+ name: "India",
737
+ iso2: "IN",
738
+ iso3: "IND",
739
+ numericCode: "356",
740
+ phoneCode: "+91",
741
+ phoneMaxDigits: 10,
742
+ phoneTrunkPrefix: ""
743
+ },
744
+ KR: {
745
+ name: "South Korea",
746
+ iso2: "KR",
747
+ iso3: "KOR",
748
+ numericCode: "410",
749
+ phoneCode: "+82",
750
+ phoneMaxDigits: 11,
751
+ phoneTrunkPrefix: "0"
752
+ },
753
+ SG: {
754
+ name: "Singapore",
755
+ iso2: "SG",
756
+ iso3: "SGP",
757
+ numericCode: "702",
758
+ phoneCode: "+65",
759
+ phoneMaxDigits: 8,
760
+ phoneTrunkPrefix: ""
761
+ },
762
+ HK: {
763
+ name: "Hong Kong",
764
+ iso2: "HK",
765
+ iso3: "HKG",
766
+ numericCode: "344",
767
+ phoneCode: "+852",
768
+ phoneMaxDigits: 8,
769
+ phoneTrunkPrefix: ""
770
+ },
771
+ TW: {
772
+ name: "Taiwan",
773
+ iso2: "TW",
774
+ iso3: "TWN",
775
+ numericCode: "158",
776
+ phoneCode: "+886",
777
+ phoneMaxDigits: 10,
778
+ phoneTrunkPrefix: "0"
779
+ },
780
+ TH: {
781
+ name: "Thailand",
782
+ iso2: "TH",
783
+ iso3: "THA",
784
+ numericCode: "764",
785
+ phoneCode: "+66",
786
+ phoneMaxDigits: 9,
787
+ phoneTrunkPrefix: "0"
788
+ },
789
+ MY: {
790
+ name: "Malaysia",
791
+ iso2: "MY",
792
+ iso3: "MYS",
793
+ numericCode: "458",
794
+ phoneCode: "+60",
795
+ phoneMaxDigits: 10,
796
+ phoneTrunkPrefix: "0"
797
+ },
798
+ ID: {
799
+ name: "Indonesia",
800
+ iso2: "ID",
801
+ iso3: "IDN",
802
+ numericCode: "360",
803
+ phoneCode: "+62",
804
+ phoneMaxDigits: 12,
805
+ phoneTrunkPrefix: "0"
806
+ },
807
+ PH: {
808
+ name: "Philippines",
809
+ iso2: "PH",
810
+ iso3: "PHL",
811
+ numericCode: "608",
812
+ phoneCode: "+63",
813
+ phoneMaxDigits: 10,
814
+ phoneTrunkPrefix: "0"
815
+ },
816
+ VN: {
817
+ name: "Vietnam",
818
+ iso2: "VN",
819
+ iso3: "VNM",
820
+ numericCode: "704",
821
+ phoneCode: "+84",
822
+ phoneMaxDigits: 10,
823
+ phoneTrunkPrefix: "0"
824
+ },
825
+ PK: {
826
+ name: "Pakistan",
827
+ iso2: "PK",
828
+ iso3: "PAK",
829
+ numericCode: "586",
830
+ phoneCode: "+92",
831
+ phoneMaxDigits: 10,
832
+ phoneTrunkPrefix: "0"
833
+ },
834
+ BD: {
835
+ name: "Bangladesh",
836
+ iso2: "BD",
837
+ iso3: "BGD",
838
+ numericCode: "050",
839
+ phoneCode: "+880",
840
+ phoneMaxDigits: 10,
841
+ phoneTrunkPrefix: "0"
842
+ },
843
+ IL: {
844
+ name: "Israel",
845
+ iso2: "IL",
846
+ iso3: "ISR",
847
+ numericCode: "376",
848
+ phoneCode: "+972",
849
+ phoneMaxDigits: 10,
850
+ phoneTrunkPrefix: "0"
851
+ },
852
+ AE: {
853
+ name: "United Arab Emirates",
854
+ iso2: "AE",
855
+ iso3: "ARE",
856
+ numericCode: "784",
857
+ phoneCode: "+971",
858
+ phoneMaxDigits: 9,
859
+ phoneTrunkPrefix: ""
860
+ },
861
+ SA: {
862
+ name: "Saudi Arabia",
863
+ iso2: "SA",
864
+ iso3: "SAU",
865
+ numericCode: "682",
866
+ phoneCode: "+966",
867
+ phoneMaxDigits: 9,
868
+ phoneTrunkPrefix: ""
869
+ },
870
+ TR: {
871
+ name: "Turkey",
872
+ iso2: "TR",
873
+ iso3: "TUR",
874
+ numericCode: "792",
875
+ phoneCode: "+90",
876
+ phoneMaxDigits: 10,
877
+ phoneTrunkPrefix: "0"
878
+ },
879
+ // Oceania
880
+ NZ: {
881
+ name: "New Zealand",
882
+ iso2: "NZ",
883
+ iso3: "NZL",
884
+ numericCode: "554",
885
+ phoneCode: "+64",
886
+ phoneMaxDigits: 10,
887
+ phoneTrunkPrefix: "0"
888
+ },
889
+ // Africa
890
+ ZA: {
891
+ name: "South Africa",
892
+ iso2: "ZA",
893
+ iso3: "ZAF",
894
+ numericCode: "710",
895
+ phoneCode: "+27",
896
+ phoneMaxDigits: 9,
897
+ phoneTrunkPrefix: "0"
898
+ },
899
+ EG: {
900
+ name: "Egypt",
901
+ iso2: "EG",
902
+ iso3: "EGY",
903
+ numericCode: "818",
904
+ phoneCode: "+20",
905
+ phoneMaxDigits: 10,
906
+ phoneTrunkPrefix: "0"
907
+ },
908
+ NG: {
909
+ name: "Nigeria",
910
+ iso2: "NG",
911
+ iso3: "NGA",
912
+ numericCode: "566",
913
+ phoneCode: "+234",
914
+ phoneMaxDigits: 10,
915
+ phoneTrunkPrefix: "0"
916
+ },
917
+ KE: {
918
+ name: "Kenya",
919
+ iso2: "KE",
920
+ iso3: "KEN",
921
+ numericCode: "404",
922
+ phoneCode: "+254",
923
+ phoneMaxDigits: 9,
924
+ phoneTrunkPrefix: "0"
925
+ },
926
+ MA: {
927
+ name: "Morocco",
928
+ iso2: "MA",
929
+ iso3: "MAR",
930
+ numericCode: "504",
931
+ phoneCode: "+212",
932
+ phoneMaxDigits: 9,
933
+ phoneTrunkPrefix: "0"
934
+ },
935
+ TN: {
936
+ name: "Tunisia",
937
+ iso2: "TN",
938
+ iso3: "TUN",
939
+ numericCode: "788",
940
+ phoneCode: "+216",
941
+ phoneMaxDigits: 8,
942
+ phoneTrunkPrefix: ""
943
+ },
944
+ DZ: {
945
+ name: "Algeria",
946
+ iso2: "DZ",
947
+ iso3: "DZA",
948
+ numericCode: "012",
949
+ phoneCode: "+213",
950
+ phoneMaxDigits: 9,
951
+ phoneTrunkPrefix: "0"
952
+ },
953
+ // Middle East
954
+ QA: {
955
+ name: "Qatar",
956
+ iso2: "QA",
957
+ iso3: "QAT",
958
+ numericCode: "634",
959
+ phoneCode: "+974",
960
+ phoneMaxDigits: 8,
961
+ phoneTrunkPrefix: ""
962
+ },
963
+ KW: {
964
+ name: "Kuwait",
965
+ iso2: "KW",
966
+ iso3: "KWT",
967
+ numericCode: "414",
968
+ phoneCode: "+965",
969
+ phoneMaxDigits: 8,
970
+ phoneTrunkPrefix: ""
971
+ },
972
+ OM: {
973
+ name: "Oman",
974
+ iso2: "OM",
975
+ iso3: "OMN",
976
+ numericCode: "512",
977
+ phoneCode: "+968",
978
+ phoneMaxDigits: 8,
979
+ phoneTrunkPrefix: ""
980
+ },
981
+ BH: {
982
+ name: "Bahrain",
983
+ iso2: "BH",
984
+ iso3: "BHR",
985
+ numericCode: "048",
986
+ phoneCode: "+973",
987
+ phoneMaxDigits: 8,
988
+ phoneTrunkPrefix: ""
989
+ },
990
+ LB: {
991
+ name: "Lebanon",
992
+ iso2: "LB",
993
+ iso3: "LBN",
994
+ numericCode: "422",
995
+ phoneCode: "+961",
996
+ phoneMaxDigits: 8,
997
+ phoneTrunkPrefix: "0"
998
+ },
999
+ JO: {
1000
+ name: "Jordan",
1001
+ iso2: "JO",
1002
+ iso3: "JOR",
1003
+ numericCode: "400",
1004
+ phoneCode: "+962",
1005
+ phoneMaxDigits: 9,
1006
+ phoneTrunkPrefix: "0"
1007
+ },
1008
+ // Eastern Europe & Central Asia
1009
+ RU: {
1010
+ name: "Russia",
1011
+ iso2: "RU",
1012
+ iso3: "RUS",
1013
+ numericCode: "643",
1014
+ phoneCode: "+7",
1015
+ phoneMaxDigits: 10,
1016
+ phoneTrunkPrefix: ""
1017
+ },
1018
+ UA: {
1019
+ name: "Ukraine",
1020
+ iso2: "UA",
1021
+ iso3: "UKR",
1022
+ numericCode: "804",
1023
+ phoneCode: "+380",
1024
+ phoneMaxDigits: 9,
1025
+ phoneTrunkPrefix: "0"
1026
+ },
1027
+ BY: {
1028
+ name: "Belarus",
1029
+ iso2: "BY",
1030
+ iso3: "BLR",
1031
+ numericCode: "112",
1032
+ phoneCode: "+375",
1033
+ phoneMaxDigits: 9,
1034
+ phoneTrunkPrefix: ""
1035
+ },
1036
+ KZ: {
1037
+ name: "Kazakhstan",
1038
+ iso2: "KZ",
1039
+ iso3: "KAZ",
1040
+ numericCode: "398",
1041
+ phoneCode: "+7",
1042
+ phoneMaxDigits: 10,
1043
+ phoneTrunkPrefix: ""
1044
+ }
1045
+ };
1046
+ var getCountryByIso2 = (iso2) => {
1047
+ return COUNTRIES[iso2.toUpperCase()];
1048
+ };
1049
+ var getCountryByIso3 = (iso3) => {
1050
+ return Object.values(COUNTRIES).find(
1051
+ (country) => country.iso3.toUpperCase() === iso3.toUpperCase()
1052
+ );
1053
+ };
1054
+ var getAllCountries = () => {
1055
+ return Object.values(COUNTRIES);
1056
+ };
1057
+ var getCountryPhoneCode = (iso2) => {
1058
+ return COUNTRIES[iso2.toUpperCase()]?.phoneCode || "";
1059
+ };
1060
+ var getPhoneMaxDigits = (iso2) => {
1061
+ return COUNTRIES[iso2.toUpperCase()]?.phoneMaxDigits ?? 15;
1062
+ };
1063
+ var getPhoneTrunkPrefix = (iso2) => {
1064
+ return COUNTRIES[iso2.toUpperCase()]?.phoneTrunkPrefix ?? "";
1065
+ };
1066
+ var isValidIso2 = (code) => {
1067
+ return code.toUpperCase() in COUNTRIES;
1068
+ };
1069
+ var isValidIso3 = (code) => {
1070
+ return Object.values(COUNTRIES).some(
1071
+ (country) => country.iso3.toUpperCase() === code.toUpperCase()
1072
+ );
1073
+ };
1074
+
1075
+ // src/currencies.ts
1076
+ var CURRENCIES = {
1077
+ // Major World Currencies
1078
+ USD: { code: "USD", name: "US Dollar", symbol: "$", decimals: 2 },
1079
+ EUR: { code: "EUR", name: "Euro", symbol: "\u20AC", decimals: 2 },
1080
+ GBP: { code: "GBP", name: "British Pound", symbol: "\xA3", decimals: 2 },
1081
+ JPY: { code: "JPY", name: "Japanese Yen", symbol: "\xA5", decimals: 0 },
1082
+ CNY: { code: "CNY", name: "Chinese Yuan", symbol: "\xA5", decimals: 2 },
1083
+ // European Currencies
1084
+ CHF: { code: "CHF", name: "Swiss Franc", symbol: "CHF", decimals: 2 },
1085
+ SEK: { code: "SEK", name: "Swedish Krona", symbol: "kr", decimals: 2 },
1086
+ NOK: { code: "NOK", name: "Norwegian Krone", symbol: "kr", decimals: 2 },
1087
+ DKK: { code: "DKK", name: "Danish Krone", symbol: "kr", decimals: 2 },
1088
+ PLN: { code: "PLN", name: "Polish Zloty", symbol: "z\u0142", decimals: 2 },
1089
+ CZK: { code: "CZK", name: "Czech Koruna", symbol: "K\u010D", decimals: 2 },
1090
+ HUF: { code: "HUF", name: "Hungarian Forint", symbol: "Ft", decimals: 0 },
1091
+ RON: { code: "RON", name: "Romanian Leu", symbol: "lei", decimals: 2 },
1092
+ BGN: { code: "BGN", name: "Bulgarian Lev", symbol: "\u043B\u0432", decimals: 2 },
1093
+ HRK: { code: "HRK", name: "Croatian Kuna", symbol: "kn", decimals: 2 },
1094
+ ISK: { code: "ISK", name: "Icelandic Krona", symbol: "kr", decimals: 0 },
1095
+ RUB: { code: "RUB", name: "Russian Ruble", symbol: "\u20BD", decimals: 2 },
1096
+ UAH: { code: "UAH", name: "Ukrainian Hryvnia", symbol: "\u20B4", decimals: 2 },
1097
+ TRY: { code: "TRY", name: "Turkish Lira", symbol: "\u20BA", decimals: 2 },
1098
+ // Americas
1099
+ CAD: { code: "CAD", name: "Canadian Dollar", symbol: "CA$", decimals: 2 },
1100
+ MXN: { code: "MXN", name: "Mexican Peso", symbol: "MX$", decimals: 2 },
1101
+ BRL: { code: "BRL", name: "Brazilian Real", symbol: "R$", decimals: 2 },
1102
+ ARS: { code: "ARS", name: "Argentine Peso", symbol: "AR$", decimals: 2 },
1103
+ CLP: { code: "CLP", name: "Chilean Peso", symbol: "CL$", decimals: 0 },
1104
+ COP: { code: "COP", name: "Colombian Peso", symbol: "COL$", decimals: 0 },
1105
+ PEN: { code: "PEN", name: "Peruvian Sol", symbol: "S/", decimals: 2 },
1106
+ UYU: { code: "UYU", name: "Uruguayan Peso", symbol: "UY$", decimals: 2 },
1107
+ // Asia-Pacific
1108
+ AUD: { code: "AUD", name: "Australian Dollar", symbol: "A$", decimals: 2 },
1109
+ NZD: { code: "NZD", name: "New Zealand Dollar", symbol: "NZ$", decimals: 2 },
1110
+ HKD: { code: "HKD", name: "Hong Kong Dollar", symbol: "HK$", decimals: 2 },
1111
+ SGD: { code: "SGD", name: "Singapore Dollar", symbol: "S$", decimals: 2 },
1112
+ KRW: { code: "KRW", name: "South Korean Won", symbol: "\u20A9", decimals: 0 },
1113
+ INR: { code: "INR", name: "Indian Rupee", symbol: "\u20B9", decimals: 2 },
1114
+ IDR: { code: "IDR", name: "Indonesian Rupiah", symbol: "Rp", decimals: 0 },
1115
+ MYR: { code: "MYR", name: "Malaysian Ringgit", symbol: "RM", decimals: 2 },
1116
+ PHP: { code: "PHP", name: "Philippine Peso", symbol: "\u20B1", decimals: 2 },
1117
+ THB: { code: "THB", name: "Thai Baht", symbol: "\u0E3F", decimals: 2 },
1118
+ VND: { code: "VND", name: "Vietnamese Dong", symbol: "\u20AB", decimals: 0 },
1119
+ TWD: { code: "TWD", name: "Taiwan Dollar", symbol: "NT$", decimals: 0 },
1120
+ PKR: { code: "PKR", name: "Pakistani Rupee", symbol: "\u20A8", decimals: 2 },
1121
+ BDT: { code: "BDT", name: "Bangladeshi Taka", symbol: "\u09F3", decimals: 2 },
1122
+ // Middle East
1123
+ AED: { code: "AED", name: "UAE Dirham", symbol: "\u062F.\u0625", decimals: 2 },
1124
+ SAR: { code: "SAR", name: "Saudi Riyal", symbol: "\uFDFC", decimals: 2 },
1125
+ ILS: { code: "ILS", name: "Israeli Shekel", symbol: "\u20AA", decimals: 2 },
1126
+ QAR: { code: "QAR", name: "Qatari Riyal", symbol: "\uFDFC", decimals: 2 },
1127
+ KWD: { code: "KWD", name: "Kuwaiti Dinar", symbol: "\u062F.\u0643", decimals: 3 },
1128
+ BHD: { code: "BHD", name: "Bahraini Dinar", symbol: "\u062F.\u0628", decimals: 3 },
1129
+ OMR: { code: "OMR", name: "Omani Rial", symbol: "\uFDFC", decimals: 3 },
1130
+ JOD: { code: "JOD", name: "Jordanian Dinar", symbol: "\u062F.\u0627", decimals: 3 },
1131
+ LBP: { code: "LBP", name: "Lebanese Pound", symbol: "\u0644.\u0644", decimals: 0 },
1132
+ // Africa
1133
+ ZAR: { code: "ZAR", name: "South African Rand", symbol: "R", decimals: 2 },
1134
+ EGP: { code: "EGP", name: "Egyptian Pound", symbol: "\xA3", decimals: 2 },
1135
+ NGN: { code: "NGN", name: "Nigerian Naira", symbol: "\u20A6", decimals: 2 },
1136
+ KES: { code: "KES", name: "Kenyan Shilling", symbol: "KSh", decimals: 2 },
1137
+ MAD: { code: "MAD", name: "Moroccan Dirham", symbol: "\u062F.\u0645.", decimals: 2 },
1138
+ TND: { code: "TND", name: "Tunisian Dinar", symbol: "\u062F.\u062A", decimals: 3 },
1139
+ DZD: { code: "DZD", name: "Algerian Dinar", symbol: "\u062F.\u062C", decimals: 2 },
1140
+ // Other Important
1141
+ NIS: { code: "NIS", name: "Israeli New Shekel", symbol: "\u20AA", decimals: 2 }
1142
+ };
1143
+ var getCurrency = (code) => {
1144
+ return CURRENCIES[code.toUpperCase()];
1145
+ };
1146
+ var getAllCurrencies = () => {
1147
+ return Object.values(CURRENCIES);
1148
+ };
1149
+ var getCurrencySymbol = (code) => {
1150
+ return CURRENCIES[code.toUpperCase()]?.symbol || code;
1151
+ };
1152
+ var isValidCurrencyCode = (code) => {
1153
+ return code.toUpperCase() in CURRENCIES;
1154
+ };
1155
+
1156
+ // src/fileSizes.ts
1157
+ var BYTES = {
1158
+ /** 1 byte */
1159
+ B_1: 1,
1160
+ /** 10 bytes */
1161
+ B_10: 10,
1162
+ /** 100 bytes */
1163
+ B_100: 100,
1164
+ /** 512 bytes */
1165
+ B_512: 512
1166
+ };
1167
+ var KILOBYTES = {
1168
+ /** 1 KB (1,024 bytes) */
1169
+ KB_1: 1024,
1170
+ /** 2 KB (2,048 bytes) */
1171
+ KB_2: 2 * 1024,
1172
+ /** 5 KB (5,120 bytes) */
1173
+ KB_5: 5 * 1024,
1174
+ /** 10 KB (10,240 bytes) */
1175
+ KB_10: 10 * 1024,
1176
+ /** 50 KB (51,200 bytes) */
1177
+ KB_50: 50 * 1024,
1178
+ /** 100 KB (102,400 bytes) */
1179
+ KB_100: 100 * 1024,
1180
+ /** 500 KB (512,000 bytes) */
1181
+ KB_500: 500 * 1024
1182
+ };
1183
+ var MEGABYTES = {
1184
+ /** 1 MB (1,048,576 bytes) */
1185
+ MB_1: 1024 * 1024,
1186
+ /** 2 MB (2,097,152 bytes) */
1187
+ MB_2: 2 * 1024 * 1024,
1188
+ /** 5 MB (5,242,880 bytes) */
1189
+ MB_5: 5 * 1024 * 1024,
1190
+ /** 10 MB (10,485,760 bytes) */
1191
+ MB_10: 10 * 1024 * 1024,
1192
+ /** 20 MB (20,971,520 bytes) */
1193
+ MB_20: 20 * 1024 * 1024,
1194
+ /** 25 MB (26,214,400 bytes) */
1195
+ MB_25: 25 * 1024 * 1024,
1196
+ /** 50 MB (52,428,800 bytes) */
1197
+ MB_50: 50 * 1024 * 1024,
1198
+ /** 100 MB (104,857,600 bytes) */
1199
+ MB_100: 100 * 1024 * 1024,
1200
+ /** 200 MB (209,715,200 bytes) */
1201
+ MB_200: 200 * 1024 * 1024,
1202
+ /** 500 MB (524,288,000 bytes) */
1203
+ MB_500: 500 * 1024 * 1024
1204
+ };
1205
+ var GIGABYTES = {
1206
+ /** 1 GB (1,073,741,824 bytes) */
1207
+ GB_1: 1024 * 1024 * 1024,
1208
+ /** 2 GB (2,147,483,648 bytes) */
1209
+ GB_2: 2 * 1024 * 1024 * 1024,
1210
+ /** 5 GB (5,368,709,120 bytes) */
1211
+ GB_5: 5 * 1024 * 1024 * 1024,
1212
+ /** 10 GB (10,737,418,240 bytes) */
1213
+ GB_10: 10 * 1024 * 1024 * 1024
1214
+ };
1215
+ var FILE_SIZE = {
1216
+ ...BYTES,
1217
+ ...KILOBYTES,
1218
+ ...MEGABYTES,
1219
+ ...GIGABYTES
1220
+ };
1221
+ var RECOMMENDED_MAX_SIZES = {
1222
+ /** Avatar/Profile pictures: 2 MB */
1223
+ AVATAR: FILE_SIZE.MB_2,
1224
+ /** General images: 5 MB */
1225
+ IMAGE: FILE_SIZE.MB_5,
1226
+ /** Documents (PDF, Word, etc.): 10 MB */
1227
+ DOCUMENT: FILE_SIZE.MB_10,
1228
+ /** Presentations: 25 MB */
1229
+ PRESENTATION: FILE_SIZE.MB_25,
1230
+ /** Audio files: 50 MB */
1231
+ AUDIO: FILE_SIZE.MB_50,
1232
+ /** Video files: 500 MB */
1233
+ VIDEO: FILE_SIZE.MB_500,
1234
+ /** Large archives: 1 GB */
1235
+ ARCHIVE: FILE_SIZE.GB_1
1236
+ };
1237
+ var formatBytes = (bytes, decimals = 2) => {
1238
+ if (bytes === 0) return "0 B";
1239
+ const k = 1024;
1240
+ const dm = decimals < 0 ? 0 : decimals;
1241
+ const sizes = ["B", "KB", "MB", "GB", "TB"];
1242
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
1243
+ return `${Number.parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`;
1244
+ };
1245
+ var mbToBytes = (mb) => {
1246
+ return mb * 1024 * 1024;
1247
+ };
1248
+ var gbToBytes = (gb) => {
1249
+ return gb * 1024 * 1024 * 1024;
1250
+ };
1251
+ var bytesToMb = (bytes) => {
1252
+ return bytes / (1024 * 1024);
1253
+ };
1254
+ var bytesToGb = (bytes) => {
1255
+ return bytes / (1024 * 1024 * 1024);
1256
+ };
1257
+ var isWithinSizeLimit = (bytes, maxBytes) => {
1258
+ return bytes <= maxBytes;
1259
+ };
1260
+
1261
+ // src/icons.ts
1262
+ var ICONS = [
1263
+ "a-arrow-down",
1264
+ "a-arrow-up",
1265
+ "academic-hat",
1266
+ "accessibility",
1267
+ "activity-square",
1268
+ "activity",
1269
+ "add-queue",
1270
+ "aeroplane",
1271
+ "air-conditioner",
1272
+ "airplay",
1273
+ "airpods",
1274
+ "alarm-check",
1275
+ "alarm-minus",
1276
+ "alarm-plus",
1277
+ "alarm-smoke",
1278
+ "alarm-snooze",
1279
+ "alarm-x",
1280
+ "alarm",
1281
+ "album",
1282
+ "align-bottom",
1283
+ "align-horizontal",
1284
+ "align-left",
1285
+ "align-right",
1286
+ "align-top",
1287
+ "align-vertical",
1288
+ "alt",
1289
+ "ambulance",
1290
+ "ampersand-square",
1291
+ "ampersand",
1292
+ "ampersands",
1293
+ "anchor",
1294
+ "angry-circle",
1295
+ "angry-ghost",
1296
+ "angry-square",
1297
+ "annoyed-circle",
1298
+ "annoyed-ghost",
1299
+ "annoyed-square",
1300
+ "aperture",
1301
+ "api",
1302
+ "ar",
1303
+ "archive",
1304
+ "arrow-diagonal-one",
1305
+ "arrow-diagonal-two",
1306
+ "arrow-down-circle",
1307
+ "arrow-down-left-circle",
1308
+ "arrow-down-left-square",
1309
+ "arrow-down-left-waves",
1310
+ "arrow-down-left",
1311
+ "arrow-down-right-circle",
1312
+ "arrow-down-right-square",
1313
+ "arrow-down-right-waves",
1314
+ "arrow-down-right",
1315
+ "arrow-down-square",
1316
+ "arrow-down-waves",
1317
+ "arrow-down",
1318
+ "arrow-left-circle",
1319
+ "arrow-left-right",
1320
+ "arrow-left-square",
1321
+ "arrow-left-waves",
1322
+ "arrow-left",
1323
+ "arrow-long-down-left",
1324
+ "arrow-long-down-right",
1325
+ "arrow-long-down",
1326
+ "arrow-long-left",
1327
+ "arrow-long-right",
1328
+ "arrow-long-up-left",
1329
+ "arrow-long-up-right",
1330
+ "arrow-long-up",
1331
+ "arrow-right-circle",
1332
+ "arrow-right-square",
1333
+ "arrow-right-waves",
1334
+ "arrow-right",
1335
+ "arrow-up-circle",
1336
+ "arrow-up-down",
1337
+ "arrow-up-left-circle",
1338
+ "arrow-up-left-square",
1339
+ "arrow-up-left-waves",
1340
+ "arrow-up-left",
1341
+ "arrow-up-right-circle",
1342
+ "arrow-up-right-square",
1343
+ "arrow-up-right-waves",
1344
+ "arrow-up-right",
1345
+ "arrow-up-square",
1346
+ "arrow-up-waves",
1347
+ "arrow-up",
1348
+ "asterisk-circle",
1349
+ "asterisk-diamond",
1350
+ "asterisk-hexagon",
1351
+ "asterisk-octagon",
1352
+ "asterisk-square",
1353
+ "asterisk-waves",
1354
+ "at",
1355
+ "atom",
1356
+ "baby",
1357
+ "backpack",
1358
+ "badge",
1359
+ "baggage-claim",
1360
+ "ban",
1361
+ "bank",
1362
+ "baseball",
1363
+ "bath",
1364
+ "battery-charging-four",
1365
+ "battery-charging-one",
1366
+ "battery-charging-three",
1367
+ "battery-charging-two",
1368
+ "battery-charging",
1369
+ "battery-check",
1370
+ "battery-empty",
1371
+ "battery-full",
1372
+ "battery-minus",
1373
+ "battery-plus",
1374
+ "battery-x",
1375
+ "bell-check",
1376
+ "bell-home",
1377
+ "bell-minus",
1378
+ "bell-on",
1379
+ "bell-plus",
1380
+ "bell-slash",
1381
+ "bell-snooze",
1382
+ "bell-user",
1383
+ "bell-x",
1384
+ "bell",
1385
+ "binoculars",
1386
+ "bitcoin-circle",
1387
+ "bitcoin-diamond",
1388
+ "bitcoin-hexagon",
1389
+ "bitcoin-octagon",
1390
+ "bitcoin-square",
1391
+ "bitcoin-waves",
1392
+ "bitcoin",
1393
+ "bluetooth",
1394
+ "boat",
1395
+ "book-check",
1396
+ "book-dot",
1397
+ "book-home",
1398
+ "book-image",
1399
+ "book-minus",
1400
+ "book-open",
1401
+ "book-plus",
1402
+ "book-slash",
1403
+ "book-snooze",
1404
+ "book-user",
1405
+ "book-x",
1406
+ "book",
1407
+ "bookmark-check",
1408
+ "bookmark-dot",
1409
+ "bookmark-home",
1410
+ "bookmark-minus",
1411
+ "bookmark-plus",
1412
+ "bookmark-slash",
1413
+ "bookmark-snooze",
1414
+ "bookmark-user",
1415
+ "bookmark-x",
1416
+ "bookmark",
1417
+ "bounding-box",
1418
+ "bowl",
1419
+ "box",
1420
+ "brand-chrome",
1421
+ "brand-codepen",
1422
+ "brand-codesandbox",
1423
+ "brand-dribbble",
1424
+ "brand-facebook",
1425
+ "brand-figma",
1426
+ "brand-framer",
1427
+ "brand-github",
1428
+ "brand-gitlab",
1429
+ "brand-google",
1430
+ "brand-instagram",
1431
+ "brand-linkedin",
1432
+ "brand-pinterest",
1433
+ "brand-pocket",
1434
+ "brand-slack",
1435
+ "brand-spotify",
1436
+ "brand-telegram",
1437
+ "brand-threads",
1438
+ "brand-trello",
1439
+ "brand-twitch",
1440
+ "brand-twitter",
1441
+ "brand-x",
1442
+ "brand-youtube",
1443
+ "briefcase-conveyor-belt",
1444
+ "briefcase",
1445
+ "brightness-high",
1446
+ "brightness-low",
1447
+ "bubbles",
1448
+ "building-one",
1449
+ "building",
1450
+ "cable-car",
1451
+ "cake",
1452
+ "calendar-check",
1453
+ "calendar-down",
1454
+ "calendar-minus",
1455
+ "calendar-plus",
1456
+ "calendar-slash",
1457
+ "calendar-up",
1458
+ "calendar-x",
1459
+ "calendar",
1460
+ "camera-slash",
1461
+ "camera",
1462
+ "campfire",
1463
+ "cannabis",
1464
+ "caravan",
1465
+ "cart-check",
1466
+ "cart-minus",
1467
+ "cart-plus",
1468
+ "cart-x",
1469
+ "cart",
1470
+ "cast-screen",
1471
+ "center-focus",
1472
+ "chart-area",
1473
+ "chart-bar-big",
1474
+ "chart-bar-decreasing",
1475
+ "chart-bar-increasing",
1476
+ "chart-bar-one",
1477
+ "chart-bar-stacked",
1478
+ "chart-bar",
1479
+ "chart-bubble",
1480
+ "chart-candlestick",
1481
+ "chart-column-big",
1482
+ "chart-column-decreasing",
1483
+ "chart-column-increasing",
1484
+ "chart-column-stacked",
1485
+ "chart-column",
1486
+ "chart-gantt",
1487
+ "chart-graph",
1488
+ "chart-line",
1489
+ "chart-network",
1490
+ "chart-no-axes-column-decreasing",
1491
+ "chart-no-axes-column-increasing",
1492
+ "chart-no-axes-column",
1493
+ "chart-no-axes-combined",
1494
+ "chart-no-axes-gantt",
1495
+ "chart-pie-one",
1496
+ "chart-pie-two",
1497
+ "chart-pie",
1498
+ "chart-scatter",
1499
+ "chart-spline",
1500
+ "chat-check",
1501
+ "chat-dots",
1502
+ "chat-messages",
1503
+ "chat-minus",
1504
+ "chat-plus",
1505
+ "chat-x",
1506
+ "chat",
1507
+ "check-circle-one",
1508
+ "check-circle",
1509
+ "check-diamond",
1510
+ "check-hexagon",
1511
+ "check-octagon",
1512
+ "check-square-one",
1513
+ "check-square",
1514
+ "check-waves",
1515
+ "check",
1516
+ "chevron-double-down-left",
1517
+ "chevron-double-down-right",
1518
+ "chevron-double-down",
1519
+ "chevron-double-left",
1520
+ "chevron-double-right",
1521
+ "chevron-double-up-left",
1522
+ "chevron-double-up-right",
1523
+ "chevron-double-up",
1524
+ "chevron-down-circle",
1525
+ "chevron-down-left-circle",
1526
+ "chevron-down-left-square",
1527
+ "chevron-down-left-waves",
1528
+ "chevron-down-left",
1529
+ "chevron-down-right-circle",
1530
+ "chevron-down-right-square",
1531
+ "chevron-down-right-waves",
1532
+ "chevron-down-right",
1533
+ "chevron-down-square",
1534
+ "chevron-down-waves",
1535
+ "chevron-down",
1536
+ "chevron-left-circle",
1537
+ "chevron-left-square",
1538
+ "chevron-left-waves",
1539
+ "chevron-left",
1540
+ "chevron-right-circle",
1541
+ "chevron-right-square",
1542
+ "chevron-right-waves",
1543
+ "chevron-right",
1544
+ "chevron-up-circle",
1545
+ "chevron-up-down",
1546
+ "chevron-up-left-circle",
1547
+ "chevron-up-left-square",
1548
+ "chevron-up-left-waves",
1549
+ "chevron-up-left",
1550
+ "chevron-up-right-circle",
1551
+ "chevron-up-right-square",
1552
+ "chevron-up-right-waves",
1553
+ "chevron-up-right",
1554
+ "chevron-up-square",
1555
+ "chevron-up-waves",
1556
+ "chevron-up",
1557
+ "chip",
1558
+ "cigarette-off",
1559
+ "cigarette",
1560
+ "circle-dashed",
1561
+ "circle-half-circle",
1562
+ "circle-half",
1563
+ "circle-notch",
1564
+ "circle",
1565
+ "click",
1566
+ "clipboard",
1567
+ "clock-circle",
1568
+ "clock-diamond",
1569
+ "clock-eight",
1570
+ "clock-eleven",
1571
+ "clock-five",
1572
+ "clock-four",
1573
+ "clock-hand",
1574
+ "clock-hexagon",
1575
+ "clock-nine",
1576
+ "clock-octagon",
1577
+ "clock-one",
1578
+ "clock-seven",
1579
+ "clock-six",
1580
+ "clock-square",
1581
+ "clock-ten",
1582
+ "clock-three",
1583
+ "clock-twelve",
1584
+ "clock-two",
1585
+ "clock-waves",
1586
+ "cloud-download",
1587
+ "cloud-drizzle",
1588
+ "cloud-fog",
1589
+ "cloud-hail",
1590
+ "cloud-lightning",
1591
+ "cloud-moon-rain",
1592
+ "cloud-moon",
1593
+ "cloud-off",
1594
+ "cloud-rain-wind",
1595
+ "cloud-rain",
1596
+ "cloud-snow",
1597
+ "cloud-sun-rain",
1598
+ "cloud-sun",
1599
+ "cloud-upload",
1600
+ "cloud",
1601
+ "cloudy",
1602
+ "cocktail",
1603
+ "code-circle",
1604
+ "code-diamond",
1605
+ "code-hexagon",
1606
+ "code-octagon",
1607
+ "code-square",
1608
+ "code-waves",
1609
+ "code",
1610
+ "coffee",
1611
+ "cog-four",
1612
+ "cog-one",
1613
+ "cog-three",
1614
+ "cog-two",
1615
+ "cog",
1616
+ "columns",
1617
+ "command",
1618
+ "compass",
1619
+ "components",
1620
+ "confetti",
1621
+ "config-vertical",
1622
+ "config",
1623
+ "contactless-circle",
1624
+ "contactless",
1625
+ "controller",
1626
+ "cookie",
1627
+ "copy",
1628
+ "copyleft",
1629
+ "copyright-slash",
1630
+ "copyright",
1631
+ "corner-down-left",
1632
+ "corner-down-right",
1633
+ "corner-left-down",
1634
+ "corner-left-up",
1635
+ "corner-right-down",
1636
+ "corner-right-up",
1637
+ "corner-up-left",
1638
+ "corner-up-right",
1639
+ "credit-card-check",
1640
+ "credit-card-minus",
1641
+ "credit-card-plus",
1642
+ "credit-card-x",
1643
+ "credit-card",
1644
+ "croissant",
1645
+ "crop",
1646
+ "crosshair",
1647
+ "cupcake",
1648
+ "danger-circle",
1649
+ "danger-diamond",
1650
+ "danger-hexagon",
1651
+ "danger-octagon",
1652
+ "danger-square",
1653
+ "danger-triangle",
1654
+ "danger-waves",
1655
+ "danger",
1656
+ "database",
1657
+ "daze-circle",
1658
+ "daze-ghost",
1659
+ "daze-square",
1660
+ "delete",
1661
+ "desktop",
1662
+ "diamond",
1663
+ "dice-five",
1664
+ "dice-four",
1665
+ "dice-one",
1666
+ "dice-six",
1667
+ "dice-three",
1668
+ "dice-two",
1669
+ "dislike",
1670
+ "divide",
1671
+ "dollar-circle",
1672
+ "dollar-diamond",
1673
+ "dollar-hexagon",
1674
+ "dollar-octagon",
1675
+ "dollar-square",
1676
+ "dollar-waves",
1677
+ "dollar",
1678
+ "door-closed-locked",
1679
+ "door-closed",
1680
+ "door-open",
1681
+ "dots-circle",
1682
+ "dots-diamond",
1683
+ "dots-hexagon",
1684
+ "dots-octagon",
1685
+ "dots-square",
1686
+ "dots-vertical-circle",
1687
+ "dots-vertical-diamond",
1688
+ "dots-vertical-hexagon",
1689
+ "dots-vertical-octagon",
1690
+ "dots-vertical-square",
1691
+ "dots-vertical-waves",
1692
+ "dots-vertical",
1693
+ "dots-waves",
1694
+ "dots",
1695
+ "download",
1696
+ "drop",
1697
+ "droplet-off",
1698
+ "droplet",
1699
+ "droplets",
1700
+ "ear-slash",
1701
+ "ear",
1702
+ "earth",
1703
+ "eclipse",
1704
+ "edit-one",
1705
+ "edit",
1706
+ "egg",
1707
+ "eight-circle",
1708
+ "eight-diamond",
1709
+ "eight-hexagon",
1710
+ "eight-octagon",
1711
+ "eight-square",
1712
+ "eight-waves",
1713
+ "eight",
1714
+ "elevator",
1715
+ "envelope-open",
1716
+ "envelope",
1717
+ "euro-circle",
1718
+ "euro-diamond",
1719
+ "euro-hexagon",
1720
+ "euro-octagon",
1721
+ "euro-square",
1722
+ "euro-waves",
1723
+ "euro",
1724
+ "exclude",
1725
+ "external-link",
1726
+ "eye-slash",
1727
+ "eye",
1728
+ "face-id",
1729
+ "fat-arrow-down-left",
1730
+ "fat-arrow-down-right",
1731
+ "fat-arrow-down",
1732
+ "fat-arrow-left",
1733
+ "fat-arrow-right",
1734
+ "fat-arrow-up-left",
1735
+ "fat-arrow-up-right",
1736
+ "fat-arrow-up",
1737
+ "fat-corner-down-left",
1738
+ "fat-corner-down-right",
1739
+ "fat-corner-left-down",
1740
+ "fat-corner-left-up",
1741
+ "fat-corner-right-down",
1742
+ "fat-corner-right-up",
1743
+ "fat-corner-up-left",
1744
+ "fat-corner-up-right",
1745
+ "female",
1746
+ "file-check",
1747
+ "file-minus",
1748
+ "file-plus",
1749
+ "file-text",
1750
+ "file-x",
1751
+ "file",
1752
+ "film",
1753
+ "filter-one",
1754
+ "filter",
1755
+ "fine-tune",
1756
+ "fire",
1757
+ "five-circle",
1758
+ "five-diamond",
1759
+ "five-hexagon",
1760
+ "five-octagon",
1761
+ "five-square",
1762
+ "five-waves",
1763
+ "five",
1764
+ "flag-one",
1765
+ "flag",
1766
+ "flame-kindling",
1767
+ "flame",
1768
+ "flask",
1769
+ "flower-2",
1770
+ "flower",
1771
+ "folder-check",
1772
+ "folder-heart",
1773
+ "folder-kanban",
1774
+ "folder-minus",
1775
+ "folder-one",
1776
+ "folder-plus",
1777
+ "folder-slash",
1778
+ "folder-two",
1779
+ "folder-x",
1780
+ "folder",
1781
+ "forward-circle",
1782
+ "forward-diamond",
1783
+ "forward-hexagon",
1784
+ "forward-octagon",
1785
+ "forward-square",
1786
+ "forward-waves",
1787
+ "forward",
1788
+ "four-circle",
1789
+ "four-diamond",
1790
+ "four-hexagon",
1791
+ "four-octagon",
1792
+ "four-square",
1793
+ "four-waves",
1794
+ "four",
1795
+ "frame",
1796
+ "funny-circle",
1797
+ "funny-ghost",
1798
+ "funny-square",
1799
+ "gift",
1800
+ "git-branch",
1801
+ "git-circle",
1802
+ "git-commit",
1803
+ "git-diamond",
1804
+ "git-diff",
1805
+ "git-hexagon",
1806
+ "git-merge",
1807
+ "git-octagon",
1808
+ "git-pull-request",
1809
+ "git-square",
1810
+ "git-waves",
1811
+ "glasses",
1812
+ "globe",
1813
+ "grid-one",
1814
+ "grid",
1815
+ "hand",
1816
+ "hard-drive",
1817
+ "hash-circle",
1818
+ "hash-diamond",
1819
+ "hash-hexagon",
1820
+ "hash-octagon",
1821
+ "hash-square",
1822
+ "hash-waves",
1823
+ "hash",
1824
+ "haze",
1825
+ "heading-five",
1826
+ "heading-four",
1827
+ "heading-one",
1828
+ "heading-six",
1829
+ "heading-three",
1830
+ "heading-two",
1831
+ "heading",
1832
+ "headphones",
1833
+ "heart-broken",
1834
+ "heart-check",
1835
+ "heart-circle",
1836
+ "heart-diamond",
1837
+ "heart-dot",
1838
+ "heart-hexagon",
1839
+ "heart-home",
1840
+ "heart-minus",
1841
+ "heart-octagon",
1842
+ "heart-plus",
1843
+ "heart-slash",
1844
+ "heart-snooze",
1845
+ "heart-square",
1846
+ "heart-user",
1847
+ "heart-waves",
1848
+ "heart-x",
1849
+ "heart",
1850
+ "hexagon",
1851
+ "home-check",
1852
+ "home-minus",
1853
+ "home-plus",
1854
+ "home-smile",
1855
+ "home-x",
1856
+ "home",
1857
+ "image-circle",
1858
+ "image-rectangle",
1859
+ "image",
1860
+ "inbox-archive",
1861
+ "inbox-check",
1862
+ "inbox-down",
1863
+ "inbox-minus",
1864
+ "inbox-plus",
1865
+ "inbox-up",
1866
+ "inbox-x",
1867
+ "inbox",
1868
+ "incognito",
1869
+ "indifferent-circle",
1870
+ "indifferent-ghost",
1871
+ "indifferent-square",
1872
+ "infinity",
1873
+ "info-circle",
1874
+ "info-diamond",
1875
+ "info-hexagon",
1876
+ "info-octagon",
1877
+ "info-square",
1878
+ "info-triangle",
1879
+ "info-waves",
1880
+ "info",
1881
+ "intersect",
1882
+ "kanban",
1883
+ "key",
1884
+ "keyboard-brightness-high",
1885
+ "keyboard-brightness-low",
1886
+ "keyboard",
1887
+ "label",
1888
+ "lamp",
1889
+ "layers-one",
1890
+ "layers-three",
1891
+ "layers-two",
1892
+ "layout",
1893
+ "leaf",
1894
+ "leaves",
1895
+ "letter-a-circle",
1896
+ "letter-a-diamond",
1897
+ "letter-a-hexagon",
1898
+ "letter-a-octagon",
1899
+ "letter-a-square",
1900
+ "letter-a-waves",
1901
+ "letter-a",
1902
+ "letter-b-circle",
1903
+ "letter-b-diamond",
1904
+ "letter-b-hexagon",
1905
+ "letter-b-octagon",
1906
+ "letter-b-square",
1907
+ "letter-b-waves",
1908
+ "letter-b",
1909
+ "letter-c-circle",
1910
+ "letter-c-diamond",
1911
+ "letter-c-hexagon",
1912
+ "letter-c-octagon",
1913
+ "letter-c-square",
1914
+ "letter-c-waves",
1915
+ "letter-c",
1916
+ "letter-d-circle",
1917
+ "letter-d-diamond",
1918
+ "letter-d-hexagon",
1919
+ "letter-d-octagon",
1920
+ "letter-d-square",
1921
+ "letter-d-waves",
1922
+ "letter-d",
1923
+ "letter-e-circle",
1924
+ "letter-e-diamond",
1925
+ "letter-e-hexagon",
1926
+ "letter-e-octagon",
1927
+ "letter-e-square",
1928
+ "letter-e-waves",
1929
+ "letter-e",
1930
+ "letter-f-circle",
1931
+ "letter-f-diamond",
1932
+ "letter-f-hexagon",
1933
+ "letter-f-octagon",
1934
+ "letter-f-square",
1935
+ "letter-f-waves",
1936
+ "letter-f",
1937
+ "letter-g-circle",
1938
+ "letter-g-diamond",
1939
+ "letter-g-hexagon",
1940
+ "letter-g-octagon",
1941
+ "letter-g-square",
1942
+ "letter-g-waves",
1943
+ "letter-g",
1944
+ "letter-h-circle",
1945
+ "letter-h-diamond",
1946
+ "letter-h-hexagon",
1947
+ "letter-h-octagon",
1948
+ "letter-h-square",
1949
+ "letter-h-waves",
1950
+ "letter-h",
1951
+ "letter-i-circle",
1952
+ "letter-i-diamond",
1953
+ "letter-i-hexagon",
1954
+ "letter-i-octagon",
1955
+ "letter-i-square",
1956
+ "letter-i-waves",
1957
+ "letter-i",
1958
+ "letter-j-circle",
1959
+ "letter-j-diamond",
1960
+ "letter-j-hexagon",
1961
+ "letter-j-octagon",
1962
+ "letter-j-square",
1963
+ "letter-j-waves",
1964
+ "letter-j",
1965
+ "letter-k-circle",
1966
+ "letter-k-diamond",
1967
+ "letter-k-hexagon",
1968
+ "letter-k-octagon",
1969
+ "letter-k-square",
1970
+ "letter-k-waves",
1971
+ "letter-k",
1972
+ "letter-l-circle",
1973
+ "letter-l-diamond",
1974
+ "letter-l-hexagon",
1975
+ "letter-l-octagon",
1976
+ "letter-l-square",
1977
+ "letter-l-waves",
1978
+ "letter-l",
1979
+ "letter-m-circle",
1980
+ "letter-m-diamond",
1981
+ "letter-m-hexagon",
1982
+ "letter-m-octagon",
1983
+ "letter-m-square",
1984
+ "letter-m-waves",
1985
+ "letter-m",
1986
+ "letter-n-circle",
1987
+ "letter-n-diamond",
1988
+ "letter-n-hexagon",
1989
+ "letter-n-octagon",
1990
+ "letter-n-square",
1991
+ "letter-n-waves",
1992
+ "letter-n",
1993
+ "letter-o-circle",
1994
+ "letter-o-diamond",
1995
+ "letter-o-hexagon",
1996
+ "letter-o-octagon",
1997
+ "letter-o-square",
1998
+ "letter-o-waves",
1999
+ "letter-o",
2000
+ "letter-p-circle",
2001
+ "letter-p-diamond",
2002
+ "letter-p-hexagon",
2003
+ "letter-p-octagon",
2004
+ "letter-p-square",
2005
+ "letter-p-waves",
2006
+ "letter-p",
2007
+ "letter-q-circle",
2008
+ "letter-q-diamond",
2009
+ "letter-q-hexagon",
2010
+ "letter-q-octagon",
2011
+ "letter-q-square",
2012
+ "letter-q-waves",
2013
+ "letter-q",
2014
+ "letter-r-circle",
2015
+ "letter-r-diamond",
2016
+ "letter-r-hexagon",
2017
+ "letter-r-octagon",
2018
+ "letter-r-square",
2019
+ "letter-r-waves",
2020
+ "letter-r",
2021
+ "letter-s-circle",
2022
+ "letter-s-diamond",
2023
+ "letter-s-hexagon",
2024
+ "letter-s-octagon",
2025
+ "letter-s-square",
2026
+ "letter-s-waves",
2027
+ "letter-s",
2028
+ "letter-t-circle",
2029
+ "letter-t-diamond",
2030
+ "letter-t-hexagon",
2031
+ "letter-t-octagon",
2032
+ "letter-t-square",
2033
+ "letter-t-waves",
2034
+ "letter-t",
2035
+ "letter-u-circle",
2036
+ "letter-u-diamond",
2037
+ "letter-u-hexagon",
2038
+ "letter-u-octagon",
2039
+ "letter-u-square",
2040
+ "letter-u-waves",
2041
+ "letter-u",
2042
+ "letter-v-circle",
2043
+ "letter-v-diamond",
2044
+ "letter-v-hexagon",
2045
+ "letter-v-octagon",
2046
+ "letter-v-square",
2047
+ "letter-v-waves",
2048
+ "letter-v",
2049
+ "letter-w-circle",
2050
+ "letter-w-diamond",
2051
+ "letter-w-hexagon",
2052
+ "letter-w-octagon",
2053
+ "letter-w-square",
2054
+ "letter-w-waves",
2055
+ "letter-w",
2056
+ "letter-x-circle",
2057
+ "letter-x-diamond",
2058
+ "letter-x-hexagon",
2059
+ "letter-x-octagon",
2060
+ "letter-x-square",
2061
+ "letter-x-waves",
2062
+ "letter-x",
2063
+ "letter-y-circle",
2064
+ "letter-y-diamond",
2065
+ "letter-y-hexagon",
2066
+ "letter-y-octagon",
2067
+ "letter-y-square",
2068
+ "letter-y-waves",
2069
+ "letter-y",
2070
+ "letter-z-circle",
2071
+ "letter-z-diamond",
2072
+ "letter-z-hexagon",
2073
+ "letter-z-octagon",
2074
+ "letter-z-square",
2075
+ "letter-z-waves",
2076
+ "letter-z",
2077
+ "lightning-off",
2078
+ "lightning",
2079
+ "like",
2080
+ "line-chart-circle",
2081
+ "line-chart-diamond",
2082
+ "line-chart-hexagon",
2083
+ "line-chart-octagon",
2084
+ "line-chart-square",
2085
+ "line-chart-waves",
2086
+ "link-one",
2087
+ "link-two",
2088
+ "link",
2089
+ "list-check",
2090
+ "list-number",
2091
+ "list",
2092
+ "location-check",
2093
+ "location-home",
2094
+ "location-minus",
2095
+ "location-plus",
2096
+ "location-selected",
2097
+ "location-slash",
2098
+ "location-snooze",
2099
+ "location-user",
2100
+ "location-x",
2101
+ "location",
2102
+ "lock-circle",
2103
+ "lock-diamond",
2104
+ "lock-hexagon",
2105
+ "lock-keyhole",
2106
+ "lock-octagon",
2107
+ "lock-open-keyhole",
2108
+ "lock-open-password",
2109
+ "lock-open",
2110
+ "lock-password",
2111
+ "lock-square",
2112
+ "lock-waves",
2113
+ "lock",
2114
+ "login",
2115
+ "logout",
2116
+ "magnet",
2117
+ "male",
2118
+ "map",
2119
+ "mask",
2120
+ "math-square",
2121
+ "math",
2122
+ "maximize-one",
2123
+ "maximize",
2124
+ "menu",
2125
+ "message-check",
2126
+ "message-dots",
2127
+ "message-minus",
2128
+ "message-plus",
2129
+ "message-reply",
2130
+ "message-x",
2131
+ "message",
2132
+ "microphone-slash",
2133
+ "microphone",
2134
+ "minimize-one",
2135
+ "minimize",
2136
+ "minus-circle",
2137
+ "minus-diamond",
2138
+ "minus-hexagon",
2139
+ "minus-octagon",
2140
+ "minus-square",
2141
+ "minus-waves",
2142
+ "minus",
2143
+ "mobile-signal-five",
2144
+ "mobile-signal-four",
2145
+ "mobile-signal-one",
2146
+ "mobile-signal-three",
2147
+ "mobile-signal-two",
2148
+ "mobile",
2149
+ "moon-star",
2150
+ "moon",
2151
+ "mountain-snow",
2152
+ "mountain",
2153
+ "mouse-pointer",
2154
+ "move-diagonal-one",
2155
+ "move-diagonal",
2156
+ "move-horizontal",
2157
+ "move-vertical",
2158
+ "move",
2159
+ "music-circle",
2160
+ "music-diamond",
2161
+ "music-hexagon",
2162
+ "music-octagon",
2163
+ "music-square",
2164
+ "music-waves",
2165
+ "music",
2166
+ "myna",
2167
+ "navigation-one",
2168
+ "navigation",
2169
+ "nine-circle",
2170
+ "nine-diamond",
2171
+ "nine-hexagon",
2172
+ "nine-octagon",
2173
+ "nine-square",
2174
+ "nine-waves",
2175
+ "nine",
2176
+ "notification",
2177
+ "octagon",
2178
+ "one-circle",
2179
+ "one-diamond",
2180
+ "one-hexagon",
2181
+ "one-octagon",
2182
+ "one-square",
2183
+ "one-waves",
2184
+ "one",
2185
+ "option",
2186
+ "package",
2187
+ "paint",
2188
+ "panel-bottom-close",
2189
+ "panel-bottom-inactive",
2190
+ "panel-bottom-open",
2191
+ "panel-bottom",
2192
+ "panel-left-close",
2193
+ "panel-left-inactive",
2194
+ "panel-left-open",
2195
+ "panel-left",
2196
+ "panel-right-close",
2197
+ "panel-right-inactive",
2198
+ "panel-right-open",
2199
+ "panel-right",
2200
+ "panel-top-close",
2201
+ "panel-top-inactive",
2202
+ "panel-top-open",
2203
+ "panel-top",
2204
+ "paperclip",
2205
+ "parking",
2206
+ "password",
2207
+ "path",
2208
+ "pause-circle",
2209
+ "pause-diamond",
2210
+ "pause-hexagon",
2211
+ "pause-octagon",
2212
+ "pause-square",
2213
+ "pause-waves",
2214
+ "pause",
2215
+ "pen",
2216
+ "pencil",
2217
+ "percentage-circle",
2218
+ "percentage-diamond",
2219
+ "percentage-hexagon",
2220
+ "percentage-octagon",
2221
+ "percentage-square",
2222
+ "percentage-waves",
2223
+ "percentage",
2224
+ "pin",
2225
+ "pizza",
2226
+ "planet",
2227
+ "play-circle",
2228
+ "play-diamond",
2229
+ "play-hexagon",
2230
+ "play-octagon",
2231
+ "play-square",
2232
+ "play-waves",
2233
+ "play",
2234
+ "plus-circle",
2235
+ "plus-diamond",
2236
+ "plus-hexagon",
2237
+ "plus-octagon",
2238
+ "plus-square",
2239
+ "plus-waves",
2240
+ "plus",
2241
+ "pokeball",
2242
+ "power",
2243
+ "presentation",
2244
+ "printer",
2245
+ "puzzle",
2246
+ "question-circle",
2247
+ "question-diamond",
2248
+ "question-hexagon",
2249
+ "question-octagon",
2250
+ "question-square",
2251
+ "question-waves",
2252
+ "question",
2253
+ "radio",
2254
+ "rainbow",
2255
+ "reception-bell",
2256
+ "record",
2257
+ "rectangle-vertical",
2258
+ "rectangle",
2259
+ "redo",
2260
+ "refresh-alt",
2261
+ "refresh",
2262
+ "repeat",
2263
+ "rewind-circle",
2264
+ "rewind-diamond",
2265
+ "rewind-hexagon",
2266
+ "rewind-octagon",
2267
+ "rewind-square",
2268
+ "rewind-waves",
2269
+ "rewind",
2270
+ "rhombus",
2271
+ "ribbon",
2272
+ "rocket",
2273
+ "room-service",
2274
+ "rows",
2275
+ "rss",
2276
+ "ruler",
2277
+ "rupee-circle",
2278
+ "rupee-diamond",
2279
+ "rupee-hexagon",
2280
+ "rupee-octagon",
2281
+ "rupee-square",
2282
+ "rupee-waves",
2283
+ "rupee",
2284
+ "sad-circle",
2285
+ "sad-ghost",
2286
+ "sad-square",
2287
+ "save",
2288
+ "scan",
2289
+ "scissors",
2290
+ "sea-waves",
2291
+ "search-check",
2292
+ "search-circle",
2293
+ "search-diamond",
2294
+ "search-dot",
2295
+ "search-hexagon",
2296
+ "search-home",
2297
+ "search-minus",
2298
+ "search-octagon",
2299
+ "search-plus",
2300
+ "search-slash",
2301
+ "search-snooze",
2302
+ "search-square",
2303
+ "search-user",
2304
+ "search-waves",
2305
+ "search-x",
2306
+ "search",
2307
+ "select-multiple",
2308
+ "send",
2309
+ "servers",
2310
+ "seven-circle",
2311
+ "seven-diamond",
2312
+ "seven-hexagon",
2313
+ "seven-octagon",
2314
+ "seven-square",
2315
+ "seven-waves",
2316
+ "seven",
2317
+ "share",
2318
+ "shell",
2319
+ "shield-check",
2320
+ "shield-crossed",
2321
+ "shield-minus",
2322
+ "shield-one",
2323
+ "shield-plus",
2324
+ "shield-slash",
2325
+ "shield-two",
2326
+ "shield-x",
2327
+ "shield",
2328
+ "shooting-star",
2329
+ "shopping-bag",
2330
+ "shovel",
2331
+ "shrub",
2332
+ "shuffle-alt",
2333
+ "shuffle",
2334
+ "sidebar-alt",
2335
+ "sidebar",
2336
+ "signal-circle",
2337
+ "signal-diamond",
2338
+ "signal-hexagon",
2339
+ "signal-octagon",
2340
+ "signal-square",
2341
+ "signal-waves",
2342
+ "signal",
2343
+ "six-circle",
2344
+ "six-diamond",
2345
+ "six-hexagon",
2346
+ "six-octagon",
2347
+ "six-square",
2348
+ "six-waves",
2349
+ "six",
2350
+ "skip-back",
2351
+ "skip-forward",
2352
+ "slash-circle",
2353
+ "slash-diamond",
2354
+ "slash-hexagon",
2355
+ "slash-octagon",
2356
+ "slash-square",
2357
+ "slash-waves",
2358
+ "smile-circle",
2359
+ "smile-ghost",
2360
+ "smile-square",
2361
+ "snow",
2362
+ "snowflake",
2363
+ "sofa",
2364
+ "sort",
2365
+ "sparkles",
2366
+ "speaker",
2367
+ "spinner-one",
2368
+ "spinner",
2369
+ "sprout",
2370
+ "square-chart-gantt",
2371
+ "square-dashed-kanban",
2372
+ "square-dashed",
2373
+ "square-half",
2374
+ "square-kanban",
2375
+ "square",
2376
+ "star",
2377
+ "stop-circle",
2378
+ "stop-diamond",
2379
+ "stop-hexagon",
2380
+ "stop-octagon",
2381
+ "stop-square",
2382
+ "stop-waves",
2383
+ "stop",
2384
+ "store",
2385
+ "subtract",
2386
+ "sun-dim",
2387
+ "sun-medium",
2388
+ "sun-snow",
2389
+ "sun",
2390
+ "sunrise",
2391
+ "sunset",
2392
+ "support",
2393
+ "swatches",
2394
+ "table",
2395
+ "tablet",
2396
+ "tag-plus",
2397
+ "tag",
2398
+ "tally-five",
2399
+ "tally-four",
2400
+ "tally-one",
2401
+ "tally-three",
2402
+ "tally-two",
2403
+ "target",
2404
+ "telephone-call",
2405
+ "telephone-forward",
2406
+ "telephone-in",
2407
+ "telephone-missed",
2408
+ "telephone-out",
2409
+ "telephone-slash",
2410
+ "telephone",
2411
+ "tent-tree",
2412
+ "tent",
2413
+ "terminal",
2414
+ "text-align-center",
2415
+ "text-align-left",
2416
+ "text-align-right",
2417
+ "text-justify",
2418
+ "thermometer-snowflake",
2419
+ "thermometer-sun",
2420
+ "thermometer",
2421
+ "three-circle",
2422
+ "three-diamond",
2423
+ "three-hexagon",
2424
+ "three-octagon",
2425
+ "three-square",
2426
+ "three-waves",
2427
+ "three",
2428
+ "ticket-slash",
2429
+ "ticket",
2430
+ "toggle-left",
2431
+ "toggle-right",
2432
+ "tool",
2433
+ "tornado",
2434
+ "train",
2435
+ "trash-one",
2436
+ "trash-two",
2437
+ "trash",
2438
+ "tree-deciduous",
2439
+ "tree-palm",
2440
+ "tree-pine",
2441
+ "tree",
2442
+ "trees",
2443
+ "trending-down",
2444
+ "trending-up-down",
2445
+ "trending-up",
2446
+ "triangle",
2447
+ "truck",
2448
+ "tv",
2449
+ "two-circle",
2450
+ "two-diamond",
2451
+ "two-hexagon",
2452
+ "two-octagon",
2453
+ "two-square",
2454
+ "two-waves",
2455
+ "two",
2456
+ "type-bold",
2457
+ "type-italic",
2458
+ "type-text",
2459
+ "type-underline",
2460
+ "umbrella-off",
2461
+ "umbrella",
2462
+ "undo",
2463
+ "union",
2464
+ "unlink",
2465
+ "upload",
2466
+ "user-check",
2467
+ "user-circle",
2468
+ "user-diamond",
2469
+ "user-hexagon",
2470
+ "user-minus",
2471
+ "user-octagon",
2472
+ "user-plus",
2473
+ "user-settings",
2474
+ "user-square",
2475
+ "user-waves",
2476
+ "user-x",
2477
+ "user",
2478
+ "users-group",
2479
+ "users",
2480
+ "video-slash",
2481
+ "video",
2482
+ "volume-check",
2483
+ "volume-high",
2484
+ "volume-low",
2485
+ "volume-minus",
2486
+ "volume-none",
2487
+ "volume-plus",
2488
+ "volume-slash",
2489
+ "volume-x",
2490
+ "watch",
2491
+ "waves",
2492
+ "webcam",
2493
+ "wheel",
2494
+ "wheelchair",
2495
+ "wifi-check",
2496
+ "wifi-low",
2497
+ "wifi-medium",
2498
+ "wifi-minus",
2499
+ "wifi-plus",
2500
+ "wifi-slash",
2501
+ "wifi-x",
2502
+ "wifi",
2503
+ "wind-arrow-down",
2504
+ "wind",
2505
+ "winds",
2506
+ "wine",
2507
+ "wink-circle",
2508
+ "wink-ghost",
2509
+ "wink-square",
2510
+ "wrench",
2511
+ "x-circle",
2512
+ "x-diamond",
2513
+ "x-hexagon",
2514
+ "x-octagon",
2515
+ "x-square",
2516
+ "x-triangle",
2517
+ "x-waves",
2518
+ "x",
2519
+ "yen-circle",
2520
+ "yen-diamond",
2521
+ "yen-hexagon",
2522
+ "yen-octagon",
2523
+ "yen-square",
2524
+ "yen-waves",
2525
+ "yen",
2526
+ "zap-off",
2527
+ "zap",
2528
+ "zero-circle",
2529
+ "zero-diamond",
2530
+ "zero-hexagon",
2531
+ "zero-octagon",
2532
+ "zero-square",
2533
+ "zero-waves",
2534
+ "zero"
2535
+ ];
2536
+ function getIconByAttrType(attributeType) {
2537
+ switch (attributeType) {
2538
+ case "text":
2539
+ return "text-align-left";
2540
+ case "textarea":
2541
+ return "text-align-left";
2542
+ case "number":
2543
+ return "hash";
2544
+ case "checkbox":
2545
+ return "check-square";
2546
+ case "select":
2547
+ return "list";
2548
+ case "status":
2549
+ return "list";
2550
+ case "multiselect":
2551
+ return "list-check";
2552
+ case "date":
2553
+ return "calendar";
2554
+ case "currency":
2555
+ return "dollar";
2556
+ case "phone":
2557
+ return "telephone";
2558
+ case "rating":
2559
+ return "star";
2560
+ case "file":
2561
+ return "file";
2562
+ case "location":
2563
+ return "map";
2564
+ case "relation":
2565
+ return "link";
2566
+ case "timestamp":
2567
+ return "calendar";
2568
+ case "user":
2569
+ return "user";
2570
+ default:
2571
+ return void 0;
2572
+ }
2573
+ }
2574
+
2575
+ // src/mimeTypes.ts
2576
+ var IMAGE_MIME_TYPES = {
2577
+ JPEG: "image/jpeg",
2578
+ PNG: "image/png",
2579
+ GIF: "image/gif",
2580
+ WEBP: "image/webp",
2581
+ SVG: "image/svg+xml",
2582
+ BMP: "image/bmp",
2583
+ TIFF: "image/tiff",
2584
+ ICO: "image/x-icon",
2585
+ HEIC: "image/heic",
2586
+ HEIF: "image/heif"
2587
+ };
2588
+ var IMAGE_MIME_TYPES_ARRAY = Object.values(IMAGE_MIME_TYPES);
2589
+ var DOCUMENT_MIME_TYPES = {
2590
+ PDF: "application/pdf",
2591
+ DOC: "application/msword",
2592
+ DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
2593
+ XLS: "application/vnd.ms-excel",
2594
+ XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
2595
+ PPT: "application/vnd.ms-powerpoint",
2596
+ PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
2597
+ ODT: "application/vnd.oasis.opendocument.text",
2598
+ ODS: "application/vnd.oasis.opendocument.spreadsheet",
2599
+ ODP: "application/vnd.oasis.opendocument.presentation",
2600
+ RTF: "application/rtf",
2601
+ TXT: "text/plain",
2602
+ CSV: "text/csv",
2603
+ MARKDOWN: "text/markdown"
2604
+ };
2605
+ var DOCUMENT_MIME_TYPES_ARRAY = Object.values(DOCUMENT_MIME_TYPES);
2606
+ var ARCHIVE_MIME_TYPES = {
2607
+ ZIP: "application/zip",
2608
+ RAR: "application/vnd.rar",
2609
+ TAR: "application/x-tar",
2610
+ GZIP: "application/gzip",
2611
+ "7Z": "application/x-7z-compressed",
2612
+ BZ2: "application/x-bzip2"
2613
+ };
2614
+ var ARCHIVE_MIME_TYPES_ARRAY = Object.values(ARCHIVE_MIME_TYPES);
2615
+ var AUDIO_MIME_TYPES = {
2616
+ MP3: "audio/mpeg",
2617
+ WAV: "audio/wav",
2618
+ OGG: "audio/ogg",
2619
+ AAC: "audio/aac",
2620
+ FLAC: "audio/flac",
2621
+ M4A: "audio/mp4",
2622
+ WEBM: "audio/webm"
2623
+ };
2624
+ var AUDIO_MIME_TYPES_ARRAY = Object.values(AUDIO_MIME_TYPES);
2625
+ var VIDEO_MIME_TYPES = {
2626
+ MP4: "video/mp4",
2627
+ WEBM: "video/webm",
2628
+ OGG: "video/ogg",
2629
+ AVI: "video/x-msvideo",
2630
+ MOV: "video/quicktime",
2631
+ MKV: "video/x-matroska",
2632
+ FLV: "video/x-flv",
2633
+ WMV: "video/x-ms-wmv",
2634
+ MPEG: "video/mpeg"
2635
+ };
2636
+ var VIDEO_MIME_TYPES_ARRAY = Object.values(VIDEO_MIME_TYPES);
2637
+ var CODE_MIME_TYPES = {
2638
+ JAVASCRIPT: "text/javascript",
2639
+ TYPESCRIPT: "text/typescript",
2640
+ JSON: "application/json",
2641
+ XML: "application/xml",
2642
+ HTML: "text/html",
2643
+ CSS: "text/css",
2644
+ PYTHON: "text/x-python",
2645
+ JAVA: "text/x-java-source",
2646
+ C: "text/x-c",
2647
+ CPP: "text/x-c++",
2648
+ YAML: "application/x-yaml",
2649
+ SQL: "application/sql"
2650
+ };
2651
+ var CODE_MIME_TYPES_ARRAY = Object.values(CODE_MIME_TYPES);
2652
+ var FONT_MIME_TYPES = {
2653
+ TTF: "font/ttf",
2654
+ OTF: "font/otf",
2655
+ WOFF: "font/woff",
2656
+ WOFF2: "font/woff2",
2657
+ EOT: "application/vnd.ms-fontobject"
2658
+ };
2659
+ var FONT_MIME_TYPES_ARRAY = Object.values(FONT_MIME_TYPES);
2660
+ var OTHER_MIME_TYPES = {
2661
+ BINARY: "application/octet-stream",
2662
+ FORM_DATA: "multipart/form-data",
2663
+ JSON_LD: "application/ld+json",
2664
+ XHTML: "application/xhtml+xml"
2665
+ };
2666
+ var IMAGES = IMAGE_MIME_TYPES_ARRAY;
2667
+ var DOCUMENTS = DOCUMENT_MIME_TYPES_ARRAY;
2668
+ var ARCHIVES = ARCHIVE_MIME_TYPES_ARRAY;
2669
+ var AUDIO = AUDIO_MIME_TYPES_ARRAY;
2670
+ var VIDEO = VIDEO_MIME_TYPES_ARRAY;
2671
+ var CODE = CODE_MIME_TYPES_ARRAY;
2672
+ var FONTS = FONT_MIME_TYPES_ARRAY;
2673
+ var WEB_IMAGES = [
2674
+ IMAGE_MIME_TYPES.JPEG,
2675
+ IMAGE_MIME_TYPES.PNG,
2676
+ IMAGE_MIME_TYPES.GIF,
2677
+ IMAGE_MIME_TYPES.WEBP
2678
+ ];
2679
+ var OFFICE_DOCUMENTS = [
2680
+ DOCUMENT_MIME_TYPES.PDF,
2681
+ DOCUMENT_MIME_TYPES.DOC,
2682
+ DOCUMENT_MIME_TYPES.DOCX,
2683
+ DOCUMENT_MIME_TYPES.XLS,
2684
+ DOCUMENT_MIME_TYPES.XLSX,
2685
+ DOCUMENT_MIME_TYPES.PPT,
2686
+ DOCUMENT_MIME_TYPES.PPTX
2687
+ ];
2688
+ var MEDIA = [...IMAGES, ...AUDIO, ...VIDEO];
2689
+ var ALL_MIME_TYPES = [
2690
+ ...IMAGES,
2691
+ ...DOCUMENTS,
2692
+ ...ARCHIVES,
2693
+ ...AUDIO,
2694
+ ...VIDEO,
2695
+ ...CODE,
2696
+ ...FONTS,
2697
+ ...Object.values(OTHER_MIME_TYPES)
2698
+ ];
2699
+ var isImageMimeType = (mimeType) => {
2700
+ return IMAGES.includes(mimeType);
2701
+ };
2702
+ var isDocumentMimeType = (mimeType) => {
2703
+ return DOCUMENTS.includes(mimeType);
2704
+ };
2705
+ var isArchiveMimeType = (mimeType) => {
2706
+ return ARCHIVES.includes(mimeType);
2707
+ };
2708
+ var isAudioMimeType = (mimeType) => {
2709
+ return AUDIO.includes(mimeType);
2710
+ };
2711
+ var isVideoMimeType = (mimeType) => {
2712
+ return VIDEO.includes(mimeType);
2713
+ };
2714
+ var isCodeMimeType = (mimeType) => {
2715
+ return CODE.includes(mimeType);
2716
+ };
2717
+ var getExtensionFromMimeType = (mimeType) => {
2718
+ const mimeToExt = {
2719
+ // Images
2720
+ "image/jpeg": "jpg",
2721
+ "image/png": "png",
2722
+ "image/gif": "gif",
2723
+ "image/webp": "webp",
2724
+ "image/svg+xml": "svg",
2725
+ // Documents
2726
+ "application/pdf": "pdf",
2727
+ "application/msword": "doc",
2728
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
2729
+ "application/vnd.ms-excel": "xls",
2730
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx",
2731
+ // Archives
2732
+ "application/zip": "zip",
2733
+ "application/vnd.rar": "rar",
2734
+ // Audio
2735
+ "audio/mpeg": "mp3",
2736
+ "audio/wav": "wav",
2737
+ // Video
2738
+ "video/mp4": "mp4",
2739
+ "video/webm": "webm",
2740
+ // Text
2741
+ "text/plain": "txt",
2742
+ "text/csv": "csv",
2743
+ "application/json": "json"
2744
+ };
2745
+ return mimeToExt[mimeType] || null;
2746
+ };
2747
+ // Annotate the CommonJS export names for ESM import in node:
2748
+ 0 && (module.exports = {
2749
+ ALL_MIME_TYPES,
2750
+ ARCHIVES,
2751
+ ARCHIVE_MIME_TYPES,
2752
+ ARCHIVE_MIME_TYPES_ARRAY,
2753
+ AUDIO,
2754
+ AUDIO_MIME_TYPES,
2755
+ AUDIO_MIME_TYPES_ARRAY,
2756
+ BYTES,
2757
+ CODE,
2758
+ CODE_MIME_TYPES,
2759
+ CODE_MIME_TYPES_ARRAY,
2760
+ COLORS,
2761
+ COLOR_GROUPS,
2762
+ COUNTRIES,
2763
+ CURRENCIES,
2764
+ DEFAULT_ATTRIBUTE_ICONS,
2765
+ DOCUMENTS,
2766
+ DOCUMENT_MIME_TYPES,
2767
+ DOCUMENT_MIME_TYPES_ARRAY,
2768
+ FILE_SIZE,
2769
+ FONTS,
2770
+ FONT_MIME_TYPES,
2771
+ FONT_MIME_TYPES_ARRAY,
2772
+ GIGABYTES,
2773
+ ICONS,
2774
+ IMAGES,
2775
+ IMAGE_MIME_TYPES,
2776
+ IMAGE_MIME_TYPES_ARRAY,
2777
+ KILOBYTES,
2778
+ MEDIA,
2779
+ MEGABYTES,
2780
+ OFFICE_DOCUMENTS,
2781
+ OTHER_MIME_TYPES,
2782
+ RECOMMENDED_MAX_SIZES,
2783
+ STATUS_COLORS,
2784
+ VIDEO,
2785
+ VIDEO_MIME_TYPES,
2786
+ VIDEO_MIME_TYPES_ARRAY,
2787
+ WEB_IMAGES,
2788
+ bytesToGb,
2789
+ bytesToMb,
2790
+ formatBytes,
2791
+ gbToBytes,
2792
+ getAllColors,
2793
+ getAllCountries,
2794
+ getAllCurrencies,
2795
+ getColor,
2796
+ getColorIds,
2797
+ getColorsByGroup,
2798
+ getCountryByIso2,
2799
+ getCountryByIso3,
2800
+ getCountryPhoneCode,
2801
+ getCurrency,
2802
+ getCurrencySymbol,
2803
+ getDefaultAttributeIcon,
2804
+ getExtensionFromMimeType,
2805
+ getIconByAttrType,
2806
+ getPhoneMaxDigits,
2807
+ getPhoneTrunkPrefix,
2808
+ isArchiveMimeType,
2809
+ isAudioMimeType,
2810
+ isCodeMimeType,
2811
+ isDocumentMimeType,
2812
+ isImageMimeType,
2813
+ isValidColorId,
2814
+ isValidCurrencyCode,
2815
+ isValidIso2,
2816
+ isValidIso3,
2817
+ isVideoMimeType,
2818
+ isWithinSizeLimit,
2819
+ mbToBytes
2820
+ });