lowcoder-comps 0.0.13 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/b554013e.js ADDED
@@ -0,0 +1,86 @@
1
+ import { w as ln, c as H } from "./256b619e.js";
2
+ import { aB as an, aC as M, aD as D, aE as rn, aF as y, Q as on, aG as S, aH as _, aI as un, aJ as t, aK as sn, aL as tn, aM as fn } from "./c7fbe06d.js";
3
+ function cn(l) {
4
+ return l.innerRadius;
5
+ }
6
+ function yn(l) {
7
+ return l.outerRadius;
8
+ }
9
+ function gn(l) {
10
+ return l.startAngle;
11
+ }
12
+ function mn(l) {
13
+ return l.endAngle;
14
+ }
15
+ function pn(l) {
16
+ return l && l.padAngle;
17
+ }
18
+ function dn(l, h, q, E, v, A, J, a) {
19
+ var B = q - l, i = E - h, n = J - v, m = a - A, r = m * B - n * i;
20
+ if (!(r * r < y))
21
+ return r = (n * (h - A) - m * (l - v)) / r, [l + r * B, h + r * i];
22
+ }
23
+ function W(l, h, q, E, v, A, J) {
24
+ var a = l - q, B = h - E, i = (J ? A : -A) / S(a * a + B * B), n = i * B, m = -i * a, r = l + n, s = h + m, f = q + n, c = E + m, K = (r + f) / 2, o = (s + c) / 2, p = f - r, g = c - s, R = p * p + g * g, T = v - A, P = r * c - f * s, C = (g < 0 ? -1 : 1) * S(fn(0, T * T * R - P * P)), F = (P * g - p * C) / R, G = (-P * p - g * C) / R, w = (P * g + p * C) / R, d = (-P * p + g * C) / R, x = F - K, e = G - o, u = w - K, L = d - o;
25
+ return x * x + e * e > u * u + L * L && (F = w, G = d), {
26
+ cx: F,
27
+ cy: G,
28
+ x01: -n,
29
+ y01: -m,
30
+ x11: F * (v / T - 1),
31
+ y11: G * (v / T - 1)
32
+ };
33
+ }
34
+ function vn() {
35
+ var l = cn, h = yn, q = H(0), E = null, v = gn, A = mn, J = pn, a = null, B = ln(i);
36
+ function i() {
37
+ var n, m, r = +l.apply(this, arguments), s = +h.apply(this, arguments), f = v.apply(this, arguments) - rn, c = A.apply(this, arguments) - rn, K = un(c - f), o = c > f;
38
+ if (a || (a = n = B()), s < r && (m = s, s = r, r = m), !(s > y))
39
+ a.moveTo(0, 0);
40
+ else if (K > on - y)
41
+ a.moveTo(s * M(f), s * D(f)), a.arc(0, 0, s, f, c, !o), r > y && (a.moveTo(r * M(c), r * D(c)), a.arc(0, 0, r, c, f, o));
42
+ else {
43
+ var p = f, g = c, R = f, T = c, P = K, C = K, F = J.apply(this, arguments) / 2, G = F > y && (E ? +E.apply(this, arguments) : S(r * r + s * s)), w = _(un(s - r) / 2, +q.apply(this, arguments)), d = w, x = w, e, u;
44
+ if (G > y) {
45
+ var L = sn(G / r * D(F)), j = sn(G / s * D(F));
46
+ (P -= L * 2) > y ? (L *= o ? 1 : -1, R += L, T -= L) : (P = 0, R = T = (f + c) / 2), (C -= j * 2) > y ? (j *= o ? 1 : -1, p += j, g -= j) : (C = 0, p = g = (f + c) / 2);
47
+ }
48
+ var O = s * M(p), Q = s * D(p), z = r * M(T), N = r * D(T);
49
+ if (w > y) {
50
+ var U = s * M(g), V = s * D(g), X = r * M(R), Y = r * D(R), I;
51
+ if (K < an)
52
+ if (I = dn(O, Q, X, Y, U, V, z, N)) {
53
+ var Z = O - I[0], $ = Q - I[1], k = U - I[0], b = V - I[1], nn = 1 / D(tn((Z * k + $ * b) / (S(Z * Z + $ * $) * S(k * k + b * b))) / 2), en = S(I[0] * I[0] + I[1] * I[1]);
54
+ d = _(w, (r - en) / (nn - 1)), x = _(w, (s - en) / (nn + 1));
55
+ } else
56
+ d = x = 0;
57
+ }
58
+ C > y ? x > y ? (e = W(X, Y, O, Q, s, x, o), u = W(U, V, z, N, s, x, o), a.moveTo(e.cx + e.x01, e.cy + e.y01), x < w ? a.arc(e.cx, e.cy, x, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (a.arc(e.cx, e.cy, x, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, s, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), !o), a.arc(u.cx, u.cy, x, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : (a.moveTo(O, Q), a.arc(0, 0, s, p, g, !o)) : a.moveTo(O, Q), !(r > y) || !(P > y) ? a.lineTo(z, N) : d > y ? (e = W(z, N, U, V, r, -d, o), u = W(O, Q, X, Y, r, -d, o), a.lineTo(e.cx + e.x01, e.cy + e.y01), d < w ? a.arc(e.cx, e.cy, d, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (a.arc(e.cx, e.cy, d, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, r, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), o), a.arc(u.cx, u.cy, d, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : a.arc(0, 0, r, T, R, o);
59
+ }
60
+ if (a.closePath(), n)
61
+ return a = null, n + "" || null;
62
+ }
63
+ return i.centroid = function() {
64
+ var n = (+l.apply(this, arguments) + +h.apply(this, arguments)) / 2, m = (+v.apply(this, arguments) + +A.apply(this, arguments)) / 2 - an / 2;
65
+ return [M(m) * n, D(m) * n];
66
+ }, i.innerRadius = function(n) {
67
+ return arguments.length ? (l = typeof n == "function" ? n : H(+n), i) : l;
68
+ }, i.outerRadius = function(n) {
69
+ return arguments.length ? (h = typeof n == "function" ? n : H(+n), i) : h;
70
+ }, i.cornerRadius = function(n) {
71
+ return arguments.length ? (q = typeof n == "function" ? n : H(+n), i) : q;
72
+ }, i.padRadius = function(n) {
73
+ return arguments.length ? (E = n == null ? null : typeof n == "function" ? n : H(+n), i) : E;
74
+ }, i.startAngle = function(n) {
75
+ return arguments.length ? (v = typeof n == "function" ? n : H(+n), i) : v;
76
+ }, i.endAngle = function(n) {
77
+ return arguments.length ? (A = typeof n == "function" ? n : H(+n), i) : A;
78
+ }, i.padAngle = function(n) {
79
+ return arguments.length ? (J = typeof n == "function" ? n : H(+n), i) : J;
80
+ }, i.context = function(n) {
81
+ return arguments.length ? (a = n == null ? null : n, i) : a;
82
+ }, i;
83
+ }
84
+ export {
85
+ vn as a
86
+ };