@mobileaction/action-kit 1.57.0 → 1.57.1

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,235 +0,0 @@
1
- import { g as Ct } from "./index-C8r4OcCO.js";
2
- function _t(W, R) {
3
- for (var T = 0; T < R.length; T++) {
4
- const v = R[T];
5
- if (typeof v != "string" && !Array.isArray(v)) {
6
- for (const Y in v)
7
- if (Y !== "default" && !(Y in W)) {
8
- const _ = Object.getOwnPropertyDescriptor(v, Y);
9
- _ && Object.defineProperty(W, Y, _.get ? _ : {
10
- enumerable: !0,
11
- get: () => v[Y]
12
- });
13
- }
14
- }
15
- }
16
- return Object.freeze(Object.defineProperty(W, Symbol.toStringTag, { value: "Module" }));
17
- }
18
- var B = { exports: {} }, Dt = B.exports, nt;
19
- function Wt() {
20
- return nt || (nt = 1, function(W, R) {
21
- /**
22
- * Highcharts JS v12.3.0 (2025-06-21)
23
- * @module highcharts/modules/wordcloud
24
- * @requires highcharts
25
- *
26
- * (c) 2016-2025 Highsoft AS
27
- * Authors: Jon Arild Nygard
28
- *
29
- * License: www.highcharts.com/license
30
- */
31
- (function(T, v) {
32
- W.exports = v(T._Highcharts, T._Highcharts.SeriesRegistry);
33
- })(typeof window > "u" ? Dt : window, (T, v) => (() => {
34
- var Y = { 512: (e) => {
35
- e.exports = v;
36
- }, 944: (e) => {
37
- e.exports = T;
38
- } }, _ = {};
39
- function M(e) {
40
- var t = _[e];
41
- if (t !== void 0) return t.exports;
42
- var o = _[e] = { exports: {} };
43
- return Y[e](o, o.exports, M), o.exports;
44
- }
45
- M.n = (e) => {
46
- var t = e && e.__esModule ? () => e.default : () => e;
47
- return M.d(t, { a: t }), t;
48
- }, M.d = (e, t) => {
49
- for (var o in t) M.o(t, o) && !M.o(e, o) && Object.defineProperty(e, o, { enumerable: !0, get: t[o] });
50
- }, M.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
51
- var V = {};
52
- M.d(V, { default: () => Yt });
53
- var st = M(944), C = M.n(st);
54
- let ht = { draw: function(e, t) {
55
- let { animatableAttribs: o, onComplete: i, css: r, renderer: a } = t, n = e.series && e.series.chart.hasRendered ? void 0 : e.series && e.series.options.animation, l = e.graphic;
56
- if (t.attribs = { ...t.attribs, class: e.getClassName() }, e.shouldDraw()) l || (e.graphic = l = t.shapeType === "text" ? a.text() : t.shapeType === "image" ? a.image(t.imageUrl || "").attr(t.shapeArgs || {}) : a[t.shapeType](t.shapeArgs || {}), l.add(t.group)), r && l.css(r), l.attr(t.attribs).animate(o, !t.isNew && n, i);
57
- else if (l) {
58
- let u = () => {
59
- e.graphic = l = l && l.destroy(), typeof i == "function" && i();
60
- };
61
- Object.keys(o).length ? l.animate(o, void 0, () => u()) : u();
62
- }
63
- } };
64
- var dt = M(512), E = M.n(dt);
65
- let { column: { prototype: { pointClass: pt } } } = E().seriesTypes, { extend: ut } = C();
66
- class k extends pt {
67
- isValid() {
68
- return !0;
69
- }
70
- }
71
- ut(k.prototype, { weight: 1 });
72
- let { deg2rad: ct } = C(), { extend: gt, find: q, isNumber: F, isObject: H, merge: ft } = C();
73
- function mt(e, t) {
74
- return !(t.left > e.right || t.right < e.left || t.top > e.bottom || t.bottom < e.top);
75
- }
76
- function $(e) {
77
- let t = e.axes || [];
78
- return t.length || (t = [], e.concat([e[0]]).reduce((o, i) => {
79
- let r = function(a, n) {
80
- let l = n[0] - a[0], u = n[1] - a[1];
81
- return [[-u, l], [u, -l]];
82
- }(o, i)[0];
83
- return q(t, (a) => a[0] === r[0] && a[1] === r[1]) || t.push(r), i;
84
- }), e.axes = t), t;
85
- }
86
- function I(e, t) {
87
- let o = e.map((i) => {
88
- let r = i[0], a = i[1];
89
- return r * t[0] + a * t[1];
90
- });
91
- return { min: Math.min.apply(this, o), max: Math.max.apply(this, o) };
92
- }
93
- function G(e, t) {
94
- let o = $(e), i = $(t);
95
- return !q(o.concat(i), (r) => function(a, n, l) {
96
- let u = I(n, a), h = I(l, a);
97
- return h.min > u.max || h.max < u.min;
98
- }(r, e, t));
99
- }
100
- function J(e, t) {
101
- let o = 4 * e, i = Math.ceil((Math.sqrt(o) - 1) / 2), r = 2 * i + 1, a = Math.pow(r, 2), n = !1;
102
- return r -= 1, e <= 1e4 && (typeof n == "boolean" && o >= a - r && (n = { x: i - (a - o), y: -i }), a -= r, typeof n == "boolean" && o >= a - r && (n = { x: -i, y: -i + (a - o) }), a -= r, typeof n == "boolean" && (n = o >= a - r ? { x: -i + (a - o), y: i } : { x: i, y: i - (a - o - r) }), n.x *= 5, n.y *= 5), n;
103
- }
104
- function K(e, t) {
105
- let o = Math.pow(10, F(t) ? t : 14);
106
- return Math.round(e * o) / o;
107
- }
108
- function Q(e, t) {
109
- let o = e[0], i = e[1], r = -(ct * t), a = Math.cos(r), n = Math.sin(r);
110
- return [K(o * a - i * n), K(o * n + i * a)];
111
- }
112
- function Z(e, t, o) {
113
- let i = Q([e[0] - t[0], e[1] - t[1]], o);
114
- return [i[0] + t[0], i[1] + t[1]];
115
- }
116
- let { noop: N } = C(), { column: tt } = E().seriesTypes, { extend: j, isArray: xt, isNumber: D, isObject: et, merge: yt } = C(), { archimedeanSpiral: bt, extendPlayingField: ot, getBoundingBoxFromPolygon: Mt, getPlayingField: wt, getPolygon: St, getRandomPosition: it, getRotation: L, getScale: Pt, getSpiral: At, intersectionTesting: rt, isPolygonsColliding: vt, rectangularSpiral: Ft, rotate2DToOrigin: Xt, rotate2DToPoint: Tt, squareSpiral: zt, updateFieldBoundaries: Ot } = { archimedeanSpiral: function(e, t) {
117
- let o = t.field, i = o.width * o.width + o.height * o.height, r = 0.8 * e, a = !1;
118
- return e <= 1e4 && (Math.min(Math.abs((a = { x: r * Math.cos(r), y: r * Math.sin(r) }).x), Math.abs(a.y)) < i || (a = !1)), a;
119
- }, extendPlayingField: function(e, t) {
120
- let o, i, r, a, n, l;
121
- return H(e) && H(t) ? (o = t.bottom - t.top, i = t.right - t.left, n = i * (r = e.ratioX) > o * (a = e.ratioY) ? i : o, l = ft(e, { width: e.width + n * r * 2, height: e.height + n * a * 2 })) : l = e, l;
122
- }, getBoundingBoxFromPolygon: function(e) {
123
- return e.reduce(function(t, o) {
124
- let i = o[0], r = o[1];
125
- return t.left = Math.min(i, t.left), t.right = Math.max(i, t.right), t.bottom = Math.max(r, t.bottom), t.top = Math.min(r, t.top), t;
126
- }, { left: Number.MAX_VALUE, right: -Number.MAX_VALUE, bottom: -Number.MAX_VALUE, top: Number.MAX_VALUE });
127
- }, getPlayingField: function(e, t, o) {
128
- let i = o.reduce(function(l, u) {
129
- let h = u.dimensions, s = Math.max(h.width, h.height);
130
- return l.maxHeight = Math.max(l.maxHeight, h.height), l.maxWidth = Math.max(l.maxWidth, h.width), l.area += s * s, l;
131
- }, { maxHeight: 0, maxWidth: 0, area: 0 }), r = Math.max(i.maxHeight, i.maxWidth, 0.85 * Math.sqrt(i.area)), a = e > t ? e / t : 1, n = t > e ? t / e : 1;
132
- return { width: r * a, height: r * n, ratioX: a, ratioY: n };
133
- }, getPolygon: function(e, t, o, i, r) {
134
- let a = [e, t], n = e - o / 2, l = e + o / 2, u = t - i / 2, h = t + i / 2;
135
- return [[n, u], [l, u], [l, h], [n, h]].map(function(s) {
136
- return Z(s, a, -r);
137
- });
138
- }, getRandomPosition: function(e) {
139
- return Math.round(e * (Math.random() + 0.5) / 2);
140
- }, getRotation: function(e, t, o, i) {
141
- let r = !1, a;
142
- return F(e) && F(t) && F(o) && F(i) && e > 0 && t > -1 && i > o && (a = (i - o) / (e - 1 || 1), r = o + t % e * a), r;
143
- }, getScale: function(e, t, o) {
144
- let i = 2 * Math.max(Math.abs(o.top), Math.abs(o.bottom)), r = 2 * Math.max(Math.abs(o.left), Math.abs(o.right));
145
- return Math.min(r > 0 ? 1 / r * e : 1, i > 0 ? 1 / i * t : 1);
146
- }, getSpiral: function(e, t) {
147
- let o = [];
148
- for (let i = 1; i < 1e4; i++) o.push(e(i, t));
149
- return (i) => i <= 1e4 && o[i - 1];
150
- }, intersectionTesting: function(e, t) {
151
- let o = t.placed, i = t.field, r = t.rectangle, a = t.polygon, n = t.spiral, l = e.rect = gt({}, r), u = 1, h = { x: 0, y: 0 };
152
- for (e.polygon = a, e.rotation = t.rotation; h !== !1 && (function(s, f) {
153
- let x = s.rect, S = s.polygon, P = s.lastCollidedWith, A = function(d) {
154
- let m = mt(x, d.rect);
155
- return m && (s.rotation % 90 || d.rotation % 90) && (m = G(S, d.polygon)), m;
156
- }, y = !1;
157
- return P && ((y = A(P)) || delete s.lastCollidedWith), y || (y = !!q(f, function(d) {
158
- let m = A(d);
159
- return m && (s.lastCollidedWith = d), m;
160
- })), y;
161
- }(e, o) || function(s, f) {
162
- let x = { left: -(f.width / 2), right: f.width / 2, top: -(f.height / 2), bottom: f.height / 2 };
163
- return !(x.left < s.left && x.right > s.right && x.top < s.top && x.bottom > s.bottom);
164
- }(l, i)); ) H(h = n(u)) && (l.left = r.left + h.x, l.right = r.right + h.x, l.top = r.top + h.y, l.bottom = r.bottom + h.y, e.polygon = function(s, f, x) {
165
- return x.map(function(S) {
166
- return [S[0] + s, S[1] + f];
167
- });
168
- }(h.x, h.y, a)), u++;
169
- return h;
170
- }, isPolygonsColliding: G, rectangularSpiral: function(e, t) {
171
- let o = J(e), i = t.field;
172
- return o && (o.x *= i.ratioX, o.y *= i.ratioY), o;
173
- }, rotate2DToOrigin: Q, rotate2DToPoint: Z, squareSpiral: J, updateFieldBoundaries: function(e, t) {
174
- return (!F(e.left) || e.left > t.left) && (e.left = t.left), (!F(e.right) || e.right < t.right) && (e.right = t.right), (!F(e.top) || e.top > t.top) && (e.top = t.top), (!F(e.bottom) || e.bottom < t.bottom) && (e.bottom = t.bottom), e;
175
- } };
176
- class U extends tt {
177
- pointAttribs(t, o) {
178
- let i = C().seriesTypes.column.prototype.pointAttribs.call(this, t, o);
179
- return delete i.stroke, delete i["stroke-width"], i;
180
- }
181
- deriveFontSize(t, o, i) {
182
- let r = D(t) ? t : 0, a = D(o) ? o : 1;
183
- return Math.floor(Math.max(D(i) ? i : 1, r * a));
184
- }
185
- drawPoints() {
186
- if (this.zooming || this.defaultScale && this.group.scaleX !== this.defaultScale) return;
187
- let t = this.hasRendered, o = this.xAxis, i = this.yAxis, r = this.chart, a = this.group, n = this.options, l = n.animation, u = n.allowExtendPlayingField, h = r.renderer, s = [], f = this.placementStrategy[n.placementStrategy], x = n.rotation, S = this.points.map(function(p) {
188
- return p.weight;
189
- }), P = Math.max.apply(null, S), A = this.points.concat().sort((p, z) => z.weight - p.weight), y = h.text().add(a), d;
190
- for (let p of (this.group.attr({ scaleX: 1, scaleY: 1 }), A)) {
191
- let z = 1 / P * p.weight, X = j({ fontSize: this.deriveFontSize(z, n.maxFontSize, n.minFontSize) + "px" }, n.style);
192
- y.css(X).attr({ x: 0, y: 0, text: p.name });
193
- let c = y.getBBox(!0);
194
- p.dimensions = { height: c.height, width: c.width };
195
- }
196
- d = wt(o.len, i.len, A);
197
- let m = At(this.spirals[n.spiral], { field: d });
198
- for (let p of A) {
199
- let z = 1 / P * p.weight, X = j({ fontSize: this.deriveFontSize(z, n.maxFontSize, n.minFontSize) + "px" }, n.style), c = f(p, { data: A, field: d, placed: s, rotation: x }), g = j(this.pointAttribs(p, p.selected && "select"), { align: "center", "alignment-baseline": "middle", "dominant-baseline": "middle", x: c.x, y: c.y, text: p.name, rotation: D(c.rotation) ? c.rotation : void 0 }), O = St(c.x, c.y, p.dimensions.width, p.dimensions.height, c.rotation), b = Mt(O), w = rt(p, { rectangle: b, polygon: O, field: d, placed: s, spiral: m, rotation: c.rotation }), at;
200
- !w && u && (d = ot(d, b), w = rt(p, { rectangle: b, polygon: O, field: d, placed: s, spiral: m, rotation: c.rotation })), et(w) ? (g.x = (g.x || 0) + w.x, g.y = (g.y || 0) + w.y, b.left += w.x, b.right += w.x, b.top += w.y, b.bottom += w.y, d = Ot(d, b), s.push(p), p.isNull = !1, p.isInside = !0) : p.isNull = !0, l && (at = { x: g.x, y: g.y }, t ? (delete g.x, delete g.y) : (g.x = 0, g.y = 0)), ht.draw(p, { animatableAttribs: at, attribs: g, css: X, group: a, renderer: h, shapeArgs: void 0, shapeType: "text" });
201
- }
202
- y = y.destroy(), this.defaultScale = Pt(o.len, i.len, d), this.field = d, this.group.attr({ scaleX: this.defaultScale, scaleY: this.defaultScale });
203
- }
204
- hasData() {
205
- return et(this) && this.visible === !0 && xt(this.points) && this.points.length > 0;
206
- }
207
- getPlotBox(t) {
208
- let { chart: o, group: i, zooming: r } = this, { plotSizeX: a = 0, plotSizeY: n = 0, inverted: l } = o, u = this[l ? "yAxis" : "xAxis"], h = this[l ? "xAxis" : "yAxis"], s = u ? u.len : o.plotWidth, f = h ? h.len : o.plotHeight, x = u ? u.left : o.plotLeft, S = h ? h.top : o.plotTop, P = this.field, A = 0, y = 0, d = x + s / 2, m = S + f / 2, p = d, z = m, X = this.defaultScale || 1, c = 0, g = 0;
209
- if (P && (c = 2 * Math.max(Math.abs(P.top), Math.abs(P.bottom)), g = 2 * Math.max(Math.abs(P.left), Math.abs(P.right))), l && ([g, c] = [c, g]), i && r) {
210
- let O = x + Math.max(g * (X = Math.max(r.scale, this.defaultScale || 1)), s) / 2, b = S + Math.max(c * X, f) / 2, w = X - (i.scaleX || 1);
211
- A = w * ((a - g) / 2 + r.zoomX * a - s / 2), y = w * ((n - c) / 2 + r.zoomY * n - f / 2), t === "series" && (r.x = Math.max(0, Math.min(1 - r.width, r.x + r.panX / r.scale)), A += r.panX * a, r.panX = 0, r.y = Math.max(0, Math.min(1 - r.height, r.y + r.panY / r.scale)), y += r.panY * n, r.panY = 0), D(i.translateX) && D(i.translateY) && (p = i.translateX, z = i.translateY), d = p - A, (m = z - y) > b ? m = b : m < 2 * S + f - b && (m = 2 * S + f - b), d > O ? d = O : d < 2 * x + s - O && (d = 2 * x + s - O);
212
- }
213
- return { translateX: d, translateY: m, scaleX: X, scaleY: X };
214
- }
215
- }
216
- U.defaultOptions = yt(tt.defaultOptions, { allowExtendPlayingField: !0, animation: { duration: 500 }, borderWidth: 0, clip: !1, colorByPoint: !0, cropThreshold: 1 / 0, minFontSize: 1, maxFontSize: 25, placementStrategy: "center", rotation: { from: 0, orientations: 2, to: 90 }, showInLegend: !1, spiral: "rectangular", style: { fontFamily: "sans-serif", fontWeight: "900", whiteSpace: "nowrap" }, tooltip: { followPointer: !0, pointFormat: '<span style="color:{point.color}">●</span> {series.name}: <b>{point.weight}</b><br/>' } }), j(U.prototype, { animate: N, animateDrilldown: N, animateDrillupFrom: N, isCartesian: !1, pointClass: k, setClip: N, placementStrategy: { random: function(e, t) {
217
- let o = t.field, i = t.rotation;
218
- return { x: it(o.width) - o.width / 2, y: it(o.height) - o.height / 2, rotation: L(i.orientations, e.index, i.from, i.to) };
219
- }, center: function(e, t) {
220
- let o = t.rotation;
221
- return { x: 0, y: 0, rotation: L(o.orientations, e.index, o.from, o.to) };
222
- } }, pointArrayMap: ["weight"], spirals: { archimedean: bt, rectangular: Ft, square: zt }, utils: { extendPlayingField: ot, getRotation: L, isPolygonsColliding: vt, rotate2DToOrigin: Xt, rotate2DToPoint: Tt } }), E().registerSeriesType("wordcloud", U);
223
- let Yt = C();
224
- return V.default;
225
- })());
226
- }(B)), B.exports;
227
- }
228
- var lt = Wt();
229
- const Nt = /* @__PURE__ */ Ct(lt), Bt = /* @__PURE__ */ _t({
230
- __proto__: null,
231
- default: Nt
232
- }, [lt]);
233
- export {
234
- Bt as w
235
- };