@oardi/ts-utils 0.0.37 → 0.0.38
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/extensions/array-extensions.d.ts +10 -9
- package/extensions/array-extensions.d.ts.map +1 -1
- package/extensions/date-extensions.d.ts +16 -16
- package/extensions/date-extensions.d.ts.map +1 -1
- package/extensions/index.d.ts +0 -3
- package/extensions/index.d.ts.map +1 -1
- package/extensions/string-extensions.d.ts +8 -7
- package/extensions/string-extensions.d.ts.map +1 -1
- package/index.cjs.js +2 -2
- package/index.es.js +718 -718
- package/index.umd.js +4 -4
- package/package.json +1 -1
package/index.es.js
CHANGED
|
@@ -1,545 +1,174 @@
|
|
|
1
|
-
const Tt =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const Tt = {
|
|
2
|
+
xs: 0,
|
|
3
|
+
sm: 576,
|
|
4
|
+
md: 768,
|
|
5
|
+
lg: 992,
|
|
6
|
+
xl: 1200,
|
|
7
|
+
xxl: 1400,
|
|
8
|
+
xxxl: 1600
|
|
7
9
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
class St {
|
|
11
|
+
static getScreenWidth() {
|
|
12
|
+
return window.innerWidth;
|
|
13
|
+
}
|
|
14
|
+
static getScreenHeight() {
|
|
15
|
+
return window.innerHeight;
|
|
16
|
+
}
|
|
17
|
+
// isScreenSmallerThan
|
|
18
|
+
}
|
|
19
|
+
class U {
|
|
20
|
+
static breakPoints = Tt;
|
|
21
|
+
static listeners = /* @__PURE__ */ new Set();
|
|
22
|
+
static currentBreakpoint = U.getBreakpointByScreenWidth();
|
|
23
|
+
static initialized = !1;
|
|
24
|
+
static resizeTimeout = null;
|
|
25
|
+
/**
|
|
26
|
+
* Liefert den aktuellen Breakpoint anhand der aktuellen Fensterbreite.
|
|
27
|
+
*/
|
|
28
|
+
static getCurrentBreakpoint() {
|
|
29
|
+
return U.getBreakpointByScreenWidth(St.getScreenWidth());
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Gibt den passenden Breakpoint anhand einer gegebenen Breite zurück.
|
|
33
|
+
*/
|
|
34
|
+
static getBreakpointByScreenWidth(t = St.getScreenWidth()) {
|
|
35
|
+
let i = "xs";
|
|
36
|
+
for (const a of Object.keys(U.breakPoints))
|
|
37
|
+
U.breakPoints[a] <= t && (i = a);
|
|
38
|
+
return { breakpoint: i, screenWidth: t };
|
|
39
|
+
}
|
|
40
|
+
isScreenGreaterThan(t) {
|
|
41
|
+
return St.getScreenWidth() > U.breakPoints[t];
|
|
42
|
+
}
|
|
43
|
+
isScreenSmallerThan(t) {
|
|
44
|
+
return St.getScreenWidth() < U.breakPoints[t];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Registriert einen Listener, der bei Breakpoint-Änderung aufgerufen wird.
|
|
48
|
+
*/
|
|
49
|
+
static onResize(t, i = !1) {
|
|
50
|
+
if (U.initialized || U.initResizeListener(), i) {
|
|
51
|
+
const a = (b) => {
|
|
52
|
+
try {
|
|
53
|
+
return t(b);
|
|
54
|
+
} finally {
|
|
55
|
+
U.listeners.delete(a);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
return U.listeners.add(a), () => U.listeners.delete(a);
|
|
59
|
+
}
|
|
60
|
+
return U.listeners.add(t), () => U.listeners.delete(t);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Initialisiert den globalen Resize-Listener.
|
|
64
|
+
*/
|
|
65
|
+
static initResizeListener() {
|
|
66
|
+
U.initialized || (window.addEventListener("resize", () => {
|
|
67
|
+
U.resizeTimeout && window.clearTimeout(U.resizeTimeout), U.resizeTimeout = window.setTimeout(() => {
|
|
68
|
+
const t = U.getCurrentBreakpoint();
|
|
69
|
+
if (t.breakpoint !== U.currentBreakpoint.breakpoint) {
|
|
70
|
+
U.currentBreakpoint = t;
|
|
71
|
+
for (const i of U.listeners)
|
|
72
|
+
i(t);
|
|
73
|
+
}
|
|
74
|
+
}, 150);
|
|
75
|
+
}), U.initialized = !0);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
var H = /* @__PURE__ */ ((s) => (s.opera = "opera", s.firefox = "firefox", s.safari = "safari", s.ie = "ie", s.edgeLegacy = "edgeLegacy", s.edg = "edg", s.chrome = "chrome", s.iOS = "iOS", s.headlessChrome = "headlessChrome", s.nodeRuntime = "nodeRuntime", s.electron = "electron", s))(H || {});
|
|
79
|
+
const Lt = typeof navigator < "u" ? navigator.userAgent : "", ft = Lt.toLowerCase();
|
|
80
|
+
class tt {
|
|
81
|
+
/** check if current environment is running inside a browser */
|
|
82
|
+
static isBrowserEnv() {
|
|
83
|
+
return typeof window < "u" && typeof navigator < "u";
|
|
84
|
+
}
|
|
85
|
+
static isOpera(t = ft) {
|
|
86
|
+
return this.isBrowserEnv() ? t.includes("opr/") || t.includes("opera") : !1;
|
|
87
|
+
}
|
|
88
|
+
static isFirefox(t = ft) {
|
|
89
|
+
return this.isBrowserEnv() ? t.includes("firefox") || typeof globalThis.InstallTrigger < "u" : !1;
|
|
90
|
+
}
|
|
91
|
+
static isSafari(t = ft) {
|
|
92
|
+
if (!this.isBrowserEnv()) return !1;
|
|
93
|
+
const i = navigator.vendor && navigator.vendor.includes("Apple"), a = t.includes("safari"), b = !(t.includes("crios") || t.includes("chrome") || t.includes("android") || t.includes("opr/") || t.includes("edg"));
|
|
94
|
+
return i && a && b;
|
|
95
|
+
}
|
|
96
|
+
static isIOS(t = ft) {
|
|
97
|
+
if (!this.isBrowserEnv()) return !1;
|
|
98
|
+
const i = /iphone|ipad|ipod/.test(t), a = t.includes("macintosh") && navigator.maxTouchPoints > 1;
|
|
99
|
+
return i || a;
|
|
100
|
+
}
|
|
101
|
+
static isEdgeLegacy() {
|
|
102
|
+
return this.isBrowserEnv() ? !!window.StyleMedia && !ft.includes("edg/") : !1;
|
|
103
|
+
}
|
|
104
|
+
static isEdg(t = ft) {
|
|
105
|
+
return this.isBrowserEnv() ? t.includes("edg/") : !1;
|
|
106
|
+
}
|
|
107
|
+
static isIE() {
|
|
108
|
+
return !this.isBrowserEnv() && typeof document > "u" ? !1 : !!document.documentMode;
|
|
109
|
+
}
|
|
110
|
+
static isChrome(t = ft) {
|
|
111
|
+
if (!this.isBrowserEnv()) return !1;
|
|
112
|
+
const i = navigator.vendor && navigator.vendor.includes("Google"), a = t.includes("chrome") || t.includes("crios"), b = !this.isEdg(t) && !this.isOpera(t);
|
|
113
|
+
return i && a && b;
|
|
114
|
+
}
|
|
115
|
+
static isElectron(t = ft) {
|
|
116
|
+
return typeof process < "u" && process.versions?.electron ? !0 : t.includes("electron");
|
|
117
|
+
}
|
|
118
|
+
static isHeadlessChrome(t = ft) {
|
|
119
|
+
return t.includes("headlesschrome");
|
|
120
|
+
}
|
|
121
|
+
static isNodeRuntime() {
|
|
122
|
+
return typeof process < "u" && !!process.versions?.node && !this.isBrowserEnv();
|
|
123
|
+
}
|
|
124
|
+
static getCurrentBrowser() {
|
|
125
|
+
const t = navigator.userAgent.toLowerCase();
|
|
126
|
+
if (typeof navigator > "u") throw new Error("navigator not set");
|
|
127
|
+
if (tt.isOpera()) return H.opera;
|
|
128
|
+
if (tt.isFirefox()) return H.firefox;
|
|
129
|
+
if (tt.isSafari()) return H.safari;
|
|
130
|
+
if (tt.isIE()) return H.ie;
|
|
131
|
+
if (tt.isEdgeLegacy()) return H.edgeLegacy;
|
|
132
|
+
if (tt.isEdg()) return H.edg;
|
|
133
|
+
if (tt.isChrome()) return H.chrome;
|
|
134
|
+
if (tt.isIOS(t)) return H.iOS;
|
|
135
|
+
if (tt.isElectron(t)) return H.electron;
|
|
136
|
+
if (tt.isHeadlessChrome(t)) return H.headlessChrome;
|
|
137
|
+
if (tt.isNodeRuntime()) return H.nodeRuntime;
|
|
138
|
+
throw new Error("Browser could not be detected: " + t);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function se(s) {
|
|
142
|
+
return navigator.clipboard.writeText(s);
|
|
25
143
|
}
|
|
26
144
|
function Ot(s) {
|
|
27
145
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
28
146
|
}
|
|
29
|
-
var kt = { exports: {} }
|
|
30
|
-
|
|
147
|
+
var kt = { exports: {} };
|
|
148
|
+
var zt = kt.exports, Ct;
|
|
149
|
+
function Ft() {
|
|
31
150
|
return Ct || (Ct = 1, (function(s, t) {
|
|
32
|
-
(
|
|
151
|
+
((i, a) => {
|
|
33
152
|
s.exports = a();
|
|
34
|
-
})(
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return m === void 0;
|
|
54
|
-
} }, ut = "en", K = {};
|
|
55
|
-
K[ut] = yt;
|
|
56
|
-
var $ = "$isDayjsObject", e = function(m) {
|
|
57
|
-
return m instanceof g || !(!m || !m[$]);
|
|
58
|
-
}, r = function m(l, d, o) {
|
|
59
|
-
var c;
|
|
60
|
-
if (!l) return ut;
|
|
61
|
-
if (typeof l == "string") {
|
|
62
|
-
var f = l.toLowerCase();
|
|
63
|
-
K[f] && (c = f), d && (K[f] = d, c = f);
|
|
64
|
-
var y = l.split("-");
|
|
65
|
-
if (!c && y.length > 1) return m(y[0]);
|
|
66
|
-
} else {
|
|
67
|
-
var p = l.name;
|
|
68
|
-
K[p] = l, c = p;
|
|
69
|
-
}
|
|
70
|
-
return !o && c && (ut = c), c || !o && ut;
|
|
71
|
-
}, n = function(m, l) {
|
|
72
|
-
if (e(m)) return m.clone();
|
|
73
|
-
var d = typeof l == "object" ? l : {};
|
|
74
|
-
return d.date = m, d.args = arguments, new g(d);
|
|
75
|
-
}, u = bt;
|
|
76
|
-
u.l = r, u.i = e, u.w = function(m, l) {
|
|
77
|
-
return n(m, { locale: l.$L, utc: l.$u, x: l.$x, $offset: l.$offset });
|
|
78
|
-
};
|
|
79
|
-
var g = (function() {
|
|
80
|
-
function m(d) {
|
|
81
|
-
this.$L = r(d.locale, null, !0), this.parse(d), this.$x = this.$x || d.x || {}, this[$] = !0;
|
|
82
|
-
}
|
|
83
|
-
var l = m.prototype;
|
|
84
|
-
return l.parse = function(d) {
|
|
85
|
-
this.$d = (function(o) {
|
|
86
|
-
var c = o.date, f = o.utc;
|
|
87
|
-
if (c === null) return /* @__PURE__ */ new Date(NaN);
|
|
88
|
-
if (u.u(c)) return /* @__PURE__ */ new Date();
|
|
89
|
-
if (c instanceof Date) return new Date(c);
|
|
90
|
-
if (typeof c == "string" && !/Z$/i.test(c)) {
|
|
91
|
-
var y = c.match(ot);
|
|
92
|
-
if (y) {
|
|
93
|
-
var p = y[2] - 1 || 0, v = (y[7] || "0").substring(0, 3);
|
|
94
|
-
return f ? new Date(Date.UTC(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, v)) : new Date(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, v);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return new Date(c);
|
|
98
|
-
})(d), this.init();
|
|
99
|
-
}, l.init = function() {
|
|
100
|
-
var d = this.$d;
|
|
101
|
-
this.$y = d.getFullYear(), this.$M = d.getMonth(), this.$D = d.getDate(), this.$W = d.getDay(), this.$H = d.getHours(), this.$m = d.getMinutes(), this.$s = d.getSeconds(), this.$ms = d.getMilliseconds();
|
|
102
|
-
}, l.$utils = function() {
|
|
103
|
-
return u;
|
|
104
|
-
}, l.isValid = function() {
|
|
105
|
-
return this.$d.toString() !== nt;
|
|
106
|
-
}, l.isSame = function(d, o) {
|
|
107
|
-
var c = n(d);
|
|
108
|
-
return this.startOf(o) <= c && c <= this.endOf(o);
|
|
109
|
-
}, l.isAfter = function(d, o) {
|
|
110
|
-
return n(d) < this.startOf(o);
|
|
111
|
-
}, l.isBefore = function(d, o) {
|
|
112
|
-
return this.endOf(o) < n(d);
|
|
113
|
-
}, l.$g = function(d, o, c) {
|
|
114
|
-
return u.u(d) ? this[o] : this.set(c, d);
|
|
115
|
-
}, l.unix = function() {
|
|
116
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
117
|
-
}, l.valueOf = function() {
|
|
118
|
-
return this.$d.getTime();
|
|
119
|
-
}, l.startOf = function(d, o) {
|
|
120
|
-
var c = this, f = !!u.u(o) || o, y = u.p(d), p = function(x, D) {
|
|
121
|
-
var _ = u.w(c.$u ? Date.UTC(c.$y, D, x) : new Date(c.$y, D, x), c);
|
|
122
|
-
return f ? _ : _.endOf(w);
|
|
123
|
-
}, v = function(x, D) {
|
|
124
|
-
return u.w(c.toDate()[x].apply(c.toDate("s"), (f ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(D)), c);
|
|
125
|
-
}, h = this.$W, O = this.$M, C = this.$D, z = "set" + (this.$u ? "UTC" : "");
|
|
126
|
-
switch (y) {
|
|
127
|
-
case Q:
|
|
128
|
-
return f ? p(1, 0) : p(31, 11);
|
|
129
|
-
case N:
|
|
130
|
-
return f ? p(1, O) : p(0, O + 1);
|
|
131
|
-
case B:
|
|
132
|
-
var Y = this.$locale().weekStart || 0, S = (h < Y ? h + 7 : h) - Y;
|
|
133
|
-
return p(f ? C - S : C + (6 - S), O);
|
|
134
|
-
case w:
|
|
135
|
-
case G:
|
|
136
|
-
return v(z + "Hours", 0);
|
|
137
|
-
case P:
|
|
138
|
-
return v(z + "Minutes", 1);
|
|
139
|
-
case q:
|
|
140
|
-
return v(z + "Seconds", 2);
|
|
141
|
-
case L:
|
|
142
|
-
return v(z + "Milliseconds", 3);
|
|
143
|
-
default:
|
|
144
|
-
return this.clone();
|
|
145
|
-
}
|
|
146
|
-
}, l.endOf = function(d) {
|
|
147
|
-
return this.startOf(d, !1);
|
|
148
|
-
}, l.$set = function(d, o) {
|
|
149
|
-
var c, f = u.p(d), y = "set" + (this.$u ? "UTC" : ""), p = (c = {}, c[w] = y + "Date", c[G] = y + "Date", c[N] = y + "Month", c[Q] = y + "FullYear", c[P] = y + "Hours", c[q] = y + "Minutes", c[L] = y + "Seconds", c[R] = y + "Milliseconds", c)[f], v = f === w ? this.$D + (o - this.$W) : o;
|
|
150
|
-
if (f === N || f === Q) {
|
|
151
|
-
var h = this.clone().set(G, 1);
|
|
152
|
-
h.$d[p](v), h.init(), this.$d = h.set(G, Math.min(this.$D, h.daysInMonth())).$d;
|
|
153
|
-
} else p && this.$d[p](v);
|
|
154
|
-
return this.init(), this;
|
|
155
|
-
}, l.set = function(d, o) {
|
|
156
|
-
return this.clone().$set(d, o);
|
|
157
|
-
}, l.get = function(d) {
|
|
158
|
-
return this[u.p(d)]();
|
|
159
|
-
}, l.add = function(d, o) {
|
|
160
|
-
var c, f = this;
|
|
161
|
-
d = Number(d);
|
|
162
|
-
var y = u.p(o), p = function(O) {
|
|
163
|
-
var C = n(f);
|
|
164
|
-
return u.w(C.date(C.date() + Math.round(O * d)), f);
|
|
165
|
-
};
|
|
166
|
-
if (y === N) return this.set(N, this.$M + d);
|
|
167
|
-
if (y === Q) return this.set(Q, this.$y + d);
|
|
168
|
-
if (y === w) return p(1);
|
|
169
|
-
if (y === B) return p(7);
|
|
170
|
-
var v = (c = {}, c[q] = a, c[P] = b, c[L] = i, c)[y] || 1, h = this.$d.getTime() + d * v;
|
|
171
|
-
return u.w(h, this);
|
|
172
|
-
}, l.subtract = function(d, o) {
|
|
173
|
-
return this.add(-1 * d, o);
|
|
174
|
-
}, l.format = function(d) {
|
|
175
|
-
var o = this, c = this.$locale();
|
|
176
|
-
if (!this.isValid()) return c.invalidDate || nt;
|
|
177
|
-
var f = d || "YYYY-MM-DDTHH:mm:ssZ", y = u.z(this), p = this.$H, v = this.$m, h = this.$M, O = c.weekdays, C = c.months, z = c.meridiem, Y = function(D, _, A, F) {
|
|
178
|
-
return D && (D[_] || D(o, f)) || A[_].slice(0, F);
|
|
179
|
-
}, S = function(D) {
|
|
180
|
-
return u.s(p % 12 || 12, D, "0");
|
|
181
|
-
}, x = z || function(D, _, A) {
|
|
182
|
-
var F = D < 12 ? "AM" : "PM";
|
|
183
|
-
return A ? F.toLowerCase() : F;
|
|
184
|
-
};
|
|
185
|
-
return f.replace(ht, (function(D, _) {
|
|
186
|
-
return _ || (function(A) {
|
|
187
|
-
switch (A) {
|
|
188
|
-
case "YY":
|
|
189
|
-
return String(o.$y).slice(-2);
|
|
190
|
-
case "YYYY":
|
|
191
|
-
return u.s(o.$y, 4, "0");
|
|
192
|
-
case "M":
|
|
193
|
-
return h + 1;
|
|
194
|
-
case "MM":
|
|
195
|
-
return u.s(h + 1, 2, "0");
|
|
196
|
-
case "MMM":
|
|
197
|
-
return Y(c.monthsShort, h, C, 3);
|
|
198
|
-
case "MMMM":
|
|
199
|
-
return Y(C, h);
|
|
200
|
-
case "D":
|
|
201
|
-
return o.$D;
|
|
202
|
-
case "DD":
|
|
203
|
-
return u.s(o.$D, 2, "0");
|
|
204
|
-
case "d":
|
|
205
|
-
return String(o.$W);
|
|
206
|
-
case "dd":
|
|
207
|
-
return Y(c.weekdaysMin, o.$W, O, 2);
|
|
208
|
-
case "ddd":
|
|
209
|
-
return Y(c.weekdaysShort, o.$W, O, 3);
|
|
210
|
-
case "dddd":
|
|
211
|
-
return O[o.$W];
|
|
212
|
-
case "H":
|
|
213
|
-
return String(p);
|
|
214
|
-
case "HH":
|
|
215
|
-
return u.s(p, 2, "0");
|
|
216
|
-
case "h":
|
|
217
|
-
return S(1);
|
|
218
|
-
case "hh":
|
|
219
|
-
return S(2);
|
|
220
|
-
case "a":
|
|
221
|
-
return x(p, v, !0);
|
|
222
|
-
case "A":
|
|
223
|
-
return x(p, v, !1);
|
|
224
|
-
case "m":
|
|
225
|
-
return String(v);
|
|
226
|
-
case "mm":
|
|
227
|
-
return u.s(v, 2, "0");
|
|
228
|
-
case "s":
|
|
229
|
-
return String(o.$s);
|
|
230
|
-
case "ss":
|
|
231
|
-
return u.s(o.$s, 2, "0");
|
|
232
|
-
case "SSS":
|
|
233
|
-
return u.s(o.$ms, 3, "0");
|
|
234
|
-
case "Z":
|
|
235
|
-
return y;
|
|
236
|
-
}
|
|
237
|
-
return null;
|
|
238
|
-
})(D) || y.replace(":", "");
|
|
239
|
-
}));
|
|
240
|
-
}, l.utcOffset = function() {
|
|
241
|
-
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
242
|
-
}, l.diff = function(d, o, c) {
|
|
243
|
-
var f, y = this, p = u.p(o), v = n(d), h = (v.utcOffset() - this.utcOffset()) * a, O = this - v, C = function() {
|
|
244
|
-
return u.m(y, v);
|
|
245
|
-
};
|
|
246
|
-
switch (p) {
|
|
247
|
-
case Q:
|
|
248
|
-
f = C() / 12;
|
|
249
|
-
break;
|
|
250
|
-
case N:
|
|
251
|
-
f = C();
|
|
252
|
-
break;
|
|
253
|
-
case rt:
|
|
254
|
-
f = C() / 3;
|
|
255
|
-
break;
|
|
256
|
-
case B:
|
|
257
|
-
f = (O - h) / 6048e5;
|
|
258
|
-
break;
|
|
259
|
-
case w:
|
|
260
|
-
f = (O - h) / 864e5;
|
|
261
|
-
break;
|
|
262
|
-
case P:
|
|
263
|
-
f = O / b;
|
|
264
|
-
break;
|
|
265
|
-
case q:
|
|
266
|
-
f = O / a;
|
|
267
|
-
break;
|
|
268
|
-
case L:
|
|
269
|
-
f = O / i;
|
|
270
|
-
break;
|
|
271
|
-
default:
|
|
272
|
-
f = O;
|
|
273
|
-
}
|
|
274
|
-
return c ? f : u.a(f);
|
|
275
|
-
}, l.daysInMonth = function() {
|
|
276
|
-
return this.endOf(N).$D;
|
|
277
|
-
}, l.$locale = function() {
|
|
278
|
-
return K[this.$L];
|
|
279
|
-
}, l.locale = function(d, o) {
|
|
280
|
-
if (!d) return this.$L;
|
|
281
|
-
var c = this.clone(), f = r(d, o, !0);
|
|
282
|
-
return f && (c.$L = f), c;
|
|
283
|
-
}, l.clone = function() {
|
|
284
|
-
return u.w(this.$d, this);
|
|
285
|
-
}, l.toDate = function() {
|
|
286
|
-
return new Date(this.valueOf());
|
|
287
|
-
}, l.toJSON = function() {
|
|
288
|
-
return this.isValid() ? this.toISOString() : null;
|
|
289
|
-
}, l.toISOString = function() {
|
|
290
|
-
return this.$d.toISOString();
|
|
291
|
-
}, l.toString = function() {
|
|
292
|
-
return this.$d.toUTCString();
|
|
293
|
-
}, m;
|
|
294
|
-
})(), k = g.prototype;
|
|
295
|
-
return n.prototype = k, [["$ms", R], ["$s", L], ["$m", q], ["$H", P], ["$W", w], ["$M", N], ["$y", Q], ["$D", G]].forEach((function(m) {
|
|
296
|
-
k[m[1]] = function(l) {
|
|
297
|
-
return this.$g(l, m[0], m[1]);
|
|
298
|
-
};
|
|
299
|
-
})), n.extend = function(m, l) {
|
|
300
|
-
return m.$i || (m(l, g, n), m.$i = !0), n;
|
|
301
|
-
}, n.locale = r, n.isDayjs = e, n.unix = function(m) {
|
|
302
|
-
return n(1e3 * m);
|
|
303
|
-
}, n.en = K[ut], n.Ls = K, n.p = {}, n;
|
|
304
|
-
}));
|
|
305
|
-
})(kt)), kt.exports;
|
|
306
|
-
}
|
|
307
|
-
var Nt = Yt();
|
|
308
|
-
const X = /* @__PURE__ */ Ot(Nt);
|
|
309
|
-
var Et = { exports: {} }, Wt = Et.exports, $t;
|
|
310
|
-
function qt() {
|
|
311
|
-
return $t || ($t = 1, (function(s, t) {
|
|
312
|
-
(function(i, a) {
|
|
313
|
-
s.exports = a();
|
|
314
|
-
})(Wt, (function() {
|
|
315
|
-
var i = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
|
|
316
|
-
return function(a, b, R) {
|
|
317
|
-
var L = b.prototype, q = L.format;
|
|
318
|
-
R.en.formats = i, L.format = function(P) {
|
|
319
|
-
P === void 0 && (P = "YYYY-MM-DDTHH:mm:ssZ");
|
|
320
|
-
var w = this.$locale().formats, B = (function(N, rt) {
|
|
321
|
-
return N.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(Q, G, nt) {
|
|
322
|
-
var ot = nt && nt.toUpperCase();
|
|
323
|
-
return G || rt[nt] || i[nt] || rt[ot].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(ht, yt, dt) {
|
|
324
|
-
return yt || dt.slice(1);
|
|
325
|
-
}));
|
|
326
|
-
}));
|
|
327
|
-
})(P, w === void 0 ? {} : w);
|
|
328
|
-
return q.call(this, B);
|
|
329
|
-
};
|
|
330
|
-
};
|
|
331
|
-
}));
|
|
332
|
-
})(Et)), Et.exports;
|
|
333
|
-
}
|
|
334
|
-
var Pt = qt();
|
|
335
|
-
const Bt = /* @__PURE__ */ Ot(Pt);
|
|
336
|
-
X.extend(Bt);
|
|
337
|
-
function ae() {
|
|
338
|
-
Date.prototype.add = function(s, t) {
|
|
339
|
-
return X(this).add(s, t).toDate();
|
|
340
|
-
}, Date.prototype.diff = function(s, t) {
|
|
341
|
-
return X(this).diff(s, t);
|
|
342
|
-
}, Date.prototype.endOf = function(s) {
|
|
343
|
-
return X(this).endOf(s).toDate();
|
|
344
|
-
}, Date.prototype.firstDayOfMonth = function() {
|
|
345
|
-
return X(this).startOf("month").toDate();
|
|
346
|
-
}, Date.prototype.isAfter = function(s, t) {
|
|
347
|
-
return X(this).isAfter(s, t);
|
|
348
|
-
}, Date.prototype.isBefore = function(s, t) {
|
|
349
|
-
return X(this).isBefore(s, t);
|
|
350
|
-
}, Date.prototype.format = function(s) {
|
|
351
|
-
return X(this).format(s);
|
|
352
|
-
}, Date.prototype.isValid = function() {
|
|
353
|
-
return X(this).isValid();
|
|
354
|
-
}, Date.prototype.subtract = function(s, t) {
|
|
355
|
-
return X(this).subtract(s, t).toDate();
|
|
356
|
-
}, Date.prototype.lastDayOfMonth = function() {
|
|
357
|
-
return X(this).endOf("month").toDate();
|
|
358
|
-
}, Date.prototype.set = function(s, t) {
|
|
359
|
-
return X(this).set(s, t).toDate();
|
|
360
|
-
}, Date.prototype.startOf = function(s) {
|
|
361
|
-
return X(this).startOf(s).toDate();
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
function oe() {
|
|
365
|
-
String.prototype.capitalize = function() {
|
|
366
|
-
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
367
|
-
}, String.prototype.isNumber = function() {
|
|
368
|
-
return !isNaN(Number(this)) && this.trim() !== "";
|
|
369
|
-
}, String.prototype.isEmpty = function() {
|
|
370
|
-
return this === void 0 || !this || this.length === 0;
|
|
371
|
-
}, String.prototype.stripTags = function() {
|
|
372
|
-
return new DOMParser().parseFromString(this.toString(), "text/html").body.textContent || "";
|
|
373
|
-
};
|
|
374
|
-
}
|
|
375
|
-
const Kt = {
|
|
376
|
-
xs: 0,
|
|
377
|
-
sm: 576,
|
|
378
|
-
md: 768,
|
|
379
|
-
lg: 992,
|
|
380
|
-
xl: 1200,
|
|
381
|
-
xxl: 1400,
|
|
382
|
-
xxxl: 1600
|
|
383
|
-
};
|
|
384
|
-
class St {
|
|
385
|
-
static getScreenWidth() {
|
|
386
|
-
return window.innerWidth;
|
|
387
|
-
}
|
|
388
|
-
static getScreenHeight() {
|
|
389
|
-
return window.innerHeight;
|
|
390
|
-
}
|
|
391
|
-
// isScreenSmallerThan
|
|
392
|
-
}
|
|
393
|
-
class U {
|
|
394
|
-
static breakPoints = Kt;
|
|
395
|
-
static listeners = /* @__PURE__ */ new Set();
|
|
396
|
-
static currentBreakpoint = U.getBreakpointByScreenWidth();
|
|
397
|
-
static initialized = !1;
|
|
398
|
-
static resizeTimeout = null;
|
|
399
|
-
/**
|
|
400
|
-
* Liefert den aktuellen Breakpoint anhand der aktuellen Fensterbreite.
|
|
401
|
-
*/
|
|
402
|
-
static getCurrentBreakpoint() {
|
|
403
|
-
return U.getBreakpointByScreenWidth(St.getScreenWidth());
|
|
404
|
-
}
|
|
405
|
-
/**
|
|
406
|
-
* Gibt den passenden Breakpoint anhand einer gegebenen Breite zurück.
|
|
407
|
-
*/
|
|
408
|
-
static getBreakpointByScreenWidth(t = St.getScreenWidth()) {
|
|
409
|
-
let i = "xs";
|
|
410
|
-
for (const a of Object.keys(U.breakPoints))
|
|
411
|
-
U.breakPoints[a] <= t && (i = a);
|
|
412
|
-
return { breakpoint: i, screenWidth: t };
|
|
413
|
-
}
|
|
414
|
-
isScreenGreaterThan(t) {
|
|
415
|
-
return St.getScreenWidth() > U.breakPoints[t];
|
|
416
|
-
}
|
|
417
|
-
isScreenSmallerThan(t) {
|
|
418
|
-
return St.getScreenWidth() < U.breakPoints[t];
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* Registriert einen Listener, der bei Breakpoint-Änderung aufgerufen wird.
|
|
422
|
-
*/
|
|
423
|
-
static onResize(t, i = !1) {
|
|
424
|
-
if (U.initialized || U.initResizeListener(), i) {
|
|
425
|
-
const a = (b) => {
|
|
426
|
-
try {
|
|
427
|
-
return t(b);
|
|
428
|
-
} finally {
|
|
429
|
-
U.listeners.delete(a);
|
|
430
|
-
}
|
|
431
|
-
};
|
|
432
|
-
return U.listeners.add(a), () => U.listeners.delete(a);
|
|
433
|
-
}
|
|
434
|
-
return U.listeners.add(t), () => U.listeners.delete(t);
|
|
435
|
-
}
|
|
436
|
-
/**
|
|
437
|
-
* Initialisiert den globalen Resize-Listener.
|
|
438
|
-
*/
|
|
439
|
-
static initResizeListener() {
|
|
440
|
-
U.initialized || (window.addEventListener("resize", () => {
|
|
441
|
-
U.resizeTimeout && window.clearTimeout(U.resizeTimeout), U.resizeTimeout = window.setTimeout(() => {
|
|
442
|
-
const t = U.getCurrentBreakpoint();
|
|
443
|
-
if (t.breakpoint !== U.currentBreakpoint.breakpoint) {
|
|
444
|
-
U.currentBreakpoint = t;
|
|
445
|
-
for (const i of U.listeners)
|
|
446
|
-
i(t);
|
|
447
|
-
}
|
|
448
|
-
}, 150);
|
|
449
|
-
}), U.initialized = !0);
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
var H = /* @__PURE__ */ ((s) => (s.opera = "opera", s.firefox = "firefox", s.safari = "safari", s.ie = "ie", s.edgeLegacy = "edgeLegacy", s.edg = "edg", s.chrome = "chrome", s.iOS = "iOS", s.headlessChrome = "headlessChrome", s.nodeRuntime = "nodeRuntime", s.electron = "electron", s))(H || {});
|
|
453
|
-
const Jt = typeof navigator < "u" ? navigator.userAgent : "", ft = Jt.toLowerCase();
|
|
454
|
-
class tt {
|
|
455
|
-
/** check if current environment is running inside a browser */
|
|
456
|
-
static isBrowserEnv() {
|
|
457
|
-
return typeof window < "u" && typeof navigator < "u";
|
|
458
|
-
}
|
|
459
|
-
static isOpera(t = ft) {
|
|
460
|
-
return this.isBrowserEnv() ? t.includes("opr/") || t.includes("opera") : !1;
|
|
461
|
-
}
|
|
462
|
-
static isFirefox(t = ft) {
|
|
463
|
-
return this.isBrowserEnv() ? t.includes("firefox") || typeof globalThis.InstallTrigger < "u" : !1;
|
|
464
|
-
}
|
|
465
|
-
static isSafari(t = ft) {
|
|
466
|
-
if (!this.isBrowserEnv()) return !1;
|
|
467
|
-
const i = navigator.vendor && navigator.vendor.includes("Apple"), a = t.includes("safari"), b = !(t.includes("crios") || t.includes("chrome") || t.includes("android") || t.includes("opr/") || t.includes("edg"));
|
|
468
|
-
return i && a && b;
|
|
469
|
-
}
|
|
470
|
-
static isIOS(t = ft) {
|
|
471
|
-
if (!this.isBrowserEnv()) return !1;
|
|
472
|
-
const i = /iphone|ipad|ipod/.test(t), a = t.includes("macintosh") && navigator.maxTouchPoints > 1;
|
|
473
|
-
return i || a;
|
|
474
|
-
}
|
|
475
|
-
static isEdgeLegacy() {
|
|
476
|
-
return this.isBrowserEnv() ? !!window.StyleMedia && !ft.includes("edg/") : !1;
|
|
477
|
-
}
|
|
478
|
-
static isEdg(t = ft) {
|
|
479
|
-
return this.isBrowserEnv() ? t.includes("edg/") : !1;
|
|
480
|
-
}
|
|
481
|
-
static isIE() {
|
|
482
|
-
return !this.isBrowserEnv() && typeof document > "u" ? !1 : !!document.documentMode;
|
|
483
|
-
}
|
|
484
|
-
static isChrome(t = ft) {
|
|
485
|
-
if (!this.isBrowserEnv()) return !1;
|
|
486
|
-
const i = navigator.vendor && navigator.vendor.includes("Google"), a = t.includes("chrome") || t.includes("crios"), b = !this.isEdg(t) && !this.isOpera(t);
|
|
487
|
-
return i && a && b;
|
|
488
|
-
}
|
|
489
|
-
static isElectron(t = ft) {
|
|
490
|
-
return typeof process < "u" && process.versions?.electron ? !0 : t.includes("electron");
|
|
491
|
-
}
|
|
492
|
-
static isHeadlessChrome(t = ft) {
|
|
493
|
-
return t.includes("headlesschrome");
|
|
494
|
-
}
|
|
495
|
-
static isNodeRuntime() {
|
|
496
|
-
return typeof process < "u" && !!process.versions?.node && !this.isBrowserEnv();
|
|
497
|
-
}
|
|
498
|
-
static getCurrentBrowser() {
|
|
499
|
-
const t = navigator.userAgent.toLowerCase();
|
|
500
|
-
if (typeof navigator > "u") throw new Error("navigator not set");
|
|
501
|
-
if (tt.isOpera()) return H.opera;
|
|
502
|
-
if (tt.isFirefox()) return H.firefox;
|
|
503
|
-
if (tt.isSafari()) return H.safari;
|
|
504
|
-
if (tt.isIE()) return H.ie;
|
|
505
|
-
if (tt.isEdgeLegacy()) return H.edgeLegacy;
|
|
506
|
-
if (tt.isEdg()) return H.edg;
|
|
507
|
-
if (tt.isChrome()) return H.chrome;
|
|
508
|
-
if (tt.isIOS(t)) return H.iOS;
|
|
509
|
-
if (tt.isElectron(t)) return H.electron;
|
|
510
|
-
if (tt.isHeadlessChrome(t)) return H.headlessChrome;
|
|
511
|
-
if (tt.isNodeRuntime()) return H.nodeRuntime;
|
|
512
|
-
throw new Error("Browser could not be detected: " + t);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
function ue(s) {
|
|
516
|
-
return navigator.clipboard.writeText(s);
|
|
517
|
-
}
|
|
518
|
-
var xt = { exports: {} };
|
|
519
|
-
var Qt = xt.exports, At;
|
|
520
|
-
function Vt() {
|
|
521
|
-
return At || (At = 1, (function(s, t) {
|
|
522
|
-
((i, a) => {
|
|
523
|
-
s.exports = a();
|
|
524
|
-
})(Qt, function i() {
|
|
525
|
-
var a = typeof self < "u" ? self : typeof window < "u" ? window : a !== void 0 ? a : {}, b, R = !a.document && !!a.postMessage, L = a.IS_PAPA_WORKER || !1, q = {}, P = 0, w = {};
|
|
526
|
-
function B(e) {
|
|
527
|
-
this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = { data: [], errors: [], meta: {} }, (function(r) {
|
|
528
|
-
var n = ut(r);
|
|
529
|
-
n.chunkSize = parseInt(n.chunkSize), r.step || r.chunk || (n.chunkSize = null), this._handle = new nt(n), (this._handle.streamer = this)._config = n;
|
|
530
|
-
}).call(this, e), this.parseChunk = function(r, n) {
|
|
531
|
-
var u = parseInt(this._config.skipFirstNLines) || 0;
|
|
532
|
-
if (this.isFirstChunk && 0 < u) {
|
|
533
|
-
let k = this._config.newline;
|
|
534
|
-
k || (g = this._config.quoteChar || '"', k = this._handle.guessLineEndings(r, g)), r = [...r.split(k).slice(u)].join(k);
|
|
535
|
-
}
|
|
536
|
-
this.isFirstChunk && $(this._config.beforeFirstChunk) && (g = this._config.beforeFirstChunk(r)) !== void 0 && (r = g), this.isFirstChunk = !1, this._halted = !1;
|
|
537
|
-
var u = this._partialLine + r, g = (this._partialLine = "", this._handle.parse(u, this._baseIndex, !this._finished));
|
|
538
|
-
if (!this._handle.paused() && !this._handle.aborted()) {
|
|
539
|
-
if (r = g.meta.cursor, u = (this._finished || (this._partialLine = u.substring(r - this._baseIndex), this._baseIndex = r), g && g.data && (this._rowCount += g.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), L) a.postMessage({ results: g, workerId: w.WORKER_ID, finished: u });
|
|
540
|
-
else if ($(this._config.chunk) && !n) {
|
|
541
|
-
if (this._config.chunk(g, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
|
|
542
|
-
this._completeResults = g = void 0;
|
|
153
|
+
})(zt, function i() {
|
|
154
|
+
var a = typeof self < "u" ? self : typeof window < "u" ? window : a !== void 0 ? a : {}, b, R = !a.document && !!a.postMessage, L = a.IS_PAPA_WORKER || !1, q = {}, P = 0, w = {};
|
|
155
|
+
function B(e) {
|
|
156
|
+
this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = { data: [], errors: [], meta: {} }, (function(r) {
|
|
157
|
+
var n = ut(r);
|
|
158
|
+
n.chunkSize = parseInt(n.chunkSize), r.step || r.chunk || (n.chunkSize = null), this._handle = new nt(n), (this._handle.streamer = this)._config = n;
|
|
159
|
+
}).call(this, e), this.parseChunk = function(r, n) {
|
|
160
|
+
var u = parseInt(this._config.skipFirstNLines) || 0;
|
|
161
|
+
if (this.isFirstChunk && 0 < u) {
|
|
162
|
+
let k = this._config.newline;
|
|
163
|
+
k || (g = this._config.quoteChar || '"', k = this._handle.guessLineEndings(r, g)), r = [...r.split(k).slice(u)].join(k);
|
|
164
|
+
}
|
|
165
|
+
this.isFirstChunk && $(this._config.beforeFirstChunk) && (g = this._config.beforeFirstChunk(r)) !== void 0 && (r = g), this.isFirstChunk = !1, this._halted = !1;
|
|
166
|
+
var u = this._partialLine + r, g = (this._partialLine = "", this._handle.parse(u, this._baseIndex, !this._finished));
|
|
167
|
+
if (!this._handle.paused() && !this._handle.aborted()) {
|
|
168
|
+
if (r = g.meta.cursor, u = (this._finished || (this._partialLine = u.substring(r - this._baseIndex), this._baseIndex = r), g && g.data && (this._rowCount += g.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), L) a.postMessage({ results: g, workerId: w.WORKER_ID, finished: u });
|
|
169
|
+
else if ($(this._config.chunk) && !n) {
|
|
170
|
+
if (this._config.chunk(g, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
|
|
171
|
+
this._completeResults = g = void 0;
|
|
543
172
|
}
|
|
544
173
|
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(g.data), this._completeResults.errors = this._completeResults.errors.concat(g.errors), this._completeResults.meta = g.meta), this._completed || !u || !$(this._config.complete) || g && g.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = !0), u || g && g.meta.paused || this._nextChunk(), g;
|
|
545
174
|
}
|
|
@@ -925,17 +554,17 @@ function Vt() {
|
|
|
925
554
|
e = e.data, w.WORKER_ID === void 0 && e && (w.WORKER_ID = e.workerId), typeof e.input == "string" ? a.postMessage({ workerId: w.WORKER_ID, results: w.parse(e.input, e.config), finished: !0 }) : (a.File && e.input instanceof File || e.input instanceof Object) && (e = w.parse(e.input, e.config)) && a.postMessage({ workerId: w.WORKER_ID, results: e, finished: !0 });
|
|
926
555
|
}), (N.prototype = Object.create(B.prototype)).constructor = N, (rt.prototype = Object.create(B.prototype)).constructor = rt, (Q.prototype = Object.create(Q.prototype)).constructor = Q, (G.prototype = Object.create(B.prototype)).constructor = G, w;
|
|
927
556
|
});
|
|
928
|
-
})(
|
|
557
|
+
})(kt)), kt.exports;
|
|
929
558
|
}
|
|
930
|
-
var
|
|
931
|
-
const
|
|
932
|
-
class
|
|
559
|
+
var jt = Ft();
|
|
560
|
+
const Ut = /* @__PURE__ */ Ot(jt), { parse: Yt, unparse: Nt } = Ut;
|
|
561
|
+
class ae {
|
|
933
562
|
static unparse(t, i) {
|
|
934
|
-
return
|
|
563
|
+
return Nt(t, i);
|
|
935
564
|
}
|
|
936
565
|
static parse(t) {
|
|
937
566
|
return new Promise((i, a) => {
|
|
938
|
-
|
|
567
|
+
Yt(t, {
|
|
939
568
|
header: !0,
|
|
940
569
|
complete: (b) => i(b),
|
|
941
570
|
error: (b) => a(b)
|
|
@@ -943,8 +572,8 @@ class ce {
|
|
|
943
572
|
});
|
|
944
573
|
}
|
|
945
574
|
}
|
|
946
|
-
async function
|
|
947
|
-
const a = i?.mimeType ??
|
|
575
|
+
async function Wt(s, t, i) {
|
|
576
|
+
const a = i?.mimeType ?? Pt(t), b = qt(s, a);
|
|
948
577
|
if ("showSaveFilePicker" in window && i?.showSaveFilePicker)
|
|
949
578
|
try {
|
|
950
579
|
const P = await (await window.showSaveFilePicker({
|
|
@@ -956,11 +585,11 @@ async function te(s, t, i) {
|
|
|
956
585
|
} catch {
|
|
957
586
|
}
|
|
958
587
|
const R = URL.createObjectURL(b), L = document.createElement("a");
|
|
959
|
-
L.href = R, L.download = t, L.rel = "noopener", L.style.display = "none", document.body.appendChild(L),
|
|
588
|
+
L.href = R, L.download = t, L.rel = "noopener", L.style.display = "none", document.body.appendChild(L), Bt(L), window.setTimeout(() => {
|
|
960
589
|
document.body.removeChild(L), URL.revokeObjectURL(R);
|
|
961
|
-
}, 0),
|
|
590
|
+
}, 0), Kt() && window.open(R, "_blank", "noopener,noreferrer");
|
|
962
591
|
}
|
|
963
|
-
function
|
|
592
|
+
function qt(s, t) {
|
|
964
593
|
if (s instanceof Blob)
|
|
965
594
|
return s.type ? s : new Blob([s], { type: t });
|
|
966
595
|
if (s instanceof ArrayBuffer || s instanceof Uint8Array) {
|
|
@@ -969,7 +598,7 @@ function ee(s, t) {
|
|
|
969
598
|
}
|
|
970
599
|
return new Blob([s], { type: t || "text/plain;charset=utf-8" });
|
|
971
600
|
}
|
|
972
|
-
function
|
|
601
|
+
function Pt(s) {
|
|
973
602
|
switch (It(s).toLowerCase()) {
|
|
974
603
|
case "txt":
|
|
975
604
|
return "text/plain;charset=utf-8";
|
|
@@ -992,172 +621,543 @@ function re(s) {
|
|
|
992
621
|
return "application/octet-stream";
|
|
993
622
|
}
|
|
994
623
|
}
|
|
995
|
-
function It(s) {
|
|
996
|
-
const t = s.lastIndexOf(".");
|
|
997
|
-
return t >= 0 && t < s.length - 1 ? s.slice(t + 1) : "";
|
|
998
|
-
}
|
|
999
|
-
function
|
|
1000
|
-
const t = document.createEvent("MouseEvents");
|
|
1001
|
-
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), s.dispatchEvent(t);
|
|
624
|
+
function It(s) {
|
|
625
|
+
const t = s.lastIndexOf(".");
|
|
626
|
+
return t >= 0 && t < s.length - 1 ? s.slice(t + 1) : "";
|
|
627
|
+
}
|
|
628
|
+
function Bt(s) {
|
|
629
|
+
const t = document.createEvent("MouseEvents");
|
|
630
|
+
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), s.dispatchEvent(t);
|
|
631
|
+
}
|
|
632
|
+
function Kt() {
|
|
633
|
+
const s = navigator.userAgent, t = /iPad|iPhone|iPod/.test(s), i = /^((?!chrome|android).)*safari/i.test(s);
|
|
634
|
+
return t || i;
|
|
635
|
+
}
|
|
636
|
+
class oe {
|
|
637
|
+
static getEnumValue(t, i) {
|
|
638
|
+
if (i in t)
|
|
639
|
+
return t[i];
|
|
640
|
+
throw Error(`${i} not found in ${t}`);
|
|
641
|
+
}
|
|
642
|
+
static getKeyValues(t) {
|
|
643
|
+
return Object.keys(t).filter((i) => !isNaN(Number(i))).map((i) => ({
|
|
644
|
+
key: Number(i),
|
|
645
|
+
value: t[i]
|
|
646
|
+
}));
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
class ue {
|
|
650
|
+
static getFileExtension(t) {
|
|
651
|
+
let i = "";
|
|
652
|
+
const a = t.lastIndexOf(".");
|
|
653
|
+
return a > 0 && a < t.length - 1 && (i = `.${t.substring(a + 1).toLowerCase()}`), i;
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* read content from a file or blob
|
|
657
|
+
*/
|
|
658
|
+
static readAsText(t) {
|
|
659
|
+
const i = new FileReader();
|
|
660
|
+
return new Promise((a, b) => {
|
|
661
|
+
i.onload = () => {
|
|
662
|
+
i.onload = null, i.onerror = null, typeof i.result == "string" ? a(i.result) : b(new Error("Unexpected result type"));
|
|
663
|
+
}, i.onerror = () => {
|
|
664
|
+
const R = i.error ?? new Error("FileReader error");
|
|
665
|
+
i.onload = null, i.onerror = null, b(R);
|
|
666
|
+
}, i.readAsText(t);
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
static readAsArrayBuffer(t) {
|
|
670
|
+
const i = new FileReader();
|
|
671
|
+
return new Promise((a, b) => {
|
|
672
|
+
i.onload = () => {
|
|
673
|
+
i.onload = null, i.onerror = null, i.result instanceof ArrayBuffer ? a(i.result) : b(new Error("Unexpected result type"));
|
|
674
|
+
}, i.onerror = () => {
|
|
675
|
+
const R = i.error ?? new Error("FileReader error");
|
|
676
|
+
i.onload = null, i.onerror = null, b(R);
|
|
677
|
+
}, i.readAsArrayBuffer(t);
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
static readAsDataUrl(t) {
|
|
681
|
+
const i = new FileReader();
|
|
682
|
+
return new Promise((a, b) => {
|
|
683
|
+
i.onload = (R) => {
|
|
684
|
+
a(R);
|
|
685
|
+
}, i.onerror = (R) => b(R), i.readAsDataURL(t);
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
/** usage:
|
|
689
|
+
* const file = new File(['Hello'], 'test.txt');
|
|
690
|
+
* FileHelper.formatFileSize(file.size);
|
|
691
|
+
* */
|
|
692
|
+
static formatFileSize(t, i = 2, a) {
|
|
693
|
+
if (t === 0)
|
|
694
|
+
return "0 Bytes";
|
|
695
|
+
const b = 1024, R = ["Bytes", "KB", "MB", "GB", "TB"];
|
|
696
|
+
let L = Math.floor(Math.log(t) / Math.log(b));
|
|
697
|
+
a && R.includes(a) && (L = R.indexOf(a));
|
|
698
|
+
const q = t / Math.pow(b, L);
|
|
699
|
+
return `${parseFloat(q.toFixed(i))} ${R[L]}`;
|
|
700
|
+
}
|
|
701
|
+
static save(t, i, a) {
|
|
702
|
+
const b = new Blob([t], { type: a });
|
|
703
|
+
Wt(b, i);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
class _t {
|
|
707
|
+
static set(t, i) {
|
|
708
|
+
localStorage.setItem(t, JSON.stringify(i));
|
|
709
|
+
}
|
|
710
|
+
static get(t) {
|
|
711
|
+
let i = null;
|
|
712
|
+
const a = localStorage.getItem(t);
|
|
713
|
+
return a && (i = JSON.parse(a)), i;
|
|
714
|
+
}
|
|
715
|
+
static remove(t) {
|
|
716
|
+
let i = !!_t.get(t);
|
|
717
|
+
return i && localStorage.removeItem(t), i;
|
|
718
|
+
}
|
|
719
|
+
static removeAll() {
|
|
720
|
+
localStorage.clear();
|
|
721
|
+
}
|
|
722
|
+
static getKeysBy(t) {
|
|
723
|
+
return Object.keys(localStorage).filter((i) => i.startsWith(t));
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
var mt = /* @__PURE__ */ ((s) => (s.log = "log", s.info = "info", s.warn = "warn", s.debug = "debug", s.error = "error", s))(mt || {});
|
|
727
|
+
class V {
|
|
728
|
+
static listeners = /* @__PURE__ */ new Set();
|
|
729
|
+
static enabled = !0;
|
|
730
|
+
static log(...t) {
|
|
731
|
+
V.doLog(mt.log, t);
|
|
732
|
+
}
|
|
733
|
+
static info(...t) {
|
|
734
|
+
V.doLog(mt.info, t);
|
|
735
|
+
}
|
|
736
|
+
static warn(...t) {
|
|
737
|
+
V.doLog(mt.warn, t);
|
|
738
|
+
}
|
|
739
|
+
static debug(...t) {
|
|
740
|
+
V.doLog(mt.debug, t);
|
|
741
|
+
}
|
|
742
|
+
static error(...t) {
|
|
743
|
+
V.doLog(mt.error, t);
|
|
744
|
+
}
|
|
745
|
+
static clearListeners() {
|
|
746
|
+
V.listeners.clear();
|
|
747
|
+
}
|
|
748
|
+
static setEnabled(t) {
|
|
749
|
+
V.enabled = t;
|
|
750
|
+
}
|
|
751
|
+
static doLog(t, i) {
|
|
752
|
+
if (!V.enabled) return;
|
|
753
|
+
const a = {
|
|
754
|
+
type: t,
|
|
755
|
+
args: i,
|
|
756
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
757
|
+
};
|
|
758
|
+
for (const b of V.listeners)
|
|
759
|
+
try {
|
|
760
|
+
if (b(a) === !1)
|
|
761
|
+
return;
|
|
762
|
+
} catch {
|
|
763
|
+
}
|
|
764
|
+
console[t].apply(console, i);
|
|
765
|
+
}
|
|
766
|
+
static onLog(t, i = !1) {
|
|
767
|
+
if (i) {
|
|
768
|
+
const a = (b) => {
|
|
769
|
+
try {
|
|
770
|
+
return t(b);
|
|
771
|
+
} finally {
|
|
772
|
+
V.listeners.delete(a);
|
|
773
|
+
}
|
|
774
|
+
};
|
|
775
|
+
return V.listeners.add(a), () => V.listeners.delete(a);
|
|
776
|
+
}
|
|
777
|
+
return V.listeners.add(t), () => V.listeners.delete(t);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
const Jt = (s, t, i) => s.localeCompare(t) * (i ? 1 : -1), Qt = (s, t) => s < t ? -1 : s === t ? 0 : 1, Vt = (s, t, i) => Qt(s, t) * (i ? 1 : -1), Zt = (s, t, i) => {
|
|
781
|
+
let a = 0;
|
|
782
|
+
return typeof s == "string" && typeof t == "string" ? a = Jt(s, t, i) : a = Vt(s, t, i), a;
|
|
783
|
+
}, Gt = (s, t, i, a) => {
|
|
784
|
+
const b = i(s), R = i(t);
|
|
785
|
+
return Zt(b, R, a);
|
|
786
|
+
};
|
|
787
|
+
class ce {
|
|
788
|
+
static get(t) {
|
|
789
|
+
return _t.get(t);
|
|
790
|
+
}
|
|
791
|
+
static set(t, i) {
|
|
792
|
+
_t.set(t, i);
|
|
793
|
+
}
|
|
794
|
+
static remove(t) {
|
|
795
|
+
_t.remove(t);
|
|
796
|
+
}
|
|
1002
797
|
}
|
|
1003
|
-
function
|
|
1004
|
-
|
|
1005
|
-
|
|
798
|
+
function fe() {
|
|
799
|
+
Array.prototype.distinct = function(s) {
|
|
800
|
+
return s ? this.filter((i, a, b) => b.findIndex((R) => s(R, i)) === a) : this.filter((i, a, b) => b.indexOf(i) === a);
|
|
801
|
+
}, Array.prototype.filterBy = function(s) {
|
|
802
|
+
return this.filter((t) => s(t));
|
|
803
|
+
}, Array.prototype.first = function() {
|
|
804
|
+
return this.length > 0 ? this[0] : null;
|
|
805
|
+
}, Array.prototype.groupBy = function(s) {
|
|
806
|
+
return this.reduce((t, i) => {
|
|
807
|
+
const a = s(i);
|
|
808
|
+
return t[a] || (t[a] = []), t[a].push(i), t;
|
|
809
|
+
}, {});
|
|
810
|
+
}, Array.prototype.orderBy = function(s, t = !0) {
|
|
811
|
+
return this?.sort((i, a) => Gt(i, a, s, t)), this;
|
|
812
|
+
}, Array.prototype.removeBy = function(s, t) {
|
|
813
|
+
return this.filter((i) => s(i) !== t);
|
|
814
|
+
};
|
|
1006
815
|
}
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
816
|
+
var Et = { exports: {} }, Xt = Et.exports, $t;
|
|
817
|
+
function Ht() {
|
|
818
|
+
return $t || ($t = 1, (function(s, t) {
|
|
819
|
+
(function(i, a) {
|
|
820
|
+
s.exports = a();
|
|
821
|
+
})(Xt, (function() {
|
|
822
|
+
var i = 1e3, a = 6e4, b = 36e5, R = "millisecond", L = "second", q = "minute", P = "hour", w = "day", B = "week", N = "month", rt = "quarter", Q = "year", G = "date", nt = "Invalid Date", ot = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, ht = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, yt = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(m) {
|
|
823
|
+
var l = ["th", "st", "nd", "rd"], d = m % 100;
|
|
824
|
+
return "[" + m + (l[(d - 20) % 10] || l[d] || l[0]) + "]";
|
|
825
|
+
} }, dt = function(m, l, d) {
|
|
826
|
+
var o = String(m);
|
|
827
|
+
return !o || o.length >= l ? m : "" + Array(l + 1 - o.length).join(d) + m;
|
|
828
|
+
}, bt = { s: dt, z: function(m) {
|
|
829
|
+
var l = -m.utcOffset(), d = Math.abs(l), o = Math.floor(d / 60), c = d % 60;
|
|
830
|
+
return (l <= 0 ? "+" : "-") + dt(o, 2, "0") + ":" + dt(c, 2, "0");
|
|
831
|
+
}, m: function m(l, d) {
|
|
832
|
+
if (l.date() < d.date()) return -m(d, l);
|
|
833
|
+
var o = 12 * (d.year() - l.year()) + (d.month() - l.month()), c = l.clone().add(o, N), f = d - c < 0, y = l.clone().add(o + (f ? -1 : 1), N);
|
|
834
|
+
return +(-(o + (d - c) / (f ? c - y : y - c)) || 0);
|
|
835
|
+
}, a: function(m) {
|
|
836
|
+
return m < 0 ? Math.ceil(m) || 0 : Math.floor(m);
|
|
837
|
+
}, p: function(m) {
|
|
838
|
+
return { M: N, y: Q, w: B, d: w, D: G, h: P, m: q, s: L, ms: R, Q: rt }[m] || String(m || "").toLowerCase().replace(/s$/, "");
|
|
839
|
+
}, u: function(m) {
|
|
840
|
+
return m === void 0;
|
|
841
|
+
} }, ut = "en", K = {};
|
|
842
|
+
K[ut] = yt;
|
|
843
|
+
var $ = "$isDayjsObject", e = function(m) {
|
|
844
|
+
return m instanceof g || !(!m || !m[$]);
|
|
845
|
+
}, r = function m(l, d, o) {
|
|
846
|
+
var c;
|
|
847
|
+
if (!l) return ut;
|
|
848
|
+
if (typeof l == "string") {
|
|
849
|
+
var f = l.toLowerCase();
|
|
850
|
+
K[f] && (c = f), d && (K[f] = d, c = f);
|
|
851
|
+
var y = l.split("-");
|
|
852
|
+
if (!c && y.length > 1) return m(y[0]);
|
|
853
|
+
} else {
|
|
854
|
+
var p = l.name;
|
|
855
|
+
K[p] = l, c = p;
|
|
856
|
+
}
|
|
857
|
+
return !o && c && (ut = c), c || !o && ut;
|
|
858
|
+
}, n = function(m, l) {
|
|
859
|
+
if (e(m)) return m.clone();
|
|
860
|
+
var d = typeof l == "object" ? l : {};
|
|
861
|
+
return d.date = m, d.args = arguments, new g(d);
|
|
862
|
+
}, u = bt;
|
|
863
|
+
u.l = r, u.i = e, u.w = function(m, l) {
|
|
864
|
+
return n(m, { locale: l.$L, utc: l.$u, x: l.$x, $offset: l.$offset });
|
|
865
|
+
};
|
|
866
|
+
var g = (function() {
|
|
867
|
+
function m(d) {
|
|
868
|
+
this.$L = r(d.locale, null, !0), this.parse(d), this.$x = this.$x || d.x || {}, this[$] = !0;
|
|
869
|
+
}
|
|
870
|
+
var l = m.prototype;
|
|
871
|
+
return l.parse = function(d) {
|
|
872
|
+
this.$d = (function(o) {
|
|
873
|
+
var c = o.date, f = o.utc;
|
|
874
|
+
if (c === null) return /* @__PURE__ */ new Date(NaN);
|
|
875
|
+
if (u.u(c)) return /* @__PURE__ */ new Date();
|
|
876
|
+
if (c instanceof Date) return new Date(c);
|
|
877
|
+
if (typeof c == "string" && !/Z$/i.test(c)) {
|
|
878
|
+
var y = c.match(ot);
|
|
879
|
+
if (y) {
|
|
880
|
+
var p = y[2] - 1 || 0, v = (y[7] || "0").substring(0, 3);
|
|
881
|
+
return f ? new Date(Date.UTC(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, v)) : new Date(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, v);
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
return new Date(c);
|
|
885
|
+
})(d), this.init();
|
|
886
|
+
}, l.init = function() {
|
|
887
|
+
var d = this.$d;
|
|
888
|
+
this.$y = d.getFullYear(), this.$M = d.getMonth(), this.$D = d.getDate(), this.$W = d.getDay(), this.$H = d.getHours(), this.$m = d.getMinutes(), this.$s = d.getSeconds(), this.$ms = d.getMilliseconds();
|
|
889
|
+
}, l.$utils = function() {
|
|
890
|
+
return u;
|
|
891
|
+
}, l.isValid = function() {
|
|
892
|
+
return this.$d.toString() !== nt;
|
|
893
|
+
}, l.isSame = function(d, o) {
|
|
894
|
+
var c = n(d);
|
|
895
|
+
return this.startOf(o) <= c && c <= this.endOf(o);
|
|
896
|
+
}, l.isAfter = function(d, o) {
|
|
897
|
+
return n(d) < this.startOf(o);
|
|
898
|
+
}, l.isBefore = function(d, o) {
|
|
899
|
+
return this.endOf(o) < n(d);
|
|
900
|
+
}, l.$g = function(d, o, c) {
|
|
901
|
+
return u.u(d) ? this[o] : this.set(c, d);
|
|
902
|
+
}, l.unix = function() {
|
|
903
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
904
|
+
}, l.valueOf = function() {
|
|
905
|
+
return this.$d.getTime();
|
|
906
|
+
}, l.startOf = function(d, o) {
|
|
907
|
+
var c = this, f = !!u.u(o) || o, y = u.p(d), p = function(x, D) {
|
|
908
|
+
var _ = u.w(c.$u ? Date.UTC(c.$y, D, x) : new Date(c.$y, D, x), c);
|
|
909
|
+
return f ? _ : _.endOf(w);
|
|
910
|
+
}, v = function(x, D) {
|
|
911
|
+
return u.w(c.toDate()[x].apply(c.toDate("s"), (f ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(D)), c);
|
|
912
|
+
}, h = this.$W, O = this.$M, C = this.$D, z = "set" + (this.$u ? "UTC" : "");
|
|
913
|
+
switch (y) {
|
|
914
|
+
case Q:
|
|
915
|
+
return f ? p(1, 0) : p(31, 11);
|
|
916
|
+
case N:
|
|
917
|
+
return f ? p(1, O) : p(0, O + 1);
|
|
918
|
+
case B:
|
|
919
|
+
var Y = this.$locale().weekStart || 0, S = (h < Y ? h + 7 : h) - Y;
|
|
920
|
+
return p(f ? C - S : C + (6 - S), O);
|
|
921
|
+
case w:
|
|
922
|
+
case G:
|
|
923
|
+
return v(z + "Hours", 0);
|
|
924
|
+
case P:
|
|
925
|
+
return v(z + "Minutes", 1);
|
|
926
|
+
case q:
|
|
927
|
+
return v(z + "Seconds", 2);
|
|
928
|
+
case L:
|
|
929
|
+
return v(z + "Milliseconds", 3);
|
|
930
|
+
default:
|
|
931
|
+
return this.clone();
|
|
932
|
+
}
|
|
933
|
+
}, l.endOf = function(d) {
|
|
934
|
+
return this.startOf(d, !1);
|
|
935
|
+
}, l.$set = function(d, o) {
|
|
936
|
+
var c, f = u.p(d), y = "set" + (this.$u ? "UTC" : ""), p = (c = {}, c[w] = y + "Date", c[G] = y + "Date", c[N] = y + "Month", c[Q] = y + "FullYear", c[P] = y + "Hours", c[q] = y + "Minutes", c[L] = y + "Seconds", c[R] = y + "Milliseconds", c)[f], v = f === w ? this.$D + (o - this.$W) : o;
|
|
937
|
+
if (f === N || f === Q) {
|
|
938
|
+
var h = this.clone().set(G, 1);
|
|
939
|
+
h.$d[p](v), h.init(), this.$d = h.set(G, Math.min(this.$D, h.daysInMonth())).$d;
|
|
940
|
+
} else p && this.$d[p](v);
|
|
941
|
+
return this.init(), this;
|
|
942
|
+
}, l.set = function(d, o) {
|
|
943
|
+
return this.clone().$set(d, o);
|
|
944
|
+
}, l.get = function(d) {
|
|
945
|
+
return this[u.p(d)]();
|
|
946
|
+
}, l.add = function(d, o) {
|
|
947
|
+
var c, f = this;
|
|
948
|
+
d = Number(d);
|
|
949
|
+
var y = u.p(o), p = function(O) {
|
|
950
|
+
var C = n(f);
|
|
951
|
+
return u.w(C.date(C.date() + Math.round(O * d)), f);
|
|
952
|
+
};
|
|
953
|
+
if (y === N) return this.set(N, this.$M + d);
|
|
954
|
+
if (y === Q) return this.set(Q, this.$y + d);
|
|
955
|
+
if (y === w) return p(1);
|
|
956
|
+
if (y === B) return p(7);
|
|
957
|
+
var v = (c = {}, c[q] = a, c[P] = b, c[L] = i, c)[y] || 1, h = this.$d.getTime() + d * v;
|
|
958
|
+
return u.w(h, this);
|
|
959
|
+
}, l.subtract = function(d, o) {
|
|
960
|
+
return this.add(-1 * d, o);
|
|
961
|
+
}, l.format = function(d) {
|
|
962
|
+
var o = this, c = this.$locale();
|
|
963
|
+
if (!this.isValid()) return c.invalidDate || nt;
|
|
964
|
+
var f = d || "YYYY-MM-DDTHH:mm:ssZ", y = u.z(this), p = this.$H, v = this.$m, h = this.$M, O = c.weekdays, C = c.months, z = c.meridiem, Y = function(D, _, A, F) {
|
|
965
|
+
return D && (D[_] || D(o, f)) || A[_].slice(0, F);
|
|
966
|
+
}, S = function(D) {
|
|
967
|
+
return u.s(p % 12 || 12, D, "0");
|
|
968
|
+
}, x = z || function(D, _, A) {
|
|
969
|
+
var F = D < 12 ? "AM" : "PM";
|
|
970
|
+
return A ? F.toLowerCase() : F;
|
|
971
|
+
};
|
|
972
|
+
return f.replace(ht, (function(D, _) {
|
|
973
|
+
return _ || (function(A) {
|
|
974
|
+
switch (A) {
|
|
975
|
+
case "YY":
|
|
976
|
+
return String(o.$y).slice(-2);
|
|
977
|
+
case "YYYY":
|
|
978
|
+
return u.s(o.$y, 4, "0");
|
|
979
|
+
case "M":
|
|
980
|
+
return h + 1;
|
|
981
|
+
case "MM":
|
|
982
|
+
return u.s(h + 1, 2, "0");
|
|
983
|
+
case "MMM":
|
|
984
|
+
return Y(c.monthsShort, h, C, 3);
|
|
985
|
+
case "MMMM":
|
|
986
|
+
return Y(C, h);
|
|
987
|
+
case "D":
|
|
988
|
+
return o.$D;
|
|
989
|
+
case "DD":
|
|
990
|
+
return u.s(o.$D, 2, "0");
|
|
991
|
+
case "d":
|
|
992
|
+
return String(o.$W);
|
|
993
|
+
case "dd":
|
|
994
|
+
return Y(c.weekdaysMin, o.$W, O, 2);
|
|
995
|
+
case "ddd":
|
|
996
|
+
return Y(c.weekdaysShort, o.$W, O, 3);
|
|
997
|
+
case "dddd":
|
|
998
|
+
return O[o.$W];
|
|
999
|
+
case "H":
|
|
1000
|
+
return String(p);
|
|
1001
|
+
case "HH":
|
|
1002
|
+
return u.s(p, 2, "0");
|
|
1003
|
+
case "h":
|
|
1004
|
+
return S(1);
|
|
1005
|
+
case "hh":
|
|
1006
|
+
return S(2);
|
|
1007
|
+
case "a":
|
|
1008
|
+
return x(p, v, !0);
|
|
1009
|
+
case "A":
|
|
1010
|
+
return x(p, v, !1);
|
|
1011
|
+
case "m":
|
|
1012
|
+
return String(v);
|
|
1013
|
+
case "mm":
|
|
1014
|
+
return u.s(v, 2, "0");
|
|
1015
|
+
case "s":
|
|
1016
|
+
return String(o.$s);
|
|
1017
|
+
case "ss":
|
|
1018
|
+
return u.s(o.$s, 2, "0");
|
|
1019
|
+
case "SSS":
|
|
1020
|
+
return u.s(o.$ms, 3, "0");
|
|
1021
|
+
case "Z":
|
|
1022
|
+
return y;
|
|
1023
|
+
}
|
|
1024
|
+
return null;
|
|
1025
|
+
})(D) || y.replace(":", "");
|
|
1026
|
+
}));
|
|
1027
|
+
}, l.utcOffset = function() {
|
|
1028
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1029
|
+
}, l.diff = function(d, o, c) {
|
|
1030
|
+
var f, y = this, p = u.p(o), v = n(d), h = (v.utcOffset() - this.utcOffset()) * a, O = this - v, C = function() {
|
|
1031
|
+
return u.m(y, v);
|
|
1032
|
+
};
|
|
1033
|
+
switch (p) {
|
|
1034
|
+
case Q:
|
|
1035
|
+
f = C() / 12;
|
|
1036
|
+
break;
|
|
1037
|
+
case N:
|
|
1038
|
+
f = C();
|
|
1039
|
+
break;
|
|
1040
|
+
case rt:
|
|
1041
|
+
f = C() / 3;
|
|
1042
|
+
break;
|
|
1043
|
+
case B:
|
|
1044
|
+
f = (O - h) / 6048e5;
|
|
1045
|
+
break;
|
|
1046
|
+
case w:
|
|
1047
|
+
f = (O - h) / 864e5;
|
|
1048
|
+
break;
|
|
1049
|
+
case P:
|
|
1050
|
+
f = O / b;
|
|
1051
|
+
break;
|
|
1052
|
+
case q:
|
|
1053
|
+
f = O / a;
|
|
1054
|
+
break;
|
|
1055
|
+
case L:
|
|
1056
|
+
f = O / i;
|
|
1057
|
+
break;
|
|
1058
|
+
default:
|
|
1059
|
+
f = O;
|
|
1060
|
+
}
|
|
1061
|
+
return c ? f : u.a(f);
|
|
1062
|
+
}, l.daysInMonth = function() {
|
|
1063
|
+
return this.endOf(N).$D;
|
|
1064
|
+
}, l.$locale = function() {
|
|
1065
|
+
return K[this.$L];
|
|
1066
|
+
}, l.locale = function(d, o) {
|
|
1067
|
+
if (!d) return this.$L;
|
|
1068
|
+
var c = this.clone(), f = r(d, o, !0);
|
|
1069
|
+
return f && (c.$L = f), c;
|
|
1070
|
+
}, l.clone = function() {
|
|
1071
|
+
return u.w(this.$d, this);
|
|
1072
|
+
}, l.toDate = function() {
|
|
1073
|
+
return new Date(this.valueOf());
|
|
1074
|
+
}, l.toJSON = function() {
|
|
1075
|
+
return this.isValid() ? this.toISOString() : null;
|
|
1076
|
+
}, l.toISOString = function() {
|
|
1077
|
+
return this.$d.toISOString();
|
|
1078
|
+
}, l.toString = function() {
|
|
1079
|
+
return this.$d.toUTCString();
|
|
1080
|
+
}, m;
|
|
1081
|
+
})(), k = g.prototype;
|
|
1082
|
+
return n.prototype = k, [["$ms", R], ["$s", L], ["$m", q], ["$H", P], ["$W", w], ["$M", N], ["$y", Q], ["$D", G]].forEach((function(m) {
|
|
1083
|
+
k[m[1]] = function(l) {
|
|
1084
|
+
return this.$g(l, m[0], m[1]);
|
|
1085
|
+
};
|
|
1086
|
+
})), n.extend = function(m, l) {
|
|
1087
|
+
return m.$i || (m(l, g, n), m.$i = !0), n;
|
|
1088
|
+
}, n.locale = r, n.isDayjs = e, n.unix = function(m) {
|
|
1089
|
+
return n(1e3 * m);
|
|
1090
|
+
}, n.en = K[ut], n.Ls = K, n.p = {}, n;
|
|
1017
1091
|
}));
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
class de {
|
|
1021
|
-
static getFileExtension(t) {
|
|
1022
|
-
let i = "";
|
|
1023
|
-
const a = t.lastIndexOf(".");
|
|
1024
|
-
return a > 0 && a < t.length - 1 && (i = `.${t.substring(a + 1).toLowerCase()}`), i;
|
|
1025
|
-
}
|
|
1026
|
-
/**
|
|
1027
|
-
* read content from a file or blob
|
|
1028
|
-
*/
|
|
1029
|
-
static readAsText(t) {
|
|
1030
|
-
const i = new FileReader();
|
|
1031
|
-
return new Promise((a, b) => {
|
|
1032
|
-
i.onload = () => {
|
|
1033
|
-
i.onload = null, i.onerror = null, typeof i.result == "string" ? a(i.result) : b(new Error("Unexpected result type"));
|
|
1034
|
-
}, i.onerror = () => {
|
|
1035
|
-
const R = i.error ?? new Error("FileReader error");
|
|
1036
|
-
i.onload = null, i.onerror = null, b(R);
|
|
1037
|
-
}, i.readAsText(t);
|
|
1038
|
-
});
|
|
1039
|
-
}
|
|
1040
|
-
static readAsArrayBuffer(t) {
|
|
1041
|
-
const i = new FileReader();
|
|
1042
|
-
return new Promise((a, b) => {
|
|
1043
|
-
i.onload = () => {
|
|
1044
|
-
i.onload = null, i.onerror = null, i.result instanceof ArrayBuffer ? a(i.result) : b(new Error("Unexpected result type"));
|
|
1045
|
-
}, i.onerror = () => {
|
|
1046
|
-
const R = i.error ?? new Error("FileReader error");
|
|
1047
|
-
i.onload = null, i.onerror = null, b(R);
|
|
1048
|
-
}, i.readAsArrayBuffer(t);
|
|
1049
|
-
});
|
|
1050
|
-
}
|
|
1051
|
-
static readAsDataUrl(t) {
|
|
1052
|
-
const i = new FileReader();
|
|
1053
|
-
return new Promise((a, b) => {
|
|
1054
|
-
i.onload = (R) => {
|
|
1055
|
-
a(R);
|
|
1056
|
-
}, i.onerror = (R) => b(R), i.readAsDataURL(t);
|
|
1057
|
-
});
|
|
1058
|
-
}
|
|
1059
|
-
/** usage:
|
|
1060
|
-
* const file = new File(['Hello'], 'test.txt');
|
|
1061
|
-
* FileHelper.formatFileSize(file.size);
|
|
1062
|
-
* */
|
|
1063
|
-
static formatFileSize(t, i = 2, a) {
|
|
1064
|
-
if (t === 0)
|
|
1065
|
-
return "0 Bytes";
|
|
1066
|
-
const b = 1024, R = ["Bytes", "KB", "MB", "GB", "TB"];
|
|
1067
|
-
let L = Math.floor(Math.log(t) / Math.log(b));
|
|
1068
|
-
a && R.includes(a) && (L = R.indexOf(a));
|
|
1069
|
-
const q = t / Math.pow(b, L);
|
|
1070
|
-
return `${parseFloat(q.toFixed(i))} ${R[L]}`;
|
|
1071
|
-
}
|
|
1072
|
-
static save(t, i, a) {
|
|
1073
|
-
const b = new Blob([t], { type: a });
|
|
1074
|
-
te(b, i);
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
class _t {
|
|
1078
|
-
static set(t, i) {
|
|
1079
|
-
localStorage.setItem(t, JSON.stringify(i));
|
|
1080
|
-
}
|
|
1081
|
-
static get(t) {
|
|
1082
|
-
let i = null;
|
|
1083
|
-
const a = localStorage.getItem(t);
|
|
1084
|
-
return a && (i = JSON.parse(a)), i;
|
|
1085
|
-
}
|
|
1086
|
-
static remove(t) {
|
|
1087
|
-
let i = !!_t.get(t);
|
|
1088
|
-
return i && localStorage.removeItem(t), i;
|
|
1089
|
-
}
|
|
1090
|
-
static removeAll() {
|
|
1091
|
-
localStorage.clear();
|
|
1092
|
-
}
|
|
1093
|
-
static getKeysBy(t) {
|
|
1094
|
-
return Object.keys(localStorage).filter((i) => i.startsWith(t));
|
|
1095
|
-
}
|
|
1092
|
+
})(Et)), Et.exports;
|
|
1096
1093
|
}
|
|
1097
|
-
var
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
V.enabled = t;
|
|
1121
|
-
}
|
|
1122
|
-
static doLog(t, i) {
|
|
1123
|
-
if (!V.enabled) return;
|
|
1124
|
-
const a = {
|
|
1125
|
-
type: t,
|
|
1126
|
-
args: i,
|
|
1127
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1128
|
-
};
|
|
1129
|
-
for (const b of V.listeners)
|
|
1130
|
-
try {
|
|
1131
|
-
if (b(a) === !1)
|
|
1132
|
-
return;
|
|
1133
|
-
} catch {
|
|
1134
|
-
}
|
|
1135
|
-
console[t].apply(console, i);
|
|
1136
|
-
}
|
|
1137
|
-
static onLog(t, i = !1) {
|
|
1138
|
-
if (i) {
|
|
1139
|
-
const a = (b) => {
|
|
1140
|
-
try {
|
|
1141
|
-
return t(b);
|
|
1142
|
-
} finally {
|
|
1143
|
-
V.listeners.delete(a);
|
|
1144
|
-
}
|
|
1094
|
+
var te = Ht();
|
|
1095
|
+
const X = /* @__PURE__ */ Ot(te);
|
|
1096
|
+
var xt = { exports: {} }, ee = xt.exports, At;
|
|
1097
|
+
function re() {
|
|
1098
|
+
return At || (At = 1, (function(s, t) {
|
|
1099
|
+
(function(i, a) {
|
|
1100
|
+
s.exports = a();
|
|
1101
|
+
})(ee, (function() {
|
|
1102
|
+
var i = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
|
|
1103
|
+
return function(a, b, R) {
|
|
1104
|
+
var L = b.prototype, q = L.format;
|
|
1105
|
+
R.en.formats = i, L.format = function(P) {
|
|
1106
|
+
P === void 0 && (P = "YYYY-MM-DDTHH:mm:ssZ");
|
|
1107
|
+
var w = this.$locale().formats, B = (function(N, rt) {
|
|
1108
|
+
return N.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(Q, G, nt) {
|
|
1109
|
+
var ot = nt && nt.toUpperCase();
|
|
1110
|
+
return G || rt[nt] || i[nt] || rt[ot].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(ht, yt, dt) {
|
|
1111
|
+
return yt || dt.slice(1);
|
|
1112
|
+
}));
|
|
1113
|
+
}));
|
|
1114
|
+
})(P, w === void 0 ? {} : w);
|
|
1115
|
+
return q.call(this, B);
|
|
1116
|
+
};
|
|
1145
1117
|
};
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
return V.listeners.add(t), () => V.listeners.delete(t);
|
|
1149
|
-
}
|
|
1118
|
+
}));
|
|
1119
|
+
})(xt)), xt.exports;
|
|
1150
1120
|
}
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1121
|
+
var ne = re();
|
|
1122
|
+
const ie = /* @__PURE__ */ Ot(ne);
|
|
1123
|
+
X.extend(ie);
|
|
1124
|
+
function de() {
|
|
1125
|
+
Date.prototype.add = function(s, t) {
|
|
1126
|
+
return X(this).add(s, t).toDate();
|
|
1127
|
+
}, Date.prototype.diff = function(s, t) {
|
|
1128
|
+
return X(this).diff(s, t);
|
|
1129
|
+
}, Date.prototype.endOf = function(s) {
|
|
1130
|
+
return X(this).endOf(s).toDate();
|
|
1131
|
+
}, Date.prototype.firstDayOfMonth = function() {
|
|
1132
|
+
return X(this).startOf("month").toDate();
|
|
1133
|
+
}, Date.prototype.isAfter = function(s, t) {
|
|
1134
|
+
return X(this).isAfter(s, t);
|
|
1135
|
+
}, Date.prototype.isBefore = function(s, t) {
|
|
1136
|
+
return X(this).isBefore(s, t);
|
|
1137
|
+
}, Date.prototype.format = function(s) {
|
|
1138
|
+
return X(this).format(s);
|
|
1139
|
+
}, Date.prototype.isValid = function() {
|
|
1140
|
+
return X(this).isValid();
|
|
1141
|
+
}, Date.prototype.subtract = function(s, t) {
|
|
1142
|
+
return X(this).subtract(s, t).toDate();
|
|
1143
|
+
}, Date.prototype.lastDayOfMonth = function() {
|
|
1144
|
+
return X(this).endOf("month").toDate();
|
|
1145
|
+
}, Date.prototype.set = function(s, t) {
|
|
1146
|
+
return X(this).set(s, t).toDate();
|
|
1147
|
+
}, Date.prototype.startOf = function(s) {
|
|
1148
|
+
return X(this).startOf(s).toDate();
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
function le() {
|
|
1152
|
+
String.prototype.capitalize = function() {
|
|
1153
|
+
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
1154
|
+
}, String.prototype.isNumber = function() {
|
|
1155
|
+
return !isNaN(Number(this)) && this.trim() !== "";
|
|
1156
|
+
}, String.prototype.isEmpty = function() {
|
|
1157
|
+
return this === void 0 || !this || this.length === 0;
|
|
1158
|
+
}, String.prototype.stripTags = function() {
|
|
1159
|
+
return new DOMParser().parseFromString(this.toString(), "text/html").body.textContent || "";
|
|
1160
|
+
};
|
|
1161
1161
|
}
|
|
1162
1162
|
class he {
|
|
1163
1163
|
resizeListener;
|
|
@@ -1187,22 +1187,22 @@ class he {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
export {
|
|
1189
1189
|
U as BreakPointHelper,
|
|
1190
|
-
|
|
1190
|
+
Tt as BreakPoints,
|
|
1191
1191
|
tt as BrowserHelper,
|
|
1192
1192
|
he as BrowserService,
|
|
1193
1193
|
H as BrowserType,
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1194
|
+
ae as CsvHelper,
|
|
1195
|
+
oe as EnumHelper,
|
|
1196
|
+
ue as FileHelper,
|
|
1197
1197
|
_t as LocalStorageHelper,
|
|
1198
1198
|
V as LoggerHelper,
|
|
1199
1199
|
mt as LoggerType,
|
|
1200
1200
|
St as ScreenHelper,
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1201
|
+
ce as TokenHelper,
|
|
1202
|
+
se as copyToClipboard,
|
|
1203
|
+
fe as initArrayExtensions,
|
|
1204
|
+
de as initDateExtensions,
|
|
1205
|
+
le as initStringExtensions,
|
|
1206
|
+
Wt as saveAs,
|
|
1207
|
+
Gt as sortHelper
|
|
1208
1208
|
};
|