@pie-element/graphing 10.1.2-next.19 → 10.1.2-next.20

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.
@@ -0,0 +1,551 @@
1
+ import * as __pieBrowserCjsReactRequire from "react";
2
+ const __pieBrowserCjsRequire = (specifier) => {
3
+ switch (specifier) {
4
+ case "react": return __pieBrowserCjsReactRequire;
5
+
6
+
7
+
8
+
9
+ default:
10
+ throw new Error(`Unsupported browser CJS require: ${specifier}`);
11
+ }
12
+ };
13
+ //#region \0rolldown/runtime.js
14
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, n) => {
15
+ let r = {};
16
+ for (var i in e) t(r, i, {
17
+ get: e[i],
18
+ enumerable: !0
19
+ });
20
+ return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
21
+ }, c = (e, i, o, s) => {
22
+ if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
23
+ get: ((e) => i[e]).bind(null, d),
24
+ enumerable: !(s = n(i, d)) || s.enumerable
25
+ });
26
+ return e;
27
+ }, l = (e, t, n) => (c(e, t, "default"), n && c(n, t, "default")), u = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
28
+ value: n,
29
+ enumerable: !0
30
+ }) : a, n)), d = __pieBrowserCjsRequire, f = Object.prototype;
31
+ function p(e) {
32
+ return typeof e == "object" && !!e;
33
+ }
34
+ function m(e) {
35
+ return Array.isArray(e) ? e : typeof e == "number" ? [e] : e.replace(/\[(\d+)\]/g, ".$1").split(".").filter(Boolean);
36
+ }
37
+ function h(e, t = 1) {
38
+ if (!e?.length || t < 1) return [];
39
+ let n = [];
40
+ for (let r = 0; r < e.length; r += t) n.push(e.slice(r, r + t));
41
+ return n;
42
+ }
43
+ function g(e) {
44
+ if (!p(e)) return e;
45
+ if (e instanceof Date) return new Date(e.getTime());
46
+ if (Array.isArray(e)) return e.map((e) => g(e));
47
+ let t = {};
48
+ for (let [n, r] of Object.entries(e)) t[n] = g(r);
49
+ return t;
50
+ }
51
+ function _(e) {
52
+ return (e ?? []).filter(Boolean);
53
+ }
54
+ function v(e, ...t) {
55
+ let n = [...e ?? []];
56
+ for (let e of t) Array.isArray(e) ? n.push(...e) : n.push(e);
57
+ return n;
58
+ }
59
+ function y(e, t = 0, n = {}) {
60
+ let r, i, a, o, s, c = n.leading === !0, l = n.trailing !== !1, u = () => {
61
+ if (!a) return s;
62
+ let t = a, n = o;
63
+ return a = void 0, o = void 0, s = e.apply(n, t), s;
64
+ }, d = () => {
65
+ r && clearTimeout(r), i && clearTimeout(i), r = void 0, i = void 0, a = void 0, o = void 0;
66
+ }, f = function(...e) {
67
+ let d = c && !r;
68
+ return a = e, o = this, d && u(), r && clearTimeout(r), r = setTimeout(() => {
69
+ r = void 0, i &&= (clearTimeout(i), void 0), l ? u() : (a = void 0, o = void 0);
70
+ }, t), n.maxWait !== void 0 && !i && (i = setTimeout(() => {
71
+ r && clearTimeout(r), r = void 0, i = void 0, l || !c ? u() : (a = void 0, o = void 0);
72
+ }, n.maxWait)), s;
73
+ };
74
+ return f.cancel = d, f.flush = () => (r &&= (clearTimeout(r), void 0), i &&= (clearTimeout(i), void 0), u()), f;
75
+ }
76
+ function b(e, t, n) {
77
+ return (e ?? []).filter((e) => !(t ?? []).some((t) => n(e, t)));
78
+ }
79
+ function x(e) {
80
+ let t = [];
81
+ for (let n of e ?? []) Array.isArray(n) ? t.push(...n) : t.push(n);
82
+ return t;
83
+ }
84
+ function S(e, t, n) {
85
+ if (!Array.isArray(t) && e != null && Object.prototype.hasOwnProperty.call(Object(e), t)) {
86
+ let r = e[t];
87
+ return r === void 0 ? n : r;
88
+ }
89
+ let r = e;
90
+ for (let e of m(t)) {
91
+ if (r == null) return n;
92
+ r = r[e];
93
+ }
94
+ return r === void 0 ? n : r;
95
+ }
96
+ function C(e) {
97
+ return e?.[0];
98
+ }
99
+ function w(e) {
100
+ return (e ?? []).slice(0, -1);
101
+ }
102
+ function ee(...e) {
103
+ let [t, ...n] = e;
104
+ return L((t ?? []).filter((e) => n.every((t) => (t ?? []).includes(e))));
105
+ }
106
+ function T(e) {
107
+ return e == null ? !0 : typeof e == "string" || Array.isArray(e) ? e.length === 0 : e instanceof Map || e instanceof Set ? e.size === 0 : !p(e) || Object.keys(e).length === 0;
108
+ }
109
+ function E(e, t, n) {
110
+ let r = n?.(e, t);
111
+ if (r !== void 0) return !!r;
112
+ if (Object.is(e, t)) return !0;
113
+ if (!p(e) || !p(t)) return !1;
114
+ if (e instanceof Date || t instanceof Date) return e instanceof Date && t instanceof Date && e.getTime() === t.getTime();
115
+ if (Array.isArray(e) || Array.isArray(t)) return Array.isArray(e) && Array.isArray(t) && e.length === t.length && e.every((e, r) => E(e, t[r], n));
116
+ let i = Object.keys(e), a = Object.keys(t);
117
+ return i.length === a.length && i.every((r) => f.hasOwnProperty.call(t, r) && E(e[r], t[r], n));
118
+ }
119
+ function D(e, t) {
120
+ return E(e, t);
121
+ }
122
+ function O(e) {
123
+ return Number.isFinite(e);
124
+ }
125
+ function k(e) {
126
+ return typeof e == "function";
127
+ }
128
+ function A(e) {
129
+ return typeof e == "string" || e instanceof String;
130
+ }
131
+ function j(e, t) {
132
+ let n = { ...e ?? {} };
133
+ for (let e of Array.isArray(t) ? t : [t]) delete n[e];
134
+ return n;
135
+ }
136
+ function M(e, t, n = 1) {
137
+ let r = t ?? e, i = t === void 0 ? 0 : e;
138
+ if (n === 0) return [];
139
+ let a = [], o = n > 0;
140
+ for (let e = i; o ? e < r : e > r; e += n) a.push(e);
141
+ return a;
142
+ }
143
+ function N(e, t, n = 1) {
144
+ return M(e, t, n).reverse();
145
+ }
146
+ function P(e, t, n) {
147
+ let r = m(t), i = e;
148
+ return r.forEach((e, t) => {
149
+ if (t === r.length - 1) {
150
+ i[e] = n;
151
+ return;
152
+ }
153
+ let a = r[t + 1];
154
+ i[e] ??= typeof a == "number" || /^\d+$/.test(String(a)) ? [] : {}, i = i[e];
155
+ }), e;
156
+ }
157
+ function F(e) {
158
+ return (e ?? []).slice(1);
159
+ }
160
+ function I(e, t) {
161
+ let n = t ?? ((e) => e);
162
+ return Array.from({ length: Math.max(0, e) }, (e, t) => n(t));
163
+ }
164
+ function L(e) {
165
+ return e != null && e.length ? Array.from(new Set(Array.from(e))) : [];
166
+ }
167
+ function R(e, t) {
168
+ let n = [];
169
+ for (let r of e ?? []) n.some((e) => t(r, e)) || n.push(r);
170
+ return n;
171
+ }
172
+ function z(...e) {
173
+ let t = Math.max(0, ...e.map((e) => e.length));
174
+ return Array.from({ length: t }, (t, n) => e.map((e) => e[n]));
175
+ }
176
+ //#endregion
177
+ //#region ../../../node_modules/.bun/@mapbox+point-geometry@1.1.0/node_modules/@mapbox/point-geometry/index.js
178
+ function B(e, t) {
179
+ this.x = e, this.y = t;
180
+ }
181
+ B.prototype = {
182
+ clone() {
183
+ return new B(this.x, this.y);
184
+ },
185
+ add(e) {
186
+ return this.clone()._add(e);
187
+ },
188
+ sub(e) {
189
+ return this.clone()._sub(e);
190
+ },
191
+ multByPoint(e) {
192
+ return this.clone()._multByPoint(e);
193
+ },
194
+ divByPoint(e) {
195
+ return this.clone()._divByPoint(e);
196
+ },
197
+ mult(e) {
198
+ return this.clone()._mult(e);
199
+ },
200
+ div(e) {
201
+ return this.clone()._div(e);
202
+ },
203
+ rotate(e) {
204
+ return this.clone()._rotate(e);
205
+ },
206
+ rotateAround(e, t) {
207
+ return this.clone()._rotateAround(e, t);
208
+ },
209
+ matMult(e) {
210
+ return this.clone()._matMult(e);
211
+ },
212
+ unit() {
213
+ return this.clone()._unit();
214
+ },
215
+ perp() {
216
+ return this.clone()._perp();
217
+ },
218
+ round() {
219
+ return this.clone()._round();
220
+ },
221
+ mag() {
222
+ return Math.sqrt(this.x * this.x + this.y * this.y);
223
+ },
224
+ equals(e) {
225
+ return this.x === e.x && this.y === e.y;
226
+ },
227
+ dist(e) {
228
+ return Math.sqrt(this.distSqr(e));
229
+ },
230
+ distSqr(e) {
231
+ let t = e.x - this.x, n = e.y - this.y;
232
+ return t * t + n * n;
233
+ },
234
+ angle() {
235
+ return Math.atan2(this.y, this.x);
236
+ },
237
+ angleTo(e) {
238
+ return Math.atan2(this.y - e.y, this.x - e.x);
239
+ },
240
+ angleWith(e) {
241
+ return this.angleWithSep(e.x, e.y);
242
+ },
243
+ angleWithSep(e, t) {
244
+ return Math.atan2(this.x * t - this.y * e, this.x * e + this.y * t);
245
+ },
246
+ _matMult(e) {
247
+ let t = e[0] * this.x + e[1] * this.y, n = e[2] * this.x + e[3] * this.y;
248
+ return this.x = t, this.y = n, this;
249
+ },
250
+ _add(e) {
251
+ return this.x += e.x, this.y += e.y, this;
252
+ },
253
+ _sub(e) {
254
+ return this.x -= e.x, this.y -= e.y, this;
255
+ },
256
+ _mult(e) {
257
+ return this.x *= e, this.y *= e, this;
258
+ },
259
+ _div(e) {
260
+ return this.x /= e, this.y /= e, this;
261
+ },
262
+ _multByPoint(e) {
263
+ return this.x *= e.x, this.y *= e.y, this;
264
+ },
265
+ _divByPoint(e) {
266
+ return this.x /= e.x, this.y /= e.y, this;
267
+ },
268
+ _unit() {
269
+ return this._div(this.mag()), this;
270
+ },
271
+ _perp() {
272
+ let e = this.y;
273
+ return this.y = this.x, this.x = -e, this;
274
+ },
275
+ _rotate(e) {
276
+ let t = Math.cos(e), n = Math.sin(e), r = t * this.x - n * this.y, i = n * this.x + t * this.y;
277
+ return this.x = r, this.y = i, this;
278
+ },
279
+ _rotateAround(e, t) {
280
+ let n = Math.cos(e), r = Math.sin(e), i = t.x + n * (this.x - t.x) - r * (this.y - t.y), a = t.y + r * (this.x - t.x) + n * (this.y - t.y);
281
+ return this.x = i, this.y = a, this;
282
+ },
283
+ _round() {
284
+ return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
285
+ },
286
+ constructor: B
287
+ }, B.convert = function(e) {
288
+ if (e instanceof B) return e;
289
+ if (Array.isArray(e)) return new B(+e[0], +e[1]);
290
+ if (e.x !== void 0 && e.y !== void 0) return new B(+e.x, +e.y);
291
+ throw Error("Expected [x, y] or {x, y} point format");
292
+ };
293
+ //#endregion
294
+ //#region ../../../node_modules/.bun/ms@2.1.3/node_modules/ms/index.js
295
+ var te = /* @__PURE__ */ o(((e, t) => {
296
+ var n = 1e3, r = n * 60, i = r * 60, a = i * 24, o = a * 7, s = a * 365.25;
297
+ t.exports = function(e, t) {
298
+ t ||= {};
299
+ var n = typeof e;
300
+ if (n === "string" && e.length > 0) return c(e);
301
+ if (n === "number" && isFinite(e)) return t.long ? u(e) : l(e);
302
+ throw Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(e));
303
+ };
304
+ function c(e) {
305
+ if (e = String(e), !(e.length > 100)) {
306
+ var t = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);
307
+ if (t) {
308
+ var c = parseFloat(t[1]);
309
+ switch ((t[2] || "ms").toLowerCase()) {
310
+ case "years":
311
+ case "year":
312
+ case "yrs":
313
+ case "yr":
314
+ case "y": return c * s;
315
+ case "weeks":
316
+ case "week":
317
+ case "w": return c * o;
318
+ case "days":
319
+ case "day":
320
+ case "d": return c * a;
321
+ case "hours":
322
+ case "hour":
323
+ case "hrs":
324
+ case "hr":
325
+ case "h": return c * i;
326
+ case "minutes":
327
+ case "minute":
328
+ case "mins":
329
+ case "min":
330
+ case "m": return c * r;
331
+ case "seconds":
332
+ case "second":
333
+ case "secs":
334
+ case "sec":
335
+ case "s": return c * n;
336
+ case "milliseconds":
337
+ case "millisecond":
338
+ case "msecs":
339
+ case "msec":
340
+ case "ms": return c;
341
+ default: return;
342
+ }
343
+ }
344
+ }
345
+ }
346
+ function l(e) {
347
+ var t = Math.abs(e);
348
+ return t >= a ? Math.round(e / a) + "d" : t >= i ? Math.round(e / i) + "h" : t >= r ? Math.round(e / r) + "m" : t >= n ? Math.round(e / n) + "s" : e + "ms";
349
+ }
350
+ function u(e) {
351
+ var t = Math.abs(e);
352
+ return t >= a ? d(e, t, a, "day") : t >= i ? d(e, t, i, "hour") : t >= r ? d(e, t, r, "minute") : t >= n ? d(e, t, n, "second") : e + " ms";
353
+ }
354
+ function d(e, t, n, r) {
355
+ var i = t >= n * 1.5;
356
+ return Math.round(e / n) + " " + r + (i ? "s" : "");
357
+ }
358
+ })), V = /* @__PURE__ */ o(((e, t) => {
359
+ function n(e) {
360
+ n.debug = n, n.default = n, n.coerce = c, n.disable = o, n.enable = i, n.enabled = s, n.humanize = te(), n.destroy = l, Object.keys(e).forEach((t) => {
361
+ n[t] = e[t];
362
+ }), n.names = [], n.skips = [], n.formatters = {};
363
+ function t(e) {
364
+ let t = 0;
365
+ for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n), t |= 0;
366
+ return n.colors[Math.abs(t) % n.colors.length];
367
+ }
368
+ n.selectColor = t;
369
+ function n(e) {
370
+ let t, i = null, a, o;
371
+ function s(...e) {
372
+ if (!s.enabled) return;
373
+ let r = s, i = Number(/* @__PURE__ */ new Date());
374
+ r.diff = i - (t || i), r.prev = t, r.curr = i, t = i, e[0] = n.coerce(e[0]), typeof e[0] != "string" && e.unshift("%O");
375
+ let a = 0;
376
+ e[0] = e[0].replace(/%([a-zA-Z%])/g, (t, i) => {
377
+ if (t === "%%") return "%";
378
+ a++;
379
+ let o = n.formatters[i];
380
+ if (typeof o == "function") {
381
+ let n = e[a];
382
+ t = o.call(r, n), e.splice(a, 1), a--;
383
+ }
384
+ return t;
385
+ }), n.formatArgs.call(r, e), (r.log || n.log).apply(r, e);
386
+ }
387
+ return s.namespace = e, s.useColors = n.useColors(), s.color = n.selectColor(e), s.extend = r, s.destroy = n.destroy, Object.defineProperty(s, "enabled", {
388
+ enumerable: !0,
389
+ configurable: !1,
390
+ get: () => i === null ? (a !== n.namespaces && (a = n.namespaces, o = n.enabled(e)), o) : i,
391
+ set: (e) => {
392
+ i = e;
393
+ }
394
+ }), typeof n.init == "function" && n.init(s), s;
395
+ }
396
+ function r(e, t) {
397
+ let r = n(this.namespace + (t === void 0 ? ":" : t) + e);
398
+ return r.log = this.log, r;
399
+ }
400
+ function i(e) {
401
+ n.save(e), n.namespaces = e, n.names = [], n.skips = [];
402
+ let t = (typeof e == "string" ? e : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
403
+ for (let e of t) e[0] === "-" ? n.skips.push(e.slice(1)) : n.names.push(e);
404
+ }
405
+ function a(e, t) {
406
+ let n = 0, r = 0, i = -1, a = 0;
407
+ for (; n < e.length;) if (r < t.length && (t[r] === e[n] || t[r] === "*")) t[r] === "*" ? (i = r, a = n, r++) : (n++, r++);
408
+ else if (i !== -1) r = i + 1, a++, n = a;
409
+ else return !1;
410
+ for (; r < t.length && t[r] === "*";) r++;
411
+ return r === t.length;
412
+ }
413
+ function o() {
414
+ let e = [...n.names, ...n.skips.map((e) => "-" + e)].join(",");
415
+ return n.enable(""), e;
416
+ }
417
+ function s(e) {
418
+ for (let t of n.skips) if (a(e, t)) return !1;
419
+ for (let t of n.names) if (a(e, t)) return !0;
420
+ return !1;
421
+ }
422
+ function c(e) {
423
+ return e instanceof Error ? e.stack || e.message : e;
424
+ }
425
+ function l() {
426
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
427
+ }
428
+ return n.enable(n.load()), n;
429
+ }
430
+ t.exports = n;
431
+ })), H = /* @__PURE__ */ o(((e, t) => {
432
+ e.formatArgs = r, e.save = i, e.load = a, e.useColors = n, e.storage = o(), e.destroy = (() => {
433
+ let e = !1;
434
+ return () => {
435
+ e || (e = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
436
+ };
437
+ })(), e.colors = /* @__PURE__ */ "#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33".split(".");
438
+ function n() {
439
+ if (typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return !0;
440
+ if (typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return !1;
441
+ let e;
442
+ return typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator < "u" && navigator.userAgent && (e = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(e[1], 10) >= 31 || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
443
+ }
444
+ function r(e) {
445
+ if (e[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + e[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors) return;
446
+ let n = "color: " + this.color;
447
+ e.splice(1, 0, n, "color: inherit");
448
+ let r = 0, i = 0;
449
+ e[0].replace(/%[a-zA-Z%]/g, (e) => {
450
+ e !== "%%" && (r++, e === "%c" && (i = r));
451
+ }), e.splice(i, 0, n);
452
+ }
453
+ e.log = console.debug || console.log || (() => {});
454
+ function i(t) {
455
+ try {
456
+ t ? e.storage.setItem("debug", t) : e.storage.removeItem("debug");
457
+ } catch {}
458
+ }
459
+ function a() {
460
+ let t;
461
+ try {
462
+ t = e.storage.getItem("debug") || e.storage.getItem("DEBUG");
463
+ } catch {}
464
+ return !t && typeof process < "u" && "env" in process && (t = process.env.DEBUG), t;
465
+ }
466
+ function o() {
467
+ try {
468
+ return localStorage;
469
+ } catch {}
470
+ }
471
+ t.exports = V()(e);
472
+ var { formatters: s } = t.exports;
473
+ s.j = function(e) {
474
+ try {
475
+ return JSON.stringify(e);
476
+ } catch (e) {
477
+ return "[UnexpectedJSONParseError]: " + e.message;
478
+ }
479
+ };
480
+ })), U = (0, (/* @__PURE__ */ u(H(), 1)).default)("pie-lib:graphing:tools:utils"), W = (e, t) => {
481
+ if (!t || e.x == t.x) return {
482
+ freq: 0,
483
+ amplitude: 0
484
+ };
485
+ let n = new B(e.x, e.y), r = new B(t.x, t.y).sub(n);
486
+ return {
487
+ freq: r.x * 4,
488
+ amplitude: r.y
489
+ };
490
+ }, G = (e, t, n, r) => (t = Math.abs(t), U("[xPoints] root:", e, "freq:", t, " min:", n, " max:", r), v(N(e, n - t, t * -1), M(e + t, r + t, t))), K = (e, t, n) => (r) => {
491
+ n = {
492
+ phase: 0,
493
+ vertical: 0,
494
+ ...n
495
+ };
496
+ let i = Math.PI * 2 * (r - n.phase) / t;
497
+ return e * parseFloat(Math.sin(i)).toFixed(10) + n.vertical;
498
+ }, q = (e, t) => {
499
+ t ||= { ...e };
500
+ let n = {
501
+ x: e.x - (t.x - e.x),
502
+ y: t.y
503
+ };
504
+ return J(e, t, n);
505
+ }, J = (e, t, n) => {
506
+ U(e, t, n);
507
+ let { a: r, b: i, c: a } = Y(e, t, n);
508
+ return U(r, i, a), X(r, i, a);
509
+ }, Y = (e, t, n) => {
510
+ let r = e.x ** 2 * -1 + t.x ** 2, i = e.x * -1 + t.x, a = e.y * -1 + t.y, o = t.x ** 2 * -1 + n.x ** 2, s = t.x * -1 + n.x, c = t.y * -1 + n.y, l = s / i * -1, u = l * r + o, d = (l * a + c) / u, f = (a - r * d) / i;
511
+ return {
512
+ a: d,
513
+ b: f,
514
+ c: e.y - d * e.x ** 2 - f * e.x
515
+ };
516
+ }, X = (e, t, n) => (r) => e * r ** 2 + t * r + n, Z = (e, t) => (t ||= { ...e }, ne(Q(e, t), e.x, e.y)), Q = (e, t) => {
517
+ let n = (t.y - e.y) / (t.x - e.x);
518
+ return t.x < e.x && (n *= -1), n;
519
+ }, ne = (e, t, n) => (r) => e * Math.abs(r - t) + n, re = (e, t) => {
520
+ t ||= { ...e };
521
+ let { a: n, b: r } = $(e, t);
522
+ return ie(n, r);
523
+ }, $ = (e, t) => {
524
+ let n = (e.y / t.y) ** +(1 / (e.x - t.x));
525
+ return {
526
+ a: e.y / n ** +e.x,
527
+ b: n
528
+ };
529
+ }, ie = (e, t) => (n) => e * t ** +n, ae = (e, t, n, r, i, a = !1) => {
530
+ U("[buildDataPoints] domain:", e, "range:", t, "root:", n, "edge:", r), e = {
531
+ min: 0,
532
+ max: 0,
533
+ step: 1,
534
+ ...e
535
+ }, t = {
536
+ min: 0,
537
+ max: 0,
538
+ step: 1,
539
+ ...t
540
+ }, r ||= { ...n };
541
+ let o = G(Math.min(n.x, r.x), e.step, e.min - e.step, e.max + e.step);
542
+ U("[buildDataPoints]:xPts:", o);
543
+ let s = -1, c = -1, l = o.map((e) => new B(e, i(e)));
544
+ if (!a) return l;
545
+ let u = l.reduce((e, n, r) => n.y >= t.min - t.step && n.y <= t.max + t.step ? (s === -1 && (s = r), c < r && (c = r), [...e, n]) : e, []);
546
+ return s - 1 >= 0 && u.unshift(l[s - 1]), c + 1 <= l.length - 1 && u.push(l[c + 1]), l;
547
+ };
548
+ //#endregion
549
+ export { h as A, F as C, g as D, b as E, o as F, s as I, l as L, w as M, S as N, I as O, x as P, d as R, M as S, y as T, P as _, K as a, T as b, q as c, B as d, L as f, A as g, ee as h, Q as i, _ as j, z as k, $ as l, C as m, ae as n, Z as o, D as p, Y as r, W as s, re as t, H as u, O as v, R as w, j as x, k as y, u as z };
550
+
551
+ //# sourceMappingURL=dist-DFbF_Nd-.js.map