@primoui/utils 1.2.3 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers/helpers.d.ts +3 -3
- package/dist/helpers/helpers.d.ts.map +1 -1
- package/dist/http/http.d.ts +79 -30
- package/dist/http/http.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +218 -158
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/objects/objects.d.ts +1 -1
- package/dist/objects/objects.d.ts.map +1 -1
- package/dist/{params/params.d.ts → pagination/pagination.d.ts} +2 -20
- package/dist/pagination/pagination.d.ts.map +1 -0
- package/package.json +5 -5
- package/dist/params/params.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,121 +1,115 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
1
|
+
import d from "@sindresorhus/slugify";
|
|
2
|
+
const z = (t, e) => {
|
|
3
3
|
const r = e - t + 1;
|
|
4
|
-
return Array.from({ length: r }, (n,
|
|
5
|
-
},
|
|
4
|
+
return Array.from({ length: r }, (n, s) => s + t);
|
|
5
|
+
}, y = async (t) => new Promise((e) => setTimeout(e, t)), H = ({ key: t, metaKey: e }) => `${e ? "⌘" : ""}${t.toUpperCase()}`, w = (t) => t.replace(/<[^>]*>?/gm, ""), b = (t, e = " ") => t.replace(/\n+/g, e), J = (t, e = 250) => {
|
|
6
6
|
if (!t)
|
|
7
7
|
return null;
|
|
8
|
-
const r =
|
|
8
|
+
const r = b(w(t)), n = r.slice(0, e).trim();
|
|
9
9
|
return n.length < r.length ? `${n}...` : n;
|
|
10
|
-
},
|
|
10
|
+
}, V = (t, e = !1) => d(t, {
|
|
11
11
|
decamelize: e,
|
|
12
12
|
customReplacements: [
|
|
13
13
|
["#", "sharp"],
|
|
14
14
|
["+", "plus"]
|
|
15
15
|
]
|
|
16
|
-
}),
|
|
17
|
-
function y(t) {
|
|
18
|
-
return !!t;
|
|
19
|
-
}
|
|
20
|
-
const k = (t, e = 0) => {
|
|
16
|
+
}), K = (t) => t.length === 25 && t[0] === "c", U = (t) => !!t, Z = (t, e = 0) => {
|
|
21
17
|
const r = (t || "").trim();
|
|
22
18
|
if (r.length === 0 || r.length === 1 || r.length === 2)
|
|
23
19
|
return r.toUpperCase();
|
|
24
|
-
const
|
|
25
|
-
return e > 0 ?
|
|
26
|
-
},
|
|
20
|
+
const s = r.split(" ").filter(U).map((o) => o.charAt(0).toUpperCase()).join("");
|
|
21
|
+
return e > 0 ? s.slice(0, e) : s;
|
|
22
|
+
}, Q = (t) => new Promise((e, r) => {
|
|
27
23
|
const n = new FileReader();
|
|
28
|
-
n.readAsDataURL(t), n.onload = () => e(n.result), n.onerror = (
|
|
29
|
-
}),
|
|
24
|
+
n.readAsDataURL(t), n.onload = () => e(n.result), n.onerror = (s) => r(s);
|
|
25
|
+
}), S = (t, e) => {
|
|
30
26
|
const r = [];
|
|
31
27
|
for (let n = 0; n < t.length; n += e)
|
|
32
28
|
r.push(t.slice(n, n + e));
|
|
33
29
|
return r;
|
|
34
|
-
},
|
|
30
|
+
}, _ = (t, e, r = !1) => {
|
|
35
31
|
Object.getOwnPropertyDescriptor(
|
|
36
32
|
HTMLInputElement.prototype,
|
|
37
33
|
"value"
|
|
38
34
|
)?.set?.call(t, e), r && t?.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
39
|
-
},
|
|
35
|
+
}, G = (t, e = 3, r = "and") => t.slice(0, e).join(", ").replace(/, ([^,]*)$/, ` ${r} $1`), Y = async (t) => {
|
|
40
36
|
try {
|
|
41
37
|
return { data: await t, error: null };
|
|
42
38
|
} catch (e) {
|
|
43
39
|
return { data: null, error: e };
|
|
44
40
|
}
|
|
45
|
-
}
|
|
46
|
-
function w(t) {
|
|
41
|
+
}, M = (t) => {
|
|
47
42
|
if (t !== null) {
|
|
48
43
|
if (t?.constructor.name === "Object")
|
|
49
44
|
for (const e in t)
|
|
50
|
-
t[e] =
|
|
45
|
+
t[e] = M(t[e]);
|
|
51
46
|
return t;
|
|
52
47
|
}
|
|
53
|
-
}
|
|
54
|
-
const
|
|
55
|
-
const { batchSize: n, concurrency: o = n, delay: s = 0 } = r;
|
|
48
|
+
}, P = async (t, e, r) => {
|
|
49
|
+
const { batchSize: n, concurrency: s = n, delay: o = 0 } = r;
|
|
56
50
|
if (t.length === 0) return [];
|
|
57
|
-
const a = [], c =
|
|
58
|
-
for (const [u,
|
|
59
|
-
console.log(`Processing batch ${u + 1}/${c.length} (${
|
|
60
|
-
const
|
|
61
|
-
a.push(...
|
|
51
|
+
const a = [], c = S(t, n);
|
|
52
|
+
for (const [u, l] of c.entries()) {
|
|
53
|
+
console.log(`Processing batch ${u + 1}/${c.length} (${l.length} items)`);
|
|
54
|
+
const g = await E(l, e, s);
|
|
55
|
+
a.push(...g), o > 0 && u < c.length - 1 && (console.log(`Waiting ${o}ms before next batch...`), await y(o));
|
|
62
56
|
}
|
|
63
57
|
return a;
|
|
64
|
-
},
|
|
58
|
+
}, q = async (t, e, r) => {
|
|
65
59
|
const { onError: n } = r;
|
|
66
|
-
return
|
|
60
|
+
return P(t, async (o) => {
|
|
67
61
|
try {
|
|
68
|
-
return await e(
|
|
62
|
+
return await e(o);
|
|
69
63
|
} catch (a) {
|
|
70
64
|
const c = a instanceof Error ? a : new Error(String(a));
|
|
71
|
-
return n?.(c,
|
|
65
|
+
return n?.(c, o), c;
|
|
72
66
|
}
|
|
73
67
|
}, r);
|
|
74
|
-
},
|
|
68
|
+
}, E = async (t, e, r) => {
|
|
75
69
|
if (r >= t.length)
|
|
76
70
|
return Promise.all(t.map(e));
|
|
77
|
-
const n = [],
|
|
78
|
-
for (const
|
|
79
|
-
const a = e(
|
|
71
|
+
const n = [], s = [];
|
|
72
|
+
for (const o of t) {
|
|
73
|
+
const a = e(o).then((c) => {
|
|
80
74
|
n.push(c);
|
|
81
75
|
});
|
|
82
|
-
|
|
76
|
+
s.push(a), s.length >= r && (await Promise.race(s), s.splice(0, s.length - s.filter((c) => c !== a).length));
|
|
83
77
|
}
|
|
84
|
-
return await Promise.all(
|
|
85
|
-
},
|
|
86
|
-
const e = t.replace("#", "").substring(0, 6), r = Number.parseInt(e.substring(0, 2), 16), n = Number.parseInt(e.substring(2, 4), 16),
|
|
87
|
-
return r * 0.299 + n * 0.587 +
|
|
88
|
-
},
|
|
78
|
+
return await Promise.all(s), n;
|
|
79
|
+
}, X = (t) => {
|
|
80
|
+
const e = t.replace("#", "").substring(0, 6), r = Number.parseInt(e.substring(0, 2), 16), n = Number.parseInt(e.substring(2, 4), 16), s = Number.parseInt(e.substring(4, 6), 16);
|
|
81
|
+
return r * 0.299 + n * 0.587 + s * 0.114 > 186;
|
|
82
|
+
}, tt = (t) => {
|
|
89
83
|
const e = document.getElementById(t || "");
|
|
90
84
|
if (!e) return;
|
|
91
|
-
const r = window.getComputedStyle(e), n = Number.parseFloat(r.scrollMarginTop),
|
|
92
|
-
return { id: t, top:
|
|
93
|
-
},
|
|
94
|
-
if (
|
|
85
|
+
const r = window.getComputedStyle(e), n = Number.parseFloat(r.scrollMarginTop), s = Math.floor(window.scrollY + e.getBoundingClientRect().top - n);
|
|
86
|
+
return { id: t, top: s };
|
|
87
|
+
}, R = (t) => typeof t == "object" && t !== null && "message" in t && typeof t.message == "string", v = (t) => {
|
|
88
|
+
if (R(t)) return t;
|
|
95
89
|
try {
|
|
96
90
|
return new Error(JSON.stringify(t));
|
|
97
91
|
} catch {
|
|
98
92
|
return new Error(String(t));
|
|
99
93
|
}
|
|
100
|
-
},
|
|
94
|
+
}, et = (t) => v(t).message, rt = (t, e) => {
|
|
101
95
|
document.addEventListener(t, e);
|
|
102
|
-
},
|
|
96
|
+
}, nt = (t, e) => {
|
|
103
97
|
document.removeEventListener(t, e);
|
|
104
|
-
},
|
|
98
|
+
}, st = (t, e) => {
|
|
105
99
|
const r = new CustomEvent(t, { detail: e });
|
|
106
100
|
document.dispatchEvent(r);
|
|
107
|
-
},
|
|
101
|
+
}, ot = () => {
|
|
108
102
|
const t = new KeyboardEvent("keydown", { key: "Escape" });
|
|
109
103
|
document.dispatchEvent(t);
|
|
110
|
-
},
|
|
104
|
+
}, ct = (t, e = "compact", r = "en-US") => new Intl.NumberFormat(r, { notation: e }).format(t), at = (t, e = "USD") => new Intl.NumberFormat("en-US", {
|
|
111
105
|
style: "currency",
|
|
112
106
|
currency: e
|
|
113
|
-
}).format(t).replace(/\D00(?=\D*$)/, ""),
|
|
107
|
+
}).format(t).replace(/\D00(?=\D*$)/, ""), it = (t, e = "month") => h(t / (e === "year" ? 12 : 1), 2), h = (t, e = 0) => t.toFixed(e < 0 ? 0 : e).replace(/\.0+$/, ""), ut = (t, e = 0) => {
|
|
114
108
|
if (t === 0)
|
|
115
109
|
return "0 Bytes";
|
|
116
110
|
const r = 1024, n = Math.floor(Math.log(t) / Math.log(r));
|
|
117
|
-
return `${
|
|
118
|
-
},
|
|
111
|
+
return `${h(t / r ** n, e)} ${["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"][n]}`;
|
|
112
|
+
}, lt = (t) => {
|
|
119
113
|
const [, e] = t.split("/");
|
|
120
114
|
let r;
|
|
121
115
|
switch (e) {
|
|
@@ -125,142 +119,208 @@ const S = async (t, e, r) => {
|
|
|
125
119
|
r = e;
|
|
126
120
|
}
|
|
127
121
|
return r?.toUpperCase();
|
|
128
|
-
},
|
|
122
|
+
}, N = /^https?:\/\/(?:www\.)?(?:[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b|localhost(?::\d+)?|127\.0\.0\.1(?::\d+)?)(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/, D = (t) => {
|
|
123
|
+
if (!t || typeof t != "string" || !N.test(t)) return !1;
|
|
124
|
+
try {
|
|
125
|
+
return new URL(t), !0;
|
|
126
|
+
} catch {
|
|
127
|
+
return !1;
|
|
128
|
+
}
|
|
129
|
+
}, m = (t, e) => t ? t.startsWith("http://") || t.startsWith("https://") ? t : `${e !== void 0 ? e ? "https" : "http" : L(t) ? "http" : "https"}://${t}` : "", I = (t) => t?.replace(/^https?:\/\//, "") ?? "", i = (t) => {
|
|
130
|
+
if (!t) return "";
|
|
131
|
+
let e = t.trim();
|
|
132
|
+
if (e.includes("?") || e.includes("#"))
|
|
133
|
+
try {
|
|
134
|
+
const r = new URL(e);
|
|
135
|
+
return r.pathname.length > 1 && r.pathname.endsWith("/") && (r.pathname = r.pathname.slice(0, -1)), r.toString();
|
|
136
|
+
} catch {
|
|
137
|
+
return e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e;
|
|
138
|
+
}
|
|
139
|
+
return e.length > 1 && e.endsWith("/") && (e = e.slice(0, -1)), e;
|
|
140
|
+
}, O = (t) => {
|
|
129
141
|
try {
|
|
130
142
|
const e = new URL(t);
|
|
131
143
|
return `${e.protocol}//${e.host}`;
|
|
132
|
-
} catch
|
|
133
|
-
return
|
|
144
|
+
} catch {
|
|
145
|
+
return t;
|
|
146
|
+
}
|
|
147
|
+
}, $ = (t) => {
|
|
148
|
+
try {
|
|
149
|
+
if (!D(t)) return t;
|
|
150
|
+
const e = new URL(t).hostname;
|
|
151
|
+
return e.startsWith("www.") ? e.slice(4) : e;
|
|
152
|
+
} catch {
|
|
153
|
+
return t;
|
|
134
154
|
}
|
|
135
|
-
},
|
|
155
|
+
}, ht = (t) => t ? /^https?:\/\//.test(t) : !1, L = (t) => {
|
|
136
156
|
if (!t) return !1;
|
|
137
157
|
try {
|
|
138
|
-
|
|
158
|
+
const r = new URL(m(t)).hostname;
|
|
159
|
+
return r === "localhost" || r === "127.0.0.1" || r.endsWith(".localhost");
|
|
139
160
|
} catch {
|
|
140
|
-
return
|
|
161
|
+
return t.includes("localhost") || t.includes("127.0.0.1");
|
|
162
|
+
}
|
|
163
|
+
}, mt = (t, ...e) => {
|
|
164
|
+
if (!t) return "";
|
|
165
|
+
let r = i(t);
|
|
166
|
+
for (const n of e) {
|
|
167
|
+
if (!n) continue;
|
|
168
|
+
const s = n.replace(/^\/+|\/+$/g, "");
|
|
169
|
+
s && (r += `/${s}`);
|
|
170
|
+
}
|
|
171
|
+
return r;
|
|
172
|
+
}, p = (t) => {
|
|
173
|
+
try {
|
|
174
|
+
const e = new URL(t), r = {};
|
|
175
|
+
return e.searchParams.forEach((n, s) => {
|
|
176
|
+
r[s] = n;
|
|
177
|
+
}), r;
|
|
178
|
+
} catch {
|
|
179
|
+
return {};
|
|
180
|
+
}
|
|
181
|
+
}, T = (t, e) => {
|
|
182
|
+
try {
|
|
183
|
+
const r = new URL(t);
|
|
184
|
+
Object.entries(e).forEach(([s, o]) => {
|
|
185
|
+
r.searchParams.set(s, String(o));
|
|
186
|
+
});
|
|
187
|
+
let n = r.toString();
|
|
188
|
+
return n = n.replace(/\/\?/, "?"), n;
|
|
189
|
+
} catch {
|
|
190
|
+
return t;
|
|
191
|
+
}
|
|
192
|
+
}, B = (t) => {
|
|
193
|
+
if (!t) return "";
|
|
194
|
+
try {
|
|
195
|
+
const e = new URL(t);
|
|
196
|
+
return e.search = "", i(e.toString());
|
|
197
|
+
} catch {
|
|
198
|
+
const e = t.indexOf("?");
|
|
199
|
+
return e !== -1 ? t.substring(0, e) : t;
|
|
141
200
|
}
|
|
142
|
-
},
|
|
201
|
+
}, pt = m, ft = I, gt = i, dt = i, yt = O, wt = $, bt = B, Ut = p, St = T, Mt = (t, e, r) => e !== void 0 && r !== void 0 ? Math.min(Math.max(t, e), r) : e !== void 0 ? Math.max(t, e) : r !== void 0 ? Math.min(t, r) : t, Pt = (t) => {
|
|
143
202
|
if (t == null) return;
|
|
144
203
|
const e = Number.parseFloat(t.toString());
|
|
145
204
|
return Number.isNaN(e) ? void 0 : e;
|
|
146
|
-
},
|
|
205
|
+
}, Et = (t, e = 2) => {
|
|
147
206
|
const r = Math.pow(10, e);
|
|
148
207
|
return Math.round((t + Number.EPSILON) * r) / r;
|
|
149
|
-
},
|
|
150
|
-
const n = t.indexOf(Object.keys(e)[0] ?? ""),
|
|
151
|
-
return n === -1 &&
|
|
152
|
-
},
|
|
153
|
-
function gt(t, e) {
|
|
208
|
+
}, Rt = (t = {}) => t.constructor === Object && !Object.entries(t).length, vt = (t) => (e, r) => {
|
|
209
|
+
const n = t.indexOf(Object.keys(e)[0] ?? ""), s = t.indexOf(Object.keys(r)[0] ?? "");
|
|
210
|
+
return n === -1 && s === -1 ? 0 : n === -1 ? 1 : s === -1 ? -1 : n - s;
|
|
211
|
+
}, Nt = (t, e) => Object.keys(t).sort(e).reduce((r, n) => ({ ...r, [n]: t[n] }), {}), Dt = (t, e) => {
|
|
154
212
|
const r = {};
|
|
155
213
|
for (const n of e)
|
|
156
214
|
n in t && (r[n] = t[n]);
|
|
157
215
|
return r;
|
|
158
|
-
}
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
o ? r.set(n, o) : r.delete(n);
|
|
163
|
-
return r.toString();
|
|
164
|
-
}, dt = (t, e) => {
|
|
165
|
-
if (!t.startsWith("http")) return t;
|
|
166
|
-
const r = new URL(t), n = v(r.search, e);
|
|
167
|
-
return r.search = n, r.toString();
|
|
168
|
-
}, O = (t) => Math.max(t && !Number.isNaN(Number(t)) ? Number.parseInt(t || "1", 10) : 1, 1), yt = (t, e) => {
|
|
169
|
-
const { page: r, ...n } = P(t), s = (O(r) - 1) * e;
|
|
170
|
-
return { take: e, skip: s, ...n };
|
|
171
|
-
}, bt = (t, e, r) => (t.set("page", r.toString()), `${e}?${t.toString()}`), wt = (t) => {
|
|
216
|
+
}, C = (t) => Math.max(t && !Number.isNaN(Number(t)) ? Number.parseInt(t || "1", 10) : 1, 1), It = (t, e) => {
|
|
217
|
+
const { page: r, ...n } = p(t), o = (C(r) - 1) * e;
|
|
218
|
+
return { take: e, skip: o, ...n };
|
|
219
|
+
}, Ot = (t, e, r) => (t.set("page", r.toString()), `${e}?${t.toString()}`), $t = (t) => {
|
|
172
220
|
try {
|
|
173
221
|
return JSON.parse(t);
|
|
174
222
|
} catch {
|
|
175
223
|
return t;
|
|
176
224
|
}
|
|
177
|
-
},
|
|
225
|
+
}, Lt = (t) => typeof t == "object" ? JSON.stringify(t) : t, Tt = () => Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0"), Bt = (t = 16) => {
|
|
178
226
|
const e = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
|
179
227
|
return Array.from({ length: t }, () => e[Math.floor(Math.random() * e.length)]).join("");
|
|
180
|
-
},
|
|
228
|
+
}, Ct = (t, e) => Math.floor(Math.random() * (e - t + 1)) + t, xt = (t) => Array.from({ length: t }, () => Math.floor(Math.random() * 10)).join(""), Ft = (t) => {
|
|
181
229
|
const e = Math.floor(Math.random() * t.length);
|
|
182
230
|
return t[e];
|
|
183
|
-
},
|
|
231
|
+
}, jt = (t) => {
|
|
184
232
|
const e = Object.keys(t), r = e[Math.floor(e.length * Math.random())];
|
|
185
233
|
return t[r];
|
|
186
|
-
},
|
|
234
|
+
}, kt = (t) => typeof t != "string" ? "" : t.length === 0 ? t : t[0]?.toUpperCase() + t.slice(1), Wt = (t) => typeof t != "string" ? "" : t.length === 0 ? t : t[0]?.toLowerCase() + t.slice(1), f = (t, e) => new Intl.DateTimeFormat(t, { dateStyle: e }), x = (t, e) => new Intl.DateTimeFormat(t, { timeStyle: e }), F = (t, e, r) => new Intl.DateTimeFormat(t, { dateStyle: e, timeStyle: r }), j = (t, e = "medium", r = "en-US") => f(r, e).format(new Date(t)), k = (t, e = "short", r = "en-US") => x(r, e).format(new Date(t)), W = (t, e = "medium", r = "short", n = "en-US") => F(n, e, r).format(new Date(t)), At = (t, e, r = "medium", n = "short", s = "en-US") => {
|
|
187
235
|
switch (e) {
|
|
188
236
|
case "date":
|
|
189
|
-
return
|
|
237
|
+
return j(t, r, s);
|
|
190
238
|
case "time":
|
|
191
|
-
return
|
|
239
|
+
return k(t, n, s);
|
|
192
240
|
default:
|
|
193
|
-
return
|
|
241
|
+
return W(t, r, n, s);
|
|
194
242
|
}
|
|
195
|
-
},
|
|
243
|
+
}, zt = (t, e, r = "medium", n = "en-US") => f(n, r).formatRange(new Date(t), new Date(e)), Ht = (t, e = 265) => t ? Math.ceil(t.trim().split(/\s+/).length / e) : 0;
|
|
196
244
|
export {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
245
|
+
pt as addHttp,
|
|
246
|
+
m as addProtocol,
|
|
247
|
+
St as addSearchParams,
|
|
248
|
+
b as convertNewlines,
|
|
249
|
+
ut as formatBytes,
|
|
250
|
+
at as formatCurrency,
|
|
251
|
+
j as formatDate,
|
|
252
|
+
At as formatDateOrTime,
|
|
253
|
+
zt as formatDateRange,
|
|
254
|
+
W as formatDateTime,
|
|
255
|
+
it as formatIntervalAmount,
|
|
256
|
+
lt as formatMimeType,
|
|
257
|
+
ct as formatNumber,
|
|
258
|
+
k as formatTime,
|
|
259
|
+
h as formatToDecimals,
|
|
260
|
+
O as getBaseUrl,
|
|
261
|
+
C as getCurrentPage,
|
|
262
|
+
$ as getDomain,
|
|
263
|
+
tt as getElementPosition,
|
|
264
|
+
et as getErrorMessage,
|
|
265
|
+
J as getExcerpt,
|
|
266
|
+
Z as getInitials,
|
|
267
|
+
Ot as getPageLink,
|
|
268
|
+
It as getPageParams,
|
|
269
|
+
p as getQueryParams,
|
|
270
|
+
Tt as getRandomColor,
|
|
271
|
+
xt as getRandomDigits,
|
|
272
|
+
Ft as getRandomElement,
|
|
273
|
+
Ct as getRandomNumber,
|
|
274
|
+
jt as getRandomProperty,
|
|
275
|
+
Bt as getRandomString,
|
|
276
|
+
Ht as getReadTime,
|
|
277
|
+
Ut as getSearchParams,
|
|
278
|
+
H as getShortcutLabel,
|
|
279
|
+
wt as getUrlHostname,
|
|
280
|
+
K as isCuid,
|
|
281
|
+
Rt as isEmptyObject,
|
|
282
|
+
R as isErrorWithMessage,
|
|
283
|
+
ht as isExternalUrl,
|
|
284
|
+
X as isLightColor,
|
|
285
|
+
L as isLocalhostUrl,
|
|
286
|
+
U as isTruthy,
|
|
287
|
+
D as isValidUrl,
|
|
288
|
+
G as joinAsSentence,
|
|
289
|
+
mt as joinUrlPaths,
|
|
290
|
+
Mt as keepNumberInRange,
|
|
291
|
+
Wt as lcFirst,
|
|
292
|
+
$t as maybeParseJson,
|
|
293
|
+
Lt as maybeStringifyJson,
|
|
294
|
+
i as normalizeUrl,
|
|
295
|
+
M as nullsToUndefined,
|
|
296
|
+
Pt as parseNumericValue,
|
|
297
|
+
Dt as pickFromObject,
|
|
298
|
+
Et as preciseRound,
|
|
299
|
+
P as processBatch,
|
|
300
|
+
q as processBatchWithErrorHandling,
|
|
301
|
+
st as publish,
|
|
302
|
+
ot as publishEscape,
|
|
303
|
+
z as range,
|
|
304
|
+
ft as removeHttp,
|
|
305
|
+
I as removeProtocol,
|
|
306
|
+
B as removeQueryParams,
|
|
307
|
+
bt as removeSearchParams,
|
|
308
|
+
gt as removeTrailingSlash,
|
|
309
|
+
_ as setInputValue,
|
|
310
|
+
T as setQueryParams,
|
|
311
|
+
y as sleep,
|
|
312
|
+
V as slugify,
|
|
313
|
+
Nt as sortObject,
|
|
314
|
+
vt as sortObjectKeys,
|
|
315
|
+
S as splitArrayIntoChunks,
|
|
316
|
+
w as stripHtml,
|
|
317
|
+
dt as stripTrailingSlash,
|
|
318
|
+
yt as stripURLSubpath,
|
|
319
|
+
rt as subscribe,
|
|
320
|
+
Q as toBase64,
|
|
321
|
+
v as toErrorWithMessage,
|
|
322
|
+
Y as tryCatch,
|
|
323
|
+
kt as ucFirst,
|
|
324
|
+
nt as unsubscribe
|
|
265
325
|
};
|
|
266
326
|
//# sourceMappingURL=index.js.map
|