nhb-toolbox 4.10.91 → 4.10.93
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.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +86 -64
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +86 -64
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -309,7 +309,7 @@ declare const CURRENCY_CODES: readonly ["AED", "AFN", "ALL", "AMD", "ANG", "AOA"
|
|
|
309
309
|
/** List of all supported BCP 47 locales */
|
|
310
310
|
declare const LOCALE_CODES: readonly ["af-ZA", "am-ET", "ar-AE", "ar-BH", "ar-DZ", "ar-EG", "ar-IQ", "ar-JO", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-OM", "ar-QA", "ar-SA", "ar-SD", "ar-SY", "ar-TN", "ar-YE", "az-AZ", "be-BY", "bg-BG", "bn-BD", "bn-IN", "bs-BA", "ca-ES", "cs-CZ", "cy-GB", "da-DK", "de-AT", "de-CH", "de-DE", "el-GR", "en-AU", "en-CA", "en-GB", "en-IE", "en-IN", "en-NZ", "en-PH", "en-SG", "en-US", "en-ZA", "es-AR", "es-BO", "es-CL", "es-CO", "es-CR", "es-DO", "es-EC", "es-ES", "es-GT", "es-HN", "es-MX", "es-NI", "es-PA", "es-PE", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et-EE", "eu-ES", "fa-IR", "fi-FI", "fil-PH", "fr-BE", "fr-CA", "fr-CH", "fr-FR", "ga-IE", "gl-ES", "gu-IN", "he-IL", "hi-IN", "hr-HR", "hu-HU", "hy-AM", "id-ID", "is-IS", "it-CH", "it-IT", "ja-JP", "ka-GE", "kk-KZ", "km-KH", "kn-IN", "ko-KR", "ky-KG", "lt-LT", "lv-LV", "mk-MK", "ml-IN", "mn-MN", "mr-IN", "ms-MY", "mt-MT", "nb-NO", "ne-NP", "nl-BE", "nl-NL", "pl-PL", "pt-BR", "pt-PT", "ro-RO", "ru-RU", "sk-SK", "sl-SI", "sq-AL", "sr-Latn", "sv-SE", "sw-KE", "ta-IN", "te-IN", "th-TH", "tr-TR", "uk-UA", "ur-PK", "uz-UZ", "vi-VN", "zh-CN", "zh-HK", "zh-TW"];
|
|
311
311
|
/** Mapping of CurrencyCodes to LocaleCodes */
|
|
312
|
-
declare const CURRENCY_LOCALES: {
|
|
312
|
+
declare const CURRENCY_LOCALES: Readonly<{
|
|
313
313
|
readonly AED: "ar-AE";
|
|
314
314
|
readonly AFN: "fa-IR";
|
|
315
315
|
readonly ALL: "sq-AL";
|
|
@@ -470,11 +470,11 @@ declare const CURRENCY_LOCALES: {
|
|
|
470
470
|
readonly ZAR: "en-ZA";
|
|
471
471
|
readonly ZMW: "en-ZM";
|
|
472
472
|
readonly ZWL: "en-ZW";
|
|
473
|
-
}
|
|
473
|
+
}>;
|
|
474
474
|
/** * Fiat currencies supported by Frankfurter API */
|
|
475
475
|
declare const SUPPORTED_CURRENCIES: readonly ["AUD", "BGN", "BRL", "CAD", "CHF", "CNY", "CZK", "DKK", "EUR", "GBP", "HKD", "HUF", "IDR", "ILS", "INR", "ISK", "JPY", "KRW", "MXN", "MYR", "NOK", "NZD", "PHP", "PLN", "RON", "SEK", "SGD", "THB", "TRY", "USD", "ZAR"];
|
|
476
476
|
/** * Unit names and their full readable labels. */
|
|
477
|
-
declare const UNITS: {
|
|
477
|
+
declare const UNITS: Readonly<{
|
|
478
478
|
readonly m: "Meter";
|
|
479
479
|
readonly km: "Kilometer";
|
|
480
480
|
readonly mi: "Mile";
|
|
@@ -505,9 +505,9 @@ declare const UNITS: {
|
|
|
505
505
|
readonly pa: "Pascal";
|
|
506
506
|
readonly hz: "Hertz";
|
|
507
507
|
readonly khz: "Kilohertz";
|
|
508
|
-
}
|
|
508
|
+
}>;
|
|
509
509
|
/** * Scientific SI Unit prefix multipliers. */
|
|
510
|
-
declare const PREFIX_MULTIPLIERS: {
|
|
510
|
+
declare const PREFIX_MULTIPLIERS: Readonly<{
|
|
511
511
|
readonly y: 1e-24;
|
|
512
512
|
readonly z: 1e-21;
|
|
513
513
|
readonly a: 1e-18;
|
|
@@ -530,7 +530,7 @@ declare const PREFIX_MULTIPLIERS: {
|
|
|
530
530
|
readonly Z: 1e+21;
|
|
531
531
|
readonly Y: 1e+24;
|
|
532
532
|
readonly '': 1;
|
|
533
|
-
}
|
|
533
|
+
}>;
|
|
534
534
|
|
|
535
535
|
/**
|
|
536
536
|
* @class Represents a measurable unit and supports conversions between various types of units.
|
|
@@ -1427,7 +1427,7 @@ declare class Color {
|
|
|
1427
1427
|
|
|
1428
1428
|
declare const PERCENT_VALUES: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100];
|
|
1429
1429
|
|
|
1430
|
-
declare const CSS_COLORS: {
|
|
1430
|
+
declare const CSS_COLORS: Readonly<{
|
|
1431
1431
|
readonly black: "#000000";
|
|
1432
1432
|
readonly silver: "#C0C0C0";
|
|
1433
1433
|
readonly gray: "#808080";
|
|
@@ -1585,7 +1585,7 @@ declare const CSS_COLORS: {
|
|
|
1585
1585
|
readonly info: "#2196F3";
|
|
1586
1586
|
readonly warning: "#FF9800";
|
|
1587
1587
|
readonly error: "#F44336";
|
|
1588
|
-
}
|
|
1588
|
+
}>;
|
|
1589
1589
|
|
|
1590
1590
|
/** - A string, number for generating color. */
|
|
1591
1591
|
type ColorInput = string | number;
|
package/dist/index.d.ts
CHANGED
|
@@ -309,7 +309,7 @@ declare const CURRENCY_CODES: readonly ["AED", "AFN", "ALL", "AMD", "ANG", "AOA"
|
|
|
309
309
|
/** List of all supported BCP 47 locales */
|
|
310
310
|
declare const LOCALE_CODES: readonly ["af-ZA", "am-ET", "ar-AE", "ar-BH", "ar-DZ", "ar-EG", "ar-IQ", "ar-JO", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-OM", "ar-QA", "ar-SA", "ar-SD", "ar-SY", "ar-TN", "ar-YE", "az-AZ", "be-BY", "bg-BG", "bn-BD", "bn-IN", "bs-BA", "ca-ES", "cs-CZ", "cy-GB", "da-DK", "de-AT", "de-CH", "de-DE", "el-GR", "en-AU", "en-CA", "en-GB", "en-IE", "en-IN", "en-NZ", "en-PH", "en-SG", "en-US", "en-ZA", "es-AR", "es-BO", "es-CL", "es-CO", "es-CR", "es-DO", "es-EC", "es-ES", "es-GT", "es-HN", "es-MX", "es-NI", "es-PA", "es-PE", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et-EE", "eu-ES", "fa-IR", "fi-FI", "fil-PH", "fr-BE", "fr-CA", "fr-CH", "fr-FR", "ga-IE", "gl-ES", "gu-IN", "he-IL", "hi-IN", "hr-HR", "hu-HU", "hy-AM", "id-ID", "is-IS", "it-CH", "it-IT", "ja-JP", "ka-GE", "kk-KZ", "km-KH", "kn-IN", "ko-KR", "ky-KG", "lt-LT", "lv-LV", "mk-MK", "ml-IN", "mn-MN", "mr-IN", "ms-MY", "mt-MT", "nb-NO", "ne-NP", "nl-BE", "nl-NL", "pl-PL", "pt-BR", "pt-PT", "ro-RO", "ru-RU", "sk-SK", "sl-SI", "sq-AL", "sr-Latn", "sv-SE", "sw-KE", "ta-IN", "te-IN", "th-TH", "tr-TR", "uk-UA", "ur-PK", "uz-UZ", "vi-VN", "zh-CN", "zh-HK", "zh-TW"];
|
|
311
311
|
/** Mapping of CurrencyCodes to LocaleCodes */
|
|
312
|
-
declare const CURRENCY_LOCALES: {
|
|
312
|
+
declare const CURRENCY_LOCALES: Readonly<{
|
|
313
313
|
readonly AED: "ar-AE";
|
|
314
314
|
readonly AFN: "fa-IR";
|
|
315
315
|
readonly ALL: "sq-AL";
|
|
@@ -470,11 +470,11 @@ declare const CURRENCY_LOCALES: {
|
|
|
470
470
|
readonly ZAR: "en-ZA";
|
|
471
471
|
readonly ZMW: "en-ZM";
|
|
472
472
|
readonly ZWL: "en-ZW";
|
|
473
|
-
}
|
|
473
|
+
}>;
|
|
474
474
|
/** * Fiat currencies supported by Frankfurter API */
|
|
475
475
|
declare const SUPPORTED_CURRENCIES: readonly ["AUD", "BGN", "BRL", "CAD", "CHF", "CNY", "CZK", "DKK", "EUR", "GBP", "HKD", "HUF", "IDR", "ILS", "INR", "ISK", "JPY", "KRW", "MXN", "MYR", "NOK", "NZD", "PHP", "PLN", "RON", "SEK", "SGD", "THB", "TRY", "USD", "ZAR"];
|
|
476
476
|
/** * Unit names and their full readable labels. */
|
|
477
|
-
declare const UNITS: {
|
|
477
|
+
declare const UNITS: Readonly<{
|
|
478
478
|
readonly m: "Meter";
|
|
479
479
|
readonly km: "Kilometer";
|
|
480
480
|
readonly mi: "Mile";
|
|
@@ -505,9 +505,9 @@ declare const UNITS: {
|
|
|
505
505
|
readonly pa: "Pascal";
|
|
506
506
|
readonly hz: "Hertz";
|
|
507
507
|
readonly khz: "Kilohertz";
|
|
508
|
-
}
|
|
508
|
+
}>;
|
|
509
509
|
/** * Scientific SI Unit prefix multipliers. */
|
|
510
|
-
declare const PREFIX_MULTIPLIERS: {
|
|
510
|
+
declare const PREFIX_MULTIPLIERS: Readonly<{
|
|
511
511
|
readonly y: 1e-24;
|
|
512
512
|
readonly z: 1e-21;
|
|
513
513
|
readonly a: 1e-18;
|
|
@@ -530,7 +530,7 @@ declare const PREFIX_MULTIPLIERS: {
|
|
|
530
530
|
readonly Z: 1e+21;
|
|
531
531
|
readonly Y: 1e+24;
|
|
532
532
|
readonly '': 1;
|
|
533
|
-
}
|
|
533
|
+
}>;
|
|
534
534
|
|
|
535
535
|
/**
|
|
536
536
|
* @class Represents a measurable unit and supports conversions between various types of units.
|
|
@@ -1427,7 +1427,7 @@ declare class Color {
|
|
|
1427
1427
|
|
|
1428
1428
|
declare const PERCENT_VALUES: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100];
|
|
1429
1429
|
|
|
1430
|
-
declare const CSS_COLORS: {
|
|
1430
|
+
declare const CSS_COLORS: Readonly<{
|
|
1431
1431
|
readonly black: "#000000";
|
|
1432
1432
|
readonly silver: "#C0C0C0";
|
|
1433
1433
|
readonly gray: "#808080";
|
|
@@ -1585,7 +1585,7 @@ declare const CSS_COLORS: {
|
|
|
1585
1585
|
readonly info: "#2196F3";
|
|
1586
1586
|
readonly warning: "#FF9800";
|
|
1587
1587
|
readonly error: "#F44336";
|
|
1588
|
-
}
|
|
1588
|
+
}>;
|
|
1589
1589
|
|
|
1590
1590
|
/** - A string, number for generating color. */
|
|
1591
1591
|
type ColorInput = string | number;
|
package/dist/index.js
CHANGED
|
@@ -98,7 +98,7 @@ function generateAnagrams(word, limit = 100) {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
// src/string/constants.ts
|
|
101
|
-
var LOWERCASE = [
|
|
101
|
+
var LOWERCASE = /* @__PURE__ */ Object.freeze([
|
|
102
102
|
// Conjunctions
|
|
103
103
|
"and",
|
|
104
104
|
"but",
|
|
@@ -224,7 +224,7 @@ var LOWERCASE = [
|
|
|
224
224
|
"were",
|
|
225
225
|
"will",
|
|
226
226
|
"would"
|
|
227
|
-
];
|
|
227
|
+
]);
|
|
228
228
|
|
|
229
229
|
// src/string/convert.ts
|
|
230
230
|
function convertStringCase(string, format) {
|
|
@@ -407,7 +407,7 @@ function isTruthy(value) {
|
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
// src/number/constants.ts
|
|
410
|
-
var ONES = [
|
|
410
|
+
var ONES = /* @__PURE__ */ Object.freeze([
|
|
411
411
|
"",
|
|
412
412
|
"one",
|
|
413
413
|
"two",
|
|
@@ -418,8 +418,8 @@ var ONES = [
|
|
|
418
418
|
"seven",
|
|
419
419
|
"eight",
|
|
420
420
|
"nine"
|
|
421
|
-
];
|
|
422
|
-
var TEENS = [
|
|
421
|
+
]);
|
|
422
|
+
var TEENS = /* @__PURE__ */ Object.freeze([
|
|
423
423
|
"ten",
|
|
424
424
|
"eleven",
|
|
425
425
|
"twelve",
|
|
@@ -430,8 +430,8 @@ var TEENS = [
|
|
|
430
430
|
"seventeen",
|
|
431
431
|
"eighteen",
|
|
432
432
|
"nineteen"
|
|
433
|
-
];
|
|
434
|
-
var TENS = [
|
|
433
|
+
]);
|
|
434
|
+
var TENS = /* @__PURE__ */ Object.freeze([
|
|
435
435
|
"",
|
|
436
436
|
"ten",
|
|
437
437
|
"twenty",
|
|
@@ -442,8 +442,8 @@ var TENS = [
|
|
|
442
442
|
"seventy",
|
|
443
443
|
"eighty",
|
|
444
444
|
"ninety"
|
|
445
|
-
];
|
|
446
|
-
var THOUSANDS = [
|
|
445
|
+
]);
|
|
446
|
+
var THOUSANDS = /* @__PURE__ */ Object.freeze([
|
|
447
447
|
"",
|
|
448
448
|
"thousand",
|
|
449
449
|
"million",
|
|
@@ -453,8 +453,8 @@ var THOUSANDS = [
|
|
|
453
453
|
"quintillion"
|
|
454
454
|
// ! Needs to modify later, below supports up to 10 sextillion! It's a bug!
|
|
455
455
|
// 'sextillion',
|
|
456
|
-
];
|
|
457
|
-
var CURRENCY_LOCALES = {
|
|
456
|
+
]);
|
|
457
|
+
var CURRENCY_LOCALES = /* @__PURE__ */ Object.freeze({
|
|
458
458
|
AED: "ar-AE",
|
|
459
459
|
// United Arab Emirates Dirham
|
|
460
460
|
AFN: "fa-IR",
|
|
@@ -775,8 +775,8 @@ var CURRENCY_LOCALES = {
|
|
|
775
775
|
// Zambian Kwacha
|
|
776
776
|
ZWL: "en-ZW"
|
|
777
777
|
// Zimbabwean Dollar
|
|
778
|
-
};
|
|
779
|
-
var PREFIX_MULTIPLIERS = {
|
|
778
|
+
});
|
|
779
|
+
var PREFIX_MULTIPLIERS = /* @__PURE__ */ Object.freeze({
|
|
780
780
|
y: 1e-24,
|
|
781
781
|
z: 1e-21,
|
|
782
782
|
a: 1e-18,
|
|
@@ -800,7 +800,7 @@ var PREFIX_MULTIPLIERS = {
|
|
|
800
800
|
Y: 1e24,
|
|
801
801
|
"": 1
|
|
802
802
|
// base unit, like meter, gram, byte etc.
|
|
803
|
-
};
|
|
803
|
+
});
|
|
804
804
|
|
|
805
805
|
// src/number/helpers.ts
|
|
806
806
|
var _applyMultiples = (array, multiples) => {
|
|
@@ -1022,7 +1022,7 @@ var Currency = class _Currency {
|
|
|
1022
1022
|
return this.#amount * rate;
|
|
1023
1023
|
} catch (error) {
|
|
1024
1024
|
if (options?.fallbackRate != null) {
|
|
1025
|
-
console.warn(
|
|
1025
|
+
/* @__PURE__ */ console.warn(
|
|
1026
1026
|
`Currency conversion failed (${this.#code} \u2192 ${to}): ${error.message}. Using fallback rate...`
|
|
1027
1027
|
);
|
|
1028
1028
|
return this.#amount * options.fallbackRate;
|
|
@@ -2017,11 +2017,6 @@ function getNumbersInRange(type = "any", options) {
|
|
|
2017
2017
|
}
|
|
2018
2018
|
return numbers;
|
|
2019
2019
|
};
|
|
2020
|
-
if (type === "prime" && multiplesOf !== void 0) {
|
|
2021
|
-
console.warn(
|
|
2022
|
-
'Warning: The "multiplesOf" option is ignored when the type is "prime"!'
|
|
2023
|
-
);
|
|
2024
|
-
}
|
|
2025
2020
|
switch (type) {
|
|
2026
2021
|
case "random":
|
|
2027
2022
|
output = shuffleArray(
|
|
@@ -2058,7 +2053,7 @@ function getNumbersInRange(type = "any", options) {
|
|
|
2058
2053
|
}
|
|
2059
2054
|
|
|
2060
2055
|
// src/colors/constants.ts
|
|
2061
|
-
var alphabetColorPalette = [
|
|
2056
|
+
var alphabetColorPalette = /* @__PURE__ */ Object.freeze([
|
|
2062
2057
|
"#00094C",
|
|
2063
2058
|
"#00376E",
|
|
2064
2059
|
"#005600",
|
|
@@ -2085,8 +2080,8 @@ var alphabetColorPalette = [
|
|
|
2085
2080
|
"#475F47",
|
|
2086
2081
|
"#546F1C",
|
|
2087
2082
|
"#824809"
|
|
2088
|
-
];
|
|
2089
|
-
var numberColorPalette = [
|
|
2083
|
+
]);
|
|
2084
|
+
var numberColorPalette = /* @__PURE__ */ Object.freeze([
|
|
2090
2085
|
"#893213",
|
|
2091
2086
|
"#A44C15",
|
|
2092
2087
|
"#8B4513",
|
|
@@ -2097,7 +2092,7 @@ var numberColorPalette = [
|
|
|
2097
2092
|
"#04605F",
|
|
2098
2093
|
"#B5680A",
|
|
2099
2094
|
"#6437B3"
|
|
2100
|
-
];
|
|
2095
|
+
]);
|
|
2101
2096
|
|
|
2102
2097
|
// src/colors/helpers.ts
|
|
2103
2098
|
var _convertOpacityToHex = (opacity) => {
|
|
@@ -2322,7 +2317,6 @@ var convertRgbToRgba = (r, g, b, a = 1) => {
|
|
|
2322
2317
|
let newAlpha = a;
|
|
2323
2318
|
if (!_isValidAlpha(a)) {
|
|
2324
2319
|
newAlpha = 1;
|
|
2325
|
-
console.warn(`Alpha value must be between 0-1, ${a} converted to 1!`);
|
|
2326
2320
|
}
|
|
2327
2321
|
return `rgba(${r}, ${g}, ${b}, ${parseFloat(newAlpha.toFixed(1))})`;
|
|
2328
2322
|
};
|
|
@@ -2330,7 +2324,6 @@ var convertRgbaToHex8 = (r, g, b, a = 1) => {
|
|
|
2330
2324
|
let newAlpha = a;
|
|
2331
2325
|
if (!_isValidAlpha(a)) {
|
|
2332
2326
|
newAlpha = 1;
|
|
2333
|
-
console.warn(`Alpha value must be between 0-1, ${a} converted to 1!`);
|
|
2334
2327
|
}
|
|
2335
2328
|
const hex = convertRgbToHex(r, g, b);
|
|
2336
2329
|
const alphaHex = _convertOpacityToHex(
|
|
@@ -2342,7 +2335,6 @@ var convertHslaToRgba = (h, s, l, a = 1) => {
|
|
|
2342
2335
|
let newAlpha = a;
|
|
2343
2336
|
if (!_isValidAlpha(a)) {
|
|
2344
2337
|
newAlpha = 1;
|
|
2345
|
-
console.warn(`Alpha value must be between 0-1, ${a} converted to 1!`);
|
|
2346
2338
|
}
|
|
2347
2339
|
const rgb = convertHslToRgb(h, s, l);
|
|
2348
2340
|
const rgbNumbers = extractSolidColorValues(rgb);
|
|
@@ -2357,7 +2349,6 @@ var convertRgbaToHsla = (r, g, b, a = 1) => {
|
|
|
2357
2349
|
let newAlpha = a;
|
|
2358
2350
|
if (!_isValidAlpha(a)) {
|
|
2359
2351
|
newAlpha = 1;
|
|
2360
|
-
console.warn(`Alpha value must be between 0-1, ${a} converted to 1!`);
|
|
2361
2352
|
}
|
|
2362
2353
|
const hsl = convertRgbToHsl(r, g, b);
|
|
2363
2354
|
const hslNumbers = extractSolidColorValues(hsl);
|
|
@@ -2375,7 +2366,6 @@ var convertHslaToHex8 = (h, s, l, a = 1) => {
|
|
|
2375
2366
|
let newAlpha = a;
|
|
2376
2367
|
if (!_isValidAlpha(a)) {
|
|
2377
2368
|
newAlpha = 1;
|
|
2378
|
-
console.warn(`Alpha value must be between 0-1, ${a} converted to 1!`);
|
|
2379
2369
|
}
|
|
2380
2370
|
const hex = convertHslToHex(h, s, l);
|
|
2381
2371
|
const alphaHex = _convertOpacityToHex(
|
|
@@ -2452,7 +2442,7 @@ var generateRandomColorInHexRGB = (maxColors = 16) => {
|
|
|
2452
2442
|
};
|
|
2453
2443
|
|
|
2454
2444
|
// src/colors/css-colors.ts
|
|
2455
|
-
var CSS_COLORS = {
|
|
2445
|
+
var CSS_COLORS = /* @__PURE__ */ Object.freeze({
|
|
2456
2446
|
black: "#000000",
|
|
2457
2447
|
silver: "#C0C0C0",
|
|
2458
2448
|
gray: "#808080",
|
|
@@ -2610,7 +2600,7 @@ var CSS_COLORS = {
|
|
|
2610
2600
|
info: "#2196F3",
|
|
2611
2601
|
warning: "#FF9800",
|
|
2612
2602
|
error: "#F44336"
|
|
2613
|
-
};
|
|
2603
|
+
});
|
|
2614
2604
|
|
|
2615
2605
|
// src/colors/Color.ts
|
|
2616
2606
|
var Color = class _Color {
|
|
@@ -3144,7 +3134,7 @@ function getGreeting(configs) {
|
|
|
3144
3134
|
}
|
|
3145
3135
|
|
|
3146
3136
|
// src/date/constants.ts
|
|
3147
|
-
var DAYS = [
|
|
3137
|
+
var DAYS = /* @__PURE__ */ Object.freeze([
|
|
3148
3138
|
"Sunday",
|
|
3149
3139
|
"Monday",
|
|
3150
3140
|
"Tuesday",
|
|
@@ -3152,8 +3142,8 @@ var DAYS = [
|
|
|
3152
3142
|
"Thursday",
|
|
3153
3143
|
"Friday",
|
|
3154
3144
|
"Saturday"
|
|
3155
|
-
];
|
|
3156
|
-
var MONTHS = [
|
|
3145
|
+
]);
|
|
3146
|
+
var MONTHS = /* @__PURE__ */ Object.freeze([
|
|
3157
3147
|
"January",
|
|
3158
3148
|
"February",
|
|
3159
3149
|
"March",
|
|
@@ -3166,27 +3156,61 @@ var MONTHS = [
|
|
|
3166
3156
|
"October",
|
|
3167
3157
|
"November",
|
|
3168
3158
|
"December"
|
|
3169
|
-
];
|
|
3170
|
-
var YEAR_FORMATS =
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
var
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3159
|
+
]);
|
|
3160
|
+
var YEAR_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
3161
|
+
"YYYY",
|
|
3162
|
+
"YY",
|
|
3163
|
+
"yyyy",
|
|
3164
|
+
"yy"
|
|
3165
|
+
]);
|
|
3166
|
+
var MONTH_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
3167
|
+
"M",
|
|
3168
|
+
"MM",
|
|
3169
|
+
"mmm",
|
|
3170
|
+
"mmmm"
|
|
3171
|
+
]);
|
|
3172
|
+
var DATE_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
3173
|
+
"DD",
|
|
3174
|
+
"D",
|
|
3175
|
+
"Do"
|
|
3176
|
+
]);
|
|
3177
|
+
var DAY_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
3178
|
+
"d",
|
|
3179
|
+
"dd",
|
|
3180
|
+
"ddd"
|
|
3181
|
+
]);
|
|
3182
|
+
var HOUR_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
3183
|
+
"H",
|
|
3184
|
+
"HH",
|
|
3185
|
+
"hh",
|
|
3186
|
+
"h"
|
|
3187
|
+
]);
|
|
3188
|
+
var MINUTE_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
3189
|
+
"mm",
|
|
3190
|
+
"m"
|
|
3191
|
+
]);
|
|
3192
|
+
var SECOND_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
3193
|
+
"ss",
|
|
3194
|
+
"s"
|
|
3195
|
+
]);
|
|
3196
|
+
var MILLISECOND_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
3197
|
+
"ms",
|
|
3198
|
+
"mss"
|
|
3199
|
+
]);
|
|
3200
|
+
var TIME_FORMATS = /* @__PURE__ */ Object.freeze(["a", "A"]);
|
|
3201
|
+
var sortedFormats = /* @__PURE__ */ Object.freeze(
|
|
3202
|
+
[
|
|
3203
|
+
...YEAR_FORMATS,
|
|
3204
|
+
...MONTH_FORMATS,
|
|
3205
|
+
...DAY_FORMATS,
|
|
3206
|
+
...DATE_FORMATS,
|
|
3207
|
+
...HOUR_FORMATS,
|
|
3208
|
+
...MINUTE_FORMATS,
|
|
3209
|
+
...SECOND_FORMATS,
|
|
3210
|
+
...MILLISECOND_FORMATS,
|
|
3211
|
+
...TIME_FORMATS
|
|
3212
|
+
].sort((a, b) => b.length - a.length)
|
|
3213
|
+
);
|
|
3190
3214
|
var TIME_ZONES = {
|
|
3191
3215
|
// UTC -12:00 to -01:00 (Mostly Pacific Islands, Americas)
|
|
3192
3216
|
/** International Date Line West (Baker Island, Howland Island) */
|
|
@@ -3471,7 +3495,7 @@ var TIME_ZONES = {
|
|
|
3471
3495
|
/** Petropavlovsk-Kamchatsky Time (Russia) */
|
|
3472
3496
|
PETT: 12 * 60
|
|
3473
3497
|
};
|
|
3474
|
-
var TIME_ZONE_LABELS = {
|
|
3498
|
+
var TIME_ZONE_LABELS = /* @__PURE__ */ Object.freeze({
|
|
3475
3499
|
"UTC-12:00": "Baker Island Time",
|
|
3476
3500
|
// and Howland Island
|
|
3477
3501
|
// 'UTC-11:30': 'Niue Time',
|
|
@@ -3528,16 +3552,16 @@ var TIME_ZONE_LABELS = {
|
|
|
3528
3552
|
"UTC+13:00": "Phoenix Island Time",
|
|
3529
3553
|
"UTC+13:45": "Tokelau Time (Unofficial)",
|
|
3530
3554
|
"UTC+14:00": "Line Islands Time"
|
|
3531
|
-
};
|
|
3532
|
-
var DEFAULT_RANGES = {
|
|
3555
|
+
});
|
|
3556
|
+
var DEFAULT_RANGES = /* @__PURE__ */ Object.freeze({
|
|
3533
3557
|
night: ["21", "23"],
|
|
3534
3558
|
midnight: ["00", "01"],
|
|
3535
3559
|
lateNight: ["02", "04"],
|
|
3536
3560
|
morning: ["05", "11"],
|
|
3537
3561
|
afternoon: ["12", "16"],
|
|
3538
3562
|
evening: ["17", "20"]
|
|
3539
|
-
};
|
|
3540
|
-
var ZODIAC_SIGNS = [
|
|
3563
|
+
});
|
|
3564
|
+
var ZODIAC_SIGNS = /* @__PURE__ */ Object.freeze([
|
|
3541
3565
|
["Capricorn", [1, 19]],
|
|
3542
3566
|
["Aquarius", [2, 18]],
|
|
3543
3567
|
["Pisces", [3, 20]],
|
|
@@ -3551,7 +3575,7 @@ var ZODIAC_SIGNS = [
|
|
|
3551
3575
|
["Scorpio", [11, 21]],
|
|
3552
3576
|
["Sagittarius", [12, 21]],
|
|
3553
3577
|
["Capricorn", [12, 31]]
|
|
3554
|
-
];
|
|
3578
|
+
]);
|
|
3555
3579
|
|
|
3556
3580
|
// src/date/Chronos.ts
|
|
3557
3581
|
var Chronos = class _Chronos {
|
|
@@ -5446,7 +5470,7 @@ var chronos = (valueOrYear, month, date, hours, minutes, seconds, ms) => {
|
|
|
5446
5470
|
ms ?? 0
|
|
5447
5471
|
);
|
|
5448
5472
|
} else {
|
|
5449
|
-
newChronos = new Chronos(valueOrYear);
|
|
5473
|
+
newChronos = /* @__PURE__ */ new Chronos(valueOrYear);
|
|
5450
5474
|
}
|
|
5451
5475
|
return newChronos;
|
|
5452
5476
|
};
|
|
@@ -5809,7 +5833,6 @@ function isValidFormData(value) {
|
|
|
5809
5833
|
if (!(value instanceof FormData)) return false;
|
|
5810
5834
|
if ("entries" in value) {
|
|
5811
5835
|
if (typeof value.entries !== "function") {
|
|
5812
|
-
console.warn("`FormData.entries()` is not supported!");
|
|
5813
5836
|
return false;
|
|
5814
5837
|
}
|
|
5815
5838
|
return Array.from(value.entries())?.length > 0;
|
|
@@ -6518,7 +6541,6 @@ async function copyToClipboard(text) {
|
|
|
6518
6541
|
}
|
|
6519
6542
|
}
|
|
6520
6543
|
} catch (error) {
|
|
6521
|
-
console.error("Failed to copy text:", error);
|
|
6522
6544
|
throw error;
|
|
6523
6545
|
} finally {
|
|
6524
6546
|
const textArea = document.querySelector('textarea[style*="fixed"]');
|