@factorialco/f0-react 8.31.0 → 8.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ChatPdfThumbnail-BV2Jg190.js → ChatPdfThumbnail-DtjnbxlK.js} +1 -1
- package/dist/{ChatPostComposerDialog-HUWH5YDx.js → ChatPostComposerDialog-BaTMTzP7.js} +3 -3
- package/dist/{ChatSheetThumbnail-CyiwSdZJ.js → ChatSheetThumbnail-P76Jt0_u.js} +1 -1
- package/dist/{DocumentToolbar-B7xL5ZMj.js → DocumentToolbar-DmU2Z6yx.js} +2 -2
- package/dist/{DocxViewer-DGRqy9zY.js → DocxViewer-C54WGD1S.js} +2 -2
- package/dist/{F0AiProcessingOverlay-BcPRamzV.js → F0AiProcessingOverlay-DZi5LhAe.js} +958 -958
- package/dist/{F0CanvasPanel-CfvO8PxL.js → F0CanvasPanel-WVtVnJRZ.js} +4783 -4725
- package/dist/{F0Map-B4HIPrvH.js → F0Map-CNWfSFZ1.js} +4 -4
- package/dist/{F0VideoPlayer-M3lXV3UP.js → F0VideoPlayer-D7c3Yh3w.js} +2 -2
- package/dist/{MapProvider-C4KvsJZe.js → MapProvider-27XPHPiu.js} +650 -646
- package/dist/{SheetViewer-b5uT0_Qv.js → SheetViewer-1drEsfd7.js} +4 -4
- package/dist/{TextViewer-FWSP_8YL.js → TextViewer-EXSsPDXE.js} +2 -2
- package/dist/ai.d.ts +15 -15
- package/dist/ai.js +2 -2
- package/dist/browser-DqC2vZ6l.js +765 -0
- package/dist/component-status.d.ts +14 -14
- package/dist/component-status.js +1 -1
- package/dist/{experimental-DC1y5Glz.js → experimental-BVFSvDo0.js} +1828 -1838
- package/dist/experimental.d.ts +106 -92
- package/dist/experimental.js +88 -88
- package/dist/f0.d.ts +107 -93
- package/dist/f0.js +9390 -9393
- package/dist/i18n-provider-defaults.d.ts +14 -14
- package/dist/index-6YSyIntj.js +4 -0
- package/dist/{index-CnTrb9LA.js → index-BC3sRBhO.js} +3 -3
- package/dist/{index-DBJKw-y0.js → index-C3NBN1Ds.js} +2 -2
- package/dist/index-D-dPYkJS.js +2332 -0
- package/dist/{index-BMDmI7wS.js → index-P3wd7w_Q.js} +1 -1
- package/dist/{index-Cm9nv-w0.js → index-SaYqmPwO.js} +3 -3
- package/dist/papaparse.min-Bh1MVuzw.js +405 -0
- package/dist/{pdfWorker-OP_0l0ae.js → pdfWorker-Bt3dfOGU.js} +2 -2
- package/dist/sheetPreview-BiccmyTD.js +2377 -0
- package/package.json +6 -2
- package/dist/index-D2Nqi0Iu.js +0 -4
- package/dist/sheetPreview-Bqj3xODH.js +0 -51
- package/dist/xlsx-CzlURDDb.js +0 -24525
|
@@ -0,0 +1,2377 @@
|
|
|
1
|
+
import { P as Mr } from "./papaparse.min-Bh1MVuzw.js";
|
|
2
|
+
import { u as Br, s as Vr } from "./browser-DqC2vZ6l.js";
|
|
3
|
+
const Wr = /^[$_\u0080-\uFFFFa-zA-Z][$_\u0080-\uFFFF\w]*$/;
|
|
4
|
+
function Xr(e) {
|
|
5
|
+
const r = {}, t = {}, n = e(), o = e.toString(), u = o.slice(o.indexOf("[") + 1, o.lastIndexOf("]")).split(",").map((a) => a.trim());
|
|
6
|
+
for (const a of u)
|
|
7
|
+
if (!Wr.test(a))
|
|
8
|
+
throw new Error(`Invalid dependency name: ${a}`);
|
|
9
|
+
let s = 0;
|
|
10
|
+
for (; s < n.length; ) {
|
|
11
|
+
let a = u[s], c = n[s];
|
|
12
|
+
typeof c == "function" ? r[a] = Hr(c, a) : t[a] = c, s++;
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
functions: r,
|
|
16
|
+
variables: t
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function Hr(e, r) {
|
|
20
|
+
const t = e.toString();
|
|
21
|
+
if (e.prototype)
|
|
22
|
+
if (t.indexOf("[native code]") >= 0) {
|
|
23
|
+
const n = t.indexOf(" ", 8) + 1, o = t.indexOf("(", n);
|
|
24
|
+
return t.slice(n, o);
|
|
25
|
+
} else {
|
|
26
|
+
let n = t;
|
|
27
|
+
for (const o in e.prototype)
|
|
28
|
+
n += ";" + r + ".prototype." + o + "=" + e.prototype[o].toString();
|
|
29
|
+
return n;
|
|
30
|
+
}
|
|
31
|
+
else
|
|
32
|
+
return t;
|
|
33
|
+
}
|
|
34
|
+
function Yr(e, r, t, n, o, u) {
|
|
35
|
+
let s = !1, a;
|
|
36
|
+
const c = () => {
|
|
37
|
+
a.stop();
|
|
38
|
+
}, f = (y, p) => {
|
|
39
|
+
try {
|
|
40
|
+
a.ingest(y, p);
|
|
41
|
+
} catch (h) {
|
|
42
|
+
throw c(), h;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
return {
|
|
46
|
+
start: (y, p) => {
|
|
47
|
+
if (s)
|
|
48
|
+
throw new Error("Was started");
|
|
49
|
+
s = !0;
|
|
50
|
+
const h = o(), T = h && h._, j = T || qr(r, y);
|
|
51
|
+
T || u({ _: j });
|
|
52
|
+
const [U, P] = j;
|
|
53
|
+
a = e(U, () => {
|
|
54
|
+
const N = o();
|
|
55
|
+
if (N)
|
|
56
|
+
return N.other;
|
|
57
|
+
}, (N) => {
|
|
58
|
+
u(Object.assign(Object.assign({}, o()), { other: N }));
|
|
59
|
+
}, t, n), P && f(P, p);
|
|
60
|
+
},
|
|
61
|
+
stop: c,
|
|
62
|
+
ingest: f
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
const Gr = (
|
|
66
|
+
// Handles any messages that're sent from the main thread.
|
|
67
|
+
"var onMessage = function(data) {for (var key in data) {self[key] = data[key]}onMessage = ("
|
|
68
|
+
), zr = ")(postMessage)}";
|
|
69
|
+
function qr(e, r) {
|
|
70
|
+
const [t, n] = Kr(r);
|
|
71
|
+
return [t + ";" + Gr + e.toString() + zr, n];
|
|
72
|
+
}
|
|
73
|
+
function Kr(e) {
|
|
74
|
+
let r = {}, t = {};
|
|
75
|
+
for (const o of e) {
|
|
76
|
+
const { functions: u, variables: s } = Xr(o);
|
|
77
|
+
r = Object.assign(Object.assign({}, r), u), t = Object.assign(Object.assign({}, t), s);
|
|
78
|
+
}
|
|
79
|
+
return [Object.keys(r).map((o) => o + "=" + r[o]).join(";"), t];
|
|
80
|
+
}
|
|
81
|
+
function Zr(e, r, t, n, o, u) {
|
|
82
|
+
let s = !1, a = !1, c = [];
|
|
83
|
+
const f = void 0;
|
|
84
|
+
let d = () => [], y = () => [], p, h;
|
|
85
|
+
const T = (g) => hr[g], j = (g, Y) => {
|
|
86
|
+
hr[g] = Y;
|
|
87
|
+
}, U = () => {
|
|
88
|
+
if (!s)
|
|
89
|
+
throw new Error("Not started");
|
|
90
|
+
}, P = () => {
|
|
91
|
+
if (s)
|
|
92
|
+
throw new Error("Was started");
|
|
93
|
+
}, v = () => {
|
|
94
|
+
if (a)
|
|
95
|
+
throw new Error("Was stopped");
|
|
96
|
+
}, I = () => {
|
|
97
|
+
if (p)
|
|
98
|
+
throw new Error("Has alias");
|
|
99
|
+
}, N = (g) => {
|
|
100
|
+
if (typeof g != "function")
|
|
101
|
+
throw new TypeError("Argument must be a function");
|
|
102
|
+
};
|
|
103
|
+
let R;
|
|
104
|
+
if (typeof r == "string") {
|
|
105
|
+
if (p = r, h = T(p), !h || !h.$)
|
|
106
|
+
throw new Error("Not found");
|
|
107
|
+
R = h.$[0], c = h.$[1], d = h.$[2], y = h.$[3], h.$[4];
|
|
108
|
+
} else
|
|
109
|
+
R = r;
|
|
110
|
+
N(R);
|
|
111
|
+
let Q;
|
|
112
|
+
const G = (g) => {
|
|
113
|
+
v(), P(), N(g), c.push(g);
|
|
114
|
+
}, te = () => {
|
|
115
|
+
v(), P(), G(() => [
|
|
116
|
+
R,
|
|
117
|
+
y,
|
|
118
|
+
n
|
|
119
|
+
]), s = !0, Q.start(c, f);
|
|
120
|
+
}, fe = () => {
|
|
121
|
+
a = !0, Q.stop();
|
|
122
|
+
}, de = (g) => {
|
|
123
|
+
Q.ingest([Date.now(), g], d(...g));
|
|
124
|
+
};
|
|
125
|
+
let ae;
|
|
126
|
+
const oe = Object.assign({
|
|
127
|
+
inputLatency: ae,
|
|
128
|
+
outputLatency: ae,
|
|
129
|
+
/**
|
|
130
|
+
* Adds external dependencies.
|
|
131
|
+
* These dependencies must not change after the function is started.
|
|
132
|
+
*
|
|
133
|
+
* @param {function} getDependencies — A "closure" function that returns an array of dependencies — global variables or functions — that will be used in this worker. If some dependencies get overlooked, the worker will throw "[name] is not defined".
|
|
134
|
+
*/
|
|
135
|
+
addDependencies(g) {
|
|
136
|
+
I(), G(g);
|
|
137
|
+
},
|
|
138
|
+
// `transferList` for the arguments of the function.
|
|
139
|
+
inputTransferList: (g) => {
|
|
140
|
+
v(), P(), I(), N(g), d = g;
|
|
141
|
+
},
|
|
142
|
+
// `transferList` for the result of the function.
|
|
143
|
+
outputTransferList: (g) => {
|
|
144
|
+
v(), P(), I(), N(g), y = g;
|
|
145
|
+
},
|
|
146
|
+
// (optional) Enables caching.
|
|
147
|
+
alias(g) {
|
|
148
|
+
v(), P(), I(), p = g, j(p, {
|
|
149
|
+
$: [R, c, d, y]
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
start: te,
|
|
153
|
+
stop: fe
|
|
154
|
+
}, t(te, fe, s, a, de, U, P, v));
|
|
155
|
+
return Q = Yr(
|
|
156
|
+
// Creates a worker in a specific environment such as a web browser or Node.js.
|
|
157
|
+
e,
|
|
158
|
+
// This function will be executed in the worker thread.
|
|
159
|
+
// It will be stringified and injected in the worker source code.
|
|
160
|
+
// It must create an input handler function.
|
|
161
|
+
(g) => {
|
|
162
|
+
let Y = -1, K = -1;
|
|
163
|
+
const l = n(R, (i) => {
|
|
164
|
+
g([Y, K, Date.now(), i], y(i));
|
|
165
|
+
});
|
|
166
|
+
return ([i, w]) => (Y = i, K = Date.now(), l(w));
|
|
167
|
+
},
|
|
168
|
+
// This function will be executed in the main thread
|
|
169
|
+
// when an error is received from the worker.
|
|
170
|
+
// Currently, we are in the main thread.
|
|
171
|
+
(g) => {
|
|
172
|
+
a || o(g);
|
|
173
|
+
},
|
|
174
|
+
// This function will be executed in the main thread
|
|
175
|
+
// when output is received from the worker.
|
|
176
|
+
// Currently, we are in the main thread.
|
|
177
|
+
([g, Y, K, z]) => {
|
|
178
|
+
a || (g !== -1 && (oe.inputLatency = Y - g), oe.outputLatency = Date.now() - K, u(z));
|
|
179
|
+
},
|
|
180
|
+
() => {
|
|
181
|
+
if (p) {
|
|
182
|
+
const g = T(p);
|
|
183
|
+
if (g)
|
|
184
|
+
return g.other;
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
(g) => {
|
|
188
|
+
p && j(p, Object.assign(Object.assign({}, T(p)), { other: g }));
|
|
189
|
+
}
|
|
190
|
+
), oe;
|
|
191
|
+
}
|
|
192
|
+
const hr = {};
|
|
193
|
+
function Jr(e, r) {
|
|
194
|
+
let t, n;
|
|
195
|
+
return Zr(e, r, (c, f, d, y, p, h, T, j) => ({
|
|
196
|
+
// Calls the function. Could be used multiple times.
|
|
197
|
+
call(...U) {
|
|
198
|
+
if (j(), h(), t || n)
|
|
199
|
+
throw new Error("Previous call not finished");
|
|
200
|
+
return new Promise((P, v) => {
|
|
201
|
+
t = P, n = v, p(U);
|
|
202
|
+
});
|
|
203
|
+
},
|
|
204
|
+
// Calls the function once.
|
|
205
|
+
callOnce(...U) {
|
|
206
|
+
return c(), this.call(...U).finally(f);
|
|
207
|
+
}
|
|
208
|
+
}), (c, f) => {
|
|
209
|
+
const d = (y) => y !== null && typeof y == "object" && typeof y.then == "function";
|
|
210
|
+
return (y) => {
|
|
211
|
+
const p = c(...y);
|
|
212
|
+
d(p) ? p.then(f) : f(p);
|
|
213
|
+
};
|
|
214
|
+
}, (c) => {
|
|
215
|
+
if (n)
|
|
216
|
+
n(c), t = void 0, n = void 0;
|
|
217
|
+
else
|
|
218
|
+
throw new Error("`reject` callback not found");
|
|
219
|
+
}, (c) => {
|
|
220
|
+
if (t)
|
|
221
|
+
t(c), t = void 0, n = void 0;
|
|
222
|
+
else
|
|
223
|
+
throw new Error("`resolve` callback not found");
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
function Qr(e, r, t, n, o) {
|
|
227
|
+
let u = r();
|
|
228
|
+
u || (u = et(e), t(u));
|
|
229
|
+
const s = new Worker(u);
|
|
230
|
+
return s.onmessage = (a) => {
|
|
231
|
+
const c = a.data, f = c ? c[Ir] : void 0;
|
|
232
|
+
if (f) {
|
|
233
|
+
const d = new Error(f[0]);
|
|
234
|
+
d.stack = f[1];
|
|
235
|
+
let y = 2;
|
|
236
|
+
for (; y < f.length; )
|
|
237
|
+
d[f[y][0]] = f[y][1], y++;
|
|
238
|
+
n(d), s.terminate();
|
|
239
|
+
} else
|
|
240
|
+
o(c);
|
|
241
|
+
}, {
|
|
242
|
+
// Calling `worker.terminate()` will kill the worker thread immediately.
|
|
243
|
+
// Calling `worker.terminate()` multiple times is safe and will not throw any errors.
|
|
244
|
+
stop: s.terminate.bind(s),
|
|
245
|
+
ingest: s.postMessage.bind(s)
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
function et(e) {
|
|
249
|
+
return URL.createObjectURL(new Blob([
|
|
250
|
+
e + ";" + rt
|
|
251
|
+
], { type: "text/javascript" }));
|
|
252
|
+
}
|
|
253
|
+
const Ir = "$err$", rt = (
|
|
254
|
+
// Listen to incoming messages from the main thread.
|
|
255
|
+
"self.onmessage = function(evt) {onMessage(evt.data)};function onErr(err_, msg) {var err = err_ instanceof Error ? err_ : new Error(msg);postMessage({" + Ir + ':[err.message,err.stack].concat(Object.keys(err).map(function(k){return[k,err[k]]}))})};var postMessage = self.postMessage;addEventListener("error",function(evt) {onErr(evt.error, evt.message)});addEventListener("unhandledrejection",function(evt) {evt.preventDefault();onErr(evt.reason, String(evt.reason))})'
|
|
256
|
+
);
|
|
257
|
+
function tt(e) {
|
|
258
|
+
return Jr(Qr, e);
|
|
259
|
+
}
|
|
260
|
+
function Je(e) {
|
|
261
|
+
"@babel/helpers - typeof";
|
|
262
|
+
return Je = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
|
|
263
|
+
return typeof r;
|
|
264
|
+
} : function(r) {
|
|
265
|
+
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
266
|
+
}, Je(e);
|
|
267
|
+
}
|
|
268
|
+
function nt(e) {
|
|
269
|
+
var r = String.fromCharCode, t = Object.prototype.hasOwnProperty, n = /&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig, o = {
|
|
270
|
+
amp: "&",
|
|
271
|
+
apos: "'",
|
|
272
|
+
gt: ">",
|
|
273
|
+
lt: "<",
|
|
274
|
+
quot: '"'
|
|
275
|
+
};
|
|
276
|
+
Object.keys(o).forEach(function(v) {
|
|
277
|
+
o[v.toUpperCase()] = o[v];
|
|
278
|
+
});
|
|
279
|
+
function u(v, I, N, R) {
|
|
280
|
+
return R ? t.call(o, R) ? o[R] : "&" + R + ";" : r(I || parseInt(N, 16));
|
|
281
|
+
}
|
|
282
|
+
function s(v) {
|
|
283
|
+
return v.length > 3 && v.indexOf("&") !== -1 ? v.replace(n, u) : v;
|
|
284
|
+
}
|
|
285
|
+
var a = "non-whitespace outside of root node";
|
|
286
|
+
function c(v) {
|
|
287
|
+
return new Error(v);
|
|
288
|
+
}
|
|
289
|
+
function f(v) {
|
|
290
|
+
return "missing namespace for prefix <" + v + ">";
|
|
291
|
+
}
|
|
292
|
+
function d(v) {
|
|
293
|
+
return {
|
|
294
|
+
get: v,
|
|
295
|
+
enumerable: !0
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
function y(v) {
|
|
299
|
+
var I = {}, N;
|
|
300
|
+
for (N in v)
|
|
301
|
+
I[N] = v[N];
|
|
302
|
+
return I;
|
|
303
|
+
}
|
|
304
|
+
var p = /* @__PURE__ */ Symbol("nameCache");
|
|
305
|
+
function h(v) {
|
|
306
|
+
return v + "$uri";
|
|
307
|
+
}
|
|
308
|
+
function T(v) {
|
|
309
|
+
var I = {}, N, R;
|
|
310
|
+
for (N in v)
|
|
311
|
+
R = v[N], I[R] = R, I[h(R)] = N;
|
|
312
|
+
return I;
|
|
313
|
+
}
|
|
314
|
+
function j() {
|
|
315
|
+
return {
|
|
316
|
+
line: 0,
|
|
317
|
+
column: 0
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
function U(v) {
|
|
321
|
+
throw v;
|
|
322
|
+
}
|
|
323
|
+
function P(v) {
|
|
324
|
+
if (!this)
|
|
325
|
+
return new P(v);
|
|
326
|
+
var I = v && v.proxy, N, R, Q, G, te = U, fe, de, ae, oe, V = j, ce = !1, g = !1, Y = "", K = !1, z = !1, l = null, i = !1, w, b, W, M;
|
|
327
|
+
function D(m) {
|
|
328
|
+
m instanceof Error || (m = c(m)), l = m, te(m, V);
|
|
329
|
+
}
|
|
330
|
+
function k(m) {
|
|
331
|
+
fe && (m instanceof Error || (m = c(m)), fe(m, V));
|
|
332
|
+
}
|
|
333
|
+
this.on = function(m, L) {
|
|
334
|
+
if (typeof L != "function")
|
|
335
|
+
throw c("required args <name, cb>");
|
|
336
|
+
switch (m) {
|
|
337
|
+
case "openTag":
|
|
338
|
+
R = L;
|
|
339
|
+
break;
|
|
340
|
+
case "text":
|
|
341
|
+
N = L;
|
|
342
|
+
break;
|
|
343
|
+
case "closeTag":
|
|
344
|
+
Q = L;
|
|
345
|
+
break;
|
|
346
|
+
case "error":
|
|
347
|
+
te = L;
|
|
348
|
+
break;
|
|
349
|
+
case "warn":
|
|
350
|
+
fe = L;
|
|
351
|
+
break;
|
|
352
|
+
case "cdata":
|
|
353
|
+
G = L;
|
|
354
|
+
break;
|
|
355
|
+
case "attention":
|
|
356
|
+
oe = L;
|
|
357
|
+
break;
|
|
358
|
+
// <!XXXXX zzzz="eeee">
|
|
359
|
+
case "question":
|
|
360
|
+
ae = L;
|
|
361
|
+
break;
|
|
362
|
+
// <? .... ?>
|
|
363
|
+
case "comment":
|
|
364
|
+
de = L;
|
|
365
|
+
break;
|
|
366
|
+
default:
|
|
367
|
+
throw c("unsupported event: " + m);
|
|
368
|
+
}
|
|
369
|
+
return this;
|
|
370
|
+
}, this.ns = function(m) {
|
|
371
|
+
if (typeof m > "u" && (m = {}), Je(m) !== "object")
|
|
372
|
+
throw c("required args <nsMap={}>");
|
|
373
|
+
var L = {}, ie;
|
|
374
|
+
for (ie in m)
|
|
375
|
+
L[ie] = m[ie];
|
|
376
|
+
return z = !0, M = L, this;
|
|
377
|
+
};
|
|
378
|
+
function ee() {
|
|
379
|
+
w = z ? [] : null, b = z ? T(M) : null, W = [], V = j, i = !1, l = null, g = !1, Y = "";
|
|
380
|
+
}
|
|
381
|
+
this.parse = function(m) {
|
|
382
|
+
if (typeof m != "string")
|
|
383
|
+
throw c("required args <xml=string>");
|
|
384
|
+
if (ce)
|
|
385
|
+
throw c("parse during stream; call end() first");
|
|
386
|
+
return ee(), Ve(m), V = j, i = !1, l;
|
|
387
|
+
}, this.write = function(m) {
|
|
388
|
+
if (typeof m != "string")
|
|
389
|
+
throw c("required args <xml=string>");
|
|
390
|
+
return ce || (ee(), ce = !0), l || (Y = Ve(Y + m, !0) || ""), this;
|
|
391
|
+
}, this.end = function() {
|
|
392
|
+
return ce || ee(), ce = !1, l || Ve(Y), Y = "", V = j, i = !1, l;
|
|
393
|
+
}, this.stop = function() {
|
|
394
|
+
i = !0;
|
|
395
|
+
};
|
|
396
|
+
function Ve(m) {
|
|
397
|
+
var L = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, ie = null, ar = null, We, $r = 0, he = !1, se = !1, O = 0, _ = 0, C, cr, x, E, ve, ge, B, Fe, Xe, He = "", Ye = 0, ye;
|
|
398
|
+
function sr(H, ue) {
|
|
399
|
+
var q = H.indexOf(":");
|
|
400
|
+
if (q === -1)
|
|
401
|
+
return H;
|
|
402
|
+
var Z = b[H.substring(0, q)];
|
|
403
|
+
return Z ? ue === Z ? H.substr(q + 1) : Z + H.substr(q) : (k(f(H.substring(0, q))), null);
|
|
404
|
+
}
|
|
405
|
+
function Ge() {
|
|
406
|
+
if (ye !== null)
|
|
407
|
+
return ye;
|
|
408
|
+
var H, ue, q = z && b.xmlns, Z = z && K ? [] : null, F = Ye, X = He, J = X.length, pr, le, pe, ne, $, we = {}, dr = /* @__PURE__ */ new Set(), re, S, A;
|
|
409
|
+
e: for (; F < J; F++)
|
|
410
|
+
if (re = !1, S = X.charCodeAt(F), !(S === 32 || S < 14 && S > 8)) {
|
|
411
|
+
for ((S < 65 || S > 122 || S > 90 && S < 97) && S !== 95 && S !== 58 && (k("illegal first char attribute name"), re = !0), A = F + 1; A < J; A++)
|
|
412
|
+
if (S = X.charCodeAt(A), !(S > 96 && S < 123 || S > 64 && S < 91 || S > 47 && S < 59 || S === 46 || // '.'
|
|
413
|
+
S === 45 || // '-'
|
|
414
|
+
S === 95)) {
|
|
415
|
+
if (S === 32 || S < 14 && S > 8) {
|
|
416
|
+
k("missing attribute value"), F = A;
|
|
417
|
+
continue e;
|
|
418
|
+
}
|
|
419
|
+
if (S === 61)
|
|
420
|
+
break;
|
|
421
|
+
k("illegal attribute name char"), re = !0;
|
|
422
|
+
}
|
|
423
|
+
if ($ = X.substring(F, A), $ === "xmlns:xmlns" && (k("illegal declaration of xmlns"), re = !0), S = X.charCodeAt(A + 1), S === 34)
|
|
424
|
+
A = X.indexOf('"', F = A + 2), A === -1 && (A = X.indexOf("'", F), A !== -1 && (k("attribute value quote missmatch"), re = !0));
|
|
425
|
+
else if (S === 39)
|
|
426
|
+
A = X.indexOf("'", F = A + 2), A === -1 && (A = X.indexOf('"', F), A !== -1 && (k("attribute value quote missmatch"), re = !0));
|
|
427
|
+
else
|
|
428
|
+
for (k("missing attribute value quotes"), re = !0, A = A + 1; A < J && (S = X.charCodeAt(A + 1), !(S === 32 || S < 14 && S > 8)); A++)
|
|
429
|
+
;
|
|
430
|
+
for (A === -1 && (k("missing closing quotes"), A = J, re = !0), re || (pe = X.substring(F, A)), F = A; A + 1 < J && (S = X.charCodeAt(A + 1), !(S === 32 || S < 14 && S > 8)); A++)
|
|
431
|
+
F === A && (k("illegal character after attribute end"), re = !0);
|
|
432
|
+
if (F = A + 1, re)
|
|
433
|
+
continue e;
|
|
434
|
+
if (dr.has($)) {
|
|
435
|
+
k("attribute <" + $ + "> already defined");
|
|
436
|
+
continue;
|
|
437
|
+
}
|
|
438
|
+
if (dr.add($), !z) {
|
|
439
|
+
we[$] = pe;
|
|
440
|
+
continue;
|
|
441
|
+
}
|
|
442
|
+
if (K) {
|
|
443
|
+
if (le = $ === "xmlns" ? "xmlns" : $.charCodeAt(0) === 120 && $.substr(0, 6) === "xmlns:" ? $.substr(6) : null, le !== null) {
|
|
444
|
+
if (H = s(pe), ue = h(le), ne = M[H], !ne) {
|
|
445
|
+
if (le === "xmlns" || ue in b && b[ue] !== H)
|
|
446
|
+
do
|
|
447
|
+
ne = "ns" + $r++;
|
|
448
|
+
while (typeof b[ne] < "u");
|
|
449
|
+
else
|
|
450
|
+
ne = le;
|
|
451
|
+
M[H] = ne;
|
|
452
|
+
}
|
|
453
|
+
b[le] !== ne && (pr || (b = y(b), pr = !0), b[le] = ne, le === "xmlns" && (b[h(ne)] = H, q = ne), b[ue] = H), we[$] = pe;
|
|
454
|
+
continue;
|
|
455
|
+
}
|
|
456
|
+
Z.push($, pe);
|
|
457
|
+
continue;
|
|
458
|
+
}
|
|
459
|
+
$ = sr($, q), $ !== null && (we[$] = pe);
|
|
460
|
+
}
|
|
461
|
+
if (K)
|
|
462
|
+
for (F = 0, J = Z.length; F < J; F++)
|
|
463
|
+
$ = sr(Z[F++], q), pe = Z[F], $ !== null && (we[$] = pe);
|
|
464
|
+
return ye = we;
|
|
465
|
+
}
|
|
466
|
+
function Ur() {
|
|
467
|
+
for (var H = /(\r\n|\r|\n)/g, ue = 0, q = 0, Z = 0, F = _, X, J; O >= Z && (X = H.exec(m), !(!X || (F = X[0].length + X.index, F > O))); )
|
|
468
|
+
ue += 1, Z = F;
|
|
469
|
+
return O == -1 ? (q = F, J = m.substring(_)) : _ === 0 ? J = m.substring(_, O) : (q = O - Z, J = _ == -1 ? m.substring(O) : m.substring(O, _ + 1)), {
|
|
470
|
+
data: J,
|
|
471
|
+
line: ue,
|
|
472
|
+
column: q
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
for (V = Ur, I && (Xe = Object.create({}, {
|
|
476
|
+
name: d(function() {
|
|
477
|
+
return B;
|
|
478
|
+
}),
|
|
479
|
+
originalName: d(function() {
|
|
480
|
+
return Fe;
|
|
481
|
+
}),
|
|
482
|
+
attrs: d(Ge),
|
|
483
|
+
ns: d(function() {
|
|
484
|
+
return b;
|
|
485
|
+
})
|
|
486
|
+
})); _ !== -1; ) {
|
|
487
|
+
if (m.charCodeAt(_) === 60 ? O = _ : O = m.indexOf("<", _), O === -1) {
|
|
488
|
+
if (L)
|
|
489
|
+
return m.substring(_);
|
|
490
|
+
if (W.length)
|
|
491
|
+
return D("unexpected end of file");
|
|
492
|
+
if (!g)
|
|
493
|
+
return D("missing start tag");
|
|
494
|
+
_ < m.length && m.substring(_).trim() && k(a);
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
if (g || (g = !0), _ !== O) {
|
|
498
|
+
if (W.length) {
|
|
499
|
+
if (N && (N(m.substring(_, O), s, V), i))
|
|
500
|
+
return;
|
|
501
|
+
} else if (m.substring(_, O).trim() && (k(a), i))
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
if (E = m.charCodeAt(O + 1), E === 33) {
|
|
505
|
+
if (x = m.charCodeAt(O + 2), x === 91 && m.substr(O + 3, 6) === "CDATA[") {
|
|
506
|
+
if (_ = m.indexOf("]]>", O), _ === -1)
|
|
507
|
+
return L ? m.substring(O) : D("unclosed cdata");
|
|
508
|
+
if (G && (G(m.substring(O + 9, _), V), i))
|
|
509
|
+
return;
|
|
510
|
+
_ += 3;
|
|
511
|
+
continue;
|
|
512
|
+
}
|
|
513
|
+
if (x === 45 && m.charCodeAt(O + 3) === 45) {
|
|
514
|
+
if (_ = m.indexOf("-->", O), _ === -1)
|
|
515
|
+
return L ? m.substring(O) : D("unclosed comment");
|
|
516
|
+
if (de && (de(m.substring(O + 4, _), s, V), i))
|
|
517
|
+
return;
|
|
518
|
+
_ += 3;
|
|
519
|
+
continue;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
if (E === 63) {
|
|
523
|
+
if (_ = m.indexOf("?>", O), _ === -1)
|
|
524
|
+
return L ? m.substring(O) : D("unclosed question");
|
|
525
|
+
if (ae && (ae(m.substring(O, _ + 2), V), i))
|
|
526
|
+
return;
|
|
527
|
+
_ += 2;
|
|
528
|
+
continue;
|
|
529
|
+
}
|
|
530
|
+
for (C = O + 1; ; C++) {
|
|
531
|
+
if (ve = m.charCodeAt(C), isNaN(ve))
|
|
532
|
+
return L ? m.substring(O) : (_ = -1, D("unclosed tag"));
|
|
533
|
+
if (ve === 34)
|
|
534
|
+
x = m.indexOf('"', C + 1), C = x !== -1 ? x : C;
|
|
535
|
+
else if (ve === 39)
|
|
536
|
+
x = m.indexOf("'", C + 1), C = x !== -1 ? x : C;
|
|
537
|
+
else if (ve === 62) {
|
|
538
|
+
_ = C;
|
|
539
|
+
break;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
if (E === 33) {
|
|
543
|
+
if (oe && (oe(m.substring(O, _ + 1), s, V), i))
|
|
544
|
+
return;
|
|
545
|
+
_ += 1;
|
|
546
|
+
continue;
|
|
547
|
+
}
|
|
548
|
+
if (ye = {}, E === 47) {
|
|
549
|
+
if (he = !1, se = !0, !W.length)
|
|
550
|
+
return D("missing open tag");
|
|
551
|
+
if (C = B = W.pop(), x = O + 2 + C.length, m.substring(O + 2, x) !== C)
|
|
552
|
+
return D("closing tag mismatch");
|
|
553
|
+
for (; x < _; x++)
|
|
554
|
+
if (E = m.charCodeAt(x), !(E === 32 || E > 8 && E < 14))
|
|
555
|
+
return D("close tag");
|
|
556
|
+
} else {
|
|
557
|
+
if (m.charCodeAt(_ - 1) === 47 ? (C = B = m.substring(O + 1, _ - 1), he = !0, se = !0) : (C = B = m.substring(O + 1, _), he = !0, se = !1), !(E > 96 && E < 123 || E > 64 && E < 91 || E === 95 || E === 58))
|
|
558
|
+
return D("illegal first char nodeName");
|
|
559
|
+
for (x = 1, cr = C.length; x < cr; x++)
|
|
560
|
+
if (E = C.charCodeAt(x), !(E > 96 && E < 123 || E > 64 && E < 91 || E > 47 && E < 59 || E === 45 || E === 95 || E == 46)) {
|
|
561
|
+
if (E === 32 || E < 14 && E > 8) {
|
|
562
|
+
B = C.substring(0, x), ye = null;
|
|
563
|
+
break;
|
|
564
|
+
}
|
|
565
|
+
return D("invalid nodeName");
|
|
566
|
+
}
|
|
567
|
+
se || W.push(B);
|
|
568
|
+
}
|
|
569
|
+
if (z) {
|
|
570
|
+
We = b, he && (se || w.push(We), ye === null && (K = C.indexOf("xmlns", x) !== -1) && (Ye = x, He = C, Ge(), K = !1)), Fe = B, ar !== b && (ie = b[p], ie === void 0 && (ie = b[p] = {}), ar = b);
|
|
571
|
+
var lr = ie[B];
|
|
572
|
+
if (lr !== void 0)
|
|
573
|
+
B = lr;
|
|
574
|
+
else {
|
|
575
|
+
if (E = B.indexOf(":"), E !== -1) {
|
|
576
|
+
if (ge = b[B.substring(0, E)], !ge)
|
|
577
|
+
return D("missing namespace on <" + Fe + ">");
|
|
578
|
+
B = B.substr(E + 1);
|
|
579
|
+
} else
|
|
580
|
+
ge = b.xmlns;
|
|
581
|
+
ge && (B = ge + ":" + B), ie[Fe] = B;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
if (he && (Ye = x, He = C, R && (I ? R(Xe, s, se, V) : R(B, Ge, s, se, V), i)))
|
|
585
|
+
return;
|
|
586
|
+
if (se) {
|
|
587
|
+
if (Q && (Q(I ? Xe : B, s, he, V), i))
|
|
588
|
+
return;
|
|
589
|
+
z && (he ? b = We : b = w.pop());
|
|
590
|
+
}
|
|
591
|
+
_ += 1;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
return new P(e);
|
|
596
|
+
}
|
|
597
|
+
function ot(e, r, t, n) {
|
|
598
|
+
var o = !1, u = function() {
|
|
599
|
+
if (o)
|
|
600
|
+
throw new Error("Errored");
|
|
601
|
+
}, s, a = new nt(), c = function(p) {
|
|
602
|
+
u(), a.write(p);
|
|
603
|
+
}, f = function() {
|
|
604
|
+
u(), a.end(), s();
|
|
605
|
+
}, d = new Promise(function(y, p) {
|
|
606
|
+
s = y;
|
|
607
|
+
var h = function(v) {
|
|
608
|
+
throw o = !0, v;
|
|
609
|
+
}, T = function(v, I) {
|
|
610
|
+
n && n(I(v), e);
|
|
611
|
+
}, j = function(v, I, N, R, Q) {
|
|
612
|
+
if (r) {
|
|
613
|
+
var G = I();
|
|
614
|
+
for (var te in G)
|
|
615
|
+
G[ze(te, !0)] = N(G[te]);
|
|
616
|
+
r(ze(v), G, e);
|
|
617
|
+
}
|
|
618
|
+
}, U = function(v) {
|
|
619
|
+
t && t(ze(v), e);
|
|
620
|
+
};
|
|
621
|
+
a.on("error", h), a.on("text", T), a.on("openTag", j), a.on("closeTag", U);
|
|
622
|
+
});
|
|
623
|
+
return {
|
|
624
|
+
promise: d,
|
|
625
|
+
write: c,
|
|
626
|
+
end: f
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
function ze(e, r) {
|
|
630
|
+
for (var t = 0; t < e.length; ) {
|
|
631
|
+
if (e[t] === ":" && !(r && t === 5 && e.slice(0, 5) === "xmlns"))
|
|
632
|
+
return e.slice(t + 1);
|
|
633
|
+
t++;
|
|
634
|
+
}
|
|
635
|
+
return e;
|
|
636
|
+
}
|
|
637
|
+
function Qe(e) {
|
|
638
|
+
"@babel/helpers - typeof";
|
|
639
|
+
return Qe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
|
|
640
|
+
return typeof r;
|
|
641
|
+
} : function(r) {
|
|
642
|
+
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
643
|
+
}, Qe(e);
|
|
644
|
+
}
|
|
645
|
+
function it(e, r, t) {
|
|
646
|
+
return Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
647
|
+
}
|
|
648
|
+
function ut(e, r) {
|
|
649
|
+
if (!(e instanceof r))
|
|
650
|
+
throw new TypeError("Cannot call a class as a function");
|
|
651
|
+
}
|
|
652
|
+
function ft(e, r) {
|
|
653
|
+
if (typeof r != "function" && r !== null)
|
|
654
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
655
|
+
e.prototype = Object.create(r && r.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), r && Se(e, r);
|
|
656
|
+
}
|
|
657
|
+
function at(e) {
|
|
658
|
+
var r = Pr();
|
|
659
|
+
return function() {
|
|
660
|
+
var n = Oe(e), o;
|
|
661
|
+
if (r) {
|
|
662
|
+
var u = Oe(this).constructor;
|
|
663
|
+
o = Reflect.construct(n, arguments, u);
|
|
664
|
+
} else
|
|
665
|
+
o = n.apply(this, arguments);
|
|
666
|
+
return ct(this, o);
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
function ct(e, r) {
|
|
670
|
+
if (r && (Qe(r) === "object" || typeof r == "function"))
|
|
671
|
+
return r;
|
|
672
|
+
if (r !== void 0)
|
|
673
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
674
|
+
return st(e);
|
|
675
|
+
}
|
|
676
|
+
function st(e) {
|
|
677
|
+
if (e === void 0)
|
|
678
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
679
|
+
return e;
|
|
680
|
+
}
|
|
681
|
+
function er(e) {
|
|
682
|
+
var r = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
683
|
+
return er = function(n) {
|
|
684
|
+
if (n === null || !lt(n)) return n;
|
|
685
|
+
if (typeof n != "function")
|
|
686
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
687
|
+
if (typeof r < "u") {
|
|
688
|
+
if (r.has(n)) return r.get(n);
|
|
689
|
+
r.set(n, o);
|
|
690
|
+
}
|
|
691
|
+
function o() {
|
|
692
|
+
return je(n, arguments, Oe(this).constructor);
|
|
693
|
+
}
|
|
694
|
+
return o.prototype = Object.create(n.prototype, { constructor: { value: o, enumerable: !1, writable: !0, configurable: !0 } }), Se(o, n);
|
|
695
|
+
}, er(e);
|
|
696
|
+
}
|
|
697
|
+
function je(e, r, t) {
|
|
698
|
+
return Pr() ? je = Reflect.construct.bind() : je = function(o, u, s) {
|
|
699
|
+
var a = [null];
|
|
700
|
+
a.push.apply(a, u);
|
|
701
|
+
var c = Function.bind.apply(o, a), f = new c();
|
|
702
|
+
return s && Se(f, s.prototype), f;
|
|
703
|
+
}, je.apply(null, arguments);
|
|
704
|
+
}
|
|
705
|
+
function Pr() {
|
|
706
|
+
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
707
|
+
if (typeof Proxy == "function") return !0;
|
|
708
|
+
try {
|
|
709
|
+
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
710
|
+
})), !0;
|
|
711
|
+
} catch {
|
|
712
|
+
return !1;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
function lt(e) {
|
|
716
|
+
return Function.toString.call(e).indexOf("[native code]") !== -1;
|
|
717
|
+
}
|
|
718
|
+
function Se(e, r) {
|
|
719
|
+
return Se = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
|
|
720
|
+
return n.__proto__ = o, n;
|
|
721
|
+
}, Se(e, r);
|
|
722
|
+
}
|
|
723
|
+
function Oe(e) {
|
|
724
|
+
return Oe = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
725
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
726
|
+
}, Oe(e);
|
|
727
|
+
}
|
|
728
|
+
var _e = /* @__PURE__ */ (function(e) {
|
|
729
|
+
ft(t, e);
|
|
730
|
+
var r = at(t);
|
|
731
|
+
function t(n) {
|
|
732
|
+
var o;
|
|
733
|
+
return ut(this, t), o = r.call(this, n), o.name = "InvalidSpreadsheetError", o;
|
|
734
|
+
}
|
|
735
|
+
return it(t);
|
|
736
|
+
})(/* @__PURE__ */ er(Error));
|
|
737
|
+
function pt(e, r, t, n, o, u) {
|
|
738
|
+
var s = ot(r, t, n, o);
|
|
739
|
+
return u ? a(s, e, u) : (s.write(e), s.end()), s.promise.then(function(c) {
|
|
740
|
+
return c;
|
|
741
|
+
}, function(c) {
|
|
742
|
+
var f = new _e(c.message);
|
|
743
|
+
throw f.stack = c.stack, f.cause = c, f;
|
|
744
|
+
});
|
|
745
|
+
function a(c, f, d, y) {
|
|
746
|
+
var p = 7, h = 64 * 1024, T = h, j = function() {
|
|
747
|
+
var v = Date.now();
|
|
748
|
+
if (f.length > T) {
|
|
749
|
+
c.write(f.slice(0, T)), d && d(!1), f = f.slice(T);
|
|
750
|
+
var I = Date.now() - v;
|
|
751
|
+
return I < p * 0.5 ? T *= 2 : I > p && (T /= 2), !0;
|
|
752
|
+
} else
|
|
753
|
+
return c.write(f), c.end(), d && d(!0), !1;
|
|
754
|
+
}, U = function P() {
|
|
755
|
+
j() && P();
|
|
756
|
+
};
|
|
757
|
+
U();
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
function rr(e) {
|
|
761
|
+
"@babel/helpers - typeof";
|
|
762
|
+
return rr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
|
|
763
|
+
return typeof r;
|
|
764
|
+
} : function(r) {
|
|
765
|
+
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
766
|
+
}, rr(e);
|
|
767
|
+
}
|
|
768
|
+
function dt(e, r, t) {
|
|
769
|
+
return Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
770
|
+
}
|
|
771
|
+
function ht(e, r) {
|
|
772
|
+
if (!(e instanceof r))
|
|
773
|
+
throw new TypeError("Cannot call a class as a function");
|
|
774
|
+
}
|
|
775
|
+
function yt(e, r) {
|
|
776
|
+
if (typeof r != "function" && r !== null)
|
|
777
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
778
|
+
e.prototype = Object.create(r && r.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), r && Ee(e, r);
|
|
779
|
+
}
|
|
780
|
+
function mt(e) {
|
|
781
|
+
var r = Nr();
|
|
782
|
+
return function() {
|
|
783
|
+
var n = Ae(e), o;
|
|
784
|
+
if (r) {
|
|
785
|
+
var u = Ae(this).constructor;
|
|
786
|
+
o = Reflect.construct(n, arguments, u);
|
|
787
|
+
} else
|
|
788
|
+
o = n.apply(this, arguments);
|
|
789
|
+
return bt(this, o);
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
function bt(e, r) {
|
|
793
|
+
if (r && (rr(r) === "object" || typeof r == "function"))
|
|
794
|
+
return r;
|
|
795
|
+
if (r !== void 0)
|
|
796
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
797
|
+
return vt(e);
|
|
798
|
+
}
|
|
799
|
+
function vt(e) {
|
|
800
|
+
if (e === void 0)
|
|
801
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
802
|
+
return e;
|
|
803
|
+
}
|
|
804
|
+
function tr(e) {
|
|
805
|
+
var r = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
806
|
+
return tr = function(n) {
|
|
807
|
+
if (n === null || !gt(n)) return n;
|
|
808
|
+
if (typeof n != "function")
|
|
809
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
810
|
+
if (typeof r < "u") {
|
|
811
|
+
if (r.has(n)) return r.get(n);
|
|
812
|
+
r.set(n, o);
|
|
813
|
+
}
|
|
814
|
+
function o() {
|
|
815
|
+
return xe(n, arguments, Ae(this).constructor);
|
|
816
|
+
}
|
|
817
|
+
return o.prototype = Object.create(n.prototype, { constructor: { value: o, enumerable: !1, writable: !0, configurable: !0 } }), Ee(o, n);
|
|
818
|
+
}, tr(e);
|
|
819
|
+
}
|
|
820
|
+
function xe(e, r, t) {
|
|
821
|
+
return Nr() ? xe = Reflect.construct.bind() : xe = function(o, u, s) {
|
|
822
|
+
var a = [null];
|
|
823
|
+
a.push.apply(a, u);
|
|
824
|
+
var c = Function.bind.apply(o, a), f = new c();
|
|
825
|
+
return s && Ee(f, s.prototype), f;
|
|
826
|
+
}, xe.apply(null, arguments);
|
|
827
|
+
}
|
|
828
|
+
function Nr() {
|
|
829
|
+
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
830
|
+
if (typeof Proxy == "function") return !0;
|
|
831
|
+
try {
|
|
832
|
+
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
833
|
+
})), !0;
|
|
834
|
+
} catch {
|
|
835
|
+
return !1;
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
function gt(e) {
|
|
839
|
+
return Function.toString.call(e).indexOf("[native code]") !== -1;
|
|
840
|
+
}
|
|
841
|
+
function Ee(e, r) {
|
|
842
|
+
return Ee = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
|
|
843
|
+
return n.__proto__ = o, n;
|
|
844
|
+
}, Ee(e, r);
|
|
845
|
+
}
|
|
846
|
+
function Ae(e) {
|
|
847
|
+
return Ae = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
848
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
849
|
+
}, Ae(e);
|
|
850
|
+
}
|
|
851
|
+
var Rr = /* @__PURE__ */ (function(e) {
|
|
852
|
+
yt(t, e);
|
|
853
|
+
var r = mt(t);
|
|
854
|
+
function t() {
|
|
855
|
+
return ht(this, t), r.apply(this, arguments);
|
|
856
|
+
}
|
|
857
|
+
return dt(t);
|
|
858
|
+
})(/* @__PURE__ */ tr(Error));
|
|
859
|
+
function Dr(e) {
|
|
860
|
+
var r = new Rr(e.message);
|
|
861
|
+
return e.stack && (r.stack = e.stack), Error.captureStackTrace && Error.captureStackTrace(r, Dr), r.cause = e, r;
|
|
862
|
+
}
|
|
863
|
+
function wt(e, r) {
|
|
864
|
+
return _t(e, r, St, !0);
|
|
865
|
+
}
|
|
866
|
+
function _t(e) {
|
|
867
|
+
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = r.filter, n = arguments.length > 2 ? arguments[2] : void 0;
|
|
868
|
+
return n(new Uint8Array(e), {
|
|
869
|
+
// Ignore certain types of files.
|
|
870
|
+
filter: function(u) {
|
|
871
|
+
return t ? t({
|
|
872
|
+
path: u.name
|
|
873
|
+
}) : !0;
|
|
874
|
+
}
|
|
875
|
+
}).then(function(o) {
|
|
876
|
+
return o;
|
|
877
|
+
}, function(o) {
|
|
878
|
+
throw Ot(o) ? Dr(o) : o;
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
function St(e) {
|
|
882
|
+
return new Promise(function(r, t) {
|
|
883
|
+
Br(e, function(n, o) {
|
|
884
|
+
n ? t(n) : r(o);
|
|
885
|
+
});
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
function Ot(e) {
|
|
889
|
+
return typeof e.code == "number";
|
|
890
|
+
}
|
|
891
|
+
function nr(e) {
|
|
892
|
+
"@babel/helpers - typeof";
|
|
893
|
+
return nr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
|
|
894
|
+
return typeof r;
|
|
895
|
+
} : function(r) {
|
|
896
|
+
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
897
|
+
}, nr(e);
|
|
898
|
+
}
|
|
899
|
+
function Et(e, r, t) {
|
|
900
|
+
return Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
901
|
+
}
|
|
902
|
+
function At(e, r) {
|
|
903
|
+
if (!(e instanceof r))
|
|
904
|
+
throw new TypeError("Cannot call a class as a function");
|
|
905
|
+
}
|
|
906
|
+
function Tt(e, r) {
|
|
907
|
+
if (typeof r != "function" && r !== null)
|
|
908
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
909
|
+
e.prototype = Object.create(r && r.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), r && Te(e, r);
|
|
910
|
+
}
|
|
911
|
+
function It(e) {
|
|
912
|
+
var r = Fr();
|
|
913
|
+
return function() {
|
|
914
|
+
var n = Ie(e), o;
|
|
915
|
+
if (r) {
|
|
916
|
+
var u = Ie(this).constructor;
|
|
917
|
+
o = Reflect.construct(n, arguments, u);
|
|
918
|
+
} else
|
|
919
|
+
o = n.apply(this, arguments);
|
|
920
|
+
return Pt(this, o);
|
|
921
|
+
};
|
|
922
|
+
}
|
|
923
|
+
function Pt(e, r) {
|
|
924
|
+
if (r && (nr(r) === "object" || typeof r == "function"))
|
|
925
|
+
return r;
|
|
926
|
+
if (r !== void 0)
|
|
927
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
928
|
+
return Nt(e);
|
|
929
|
+
}
|
|
930
|
+
function Nt(e) {
|
|
931
|
+
if (e === void 0)
|
|
932
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
933
|
+
return e;
|
|
934
|
+
}
|
|
935
|
+
function or(e) {
|
|
936
|
+
var r = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
937
|
+
return or = function(n) {
|
|
938
|
+
if (n === null || !Rt(n)) return n;
|
|
939
|
+
if (typeof n != "function")
|
|
940
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
941
|
+
if (typeof r < "u") {
|
|
942
|
+
if (r.has(n)) return r.get(n);
|
|
943
|
+
r.set(n, o);
|
|
944
|
+
}
|
|
945
|
+
function o() {
|
|
946
|
+
return Ce(n, arguments, Ie(this).constructor);
|
|
947
|
+
}
|
|
948
|
+
return o.prototype = Object.create(n.prototype, { constructor: { value: o, enumerable: !1, writable: !0, configurable: !0 } }), Te(o, n);
|
|
949
|
+
}, or(e);
|
|
950
|
+
}
|
|
951
|
+
function Ce(e, r, t) {
|
|
952
|
+
return Fr() ? Ce = Reflect.construct.bind() : Ce = function(o, u, s) {
|
|
953
|
+
var a = [null];
|
|
954
|
+
a.push.apply(a, u);
|
|
955
|
+
var c = Function.bind.apply(o, a), f = new c();
|
|
956
|
+
return s && Te(f, s.prototype), f;
|
|
957
|
+
}, Ce.apply(null, arguments);
|
|
958
|
+
}
|
|
959
|
+
function Fr() {
|
|
960
|
+
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
961
|
+
if (typeof Proxy == "function") return !0;
|
|
962
|
+
try {
|
|
963
|
+
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
964
|
+
})), !0;
|
|
965
|
+
} catch {
|
|
966
|
+
return !1;
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
function Rt(e) {
|
|
970
|
+
return Function.toString.call(e).indexOf("[native code]") !== -1;
|
|
971
|
+
}
|
|
972
|
+
function Te(e, r) {
|
|
973
|
+
return Te = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
|
|
974
|
+
return n.__proto__ = o, n;
|
|
975
|
+
}, Te(e, r);
|
|
976
|
+
}
|
|
977
|
+
function Ie(e) {
|
|
978
|
+
return Ie = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
979
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
980
|
+
}, Ie(e);
|
|
981
|
+
}
|
|
982
|
+
var Dt = {
|
|
983
|
+
XLS_FILE_NOT_SUPPORTED: "You passed a legacy `.xls` file. Only `.xlsx` files are supported",
|
|
984
|
+
FILE_NOT_SUPPORTED: "Doesn't look like an `.xlsx` file",
|
|
985
|
+
INVALID_ZIP: "Couldn't unzip `.xlsx` file contents",
|
|
986
|
+
NO_DATA: "No data"
|
|
987
|
+
}, Ue = /* @__PURE__ */ (function(e) {
|
|
988
|
+
Tt(t, e);
|
|
989
|
+
var r = It(t);
|
|
990
|
+
function t(n, o) {
|
|
991
|
+
var u;
|
|
992
|
+
return At(this, t), u = r.call(this, Dt[n] || n), u.code = n, u.name = "InvalidInputError", u.cause = o, u;
|
|
993
|
+
}
|
|
994
|
+
return Et(t);
|
|
995
|
+
})(/* @__PURE__ */ or(Error));
|
|
996
|
+
function Ft(e) {
|
|
997
|
+
var r = e.path;
|
|
998
|
+
return r.endsWith(".xml") || r.endsWith(".xml.rels");
|
|
999
|
+
}
|
|
1000
|
+
var jt = [80, 75], jr = [208, 207, 17, 224], ke = [jt, jr], xt = ke.indexOf(jr);
|
|
1001
|
+
function Ct() {
|
|
1002
|
+
var e, r = kt(ke), t = 0;
|
|
1003
|
+
return function(n) {
|
|
1004
|
+
if (isNaN(e)) {
|
|
1005
|
+
var o;
|
|
1006
|
+
r = r.filter(function(u) {
|
|
1007
|
+
if (n === ke[u][t])
|
|
1008
|
+
return ke[u].length === t + 1 && (o = u), !0;
|
|
1009
|
+
}), r.length === 1 ? e = o : r.length === 0 && (e = -1);
|
|
1010
|
+
}
|
|
1011
|
+
return t++, e;
|
|
1012
|
+
};
|
|
1013
|
+
}
|
|
1014
|
+
function kt(e) {
|
|
1015
|
+
for (var r = [], t = 0; t < e.length; )
|
|
1016
|
+
r.push(t), t++;
|
|
1017
|
+
return r;
|
|
1018
|
+
}
|
|
1019
|
+
function Lt(e, r) {
|
|
1020
|
+
var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1021
|
+
if (t) return (t = t.call(e)).next.bind(t);
|
|
1022
|
+
if (Array.isArray(e) || (t = $t(e)) || r) {
|
|
1023
|
+
t && (e = t);
|
|
1024
|
+
var n = 0;
|
|
1025
|
+
return function() {
|
|
1026
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1029
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1030
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1031
|
+
}
|
|
1032
|
+
function $t(e, r) {
|
|
1033
|
+
if (e) {
|
|
1034
|
+
if (typeof e == "string") return yr(e, r);
|
|
1035
|
+
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
1036
|
+
if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set") return Array.from(e);
|
|
1037
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return yr(e, r);
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
function yr(e, r) {
|
|
1041
|
+
(r == null || r > e.length) && (r = e.length);
|
|
1042
|
+
for (var t = 0, n = new Array(r); t < r; t++) n[t] = e[t];
|
|
1043
|
+
return n;
|
|
1044
|
+
}
|
|
1045
|
+
function Ut(e) {
|
|
1046
|
+
for (var r = Ct(), t = Lt(e), n; !(n = t()).done; ) {
|
|
1047
|
+
var o = n.value;
|
|
1048
|
+
if (Mt(o, r))
|
|
1049
|
+
return;
|
|
1050
|
+
}
|
|
1051
|
+
Bt(e.length);
|
|
1052
|
+
}
|
|
1053
|
+
function Mt(e, r) {
|
|
1054
|
+
var t = r(e);
|
|
1055
|
+
if (t !== void 0) {
|
|
1056
|
+
if (t === xt)
|
|
1057
|
+
throw new Ue("XLS_FILE_NOT_SUPPORTED");
|
|
1058
|
+
if (t < 0)
|
|
1059
|
+
throw new Ue("FILE_NOT_SUPPORTED");
|
|
1060
|
+
return !0;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
function Bt(e) {
|
|
1064
|
+
throw new Ue(e === 0 ? "NO_DATA" : "FILE_NOT_SUPPORTED");
|
|
1065
|
+
}
|
|
1066
|
+
var Le;
|
|
1067
|
+
function me(e) {
|
|
1068
|
+
var r = Date.now(), t = typeof global < "u" ? !!global.READ_EXCEL_FILE_CHECKPOINTS : typeof window < "u" ? !!window.READ_EXCEL_FILE_CHECKPOINTS : !1;
|
|
1069
|
+
t && (Le && console.log(" -", r - Le, "ms"), console.log("*", e)), Le = r;
|
|
1070
|
+
}
|
|
1071
|
+
function Vt() {
|
|
1072
|
+
Le = void 0;
|
|
1073
|
+
}
|
|
1074
|
+
function Wt(e) {
|
|
1075
|
+
return Vt(), me("unpack files"), e instanceof File || e instanceof Blob ? e.arrayBuffer().then(mr) : Promise.resolve(e).then(mr);
|
|
1076
|
+
}
|
|
1077
|
+
function mr(e) {
|
|
1078
|
+
return Ut(new Uint8Array(e)), wt(e, {
|
|
1079
|
+
filter: Ft
|
|
1080
|
+
}).then(function(r) {
|
|
1081
|
+
return r;
|
|
1082
|
+
}, function(r) {
|
|
1083
|
+
throw r instanceof Rr ? new Ue("INVALID_ZIP", r.cause) : r;
|
|
1084
|
+
});
|
|
1085
|
+
}
|
|
1086
|
+
function Xt(e, r) {
|
|
1087
|
+
var t = n();
|
|
1088
|
+
return r(e, t, u, null, null).then(function() {
|
|
1089
|
+
return o(t);
|
|
1090
|
+
});
|
|
1091
|
+
function n() {
|
|
1092
|
+
return {
|
|
1093
|
+
workbookPr: void 0,
|
|
1094
|
+
sheets: []
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1097
|
+
function o(s) {
|
|
1098
|
+
return {
|
|
1099
|
+
epoch1904: s.workbookPr ? s.workbookPr.epoch1904 : !1,
|
|
1100
|
+
sheets: s.sheets
|
|
1101
|
+
};
|
|
1102
|
+
}
|
|
1103
|
+
function u(s, a, c) {
|
|
1104
|
+
s === "workbookPr" ? c.workbookPr || (c.workbookPr = {
|
|
1105
|
+
epoch1904: a.date1904 === "1"
|
|
1106
|
+
}) : s === "sheet" && a.name && c.sheets.push({
|
|
1107
|
+
// `sheetId` attribute value is an arbitrary, `1`-based unique positive integer
|
|
1108
|
+
// assigned to a worksheet, typically starting at `1` for the first sheet.
|
|
1109
|
+
// Deleting and adding new sheets might cause the sheetId values to become non-sequential.
|
|
1110
|
+
// For example, `sheetId`s could be `1`, `2`, `4`, if sheet `3` was deleted.
|
|
1111
|
+
id: Number(a.sheetId),
|
|
1112
|
+
name: a.name,
|
|
1113
|
+
relationId: a.id
|
|
1114
|
+
});
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
function Ht(e, r) {
|
|
1118
|
+
var t = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/", n = "http://purl.oclc.org/ooxml/officeDocument/relationships/", o = u();
|
|
1119
|
+
return r(e, o, a, null, null).then(function() {
|
|
1120
|
+
return o;
|
|
1121
|
+
});
|
|
1122
|
+
function u() {
|
|
1123
|
+
return {
|
|
1124
|
+
sheets: {},
|
|
1125
|
+
sharedStrings: void 0,
|
|
1126
|
+
styles: void 0
|
|
1127
|
+
};
|
|
1128
|
+
}
|
|
1129
|
+
function s(d) {
|
|
1130
|
+
return d;
|
|
1131
|
+
}
|
|
1132
|
+
function a(d, y, p) {
|
|
1133
|
+
d === "Relationship" && c(p, y.Id, y.Type, y.Target);
|
|
1134
|
+
}
|
|
1135
|
+
function c(d, y, p, h) {
|
|
1136
|
+
switch (p) {
|
|
1137
|
+
case t + "styles":
|
|
1138
|
+
case n + "styles":
|
|
1139
|
+
d.styles = f(h);
|
|
1140
|
+
break;
|
|
1141
|
+
case t + "sharedStrings":
|
|
1142
|
+
case n + "sharedStrings":
|
|
1143
|
+
d.sharedStrings = f(h);
|
|
1144
|
+
break;
|
|
1145
|
+
case t + "worksheet":
|
|
1146
|
+
case n + "worksheet":
|
|
1147
|
+
d.sheets[y] = f(h);
|
|
1148
|
+
break;
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
function f(d) {
|
|
1152
|
+
return d[0] === "/" ? d.slice(1) : "xl/" + d;
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
function Pe(e) {
|
|
1156
|
+
"@babel/helpers - typeof";
|
|
1157
|
+
return Pe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
|
|
1158
|
+
return typeof r;
|
|
1159
|
+
} : function(r) {
|
|
1160
|
+
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
1161
|
+
}, Pe(e);
|
|
1162
|
+
}
|
|
1163
|
+
var Yt = ["xfId"];
|
|
1164
|
+
function br(e, r) {
|
|
1165
|
+
var t = Object.keys(e);
|
|
1166
|
+
if (Object.getOwnPropertySymbols) {
|
|
1167
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
1168
|
+
r && (n = n.filter(function(o) {
|
|
1169
|
+
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
|
1170
|
+
})), t.push.apply(t, n);
|
|
1171
|
+
}
|
|
1172
|
+
return t;
|
|
1173
|
+
}
|
|
1174
|
+
function vr(e) {
|
|
1175
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
1176
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
|
1177
|
+
r % 2 ? br(Object(t), !0).forEach(function(n) {
|
|
1178
|
+
Gt(e, n, t[n]);
|
|
1179
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : br(Object(t)).forEach(function(n) {
|
|
1180
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1181
|
+
});
|
|
1182
|
+
}
|
|
1183
|
+
return e;
|
|
1184
|
+
}
|
|
1185
|
+
function Gt(e, r, t) {
|
|
1186
|
+
return r = zt(r), r in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;
|
|
1187
|
+
}
|
|
1188
|
+
function zt(e) {
|
|
1189
|
+
var r = qt(e, "string");
|
|
1190
|
+
return Pe(r) === "symbol" ? r : String(r);
|
|
1191
|
+
}
|
|
1192
|
+
function qt(e, r) {
|
|
1193
|
+
if (Pe(e) !== "object" || e === null) return e;
|
|
1194
|
+
var t = e[Symbol.toPrimitive];
|
|
1195
|
+
if (t !== void 0) {
|
|
1196
|
+
var n = t.call(e, r);
|
|
1197
|
+
if (Pe(n) !== "object") return n;
|
|
1198
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1199
|
+
}
|
|
1200
|
+
return (r === "string" ? String : Number)(e);
|
|
1201
|
+
}
|
|
1202
|
+
function Kt(e, r) {
|
|
1203
|
+
if (e == null) return {};
|
|
1204
|
+
var t = Zt(e, r), n, o;
|
|
1205
|
+
if (Object.getOwnPropertySymbols) {
|
|
1206
|
+
var u = Object.getOwnPropertySymbols(e);
|
|
1207
|
+
for (o = 0; o < u.length; o++)
|
|
1208
|
+
n = u[o], !(r.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (t[n] = e[n]);
|
|
1209
|
+
}
|
|
1210
|
+
return t;
|
|
1211
|
+
}
|
|
1212
|
+
function Zt(e, r) {
|
|
1213
|
+
if (e == null) return {};
|
|
1214
|
+
var t = {}, n = Object.keys(e), o, u;
|
|
1215
|
+
for (u = 0; u < n.length; u++)
|
|
1216
|
+
o = n[u], !(r.indexOf(o) >= 0) && (t[o] = e[o]);
|
|
1217
|
+
return t;
|
|
1218
|
+
}
|
|
1219
|
+
function Jt(e, r) {
|
|
1220
|
+
var t = n();
|
|
1221
|
+
return r(e, t, u, s, null).then(function() {
|
|
1222
|
+
return o(t);
|
|
1223
|
+
});
|
|
1224
|
+
function n() {
|
|
1225
|
+
return {
|
|
1226
|
+
numberFormats: [],
|
|
1227
|
+
baseStyles: [],
|
|
1228
|
+
// The first `164` elements of the `styles` array are going to be `undefined`
|
|
1229
|
+
// because those represent the built-in "default" styles in `.xlsx` specification.
|
|
1230
|
+
// These "default" styles have IDs from `0` to `163`, i.e. according to their index.
|
|
1231
|
+
styles: [],
|
|
1232
|
+
cellStyleXfs: !1,
|
|
1233
|
+
cellXfs: !1
|
|
1234
|
+
};
|
|
1235
|
+
}
|
|
1236
|
+
function o(c) {
|
|
1237
|
+
return c.styles.map(function(f) {
|
|
1238
|
+
if (f.xfId) {
|
|
1239
|
+
var d = f.xfId, y = Kt(f, Yt);
|
|
1240
|
+
return vr(vr({}, c.baseStyles[d]), y);
|
|
1241
|
+
} else
|
|
1242
|
+
return f;
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
function u(c, f, d) {
|
|
1246
|
+
if (c === "numFmt") {
|
|
1247
|
+
var y = Number(f.numFmtId), p = {
|
|
1248
|
+
id: y
|
|
1249
|
+
};
|
|
1250
|
+
y >= 100 && (p.template = f.formatCode), d.numberFormats[y] = p;
|
|
1251
|
+
} else if (c === "cellStyleXfs")
|
|
1252
|
+
d.cellStyleXfs = !0;
|
|
1253
|
+
else if (c === "cellXfs")
|
|
1254
|
+
d.cellXfs = !0;
|
|
1255
|
+
else if (c === "xf") {
|
|
1256
|
+
if (d.cellStyleXfs)
|
|
1257
|
+
d.baseStyles.push(a(f));
|
|
1258
|
+
else if (d.cellXfs) {
|
|
1259
|
+
var h = a(f, d.numberFormats);
|
|
1260
|
+
f.xfId && (h.xfId = Number(f.xfId)), d.styles.push(h);
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
function s(c, f) {
|
|
1265
|
+
c === "cellStyleXfs" ? f.cellStyleXfs = !1 : c === "cellXfs" && (f.cellXfs = !1);
|
|
1266
|
+
}
|
|
1267
|
+
function a(c, f) {
|
|
1268
|
+
var d = {};
|
|
1269
|
+
if (c.numFmtId) {
|
|
1270
|
+
var y = Number(c.numFmtId);
|
|
1271
|
+
f && f[y] ? d.numberFormat = f[y] : d.numberFormat = {
|
|
1272
|
+
id: y
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1275
|
+
return d;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
function Qt(e, r) {
|
|
1279
|
+
var t = n();
|
|
1280
|
+
return r(e, t, u, s, a).then(function() {
|
|
1281
|
+
return o(t);
|
|
1282
|
+
});
|
|
1283
|
+
function n() {
|
|
1284
|
+
return {
|
|
1285
|
+
si: void 0,
|
|
1286
|
+
strings: []
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1289
|
+
function o(p) {
|
|
1290
|
+
return p.strings;
|
|
1291
|
+
}
|
|
1292
|
+
function u(p, h, T) {
|
|
1293
|
+
p === "si" ? T.si = c() : T.si && f(p, h, T.si);
|
|
1294
|
+
}
|
|
1295
|
+
function s(p, h) {
|
|
1296
|
+
p === "si" ? (h.strings.push(h.si.string), h.si = void 0) : h.si && d(p, h.si);
|
|
1297
|
+
}
|
|
1298
|
+
function a(p, h) {
|
|
1299
|
+
h.si && y(p, h.si);
|
|
1300
|
+
}
|
|
1301
|
+
function c() {
|
|
1302
|
+
return {
|
|
1303
|
+
t: !1,
|
|
1304
|
+
r: !1,
|
|
1305
|
+
rPh: !1,
|
|
1306
|
+
string: ""
|
|
1307
|
+
};
|
|
1308
|
+
}
|
|
1309
|
+
function f(p, h, T) {
|
|
1310
|
+
p === "t" ? T.t = !0 : p === "r" ? T.r = !0 : p === "rPh" && (T.rPh = !0);
|
|
1311
|
+
}
|
|
1312
|
+
function d(p, h) {
|
|
1313
|
+
p === "t" ? h.t = !1 : p === "r" ? h.r = !1 : p === "rPh" && (h.rPh = !1);
|
|
1314
|
+
}
|
|
1315
|
+
function y(p, h) {
|
|
1316
|
+
h.rPh || h.t && (h.r ? h.string += p : h.string = p);
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
function en(e, r) {
|
|
1320
|
+
var t = 17, n = 1, o = 1, u = 1440 * 60 * 1e3, s = 365;
|
|
1321
|
+
r && (e += 4 * s + n + o);
|
|
1322
|
+
var a = n + o + 70 * s + t;
|
|
1323
|
+
return Math.floor((e - a) * u);
|
|
1324
|
+
}
|
|
1325
|
+
var rn = /;@$/, tn = /[^a-z0#\?%]+/;
|
|
1326
|
+
function nn(e, r, t) {
|
|
1327
|
+
var n = t[e];
|
|
1328
|
+
return n === void 0 ? t[e] = on(r) : n;
|
|
1329
|
+
}
|
|
1330
|
+
function on(e) {
|
|
1331
|
+
e = e.toLowerCase(), e = e.replace(rn, ""), e = e.replace(/\\./g, " ");
|
|
1332
|
+
var r = e.split(";");
|
|
1333
|
+
return r.some(t);
|
|
1334
|
+
function t(n) {
|
|
1335
|
+
n = n.replace(/"[^"]*"/g, " "), n = n.replace(/(\[?[smhd]{1,2}\]?)[\.\,]00?0?/g, "$1"), n = n.replace(/\[([smhd]{1,2})\]/g, "$1"), n = n.replace(/\[[^\]]*\]/g, "");
|
|
1336
|
+
var o = n.split(tn).filter(function(u) {
|
|
1337
|
+
return u;
|
|
1338
|
+
});
|
|
1339
|
+
return o.length === 0 ? !1 : o.every(function(u) {
|
|
1340
|
+
return un.indexOf(u) >= 0;
|
|
1341
|
+
});
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
var un = [
|
|
1345
|
+
// Seconds.
|
|
1346
|
+
"s",
|
|
1347
|
+
// Seconds (min two digits). Example: "05".
|
|
1348
|
+
"ss",
|
|
1349
|
+
// Minutes. Could also means months, depending on the context. Example: "5".
|
|
1350
|
+
"m",
|
|
1351
|
+
// Minutes (min two digits). Could also means months, depending on the context. Example: "05".
|
|
1352
|
+
"mm",
|
|
1353
|
+
// Hours. Example: "1".
|
|
1354
|
+
"h",
|
|
1355
|
+
// Hours (min two digits). Example: "01".
|
|
1356
|
+
"hh",
|
|
1357
|
+
// "am" part of "am/pm" or "AM/PM".
|
|
1358
|
+
"am",
|
|
1359
|
+
// "pm" part of "am/pm" or "AM/PM".
|
|
1360
|
+
"pm",
|
|
1361
|
+
// "a" part of "a/p" or "A/P".
|
|
1362
|
+
"a",
|
|
1363
|
+
// "p" part of "a/p" or "A/P".
|
|
1364
|
+
"p",
|
|
1365
|
+
// Day. Example: "1"
|
|
1366
|
+
"d",
|
|
1367
|
+
// Day (min two digits). Example: "01"
|
|
1368
|
+
"dd",
|
|
1369
|
+
// Short, three-letter abbreviation for the day of the week. Example: "Mon"
|
|
1370
|
+
"ddd",
|
|
1371
|
+
// Full name of the day of the week. Example: "Monday"
|
|
1372
|
+
"dddd",
|
|
1373
|
+
// Abbreviated weekday name. Example: "Mon", "Tue"
|
|
1374
|
+
"aaa",
|
|
1375
|
+
// Full weekday name. Example: "Monday", "Tuesday"
|
|
1376
|
+
"aaaa",
|
|
1377
|
+
// First letter of the weekday name. Example: "M", "T"
|
|
1378
|
+
"aaaaa",
|
|
1379
|
+
// Month (numeric). Could also mean minutes, depending on the context. Example: "1".
|
|
1380
|
+
"m",
|
|
1381
|
+
// Month (numeric, min two digits). Could also mean minutes, depending on the context. Example: "01".
|
|
1382
|
+
"mm",
|
|
1383
|
+
// Month (shortened month name). Example: "Jan".
|
|
1384
|
+
"mmm",
|
|
1385
|
+
// Month (full month name). Example: "January".
|
|
1386
|
+
"mmmm",
|
|
1387
|
+
// Month (first letter). Example: "J".
|
|
1388
|
+
"mmmmm",
|
|
1389
|
+
// Excel typically treats a single `y` the same as `yy` in custom formatting,
|
|
1390
|
+
// though standard practice is using `yy` or `yyyy`.
|
|
1391
|
+
"y",
|
|
1392
|
+
// Two-digit year, with a leading zero if needed. Example: "01".
|
|
1393
|
+
"yy",
|
|
1394
|
+
// Full year. Example: "2001".
|
|
1395
|
+
"yyyy",
|
|
1396
|
+
//
|
|
1397
|
+
// `e` or `ee` token stands for "era year" and represents an era-based year,
|
|
1398
|
+
// primarily supporting Japanese, Taiwanese, or Minguo/Buddhist calendar systems.
|
|
1399
|
+
// An example of an "era year" would be Heisei or Reiwa year numbers,
|
|
1400
|
+
// or Buddhist Era years which are Gregorian years plus 543.
|
|
1401
|
+
//
|
|
1402
|
+
// * `e` outputs the era year as a 4-digit (or unpadded) number.
|
|
1403
|
+
// For example, `2026` or `115` depending on the active regional era.
|
|
1404
|
+
// In standard Western/Gregorian locales, Excel often falls back to treating `e`
|
|
1405
|
+
// similarly to a regular year layout.
|
|
1406
|
+
//
|
|
1407
|
+
// * `ee` outputs a 2-digit padded era year. For example, `26` or `15`.
|
|
1408
|
+
//
|
|
1409
|
+
// * `eeee` — While `yyyy` is the standard token for a 4-digit year,
|
|
1410
|
+
// `eeee` is historically used for specialized international calendar eras
|
|
1411
|
+
// (like the Japanese or Taiwanese imperial eras). However, in standard
|
|
1412
|
+
// Western/Gregorian system locales, Excel treats `eeee` exactly like `yyyy`.
|
|
1413
|
+
"e",
|
|
1414
|
+
"ee",
|
|
1415
|
+
"eeee"
|
|
1416
|
+
];
|
|
1417
|
+
function fn(e, r, t, n) {
|
|
1418
|
+
return e.numberFormat ? (
|
|
1419
|
+
// Whether it's a "number format" that's conventionally used for storing date timestamps.
|
|
1420
|
+
!!(sn.indexOf(e.numberFormat.id) >= 0 || // Whether it's a "number format" that uses a "formatting template"
|
|
1421
|
+
// that the developer is certain is a date formatting template.
|
|
1422
|
+
r && e.numberFormat.template === r || // Whether the "smart formatting template" feature is not disabled
|
|
1423
|
+
// and it has detected that it's a date formatting template by looking at it.
|
|
1424
|
+
t && e.numberFormat.template && nn(e.numberFormat.id, e.numberFormat.template, n))
|
|
1425
|
+
) : !1;
|
|
1426
|
+
}
|
|
1427
|
+
var an = [
|
|
1428
|
+
14,
|
|
1429
|
+
// mm-dd-yy
|
|
1430
|
+
15,
|
|
1431
|
+
// d-mmm-yy
|
|
1432
|
+
16,
|
|
1433
|
+
// d-mmm
|
|
1434
|
+
17,
|
|
1435
|
+
// mmm-yy
|
|
1436
|
+
18,
|
|
1437
|
+
// h:mm AM/PM
|
|
1438
|
+
19,
|
|
1439
|
+
// h:mm:ss AM/PM
|
|
1440
|
+
20,
|
|
1441
|
+
// h:mm
|
|
1442
|
+
21,
|
|
1443
|
+
// h:mm:ss
|
|
1444
|
+
22,
|
|
1445
|
+
// m/d/yy h:mm
|
|
1446
|
+
45,
|
|
1447
|
+
// mm:ss
|
|
1448
|
+
46,
|
|
1449
|
+
// [h]:mm:ss
|
|
1450
|
+
47
|
|
1451
|
+
// mmss.0
|
|
1452
|
+
], qe = [
|
|
1453
|
+
27,
|
|
1454
|
+
// [$-404]e/m/d OR yyyy"年"m"月"
|
|
1455
|
+
28,
|
|
1456
|
+
// [$-404]e"年"m"月"d"日" OR m"月"d"日"
|
|
1457
|
+
29,
|
|
1458
|
+
// [$-404]e"年"m"月"d"日" OR m"月"d"日"
|
|
1459
|
+
30,
|
|
1460
|
+
// m/d/yy OR m-d-yy
|
|
1461
|
+
31,
|
|
1462
|
+
// yyyy"年"m"月"d"日" OR yyyy"年"m"月"d"日"
|
|
1463
|
+
32,
|
|
1464
|
+
// hh"時"mm"分" OR h"时"mm"分"
|
|
1465
|
+
33,
|
|
1466
|
+
// hh"時"mm"分"ss"秒" OR h"时"mm"分"ss"秒"
|
|
1467
|
+
34,
|
|
1468
|
+
// 上午/下午hh"時"mm"分" OR 上午/下午h"时"mm"分"
|
|
1469
|
+
35,
|
|
1470
|
+
// 上午/下午hh"時"mm"分"ss"秒" OR 上午/下午h"时"mm"分"ss"秒"
|
|
1471
|
+
36,
|
|
1472
|
+
// [$-404]e/m/d OR yyyy"年"m"月"
|
|
1473
|
+
50,
|
|
1474
|
+
// [$-404]e/m/d OR yyyy"年"m"月"
|
|
1475
|
+
51,
|
|
1476
|
+
// [$-404]e"年"m"月"d"日" OR m"月"d"日"
|
|
1477
|
+
52,
|
|
1478
|
+
// 上午/下午hh"時"mm"分" OR yyyy"年"m"月"
|
|
1479
|
+
53,
|
|
1480
|
+
// 上午/下午hh"時"mm"分"ss"秒" OR m"月"d"日"
|
|
1481
|
+
54,
|
|
1482
|
+
// [$-404]e"年"m"月"d"日" OR m"月"d"日"
|
|
1483
|
+
55,
|
|
1484
|
+
// 上午/下午hh"時"mm"分" OR 上午/下午h"时"mm"分"
|
|
1485
|
+
56,
|
|
1486
|
+
// 上午/下午hh"時"mm"分"ss"秒" OR 上午/下午h"时"mm"分"ss"秒"
|
|
1487
|
+
57,
|
|
1488
|
+
// [$-404]e/m/d OR yyyy"年"m"月"
|
|
1489
|
+
58
|
|
1490
|
+
// [$-404]e"年"m"月"d"日" OR m"月"d"日"
|
|
1491
|
+
], gr = [
|
|
1492
|
+
27,
|
|
1493
|
+
// [$-411]ge.m.d OR yyyy"年" mm"月" dd"日"
|
|
1494
|
+
28,
|
|
1495
|
+
// [$-411]ggge"年"m"月"d"日" OR mm-dd
|
|
1496
|
+
29,
|
|
1497
|
+
// [$-411]ggge"年"m"月"d"日" OR mm-dd
|
|
1498
|
+
30,
|
|
1499
|
+
// m/d/yy OR mm-dd-yy
|
|
1500
|
+
31,
|
|
1501
|
+
// yyyy"年"m"月"d"日" OR yyyy"년" mm"월" dd"일"
|
|
1502
|
+
32,
|
|
1503
|
+
// h"時"mm"分" OR h"시" mm"분"
|
|
1504
|
+
33,
|
|
1505
|
+
// h"時"mm"分"ss"秒" OR h"시" mm"분" ss"초"
|
|
1506
|
+
34,
|
|
1507
|
+
// yyyy"年"m"月" OR yyyy-mm-dd
|
|
1508
|
+
35,
|
|
1509
|
+
// m"月"d"日" OR yyyy-mm-dd
|
|
1510
|
+
36,
|
|
1511
|
+
// [$-411]ge.m.d OR yyyy"年" mm"月" dd"日"
|
|
1512
|
+
50,
|
|
1513
|
+
// [$-411]ge.m.d OR yyyy"年" mm"月" dd"日"
|
|
1514
|
+
51,
|
|
1515
|
+
// [$-411]ggge"年"m"月"d"日" OR mm-dd
|
|
1516
|
+
52,
|
|
1517
|
+
// yyyy"年"m"月" OR yyyy-mm-dd
|
|
1518
|
+
53,
|
|
1519
|
+
// m"月"d"日" OR yyyy-mm-dd
|
|
1520
|
+
54,
|
|
1521
|
+
// [$-411]ggge"年"m"月"d"日" OR mm-dd
|
|
1522
|
+
55,
|
|
1523
|
+
// yyyy"年"m"月" OR yyyy-mm-dd
|
|
1524
|
+
56,
|
|
1525
|
+
// m"月"d"日" OR yyyy-mm-dd
|
|
1526
|
+
57,
|
|
1527
|
+
// [$-411]ge.m.d OR yyyy"年" mm"月" dd"日"
|
|
1528
|
+
58
|
|
1529
|
+
// [$-411]ggge"年"m"月"d"日" OR mm-dd
|
|
1530
|
+
], cn = [
|
|
1531
|
+
71,
|
|
1532
|
+
// ว/ด/ปปปป
|
|
1533
|
+
72,
|
|
1534
|
+
// ว-ดดด-ปป
|
|
1535
|
+
73,
|
|
1536
|
+
// ว-ดดด
|
|
1537
|
+
74,
|
|
1538
|
+
// ดดด-ปป
|
|
1539
|
+
75,
|
|
1540
|
+
// ช:นน
|
|
1541
|
+
76,
|
|
1542
|
+
// ช:นน:ทท
|
|
1543
|
+
77,
|
|
1544
|
+
// ว/ด/ปปปป ช:นน
|
|
1545
|
+
78,
|
|
1546
|
+
// นน:ทท
|
|
1547
|
+
79,
|
|
1548
|
+
// [ช]:นน:ทท
|
|
1549
|
+
80,
|
|
1550
|
+
// นน:ทท.0
|
|
1551
|
+
81
|
|
1552
|
+
// d/m/bb
|
|
1553
|
+
], sn = an.concat(
|
|
1554
|
+
// Add Mainland Chinese or Taiwanese date format IDs that haven't already been added.
|
|
1555
|
+
qe
|
|
1556
|
+
).concat(
|
|
1557
|
+
// Add Japanese or Korean date format IDs that haven't already been added.
|
|
1558
|
+
gr.filter(function(e) {
|
|
1559
|
+
return qe.indexOf(e) < 0;
|
|
1560
|
+
})
|
|
1561
|
+
).concat(
|
|
1562
|
+
// Add Thai date format IDs that haven't already been added.
|
|
1563
|
+
cn.filter(function(e) {
|
|
1564
|
+
return qe.indexOf(e) < 0;
|
|
1565
|
+
}).filter(function(e) {
|
|
1566
|
+
return gr.indexOf(e) < 0;
|
|
1567
|
+
})
|
|
1568
|
+
);
|
|
1569
|
+
function ln(e, r) {
|
|
1570
|
+
return yn(e) || hn(e, r) || dn(e, r) || pn();
|
|
1571
|
+
}
|
|
1572
|
+
function pn() {
|
|
1573
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1574
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1575
|
+
}
|
|
1576
|
+
function dn(e, r) {
|
|
1577
|
+
if (e) {
|
|
1578
|
+
if (typeof e == "string") return wr(e, r);
|
|
1579
|
+
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
1580
|
+
if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set") return Array.from(e);
|
|
1581
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return wr(e, r);
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
function wr(e, r) {
|
|
1585
|
+
(r == null || r > e.length) && (r = e.length);
|
|
1586
|
+
for (var t = 0, n = new Array(r); t < r; t++) n[t] = e[t];
|
|
1587
|
+
return n;
|
|
1588
|
+
}
|
|
1589
|
+
function hn(e, r) {
|
|
1590
|
+
var t = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1591
|
+
if (t != null) {
|
|
1592
|
+
var n, o, u, s, a = [], c = !0, f = !1;
|
|
1593
|
+
try {
|
|
1594
|
+
if (u = (t = t.call(e)).next, r !== 0) for (; !(c = (n = u.call(t)).done) && (a.push(n.value), a.length !== r); c = !0) ;
|
|
1595
|
+
} catch (d) {
|
|
1596
|
+
f = !0, o = d;
|
|
1597
|
+
} finally {
|
|
1598
|
+
try {
|
|
1599
|
+
if (!c && t.return != null && (s = t.return(), Object(s) !== s)) return;
|
|
1600
|
+
} finally {
|
|
1601
|
+
if (f) throw o;
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
return a;
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
function yn(e) {
|
|
1608
|
+
if (Array.isArray(e)) return e;
|
|
1609
|
+
}
|
|
1610
|
+
var mn = null, be = [null, mn];
|
|
1611
|
+
function bn(e, r, t, n, o) {
|
|
1612
|
+
var u = ln(o, 7), s = u[0], a = u[1], c = u[2], f = u[3], d = u[4], y = u[5], p = u[6];
|
|
1613
|
+
switch (e || "n") {
|
|
1614
|
+
// `t="str"` means that the cell value is calculated using a formula.
|
|
1615
|
+
// The formula is defined as the text of a child `<f/>` element.
|
|
1616
|
+
//
|
|
1617
|
+
// It could optionally include a `<v/>` element whose text is the cached result
|
|
1618
|
+
// of the calculation from the last time the file was saved in a spreadsheet editor application.
|
|
1619
|
+
//
|
|
1620
|
+
// An optional `<v/>` element holds a pre-computed result of the formula defined by `<f/>`.
|
|
1621
|
+
//
|
|
1622
|
+
// Example:
|
|
1623
|
+
//
|
|
1624
|
+
// <c r="B3" t="str">
|
|
1625
|
+
// <f>CONCATENATE(C1,D1)</f>
|
|
1626
|
+
// <v>C1ValueD1Value</v>
|
|
1627
|
+
// </c>
|
|
1628
|
+
//
|
|
1629
|
+
// Here's a guide on formulas in XLSX files:
|
|
1630
|
+
// https://github.com/MiniMax-AI/skills/blob/main/skills/minimax-xlsx/references/validate.md
|
|
1631
|
+
//
|
|
1632
|
+
case "str":
|
|
1633
|
+
return t === void 0 ? "VALUE_MISSING" : t ? ["s", t] : be;
|
|
1634
|
+
// `t="inlineStr"` means that `<is/>` holds the string value.
|
|
1635
|
+
//
|
|
1636
|
+
// Inside a `<c t="inlineStr"/>`, the specification requires there to exist an `<is/>` element,
|
|
1637
|
+
// and within that `<is/>` element it requires to exist a `<t/>` element.
|
|
1638
|
+
//
|
|
1639
|
+
// Example:
|
|
1640
|
+
//
|
|
1641
|
+
// <c r="A1" s="1" t="inlineStr">
|
|
1642
|
+
// <is>
|
|
1643
|
+
// <t>
|
|
1644
|
+
// Test 123
|
|
1645
|
+
// </t>
|
|
1646
|
+
// </is>
|
|
1647
|
+
// </c>
|
|
1648
|
+
//
|
|
1649
|
+
case "inlineStr":
|
|
1650
|
+
return n === void 0 ? "VALUE_MISSING" : ["s", n];
|
|
1651
|
+
// `type="s"` means that the string value is stored in the Shared Strings Table.
|
|
1652
|
+
// This way it attempts to compress the `.xlsx` file by reusing all string values
|
|
1653
|
+
// in case they repeat throughout the spreadsheet.
|
|
1654
|
+
//
|
|
1655
|
+
// This optimization can't be used when writing an `.xlsx` file in a "streaming"
|
|
1656
|
+
// fashion, i.e. when the entire spreadsheet data is not known in adavance
|
|
1657
|
+
// at the start of writing the file.
|
|
1658
|
+
// But it can be used in all other situations. And hence, it is used.
|
|
1659
|
+
// So this is the most common cell type, actually.
|
|
1660
|
+
//
|
|
1661
|
+
// Example:
|
|
1662
|
+
//
|
|
1663
|
+
// <c r="A3" t="s">
|
|
1664
|
+
// <v>3</v>
|
|
1665
|
+
// </c>
|
|
1666
|
+
//
|
|
1667
|
+
case "s":
|
|
1668
|
+
if (!t)
|
|
1669
|
+
return "VALUE_MISSING";
|
|
1670
|
+
var h = Number(t);
|
|
1671
|
+
return isNaN(h) || s[h] === void 0 ? "VALUE_INVALID" : ["s", s[h]];
|
|
1672
|
+
// Boolean (TRUE/FALSE) values are stored as either "1" or "0" in cells of type "b".
|
|
1673
|
+
//
|
|
1674
|
+
// Example:
|
|
1675
|
+
//
|
|
1676
|
+
// <c r="A1" t="b">
|
|
1677
|
+
// <v>1</v>
|
|
1678
|
+
// </c>
|
|
1679
|
+
//
|
|
1680
|
+
case "b":
|
|
1681
|
+
return t ? t === "1" ? ["b", !0] : t === "0" ? ["b", !1] : "VALUE_INVALID" : "VALUE_MISSING";
|
|
1682
|
+
// If cell type is "e", the `<v/>` element's text is an error code string (required).
|
|
1683
|
+
//
|
|
1684
|
+
// Example:
|
|
1685
|
+
//
|
|
1686
|
+
// <c r="A1" t="e">
|
|
1687
|
+
// <f>1/0</f>
|
|
1688
|
+
// <v>#DIV/0!</v>
|
|
1689
|
+
// </c>
|
|
1690
|
+
//
|
|
1691
|
+
case "e":
|
|
1692
|
+
return t ? ["e", t] : "VALUE_MISSING";
|
|
1693
|
+
// XLSX supports date cells of type "d", though it seems like it (almost?) never
|
|
1694
|
+
// uses type "d" for storing dates, preferring type "n" and numeric timestamp instead.
|
|
1695
|
+
// The value of a "d" cell is supposedly a string in "ISO 8601" format.
|
|
1696
|
+
// I haven't seen an `.xlsx` file having such cells.
|
|
1697
|
+
//
|
|
1698
|
+
// Example:
|
|
1699
|
+
//
|
|
1700
|
+
// <c r="A1" s="1" t="d">
|
|
1701
|
+
// <v>
|
|
1702
|
+
// 2021-06-10T00:47:45.700Z
|
|
1703
|
+
// </v>
|
|
1704
|
+
// </c>
|
|
1705
|
+
//
|
|
1706
|
+
case "d":
|
|
1707
|
+
if (!t)
|
|
1708
|
+
return be;
|
|
1709
|
+
var T = new Date(t);
|
|
1710
|
+
return isNaN(T.valueOf()) ? "VALUE_INVALID" : ["d", T.getTime()];
|
|
1711
|
+
// type "n" is used for numeric cells.
|
|
1712
|
+
//
|
|
1713
|
+
// An optional `s` attribute defines how this number should be formatted —
|
|
1714
|
+
// it should be a zero-based index of the style (XF record) in `styles.xml`.
|
|
1715
|
+
//
|
|
1716
|
+
// Example:
|
|
1717
|
+
//
|
|
1718
|
+
// <c r="A1" s="1" t="n">
|
|
1719
|
+
// <v>123.45</v>
|
|
1720
|
+
// </c>
|
|
1721
|
+
//
|
|
1722
|
+
case "n":
|
|
1723
|
+
if (!t)
|
|
1724
|
+
return be;
|
|
1725
|
+
if (r) {
|
|
1726
|
+
var j = Number(r);
|
|
1727
|
+
if (isNaN(j) || a[j] === void 0)
|
|
1728
|
+
return "FORMAT_INVALID";
|
|
1729
|
+
if (fn(a[j], d, y, f)) {
|
|
1730
|
+
var U = Number(t);
|
|
1731
|
+
return isNaN(U) ? "VALUE_INVALID" : ["d", en(U, c)];
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
if (p)
|
|
1735
|
+
return ["n", t];
|
|
1736
|
+
var P = Number(t);
|
|
1737
|
+
return isNaN(P) ? "VALUE_INVALID" : ["n", P];
|
|
1738
|
+
default:
|
|
1739
|
+
return "TYPE_INVALID";
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
function _r(e) {
|
|
1743
|
+
for (var r = 0, t = 0; t < e.length; ) {
|
|
1744
|
+
var n = e.charCodeAt(t);
|
|
1745
|
+
if (n >= 48 && n <= 57) {
|
|
1746
|
+
var o = Number(e.slice(t));
|
|
1747
|
+
return isNaN(o) && Sr(e), [
|
|
1748
|
+
// Row number (starting at `1`).
|
|
1749
|
+
o,
|
|
1750
|
+
// Column number (starting at `1`).
|
|
1751
|
+
r
|
|
1752
|
+
];
|
|
1753
|
+
}
|
|
1754
|
+
r *= 26, r += e.charCodeAt(t) - 64, t++;
|
|
1755
|
+
}
|
|
1756
|
+
Sr(e);
|
|
1757
|
+
}
|
|
1758
|
+
function Sr(e) {
|
|
1759
|
+
throw new Error('<c r="'.concat(e, '">'));
|
|
1760
|
+
}
|
|
1761
|
+
function vn(e, r) {
|
|
1762
|
+
return _n(e) || wn(e, r) || xr(e, r) || gn();
|
|
1763
|
+
}
|
|
1764
|
+
function gn() {
|
|
1765
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1766
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1767
|
+
}
|
|
1768
|
+
function wn(e, r) {
|
|
1769
|
+
var t = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1770
|
+
if (t != null) {
|
|
1771
|
+
var n, o, u, s, a = [], c = !0, f = !1;
|
|
1772
|
+
try {
|
|
1773
|
+
if (u = (t = t.call(e)).next, r !== 0) for (; !(c = (n = u.call(t)).done) && (a.push(n.value), a.length !== r); c = !0) ;
|
|
1774
|
+
} catch (d) {
|
|
1775
|
+
f = !0, o = d;
|
|
1776
|
+
} finally {
|
|
1777
|
+
try {
|
|
1778
|
+
if (!c && t.return != null && (s = t.return(), Object(s) !== s)) return;
|
|
1779
|
+
} finally {
|
|
1780
|
+
if (f) throw o;
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
return a;
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
function _n(e) {
|
|
1787
|
+
if (Array.isArray(e)) return e;
|
|
1788
|
+
}
|
|
1789
|
+
function Sn(e, r) {
|
|
1790
|
+
var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1791
|
+
if (t) return (t = t.call(e)).next.bind(t);
|
|
1792
|
+
if (Array.isArray(e) || (t = xr(e)) || r) {
|
|
1793
|
+
t && (e = t);
|
|
1794
|
+
var n = 0;
|
|
1795
|
+
return function() {
|
|
1796
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
1797
|
+
};
|
|
1798
|
+
}
|
|
1799
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1800
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1801
|
+
}
|
|
1802
|
+
function xr(e, r) {
|
|
1803
|
+
if (e) {
|
|
1804
|
+
if (typeof e == "string") return Or(e, r);
|
|
1805
|
+
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
1806
|
+
if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set") return Array.from(e);
|
|
1807
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Or(e, r);
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
function Or(e, r) {
|
|
1811
|
+
(r == null || r > e.length) && (r = e.length);
|
|
1812
|
+
for (var t = 0, n = new Array(r); t < r; t++) n[t] = e[t];
|
|
1813
|
+
return n;
|
|
1814
|
+
}
|
|
1815
|
+
var Ke = null;
|
|
1816
|
+
function On(e, r, t) {
|
|
1817
|
+
var n = t.sharedStrings, o = t.styles, u = t.epoch1904, s = t.dateFormatDetectionCache, a = t.options, c = [
|
|
1818
|
+
n,
|
|
1819
|
+
o,
|
|
1820
|
+
u,
|
|
1821
|
+
s,
|
|
1822
|
+
a.dateFormat,
|
|
1823
|
+
// defaultDateFormat
|
|
1824
|
+
a.smartDateParser !== !1,
|
|
1825
|
+
// dateTemplateParser
|
|
1826
|
+
a.parseNumber
|
|
1827
|
+
// parseNumberCustom
|
|
1828
|
+
], f = [], d = [], y = p();
|
|
1829
|
+
return r(e, y, I, N, R, v).then(function() {
|
|
1830
|
+
var l = y.sheetData, i = l.rowCount, w = l.columnCount, b = l.dataRowCount, W = l.dataColumnCount;
|
|
1831
|
+
if (b < i && (f = f.slice(0, b)), W < w)
|
|
1832
|
+
for (var M = 0; M < f.length; )
|
|
1833
|
+
f[M].length > W && (f[M] = f[M].slice(0, W)), M++;
|
|
1834
|
+
for (var D = Sn(f), k; !(k = D()).done; )
|
|
1835
|
+
for (var ee = k.value; ee.length < W; )
|
|
1836
|
+
ee.push(Ke);
|
|
1837
|
+
return f;
|
|
1838
|
+
});
|
|
1839
|
+
function p() {
|
|
1840
|
+
return {
|
|
1841
|
+
dimension: void 0,
|
|
1842
|
+
sheetData: void 0
|
|
1843
|
+
};
|
|
1844
|
+
}
|
|
1845
|
+
function h(l) {
|
|
1846
|
+
return l.sheetData.rows;
|
|
1847
|
+
}
|
|
1848
|
+
function T(l, i) {
|
|
1849
|
+
l.sheetData.rowIndexShift += l.sheetData.rows.length - i.length, l.sheetData.rows = i;
|
|
1850
|
+
}
|
|
1851
|
+
function j(l) {
|
|
1852
|
+
return l.sheetData.errors;
|
|
1853
|
+
}
|
|
1854
|
+
function U(l, i) {
|
|
1855
|
+
l.sheetData.errors = i;
|
|
1856
|
+
}
|
|
1857
|
+
function P(l) {
|
|
1858
|
+
var i = l.row, w = l.column, b = l.error;
|
|
1859
|
+
throw new _e("<c/> at row ".concat(i, ", col ").concat(w, ": ").concat(b));
|
|
1860
|
+
}
|
|
1861
|
+
function v(l) {
|
|
1862
|
+
if (y.sheetData) {
|
|
1863
|
+
var i = h(y), w = j(y);
|
|
1864
|
+
if (l)
|
|
1865
|
+
f = f.concat(i), d = d.concat(w), d.length > 0 && P(d[0]);
|
|
1866
|
+
else if (i.length > 1) {
|
|
1867
|
+
var b = i.slice(0, -1);
|
|
1868
|
+
f = f.concat(b), d = d.concat(w), T(y, i.slice(-1)), U(y, []);
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
function I(l, i, w) {
|
|
1873
|
+
l === "dimension" ? w.dimension = Q(i.ref) : l === "sheetData" ? w.sheetData = G() : w.sheetData && te(l, i, w.sheetData);
|
|
1874
|
+
}
|
|
1875
|
+
function N(l, i) {
|
|
1876
|
+
i.sheetData && fe(l, i.sheetData);
|
|
1877
|
+
}
|
|
1878
|
+
function R(l, i) {
|
|
1879
|
+
i.sheetData && de(l, i.sheetData);
|
|
1880
|
+
}
|
|
1881
|
+
function Q(l) {
|
|
1882
|
+
var i = l.split(":").map(_r);
|
|
1883
|
+
return i.length === 1 && (i = [i[0], i[0]]), i;
|
|
1884
|
+
}
|
|
1885
|
+
function G() {
|
|
1886
|
+
return {
|
|
1887
|
+
c: void 0,
|
|
1888
|
+
rows: [],
|
|
1889
|
+
row: void 0,
|
|
1890
|
+
rowNumber: void 0,
|
|
1891
|
+
// How many rows have been removed from the start of `state.rows`
|
|
1892
|
+
// as part of `onProgress()` handler calls.
|
|
1893
|
+
rowIndexShift: 0,
|
|
1894
|
+
// Current position in the sheet.
|
|
1895
|
+
cursor: [0, 0],
|
|
1896
|
+
// Total row count.
|
|
1897
|
+
rowCount: 0,
|
|
1898
|
+
// Total column count.
|
|
1899
|
+
columnCount: 0,
|
|
1900
|
+
// Non-empty row count.
|
|
1901
|
+
dataRowCount: 0,
|
|
1902
|
+
// Non-empty column count.
|
|
1903
|
+
dataColumnCount: 0,
|
|
1904
|
+
// Cell with errors.
|
|
1905
|
+
errors: []
|
|
1906
|
+
};
|
|
1907
|
+
}
|
|
1908
|
+
function te(l, i, w) {
|
|
1909
|
+
l === "row" ? (i.r && (w.rowNumber = Number(i.r)), w.row = []) : l === "c" ? (w.c = g(), w.c.attributes = i) : w.c && Y(l, i, w.c);
|
|
1910
|
+
}
|
|
1911
|
+
function fe(l, i) {
|
|
1912
|
+
if (l === "row") {
|
|
1913
|
+
if (i.rowNumber) {
|
|
1914
|
+
var w = i.rowIndexShift + i.rows.length;
|
|
1915
|
+
if (i.rowNumber <= w)
|
|
1916
|
+
throw new _e("Out-of-place <row/> number ".concat(i.rowNumber, " follows <row/> number ").concat(w));
|
|
1917
|
+
for (; i.rowNumber > i.rowIndexShift + i.rows.length + 1; )
|
|
1918
|
+
i.rows.push([]);
|
|
1919
|
+
}
|
|
1920
|
+
i.rows.push(i.row), i.row.length > 0 && (i.dataRowCount = i.rowNumber), i.rowNumber > i.rowCount && (i.rowCount = i.rowNumber), i.row = void 0, i.rowNumber = void 0;
|
|
1921
|
+
} else if (l === "c") {
|
|
1922
|
+
var b = ae(i.c);
|
|
1923
|
+
if (b.row < i.cursor[0] || b.row === i.cursor[0] && b.column <= i.cursor[1])
|
|
1924
|
+
throw new _e("Out-of-place <c/> at row ".concat(b.row, " col ").concat(b.column, " follows <c/> at row ").concat(i.cursor[0], " col ").concat(i.cursor[1]));
|
|
1925
|
+
if (i.cursor[0] = b.row, i.cursor[1] = b.column, i.rowNumber || (i.rowNumber = b.row), b.error)
|
|
1926
|
+
P(b), i.errors.push(b);
|
|
1927
|
+
else if (b.value !== Ke) {
|
|
1928
|
+
for (; b.column > i.row.length + 1; )
|
|
1929
|
+
i.row.push(Ke);
|
|
1930
|
+
i.row.push(b.value), b.column > i.dataColumnCount && (i.dataColumnCount = b.column);
|
|
1931
|
+
}
|
|
1932
|
+
b.column > i.columnCount && (i.columnCount = b.column), i.c = void 0;
|
|
1933
|
+
} else i.c && K(l, i.c);
|
|
1934
|
+
}
|
|
1935
|
+
function de(l, i) {
|
|
1936
|
+
i.c && z(l, i.c);
|
|
1937
|
+
}
|
|
1938
|
+
function ae(l) {
|
|
1939
|
+
var i = l.attributes, w = l.inlineString, b = l.vText, W = _r(i.r), M = vn(W, 2), D = M[0], k = M[1], ee = oe(i.t, i.s, b, w, c, a.trim !== !1);
|
|
1940
|
+
return typeof ee == "string" ? {
|
|
1941
|
+
row: D,
|
|
1942
|
+
column: k,
|
|
1943
|
+
error: ee
|
|
1944
|
+
// // Report the "raw" unparsed value of the cell for potential debugging.
|
|
1945
|
+
// // Also report the cell type and the format in case of a numeric value.
|
|
1946
|
+
// //
|
|
1947
|
+
// // For "inline string" cells, the value should actually be the `inlineString` argument
|
|
1948
|
+
// // rather than `vText` argument, but the only case when it could throw an error
|
|
1949
|
+
// // when parsing an "inline string" cell is `VALUE_MISSING` which means that
|
|
1950
|
+
// // `inlineString` argument is `undefined`, same as `vText` argument in this case,
|
|
1951
|
+
// // so the resulting `value` property is correct anyway.
|
|
1952
|
+
// //
|
|
1953
|
+
// value: vText,
|
|
1954
|
+
// type: attributes.t,
|
|
1955
|
+
// formatId: attributes.s
|
|
1956
|
+
} : {
|
|
1957
|
+
row: D,
|
|
1958
|
+
column: k,
|
|
1959
|
+
value: ce(ee[1], ee[0])
|
|
1960
|
+
};
|
|
1961
|
+
}
|
|
1962
|
+
function oe(l, i, w, b, W, M) {
|
|
1963
|
+
var D = V(l, i, w, b, W);
|
|
1964
|
+
return Array.isArray(D) && D[0] === "s" && (M && (D[1] = D[1].trim()), D[1] === "") ? be : D;
|
|
1965
|
+
}
|
|
1966
|
+
function V(l, i, w, b, W) {
|
|
1967
|
+
var M = bn(l, i, w, b, W);
|
|
1968
|
+
if (M === "VALUE_MISSING")
|
|
1969
|
+
switch (l || "n") {
|
|
1970
|
+
// * If the cell is defined by a formula.
|
|
1971
|
+
// * Or contains an inline string.
|
|
1972
|
+
// * Or contains a shared string.
|
|
1973
|
+
// * Or contains a boolean value.
|
|
1974
|
+
case "str":
|
|
1975
|
+
case "inlineStr":
|
|
1976
|
+
case "s":
|
|
1977
|
+
case "b":
|
|
1978
|
+
return be;
|
|
1979
|
+
}
|
|
1980
|
+
return l === "e" ? be : M;
|
|
1981
|
+
}
|
|
1982
|
+
function ce(l, i) {
|
|
1983
|
+
return i === "n" ? a.parseNumber ? a.parseNumber(l) : l : i === "d" ? new Date(l) : l;
|
|
1984
|
+
}
|
|
1985
|
+
function g() {
|
|
1986
|
+
return {
|
|
1987
|
+
v: !1,
|
|
1988
|
+
is: !1,
|
|
1989
|
+
t: !1,
|
|
1990
|
+
r: !1,
|
|
1991
|
+
rPh: !1,
|
|
1992
|
+
vText: void 0,
|
|
1993
|
+
inlineString: void 0,
|
|
1994
|
+
attributes: void 0
|
|
1995
|
+
};
|
|
1996
|
+
}
|
|
1997
|
+
function Y(l, i, w) {
|
|
1998
|
+
l === "v" ? w.v = !0 : l === "is" ? (w.is = !0, w.inlineString = "") : l === "t" ? w.t = !0 : l === "r" ? w.r = !0 : l === "rPh" && (w.rPh = !0);
|
|
1999
|
+
}
|
|
2000
|
+
function K(l, i) {
|
|
2001
|
+
l === "v" ? (i.v = !1, i.vText || (i.vText = "")) : l === "is" ? i.is = !1 : l === "t" ? i.t = !1 : l === "r" ? i.r = !1 : l === "rPh" && (i.rPh = !1);
|
|
2002
|
+
}
|
|
2003
|
+
function z(l, i) {
|
|
2004
|
+
i.v ? i.vText = l : i.is && (i.rPh || i.t && (i.r ? i.inlineString += l : i.inlineString = l));
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
function En(e) {
|
|
2008
|
+
me("convert files to strings");
|
|
2009
|
+
for (var r = {}, t = 0, n = Object.keys(e); t < n.length; t++) {
|
|
2010
|
+
var o = n[t];
|
|
2011
|
+
r[o] = An(e[o]);
|
|
2012
|
+
}
|
|
2013
|
+
return r;
|
|
2014
|
+
}
|
|
2015
|
+
function An(e) {
|
|
2016
|
+
return typeof TextDecoder < "u" ? new TextDecoder().decode(e) : Vr(e);
|
|
2017
|
+
}
|
|
2018
|
+
function ir(e) {
|
|
2019
|
+
"@babel/helpers - typeof";
|
|
2020
|
+
return ir = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
|
|
2021
|
+
return typeof r;
|
|
2022
|
+
} : function(r) {
|
|
2023
|
+
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
2024
|
+
}, ir(e);
|
|
2025
|
+
}
|
|
2026
|
+
function Tn(e) {
|
|
2027
|
+
return ir(e) === "object" && typeof e.then == "function";
|
|
2028
|
+
}
|
|
2029
|
+
function ur(e) {
|
|
2030
|
+
"@babel/helpers - typeof";
|
|
2031
|
+
return ur = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
|
|
2032
|
+
return typeof r;
|
|
2033
|
+
} : function(r) {
|
|
2034
|
+
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
2035
|
+
}, ur(e);
|
|
2036
|
+
}
|
|
2037
|
+
function In(e, r, t) {
|
|
2038
|
+
return Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
2039
|
+
}
|
|
2040
|
+
function Pn(e, r) {
|
|
2041
|
+
if (!(e instanceof r))
|
|
2042
|
+
throw new TypeError("Cannot call a class as a function");
|
|
2043
|
+
}
|
|
2044
|
+
function Nn(e, r) {
|
|
2045
|
+
if (typeof r != "function" && r !== null)
|
|
2046
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
2047
|
+
e.prototype = Object.create(r && r.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), r && Ne(e, r);
|
|
2048
|
+
}
|
|
2049
|
+
function Rn(e) {
|
|
2050
|
+
var r = Cr();
|
|
2051
|
+
return function() {
|
|
2052
|
+
var n = Re(e), o;
|
|
2053
|
+
if (r) {
|
|
2054
|
+
var u = Re(this).constructor;
|
|
2055
|
+
o = Reflect.construct(n, arguments, u);
|
|
2056
|
+
} else
|
|
2057
|
+
o = n.apply(this, arguments);
|
|
2058
|
+
return Dn(this, o);
|
|
2059
|
+
};
|
|
2060
|
+
}
|
|
2061
|
+
function Dn(e, r) {
|
|
2062
|
+
if (r && (ur(r) === "object" || typeof r == "function"))
|
|
2063
|
+
return r;
|
|
2064
|
+
if (r !== void 0)
|
|
2065
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
2066
|
+
return Fn(e);
|
|
2067
|
+
}
|
|
2068
|
+
function Fn(e) {
|
|
2069
|
+
if (e === void 0)
|
|
2070
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2071
|
+
return e;
|
|
2072
|
+
}
|
|
2073
|
+
function fr(e) {
|
|
2074
|
+
var r = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
2075
|
+
return fr = function(n) {
|
|
2076
|
+
if (n === null || !jn(n)) return n;
|
|
2077
|
+
if (typeof n != "function")
|
|
2078
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
2079
|
+
if (typeof r < "u") {
|
|
2080
|
+
if (r.has(n)) return r.get(n);
|
|
2081
|
+
r.set(n, o);
|
|
2082
|
+
}
|
|
2083
|
+
function o() {
|
|
2084
|
+
return $e(n, arguments, Re(this).constructor);
|
|
2085
|
+
}
|
|
2086
|
+
return o.prototype = Object.create(n.prototype, { constructor: { value: o, enumerable: !1, writable: !0, configurable: !0 } }), Ne(o, n);
|
|
2087
|
+
}, fr(e);
|
|
2088
|
+
}
|
|
2089
|
+
function $e(e, r, t) {
|
|
2090
|
+
return Cr() ? $e = Reflect.construct.bind() : $e = function(o, u, s) {
|
|
2091
|
+
var a = [null];
|
|
2092
|
+
a.push.apply(a, u);
|
|
2093
|
+
var c = Function.bind.apply(o, a), f = new c();
|
|
2094
|
+
return s && Ne(f, s.prototype), f;
|
|
2095
|
+
}, $e.apply(null, arguments);
|
|
2096
|
+
}
|
|
2097
|
+
function Cr() {
|
|
2098
|
+
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
2099
|
+
if (typeof Proxy == "function") return !0;
|
|
2100
|
+
try {
|
|
2101
|
+
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
2102
|
+
})), !0;
|
|
2103
|
+
} catch {
|
|
2104
|
+
return !1;
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
function jn(e) {
|
|
2108
|
+
return Function.toString.call(e).indexOf("[native code]") !== -1;
|
|
2109
|
+
}
|
|
2110
|
+
function Ne(e, r) {
|
|
2111
|
+
return Ne = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
|
|
2112
|
+
return n.__proto__ = o, n;
|
|
2113
|
+
}, Ne(e, r);
|
|
2114
|
+
}
|
|
2115
|
+
function Re(e) {
|
|
2116
|
+
return Re = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
2117
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2118
|
+
}, Re(e);
|
|
2119
|
+
}
|
|
2120
|
+
var xn = /* @__PURE__ */ (function(e) {
|
|
2121
|
+
Nn(t, e);
|
|
2122
|
+
var r = Rn(t);
|
|
2123
|
+
function t(n, o) {
|
|
2124
|
+
var u;
|
|
2125
|
+
return Pn(this, t), u = r.call(this, "Sheet not found: ".concat(typeof n == "number" ? n + ". Sheet count: " + o.length : n + ". Available sheets: " + o.join(", "))), u.name = "SheetNotFoundError", u.sheet = n, u.sheets = o, u;
|
|
2126
|
+
}
|
|
2127
|
+
return In(t);
|
|
2128
|
+
})(/* @__PURE__ */ fr(Error));
|
|
2129
|
+
function De(e) {
|
|
2130
|
+
"@babel/helpers - typeof";
|
|
2131
|
+
return De = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
|
|
2132
|
+
return typeof r;
|
|
2133
|
+
} : function(r) {
|
|
2134
|
+
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
2135
|
+
}, De(e);
|
|
2136
|
+
}
|
|
2137
|
+
function kr(e, r) {
|
|
2138
|
+
var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
2139
|
+
if (t) return (t = t.call(e)).next.bind(t);
|
|
2140
|
+
if (Array.isArray(e) || (t = Cn(e)) || r) {
|
|
2141
|
+
t && (e = t);
|
|
2142
|
+
var n = 0;
|
|
2143
|
+
return function() {
|
|
2144
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
2145
|
+
};
|
|
2146
|
+
}
|
|
2147
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2148
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2149
|
+
}
|
|
2150
|
+
function Cn(e, r) {
|
|
2151
|
+
if (e) {
|
|
2152
|
+
if (typeof e == "string") return Er(e, r);
|
|
2153
|
+
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
2154
|
+
if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set") return Array.from(e);
|
|
2155
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Er(e, r);
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
function Er(e, r) {
|
|
2159
|
+
(r == null || r > e.length) && (r = e.length);
|
|
2160
|
+
for (var t = 0, n = new Array(r); t < r; t++) n[t] = e[t];
|
|
2161
|
+
return n;
|
|
2162
|
+
}
|
|
2163
|
+
function Ar(e, r) {
|
|
2164
|
+
var t = Object.keys(e);
|
|
2165
|
+
if (Object.getOwnPropertySymbols) {
|
|
2166
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
2167
|
+
r && (n = n.filter(function(o) {
|
|
2168
|
+
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
|
2169
|
+
})), t.push.apply(t, n);
|
|
2170
|
+
}
|
|
2171
|
+
return t;
|
|
2172
|
+
}
|
|
2173
|
+
function Me(e) {
|
|
2174
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
2175
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
|
2176
|
+
r % 2 ? Ar(Object(t), !0).forEach(function(n) {
|
|
2177
|
+
Be(e, n, t[n]);
|
|
2178
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Ar(Object(t)).forEach(function(n) {
|
|
2179
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
|
2180
|
+
});
|
|
2181
|
+
}
|
|
2182
|
+
return e;
|
|
2183
|
+
}
|
|
2184
|
+
function Be(e, r, t) {
|
|
2185
|
+
return r = kn(r), r in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;
|
|
2186
|
+
}
|
|
2187
|
+
function kn(e) {
|
|
2188
|
+
var r = Ln(e, "string");
|
|
2189
|
+
return De(r) === "symbol" ? r : String(r);
|
|
2190
|
+
}
|
|
2191
|
+
function Ln(e, r) {
|
|
2192
|
+
if (De(e) !== "object" || e === null) return e;
|
|
2193
|
+
var t = e[Symbol.toPrimitive];
|
|
2194
|
+
if (t !== void 0) {
|
|
2195
|
+
var n = t.call(e, r);
|
|
2196
|
+
if (De(n) !== "object") return n;
|
|
2197
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2198
|
+
}
|
|
2199
|
+
return (r === "string" ? String : Number)(e);
|
|
2200
|
+
}
|
|
2201
|
+
function $n(e, r) {
|
|
2202
|
+
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = En(r);
|
|
2203
|
+
return me("parse spreadsheet info and file paths"), Ze(Vn(), n, e).then(function(o) {
|
|
2204
|
+
var u = o.spreadsheetInfo, s = o.filePaths;
|
|
2205
|
+
return me('parse "shared strings" and "styles"'), Ze(Wn(s), n, e).then(function(a) {
|
|
2206
|
+
var c = a.sharedStrings, f = a.styles, d = t.sheets ? t.sheets.map(function(p) {
|
|
2207
|
+
return Mn(p, u.sheets);
|
|
2208
|
+
}) : u.sheets.map(function(p) {
|
|
2209
|
+
return p.relationId;
|
|
2210
|
+
});
|
|
2211
|
+
me("parse sheet".concat(d.length === 1 ? "" : "s", " data"));
|
|
2212
|
+
var y = [];
|
|
2213
|
+
return Ze(Xn(s, d, {
|
|
2214
|
+
sharedStrings: c,
|
|
2215
|
+
styles: f,
|
|
2216
|
+
epoch1904: u.epoch1904,
|
|
2217
|
+
dateFormatDetectionCache: y,
|
|
2218
|
+
options: t
|
|
2219
|
+
}), n, e).then(function(p) {
|
|
2220
|
+
return me("end"), d.map(function(h) {
|
|
2221
|
+
return {
|
|
2222
|
+
sheet: Bn(h, u.sheets),
|
|
2223
|
+
data: p[h]
|
|
2224
|
+
};
|
|
2225
|
+
});
|
|
2226
|
+
});
|
|
2227
|
+
});
|
|
2228
|
+
});
|
|
2229
|
+
}
|
|
2230
|
+
function Un(e, r, t, n) {
|
|
2231
|
+
return n && n.parseNumber || (n = Me(Me({}, n), {}, {
|
|
2232
|
+
parseNumber: null
|
|
2233
|
+
})), $n(r, t, n);
|
|
2234
|
+
}
|
|
2235
|
+
function Mn(e, r) {
|
|
2236
|
+
if (typeof e == "string")
|
|
2237
|
+
for (var t = kr(r), n; !(n = t()).done; ) {
|
|
2238
|
+
var o = n.value;
|
|
2239
|
+
if (o.name === e)
|
|
2240
|
+
return o.relationId;
|
|
2241
|
+
}
|
|
2242
|
+
else if (e <= r.length)
|
|
2243
|
+
return r[e - 1].relationId;
|
|
2244
|
+
throw new xn(e, r.map(function(u) {
|
|
2245
|
+
return u.name;
|
|
2246
|
+
}));
|
|
2247
|
+
}
|
|
2248
|
+
function Bn(e, r) {
|
|
2249
|
+
for (var t = kr(r), n; !(n = t()).done; ) {
|
|
2250
|
+
var o = n.value;
|
|
2251
|
+
if (o.relationId === e)
|
|
2252
|
+
return o.name;
|
|
2253
|
+
}
|
|
2254
|
+
throw new Error("Sheet relation ID not found: ".concat(e));
|
|
2255
|
+
}
|
|
2256
|
+
function Vn() {
|
|
2257
|
+
return {
|
|
2258
|
+
// Read the paths to certain files inside the `.xlsx` file, which is itself just a `.zip` archive.
|
|
2259
|
+
// These paths aren't standardized between different spreadsheet editors.
|
|
2260
|
+
// https://github.com/tidyverse/readxl/issues/104
|
|
2261
|
+
"xl/_rels/workbook.xml.rels": {
|
|
2262
|
+
name: "filePaths",
|
|
2263
|
+
parse: Ht
|
|
2264
|
+
},
|
|
2265
|
+
// General info on the spreadsheet.
|
|
2266
|
+
"xl/workbook.xml": {
|
|
2267
|
+
name: "spreadsheetInfo",
|
|
2268
|
+
parse: Xt
|
|
2269
|
+
}
|
|
2270
|
+
};
|
|
2271
|
+
}
|
|
2272
|
+
function Wn(e) {
|
|
2273
|
+
var r;
|
|
2274
|
+
return r = {}, Be(r, e.sharedStrings || "xl/sharedStrings.xml", {
|
|
2275
|
+
name: "sharedStrings",
|
|
2276
|
+
// `parseSharedStrings()` returns a `Promise`.
|
|
2277
|
+
parse: Qt,
|
|
2278
|
+
// It seems that "sharedStrings.xml" is not required to exist.
|
|
2279
|
+
// For example, that could be the case when a spreadsheet doesn't contain any strings.
|
|
2280
|
+
// https://github.com/catamphetamine/read-excel-file/issues/85
|
|
2281
|
+
fallback: Promise.resolve([])
|
|
2282
|
+
}), Be(r, e.styles || "xl/styles.xml", {
|
|
2283
|
+
name: "styles",
|
|
2284
|
+
parse: Jt,
|
|
2285
|
+
fallback: {}
|
|
2286
|
+
}), r;
|
|
2287
|
+
}
|
|
2288
|
+
function Xn(e, r, t) {
|
|
2289
|
+
return Object.keys(e.sheets).filter(function(n) {
|
|
2290
|
+
return r.includes(n);
|
|
2291
|
+
}).reduce(function(n, o) {
|
|
2292
|
+
return Me(Me({}, n), {}, Be({}, e.sheets[o], {
|
|
2293
|
+
name: o,
|
|
2294
|
+
// `parseSheet()` returns a `Promise`.
|
|
2295
|
+
parse: function(s, a) {
|
|
2296
|
+
return On(s, a, t);
|
|
2297
|
+
}
|
|
2298
|
+
}));
|
|
2299
|
+
}, {});
|
|
2300
|
+
}
|
|
2301
|
+
function Ze(e, r, t) {
|
|
2302
|
+
for (var n = {}, o = function() {
|
|
2303
|
+
var p = s[u], h = e[p];
|
|
2304
|
+
n[h.name] = r[p] === void 0 ? h.fallback === void 0 ? (function() {
|
|
2305
|
+
throw new _e('"'.concat(p, '" file not found inside the `.xlsx` file'));
|
|
2306
|
+
})() : h.fallback : h.parse(r[p], t);
|
|
2307
|
+
}, u = 0, s = Object.keys(e); u < s.length; u++)
|
|
2308
|
+
o();
|
|
2309
|
+
for (var a = [], c = function() {
|
|
2310
|
+
var p = d[f];
|
|
2311
|
+
Tn(n[p]) && a.push(n[p].then(function(h) {
|
|
2312
|
+
n[p] = h;
|
|
2313
|
+
}));
|
|
2314
|
+
}, f = 0, d = Object.keys(n); f < d.length; f++)
|
|
2315
|
+
c();
|
|
2316
|
+
return a.length > 0 ? Promise.all(a).then(function() {
|
|
2317
|
+
return n;
|
|
2318
|
+
}) : n;
|
|
2319
|
+
}
|
|
2320
|
+
function Hn(e, r) {
|
|
2321
|
+
return Wt(e).then(function(t) {
|
|
2322
|
+
return Un(tt, pt, t, r);
|
|
2323
|
+
});
|
|
2324
|
+
}
|
|
2325
|
+
const Yn = [80, 75, 3, 4], Gn = [208, 207, 17, 224], Tr = (e, r) => r.every((t, n) => e[n] === t), zn = (e) => {
|
|
2326
|
+
try {
|
|
2327
|
+
return new TextDecoder("utf-8", { fatal: !0 }).decode(e);
|
|
2328
|
+
} catch {
|
|
2329
|
+
return new TextDecoder("windows-1252").decode(e);
|
|
2330
|
+
}
|
|
2331
|
+
}, qn = (e) => {
|
|
2332
|
+
if (e == null)
|
|
2333
|
+
return "";
|
|
2334
|
+
if (e instanceof Date) {
|
|
2335
|
+
const r = e.toISOString();
|
|
2336
|
+
return r.endsWith("T00:00:00.000Z") ? r.slice(0, 10) : r.slice(0, 16).replace("T", " ");
|
|
2337
|
+
}
|
|
2338
|
+
return String(e);
|
|
2339
|
+
}, Lr = (e, r, { maxRows: t, maxCols: n }) => ({
|
|
2340
|
+
name: e,
|
|
2341
|
+
rows: r.slice(0, t).map((o) => o.slice(0, n).map(qn)),
|
|
2342
|
+
truncatedRows: r.length > t
|
|
2343
|
+
}), Kn = async (e, r) => (await Hn(e)).map(({ sheet: n, data: o }) => Lr(n, o, r)), Zn = (e, r) => {
|
|
2344
|
+
const { data: t } = Mr.parse(zn(e), {
|
|
2345
|
+
skipEmptyLines: !0,
|
|
2346
|
+
preview: r.maxRows + 1
|
|
2347
|
+
});
|
|
2348
|
+
return [Lr("Sheet1", t, r)];
|
|
2349
|
+
}, Jn = async (e, r) => {
|
|
2350
|
+
const t = new Uint8Array(e);
|
|
2351
|
+
if (Tr(t, Gn))
|
|
2352
|
+
throw new Error("Legacy .xls spreadsheets can't be previewed");
|
|
2353
|
+
return Tr(t, Yn) ? Kn(e, r) : Zn(t, r);
|
|
2354
|
+
}, Qn = (e) => {
|
|
2355
|
+
let r = "";
|
|
2356
|
+
for (let t = e + 1; t > 0; t = Math.floor((t - 1) / 26))
|
|
2357
|
+
r = String.fromCharCode(65 + (t - 1) % 26) + r;
|
|
2358
|
+
return r;
|
|
2359
|
+
}, to = (e) => {
|
|
2360
|
+
const r = e.reduce((t, n) => Math.max(t, n.length), 0);
|
|
2361
|
+
return Array.from({ length: r }, (t, n) => Qn(n));
|
|
2362
|
+
}, no = async (e, {
|
|
2363
|
+
maxRows: r,
|
|
2364
|
+
maxCols: t,
|
|
2365
|
+
withCredentials: n = !0
|
|
2366
|
+
}) => {
|
|
2367
|
+
const o = await fetch(e, {
|
|
2368
|
+
credentials: n ? "include" : "same-origin"
|
|
2369
|
+
});
|
|
2370
|
+
if (!o.ok)
|
|
2371
|
+
throw new Error(`Failed to fetch sheet: ${o.status}`);
|
|
2372
|
+
return Jn(await o.arrayBuffer(), { maxRows: r, maxCols: t });
|
|
2373
|
+
};
|
|
2374
|
+
export {
|
|
2375
|
+
to as c,
|
|
2376
|
+
no as f
|
|
2377
|
+
};
|