@oardi/ts-utils 0.0.17 → 0.0.19
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-extension.d.ts +1 -1
- package/extensions/array-extension.d.ts.map +1 -1
- package/helpers/csv.helper.d.ts.map +1 -1
- package/helpers/index.d.ts +2 -2
- package/helpers/index.d.ts.map +1 -1
- package/helpers/logger/index.d.ts +2 -0
- package/helpers/logger/index.d.ts.map +1 -0
- package/{enums/loggertype.enum.d.ts → helpers/logger/logger-type.enum.d.ts} +2 -2
- package/helpers/logger/logger-type.enum.d.ts.map +1 -0
- package/helpers/{logger.helper.d.ts → logger/logger.helper.d.ts} +3 -0
- package/helpers/logger/logger.helper.d.ts.map +1 -0
- package/helpers/logger/logger.types.d.ts +8 -0
- package/helpers/logger/logger.types.d.ts.map +1 -0
- package/helpers/token/index.d.ts +3 -0
- package/helpers/token/index.d.ts.map +1 -0
- package/helpers/token/token-type.enum.d.ts +2 -0
- package/helpers/token/token-type.enum.d.ts.map +1 -0
- package/helpers/{token.helper.d.ts → token/token.helper.d.ts} +1 -1
- package/helpers/token/token.helper.d.ts.map +1 -0
- package/index.cjs.js +7 -7
- package/index.es.js +437 -413
- package/index.umd.js +7 -7
- package/interfaces/index.d.ts +0 -1
- package/interfaces/index.d.ts.map +1 -1
- package/package.json +5 -2
- package/readme.md +15 -0
- package/{enums/browsertype.enum.d.ts → services/browser/browser-type.enum.d.ts} +1 -1
- package/services/browser/browser-type.enum.d.ts.map +1 -0
- package/{interfaces → services/browser}/browser.interface.d.ts +1 -1
- package/services/browser/browser.interface.d.ts.map +1 -0
- package/services/{browser.service.d.ts → browser/browser.service.d.ts} +4 -4
- package/services/browser/browser.service.d.ts.map +1 -0
- package/services/browser/index.d.ts +4 -0
- package/services/browser/index.d.ts.map +1 -0
- package/services/index.d.ts +1 -1
- package/services/index.d.ts.map +1 -1
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/enums/browsertype.enum.d.ts.map +0 -1
- package/enums/index.d.ts +0 -3
- package/enums/index.d.ts.map +0 -1
- package/enums/loggertype.enum.d.ts.map +0 -1
- package/helpers/logger.helper.d.ts.map +0 -1
- package/helpers/token.helper.d.ts.map +0 -1
- package/index.es.d.ts +0 -1
- package/interfaces/browser.interface.d.ts.map +0 -1
- package/services/browser.service.d.ts.map +0 -1
package/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
function
|
|
1
|
+
function et(s) {
|
|
2
2
|
return navigator.clipboard.writeText(s);
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function Ee(s) {
|
|
5
5
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
6
6
|
}
|
|
7
7
|
var ve = { exports: {} };
|
|
@@ -11,27 +11,27 @@ v5.5.3
|
|
|
11
11
|
https://github.com/mholt/PapaParse
|
|
12
12
|
License: MIT
|
|
13
13
|
*/
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
return
|
|
17
|
-
((i,
|
|
18
|
-
s.exports =
|
|
19
|
-
})(
|
|
20
|
-
var
|
|
14
|
+
var $e = ve.exports, De;
|
|
15
|
+
function Ae() {
|
|
16
|
+
return De || (De = 1, (function(s, r) {
|
|
17
|
+
((i, f) => {
|
|
18
|
+
s.exports = f();
|
|
19
|
+
})($e, function i() {
|
|
20
|
+
var f = typeof self < "u" ? self : typeof window < "u" ? window : f !== void 0 ? f : {}, k, C = !f.document && !!f.postMessage, I = f.IS_PAPA_WORKER || !1, P = {}, Y = 0, w = {};
|
|
21
21
|
function N(e) {
|
|
22
22
|
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(t) {
|
|
23
|
-
var n =
|
|
24
|
-
n.chunkSize = parseInt(n.chunkSize), t.step || t.chunk || (n.chunkSize = null), this._handle = new
|
|
23
|
+
var n = ae(t);
|
|
24
|
+
n.chunkSize = parseInt(n.chunkSize), t.step || t.chunk || (n.chunkSize = null), this._handle = new te(n), (this._handle.streamer = this)._config = n;
|
|
25
25
|
}).call(this, e), this.parseChunk = function(t, n) {
|
|
26
26
|
var o = parseInt(this._config.skipFirstNLines) || 0;
|
|
27
27
|
if (this.isFirstChunk && 0 < o) {
|
|
28
|
-
let
|
|
29
|
-
|
|
28
|
+
let S = this._config.newline;
|
|
29
|
+
S || (g = this._config.quoteChar || '"', S = this._handle.guessLineEndings(t, g)), t = [...t.split(S).slice(o)].join(S);
|
|
30
30
|
}
|
|
31
31
|
this.isFirstChunk && $(this._config.beforeFirstChunk) && (g = this._config.beforeFirstChunk(t)) !== void 0 && (t = g), this.isFirstChunk = !1, this._halted = !1;
|
|
32
32
|
var o = this._partialLine + t, g = (this._partialLine = "", this._handle.parse(o, this._baseIndex, !this._finished));
|
|
33
33
|
if (!this._handle.paused() && !this._handle.aborted()) {
|
|
34
|
-
if (t = g.meta.cursor, o = (this._finished || (this._partialLine = o.substring(t - this._baseIndex), this._baseIndex = t), g && g.data && (this._rowCount += g.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), I)
|
|
34
|
+
if (t = g.meta.cursor, o = (this._finished || (this._partialLine = o.substring(t - this._baseIndex), this._baseIndex = t), g && g.data && (this._rowCount += g.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), I) f.postMessage({ results: g, workerId: w.WORKER_ID, finished: o });
|
|
35
35
|
else if ($(this._config.chunk) && !n) {
|
|
36
36
|
if (this._config.chunk(g, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
|
|
37
37
|
this._completeResults = g = void 0;
|
|
@@ -40,12 +40,12 @@ function Ie() {
|
|
|
40
40
|
}
|
|
41
41
|
this._halted = !0;
|
|
42
42
|
}, this._sendError = function(t) {
|
|
43
|
-
$(this._config.error) ? this._config.error(t) : I && this._config.error &&
|
|
43
|
+
$(this._config.error) ? this._config.error(t) : I && this._config.error && f.postMessage({ workerId: w.WORKER_ID, error: t, finished: !1 });
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
function W(e) {
|
|
47
47
|
var t;
|
|
48
|
-
(e = e || {}).chunkSize || (e.chunkSize = w.RemoteChunkSize), N.call(this, e), this._nextChunk =
|
|
48
|
+
(e = e || {}).chunkSize || (e.chunkSize = w.RemoteChunkSize), N.call(this, e), this._nextChunk = C ? function() {
|
|
49
49
|
this._readChunk(), this._chunkLoaded();
|
|
50
50
|
} : function() {
|
|
51
51
|
this._readChunk();
|
|
@@ -54,7 +54,7 @@ function Ie() {
|
|
|
54
54
|
}, this._readChunk = function() {
|
|
55
55
|
if (this._finished) this._chunkLoaded();
|
|
56
56
|
else {
|
|
57
|
-
if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials),
|
|
57
|
+
if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials), C || (t.onload = q(this._chunkLoaded, this), t.onerror = q(this._chunkError, this)), t.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !C), this._config.downloadRequestHeaders) {
|
|
58
58
|
var n, o = this._config.downloadRequestHeaders;
|
|
59
59
|
for (n in o) t.setRequestHeader(n, o[n]);
|
|
60
60
|
}
|
|
@@ -62,10 +62,10 @@ function Ie() {
|
|
|
62
62
|
this._config.chunkSize && (g = this._start + this._config.chunkSize - 1, t.setRequestHeader("Range", "bytes=" + this._start + "-" + g));
|
|
63
63
|
try {
|
|
64
64
|
t.send(this._config.downloadRequestBody);
|
|
65
|
-
} catch (
|
|
66
|
-
this._chunkError(
|
|
65
|
+
} catch (S) {
|
|
66
|
+
this._chunkError(S.message);
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
C && t.status === 0 && this._chunkError();
|
|
69
69
|
}
|
|
70
70
|
}, this._chunkLoaded = function() {
|
|
71
71
|
t.readyState === 4 && (t.status < 200 || 400 <= t.status ? this._chunkError() : (this._start += this._config.chunkSize || t.responseText.length, this._finished = !this._config.chunkSize || this._start >= ((n) => (n = n.getResponseHeader("Content-Range")) !== null ? parseInt(n.substring(n.lastIndexOf("/") + 1)) : -1)(t), this.parseChunk(t.responseText)));
|
|
@@ -73,16 +73,16 @@ function Ie() {
|
|
|
73
73
|
n = t.statusText || n, this._sendError(new Error(n));
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function ee(e) {
|
|
77
77
|
(e = e || {}).chunkSize || (e.chunkSize = w.LocalChunkSize), N.call(this, e);
|
|
78
78
|
var t, n, o = typeof FileReader < "u";
|
|
79
79
|
this.stream = function(g) {
|
|
80
|
-
this._input = g, n = g.slice || g.webkitSlice || g.mozSlice, o ? ((t = new FileReader()).onload =
|
|
80
|
+
this._input = g, n = g.slice || g.webkitSlice || g.mozSlice, o ? ((t = new FileReader()).onload = q(this._chunkLoaded, this), t.onerror = q(this._chunkError, this)) : t = new FileReaderSync(), this._nextChunk();
|
|
81
81
|
}, this._nextChunk = function() {
|
|
82
82
|
this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
|
|
83
83
|
}, this._readChunk = function() {
|
|
84
|
-
var g = this._input,
|
|
85
|
-
o || this._chunkLoaded({ target: { result:
|
|
84
|
+
var g = this._input, S = (this._config.chunkSize && (S = Math.min(this._start + this._config.chunkSize, this._input.size), g = n.call(g, this._start, S)), t.readAsText(g, this._config.encoding));
|
|
85
|
+
o || this._chunkLoaded({ target: { result: S } });
|
|
86
86
|
}, this._chunkLoaded = function(g) {
|
|
87
87
|
this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(g.target.result);
|
|
88
88
|
}, this._chunkError = function() {
|
|
@@ -111,69 +111,69 @@ function Ie() {
|
|
|
111
111
|
o && t.length === 1 && (this._finished = !0);
|
|
112
112
|
}, this._nextChunk = function() {
|
|
113
113
|
this._checkIsFinished(), t.length ? this.parseChunk(t.shift()) : n = !0;
|
|
114
|
-
}, this._streamData =
|
|
114
|
+
}, this._streamData = q(function(g) {
|
|
115
115
|
try {
|
|
116
116
|
t.push(typeof g == "string" ? g : g.toString(this._config.encoding)), n && (n = !1, this._checkIsFinished(), this.parseChunk(t.shift()));
|
|
117
|
-
} catch (
|
|
118
|
-
this._streamError(
|
|
117
|
+
} catch (S) {
|
|
118
|
+
this._streamError(S);
|
|
119
119
|
}
|
|
120
|
-
}, this), this._streamError =
|
|
120
|
+
}, this), this._streamError = q(function(g) {
|
|
121
121
|
this._streamCleanUp(), this._sendError(g);
|
|
122
|
-
}, this), this._streamEnd =
|
|
122
|
+
}, this), this._streamEnd = q(function() {
|
|
123
123
|
this._streamCleanUp(), o = !0, this._streamData("");
|
|
124
|
-
}, this), this._streamCleanUp =
|
|
124
|
+
}, this), this._streamCleanUp = q(function() {
|
|
125
125
|
this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
|
|
126
126
|
}, this);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
var t, n, o, g,
|
|
130
|
-
function D(
|
|
131
|
-
return e.skipEmptyLines === "greedy" ?
|
|
128
|
+
function te(e) {
|
|
129
|
+
var t, n, o, g, S = Math.pow(2, 53), m = -S, d = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, c = /^((\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)))$/, a = this, u = 0, h = 0, y = !1, p = !1, _ = [], l = { data: [], errors: [], meta: {} };
|
|
130
|
+
function D(b) {
|
|
131
|
+
return e.skipEmptyLines === "greedy" ? b.join("").trim() === "" : b.length === 1 && b[0].length === 0;
|
|
132
132
|
}
|
|
133
133
|
function R() {
|
|
134
|
-
if (
|
|
134
|
+
if (l && o && (j("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + w.DefaultDelimiter + "'"), o = !1), e.skipEmptyLines && (l.data = l.data.filter(function(v) {
|
|
135
135
|
return !D(v);
|
|
136
136
|
})), F()) {
|
|
137
137
|
let v = function(A, z) {
|
|
138
138
|
$(e.transformHeader) && (A = e.transformHeader(A, z)), _.push(A);
|
|
139
139
|
};
|
|
140
|
-
if (
|
|
141
|
-
for (var
|
|
142
|
-
|
|
143
|
-
} else
|
|
140
|
+
if (l) if (Array.isArray(l.data[0])) {
|
|
141
|
+
for (var b = 0; F() && b < l.data.length; b++) l.data[b].forEach(v);
|
|
142
|
+
l.data.splice(0, 1);
|
|
143
|
+
} else l.data.forEach(v);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function x(v, A) {
|
|
146
146
|
for (var z = e.header ? {} : [], L = 0; L < v.length; L++) {
|
|
147
|
-
var T = L,
|
|
148
|
-
if (
|
|
147
|
+
var T = L, M = v[L], M = ((G, E) => ((B) => (e.dynamicTypingFunction && e.dynamicTyping[B] === void 0 && (e.dynamicTyping[B] = e.dynamicTypingFunction(B)), (e.dynamicTyping[B] || e.dynamicTyping) === !0))(G) ? E === "true" || E === "TRUE" || E !== "false" && E !== "FALSE" && (((B) => {
|
|
148
|
+
if (d.test(B) && (B = parseFloat(B), m < B && B < S))
|
|
149
149
|
return 1;
|
|
150
|
-
})(
|
|
151
|
-
T === "__parsed_extra" ? (z[T] = z[T] || [], z[T].push(
|
|
150
|
+
})(E) ? parseFloat(E) : c.test(E) ? new Date(E) : E === "" ? null : E) : E)(T = e.header ? L >= _.length ? "__parsed_extra" : _[L] : T, M = e.transform ? e.transform(M, T) : M);
|
|
151
|
+
T === "__parsed_extra" ? (z[T] = z[T] || [], z[T].push(M)) : z[T] = M;
|
|
152
152
|
}
|
|
153
153
|
return e.header && (L > _.length ? j("FieldMismatch", "TooManyFields", "Too many fields: expected " + _.length + " fields but parsed " + L, h + A) : L < _.length && j("FieldMismatch", "TooFewFields", "Too few fields: expected " + _.length + " fields but parsed " + L, h + A)), z;
|
|
154
154
|
}
|
|
155
155
|
var O;
|
|
156
|
-
|
|
156
|
+
l && (e.header || e.dynamicTyping || e.transform) && (O = 1, !l.data.length || Array.isArray(l.data[0]) ? (l.data = l.data.map(x), O = l.data.length) : l.data = x(l.data, 0), e.header && l.meta && (l.meta.fields = _), h += O);
|
|
157
157
|
}
|
|
158
158
|
function F() {
|
|
159
159
|
return e.header && _.length === 0;
|
|
160
160
|
}
|
|
161
|
-
function j(
|
|
162
|
-
|
|
161
|
+
function j(b, x, O, v) {
|
|
162
|
+
b = { type: b, code: x, message: O }, v !== void 0 && (b.row = v), l.errors.push(b);
|
|
163
163
|
}
|
|
164
|
-
$(e.step) && (g = e.step, e.step = function(
|
|
165
|
-
|
|
166
|
-
}), this.parse = function(
|
|
167
|
-
var v = e.quoteChar || '"', v = (e.newline || (e.newline = this.guessLineEndings(
|
|
168
|
-
var
|
|
169
|
-
|
|
170
|
-
for (var fe = 0; fe <
|
|
171
|
-
for (var
|
|
172
|
-
0 < J.data.length && (
|
|
164
|
+
$(e.step) && (g = e.step, e.step = function(b) {
|
|
165
|
+
l = b, F() ? R() : (R(), l.data.length !== 0 && (u += b.data.length, e.preview && u > e.preview ? n.abort() : (l.data = l.data[0], g(l, a))));
|
|
166
|
+
}), this.parse = function(b, x, O) {
|
|
167
|
+
var v = e.quoteChar || '"', v = (e.newline || (e.newline = this.guessLineEndings(b, v)), o = !1, e.delimiter ? $(e.delimiter) && (e.delimiter = e.delimiter(b), l.meta.delimiter = e.delimiter) : ((v = ((A, z, L, T, M) => {
|
|
168
|
+
var G, E, B, he;
|
|
169
|
+
M = M || [",", " ", "|", ";", w.RECORD_SEP, w.UNIT_SEP];
|
|
170
|
+
for (var fe = 0; fe < M.length; fe++) {
|
|
171
|
+
for (var re, me = M[fe], H = 0, ne = 0, U = 0, J = (B = void 0, new ce({ comments: T, delimiter: me, newline: z, preview: 10 }).parse(A)), oe = 0; oe < J.data.length; oe++) L && D(J.data[oe]) ? U++ : (re = J.data[oe].length, ne += re, B === void 0 ? B = re : 0 < re && (H += Math.abs(re - B), B = re));
|
|
172
|
+
0 < J.data.length && (ne /= J.data.length - U), (E === void 0 || H <= E) && (he === void 0 || he < ne) && 1.99 < ne && (E = H, G = me, he = ne);
|
|
173
173
|
}
|
|
174
|
-
return { successful: !!(e.delimiter =
|
|
175
|
-
})(
|
|
176
|
-
return e.preview && e.header && v.preview++, t =
|
|
174
|
+
return { successful: !!(e.delimiter = G), bestDelimiter: G };
|
|
175
|
+
})(b, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = v.bestDelimiter : (o = !0, e.delimiter = w.DefaultDelimiter), l.meta.delimiter = e.delimiter), ae(e));
|
|
176
|
+
return e.preview && e.header && v.preview++, t = b, n = new ce(v), l = n.parse(t, x, O), R(), y ? { meta: { paused: !0 } } : l || { meta: { paused: !1 } };
|
|
177
177
|
}, this.paused = function() {
|
|
178
178
|
return y;
|
|
179
179
|
}, this.pause = function() {
|
|
@@ -183,10 +183,10 @@ function Ie() {
|
|
|
183
183
|
}, this.aborted = function() {
|
|
184
184
|
return p;
|
|
185
185
|
}, this.abort = function() {
|
|
186
|
-
p = !0, n.abort(),
|
|
186
|
+
p = !0, n.abort(), l.meta.aborted = !0, $(e.complete) && e.complete(l), t = "";
|
|
187
187
|
}, this.guessLineEndings = function(A, v) {
|
|
188
188
|
A = A.substring(0, 1048576);
|
|
189
|
-
var v = new RegExp(
|
|
189
|
+
var v = new RegExp(se(v) + "([^]*?)" + se(v), "gm"), O = (A = A.replace(v, "")).split("\r"), v = A.split(`
|
|
190
190
|
`), A = 1 < v.length && v[0].length < O[0].length;
|
|
191
191
|
if (O.length === 1 || A) return `
|
|
192
192
|
`;
|
|
@@ -196,95 +196,95 @@ function Ie() {
|
|
|
196
196
|
` : "\r";
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function se(e) {
|
|
200
200
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
var t = (e = e || {}).delimiter, n = e.newline, o = e.comments, g = e.step,
|
|
202
|
+
function ce(e) {
|
|
203
|
+
var t = (e = e || {}).delimiter, n = e.newline, o = e.comments, g = e.step, S = e.preview, m = e.fastMode, d = null, c = !1, a = e.quoteChar == null ? '"' : e.quoteChar, u = a;
|
|
204
204
|
if (e.escapeChar !== void 0 && (u = e.escapeChar), (typeof t != "string" || -1 < w.BAD_DELIMITERS.indexOf(t)) && (t = ","), o === t) throw new Error("Comment character same as delimiter");
|
|
205
205
|
o === !0 ? o = "#" : (typeof o != "string" || -1 < w.BAD_DELIMITERS.indexOf(o)) && (o = !1), n !== `
|
|
206
206
|
` && n !== "\r" && n !== `\r
|
|
207
207
|
` && (n = `
|
|
208
208
|
`);
|
|
209
209
|
var h = 0, y = !1;
|
|
210
|
-
this.parse = function(p, _,
|
|
210
|
+
this.parse = function(p, _, l) {
|
|
211
211
|
if (typeof p != "string") throw new Error("Input must be a string");
|
|
212
|
-
var D = p.length, R = t.length, F = n.length, j = o.length,
|
|
213
|
-
if (!p) return
|
|
212
|
+
var D = p.length, R = t.length, F = n.length, j = o.length, b = $(g), x = [], O = [], v = [], A = h = 0;
|
|
213
|
+
if (!p) return H();
|
|
214
214
|
if (m || m !== !1 && p.indexOf(a) === -1) {
|
|
215
215
|
for (var z = p.split(n), L = 0; L < z.length; L++) {
|
|
216
216
|
if (v = z[L], h += v.length, L !== z.length - 1) h += n.length;
|
|
217
|
-
else if (
|
|
217
|
+
else if (l) return H();
|
|
218
218
|
if (!o || v.substring(0, j) !== o) {
|
|
219
|
-
if (
|
|
220
|
-
if (
|
|
221
|
-
} else
|
|
222
|
-
if (
|
|
219
|
+
if (b) {
|
|
220
|
+
if (x = [], he(v.split(t)), ne(), y) return H();
|
|
221
|
+
} else he(v.split(t));
|
|
222
|
+
if (S && S <= L) return x = x.slice(0, S), H(!0);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
return
|
|
225
|
+
return H();
|
|
226
226
|
}
|
|
227
|
-
for (var T = p.indexOf(t, h),
|
|
228
|
-
if ((
|
|
229
|
-
if (
|
|
230
|
-
if (a === u && p[
|
|
231
|
-
else if (a === u ||
|
|
232
|
-
T !== -1 && T <
|
|
233
|
-
var B = fe((
|
|
234
|
-
if (p.substr(
|
|
235
|
-
v.push(p.substring(h,
|
|
227
|
+
for (var T = p.indexOf(t, h), M = p.indexOf(n, h), G = new RegExp(se(u) + se(a), "g"), E = p.indexOf(a, h); ; ) if (p[h] === a) for (E = h, h++; ; ) {
|
|
228
|
+
if ((E = p.indexOf(a, E + 1)) === -1) return l || O.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: x.length, index: h }), re();
|
|
229
|
+
if (E === D - 1) return re(p.substring(h, E).replace(G, a));
|
|
230
|
+
if (a === u && p[E + 1] === u) E++;
|
|
231
|
+
else if (a === u || E === 0 || p[E - 1] !== u) {
|
|
232
|
+
T !== -1 && T < E + 1 && (T = p.indexOf(t, E + 1));
|
|
233
|
+
var B = fe((M = M !== -1 && M < E + 1 ? p.indexOf(n, E + 1) : M) === -1 ? T : Math.min(T, M));
|
|
234
|
+
if (p.substr(E + 1 + B, R) === t) {
|
|
235
|
+
v.push(p.substring(h, E).replace(G, a)), p[h = E + 1 + B + R] !== a && (E = p.indexOf(a, h)), T = p.indexOf(t, h), M = p.indexOf(n, h);
|
|
236
236
|
break;
|
|
237
237
|
}
|
|
238
|
-
if (B = fe(
|
|
239
|
-
if (v.push(p.substring(h,
|
|
240
|
-
if (
|
|
238
|
+
if (B = fe(M), p.substring(E + 1 + B, E + 1 + B + F) === n) {
|
|
239
|
+
if (v.push(p.substring(h, E).replace(G, a)), me(E + 1 + B + F), T = p.indexOf(t, h), E = p.indexOf(a, h), b && (ne(), y)) return H();
|
|
240
|
+
if (S && x.length >= S) return H(!0);
|
|
241
241
|
break;
|
|
242
242
|
}
|
|
243
|
-
O.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row:
|
|
243
|
+
O.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: x.length, index: h }), E++;
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
else if (o && v.length === 0 && p.substring(h, h + j) === o) {
|
|
247
|
-
if (
|
|
248
|
-
h =
|
|
249
|
-
} else if (T !== -1 && (T <
|
|
247
|
+
if (M === -1) return H();
|
|
248
|
+
h = M + F, M = p.indexOf(n, h), T = p.indexOf(t, h);
|
|
249
|
+
} else if (T !== -1 && (T < M || M === -1)) v.push(p.substring(h, T)), h = T + R, T = p.indexOf(t, h);
|
|
250
250
|
else {
|
|
251
|
-
if (
|
|
252
|
-
if (v.push(p.substring(h,
|
|
253
|
-
if (
|
|
251
|
+
if (M === -1) break;
|
|
252
|
+
if (v.push(p.substring(h, M)), me(M + F), b && (ne(), y)) return H();
|
|
253
|
+
if (S && x.length >= S) return H(!0);
|
|
254
254
|
}
|
|
255
|
-
return
|
|
256
|
-
function
|
|
257
|
-
|
|
255
|
+
return re();
|
|
256
|
+
function he(U) {
|
|
257
|
+
x.push(U), A = h;
|
|
258
258
|
}
|
|
259
259
|
function fe(U) {
|
|
260
260
|
var J = 0;
|
|
261
|
-
return J = U !== -1 && (U = p.substring(
|
|
261
|
+
return J = U !== -1 && (U = p.substring(E + 1, U)) && U.trim() === "" ? U.length : J;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
return
|
|
263
|
+
function re(U) {
|
|
264
|
+
return l || (U === void 0 && (U = p.substring(h)), v.push(U), h = D, he(v), b && ne()), H();
|
|
265
265
|
}
|
|
266
266
|
function me(U) {
|
|
267
|
-
h = U,
|
|
267
|
+
h = U, he(v), v = [], M = p.indexOf(n, h);
|
|
268
268
|
}
|
|
269
|
-
function
|
|
270
|
-
if (e.header && !_ &&
|
|
271
|
-
var J =
|
|
272
|
-
let
|
|
273
|
-
for (let
|
|
274
|
-
let
|
|
275
|
-
if (
|
|
276
|
-
let ye,
|
|
277
|
-
for (; ye =
|
|
278
|
-
Se.add(ye), J[
|
|
279
|
-
} else
|
|
280
|
-
Se.add(
|
|
269
|
+
function H(U) {
|
|
270
|
+
if (e.header && !_ && x.length && !c) {
|
|
271
|
+
var J = x[0], oe = /* @__PURE__ */ Object.create(null), Se = new Set(J);
|
|
272
|
+
let xe = !1;
|
|
273
|
+
for (let de = 0; de < J.length; de++) {
|
|
274
|
+
let ie = J[de];
|
|
275
|
+
if (oe[ie = $(e.transformHeader) ? e.transformHeader(ie, de) : ie]) {
|
|
276
|
+
let ye, Oe = oe[ie];
|
|
277
|
+
for (; ye = ie + "_" + Oe, Oe++, Se.has(ye); ) ;
|
|
278
|
+
Se.add(ye), J[de] = ye, oe[ie]++, xe = !0, (d = d === null ? {} : d)[ye] = ie;
|
|
279
|
+
} else oe[ie] = 1, J[de] = ie;
|
|
280
|
+
Se.add(ie);
|
|
281
281
|
}
|
|
282
|
-
|
|
282
|
+
xe && console.warn("Duplicate headers found and renamed."), c = !0;
|
|
283
283
|
}
|
|
284
|
-
return { data:
|
|
284
|
+
return { data: x, errors: O, meta: { delimiter: t, linebreak: n, aborted: y, truncated: !!U, cursor: A + (_ || 0), renamedHeaders: d } };
|
|
285
285
|
}
|
|
286
|
-
function
|
|
287
|
-
g(
|
|
286
|
+
function ne() {
|
|
287
|
+
g(H()), x = [], O = [];
|
|
288
288
|
}
|
|
289
289
|
}, this.abort = function() {
|
|
290
290
|
y = !0;
|
|
@@ -297,29 +297,29 @@ function Ie() {
|
|
|
297
297
|
if (t.error) n.userError(t.error, t.file);
|
|
298
298
|
else if (t.results && t.results.data) {
|
|
299
299
|
var g = { abort: function() {
|
|
300
|
-
o = !0,
|
|
300
|
+
o = !0, ue(t.workerId, { data: [], errors: [], meta: { aborted: !0 } });
|
|
301
301
|
}, pause: we, resume: we };
|
|
302
302
|
if ($(n.userStep)) {
|
|
303
|
-
for (var
|
|
303
|
+
for (var S = 0; S < t.results.data.length && (n.userStep({ data: t.results.data[S], errors: t.results.errors, meta: t.results.meta }, g), !o); S++) ;
|
|
304
304
|
delete t.results;
|
|
305
305
|
} else $(n.userChunk) && (n.userChunk(t.results, g, t.file), delete t.results);
|
|
306
306
|
}
|
|
307
|
-
t.finished && !o &&
|
|
307
|
+
t.finished && !o && ue(t.workerId, t.results);
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function ue(e, t) {
|
|
310
310
|
var n = P[e];
|
|
311
311
|
$(n.userComplete) && n.userComplete(t), n.terminate(), delete P[e];
|
|
312
312
|
}
|
|
313
313
|
function we() {
|
|
314
314
|
throw new Error("Not implemented.");
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function ae(e) {
|
|
317
317
|
if (typeof e != "object" || e === null) return e;
|
|
318
318
|
var t, n = Array.isArray(e) ? [] : {};
|
|
319
|
-
for (t in e) n[t] =
|
|
319
|
+
for (t in e) n[t] = ae(e[t]);
|
|
320
320
|
return n;
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function q(e, t) {
|
|
323
323
|
return function() {
|
|
324
324
|
e.apply(t, arguments);
|
|
325
325
|
};
|
|
@@ -329,82 +329,82 @@ function Ie() {
|
|
|
329
329
|
}
|
|
330
330
|
return w.parse = function(e, t) {
|
|
331
331
|
var n = (t = t || {}).dynamicTyping || !1;
|
|
332
|
-
if ($(n) && (t.dynamicTypingFunction = n, n = {}), t.dynamicTyping = n, t.transform = !!$(t.transform) && t.transform, !t.worker || !w.WORKERS_SUPPORTED) return n = null, w.NODE_STREAM_INPUT, typeof e == "string" ? (e = ((o) => o.charCodeAt(0) !== 65279 ? o : o.slice(1))(e), n = new (t.download ? W : K)(t)) : e.readable === !0 && $(e.read) && $(e.on) ? n = new Q(t) : (
|
|
332
|
+
if ($(n) && (t.dynamicTypingFunction = n, n = {}), t.dynamicTyping = n, t.transform = !!$(t.transform) && t.transform, !t.worker || !w.WORKERS_SUPPORTED) return n = null, w.NODE_STREAM_INPUT, typeof e == "string" ? (e = ((o) => o.charCodeAt(0) !== 65279 ? o : o.slice(1))(e), n = new (t.download ? W : K)(t)) : e.readable === !0 && $(e.read) && $(e.on) ? n = new Q(t) : (f.File && e instanceof File || e instanceof Object) && (n = new ee(t)), n.stream(e);
|
|
333
333
|
(n = (() => {
|
|
334
334
|
var o;
|
|
335
335
|
return !!w.WORKERS_SUPPORTED && (o = (() => {
|
|
336
|
-
var g =
|
|
337
|
-
return w.BLOB_URL || (w.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; ", "(",
|
|
338
|
-
})(), (o = new
|
|
336
|
+
var g = f.URL || f.webkitURL || null, S = i.toString();
|
|
337
|
+
return w.BLOB_URL || (w.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; ", "(", S, ")();"], { type: "text/javascript" })));
|
|
338
|
+
})(), (o = new f.Worker(o)).onmessage = ge, o.id = Y++, P[o.id] = o);
|
|
339
339
|
})()).userStep = t.step, n.userChunk = t.chunk, n.userComplete = t.complete, n.userError = t.error, t.step = $(t.step), t.chunk = $(t.chunk), t.complete = $(t.complete), t.error = $(t.error), delete t.worker, n.postMessage({ input: e, config: t, workerId: n.id });
|
|
340
340
|
}, w.unparse = function(e, t) {
|
|
341
|
-
var n = !1, o = !0, g = ",",
|
|
342
|
-
`, m = '"',
|
|
341
|
+
var n = !1, o = !0, g = ",", S = `\r
|
|
342
|
+
`, m = '"', d = m + m, c = !1, a = null, u = !1, h = ((() => {
|
|
343
343
|
if (typeof t == "object") {
|
|
344
344
|
if (typeof t.delimiter != "string" || w.BAD_DELIMITERS.filter(function(_) {
|
|
345
345
|
return t.delimiter.indexOf(_) !== -1;
|
|
346
|
-
}).length || (g = t.delimiter), typeof t.quotes != "boolean" && typeof t.quotes != "function" && !Array.isArray(t.quotes) || (n = t.quotes), typeof t.skipEmptyLines != "boolean" && typeof t.skipEmptyLines != "string" || (
|
|
346
|
+
}).length || (g = t.delimiter), typeof t.quotes != "boolean" && typeof t.quotes != "function" && !Array.isArray(t.quotes) || (n = t.quotes), typeof t.skipEmptyLines != "boolean" && typeof t.skipEmptyLines != "string" || (c = t.skipEmptyLines), typeof t.newline == "string" && (S = t.newline), typeof t.quoteChar == "string" && (m = t.quoteChar), typeof t.header == "boolean" && (o = t.header), Array.isArray(t.columns)) {
|
|
347
347
|
if (t.columns.length === 0) throw new Error("Option columns is empty");
|
|
348
348
|
a = t.columns;
|
|
349
349
|
}
|
|
350
|
-
t.escapeChar !== void 0 && (
|
|
350
|
+
t.escapeChar !== void 0 && (d = t.escapeChar + m), t.escapeFormulae instanceof RegExp ? u = t.escapeFormulae : typeof t.escapeFormulae == "boolean" && t.escapeFormulae && (u = /^[=+\-@\t\r].*$/);
|
|
351
351
|
}
|
|
352
|
-
})(), new RegExp(
|
|
352
|
+
})(), new RegExp(se(m), "g"));
|
|
353
353
|
if (typeof e == "string" && (e = JSON.parse(e)), Array.isArray(e)) {
|
|
354
|
-
if (!e.length || Array.isArray(e[0])) return y(null, e,
|
|
355
|
-
if (typeof e[0] == "object") return y(a || Object.keys(e[0]), e,
|
|
356
|
-
} 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 || a), 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])), y(e.fields || [], e.data || [],
|
|
354
|
+
if (!e.length || Array.isArray(e[0])) return y(null, e, c);
|
|
355
|
+
if (typeof e[0] == "object") return y(a || Object.keys(e[0]), e, c);
|
|
356
|
+
} 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 || a), 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])), y(e.fields || [], e.data || [], c);
|
|
357
357
|
throw new Error("Unable to serialize unrecognized input");
|
|
358
|
-
function y(_,
|
|
359
|
-
var R = "", F = (typeof _ == "string" && (_ = JSON.parse(_)), typeof
|
|
358
|
+
function y(_, l, D) {
|
|
359
|
+
var R = "", F = (typeof _ == "string" && (_ = JSON.parse(_)), typeof l == "string" && (l = JSON.parse(l)), Array.isArray(_) && 0 < _.length), j = !Array.isArray(l[0]);
|
|
360
360
|
if (F && o) {
|
|
361
|
-
for (var
|
|
362
|
-
0 <
|
|
361
|
+
for (var b = 0; b < _.length; b++) 0 < b && (R += g), R += p(_[b], b);
|
|
362
|
+
0 < l.length && (R += S);
|
|
363
363
|
}
|
|
364
|
-
for (var
|
|
365
|
-
var O = (F ? _ :
|
|
366
|
-
if (D && !F && (v = D === "greedy" ?
|
|
364
|
+
for (var x = 0; x < l.length; x++) {
|
|
365
|
+
var O = (F ? _ : l[x]).length, v = !1, A = F ? Object.keys(l[x]).length === 0 : l[x].length === 0;
|
|
366
|
+
if (D && !F && (v = D === "greedy" ? l[x].join("").trim() === "" : l[x].length === 1 && l[x][0].length === 0), D === "greedy" && F) {
|
|
367
367
|
for (var z = [], L = 0; L < O; L++) {
|
|
368
368
|
var T = j ? _[L] : L;
|
|
369
|
-
z.push(
|
|
369
|
+
z.push(l[x][T]);
|
|
370
370
|
}
|
|
371
371
|
v = z.join("").trim() === "";
|
|
372
372
|
}
|
|
373
373
|
if (!v) {
|
|
374
|
-
for (var
|
|
375
|
-
0 <
|
|
376
|
-
var
|
|
377
|
-
R += p(
|
|
374
|
+
for (var M = 0; M < O; M++) {
|
|
375
|
+
0 < M && !A && (R += g);
|
|
376
|
+
var G = F && j ? _[M] : M;
|
|
377
|
+
R += p(l[x][G], M);
|
|
378
378
|
}
|
|
379
|
-
|
|
379
|
+
x < l.length - 1 && (!D || 0 < O && !A) && (R += S);
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
return R;
|
|
383
383
|
}
|
|
384
|
-
function p(_,
|
|
384
|
+
function p(_, l) {
|
|
385
385
|
var D, R;
|
|
386
|
-
return _ == null ? "" : _.constructor === Date ? JSON.stringify(_).slice(1, 25) : (R = !1, u && typeof _ == "string" && u.test(_) && (_ = "'" + _, R = !0), D = _.toString().replace(h,
|
|
387
|
-
for (var
|
|
386
|
+
return _ == null ? "" : _.constructor === Date ? JSON.stringify(_).slice(1, 25) : (R = !1, u && typeof _ == "string" && u.test(_) && (_ = "'" + _, R = !0), D = _.toString().replace(h, d), (R = R || n === !0 || typeof n == "function" && n(_, l) || Array.isArray(n) && n[l] || ((F, j) => {
|
|
387
|
+
for (var b = 0; b < j.length; b++) if (-1 < F.indexOf(j[b])) return !0;
|
|
388
388
|
return !1;
|
|
389
389
|
})(D, w.BAD_DELIMITERS) || -1 < D.indexOf(g) || D.charAt(0) === " " || D.charAt(D.length - 1) === " ") ? m + D + m : D);
|
|
390
390
|
}
|
|
391
391
|
}, w.RECORD_SEP = "", w.UNIT_SEP = "", w.BYTE_ORDER_MARK = "\uFEFF", w.BAD_DELIMITERS = ["\r", `
|
|
392
|
-
`, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !
|
|
392
|
+
`, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !C && !!f.Worker, w.NODE_STREAM_INPUT = 1, w.LocalChunkSize = 10485760, w.RemoteChunkSize = 5242880, w.DefaultDelimiter = ",", w.Parser = ce, w.ParserHandle = te, w.NetworkStreamer = W, w.FileStreamer = ee, w.StringStreamer = K, w.ReadableStreamStreamer = Q, f.jQuery && ((k = f.jQuery).fn.parse = function(e) {
|
|
393
393
|
var t = e.config || {}, n = [];
|
|
394
|
-
return this.each(function(
|
|
395
|
-
if (!(
|
|
396
|
-
for (var m = 0; m < this.files.length; m++) n.push({ file: this.files[m], inputElem: this, instanceConfig:
|
|
394
|
+
return this.each(function(S) {
|
|
395
|
+
if (!(k(this).prop("tagName").toUpperCase() === "INPUT" && k(this).attr("type").toLowerCase() === "file" && f.FileReader) || !this.files || this.files.length === 0) return !0;
|
|
396
|
+
for (var m = 0; m < this.files.length; m++) n.push({ file: this.files[m], inputElem: this, instanceConfig: k.extend({}, t) });
|
|
397
397
|
}), o(), this;
|
|
398
398
|
function o() {
|
|
399
399
|
if (n.length === 0) $(e.complete) && e.complete();
|
|
400
400
|
else {
|
|
401
|
-
var
|
|
401
|
+
var S, m, d, c, a = n[0];
|
|
402
402
|
if ($(e.before)) {
|
|
403
403
|
var u = e.before(a.file, a.inputElem);
|
|
404
404
|
if (typeof u == "object") {
|
|
405
|
-
if (u.action === "abort") return
|
|
405
|
+
if (u.action === "abort") return S = "AbortError", m = a.file, d = a.inputElem, c = u.reason, void ($(e.error) && e.error({ name: S }, m, d, c));
|
|
406
406
|
if (u.action === "skip") return void g();
|
|
407
|
-
typeof u.config == "object" && (a.instanceConfig =
|
|
407
|
+
typeof u.config == "object" && (a.instanceConfig = k.extend(a.instanceConfig, u.config));
|
|
408
408
|
} else if (u === "skip") return void g();
|
|
409
409
|
}
|
|
410
410
|
var h = a.instanceConfig.complete;
|
|
@@ -416,45 +416,46 @@ function Ie() {
|
|
|
416
416
|
function g() {
|
|
417
417
|
n.splice(0, 1), o();
|
|
418
418
|
}
|
|
419
|
-
}), I && (
|
|
420
|
-
e = e.data, w.WORKER_ID === void 0 && e && (w.WORKER_ID = e.workerId), typeof e.input == "string" ?
|
|
421
|
-
}), (W.prototype = Object.create(N.prototype)).constructor = W, (
|
|
419
|
+
}), I && (f.onmessage = function(e) {
|
|
420
|
+
e = e.data, w.WORKER_ID === void 0 && e && (w.WORKER_ID = e.workerId), typeof e.input == "string" ? f.postMessage({ workerId: w.WORKER_ID, results: w.parse(e.input, e.config), finished: !0 }) : (f.File && e.input instanceof File || e.input instanceof Object) && (e = w.parse(e.input, e.config)) && f.postMessage({ workerId: w.WORKER_ID, results: e, finished: !0 });
|
|
421
|
+
}), (W.prototype = Object.create(N.prototype)).constructor = W, (ee.prototype = Object.create(N.prototype)).constructor = ee, (K.prototype = Object.create(K.prototype)).constructor = K, (Q.prototype = Object.create(N.prototype)).constructor = Q, w;
|
|
422
422
|
});
|
|
423
423
|
})(ve)), ve.exports;
|
|
424
424
|
}
|
|
425
|
-
var
|
|
426
|
-
|
|
425
|
+
var Ie = Ae();
|
|
426
|
+
const Le = /* @__PURE__ */ Ee(Ie), { parse: Te, unparse: Fe } = Le;
|
|
427
|
+
class tt {
|
|
427
428
|
static unparse(r, i) {
|
|
428
|
-
return
|
|
429
|
+
return Fe(r, i);
|
|
429
430
|
}
|
|
430
431
|
static parse(r) {
|
|
431
|
-
return new Promise((i,
|
|
432
|
-
|
|
432
|
+
return new Promise((i, f) => {
|
|
433
|
+
Te(r, {
|
|
433
434
|
header: !0,
|
|
434
|
-
complete: (
|
|
435
|
-
error: (
|
|
435
|
+
complete: (k) => i(k),
|
|
436
|
+
error: (k) => f(k)
|
|
436
437
|
});
|
|
437
438
|
});
|
|
438
439
|
}
|
|
439
440
|
}
|
|
440
|
-
async function
|
|
441
|
-
const
|
|
441
|
+
async function ze(s, r, i) {
|
|
442
|
+
const f = i?.mimeType ?? je(r), k = Be(s, f);
|
|
442
443
|
if ("showSaveFilePicker" in window && i?.showSaveFilePicker)
|
|
443
444
|
try {
|
|
444
445
|
const Y = await (await window.showSaveFilePicker({
|
|
445
446
|
suggestedName: r,
|
|
446
|
-
types: [{ description: "Datei", accept: { [
|
|
447
|
+
types: [{ description: "Datei", accept: { [f]: [`.${Re(r)}`] } }]
|
|
447
448
|
})).createWritable();
|
|
448
|
-
await Y.write(
|
|
449
|
+
await Y.write(k), await Y.close();
|
|
449
450
|
return;
|
|
450
451
|
} catch {
|
|
451
452
|
}
|
|
452
|
-
const
|
|
453
|
-
I.href =
|
|
454
|
-
document.body.removeChild(I), URL.revokeObjectURL(
|
|
455
|
-
}, 0),
|
|
453
|
+
const C = URL.createObjectURL(k), I = document.createElement("a");
|
|
454
|
+
I.href = C, I.download = r, I.rel = "noopener", I.style.display = "none", document.body.appendChild(I), We(I), window.setTimeout(() => {
|
|
455
|
+
document.body.removeChild(I), URL.revokeObjectURL(C);
|
|
456
|
+
}, 0), Ue() && window.open(C, "_blank", "noopener,noreferrer");
|
|
456
457
|
}
|
|
457
|
-
function
|
|
458
|
+
function Be(s, r) {
|
|
458
459
|
if (s instanceof Blob)
|
|
459
460
|
return s.type ? s : new Blob([s], { type: r });
|
|
460
461
|
if (s instanceof ArrayBuffer || s instanceof Uint8Array) {
|
|
@@ -463,8 +464,8 @@ function Te(s, r) {
|
|
|
463
464
|
}
|
|
464
465
|
return new Blob([s], { type: r || "text/plain;charset=utf-8" });
|
|
465
466
|
}
|
|
466
|
-
function
|
|
467
|
-
switch (
|
|
467
|
+
function je(s) {
|
|
468
|
+
switch (Re(s).toLowerCase()) {
|
|
468
469
|
case "txt":
|
|
469
470
|
return "text/plain;charset=utf-8";
|
|
470
471
|
case "csv":
|
|
@@ -486,19 +487,19 @@ function Fe(s) {
|
|
|
486
487
|
return "application/octet-stream";
|
|
487
488
|
}
|
|
488
489
|
}
|
|
489
|
-
function
|
|
490
|
+
function Re(s) {
|
|
490
491
|
const r = s.lastIndexOf(".");
|
|
491
492
|
return r >= 0 && r < s.length - 1 ? s.slice(r + 1) : "";
|
|
492
493
|
}
|
|
493
|
-
function
|
|
494
|
+
function We(s) {
|
|
494
495
|
const r = document.createEvent("MouseEvents");
|
|
495
496
|
r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), s.dispatchEvent(r);
|
|
496
497
|
}
|
|
497
|
-
function
|
|
498
|
+
function Ue() {
|
|
498
499
|
const s = navigator.userAgent, r = /iPad|iPhone|iPod/.test(s), i = /^((?!chrome|android).)*safari/i.test(s);
|
|
499
500
|
return r || i;
|
|
500
501
|
}
|
|
501
|
-
class
|
|
502
|
+
class rt {
|
|
502
503
|
static getEnumValue(r, i) {
|
|
503
504
|
if (i in r)
|
|
504
505
|
return r[i];
|
|
@@ -511,61 +512,61 @@ class Xe {
|
|
|
511
512
|
}));
|
|
512
513
|
}
|
|
513
514
|
}
|
|
514
|
-
class
|
|
515
|
+
class nt {
|
|
515
516
|
static getFileExtension(r) {
|
|
516
517
|
let i = "";
|
|
517
|
-
const
|
|
518
|
-
return
|
|
518
|
+
const f = r.lastIndexOf(".");
|
|
519
|
+
return f > 0 && f < r.length - 1 && (i = `.${r.substring(f + 1).toLowerCase()}`), i;
|
|
519
520
|
}
|
|
520
521
|
/**
|
|
521
522
|
* read content from a file or blob
|
|
522
523
|
*/
|
|
523
524
|
static readAsText(r) {
|
|
524
525
|
const i = new FileReader();
|
|
525
|
-
return new Promise((
|
|
526
|
+
return new Promise((f, k) => {
|
|
526
527
|
i.onload = () => {
|
|
527
|
-
i.onload = null, i.onerror = null, typeof i.result == "string" ?
|
|
528
|
+
i.onload = null, i.onerror = null, typeof i.result == "string" ? f(i.result) : k(new Error("Unexpected result type"));
|
|
528
529
|
}, i.onerror = () => {
|
|
529
|
-
const
|
|
530
|
-
i.onload = null, i.onerror = null,
|
|
530
|
+
const C = i.error ?? new Error("FileReader error");
|
|
531
|
+
i.onload = null, i.onerror = null, k(C);
|
|
531
532
|
}, i.readAsText(r);
|
|
532
533
|
});
|
|
533
534
|
}
|
|
534
535
|
static readAsArrayBuffer(r) {
|
|
535
536
|
const i = new FileReader();
|
|
536
|
-
return new Promise((
|
|
537
|
+
return new Promise((f, k) => {
|
|
537
538
|
i.onload = () => {
|
|
538
|
-
i.onload = null, i.onerror = null, i.result instanceof ArrayBuffer ?
|
|
539
|
+
i.onload = null, i.onerror = null, i.result instanceof ArrayBuffer ? f(i.result) : k(new Error("Unexpected result type"));
|
|
539
540
|
}, i.onerror = () => {
|
|
540
|
-
const
|
|
541
|
-
i.onload = null, i.onerror = null,
|
|
541
|
+
const C = i.error ?? new Error("FileReader error");
|
|
542
|
+
i.onload = null, i.onerror = null, k(C);
|
|
542
543
|
}, i.readAsArrayBuffer(r);
|
|
543
544
|
});
|
|
544
545
|
}
|
|
545
546
|
static readAsDataUrl(r) {
|
|
546
547
|
const i = new FileReader();
|
|
547
|
-
return new Promise((
|
|
548
|
-
i.onload = (
|
|
549
|
-
|
|
550
|
-
}, i.onerror = (
|
|
548
|
+
return new Promise((f, k) => {
|
|
549
|
+
i.onload = (C) => {
|
|
550
|
+
f(C);
|
|
551
|
+
}, i.onerror = (C) => k(C), i.readAsDataURL(r);
|
|
551
552
|
});
|
|
552
553
|
}
|
|
553
554
|
/** usage:
|
|
554
555
|
* const file = new File(['Hello'], 'test.txt');
|
|
555
556
|
* FileHelper.formatFileSize(file.size);
|
|
556
557
|
* */
|
|
557
|
-
static formatFileSize(r, i = 2,
|
|
558
|
+
static formatFileSize(r, i = 2, f) {
|
|
558
559
|
if (r === 0)
|
|
559
560
|
return "0 Bytes";
|
|
560
|
-
const
|
|
561
|
-
let I = Math.floor(Math.log(r) / Math.log(
|
|
562
|
-
|
|
563
|
-
const P = r / Math.pow(
|
|
564
|
-
return `${parseFloat(P.toFixed(i))} ${
|
|
561
|
+
const k = 1024, C = ["Bytes", "KB", "MB", "GB", "TB"];
|
|
562
|
+
let I = Math.floor(Math.log(r) / Math.log(k));
|
|
563
|
+
f && C.includes(f) && (I = C.indexOf(f));
|
|
564
|
+
const P = r / Math.pow(k, I);
|
|
565
|
+
return `${parseFloat(P.toFixed(i))} ${C[I]}`;
|
|
565
566
|
}
|
|
566
|
-
static save(r, i,
|
|
567
|
-
const
|
|
568
|
-
|
|
567
|
+
static save(r, i, f) {
|
|
568
|
+
const k = new Blob([r], { type: f });
|
|
569
|
+
ze(k, i);
|
|
569
570
|
}
|
|
570
571
|
}
|
|
571
572
|
class _e {
|
|
@@ -574,8 +575,8 @@ class _e {
|
|
|
574
575
|
}
|
|
575
576
|
static get(r) {
|
|
576
577
|
let i = null;
|
|
577
|
-
const
|
|
578
|
-
return
|
|
578
|
+
const f = localStorage.getItem(r);
|
|
579
|
+
return f && (i = JSON.parse(f)), i;
|
|
579
580
|
}
|
|
580
581
|
static remove(r) {
|
|
581
582
|
let i = !!_e.get(r);
|
|
@@ -588,35 +589,60 @@ class _e {
|
|
|
588
589
|
return Object.keys(localStorage).filter((i) => i.startsWith(r));
|
|
589
590
|
}
|
|
590
591
|
}
|
|
591
|
-
var
|
|
592
|
-
class
|
|
592
|
+
var pe = /* @__PURE__ */ ((s) => (s.log = "log", s.info = "info", s.warn = "warn", s.debug = "debug", s.error = "error", s))(pe || {});
|
|
593
|
+
class V {
|
|
594
|
+
static listeners = /* @__PURE__ */ new Set();
|
|
593
595
|
static log(...r) {
|
|
594
|
-
|
|
596
|
+
V.doLog(pe.log, r);
|
|
595
597
|
}
|
|
596
598
|
static info(...r) {
|
|
597
|
-
|
|
599
|
+
V.doLog(pe.info, r);
|
|
598
600
|
}
|
|
599
601
|
static warn(...r) {
|
|
600
|
-
|
|
602
|
+
V.doLog(pe.warn, r);
|
|
601
603
|
}
|
|
602
604
|
static debug(...r) {
|
|
603
|
-
|
|
605
|
+
V.doLog(pe.debug, r);
|
|
604
606
|
}
|
|
605
607
|
static error(...r) {
|
|
606
|
-
|
|
608
|
+
V.doLog(pe.error, r);
|
|
607
609
|
}
|
|
608
610
|
static doLog(r, i) {
|
|
611
|
+
const f = {
|
|
612
|
+
type: r,
|
|
613
|
+
args: i,
|
|
614
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
615
|
+
};
|
|
616
|
+
for (const k of V.listeners)
|
|
617
|
+
try {
|
|
618
|
+
if (k(f) === !1)
|
|
619
|
+
return;
|
|
620
|
+
} catch {
|
|
621
|
+
}
|
|
609
622
|
console[r].apply(console, i);
|
|
610
623
|
}
|
|
624
|
+
static onLog(r, i = !1) {
|
|
625
|
+
if (i) {
|
|
626
|
+
const f = (k) => {
|
|
627
|
+
try {
|
|
628
|
+
return r(k);
|
|
629
|
+
} finally {
|
|
630
|
+
V.listeners.delete(f);
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
return V.listeners.add(f), () => V.listeners.delete(f);
|
|
634
|
+
}
|
|
635
|
+
return V.listeners.add(r), () => V.listeners.delete(r);
|
|
636
|
+
}
|
|
611
637
|
}
|
|
612
|
-
const
|
|
613
|
-
let
|
|
614
|
-
return typeof s == "string" && typeof r == "string" ?
|
|
615
|
-
},
|
|
616
|
-
const
|
|
617
|
-
return
|
|
638
|
+
const Pe = (s, r, i) => s.localeCompare(r) * (i ? 1 : -1), Ye = (s, r) => s < r ? -1 : s === r ? 0 : 1, Ne = (s, r, i) => Ye(s, r) * (i ? 1 : -1), qe = (s, r, i) => {
|
|
639
|
+
let f = 0;
|
|
640
|
+
return typeof s == "string" && typeof r == "string" ? f = Pe(s, r, i) : f = Ne(s, r, i), f;
|
|
641
|
+
}, He = (s, r, i, f) => {
|
|
642
|
+
const k = i(s), C = i(r);
|
|
643
|
+
return qe(k, C, f);
|
|
618
644
|
};
|
|
619
|
-
class
|
|
645
|
+
class it {
|
|
620
646
|
static get(r) {
|
|
621
647
|
return _e.get(r);
|
|
622
648
|
}
|
|
@@ -629,134 +655,131 @@ class tt {
|
|
|
629
655
|
}
|
|
630
656
|
Array.prototype.distinct = function(s) {
|
|
631
657
|
const r = this;
|
|
632
|
-
return s ? r.filter((
|
|
658
|
+
return s ? r.filter((f, k, C) => C.findIndex((I) => s(I, f)) === k) : r.filter((f, k, C) => C.indexOf(f) === k);
|
|
633
659
|
};
|
|
634
660
|
Array.prototype.filterBy = function(s) {
|
|
635
|
-
return this.filter((r) =>
|
|
636
|
-
let i = !1;
|
|
637
|
-
return s && r[s] ? i = r[s] === s : i = r === s, i;
|
|
638
|
-
});
|
|
661
|
+
return this.filter((r) => s(r));
|
|
639
662
|
};
|
|
640
663
|
Array.prototype.first = function() {
|
|
641
664
|
return this?.length > 0 ? this[0] : null;
|
|
642
665
|
};
|
|
643
666
|
Array.prototype.groupBy = function(s) {
|
|
644
667
|
return this.reduce((r, i) => {
|
|
645
|
-
const
|
|
646
|
-
return (r[
|
|
668
|
+
const f = s(i);
|
|
669
|
+
return (r[f] = r[f] || []).push(i), r;
|
|
647
670
|
}, {});
|
|
648
671
|
};
|
|
649
672
|
Array.prototype.orderBy = function(s, r = !0) {
|
|
650
|
-
return this?.sort((i,
|
|
673
|
+
return this?.sort((i, f) => He(i, f, s, r)), this;
|
|
651
674
|
};
|
|
652
675
|
Array.prototype.removeBy = function(s, r) {
|
|
653
676
|
return this.filter((i) => s(i) !== r);
|
|
654
677
|
};
|
|
655
|
-
var ke = { exports: {} },
|
|
656
|
-
function
|
|
678
|
+
var ke = { exports: {} }, Ke = ke.exports, Ce;
|
|
679
|
+
function Je() {
|
|
657
680
|
return Ce || (Ce = 1, (function(s, r) {
|
|
658
|
-
(function(i,
|
|
659
|
-
s.exports =
|
|
660
|
-
})(
|
|
661
|
-
var i = 1e3,
|
|
662
|
-
var
|
|
663
|
-
return "[" + m + (
|
|
664
|
-
} },
|
|
681
|
+
(function(i, f) {
|
|
682
|
+
s.exports = f();
|
|
683
|
+
})(Ke, (function() {
|
|
684
|
+
var i = 1e3, f = 6e4, k = 36e5, C = "millisecond", I = "second", P = "minute", Y = "hour", w = "day", N = "week", W = "month", ee = "quarter", K = "year", Q = "date", te = "Invalid Date", se = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, ce = /\[([^\]]+)]|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, ge = { 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) {
|
|
685
|
+
var d = ["th", "st", "nd", "rd"], c = m % 100;
|
|
686
|
+
return "[" + m + (d[(c - 20) % 10] || d[c] || d[0]) + "]";
|
|
687
|
+
} }, ue = function(m, d, c) {
|
|
665
688
|
var a = String(m);
|
|
666
|
-
return !a || a.length >=
|
|
667
|
-
}, we = { s:
|
|
668
|
-
var
|
|
669
|
-
return (
|
|
670
|
-
}, m: function m(
|
|
671
|
-
if (
|
|
672
|
-
var a = 12 * (
|
|
673
|
-
return +(-(a + (
|
|
689
|
+
return !a || a.length >= d ? m : "" + Array(d + 1 - a.length).join(c) + m;
|
|
690
|
+
}, we = { s: ue, z: function(m) {
|
|
691
|
+
var d = -m.utcOffset(), c = Math.abs(d), a = Math.floor(c / 60), u = c % 60;
|
|
692
|
+
return (d <= 0 ? "+" : "-") + ue(a, 2, "0") + ":" + ue(u, 2, "0");
|
|
693
|
+
}, m: function m(d, c) {
|
|
694
|
+
if (d.date() < c.date()) return -m(c, d);
|
|
695
|
+
var a = 12 * (c.year() - d.year()) + (c.month() - d.month()), u = d.clone().add(a, W), h = c - u < 0, y = d.clone().add(a + (h ? -1 : 1), W);
|
|
696
|
+
return +(-(a + (c - u) / (h ? u - y : y - u)) || 0);
|
|
674
697
|
}, a: function(m) {
|
|
675
698
|
return m < 0 ? Math.ceil(m) || 0 : Math.floor(m);
|
|
676
699
|
}, p: function(m) {
|
|
677
|
-
return { M: W, y: K, w: N, d: w, D: Q, h: Y, m: P, s: I, ms:
|
|
700
|
+
return { M: W, y: K, w: N, d: w, D: Q, h: Y, m: P, s: I, ms: C, Q: ee }[m] || String(m || "").toLowerCase().replace(/s$/, "");
|
|
678
701
|
}, u: function(m) {
|
|
679
702
|
return m === void 0;
|
|
680
|
-
} },
|
|
681
|
-
|
|
703
|
+
} }, ae = "en", q = {};
|
|
704
|
+
q[ae] = ge;
|
|
682
705
|
var $ = "$isDayjsObject", e = function(m) {
|
|
683
706
|
return m instanceof g || !(!m || !m[$]);
|
|
684
|
-
}, t = function m(
|
|
707
|
+
}, t = function m(d, c, a) {
|
|
685
708
|
var u;
|
|
686
|
-
if (!
|
|
687
|
-
if (typeof
|
|
688
|
-
var h =
|
|
689
|
-
|
|
690
|
-
var y =
|
|
709
|
+
if (!d) return ae;
|
|
710
|
+
if (typeof d == "string") {
|
|
711
|
+
var h = d.toLowerCase();
|
|
712
|
+
q[h] && (u = h), c && (q[h] = c, u = h);
|
|
713
|
+
var y = d.split("-");
|
|
691
714
|
if (!u && y.length > 1) return m(y[0]);
|
|
692
715
|
} else {
|
|
693
|
-
var p =
|
|
694
|
-
|
|
716
|
+
var p = d.name;
|
|
717
|
+
q[p] = d, u = p;
|
|
695
718
|
}
|
|
696
|
-
return !a && u && (
|
|
697
|
-
}, n = function(m,
|
|
719
|
+
return !a && u && (ae = u), u || !a && ae;
|
|
720
|
+
}, n = function(m, d) {
|
|
698
721
|
if (e(m)) return m.clone();
|
|
699
|
-
var
|
|
700
|
-
return
|
|
722
|
+
var c = typeof d == "object" ? d : {};
|
|
723
|
+
return c.date = m, c.args = arguments, new g(c);
|
|
701
724
|
}, o = we;
|
|
702
|
-
o.l = t, o.i = e, o.w = function(m,
|
|
703
|
-
return n(m, { locale:
|
|
725
|
+
o.l = t, o.i = e, o.w = function(m, d) {
|
|
726
|
+
return n(m, { locale: d.$L, utc: d.$u, x: d.$x, $offset: d.$offset });
|
|
704
727
|
};
|
|
705
728
|
var g = (function() {
|
|
706
|
-
function m(
|
|
707
|
-
this.$L = t(
|
|
729
|
+
function m(c) {
|
|
730
|
+
this.$L = t(c.locale, null, !0), this.parse(c), this.$x = this.$x || c.x || {}, this[$] = !0;
|
|
708
731
|
}
|
|
709
|
-
var
|
|
710
|
-
return
|
|
732
|
+
var d = m.prototype;
|
|
733
|
+
return d.parse = function(c) {
|
|
711
734
|
this.$d = (function(a) {
|
|
712
735
|
var u = a.date, h = a.utc;
|
|
713
736
|
if (u === null) return /* @__PURE__ */ new Date(NaN);
|
|
714
737
|
if (o.u(u)) return /* @__PURE__ */ new Date();
|
|
715
738
|
if (u instanceof Date) return new Date(u);
|
|
716
739
|
if (typeof u == "string" && !/Z$/i.test(u)) {
|
|
717
|
-
var y = u.match(
|
|
740
|
+
var y = u.match(se);
|
|
718
741
|
if (y) {
|
|
719
742
|
var p = y[2] - 1 || 0, _ = (y[7] || "0").substring(0, 3);
|
|
720
743
|
return h ? new Date(Date.UTC(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, _)) : new Date(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, _);
|
|
721
744
|
}
|
|
722
745
|
}
|
|
723
746
|
return new Date(u);
|
|
724
|
-
})(
|
|
725
|
-
},
|
|
726
|
-
var
|
|
727
|
-
this.$y =
|
|
728
|
-
},
|
|
747
|
+
})(c), this.init();
|
|
748
|
+
}, d.init = function() {
|
|
749
|
+
var c = this.$d;
|
|
750
|
+
this.$y = c.getFullYear(), this.$M = c.getMonth(), this.$D = c.getDate(), this.$W = c.getDay(), this.$H = c.getHours(), this.$m = c.getMinutes(), this.$s = c.getSeconds(), this.$ms = c.getMilliseconds();
|
|
751
|
+
}, d.$utils = function() {
|
|
729
752
|
return o;
|
|
730
|
-
},
|
|
731
|
-
return this.$d.toString() !==
|
|
732
|
-
},
|
|
733
|
-
var u = n(
|
|
753
|
+
}, d.isValid = function() {
|
|
754
|
+
return this.$d.toString() !== te;
|
|
755
|
+
}, d.isSame = function(c, a) {
|
|
756
|
+
var u = n(c);
|
|
734
757
|
return this.startOf(a) <= u && u <= this.endOf(a);
|
|
735
|
-
},
|
|
736
|
-
return n(
|
|
737
|
-
},
|
|
738
|
-
return this.endOf(a) < n(
|
|
739
|
-
},
|
|
740
|
-
return o.u(
|
|
741
|
-
},
|
|
758
|
+
}, d.isAfter = function(c, a) {
|
|
759
|
+
return n(c) < this.startOf(a);
|
|
760
|
+
}, d.isBefore = function(c, a) {
|
|
761
|
+
return this.endOf(a) < n(c);
|
|
762
|
+
}, d.$g = function(c, a, u) {
|
|
763
|
+
return o.u(c) ? this[a] : this.set(u, c);
|
|
764
|
+
}, d.unix = function() {
|
|
742
765
|
return Math.floor(this.valueOf() / 1e3);
|
|
743
|
-
},
|
|
766
|
+
}, d.valueOf = function() {
|
|
744
767
|
return this.$d.getTime();
|
|
745
|
-
},
|
|
746
|
-
var u = this, h = !!o.u(a) || a, y = o.p(
|
|
747
|
-
var v = o.w(u.$u ? Date.UTC(u.$y, O,
|
|
768
|
+
}, d.startOf = function(c, a) {
|
|
769
|
+
var u = this, h = !!o.u(a) || a, y = o.p(c), p = function(x, O) {
|
|
770
|
+
var v = o.w(u.$u ? Date.UTC(u.$y, O, x) : new Date(u.$y, O, x), u);
|
|
748
771
|
return h ? v : v.endOf(w);
|
|
749
|
-
}, _ = function(
|
|
750
|
-
return o.w(u.toDate()[
|
|
751
|
-
},
|
|
772
|
+
}, _ = function(x, O) {
|
|
773
|
+
return o.w(u.toDate()[x].apply(u.toDate("s"), (h ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(O)), u);
|
|
774
|
+
}, l = this.$W, D = this.$M, R = this.$D, F = "set" + (this.$u ? "UTC" : "");
|
|
752
775
|
switch (y) {
|
|
753
776
|
case K:
|
|
754
777
|
return h ? p(1, 0) : p(31, 11);
|
|
755
778
|
case W:
|
|
756
779
|
return h ? p(1, D) : p(0, D + 1);
|
|
757
780
|
case N:
|
|
758
|
-
var j = this.$locale().weekStart || 0,
|
|
759
|
-
return p(h ? R -
|
|
781
|
+
var j = this.$locale().weekStart || 0, b = (l < j ? l + 7 : l) - j;
|
|
782
|
+
return p(h ? R - b : R + (6 - b), D);
|
|
760
783
|
case w:
|
|
761
784
|
case Q:
|
|
762
785
|
return _(F + "Hours", 0);
|
|
@@ -769,46 +792,46 @@ function He() {
|
|
|
769
792
|
default:
|
|
770
793
|
return this.clone();
|
|
771
794
|
}
|
|
772
|
-
},
|
|
773
|
-
return this.startOf(
|
|
774
|
-
},
|
|
775
|
-
var u, h = o.p(
|
|
795
|
+
}, d.endOf = function(c) {
|
|
796
|
+
return this.startOf(c, !1);
|
|
797
|
+
}, d.$set = function(c, a) {
|
|
798
|
+
var u, h = o.p(c), y = "set" + (this.$u ? "UTC" : ""), p = (u = {}, u[w] = y + "Date", u[Q] = y + "Date", u[W] = y + "Month", u[K] = y + "FullYear", u[Y] = y + "Hours", u[P] = y + "Minutes", u[I] = y + "Seconds", u[C] = y + "Milliseconds", u)[h], _ = h === w ? this.$D + (a - this.$W) : a;
|
|
776
799
|
if (h === W || h === K) {
|
|
777
|
-
var
|
|
778
|
-
|
|
800
|
+
var l = this.clone().set(Q, 1);
|
|
801
|
+
l.$d[p](_), l.init(), this.$d = l.set(Q, Math.min(this.$D, l.daysInMonth())).$d;
|
|
779
802
|
} else p && this.$d[p](_);
|
|
780
803
|
return this.init(), this;
|
|
781
|
-
},
|
|
782
|
-
return this.clone().$set(
|
|
783
|
-
},
|
|
784
|
-
return this[o.p(
|
|
785
|
-
},
|
|
804
|
+
}, d.set = function(c, a) {
|
|
805
|
+
return this.clone().$set(c, a);
|
|
806
|
+
}, d.get = function(c) {
|
|
807
|
+
return this[o.p(c)]();
|
|
808
|
+
}, d.add = function(c, a) {
|
|
786
809
|
var u, h = this;
|
|
787
|
-
|
|
810
|
+
c = Number(c);
|
|
788
811
|
var y = o.p(a), p = function(D) {
|
|
789
812
|
var R = n(h);
|
|
790
|
-
return o.w(R.date(R.date() + Math.round(D *
|
|
813
|
+
return o.w(R.date(R.date() + Math.round(D * c)), h);
|
|
791
814
|
};
|
|
792
|
-
if (y === W) return this.set(W, this.$M +
|
|
793
|
-
if (y === K) return this.set(K, this.$y +
|
|
815
|
+
if (y === W) return this.set(W, this.$M + c);
|
|
816
|
+
if (y === K) return this.set(K, this.$y + c);
|
|
794
817
|
if (y === w) return p(1);
|
|
795
818
|
if (y === N) return p(7);
|
|
796
|
-
var _ = (u = {}, u[P] =
|
|
797
|
-
return o.w(
|
|
798
|
-
},
|
|
799
|
-
return this.add(-1 *
|
|
800
|
-
},
|
|
819
|
+
var _ = (u = {}, u[P] = f, u[Y] = k, u[I] = i, u)[y] || 1, l = this.$d.getTime() + c * _;
|
|
820
|
+
return o.w(l, this);
|
|
821
|
+
}, d.subtract = function(c, a) {
|
|
822
|
+
return this.add(-1 * c, a);
|
|
823
|
+
}, d.format = function(c) {
|
|
801
824
|
var a = this, u = this.$locale();
|
|
802
|
-
if (!this.isValid()) return u.invalidDate ||
|
|
803
|
-
var h =
|
|
825
|
+
if (!this.isValid()) return u.invalidDate || te;
|
|
826
|
+
var h = c || "YYYY-MM-DDTHH:mm:ssZ", y = o.z(this), p = this.$H, _ = this.$m, l = this.$M, D = u.weekdays, R = u.months, F = u.meridiem, j = function(O, v, A, z) {
|
|
804
827
|
return O && (O[v] || O(a, h)) || A[v].slice(0, z);
|
|
805
|
-
},
|
|
828
|
+
}, b = function(O) {
|
|
806
829
|
return o.s(p % 12 || 12, O, "0");
|
|
807
|
-
},
|
|
830
|
+
}, x = F || function(O, v, A) {
|
|
808
831
|
var z = O < 12 ? "AM" : "PM";
|
|
809
832
|
return A ? z.toLowerCase() : z;
|
|
810
833
|
};
|
|
811
|
-
return h.replace(
|
|
834
|
+
return h.replace(ce, (function(O, v) {
|
|
812
835
|
return v || (function(A) {
|
|
813
836
|
switch (A) {
|
|
814
837
|
case "YY":
|
|
@@ -816,13 +839,13 @@ function He() {
|
|
|
816
839
|
case "YYYY":
|
|
817
840
|
return o.s(a.$y, 4, "0");
|
|
818
841
|
case "M":
|
|
819
|
-
return
|
|
842
|
+
return l + 1;
|
|
820
843
|
case "MM":
|
|
821
|
-
return o.s(
|
|
844
|
+
return o.s(l + 1, 2, "0");
|
|
822
845
|
case "MMM":
|
|
823
|
-
return j(u.monthsShort,
|
|
846
|
+
return j(u.monthsShort, l, R, 3);
|
|
824
847
|
case "MMMM":
|
|
825
|
-
return j(R,
|
|
848
|
+
return j(R, l);
|
|
826
849
|
case "D":
|
|
827
850
|
return a.$D;
|
|
828
851
|
case "DD":
|
|
@@ -840,13 +863,13 @@ function He() {
|
|
|
840
863
|
case "HH":
|
|
841
864
|
return o.s(p, 2, "0");
|
|
842
865
|
case "h":
|
|
843
|
-
return
|
|
866
|
+
return b(1);
|
|
844
867
|
case "hh":
|
|
845
|
-
return
|
|
868
|
+
return b(2);
|
|
846
869
|
case "a":
|
|
847
|
-
return
|
|
870
|
+
return x(p, _, !0);
|
|
848
871
|
case "A":
|
|
849
|
-
return
|
|
872
|
+
return x(p, _, !1);
|
|
850
873
|
case "m":
|
|
851
874
|
return String(_);
|
|
852
875
|
case "mm":
|
|
@@ -863,10 +886,10 @@ function He() {
|
|
|
863
886
|
return null;
|
|
864
887
|
})(O) || y.replace(":", "");
|
|
865
888
|
}));
|
|
866
|
-
},
|
|
889
|
+
}, d.utcOffset = function() {
|
|
867
890
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
868
|
-
},
|
|
869
|
-
var h, y = this, p = o.p(a), _ = n(
|
|
891
|
+
}, d.diff = function(c, a, u) {
|
|
892
|
+
var h, y = this, p = o.p(a), _ = n(c), l = (_.utcOffset() - this.utcOffset()) * f, D = this - _, R = function() {
|
|
870
893
|
return o.m(y, _);
|
|
871
894
|
};
|
|
872
895
|
switch (p) {
|
|
@@ -876,20 +899,20 @@ function He() {
|
|
|
876
899
|
case W:
|
|
877
900
|
h = R();
|
|
878
901
|
break;
|
|
879
|
-
case
|
|
902
|
+
case ee:
|
|
880
903
|
h = R() / 3;
|
|
881
904
|
break;
|
|
882
905
|
case N:
|
|
883
|
-
h = (D -
|
|
906
|
+
h = (D - l) / 6048e5;
|
|
884
907
|
break;
|
|
885
908
|
case w:
|
|
886
|
-
h = (D -
|
|
909
|
+
h = (D - l) / 864e5;
|
|
887
910
|
break;
|
|
888
911
|
case Y:
|
|
889
|
-
h = D /
|
|
912
|
+
h = D / k;
|
|
890
913
|
break;
|
|
891
914
|
case P:
|
|
892
|
-
h = D /
|
|
915
|
+
h = D / f;
|
|
893
916
|
break;
|
|
894
917
|
case I:
|
|
895
918
|
h = D / i;
|
|
@@ -898,56 +921,56 @@ function He() {
|
|
|
898
921
|
h = D;
|
|
899
922
|
}
|
|
900
923
|
return u ? h : o.a(h);
|
|
901
|
-
},
|
|
924
|
+
}, d.daysInMonth = function() {
|
|
902
925
|
return this.endOf(W).$D;
|
|
903
|
-
},
|
|
904
|
-
return
|
|
905
|
-
},
|
|
906
|
-
if (!
|
|
907
|
-
var u = this.clone(), h = t(
|
|
926
|
+
}, d.$locale = function() {
|
|
927
|
+
return q[this.$L];
|
|
928
|
+
}, d.locale = function(c, a) {
|
|
929
|
+
if (!c) return this.$L;
|
|
930
|
+
var u = this.clone(), h = t(c, a, !0);
|
|
908
931
|
return h && (u.$L = h), u;
|
|
909
|
-
},
|
|
932
|
+
}, d.clone = function() {
|
|
910
933
|
return o.w(this.$d, this);
|
|
911
|
-
},
|
|
934
|
+
}, d.toDate = function() {
|
|
912
935
|
return new Date(this.valueOf());
|
|
913
|
-
},
|
|
936
|
+
}, d.toJSON = function() {
|
|
914
937
|
return this.isValid() ? this.toISOString() : null;
|
|
915
|
-
},
|
|
938
|
+
}, d.toISOString = function() {
|
|
916
939
|
return this.$d.toISOString();
|
|
917
|
-
},
|
|
940
|
+
}, d.toString = function() {
|
|
918
941
|
return this.$d.toUTCString();
|
|
919
942
|
}, m;
|
|
920
|
-
})(),
|
|
921
|
-
return n.prototype =
|
|
922
|
-
|
|
923
|
-
return this.$g(
|
|
943
|
+
})(), S = g.prototype;
|
|
944
|
+
return n.prototype = S, [["$ms", C], ["$s", I], ["$m", P], ["$H", Y], ["$W", w], ["$M", W], ["$y", K], ["$D", Q]].forEach((function(m) {
|
|
945
|
+
S[m[1]] = function(d) {
|
|
946
|
+
return this.$g(d, m[0], m[1]);
|
|
924
947
|
};
|
|
925
|
-
})), n.extend = function(m,
|
|
926
|
-
return m.$i || (m(
|
|
948
|
+
})), n.extend = function(m, d) {
|
|
949
|
+
return m.$i || (m(d, g, n), m.$i = !0), n;
|
|
927
950
|
}, n.locale = t, n.isDayjs = e, n.unix = function(m) {
|
|
928
951
|
return n(1e3 * m);
|
|
929
|
-
}, n.en =
|
|
952
|
+
}, n.en = q[ae], n.Ls = q, n.p = {}, n;
|
|
930
953
|
}));
|
|
931
954
|
})(ke)), ke.exports;
|
|
932
955
|
}
|
|
933
|
-
var
|
|
934
|
-
const
|
|
935
|
-
var be = { exports: {} },
|
|
936
|
-
function
|
|
956
|
+
var Qe = Je();
|
|
957
|
+
const X = /* @__PURE__ */ Ee(Qe);
|
|
958
|
+
var be = { exports: {} }, Ve = be.exports, Me;
|
|
959
|
+
function Ze() {
|
|
937
960
|
return Me || (Me = 1, (function(s, r) {
|
|
938
|
-
(function(i,
|
|
939
|
-
s.exports =
|
|
940
|
-
})(
|
|
961
|
+
(function(i, f) {
|
|
962
|
+
s.exports = f();
|
|
963
|
+
})(Ve, (function() {
|
|
941
964
|
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" };
|
|
942
|
-
return function(
|
|
943
|
-
var I =
|
|
944
|
-
|
|
965
|
+
return function(f, k, C) {
|
|
966
|
+
var I = k.prototype, P = I.format;
|
|
967
|
+
C.en.formats = i, I.format = function(Y) {
|
|
945
968
|
Y === void 0 && (Y = "YYYY-MM-DDTHH:mm:ssZ");
|
|
946
|
-
var w = this.$locale().formats, N = (function(W,
|
|
947
|
-
return W.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(K, Q,
|
|
948
|
-
var
|
|
949
|
-
return Q ||
|
|
950
|
-
return ge ||
|
|
969
|
+
var w = this.$locale().formats, N = (function(W, ee) {
|
|
970
|
+
return W.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(K, Q, te) {
|
|
971
|
+
var se = te && te.toUpperCase();
|
|
972
|
+
return Q || ee[te] || i[te] || ee[se].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(ce, ge, ue) {
|
|
973
|
+
return ge || ue.slice(1);
|
|
951
974
|
}));
|
|
952
975
|
}));
|
|
953
976
|
})(Y, w === void 0 ? {} : w);
|
|
@@ -957,38 +980,38 @@ function Je() {
|
|
|
957
980
|
}));
|
|
958
981
|
})(be)), be.exports;
|
|
959
982
|
}
|
|
960
|
-
var
|
|
961
|
-
const
|
|
962
|
-
|
|
983
|
+
var Ge = Ze();
|
|
984
|
+
const Xe = /* @__PURE__ */ Ee(Ge);
|
|
985
|
+
X.extend(Xe);
|
|
963
986
|
Date.prototype.isAfter = function(s, r) {
|
|
964
|
-
return
|
|
987
|
+
return X(this).isAfter(s, r);
|
|
965
988
|
};
|
|
966
989
|
Date.prototype.isBefore = function(s, r) {
|
|
967
|
-
return
|
|
990
|
+
return X(this).isBefore(s, r);
|
|
968
991
|
};
|
|
969
992
|
Date.prototype.format = function(s) {
|
|
970
|
-
return
|
|
993
|
+
return X(this).format(s);
|
|
971
994
|
};
|
|
972
995
|
Date.prototype.isValid = function() {
|
|
973
|
-
return
|
|
996
|
+
return X(this).isValid();
|
|
974
997
|
};
|
|
975
998
|
Date.prototype.add = function(s, r) {
|
|
976
|
-
return
|
|
999
|
+
return X(this).add(s, r).toDate();
|
|
977
1000
|
};
|
|
978
1001
|
Date.prototype.subtract = function(s, r) {
|
|
979
|
-
return
|
|
1002
|
+
return X(this).subtract(s, r).toDate();
|
|
980
1003
|
};
|
|
981
1004
|
Date.prototype.firstDayOfMonth = function() {
|
|
982
|
-
return
|
|
1005
|
+
return X(this).startOf("month").toDate();
|
|
983
1006
|
};
|
|
984
1007
|
Date.prototype.lastDayOfMonth = function() {
|
|
985
|
-
return
|
|
1008
|
+
return X(this).endOf("month").toDate();
|
|
986
1009
|
};
|
|
987
1010
|
Date.prototype.set = function(s, r) {
|
|
988
|
-
return
|
|
1011
|
+
return X(this).set(s, r).toDate();
|
|
989
1012
|
};
|
|
990
1013
|
Date.prototype.diff = function(s, r) {
|
|
991
|
-
return
|
|
1014
|
+
return X(this).diff(s, r);
|
|
992
1015
|
};
|
|
993
1016
|
String.prototype.capitalize = function() {
|
|
994
1017
|
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
@@ -999,8 +1022,8 @@ String.prototype.isNumber = function() {
|
|
|
999
1022
|
String.prototype.isEmpty = function() {
|
|
1000
1023
|
return this === void 0 || !this || this.length === 0;
|
|
1001
1024
|
};
|
|
1002
|
-
var
|
|
1003
|
-
const
|
|
1025
|
+
var Z = /* @__PURE__ */ ((s) => (s.opera = "opera", s.firefox = "firefox", s.safari = "safari", s.ie = "ie", s.edge = "edge", s.edg = "edg", s.electron = "electron", s.chrome = "chrome", s.iOsSafari = "iOsSafari", s.edgiOs = "edgiOs", s.headlessChrome = "headlessChrome", s))(Z || {});
|
|
1026
|
+
const le = {
|
|
1004
1027
|
xs: 0,
|
|
1005
1028
|
sm: 576,
|
|
1006
1029
|
md: 768,
|
|
@@ -1009,7 +1032,7 @@ const ce = {
|
|
|
1009
1032
|
xxl: 1400,
|
|
1010
1033
|
xxxl: 1600
|
|
1011
1034
|
};
|
|
1012
|
-
class
|
|
1035
|
+
class st {
|
|
1013
1036
|
screenWidth = 0;
|
|
1014
1037
|
lastBreakpoint;
|
|
1015
1038
|
resizeListener;
|
|
@@ -1049,35 +1072,35 @@ class rt {
|
|
|
1049
1072
|
}
|
|
1050
1073
|
getCurrentBrowser() {
|
|
1051
1074
|
const r = navigator.userAgent.toLowerCase();
|
|
1052
|
-
if (this.isOpera()) return
|
|
1053
|
-
if (this.isFirefox()) return
|
|
1054
|
-
if (this.isSafari()) return
|
|
1055
|
-
if (this.isIE()) return
|
|
1056
|
-
if (this.isEdge()) return
|
|
1057
|
-
if (this.isEdg()) return
|
|
1058
|
-
if (this.isElectron(r)) return
|
|
1059
|
-
if (this.isChrome()) return
|
|
1060
|
-
if (this.isIOsSafari(r)) return
|
|
1061
|
-
if (this.isEdgiOs(r)) return
|
|
1062
|
-
if (this.isHeadlessChrome(r)) return
|
|
1075
|
+
if (this.isOpera()) return Z.opera;
|
|
1076
|
+
if (this.isFirefox()) return Z.firefox;
|
|
1077
|
+
if (this.isSafari()) return Z.safari;
|
|
1078
|
+
if (this.isIE()) return Z.ie;
|
|
1079
|
+
if (this.isEdge()) return Z.edge;
|
|
1080
|
+
if (this.isEdg()) return Z.edg;
|
|
1081
|
+
if (this.isElectron(r)) return Z.electron;
|
|
1082
|
+
if (this.isChrome()) return Z.chrome;
|
|
1083
|
+
if (this.isIOsSafari(r)) return Z.iOsSafari;
|
|
1084
|
+
if (this.isEdgiOs(r)) return Z.edgiOs;
|
|
1085
|
+
if (this.isHeadlessChrome(r)) return Z.headlessChrome;
|
|
1063
1086
|
throw new Error("Browser could not be detected: " + r);
|
|
1064
1087
|
}
|
|
1065
1088
|
getBreakpointByScreenWidth(r = this.screenWidth) {
|
|
1066
1089
|
let i = "xs";
|
|
1067
|
-
for (const
|
|
1068
|
-
|
|
1069
|
-
return { breakpoint: i, screenWidth:
|
|
1090
|
+
for (const f of Object.keys(le))
|
|
1091
|
+
le[f] <= r && (i = f);
|
|
1092
|
+
return { breakpoint: i, screenWidth: le[i] };
|
|
1070
1093
|
}
|
|
1071
1094
|
isScreenGreaterThan(r) {
|
|
1072
|
-
return this.screenWidth >
|
|
1095
|
+
return this.screenWidth > le[r];
|
|
1073
1096
|
}
|
|
1074
1097
|
isScreenSmallerThan(r) {
|
|
1075
|
-
return this.screenWidth <
|
|
1098
|
+
return this.screenWidth < le[r];
|
|
1076
1099
|
}
|
|
1077
1100
|
getBreakpoint(r) {
|
|
1078
1101
|
return {
|
|
1079
1102
|
breakpoint: r,
|
|
1080
|
-
screenWidth:
|
|
1103
|
+
screenWidth: le[r]
|
|
1081
1104
|
};
|
|
1082
1105
|
}
|
|
1083
1106
|
isOpera() {
|
|
@@ -1118,21 +1141,22 @@ class rt {
|
|
|
1118
1141
|
onResize = () => {
|
|
1119
1142
|
if (typeof window > "u") return;
|
|
1120
1143
|
const r = window.innerWidth, i = this.getBreakpointByScreenWidth(r);
|
|
1121
|
-
this.lastBreakpoint?.breakpoint !== i?.breakpoint && (this.lastBreakpoint = i, i && this.breakpointChangeCallbacks.forEach((
|
|
1122
|
-
this.pendingBreakpoint && this.onResizeCallbacks.forEach((
|
|
1144
|
+
this.lastBreakpoint?.breakpoint !== i?.breakpoint && (this.lastBreakpoint = i, i && this.breakpointChangeCallbacks.forEach((f) => f(i))), this.pendingWidth = r, this.pendingBreakpoint = i, this.emitTimeoutId && clearTimeout(this.emitTimeoutId), this.emitTimeoutId = window.setTimeout(() => {
|
|
1145
|
+
this.pendingBreakpoint && this.onResizeCallbacks.forEach((f) => f(this.pendingWidth, this.pendingBreakpoint)), this.pendingWidth = void 0, this.pendingBreakpoint = void 0, this.emitTimeoutId = null;
|
|
1123
1146
|
}, this.duplicateThresholdMs);
|
|
1124
1147
|
};
|
|
1125
1148
|
}
|
|
1126
1149
|
export {
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1150
|
+
st as BrowserService,
|
|
1151
|
+
Z as BrowserType,
|
|
1152
|
+
tt as CsvHelper,
|
|
1153
|
+
rt as EnumHelper,
|
|
1154
|
+
nt as FileHelper,
|
|
1131
1155
|
_e as LocalStorageHelper,
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1156
|
+
V as LoggerHelper,
|
|
1157
|
+
le as ScreenBreakpoints,
|
|
1158
|
+
it as TokenHelper,
|
|
1159
|
+
et as copyToClipboard,
|
|
1160
|
+
ze as saveAs,
|
|
1161
|
+
He as sortHelper
|
|
1138
1162
|
};
|