vue-data-ui 3.25.5 → 3.25.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BaseDraggableDialog-BM_R41j8.js → BaseDraggableDialog-Gm4Q30j0.js} +1 -1
- package/dist/{BaseIcon-t83PDe9k.js → BaseIcon-D8R6_sKH.js} +5 -5
- package/dist/{BaseLegendToggle-__JnV08B.js → BaseLegendToggle-CXQrLjd-.js} +1 -1
- package/dist/{BaseZoomControls-Xo16vFa4.js → BaseZoomControls-BTzjVDPM.js} +1 -1
- package/dist/{ColorPicker-Bn3MY7eL.js → ColorPicker-CUy15T72.js} +1 -1
- package/dist/{DataTable-COIO9gi4.js → DataTable-oiM9uWrQ.js} +1 -1
- package/dist/{HillActions-Cl-dNBZR.js → HillActions-Dn8aKOVJ.js} +1 -1
- package/dist/{NonSvgPenAndPaper-KXRhcsxM.js → NonSvgPenAndPaper-DFXjpRyl.js} +2 -2
- package/dist/{PackageVersion-M2Ws-VwJ.js → PackageVersion-ur6jKRL5.js} +1 -1
- package/dist/{PenAndPaper-BgH3m_LP.js → PenAndPaper-KFzKlvbi.js} +2 -2
- package/dist/{SlicerPreview-GvsdvE-h.js → SlicerPreview-B6iHOC9L.js} +1 -1
- package/dist/{UserOptions-f3Q0nqrj.js → UserOptions-2x4VklMW.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{package-ta2JoIjx.js → package-Dx7M6sYy.js} +1 -1
- package/dist/{render-common-bvOuxfN3.js → render-common-DETHvNhl.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +10 -0
- package/dist/{useConfig-C_mX5pOZ.js → useConfig-CIQZ6_r7.js} +11 -1
- package/dist/{useObjectBindings-uXpBcVyo.js → useObjectBindings---mHNfbS.js} +2 -2
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-BjdCpsRV.js → vue-data-ui-Dh3_EsHb.js} +70 -70
- package/dist/vue-data-ui.js +71 -71
- package/dist/vue-ui-3d-bar-i1REAKnM.js +1831 -0
- package/dist/{vue-ui-accordion-DRf3NQyH.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
- package/dist/vue-ui-age-pyramid-DuHblCNO.js +1293 -0
- package/dist/{vue-ui-annotator-DZ0O8Xa5.js → vue-ui-annotator-CTQHAPho.js} +676 -676
- package/dist/vue-ui-bullet-CYLnKrmM.js +702 -0
- package/dist/{vue-ui-bump-DoHnD1Xy.js → vue-ui-bump-DhwySwgn.js} +380 -380
- package/dist/vue-ui-candlestick-BpiECaDj.js +1859 -0
- package/dist/{vue-ui-carousel-table-k1cBJ1i1.js → vue-ui-carousel-table-D-T2yA7-.js} +2 -2
- package/dist/vue-ui-chestnut-1MsZ9Q3r.js +2016 -0
- package/dist/vue-ui-chord-QBQUSe7r.js +1347 -0
- package/dist/vue-ui-circle-pack-ZWEwtesD.js +1635 -0
- package/dist/{vue-ui-cursor-CQWLyEx0.js → vue-ui-cursor-CHQcHAHQ.js} +2 -2
- package/dist/{vue-ui-dag-BqlsutMj.js → vue-ui-dag-C_inEafb.js} +792 -792
- package/dist/{vue-ui-dashboard-Be3MmkgS.js → vue-ui-dashboard-Bs2mBur5.js} +67 -67
- package/dist/{vue-ui-digits-BqdfbcKX.js → vue-ui-digits-DwE4MoXI.js} +2 -2
- package/dist/vue-ui-donut-BM9dMHXj.js +2415 -0
- package/dist/{vue-ui-donut-gzGZ42uH.js → vue-ui-donut-CbOSJmRu.js} +2 -2
- package/dist/vue-ui-donut-evolution-C97_RHus.js +1552 -0
- package/dist/vue-ui-dumbbell-DwKa5EL5.js +1533 -0
- package/dist/vue-ui-flow-DTTr3YL9.js +1217 -0
- package/dist/vue-ui-funnel-C4pkBk3D.js +749 -0
- package/dist/vue-ui-galaxy-CuAPLOvX.js +1085 -0
- package/dist/vue-ui-gauge-DLDULH26.js +934 -0
- package/dist/{vue-ui-geo-Ca8kPYr-.js → vue-ui-geo-DXIHhp-G.js} +429 -429
- package/dist/{vue-ui-gizmo-wUqHJICb.js → vue-ui-gizmo-PuURiePo.js} +2 -2
- package/dist/vue-ui-heatmap-mvWLKB99.js +1555 -0
- package/dist/{vue-ui-hill-D6Y9Xy2K.js → vue-ui-hill-DqsVJkmO.js} +470 -470
- package/dist/vue-ui-history-plot-BBVLgt9_.js +1698 -0
- package/dist/{vue-ui-horizontal-bar-3on3-H3B.js → vue-ui-horizontal-bar-y8Q8PZwT.js} +511 -511
- package/dist/{vue-ui-kpi-CUpRRIUf.js → vue-ui-kpi-B2hf3kpp.js} +2 -2
- package/dist/{vue-ui-label-DR2qUZOG.js → vue-ui-label-ClMQ5Gez.js} +1 -1
- package/dist/{vue-ui-mini-loader-D8W-fERs.js → vue-ui-mini-loader-DtPOVIkK.js} +1 -1
- package/dist/vue-ui-molecule-eeW1Pmg8.js +929 -0
- package/dist/{vue-ui-mood-radar-TW251icr.js → vue-ui-mood-radar-Dd1qfUiu.js} +376 -376
- package/dist/vue-ui-nested-donuts-CUARCr6O.js +1503 -0
- package/dist/vue-ui-onion-NoxHP0cG.js +1235 -0
- package/dist/{vue-ui-parallel-coordinate-plot-RM25bxtf.js → vue-ui-parallel-coordinate-plot-Cp3pCyxK.js} +407 -407
- package/dist/vue-ui-quadrant-C3kQtaeX.js +1967 -0
- package/dist/{vue-ui-quick-chart-Cswm3_eI.js → vue-ui-quick-chart-BZq517pL.js} +4 -4
- package/dist/vue-ui-radar-DvNrl4uD.js +1374 -0
- package/dist/vue-ui-rating-CWFMoYpE.js +359 -0
- package/dist/vue-ui-relation-circle-1iS6C0xx.js +905 -0
- package/dist/vue-ui-ridgeline-B-EZiPCF.js +1630 -0
- package/dist/vue-ui-rings-BXuwrHos.js +1252 -0
- package/dist/vue-ui-scatter-ByL-ZZ3B.js +2405 -0
- package/dist/{vue-ui-skeleton-D_u8EWeW.js → vue-ui-skeleton-BcU1onF6.js} +698 -698
- package/dist/vue-ui-smiley-DJVusLnp.js +376 -0
- package/dist/vue-ui-spark-trend-DjS31avb.js +457 -0
- package/dist/vue-ui-sparkbar-1Al_TLw1.js +401 -0
- package/dist/vue-ui-sparkgauge-CwLo53Y8.js +268 -0
- package/dist/vue-ui-sparkhistogram-CGw6SThG.js +589 -0
- package/dist/{vue-ui-sparkline-9qkNNZG6.js → vue-ui-sparkline-CSZGBFfI.js} +511 -511
- package/dist/vue-ui-sparkstackbar-B8dloLMp.js +738 -0
- package/dist/vue-ui-stackbar-FvNd77t1.js +2355 -0
- package/dist/vue-ui-stackline-CP7PkqiG.js +2469 -0
- package/dist/vue-ui-strip-plot-DSMlDkv1.js +1740 -0
- package/dist/{vue-ui-table-heatmap-XmDK1aHJ.js → vue-ui-table-heatmap-DnP3pzh2.js} +2 -2
- package/dist/vue-ui-table-rwKtnJKt.js +1352 -0
- package/dist/vue-ui-table-sparkline-B6wyEAyC.js +738 -0
- package/dist/{vue-ui-thermometer-CLx3SPRv.js → vue-ui-thermometer-D0_KsB-y.js} +192 -192
- package/dist/{vue-ui-timer-BDWUNb6t.js → vue-ui-timer-1Z2zginj.js} +153 -153
- package/dist/vue-ui-tiremarks-zbl7aooy.js +540 -0
- package/dist/vue-ui-treemap-Drs4gK6L.js +1733 -0
- package/dist/vue-ui-waffle-DqUVsVNE.js +1621 -0
- package/dist/vue-ui-wheel-DLCBPW9t.js +873 -0
- package/dist/vue-ui-word-cloud-8Agk9h6c.js +1710 -0
- package/dist/{vue-ui-world-C2atz4Xm.js → vue-ui-world-BOBHo7-L.js} +524 -524
- package/dist/vue-ui-xy-CSTJzRkk.js +5283 -0
- package/dist/{vue-ui-xy-CpA0W6zM.js → vue-ui-xy-Dmk1gQkI.js} +2 -2
- package/dist/vue-ui-xy-canvas-DANPuyf4.js +1824 -0
- package/dist/{vue_ui_age_pyramid-BY6c-oX_.js → vue_ui_age_pyramid-B2R66DgQ.js} +15 -6
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-C0aLR6lw.js +0 -1831
- package/dist/vue-ui-age-pyramid-DUcB3lYs.js +0 -1243
- package/dist/vue-ui-bullet-DIOCMF2H.js +0 -702
- package/dist/vue-ui-candlestick-Cf8TYPl5.js +0 -1859
- package/dist/vue-ui-chestnut-BMAuaeif.js +0 -2016
- package/dist/vue-ui-chord-DCe2iPjk.js +0 -1347
- package/dist/vue-ui-circle-pack-Eb5hS_z3.js +0 -1635
- package/dist/vue-ui-donut-CuQVKuZa.js +0 -2415
- package/dist/vue-ui-donut-evolution-DckruxZ9.js +0 -1552
- package/dist/vue-ui-dumbbell-BYU-hh2E.js +0 -1531
- package/dist/vue-ui-flow-DLRcNDLc.js +0 -1217
- package/dist/vue-ui-funnel-DjoqNN1U.js +0 -749
- package/dist/vue-ui-galaxy-BhR4IOra.js +0 -1085
- package/dist/vue-ui-gauge-Cq161Kwp.js +0 -934
- package/dist/vue-ui-heatmap-Bl5ymvi9.js +0 -1555
- package/dist/vue-ui-history-plot-CvVjsdCL.js +0 -1698
- package/dist/vue-ui-molecule-BExVLLgE.js +0 -929
- package/dist/vue-ui-nested-donuts-CWzJKr3S.js +0 -1503
- package/dist/vue-ui-onion-VaYZQK5i.js +0 -1235
- package/dist/vue-ui-quadrant-Dmtwow7n.js +0 -1967
- package/dist/vue-ui-radar-C3GYthqu.js +0 -1374
- package/dist/vue-ui-rating-CBdDXL80.js +0 -359
- package/dist/vue-ui-relation-circle-BA0qy0kp.js +0 -905
- package/dist/vue-ui-ridgeline-C5skjBTe.js +0 -1630
- package/dist/vue-ui-rings-BJ8yEQMw.js +0 -1252
- package/dist/vue-ui-scatter-DXg8ESgr.js +0 -2405
- package/dist/vue-ui-smiley-DQOp87rr.js +0 -376
- package/dist/vue-ui-spark-trend-CjCufXof.js +0 -457
- package/dist/vue-ui-sparkbar-BniEM15a.js +0 -401
- package/dist/vue-ui-sparkgauge-BtyCrqTQ.js +0 -268
- package/dist/vue-ui-sparkhistogram-DQdn3PW1.js +0 -589
- package/dist/vue-ui-sparkstackbar-BXQlOdOk.js +0 -738
- package/dist/vue-ui-stackbar-CkjicNDv.js +0 -2355
- package/dist/vue-ui-stackline-BB1IZta8.js +0 -2469
- package/dist/vue-ui-strip-plot-DGLGuH6e.js +0 -1740
- package/dist/vue-ui-table-BXz_HY2g.js +0 -1352
- package/dist/vue-ui-table-sparkline-MTEw3imE.js +0 -738
- package/dist/vue-ui-tiremarks-DoaypTC-.js +0 -540
- package/dist/vue-ui-treemap-Bv7PgpiC.js +0 -1733
- package/dist/vue-ui-waffle-z2DhvSAx.js +0 -1621
- package/dist/vue-ui-wheel-DYLBJuFb.js +0 -873
- package/dist/vue-ui-word-cloud-CbpEhSdL.js +0 -1710
- package/dist/vue-ui-xy-B3DQ6t46.js +0 -5283
- package/dist/vue-ui-xy-canvas-CJefORWc.js +0 -1824
|
@@ -0,0 +1,1710 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, Ct as n, D as r, J as i, Lt as a, Pt as o, S as s, X as c, Yt as l, Zt as u, b as d, ht as f, nt as p, q as m, t as h } from "./lib-Dql7cqyA.js";
|
|
3
|
+
import { n as g, t as _ } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as v } from "./useConfig-CIQZ6_r7.js";
|
|
5
|
+
import { t as ee } from "./usePrinter-DISD7q5m.js";
|
|
6
|
+
import { n as te, t as ne } from "./BaseScanner-DZvpgOjM.js";
|
|
7
|
+
import { t as y } from "./useNestedProp-Chvyfpl-.js";
|
|
8
|
+
import { t as b } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as x } from "./useChartExport-iwOqiIWX.js";
|
|
10
|
+
import { t as S } from "./img-DhGApYG0.js";
|
|
11
|
+
import { n as C } from "./Title-CPHi-evi.js";
|
|
12
|
+
import { t as w } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
13
|
+
import { i as re, t as ie } from "./useResponsive-ZtArZtUf.js";
|
|
14
|
+
import { t as ae } from "./A11yDataTable-DdRsVULz.js";
|
|
15
|
+
import { t as T } from "./useUserOptionState-DK-_1ddE.js";
|
|
16
|
+
import { t as oe } from "./useChartAccessibility-DYqac8yF.js";
|
|
17
|
+
import { t as se } from "./usePanZoom-CYU3B4T3.js";
|
|
18
|
+
import { t as ce } from "./vue_ui_word_cloud-C-qIMNLu.js";
|
|
19
|
+
import { t as le } from "./BaseZoomControls-BTzjVDPM.js";
|
|
20
|
+
import { Fragment as ue, computed as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createSlots as de, createTextVNode as fe, createVNode as pe, defineAsyncComponent as j, guardReactiveProps as M, mergeProps as me, nextTick as he, normalizeClass as ge, normalizeProps as N, normalizeStyle as _e, onBeforeUnmount as ve, onMounted as ye, openBlock as P, ref as F, renderList as be, renderSlot as I, resolveDynamicComponent as xe, shallowRef as Se, toDisplayString as Ce, toRefs as we, unref as L, watch as Te, withCtx as R } from "vue";
|
|
21
|
+
//#region src/wordcloud.js
|
|
22
|
+
var Ee = {
|
|
23
|
+
fast: {
|
|
24
|
+
spiralStep: 6,
|
|
25
|
+
fallbackSpiralStep: 2,
|
|
26
|
+
spiralRadiusStep: 2,
|
|
27
|
+
fallbackSpiralRadiusStep: 1,
|
|
28
|
+
primaryAttempts: 1e4,
|
|
29
|
+
fallbackAttempts: 25e3,
|
|
30
|
+
minimumVisualPadding: 2,
|
|
31
|
+
scaleStep: .9
|
|
32
|
+
},
|
|
33
|
+
balanced: {
|
|
34
|
+
spiralStep: 4,
|
|
35
|
+
fallbackSpiralStep: 1,
|
|
36
|
+
spiralRadiusStep: 1.5,
|
|
37
|
+
fallbackSpiralRadiusStep: 1,
|
|
38
|
+
primaryAttempts: 2e4,
|
|
39
|
+
fallbackAttempts: 5e4,
|
|
40
|
+
minimumVisualPadding: 3,
|
|
41
|
+
scaleStep: .92
|
|
42
|
+
},
|
|
43
|
+
precise: {
|
|
44
|
+
spiralStep: 2,
|
|
45
|
+
fallbackSpiralStep: 1,
|
|
46
|
+
spiralRadiusStep: 1,
|
|
47
|
+
fallbackSpiralRadiusStep: .75,
|
|
48
|
+
primaryAttempts: 5e4,
|
|
49
|
+
fallbackAttempts: 1e5,
|
|
50
|
+
minimumVisualPadding: 4,
|
|
51
|
+
scaleStep: .95
|
|
52
|
+
}
|
|
53
|
+
}, De = "fast";
|
|
54
|
+
function Oe(e) {
|
|
55
|
+
return Ee[e] || Ee[De];
|
|
56
|
+
}
|
|
57
|
+
var ke = /* @__PURE__ */ new Map();
|
|
58
|
+
function Ae(e) {
|
|
59
|
+
let t = String(e), n = ke.get(t);
|
|
60
|
+
if (n) return n;
|
|
61
|
+
let r = Math.PI / 180, i = [], a = [];
|
|
62
|
+
for (let t = 0; t < 360; t += e) {
|
|
63
|
+
let e = t * r;
|
|
64
|
+
i.push(Math.cos(e)), a.push(Math.sin(e));
|
|
65
|
+
}
|
|
66
|
+
let o = {
|
|
67
|
+
cosineArray: i,
|
|
68
|
+
sineArray: a
|
|
69
|
+
};
|
|
70
|
+
return ke.set(t, o), o;
|
|
71
|
+
}
|
|
72
|
+
function je({ word: e, fontSize: t, pad: n, canvas: r, ctx: i, svg: a }) {
|
|
73
|
+
let o = a.style && a.style.bold, s = a.style && a.style.fontFamily || "Arial, \"Noto Sans Arabic\", Tahoma, sans-serif", c = `${o ? "bold " : ""}${t}px ${s}`, l = String(e.name || ""), u = /[\u0600-\u06FF]/.test(l);
|
|
74
|
+
i.font = c, i.direction = u ? "rtl" : "ltr", i.textAlign = "left", i.textBaseline = "alphabetic";
|
|
75
|
+
let d = i.measureText(l), f = Math.ceil(Math.abs(d.actualBoundingBoxLeft || 0)), p = Math.ceil(Math.abs(d.actualBoundingBoxRight || d.width)), m = Math.ceil(d.actualBoundingBoxAscent || t), h = Math.ceil(d.actualBoundingBoxDescent || t * .25), g = Math.max(0, Math.round(n || 0)) + Math.ceil(t * (u ? .22 : .12)), _ = Math.max(1, f + p + g * 2), v = Math.max(1, m + h + g * 2);
|
|
76
|
+
r.width = _, r.height = v, i.font = c, i.direction = u ? "rtl" : "ltr", i.textAlign = "left", i.textBaseline = "alphabetic", i.fillStyle = "black";
|
|
77
|
+
let ee = g + f, te = g + m;
|
|
78
|
+
i.fillText(l, ee, te);
|
|
79
|
+
let ne = i.getImageData(0, 0, _, v).data, y = [], b = [], x = _, S = v, C = 0, w = 0, re = !1;
|
|
80
|
+
for (let e = 0; e < v; e += 1) {
|
|
81
|
+
let t = e * _ * 4, n = -1, r = !1;
|
|
82
|
+
for (let i = 0; i < _; i += 1) ne[t + i * 4 + 3] > 1 ? (y.push([i, e]), re = !0, i < x && (x = i), i > C && (C = i), e < S && (S = e), e > w && (w = e), r || (r = !0, n = i)) : r && (b.push([
|
|
83
|
+
e,
|
|
84
|
+
n,
|
|
85
|
+
i - 1
|
|
86
|
+
]), r = !1, n = -1);
|
|
87
|
+
r && b.push([
|
|
88
|
+
e,
|
|
89
|
+
n,
|
|
90
|
+
_ - 1
|
|
91
|
+
]);
|
|
92
|
+
}
|
|
93
|
+
return re || (x = 0, S = 0, C = 0, w = 0), {
|
|
94
|
+
w: _,
|
|
95
|
+
h: v,
|
|
96
|
+
wordMask: y,
|
|
97
|
+
runs: b,
|
|
98
|
+
minX: x,
|
|
99
|
+
minY: S,
|
|
100
|
+
maxX: C,
|
|
101
|
+
maxY: w
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function Me(e) {
|
|
105
|
+
let t = [];
|
|
106
|
+
if (!e.length) return t;
|
|
107
|
+
let n = e[0][1], r = e[0][0], i = r;
|
|
108
|
+
for (let a = 1; a < e.length; a += 1) {
|
|
109
|
+
let o = e[a][0], s = e[a][1];
|
|
110
|
+
s === n ? o === i + 1 ? i = o : (t.push([
|
|
111
|
+
n,
|
|
112
|
+
r,
|
|
113
|
+
i
|
|
114
|
+
]), r = o, i = o) : (t.push([
|
|
115
|
+
n,
|
|
116
|
+
r,
|
|
117
|
+
i
|
|
118
|
+
]), n = s, r = o, i = o);
|
|
119
|
+
}
|
|
120
|
+
return t.push([
|
|
121
|
+
n,
|
|
122
|
+
r,
|
|
123
|
+
i
|
|
124
|
+
]), t;
|
|
125
|
+
}
|
|
126
|
+
function Ne(e, t) {
|
|
127
|
+
return 4294967295 >>> 32 - (t - e + 1) << e >>> 0;
|
|
128
|
+
}
|
|
129
|
+
function Pe(e) {
|
|
130
|
+
return 4294967295 << e >>> 0;
|
|
131
|
+
}
|
|
132
|
+
function Fe(e) {
|
|
133
|
+
return 4294967295 >>> 31 - e >>> 0;
|
|
134
|
+
}
|
|
135
|
+
function Ie({ maskBits: e, maskRowStride: t, maskW: n, maskH: r, wx: i, wy: a, runs: o }) {
|
|
136
|
+
for (let s = 0; s < o.length; s += 1) {
|
|
137
|
+
let c = o[s][0], l = o[s][1], u = o[s][2], d = a + c;
|
|
138
|
+
if (d < 0 || d >= r) return !1;
|
|
139
|
+
let f = i + l, p = i + u;
|
|
140
|
+
if (f < 0 || p >= n) return !1;
|
|
141
|
+
let m = d * t, h = f >>> 5, g = p >>> 5, _ = f & 31, v = p & 31;
|
|
142
|
+
if (h === g) {
|
|
143
|
+
if (e[m + h] & Ne(_, v)) return !1;
|
|
144
|
+
} else {
|
|
145
|
+
if (e[m + h] & Pe(_)) return !1;
|
|
146
|
+
for (let t = h + 1; t < g; t += 1) if (e[m + t]) return !1;
|
|
147
|
+
if (e[m + g] & Fe(v)) return !1;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return !0;
|
|
151
|
+
}
|
|
152
|
+
function Le({ maskBits: e, maskRowStride: t, maskW: n, maskH: r, wx: i, wy: a, runs: o }) {
|
|
153
|
+
for (let s = 0; s < o.length; s += 1) {
|
|
154
|
+
let c = o[s][0], l = o[s][1], u = o[s][2], d = a + c;
|
|
155
|
+
if (d < 0 || d >= r) continue;
|
|
156
|
+
let f = i + l, p = i + u;
|
|
157
|
+
if (p < 0 || f >= n) continue;
|
|
158
|
+
let m = d * t, h = f >>> 5, g = p >>> 5, _ = f & 31, v = p & 31;
|
|
159
|
+
if (h === g) {
|
|
160
|
+
let t = Ne(_, v);
|
|
161
|
+
e[m + h] |= t;
|
|
162
|
+
} else {
|
|
163
|
+
{
|
|
164
|
+
let t = Pe(_);
|
|
165
|
+
e[m + h] |= t;
|
|
166
|
+
}
|
|
167
|
+
for (let t = h + 1; t < g; t += 1) e[m + t] = 4294967295;
|
|
168
|
+
{
|
|
169
|
+
let t = Fe(v);
|
|
170
|
+
e[m + g] |= t;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
function z({ wordMask: e, w: t, h: n, dilation: r }) {
|
|
176
|
+
let i = new Uint8Array(t * n), a = [];
|
|
177
|
+
for (let n = 0; n < e.length; n += 1) {
|
|
178
|
+
let r = e[n][0], o = e[n][1] * t + r;
|
|
179
|
+
i[o] || (i[o] = 1, a.push(o));
|
|
180
|
+
}
|
|
181
|
+
for (let e = 0; e < a.length; e += 1) {
|
|
182
|
+
let o = a[e], s = o / t | 0, c = o - s * t;
|
|
183
|
+
for (let e = -r; e <= r; e += 1) {
|
|
184
|
+
let a = s + e;
|
|
185
|
+
if (a < 0 || a >= n) continue;
|
|
186
|
+
let o = a * t;
|
|
187
|
+
for (let n = -r; n <= r; n += 1) {
|
|
188
|
+
if (n === 0 && e === 0) continue;
|
|
189
|
+
let r = c + n;
|
|
190
|
+
r < 0 || r >= t || (i[o + r] = 1);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
let o = [];
|
|
195
|
+
for (let e = 0; e < i.length; e += 1) if (i[e]) {
|
|
196
|
+
let n = e / t | 0, r = e - n * t;
|
|
197
|
+
o.push([r, n]);
|
|
198
|
+
}
|
|
199
|
+
return o;
|
|
200
|
+
}
|
|
201
|
+
function Re(e, t) {
|
|
202
|
+
let n = [];
|
|
203
|
+
for (let r = 0; r < t; r += 1) {
|
|
204
|
+
let t = e[r];
|
|
205
|
+
if (!t || t.length === 0) continue;
|
|
206
|
+
t.sort((e, t) => e[0] - t[0]);
|
|
207
|
+
let i = t[0][0], a = t[0][1];
|
|
208
|
+
for (let e = 1; e < t.length; e += 1) {
|
|
209
|
+
let o = t[e][0], s = t[e][1];
|
|
210
|
+
o <= a + 1 ? s > a && (a = s) : (n.push([
|
|
211
|
+
r,
|
|
212
|
+
i,
|
|
213
|
+
a
|
|
214
|
+
]), i = o, a = s);
|
|
215
|
+
}
|
|
216
|
+
n.push([
|
|
217
|
+
r,
|
|
218
|
+
i,
|
|
219
|
+
a
|
|
220
|
+
]);
|
|
221
|
+
}
|
|
222
|
+
return n;
|
|
223
|
+
}
|
|
224
|
+
function ze({ runs: e, w: t, h: n, dilation: r }) {
|
|
225
|
+
if (!e.length || r <= 0) return e;
|
|
226
|
+
let i = Array(n);
|
|
227
|
+
for (let a = 0; a < e.length; a += 1) {
|
|
228
|
+
let o = e[a], s = o[0], c = Math.max(0, o[1] - r), l = Math.min(t - 1, o[2] + r), u = Math.max(0, s - r), d = Math.min(n - 1, s + r);
|
|
229
|
+
for (let e = u; e <= d; e += 1) {
|
|
230
|
+
let t = i[e];
|
|
231
|
+
t || (t = [], i[e] = t), t.push([c, l]);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return Re(i, n);
|
|
235
|
+
}
|
|
236
|
+
function B(e, t) {
|
|
237
|
+
let n = e.runs, r = e.w, i = e.h, a = Math.max(1, Math.round(r * t)), o = Math.max(1, Math.round(i * t)), s = Array(o), c = a, l = o, u = 0, d = 0, f = !1;
|
|
238
|
+
for (let e = 0; e < n.length; e += 1) {
|
|
239
|
+
let r = n[e], i = r[0], a = r[1], p = r[2], m = Math.round(i * t);
|
|
240
|
+
if (m < 0 || m >= o) continue;
|
|
241
|
+
let h = Math.round(a * t), g = Math.round((p + 1) * t) - 1;
|
|
242
|
+
if (g < h) continue;
|
|
243
|
+
let _ = s[m];
|
|
244
|
+
_ || (_ = [], s[m] = _), _.push([h, g]), f = !0, h < c && (c = h), g > u && (u = g), m < l && (l = m), m > d && (d = m);
|
|
245
|
+
}
|
|
246
|
+
if (!f) return {
|
|
247
|
+
w: a,
|
|
248
|
+
h: o,
|
|
249
|
+
runs: [],
|
|
250
|
+
minX: 0,
|
|
251
|
+
minY: 0,
|
|
252
|
+
maxX: 0,
|
|
253
|
+
maxY: 0
|
|
254
|
+
};
|
|
255
|
+
let p = [];
|
|
256
|
+
for (let e = 0; e < o; e += 1) {
|
|
257
|
+
let t = s[e];
|
|
258
|
+
if (!t || t.length === 0) continue;
|
|
259
|
+
t.sort((e, t) => e[0] - t[0]);
|
|
260
|
+
let n = t[0][0], r = t[0][1];
|
|
261
|
+
for (let i = 1; i < t.length; i += 1) {
|
|
262
|
+
let a = t[i][0], o = t[i][1];
|
|
263
|
+
a <= r + 1 ? o > r && (r = o) : (p.push([
|
|
264
|
+
e,
|
|
265
|
+
n,
|
|
266
|
+
r
|
|
267
|
+
]), n = a, r = o);
|
|
268
|
+
}
|
|
269
|
+
p.push([
|
|
270
|
+
e,
|
|
271
|
+
n,
|
|
272
|
+
r
|
|
273
|
+
]);
|
|
274
|
+
}
|
|
275
|
+
return {
|
|
276
|
+
w: a,
|
|
277
|
+
h: o,
|
|
278
|
+
runs: p,
|
|
279
|
+
minX: c,
|
|
280
|
+
minY: l,
|
|
281
|
+
maxX: u,
|
|
282
|
+
maxY: d
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
var Be = /* @__PURE__ */ new Map(), V = /* @__PURE__ */ new Map();
|
|
286
|
+
function Ve({ word: e, fontSize: t, pad: n, svg: r }) {
|
|
287
|
+
let i = r.style && r.style.bold ? 1 : 0, a = n || 0;
|
|
288
|
+
return `${e.name}::${t}::${a}::${i}`;
|
|
289
|
+
}
|
|
290
|
+
function He({ word: e, fontSize: t, pad: n, canvas: r, ctx: i, svg: a }) {
|
|
291
|
+
let o = Ve({
|
|
292
|
+
word: e,
|
|
293
|
+
fontSize: t,
|
|
294
|
+
pad: n,
|
|
295
|
+
svg: a
|
|
296
|
+
}), s = Be.get(o);
|
|
297
|
+
if (s) return {
|
|
298
|
+
key: o,
|
|
299
|
+
bitmap: s
|
|
300
|
+
};
|
|
301
|
+
let c = je({
|
|
302
|
+
word: e,
|
|
303
|
+
fontSize: t,
|
|
304
|
+
pad: n,
|
|
305
|
+
canvas: r,
|
|
306
|
+
ctx: i,
|
|
307
|
+
svg: a
|
|
308
|
+
});
|
|
309
|
+
return Be.set(o, c), {
|
|
310
|
+
key: o,
|
|
311
|
+
bitmap: c
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
function Ue({ bitmapKey: e, wordMask: t, w: n, h: r, dilation: i }) {
|
|
315
|
+
let a = `${e}::d${i}`, o = V.get(a);
|
|
316
|
+
if (o) return o;
|
|
317
|
+
let s = z({
|
|
318
|
+
wordMask: t,
|
|
319
|
+
w: n,
|
|
320
|
+
h: r,
|
|
321
|
+
dilation: i
|
|
322
|
+
}), c = {
|
|
323
|
+
wordMask: s,
|
|
324
|
+
runs: Me(s)
|
|
325
|
+
};
|
|
326
|
+
return V.set(a, c), c;
|
|
327
|
+
}
|
|
328
|
+
function We(e, t, n) {
|
|
329
|
+
if (!e.length) return;
|
|
330
|
+
let r = Infinity, i = -Infinity, a = Infinity, o = -Infinity;
|
|
331
|
+
for (let t = 0; t < e.length; t += 1) {
|
|
332
|
+
let n = e[t], s = n.x + n.minX, c = n.x + n.maxX, l = n.y + n.minY, u = n.y + n.maxY;
|
|
333
|
+
s < r && (r = s), c > i && (i = c), l < a && (a = l), u > o && (o = u);
|
|
334
|
+
}
|
|
335
|
+
if (!isFinite(r) || !isFinite(i) || !isFinite(a) || !isFinite(o)) return;
|
|
336
|
+
let s = Math.max(Math.abs(r), Math.abs(i)), c = Math.max(Math.abs(a), Math.abs(o));
|
|
337
|
+
if (s === 0 || c === 0) return;
|
|
338
|
+
let l = .9, u = t * .5 * l / s, d = n * .5 * l / c, f = Math.min(u, d);
|
|
339
|
+
if (!(f <= 1)) {
|
|
340
|
+
f > 4 && (f = 4);
|
|
341
|
+
for (let t = 0; t < e.length; t += 1) {
|
|
342
|
+
let n = e[t];
|
|
343
|
+
n.x *= f, n.y *= f, n.width *= f, n.height *= f, n.fontSize *= f, n.minX *= f, n.maxX *= f, n.minY *= f, n.maxY *= f;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
function Ge() {
|
|
348
|
+
return typeof performance < "u" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
|
|
349
|
+
}
|
|
350
|
+
function Ke({ value: e, minimumValue: t, maximumValue: n, configuredMinimumFontSize: r, maximumFontSize: i }) {
|
|
351
|
+
if (n === t) return i;
|
|
352
|
+
let a = (e - t) / (n - t) * (i - r) + r;
|
|
353
|
+
return Math.max(r, Math.min(i, a));
|
|
354
|
+
}
|
|
355
|
+
function qe({ bitmapHeight: e, proximity: t, strictPixelPadding: n, minimumVisualPadding: r }) {
|
|
356
|
+
let i = Math.max(0, Math.round(t || 0)), a = Math.ceil(e * .035) + 2;
|
|
357
|
+
return Math.max(i, a, n ? 3 : 0, r);
|
|
358
|
+
}
|
|
359
|
+
function Je({ currentBitmap: e, strictPixelPadding: t, scaleFactor: n, baseBitmap: r, bitmapKey: i, proximity: a, minimumVisualPadding: o }) {
|
|
360
|
+
let s = e.runs, c = e.w, l = e.h, u = e.minX, d = e.minY, f = e.maxX, p = e.maxY;
|
|
361
|
+
if (!s.length) return {
|
|
362
|
+
runs: s,
|
|
363
|
+
bitmapWidth: c,
|
|
364
|
+
bitmapHeight: l,
|
|
365
|
+
bitmapMinimumX: u,
|
|
366
|
+
bitmapMinimumY: d,
|
|
367
|
+
bitmapMaximumX: f,
|
|
368
|
+
bitmapMaximumY: p
|
|
369
|
+
};
|
|
370
|
+
let m = qe({
|
|
371
|
+
bitmapHeight: l,
|
|
372
|
+
proximity: a,
|
|
373
|
+
strictPixelPadding: t,
|
|
374
|
+
minimumVisualPadding: o
|
|
375
|
+
});
|
|
376
|
+
return m <= 0 ? {
|
|
377
|
+
runs: s,
|
|
378
|
+
bitmapWidth: c,
|
|
379
|
+
bitmapHeight: l,
|
|
380
|
+
bitmapMinimumX: u,
|
|
381
|
+
bitmapMinimumY: d,
|
|
382
|
+
bitmapMaximumX: f,
|
|
383
|
+
bitmapMaximumY: p
|
|
384
|
+
} : n === 1 && m === 2 && t ? {
|
|
385
|
+
runs: Ue({
|
|
386
|
+
bitmapKey: i,
|
|
387
|
+
wordMask: r.wordMask,
|
|
388
|
+
w: r.w,
|
|
389
|
+
h: r.h,
|
|
390
|
+
dilation: m
|
|
391
|
+
}).runs,
|
|
392
|
+
bitmapWidth: c,
|
|
393
|
+
bitmapHeight: l,
|
|
394
|
+
bitmapMinimumX: u,
|
|
395
|
+
bitmapMinimumY: d,
|
|
396
|
+
bitmapMaximumX: f,
|
|
397
|
+
bitmapMaximumY: p
|
|
398
|
+
} : {
|
|
399
|
+
runs: ze({
|
|
400
|
+
runs: s,
|
|
401
|
+
w: c,
|
|
402
|
+
h: l,
|
|
403
|
+
dilation: m
|
|
404
|
+
}),
|
|
405
|
+
bitmapWidth: c,
|
|
406
|
+
bitmapHeight: l,
|
|
407
|
+
bitmapMinimumX: u,
|
|
408
|
+
bitmapMinimumY: d,
|
|
409
|
+
bitmapMaximumX: f,
|
|
410
|
+
bitmapMaximumY: p
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
async function Ye({ baseBitmap: e, baseFontSize: t, minimumScaleFactor: n, maskBits: r, maskRowStride: i, maskWidth: a, maskHeight: o, centerX: s, centerY: c, maximumRadius: l, scaleStep: u, strictPixelPadding: d, bitmapKey: f, minimumFontSize: p, rawWord: m, cosineArray: h, sineArray: g, radiusStep: _, maximumAttempts: v, maybeYield: ee, proximity: te, minimumVisualPadding: ne }) {
|
|
414
|
+
let y = 1;
|
|
415
|
+
for (; y >= n;) {
|
|
416
|
+
let { runs: n, bitmapWidth: b, bitmapHeight: x, bitmapMinimumX: S, bitmapMinimumY: C, bitmapMaximumX: w, bitmapMaximumY: re } = Je({
|
|
417
|
+
currentBitmap: y === 1 ? e : B(e, y),
|
|
418
|
+
strictPixelPadding: d,
|
|
419
|
+
scaleFactor: y,
|
|
420
|
+
baseBitmap: e,
|
|
421
|
+
bitmapKey: f,
|
|
422
|
+
proximity: te,
|
|
423
|
+
minimumVisualPadding: ne
|
|
424
|
+
}), ie = 0, ae = 0;
|
|
425
|
+
for (; ie < l && ae < v;) {
|
|
426
|
+
for (let e = 0; e < h.length; e += 1) {
|
|
427
|
+
ae += 1;
|
|
428
|
+
let l = Math.round(s + ie * h[e] - b / 2), u = Math.round(c + ie * g[e] - x / 2);
|
|
429
|
+
if (!(l < 0 || u < 0 || l + b > a || u + x > o) && Ie({
|
|
430
|
+
maskBits: r,
|
|
431
|
+
maskRowStride: i,
|
|
432
|
+
maskW: a,
|
|
433
|
+
maskH: o,
|
|
434
|
+
wx: l,
|
|
435
|
+
wy: u,
|
|
436
|
+
runs: n
|
|
437
|
+
})) {
|
|
438
|
+
let { __wcIndex: e, ...s } = m, c = Math.max(p, Math.round(t * y)), d = {
|
|
439
|
+
...s,
|
|
440
|
+
x: l - a / 2,
|
|
441
|
+
y: u - o / 2,
|
|
442
|
+
fontSize: c,
|
|
443
|
+
width: b,
|
|
444
|
+
height: x,
|
|
445
|
+
angle: 0,
|
|
446
|
+
minX: S,
|
|
447
|
+
minY: C,
|
|
448
|
+
maxX: w,
|
|
449
|
+
maxY: re
|
|
450
|
+
};
|
|
451
|
+
return Le({
|
|
452
|
+
maskBits: r,
|
|
453
|
+
maskRowStride: i,
|
|
454
|
+
maskW: a,
|
|
455
|
+
maskH: o,
|
|
456
|
+
wx: l,
|
|
457
|
+
wy: u,
|
|
458
|
+
runs: n
|
|
459
|
+
}), d;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
ie += _, ae & 1023 || await ee();
|
|
463
|
+
}
|
|
464
|
+
y *= u, await ee();
|
|
465
|
+
}
|
|
466
|
+
return null;
|
|
467
|
+
}
|
|
468
|
+
async function Xe({ baseBitmap: e, baseFontSize: t, minimumScaleFactor: n, maskBits: r, maskRowStride: i, maskWidth: a, maskHeight: o, centerX: s, centerY: c, maximumRadius: l, scaleStep: u, strictPixelPadding: d, bitmapKey: f, minimumFontSize: p, rawWord: m, maybeYield: h, proximity: g, qualityPreset: _, primarySpiral: v, fallbackSpiral: ee }) {
|
|
469
|
+
return await Ye({
|
|
470
|
+
baseBitmap: e,
|
|
471
|
+
baseFontSize: t,
|
|
472
|
+
minimumScaleFactor: n,
|
|
473
|
+
maskBits: r,
|
|
474
|
+
maskRowStride: i,
|
|
475
|
+
maskWidth: a,
|
|
476
|
+
maskHeight: o,
|
|
477
|
+
centerX: s,
|
|
478
|
+
centerY: c,
|
|
479
|
+
maximumRadius: l,
|
|
480
|
+
scaleStep: u,
|
|
481
|
+
strictPixelPadding: d,
|
|
482
|
+
bitmapKey: f,
|
|
483
|
+
minimumFontSize: p,
|
|
484
|
+
rawWord: m,
|
|
485
|
+
cosineArray: v.cosineArray,
|
|
486
|
+
sineArray: v.sineArray,
|
|
487
|
+
radiusStep: _.spiralRadiusStep,
|
|
488
|
+
maximumAttempts: _.primaryAttempts,
|
|
489
|
+
maybeYield: h,
|
|
490
|
+
proximity: g,
|
|
491
|
+
minimumVisualPadding: _.minimumVisualPadding
|
|
492
|
+
}) || await Ye({
|
|
493
|
+
baseBitmap: e,
|
|
494
|
+
baseFontSize: t,
|
|
495
|
+
minimumScaleFactor: n,
|
|
496
|
+
maskBits: r,
|
|
497
|
+
maskRowStride: i,
|
|
498
|
+
maskWidth: a,
|
|
499
|
+
maskHeight: o,
|
|
500
|
+
centerX: s,
|
|
501
|
+
centerY: c,
|
|
502
|
+
maximumRadius: l,
|
|
503
|
+
scaleStep: u,
|
|
504
|
+
strictPixelPadding: d,
|
|
505
|
+
bitmapKey: f,
|
|
506
|
+
minimumFontSize: p,
|
|
507
|
+
rawWord: m,
|
|
508
|
+
cosineArray: ee.cosineArray,
|
|
509
|
+
sineArray: ee.sineArray,
|
|
510
|
+
radiusStep: _.fallbackSpiralRadiusStep,
|
|
511
|
+
maximumAttempts: _.fallbackAttempts,
|
|
512
|
+
maybeYield: h,
|
|
513
|
+
proximity: g,
|
|
514
|
+
minimumVisualPadding: _.minimumVisualPadding
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
async function Ze({ words: e, proximity: t = 0, svg: n, strictPixelPadding: r, quality: i = De, onProgress: a, debugTiming: o = !1 }) {
|
|
518
|
+
let s = Ge(), c = s(), l = c;
|
|
519
|
+
async function u() {
|
|
520
|
+
s() - l >= 12 && (await new Promise((e) => setTimeout(e, 0)), l = s());
|
|
521
|
+
}
|
|
522
|
+
let d = n.width, f = n.height, p = Math.round(d), m = Math.round(f), h = Oe(i), g = Ae(h.spiralStep), _ = Ae(h.fallbackSpiralStep), v = n.minFontSize, ee = Math.min(n.maxFontSize, 100), te = e.map((e) => e.value), ne = Math.min(...te), y = Math.max(...te);
|
|
523
|
+
if (p <= 0 || m <= 0) return [];
|
|
524
|
+
let b = p + 31 >>> 5, x = new Uint32Array(b * m), S = document.createElement("canvas"), C = S.getContext("2d", { willReadFrequently: !0 });
|
|
525
|
+
S.width = p, S.height = m;
|
|
526
|
+
let w = Math.max(p, m), re = Math.floor(p / 2), ie = Math.floor(m / 2), ae = [...e.map((e, t) => ({
|
|
527
|
+
...e,
|
|
528
|
+
__wcIndex: t,
|
|
529
|
+
id: e.id == null ? `${e.name}__${t}` : e.id
|
|
530
|
+
}))].sort((e, t) => t.value - e.value), T = [], oe = h.scaleStep;
|
|
531
|
+
for (let e = 0; e < ae.length; e += 1) {
|
|
532
|
+
let i = ae[e], o = T.length, s = Ke({
|
|
533
|
+
value: i.value,
|
|
534
|
+
minimumValue: ne,
|
|
535
|
+
maximumValue: y,
|
|
536
|
+
configuredMinimumFontSize: v,
|
|
537
|
+
maximumFontSize: ee
|
|
538
|
+
}), c = He({
|
|
539
|
+
word: i,
|
|
540
|
+
fontSize: s,
|
|
541
|
+
pad: t,
|
|
542
|
+
canvas: S,
|
|
543
|
+
ctx: C,
|
|
544
|
+
svg: n
|
|
545
|
+
}), l = c.key, d = c.bitmap, f = d.w, te = d.h;
|
|
546
|
+
if (f <= 0 || te <= 0) {
|
|
547
|
+
await u();
|
|
548
|
+
continue;
|
|
549
|
+
}
|
|
550
|
+
let se = await Xe({
|
|
551
|
+
baseBitmap: d,
|
|
552
|
+
baseFontSize: s,
|
|
553
|
+
minimumScaleFactor: Math.max(1 / s, .1),
|
|
554
|
+
maskBits: x,
|
|
555
|
+
maskRowStride: b,
|
|
556
|
+
maskWidth: p,
|
|
557
|
+
maskHeight: m,
|
|
558
|
+
centerX: re,
|
|
559
|
+
centerY: ie,
|
|
560
|
+
maximumRadius: w,
|
|
561
|
+
scaleStep: oe,
|
|
562
|
+
strictPixelPadding: r,
|
|
563
|
+
bitmapKey: l,
|
|
564
|
+
minimumFontSize: 1,
|
|
565
|
+
rawWord: i,
|
|
566
|
+
maybeYield: u,
|
|
567
|
+
proximity: t,
|
|
568
|
+
qualityPreset: h,
|
|
569
|
+
primarySpiral: g,
|
|
570
|
+
fallbackSpiral: _
|
|
571
|
+
});
|
|
572
|
+
if (se && (T.push(se), a && T.length > o)) {
|
|
573
|
+
let e = T[T.length - 1];
|
|
574
|
+
a({
|
|
575
|
+
word: e,
|
|
576
|
+
all: T
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
await u();
|
|
580
|
+
}
|
|
581
|
+
if (!T.length) return [];
|
|
582
|
+
We(T, p, m);
|
|
583
|
+
let se = s() - c;
|
|
584
|
+
return o && typeof console < "u" && console.log && console.log("[vue-data-ui][word-cloud] positionWordsAsync:", `${se.toFixed(2)} ms for ${e.length} words`), T.sort((e, t) => t.fontSize - e.fontSize);
|
|
585
|
+
}
|
|
586
|
+
//#endregion
|
|
587
|
+
//#region src/components/vue-ui-word-cloud.vue
|
|
588
|
+
var H = /* @__PURE__ */ e({ default: () => dt }), Qe = [
|
|
589
|
+
"id",
|
|
590
|
+
"data-resizing",
|
|
591
|
+
"data-relayout"
|
|
592
|
+
], $e = ["id"], et = { style: { position: "relative" } }, tt = [
|
|
593
|
+
"aria-describedby",
|
|
594
|
+
"xmlns",
|
|
595
|
+
"viewBox"
|
|
596
|
+
], nt = ["width", "height"], rt = ["transform"], it = ["transform"], at = [
|
|
597
|
+
"data-a11y-word-index",
|
|
598
|
+
"x",
|
|
599
|
+
"y",
|
|
600
|
+
"width",
|
|
601
|
+
"height",
|
|
602
|
+
"aria-label",
|
|
603
|
+
"onMouseover",
|
|
604
|
+
"onMouseleave",
|
|
605
|
+
"onClick"
|
|
606
|
+
], ot = [
|
|
607
|
+
"fill",
|
|
608
|
+
"font-weight",
|
|
609
|
+
"font-size",
|
|
610
|
+
"transform",
|
|
611
|
+
"stroke",
|
|
612
|
+
"stroke-width"
|
|
613
|
+
], st = {
|
|
614
|
+
key: 0,
|
|
615
|
+
style: {
|
|
616
|
+
position: "absolute",
|
|
617
|
+
top: "100%",
|
|
618
|
+
left: "0",
|
|
619
|
+
width: "100%"
|
|
620
|
+
},
|
|
621
|
+
"data-dom-to-png-ignore": "",
|
|
622
|
+
"aria-hidden": "true"
|
|
623
|
+
}, ct = {
|
|
624
|
+
key: 5,
|
|
625
|
+
class: "vue-data-ui-watermark"
|
|
626
|
+
}, lt = {
|
|
627
|
+
key: 6,
|
|
628
|
+
"data-dom-to-png-ignore": "",
|
|
629
|
+
class: "reset-wrapper"
|
|
630
|
+
}, ut = { style: {
|
|
631
|
+
display: "flex",
|
|
632
|
+
"align-items": "center"
|
|
633
|
+
} }, dt = /*#__PURE__*/ w({
|
|
634
|
+
__name: "vue-ui-word-cloud",
|
|
635
|
+
props: {
|
|
636
|
+
config: {
|
|
637
|
+
type: Object,
|
|
638
|
+
default() {
|
|
639
|
+
return {};
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
dataset: {
|
|
643
|
+
type: [Array, String],
|
|
644
|
+
default() {
|
|
645
|
+
return [];
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
emits: ["copyAlt"],
|
|
650
|
+
setup(e, { expose: w, emit: Ee }) {
|
|
651
|
+
let De = j(() => import("./Tooltip-hhrkQ3Lk.js")), Oe = j(() => import("./BaseIcon-D8R6_sKH.js").then((e) => e.n)), ke = j(() => import("./vue-ui-accordion-BSmBUjwZ.js").then((e) => e.n)), Ae = j(() => import("./DataTable-oiM9uWrQ.js")), je = j(() => import("./PenAndPaper-KFzKlvbi.js").then((e) => e.t)), Me = j(() => import("./UserOptions-2x4VklMW.js").then((e) => e.n)), Ne = j(() => import("./PackageVersion-ur6jKRL5.js").then((e) => e.t)), Pe = j(() => import("./BaseDraggableDialog-Gm4Q30j0.js").then((e) => e.n)), { vue_ui_word_cloud: Fe } = v(), { isThemeValid: Ie, warnInvalidTheme: Le } = b(), z = e, Re = Ee, ze = E({
|
|
652
|
+
get() {
|
|
653
|
+
return !!z.dataset && z.dataset.length;
|
|
654
|
+
},
|
|
655
|
+
set(e) {
|
|
656
|
+
return e;
|
|
657
|
+
}
|
|
658
|
+
}), B = F(m()), Be = F(0), V = F(null), Ve = F(null), He = F(null), Ue = F(0), We = F(0), Ge = F(!1), Ke = F(null), qe = F(null), Je = F(!1), Ye = F(!1), Xe = F(null), H = F(null), dt = F({
|
|
659
|
+
x: 0,
|
|
660
|
+
y: 0
|
|
661
|
+
}), ft = F("pointer"), pt = F(!1), U = F(Tt()), W = E(() => U.value.userOptions), G = E(() => U.value.style.chart.tooltip), mt = E(() => U.value.style.chart.controls), K = E(() => U.value.style.chart.words), q = E(() => U.value.style.chart);
|
|
662
|
+
g({
|
|
663
|
+
config: () => U.value,
|
|
664
|
+
dataset: () => z.dataset,
|
|
665
|
+
component: "VueUiWordCloud",
|
|
666
|
+
rules: [_.noHint]
|
|
667
|
+
});
|
|
668
|
+
let ht = E(() => U.value.userOptions.useCursorPointer), gt = E(() => u({
|
|
669
|
+
defaultConfig: {
|
|
670
|
+
userOptions: { show: !1 },
|
|
671
|
+
table: { show: !1 },
|
|
672
|
+
useCssAnimation: !1,
|
|
673
|
+
animationDelayMs: 0,
|
|
674
|
+
nodeCategories: {},
|
|
675
|
+
nodeCategoryColors: {},
|
|
676
|
+
style: { chart: {
|
|
677
|
+
backgroundColor: "#99999930",
|
|
678
|
+
words: {
|
|
679
|
+
color: "#6A6A6A",
|
|
680
|
+
usePalette: !1,
|
|
681
|
+
selectedStroke: "#CCCCCC"
|
|
682
|
+
}
|
|
683
|
+
} }
|
|
684
|
+
},
|
|
685
|
+
userConfig: U.value.skeletonConfig ?? {}
|
|
686
|
+
})), { loading: _t, FINAL_DATASET: vt, manualLoading: yt } = te({
|
|
687
|
+
...we(z),
|
|
688
|
+
FINAL_CONFIG: U,
|
|
689
|
+
prepareConfig: Tt,
|
|
690
|
+
callback: () => {
|
|
691
|
+
Promise.resolve().then(() => {
|
|
692
|
+
Z.value.showTable = U.value.table.show, Z.value.showTooltip = G.value.show, Z.value.showZoom = q.value.zoom.show;
|
|
693
|
+
});
|
|
694
|
+
},
|
|
695
|
+
skeletonDataset: z.config?.skeletonDataset ?? [
|
|
696
|
+
{
|
|
697
|
+
name: "Lorem",
|
|
698
|
+
value: 6
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
name: "ipsum",
|
|
702
|
+
value: 3
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
name: "dolor",
|
|
706
|
+
value: 1
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
name: "sit",
|
|
710
|
+
value: 3
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
name: "amet",
|
|
714
|
+
value: 3
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
name: "consectetur",
|
|
718
|
+
value: 2
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
name: "adipiscing",
|
|
722
|
+
value: 1
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
name: "elit",
|
|
726
|
+
value: 2
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
name: "Vivamus",
|
|
730
|
+
value: 2
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
name: "pulvinar",
|
|
734
|
+
value: 1
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
name: "pretium",
|
|
738
|
+
value: 1
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
name: "venenatis",
|
|
742
|
+
value: 2
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
name: "Donec",
|
|
746
|
+
value: 1
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
name: "imperdiet",
|
|
750
|
+
value: 3
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
name: "id",
|
|
754
|
+
value: 1
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
name: "porttitor",
|
|
758
|
+
value: 2
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
name: "tristique",
|
|
762
|
+
value: 1
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
name: "Aenean",
|
|
766
|
+
value: 2
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
name: "ac",
|
|
770
|
+
value: 5
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
name: "commodo",
|
|
774
|
+
value: 2
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
name: "justo",
|
|
778
|
+
value: 2
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
name: "Vestibulum",
|
|
782
|
+
value: 2
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
name: "placerat",
|
|
786
|
+
value: 1
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
name: "molestie",
|
|
790
|
+
value: 1
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
name: "nisl",
|
|
794
|
+
value: 1
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
name: "lacinia",
|
|
798
|
+
value: 2
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
name: "nulla",
|
|
802
|
+
value: 1
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
name: "posuere",
|
|
806
|
+
value: 2
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
name: "quis",
|
|
810
|
+
value: 3
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
name: "ullamcorper",
|
|
814
|
+
value: 1
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
name: "eu",
|
|
818
|
+
value: 1
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
name: "ex",
|
|
822
|
+
value: 1
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
name: "vitae",
|
|
826
|
+
value: 3
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
name: "facilisis",
|
|
830
|
+
value: 1
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
name: "Aliquam",
|
|
834
|
+
value: 1
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
name: "erat",
|
|
838
|
+
value: 1
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
name: "volutpat",
|
|
842
|
+
value: 1
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
name: "Proin",
|
|
846
|
+
value: 1
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
name: "nunc",
|
|
850
|
+
value: 1
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
name: "felis",
|
|
854
|
+
value: 1
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
name: "gravida",
|
|
858
|
+
value: 3
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
name: "sed",
|
|
862
|
+
value: 1
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
name: "orci",
|
|
866
|
+
value: 1
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
name: "Interdum",
|
|
870
|
+
value: 1
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
name: "et",
|
|
874
|
+
value: 1
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
name: "malesuada",
|
|
878
|
+
value: 1
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
name: "fames",
|
|
882
|
+
value: 1
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
name: "ante",
|
|
886
|
+
value: 1
|
|
887
|
+
}
|
|
888
|
+
],
|
|
889
|
+
skeletonConfig: u({
|
|
890
|
+
defaultConfig: U.value,
|
|
891
|
+
userConfig: gt.value
|
|
892
|
+
})
|
|
893
|
+
}), bt = F(xt());
|
|
894
|
+
function xt() {
|
|
895
|
+
return typeof vt.value == "string" ? i(vt.value) : vt.value.map((e, t) => ({
|
|
896
|
+
...e,
|
|
897
|
+
value: d(e.value)
|
|
898
|
+
}));
|
|
899
|
+
}
|
|
900
|
+
let { userOptionsVisible: St, setUserOptionsVisibility: Ct, keepUserOptionState: wt } = T({ config: U.value }), { svgRef: J } = oe({ config: q.value.title });
|
|
901
|
+
function Tt() {
|
|
902
|
+
let e = y({
|
|
903
|
+
userConfig: z.config,
|
|
904
|
+
defaultConfig: Fe
|
|
905
|
+
}), t = e.theme;
|
|
906
|
+
if (!t) return e;
|
|
907
|
+
if (!Ie.value(e)) return Le(e), e;
|
|
908
|
+
let n = y({
|
|
909
|
+
userConfig: ce[t] || z.config,
|
|
910
|
+
defaultConfig: e
|
|
911
|
+
}), r = y({
|
|
912
|
+
userConfig: z.config,
|
|
913
|
+
defaultConfig: n
|
|
914
|
+
});
|
|
915
|
+
return {
|
|
916
|
+
...r,
|
|
917
|
+
customPalette: r.customPalette.length ? r.customPalette : l[t] || a
|
|
918
|
+
};
|
|
919
|
+
}
|
|
920
|
+
let Et = F({
|
|
921
|
+
x: 0,
|
|
922
|
+
y: 0
|
|
923
|
+
});
|
|
924
|
+
function Dt() {
|
|
925
|
+
let e = {
|
|
926
|
+
x: 0,
|
|
927
|
+
y: 0,
|
|
928
|
+
width: Math.max(10, Y.value.width),
|
|
929
|
+
height: Math.max(10, Y.value.height)
|
|
930
|
+
};
|
|
931
|
+
nn(e), Et.value = {
|
|
932
|
+
x: e.x + e.width / 2,
|
|
933
|
+
y: e.y + e.height / 2
|
|
934
|
+
}, en();
|
|
935
|
+
}
|
|
936
|
+
let Ot = re(() => {
|
|
937
|
+
Vt();
|
|
938
|
+
}, 100), kt = F(!1);
|
|
939
|
+
Te(() => kt.value, (e) => {
|
|
940
|
+
e === !1 && (Ye.value = !0, Ot(), Dt());
|
|
941
|
+
}), Te(() => z.config, (e) => {
|
|
942
|
+
U.value = Tt(), St.value = !U.value.userOptions.showOnChartHover, Pt(), Ue.value += 1, We.value += 1, Z.value.showTable = U.value.table.show, Z.value.showTooltip = G.value.show, Z.value.showZoom = q.value.zoom.show;
|
|
943
|
+
}, { deep: !0 });
|
|
944
|
+
let Y = F({
|
|
945
|
+
width: q.value.width,
|
|
946
|
+
height: q.value.height,
|
|
947
|
+
maxFontSize: K.value.maxFontSize,
|
|
948
|
+
minFontSize: K.value.minFontSize,
|
|
949
|
+
bold: K.value.bold
|
|
950
|
+
}), At = re(() => {
|
|
951
|
+
let { width: e, height: t } = ie({
|
|
952
|
+
chart: V.value,
|
|
953
|
+
title: q.value.title.text ? Ve.value : null,
|
|
954
|
+
legend: mt.value.show ? Xe.value?.$el : null,
|
|
955
|
+
source: He.value
|
|
956
|
+
});
|
|
957
|
+
requestAnimationFrame(async () => {
|
|
958
|
+
Y.value.width = Math.max(10, e), Y.value.height = Math.max(10, t - 12), await he(), kt.value = !1;
|
|
959
|
+
});
|
|
960
|
+
}, 100), jt = () => {
|
|
961
|
+
kt.value = !0, At();
|
|
962
|
+
}, X = Se(null), Mt = Se(null);
|
|
963
|
+
ye(Pt);
|
|
964
|
+
let Nt = E(() => U.value.debug);
|
|
965
|
+
function Pt() {
|
|
966
|
+
o(z.dataset) ? p({
|
|
967
|
+
componentName: "VueUiWordCloud",
|
|
968
|
+
type: "dataset",
|
|
969
|
+
debug: Nt.value
|
|
970
|
+
}) : bt.value.forEach((e, t) => {
|
|
971
|
+
f({
|
|
972
|
+
datasetObject: e,
|
|
973
|
+
requiredAttributes: ["name", "value"]
|
|
974
|
+
}).forEach((e) => {
|
|
975
|
+
ze.value = !1, p({
|
|
976
|
+
componentName: "VueUiWordCloud",
|
|
977
|
+
type: "datasetSerieAttribute",
|
|
978
|
+
property: e,
|
|
979
|
+
index: t,
|
|
980
|
+
debug: Nt.value
|
|
981
|
+
});
|
|
982
|
+
});
|
|
983
|
+
}), o(z.dataset) || (yt.value = U.value.loading), U.value.responsive && (X.value && (Mt.value && X.value.unobserve(Mt.value), X.value.disconnect()), X.value = new ResizeObserver(jt), Mt.value = V.value.parentNode, X.value.observe(Mt.value)), Dt();
|
|
984
|
+
}
|
|
985
|
+
ve(() => {
|
|
986
|
+
X.value && (Mt.value && X.value.unobserve(Mt.value), X.value.disconnect());
|
|
987
|
+
});
|
|
988
|
+
let { isPrinting: Ft, isImaging: It, generatePdf: Lt, generateImage: Rt } = ee({
|
|
989
|
+
elementId: `wordCloud_${B.value}`,
|
|
990
|
+
fileName: q.value.title.text || "vue-ui-word-cloud",
|
|
991
|
+
options: U.value.userOptions.print
|
|
992
|
+
}), Z = F({
|
|
993
|
+
showTable: U.value.table.show,
|
|
994
|
+
showTooltip: G.value.show,
|
|
995
|
+
showZoom: q.value.zoom.show
|
|
996
|
+
});
|
|
997
|
+
Te(U, () => {
|
|
998
|
+
Z.value.showTable = U.value.table.show, Z.value.showTooltip = G.value.show, Z.value.showZoom = q.value.zoom.show;
|
|
999
|
+
}, { immediate: !0 });
|
|
1000
|
+
function zt(e, t, n = "Arial") {
|
|
1001
|
+
let r = document.createElement("canvas").getContext("2d");
|
|
1002
|
+
return r.font = `${t}px ${K.value.bold ? "bold" : "normal"} ${n}`, {
|
|
1003
|
+
width: r.measureText(e).width + K.value.proximity,
|
|
1004
|
+
height: t
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
let Q = F([]), Bt = /* @__PURE__ */ new Map();
|
|
1008
|
+
function Vt() {
|
|
1009
|
+
let e = [...bt.value].map((e) => e.value), t = Math.max(...e), n = Math.min(...e), r = [...bt.value].map((e, r) => {
|
|
1010
|
+
let i = (e.value - n) / (t - n) * (Y.value.maxFontSize - Y.value.minFontSize) + Y.value.minFontSize;
|
|
1011
|
+
i = isNaN(i) ? Y.value.minFontSize : i;
|
|
1012
|
+
let o = zt(e.name, i);
|
|
1013
|
+
return {
|
|
1014
|
+
...e,
|
|
1015
|
+
id: e.id ?? `${e.name}__${r}`,
|
|
1016
|
+
fontSize: i,
|
|
1017
|
+
width: o.width,
|
|
1018
|
+
height: o.height,
|
|
1019
|
+
color: e.color ? s(e.color) : K.value.usePalette ? U.value.customPalette[r] || U.value.customPalette[r % U.value.customPalette.length] || a[r] || a[r % a.length] : K.value.color
|
|
1020
|
+
};
|
|
1021
|
+
});
|
|
1022
|
+
Q.value.length = 0, Bt.clear(), Ze({
|
|
1023
|
+
debugTiming: Nt.value,
|
|
1024
|
+
words: r,
|
|
1025
|
+
svg: Y.value,
|
|
1026
|
+
proximity: K.value.proximity,
|
|
1027
|
+
strictPixelPadding: U.value.strictPixelPadding,
|
|
1028
|
+
quality: U.value.quality,
|
|
1029
|
+
onProgress: ({ all: e }) => {
|
|
1030
|
+
for (let t of e) {
|
|
1031
|
+
let e = t.id, n = Bt.get(e);
|
|
1032
|
+
if (n === void 0) n = Q.value.length, Bt.set(e, n), Q.value.push({ ...t });
|
|
1033
|
+
else {
|
|
1034
|
+
let e = Q.value[n];
|
|
1035
|
+
e.x = t.x, e.y = t.y, e.width = t.width, e.height = t.height, e.fontSize = t.fontSize, e.minX = t.minX, e.minY = t.minY, e.maxX = t.maxX, e.maxY = t.maxY;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
}), Q.value.sort((e, t) => t.fontSize - e.fontSize), Bt.clear(), Q.value.forEach((e, t) => {
|
|
1040
|
+
Bt.set(e.id, t);
|
|
1041
|
+
}), Je.value = !0, Ye.value = !1;
|
|
1042
|
+
}
|
|
1043
|
+
let Ht = E(() => ({
|
|
1044
|
+
head: Q.value.map((e) => ({
|
|
1045
|
+
name: e.name,
|
|
1046
|
+
color: e.color
|
|
1047
|
+
})),
|
|
1048
|
+
body: Q.value.map((e) => e.value)
|
|
1049
|
+
}));
|
|
1050
|
+
function Ut(e = null) {
|
|
1051
|
+
he(() => {
|
|
1052
|
+
let n = Ht.value.head.map((e, t) => [[e.name], [Ht.value.body[t]]]), i = [
|
|
1053
|
+
[q.value.title.text],
|
|
1054
|
+
[q.value.title.subtitle.text],
|
|
1055
|
+
[[""], [U.value.table.columnNames.value]]
|
|
1056
|
+
].concat(n), a = r(i);
|
|
1057
|
+
e ? e(a) : t({
|
|
1058
|
+
csvContent: a,
|
|
1059
|
+
title: q.value.title.text || "vue-ui-word-cloud"
|
|
1060
|
+
});
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
let Wt = E(() => {
|
|
1064
|
+
let e = [U.value.table.columnNames.series, U.value.table.columnNames.value], t = Ht.value.head.map((e, t) => {
|
|
1065
|
+
let n = c({
|
|
1066
|
+
p: U.value.table.td.prefix,
|
|
1067
|
+
v: Ht.value.body[t],
|
|
1068
|
+
s: U.value.table.td.suffix,
|
|
1069
|
+
r: U.value.table.td.roundingValue
|
|
1070
|
+
});
|
|
1071
|
+
return [{
|
|
1072
|
+
color: e.color,
|
|
1073
|
+
name: e.name
|
|
1074
|
+
}, n];
|
|
1075
|
+
}), n = t.map((e) => e.map((e, t) => t === 0 ? e.name : e)), r = {
|
|
1076
|
+
th: {
|
|
1077
|
+
backgroundColor: U.value.table.th.backgroundColor,
|
|
1078
|
+
color: U.value.table.th.color,
|
|
1079
|
+
outline: U.value.table.th.outline
|
|
1080
|
+
},
|
|
1081
|
+
td: {
|
|
1082
|
+
backgroundColor: U.value.table.td.backgroundColor,
|
|
1083
|
+
color: U.value.table.td.color,
|
|
1084
|
+
outline: U.value.table.td.outline
|
|
1085
|
+
},
|
|
1086
|
+
breakpoint: U.value.table.responsiveBreakpoint
|
|
1087
|
+
};
|
|
1088
|
+
return {
|
|
1089
|
+
colNames: [U.value.table.columnNames.series, U.value.table.columnNames.value],
|
|
1090
|
+
head: e,
|
|
1091
|
+
body: t,
|
|
1092
|
+
a11yBody: n,
|
|
1093
|
+
config: r
|
|
1094
|
+
};
|
|
1095
|
+
}), $ = F(!1);
|
|
1096
|
+
function Gt(e) {
|
|
1097
|
+
$.value = e, Be.value += 1;
|
|
1098
|
+
}
|
|
1099
|
+
function Kt() {
|
|
1100
|
+
return Q.value;
|
|
1101
|
+
}
|
|
1102
|
+
function qt() {
|
|
1103
|
+
Z.value.showTable = !Z.value.showTable;
|
|
1104
|
+
}
|
|
1105
|
+
function Jt() {
|
|
1106
|
+
Z.value.showTooltip = !Z.value.showTooltip;
|
|
1107
|
+
}
|
|
1108
|
+
let Yt = F(!1);
|
|
1109
|
+
function Xt() {
|
|
1110
|
+
Yt.value = !Yt.value;
|
|
1111
|
+
}
|
|
1112
|
+
function Zt() {
|
|
1113
|
+
Z.value.showZoom = !Z.value.showZoom;
|
|
1114
|
+
}
|
|
1115
|
+
let Qt = E(() => !Yt.value && Z.value.showZoom), { viewBox: $t, resetZoom: en, isZoom: tn, setInitialViewBox: nn, zoomByFactor: rn, scale: an } = se(J, {
|
|
1116
|
+
x: 0,
|
|
1117
|
+
y: 0,
|
|
1118
|
+
width: Y.value.width <= 0 ? 10 : Y.value.width,
|
|
1119
|
+
height: Y.value.height <= 0 ? 10 : Y.value.height
|
|
1120
|
+
}, 1, Qt);
|
|
1121
|
+
Te(() => z.dataset, () => {
|
|
1122
|
+
bt.value = xt(), U.value.responsive || (Vt(), Dt());
|
|
1123
|
+
}, { immediate: !0 });
|
|
1124
|
+
async function on({ scale: e = 2 } = {}) {
|
|
1125
|
+
if (!V.value) return;
|
|
1126
|
+
let { width: t, height: n } = V.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await S({
|
|
1127
|
+
domElement: V.value,
|
|
1128
|
+
base64: !0,
|
|
1129
|
+
img: !0,
|
|
1130
|
+
scale: e
|
|
1131
|
+
});
|
|
1132
|
+
return {
|
|
1133
|
+
imageUri: i,
|
|
1134
|
+
base64: a,
|
|
1135
|
+
title: q.value.title.text,
|
|
1136
|
+
width: t,
|
|
1137
|
+
height: n,
|
|
1138
|
+
aspectRatio: r
|
|
1139
|
+
};
|
|
1140
|
+
}
|
|
1141
|
+
let sn = E(() => {
|
|
1142
|
+
let e = U.value.table.useDialog && !U.value.table.show, t = Z.value.showTable;
|
|
1143
|
+
return {
|
|
1144
|
+
component: e ? Pe : ke,
|
|
1145
|
+
title: `${q.value.title.text}${q.value.title.subtitle.text ? `: ${q.value.title.subtitle.text}` : ""}`,
|
|
1146
|
+
props: e ? {
|
|
1147
|
+
backgroundColor: U.value.table.th.backgroundColor,
|
|
1148
|
+
color: U.value.table.th.color,
|
|
1149
|
+
headerColor: U.value.table.th.color,
|
|
1150
|
+
headerBg: U.value.table.th.backgroundColor,
|
|
1151
|
+
isFullscreen: $.value,
|
|
1152
|
+
fullscreenParent: V.value,
|
|
1153
|
+
forcedWidth: Math.min(500, window.innerWidth * .8),
|
|
1154
|
+
isCursorPointer: ht.value
|
|
1155
|
+
} : {
|
|
1156
|
+
hideDetails: !0,
|
|
1157
|
+
config: {
|
|
1158
|
+
open: t,
|
|
1159
|
+
maxHeight: 1e4,
|
|
1160
|
+
body: {
|
|
1161
|
+
backgroundColor: q.value.backgroundColor,
|
|
1162
|
+
color: q.value.color
|
|
1163
|
+
},
|
|
1164
|
+
head: {
|
|
1165
|
+
backgroundColor: q.value.backgroundColor,
|
|
1166
|
+
color: q.value.color
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
};
|
|
1171
|
+
});
|
|
1172
|
+
Te(() => Z.value.showTable, (e) => {
|
|
1173
|
+
U.value.table.show || (e && U.value.table.useDialog && Ke.value ? Ke.value.open() : "close" in Ke.value && Ke.value.close());
|
|
1174
|
+
});
|
|
1175
|
+
function cn() {
|
|
1176
|
+
Z.value.showTable = !1, qe.value && qe.value.setTableIconState(!1);
|
|
1177
|
+
}
|
|
1178
|
+
let ln = E(() => q.value.backgroundColor), un = E(() => q.value.title), { isCallbackImaging: dn, isCallbackSvg: fn, generateSvg: pn, onGenerateImage: mn } = x({
|
|
1179
|
+
svg: J,
|
|
1180
|
+
title: un,
|
|
1181
|
+
legend: null,
|
|
1182
|
+
legendItems: null,
|
|
1183
|
+
backgroundColor: ln,
|
|
1184
|
+
getSvgCallback: () => U.value.userOptions.callbacks.svg,
|
|
1185
|
+
generateImage: Rt
|
|
1186
|
+
});
|
|
1187
|
+
function hn() {
|
|
1188
|
+
rn(1.5, !0);
|
|
1189
|
+
}
|
|
1190
|
+
function gn() {
|
|
1191
|
+
rn(1 / 1.5, !0);
|
|
1192
|
+
}
|
|
1193
|
+
let _n = F(null), vn = F(!1), yn = F(""), bn = F(null);
|
|
1194
|
+
function xn() {
|
|
1195
|
+
_n.value = null, H.value = null, Ge.value = !1;
|
|
1196
|
+
}
|
|
1197
|
+
function Sn(e, t) {
|
|
1198
|
+
U.value.events.datapointLeave && U.value.events.datapointLeave({
|
|
1199
|
+
datapoint: e,
|
|
1200
|
+
seriesIndex: t
|
|
1201
|
+
}), (H.value !== t || ft.value !== "keyboard") && (_n.value = null, Ge.value = !1);
|
|
1202
|
+
}
|
|
1203
|
+
function Cn(e, t) {
|
|
1204
|
+
U.value.events.datapointClick && U.value.events.datapointClick({
|
|
1205
|
+
datapoint: e,
|
|
1206
|
+
seriesIndex: t
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
1209
|
+
function wn(e) {
|
|
1210
|
+
if (!J.value || e == null) return;
|
|
1211
|
+
let t = J.value.querySelector(`[data-a11y-word-index="${e}-${B.value}"]`);
|
|
1212
|
+
if (!t) return;
|
|
1213
|
+
let n = t.getBoundingClientRect();
|
|
1214
|
+
dt.value = {
|
|
1215
|
+
x: n.left + n.width / 2,
|
|
1216
|
+
y: n.top + n.height / 2
|
|
1217
|
+
};
|
|
1218
|
+
}
|
|
1219
|
+
function Tn(e, t, r = "pointer") {
|
|
1220
|
+
if (U.value.events.datapointEnter && U.value.events.datapointEnter({
|
|
1221
|
+
datapoint: e,
|
|
1222
|
+
seriesIndex: t
|
|
1223
|
+
}), !Z.value.showTooltip) return;
|
|
1224
|
+
ft.value = r, H.value = t, _n.value = e.id, bn.value = {
|
|
1225
|
+
datapoint: e,
|
|
1226
|
+
config: U.value,
|
|
1227
|
+
seriesIndex: t
|
|
1228
|
+
};
|
|
1229
|
+
let i = G.value.customFormat;
|
|
1230
|
+
if (vn.value = !1, n(i)) try {
|
|
1231
|
+
let t = i({
|
|
1232
|
+
datapoint: e,
|
|
1233
|
+
config: U.value
|
|
1234
|
+
});
|
|
1235
|
+
typeof t == "string" && (yn.value = t, vn.value = !0);
|
|
1236
|
+
} catch {
|
|
1237
|
+
console.warn("Custom format cannot be applied."), vn.value = !1;
|
|
1238
|
+
}
|
|
1239
|
+
if (!vn.value) {
|
|
1240
|
+
let t = `<svg viewBox="0 0 10 10" height="${G.value.fontSize}"><circle cx="5" cy="5" r="5" fill="${e.color}"/></svg><span>${e.name}:</span><b>${(e.value || 0).toFixed(G.value.roundingValue)}</b>`;
|
|
1241
|
+
yn.value = `<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${t}</div>`;
|
|
1242
|
+
}
|
|
1243
|
+
r === "keyboard" && he(() => {
|
|
1244
|
+
wn(t);
|
|
1245
|
+
}), Ge.value = !0;
|
|
1246
|
+
}
|
|
1247
|
+
async function En() {
|
|
1248
|
+
if (Re("copyAlt", {
|
|
1249
|
+
config: U.value,
|
|
1250
|
+
dataset: Q.value
|
|
1251
|
+
}), !U.value.userOptions.callbacks.altCopy) {
|
|
1252
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1253
|
+
return;
|
|
1254
|
+
}
|
|
1255
|
+
await Promise.resolve(U.value.userOptions.callbacks.altCopy({
|
|
1256
|
+
config: U.value,
|
|
1257
|
+
dataset: Q.value
|
|
1258
|
+
}));
|
|
1259
|
+
}
|
|
1260
|
+
function Dn() {
|
|
1261
|
+
H.value = null, pt.value = !0;
|
|
1262
|
+
}
|
|
1263
|
+
function On() {
|
|
1264
|
+
xn(), pt.value = !1;
|
|
1265
|
+
}
|
|
1266
|
+
function kn(e) {
|
|
1267
|
+
if (!J.value || Yt.value || document.activeElement !== J.value || !Q.value.length) return;
|
|
1268
|
+
let t = e.key === "ArrowLeft" || e.key === "ArrowUp", n = e.key === "ArrowRight" || e.key === "ArrowDown", r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
|
|
1269
|
+
if (!t && !n && !r && !i) return;
|
|
1270
|
+
if (e.preventDefault(), e.stopPropagation(), i) {
|
|
1271
|
+
xn();
|
|
1272
|
+
return;
|
|
1273
|
+
}
|
|
1274
|
+
if (r) {
|
|
1275
|
+
if (H.value === null) return;
|
|
1276
|
+
let e = Q.value[H.value];
|
|
1277
|
+
if (!e) return;
|
|
1278
|
+
Cn(e, H.value);
|
|
1279
|
+
return;
|
|
1280
|
+
}
|
|
1281
|
+
let a = H.value;
|
|
1282
|
+
a === null || a < 0 || a >= Q.value.length ? a = n ? 0 : Q.value.length - 1 : (a += n ? 1 : -1, a < 0 && (a = Q.value.length - 1), a >= Q.value.length && (a = 0));
|
|
1283
|
+
let o = Q.value[a];
|
|
1284
|
+
o && Tn(o, a, "keyboard");
|
|
1285
|
+
}
|
|
1286
|
+
let An = E(() => ({
|
|
1287
|
+
headers: Wt.value?.colNames ?? [],
|
|
1288
|
+
rows: Wt.value?.a11yBody ?? []
|
|
1289
|
+
}));
|
|
1290
|
+
return w({
|
|
1291
|
+
getData: Kt,
|
|
1292
|
+
getImage: on,
|
|
1293
|
+
generateCsv: Ut,
|
|
1294
|
+
generatePdf: Lt,
|
|
1295
|
+
generateImage: Rt,
|
|
1296
|
+
generateSvg: pn,
|
|
1297
|
+
resetZoom: en,
|
|
1298
|
+
toggleTable: qt,
|
|
1299
|
+
toggleTooltip: Jt,
|
|
1300
|
+
toggleAnnotator: Xt,
|
|
1301
|
+
toggleFullscreen: Gt,
|
|
1302
|
+
toggleZoom: Zt,
|
|
1303
|
+
copyAlt: En
|
|
1304
|
+
}), (e, t) => (P(), k("div", {
|
|
1305
|
+
class: "vue-data-ui-component vue-ui-word-cloud",
|
|
1306
|
+
ref_key: "wordCloudChart",
|
|
1307
|
+
ref: V,
|
|
1308
|
+
id: `wordCloud_${B.value}`,
|
|
1309
|
+
"data-resizing": kt.value,
|
|
1310
|
+
"data-relayout": Ye.value,
|
|
1311
|
+
style: _e(`width: 100%; font-family:${U.value.style.fontFamily};background:${q.value.backgroundColor};${U.value.responsive ? "height:100%" : ""}`),
|
|
1312
|
+
onMouseenter: t[3] ||= () => L(Ct)(!0),
|
|
1313
|
+
onMouseleave: t[4] ||= () => {
|
|
1314
|
+
L(Ct)(!1), pt.value || xn();
|
|
1315
|
+
}
|
|
1316
|
+
}, [
|
|
1317
|
+
A("div", {
|
|
1318
|
+
id: `chart-instructions-${B.value}`,
|
|
1319
|
+
class: "sr-only"
|
|
1320
|
+
}, [A("p", null, Ce(U.value.a11y.translations.keyboardNavigation), 1)], 8, $e),
|
|
1321
|
+
An.value?.rows?.length ? (P(), D(ae, {
|
|
1322
|
+
key: 0,
|
|
1323
|
+
uid: B.value,
|
|
1324
|
+
head: An.value.headers,
|
|
1325
|
+
body: An.value.rows,
|
|
1326
|
+
notice: U.value.a11y.translations.tableAvailable,
|
|
1327
|
+
caption: U.value.a11y.translations.tableCaption
|
|
1328
|
+
}, null, 8, [
|
|
1329
|
+
"uid",
|
|
1330
|
+
"head",
|
|
1331
|
+
"body",
|
|
1332
|
+
"notice",
|
|
1333
|
+
"caption"
|
|
1334
|
+
])) : O("", !0),
|
|
1335
|
+
W.value.buttons.annotator ? (P(), D(L(je), {
|
|
1336
|
+
key: 1,
|
|
1337
|
+
svgRef: L(J),
|
|
1338
|
+
backgroundColor: q.value.backgroundColor,
|
|
1339
|
+
color: q.value.color,
|
|
1340
|
+
active: Yt.value,
|
|
1341
|
+
isCursorPointer: ht.value,
|
|
1342
|
+
palette: W.value.annotatorPalette,
|
|
1343
|
+
onClose: Xt
|
|
1344
|
+
}, {
|
|
1345
|
+
"annotator-action-close": R(() => [I(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1346
|
+
"annotator-action-color": R(({ color: t }) => [I(e.$slots, "annotator-action-color", N(M({ color: t })), void 0, !0)]),
|
|
1347
|
+
"annotator-action-draw": R(({ mode: t }) => [I(e.$slots, "annotator-action-draw", N(M({ mode: t })), void 0, !0)]),
|
|
1348
|
+
"annotator-action-undo": R(({ disabled: t }) => [I(e.$slots, "annotator-action-undo", N(M({ disabled: t })), void 0, !0)]),
|
|
1349
|
+
"annotator-action-redo": R(({ disabled: t }) => [I(e.$slots, "annotator-action-redo", N(M({ disabled: t })), void 0, !0)]),
|
|
1350
|
+
"annotator-action-delete": R(({ disabled: t }) => [I(e.$slots, "annotator-action-delete", N(M({ disabled: t })), void 0, !0)]),
|
|
1351
|
+
_: 3
|
|
1352
|
+
}, 8, [
|
|
1353
|
+
"svgRef",
|
|
1354
|
+
"backgroundColor",
|
|
1355
|
+
"color",
|
|
1356
|
+
"active",
|
|
1357
|
+
"isCursorPointer",
|
|
1358
|
+
"palette"
|
|
1359
|
+
])) : O("", !0),
|
|
1360
|
+
q.value.title.text ? (P(), k("div", {
|
|
1361
|
+
key: 2,
|
|
1362
|
+
ref_key: "chartTitle",
|
|
1363
|
+
ref: Ve,
|
|
1364
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
1365
|
+
}, [(P(), D(C, {
|
|
1366
|
+
key: `title_${Ue.value}`,
|
|
1367
|
+
config: {
|
|
1368
|
+
title: { ...q.value.title },
|
|
1369
|
+
subtitle: { ...q.value.title.subtitle }
|
|
1370
|
+
}
|
|
1371
|
+
}, null, 8, ["config"]))], 512)) : O("", !0),
|
|
1372
|
+
W.value.show && ze.value && (L(wt) || L(St)) ? (P(), D(L(Me), {
|
|
1373
|
+
ref_key: "userOptionsRef",
|
|
1374
|
+
ref: qe,
|
|
1375
|
+
key: `user_option_${Be.value}`,
|
|
1376
|
+
backgroundColor: q.value.backgroundColor,
|
|
1377
|
+
color: q.value.color,
|
|
1378
|
+
isPrinting: L(Ft),
|
|
1379
|
+
isImaging: L(It),
|
|
1380
|
+
uid: B.value,
|
|
1381
|
+
hasPdf: W.value.buttons.pdf,
|
|
1382
|
+
hasXls: W.value.buttons.csv,
|
|
1383
|
+
hasImg: W.value.buttons.img,
|
|
1384
|
+
hasSvg: W.value.buttons.svg,
|
|
1385
|
+
hasTable: W.value.buttons.table,
|
|
1386
|
+
hasFullscreen: W.value.buttons.fullscreen,
|
|
1387
|
+
hasAltCopy: W.value.buttons.altCopy,
|
|
1388
|
+
isFullscreen: $.value,
|
|
1389
|
+
titles: { ...W.value.buttonTitles },
|
|
1390
|
+
chartElement: V.value,
|
|
1391
|
+
position: W.value.position,
|
|
1392
|
+
hasTooltip: G.value.show && W.value.buttons.tooltip,
|
|
1393
|
+
isTooltip: Z.value.showTooltip,
|
|
1394
|
+
hasAnnotator: W.value.buttons.annotator,
|
|
1395
|
+
isAnnotation: Yt.value,
|
|
1396
|
+
callbacks: W.value.callbacks,
|
|
1397
|
+
printScale: W.value.print.scale,
|
|
1398
|
+
tableDialog: U.value.table.useDialog,
|
|
1399
|
+
hasZoom: W.value.buttons.zoom,
|
|
1400
|
+
isZoom: Z.value.showZoom,
|
|
1401
|
+
isCursorPointer: ht.value,
|
|
1402
|
+
onToggleFullscreen: Gt,
|
|
1403
|
+
onGeneratePdf: L(Lt),
|
|
1404
|
+
onGenerateCsv: Ut,
|
|
1405
|
+
onGenerateImage: L(mn),
|
|
1406
|
+
onGenerateSvg: L(pn),
|
|
1407
|
+
onToggleTable: qt,
|
|
1408
|
+
onToggleTooltip: Jt,
|
|
1409
|
+
onToggleAnnotator: Xt,
|
|
1410
|
+
onToggleZoom: Zt,
|
|
1411
|
+
onCopyAlt: En,
|
|
1412
|
+
style: _e({ visibility: L(wt) ? L(St) ? "visible" : "hidden" : "visible" })
|
|
1413
|
+
}, de({ _: 2 }, [
|
|
1414
|
+
e.$slots.menuIcon ? {
|
|
1415
|
+
name: "menuIcon",
|
|
1416
|
+
fn: R(({ isOpen: t, color: n }) => [I(e.$slots, "menuIcon", N(M({
|
|
1417
|
+
isOpen: t,
|
|
1418
|
+
color: n
|
|
1419
|
+
})), void 0, !0)]),
|
|
1420
|
+
key: "0"
|
|
1421
|
+
} : void 0,
|
|
1422
|
+
e.$slots.optionTooltip ? {
|
|
1423
|
+
name: "optionTooltip",
|
|
1424
|
+
fn: R(() => [I(e.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1425
|
+
key: "1"
|
|
1426
|
+
} : void 0,
|
|
1427
|
+
e.$slots.optionPdf ? {
|
|
1428
|
+
name: "optionPdf",
|
|
1429
|
+
fn: R(() => [I(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1430
|
+
key: "2"
|
|
1431
|
+
} : void 0,
|
|
1432
|
+
e.$slots.optionCsv ? {
|
|
1433
|
+
name: "optionCsv",
|
|
1434
|
+
fn: R(() => [I(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1435
|
+
key: "3"
|
|
1436
|
+
} : void 0,
|
|
1437
|
+
e.$slots.optionImg ? {
|
|
1438
|
+
name: "optionImg",
|
|
1439
|
+
fn: R(() => [I(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1440
|
+
key: "4"
|
|
1441
|
+
} : void 0,
|
|
1442
|
+
e.$slots.optionSvg ? {
|
|
1443
|
+
name: "optionSvg",
|
|
1444
|
+
fn: R(() => [I(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1445
|
+
key: "5"
|
|
1446
|
+
} : void 0,
|
|
1447
|
+
e.$slots.optionTable ? {
|
|
1448
|
+
name: "optionTable",
|
|
1449
|
+
fn: R(() => [I(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1450
|
+
key: "6"
|
|
1451
|
+
} : void 0,
|
|
1452
|
+
e.$slots.optionFullscreen ? {
|
|
1453
|
+
name: "optionFullscreen",
|
|
1454
|
+
fn: R(({ toggleFullscreen: t, isFullscreen: n }) => [I(e.$slots, "optionFullscreen", N(M({
|
|
1455
|
+
toggleFullscreen: t,
|
|
1456
|
+
isFullscreen: n
|
|
1457
|
+
})), void 0, !0)]),
|
|
1458
|
+
key: "7"
|
|
1459
|
+
} : void 0,
|
|
1460
|
+
e.$slots.optionAnnotator ? {
|
|
1461
|
+
name: "optionAnnotator",
|
|
1462
|
+
fn: R(({ toggleAnnotator: t, isAnnotator: n }) => [I(e.$slots, "optionAnnotator", N(M({
|
|
1463
|
+
toggleAnnotator: t,
|
|
1464
|
+
isAnnotator: n
|
|
1465
|
+
})), void 0, !0)]),
|
|
1466
|
+
key: "8"
|
|
1467
|
+
} : void 0,
|
|
1468
|
+
e.$slots.optionZoom ? {
|
|
1469
|
+
name: "optionZoom",
|
|
1470
|
+
fn: R(({ toggleZoom: t, isZoomLocked: n }) => [I(e.$slots, "optionZoom", N(M({
|
|
1471
|
+
toggleZoom: t,
|
|
1472
|
+
isZoomLocked: n
|
|
1473
|
+
})), void 0, !0)]),
|
|
1474
|
+
key: "9"
|
|
1475
|
+
} : void 0,
|
|
1476
|
+
e.$slots.optionAltCopy ? {
|
|
1477
|
+
name: "optionAltCopy",
|
|
1478
|
+
fn: R(({ altCopy: t }) => [I(e.$slots, "optionAltCopy", N(M({ altCopy: t })), void 0, !0)]),
|
|
1479
|
+
key: "10"
|
|
1480
|
+
} : void 0,
|
|
1481
|
+
e.$slots["custom-menu-before"] ? {
|
|
1482
|
+
name: "custom-menu-before",
|
|
1483
|
+
fn: R(() => [I(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1484
|
+
key: "11"
|
|
1485
|
+
} : void 0,
|
|
1486
|
+
e.$slots["custom-menu-after"] ? {
|
|
1487
|
+
name: "custom-menu-after",
|
|
1488
|
+
fn: R(() => [I(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1489
|
+
key: "12"
|
|
1490
|
+
} : void 0
|
|
1491
|
+
]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasTooltip.isTooltip.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.hasZoom.isZoom.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : O("", !0),
|
|
1492
|
+
mt.value.position === "top" && mt.value.show && !L(_t) ? (P(), D(le, {
|
|
1493
|
+
key: 4,
|
|
1494
|
+
ref_key: "zoomControls",
|
|
1495
|
+
ref: Xe,
|
|
1496
|
+
config: U.value,
|
|
1497
|
+
scale: L(an),
|
|
1498
|
+
isFullscreen: $.value,
|
|
1499
|
+
isCursorPointer: ht.value,
|
|
1500
|
+
onZoomIn: hn,
|
|
1501
|
+
onZoomOut: gn,
|
|
1502
|
+
onResetZoom: t[0] ||= (e) => L(en)(!0)
|
|
1503
|
+
}, null, 8, [
|
|
1504
|
+
"config",
|
|
1505
|
+
"scale",
|
|
1506
|
+
"isFullscreen",
|
|
1507
|
+
"isCursorPointer"
|
|
1508
|
+
])) : O("", !0),
|
|
1509
|
+
A("div", et, [(P(), k("svg", {
|
|
1510
|
+
ref_key: "svgRef",
|
|
1511
|
+
ref: J,
|
|
1512
|
+
class: ge({
|
|
1513
|
+
"vue-data-ui-fullscreen--on": $.value,
|
|
1514
|
+
"vue-data-ui-fulscreen--off": !$.value
|
|
1515
|
+
}),
|
|
1516
|
+
"aria-describedby": `chart-instructions-${B.value}`,
|
|
1517
|
+
xmlns: L(h),
|
|
1518
|
+
viewBox: `${L($t).x} ${L($t).y} ${L($t).width} ${L($t).height}`,
|
|
1519
|
+
style: "overflow:hidden;background:transparent;display:block",
|
|
1520
|
+
tabindex: "0",
|
|
1521
|
+
onFocus: Dn,
|
|
1522
|
+
onBlur: On,
|
|
1523
|
+
onKeydown: kn
|
|
1524
|
+
}, [
|
|
1525
|
+
pe(L(Ne)),
|
|
1526
|
+
e.$slots["chart-background"] ? (P(), k("foreignObject", {
|
|
1527
|
+
key: 0,
|
|
1528
|
+
x: 0,
|
|
1529
|
+
y: 0,
|
|
1530
|
+
width: Y.value.width <= 0 ? 10 : Y.value.width,
|
|
1531
|
+
height: Y.value.height <= 0 ? 10 : Y.value.height,
|
|
1532
|
+
style: { pointerEvents: "none" }
|
|
1533
|
+
}, [I(e.$slots, "chart-background", {}, void 0, !0)], 8, nt)) : O("", !0),
|
|
1534
|
+
A("g", {
|
|
1535
|
+
transform: `translate(${Et.value.x}, ${Et.value.y})`,
|
|
1536
|
+
class: ge({ "wc-finalized": Je.value })
|
|
1537
|
+
}, [(P(!0), k(ue, null, be(Q.value, (e, t) => (P(), k("g", {
|
|
1538
|
+
key: e.id,
|
|
1539
|
+
class: "vue-ui-word-cloud-word",
|
|
1540
|
+
transform: `translate(${e.x}, ${e.y})`
|
|
1541
|
+
}, [e.minX === void 0 ? O("", !0) : (P(), k("rect", {
|
|
1542
|
+
key: 0,
|
|
1543
|
+
"data-a11y-word-index": `${t}-${B.value}`,
|
|
1544
|
+
x: e.minX,
|
|
1545
|
+
y: e.minY * 1.25,
|
|
1546
|
+
width: e.maxX - e.minX,
|
|
1547
|
+
height: e.maxY - e.minY,
|
|
1548
|
+
fill: "transparent",
|
|
1549
|
+
"pointer-events": "visiblePainted",
|
|
1550
|
+
"aria-label": `${e.name}: ${(e.value || 0).toFixed(G.value.roundingValue)}`,
|
|
1551
|
+
onMouseover: (n) => Tn(e, t),
|
|
1552
|
+
onMouseleave: (n) => Sn(e, t),
|
|
1553
|
+
onClick: (n) => Cn(e, t)
|
|
1554
|
+
}, null, 40, at)), A("text", {
|
|
1555
|
+
fill: e.color,
|
|
1556
|
+
"font-weight": K.value.bold ? "bold" : "normal",
|
|
1557
|
+
x: 0,
|
|
1558
|
+
y: 0,
|
|
1559
|
+
"font-size": e.fontSize,
|
|
1560
|
+
transform: `translate(${e.width / 2}, ${e.height / 2})`,
|
|
1561
|
+
"text-anchor": "middle",
|
|
1562
|
+
"dominant-baseline": "central",
|
|
1563
|
+
"paint-order": "stroke fill",
|
|
1564
|
+
stroke: !_n.value || _n.value === e.id ? K.value.selectedStroke : void 0,
|
|
1565
|
+
"stroke-width": e.height * .05,
|
|
1566
|
+
"stroke-linecap": "round",
|
|
1567
|
+
"stroke-linejoin": "round",
|
|
1568
|
+
style: _e(`
|
|
1569
|
+
pointer-events:none;
|
|
1570
|
+
fill-opacity:${!_n.value || _n.value === e.id || !Je.value ? 1 : K.value.hoverOpacity} !important;
|
|
1571
|
+
`)
|
|
1572
|
+
}, Ce(e.name), 13, ot)], 8, it))), 128))], 10, rt),
|
|
1573
|
+
I(e.$slots, "svg", { svg: {
|
|
1574
|
+
...Y.value,
|
|
1575
|
+
isPrintingImg: L(Ft) || L(It) || L(dn),
|
|
1576
|
+
isPrintingSvg: L(fn)
|
|
1577
|
+
} }, void 0, !0)
|
|
1578
|
+
], 42, tt)), e.$slots.hint ? (P(), k("div", st, [I(e.$slots, "hint", N(M({
|
|
1579
|
+
hint: U.value.a11y.translations.keyboardNavigation,
|
|
1580
|
+
isVisible: pt.value
|
|
1581
|
+
})), void 0, !0)])) : O("", !0)]),
|
|
1582
|
+
e.$slots.watermark ? (P(), k("div", ct, [I(e.$slots, "watermark", N(M({ isPrinting: L(Ft) || L(It) || L(dn) || L(fn) })), void 0, !0)])) : O("", !0),
|
|
1583
|
+
L(tn) ? (P(), k("div", lt, [I(e.$slots, "reset-action", { reset: L(en) }, void 0, !0)])) : O("", !0),
|
|
1584
|
+
mt.value.position === "bottom" && mt.value.show && !L(_t) ? (P(), D(le, {
|
|
1585
|
+
key: 7,
|
|
1586
|
+
ref_key: "zoomControls",
|
|
1587
|
+
ref: Xe,
|
|
1588
|
+
config: U.value,
|
|
1589
|
+
scale: L(an),
|
|
1590
|
+
isFullscreen: $.value,
|
|
1591
|
+
isCursorPointer: ht.value,
|
|
1592
|
+
onZoomIn: hn,
|
|
1593
|
+
onZoomOut: gn,
|
|
1594
|
+
onResetZoom: t[1] ||= (e) => L(en)(!0)
|
|
1595
|
+
}, null, 8, [
|
|
1596
|
+
"config",
|
|
1597
|
+
"scale",
|
|
1598
|
+
"isFullscreen",
|
|
1599
|
+
"isCursorPointer"
|
|
1600
|
+
])) : O("", !0),
|
|
1601
|
+
pe(L(De), {
|
|
1602
|
+
teleportTo: G.value.teleportTo,
|
|
1603
|
+
show: Z.value.showTooltip && Ge.value,
|
|
1604
|
+
backgroundColor: G.value.backgroundColor,
|
|
1605
|
+
color: G.value.color,
|
|
1606
|
+
fontSize: G.value.fontSize,
|
|
1607
|
+
borderRadius: G.value.borderRadius,
|
|
1608
|
+
borderColor: G.value.borderColor,
|
|
1609
|
+
borderWidth: G.value.borderWidth,
|
|
1610
|
+
backgroundOpacity: G.value.backgroundOpacity,
|
|
1611
|
+
position: G.value.position,
|
|
1612
|
+
offsetX: G.value.offsetX,
|
|
1613
|
+
offsetY: G.value.offsetY,
|
|
1614
|
+
parent: V.value,
|
|
1615
|
+
content: yn.value,
|
|
1616
|
+
isCustom: vn.value,
|
|
1617
|
+
isFullscreen: $.value,
|
|
1618
|
+
smooth: G.value.smooth,
|
|
1619
|
+
backdropFilter: G.value.backdropFilter,
|
|
1620
|
+
smoothForce: G.value.smoothForce,
|
|
1621
|
+
smoothSnapThreshold: G.value.smoothSnapThreshold,
|
|
1622
|
+
isA11yMode: ft.value === "keyboard",
|
|
1623
|
+
a11yPosition: dt.value
|
|
1624
|
+
}, {
|
|
1625
|
+
"tooltip-before": R(() => [I(e.$slots, "tooltip-before", N(M({ ...bn.value })), void 0, !0)]),
|
|
1626
|
+
tooltip: R(() => [I(e.$slots, "tooltip", N(M({ ...bn.value })), void 0, !0)]),
|
|
1627
|
+
"tooltip-after": R(() => [I(e.$slots, "tooltip-after", N(M({ ...bn.value })), void 0, !0)]),
|
|
1628
|
+
_: 3
|
|
1629
|
+
}, 8, [
|
|
1630
|
+
"teleportTo",
|
|
1631
|
+
"show",
|
|
1632
|
+
"backgroundColor",
|
|
1633
|
+
"color",
|
|
1634
|
+
"fontSize",
|
|
1635
|
+
"borderRadius",
|
|
1636
|
+
"borderColor",
|
|
1637
|
+
"borderWidth",
|
|
1638
|
+
"backgroundOpacity",
|
|
1639
|
+
"position",
|
|
1640
|
+
"offsetX",
|
|
1641
|
+
"offsetY",
|
|
1642
|
+
"parent",
|
|
1643
|
+
"content",
|
|
1644
|
+
"isCustom",
|
|
1645
|
+
"isFullscreen",
|
|
1646
|
+
"smooth",
|
|
1647
|
+
"backdropFilter",
|
|
1648
|
+
"smoothForce",
|
|
1649
|
+
"smoothSnapThreshold",
|
|
1650
|
+
"isA11yMode",
|
|
1651
|
+
"a11yPosition"
|
|
1652
|
+
]),
|
|
1653
|
+
e.$slots.source ? (P(), k("div", {
|
|
1654
|
+
key: 8,
|
|
1655
|
+
ref_key: "source",
|
|
1656
|
+
ref: He,
|
|
1657
|
+
dir: "auto"
|
|
1658
|
+
}, [I(e.$slots, "source", {}, void 0, !0)], 512)) : O("", !0),
|
|
1659
|
+
ze.value && W.value.buttons.table ? (P(), D(xe(sn.value.component), me({ key: 9 }, sn.value.props, {
|
|
1660
|
+
ref_key: "tableUnit",
|
|
1661
|
+
ref: Ke,
|
|
1662
|
+
onClose: cn
|
|
1663
|
+
}), de({
|
|
1664
|
+
content: R(() => [(P(), D(L(Ae), {
|
|
1665
|
+
key: `table_${We.value}`,
|
|
1666
|
+
colNames: Wt.value.colNames,
|
|
1667
|
+
head: Wt.value.head,
|
|
1668
|
+
body: Wt.value.body,
|
|
1669
|
+
config: Wt.value.config,
|
|
1670
|
+
title: U.value.table.useDialog ? "" : sn.value.title,
|
|
1671
|
+
withCloseButton: !U.value.table.useDialog,
|
|
1672
|
+
isCursorPointer: ht.value,
|
|
1673
|
+
onClose: cn
|
|
1674
|
+
}, {
|
|
1675
|
+
th: R(({ th: e }) => [A("div", ut, Ce(e), 1)]),
|
|
1676
|
+
td: R(({ td: e }) => [fe(Ce(e.name || e), 1)]),
|
|
1677
|
+
_: 1
|
|
1678
|
+
}, 8, [
|
|
1679
|
+
"colNames",
|
|
1680
|
+
"head",
|
|
1681
|
+
"body",
|
|
1682
|
+
"config",
|
|
1683
|
+
"title",
|
|
1684
|
+
"withCloseButton",
|
|
1685
|
+
"isCursorPointer"
|
|
1686
|
+
]))]),
|
|
1687
|
+
_: 2
|
|
1688
|
+
}, [U.value.table.useDialog ? {
|
|
1689
|
+
name: "title",
|
|
1690
|
+
fn: R(() => [fe(Ce(sn.value.title), 1)]),
|
|
1691
|
+
key: "0"
|
|
1692
|
+
} : void 0, U.value.table.useDialog ? {
|
|
1693
|
+
name: "actions",
|
|
1694
|
+
fn: R(() => [A("button", {
|
|
1695
|
+
tabindex: "0",
|
|
1696
|
+
class: "vue-ui-user-options-button",
|
|
1697
|
+
onClick: t[2] ||= (e) => Ut(W.value.callbacks.csv),
|
|
1698
|
+
style: _e({ cursor: ht.value ? "pointer" : "default" })
|
|
1699
|
+
}, [pe(L(Oe), {
|
|
1700
|
+
name: "fileCsv",
|
|
1701
|
+
stroke: sn.value.props.color
|
|
1702
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
1703
|
+
key: "1"
|
|
1704
|
+
} : void 0]), 1040)) : O("", !0),
|
|
1705
|
+
I(e.$slots, "skeleton", {}, () => [L(_t) ? (P(), D(ne, { key: 0 })) : O("", !0)], !0)
|
|
1706
|
+
], 44, Qe));
|
|
1707
|
+
}
|
|
1708
|
+
}, [["__scopeId", "data-v-e14e4b0d"]]);
|
|
1709
|
+
//#endregion
|
|
1710
|
+
export { H as n, dt as t };
|