chrono-phylo-tree 1.1.10 → 1.1.11
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/App.d.ts +2 -0
- package/dist/chrono-phylo-tree.es.js +745 -1174
- package/dist/chrono-phylo-tree.umd.js +9 -39
- package/dist/classes/Species.d.ts +34 -0
- package/dist/components/HoverDescription.d.ts +14 -0
- package/dist/components/LanguageSelector.d.ts +8 -0
- package/dist/components/Menu.d.ts +14 -0
- package/dist/components/NavBar.d.ts +32 -0
- package/dist/components/PhTree.d.ts +30 -0
- package/dist/index.d.ts +5 -0
- package/dist/main.d.ts +0 -0
- package/dist/utils/between.d.ts +1 -0
- package/dist/utils/example.d.ts +2 -0
- package/dist/utils/hexToRGBA.d.ts +1 -0
- package/dist/utils/scientificNotation.d.ts +1 -0
- package/dist/utils/setFromJson.d.ts +2 -0
- package/dist/utils/translate.d.ts +3 -0
- package/dist/utils/updateSpecies.d.ts +6 -0
- package/package.json +4 -3
@@ -1,128 +1,140 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
var Mt = Object.defineProperty;
|
2
|
+
var Lt = (r, n, s) => n in r ? Mt(r, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[n] = s;
|
3
|
+
var ft = (r, n, s) => Lt(r, typeof n != "symbol" ? n + "" : n, s);
|
4
|
+
import { jsxs as X, Fragment as wt, jsx as g } from "react/jsx-runtime";
|
5
|
+
import { useState as P, useEffect as Et } from "react";
|
6
|
+
const Tt = (r, ...n) => r.sort(
|
7
|
+
(s, a) => {
|
8
|
+
for (const u of n) {
|
9
|
+
const [c, l] = [s, a].map((m) => u(m));
|
10
|
+
if (c !== l) return c - l;
|
7
11
|
}
|
8
12
|
return 0;
|
9
13
|
}
|
10
14
|
);
|
11
|
-
class
|
12
|
-
constructor(
|
13
|
-
|
15
|
+
class gt {
|
16
|
+
constructor(n = "", s = 0, a = 0, u = void 0, c = [], l = void 0, m = void 0) {
|
17
|
+
ft(this, "name", "");
|
18
|
+
ft(this, "apparition", 0);
|
19
|
+
ft(this, "duration", 0);
|
20
|
+
ft(this, "ancestor");
|
21
|
+
ft(this, "descendants", []);
|
22
|
+
ft(this, "description");
|
23
|
+
ft(this, "display", !0);
|
24
|
+
ft(this, "image");
|
25
|
+
if (a <= 0)
|
14
26
|
throw new Error("The duration of the species must be greater than 0");
|
15
|
-
this.name =
|
27
|
+
this.name = n, this.apparition = s, this.duration = a, this.ancestor = u, this.descendants = c, this.description = l === "" ? void 0 : l, this.image = m === "" ? void 0 : m;
|
16
28
|
}
|
17
|
-
onPosition(
|
18
|
-
return
|
29
|
+
onPosition(n = !0) {
|
30
|
+
return n && this.firstAncestor().stepsUntil(this) % 2 === 0;
|
19
31
|
}
|
20
32
|
copy() {
|
21
|
-
const
|
22
|
-
return
|
33
|
+
const n = this.firstAncestor(), s = n.allDescendants(!1).indexOf(this);
|
34
|
+
return gt.fromJSON(n.toJSON()).allDescendants(!1)[s];
|
23
35
|
}
|
24
36
|
unlinkAncestor() {
|
25
37
|
if (!this.ancestor)
|
26
38
|
return;
|
27
|
-
this.ancestor.descendants = this.ancestor.descendants.filter((
|
28
|
-
const
|
29
|
-
return this.ancestor = void 0, [
|
39
|
+
this.ancestor.descendants = this.ancestor.descendants.filter((s) => s !== this);
|
40
|
+
const n = this.ancestor;
|
41
|
+
return this.ancestor = void 0, [n.firstAncestor(), this];
|
30
42
|
}
|
31
|
-
unlinkDescendant(
|
32
|
-
if (this.descendants.includes(
|
33
|
-
return this.descendants = this.descendants.filter((
|
43
|
+
unlinkDescendant(n) {
|
44
|
+
if (this.descendants.includes(n))
|
45
|
+
return this.descendants = this.descendants.filter((s) => s !== n), n.ancestor = void 0, [this.firstAncestor(), n];
|
34
46
|
}
|
35
|
-
linkAncestor(
|
36
|
-
if (!(this.ancestor ===
|
37
|
-
if (
|
38
|
-
throw new Error(`The ancestor's apparition (${
|
39
|
-
if (
|
40
|
-
throw new Error(`The ancestor's extinction (${
|
41
|
-
this.ancestor !==
|
47
|
+
linkAncestor(n) {
|
48
|
+
if (!(this.ancestor === n && n.descendants.includes(this))) {
|
49
|
+
if (n.apparition > this.apparition)
|
50
|
+
throw new Error(`The ancestor's apparition (${n.apparition}) must be before or equal the descendant's apparition (${this.apparition})`);
|
51
|
+
if (n.extinction() < this.apparition)
|
52
|
+
throw new Error(`The ancestor's extinction (${n.extinction()}) must be after or equal the descendant's apparition (${this.apparition})`);
|
53
|
+
this.ancestor !== n && this.unlinkAncestor(), this.ancestor = n, n.descendants.push(this);
|
42
54
|
}
|
43
55
|
}
|
44
|
-
linkDescendant(
|
45
|
-
if (!(
|
46
|
-
if (
|
47
|
-
throw new Error(`The descendant's apparition (${
|
48
|
-
if (
|
49
|
-
throw new Error(`The descendant's extinction (${
|
50
|
-
this.descendants.includes(
|
56
|
+
linkDescendant(n) {
|
57
|
+
if (!(n.ancestor === this && this.descendants.includes(n))) {
|
58
|
+
if (n.apparition < this.apparition)
|
59
|
+
throw new Error(`The descendant's apparition (${n.apparition}) must be after or equal the ancestor's apparition (${this.apparition})`);
|
60
|
+
if (n.extinction() > this.extinction())
|
61
|
+
throw new Error(`The descendant's extinction (${n.extinction()}) must be before or equal the ancestor's extinction (${this.extinction()})`);
|
62
|
+
this.descendants.includes(n) || (n.ancestor && n.unlinkAncestor(), this.descendants.push(n), n.ancestor = this);
|
51
63
|
}
|
52
64
|
}
|
53
|
-
linkDescendants(
|
54
|
-
for (const
|
65
|
+
linkDescendants(n) {
|
66
|
+
for (const s of n)
|
55
67
|
try {
|
56
|
-
this.linkDescendant(
|
68
|
+
this.linkDescendant(s);
|
57
69
|
} catch (a) {
|
58
|
-
console.error(`Error linking descendant ${
|
70
|
+
console.error(`Error linking descendant ${s.name} to ancestor ${this.name}:`, a);
|
59
71
|
}
|
60
72
|
}
|
61
|
-
addDescendant(
|
62
|
-
if (
|
73
|
+
addDescendant(n = "", s = 0, a = 0, u = void 0, c = void 0, l = !1) {
|
74
|
+
if (s < 0 || s > this.duration)
|
63
75
|
throw new Error(`The apparition of the descendant must be between the apparition (${this.apparition}) and the extinction (${this.extinction()}) of the ancestor`);
|
64
|
-
const
|
65
|
-
|
66
|
-
|
76
|
+
const m = l ? this.copy() : this, v = new gt(
|
77
|
+
n,
|
78
|
+
m.apparition + Math.max(s, 0),
|
67
79
|
Math.max(a, 0),
|
68
80
|
void 0,
|
69
81
|
[],
|
70
|
-
|
71
|
-
|
82
|
+
u,
|
83
|
+
c
|
72
84
|
);
|
73
|
-
return
|
85
|
+
return v.linkAncestor(m), l ? m : v;
|
74
86
|
}
|
75
|
-
removeDescendant(
|
76
|
-
this.descendants = this.descendants.filter((
|
87
|
+
removeDescendant(n) {
|
88
|
+
this.descendants = this.descendants.filter((s) => s !== n);
|
77
89
|
}
|
78
|
-
addAncestor(
|
79
|
-
if (
|
90
|
+
addAncestor(n = "", s = 0, a = 0, u = void 0, c = void 0, l = !0, m = !1) {
|
91
|
+
if (s < 0)
|
80
92
|
throw new Error(`The apparition of the ancestor must be before or equal the apparition (${this.apparition}) of the descendant`);
|
81
|
-
if (a <
|
93
|
+
if (a < s)
|
82
94
|
throw new Error(`The extiction of the ancestor must be after or equal the apparition (${this.apparition}) of the descendant`);
|
83
|
-
const
|
84
|
-
|
85
|
-
|
95
|
+
const v = m ? this.copy() : this, o = new gt(
|
96
|
+
n,
|
97
|
+
v.apparition - Math.max(s, 0),
|
86
98
|
a,
|
87
99
|
void 0,
|
88
100
|
[],
|
89
|
-
|
90
|
-
|
101
|
+
u,
|
102
|
+
c
|
91
103
|
);
|
92
|
-
return o.display =
|
104
|
+
return o.display = l, v.linkAncestor(o), m ? v : o;
|
93
105
|
}
|
94
106
|
extinction() {
|
95
107
|
return this.apparition + this.duration;
|
96
108
|
}
|
97
109
|
absoluteExtinction() {
|
98
|
-
return this.descendants.length > 0 ? Math.max(...this.allDescendants(!1).map((
|
110
|
+
return this.descendants.length > 0 ? Math.max(...this.allDescendants(!1).map((n) => n.extinction())) : this.extinction();
|
99
111
|
}
|
100
112
|
absoluteDuration() {
|
101
113
|
return this.absoluteExtinction() - this.apparition;
|
102
114
|
}
|
103
|
-
firstAncestor(
|
104
|
-
return this.ancestor ? this.ancestor.display ||
|
115
|
+
firstAncestor(n = !1) {
|
116
|
+
return this.ancestor ? this.ancestor.display || n ? this.ancestor.firstAncestor() : this : this;
|
105
117
|
}
|
106
118
|
cousinsExtinction() {
|
107
119
|
return this.firstAncestor().absoluteExtinction();
|
108
120
|
}
|
109
|
-
allDescendants(
|
110
|
-
const
|
111
|
-
if (
|
121
|
+
allDescendants(n = !0) {
|
122
|
+
const s = n ? Tt(this.descendants, (o) => -o.apparition, (o) => -o.absoluteExtinction()) : this.descendants;
|
123
|
+
if (s.length === 0)
|
112
124
|
return [this];
|
113
|
-
const a =
|
114
|
-
return
|
125
|
+
const a = s.filter((o) => o.apparition >= this.extinction()), u = s.filter((o) => a.indexOf(o) === -1), l = (this.onPosition(n) ? Math.ceil : Math.floor)(a.length / 2), m = a.slice(0, l), v = a.slice(l);
|
126
|
+
return m.flatMap((o) => o.allDescendants(n)).concat([this]).concat(v.flatMap((o) => o.allDescendants(n))).concat(u.flatMap((o) => o.allDescendants(n)));
|
115
127
|
}
|
116
|
-
stepsChain(
|
128
|
+
stepsChain(n, s = !1) {
|
117
129
|
var a;
|
118
|
-
return this.allDescendants(!1).includes(
|
130
|
+
return this.allDescendants(!1).includes(n) ? [this].concat(((a = this.descendants.find((u) => u.allDescendants(!1).includes(n))) == null ? void 0 : a.stepsChain(n)) ?? []).filter((u) => u.display || s) : [];
|
119
131
|
}
|
120
|
-
stepsUntil(
|
121
|
-
if (this.allDescendants(!1).includes(
|
122
|
-
return this.stepsChain(
|
132
|
+
stepsUntil(n, s = !1) {
|
133
|
+
if (this.allDescendants(!1).includes(n))
|
134
|
+
return this.stepsChain(n, s).length - 1;
|
123
135
|
}
|
124
|
-
stepsUntilLastDescendant(
|
125
|
-
return this.descendants.length === 0 ? 0 : Math.max(...this.allDescendants(!1).filter((
|
136
|
+
stepsUntilLastDescendant(n = !1) {
|
137
|
+
return this.descendants.length === 0 ? 0 : Math.max(...this.allDescendants(!1).filter((s) => s.descendants.length === 0).map((s) => this.stepsUntil(s, n) ?? 0));
|
126
138
|
}
|
127
139
|
toJSON() {
|
128
140
|
return {
|
@@ -131,757 +143,316 @@ class yt {
|
|
131
143
|
afterApparition: this.ancestor ? this.apparition - this.ancestor.apparition : void 0,
|
132
144
|
description: this.description,
|
133
145
|
duration: this.duration,
|
134
|
-
descendants: this.descendants.length > 0 ? this.descendants.map((
|
146
|
+
descendants: this.descendants.length > 0 ? this.descendants.map((n) => n.toJSON()) : void 0,
|
135
147
|
image: this.image
|
136
148
|
};
|
137
149
|
}
|
138
|
-
async saveJSON(
|
150
|
+
async saveJSON(n = void 0) {
|
139
151
|
try {
|
140
|
-
const
|
141
|
-
|
142
|
-
} catch (
|
143
|
-
console.error("Error saving file:",
|
152
|
+
const s = JSON.stringify(this.toJSON(), null, 2), a = new Blob([s], { type: "application/json" }), u = URL.createObjectURL(a), c = document.createElement("a");
|
153
|
+
c.href = u, c.download = n ?? `${this.name}.json`, c.click(), URL.revokeObjectURL(u);
|
154
|
+
} catch (s) {
|
155
|
+
console.error("Error saving file:", s);
|
144
156
|
}
|
145
157
|
}
|
146
|
-
static fromJSON(
|
147
|
-
const a =
|
148
|
-
if (
|
149
|
-
for (const
|
150
|
-
|
151
|
-
return
|
158
|
+
static fromJSON(n, s) {
|
159
|
+
const a = n.afterApparition ?? 0, u = s ? s.apparition : n.apparition ?? 0, c = new gt(n.name ?? "", u + a, n.duration ?? 0, s, [], n.description, n.image);
|
160
|
+
if (n.descendants)
|
161
|
+
for (const l of n.descendants)
|
162
|
+
c.descendants.push(gt.fromJSON(l, c));
|
163
|
+
return c;
|
152
164
|
}
|
153
165
|
}
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
/**
|
159
|
-
* @license React
|
160
|
-
* react-jsx-runtime.production.js
|
161
|
-
*
|
162
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
163
|
-
*
|
164
|
-
* This source code is licensed under the MIT license found in the
|
165
|
-
* LICENSE file in the root directory of this source tree.
|
166
|
-
*/
|
167
|
-
var Ct;
|
168
|
-
function Ft() {
|
169
|
-
if (Ct) return Et;
|
170
|
-
Ct = 1;
|
171
|
-
var s = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
|
172
|
-
function u(a, c, f) {
|
173
|
-
var h = null;
|
174
|
-
if (f !== void 0 && (h = "" + f), c.key !== void 0 && (h = "" + c.key), "key" in c) {
|
175
|
-
f = {};
|
176
|
-
for (var b in c)
|
177
|
-
b !== "key" && (f[b] = c[b]);
|
178
|
-
} else f = c;
|
179
|
-
return c = f.ref, {
|
180
|
-
$$typeof: s,
|
181
|
-
type: a,
|
182
|
-
key: h,
|
183
|
-
ref: c !== void 0 ? c : null,
|
184
|
-
props: f
|
185
|
-
};
|
186
|
-
}
|
187
|
-
return Et.Fragment = r, Et.jsx = u, Et.jsxs = u, Et;
|
188
|
-
}
|
189
|
-
var wt = {};
|
190
|
-
/**
|
191
|
-
* @license React
|
192
|
-
* react-jsx-runtime.development.js
|
193
|
-
*
|
194
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
195
|
-
*
|
196
|
-
* This source code is licensed under the MIT license found in the
|
197
|
-
* LICENSE file in the root directory of this source tree.
|
198
|
-
*/
|
199
|
-
var At;
|
200
|
-
function Ut() {
|
201
|
-
return At || (At = 1, process.env.NODE_ENV !== "production" && function() {
|
202
|
-
function s(t) {
|
203
|
-
if (t == null) return null;
|
204
|
-
if (typeof t == "function")
|
205
|
-
return t.$$typeof === K ? null : t.displayName || t.name || null;
|
206
|
-
if (typeof t == "string") return t;
|
207
|
-
switch (t) {
|
208
|
-
case Z:
|
209
|
-
return "Fragment";
|
210
|
-
case ot:
|
211
|
-
return "Portal";
|
212
|
-
case e:
|
213
|
-
return "Profiler";
|
214
|
-
case x:
|
215
|
-
return "StrictMode";
|
216
|
-
case g:
|
217
|
-
return "Suspense";
|
218
|
-
case C:
|
219
|
-
return "SuspenseList";
|
220
|
-
}
|
221
|
-
if (typeof t == "object")
|
222
|
-
switch (typeof t.tag == "number" && console.error(
|
223
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
224
|
-
), t.$$typeof) {
|
225
|
-
case i:
|
226
|
-
return (t.displayName || "Context") + ".Provider";
|
227
|
-
case n:
|
228
|
-
return (t._context.displayName || "Context") + ".Consumer";
|
229
|
-
case p:
|
230
|
-
var l = t.render;
|
231
|
-
return t = t.displayName, t || (t = l.displayName || l.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
|
232
|
-
case V:
|
233
|
-
return l = t.displayName || null, l !== null ? l : s(t.type) || "Memo";
|
234
|
-
case lt:
|
235
|
-
l = t._payload, t = t._init;
|
236
|
-
try {
|
237
|
-
return s(t(l));
|
238
|
-
} catch {
|
239
|
-
}
|
240
|
-
}
|
241
|
-
return null;
|
242
|
-
}
|
243
|
-
function r(t) {
|
244
|
-
return "" + t;
|
245
|
-
}
|
246
|
-
function u(t) {
|
247
|
-
try {
|
248
|
-
r(t);
|
249
|
-
var l = !1;
|
250
|
-
} catch {
|
251
|
-
l = !0;
|
252
|
-
}
|
253
|
-
if (l) {
|
254
|
-
l = console;
|
255
|
-
var m = l.error, w = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
256
|
-
return m.call(
|
257
|
-
l,
|
258
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
259
|
-
w
|
260
|
-
), r(t);
|
261
|
-
}
|
262
|
-
}
|
263
|
-
function a() {
|
264
|
-
}
|
265
|
-
function c() {
|
266
|
-
if (B === 0) {
|
267
|
-
G = console.log, et = console.info, dt = console.warn, D = console.error, I = console.group, H = console.groupCollapsed, k = console.groupEnd;
|
268
|
-
var t = {
|
269
|
-
configurable: !0,
|
270
|
-
enumerable: !0,
|
271
|
-
value: a,
|
272
|
-
writable: !0
|
273
|
-
};
|
274
|
-
Object.defineProperties(console, {
|
275
|
-
info: t,
|
276
|
-
log: t,
|
277
|
-
warn: t,
|
278
|
-
error: t,
|
279
|
-
group: t,
|
280
|
-
groupCollapsed: t,
|
281
|
-
groupEnd: t
|
282
|
-
});
|
283
|
-
}
|
284
|
-
B++;
|
285
|
-
}
|
286
|
-
function f() {
|
287
|
-
if (B--, B === 0) {
|
288
|
-
var t = { configurable: !0, enumerable: !0, writable: !0 };
|
289
|
-
Object.defineProperties(console, {
|
290
|
-
log: E({}, t, { value: G }),
|
291
|
-
info: E({}, t, { value: et }),
|
292
|
-
warn: E({}, t, { value: dt }),
|
293
|
-
error: E({}, t, { value: D }),
|
294
|
-
group: E({}, t, { value: I }),
|
295
|
-
groupCollapsed: E({}, t, { value: H }),
|
296
|
-
groupEnd: E({}, t, { value: k })
|
297
|
-
});
|
298
|
-
}
|
299
|
-
0 > B && console.error(
|
300
|
-
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
|
301
|
-
);
|
302
|
-
}
|
303
|
-
function h(t) {
|
304
|
-
if (Y === void 0)
|
305
|
-
try {
|
306
|
-
throw Error();
|
307
|
-
} catch (m) {
|
308
|
-
var l = m.stack.trim().match(/\n( *(at )?)/);
|
309
|
-
Y = l && l[1] || "", tt = -1 < m.stack.indexOf(`
|
310
|
-
at`) ? " (<anonymous>)" : -1 < m.stack.indexOf("@") ? "@unknown:0:0" : "";
|
311
|
-
}
|
312
|
-
return `
|
313
|
-
` + Y + t + tt;
|
314
|
-
}
|
315
|
-
function b(t, l) {
|
316
|
-
if (!t || $) return "";
|
317
|
-
var m = q.get(t);
|
318
|
-
if (m !== void 0) return m;
|
319
|
-
$ = !0, m = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
|
320
|
-
var w = null;
|
321
|
-
w = y.H, y.H = null, c();
|
322
|
-
try {
|
323
|
-
var W = {
|
324
|
-
DetermineComponentFrameRoot: function() {
|
325
|
-
try {
|
326
|
-
if (l) {
|
327
|
-
var gt = function() {
|
328
|
-
throw Error();
|
329
|
-
};
|
330
|
-
if (Object.defineProperty(gt.prototype, "props", {
|
331
|
-
set: function() {
|
332
|
-
throw Error();
|
333
|
-
}
|
334
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
335
|
-
try {
|
336
|
-
Reflect.construct(gt, []);
|
337
|
-
} catch (bt) {
|
338
|
-
var xt = bt;
|
339
|
-
}
|
340
|
-
Reflect.construct(t, [], gt);
|
341
|
-
} else {
|
342
|
-
try {
|
343
|
-
gt.call();
|
344
|
-
} catch (bt) {
|
345
|
-
xt = bt;
|
346
|
-
}
|
347
|
-
t.call(gt.prototype);
|
348
|
-
}
|
349
|
-
} else {
|
350
|
-
try {
|
351
|
-
throw Error();
|
352
|
-
} catch (bt) {
|
353
|
-
xt = bt;
|
354
|
-
}
|
355
|
-
(gt = t()) && typeof gt.catch == "function" && gt.catch(function() {
|
356
|
-
});
|
357
|
-
}
|
358
|
-
} catch (bt) {
|
359
|
-
if (bt && xt && typeof bt.stack == "string")
|
360
|
-
return [bt.stack, xt.stack];
|
361
|
-
}
|
362
|
-
return [null, null];
|
363
|
-
}
|
364
|
-
};
|
365
|
-
W.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
|
366
|
-
var S = Object.getOwnPropertyDescriptor(
|
367
|
-
W.DetermineComponentFrameRoot,
|
368
|
-
"name"
|
369
|
-
);
|
370
|
-
S && S.configurable && Object.defineProperty(
|
371
|
-
W.DetermineComponentFrameRoot,
|
372
|
-
"name",
|
373
|
-
{ value: "DetermineComponentFrameRoot" }
|
374
|
-
);
|
375
|
-
var _ = W.DetermineComponentFrameRoot(), it = _[0], _t = _[1];
|
376
|
-
if (it && _t) {
|
377
|
-
var at = it.split(`
|
378
|
-
`), pt = _t.split(`
|
379
|
-
`);
|
380
|
-
for (_ = S = 0; S < at.length && !at[S].includes(
|
381
|
-
"DetermineComponentFrameRoot"
|
382
|
-
); )
|
383
|
-
S++;
|
384
|
-
for (; _ < pt.length && !pt[_].includes(
|
385
|
-
"DetermineComponentFrameRoot"
|
386
|
-
); )
|
387
|
-
_++;
|
388
|
-
if (S === at.length || _ === pt.length)
|
389
|
-
for (S = at.length - 1, _ = pt.length - 1; 1 <= S && 0 <= _ && at[S] !== pt[_]; )
|
390
|
-
_--;
|
391
|
-
for (; 1 <= S && 0 <= _; S--, _--)
|
392
|
-
if (at[S] !== pt[_]) {
|
393
|
-
if (S !== 1 || _ !== 1)
|
394
|
-
do
|
395
|
-
if (S--, _--, 0 > _ || at[S] !== pt[_]) {
|
396
|
-
var ct = `
|
397
|
-
` + at[S].replace(
|
398
|
-
" at new ",
|
399
|
-
" at "
|
400
|
-
);
|
401
|
-
return t.displayName && ct.includes("<anonymous>") && (ct = ct.replace("<anonymous>", t.displayName)), typeof t == "function" && q.set(t, ct), ct;
|
402
|
-
}
|
403
|
-
while (1 <= S && 0 <= _);
|
404
|
-
break;
|
405
|
-
}
|
406
|
-
}
|
407
|
-
} finally {
|
408
|
-
$ = !1, y.H = w, f(), Error.prepareStackTrace = m;
|
409
|
-
}
|
410
|
-
return at = (at = t ? t.displayName || t.name : "") ? h(at) : "", typeof t == "function" && q.set(t, at), at;
|
411
|
-
}
|
412
|
-
function j(t) {
|
413
|
-
if (t == null) return "";
|
414
|
-
if (typeof t == "function") {
|
415
|
-
var l = t.prototype;
|
416
|
-
return b(
|
417
|
-
t,
|
418
|
-
!(!l || !l.isReactComponent)
|
419
|
-
);
|
420
|
-
}
|
421
|
-
if (typeof t == "string") return h(t);
|
422
|
-
switch (t) {
|
423
|
-
case g:
|
424
|
-
return h("Suspense");
|
425
|
-
case C:
|
426
|
-
return h("SuspenseList");
|
427
|
-
}
|
428
|
-
if (typeof t == "object")
|
429
|
-
switch (t.$$typeof) {
|
430
|
-
case p:
|
431
|
-
return t = b(t.render, !1), t;
|
432
|
-
case V:
|
433
|
-
return j(t.type);
|
434
|
-
case lt:
|
435
|
-
l = t._payload, t = t._init;
|
436
|
-
try {
|
437
|
-
return j(t(l));
|
438
|
-
} catch {
|
439
|
-
}
|
440
|
-
}
|
441
|
-
return "";
|
442
|
-
}
|
443
|
-
function o() {
|
444
|
-
var t = y.A;
|
445
|
-
return t === null ? null : t.getOwner();
|
446
|
-
}
|
447
|
-
function R(t) {
|
448
|
-
if (rt.call(t, "key")) {
|
449
|
-
var l = Object.getOwnPropertyDescriptor(t, "key").get;
|
450
|
-
if (l && l.isReactWarning) return !1;
|
451
|
-
}
|
452
|
-
return t.key !== void 0;
|
453
|
-
}
|
454
|
-
function T(t, l) {
|
455
|
-
function m() {
|
456
|
-
ht || (ht = !0, console.error(
|
457
|
-
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
458
|
-
l
|
459
|
-
));
|
460
|
-
}
|
461
|
-
m.isReactWarning = !0, Object.defineProperty(t, "key", {
|
462
|
-
get: m,
|
463
|
-
configurable: !0
|
464
|
-
});
|
465
|
-
}
|
466
|
-
function L() {
|
467
|
-
var t = s(this.type);
|
468
|
-
return O[t] || (O[t] = !0, console.error(
|
469
|
-
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
470
|
-
)), t = this.props.ref, t !== void 0 ? t : null;
|
471
|
-
}
|
472
|
-
function U(t, l, m, w, W, S) {
|
473
|
-
return m = S.ref, t = {
|
474
|
-
$$typeof: ut,
|
475
|
-
type: t,
|
476
|
-
key: l,
|
477
|
-
props: S,
|
478
|
-
_owner: W
|
479
|
-
}, (m !== void 0 ? m : null) !== null ? Object.defineProperty(t, "ref", {
|
480
|
-
enumerable: !1,
|
481
|
-
get: L
|
482
|
-
}) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
|
483
|
-
configurable: !1,
|
484
|
-
enumerable: !1,
|
485
|
-
writable: !0,
|
486
|
-
value: 0
|
487
|
-
}), Object.defineProperty(t, "_debugInfo", {
|
488
|
-
configurable: !1,
|
489
|
-
enumerable: !1,
|
490
|
-
writable: !0,
|
491
|
-
value: null
|
492
|
-
}), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
|
493
|
-
}
|
494
|
-
function P(t, l, m, w, W, S) {
|
495
|
-
if (typeof t == "string" || typeof t == "function" || t === Z || t === e || t === x || t === g || t === C || t === ft || typeof t == "object" && t !== null && (t.$$typeof === lt || t.$$typeof === V || t.$$typeof === i || t.$$typeof === n || t.$$typeof === p || t.$$typeof === N || t.getModuleId !== void 0)) {
|
496
|
-
var _ = l.children;
|
497
|
-
if (_ !== void 0)
|
498
|
-
if (w)
|
499
|
-
if (v(_)) {
|
500
|
-
for (w = 0; w < _.length; w++)
|
501
|
-
z(_[w], t);
|
502
|
-
Object.freeze && Object.freeze(_);
|
503
|
-
} else
|
504
|
-
console.error(
|
505
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
506
|
-
);
|
507
|
-
else z(_, t);
|
508
|
-
} else
|
509
|
-
_ = "", (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), t === null ? w = "null" : v(t) ? w = "array" : t !== void 0 && t.$$typeof === ut ? (w = "<" + (s(t.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : w = typeof t, console.error(
|
510
|
-
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
|
511
|
-
w,
|
512
|
-
_
|
513
|
-
);
|
514
|
-
if (rt.call(l, "key")) {
|
515
|
-
_ = s(t);
|
516
|
-
var it = Object.keys(l).filter(function(at) {
|
517
|
-
return at !== "key";
|
518
|
-
});
|
519
|
-
w = 0 < it.length ? "{key: someKey, " + it.join(": ..., ") + ": ...}" : "{key: someKey}", J[_ + w] || (it = 0 < it.length ? "{" + it.join(": ..., ") + ": ...}" : "{}", console.error(
|
520
|
-
`A props object containing a "key" prop is being spread into JSX:
|
521
|
-
let props = %s;
|
522
|
-
<%s {...props} />
|
523
|
-
React keys must be passed directly to JSX without using spread:
|
524
|
-
let props = %s;
|
525
|
-
<%s key={someKey} {...props} />`,
|
526
|
-
w,
|
527
|
-
_,
|
528
|
-
it,
|
529
|
-
_
|
530
|
-
), J[_ + w] = !0);
|
531
|
-
}
|
532
|
-
if (_ = null, m !== void 0 && (u(m), _ = "" + m), R(l) && (u(l.key), _ = "" + l.key), "key" in l) {
|
533
|
-
m = {};
|
534
|
-
for (var _t in l)
|
535
|
-
_t !== "key" && (m[_t] = l[_t]);
|
536
|
-
} else m = l;
|
537
|
-
return _ && T(
|
538
|
-
m,
|
539
|
-
typeof t == "function" ? t.displayName || t.name || "Unknown" : t
|
540
|
-
), U(t, _, S, W, o(), m);
|
541
|
-
}
|
542
|
-
function z(t, l) {
|
543
|
-
if (typeof t == "object" && t && t.$$typeof !== M) {
|
544
|
-
if (v(t))
|
545
|
-
for (var m = 0; m < t.length; m++) {
|
546
|
-
var w = t[m];
|
547
|
-
F(w) && Q(w, l);
|
548
|
-
}
|
549
|
-
else if (F(t))
|
550
|
-
t._store && (t._store.validated = 1);
|
551
|
-
else if (t === null || typeof t != "object" ? m = null : (m = A && t[A] || t["@@iterator"], m = typeof m == "function" ? m : null), typeof m == "function" && m !== t.entries && (m = m.call(t), m !== t))
|
552
|
-
for (; !(t = m.next()).done; )
|
553
|
-
F(t.value) && Q(t.value, l);
|
554
|
-
}
|
555
|
-
}
|
556
|
-
function F(t) {
|
557
|
-
return typeof t == "object" && t !== null && t.$$typeof === ut;
|
558
|
-
}
|
559
|
-
function Q(t, l) {
|
560
|
-
if (t._store && !t._store.validated && t.key == null && (t._store.validated = 1, l = st(l), !vt[l])) {
|
561
|
-
vt[l] = !0;
|
562
|
-
var m = "";
|
563
|
-
t && t._owner != null && t._owner !== o() && (m = null, typeof t._owner.tag == "number" ? m = s(t._owner.type) : typeof t._owner.name == "string" && (m = t._owner.name), m = " It was passed a child from " + m + ".");
|
564
|
-
var w = y.getCurrentStack;
|
565
|
-
y.getCurrentStack = function() {
|
566
|
-
var W = j(t.type);
|
567
|
-
return w && (W += w() || ""), W;
|
568
|
-
}, console.error(
|
569
|
-
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
|
570
|
-
l,
|
571
|
-
m
|
572
|
-
), y.getCurrentStack = w;
|
573
|
-
}
|
574
|
-
}
|
575
|
-
function st(t) {
|
576
|
-
var l = "", m = o();
|
577
|
-
return m && (m = s(m.type)) && (l = `
|
578
|
-
|
579
|
-
Check the render method of \`` + m + "`."), l || (t = s(t)) && (l = `
|
580
|
-
|
581
|
-
Check the top-level render call using <` + t + ">."), l;
|
582
|
-
}
|
583
|
-
var nt = Pt, ut = Symbol.for("react.transitional.element"), ot = Symbol.for("react.portal"), Z = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), e = Symbol.for("react.profiler"), n = Symbol.for("react.consumer"), i = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), C = Symbol.for("react.suspense_list"), V = Symbol.for("react.memo"), lt = Symbol.for("react.lazy"), ft = Symbol.for("react.offscreen"), A = Symbol.iterator, K = Symbol.for("react.client.reference"), y = nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, rt = Object.prototype.hasOwnProperty, E = Object.assign, N = Symbol.for("react.client.reference"), v = Array.isArray, B = 0, G, et, dt, D, I, H, k;
|
584
|
-
a.__reactDisabledLog = !0;
|
585
|
-
var Y, tt, $ = !1, q = new (typeof WeakMap == "function" ? WeakMap : Map)(), M = Symbol.for("react.client.reference"), ht, O = {}, J = {}, vt = {};
|
586
|
-
wt.Fragment = Z, wt.jsx = function(t, l, m, w, W) {
|
587
|
-
return P(t, l, m, !1, w, W);
|
588
|
-
}, wt.jsxs = function(t, l, m, w, W) {
|
589
|
-
return P(t, l, m, !0, w, W);
|
590
|
-
};
|
591
|
-
}()), wt;
|
592
|
-
}
|
593
|
-
var Tt;
|
594
|
-
function $t() {
|
595
|
-
return Tt || (Tt = 1, process.env.NODE_ENV === "production" ? kt.exports = Ft() : kt.exports = Ut()), kt.exports;
|
596
|
-
}
|
597
|
-
var d = $t();
|
598
|
-
const Zt = ({
|
599
|
-
speciesList: s,
|
600
|
-
width: r = 1e3,
|
601
|
-
height: u = 50,
|
166
|
+
const Xt = ({
|
167
|
+
speciesList: r,
|
168
|
+
width: n = 1e3,
|
169
|
+
height: s = 50,
|
602
170
|
padding: a = 0,
|
603
|
-
stroke:
|
604
|
-
format:
|
605
|
-
chronoScale:
|
606
|
-
showImages:
|
607
|
-
presentTime:
|
171
|
+
stroke: u = "grey",
|
172
|
+
format: c = (E) => E.toString(),
|
173
|
+
chronoScale: l = !0,
|
174
|
+
showImages: m = !0,
|
175
|
+
presentTime: v,
|
608
176
|
handleMouseMove: o,
|
609
|
-
children:
|
177
|
+
children: b
|
610
178
|
}) => {
|
611
|
-
const
|
179
|
+
const E = r.map((N) => N.copy()), A = Math.min(...E.map((N) => N.apparition)), L = Math.max(...E.map((N) => N.apparition - A)), C = new gt(
|
612
180
|
"",
|
181
|
+
A,
|
613
182
|
L,
|
614
|
-
U,
|
615
183
|
void 0,
|
616
184
|
[]
|
617
185
|
);
|
618
|
-
return
|
619
|
-
|
186
|
+
return C.display = !1, C.linkDescendants(E), /* @__PURE__ */ g(
|
187
|
+
It,
|
620
188
|
{
|
621
|
-
commonAncestor:
|
622
|
-
width:
|
623
|
-
height:
|
189
|
+
commonAncestor: C,
|
190
|
+
width: n,
|
191
|
+
height: s,
|
624
192
|
padding: a,
|
625
|
-
stroke:
|
626
|
-
format:
|
627
|
-
chronoScale:
|
628
|
-
showImages:
|
629
|
-
presentTime:
|
193
|
+
stroke: u,
|
194
|
+
format: c,
|
195
|
+
chronoScale: l,
|
196
|
+
showImages: m,
|
197
|
+
presentTime: v,
|
630
198
|
handleMouseMove: o,
|
631
|
-
children: (
|
199
|
+
children: (N, T, B, V) => b == null ? void 0 : b(N, T, B, V)
|
632
200
|
}
|
633
201
|
);
|
634
|
-
},
|
635
|
-
commonAncestor:
|
636
|
-
width:
|
637
|
-
height:
|
202
|
+
}, It = ({
|
203
|
+
commonAncestor: r,
|
204
|
+
width: n = 1e3,
|
205
|
+
height: s = 50,
|
638
206
|
padding: a = 0,
|
639
|
-
stroke:
|
640
|
-
format:
|
641
|
-
chronoScale:
|
642
|
-
showImages:
|
643
|
-
presentTime:
|
207
|
+
stroke: u = "grey",
|
208
|
+
format: c = (E) => E.toString(),
|
209
|
+
chronoScale: l = !0,
|
210
|
+
showImages: m = !0,
|
211
|
+
presentTime: v,
|
644
212
|
handleMouseMove: o,
|
645
|
-
children:
|
213
|
+
children: b
|
646
214
|
}) => {
|
647
|
-
const [
|
648
|
-
|
649
|
-
|
650
|
-
}, [
|
651
|
-
const
|
652
|
-
|
653
|
-
},
|
654
|
-
const
|
655
|
-
|
656
|
-
},
|
657
|
-
|
658
|
-
},
|
659
|
-
return /* @__PURE__ */
|
660
|
-
/* @__PURE__ */
|
215
|
+
const [E, A] = P(!1), [L, C] = P(void 0), [N, T] = P(void 0), [B, V] = P(r.allDescendants().reduce((t, e) => t.set(e, !0), /* @__PURE__ */ new Map()));
|
216
|
+
Et(() => {
|
217
|
+
V(r.allDescendants().reduce((t, e) => t.set(e, !0), /* @__PURE__ */ new Map()));
|
218
|
+
}, [r]);
|
219
|
+
const Z = (t) => {
|
220
|
+
C(E ? void 0 : t), A(!E);
|
221
|
+
}, rt = (t) => {
|
222
|
+
const e = new Map(B);
|
223
|
+
e.set(t, !B.get(t)), V(e);
|
224
|
+
}, et = (t) => {
|
225
|
+
T(t);
|
226
|
+
}, K = v !== void 0 && l, p = (t) => m ? t.map((e) => e.image ? 2 : 1).reduce((e, i) => e + i) : t.length;
|
227
|
+
return /* @__PURE__ */ X(wt, { children: [
|
228
|
+
/* @__PURE__ */ g(
|
661
229
|
"svg",
|
662
230
|
{
|
663
|
-
width:
|
664
|
-
height:
|
665
|
-
onMouseMove: (
|
666
|
-
o == null || o(
|
231
|
+
width: n * (K ? (Math.min(v, r.absoluteExtinction()) - r.apparition) / r.absoluteDuration() : 1),
|
232
|
+
height: s * p(K ? r.allDescendants().filter((t) => t.apparition < v) : r.allDescendants()),
|
233
|
+
onMouseMove: (t) => {
|
234
|
+
o == null || o(t.clientX, t.clientY);
|
667
235
|
},
|
668
|
-
children: /* @__PURE__ */
|
669
|
-
|
236
|
+
children: /* @__PURE__ */ g(
|
237
|
+
At,
|
670
238
|
{
|
671
|
-
commonAncestor:
|
672
|
-
species:
|
239
|
+
commonAncestor: r,
|
240
|
+
species: r,
|
673
241
|
y: -1,
|
674
|
-
scaleX:
|
675
|
-
scaleY:
|
242
|
+
scaleX: n / (l ? r.absoluteDuration() : Math.max(0, r.stepsUntilLastDescendant()) + 1),
|
243
|
+
scaleY: s,
|
676
244
|
padding: a,
|
677
|
-
stroke:
|
678
|
-
format:
|
679
|
-
chronoScale:
|
680
|
-
showImages:
|
681
|
-
presentTime:
|
682
|
-
toggleShowMenu:
|
683
|
-
hoverShowMenu:
|
684
|
-
showDesc:
|
685
|
-
changeShowDesc:
|
245
|
+
stroke: u,
|
246
|
+
format: c,
|
247
|
+
chronoScale: l,
|
248
|
+
showImages: m,
|
249
|
+
presentTime: v,
|
250
|
+
toggleShowMenu: Z,
|
251
|
+
hoverShowMenu: et,
|
252
|
+
showDesc: B,
|
253
|
+
changeShowDesc: rt
|
686
254
|
}
|
687
255
|
)
|
688
256
|
}
|
689
257
|
),
|
690
|
-
|
258
|
+
b == null ? void 0 : b(L, E, Z, N)
|
691
259
|
] });
|
692
|
-
},
|
693
|
-
commonAncestor:
|
694
|
-
species:
|
695
|
-
y:
|
260
|
+
}, At = ({
|
261
|
+
commonAncestor: r,
|
262
|
+
species: n,
|
263
|
+
y: s,
|
696
264
|
scaleX: a,
|
697
|
-
scaleY:
|
698
|
-
padding:
|
699
|
-
stroke:
|
700
|
-
format:
|
701
|
-
chronoScale:
|
265
|
+
scaleY: u,
|
266
|
+
padding: c = 0,
|
267
|
+
stroke: l = "grey",
|
268
|
+
format: m = (N) => N.toString(),
|
269
|
+
chronoScale: v = !0,
|
702
270
|
showImages: o = !0,
|
703
|
-
presentTime:
|
704
|
-
toggleShowMenu:
|
705
|
-
hoverShowMenu:
|
706
|
-
showDesc:
|
707
|
-
changeShowDesc:
|
271
|
+
presentTime: b = void 0,
|
272
|
+
toggleShowMenu: E,
|
273
|
+
hoverShowMenu: A,
|
274
|
+
showDesc: L,
|
275
|
+
changeShowDesc: C
|
708
276
|
}) => {
|
709
|
-
const
|
710
|
-
return /* @__PURE__ */
|
711
|
-
|
277
|
+
const N = b !== void 0 && v, T = r.allDescendants().filter((p) => N ? p.apparition < b : !0), B = T.indexOf(n), V = (v ? n.apparition - r.apparition : r.stepsUntil(n) ?? 0) * a, Z = V + (v ? Math.min(L.get(n) ? n.duration : n.absoluteDuration(), N ? b - n.apparition : n.absoluteDuration()) : 1) * a, rt = o && B > 0 ? [...Array(B).keys()].map((p) => T[p]).map((p) => (p.image ? 2 : 1) * u).reduce((p, t) => p + t) : B * u, et = n.descendants.filter((p) => N ? p.apparition < b : !0), K = et.length > 0 ? V + (Math.min(...et.map((p) => p.apparition)) - n.apparition) * a : Z;
|
278
|
+
return /* @__PURE__ */ X("g", { children: [
|
279
|
+
s >= 0 && /* @__PURE__ */ g(
|
712
280
|
"line",
|
713
281
|
{
|
714
|
-
x1:
|
715
|
-
y1:
|
716
|
-
x2:
|
717
|
-
y2:
|
718
|
-
stroke:
|
282
|
+
x1: V,
|
283
|
+
y1: s,
|
284
|
+
x2: V,
|
285
|
+
y2: rt,
|
286
|
+
stroke: l
|
719
287
|
}
|
720
288
|
),
|
721
|
-
|
722
|
-
|
289
|
+
n.display && /* @__PURE__ */ g(
|
290
|
+
Ft,
|
723
291
|
{
|
724
|
-
commonAncestor:
|
725
|
-
species:
|
726
|
-
height:
|
727
|
-
x1:
|
728
|
-
x2:
|
729
|
-
x0:
|
730
|
-
y:
|
731
|
-
stroke:
|
732
|
-
changeShowDesc: () =>
|
733
|
-
showDesc:
|
734
|
-
padding:
|
735
|
-
format:
|
736
|
-
chronoScale:
|
292
|
+
commonAncestor: r,
|
293
|
+
species: n,
|
294
|
+
height: u,
|
295
|
+
x1: V,
|
296
|
+
x2: Z,
|
297
|
+
x0: K,
|
298
|
+
y: rt,
|
299
|
+
stroke: l,
|
300
|
+
changeShowDesc: () => C(n),
|
301
|
+
showDesc: L.get(n),
|
302
|
+
padding: c,
|
303
|
+
format: m,
|
304
|
+
chronoScale: v,
|
737
305
|
showImages: o,
|
738
|
-
presentTime:
|
739
|
-
toggleShowMenu:
|
740
|
-
hoverShowMenu:
|
306
|
+
presentTime: b,
|
307
|
+
toggleShowMenu: E,
|
308
|
+
hoverShowMenu: A
|
741
309
|
}
|
742
310
|
),
|
743
|
-
|
744
|
-
|
311
|
+
n.descendants.map((p, t) => /* @__PURE__ */ g("g", { className: L.get(n) && et.includes(p) ? "block" : "hidden", children: /* @__PURE__ */ g(
|
312
|
+
At,
|
745
313
|
{
|
746
|
-
commonAncestor:
|
747
|
-
species:
|
748
|
-
y:
|
314
|
+
commonAncestor: r,
|
315
|
+
species: p,
|
316
|
+
y: p.display ? rt : -1,
|
749
317
|
scaleX: a,
|
750
|
-
scaleY:
|
751
|
-
padding:
|
752
|
-
stroke:
|
753
|
-
format:
|
754
|
-
chronoScale:
|
318
|
+
scaleY: u,
|
319
|
+
padding: c,
|
320
|
+
stroke: l,
|
321
|
+
format: m,
|
322
|
+
chronoScale: v,
|
755
323
|
showImages: o,
|
756
|
-
presentTime:
|
757
|
-
toggleShowMenu:
|
758
|
-
showDesc:
|
759
|
-
changeShowDesc:
|
760
|
-
hoverShowMenu:
|
324
|
+
presentTime: b,
|
325
|
+
toggleShowMenu: E,
|
326
|
+
showDesc: L,
|
327
|
+
changeShowDesc: C,
|
328
|
+
hoverShowMenu: A
|
761
329
|
}
|
762
|
-
) },
|
763
|
-
] },
|
764
|
-
},
|
765
|
-
commonAncestor:
|
766
|
-
species:
|
767
|
-
height:
|
330
|
+
) }, T.length + t))
|
331
|
+
] }, B);
|
332
|
+
}, Ft = ({
|
333
|
+
commonAncestor: r,
|
334
|
+
species: n,
|
335
|
+
height: s,
|
768
336
|
x1: a,
|
769
|
-
x2:
|
770
|
-
x0:
|
771
|
-
y:
|
772
|
-
stroke:
|
773
|
-
showDesc:
|
337
|
+
x2: u,
|
338
|
+
x0: c,
|
339
|
+
y: l,
|
340
|
+
stroke: m,
|
341
|
+
showDesc: v = !0,
|
774
342
|
changeShowDesc: o = () => {
|
775
343
|
},
|
776
|
-
padding:
|
777
|
-
format:
|
778
|
-
chronoScale:
|
779
|
-
showImages:
|
780
|
-
presentTime:
|
781
|
-
toggleShowMenu:
|
782
|
-
hoverShowMenu:
|
783
|
-
className:
|
784
|
-
buttonClassName:
|
344
|
+
padding: b = 0,
|
345
|
+
format: E = (Z) => Z.toString(),
|
346
|
+
chronoScale: A = !0,
|
347
|
+
showImages: L = !0,
|
348
|
+
presentTime: C,
|
349
|
+
toggleShowMenu: N,
|
350
|
+
hoverShowMenu: T,
|
351
|
+
className: B,
|
352
|
+
buttonClassName: V
|
785
353
|
}) => {
|
786
|
-
const
|
787
|
-
return /* @__PURE__ */
|
788
|
-
/* @__PURE__ */
|
354
|
+
const Z = C !== void 0, rt = r.allDescendants().filter((i) => Z ? i.apparition < C : !0), et = (i) => rt.indexOf(i), K = n.ancestor && et(n) > et(n.ancestor) ? -3 : 1, p = n.descendants.filter((i) => Z ? i.apparition < C : !0), t = p.filter((i) => i.apparition === n.extinction()).length === 0, e = E(Math.min(v ? n.extinction() : n.absoluteExtinction(), Z ? C : n.absoluteExtinction()));
|
355
|
+
return /* @__PURE__ */ X("g", { children: [
|
356
|
+
/* @__PURE__ */ g(
|
789
357
|
"line",
|
790
358
|
{
|
791
359
|
x1: a,
|
792
|
-
y1:
|
793
|
-
x2:
|
794
|
-
y2:
|
795
|
-
stroke:
|
360
|
+
y1: l,
|
361
|
+
x2: u,
|
362
|
+
y2: l,
|
363
|
+
stroke: m
|
796
364
|
}
|
797
365
|
),
|
798
|
-
/* @__PURE__ */
|
366
|
+
/* @__PURE__ */ g(
|
799
367
|
"foreignObject",
|
800
368
|
{
|
801
|
-
x: a +
|
802
|
-
y:
|
803
|
-
width: (
|
804
|
-
height:
|
805
|
-
children: /* @__PURE__ */
|
806
|
-
/* @__PURE__ */
|
807
|
-
/* @__PURE__ */
|
369
|
+
x: a + b,
|
370
|
+
y: l + b * K,
|
371
|
+
width: (A ? c ?? u : u) - a - 2 * b,
|
372
|
+
height: s + (L && n.image ? s : 0),
|
373
|
+
children: /* @__PURE__ */ X("div", { className: `flex flex-row justify-between w-full ${B ?? ""}`, children: [
|
374
|
+
/* @__PURE__ */ g("div", { children: A ? E(n.apparition) : "" }),
|
375
|
+
/* @__PURE__ */ X(
|
808
376
|
"button",
|
809
377
|
{
|
810
|
-
className: `p-0.625 justify-center flex flex-col items-center ${
|
811
|
-
onClick: () =>
|
812
|
-
onMouseEnter: () =>
|
813
|
-
onMouseLeave: () =>
|
378
|
+
className: `p-0.625 justify-center flex flex-col items-center ${V ?? ""}`,
|
379
|
+
onClick: () => N(n),
|
380
|
+
onMouseEnter: () => T(n),
|
381
|
+
onMouseLeave: () => T(void 0),
|
814
382
|
children: [
|
815
|
-
|
816
|
-
|
383
|
+
n.name,
|
384
|
+
n.image && L && /* @__PURE__ */ g(
|
817
385
|
"img",
|
818
386
|
{
|
819
|
-
src:
|
820
|
-
alt:
|
821
|
-
style: { height:
|
387
|
+
src: n.image,
|
388
|
+
alt: n.name,
|
389
|
+
style: { height: s }
|
822
390
|
}
|
823
391
|
)
|
824
392
|
]
|
825
393
|
}
|
826
394
|
),
|
827
|
-
|
395
|
+
p.length > 0 ? /* @__PURE__ */ g("button", { onClick: o, className: "h-1", style: { maxWidth: 4 }, children: (t || !v) && (!c || c === u) ? e : "" }) : /* @__PURE__ */ g("div", { children: A ? e : "" })
|
828
396
|
] })
|
829
397
|
}
|
830
398
|
),
|
831
|
-
|
399
|
+
A && c && c < u && /* @__PURE__ */ g(
|
832
400
|
"foreignObject",
|
833
401
|
{
|
834
|
-
x:
|
835
|
-
y:
|
836
|
-
width:
|
837
|
-
height:
|
838
|
-
children: /* @__PURE__ */
|
402
|
+
x: c + b,
|
403
|
+
y: l + b * K,
|
404
|
+
width: u - c - 2 * b,
|
405
|
+
height: s,
|
406
|
+
children: /* @__PURE__ */ g("div", { className: "flex flex-row justify-end w-full", children: (t || !v) && A ? e : "" })
|
839
407
|
}
|
840
408
|
)
|
841
409
|
] });
|
842
|
-
},
|
843
|
-
|
410
|
+
}, Nt = (r, n, s) => r < n ? n : r > s ? s : r;
|
411
|
+
function jt(r) {
|
412
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
413
|
+
}
|
414
|
+
var vt = { exports: {} };
|
844
415
|
/* @license
|
845
416
|
Papa Parse
|
846
417
|
v5.5.2
|
847
418
|
https://github.com/mholt/PapaParse
|
848
419
|
License: MIT
|
849
420
|
*/
|
850
|
-
var
|
851
|
-
function
|
852
|
-
return
|
853
|
-
((
|
854
|
-
|
855
|
-
})(
|
856
|
-
var a = typeof self < "u" ? self : typeof window < "u" ? window : a !== void 0 ? a : {},
|
857
|
-
function
|
858
|
-
this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = { data: [], errors: [], meta: {} }, (function(
|
859
|
-
var i =
|
860
|
-
i.chunkSize = parseInt(i.chunkSize),
|
861
|
-
}).call(this,
|
862
|
-
var
|
863
|
-
if (this.isFirstChunk && 0 <
|
864
|
-
let
|
865
|
-
|
421
|
+
var Pt = vt.exports, St;
|
422
|
+
function Ut() {
|
423
|
+
return St || (St = 1, function(r, n) {
|
424
|
+
((s, a) => {
|
425
|
+
r.exports = a();
|
426
|
+
})(Pt, function s() {
|
427
|
+
var a = typeof self < "u" ? self : typeof window < "u" ? window : a !== void 0 ? a : {}, u, c = !a.document && !!a.postMessage, l = a.IS_PAPA_WORKER || !1, m = {}, v = 0, o = {};
|
428
|
+
function b(t) {
|
429
|
+
this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = { data: [], errors: [], meta: {} }, (function(e) {
|
430
|
+
var i = et(e);
|
431
|
+
i.chunkSize = parseInt(i.chunkSize), e.step || e.chunk || (i.chunkSize = null), this._handle = new N(i), (this._handle.streamer = this)._config = i;
|
432
|
+
}).call(this, t), this.parseChunk = function(e, i) {
|
433
|
+
var h = parseInt(this._config.skipFirstNLines) || 0;
|
434
|
+
if (this.isFirstChunk && 0 < h) {
|
435
|
+
let x = this._config.newline;
|
436
|
+
x || (d = this._config.quoteChar || '"', x = this._handle.guessLineEndings(e, d)), e = [...e.split(x).slice(h)].join(x);
|
866
437
|
}
|
867
|
-
this.isFirstChunk &&
|
868
|
-
var
|
438
|
+
this.isFirstChunk && p(this._config.beforeFirstChunk) && (d = this._config.beforeFirstChunk(e)) !== void 0 && (e = d), this.isFirstChunk = !1, this._halted = !1;
|
439
|
+
var h = this._partialLine + e, d = (this._partialLine = "", this._handle.parse(h, this._baseIndex, !this._finished));
|
869
440
|
if (!this._handle.paused() && !this._handle.aborted()) {
|
870
|
-
if (
|
871
|
-
else if (
|
872
|
-
if (this._config.chunk(
|
873
|
-
this._completeResults =
|
441
|
+
if (e = d.meta.cursor, h = (this._finished || (this._partialLine = h.substring(e - this._baseIndex), this._baseIndex = e), d && d.data && (this._rowCount += d.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), l) a.postMessage({ results: d, workerId: o.WORKER_ID, finished: h });
|
442
|
+
else if (p(this._config.chunk) && !i) {
|
443
|
+
if (this._config.chunk(d, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
|
444
|
+
this._completeResults = d = void 0;
|
874
445
|
}
|
875
|
-
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(
|
446
|
+
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(d.data), this._completeResults.errors = this._completeResults.errors.concat(d.errors), this._completeResults.meta = d.meta), this._completed || !h || !p(this._config.complete) || d && d.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = !0), h || d && d.meta.paused || this._nextChunk(), d;
|
876
447
|
}
|
877
448
|
this._halted = !0;
|
878
|
-
}, this._sendError = function(
|
879
|
-
|
449
|
+
}, this._sendError = function(e) {
|
450
|
+
p(this._config.error) ? this._config.error(e) : l && this._config.error && a.postMessage({ workerId: o.WORKER_ID, error: e, finished: !1 });
|
880
451
|
};
|
881
452
|
}
|
882
|
-
function
|
883
|
-
var
|
884
|
-
(
|
453
|
+
function E(t) {
|
454
|
+
var e;
|
455
|
+
(t = t || {}).chunkSize || (t.chunkSize = o.RemoteChunkSize), b.call(this, t), this._nextChunk = c ? function() {
|
885
456
|
this._readChunk(), this._chunkLoaded();
|
886
457
|
} : function() {
|
887
458
|
this._readChunk();
|
@@ -890,662 +461,662 @@ function Jt() {
|
|
890
461
|
}, this._readChunk = function() {
|
891
462
|
if (this._finished) this._chunkLoaded();
|
892
463
|
else {
|
893
|
-
if (
|
894
|
-
var i,
|
895
|
-
for (i in
|
464
|
+
if (e = new XMLHttpRequest(), this._config.withCredentials && (e.withCredentials = this._config.withCredentials), c || (e.onload = K(this._chunkLoaded, this), e.onerror = K(this._chunkError, this)), e.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !c), this._config.downloadRequestHeaders) {
|
465
|
+
var i, h = this._config.downloadRequestHeaders;
|
466
|
+
for (i in h) e.setRequestHeader(i, h[i]);
|
896
467
|
}
|
897
|
-
var
|
898
|
-
this._config.chunkSize && (
|
468
|
+
var d;
|
469
|
+
this._config.chunkSize && (d = this._start + this._config.chunkSize - 1, e.setRequestHeader("Range", "bytes=" + this._start + "-" + d));
|
899
470
|
try {
|
900
|
-
|
901
|
-
} catch (
|
902
|
-
this._chunkError(
|
471
|
+
e.send(this._config.downloadRequestBody);
|
472
|
+
} catch (x) {
|
473
|
+
this._chunkError(x.message);
|
903
474
|
}
|
904
|
-
|
475
|
+
c && e.status === 0 && this._chunkError();
|
905
476
|
}
|
906
477
|
}, this._chunkLoaded = function() {
|
907
|
-
|
478
|
+
e.readyState === 4 && (e.status < 200 || 400 <= e.status ? this._chunkError() : (this._start += this._config.chunkSize || e.responseText.length, this._finished = !this._config.chunkSize || this._start >= ((i) => (i = i.getResponseHeader("Content-Range")) !== null ? parseInt(i.substring(i.lastIndexOf("/") + 1)) : -1)(e), this.parseChunk(e.responseText)));
|
908
479
|
}, this._chunkError = function(i) {
|
909
|
-
i =
|
480
|
+
i = e.statusText || i, this._sendError(new Error(i));
|
910
481
|
};
|
911
482
|
}
|
912
|
-
function
|
913
|
-
(
|
914
|
-
var
|
915
|
-
this.stream = function(
|
916
|
-
this._input =
|
483
|
+
function A(t) {
|
484
|
+
(t = t || {}).chunkSize || (t.chunkSize = o.LocalChunkSize), b.call(this, t);
|
485
|
+
var e, i, h = typeof FileReader < "u";
|
486
|
+
this.stream = function(d) {
|
487
|
+
this._input = d, i = d.slice || d.webkitSlice || d.mozSlice, h ? ((e = new FileReader()).onload = K(this._chunkLoaded, this), e.onerror = K(this._chunkError, this)) : e = new FileReaderSync(), this._nextChunk();
|
917
488
|
}, this._nextChunk = function() {
|
918
489
|
this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
|
919
490
|
}, this._readChunk = function() {
|
920
|
-
var
|
921
|
-
|
922
|
-
}, this._chunkLoaded = function(
|
923
|
-
this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(
|
491
|
+
var d = this._input, x = (this._config.chunkSize && (x = Math.min(this._start + this._config.chunkSize, this._input.size), d = i.call(d, this._start, x)), e.readAsText(d, this._config.encoding));
|
492
|
+
h || this._chunkLoaded({ target: { result: x } });
|
493
|
+
}, this._chunkLoaded = function(d) {
|
494
|
+
this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(d.target.result);
|
924
495
|
}, this._chunkError = function() {
|
925
|
-
this._sendError(
|
496
|
+
this._sendError(e.error);
|
926
497
|
};
|
927
498
|
}
|
928
|
-
function
|
929
|
-
var
|
930
|
-
|
931
|
-
return
|
499
|
+
function L(t) {
|
500
|
+
var e;
|
501
|
+
b.call(this, t = t || {}), this.stream = function(i) {
|
502
|
+
return e = i, this._nextChunk();
|
932
503
|
}, this._nextChunk = function() {
|
933
|
-
var i,
|
934
|
-
if (!this._finished) return i = this._config.chunkSize,
|
504
|
+
var i, h;
|
505
|
+
if (!this._finished) return i = this._config.chunkSize, e = i ? (h = e.substring(0, i), e.substring(i)) : (h = e, ""), this._finished = !e, this.parseChunk(h);
|
935
506
|
};
|
936
507
|
}
|
937
|
-
function
|
938
|
-
|
939
|
-
var
|
508
|
+
function C(t) {
|
509
|
+
b.call(this, t = t || {});
|
510
|
+
var e = [], i = !0, h = !1;
|
940
511
|
this.pause = function() {
|
941
|
-
|
512
|
+
b.prototype.pause.apply(this, arguments), this._input.pause();
|
942
513
|
}, this.resume = function() {
|
943
|
-
|
944
|
-
}, this.stream = function(
|
945
|
-
this._input =
|
514
|
+
b.prototype.resume.apply(this, arguments), this._input.resume();
|
515
|
+
}, this.stream = function(d) {
|
516
|
+
this._input = d, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
|
946
517
|
}, this._checkIsFinished = function() {
|
947
|
-
|
518
|
+
h && e.length === 1 && (this._finished = !0);
|
948
519
|
}, this._nextChunk = function() {
|
949
|
-
this._checkIsFinished(),
|
950
|
-
}, this._streamData =
|
520
|
+
this._checkIsFinished(), e.length ? this.parseChunk(e.shift()) : i = !0;
|
521
|
+
}, this._streamData = K(function(d) {
|
951
522
|
try {
|
952
|
-
|
953
|
-
} catch (
|
954
|
-
this._streamError(
|
523
|
+
e.push(typeof d == "string" ? d : d.toString(this._config.encoding)), i && (i = !1, this._checkIsFinished(), this.parseChunk(e.shift()));
|
524
|
+
} catch (x) {
|
525
|
+
this._streamError(x);
|
955
526
|
}
|
956
|
-
}, this), this._streamError =
|
957
|
-
this._streamCleanUp(), this._sendError(
|
958
|
-
}, this), this._streamEnd =
|
959
|
-
this._streamCleanUp(),
|
960
|
-
}, this), this._streamCleanUp =
|
527
|
+
}, this), this._streamError = K(function(d) {
|
528
|
+
this._streamCleanUp(), this._sendError(d);
|
529
|
+
}, this), this._streamEnd = K(function() {
|
530
|
+
this._streamCleanUp(), h = !0, this._streamData("");
|
531
|
+
}, this), this._streamCleanUp = K(function() {
|
961
532
|
this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
|
962
533
|
}, this);
|
963
534
|
}
|
964
|
-
function
|
965
|
-
var
|
966
|
-
function
|
967
|
-
return
|
535
|
+
function N(t) {
|
536
|
+
var e, i, h, d, x = Math.pow(2, 53), H = -x, at = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, st = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, D = this, U = 0, _ = 0, Y = !1, w = !1, O = [], f = { data: [], errors: [], meta: {} };
|
537
|
+
function J(R) {
|
538
|
+
return t.skipEmptyLines === "greedy" ? R.join("").trim() === "" : R.length === 1 && R[0].length === 0;
|
968
539
|
}
|
969
|
-
function
|
970
|
-
if (
|
971
|
-
return !
|
972
|
-
})),
|
973
|
-
let
|
974
|
-
|
540
|
+
function $() {
|
541
|
+
if (f && h && (ot("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + o.DefaultDelimiter + "'"), h = !1), t.skipEmptyLines && (f.data = f.data.filter(function(y) {
|
542
|
+
return !J(y);
|
543
|
+
})), G()) {
|
544
|
+
let y = function(z, W) {
|
545
|
+
p(t.transformHeader) && (z = t.transformHeader(z, W)), O.push(z);
|
975
546
|
};
|
976
|
-
if (
|
977
|
-
for (var
|
978
|
-
|
979
|
-
} else
|
547
|
+
if (f) if (Array.isArray(f.data[0])) {
|
548
|
+
for (var R = 0; G() && R < f.data.length; R++) f.data[R].forEach(y);
|
549
|
+
f.data.splice(0, 1);
|
550
|
+
} else f.data.forEach(y);
|
980
551
|
}
|
981
|
-
function
|
982
|
-
for (var
|
983
|
-
var
|
984
|
-
if (
|
552
|
+
function M(y, z) {
|
553
|
+
for (var W = t.header ? {} : [], I = 0; I < y.length; I++) {
|
554
|
+
var F = I, S = y[I], S = ((ht, k) => ((j) => (t.dynamicTypingFunction && t.dynamicTyping[j] === void 0 && (t.dynamicTyping[j] = t.dynamicTypingFunction(j)), (t.dynamicTyping[j] || t.dynamicTyping) === !0))(ht) ? k === "true" || k === "TRUE" || k !== "false" && k !== "FALSE" && (((j) => {
|
555
|
+
if (at.test(j) && (j = parseFloat(j), H < j && j < x))
|
985
556
|
return 1;
|
986
|
-
})(
|
987
|
-
|
557
|
+
})(k) ? parseFloat(k) : st.test(k) ? new Date(k) : k === "" ? null : k) : k)(F = t.header ? I >= O.length ? "__parsed_extra" : O[I] : F, S = t.transform ? t.transform(S, F) : S);
|
558
|
+
F === "__parsed_extra" ? (W[F] = W[F] || [], W[F].push(S)) : W[F] = S;
|
988
559
|
}
|
989
|
-
return
|
560
|
+
return t.header && (I > O.length ? ot("FieldMismatch", "TooManyFields", "Too many fields: expected " + O.length + " fields but parsed " + I, _ + z) : I < O.length && ot("FieldMismatch", "TooFewFields", "Too few fields: expected " + O.length + " fields but parsed " + I, _ + z)), W;
|
990
561
|
}
|
991
|
-
var
|
992
|
-
|
562
|
+
var q;
|
563
|
+
f && (t.header || t.dynamicTyping || t.transform) && (q = 1, !f.data.length || Array.isArray(f.data[0]) ? (f.data = f.data.map(M), q = f.data.length) : f.data = M(f.data, 0), t.header && f.meta && (f.meta.fields = O), _ += q);
|
993
564
|
}
|
994
|
-
function
|
995
|
-
return
|
565
|
+
function G() {
|
566
|
+
return t.header && O.length === 0;
|
996
567
|
}
|
997
|
-
function
|
998
|
-
|
568
|
+
function ot(R, M, q, y) {
|
569
|
+
R = { type: R, code: M, message: q }, y !== void 0 && (R.row = y), f.errors.push(R);
|
999
570
|
}
|
1000
|
-
|
1001
|
-
|
1002
|
-
}), this.parse = function(
|
1003
|
-
var
|
1004
|
-
var ht,
|
1005
|
-
|
1006
|
-
for (var
|
1007
|
-
for (var
|
1008
|
-
0 <
|
571
|
+
p(t.step) && (d = t.step, t.step = function(R) {
|
572
|
+
f = R, G() ? $() : ($(), f.data.length !== 0 && (U += R.data.length, t.preview && U > t.preview ? i.abort() : (f.data = f.data[0], d(f, D))));
|
573
|
+
}), this.parse = function(R, M, q) {
|
574
|
+
var y = t.quoteChar || '"', y = (t.newline || (t.newline = this.guessLineEndings(R, y)), h = !1, t.delimiter ? p(t.delimiter) && (t.delimiter = t.delimiter(R), f.meta.delimiter = t.delimiter) : ((y = ((z, W, I, F, S) => {
|
575
|
+
var ht, k, j, pt;
|
576
|
+
S = S || [",", " ", "|", ";", o.RECORD_SEP, o.UNIT_SEP];
|
577
|
+
for (var mt = 0; mt < S.length; mt++) {
|
578
|
+
for (var dt, yt = S[mt], tt = 0, ut = 0, Q = 0, nt = (j = void 0, new B({ comments: F, delimiter: yt, newline: W, preview: 10 }).parse(z)), ct = 0; ct < nt.data.length; ct++) I && J(nt.data[ct]) ? Q++ : (dt = nt.data[ct].length, ut += dt, j === void 0 ? j = dt : 0 < dt && (tt += Math.abs(dt - j), j = dt));
|
579
|
+
0 < nt.data.length && (ut /= nt.data.length - Q), (k === void 0 || tt <= k) && (pt === void 0 || pt < ut) && 1.99 < ut && (k = tt, ht = yt, pt = ut);
|
1009
580
|
}
|
1010
|
-
return { successful: !!(
|
1011
|
-
})(
|
1012
|
-
return
|
581
|
+
return { successful: !!(t.delimiter = ht), bestDelimiter: ht };
|
582
|
+
})(R, t.newline, t.skipEmptyLines, t.comments, t.delimitersToGuess)).successful ? t.delimiter = y.bestDelimiter : (h = !0, t.delimiter = o.DefaultDelimiter), f.meta.delimiter = t.delimiter), et(t));
|
583
|
+
return t.preview && t.header && y.preview++, e = R, i = new B(y), f = i.parse(e, M, q), $(), Y ? { meta: { paused: !0 } } : f || { meta: { paused: !1 } };
|
1013
584
|
}, this.paused = function() {
|
1014
|
-
return
|
585
|
+
return Y;
|
1015
586
|
}, this.pause = function() {
|
1016
|
-
|
587
|
+
Y = !0, i.abort(), e = p(t.chunk) ? "" : e.substring(i.getCharIndex());
|
1017
588
|
}, this.resume = function() {
|
1018
|
-
|
589
|
+
D.streamer._halted ? (Y = !1, D.streamer.parseChunk(e, !0)) : setTimeout(D.resume, 3);
|
1019
590
|
}, this.aborted = function() {
|
1020
|
-
return
|
591
|
+
return w;
|
1021
592
|
}, this.abort = function() {
|
1022
|
-
|
1023
|
-
}, this.guessLineEndings = function(
|
1024
|
-
|
1025
|
-
var
|
1026
|
-
`),
|
1027
|
-
if (
|
593
|
+
w = !0, i.abort(), f.meta.aborted = !0, p(t.complete) && t.complete(f), e = "";
|
594
|
+
}, this.guessLineEndings = function(z, y) {
|
595
|
+
z = z.substring(0, 1048576);
|
596
|
+
var y = new RegExp(T(y) + "([^]*?)" + T(y), "gm"), q = (z = z.replace(y, "")).split("\r"), y = z.split(`
|
597
|
+
`), z = 1 < y.length && y[0].length < q[0].length;
|
598
|
+
if (q.length === 1 || z) return `
|
1028
599
|
`;
|
1029
|
-
for (var
|
1030
|
-
` &&
|
1031
|
-
return
|
600
|
+
for (var W = 0, I = 0; I < q.length; I++) q[I][0] === `
|
601
|
+
` && W++;
|
602
|
+
return W >= q.length / 2 ? `\r
|
1032
603
|
` : "\r";
|
1033
604
|
};
|
1034
605
|
}
|
1035
|
-
function
|
1036
|
-
return
|
606
|
+
function T(t) {
|
607
|
+
return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
1037
608
|
}
|
1038
|
-
function
|
1039
|
-
var
|
1040
|
-
if (
|
1041
|
-
|
609
|
+
function B(t) {
|
610
|
+
var e = (t = t || {}).delimiter, i = t.newline, h = t.comments, d = t.step, x = t.preview, H = t.fastMode, at = null, st = !1, D = t.quoteChar == null ? '"' : t.quoteChar, U = D;
|
611
|
+
if (t.escapeChar !== void 0 && (U = t.escapeChar), (typeof e != "string" || -1 < o.BAD_DELIMITERS.indexOf(e)) && (e = ","), h === e) throw new Error("Comment character same as delimiter");
|
612
|
+
h === !0 ? h = "#" : (typeof h != "string" || -1 < o.BAD_DELIMITERS.indexOf(h)) && (h = !1), i !== `
|
1042
613
|
` && i !== "\r" && i !== `\r
|
1043
614
|
` && (i = `
|
1044
615
|
`);
|
1045
|
-
var
|
1046
|
-
this.parse = function(
|
1047
|
-
if (typeof
|
1048
|
-
var
|
1049
|
-
if (!
|
1050
|
-
if (
|
1051
|
-
for (var
|
1052
|
-
if (
|
1053
|
-
else if (
|
1054
|
-
if (!
|
1055
|
-
if (
|
1056
|
-
if (
|
1057
|
-
} else
|
1058
|
-
if (
|
616
|
+
var _ = 0, Y = !1;
|
617
|
+
this.parse = function(w, O, f) {
|
618
|
+
if (typeof w != "string") throw new Error("Input must be a string");
|
619
|
+
var J = w.length, $ = e.length, G = i.length, ot = h.length, R = p(d), M = [], q = [], y = [], z = _ = 0;
|
620
|
+
if (!w) return tt();
|
621
|
+
if (H || H !== !1 && w.indexOf(D) === -1) {
|
622
|
+
for (var W = w.split(i), I = 0; I < W.length; I++) {
|
623
|
+
if (y = W[I], _ += y.length, I !== W.length - 1) _ += i.length;
|
624
|
+
else if (f) return tt();
|
625
|
+
if (!h || y.substring(0, ot) !== h) {
|
626
|
+
if (R) {
|
627
|
+
if (M = [], pt(y.split(e)), ut(), Y) return tt();
|
628
|
+
} else pt(y.split(e));
|
629
|
+
if (x && x <= I) return M = M.slice(0, x), tt(!0);
|
1059
630
|
}
|
1060
631
|
}
|
1061
|
-
return
|
632
|
+
return tt();
|
1062
633
|
}
|
1063
|
-
for (var
|
1064
|
-
if ((
|
1065
|
-
if (
|
1066
|
-
if (
|
1067
|
-
else if (
|
1068
|
-
|
1069
|
-
var
|
1070
|
-
if (
|
1071
|
-
|
634
|
+
for (var F = w.indexOf(e, _), S = w.indexOf(i, _), ht = new RegExp(T(U) + T(D), "g"), k = w.indexOf(D, _); ; ) if (w[_] === D) for (k = _, _++; ; ) {
|
635
|
+
if ((k = w.indexOf(D, k + 1)) === -1) return f || q.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: M.length, index: _ }), dt();
|
636
|
+
if (k === J - 1) return dt(w.substring(_, k).replace(ht, D));
|
637
|
+
if (D === U && w[k + 1] === U) k++;
|
638
|
+
else if (D === U || k === 0 || w[k - 1] !== U) {
|
639
|
+
F !== -1 && F < k + 1 && (F = w.indexOf(e, k + 1));
|
640
|
+
var j = mt((S = S !== -1 && S < k + 1 ? w.indexOf(i, k + 1) : S) === -1 ? F : Math.min(F, S));
|
641
|
+
if (w.substr(k + 1 + j, $) === e) {
|
642
|
+
y.push(w.substring(_, k).replace(ht, D)), w[_ = k + 1 + j + $] !== D && (k = w.indexOf(D, _)), F = w.indexOf(e, _), S = w.indexOf(i, _);
|
1072
643
|
break;
|
1073
644
|
}
|
1074
|
-
if (
|
1075
|
-
if (
|
1076
|
-
if (
|
645
|
+
if (j = mt(S), w.substring(k + 1 + j, k + 1 + j + G) === i) {
|
646
|
+
if (y.push(w.substring(_, k).replace(ht, D)), yt(k + 1 + j + G), F = w.indexOf(e, _), k = w.indexOf(D, _), R && (ut(), Y)) return tt();
|
647
|
+
if (x && M.length >= x) return tt(!0);
|
1077
648
|
break;
|
1078
649
|
}
|
1079
|
-
|
650
|
+
q.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: M.length, index: _ }), k++;
|
1080
651
|
}
|
1081
652
|
}
|
1082
|
-
else if (
|
1083
|
-
if (
|
1084
|
-
|
1085
|
-
} else if (
|
653
|
+
else if (h && y.length === 0 && w.substring(_, _ + ot) === h) {
|
654
|
+
if (S === -1) return tt();
|
655
|
+
_ = S + G, S = w.indexOf(i, _), F = w.indexOf(e, _);
|
656
|
+
} else if (F !== -1 && (F < S || S === -1)) y.push(w.substring(_, F)), _ = F + $, F = w.indexOf(e, _);
|
1086
657
|
else {
|
1087
|
-
if (
|
1088
|
-
if (
|
1089
|
-
if (
|
658
|
+
if (S === -1) break;
|
659
|
+
if (y.push(w.substring(_, S)), yt(S + G), R && (ut(), Y)) return tt();
|
660
|
+
if (x && M.length >= x) return tt(!0);
|
1090
661
|
}
|
1091
|
-
return
|
1092
|
-
function
|
1093
|
-
|
662
|
+
return dt();
|
663
|
+
function pt(Q) {
|
664
|
+
M.push(Q), z = _;
|
1094
665
|
}
|
1095
|
-
function
|
1096
|
-
var
|
1097
|
-
return
|
666
|
+
function mt(Q) {
|
667
|
+
var nt = 0;
|
668
|
+
return nt = Q !== -1 && (Q = w.substring(k + 1, Q)) && Q.trim() === "" ? Q.length : nt;
|
1098
669
|
}
|
1099
|
-
function
|
1100
|
-
return
|
670
|
+
function dt(Q) {
|
671
|
+
return f || (Q === void 0 && (Q = w.substring(_)), y.push(Q), _ = J, pt(y), R && ut()), tt();
|
1101
672
|
}
|
1102
|
-
function
|
1103
|
-
|
673
|
+
function yt(Q) {
|
674
|
+
_ = Q, pt(y), y = [], S = w.indexOf(i, _);
|
1104
675
|
}
|
1105
|
-
function
|
1106
|
-
if (
|
1107
|
-
var
|
1108
|
-
let
|
1109
|
-
for (let
|
1110
|
-
let
|
1111
|
-
if (
|
1112
|
-
let
|
1113
|
-
for (;
|
1114
|
-
|
1115
|
-
} else
|
1116
|
-
|
676
|
+
function tt(Q) {
|
677
|
+
if (t.header && !O && M.length && !st) {
|
678
|
+
var nt = M[0], ct = {}, xt = new Set(nt);
|
679
|
+
let Ot = !1;
|
680
|
+
for (let _t = 0; _t < nt.length; _t++) {
|
681
|
+
let lt = nt[_t];
|
682
|
+
if (ct[lt = p(t.transformHeader) ? t.transformHeader(lt, _t) : lt]) {
|
683
|
+
let bt, Rt = ct[lt];
|
684
|
+
for (; bt = lt + "_" + Rt, Rt++, xt.has(bt); ) ;
|
685
|
+
xt.add(bt), nt[_t] = bt, ct[lt]++, Ot = !0, (at = at === null ? {} : at)[bt] = lt;
|
686
|
+
} else ct[lt] = 1, nt[_t] = lt;
|
687
|
+
xt.add(lt);
|
1117
688
|
}
|
1118
|
-
|
689
|
+
Ot && console.warn("Duplicate headers found and renamed."), st = !0;
|
1119
690
|
}
|
1120
|
-
return { data:
|
691
|
+
return { data: M, errors: q, meta: { delimiter: e, linebreak: i, aborted: Y, truncated: !!Q, cursor: z + (O || 0), renamedHeaders: at } };
|
1121
692
|
}
|
1122
|
-
function
|
1123
|
-
|
693
|
+
function ut() {
|
694
|
+
d(tt()), M = [], q = [];
|
1124
695
|
}
|
1125
696
|
}, this.abort = function() {
|
1126
|
-
|
697
|
+
Y = !0;
|
1127
698
|
}, this.getCharIndex = function() {
|
1128
|
-
return
|
699
|
+
return _;
|
1129
700
|
};
|
1130
701
|
}
|
1131
|
-
function
|
1132
|
-
var
|
1133
|
-
if (
|
1134
|
-
else if (
|
1135
|
-
var
|
1136
|
-
|
1137
|
-
}, pause:
|
1138
|
-
if (
|
1139
|
-
for (var
|
1140
|
-
delete
|
1141
|
-
} else
|
702
|
+
function V(t) {
|
703
|
+
var e = t.data, i = m[e.workerId], h = !1;
|
704
|
+
if (e.error) i.userError(e.error, e.file);
|
705
|
+
else if (e.results && e.results.data) {
|
706
|
+
var d = { abort: function() {
|
707
|
+
h = !0, Z(e.workerId, { data: [], errors: [], meta: { aborted: !0 } });
|
708
|
+
}, pause: rt, resume: rt };
|
709
|
+
if (p(i.userStep)) {
|
710
|
+
for (var x = 0; x < e.results.data.length && (i.userStep({ data: e.results.data[x], errors: e.results.errors, meta: e.results.meta }, d), !h); x++) ;
|
711
|
+
delete e.results;
|
712
|
+
} else p(i.userChunk) && (i.userChunk(e.results, d, e.file), delete e.results);
|
1142
713
|
}
|
1143
|
-
|
714
|
+
e.finished && !h && Z(e.workerId, e.results);
|
1144
715
|
}
|
1145
|
-
function
|
1146
|
-
var i =
|
1147
|
-
|
716
|
+
function Z(t, e) {
|
717
|
+
var i = m[t];
|
718
|
+
p(i.userComplete) && i.userComplete(e), i.terminate(), delete m[t];
|
1148
719
|
}
|
1149
|
-
function
|
720
|
+
function rt() {
|
1150
721
|
throw new Error("Not implemented.");
|
1151
722
|
}
|
1152
|
-
function
|
1153
|
-
if (typeof
|
1154
|
-
var
|
1155
|
-
for (
|
723
|
+
function et(t) {
|
724
|
+
if (typeof t != "object" || t === null) return t;
|
725
|
+
var e, i = Array.isArray(t) ? [] : {};
|
726
|
+
for (e in t) i[e] = et(t[e]);
|
1156
727
|
return i;
|
1157
728
|
}
|
1158
|
-
function
|
729
|
+
function K(t, e) {
|
1159
730
|
return function() {
|
1160
|
-
|
731
|
+
t.apply(e, arguments);
|
1161
732
|
};
|
1162
733
|
}
|
1163
|
-
function
|
1164
|
-
return typeof
|
734
|
+
function p(t) {
|
735
|
+
return typeof t == "function";
|
1165
736
|
}
|
1166
|
-
return o.parse = function(
|
1167
|
-
var i = (
|
1168
|
-
if (
|
737
|
+
return o.parse = function(t, e) {
|
738
|
+
var i = (e = e || {}).dynamicTyping || !1;
|
739
|
+
if (p(i) && (e.dynamicTypingFunction = i, i = {}), e.dynamicTyping = i, e.transform = !!p(e.transform) && e.transform, !e.worker || !o.WORKERS_SUPPORTED) return i = null, o.NODE_STREAM_INPUT, typeof t == "string" ? (t = ((h) => h.charCodeAt(0) !== 65279 ? h : h.slice(1))(t), i = new (e.download ? E : L)(e)) : t.readable === !0 && p(t.read) && p(t.on) ? i = new C(e) : (a.File && t instanceof File || t instanceof Object) && (i = new A(e)), i.stream(t);
|
1169
740
|
(i = (() => {
|
1170
|
-
var
|
1171
|
-
return !!o.WORKERS_SUPPORTED && (
|
1172
|
-
var
|
1173
|
-
return o.BLOB_URL || (o.BLOB_URL =
|
1174
|
-
})(), (
|
1175
|
-
})()).userStep =
|
1176
|
-
}, o.unparse = function(
|
1177
|
-
var i = !1,
|
1178
|
-
`,
|
1179
|
-
if (typeof
|
1180
|
-
if (typeof
|
1181
|
-
return
|
1182
|
-
}).length || (
|
1183
|
-
if (
|
1184
|
-
|
741
|
+
var h;
|
742
|
+
return !!o.WORKERS_SUPPORTED && (h = (() => {
|
743
|
+
var d = a.URL || a.webkitURL || null, x = s.toString();
|
744
|
+
return o.BLOB_URL || (o.BLOB_URL = d.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", x, ")();"], { type: "text/javascript" })));
|
745
|
+
})(), (h = new a.Worker(h)).onmessage = V, h.id = v++, m[h.id] = h);
|
746
|
+
})()).userStep = e.step, i.userChunk = e.chunk, i.userComplete = e.complete, i.userError = e.error, e.step = p(e.step), e.chunk = p(e.chunk), e.complete = p(e.complete), e.error = p(e.error), delete e.worker, i.postMessage({ input: t, config: e, workerId: i.id });
|
747
|
+
}, o.unparse = function(t, e) {
|
748
|
+
var i = !1, h = !0, d = ",", x = `\r
|
749
|
+
`, H = '"', at = H + H, st = !1, D = null, U = !1, _ = ((() => {
|
750
|
+
if (typeof e == "object") {
|
751
|
+
if (typeof e.delimiter != "string" || o.BAD_DELIMITERS.filter(function(O) {
|
752
|
+
return e.delimiter.indexOf(O) !== -1;
|
753
|
+
}).length || (d = e.delimiter), typeof e.quotes != "boolean" && typeof e.quotes != "function" && !Array.isArray(e.quotes) || (i = e.quotes), typeof e.skipEmptyLines != "boolean" && typeof e.skipEmptyLines != "string" || (st = e.skipEmptyLines), typeof e.newline == "string" && (x = e.newline), typeof e.quoteChar == "string" && (H = e.quoteChar), typeof e.header == "boolean" && (h = e.header), Array.isArray(e.columns)) {
|
754
|
+
if (e.columns.length === 0) throw new Error("Option columns is empty");
|
755
|
+
D = e.columns;
|
1185
756
|
}
|
1186
|
-
|
757
|
+
e.escapeChar !== void 0 && (at = e.escapeChar + H), e.escapeFormulae instanceof RegExp ? U = e.escapeFormulae : typeof e.escapeFormulae == "boolean" && e.escapeFormulae && (U = /^[=+\-@\t\r].*$/);
|
1187
758
|
}
|
1188
|
-
})(), new RegExp(
|
1189
|
-
if (typeof
|
1190
|
-
if (!
|
1191
|
-
if (typeof
|
1192
|
-
} else if (typeof
|
759
|
+
})(), new RegExp(T(H), "g"));
|
760
|
+
if (typeof t == "string" && (t = JSON.parse(t)), Array.isArray(t)) {
|
761
|
+
if (!t.length || Array.isArray(t[0])) return Y(null, t, st);
|
762
|
+
if (typeof t[0] == "object") return Y(D || Object.keys(t[0]), t, st);
|
763
|
+
} else if (typeof t == "object") return typeof t.data == "string" && (t.data = JSON.parse(t.data)), Array.isArray(t.data) && (t.fields || (t.fields = t.meta && t.meta.fields || D), t.fields || (t.fields = Array.isArray(t.data[0]) ? t.fields : typeof t.data[0] == "object" ? Object.keys(t.data[0]) : []), Array.isArray(t.data[0]) || typeof t.data[0] == "object" || (t.data = [t.data])), Y(t.fields || [], t.data || [], st);
|
1193
764
|
throw new Error("Unable to serialize unrecognized input");
|
1194
|
-
function
|
1195
|
-
var
|
1196
|
-
if (
|
1197
|
-
for (var
|
1198
|
-
0 <
|
765
|
+
function Y(O, f, J) {
|
766
|
+
var $ = "", G = (typeof O == "string" && (O = JSON.parse(O)), typeof f == "string" && (f = JSON.parse(f)), Array.isArray(O) && 0 < O.length), ot = !Array.isArray(f[0]);
|
767
|
+
if (G && h) {
|
768
|
+
for (var R = 0; R < O.length; R++) 0 < R && ($ += d), $ += w(O[R], R);
|
769
|
+
0 < f.length && ($ += x);
|
1199
770
|
}
|
1200
|
-
for (var
|
1201
|
-
var
|
1202
|
-
if (
|
1203
|
-
for (var
|
1204
|
-
var
|
1205
|
-
|
771
|
+
for (var M = 0; M < f.length; M++) {
|
772
|
+
var q = (G ? O : f[M]).length, y = !1, z = G ? Object.keys(f[M]).length === 0 : f[M].length === 0;
|
773
|
+
if (J && !G && (y = J === "greedy" ? f[M].join("").trim() === "" : f[M].length === 1 && f[M][0].length === 0), J === "greedy" && G) {
|
774
|
+
for (var W = [], I = 0; I < q; I++) {
|
775
|
+
var F = ot ? O[I] : I;
|
776
|
+
W.push(f[M][F]);
|
1206
777
|
}
|
1207
|
-
|
778
|
+
y = W.join("").trim() === "";
|
1208
779
|
}
|
1209
|
-
if (!
|
1210
|
-
for (var
|
1211
|
-
0 <
|
1212
|
-
var ht =
|
1213
|
-
|
780
|
+
if (!y) {
|
781
|
+
for (var S = 0; S < q; S++) {
|
782
|
+
0 < S && !z && ($ += d);
|
783
|
+
var ht = G && ot ? O[S] : S;
|
784
|
+
$ += w(f[M][ht], S);
|
1214
785
|
}
|
1215
|
-
|
786
|
+
M < f.length - 1 && (!J || 0 < q && !z) && ($ += x);
|
1216
787
|
}
|
1217
788
|
}
|
1218
|
-
return
|
789
|
+
return $;
|
1219
790
|
}
|
1220
|
-
function
|
1221
|
-
var
|
1222
|
-
return
|
1223
|
-
for (var
|
791
|
+
function w(O, f) {
|
792
|
+
var J, $;
|
793
|
+
return O == null ? "" : O.constructor === Date ? JSON.stringify(O).slice(1, 25) : ($ = !1, U && typeof O == "string" && U.test(O) && (O = "'" + O, $ = !0), J = O.toString().replace(_, at), ($ = $ || i === !0 || typeof i == "function" && i(O, f) || Array.isArray(i) && i[f] || ((G, ot) => {
|
794
|
+
for (var R = 0; R < ot.length; R++) if (-1 < G.indexOf(ot[R])) return !0;
|
1224
795
|
return !1;
|
1225
|
-
})(
|
796
|
+
})(J, o.BAD_DELIMITERS) || -1 < J.indexOf(d) || J.charAt(0) === " " || J.charAt(J.length - 1) === " ") ? H + J + H : J);
|
1226
797
|
}
|
1227
798
|
}, o.RECORD_SEP = "", o.UNIT_SEP = "", o.BYTE_ORDER_MARK = "\uFEFF", o.BAD_DELIMITERS = ["\r", `
|
1228
|
-
`, '"', o.BYTE_ORDER_MARK], o.WORKERS_SUPPORTED = !
|
1229
|
-
var
|
1230
|
-
return this.each(function(
|
1231
|
-
if (!(
|
1232
|
-
for (var
|
1233
|
-
}),
|
1234
|
-
function
|
1235
|
-
if (i.length === 0)
|
799
|
+
`, '"', o.BYTE_ORDER_MARK], o.WORKERS_SUPPORTED = !c && !!a.Worker, o.NODE_STREAM_INPUT = 1, o.LocalChunkSize = 10485760, o.RemoteChunkSize = 5242880, o.DefaultDelimiter = ",", o.Parser = B, o.ParserHandle = N, o.NetworkStreamer = E, o.FileStreamer = A, o.StringStreamer = L, o.ReadableStreamStreamer = C, a.jQuery && ((u = a.jQuery).fn.parse = function(t) {
|
800
|
+
var e = t.config || {}, i = [];
|
801
|
+
return this.each(function(x) {
|
802
|
+
if (!(u(this).prop("tagName").toUpperCase() === "INPUT" && u(this).attr("type").toLowerCase() === "file" && a.FileReader) || !this.files || this.files.length === 0) return !0;
|
803
|
+
for (var H = 0; H < this.files.length; H++) i.push({ file: this.files[H], inputElem: this, instanceConfig: u.extend({}, e) });
|
804
|
+
}), h(), this;
|
805
|
+
function h() {
|
806
|
+
if (i.length === 0) p(t.complete) && t.complete();
|
1236
807
|
else {
|
1237
|
-
var
|
1238
|
-
if (
|
1239
|
-
var
|
1240
|
-
if (typeof
|
1241
|
-
if (
|
1242
|
-
if (
|
1243
|
-
typeof
|
1244
|
-
} else if (
|
808
|
+
var x, H, at, st, D = i[0];
|
809
|
+
if (p(t.before)) {
|
810
|
+
var U = t.before(D.file, D.inputElem);
|
811
|
+
if (typeof U == "object") {
|
812
|
+
if (U.action === "abort") return x = "AbortError", H = D.file, at = D.inputElem, st = U.reason, void (p(t.error) && t.error({ name: x }, H, at, st));
|
813
|
+
if (U.action === "skip") return void d();
|
814
|
+
typeof U.config == "object" && (D.instanceConfig = u.extend(D.instanceConfig, U.config));
|
815
|
+
} else if (U === "skip") return void d();
|
1245
816
|
}
|
1246
|
-
var
|
1247
|
-
|
1248
|
-
|
1249
|
-
}, o.parse(
|
817
|
+
var _ = D.instanceConfig.complete;
|
818
|
+
D.instanceConfig.complete = function(Y) {
|
819
|
+
p(_) && _(Y, D.file, D.inputElem), d();
|
820
|
+
}, o.parse(D.file, D.instanceConfig);
|
1250
821
|
}
|
1251
822
|
}
|
1252
|
-
function
|
1253
|
-
i.splice(0, 1),
|
823
|
+
function d() {
|
824
|
+
i.splice(0, 1), h();
|
1254
825
|
}
|
1255
|
-
}),
|
1256
|
-
|
1257
|
-
}), (
|
826
|
+
}), l && (a.onmessage = function(t) {
|
827
|
+
t = t.data, o.WORKER_ID === void 0 && t && (o.WORKER_ID = t.workerId), typeof t.input == "string" ? a.postMessage({ workerId: o.WORKER_ID, results: o.parse(t.input, t.config), finished: !0 }) : (a.File && t.input instanceof File || t.input instanceof Object) && (t = o.parse(t.input, t.config)) && a.postMessage({ workerId: o.WORKER_ID, results: t, finished: !0 });
|
828
|
+
}), (E.prototype = Object.create(b.prototype)).constructor = E, (A.prototype = Object.create(b.prototype)).constructor = A, (L.prototype = Object.create(L.prototype)).constructor = L, (C.prototype = Object.create(b.prototype)).constructor = C, o;
|
1258
829
|
});
|
1259
|
-
}(
|
830
|
+
}(vt)), vt.exports;
|
1260
831
|
}
|
1261
|
-
var
|
1262
|
-
const
|
1263
|
-
let
|
1264
|
-
const
|
1265
|
-
const a = await (await fetch(
|
832
|
+
var qt = Ut();
|
833
|
+
const zt = /* @__PURE__ */ jt(qt);
|
834
|
+
let Ct = [];
|
835
|
+
const kt = async (r) => {
|
836
|
+
const a = await (await fetch(r)).body.getReader().read(), c = new TextDecoder("utf-8").decode(a.value), { data: l } = zt.parse(c, {
|
1266
837
|
header: !0,
|
1267
838
|
dynamicTyping: !0,
|
1268
839
|
delimiter: ";"
|
1269
840
|
});
|
1270
|
-
return
|
1271
|
-
},
|
1272
|
-
|
1273
|
-
})(
|
1274
|
-
const [
|
1275
|
-
|
1276
|
-
|
1277
|
-
}, [
|
1278
|
-
const
|
841
|
+
return l;
|
842
|
+
}, $t = (r = "/translate.csv") => (async (n = "/translate.csv") => {
|
843
|
+
Ct = await kt(n);
|
844
|
+
})(r), it = (r, n, s = [], a = "/translate.csv") => {
|
845
|
+
const [u, c] = P([]);
|
846
|
+
Et(() => {
|
847
|
+
kt(a).then(c), $t(a);
|
848
|
+
}, [n]);
|
849
|
+
const l = u.find((m) => m.code === r) ?? Ct.find((m) => m.code === r);
|
1279
850
|
try {
|
1280
|
-
const
|
1281
|
-
return
|
851
|
+
const m = l[n];
|
852
|
+
return s.reduce((o, b, E) => o.replace(`{${E}}`, b), m);
|
1282
853
|
} catch {
|
1283
854
|
return;
|
1284
855
|
}
|
1285
|
-
},
|
1286
|
-
const
|
856
|
+
}, Zt = async (r, n, s = [], a = "/translate.csv") => {
|
857
|
+
const c = (await kt(a)).find((l) => l.code === r);
|
1287
858
|
try {
|
1288
|
-
const
|
1289
|
-
return
|
859
|
+
const l = c[n];
|
860
|
+
return s.reduce((m, v, o) => m.replace(`{${o}}`, v), l);
|
1290
861
|
} catch {
|
1291
862
|
return "";
|
1292
863
|
}
|
1293
|
-
},
|
1294
|
-
const [
|
1295
|
-
return
|
864
|
+
}, Gt = (r = "/translate.csv") => {
|
865
|
+
const [n, s] = P(/* @__PURE__ */ new Map());
|
866
|
+
return Et(() => {
|
1296
867
|
(async () => {
|
1297
|
-
const
|
1298
|
-
if (
|
1299
|
-
delete
|
1300
|
-
const
|
1301
|
-
|
868
|
+
const c = (await kt(r)).find((l) => l.code === "lan");
|
869
|
+
if (c) {
|
870
|
+
delete c.code;
|
871
|
+
const l = new Map(Object.entries(c));
|
872
|
+
s(l);
|
1302
873
|
}
|
1303
874
|
})();
|
1304
|
-
}, []),
|
1305
|
-
},
|
1306
|
-
const [o,
|
1307
|
-
|
1308
|
-
},
|
1309
|
-
|
1310
|
-
},
|
1311
|
-
return /* @__PURE__ */
|
1312
|
-
|
875
|
+
}, []), n;
|
876
|
+
}, Vt = ({ species: r, language: n, open: s, onClose: a, saveSpecies: u, createDescendant: c, createAncestor: l, deleteAncestor: m, deleteSpecies: v }) => {
|
877
|
+
const [o, b] = P(r.name), [E, A] = P(r.apparition), [L, C] = P(r.duration), [N, T] = P(r.description ?? ""), [B, V] = P(!1), [Z, rt] = P(!1), [et, K] = P(r.image ?? ""), p = () => {
|
878
|
+
V(!B);
|
879
|
+
}, t = () => {
|
880
|
+
rt(!Z);
|
881
|
+
}, e = (i) => i.ancestor ? i.ancestor.descendants.length === 1 && e(i.ancestor) : !0;
|
882
|
+
return /* @__PURE__ */ g(Jt, { open: s, onClose: a, children: /* @__PURE__ */ g("form", { style: { backgroundColor: "grey" }, className: "flex flex-col text-start w-auto fixed p-2.5", children: /* @__PURE__ */ X(
|
883
|
+
Dt,
|
1313
884
|
{
|
1314
885
|
name: o,
|
1315
|
-
setName:
|
1316
|
-
apparition:
|
886
|
+
setName: b,
|
887
|
+
apparition: E,
|
1317
888
|
setApparition: (i) => {
|
1318
|
-
|
889
|
+
A(r.ancestor ? Nt(i, r.ancestor.apparition, r.ancestor.extinction()) : i), C(r.descendants.length > 0 ? Math.max(Math.max(...r.descendants.map((h) => h.apparition)) - E, L) : L);
|
1319
890
|
},
|
1320
|
-
minApparition:
|
1321
|
-
maxApparition:
|
1322
|
-
duration:
|
1323
|
-
setDuration:
|
1324
|
-
minDuration:
|
1325
|
-
maxDuration:
|
1326
|
-
description:
|
1327
|
-
setDescription:
|
1328
|
-
image:
|
1329
|
-
setImage:
|
1330
|
-
language:
|
891
|
+
minApparition: r.ancestor ? r.ancestor.apparition : void 0,
|
892
|
+
maxApparition: r.ancestor ? r.ancestor.extinction() : void 0,
|
893
|
+
duration: L,
|
894
|
+
setDuration: C,
|
895
|
+
minDuration: r.descendants.length > 0 ? Math.max(...r.descendants.map((i) => i.apparition)) - E : void 0,
|
896
|
+
maxDuration: r.descendants.length > 0 ? Math.max(...r.descendants.map((i) => i.apparition)) - E : void 0,
|
897
|
+
description: N,
|
898
|
+
setDescription: T,
|
899
|
+
image: et,
|
900
|
+
setImage: K,
|
901
|
+
language: n,
|
1331
902
|
children: [
|
1332
|
-
/* @__PURE__ */
|
903
|
+
/* @__PURE__ */ g("button", { onClick: async () => {
|
1333
904
|
try {
|
1334
|
-
await (
|
905
|
+
await (u == null ? void 0 : u(r, o, E, L, N, et)), a == null || a();
|
1335
906
|
} catch (i) {
|
1336
907
|
console.error(i);
|
1337
908
|
}
|
1338
|
-
}, children:
|
1339
|
-
/* @__PURE__ */
|
1340
|
-
/* @__PURE__ */
|
1341
|
-
|
1342
|
-
|
909
|
+
}, children: it("spbtn00", n ?? "") }),
|
910
|
+
/* @__PURE__ */ g("button", { type: "button", onClick: v, children: it("spbtn01", n ?? "") }),
|
911
|
+
/* @__PURE__ */ g("button", { type: "button", onClick: p, children: it("spbtn02", n ?? "") }),
|
912
|
+
B && /* @__PURE__ */ g(
|
913
|
+
Bt,
|
1343
914
|
{
|
1344
|
-
species:
|
1345
|
-
language:
|
915
|
+
species: r,
|
916
|
+
language: n,
|
1346
917
|
onClose: a,
|
1347
|
-
createDescendant:
|
918
|
+
createDescendant: c
|
1348
919
|
}
|
1349
920
|
),
|
1350
|
-
|
921
|
+
r.ancestor ? e(r) && /* @__PURE__ */ g("button", { type: "button", onClick: async () => {
|
1351
922
|
try {
|
1352
|
-
await (
|
923
|
+
await (m == null ? void 0 : m()), a == null || a();
|
1353
924
|
} catch (i) {
|
1354
925
|
console.error(i);
|
1355
926
|
}
|
1356
|
-
}, children:
|
1357
|
-
|
1358
|
-
|
927
|
+
}, children: it("spbtn04" + (r.ancestor.ancestor ? "_0" : ""), n ?? "") }) : /* @__PURE__ */ g("button", { type: "button", onClick: t, children: it("spbtn03", n ?? "") }),
|
928
|
+
Z && /* @__PURE__ */ g(
|
929
|
+
Ht,
|
1359
930
|
{
|
1360
|
-
species:
|
1361
|
-
language:
|
931
|
+
species: r,
|
932
|
+
language: n,
|
1362
933
|
onClose: a,
|
1363
|
-
createAncestor:
|
934
|
+
createAncestor: l
|
1364
935
|
}
|
1365
936
|
),
|
1366
|
-
/* @__PURE__ */
|
937
|
+
/* @__PURE__ */ g("button", { type: "button", onClick: a, children: it("spbtn05", n ?? "") })
|
1367
938
|
]
|
1368
939
|
}
|
1369
940
|
) }) });
|
1370
|
-
},
|
1371
|
-
name:
|
1372
|
-
setName:
|
1373
|
-
apparition:
|
941
|
+
}, Dt = ({
|
942
|
+
name: r,
|
943
|
+
setName: n,
|
944
|
+
apparition: s,
|
1374
945
|
setApparition: a,
|
1375
|
-
minApparition:
|
1376
|
-
maxApparition:
|
1377
|
-
duration:
|
1378
|
-
setDuration:
|
1379
|
-
minDuration:
|
946
|
+
minApparition: u,
|
947
|
+
maxApparition: c,
|
948
|
+
duration: l,
|
949
|
+
setDuration: m,
|
950
|
+
minDuration: v,
|
1380
951
|
maxDuration: o,
|
1381
|
-
description:
|
1382
|
-
setDescription:
|
1383
|
-
language:
|
1384
|
-
image:
|
1385
|
-
setImage:
|
1386
|
-
children:
|
1387
|
-
}) => /* @__PURE__ */
|
1388
|
-
/* @__PURE__ */
|
1389
|
-
/* @__PURE__ */
|
1390
|
-
/* @__PURE__ */
|
1391
|
-
|
952
|
+
description: b,
|
953
|
+
setDescription: E,
|
954
|
+
language: A,
|
955
|
+
image: L,
|
956
|
+
setImage: C,
|
957
|
+
children: N
|
958
|
+
}) => /* @__PURE__ */ X(wt, { children: [
|
959
|
+
/* @__PURE__ */ g("table", { children: /* @__PURE__ */ X("tbody", { children: [
|
960
|
+
/* @__PURE__ */ X("tr", { children: [
|
961
|
+
/* @__PURE__ */ X("td", { children: [
|
962
|
+
it("splbl00", A ?? ""),
|
1392
963
|
":"
|
1393
964
|
] }),
|
1394
|
-
/* @__PURE__ */
|
965
|
+
/* @__PURE__ */ g("td", { children: /* @__PURE__ */ g(
|
1395
966
|
"input",
|
1396
967
|
{
|
1397
968
|
type: "text",
|
1398
|
-
value:
|
1399
|
-
onChange: (
|
969
|
+
value: r,
|
970
|
+
onChange: (T) => n(T.target.value)
|
1400
971
|
}
|
1401
972
|
) })
|
1402
973
|
] }),
|
1403
|
-
/* @__PURE__ */
|
1404
|
-
/* @__PURE__ */
|
1405
|
-
|
974
|
+
/* @__PURE__ */ X("tr", { children: [
|
975
|
+
/* @__PURE__ */ X("td", { children: [
|
976
|
+
it("splbl01", A ?? ""),
|
1406
977
|
":"
|
1407
978
|
] }),
|
1408
|
-
/* @__PURE__ */
|
979
|
+
/* @__PURE__ */ g("td", { children: /* @__PURE__ */ g(
|
1409
980
|
"input",
|
1410
981
|
{
|
1411
982
|
type: "number",
|
1412
|
-
min:
|
1413
|
-
max:
|
1414
|
-
value:
|
1415
|
-
onChange: (
|
983
|
+
min: u,
|
984
|
+
max: c,
|
985
|
+
value: s,
|
986
|
+
onChange: (T) => a(Number(T.target.value))
|
1416
987
|
}
|
1417
988
|
) })
|
1418
989
|
] }),
|
1419
|
-
/* @__PURE__ */
|
1420
|
-
/* @__PURE__ */
|
1421
|
-
|
990
|
+
/* @__PURE__ */ X("tr", { children: [
|
991
|
+
/* @__PURE__ */ X("td", { children: [
|
992
|
+
it("splbl02", A ?? ""),
|
1422
993
|
":"
|
1423
994
|
] }),
|
1424
|
-
/* @__PURE__ */
|
995
|
+
/* @__PURE__ */ g("td", { children: /* @__PURE__ */ g(
|
1425
996
|
"input",
|
1426
997
|
{
|
1427
998
|
type: "number",
|
1428
|
-
min:
|
999
|
+
min: v,
|
1429
1000
|
max: o,
|
1430
|
-
value:
|
1431
|
-
onChange: (
|
1001
|
+
value: l,
|
1002
|
+
onChange: (T) => m(Number(T.target.value))
|
1432
1003
|
}
|
1433
1004
|
) })
|
1434
1005
|
] }),
|
1435
|
-
/* @__PURE__ */
|
1436
|
-
/* @__PURE__ */
|
1437
|
-
|
1006
|
+
/* @__PURE__ */ X("tr", { children: [
|
1007
|
+
/* @__PURE__ */ X("td", { children: [
|
1008
|
+
it("splbl03", A ?? ""),
|
1438
1009
|
":"
|
1439
1010
|
] }),
|
1440
|
-
/* @__PURE__ */
|
1011
|
+
/* @__PURE__ */ g("td", { children: /* @__PURE__ */ g(
|
1441
1012
|
"textarea",
|
1442
1013
|
{
|
1443
|
-
value:
|
1444
|
-
onChange: (
|
1014
|
+
value: b,
|
1015
|
+
onChange: (T) => E(T.target.value)
|
1445
1016
|
}
|
1446
1017
|
) })
|
1447
1018
|
] }),
|
1448
|
-
/* @__PURE__ */
|
1449
|
-
/* @__PURE__ */
|
1450
|
-
|
1019
|
+
/* @__PURE__ */ X("tr", { children: [
|
1020
|
+
/* @__PURE__ */ X("td", { children: [
|
1021
|
+
it("splbl04", A ?? ""),
|
1451
1022
|
":"
|
1452
1023
|
] }),
|
1453
|
-
/* @__PURE__ */
|
1024
|
+
/* @__PURE__ */ g("td", { children: /* @__PURE__ */ g(
|
1454
1025
|
"input",
|
1455
1026
|
{
|
1456
1027
|
type: "text",
|
1457
|
-
value:
|
1458
|
-
onChange: (
|
1028
|
+
value: L,
|
1029
|
+
onChange: (T) => C(T.target.value)
|
1459
1030
|
}
|
1460
1031
|
) })
|
1461
1032
|
] }),
|
1462
|
-
/* @__PURE__ */
|
1033
|
+
/* @__PURE__ */ g("tr", { children: /* @__PURE__ */ g("td", { colSpan: 2, children: /* @__PURE__ */ g(
|
1463
1034
|
"img",
|
1464
1035
|
{
|
1465
|
-
src:
|
1036
|
+
src: L,
|
1466
1037
|
style: { height: "100px" }
|
1467
1038
|
}
|
1468
1039
|
) }) })
|
1469
1040
|
] }) }),
|
1470
|
-
|
1471
|
-
] }),
|
1472
|
-
const [
|
1473
|
-
return /* @__PURE__ */
|
1474
|
-
|
1041
|
+
N
|
1042
|
+
] }), Bt = ({ species: r, language: n, onClose: s, createDescendant: a }) => {
|
1043
|
+
const [u, c] = P(""), [l, m] = P(r.duration), [v, o] = P(r.duration), [b, E] = P(""), [A, L] = P("");
|
1044
|
+
return /* @__PURE__ */ g(wt, { children: /* @__PURE__ */ g(
|
1045
|
+
Dt,
|
1475
1046
|
{
|
1476
|
-
name:
|
1477
|
-
setName:
|
1478
|
-
apparition:
|
1479
|
-
setApparition: (
|
1480
|
-
minApparition:
|
1481
|
-
maxApparition:
|
1482
|
-
duration:
|
1047
|
+
name: u,
|
1048
|
+
setName: c,
|
1049
|
+
apparition: r.apparition + l,
|
1050
|
+
setApparition: (C) => m(C - r.apparition),
|
1051
|
+
minApparition: r.apparition,
|
1052
|
+
maxApparition: r.extinction(),
|
1053
|
+
duration: v,
|
1483
1054
|
setDuration: o,
|
1484
|
-
description:
|
1485
|
-
setDescription:
|
1486
|
-
image:
|
1487
|
-
setImage:
|
1488
|
-
language:
|
1489
|
-
children: /* @__PURE__ */
|
1055
|
+
description: b,
|
1056
|
+
setDescription: E,
|
1057
|
+
image: A,
|
1058
|
+
setImage: L,
|
1059
|
+
language: n,
|
1060
|
+
children: /* @__PURE__ */ g("button", { type: "button", onClick: async () => {
|
1490
1061
|
try {
|
1491
|
-
await (a == null ? void 0 : a(
|
1492
|
-
} catch (
|
1493
|
-
console.error(
|
1062
|
+
await (a == null ? void 0 : a(r, u, l, v, b, A)), s == null || s();
|
1063
|
+
} catch (C) {
|
1064
|
+
console.error(C);
|
1494
1065
|
}
|
1495
|
-
}, children:
|
1066
|
+
}, children: it("cdbtn00", n ?? "") })
|
1496
1067
|
}
|
1497
1068
|
) });
|
1498
|
-
},
|
1499
|
-
const [
|
1500
|
-
return /* @__PURE__ */
|
1501
|
-
|
1069
|
+
}, Ht = ({ species: r, language: n, onClose: s, createAncestor: a }) => {
|
1070
|
+
const [u, c] = P(""), [l, m] = P(r.duration), [v, o] = P(r.duration), [b, E] = P(""), [A, L] = P("");
|
1071
|
+
return /* @__PURE__ */ g(wt, { children: /* @__PURE__ */ g(
|
1072
|
+
Dt,
|
1502
1073
|
{
|
1503
|
-
name:
|
1504
|
-
setName:
|
1505
|
-
apparition:
|
1506
|
-
setApparition: (
|
1507
|
-
|
1074
|
+
name: u,
|
1075
|
+
setName: c,
|
1076
|
+
apparition: r.apparition - l,
|
1077
|
+
setApparition: (C) => {
|
1078
|
+
m(r.apparition - C), o(Math.max(r.apparition - C, v));
|
1508
1079
|
},
|
1509
|
-
maxApparition:
|
1510
|
-
duration:
|
1080
|
+
maxApparition: r.apparition,
|
1081
|
+
duration: v,
|
1511
1082
|
setDuration: o,
|
1512
|
-
minDuration:
|
1513
|
-
description:
|
1514
|
-
setDescription:
|
1515
|
-
image:
|
1516
|
-
setImage:
|
1517
|
-
language:
|
1518
|
-
children: /* @__PURE__ */
|
1083
|
+
minDuration: l,
|
1084
|
+
description: b,
|
1085
|
+
setDescription: E,
|
1086
|
+
image: A,
|
1087
|
+
setImage: L,
|
1088
|
+
language: n,
|
1089
|
+
children: /* @__PURE__ */ g("button", { type: "button", onClick: async () => {
|
1519
1090
|
try {
|
1520
|
-
await (a == null ? void 0 : a(
|
1521
|
-
} catch (
|
1522
|
-
console.error(
|
1091
|
+
await (a == null ? void 0 : a(r, u, l, v, b, A)), s == null || s();
|
1092
|
+
} catch (C) {
|
1093
|
+
console.error(C);
|
1523
1094
|
}
|
1524
|
-
}, children:
|
1095
|
+
}, children: it("cdbtn00", n ?? "") })
|
1525
1096
|
}
|
1526
1097
|
) });
|
1527
|
-
},
|
1098
|
+
}, Jt = ({ open: r, onClose: n, children: s }) => /* @__PURE__ */ g(
|
1528
1099
|
"div",
|
1529
1100
|
{
|
1530
|
-
style: { backgroundColor:
|
1531
|
-
className: `flex fixed inset-0 justify-center items-center transition-colors duration-300 ease-in-out ${
|
1532
|
-
onClick:
|
1533
|
-
children: /* @__PURE__ */
|
1101
|
+
style: { backgroundColor: r ? "rgba(0, 0, 0, 0.2)" : "rgba(0, 0, 0, 0)" },
|
1102
|
+
className: `flex fixed inset-0 justify-center items-center transition-colors duration-300 ease-in-out ${r ? "visible" : "hidden"}`,
|
1103
|
+
onClick: n,
|
1104
|
+
children: /* @__PURE__ */ g(
|
1534
1105
|
"div",
|
1535
1106
|
{
|
1536
1107
|
onClick: (a) => a.stopPropagation(),
|
1537
1108
|
className: "flex justify-center items-center",
|
1538
|
-
children:
|
1109
|
+
children: s
|
1539
1110
|
}
|
1540
1111
|
)
|
1541
1112
|
}
|
1542
1113
|
);
|
1543
1114
|
export {
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1115
|
+
Vt as Menu,
|
1116
|
+
Xt as MultiplePhTrees,
|
1117
|
+
It as PhTree,
|
1118
|
+
gt as Species,
|
1119
|
+
it as codeText,
|
1120
|
+
Zt as codeTextAlt,
|
1121
|
+
Gt as getLanguageOptions
|
1551
1122
|
};
|