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.
@@ -1,128 +1,140 @@
1
- import Pt, { useState as X, useEffect as Ot } from "react";
2
- const Lt = (s, ...r) => s.sort(
3
- (u, a) => {
4
- for (const c of r) {
5
- const [f, h] = [u, a].map((b) => c(b));
6
- if (f !== h) return f - h;
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 yt {
12
- constructor(r = "", u = 0, a = 0, c = void 0, f = [], h = void 0, b = void 0) {
13
- if (this.name = "", this.apparition = 0, this.duration = 0, this.ancestor = void 0, this.descendants = [], this.description = void 0, this.display = !0, this.image = void 0, a <= 0)
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 = r, this.apparition = u, this.duration = a, this.ancestor = c, this.descendants = f, this.description = h === "" ? void 0 : h, this.image = b === "" ? void 0 : b;
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(r = !0) {
18
- return r && this.firstAncestor().stepsUntil(this) % 2 === 0;
29
+ onPosition(n = !0) {
30
+ return n && this.firstAncestor().stepsUntil(this) % 2 === 0;
19
31
  }
20
32
  copy() {
21
- const r = this.firstAncestor(), u = r.allDescendants(!1).indexOf(this);
22
- return yt.fromJSON(r.toJSON()).allDescendants(!1)[u];
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((u) => u !== this);
28
- const r = this.ancestor;
29
- return this.ancestor = void 0, [r.firstAncestor(), this];
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(r) {
32
- if (this.descendants.includes(r))
33
- return this.descendants = this.descendants.filter((u) => u !== r), r.ancestor = void 0, [this.firstAncestor(), r];
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(r) {
36
- if (!(this.ancestor === r && r.descendants.includes(this))) {
37
- if (r.apparition > this.apparition)
38
- throw new Error(`The ancestor's apparition (${r.apparition}) must be before or equal the descendant's apparition (${this.apparition})`);
39
- if (r.extinction() < this.apparition)
40
- throw new Error(`The ancestor's extinction (${r.extinction()}) must be after or equal the descendant's apparition (${this.apparition})`);
41
- this.ancestor !== r && this.unlinkAncestor(), this.ancestor = r, r.descendants.push(this);
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(r) {
45
- if (!(r.ancestor === this && this.descendants.includes(r))) {
46
- if (r.apparition < this.apparition)
47
- throw new Error(`The descendant's apparition (${r.apparition}) must be after or equal the ancestor's apparition (${this.apparition})`);
48
- if (r.extinction() > this.extinction())
49
- throw new Error(`The descendant's extinction (${r.extinction()}) must be before or equal the ancestor's extinction (${this.extinction()})`);
50
- this.descendants.includes(r) || (r.ancestor && r.unlinkAncestor(), this.descendants.push(r), r.ancestor = this);
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(r) {
54
- for (const u of r)
65
+ linkDescendants(n) {
66
+ for (const s of n)
55
67
  try {
56
- this.linkDescendant(u);
68
+ this.linkDescendant(s);
57
69
  } catch (a) {
58
- console.error(`Error linking descendant ${u.name} to ancestor ${this.name}:`, a);
70
+ console.error(`Error linking descendant ${s.name} to ancestor ${this.name}:`, a);
59
71
  }
60
72
  }
61
- addDescendant(r = "", u = 0, a = 0, c = void 0, f = void 0, h = !1) {
62
- if (u < 0 || u > this.duration)
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 b = h ? this.copy() : this, j = new yt(
65
- r,
66
- b.apparition + Math.max(u, 0),
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
- c,
71
- f
82
+ u,
83
+ c
72
84
  );
73
- return j.linkAncestor(b), h ? b : j;
85
+ return v.linkAncestor(m), l ? m : v;
74
86
  }
75
- removeDescendant(r) {
76
- this.descendants = this.descendants.filter((u) => u !== r);
87
+ removeDescendant(n) {
88
+ this.descendants = this.descendants.filter((s) => s !== n);
77
89
  }
78
- addAncestor(r = "", u = 0, a = 0, c = void 0, f = void 0, h = !0, b = !1) {
79
- if (u < 0)
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 < u)
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 j = b ? this.copy() : this, o = new yt(
84
- r,
85
- j.apparition - Math.max(u, 0),
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
- c,
90
- f
101
+ u,
102
+ c
91
103
  );
92
- return o.display = h, j.linkAncestor(o), b ? j : o;
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((r) => r.extinction())) : this.extinction();
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(r = !1) {
104
- return this.ancestor ? this.ancestor.display || r ? this.ancestor.firstAncestor() : this : this;
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(r = !0) {
110
- const u = r ? Lt(this.descendants, (o) => -o.apparition, (o) => -o.absoluteExtinction()) : this.descendants;
111
- if (u.length === 0)
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 = u.filter((o) => o.apparition >= this.extinction()), c = u.filter((o) => a.indexOf(o) === -1), h = (this.onPosition(r) ? Math.ceil : Math.floor)(a.length / 2), b = a.slice(0, h), j = a.slice(h);
114
- return b.flatMap((o) => o.allDescendants(r)).concat([this]).concat(j.flatMap((o) => o.allDescendants(r))).concat(c.flatMap((o) => o.allDescendants(r)));
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(r, u = !1) {
128
+ stepsChain(n, s = !1) {
117
129
  var a;
118
- return this.allDescendants(!1).includes(r) ? [this].concat(((a = this.descendants.find((c) => c.allDescendants(!1).includes(r))) == null ? void 0 : a.stepsChain(r)) ?? []).filter((c) => c.display || u) : [];
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(r, u = !1) {
121
- if (this.allDescendants(!1).includes(r))
122
- return this.stepsChain(r, u).length - 1;
132
+ stepsUntil(n, s = !1) {
133
+ if (this.allDescendants(!1).includes(n))
134
+ return this.stepsChain(n, s).length - 1;
123
135
  }
124
- stepsUntilLastDescendant(r = !1) {
125
- return this.descendants.length === 0 ? 0 : Math.max(...this.allDescendants(!1).filter((u) => u.descendants.length === 0).map((u) => this.stepsUntil(u, r) ?? 0));
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((r) => r.toJSON()) : void 0,
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(r = void 0) {
150
+ async saveJSON(n = void 0) {
139
151
  try {
140
- const u = JSON.stringify(this.toJSON(), null, 2), a = new Blob([u], { type: "application/json" }), c = URL.createObjectURL(a), f = document.createElement("a");
141
- f.href = c, f.download = r ?? `${this.name}.json`, f.click(), URL.revokeObjectURL(c);
142
- } catch (u) {
143
- console.error("Error saving file:", u);
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(r, u) {
147
- const a = r.afterApparition ?? 0, c = u ? u.apparition : r.apparition ?? 0, f = new yt(r.name ?? "", c + a, r.duration ?? 0, u, [], r.description, r.image);
148
- if (r.descendants)
149
- for (const h of r.descendants)
150
- f.descendants.push(yt.fromJSON(h, f));
151
- return f;
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
- function It(s) {
155
- return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
156
- }
157
- var kt = { exports: {} }, Et = {};
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: c = "grey",
604
- format: f = (T) => T.toString(),
605
- chronoScale: h = !0,
606
- showImages: b = !0,
607
- presentTime: j,
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: R
177
+ children: b
610
178
  }) => {
611
- const T = s.map((z) => z.copy()), L = Math.min(...T.map((z) => z.apparition)), U = Math.max(...T.map((z) => z.apparition - L)), P = new yt(
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 P.display = !1, P.linkDescendants(T), /* @__PURE__ */ d.jsx(
619
- qt,
186
+ return C.display = !1, C.linkDescendants(E), /* @__PURE__ */ g(
187
+ It,
620
188
  {
621
- commonAncestor: P,
622
- width: r,
623
- height: u,
189
+ commonAncestor: C,
190
+ width: n,
191
+ height: s,
624
192
  padding: a,
625
- stroke: c,
626
- format: f,
627
- chronoScale: h,
628
- showImages: b,
629
- presentTime: j,
193
+ stroke: u,
194
+ format: c,
195
+ chronoScale: l,
196
+ showImages: m,
197
+ presentTime: v,
630
198
  handleMouseMove: o,
631
- children: (z, F, Q, st) => R == null ? void 0 : R(z, F, Q, st)
199
+ children: (N, T, B, V) => b == null ? void 0 : b(N, T, B, V)
632
200
  }
633
201
  );
634
- }, qt = ({
635
- commonAncestor: s,
636
- width: r = 1e3,
637
- height: u = 50,
202
+ }, It = ({
203
+ commonAncestor: r,
204
+ width: n = 1e3,
205
+ height: s = 50,
638
206
  padding: a = 0,
639
- stroke: c = "grey",
640
- format: f = (T) => T.toString(),
641
- chronoScale: h = !0,
642
- showImages: b = !0,
643
- presentTime: j,
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: R
213
+ children: b
646
214
  }) => {
647
- const [T, L] = X(!1), [U, P] = X(void 0), [z, F] = X(void 0), [Q, st] = X(s.allDescendants().reduce((e, n) => e.set(n, !0), /* @__PURE__ */ new Map()));
648
- Ot(() => {
649
- st(s.allDescendants().reduce((e, n) => e.set(n, !0), /* @__PURE__ */ new Map()));
650
- }, [s]);
651
- const nt = (e) => {
652
- P(T ? void 0 : e), L(!T);
653
- }, ut = (e) => {
654
- const n = new Map(Q);
655
- n.set(e, !Q.get(e)), st(n);
656
- }, ot = (e) => {
657
- F(e);
658
- }, Z = j !== void 0 && h, x = (e) => b ? e.map((n) => n.image ? 2 : 1).reduce((n, i) => n + i) : e.length;
659
- return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
660
- /* @__PURE__ */ d.jsx(
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: r * (Z ? (Math.min(j, s.absoluteExtinction()) - s.apparition) / s.absoluteDuration() : 1),
664
- height: u * x(Z ? s.allDescendants().filter((e) => e.apparition < j) : s.allDescendants()),
665
- onMouseMove: (e) => {
666
- o == null || o(e.clientX, e.clientY);
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__ */ d.jsx(
669
- Nt,
236
+ children: /* @__PURE__ */ g(
237
+ At,
670
238
  {
671
- commonAncestor: s,
672
- species: s,
239
+ commonAncestor: r,
240
+ species: r,
673
241
  y: -1,
674
- scaleX: r / (h ? s.absoluteDuration() : Math.max(0, s.stepsUntilLastDescendant()) + 1),
675
- scaleY: u,
242
+ scaleX: n / (l ? r.absoluteDuration() : Math.max(0, r.stepsUntilLastDescendant()) + 1),
243
+ scaleY: s,
676
244
  padding: a,
677
- stroke: c,
678
- format: f,
679
- chronoScale: h,
680
- showImages: b,
681
- presentTime: j,
682
- toggleShowMenu: nt,
683
- hoverShowMenu: ot,
684
- showDesc: Q,
685
- changeShowDesc: ut
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
- R == null ? void 0 : R(U, T, nt, z)
258
+ b == null ? void 0 : b(L, E, Z, N)
691
259
  ] });
692
- }, Nt = ({
693
- commonAncestor: s,
694
- species: r,
695
- y: u,
260
+ }, At = ({
261
+ commonAncestor: r,
262
+ species: n,
263
+ y: s,
696
264
  scaleX: a,
697
- scaleY: c,
698
- padding: f = 0,
699
- stroke: h = "grey",
700
- format: b = (z) => z.toString(),
701
- chronoScale: j = !0,
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: R = void 0,
704
- toggleShowMenu: T,
705
- hoverShowMenu: L,
706
- showDesc: U,
707
- changeShowDesc: P
271
+ presentTime: b = void 0,
272
+ toggleShowMenu: E,
273
+ hoverShowMenu: A,
274
+ showDesc: L,
275
+ changeShowDesc: C
708
276
  }) => {
709
- const z = R !== void 0 && j, F = s.allDescendants().filter((x) => z ? x.apparition < R : !0), Q = F.indexOf(r), st = (j ? r.apparition - s.apparition : s.stepsUntil(r) ?? 0) * a, nt = st + (j ? Math.min(U.get(r) ? r.duration : r.absoluteDuration(), z ? R - r.apparition : r.absoluteDuration()) : 1) * a, ut = o && Q > 0 ? [...Array(Q).keys()].map((x) => F[x]).map((x) => (x.image ? 2 : 1) * c).reduce((x, e) => x + e) : Q * c, ot = r.descendants.filter((x) => z ? x.apparition < R : !0), Z = ot.length > 0 ? st + (Math.min(...ot.map((x) => x.apparition)) - r.apparition) * a : nt;
710
- return /* @__PURE__ */ d.jsxs("g", { children: [
711
- u >= 0 && /* @__PURE__ */ d.jsx(
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: st,
715
- y1: u,
716
- x2: st,
717
- y2: ut,
718
- stroke: h
282
+ x1: V,
283
+ y1: s,
284
+ x2: V,
285
+ y2: rt,
286
+ stroke: l
719
287
  }
720
288
  ),
721
- r.display && /* @__PURE__ */ d.jsx(
722
- zt,
289
+ n.display && /* @__PURE__ */ g(
290
+ Ft,
723
291
  {
724
- commonAncestor: s,
725
- species: r,
726
- height: c,
727
- x1: st,
728
- x2: nt,
729
- x0: Z,
730
- y: ut,
731
- stroke: h,
732
- changeShowDesc: () => P(r),
733
- showDesc: U.get(r),
734
- padding: f,
735
- format: b,
736
- chronoScale: j,
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: R,
739
- toggleShowMenu: T,
740
- hoverShowMenu: L
306
+ presentTime: b,
307
+ toggleShowMenu: E,
308
+ hoverShowMenu: A
741
309
  }
742
310
  ),
743
- r.descendants.map((x, e) => /* @__PURE__ */ d.jsx("g", { className: U.get(r) && ot.includes(x) ? "block" : "hidden", children: /* @__PURE__ */ d.jsx(
744
- Nt,
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: s,
747
- species: x,
748
- y: x.display ? ut : -1,
314
+ commonAncestor: r,
315
+ species: p,
316
+ y: p.display ? rt : -1,
749
317
  scaleX: a,
750
- scaleY: c,
751
- padding: f,
752
- stroke: h,
753
- format: b,
754
- chronoScale: j,
318
+ scaleY: u,
319
+ padding: c,
320
+ stroke: l,
321
+ format: m,
322
+ chronoScale: v,
755
323
  showImages: o,
756
- presentTime: R,
757
- toggleShowMenu: T,
758
- showDesc: U,
759
- changeShowDesc: P,
760
- hoverShowMenu: L
324
+ presentTime: b,
325
+ toggleShowMenu: E,
326
+ showDesc: L,
327
+ changeShowDesc: C,
328
+ hoverShowMenu: A
761
329
  }
762
- ) }, F.length + e))
763
- ] }, Q);
764
- }, zt = ({
765
- commonAncestor: s,
766
- species: r,
767
- height: u,
330
+ ) }, T.length + t))
331
+ ] }, B);
332
+ }, Ft = ({
333
+ commonAncestor: r,
334
+ species: n,
335
+ height: s,
768
336
  x1: a,
769
- x2: c,
770
- x0: f,
771
- y: h,
772
- stroke: b,
773
- showDesc: j = !0,
337
+ x2: u,
338
+ x0: c,
339
+ y: l,
340
+ stroke: m,
341
+ showDesc: v = !0,
774
342
  changeShowDesc: o = () => {
775
343
  },
776
- padding: R = 0,
777
- format: T = (nt) => nt.toString(),
778
- chronoScale: L = !0,
779
- showImages: U = !0,
780
- presentTime: P,
781
- toggleShowMenu: z,
782
- hoverShowMenu: F,
783
- className: Q,
784
- buttonClassName: st
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 nt = P !== void 0, ut = s.allDescendants().filter((i) => nt ? i.apparition < P : !0), ot = (i) => ut.indexOf(i), Z = r.ancestor && ot(r) > ot(r.ancestor) ? -3 : 1, x = r.descendants.filter((i) => nt ? i.apparition < P : !0), e = x.filter((i) => i.apparition === r.extinction()).length === 0, n = T(Math.min(j ? r.extinction() : r.absoluteExtinction(), nt ? P : r.absoluteExtinction()));
787
- return /* @__PURE__ */ d.jsxs("g", { children: [
788
- /* @__PURE__ */ d.jsx(
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: h,
793
- x2: c,
794
- y2: h,
795
- stroke: b
360
+ y1: l,
361
+ x2: u,
362
+ y2: l,
363
+ stroke: m
796
364
  }
797
365
  ),
798
- /* @__PURE__ */ d.jsx(
366
+ /* @__PURE__ */ g(
799
367
  "foreignObject",
800
368
  {
801
- x: a + R,
802
- y: h + R * Z,
803
- width: (L ? f ?? c : c) - a - 2 * R,
804
- height: u + (U && r.image ? u : 0),
805
- children: /* @__PURE__ */ d.jsxs("div", { className: `flex flex-row justify-between w-full ${Q ?? ""}`, children: [
806
- /* @__PURE__ */ d.jsx("div", { children: L ? T(r.apparition) : "" }),
807
- /* @__PURE__ */ d.jsxs(
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 ${st ?? ""}`,
811
- onClick: () => z(r),
812
- onMouseEnter: () => F(r),
813
- onMouseLeave: () => F(void 0),
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
- r.name,
816
- r.image && U && /* @__PURE__ */ d.jsx(
383
+ n.name,
384
+ n.image && L && /* @__PURE__ */ g(
817
385
  "img",
818
386
  {
819
- src: r.image,
820
- alt: r.name,
821
- style: { height: u }
387
+ src: n.image,
388
+ alt: n.name,
389
+ style: { height: s }
822
390
  }
823
391
  )
824
392
  ]
825
393
  }
826
394
  ),
827
- x.length > 0 ? /* @__PURE__ */ d.jsx("button", { onClick: o, className: "h-1", style: { maxWidth: 4 }, children: (e || !j) && (!f || f === c) ? n : "" }) : /* @__PURE__ */ d.jsx("div", { children: L ? n : "" })
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
- L && f && f < c && /* @__PURE__ */ d.jsx(
399
+ A && c && c < u && /* @__PURE__ */ g(
832
400
  "foreignObject",
833
401
  {
834
- x: f + R,
835
- y: h + R * Z,
836
- width: c - f - 2 * R,
837
- height: u,
838
- children: /* @__PURE__ */ d.jsx("div", { className: "flex flex-row justify-end w-full", children: (e || !j) && L ? n : "" })
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
- }, Wt = (s, r, u) => s < r ? r : s > u ? u : s;
843
- var jt = { exports: {} };
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 Yt = jt.exports, Dt;
851
- function Jt() {
852
- return Dt || (Dt = 1, function(s, r) {
853
- ((u, a) => {
854
- s.exports = a();
855
- })(Yt, function u() {
856
- var a = typeof self < "u" ? self : typeof window < "u" ? window : a !== void 0 ? a : {}, c, f = !a.document && !!a.postMessage, h = a.IS_PAPA_WORKER || !1, b = {}, j = 0, o = {};
857
- function R(e) {
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(n) {
859
- var i = ot(n);
860
- i.chunkSize = parseInt(i.chunkSize), n.step || n.chunk || (i.chunkSize = null), this._handle = new z(i), (this._handle.streamer = this)._config = i;
861
- }).call(this, e), this.parseChunk = function(n, i) {
862
- var p = parseInt(this._config.skipFirstNLines) || 0;
863
- if (this.isFirstChunk && 0 < p) {
864
- let C = this._config.newline;
865
- C || (g = this._config.quoteChar || '"', C = this._handle.guessLineEndings(n, g)), n = [...n.split(C).slice(p)].join(C);
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 && x(this._config.beforeFirstChunk) && (g = this._config.beforeFirstChunk(n)) !== void 0 && (n = g), this.isFirstChunk = !1, this._halted = !1;
868
- var p = this._partialLine + n, g = (this._partialLine = "", this._handle.parse(p, this._baseIndex, !this._finished));
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 (n = g.meta.cursor, p = (this._finished || (this._partialLine = p.substring(n - this._baseIndex), this._baseIndex = n), g && g.data && (this._rowCount += g.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), h) a.postMessage({ results: g, workerId: o.WORKER_ID, finished: p });
871
- else if (x(this._config.chunk) && !i) {
872
- if (this._config.chunk(g, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
873
- this._completeResults = g = void 0;
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(g.data), this._completeResults.errors = this._completeResults.errors.concat(g.errors), this._completeResults.meta = g.meta), this._completed || !p || !x(this._config.complete) || g && g.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = !0), p || g && g.meta.paused || this._nextChunk(), g;
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(n) {
879
- x(this._config.error) ? this._config.error(n) : h && this._config.error && a.postMessage({ workerId: o.WORKER_ID, error: n, finished: !1 });
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 T(e) {
883
- var n;
884
- (e = e || {}).chunkSize || (e.chunkSize = o.RemoteChunkSize), R.call(this, e), this._nextChunk = f ? function() {
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 (n = new XMLHttpRequest(), this._config.withCredentials && (n.withCredentials = this._config.withCredentials), f || (n.onload = Z(this._chunkLoaded, this), n.onerror = Z(this._chunkError, this)), n.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !f), this._config.downloadRequestHeaders) {
894
- var i, p = this._config.downloadRequestHeaders;
895
- for (i in p) n.setRequestHeader(i, p[i]);
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 g;
898
- this._config.chunkSize && (g = this._start + this._config.chunkSize - 1, n.setRequestHeader("Range", "bytes=" + this._start + "-" + g));
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
- n.send(this._config.downloadRequestBody);
901
- } catch (C) {
902
- this._chunkError(C.message);
471
+ e.send(this._config.downloadRequestBody);
472
+ } catch (x) {
473
+ this._chunkError(x.message);
903
474
  }
904
- f && n.status === 0 && this._chunkError();
475
+ c && e.status === 0 && this._chunkError();
905
476
  }
906
477
  }, this._chunkLoaded = function() {
907
- n.readyState === 4 && (n.status < 200 || 400 <= n.status ? this._chunkError() : (this._start += this._config.chunkSize || n.responseText.length, this._finished = !this._config.chunkSize || this._start >= ((i) => (i = i.getResponseHeader("Content-Range")) !== null ? parseInt(i.substring(i.lastIndexOf("/") + 1)) : -1)(n), this.parseChunk(n.responseText)));
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 = n.statusText || i, this._sendError(new Error(i));
480
+ i = e.statusText || i, this._sendError(new Error(i));
910
481
  };
911
482
  }
912
- function L(e) {
913
- (e = e || {}).chunkSize || (e.chunkSize = o.LocalChunkSize), R.call(this, e);
914
- var n, i, p = typeof FileReader < "u";
915
- this.stream = function(g) {
916
- this._input = g, i = g.slice || g.webkitSlice || g.mozSlice, p ? ((n = new FileReader()).onload = Z(this._chunkLoaded, this), n.onerror = Z(this._chunkError, this)) : n = new FileReaderSync(), this._nextChunk();
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 g = this._input, C = (this._config.chunkSize && (C = Math.min(this._start + this._config.chunkSize, this._input.size), g = i.call(g, this._start, C)), n.readAsText(g, this._config.encoding));
921
- p || this._chunkLoaded({ target: { result: C } });
922
- }, this._chunkLoaded = function(g) {
923
- this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(g.target.result);
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(n.error);
496
+ this._sendError(e.error);
926
497
  };
927
498
  }
928
- function U(e) {
929
- var n;
930
- R.call(this, e = e || {}), this.stream = function(i) {
931
- return n = i, this._nextChunk();
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, p;
934
- if (!this._finished) return i = this._config.chunkSize, n = i ? (p = n.substring(0, i), n.substring(i)) : (p = n, ""), this._finished = !n, this.parseChunk(p);
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 P(e) {
938
- R.call(this, e = e || {});
939
- var n = [], i = !0, p = !1;
508
+ function C(t) {
509
+ b.call(this, t = t || {});
510
+ var e = [], i = !0, h = !1;
940
511
  this.pause = function() {
941
- R.prototype.pause.apply(this, arguments), this._input.pause();
512
+ b.prototype.pause.apply(this, arguments), this._input.pause();
942
513
  }, this.resume = function() {
943
- R.prototype.resume.apply(this, arguments), this._input.resume();
944
- }, this.stream = function(g) {
945
- this._input = g, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
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
- p && n.length === 1 && (this._finished = !0);
518
+ h && e.length === 1 && (this._finished = !0);
948
519
  }, this._nextChunk = function() {
949
- this._checkIsFinished(), n.length ? this.parseChunk(n.shift()) : i = !0;
950
- }, this._streamData = Z(function(g) {
520
+ this._checkIsFinished(), e.length ? this.parseChunk(e.shift()) : i = !0;
521
+ }, this._streamData = K(function(d) {
951
522
  try {
952
- n.push(typeof g == "string" ? g : g.toString(this._config.encoding)), i && (i = !1, this._checkIsFinished(), this.parseChunk(n.shift()));
953
- } catch (C) {
954
- this._streamError(C);
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 = Z(function(g) {
957
- this._streamCleanUp(), this._sendError(g);
958
- }, this), this._streamEnd = Z(function() {
959
- this._streamCleanUp(), p = !0, this._streamData("");
960
- }, this), this._streamCleanUp = Z(function() {
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 z(e) {
965
- var n, i, p, g, C = Math.pow(2, 53), V = -C, lt = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, ft = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, A = this, K = 0, y = 0, rt = !1, E = !1, N = [], v = { data: [], errors: [], meta: {} };
966
- function B(D) {
967
- return e.skipEmptyLines === "greedy" ? D.join("").trim() === "" : D.length === 1 && D[0].length === 0;
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 G() {
970
- if (v && p && (dt("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + o.DefaultDelimiter + "'"), p = !1), e.skipEmptyLines && (v.data = v.data.filter(function(k) {
971
- return !B(k);
972
- })), et()) {
973
- let k = function(Y, tt) {
974
- x(e.transformHeader) && (Y = e.transformHeader(Y, tt)), N.push(Y);
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 (v) if (Array.isArray(v.data[0])) {
977
- for (var D = 0; et() && D < v.data.length; D++) v.data[D].forEach(k);
978
- v.data.splice(0, 1);
979
- } else v.data.forEach(k);
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 I(k, Y) {
982
- for (var tt = e.header ? {} : [], $ = 0; $ < k.length; $++) {
983
- var q = $, M = k[$], M = ((ht, O) => ((J) => (e.dynamicTypingFunction && e.dynamicTyping[J] === void 0 && (e.dynamicTyping[J] = e.dynamicTypingFunction(J)), (e.dynamicTyping[J] || e.dynamicTyping) === !0))(ht) ? O === "true" || O === "TRUE" || O !== "false" && O !== "FALSE" && (((J) => {
984
- if (lt.test(J) && (J = parseFloat(J), V < J && J < C))
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
- })(O) ? parseFloat(O) : ft.test(O) ? new Date(O) : O === "" ? null : O) : O)(q = e.header ? $ >= N.length ? "__parsed_extra" : N[$] : q, M = e.transform ? e.transform(M, q) : M);
987
- q === "__parsed_extra" ? (tt[q] = tt[q] || [], tt[q].push(M)) : tt[q] = M;
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 e.header && ($ > N.length ? dt("FieldMismatch", "TooManyFields", "Too many fields: expected " + N.length + " fields but parsed " + $, y + Y) : $ < N.length && dt("FieldMismatch", "TooFewFields", "Too few fields: expected " + N.length + " fields but parsed " + $, y + Y)), tt;
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 H;
992
- v && (e.header || e.dynamicTyping || e.transform) && (H = 1, !v.data.length || Array.isArray(v.data[0]) ? (v.data = v.data.map(I), H = v.data.length) : v.data = I(v.data, 0), e.header && v.meta && (v.meta.fields = N), y += H);
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 et() {
995
- return e.header && N.length === 0;
565
+ function G() {
566
+ return t.header && O.length === 0;
996
567
  }
997
- function dt(D, I, H, k) {
998
- D = { type: D, code: I, message: H }, k !== void 0 && (D.row = k), v.errors.push(D);
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
- x(e.step) && (g = e.step, e.step = function(D) {
1001
- v = D, et() ? G() : (G(), v.data.length !== 0 && (K += D.data.length, e.preview && K > e.preview ? i.abort() : (v.data = v.data[0], g(v, A))));
1002
- }), this.parse = function(D, I, H) {
1003
- var k = e.quoteChar || '"', k = (e.newline || (e.newline = this.guessLineEndings(D, k)), p = !1, e.delimiter ? x(e.delimiter) && (e.delimiter = e.delimiter(D), v.meta.delimiter = e.delimiter) : ((k = ((Y, tt, $, q, M) => {
1004
- var ht, O, J, vt;
1005
- M = M || [",", " ", "|", ";", o.RECORD_SEP, o.UNIT_SEP];
1006
- for (var t = 0; t < M.length; t++) {
1007
- for (var l, m = M[t], w = 0, W = 0, S = 0, _ = (J = void 0, new Q({ comments: q, delimiter: m, newline: tt, preview: 10 }).parse(Y)), it = 0; it < _.data.length; it++) $ && B(_.data[it]) ? S++ : (l = _.data[it].length, W += l, J === void 0 ? J = l : 0 < l && (w += Math.abs(l - J), J = l));
1008
- 0 < _.data.length && (W /= _.data.length - S), (O === void 0 || w <= O) && (vt === void 0 || vt < W) && 1.99 < W && (O = w, ht = m, vt = W);
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: !!(e.delimiter = ht), bestDelimiter: ht };
1011
- })(D, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = k.bestDelimiter : (p = !0, e.delimiter = o.DefaultDelimiter), v.meta.delimiter = e.delimiter), ot(e));
1012
- return e.preview && e.header && k.preview++, n = D, i = new Q(k), v = i.parse(n, I, H), G(), rt ? { meta: { paused: !0 } } : v || { meta: { paused: !1 } };
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 rt;
585
+ return Y;
1015
586
  }, this.pause = function() {
1016
- rt = !0, i.abort(), n = x(e.chunk) ? "" : n.substring(i.getCharIndex());
587
+ Y = !0, i.abort(), e = p(t.chunk) ? "" : e.substring(i.getCharIndex());
1017
588
  }, this.resume = function() {
1018
- A.streamer._halted ? (rt = !1, A.streamer.parseChunk(n, !0)) : setTimeout(A.resume, 3);
589
+ D.streamer._halted ? (Y = !1, D.streamer.parseChunk(e, !0)) : setTimeout(D.resume, 3);
1019
590
  }, this.aborted = function() {
1020
- return E;
591
+ return w;
1021
592
  }, this.abort = function() {
1022
- E = !0, i.abort(), v.meta.aborted = !0, x(e.complete) && e.complete(v), n = "";
1023
- }, this.guessLineEndings = function(Y, k) {
1024
- Y = Y.substring(0, 1048576);
1025
- var k = new RegExp(F(k) + "([^]*?)" + F(k), "gm"), H = (Y = Y.replace(k, "")).split("\r"), k = Y.split(`
1026
- `), Y = 1 < k.length && k[0].length < H[0].length;
1027
- if (H.length === 1 || Y) return `
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 tt = 0, $ = 0; $ < H.length; $++) H[$][0] === `
1030
- ` && tt++;
1031
- return tt >= H.length / 2 ? `\r
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 F(e) {
1036
- return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
606
+ function T(t) {
607
+ return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1037
608
  }
1038
- function Q(e) {
1039
- var n = (e = e || {}).delimiter, i = e.newline, p = e.comments, g = e.step, C = e.preview, V = e.fastMode, lt = null, ft = !1, A = e.quoteChar == null ? '"' : e.quoteChar, K = A;
1040
- if (e.escapeChar !== void 0 && (K = e.escapeChar), (typeof n != "string" || -1 < o.BAD_DELIMITERS.indexOf(n)) && (n = ","), p === n) throw new Error("Comment character same as delimiter");
1041
- p === !0 ? p = "#" : (typeof p != "string" || -1 < o.BAD_DELIMITERS.indexOf(p)) && (p = !1), i !== `
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 y = 0, rt = !1;
1046
- this.parse = function(E, N, v) {
1047
- if (typeof E != "string") throw new Error("Input must be a string");
1048
- var B = E.length, G = n.length, et = i.length, dt = p.length, D = x(g), I = [], H = [], k = [], Y = y = 0;
1049
- if (!E) return w();
1050
- if (V || V !== !1 && E.indexOf(A) === -1) {
1051
- for (var tt = E.split(i), $ = 0; $ < tt.length; $++) {
1052
- if (k = tt[$], y += k.length, $ !== tt.length - 1) y += i.length;
1053
- else if (v) return w();
1054
- if (!p || k.substring(0, dt) !== p) {
1055
- if (D) {
1056
- if (I = [], vt(k.split(n)), W(), rt) return w();
1057
- } else vt(k.split(n));
1058
- if (C && C <= $) return I = I.slice(0, C), w(!0);
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 w();
632
+ return tt();
1062
633
  }
1063
- for (var q = E.indexOf(n, y), M = E.indexOf(i, y), ht = new RegExp(F(K) + F(A), "g"), O = E.indexOf(A, y); ; ) if (E[y] === A) for (O = y, y++; ; ) {
1064
- if ((O = E.indexOf(A, O + 1)) === -1) return v || H.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: I.length, index: y }), l();
1065
- if (O === B - 1) return l(E.substring(y, O).replace(ht, A));
1066
- if (A === K && E[O + 1] === K) O++;
1067
- else if (A === K || O === 0 || E[O - 1] !== K) {
1068
- q !== -1 && q < O + 1 && (q = E.indexOf(n, O + 1));
1069
- var J = t((M = M !== -1 && M < O + 1 ? E.indexOf(i, O + 1) : M) === -1 ? q : Math.min(q, M));
1070
- if (E.substr(O + 1 + J, G) === n) {
1071
- k.push(E.substring(y, O).replace(ht, A)), E[y = O + 1 + J + G] !== A && (O = E.indexOf(A, y)), q = E.indexOf(n, y), M = E.indexOf(i, y);
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 (J = t(M), E.substring(O + 1 + J, O + 1 + J + et) === i) {
1075
- if (k.push(E.substring(y, O).replace(ht, A)), m(O + 1 + J + et), q = E.indexOf(n, y), O = E.indexOf(A, y), D && (W(), rt)) return w();
1076
- if (C && I.length >= C) return w(!0);
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
- H.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: I.length, index: y }), O++;
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 (p && k.length === 0 && E.substring(y, y + dt) === p) {
1083
- if (M === -1) return w();
1084
- y = M + et, M = E.indexOf(i, y), q = E.indexOf(n, y);
1085
- } else if (q !== -1 && (q < M || M === -1)) k.push(E.substring(y, q)), y = q + G, q = E.indexOf(n, y);
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 (M === -1) break;
1088
- if (k.push(E.substring(y, M)), m(M + et), D && (W(), rt)) return w();
1089
- if (C && I.length >= C) return w(!0);
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 l();
1092
- function vt(S) {
1093
- I.push(S), Y = y;
662
+ return dt();
663
+ function pt(Q) {
664
+ M.push(Q), z = _;
1094
665
  }
1095
- function t(S) {
1096
- var _ = 0;
1097
- return _ = S !== -1 && (S = E.substring(O + 1, S)) && S.trim() === "" ? S.length : _;
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 l(S) {
1100
- return v || (S === void 0 && (S = E.substring(y)), k.push(S), y = B, vt(k), D && W()), w();
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 m(S) {
1103
- y = S, vt(k), k = [], M = E.indexOf(i, y);
673
+ function yt(Q) {
674
+ _ = Q, pt(y), y = [], S = w.indexOf(i, _);
1104
675
  }
1105
- function w(S) {
1106
- if (e.header && !N && I.length && !ft) {
1107
- var _ = I[0], it = {}, _t = new Set(_);
1108
- let at = !1;
1109
- for (let pt = 0; pt < _.length; pt++) {
1110
- let ct = _[pt];
1111
- if (it[ct = x(e.transformHeader) ? e.transformHeader(ct, pt) : ct]) {
1112
- let gt, xt = it[ct];
1113
- for (; gt = ct + "_" + xt, xt++, _t.has(gt); ) ;
1114
- _t.add(gt), _[pt] = gt, it[ct]++, at = !0, (lt = lt === null ? {} : lt)[gt] = ct;
1115
- } else it[ct] = 1, _[pt] = ct;
1116
- _t.add(ct);
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
- at && console.warn("Duplicate headers found and renamed."), ft = !0;
689
+ Ot && console.warn("Duplicate headers found and renamed."), st = !0;
1119
690
  }
1120
- return { data: I, errors: H, meta: { delimiter: n, linebreak: i, aborted: rt, truncated: !!S, cursor: Y + (N || 0), renamedHeaders: lt } };
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 W() {
1123
- g(w()), I = [], H = [];
693
+ function ut() {
694
+ d(tt()), M = [], q = [];
1124
695
  }
1125
696
  }, this.abort = function() {
1126
- rt = !0;
697
+ Y = !0;
1127
698
  }, this.getCharIndex = function() {
1128
- return y;
699
+ return _;
1129
700
  };
1130
701
  }
1131
- function st(e) {
1132
- var n = e.data, i = b[n.workerId], p = !1;
1133
- if (n.error) i.userError(n.error, n.file);
1134
- else if (n.results && n.results.data) {
1135
- var g = { abort: function() {
1136
- p = !0, nt(n.workerId, { data: [], errors: [], meta: { aborted: !0 } });
1137
- }, pause: ut, resume: ut };
1138
- if (x(i.userStep)) {
1139
- for (var C = 0; C < n.results.data.length && (i.userStep({ data: n.results.data[C], errors: n.results.errors, meta: n.results.meta }, g), !p); C++) ;
1140
- delete n.results;
1141
- } else x(i.userChunk) && (i.userChunk(n.results, g, n.file), delete n.results);
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
- n.finished && !p && nt(n.workerId, n.results);
714
+ e.finished && !h && Z(e.workerId, e.results);
1144
715
  }
1145
- function nt(e, n) {
1146
- var i = b[e];
1147
- x(i.userComplete) && i.userComplete(n), i.terminate(), delete b[e];
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 ut() {
720
+ function rt() {
1150
721
  throw new Error("Not implemented.");
1151
722
  }
1152
- function ot(e) {
1153
- if (typeof e != "object" || e === null) return e;
1154
- var n, i = Array.isArray(e) ? [] : {};
1155
- for (n in e) i[n] = ot(e[n]);
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 Z(e, n) {
729
+ function K(t, e) {
1159
730
  return function() {
1160
- e.apply(n, arguments);
731
+ t.apply(e, arguments);
1161
732
  };
1162
733
  }
1163
- function x(e) {
1164
- return typeof e == "function";
734
+ function p(t) {
735
+ return typeof t == "function";
1165
736
  }
1166
- return o.parse = function(e, n) {
1167
- var i = (n = n || {}).dynamicTyping || !1;
1168
- if (x(i) && (n.dynamicTypingFunction = i, i = {}), n.dynamicTyping = i, n.transform = !!x(n.transform) && n.transform, !n.worker || !o.WORKERS_SUPPORTED) return i = null, o.NODE_STREAM_INPUT, typeof e == "string" ? (e = ((p) => p.charCodeAt(0) !== 65279 ? p : p.slice(1))(e), i = new (n.download ? T : U)(n)) : e.readable === !0 && x(e.read) && x(e.on) ? i = new P(n) : (a.File && e instanceof File || e instanceof Object) && (i = new L(n)), i.stream(e);
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 p;
1171
- return !!o.WORKERS_SUPPORTED && (p = (() => {
1172
- var g = a.URL || a.webkitURL || null, C = u.toString();
1173
- return o.BLOB_URL || (o.BLOB_URL = g.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", C, ")();"], { type: "text/javascript" })));
1174
- })(), (p = new a.Worker(p)).onmessage = st, p.id = j++, b[p.id] = p);
1175
- })()).userStep = n.step, i.userChunk = n.chunk, i.userComplete = n.complete, i.userError = n.error, n.step = x(n.step), n.chunk = x(n.chunk), n.complete = x(n.complete), n.error = x(n.error), delete n.worker, i.postMessage({ input: e, config: n, workerId: i.id });
1176
- }, o.unparse = function(e, n) {
1177
- var i = !1, p = !0, g = ",", C = `\r
1178
- `, V = '"', lt = V + V, ft = !1, A = null, K = !1, y = ((() => {
1179
- if (typeof n == "object") {
1180
- if (typeof n.delimiter != "string" || o.BAD_DELIMITERS.filter(function(N) {
1181
- return n.delimiter.indexOf(N) !== -1;
1182
- }).length || (g = n.delimiter), typeof n.quotes != "boolean" && typeof n.quotes != "function" && !Array.isArray(n.quotes) || (i = n.quotes), typeof n.skipEmptyLines != "boolean" && typeof n.skipEmptyLines != "string" || (ft = n.skipEmptyLines), typeof n.newline == "string" && (C = n.newline), typeof n.quoteChar == "string" && (V = n.quoteChar), typeof n.header == "boolean" && (p = n.header), Array.isArray(n.columns)) {
1183
- if (n.columns.length === 0) throw new Error("Option columns is empty");
1184
- A = n.columns;
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
- n.escapeChar !== void 0 && (lt = n.escapeChar + V), n.escapeFormulae instanceof RegExp ? K = n.escapeFormulae : typeof n.escapeFormulae == "boolean" && n.escapeFormulae && (K = /^[=+\-@\t\r].*$/);
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(F(V), "g"));
1189
- if (typeof e == "string" && (e = JSON.parse(e)), Array.isArray(e)) {
1190
- if (!e.length || Array.isArray(e[0])) return rt(null, e, ft);
1191
- if (typeof e[0] == "object") return rt(A || Object.keys(e[0]), e, ft);
1192
- } else if (typeof e == "object") return typeof e.data == "string" && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields || A), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : typeof e.data[0] == "object" ? Object.keys(e.data[0]) : []), Array.isArray(e.data[0]) || typeof e.data[0] == "object" || (e.data = [e.data])), rt(e.fields || [], e.data || [], ft);
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 rt(N, v, B) {
1195
- var G = "", et = (typeof N == "string" && (N = JSON.parse(N)), typeof v == "string" && (v = JSON.parse(v)), Array.isArray(N) && 0 < N.length), dt = !Array.isArray(v[0]);
1196
- if (et && p) {
1197
- for (var D = 0; D < N.length; D++) 0 < D && (G += g), G += E(N[D], D);
1198
- 0 < v.length && (G += C);
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 I = 0; I < v.length; I++) {
1201
- var H = (et ? N : v[I]).length, k = !1, Y = et ? Object.keys(v[I]).length === 0 : v[I].length === 0;
1202
- if (B && !et && (k = B === "greedy" ? v[I].join("").trim() === "" : v[I].length === 1 && v[I][0].length === 0), B === "greedy" && et) {
1203
- for (var tt = [], $ = 0; $ < H; $++) {
1204
- var q = dt ? N[$] : $;
1205
- tt.push(v[I][q]);
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
- k = tt.join("").trim() === "";
778
+ y = W.join("").trim() === "";
1208
779
  }
1209
- if (!k) {
1210
- for (var M = 0; M < H; M++) {
1211
- 0 < M && !Y && (G += g);
1212
- var ht = et && dt ? N[M] : M;
1213
- G += E(v[I][ht], M);
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
- I < v.length - 1 && (!B || 0 < H && !Y) && (G += C);
786
+ M < f.length - 1 && (!J || 0 < q && !z) && ($ += x);
1216
787
  }
1217
788
  }
1218
- return G;
789
+ return $;
1219
790
  }
1220
- function E(N, v) {
1221
- var B, G;
1222
- return N == null ? "" : N.constructor === Date ? JSON.stringify(N).slice(1, 25) : (G = !1, K && typeof N == "string" && K.test(N) && (N = "'" + N, G = !0), B = N.toString().replace(y, lt), (G = G || i === !0 || typeof i == "function" && i(N, v) || Array.isArray(i) && i[v] || ((et, dt) => {
1223
- for (var D = 0; D < dt.length; D++) if (-1 < et.indexOf(dt[D])) return !0;
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
- })(B, o.BAD_DELIMITERS) || -1 < B.indexOf(g) || B.charAt(0) === " " || B.charAt(B.length - 1) === " ") ? V + B + V : B);
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 = !f && !!a.Worker, o.NODE_STREAM_INPUT = 1, o.LocalChunkSize = 10485760, o.RemoteChunkSize = 5242880, o.DefaultDelimiter = ",", o.Parser = Q, o.ParserHandle = z, o.NetworkStreamer = T, o.FileStreamer = L, o.StringStreamer = U, o.ReadableStreamStreamer = P, a.jQuery && ((c = a.jQuery).fn.parse = function(e) {
1229
- var n = e.config || {}, i = [];
1230
- return this.each(function(C) {
1231
- if (!(c(this).prop("tagName").toUpperCase() === "INPUT" && c(this).attr("type").toLowerCase() === "file" && a.FileReader) || !this.files || this.files.length === 0) return !0;
1232
- for (var V = 0; V < this.files.length; V++) i.push({ file: this.files[V], inputElem: this, instanceConfig: c.extend({}, n) });
1233
- }), p(), this;
1234
- function p() {
1235
- if (i.length === 0) x(e.complete) && e.complete();
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 C, V, lt, ft, A = i[0];
1238
- if (x(e.before)) {
1239
- var K = e.before(A.file, A.inputElem);
1240
- if (typeof K == "object") {
1241
- if (K.action === "abort") return C = "AbortError", V = A.file, lt = A.inputElem, ft = K.reason, void (x(e.error) && e.error({ name: C }, V, lt, ft));
1242
- if (K.action === "skip") return void g();
1243
- typeof K.config == "object" && (A.instanceConfig = c.extend(A.instanceConfig, K.config));
1244
- } else if (K === "skip") return void g();
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 y = A.instanceConfig.complete;
1247
- A.instanceConfig.complete = function(rt) {
1248
- x(y) && y(rt, A.file, A.inputElem), g();
1249
- }, o.parse(A.file, A.instanceConfig);
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 g() {
1253
- i.splice(0, 1), p();
823
+ function d() {
824
+ i.splice(0, 1), h();
1254
825
  }
1255
- }), h && (a.onmessage = function(e) {
1256
- e = e.data, o.WORKER_ID === void 0 && e && (o.WORKER_ID = e.workerId), typeof e.input == "string" ? a.postMessage({ workerId: o.WORKER_ID, results: o.parse(e.input, e.config), finished: !0 }) : (a.File && e.input instanceof File || e.input instanceof Object) && (e = o.parse(e.input, e.config)) && a.postMessage({ workerId: o.WORKER_ID, results: e, finished: !0 });
1257
- }), (T.prototype = Object.create(R.prototype)).constructor = T, (L.prototype = Object.create(R.prototype)).constructor = L, (U.prototype = Object.create(U.prototype)).constructor = U, (P.prototype = Object.create(R.prototype)).constructor = P, o;
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
- }(jt)), jt.exports;
830
+ }(vt)), vt.exports;
1260
831
  }
1261
- var Bt = Jt();
1262
- const Ht = /* @__PURE__ */ It(Bt);
1263
- let Mt = [];
1264
- const Rt = async (s) => {
1265
- const a = await (await fetch(s)).body.getReader().read(), f = new TextDecoder("utf-8").decode(a.value), { data: h } = Ht.parse(f, {
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 h;
1271
- }, Kt = (s = "/translate.csv") => (async (r = "/translate.csv") => {
1272
- Mt = await Rt(r);
1273
- })(s), mt = (s, r, u = [], a = "/translate.csv") => {
1274
- const [c, f] = X([]);
1275
- Ot(() => {
1276
- Rt(a).then(f), Kt(a);
1277
- }, [r]);
1278
- const h = c.find((b) => b.code === s) ?? Mt.find((b) => b.code === s);
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 b = h[r];
1281
- return u.reduce((o, R, T) => o.replace(`{${T}}`, R), b);
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
- }, te = async (s, r, u = [], a = "/translate.csv") => {
1286
- const f = (await Rt(a)).find((h) => h.code === s);
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 h = f[r];
1289
- return u.reduce((b, j, o) => b.replace(`{${o}}`, j), h);
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
- }, ee = (s = "/translate.csv") => {
1294
- const [r, u] = X(/* @__PURE__ */ new Map());
1295
- return Ot(() => {
864
+ }, Gt = (r = "/translate.csv") => {
865
+ const [n, s] = P(/* @__PURE__ */ new Map());
866
+ return Et(() => {
1296
867
  (async () => {
1297
- const f = (await Rt(s)).find((h) => h.code === "lan");
1298
- if (f) {
1299
- delete f.code;
1300
- const h = new Map(Object.entries(f));
1301
- u(h);
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
- }, []), r;
1305
- }, ne = ({ species: s, language: r, open: u, onClose: a, saveSpecies: c, createDescendant: f, createAncestor: h, deleteAncestor: b, deleteSpecies: j }) => {
1306
- const [o, R] = X(s.name), [T, L] = X(s.apparition), [U, P] = X(s.duration), [z, F] = X(s.description ?? ""), [Q, st] = X(!1), [nt, ut] = X(!1), [ot, Z] = X(s.image ?? ""), x = () => {
1307
- st(!Q);
1308
- }, e = () => {
1309
- ut(!nt);
1310
- }, n = (i) => i.ancestor ? i.ancestor.descendants.length === 1 && n(i.ancestor) : !0;
1311
- return /* @__PURE__ */ d.jsx(Xt, { open: u, onClose: a, children: /* @__PURE__ */ d.jsx("form", { style: { backgroundColor: "grey" }, className: "flex flex-col text-start w-auto fixed p-2.5", children: /* @__PURE__ */ d.jsxs(
1312
- St,
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: R,
1316
- apparition: T,
886
+ setName: b,
887
+ apparition: E,
1317
888
  setApparition: (i) => {
1318
- L(s.ancestor ? Wt(i, s.ancestor.apparition, s.ancestor.extinction()) : i), P(s.descendants.length > 0 ? Math.max(Math.max(...s.descendants.map((p) => p.apparition)) - T, U) : U);
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: s.ancestor ? s.ancestor.apparition : void 0,
1321
- maxApparition: s.ancestor ? s.ancestor.extinction() : void 0,
1322
- duration: U,
1323
- setDuration: P,
1324
- minDuration: s.descendants.length > 0 ? Math.max(...s.descendants.map((i) => i.apparition)) - T : void 0,
1325
- maxDuration: s.descendants.length > 0 ? Math.max(...s.descendants.map((i) => i.apparition)) - T : void 0,
1326
- description: z,
1327
- setDescription: F,
1328
- image: ot,
1329
- setImage: Z,
1330
- language: r,
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__ */ d.jsx("button", { onClick: async () => {
903
+ /* @__PURE__ */ g("button", { onClick: async () => {
1333
904
  try {
1334
- await (c == null ? void 0 : c(s, o, T, U, z, ot)), a == null || a();
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: mt("spbtn00", r ?? "") }),
1339
- /* @__PURE__ */ d.jsx("button", { type: "button", onClick: j, children: mt("spbtn01", r ?? "") }),
1340
- /* @__PURE__ */ d.jsx("button", { type: "button", onClick: x, children: mt("spbtn02", r ?? "") }),
1341
- Q && /* @__PURE__ */ d.jsx(
1342
- Vt,
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: s,
1345
- language: r,
915
+ species: r,
916
+ language: n,
1346
917
  onClose: a,
1347
- createDescendant: f
918
+ createDescendant: c
1348
919
  }
1349
920
  ),
1350
- s.ancestor ? n(s) && /* @__PURE__ */ d.jsx("button", { type: "button", onClick: async () => {
921
+ r.ancestor ? e(r) && /* @__PURE__ */ g("button", { type: "button", onClick: async () => {
1351
922
  try {
1352
- await (b == null ? void 0 : b()), a == null || a();
923
+ await (m == null ? void 0 : m()), a == null || a();
1353
924
  } catch (i) {
1354
925
  console.error(i);
1355
926
  }
1356
- }, children: mt("spbtn04" + (s.ancestor.ancestor ? "_0" : ""), r ?? "") }) : /* @__PURE__ */ d.jsx("button", { type: "button", onClick: e, children: mt("spbtn03", r ?? "") }),
1357
- nt && /* @__PURE__ */ d.jsx(
1358
- Gt,
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: s,
1361
- language: r,
931
+ species: r,
932
+ language: n,
1362
933
  onClose: a,
1363
- createAncestor: h
934
+ createAncestor: l
1364
935
  }
1365
936
  ),
1366
- /* @__PURE__ */ d.jsx("button", { type: "button", onClick: a, children: mt("spbtn05", r ?? "") })
937
+ /* @__PURE__ */ g("button", { type: "button", onClick: a, children: it("spbtn05", n ?? "") })
1367
938
  ]
1368
939
  }
1369
940
  ) }) });
1370
- }, St = ({
1371
- name: s,
1372
- setName: r,
1373
- apparition: u,
941
+ }, Dt = ({
942
+ name: r,
943
+ setName: n,
944
+ apparition: s,
1374
945
  setApparition: a,
1375
- minApparition: c,
1376
- maxApparition: f,
1377
- duration: h,
1378
- setDuration: b,
1379
- minDuration: j,
946
+ minApparition: u,
947
+ maxApparition: c,
948
+ duration: l,
949
+ setDuration: m,
950
+ minDuration: v,
1380
951
  maxDuration: o,
1381
- description: R,
1382
- setDescription: T,
1383
- language: L,
1384
- image: U,
1385
- setImage: P,
1386
- children: z
1387
- }) => /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
1388
- /* @__PURE__ */ d.jsx("table", { children: /* @__PURE__ */ d.jsxs("tbody", { children: [
1389
- /* @__PURE__ */ d.jsxs("tr", { children: [
1390
- /* @__PURE__ */ d.jsxs("td", { children: [
1391
- mt("splbl00", L ?? ""),
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__ */ d.jsx("td", { children: /* @__PURE__ */ d.jsx(
965
+ /* @__PURE__ */ g("td", { children: /* @__PURE__ */ g(
1395
966
  "input",
1396
967
  {
1397
968
  type: "text",
1398
- value: s,
1399
- onChange: (F) => r(F.target.value)
969
+ value: r,
970
+ onChange: (T) => n(T.target.value)
1400
971
  }
1401
972
  ) })
1402
973
  ] }),
1403
- /* @__PURE__ */ d.jsxs("tr", { children: [
1404
- /* @__PURE__ */ d.jsxs("td", { children: [
1405
- mt("splbl01", L ?? ""),
974
+ /* @__PURE__ */ X("tr", { children: [
975
+ /* @__PURE__ */ X("td", { children: [
976
+ it("splbl01", A ?? ""),
1406
977
  ":"
1407
978
  ] }),
1408
- /* @__PURE__ */ d.jsx("td", { children: /* @__PURE__ */ d.jsx(
979
+ /* @__PURE__ */ g("td", { children: /* @__PURE__ */ g(
1409
980
  "input",
1410
981
  {
1411
982
  type: "number",
1412
- min: c,
1413
- max: f,
1414
- value: u,
1415
- onChange: (F) => a(Number(F.target.value))
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__ */ d.jsxs("tr", { children: [
1420
- /* @__PURE__ */ d.jsxs("td", { children: [
1421
- mt("splbl02", L ?? ""),
990
+ /* @__PURE__ */ X("tr", { children: [
991
+ /* @__PURE__ */ X("td", { children: [
992
+ it("splbl02", A ?? ""),
1422
993
  ":"
1423
994
  ] }),
1424
- /* @__PURE__ */ d.jsx("td", { children: /* @__PURE__ */ d.jsx(
995
+ /* @__PURE__ */ g("td", { children: /* @__PURE__ */ g(
1425
996
  "input",
1426
997
  {
1427
998
  type: "number",
1428
- min: j,
999
+ min: v,
1429
1000
  max: o,
1430
- value: h,
1431
- onChange: (F) => b(Number(F.target.value))
1001
+ value: l,
1002
+ onChange: (T) => m(Number(T.target.value))
1432
1003
  }
1433
1004
  ) })
1434
1005
  ] }),
1435
- /* @__PURE__ */ d.jsxs("tr", { children: [
1436
- /* @__PURE__ */ d.jsxs("td", { children: [
1437
- mt("splbl03", L ?? ""),
1006
+ /* @__PURE__ */ X("tr", { children: [
1007
+ /* @__PURE__ */ X("td", { children: [
1008
+ it("splbl03", A ?? ""),
1438
1009
  ":"
1439
1010
  ] }),
1440
- /* @__PURE__ */ d.jsx("td", { children: /* @__PURE__ */ d.jsx(
1011
+ /* @__PURE__ */ g("td", { children: /* @__PURE__ */ g(
1441
1012
  "textarea",
1442
1013
  {
1443
- value: R,
1444
- onChange: (F) => T(F.target.value)
1014
+ value: b,
1015
+ onChange: (T) => E(T.target.value)
1445
1016
  }
1446
1017
  ) })
1447
1018
  ] }),
1448
- /* @__PURE__ */ d.jsxs("tr", { children: [
1449
- /* @__PURE__ */ d.jsxs("td", { children: [
1450
- mt("splbl04", L ?? ""),
1019
+ /* @__PURE__ */ X("tr", { children: [
1020
+ /* @__PURE__ */ X("td", { children: [
1021
+ it("splbl04", A ?? ""),
1451
1022
  ":"
1452
1023
  ] }),
1453
- /* @__PURE__ */ d.jsx("td", { children: /* @__PURE__ */ d.jsx(
1024
+ /* @__PURE__ */ g("td", { children: /* @__PURE__ */ g(
1454
1025
  "input",
1455
1026
  {
1456
1027
  type: "text",
1457
- value: U,
1458
- onChange: (F) => P(F.target.value)
1028
+ value: L,
1029
+ onChange: (T) => C(T.target.value)
1459
1030
  }
1460
1031
  ) })
1461
1032
  ] }),
1462
- /* @__PURE__ */ d.jsx("tr", { children: /* @__PURE__ */ d.jsx("td", { colSpan: 2, children: /* @__PURE__ */ d.jsx(
1033
+ /* @__PURE__ */ g("tr", { children: /* @__PURE__ */ g("td", { colSpan: 2, children: /* @__PURE__ */ g(
1463
1034
  "img",
1464
1035
  {
1465
- src: U,
1036
+ src: L,
1466
1037
  style: { height: "100px" }
1467
1038
  }
1468
1039
  ) }) })
1469
1040
  ] }) }),
1470
- z
1471
- ] }), Vt = ({ species: s, language: r, onClose: u, createDescendant: a }) => {
1472
- const [c, f] = X(""), [h, b] = X(s.duration), [j, o] = X(s.duration), [R, T] = X(""), [L, U] = X("");
1473
- return /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx(
1474
- St,
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: c,
1477
- setName: f,
1478
- apparition: s.apparition + h,
1479
- setApparition: (P) => b(P - s.apparition),
1480
- minApparition: s.apparition,
1481
- maxApparition: s.extinction(),
1482
- duration: j,
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: R,
1485
- setDescription: T,
1486
- image: L,
1487
- setImage: U,
1488
- language: r,
1489
- children: /* @__PURE__ */ d.jsx("button", { type: "button", onClick: async () => {
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(s, c, h, j, R, L)), u == null || u();
1492
- } catch (P) {
1493
- console.error(P);
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: mt("cdbtn00", r ?? "") })
1066
+ }, children: it("cdbtn00", n ?? "") })
1496
1067
  }
1497
1068
  ) });
1498
- }, Gt = ({ species: s, language: r, onClose: u, createAncestor: a }) => {
1499
- const [c, f] = X(""), [h, b] = X(s.duration), [j, o] = X(s.duration), [R, T] = X(""), [L, U] = X("");
1500
- return /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx(
1501
- St,
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: c,
1504
- setName: f,
1505
- apparition: s.apparition - h,
1506
- setApparition: (P) => {
1507
- b(s.apparition - P), o(Math.max(s.apparition - P, j));
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: s.apparition,
1510
- duration: j,
1080
+ maxApparition: r.apparition,
1081
+ duration: v,
1511
1082
  setDuration: o,
1512
- minDuration: h,
1513
- description: R,
1514
- setDescription: T,
1515
- image: L,
1516
- setImage: U,
1517
- language: r,
1518
- children: /* @__PURE__ */ d.jsx("button", { type: "button", onClick: async () => {
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(s, c, h, j, R, L)), u == null || u();
1521
- } catch (P) {
1522
- console.error(P);
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: mt("cdbtn00", r ?? "") })
1095
+ }, children: it("cdbtn00", n ?? "") })
1525
1096
  }
1526
1097
  ) });
1527
- }, Xt = ({ open: s, onClose: r, children: u }) => /* @__PURE__ */ d.jsx(
1098
+ }, Jt = ({ open: r, onClose: n, children: s }) => /* @__PURE__ */ g(
1528
1099
  "div",
1529
1100
  {
1530
- style: { backgroundColor: s ? "rgba(0, 0, 0, 0.2)" : "rgba(0, 0, 0, 0)" },
1531
- className: `flex fixed inset-0 justify-center items-center transition-colors duration-300 ease-in-out ${s ? "visible" : "hidden"}`,
1532
- onClick: r,
1533
- children: /* @__PURE__ */ d.jsx(
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: u
1109
+ children: s
1539
1110
  }
1540
1111
  )
1541
1112
  }
1542
1113
  );
1543
1114
  export {
1544
- ne as Menu,
1545
- Zt as MultiplePhTrees,
1546
- qt as PhTree,
1547
- yt as Species,
1548
- mt as codeText,
1549
- te as codeTextAlt,
1550
- ee as getLanguageOptions
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
  };