@oardi/ts-utils 0.0.56 → 0.0.57
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/helpers/download.helper.d.ts +19 -12
- package/helpers/index.d.ts +2 -0
- package/index.cjs +8 -8
- package/index.mjs +669 -644
- package/index.umd.js +8 -8
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const zt = {
|
|
2
2
|
xs: 0,
|
|
3
3
|
sm: 576,
|
|
4
4
|
md: 768,
|
|
@@ -16,14 +16,14 @@ class St {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
class pt {
|
|
19
|
-
static breakPoints =
|
|
19
|
+
static breakPoints = zt;
|
|
20
20
|
static getCurrentBreakpoint() {
|
|
21
21
|
return pt.getBreakpointByScreenWidth(St.getScreenWidth());
|
|
22
22
|
}
|
|
23
23
|
static getBreakpointByScreenWidth(t = St.getScreenWidth()) {
|
|
24
24
|
let n = "xs";
|
|
25
|
-
for (const
|
|
26
|
-
pt.breakPoints[
|
|
25
|
+
for (const s of Object.keys(pt.breakPoints))
|
|
26
|
+
pt.breakPoints[s] <= t && (n = s);
|
|
27
27
|
return { breakpoint: n, screenWidth: t };
|
|
28
28
|
}
|
|
29
29
|
static isScreenGreaterThan(t) {
|
|
@@ -33,47 +33,47 @@ class pt {
|
|
|
33
33
|
return St.getScreenWidth() < pt.breakPoints[t];
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
var
|
|
37
|
-
const
|
|
38
|
-
class
|
|
36
|
+
var rt = /* @__PURE__ */ ((a) => (a.opera = "opera", a.firefox = "firefox", a.safari = "safari", a.ie = "ie", a.edgeLegacy = "edgeLegacy", a.edg = "edg", a.chrome = "chrome", a.iOS = "iOS", a.headlessChrome = "headlessChrome", a.nodeRuntime = "nodeRuntime", a.electron = "electron", a))(rt || {});
|
|
37
|
+
const Ut = typeof navigator < "u" ? navigator.userAgent : "", ft = Ut.toLowerCase();
|
|
38
|
+
class H {
|
|
39
39
|
/** check if current environment is running inside a browser */
|
|
40
40
|
static isBrowserEnv() {
|
|
41
41
|
return typeof window < "u" && typeof navigator < "u";
|
|
42
42
|
}
|
|
43
|
-
static isOpera(t =
|
|
43
|
+
static isOpera(t = ft) {
|
|
44
44
|
return this.isBrowserEnv() ? t.includes("opr/") || t.includes("opera") : !1;
|
|
45
45
|
}
|
|
46
|
-
static isFirefox(t =
|
|
46
|
+
static isFirefox(t = ft) {
|
|
47
47
|
return this.isBrowserEnv() ? t.includes("firefox") || typeof globalThis.InstallTrigger < "u" : !1;
|
|
48
48
|
}
|
|
49
|
-
static isSafari(t =
|
|
49
|
+
static isSafari(t = ft) {
|
|
50
50
|
if (!this.isBrowserEnv()) return !1;
|
|
51
|
-
const n = navigator.vendor && navigator.vendor.includes("Apple"),
|
|
52
|
-
return n &&
|
|
51
|
+
const n = navigator.vendor && navigator.vendor.includes("Apple"), s = t.includes("safari"), y = !(t.includes("crios") || t.includes("chrome") || t.includes("android") || t.includes("opr/") || t.includes("edg"));
|
|
52
|
+
return n && s && y;
|
|
53
53
|
}
|
|
54
|
-
static isIOS(t =
|
|
54
|
+
static isIOS(t = ft) {
|
|
55
55
|
if (!this.isBrowserEnv()) return !1;
|
|
56
|
-
const n = /iphone|ipad|ipod/.test(t),
|
|
57
|
-
return n ||
|
|
56
|
+
const n = /iphone|ipad|ipod/.test(t), s = t.includes("macintosh") && navigator.maxTouchPoints > 1;
|
|
57
|
+
return n || s;
|
|
58
58
|
}
|
|
59
59
|
static isEdgeLegacy() {
|
|
60
|
-
return this.isBrowserEnv() ? !!window.StyleMedia && !
|
|
60
|
+
return this.isBrowserEnv() ? !!window.StyleMedia && !ft.includes("edg/") : !1;
|
|
61
61
|
}
|
|
62
|
-
static isEdg(t =
|
|
62
|
+
static isEdg(t = ft) {
|
|
63
63
|
return this.isBrowserEnv() ? t.includes("edg/") : !1;
|
|
64
64
|
}
|
|
65
65
|
static isIE() {
|
|
66
66
|
return !this.isBrowserEnv() && typeof document > "u" ? !1 : !!document.documentMode;
|
|
67
67
|
}
|
|
68
|
-
static isChrome(t =
|
|
68
|
+
static isChrome(t = ft) {
|
|
69
69
|
if (!this.isBrowserEnv()) return !1;
|
|
70
|
-
const n = navigator.vendor && navigator.vendor.includes("Google"),
|
|
71
|
-
return n &&
|
|
70
|
+
const n = navigator.vendor && navigator.vendor.includes("Google"), s = t.includes("chrome") || t.includes("crios"), y = !this.isEdg(t) && !this.isOpera(t);
|
|
71
|
+
return n && s && y;
|
|
72
72
|
}
|
|
73
|
-
static isElectron(t =
|
|
73
|
+
static isElectron(t = ft) {
|
|
74
74
|
return typeof process < "u" && process.versions?.electron ? !0 : t.includes("electron");
|
|
75
75
|
}
|
|
76
|
-
static isHeadlessChrome(t =
|
|
76
|
+
static isHeadlessChrome(t = ft) {
|
|
77
77
|
return t.includes("headlesschrome");
|
|
78
78
|
}
|
|
79
79
|
static isNodeRuntime() {
|
|
@@ -81,67 +81,80 @@ class rt {
|
|
|
81
81
|
}
|
|
82
82
|
static getCurrentBrowser() {
|
|
83
83
|
if (typeof navigator > "u") {
|
|
84
|
-
if (
|
|
85
|
-
if (
|
|
84
|
+
if (H.isElectron()) return rt.electron;
|
|
85
|
+
if (H.isNodeRuntime()) return rt.nodeRuntime;
|
|
86
86
|
throw new Error("navigator not set");
|
|
87
87
|
}
|
|
88
88
|
const t = navigator.userAgent.toLowerCase();
|
|
89
|
-
if (
|
|
90
|
-
if (
|
|
91
|
-
if (
|
|
92
|
-
if (
|
|
93
|
-
if (
|
|
94
|
-
if (
|
|
95
|
-
if (
|
|
96
|
-
if (
|
|
97
|
-
if (
|
|
98
|
-
if (
|
|
99
|
-
if (
|
|
89
|
+
if (H.isOpera()) return rt.opera;
|
|
90
|
+
if (H.isFirefox()) return rt.firefox;
|
|
91
|
+
if (H.isSafari()) return rt.safari;
|
|
92
|
+
if (H.isIE()) return rt.ie;
|
|
93
|
+
if (H.isEdgeLegacy()) return rt.edgeLegacy;
|
|
94
|
+
if (H.isEdg()) return rt.edg;
|
|
95
|
+
if (H.isChrome()) return rt.chrome;
|
|
96
|
+
if (H.isIOS(t)) return rt.iOS;
|
|
97
|
+
if (H.isElectron(t)) return rt.electron;
|
|
98
|
+
if (H.isHeadlessChrome(t)) return rt.headlessChrome;
|
|
99
|
+
if (H.isNodeRuntime()) return rt.nodeRuntime;
|
|
100
100
|
throw new Error("Browser could not be detected: " + t);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
class ue {
|
|
104
|
+
static toBlob(t, n, s = !1, y) {
|
|
105
|
+
return new Promise((b, U) => {
|
|
106
|
+
t.toBlob(
|
|
107
|
+
(I) => {
|
|
108
|
+
I ? b(I) : U(new Error("canvas.toBlob returned null"));
|
|
109
|
+
},
|
|
110
|
+
n,
|
|
111
|
+
s ? y : void 0
|
|
112
|
+
);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function ce(a) {
|
|
117
|
+
return navigator.clipboard.writeText(a);
|
|
105
118
|
}
|
|
106
|
-
function Mt(
|
|
107
|
-
return
|
|
119
|
+
function Mt(a) {
|
|
120
|
+
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
108
121
|
}
|
|
109
122
|
var Et = { exports: {} };
|
|
110
|
-
var
|
|
111
|
-
function
|
|
112
|
-
return
|
|
113
|
-
((n,
|
|
114
|
-
|
|
115
|
-
})(
|
|
116
|
-
var
|
|
117
|
-
function
|
|
123
|
+
var jt = Et.exports, Lt;
|
|
124
|
+
function Yt() {
|
|
125
|
+
return Lt || (Lt = 1, (function(a, t) {
|
|
126
|
+
((n, s) => {
|
|
127
|
+
a.exports = s();
|
|
128
|
+
})(jt, function n() {
|
|
129
|
+
var s = typeof self < "u" ? self : typeof window < "u" ? window : s !== void 0 ? s : {}, y, b = !s.document && !!s.postMessage, U = s.IS_PAPA_WORKER || !1, I = {}, K = 0, h = {};
|
|
130
|
+
function A(e) {
|
|
118
131
|
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) {
|
|
119
132
|
var i = ct(r);
|
|
120
133
|
i.chunkSize = parseInt(i.chunkSize), r.step || r.chunk || (i.chunkSize = null), this._handle = new nt(i), (this._handle.streamer = this)._config = i;
|
|
121
134
|
}).call(this, e), this.parseChunk = function(r, i) {
|
|
122
135
|
var u = parseInt(this._config.skipFirstNLines) || 0;
|
|
123
136
|
if (this.isFirstChunk && 0 < u) {
|
|
124
|
-
let
|
|
125
|
-
|
|
137
|
+
let E = this._config.newline;
|
|
138
|
+
E || (g = this._config.quoteChar || '"', E = this._handle.guessLineEndings(r, g)), r = [...r.split(E).slice(u)].join(E);
|
|
126
139
|
}
|
|
127
|
-
this.isFirstChunk && R(this._config.beforeFirstChunk) && (
|
|
128
|
-
var u = this._partialLine + r,
|
|
140
|
+
this.isFirstChunk && R(this._config.beforeFirstChunk) && (g = this._config.beforeFirstChunk(r)) !== void 0 && (r = g), this.isFirstChunk = !1, this._halted = !1;
|
|
141
|
+
var u = this._partialLine + r, g = (this._partialLine = "", this._handle.parse(u, this._baseIndex, !this._finished));
|
|
129
142
|
if (!this._handle.paused() && !this._handle.aborted()) {
|
|
130
|
-
if (r =
|
|
143
|
+
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), U) s.postMessage({ results: g, workerId: h.WORKER_ID, finished: u });
|
|
131
144
|
else if (R(this._config.chunk) && !i) {
|
|
132
|
-
if (this._config.chunk(
|
|
133
|
-
this._completeResults =
|
|
145
|
+
if (this._config.chunk(g, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
|
|
146
|
+
this._completeResults = g = void 0;
|
|
134
147
|
}
|
|
135
|
-
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(
|
|
148
|
+
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 || !R(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;
|
|
136
149
|
}
|
|
137
150
|
this._halted = !0;
|
|
138
151
|
}, this._sendError = function(r) {
|
|
139
|
-
R(this._config.error) ? this._config.error(r) :
|
|
152
|
+
R(this._config.error) ? this._config.error(r) : U && this._config.error && s.postMessage({ workerId: h.WORKER_ID, error: r, finished: !1 });
|
|
140
153
|
};
|
|
141
154
|
}
|
|
142
|
-
function
|
|
155
|
+
function j(e) {
|
|
143
156
|
var r;
|
|
144
|
-
(e = e || {}).chunkSize || (e.chunkSize =
|
|
157
|
+
(e = e || {}).chunkSize || (e.chunkSize = h.RemoteChunkSize), A.call(this, e), this._nextChunk = b ? function() {
|
|
145
158
|
this._readChunk(), this._chunkLoaded();
|
|
146
159
|
} : function() {
|
|
147
160
|
this._readChunk();
|
|
@@ -150,18 +163,18 @@ function Ut() {
|
|
|
150
163
|
}, this._readChunk = function() {
|
|
151
164
|
if (this._finished) this._chunkLoaded();
|
|
152
165
|
else {
|
|
153
|
-
if (r = new XMLHttpRequest(), this._config.withCredentials && (r.withCredentials = this._config.withCredentials),
|
|
166
|
+
if (r = new XMLHttpRequest(), this._config.withCredentials && (r.withCredentials = this._config.withCredentials), b || (r.onload = V(this._chunkLoaded, this), r.onerror = V(this._chunkError, this)), r.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !b), this._config.downloadRequestHeaders) {
|
|
154
167
|
var i, u = this._config.downloadRequestHeaders;
|
|
155
168
|
for (i in u) r.setRequestHeader(i, u[i]);
|
|
156
169
|
}
|
|
157
|
-
var
|
|
158
|
-
this._config.chunkSize && (
|
|
170
|
+
var g;
|
|
171
|
+
this._config.chunkSize && (g = this._start + this._config.chunkSize - 1, r.setRequestHeader("Range", "bytes=" + this._start + "-" + g));
|
|
159
172
|
try {
|
|
160
173
|
r.send(this._config.downloadRequestBody);
|
|
161
|
-
} catch (
|
|
162
|
-
this._chunkError(
|
|
174
|
+
} catch (E) {
|
|
175
|
+
this._chunkError(E.message);
|
|
163
176
|
}
|
|
164
|
-
|
|
177
|
+
b && r.status === 0 && this._chunkError();
|
|
165
178
|
}
|
|
166
179
|
}, this._chunkLoaded = function() {
|
|
167
180
|
r.readyState === 4 && (r.status < 200 || 400 <= r.status ? this._chunkError() : (this._start += this._config.chunkSize || r.responseText.length, this._finished = !this._config.chunkSize || this._start >= ((i) => (i = i.getResponseHeader("Content-Range")) !== null ? parseInt(i.substring(i.lastIndexOf("/") + 1)) : -1)(r), this.parseChunk(r.responseText)));
|
|
@@ -170,24 +183,24 @@ function Ut() {
|
|
|
170
183
|
};
|
|
171
184
|
}
|
|
172
185
|
function Q(e) {
|
|
173
|
-
(e = e || {}).chunkSize || (e.chunkSize =
|
|
186
|
+
(e = e || {}).chunkSize || (e.chunkSize = h.LocalChunkSize), A.call(this, e);
|
|
174
187
|
var r, i, u = typeof FileReader < "u";
|
|
175
|
-
this.stream = function(
|
|
176
|
-
this._input =
|
|
188
|
+
this.stream = function(g) {
|
|
189
|
+
this._input = g, i = g.slice || g.webkitSlice || g.mozSlice, u ? ((r = new FileReader()).onload = V(this._chunkLoaded, this), r.onerror = V(this._chunkError, this)) : r = new FileReaderSync(), this._nextChunk();
|
|
177
190
|
}, this._nextChunk = function() {
|
|
178
191
|
this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
|
|
179
192
|
}, this._readChunk = function() {
|
|
180
|
-
var
|
|
181
|
-
u || this._chunkLoaded({ target: { result:
|
|
182
|
-
}, this._chunkLoaded = function(
|
|
183
|
-
this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(
|
|
193
|
+
var g = this._input, E = (this._config.chunkSize && (E = Math.min(this._start + this._config.chunkSize, this._input.size), g = i.call(g, this._start, E)), r.readAsText(g, this._config.encoding));
|
|
194
|
+
u || this._chunkLoaded({ target: { result: E } });
|
|
195
|
+
}, this._chunkLoaded = function(g) {
|
|
196
|
+
this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(g.target.result);
|
|
184
197
|
}, this._chunkError = function() {
|
|
185
198
|
this._sendError(r.error);
|
|
186
199
|
};
|
|
187
200
|
}
|
|
188
201
|
function q(e) {
|
|
189
202
|
var r;
|
|
190
|
-
|
|
203
|
+
A.call(this, e = e || {}), this.stream = function(i) {
|
|
191
204
|
return r = i, this._nextChunk();
|
|
192
205
|
}, this._nextChunk = function() {
|
|
193
206
|
var i, u;
|
|
@@ -195,26 +208,26 @@ function Ut() {
|
|
|
195
208
|
};
|
|
196
209
|
}
|
|
197
210
|
function G(e) {
|
|
198
|
-
|
|
211
|
+
A.call(this, e = e || {});
|
|
199
212
|
var r = [], i = !0, u = !1;
|
|
200
213
|
this.pause = function() {
|
|
201
|
-
|
|
214
|
+
A.prototype.pause.apply(this, arguments), this._input.pause();
|
|
202
215
|
}, this.resume = function() {
|
|
203
|
-
|
|
204
|
-
}, this.stream = function(
|
|
205
|
-
this._input =
|
|
216
|
+
A.prototype.resume.apply(this, arguments), this._input.resume();
|
|
217
|
+
}, this.stream = function(g) {
|
|
218
|
+
this._input = g, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
|
|
206
219
|
}, this._checkIsFinished = function() {
|
|
207
220
|
u && r.length === 1 && (this._finished = !0);
|
|
208
221
|
}, this._nextChunk = function() {
|
|
209
222
|
this._checkIsFinished(), r.length ? this.parseChunk(r.shift()) : i = !0;
|
|
210
|
-
}, this._streamData = V(function(
|
|
223
|
+
}, this._streamData = V(function(g) {
|
|
211
224
|
try {
|
|
212
|
-
r.push(typeof
|
|
213
|
-
} catch (
|
|
214
|
-
this._streamError(
|
|
225
|
+
r.push(typeof g == "string" ? g : g.toString(this._config.encoding)), i && (i = !1, this._checkIsFinished(), this.parseChunk(r.shift()));
|
|
226
|
+
} catch (E) {
|
|
227
|
+
this._streamError(E);
|
|
215
228
|
}
|
|
216
|
-
}, this), this._streamError = V(function(
|
|
217
|
-
this._streamCleanUp(), this._sendError(
|
|
229
|
+
}, this), this._streamError = V(function(g) {
|
|
230
|
+
this._streamCleanUp(), this._sendError(g);
|
|
218
231
|
}, this), this._streamEnd = V(function() {
|
|
219
232
|
this._streamCleanUp(), u = !0, this._streamData("");
|
|
220
233
|
}, this), this._streamCleanUp = V(function() {
|
|
@@ -222,189 +235,189 @@ function Ut() {
|
|
|
222
235
|
}, this);
|
|
223
236
|
}
|
|
224
237
|
function nt(e) {
|
|
225
|
-
var r, i, u,
|
|
226
|
-
function M(
|
|
227
|
-
return e.skipEmptyLines === "greedy" ?
|
|
238
|
+
var r, i, u, g, E = Math.pow(2, 53), v = -E, d = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, f = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, o = this, c = 0, l = 0, w = !1, m = !1, k = [], p = { data: [], errors: [], meta: {} };
|
|
239
|
+
function M(S) {
|
|
240
|
+
return e.skipEmptyLines === "greedy" ? S.join("").trim() === "" : S.length === 1 && S[0].length === 0;
|
|
228
241
|
}
|
|
229
242
|
function C() {
|
|
230
|
-
if (
|
|
243
|
+
if (p && u && (W("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + h.DefaultDelimiter + "'"), u = !1), e.skipEmptyLines && (p.data = p.data.filter(function(_) {
|
|
231
244
|
return !M(_);
|
|
232
|
-
})),
|
|
233
|
-
let _ = function(
|
|
234
|
-
R(e.transformHeader) && (
|
|
245
|
+
})), Y()) {
|
|
246
|
+
let _ = function(T, B) {
|
|
247
|
+
R(e.transformHeader) && (T = e.transformHeader(T, B)), k.push(T);
|
|
235
248
|
};
|
|
236
|
-
if (
|
|
237
|
-
for (var
|
|
238
|
-
|
|
239
|
-
} else
|
|
249
|
+
if (p) if (Array.isArray(p.data[0])) {
|
|
250
|
+
for (var S = 0; Y() && S < p.data.length; S++) p.data[S].forEach(_);
|
|
251
|
+
p.data.splice(0, 1);
|
|
252
|
+
} else p.data.forEach(_);
|
|
240
253
|
}
|
|
241
|
-
function
|
|
242
|
-
for (var
|
|
243
|
-
var
|
|
244
|
-
if (d.test(
|
|
254
|
+
function D(_, T) {
|
|
255
|
+
for (var B = e.header ? {} : [], L = 0; L < _.length; L++) {
|
|
256
|
+
var F = L, $ = _[L], $ = ((it, x) => ((N) => (e.dynamicTypingFunction && e.dynamicTyping[N] === void 0 && (e.dynamicTyping[N] = e.dynamicTypingFunction(N)), (e.dynamicTyping[N] || e.dynamicTyping) === !0))(it) ? x === "true" || x === "TRUE" || x !== "false" && x !== "FALSE" && (((N) => {
|
|
257
|
+
if (d.test(N) && (N = parseFloat(N), v < N && N < E))
|
|
245
258
|
return 1;
|
|
246
|
-
})(
|
|
247
|
-
|
|
259
|
+
})(x) ? parseFloat(x) : f.test(x) ? new Date(x) : x === "" ? null : x) : x)(F = e.header ? L >= k.length ? "__parsed_extra" : k[L] : F, $ = e.transform ? e.transform($, F) : $);
|
|
260
|
+
F === "__parsed_extra" ? (B[F] = B[F] || [], B[F].push($)) : B[F] = $;
|
|
248
261
|
}
|
|
249
|
-
return e.header && (
|
|
262
|
+
return e.header && (L > k.length ? W("FieldMismatch", "TooManyFields", "Too many fields: expected " + k.length + " fields but parsed " + L, l + T) : L < k.length && W("FieldMismatch", "TooFewFields", "Too few fields: expected " + k.length + " fields but parsed " + L, l + T)), B;
|
|
250
263
|
}
|
|
251
264
|
var O;
|
|
252
|
-
|
|
265
|
+
p && (e.header || e.dynamicTyping || e.transform) && (O = 1, !p.data.length || Array.isArray(p.data[0]) ? (p.data = p.data.map(D), O = p.data.length) : p.data = D(p.data, 0), e.header && p.meta && (p.meta.fields = k), l += O);
|
|
253
266
|
}
|
|
254
|
-
function
|
|
255
|
-
return e.header &&
|
|
267
|
+
function Y() {
|
|
268
|
+
return e.header && k.length === 0;
|
|
256
269
|
}
|
|
257
|
-
function
|
|
258
|
-
|
|
270
|
+
function W(S, D, O, _) {
|
|
271
|
+
S = { type: S, code: D, message: O }, _ !== void 0 && (S.row = _), p.errors.push(S);
|
|
259
272
|
}
|
|
260
|
-
R(e.step) && (
|
|
261
|
-
|
|
262
|
-
}), this.parse = function(
|
|
263
|
-
var _ = e.quoteChar || '"', _ = (e.newline || (e.newline = this.guessLineEndings(
|
|
264
|
-
var it,
|
|
265
|
-
$ = $ || [",", " ", "|", ";",
|
|
266
|
-
for (var
|
|
267
|
-
for (var st,
|
|
268
|
-
0 <
|
|
273
|
+
R(e.step) && (g = e.step, e.step = function(S) {
|
|
274
|
+
p = S, Y() ? C() : (C(), p.data.length !== 0 && (c += S.data.length, e.preview && c > e.preview ? i.abort() : (p.data = p.data[0], g(p, o))));
|
|
275
|
+
}), this.parse = function(S, D, O) {
|
|
276
|
+
var _ = e.quoteChar || '"', _ = (e.newline || (e.newline = this.guessLineEndings(S, _)), u = !1, e.delimiter ? R(e.delimiter) && (e.delimiter = e.delimiter(S), p.meta.delimiter = e.delimiter) : ((_ = ((T, B, L, F, $) => {
|
|
277
|
+
var it, x, N, ht;
|
|
278
|
+
$ = $ || [",", " ", "|", ";", h.RECORD_SEP, h.UNIT_SEP];
|
|
279
|
+
for (var gt = 0; gt < $.length; gt++) {
|
|
280
|
+
for (var st, kt = $[gt], Z = 0, at = 0, J = 0, et = (N = void 0, new mt({ comments: F, delimiter: kt, newline: B, preview: 10 }).parse(T)), lt = 0; lt < et.data.length; lt++) L && M(et.data[lt]) ? J++ : (st = et.data[lt].length, at += st, N === void 0 ? N = st : 0 < st && (Z += Math.abs(st - N), N = st));
|
|
281
|
+
0 < et.data.length && (at /= et.data.length - J), (x === void 0 || Z <= x) && (ht === void 0 || ht < at) && 1.99 < at && (x = Z, it = kt, ht = at);
|
|
269
282
|
}
|
|
270
283
|
return { successful: !!(e.delimiter = it), bestDelimiter: it };
|
|
271
|
-
})(
|
|
272
|
-
return e.preview && e.header && _.preview++, r =
|
|
284
|
+
})(S, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = _.bestDelimiter : (u = !0, e.delimiter = h.DefaultDelimiter), p.meta.delimiter = e.delimiter), ct(e));
|
|
285
|
+
return e.preview && e.header && _.preview++, r = S, i = new mt(_), p = i.parse(r, D, O), C(), w ? { meta: { paused: !0 } } : p || { meta: { paused: !1 } };
|
|
273
286
|
}, this.paused = function() {
|
|
274
|
-
return
|
|
287
|
+
return w;
|
|
275
288
|
}, this.pause = function() {
|
|
276
|
-
|
|
289
|
+
w = !0, i.abort(), r = R(e.chunk) ? "" : r.substring(i.getCharIndex());
|
|
277
290
|
}, this.resume = function() {
|
|
278
|
-
o.streamer._halted ? (
|
|
291
|
+
o.streamer._halted ? (w = !1, o.streamer.parseChunk(r, !0)) : setTimeout(o.resume, 3);
|
|
279
292
|
}, this.aborted = function() {
|
|
280
|
-
return
|
|
293
|
+
return m;
|
|
281
294
|
}, this.abort = function() {
|
|
282
|
-
|
|
283
|
-
}, this.guessLineEndings = function(
|
|
284
|
-
|
|
285
|
-
var _ = new RegExp(ut(_) + "([^]*?)" + ut(_), "gm"), O = (
|
|
286
|
-
`),
|
|
287
|
-
if (O.length === 1 ||
|
|
295
|
+
m = !0, i.abort(), p.meta.aborted = !0, R(e.complete) && e.complete(p), r = "";
|
|
296
|
+
}, this.guessLineEndings = function(T, _) {
|
|
297
|
+
T = T.substring(0, 1048576);
|
|
298
|
+
var _ = new RegExp(ut(_) + "([^]*?)" + ut(_), "gm"), O = (T = T.replace(_, "")).split("\r"), _ = T.split(`
|
|
299
|
+
`), T = 1 < _.length && _[0].length < O[0].length;
|
|
300
|
+
if (O.length === 1 || T) return `
|
|
288
301
|
`;
|
|
289
|
-
for (var
|
|
290
|
-
` &&
|
|
291
|
-
return
|
|
302
|
+
for (var B = 0, L = 0; L < O.length; L++) O[L][0] === `
|
|
303
|
+
` && B++;
|
|
304
|
+
return B >= O.length / 2 ? `\r
|
|
292
305
|
` : "\r";
|
|
293
306
|
};
|
|
294
307
|
}
|
|
295
308
|
function ut(e) {
|
|
296
309
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
297
310
|
}
|
|
298
|
-
function
|
|
299
|
-
var r = (e = e || {}).delimiter, i = e.newline, u = e.comments,
|
|
300
|
-
if (e.escapeChar !== void 0 && (c = e.escapeChar), (typeof r != "string" || -1 <
|
|
301
|
-
u === !0 ? u = "#" : (typeof u != "string" || -1 <
|
|
311
|
+
function mt(e) {
|
|
312
|
+
var r = (e = e || {}).delimiter, i = e.newline, u = e.comments, g = e.step, E = e.preview, v = e.fastMode, d = null, f = !1, o = e.quoteChar == null ? '"' : e.quoteChar, c = o;
|
|
313
|
+
if (e.escapeChar !== void 0 && (c = e.escapeChar), (typeof r != "string" || -1 < h.BAD_DELIMITERS.indexOf(r)) && (r = ","), u === r) throw new Error("Comment character same as delimiter");
|
|
314
|
+
u === !0 ? u = "#" : (typeof u != "string" || -1 < h.BAD_DELIMITERS.indexOf(u)) && (u = !1), i !== `
|
|
302
315
|
` && i !== "\r" && i !== `\r
|
|
303
316
|
` && (i = `
|
|
304
317
|
`);
|
|
305
|
-
var
|
|
306
|
-
this.parse = function(
|
|
307
|
-
if (typeof
|
|
308
|
-
var M =
|
|
309
|
-
if (!
|
|
310
|
-
if (
|
|
311
|
-
for (var
|
|
312
|
-
if (_ =
|
|
313
|
-
else if (
|
|
314
|
-
if (!u || _.substring(0,
|
|
315
|
-
if (
|
|
316
|
-
if (
|
|
318
|
+
var l = 0, w = !1;
|
|
319
|
+
this.parse = function(m, k, p) {
|
|
320
|
+
if (typeof m != "string") throw new Error("Input must be a string");
|
|
321
|
+
var M = m.length, C = r.length, Y = i.length, W = u.length, S = R(g), D = [], O = [], _ = [], T = l = 0;
|
|
322
|
+
if (!m) return Z();
|
|
323
|
+
if (v || v !== !1 && m.indexOf(o) === -1) {
|
|
324
|
+
for (var B = m.split(i), L = 0; L < B.length; L++) {
|
|
325
|
+
if (_ = B[L], l += _.length, L !== B.length - 1) l += i.length;
|
|
326
|
+
else if (p) return Z();
|
|
327
|
+
if (!u || _.substring(0, W) !== u) {
|
|
328
|
+
if (S) {
|
|
329
|
+
if (D = [], ht(_.split(r)), at(), w) return Z();
|
|
317
330
|
} else ht(_.split(r));
|
|
318
|
-
if (
|
|
331
|
+
if (E && E <= L) return D = D.slice(0, E), Z(!0);
|
|
319
332
|
}
|
|
320
333
|
}
|
|
321
334
|
return Z();
|
|
322
335
|
}
|
|
323
|
-
for (var
|
|
324
|
-
if ((
|
|
325
|
-
if (
|
|
326
|
-
if (o === c &&
|
|
327
|
-
else if (o === c ||
|
|
328
|
-
|
|
329
|
-
var
|
|
330
|
-
if (
|
|
331
|
-
_.push(
|
|
336
|
+
for (var F = m.indexOf(r, l), $ = m.indexOf(i, l), it = new RegExp(ut(c) + ut(o), "g"), x = m.indexOf(o, l); ; ) if (m[l] === o) for (x = l, l++; ; ) {
|
|
337
|
+
if ((x = m.indexOf(o, x + 1)) === -1) return p || O.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: D.length, index: l }), st();
|
|
338
|
+
if (x === M - 1) return st(m.substring(l, x).replace(it, o));
|
|
339
|
+
if (o === c && m[x + 1] === c) x++;
|
|
340
|
+
else if (o === c || x === 0 || m[x - 1] !== c) {
|
|
341
|
+
F !== -1 && F < x + 1 && (F = m.indexOf(r, x + 1));
|
|
342
|
+
var N = gt(($ = $ !== -1 && $ < x + 1 ? m.indexOf(i, x + 1) : $) === -1 ? F : Math.min(F, $));
|
|
343
|
+
if (m.substr(x + 1 + N, C) === r) {
|
|
344
|
+
_.push(m.substring(l, x).replace(it, o)), m[l = x + 1 + N + C] !== o && (x = m.indexOf(o, l)), F = m.indexOf(r, l), $ = m.indexOf(i, l);
|
|
332
345
|
break;
|
|
333
346
|
}
|
|
334
|
-
if (
|
|
335
|
-
if (_.push(
|
|
336
|
-
if (
|
|
347
|
+
if (N = gt($), m.substring(x + 1 + N, x + 1 + N + Y) === i) {
|
|
348
|
+
if (_.push(m.substring(l, x).replace(it, o)), kt(x + 1 + N + Y), F = m.indexOf(r, l), x = m.indexOf(o, l), S && (at(), w)) return Z();
|
|
349
|
+
if (E && D.length >= E) return Z(!0);
|
|
337
350
|
break;
|
|
338
351
|
}
|
|
339
|
-
O.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row:
|
|
352
|
+
O.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: D.length, index: l }), x++;
|
|
340
353
|
}
|
|
341
354
|
}
|
|
342
|
-
else if (u && _.length === 0 &&
|
|
355
|
+
else if (u && _.length === 0 && m.substring(l, l + W) === u) {
|
|
343
356
|
if ($ === -1) return Z();
|
|
344
|
-
|
|
345
|
-
} else if (
|
|
357
|
+
l = $ + Y, $ = m.indexOf(i, l), F = m.indexOf(r, l);
|
|
358
|
+
} else if (F !== -1 && (F < $ || $ === -1)) _.push(m.substring(l, F)), l = F + C, F = m.indexOf(r, l);
|
|
346
359
|
else {
|
|
347
360
|
if ($ === -1) break;
|
|
348
|
-
if (_.push(
|
|
349
|
-
if (
|
|
361
|
+
if (_.push(m.substring(l, $)), kt($ + Y), S && (at(), w)) return Z();
|
|
362
|
+
if (E && D.length >= E) return Z(!0);
|
|
350
363
|
}
|
|
351
364
|
return st();
|
|
352
365
|
function ht(J) {
|
|
353
|
-
|
|
366
|
+
D.push(J), T = l;
|
|
354
367
|
}
|
|
355
|
-
function
|
|
356
|
-
var
|
|
357
|
-
return
|
|
368
|
+
function gt(J) {
|
|
369
|
+
var et = 0;
|
|
370
|
+
return et = J !== -1 && (J = m.substring(x + 1, J)) && J.trim() === "" ? J.length : et;
|
|
358
371
|
}
|
|
359
372
|
function st(J) {
|
|
360
|
-
return
|
|
373
|
+
return p || (J === void 0 && (J = m.substring(l)), _.push(J), l = M, ht(_), S && at()), Z();
|
|
361
374
|
}
|
|
362
|
-
function
|
|
363
|
-
|
|
375
|
+
function kt(J) {
|
|
376
|
+
l = J, ht(_), _ = [], $ = m.indexOf(i, l);
|
|
364
377
|
}
|
|
365
378
|
function Z(J) {
|
|
366
|
-
if (e.header && !
|
|
367
|
-
var
|
|
379
|
+
if (e.header && !k && D.length && !f) {
|
|
380
|
+
var et = D[0], lt = /* @__PURE__ */ Object.create(null), $t = new Set(et);
|
|
368
381
|
let Rt = !1;
|
|
369
|
-
for (let yt = 0; yt <
|
|
370
|
-
let ot =
|
|
371
|
-
if (
|
|
372
|
-
let
|
|
373
|
-
for (;
|
|
374
|
-
$t.add(
|
|
375
|
-
} else
|
|
382
|
+
for (let yt = 0; yt < et.length; yt++) {
|
|
383
|
+
let ot = et[yt];
|
|
384
|
+
if (lt[ot = R(e.transformHeader) ? e.transformHeader(ot, yt) : ot]) {
|
|
385
|
+
let _t, Tt = lt[ot];
|
|
386
|
+
for (; _t = ot + "_" + Tt, Tt++, $t.has(_t); ) ;
|
|
387
|
+
$t.add(_t), et[yt] = _t, lt[ot]++, Rt = !0, (d = d === null ? {} : d)[_t] = ot;
|
|
388
|
+
} else lt[ot] = 1, et[yt] = ot;
|
|
376
389
|
$t.add(ot);
|
|
377
390
|
}
|
|
378
|
-
Rt && console.warn("Duplicate headers found and renamed."),
|
|
391
|
+
Rt && console.warn("Duplicate headers found and renamed."), f = !0;
|
|
379
392
|
}
|
|
380
|
-
return { data:
|
|
393
|
+
return { data: D, errors: O, meta: { delimiter: r, linebreak: i, aborted: w, truncated: !!J, cursor: T + (k || 0), renamedHeaders: d } };
|
|
381
394
|
}
|
|
382
395
|
function at() {
|
|
383
|
-
|
|
396
|
+
g(Z()), D = [], O = [];
|
|
384
397
|
}
|
|
385
398
|
}, this.abort = function() {
|
|
386
|
-
|
|
399
|
+
w = !0;
|
|
387
400
|
}, this.getCharIndex = function() {
|
|
388
|
-
return
|
|
401
|
+
return l;
|
|
389
402
|
};
|
|
390
403
|
}
|
|
391
404
|
function wt(e) {
|
|
392
|
-
var r = e.data, i =
|
|
405
|
+
var r = e.data, i = I[r.workerId], u = !1;
|
|
393
406
|
if (r.error) i.userError(r.error, r.file);
|
|
394
407
|
else if (r.results && r.results.data) {
|
|
395
|
-
var
|
|
408
|
+
var g = { abort: function() {
|
|
396
409
|
u = !0, dt(r.workerId, { data: [], errors: [], meta: { aborted: !0 } });
|
|
397
410
|
}, pause: bt, resume: bt };
|
|
398
411
|
if (R(i.userStep)) {
|
|
399
|
-
for (var
|
|
412
|
+
for (var E = 0; E < r.results.data.length && (i.userStep({ data: r.results.data[E], errors: r.results.errors, meta: r.results.meta }, g), !u); E++) ;
|
|
400
413
|
delete r.results;
|
|
401
|
-
} else R(i.userChunk) && (i.userChunk(r.results,
|
|
414
|
+
} else R(i.userChunk) && (i.userChunk(r.results, g, r.file), delete r.results);
|
|
402
415
|
}
|
|
403
416
|
r.finished && !u && dt(r.workerId, r.results);
|
|
404
417
|
}
|
|
405
418
|
function dt(e, r) {
|
|
406
|
-
var i =
|
|
407
|
-
R(i.userComplete) && i.userComplete(r), i.terminate(), delete
|
|
419
|
+
var i = I[e];
|
|
420
|
+
R(i.userComplete) && i.userComplete(r), i.terminate(), delete I[e];
|
|
408
421
|
}
|
|
409
422
|
function bt() {
|
|
410
423
|
throw new Error("Not implemented.");
|
|
@@ -423,175 +436,171 @@ function Ut() {
|
|
|
423
436
|
function R(e) {
|
|
424
437
|
return typeof e == "function";
|
|
425
438
|
}
|
|
426
|
-
return
|
|
439
|
+
return h.parse = function(e, r) {
|
|
427
440
|
var i = (r = r || {}).dynamicTyping || !1;
|
|
428
|
-
if (R(i) && (r.dynamicTypingFunction = i, i = {}), r.dynamicTyping = i, r.transform = !!R(r.transform) && r.transform, !r.worker || !
|
|
441
|
+
if (R(i) && (r.dynamicTypingFunction = i, i = {}), r.dynamicTyping = i, r.transform = !!R(r.transform) && r.transform, !r.worker || !h.WORKERS_SUPPORTED) return i = null, h.NODE_STREAM_INPUT, typeof e == "string" ? (e = ((u) => u.charCodeAt(0) !== 65279 ? u : u.slice(1))(e), i = new (r.download ? j : q)(r)) : e.readable === !0 && R(e.read) && R(e.on) ? i = new G(r) : (s.File && e instanceof File || e instanceof Object) && (i = new Q(r)), i.stream(e);
|
|
429
442
|
(i = (() => {
|
|
430
443
|
var u;
|
|
431
|
-
return !!
|
|
432
|
-
var
|
|
433
|
-
return
|
|
434
|
-
})(), (u = new
|
|
444
|
+
return !!h.WORKERS_SUPPORTED && (u = (() => {
|
|
445
|
+
var g = s.URL || s.webkitURL || null, E = n.toString();
|
|
446
|
+
return h.BLOB_URL || (h.BLOB_URL = g.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", E, ")();"], { type: "text/javascript" })));
|
|
447
|
+
})(), (u = new s.Worker(u)).onmessage = wt, u.id = K++, I[u.id] = u);
|
|
435
448
|
})()).userStep = r.step, i.userChunk = r.chunk, i.userComplete = r.complete, i.userError = r.error, r.step = R(r.step), r.chunk = R(r.chunk), r.complete = R(r.complete), r.error = R(r.error), delete r.worker, i.postMessage({ input: e, config: r, workerId: i.id });
|
|
436
|
-
},
|
|
437
|
-
var i = !1, u = !0,
|
|
438
|
-
`,
|
|
449
|
+
}, h.unparse = function(e, r) {
|
|
450
|
+
var i = !1, u = !0, g = ",", E = `\r
|
|
451
|
+
`, v = '"', d = v + v, f = !1, o = null, c = !1, l = ((() => {
|
|
439
452
|
if (typeof r == "object") {
|
|
440
|
-
if (typeof r.delimiter != "string" ||
|
|
441
|
-
return r.delimiter.indexOf(
|
|
442
|
-
}).length || (
|
|
453
|
+
if (typeof r.delimiter != "string" || h.BAD_DELIMITERS.filter(function(k) {
|
|
454
|
+
return r.delimiter.indexOf(k) !== -1;
|
|
455
|
+
}).length || (g = r.delimiter), typeof r.quotes != "boolean" && typeof r.quotes != "function" && !Array.isArray(r.quotes) || (i = r.quotes), typeof r.skipEmptyLines != "boolean" && typeof r.skipEmptyLines != "string" || (f = r.skipEmptyLines), typeof r.newline == "string" && (E = r.newline), typeof r.quoteChar == "string" && (v = r.quoteChar), typeof r.header == "boolean" && (u = r.header), Array.isArray(r.columns)) {
|
|
443
456
|
if (r.columns.length === 0) throw new Error("Option columns is empty");
|
|
444
457
|
o = r.columns;
|
|
445
458
|
}
|
|
446
|
-
r.escapeChar !== void 0 && (d = r.escapeChar +
|
|
459
|
+
r.escapeChar !== void 0 && (d = r.escapeChar + v), r.escapeFormulae instanceof RegExp ? c = r.escapeFormulae : typeof r.escapeFormulae == "boolean" && r.escapeFormulae && (c = /^[=+\-@\t\r].*$/);
|
|
447
460
|
}
|
|
448
|
-
})(), new RegExp(ut(
|
|
461
|
+
})(), new RegExp(ut(v), "g"));
|
|
449
462
|
if (typeof e == "string" && (e = JSON.parse(e)), Array.isArray(e)) {
|
|
450
|
-
if (!e.length || Array.isArray(e[0])) return
|
|
451
|
-
if (typeof e[0] == "object") return
|
|
452
|
-
} else if (typeof e == "object") return typeof e.data == "string" && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields || o), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : typeof e.data[0] == "object" ? Object.keys(e.data[0]) : []), Array.isArray(e.data[0]) || typeof e.data[0] == "object" || (e.data = [e.data])),
|
|
463
|
+
if (!e.length || Array.isArray(e[0])) return w(null, e, f);
|
|
464
|
+
if (typeof e[0] == "object") return w(o || Object.keys(e[0]), e, f);
|
|
465
|
+
} else if (typeof e == "object") return typeof e.data == "string" && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields || o), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : typeof e.data[0] == "object" ? Object.keys(e.data[0]) : []), Array.isArray(e.data[0]) || typeof e.data[0] == "object" || (e.data = [e.data])), w(e.fields || [], e.data || [], f);
|
|
453
466
|
throw new Error("Unable to serialize unrecognized input");
|
|
454
|
-
function
|
|
455
|
-
var C = "",
|
|
456
|
-
if (
|
|
457
|
-
for (var
|
|
458
|
-
0 <
|
|
467
|
+
function w(k, p, M) {
|
|
468
|
+
var C = "", Y = (typeof k == "string" && (k = JSON.parse(k)), typeof p == "string" && (p = JSON.parse(p)), Array.isArray(k) && 0 < k.length), W = !Array.isArray(p[0]);
|
|
469
|
+
if (Y && u) {
|
|
470
|
+
for (var S = 0; S < k.length; S++) 0 < S && (C += g), C += m(k[S], S);
|
|
471
|
+
0 < p.length && (C += E);
|
|
459
472
|
}
|
|
460
|
-
for (var
|
|
461
|
-
var O = (
|
|
462
|
-
if (M && !
|
|
463
|
-
for (var
|
|
464
|
-
var
|
|
465
|
-
|
|
473
|
+
for (var D = 0; D < p.length; D++) {
|
|
474
|
+
var O = (Y ? k : p[D]).length, _ = !1, T = Y ? Object.keys(p[D]).length === 0 : p[D].length === 0;
|
|
475
|
+
if (M && !Y && (_ = M === "greedy" ? p[D].join("").trim() === "" : p[D].length === 1 && p[D][0].length === 0), M === "greedy" && Y) {
|
|
476
|
+
for (var B = [], L = 0; L < O; L++) {
|
|
477
|
+
var F = W ? k[L] : L;
|
|
478
|
+
B.push(p[D][F]);
|
|
466
479
|
}
|
|
467
|
-
_ =
|
|
480
|
+
_ = B.join("").trim() === "";
|
|
468
481
|
}
|
|
469
482
|
if (!_) {
|
|
470
483
|
for (var $ = 0; $ < O; $++) {
|
|
471
|
-
0 < $ && !
|
|
472
|
-
var it =
|
|
473
|
-
C +=
|
|
484
|
+
0 < $ && !T && (C += g);
|
|
485
|
+
var it = Y && W ? k[$] : $;
|
|
486
|
+
C += m(p[D][it], $);
|
|
474
487
|
}
|
|
475
|
-
|
|
488
|
+
D < p.length - 1 && (!M || 0 < O && !T) && (C += E);
|
|
476
489
|
}
|
|
477
490
|
}
|
|
478
491
|
return C;
|
|
479
492
|
}
|
|
480
|
-
function
|
|
493
|
+
function m(k, p) {
|
|
481
494
|
var M, C;
|
|
482
|
-
return
|
|
483
|
-
for (var
|
|
495
|
+
return k == null ? "" : k.constructor === Date ? JSON.stringify(k).slice(1, 25) : (C = !1, c && typeof k == "string" && c.test(k) && (k = "'" + k, C = !0), M = k.toString().replace(l, d), (C = C || i === !0 || typeof i == "function" && i(k, p) || Array.isArray(i) && i[p] || ((Y, W) => {
|
|
496
|
+
for (var S = 0; S < W.length; S++) if (-1 < Y.indexOf(W[S])) return !0;
|
|
484
497
|
return !1;
|
|
485
|
-
})(M,
|
|
498
|
+
})(M, h.BAD_DELIMITERS) || -1 < M.indexOf(g) || M.charAt(0) === " " || M.charAt(M.length - 1) === " ") ? v + M + v : M);
|
|
486
499
|
}
|
|
487
|
-
},
|
|
488
|
-
`, '"',
|
|
500
|
+
}, h.RECORD_SEP = "", h.UNIT_SEP = "", h.BYTE_ORDER_MARK = "\uFEFF", h.BAD_DELIMITERS = ["\r", `
|
|
501
|
+
`, '"', h.BYTE_ORDER_MARK], h.WORKERS_SUPPORTED = !b && !!s.Worker, h.NODE_STREAM_INPUT = 1, h.LocalChunkSize = 10485760, h.RemoteChunkSize = 5242880, h.DefaultDelimiter = ",", h.Parser = mt, h.ParserHandle = nt, h.NetworkStreamer = j, h.FileStreamer = Q, h.StringStreamer = q, h.ReadableStreamStreamer = G, s.jQuery && ((y = s.jQuery).fn.parse = function(e) {
|
|
489
502
|
var r = e.config || {}, i = [];
|
|
490
|
-
return this.each(function(
|
|
491
|
-
if (!(
|
|
492
|
-
for (var
|
|
503
|
+
return this.each(function(E) {
|
|
504
|
+
if (!(y(this).prop("tagName").toUpperCase() === "INPUT" && y(this).attr("type").toLowerCase() === "file" && s.FileReader) || !this.files || this.files.length === 0) return !0;
|
|
505
|
+
for (var v = 0; v < this.files.length; v++) i.push({ file: this.files[v], inputElem: this, instanceConfig: y.extend({}, r) });
|
|
493
506
|
}), u(), this;
|
|
494
507
|
function u() {
|
|
495
508
|
if (i.length === 0) R(e.complete) && e.complete();
|
|
496
509
|
else {
|
|
497
|
-
var
|
|
510
|
+
var E, v, d, f, o = i[0];
|
|
498
511
|
if (R(e.before)) {
|
|
499
512
|
var c = e.before(o.file, o.inputElem);
|
|
500
513
|
if (typeof c == "object") {
|
|
501
|
-
if (c.action === "abort") return
|
|
502
|
-
if (c.action === "skip") return void
|
|
503
|
-
typeof c.config == "object" && (o.instanceConfig =
|
|
504
|
-
} else if (c === "skip") return void
|
|
514
|
+
if (c.action === "abort") return E = "AbortError", v = o.file, d = o.inputElem, f = c.reason, void (R(e.error) && e.error({ name: E }, v, d, f));
|
|
515
|
+
if (c.action === "skip") return void g();
|
|
516
|
+
typeof c.config == "object" && (o.instanceConfig = y.extend(o.instanceConfig, c.config));
|
|
517
|
+
} else if (c === "skip") return void g();
|
|
505
518
|
}
|
|
506
|
-
var
|
|
507
|
-
o.instanceConfig.complete = function(
|
|
508
|
-
R(
|
|
509
|
-
},
|
|
519
|
+
var l = o.instanceConfig.complete;
|
|
520
|
+
o.instanceConfig.complete = function(w) {
|
|
521
|
+
R(l) && l(w, o.file, o.inputElem), g();
|
|
522
|
+
}, h.parse(o.file, o.instanceConfig);
|
|
510
523
|
}
|
|
511
524
|
}
|
|
512
|
-
function
|
|
525
|
+
function g() {
|
|
513
526
|
i.splice(0, 1), u();
|
|
514
527
|
}
|
|
515
|
-
}),
|
|
516
|
-
e = e.data,
|
|
517
|
-
}), (
|
|
528
|
+
}), U && (s.onmessage = function(e) {
|
|
529
|
+
e = e.data, h.WORKER_ID === void 0 && e && (h.WORKER_ID = e.workerId), typeof e.input == "string" ? s.postMessage({ workerId: h.WORKER_ID, results: h.parse(e.input, e.config), finished: !0 }) : (s.File && e.input instanceof File || e.input instanceof Object) && (e = h.parse(e.input, e.config)) && s.postMessage({ workerId: h.WORKER_ID, results: e, finished: !0 });
|
|
530
|
+
}), (j.prototype = Object.create(A.prototype)).constructor = j, (Q.prototype = Object.create(A.prototype)).constructor = Q, (q.prototype = Object.create(q.prototype)).constructor = q, (G.prototype = Object.create(A.prototype)).constructor = G, h;
|
|
518
531
|
});
|
|
519
532
|
})(Et)), Et.exports;
|
|
520
533
|
}
|
|
521
|
-
var
|
|
522
|
-
const Nt = /* @__PURE__ */ Mt(
|
|
523
|
-
class
|
|
534
|
+
var Bt = Yt();
|
|
535
|
+
const Nt = /* @__PURE__ */ Mt(Bt), { parse: Pt, unparse: Wt } = Nt;
|
|
536
|
+
class le {
|
|
524
537
|
static unparse(t, n) {
|
|
525
|
-
return
|
|
538
|
+
return Wt(t, n);
|
|
526
539
|
}
|
|
527
540
|
static parse(t) {
|
|
528
|
-
return new Promise((n,
|
|
529
|
-
|
|
541
|
+
return new Promise((n, s) => {
|
|
542
|
+
Pt(t, {
|
|
530
543
|
header: !0,
|
|
531
|
-
complete: (
|
|
532
|
-
error: (
|
|
544
|
+
complete: (y) => n(y),
|
|
545
|
+
error: (y) => s(y)
|
|
533
546
|
});
|
|
534
547
|
});
|
|
535
548
|
}
|
|
536
549
|
}
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
550
|
+
class qt {
|
|
551
|
+
static revokeObjectUrlDelay = 4e4;
|
|
552
|
+
static utf8BomMimeType = /^\s*(?:text\/\S*|application\/xml|\S+\/\S+\+xml)\s*;\s*charset\s*=\s*utf-8/i;
|
|
553
|
+
/**
|
|
554
|
+
* Starts a browser download for a blob.
|
|
555
|
+
* iOS opens the blob in a new tab because WebKit may ignore the download target.
|
|
556
|
+
* Other browsers that ignore the download attribute use the link target as a new-tab fallback.
|
|
557
|
+
* Call this method directly from a user interaction to avoid browser download restrictions.
|
|
558
|
+
*/
|
|
559
|
+
static saveAs(t, n, s = {}) {
|
|
560
|
+
this.assertBrowserEnvironment();
|
|
561
|
+
const y = s.autoBom ? this.addUtf8Bom(t) : t;
|
|
562
|
+
this.downloadBlob(y, n);
|
|
563
|
+
}
|
|
564
|
+
static addUtf8Bom(t) {
|
|
565
|
+
return this.utf8BomMimeType.test(t.type) ? new Blob(["\uFEFF", t], { type: t.type }) : t;
|
|
566
|
+
}
|
|
567
|
+
static assertBrowserEnvironment() {
|
|
568
|
+
if (typeof window > "u" || typeof document > "u" || typeof URL > "u" || typeof URL.createObjectURL != "function" || typeof URL.revokeObjectURL != "function")
|
|
569
|
+
throw new Error(
|
|
570
|
+
"DownloadHelper is only available in a browser environment with object URL support."
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
static downloadBlob(t, n) {
|
|
574
|
+
const s = URL.createObjectURL(t);
|
|
575
|
+
try {
|
|
576
|
+
H.isIOS() ? this.openBlobInNewTab(s) || this.clickDownloadLink(s, n, !1) : this.clickDownloadLink(s, n);
|
|
577
|
+
} finally {
|
|
578
|
+
window.setTimeout(() => URL.revokeObjectURL(s), this.revokeObjectUrlDelay);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
static openBlobInNewTab(t) {
|
|
582
|
+
const n = window.open("about:blank", "_blank");
|
|
583
|
+
if (!n)
|
|
584
|
+
return !1;
|
|
540
585
|
try {
|
|
541
|
-
|
|
542
|
-
suggestedName: t,
|
|
543
|
-
types: [{ description: "Datei", accept: { [a]: [`.${zt(t)}`] } }]
|
|
544
|
-
})).createWritable();
|
|
545
|
-
await K.write(k), await K.close();
|
|
546
|
-
return;
|
|
586
|
+
return n.opener = null, n.location.replace(t), !0;
|
|
547
587
|
} catch {
|
|
588
|
+
return n.close(), !1;
|
|
548
589
|
}
|
|
549
|
-
const D = URL.createObjectURL(k), T = document.createElement("a");
|
|
550
|
-
T.href = D, T.download = t, T.rel = "noopener", T.style.display = "none", document.body.appendChild(T), T.click(), window.setTimeout(() => {
|
|
551
|
-
document.body.removeChild(T), URL.revokeObjectURL(D);
|
|
552
|
-
}, 0), Vt() && window.open(D, "_blank", "noopener,noreferrer");
|
|
553
|
-
}
|
|
554
|
-
function Jt(s, t) {
|
|
555
|
-
if (s instanceof Blob)
|
|
556
|
-
return s.type ? s : new Blob([s], { type: t });
|
|
557
|
-
if (s instanceof ArrayBuffer || s instanceof Uint8Array) {
|
|
558
|
-
const n = s instanceof Uint8Array ? s : new Uint8Array(s);
|
|
559
|
-
return new Blob([n], { type: t });
|
|
560
590
|
}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
case "pdf":
|
|
572
|
-
return "application/pdf";
|
|
573
|
-
case "png":
|
|
574
|
-
return "image/png";
|
|
575
|
-
case "jpg":
|
|
576
|
-
case "jpeg":
|
|
577
|
-
return "image/jpeg";
|
|
578
|
-
case "svg":
|
|
579
|
-
return "image/svg+xml";
|
|
580
|
-
case "zip":
|
|
581
|
-
return "application/zip";
|
|
582
|
-
default:
|
|
583
|
-
return "application/octet-stream";
|
|
591
|
+
static clickDownloadLink(t, n, s = !0) {
|
|
592
|
+
const y = document.body ?? document.documentElement;
|
|
593
|
+
if (!y)
|
|
594
|
+
throw new Error("DownloadHelper.saveAs requires an initialized document.");
|
|
595
|
+
const b = document.createElement("a");
|
|
596
|
+
try {
|
|
597
|
+
b.download = n, b.href = t, s && (b.target = "_blank", b.rel = "noopener noreferrer"), b.style.display = "none", y.appendChild(b), b.click();
|
|
598
|
+
} finally {
|
|
599
|
+
b.remove();
|
|
600
|
+
}
|
|
584
601
|
}
|
|
585
602
|
}
|
|
586
|
-
|
|
587
|
-
const t = s.lastIndexOf(".");
|
|
588
|
-
return t >= 0 && t < s.length - 1 ? s.slice(t + 1) : "";
|
|
589
|
-
}
|
|
590
|
-
function Vt() {
|
|
591
|
-
const s = navigator.userAgent, t = /iPad|iPhone|iPod/.test(s), n = /^((?!chrome|android).)*safari/i.test(s);
|
|
592
|
-
return t || n;
|
|
593
|
-
}
|
|
594
|
-
class pe {
|
|
603
|
+
class fe {
|
|
595
604
|
static getEnumValue(t, n) {
|
|
596
605
|
if (n in t)
|
|
597
606
|
return t[n];
|
|
@@ -604,61 +613,78 @@ class pe {
|
|
|
604
613
|
}));
|
|
605
614
|
}
|
|
606
615
|
}
|
|
607
|
-
class
|
|
616
|
+
class de {
|
|
608
617
|
static getFileExtension(t) {
|
|
609
618
|
let n = "";
|
|
610
|
-
const
|
|
611
|
-
return
|
|
619
|
+
const s = t.lastIndexOf(".");
|
|
620
|
+
return s > 0 && s < t.length - 1 && (n = `.${t.substring(s + 1).toLowerCase()}`), n;
|
|
612
621
|
}
|
|
613
622
|
/**
|
|
614
623
|
* read content from a file or blob
|
|
615
624
|
*/
|
|
616
625
|
static readAsText(t) {
|
|
617
626
|
const n = new FileReader();
|
|
618
|
-
return new Promise((
|
|
627
|
+
return new Promise((s, y) => {
|
|
619
628
|
n.onload = () => {
|
|
620
|
-
n.onload = null, n.onerror = null, typeof n.result == "string" ?
|
|
629
|
+
n.onload = null, n.onerror = null, typeof n.result == "string" ? s(n.result) : y(new Error("Unexpected result type"));
|
|
621
630
|
}, n.onerror = () => {
|
|
622
|
-
const
|
|
623
|
-
n.onload = null, n.onerror = null,
|
|
631
|
+
const b = n.error ?? new Error("FileReader error");
|
|
632
|
+
n.onload = null, n.onerror = null, y(b);
|
|
624
633
|
}, n.readAsText(t);
|
|
625
634
|
});
|
|
626
635
|
}
|
|
627
636
|
static readAsArrayBuffer(t) {
|
|
628
637
|
const n = new FileReader();
|
|
629
|
-
return new Promise((
|
|
638
|
+
return new Promise((s, y) => {
|
|
630
639
|
n.onload = () => {
|
|
631
|
-
n.onload = null, n.onerror = null, n.result instanceof ArrayBuffer ?
|
|
640
|
+
n.onload = null, n.onerror = null, n.result instanceof ArrayBuffer ? s(n.result) : y(new Error("Unexpected result type"));
|
|
632
641
|
}, n.onerror = () => {
|
|
633
|
-
const
|
|
634
|
-
n.onload = null, n.onerror = null,
|
|
642
|
+
const b = n.error ?? new Error("FileReader error");
|
|
643
|
+
n.onload = null, n.onerror = null, y(b);
|
|
635
644
|
}, n.readAsArrayBuffer(t);
|
|
636
645
|
});
|
|
637
646
|
}
|
|
638
647
|
static readAsDataUrl(t) {
|
|
639
648
|
const n = new FileReader();
|
|
640
|
-
return new Promise((
|
|
641
|
-
n.onload = (
|
|
642
|
-
|
|
643
|
-
}, n.onerror = (
|
|
649
|
+
return new Promise((s, y) => {
|
|
650
|
+
n.onload = (b) => {
|
|
651
|
+
s(b);
|
|
652
|
+
}, n.onerror = (b) => y(b), n.readAsDataURL(t);
|
|
644
653
|
});
|
|
645
654
|
}
|
|
646
655
|
/** usage:
|
|
647
656
|
* const file = new File(['Hello'], 'test.txt');
|
|
648
657
|
* FileHelper.formatFileSize(file.size);
|
|
649
658
|
* */
|
|
650
|
-
static formatFileSize(t, n = 2,
|
|
659
|
+
static formatFileSize(t, n = 2, s) {
|
|
651
660
|
if (t === 0)
|
|
652
661
|
return "0 Bytes";
|
|
653
|
-
const
|
|
654
|
-
let
|
|
655
|
-
|
|
656
|
-
const
|
|
657
|
-
return `${parseFloat(
|
|
662
|
+
const y = 1024, b = ["Bytes", "KB", "MB", "GB", "TB"];
|
|
663
|
+
let U = Math.floor(Math.log(t) / Math.log(y));
|
|
664
|
+
s && b.includes(s) && (U = b.indexOf(s));
|
|
665
|
+
const I = t / Math.pow(y, U);
|
|
666
|
+
return `${parseFloat(I.toFixed(n))} ${b[U]}`;
|
|
658
667
|
}
|
|
659
|
-
static save(t, n,
|
|
660
|
-
const
|
|
661
|
-
|
|
668
|
+
static save(t, n, s) {
|
|
669
|
+
const y = new Blob([t], { type: s });
|
|
670
|
+
qt.saveAs(y, n);
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
class he {
|
|
674
|
+
static load(t) {
|
|
675
|
+
return new Promise((n, s) => {
|
|
676
|
+
const y = new Image();
|
|
677
|
+
y.onload = () => n(y), y.onerror = s, y.src = URL.createObjectURL(t);
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
static resize(t, n, s) {
|
|
681
|
+
let { width: y, height: b } = t;
|
|
682
|
+
const U = n / y, I = s / b, K = Math.min(U, I, 1);
|
|
683
|
+
y = Math.floor(y * K), b = Math.floor(b * K);
|
|
684
|
+
const h = document.createElement("canvas");
|
|
685
|
+
h.width = y, h.height = b;
|
|
686
|
+
const A = h.getContext("2d");
|
|
687
|
+
return A.clearRect(0, 0, y, b), A.drawImage(t, 0, 0, y, b), { canvas: h, width: y, height: b };
|
|
662
688
|
}
|
|
663
689
|
}
|
|
664
690
|
class Ct {
|
|
@@ -667,8 +693,8 @@ class Ct {
|
|
|
667
693
|
}
|
|
668
694
|
static get(t) {
|
|
669
695
|
let n = null;
|
|
670
|
-
const
|
|
671
|
-
return
|
|
696
|
+
const s = localStorage.getItem(t);
|
|
697
|
+
return s && (n = JSON.parse(s)), n;
|
|
672
698
|
}
|
|
673
699
|
static remove(t) {
|
|
674
700
|
const n = localStorage.getItem(t) !== null;
|
|
@@ -681,7 +707,7 @@ class Ct {
|
|
|
681
707
|
return Object.keys(localStorage).filter((n) => n.startsWith(t));
|
|
682
708
|
}
|
|
683
709
|
}
|
|
684
|
-
var vt = /* @__PURE__ */ ((
|
|
710
|
+
var vt = /* @__PURE__ */ ((a) => (a.log = "log", a.info = "info", a.warn = "warn", a.debug = "debug", a.error = "error", a))(vt || {});
|
|
685
711
|
class X {
|
|
686
712
|
static listeners = /* @__PURE__ */ new Set();
|
|
687
713
|
static enabled = !0;
|
|
@@ -708,14 +734,14 @@ class X {
|
|
|
708
734
|
}
|
|
709
735
|
static doLog(t, n) {
|
|
710
736
|
if (!X.enabled) return;
|
|
711
|
-
const
|
|
737
|
+
const s = {
|
|
712
738
|
type: t,
|
|
713
739
|
args: n,
|
|
714
740
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
715
741
|
};
|
|
716
|
-
for (const
|
|
742
|
+
for (const y of X.listeners)
|
|
717
743
|
try {
|
|
718
|
-
if (
|
|
744
|
+
if (y(s) === !1)
|
|
719
745
|
return;
|
|
720
746
|
} catch {
|
|
721
747
|
}
|
|
@@ -723,26 +749,23 @@ class X {
|
|
|
723
749
|
}
|
|
724
750
|
static onLog(t, n = !1) {
|
|
725
751
|
if (n) {
|
|
726
|
-
const
|
|
752
|
+
const s = (y) => {
|
|
727
753
|
try {
|
|
728
|
-
return t(
|
|
754
|
+
return t(y);
|
|
729
755
|
} finally {
|
|
730
|
-
X.listeners.delete(
|
|
756
|
+
X.listeners.delete(s);
|
|
731
757
|
}
|
|
732
758
|
};
|
|
733
|
-
return X.listeners.add(
|
|
759
|
+
return X.listeners.add(s), () => X.listeners.delete(s);
|
|
734
760
|
}
|
|
735
761
|
return X.listeners.add(t), () => X.listeners.delete(t);
|
|
736
762
|
}
|
|
737
763
|
}
|
|
738
|
-
const
|
|
739
|
-
|
|
740
|
-
return
|
|
741
|
-
}, te = (s, t, n, a) => {
|
|
742
|
-
const k = n(s), D = n(t);
|
|
743
|
-
return Ht(k, D, a);
|
|
764
|
+
const Kt = (a, t, n) => a.localeCompare(t) * (n ? 1 : -1), Jt = (a, t) => a < t ? -1 : a === t ? 0 : 1, Qt = (a, t, n) => Jt(a, t) * (n ? 1 : -1), Vt = (a, t, n) => typeof a == "string" && typeof t == "string" ? Kt(a, t, n) : Qt(a, t, n), Zt = (a, t, n, s) => {
|
|
765
|
+
const y = n(a), b = n(t);
|
|
766
|
+
return Vt(y, b, s);
|
|
744
767
|
};
|
|
745
|
-
class
|
|
768
|
+
class pe {
|
|
746
769
|
static get(t) {
|
|
747
770
|
return Ct.get(t);
|
|
748
771
|
}
|
|
@@ -753,234 +776,234 @@ class me {
|
|
|
753
776
|
Ct.remove(t);
|
|
754
777
|
}
|
|
755
778
|
}
|
|
756
|
-
class
|
|
779
|
+
class z {
|
|
757
780
|
static listeners = /* @__PURE__ */ new Set();
|
|
758
781
|
static initialized = !1;
|
|
759
782
|
static resizeTimeout = null;
|
|
760
783
|
static lastWidth = null;
|
|
761
784
|
static onResize(t) {
|
|
762
|
-
return
|
|
785
|
+
return z.initialized || z.init(), z.listeners.add(t), () => z.off(t);
|
|
763
786
|
}
|
|
764
787
|
static handleResize = () => {
|
|
765
|
-
|
|
788
|
+
z.resizeTimeout !== null && (window.clearTimeout(z.resizeTimeout), z.resizeTimeout = null), z.resizeTimeout = window.setTimeout(() => {
|
|
766
789
|
const t = window.innerWidth;
|
|
767
|
-
if (
|
|
768
|
-
|
|
769
|
-
for (const n of
|
|
790
|
+
if (z.resizeTimeout = null, t !== z.lastWidth) {
|
|
791
|
+
z.lastWidth = t;
|
|
792
|
+
for (const n of z.listeners)
|
|
770
793
|
n(t);
|
|
771
794
|
}
|
|
772
795
|
}, 150);
|
|
773
796
|
};
|
|
774
797
|
static init() {
|
|
775
|
-
if (!
|
|
798
|
+
if (!z.initialized) {
|
|
776
799
|
if (typeof window > "u")
|
|
777
800
|
throw new Error("WindowResizeHelper is only available in browser environments");
|
|
778
|
-
|
|
801
|
+
z.lastWidth = window.innerWidth, window.addEventListener("resize", z.handleResize, { passive: !0 }), z.initialized = !0;
|
|
779
802
|
}
|
|
780
803
|
}
|
|
781
804
|
static off(t) {
|
|
782
|
-
|
|
805
|
+
z.initialized && (z.listeners.delete(t), z.listeners.size === 0 && (z.resizeTimeout !== null && (window.clearTimeout(z.resizeTimeout), z.resizeTimeout = null), window.removeEventListener("resize", z.handleResize), z.initialized = !1, z.lastWidth = null));
|
|
783
806
|
}
|
|
784
807
|
}
|
|
785
|
-
function
|
|
786
|
-
Object.defineProperty(
|
|
808
|
+
function P(a, t, n) {
|
|
809
|
+
Object.defineProperty(a, t, {
|
|
787
810
|
configurable: !0,
|
|
788
811
|
enumerable: !1,
|
|
789
812
|
value: n,
|
|
790
813
|
writable: !0
|
|
791
814
|
});
|
|
792
815
|
}
|
|
793
|
-
function
|
|
794
|
-
|
|
795
|
-
return
|
|
796
|
-
(n,
|
|
797
|
-
) : this.filter((n,
|
|
798
|
-
}),
|
|
799
|
-
return this.filter((t) =>
|
|
800
|
-
}),
|
|
816
|
+
function me() {
|
|
817
|
+
P(Array.prototype, "distinct", function(a) {
|
|
818
|
+
return a ? this.filter(
|
|
819
|
+
(n, s, y) => y.findIndex((b) => a(b, n)) === s
|
|
820
|
+
) : this.filter((n, s, y) => y.indexOf(n) === s);
|
|
821
|
+
}), P(Array.prototype, "filterBy", function(a) {
|
|
822
|
+
return this.filter((t) => a(t));
|
|
823
|
+
}), P(Array.prototype, "first", function() {
|
|
801
824
|
return this.length > 0 ? this[0] : null;
|
|
802
|
-
}),
|
|
825
|
+
}), P(Array.prototype, "groupBy", function(a) {
|
|
803
826
|
return this.reduce((t, n) => {
|
|
804
|
-
const
|
|
805
|
-
return t[
|
|
827
|
+
const s = a(n);
|
|
828
|
+
return t[s] || (t[s] = []), t[s].push(n), t;
|
|
806
829
|
}, {});
|
|
807
|
-
}),
|
|
808
|
-
return this?.sort((n,
|
|
809
|
-
}),
|
|
810
|
-
return this.filter((n) =>
|
|
830
|
+
}), P(Array.prototype, "orderBy", function(a, t = !0) {
|
|
831
|
+
return this?.sort((n, s) => Zt(n, s, a, t)), this;
|
|
832
|
+
}), P(Array.prototype, "removeBy", function(a, t) {
|
|
833
|
+
return this.filter((n) => a(n) !== t);
|
|
811
834
|
});
|
|
812
835
|
}
|
|
813
|
-
var xt = { exports: {} },
|
|
814
|
-
function
|
|
815
|
-
return
|
|
816
|
-
(function(n,
|
|
817
|
-
|
|
818
|
-
})(
|
|
819
|
-
var n = 1e3,
|
|
820
|
-
var d = ["th", "st", "nd", "rd"],
|
|
821
|
-
return "[" +
|
|
822
|
-
} }, dt = function(
|
|
823
|
-
var o = String(
|
|
824
|
-
return !o || o.length >= d ?
|
|
825
|
-
}, bt = { s: dt, z: function(
|
|
826
|
-
var d = -
|
|
836
|
+
var xt = { exports: {} }, Gt = xt.exports, It;
|
|
837
|
+
function Xt() {
|
|
838
|
+
return It || (It = 1, (function(a, t) {
|
|
839
|
+
(function(n, s) {
|
|
840
|
+
a.exports = s();
|
|
841
|
+
})(Gt, (function() {
|
|
842
|
+
var n = 1e3, s = 6e4, y = 36e5, b = "millisecond", U = "second", I = "minute", K = "hour", h = "day", A = "week", j = "month", Q = "quarter", q = "year", G = "date", nt = "Invalid Date", ut = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, mt = /\[([^\]]+)]|YYYY|YY|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, wt = { 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(v) {
|
|
843
|
+
var d = ["th", "st", "nd", "rd"], f = v % 100;
|
|
844
|
+
return "[" + v + (d[(f - 20) % 10] || d[f] || d[0]) + "]";
|
|
845
|
+
} }, dt = function(v, d, f) {
|
|
846
|
+
var o = String(v);
|
|
847
|
+
return !o || o.length >= d ? v : "" + Array(d + 1 - o.length).join(f) + v;
|
|
848
|
+
}, bt = { s: dt, z: function(v) {
|
|
849
|
+
var d = -v.utcOffset(), f = Math.abs(d), o = Math.floor(f / 60), c = f % 60;
|
|
827
850
|
return (d <= 0 ? "+" : "-") + dt(o, 2, "0") + ":" + dt(c, 2, "0");
|
|
828
|
-
}, m: function
|
|
829
|
-
if (d.date() <
|
|
830
|
-
var o = 12 * (
|
|
831
|
-
return +(-(o + (
|
|
832
|
-
}, a: function(
|
|
833
|
-
return
|
|
834
|
-
}, p: function(
|
|
835
|
-
return { M:
|
|
836
|
-
}, u: function(
|
|
837
|
-
return
|
|
851
|
+
}, m: function v(d, f) {
|
|
852
|
+
if (d.date() < f.date()) return -v(f, d);
|
|
853
|
+
var o = 12 * (f.year() - d.year()) + (f.month() - d.month()), c = d.clone().add(o, j), l = f - c < 0, w = d.clone().add(o + (l ? -1 : 1), j);
|
|
854
|
+
return +(-(o + (f - c) / (l ? c - w : w - c)) || 0);
|
|
855
|
+
}, a: function(v) {
|
|
856
|
+
return v < 0 ? Math.ceil(v) || 0 : Math.floor(v);
|
|
857
|
+
}, p: function(v) {
|
|
858
|
+
return { M: j, y: q, w: A, d: h, D: G, h: K, m: I, s: U, ms: b, Q }[v] || String(v || "").toLowerCase().replace(/s$/, "");
|
|
859
|
+
}, u: function(v) {
|
|
860
|
+
return v === void 0;
|
|
838
861
|
} }, ct = "en", V = {};
|
|
839
862
|
V[ct] = wt;
|
|
840
|
-
var R = "$isDayjsObject", e = function(
|
|
841
|
-
return
|
|
842
|
-
}, r = function
|
|
863
|
+
var R = "$isDayjsObject", e = function(v) {
|
|
864
|
+
return v instanceof g || !(!v || !v[R]);
|
|
865
|
+
}, r = function v(d, f, o) {
|
|
843
866
|
var c;
|
|
844
867
|
if (!d) return ct;
|
|
845
868
|
if (typeof d == "string") {
|
|
846
|
-
var
|
|
847
|
-
V[
|
|
848
|
-
var
|
|
849
|
-
if (!c &&
|
|
869
|
+
var l = d.toLowerCase();
|
|
870
|
+
V[l] && (c = l), f && (V[l] = f, c = l);
|
|
871
|
+
var w = d.split("-");
|
|
872
|
+
if (!c && w.length > 1) return v(w[0]);
|
|
850
873
|
} else {
|
|
851
|
-
var
|
|
852
|
-
V[
|
|
874
|
+
var m = d.name;
|
|
875
|
+
V[m] = d, c = m;
|
|
853
876
|
}
|
|
854
877
|
return !o && c && (ct = c), c || !o && ct;
|
|
855
|
-
}, i = function(
|
|
856
|
-
if (e(
|
|
857
|
-
var
|
|
858
|
-
return
|
|
878
|
+
}, i = function(v, d) {
|
|
879
|
+
if (e(v)) return v.clone();
|
|
880
|
+
var f = typeof d == "object" ? d : {};
|
|
881
|
+
return f.date = v, f.args = arguments, new g(f);
|
|
859
882
|
}, u = bt;
|
|
860
|
-
u.l = r, u.i = e, u.w = function(
|
|
861
|
-
return i(
|
|
883
|
+
u.l = r, u.i = e, u.w = function(v, d) {
|
|
884
|
+
return i(v, { locale: d.$L, utc: d.$u, x: d.$x, $offset: d.$offset });
|
|
862
885
|
};
|
|
863
|
-
var
|
|
864
|
-
function
|
|
865
|
-
this.$L = r(
|
|
886
|
+
var g = (function() {
|
|
887
|
+
function v(f) {
|
|
888
|
+
this.$L = r(f.locale, null, !0), this.parse(f), this.$x = this.$x || f.x || {}, this[R] = !0;
|
|
866
889
|
}
|
|
867
|
-
var d =
|
|
868
|
-
return d.parse = function(
|
|
890
|
+
var d = v.prototype;
|
|
891
|
+
return d.parse = function(f) {
|
|
869
892
|
this.$d = (function(o) {
|
|
870
|
-
var c = o.date,
|
|
893
|
+
var c = o.date, l = o.utc;
|
|
871
894
|
if (c === null) return /* @__PURE__ */ new Date(NaN);
|
|
872
895
|
if (u.u(c)) return /* @__PURE__ */ new Date();
|
|
873
896
|
if (c instanceof Date) return new Date(c);
|
|
874
897
|
if (typeof c == "string" && !/Z$/i.test(c)) {
|
|
875
|
-
var
|
|
876
|
-
if (
|
|
877
|
-
var
|
|
878
|
-
return
|
|
898
|
+
var w = c.match(ut);
|
|
899
|
+
if (w) {
|
|
900
|
+
var m = w[2] - 1 || 0, k = (w[7] || "0").substring(0, 3);
|
|
901
|
+
return l ? new Date(Date.UTC(w[1], m, w[3] || 1, w[4] || 0, w[5] || 0, w[6] || 0, k)) : new Date(w[1], m, w[3] || 1, w[4] || 0, w[5] || 0, w[6] || 0, k);
|
|
879
902
|
}
|
|
880
903
|
}
|
|
881
904
|
return new Date(c);
|
|
882
|
-
})(
|
|
905
|
+
})(f), this.init();
|
|
883
906
|
}, d.init = function() {
|
|
884
|
-
var
|
|
885
|
-
this.$y =
|
|
907
|
+
var f = this.$d;
|
|
908
|
+
this.$y = f.getFullYear(), this.$M = f.getMonth(), this.$D = f.getDate(), this.$W = f.getDay(), this.$H = f.getHours(), this.$m = f.getMinutes(), this.$s = f.getSeconds(), this.$ms = f.getMilliseconds();
|
|
886
909
|
}, d.$utils = function() {
|
|
887
910
|
return u;
|
|
888
911
|
}, d.isValid = function() {
|
|
889
912
|
return this.$d.toString() !== nt;
|
|
890
|
-
}, d.isSame = function(
|
|
891
|
-
var c = i(
|
|
913
|
+
}, d.isSame = function(f, o) {
|
|
914
|
+
var c = i(f);
|
|
892
915
|
return this.startOf(o) <= c && c <= this.endOf(o);
|
|
893
|
-
}, d.isAfter = function(
|
|
894
|
-
return i(
|
|
895
|
-
}, d.isBefore = function(
|
|
896
|
-
return this.endOf(o) < i(
|
|
897
|
-
}, d.$g = function(
|
|
898
|
-
return u.u(
|
|
916
|
+
}, d.isAfter = function(f, o) {
|
|
917
|
+
return i(f) < this.startOf(o);
|
|
918
|
+
}, d.isBefore = function(f, o) {
|
|
919
|
+
return this.endOf(o) < i(f);
|
|
920
|
+
}, d.$g = function(f, o, c) {
|
|
921
|
+
return u.u(f) ? this[o] : this.set(c, f);
|
|
899
922
|
}, d.unix = function() {
|
|
900
923
|
return Math.floor(this.valueOf() / 1e3);
|
|
901
924
|
}, d.valueOf = function() {
|
|
902
925
|
return this.$d.getTime();
|
|
903
|
-
}, d.startOf = function(
|
|
904
|
-
var c = this,
|
|
905
|
-
var _ = u.w(c.$u ? Date.UTC(c.$y, O,
|
|
906
|
-
return
|
|
907
|
-
},
|
|
908
|
-
return u.w(c.toDate()[
|
|
909
|
-
},
|
|
910
|
-
switch (
|
|
926
|
+
}, d.startOf = function(f, o) {
|
|
927
|
+
var c = this, l = !!u.u(o) || o, w = u.p(f), m = function(D, O) {
|
|
928
|
+
var _ = u.w(c.$u ? Date.UTC(c.$y, O, D) : new Date(c.$y, O, D), c);
|
|
929
|
+
return l ? _ : _.endOf(h);
|
|
930
|
+
}, k = function(D, O) {
|
|
931
|
+
return u.w(c.toDate()[D].apply(c.toDate("s"), (l ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(O)), c);
|
|
932
|
+
}, p = this.$W, M = this.$M, C = this.$D, Y = "set" + (this.$u ? "UTC" : "");
|
|
933
|
+
switch (w) {
|
|
911
934
|
case q:
|
|
912
|
-
return
|
|
913
|
-
case
|
|
914
|
-
return
|
|
915
|
-
case
|
|
916
|
-
var
|
|
917
|
-
return
|
|
918
|
-
case
|
|
935
|
+
return l ? m(1, 0) : m(31, 11);
|
|
936
|
+
case j:
|
|
937
|
+
return l ? m(1, M) : m(0, M + 1);
|
|
938
|
+
case A:
|
|
939
|
+
var W = this.$locale().weekStart || 0, S = (p < W ? p + 7 : p) - W;
|
|
940
|
+
return m(l ? C - S : C + (6 - S), M);
|
|
941
|
+
case h:
|
|
919
942
|
case G:
|
|
920
|
-
return
|
|
943
|
+
return k(Y + "Hours", 0);
|
|
921
944
|
case K:
|
|
922
|
-
return
|
|
923
|
-
case
|
|
924
|
-
return
|
|
925
|
-
case
|
|
926
|
-
return
|
|
945
|
+
return k(Y + "Minutes", 1);
|
|
946
|
+
case I:
|
|
947
|
+
return k(Y + "Seconds", 2);
|
|
948
|
+
case U:
|
|
949
|
+
return k(Y + "Milliseconds", 3);
|
|
927
950
|
default:
|
|
928
951
|
return this.clone();
|
|
929
952
|
}
|
|
930
|
-
}, d.endOf = function(
|
|
931
|
-
return this.startOf(
|
|
932
|
-
}, d.$set = function(
|
|
933
|
-
var c,
|
|
934
|
-
if (
|
|
935
|
-
var
|
|
936
|
-
|
|
937
|
-
} else
|
|
953
|
+
}, d.endOf = function(f) {
|
|
954
|
+
return this.startOf(f, !1);
|
|
955
|
+
}, d.$set = function(f, o) {
|
|
956
|
+
var c, l = u.p(f), w = "set" + (this.$u ? "UTC" : ""), m = (c = {}, c[h] = w + "Date", c[G] = w + "Date", c[j] = w + "Month", c[q] = w + "FullYear", c[K] = w + "Hours", c[I] = w + "Minutes", c[U] = w + "Seconds", c[b] = w + "Milliseconds", c)[l], k = l === h ? this.$D + (o - this.$W) : o;
|
|
957
|
+
if (l === j || l === q) {
|
|
958
|
+
var p = this.clone().set(G, 1);
|
|
959
|
+
p.$d[m](k), p.init(), this.$d = p.set(G, Math.min(this.$D, p.daysInMonth())).$d;
|
|
960
|
+
} else m && this.$d[m](k);
|
|
938
961
|
return this.init(), this;
|
|
939
|
-
}, d.set = function(
|
|
940
|
-
return this.clone().$set(
|
|
941
|
-
}, d.get = function(
|
|
942
|
-
return this[u.p(
|
|
943
|
-
}, d.add = function(
|
|
944
|
-
var c,
|
|
945
|
-
|
|
946
|
-
var
|
|
947
|
-
var C = i(
|
|
948
|
-
return u.w(C.date(C.date() + Math.round(M *
|
|
962
|
+
}, d.set = function(f, o) {
|
|
963
|
+
return this.clone().$set(f, o);
|
|
964
|
+
}, d.get = function(f) {
|
|
965
|
+
return this[u.p(f)]();
|
|
966
|
+
}, d.add = function(f, o) {
|
|
967
|
+
var c, l = this;
|
|
968
|
+
f = Number(f);
|
|
969
|
+
var w = u.p(o), m = function(M) {
|
|
970
|
+
var C = i(l);
|
|
971
|
+
return u.w(C.date(C.date() + Math.round(M * f)), l);
|
|
949
972
|
};
|
|
950
|
-
if (
|
|
951
|
-
if (
|
|
952
|
-
if (
|
|
953
|
-
if (
|
|
954
|
-
var
|
|
955
|
-
return u.w(
|
|
956
|
-
}, d.subtract = function(
|
|
957
|
-
return this.add(-1 *
|
|
958
|
-
}, d.format = function(
|
|
973
|
+
if (w === j) return this.set(j, this.$M + f);
|
|
974
|
+
if (w === q) return this.set(q, this.$y + f);
|
|
975
|
+
if (w === h) return m(1);
|
|
976
|
+
if (w === A) return m(7);
|
|
977
|
+
var k = (c = {}, c[I] = s, c[K] = y, c[U] = n, c)[w] || 1, p = this.$d.getTime() + f * k;
|
|
978
|
+
return u.w(p, this);
|
|
979
|
+
}, d.subtract = function(f, o) {
|
|
980
|
+
return this.add(-1 * f, o);
|
|
981
|
+
}, d.format = function(f) {
|
|
959
982
|
var o = this, c = this.$locale();
|
|
960
983
|
if (!this.isValid()) return c.invalidDate || nt;
|
|
961
|
-
var
|
|
962
|
-
return O && (O[_] || O(o,
|
|
963
|
-
},
|
|
964
|
-
return u.s(
|
|
965
|
-
},
|
|
966
|
-
var
|
|
967
|
-
return
|
|
984
|
+
var l = f || "YYYY-MM-DDTHH:mm:ssZ", w = u.z(this), m = this.$H, k = this.$m, p = this.$M, M = c.weekdays, C = c.months, Y = c.meridiem, W = function(O, _, T, B) {
|
|
985
|
+
return O && (O[_] || O(o, l)) || T[_].slice(0, B);
|
|
986
|
+
}, S = function(O) {
|
|
987
|
+
return u.s(m % 12 || 12, O, "0");
|
|
988
|
+
}, D = Y || function(O, _, T) {
|
|
989
|
+
var B = O < 12 ? "AM" : "PM";
|
|
990
|
+
return T ? B.toLowerCase() : B;
|
|
968
991
|
};
|
|
969
|
-
return
|
|
970
|
-
return _ || (function(
|
|
971
|
-
switch (
|
|
992
|
+
return l.replace(mt, (function(O, _) {
|
|
993
|
+
return _ || (function(T) {
|
|
994
|
+
switch (T) {
|
|
972
995
|
case "YY":
|
|
973
996
|
return String(o.$y).slice(-2);
|
|
974
997
|
case "YYYY":
|
|
975
998
|
return u.s(o.$y, 4, "0");
|
|
976
999
|
case "M":
|
|
977
|
-
return
|
|
1000
|
+
return p + 1;
|
|
978
1001
|
case "MM":
|
|
979
|
-
return u.s(
|
|
1002
|
+
return u.s(p + 1, 2, "0");
|
|
980
1003
|
case "MMM":
|
|
981
|
-
return
|
|
1004
|
+
return W(c.monthsShort, p, C, 3);
|
|
982
1005
|
case "MMMM":
|
|
983
|
-
return
|
|
1006
|
+
return W(C, p);
|
|
984
1007
|
case "D":
|
|
985
1008
|
return o.$D;
|
|
986
1009
|
case "DD":
|
|
@@ -988,27 +1011,27 @@ function re() {
|
|
|
988
1011
|
case "d":
|
|
989
1012
|
return String(o.$W);
|
|
990
1013
|
case "dd":
|
|
991
|
-
return
|
|
1014
|
+
return W(c.weekdaysMin, o.$W, M, 2);
|
|
992
1015
|
case "ddd":
|
|
993
|
-
return
|
|
1016
|
+
return W(c.weekdaysShort, o.$W, M, 3);
|
|
994
1017
|
case "dddd":
|
|
995
1018
|
return M[o.$W];
|
|
996
1019
|
case "H":
|
|
997
|
-
return String(
|
|
1020
|
+
return String(m);
|
|
998
1021
|
case "HH":
|
|
999
|
-
return u.s(
|
|
1022
|
+
return u.s(m, 2, "0");
|
|
1000
1023
|
case "h":
|
|
1001
|
-
return
|
|
1024
|
+
return S(1);
|
|
1002
1025
|
case "hh":
|
|
1003
|
-
return
|
|
1026
|
+
return S(2);
|
|
1004
1027
|
case "a":
|
|
1005
|
-
return
|
|
1028
|
+
return D(m, k, !0);
|
|
1006
1029
|
case "A":
|
|
1007
|
-
return
|
|
1030
|
+
return D(m, k, !1);
|
|
1008
1031
|
case "m":
|
|
1009
|
-
return String(
|
|
1032
|
+
return String(k);
|
|
1010
1033
|
case "mm":
|
|
1011
|
-
return u.s(
|
|
1034
|
+
return u.s(k, 2, "0");
|
|
1012
1035
|
case "s":
|
|
1013
1036
|
return String(o.$s);
|
|
1014
1037
|
case "ss":
|
|
@@ -1016,54 +1039,54 @@ function re() {
|
|
|
1016
1039
|
case "SSS":
|
|
1017
1040
|
return u.s(o.$ms, 3, "0");
|
|
1018
1041
|
case "Z":
|
|
1019
|
-
return
|
|
1042
|
+
return w;
|
|
1020
1043
|
}
|
|
1021
1044
|
return null;
|
|
1022
|
-
})(O) ||
|
|
1045
|
+
})(O) || w.replace(":", "");
|
|
1023
1046
|
}));
|
|
1024
1047
|
}, d.utcOffset = function() {
|
|
1025
1048
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1026
|
-
}, d.diff = function(
|
|
1027
|
-
var
|
|
1028
|
-
return u.m(
|
|
1049
|
+
}, d.diff = function(f, o, c) {
|
|
1050
|
+
var l, w = this, m = u.p(o), k = i(f), p = (k.utcOffset() - this.utcOffset()) * s, M = this - k, C = function() {
|
|
1051
|
+
return u.m(w, k);
|
|
1029
1052
|
};
|
|
1030
|
-
switch (
|
|
1053
|
+
switch (m) {
|
|
1031
1054
|
case q:
|
|
1032
|
-
|
|
1055
|
+
l = C() / 12;
|
|
1033
1056
|
break;
|
|
1034
|
-
case
|
|
1035
|
-
|
|
1057
|
+
case j:
|
|
1058
|
+
l = C();
|
|
1036
1059
|
break;
|
|
1037
1060
|
case Q:
|
|
1038
|
-
|
|
1061
|
+
l = C() / 3;
|
|
1039
1062
|
break;
|
|
1040
|
-
case
|
|
1041
|
-
|
|
1063
|
+
case A:
|
|
1064
|
+
l = (M - p) / 6048e5;
|
|
1042
1065
|
break;
|
|
1043
|
-
case
|
|
1044
|
-
|
|
1066
|
+
case h:
|
|
1067
|
+
l = (M - p) / 864e5;
|
|
1045
1068
|
break;
|
|
1046
1069
|
case K:
|
|
1047
|
-
|
|
1070
|
+
l = M / y;
|
|
1048
1071
|
break;
|
|
1049
|
-
case
|
|
1050
|
-
|
|
1072
|
+
case I:
|
|
1073
|
+
l = M / s;
|
|
1051
1074
|
break;
|
|
1052
|
-
case
|
|
1053
|
-
|
|
1075
|
+
case U:
|
|
1076
|
+
l = M / n;
|
|
1054
1077
|
break;
|
|
1055
1078
|
default:
|
|
1056
|
-
|
|
1079
|
+
l = M;
|
|
1057
1080
|
}
|
|
1058
|
-
return c ?
|
|
1081
|
+
return c ? l : u.a(l);
|
|
1059
1082
|
}, d.daysInMonth = function() {
|
|
1060
|
-
return this.endOf(
|
|
1083
|
+
return this.endOf(j).$D;
|
|
1061
1084
|
}, d.$locale = function() {
|
|
1062
1085
|
return V[this.$L];
|
|
1063
|
-
}, d.locale = function(
|
|
1064
|
-
if (!
|
|
1065
|
-
var c = this.clone(),
|
|
1066
|
-
return
|
|
1086
|
+
}, d.locale = function(f, o) {
|
|
1087
|
+
if (!f) return this.$L;
|
|
1088
|
+
var c = this.clone(), l = r(f, o, !0);
|
|
1089
|
+
return l && (c.$L = l), c;
|
|
1067
1090
|
}, d.clone = function() {
|
|
1068
1091
|
return u.w(this.$d, this);
|
|
1069
1092
|
}, d.toDate = function() {
|
|
@@ -1074,155 +1097,155 @@ function re() {
|
|
|
1074
1097
|
return this.$d.toISOString();
|
|
1075
1098
|
}, d.toString = function() {
|
|
1076
1099
|
return this.$d.toUTCString();
|
|
1077
|
-
},
|
|
1078
|
-
})(),
|
|
1079
|
-
return i.prototype =
|
|
1080
|
-
|
|
1081
|
-
return this.$g(d,
|
|
1100
|
+
}, v;
|
|
1101
|
+
})(), E = g.prototype;
|
|
1102
|
+
return i.prototype = E, [["$ms", b], ["$s", U], ["$m", I], ["$H", K], ["$W", h], ["$M", j], ["$y", q], ["$D", G]].forEach((function(v) {
|
|
1103
|
+
E[v[1]] = function(d) {
|
|
1104
|
+
return this.$g(d, v[0], v[1]);
|
|
1082
1105
|
};
|
|
1083
|
-
})), i.extend = function(
|
|
1084
|
-
return
|
|
1085
|
-
}, i.locale = r, i.isDayjs = e, i.unix = function(
|
|
1086
|
-
return i(1e3 *
|
|
1106
|
+
})), i.extend = function(v, d) {
|
|
1107
|
+
return v.$i || (v(d, g, i), v.$i = !0), i;
|
|
1108
|
+
}, i.locale = r, i.isDayjs = e, i.unix = function(v) {
|
|
1109
|
+
return i(1e3 * v);
|
|
1087
1110
|
}, i.en = V[ct], i.Ls = V, i.p = {}, i;
|
|
1088
1111
|
}));
|
|
1089
1112
|
})(xt)), xt.exports;
|
|
1090
1113
|
}
|
|
1091
|
-
var
|
|
1092
|
-
const
|
|
1093
|
-
var
|
|
1094
|
-
function
|
|
1095
|
-
return
|
|
1096
|
-
(function(n,
|
|
1097
|
-
|
|
1098
|
-
})(
|
|
1114
|
+
var Ht = Xt();
|
|
1115
|
+
const tt = /* @__PURE__ */ Mt(Ht);
|
|
1116
|
+
var Dt = { exports: {} }, te = Dt.exports, At;
|
|
1117
|
+
function ee() {
|
|
1118
|
+
return At || (At = 1, (function(a, t) {
|
|
1119
|
+
(function(n, s) {
|
|
1120
|
+
a.exports = s();
|
|
1121
|
+
})(te, (function() {
|
|
1099
1122
|
var n = "day";
|
|
1100
|
-
return function(
|
|
1101
|
-
var
|
|
1102
|
-
return
|
|
1103
|
-
},
|
|
1104
|
-
|
|
1105
|
-
return
|
|
1106
|
-
},
|
|
1107
|
-
if (!this.$utils().u(
|
|
1108
|
-
var
|
|
1123
|
+
return function(s, y, b) {
|
|
1124
|
+
var U = function(h) {
|
|
1125
|
+
return h.add(4 - h.isoWeekday(), n);
|
|
1126
|
+
}, I = y.prototype;
|
|
1127
|
+
I.isoWeekYear = function() {
|
|
1128
|
+
return U(this).year();
|
|
1129
|
+
}, I.isoWeek = function(h) {
|
|
1130
|
+
if (!this.$utils().u(h)) return this.add(7 * (h - this.isoWeek()), n);
|
|
1131
|
+
var A, j, Q, q, G = U(this), nt = (A = this.isoWeekYear(), j = this.$u, Q = (j ? b.utc : b)().year(A).startOf("year"), q = 4 - Q.isoWeekday(), Q.isoWeekday() > 4 && (q += 7), Q.add(q, n));
|
|
1109
1132
|
return G.diff(nt, "week") + 1;
|
|
1110
|
-
},
|
|
1111
|
-
return this.$utils().u(
|
|
1133
|
+
}, I.isoWeekday = function(h) {
|
|
1134
|
+
return this.$utils().u(h) ? this.day() || 7 : this.day(this.day() % 7 ? h : h - 7);
|
|
1112
1135
|
};
|
|
1113
|
-
var K =
|
|
1114
|
-
|
|
1115
|
-
var
|
|
1116
|
-
return
|
|
1136
|
+
var K = I.startOf;
|
|
1137
|
+
I.startOf = function(h, A) {
|
|
1138
|
+
var j = this.$utils(), Q = !!j.u(A) || A;
|
|
1139
|
+
return j.p(h) === "isoweek" ? Q ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : K.bind(this)(h, A);
|
|
1117
1140
|
};
|
|
1118
1141
|
};
|
|
1119
1142
|
}));
|
|
1120
|
-
})(
|
|
1143
|
+
})(Dt)), Dt.exports;
|
|
1121
1144
|
}
|
|
1122
|
-
var
|
|
1123
|
-
const
|
|
1124
|
-
var
|
|
1125
|
-
function
|
|
1126
|
-
return Ft || (Ft = 1, (function(
|
|
1127
|
-
(function(n,
|
|
1128
|
-
|
|
1129
|
-
})(
|
|
1145
|
+
var re = ee();
|
|
1146
|
+
const ne = /* @__PURE__ */ Mt(re);
|
|
1147
|
+
var Ot = { exports: {} }, ie = Ot.exports, Ft;
|
|
1148
|
+
function se() {
|
|
1149
|
+
return Ft || (Ft = 1, (function(a, t) {
|
|
1150
|
+
(function(n, s) {
|
|
1151
|
+
a.exports = s();
|
|
1152
|
+
})(ie, (function() {
|
|
1130
1153
|
var n = { 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" };
|
|
1131
|
-
return function(
|
|
1132
|
-
var
|
|
1133
|
-
|
|
1154
|
+
return function(s, y, b) {
|
|
1155
|
+
var U = y.prototype, I = U.format;
|
|
1156
|
+
b.en.formats = n, U.format = function(K) {
|
|
1134
1157
|
K === void 0 && (K = "YYYY-MM-DDTHH:mm:ssZ");
|
|
1135
|
-
var
|
|
1136
|
-
return
|
|
1158
|
+
var h = this.$locale().formats, A = (function(j, Q) {
|
|
1159
|
+
return j.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(q, G, nt) {
|
|
1137
1160
|
var ut = nt && nt.toUpperCase();
|
|
1138
|
-
return G || Q[nt] || n[nt] || Q[ut].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(
|
|
1161
|
+
return G || Q[nt] || n[nt] || Q[ut].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(mt, wt, dt) {
|
|
1139
1162
|
return wt || dt.slice(1);
|
|
1140
1163
|
}));
|
|
1141
1164
|
}));
|
|
1142
|
-
})(K,
|
|
1143
|
-
return
|
|
1165
|
+
})(K, h === void 0 ? {} : h);
|
|
1166
|
+
return I.call(this, A);
|
|
1144
1167
|
};
|
|
1145
1168
|
};
|
|
1146
1169
|
}));
|
|
1147
|
-
})(
|
|
1170
|
+
})(Ot)), Ot.exports;
|
|
1148
1171
|
}
|
|
1149
|
-
var
|
|
1150
|
-
const
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
function
|
|
1154
|
-
|
|
1172
|
+
var ae = se();
|
|
1173
|
+
const oe = /* @__PURE__ */ Mt(ae);
|
|
1174
|
+
tt.extend(oe);
|
|
1175
|
+
tt.extend(ne);
|
|
1176
|
+
function ge() {
|
|
1177
|
+
P(
|
|
1155
1178
|
Date.prototype,
|
|
1156
1179
|
"add",
|
|
1157
|
-
function(
|
|
1158
|
-
return
|
|
1180
|
+
function(a, t) {
|
|
1181
|
+
return tt(this).add(a, t).toDate();
|
|
1159
1182
|
}
|
|
1160
|
-
),
|
|
1183
|
+
), P(
|
|
1161
1184
|
Date.prototype,
|
|
1162
1185
|
"diff",
|
|
1163
|
-
function(
|
|
1164
|
-
return
|
|
1186
|
+
function(a, t) {
|
|
1187
|
+
return tt(this).diff(a, t);
|
|
1165
1188
|
}
|
|
1166
|
-
),
|
|
1167
|
-
return
|
|
1168
|
-
}),
|
|
1169
|
-
return
|
|
1170
|
-
}),
|
|
1189
|
+
), P(Date.prototype, "endOf", function(a) {
|
|
1190
|
+
return tt(this).endOf(a).toDate();
|
|
1191
|
+
}), P(Date.prototype, "firstDayOfMonth", function() {
|
|
1192
|
+
return tt(this).startOf("month").toDate();
|
|
1193
|
+
}), P(
|
|
1171
1194
|
Date.prototype,
|
|
1172
1195
|
"format",
|
|
1173
|
-
function(
|
|
1174
|
-
return
|
|
1196
|
+
function(a) {
|
|
1197
|
+
return tt(this).format(a);
|
|
1175
1198
|
}
|
|
1176
|
-
),
|
|
1199
|
+
), P(
|
|
1177
1200
|
Date.prototype,
|
|
1178
1201
|
"isAfter",
|
|
1179
|
-
function(
|
|
1180
|
-
return
|
|
1202
|
+
function(a, t) {
|
|
1203
|
+
return tt(this).isAfter(a, t);
|
|
1181
1204
|
}
|
|
1182
|
-
),
|
|
1205
|
+
), P(
|
|
1183
1206
|
Date.prototype,
|
|
1184
1207
|
"isBefore",
|
|
1185
|
-
function(
|
|
1186
|
-
return
|
|
1208
|
+
function(a, t) {
|
|
1209
|
+
return tt(this).isBefore(a, t);
|
|
1187
1210
|
}
|
|
1188
|
-
),
|
|
1189
|
-
return
|
|
1190
|
-
}),
|
|
1191
|
-
return
|
|
1192
|
-
}),
|
|
1211
|
+
), P(Date.prototype, "isValid", function() {
|
|
1212
|
+
return tt(this).isValid();
|
|
1213
|
+
}), P(Date.prototype, "isoWeek", function() {
|
|
1214
|
+
return tt(this).isoWeek();
|
|
1215
|
+
}), P(
|
|
1193
1216
|
Date.prototype,
|
|
1194
1217
|
"subtract",
|
|
1195
|
-
function(
|
|
1196
|
-
return
|
|
1218
|
+
function(a, t) {
|
|
1219
|
+
return tt(this).subtract(a, t).toDate();
|
|
1197
1220
|
}
|
|
1198
|
-
),
|
|
1199
|
-
return
|
|
1200
|
-
}),
|
|
1221
|
+
), P(Date.prototype, "lastDayOfMonth", function() {
|
|
1222
|
+
return tt(this).endOf("month").toDate();
|
|
1223
|
+
}), P(
|
|
1201
1224
|
Date.prototype,
|
|
1202
1225
|
"set",
|
|
1203
|
-
function(
|
|
1204
|
-
return
|
|
1226
|
+
function(a, t) {
|
|
1227
|
+
return tt(this).set(a, t).toDate();
|
|
1205
1228
|
}
|
|
1206
|
-
),
|
|
1229
|
+
), P(
|
|
1207
1230
|
Date.prototype,
|
|
1208
1231
|
"startOf",
|
|
1209
|
-
function(
|
|
1210
|
-
return
|
|
1232
|
+
function(a) {
|
|
1233
|
+
return tt(this).startOf(a).toDate();
|
|
1211
1234
|
}
|
|
1212
1235
|
);
|
|
1213
1236
|
}
|
|
1214
|
-
function
|
|
1215
|
-
|
|
1237
|
+
function ye() {
|
|
1238
|
+
P(String.prototype, "capitalize", function() {
|
|
1216
1239
|
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
1217
|
-
}),
|
|
1240
|
+
}), P(String.prototype, "isNumber", function() {
|
|
1218
1241
|
return !isNaN(Number(this)) && this.trim() !== "";
|
|
1219
|
-
}),
|
|
1242
|
+
}), P(String.prototype, "isEmpty", function() {
|
|
1220
1243
|
return this === void 0 || !this || this.length === 0;
|
|
1221
|
-
}),
|
|
1244
|
+
}), P(String.prototype, "stripTags", function() {
|
|
1222
1245
|
return new DOMParser().parseFromString(this.toString(), "text/html").body.textContent || "";
|
|
1223
1246
|
});
|
|
1224
1247
|
}
|
|
1225
|
-
class
|
|
1248
|
+
class ve {
|
|
1226
1249
|
resizeListener = null;
|
|
1227
1250
|
onResizeCallbacks = /* @__PURE__ */ new Set();
|
|
1228
1251
|
// feuert bei jedem throttled Resize
|
|
@@ -1247,30 +1270,32 @@ class _e {
|
|
|
1247
1270
|
this.emitTimeoutId !== null && clearTimeout(this.emitTimeoutId), this.emitTimeoutId = window.setTimeout(() => {
|
|
1248
1271
|
this.emitTimeoutId = null;
|
|
1249
1272
|
const n = pt.getBreakpointByScreenWidth(t);
|
|
1250
|
-
for (const
|
|
1251
|
-
|
|
1273
|
+
for (const s of this.onResizeCallbacks)
|
|
1274
|
+
s(t, n);
|
|
1252
1275
|
}, this.duplicateThresholdMs);
|
|
1253
1276
|
};
|
|
1254
1277
|
}
|
|
1255
1278
|
export {
|
|
1256
1279
|
pt as BreakPointHelper,
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1280
|
+
zt as BreakPoints,
|
|
1281
|
+
H as BrowserHelper,
|
|
1282
|
+
ve as BrowserService,
|
|
1283
|
+
rt as BrowserType,
|
|
1284
|
+
ue as CanvasHelper,
|
|
1285
|
+
le as CsvHelper,
|
|
1286
|
+
qt as DownloadHelper,
|
|
1287
|
+
fe as EnumHelper,
|
|
1288
|
+
de as FileHelper,
|
|
1289
|
+
he as ImageHelper,
|
|
1264
1290
|
Ct as LocalStorageHelper,
|
|
1265
1291
|
X as LoggerHelper,
|
|
1266
1292
|
vt as LoggerType,
|
|
1267
1293
|
St as ScreenHelper,
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
te as sortHelper
|
|
1294
|
+
pe as TokenHelper,
|
|
1295
|
+
z as WindowResizeHelper,
|
|
1296
|
+
ce as copyToClipboard,
|
|
1297
|
+
me as initArrayExtensions,
|
|
1298
|
+
ge as initDateExtensions,
|
|
1299
|
+
ye as initStringExtensions,
|
|
1300
|
+
Zt as sortHelper
|
|
1276
1301
|
};
|