vue-data-ui 3.25.5 → 3.25.7
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-UfoQuPMf.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-B-3S5q00.js} +1 -1
- package/dist/{render-common-bvOuxfN3.js → render-common-CAXK7ycr.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-DlWT702n.js} +70 -70
- package/dist/vue-data-ui.js +71 -71
- package/dist/vue-ui-3d-bar-DbOk2kpM.js +1831 -0
- package/dist/{vue-ui-accordion-DRf3NQyH.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
- package/dist/vue-ui-age-pyramid-C7_mGIRk.js +1293 -0
- package/dist/{vue-ui-annotator-DZ0O8Xa5.js → vue-ui-annotator-CTQHAPho.js} +676 -676
- package/dist/vue-ui-bullet-CDy_dkYz.js +702 -0
- package/dist/{vue-ui-bump-DoHnD1Xy.js → vue-ui-bump-DP24leiD.js} +380 -380
- package/dist/vue-ui-candlestick-kJLmYaR7.js +1859 -0
- package/dist/{vue-ui-carousel-table-k1cBJ1i1.js → vue-ui-carousel-table-BQzAQDw6.js} +2 -2
- package/dist/vue-ui-chestnut-DnnRp3Kl.js +2016 -0
- package/dist/vue-ui-chord-DO15ZDCS.js +1347 -0
- package/dist/vue-ui-circle-pack-DYTllMPV.js +1635 -0
- package/dist/{vue-ui-cursor-CQWLyEx0.js → vue-ui-cursor-CtViSjNp.js} +2 -2
- package/dist/{vue-ui-dag-BqlsutMj.js → vue-ui-dag-NXtGYzqg.js} +792 -792
- package/dist/{vue-ui-dashboard-Be3MmkgS.js → vue-ui-dashboard-D3_4QohV.js} +67 -67
- package/dist/{vue-ui-digits-BqdfbcKX.js → vue-ui-digits-CB09pLQx.js} +2 -2
- package/dist/vue-ui-donut-evolution-DhrtxvAd.js +1552 -0
- package/dist/{vue-ui-donut-gzGZ42uH.js → vue-ui-donut-eysaEyTy.js} +2 -2
- package/dist/vue-ui-donut-yTE6D8yV.js +2415 -0
- package/dist/vue-ui-dumbbell-CmGIeULQ.js +1533 -0
- package/dist/vue-ui-flow-qYAq3Rmn.js +1217 -0
- package/dist/vue-ui-funnel-CLAii4wi.js +749 -0
- package/dist/vue-ui-galaxy-BVX-o2f-.js +1085 -0
- package/dist/vue-ui-gauge-D76-4Z_0.js +934 -0
- package/dist/{vue-ui-geo-Ca8kPYr-.js → vue-ui-geo-BQ7-UnuG.js} +429 -429
- package/dist/{vue-ui-gizmo-wUqHJICb.js → vue-ui-gizmo-C47zjcs-.js} +2 -2
- package/dist/vue-ui-heatmap-XJef60IZ.js +1558 -0
- package/dist/{vue-ui-hill-D6Y9Xy2K.js → vue-ui-hill-D5BYGPXB.js} +470 -470
- package/dist/vue-ui-history-plot-D-d-1ZiM.js +1698 -0
- package/dist/{vue-ui-horizontal-bar-3on3-H3B.js → vue-ui-horizontal-bar-BgFHi6_7.js} +511 -511
- package/dist/{vue-ui-kpi-CUpRRIUf.js → vue-ui-kpi-Cb8QJeaj.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-BzwMl-in.js +929 -0
- package/dist/{vue-ui-mood-radar-TW251icr.js → vue-ui-mood-radar-BUR_YCcr.js} +376 -376
- package/dist/vue-ui-nested-donuts-BEB4nfsD.js +1503 -0
- package/dist/vue-ui-onion-CG6myK7a.js +1235 -0
- package/dist/{vue-ui-parallel-coordinate-plot-RM25bxtf.js → vue-ui-parallel-coordinate-plot-CSO4johj.js} +407 -407
- package/dist/vue-ui-quadrant-CKav0I6g.js +1967 -0
- package/dist/{vue-ui-quick-chart-Cswm3_eI.js → vue-ui-quick-chart-BAQNS9_2.js} +4 -4
- package/dist/vue-ui-radar-ClPAgf5I.js +1374 -0
- package/dist/vue-ui-rating-CWFMoYpE.js +359 -0
- package/dist/vue-ui-relation-circle-Da2MhrVe.js +905 -0
- package/dist/vue-ui-ridgeline-D7gFs8yR.js +1630 -0
- package/dist/vue-ui-rings-DkDJ0k5b.js +1252 -0
- package/dist/vue-ui-scatter-yv4JzJID.js +2405 -0
- package/dist/{vue-ui-skeleton-D_u8EWeW.js → vue-ui-skeleton-oFnh5zWs.js} +698 -698
- package/dist/vue-ui-smiley-DJVusLnp.js +376 -0
- package/dist/vue-ui-spark-trend-IqZWPvSB.js +457 -0
- package/dist/vue-ui-sparkbar-_FW47iYj.js +401 -0
- package/dist/vue-ui-sparkgauge--2vk2Y23.js +268 -0
- package/dist/vue-ui-sparkhistogram-CFEIPa5n.js +589 -0
- package/dist/{vue-ui-sparkline-9qkNNZG6.js → vue-ui-sparkline-Cs9CJR6W.js} +511 -511
- package/dist/vue-ui-sparkstackbar-Cvbue77A.js +738 -0
- package/dist/vue-ui-stackbar-C5ANS2hd.js +2355 -0
- package/dist/vue-ui-stackline-7yajJFW4.js +2469 -0
- package/dist/vue-ui-strip-plot-BT6Eqhup.js +1740 -0
- package/dist/vue-ui-table-CiccGbRB.js +1352 -0
- package/dist/{vue-ui-table-heatmap-XmDK1aHJ.js → vue-ui-table-heatmap-DnP3pzh2.js} +2 -2
- package/dist/vue-ui-table-sparkline-Bp7RiZh4.js +738 -0
- package/dist/{vue-ui-thermometer-CLx3SPRv.js → vue-ui-thermometer-CawumQKP.js} +192 -192
- package/dist/{vue-ui-timer-BDWUNb6t.js → vue-ui-timer-CXinMW7q.js} +153 -153
- package/dist/vue-ui-tiremarks-BnI2uhki.js +540 -0
- package/dist/vue-ui-treemap-DTlFbfD6.js +1733 -0
- package/dist/vue-ui-waffle-CjgRkQAp.js +1621 -0
- package/dist/vue-ui-wheel-B02tiG0p.js +873 -0
- package/dist/vue-ui-word-cloud-BZnCOMHx.js +1710 -0
- package/dist/{vue-ui-world-C2atz4Xm.js → vue-ui-world-DO2VZ-T-.js} +524 -524
- package/dist/vue-ui-xy-BC9GVdWE.js +5283 -0
- package/dist/{vue-ui-xy-CpA0W6zM.js → vue-ui-xy-CD6BiP_g.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
|
@@ -1,1710 +0,0 @@
|
|
|
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-C_mX5pOZ.js";
|
|
5
|
-
import { t as y } from "./usePrinter-DISD7q5m.js";
|
|
6
|
-
import { n as ee, t as te } from "./BaseScanner-DZvpgOjM.js";
|
|
7
|
-
import { t as b } from "./useNestedProp-Chvyfpl-.js";
|
|
8
|
-
import { t as x } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
-
import { t as S } from "./useChartExport-iwOqiIWX.js";
|
|
10
|
-
import { t as C } from "./img-DhGApYG0.js";
|
|
11
|
-
import { n as w } from "./Title-CPHi-evi.js";
|
|
12
|
-
import { t as T } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
13
|
-
import { i as ne, t as re } from "./useResponsive-ZtArZtUf.js";
|
|
14
|
-
import { t as ie } from "./A11yDataTable-DdRsVULz.js";
|
|
15
|
-
import { t as E } from "./useUserOptionState-DK-_1ddE.js";
|
|
16
|
-
import { t as ae } from "./useChartAccessibility-DYqac8yF.js";
|
|
17
|
-
import { t as oe } from "./usePanZoom-CYU3B4T3.js";
|
|
18
|
-
import { t as se } from "./vue_ui_word_cloud-C-qIMNLu.js";
|
|
19
|
-
import { t as ce } from "./BaseZoomControls-Xo16vFa4.js";
|
|
20
|
-
import { Fragment as le, computed as D, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createSlots as ue, createTextVNode as de, createVNode as fe, defineAsyncComponent as M, guardReactiveProps as N, mergeProps as pe, nextTick as me, normalizeClass as he, normalizeProps as P, normalizeStyle as ge, onBeforeUnmount as _e, onMounted as ve, openBlock as F, ref as I, renderList as ye, renderSlot as L, resolveDynamicComponent as be, shallowRef as xe, toDisplayString as Se, toRefs as Ce, unref as R, watch as we, withCtx as z } from "vue";
|
|
21
|
-
//#region src/wordcloud.js
|
|
22
|
-
var Te = {
|
|
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
|
-
}, Ee = "fast";
|
|
54
|
-
function De(e) {
|
|
55
|
-
return Te[e] || Te[Ee];
|
|
56
|
-
}
|
|
57
|
-
var Oe = /* @__PURE__ */ new Map();
|
|
58
|
-
function ke(e) {
|
|
59
|
-
let t = String(e), n = Oe.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 Oe.set(t, o), o;
|
|
71
|
-
}
|
|
72
|
-
function Ae({ 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 y = g + f, ee = g + m;
|
|
78
|
-
i.fillText(l, y, ee);
|
|
79
|
-
let te = i.getImageData(0, 0, _, v).data, b = [], x = [], S = _, C = v, w = 0, T = 0, ne = !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) te[t + i * 4 + 3] > 1 ? (b.push([i, e]), ne = !0, i < S && (S = i), i > w && (w = i), e < C && (C = e), e > T && (T = e), r || (r = !0, n = i)) : r && (x.push([
|
|
83
|
-
e,
|
|
84
|
-
n,
|
|
85
|
-
i - 1
|
|
86
|
-
]), r = !1, n = -1);
|
|
87
|
-
r && x.push([
|
|
88
|
-
e,
|
|
89
|
-
n,
|
|
90
|
-
_ - 1
|
|
91
|
-
]);
|
|
92
|
-
}
|
|
93
|
-
return ne || (S = 0, C = 0, w = 0, T = 0), {
|
|
94
|
-
w: _,
|
|
95
|
-
h: v,
|
|
96
|
-
wordMask: b,
|
|
97
|
-
runs: x,
|
|
98
|
-
minX: S,
|
|
99
|
-
minY: C,
|
|
100
|
-
maxX: w,
|
|
101
|
-
maxY: T
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
function je(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 Me(e, t) {
|
|
127
|
-
return 4294967295 >>> 32 - (t - e + 1) << e >>> 0;
|
|
128
|
-
}
|
|
129
|
-
function Ne(e) {
|
|
130
|
-
return 4294967295 << e >>> 0;
|
|
131
|
-
}
|
|
132
|
-
function Pe(e) {
|
|
133
|
-
return 4294967295 >>> 31 - e >>> 0;
|
|
134
|
-
}
|
|
135
|
-
function Fe({ 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] & Me(_, v)) return !1;
|
|
144
|
-
} else {
|
|
145
|
-
if (e[m + h] & Ne(_)) return !1;
|
|
146
|
-
for (let t = h + 1; t < g; t += 1) if (e[m + t]) return !1;
|
|
147
|
-
if (e[m + g] & Pe(v)) return !1;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return !0;
|
|
151
|
-
}
|
|
152
|
-
function Ie({ 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 = Me(_, v);
|
|
161
|
-
e[m + h] |= t;
|
|
162
|
-
} else {
|
|
163
|
-
{
|
|
164
|
-
let t = Ne(_);
|
|
165
|
-
e[m + h] |= t;
|
|
166
|
-
}
|
|
167
|
-
for (let t = h + 1; t < g; t += 1) e[m + t] = 4294967295;
|
|
168
|
-
{
|
|
169
|
-
let t = Pe(v);
|
|
170
|
-
e[m + g] |= t;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
function B({ 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 Le(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 Re({ 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 Le(i, n);
|
|
235
|
-
}
|
|
236
|
-
function V(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 ze = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map();
|
|
286
|
-
function Be({ 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 Ve({ word: e, fontSize: t, pad: n, canvas: r, ctx: i, svg: a }) {
|
|
291
|
-
let o = Be({
|
|
292
|
-
word: e,
|
|
293
|
-
fontSize: t,
|
|
294
|
-
pad: n,
|
|
295
|
-
svg: a
|
|
296
|
-
}), s = ze.get(o);
|
|
297
|
-
if (s) return {
|
|
298
|
-
key: o,
|
|
299
|
-
bitmap: s
|
|
300
|
-
};
|
|
301
|
-
let c = Ae({
|
|
302
|
-
word: e,
|
|
303
|
-
fontSize: t,
|
|
304
|
-
pad: n,
|
|
305
|
-
canvas: r,
|
|
306
|
-
ctx: i,
|
|
307
|
-
svg: a
|
|
308
|
-
});
|
|
309
|
-
return ze.set(o, c), {
|
|
310
|
-
key: o,
|
|
311
|
-
bitmap: c
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
function He({ bitmapKey: e, wordMask: t, w: n, h: r, dilation: i }) {
|
|
315
|
-
let a = `${e}::d${i}`, o = H.get(a);
|
|
316
|
-
if (o) return o;
|
|
317
|
-
let s = B({
|
|
318
|
-
wordMask: t,
|
|
319
|
-
w: n,
|
|
320
|
-
h: r,
|
|
321
|
-
dilation: i
|
|
322
|
-
}), c = {
|
|
323
|
-
wordMask: s,
|
|
324
|
-
runs: je(s)
|
|
325
|
-
};
|
|
326
|
-
return H.set(a, c), c;
|
|
327
|
-
}
|
|
328
|
-
function Ue(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 We() {
|
|
348
|
-
return typeof performance < "u" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
|
|
349
|
-
}
|
|
350
|
-
function Ge({ 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 Ke({ 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 qe({ 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 = Ke({
|
|
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: He({
|
|
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: Re({
|
|
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 Je({ 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: y, proximity: ee, minimumVisualPadding: te }) {
|
|
414
|
-
let b = 1;
|
|
415
|
-
for (; b >= n;) {
|
|
416
|
-
let { runs: n, bitmapWidth: x, bitmapHeight: S, bitmapMinimumX: C, bitmapMinimumY: w, bitmapMaximumX: T, bitmapMaximumY: ne } = qe({
|
|
417
|
-
currentBitmap: b === 1 ? e : V(e, b),
|
|
418
|
-
strictPixelPadding: d,
|
|
419
|
-
scaleFactor: b,
|
|
420
|
-
baseBitmap: e,
|
|
421
|
-
bitmapKey: f,
|
|
422
|
-
proximity: ee,
|
|
423
|
-
minimumVisualPadding: te
|
|
424
|
-
}), re = 0, ie = 0;
|
|
425
|
-
for (; re < l && ie < v;) {
|
|
426
|
-
for (let e = 0; e < h.length; e += 1) {
|
|
427
|
-
ie += 1;
|
|
428
|
-
let l = Math.round(s + re * h[e] - x / 2), u = Math.round(c + re * g[e] - S / 2);
|
|
429
|
-
if (!(l < 0 || u < 0 || l + x > a || u + S > o) && Fe({
|
|
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 * b)), d = {
|
|
439
|
-
...s,
|
|
440
|
-
x: l - a / 2,
|
|
441
|
-
y: u - o / 2,
|
|
442
|
-
fontSize: c,
|
|
443
|
-
width: x,
|
|
444
|
-
height: S,
|
|
445
|
-
angle: 0,
|
|
446
|
-
minX: C,
|
|
447
|
-
minY: w,
|
|
448
|
-
maxX: T,
|
|
449
|
-
maxY: ne
|
|
450
|
-
};
|
|
451
|
-
return Ie({
|
|
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
|
-
re += _, ie & 1023 || await y();
|
|
463
|
-
}
|
|
464
|
-
b *= u, await y();
|
|
465
|
-
}
|
|
466
|
-
return null;
|
|
467
|
-
}
|
|
468
|
-
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, maybeYield: h, proximity: g, qualityPreset: _, primarySpiral: v, fallbackSpiral: y }) {
|
|
469
|
-
return await Je({
|
|
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 Je({
|
|
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: y.cosineArray,
|
|
509
|
-
sineArray: y.sineArray,
|
|
510
|
-
radiusStep: _.fallbackSpiralRadiusStep,
|
|
511
|
-
maximumAttempts: _.fallbackAttempts,
|
|
512
|
-
maybeYield: h,
|
|
513
|
-
proximity: g,
|
|
514
|
-
minimumVisualPadding: _.minimumVisualPadding
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
async function Xe({ words: e, proximity: t = 0, svg: n, strictPixelPadding: r, quality: i = Ee, onProgress: a, debugTiming: o = !1 }) {
|
|
518
|
-
let s = We(), 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 = De(i), g = ke(h.spiralStep), _ = ke(h.fallbackSpiralStep), v = n.minFontSize, y = Math.min(n.maxFontSize, 100), ee = e.map((e) => e.value), te = Math.min(...ee), b = Math.max(...ee);
|
|
523
|
-
if (p <= 0 || m <= 0) return [];
|
|
524
|
-
let x = p + 31 >>> 5, S = new Uint32Array(x * m), C = document.createElement("canvas"), w = C.getContext("2d", { willReadFrequently: !0 });
|
|
525
|
-
C.width = p, C.height = m;
|
|
526
|
-
let T = Math.max(p, m), ne = Math.floor(p / 2), re = Math.floor(m / 2), ie = [...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), E = [], ae = h.scaleStep;
|
|
531
|
-
for (let e = 0; e < ie.length; e += 1) {
|
|
532
|
-
let i = ie[e], o = E.length, s = Ge({
|
|
533
|
-
value: i.value,
|
|
534
|
-
minimumValue: te,
|
|
535
|
-
maximumValue: b,
|
|
536
|
-
configuredMinimumFontSize: v,
|
|
537
|
-
maximumFontSize: y
|
|
538
|
-
}), c = Ve({
|
|
539
|
-
word: i,
|
|
540
|
-
fontSize: s,
|
|
541
|
-
pad: t,
|
|
542
|
-
canvas: C,
|
|
543
|
-
ctx: w,
|
|
544
|
-
svg: n
|
|
545
|
-
}), l = c.key, d = c.bitmap, f = d.w, ee = d.h;
|
|
546
|
-
if (f <= 0 || ee <= 0) {
|
|
547
|
-
await u();
|
|
548
|
-
continue;
|
|
549
|
-
}
|
|
550
|
-
let oe = await Ye({
|
|
551
|
-
baseBitmap: d,
|
|
552
|
-
baseFontSize: s,
|
|
553
|
-
minimumScaleFactor: Math.max(1 / s, .1),
|
|
554
|
-
maskBits: S,
|
|
555
|
-
maskRowStride: x,
|
|
556
|
-
maskWidth: p,
|
|
557
|
-
maskHeight: m,
|
|
558
|
-
centerX: ne,
|
|
559
|
-
centerY: re,
|
|
560
|
-
maximumRadius: T,
|
|
561
|
-
scaleStep: ae,
|
|
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 (oe && (E.push(oe), a && E.length > o)) {
|
|
573
|
-
let e = E[E.length - 1];
|
|
574
|
-
a({
|
|
575
|
-
word: e,
|
|
576
|
-
all: E
|
|
577
|
-
});
|
|
578
|
-
}
|
|
579
|
-
await u();
|
|
580
|
-
}
|
|
581
|
-
if (!E.length) return [];
|
|
582
|
-
Ue(E, p, m);
|
|
583
|
-
let oe = s() - c;
|
|
584
|
-
return o && typeof console < "u" && console.log && console.log("[vue-data-ui][word-cloud] positionWordsAsync:", `${oe.toFixed(2)} ms for ${e.length} words`), E.sort((e, t) => t.fontSize - e.fontSize);
|
|
585
|
-
}
|
|
586
|
-
//#endregion
|
|
587
|
-
//#region src/components/vue-ui-word-cloud.vue
|
|
588
|
-
var U = /* @__PURE__ */ e({ default: () => ut }), Ze = [
|
|
589
|
-
"id",
|
|
590
|
-
"data-resizing",
|
|
591
|
-
"data-relayout"
|
|
592
|
-
], Qe = ["id"], $e = { style: { position: "relative" } }, et = [
|
|
593
|
-
"aria-describedby",
|
|
594
|
-
"xmlns",
|
|
595
|
-
"viewBox"
|
|
596
|
-
], tt = ["width", "height"], nt = ["transform"], rt = ["transform"], it = [
|
|
597
|
-
"data-a11y-word-index",
|
|
598
|
-
"x",
|
|
599
|
-
"y",
|
|
600
|
-
"width",
|
|
601
|
-
"height",
|
|
602
|
-
"aria-label",
|
|
603
|
-
"onMouseover",
|
|
604
|
-
"onMouseleave",
|
|
605
|
-
"onClick"
|
|
606
|
-
], at = [
|
|
607
|
-
"fill",
|
|
608
|
-
"font-weight",
|
|
609
|
-
"font-size",
|
|
610
|
-
"transform",
|
|
611
|
-
"stroke",
|
|
612
|
-
"stroke-width"
|
|
613
|
-
], ot = {
|
|
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
|
-
}, st = {
|
|
624
|
-
key: 5,
|
|
625
|
-
class: "vue-data-ui-watermark"
|
|
626
|
-
}, ct = {
|
|
627
|
-
key: 6,
|
|
628
|
-
"data-dom-to-png-ignore": "",
|
|
629
|
-
class: "reset-wrapper"
|
|
630
|
-
}, lt = { style: {
|
|
631
|
-
display: "flex",
|
|
632
|
-
"align-items": "center"
|
|
633
|
-
} }, ut = /*#__PURE__*/ T({
|
|
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: T, emit: Te }) {
|
|
651
|
-
let Ee = M(() => import("./Tooltip-hhrkQ3Lk.js")), De = M(() => import("./BaseIcon-t83PDe9k.js").then((e) => e.n)), Oe = M(() => import("./vue-ui-accordion-DRf3NQyH.js").then((e) => e.n)), ke = M(() => import("./DataTable-COIO9gi4.js")), Ae = M(() => import("./PenAndPaper-BgH3m_LP.js").then((e) => e.t)), je = M(() => import("./UserOptions-f3Q0nqrj.js").then((e) => e.n)), Me = M(() => import("./PackageVersion-M2Ws-VwJ.js").then((e) => e.t)), Ne = M(() => import("./BaseDraggableDialog-BM_R41j8.js").then((e) => e.n)), { vue_ui_word_cloud: Pe } = v(), { isThemeValid: Fe, warnInvalidTheme: Ie } = x(), B = e, Le = Te, Re = D({
|
|
652
|
-
get() {
|
|
653
|
-
return !!B.dataset && B.dataset.length;
|
|
654
|
-
},
|
|
655
|
-
set(e) {
|
|
656
|
-
return e;
|
|
657
|
-
}
|
|
658
|
-
}), V = I(m()), ze = I(0), H = I(null), Be = I(null), Ve = I(null), He = I(0), Ue = I(0), We = I(!1), Ge = I(null), Ke = I(null), qe = I(!1), Je = I(!1), Ye = I(null), U = I(null), ut = I({
|
|
659
|
-
x: 0,
|
|
660
|
-
y: 0
|
|
661
|
-
}), dt = I("pointer"), ft = I(!1), W = I(St());
|
|
662
|
-
g({
|
|
663
|
-
config: () => W.value,
|
|
664
|
-
dataset: () => B.dataset,
|
|
665
|
-
component: "VueUiWordCloud",
|
|
666
|
-
rules: [_.noHint]
|
|
667
|
-
});
|
|
668
|
-
let G = D(() => W.value.userOptions.useCursorPointer), pt = D(() => 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: W.value.skeletonConfig ?? {}
|
|
686
|
-
})), { loading: mt, FINAL_DATASET: ht, manualLoading: gt } = ee({
|
|
687
|
-
...Ce(B),
|
|
688
|
-
FINAL_CONFIG: W,
|
|
689
|
-
prepareConfig: St,
|
|
690
|
-
callback: () => {
|
|
691
|
-
Promise.resolve().then(() => {
|
|
692
|
-
Y.value.showTable = W.value.table.show, Y.value.showTooltip = W.value.style.chart.tooltip.show, Y.value.showZoom = W.value.style.chart.zoom.show;
|
|
693
|
-
});
|
|
694
|
-
},
|
|
695
|
-
skeletonDataset: B.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: W.value,
|
|
891
|
-
userConfig: pt.value
|
|
892
|
-
})
|
|
893
|
-
}), _t = I(vt());
|
|
894
|
-
function vt() {
|
|
895
|
-
return typeof ht.value == "string" ? i(ht.value) : ht.value.map((e, t) => ({
|
|
896
|
-
...e,
|
|
897
|
-
value: d(e.value)
|
|
898
|
-
}));
|
|
899
|
-
}
|
|
900
|
-
let { userOptionsVisible: yt, setUserOptionsVisibility: bt, keepUserOptionState: xt } = E({ config: W.value }), { svgRef: K } = ae({ config: W.value.style.chart.title });
|
|
901
|
-
function St() {
|
|
902
|
-
let e = b({
|
|
903
|
-
userConfig: B.config,
|
|
904
|
-
defaultConfig: Pe
|
|
905
|
-
}), t = e.theme;
|
|
906
|
-
if (!t) return e;
|
|
907
|
-
if (!Fe.value(e)) return Ie(e), e;
|
|
908
|
-
let n = b({
|
|
909
|
-
userConfig: se[t] || B.config,
|
|
910
|
-
defaultConfig: e
|
|
911
|
-
}), r = b({
|
|
912
|
-
userConfig: B.config,
|
|
913
|
-
defaultConfig: n
|
|
914
|
-
});
|
|
915
|
-
return {
|
|
916
|
-
...r,
|
|
917
|
-
customPalette: r.customPalette.length ? r.customPalette : l[t] || a
|
|
918
|
-
};
|
|
919
|
-
}
|
|
920
|
-
let Ct = I({
|
|
921
|
-
x: 0,
|
|
922
|
-
y: 0
|
|
923
|
-
});
|
|
924
|
-
function wt() {
|
|
925
|
-
let e = {
|
|
926
|
-
x: 0,
|
|
927
|
-
y: 0,
|
|
928
|
-
width: Math.max(10, q.value.width),
|
|
929
|
-
height: Math.max(10, q.value.height)
|
|
930
|
-
};
|
|
931
|
-
Qt(e), Ct.value = {
|
|
932
|
-
x: e.x + e.width / 2,
|
|
933
|
-
y: e.y + e.height / 2
|
|
934
|
-
}, Xt();
|
|
935
|
-
}
|
|
936
|
-
let Tt = ne(() => {
|
|
937
|
-
Rt();
|
|
938
|
-
}, 100), Et = I(!1);
|
|
939
|
-
we(() => Et.value, (e) => {
|
|
940
|
-
e === !1 && (Je.value = !0, Tt(), wt());
|
|
941
|
-
}), we(() => B.config, (e) => {
|
|
942
|
-
W.value = St(), yt.value = !W.value.userOptions.showOnChartHover, jt(), He.value += 1, Ue.value += 1, Y.value.showTable = W.value.table.show, Y.value.showTooltip = W.value.style.chart.tooltip.show, Y.value.showZoom = W.value.style.chart.zoom.show;
|
|
943
|
-
}, { deep: !0 });
|
|
944
|
-
let q = I({
|
|
945
|
-
width: W.value.style.chart.width,
|
|
946
|
-
height: W.value.style.chart.height,
|
|
947
|
-
maxFontSize: W.value.style.chart.words.maxFontSize,
|
|
948
|
-
minFontSize: W.value.style.chart.words.minFontSize,
|
|
949
|
-
bold: W.value.style.chart.words.bold
|
|
950
|
-
}), Dt = ne(() => {
|
|
951
|
-
let { width: e, height: t } = re({
|
|
952
|
-
chart: H.value,
|
|
953
|
-
title: W.value.style.chart.title.text ? Be.value : null,
|
|
954
|
-
legend: W.value.style.chart.controls.show ? Ye.value?.$el : null,
|
|
955
|
-
source: Ve.value
|
|
956
|
-
});
|
|
957
|
-
requestAnimationFrame(async () => {
|
|
958
|
-
q.value.width = Math.max(10, e), q.value.height = Math.max(10, t - 12), await me(), Et.value = !1;
|
|
959
|
-
});
|
|
960
|
-
}, 100), Ot = () => {
|
|
961
|
-
Et.value = !0, Dt();
|
|
962
|
-
}, J = xe(null), kt = xe(null);
|
|
963
|
-
ve(jt);
|
|
964
|
-
let At = D(() => W.value.debug);
|
|
965
|
-
function jt() {
|
|
966
|
-
o(B.dataset) ? p({
|
|
967
|
-
componentName: "VueUiWordCloud",
|
|
968
|
-
type: "dataset",
|
|
969
|
-
debug: At.value
|
|
970
|
-
}) : _t.value.forEach((e, t) => {
|
|
971
|
-
f({
|
|
972
|
-
datasetObject: e,
|
|
973
|
-
requiredAttributes: ["name", "value"]
|
|
974
|
-
}).forEach((e) => {
|
|
975
|
-
Re.value = !1, p({
|
|
976
|
-
componentName: "VueUiWordCloud",
|
|
977
|
-
type: "datasetSerieAttribute",
|
|
978
|
-
property: e,
|
|
979
|
-
index: t,
|
|
980
|
-
debug: At.value
|
|
981
|
-
});
|
|
982
|
-
});
|
|
983
|
-
}), o(B.dataset) || (gt.value = W.value.loading), W.value.responsive && (J.value && (kt.value && J.value.unobserve(kt.value), J.value.disconnect()), J.value = new ResizeObserver(Ot), kt.value = H.value.parentNode, J.value.observe(kt.value)), wt();
|
|
984
|
-
}
|
|
985
|
-
_e(() => {
|
|
986
|
-
J.value && (kt.value && J.value.unobserve(kt.value), J.value.disconnect());
|
|
987
|
-
});
|
|
988
|
-
let { isPrinting: Mt, isImaging: Nt, generatePdf: Pt, generateImage: Ft } = y({
|
|
989
|
-
elementId: `wordCloud_${V.value}`,
|
|
990
|
-
fileName: W.value.style.chart.title.text || "vue-ui-word-cloud",
|
|
991
|
-
options: W.value.userOptions.print
|
|
992
|
-
}), Y = I({
|
|
993
|
-
showTable: W.value.table.show,
|
|
994
|
-
showTooltip: W.value.style.chart.tooltip.show,
|
|
995
|
-
showZoom: W.value.style.chart.zoom.show
|
|
996
|
-
});
|
|
997
|
-
we(W, () => {
|
|
998
|
-
Y.value.showTable = W.value.table.show, Y.value.showTooltip = W.value.style.chart.tooltip.show, Y.value.showZoom = W.value.style.chart.zoom.show;
|
|
999
|
-
}, { immediate: !0 });
|
|
1000
|
-
function It(e, t, n = "Arial") {
|
|
1001
|
-
let r = document.createElement("canvas").getContext("2d");
|
|
1002
|
-
return r.font = `${t}px ${W.value.style.chart.words.bold ? "bold" : "normal"} ${n}`, {
|
|
1003
|
-
width: r.measureText(e).width + W.value.style.chart.words.proximity,
|
|
1004
|
-
height: t
|
|
1005
|
-
};
|
|
1006
|
-
}
|
|
1007
|
-
let X = I([]), Lt = /* @__PURE__ */ new Map();
|
|
1008
|
-
function Rt() {
|
|
1009
|
-
let e = [..._t.value].map((e) => e.value), t = Math.max(...e), n = Math.min(...e), r = [..._t.value].map((e, r) => {
|
|
1010
|
-
let i = (e.value - n) / (t - n) * (q.value.maxFontSize - q.value.minFontSize) + q.value.minFontSize;
|
|
1011
|
-
i = isNaN(i) ? q.value.minFontSize : i;
|
|
1012
|
-
let o = It(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) : W.value.style.chart.words.usePalette ? W.value.customPalette[r] || W.value.customPalette[r % W.value.customPalette.length] || a[r] || a[r % a.length] : W.value.style.chart.words.color
|
|
1020
|
-
};
|
|
1021
|
-
});
|
|
1022
|
-
X.value.length = 0, Lt.clear(), Xe({
|
|
1023
|
-
debugTiming: At.value,
|
|
1024
|
-
words: r,
|
|
1025
|
-
svg: q.value,
|
|
1026
|
-
proximity: W.value.style.chart.words.proximity,
|
|
1027
|
-
strictPixelPadding: W.value.strictPixelPadding,
|
|
1028
|
-
quality: W.value.quality,
|
|
1029
|
-
onProgress: ({ all: e }) => {
|
|
1030
|
-
for (let t of e) {
|
|
1031
|
-
let e = t.id, n = Lt.get(e);
|
|
1032
|
-
if (n === void 0) n = X.value.length, Lt.set(e, n), X.value.push({ ...t });
|
|
1033
|
-
else {
|
|
1034
|
-
let e = X.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
|
-
}), X.value.sort((e, t) => t.fontSize - e.fontSize), Lt.clear(), X.value.forEach((e, t) => {
|
|
1040
|
-
Lt.set(e.id, t);
|
|
1041
|
-
}), qe.value = !0, Je.value = !1;
|
|
1042
|
-
}
|
|
1043
|
-
let zt = D(() => ({
|
|
1044
|
-
head: X.value.map((e) => ({
|
|
1045
|
-
name: e.name,
|
|
1046
|
-
color: e.color
|
|
1047
|
-
})),
|
|
1048
|
-
body: X.value.map((e) => e.value)
|
|
1049
|
-
}));
|
|
1050
|
-
function Bt(e = null) {
|
|
1051
|
-
me(() => {
|
|
1052
|
-
let n = zt.value.head.map((e, t) => [[e.name], [zt.value.body[t]]]), i = [
|
|
1053
|
-
[W.value.style.chart.title.text],
|
|
1054
|
-
[W.value.style.chart.title.subtitle.text],
|
|
1055
|
-
[[""], [W.value.table.columnNames.value]]
|
|
1056
|
-
].concat(n), a = r(i);
|
|
1057
|
-
e ? e(a) : t({
|
|
1058
|
-
csvContent: a,
|
|
1059
|
-
title: W.value.style.chart.title.text || "vue-ui-word-cloud"
|
|
1060
|
-
});
|
|
1061
|
-
});
|
|
1062
|
-
}
|
|
1063
|
-
let Z = D(() => {
|
|
1064
|
-
let e = [W.value.table.columnNames.series, W.value.table.columnNames.value], t = zt.value.head.map((e, t) => {
|
|
1065
|
-
let n = c({
|
|
1066
|
-
p: W.value.table.td.prefix,
|
|
1067
|
-
v: zt.value.body[t],
|
|
1068
|
-
s: W.value.table.td.suffix,
|
|
1069
|
-
r: W.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: W.value.table.th.backgroundColor,
|
|
1078
|
-
color: W.value.table.th.color,
|
|
1079
|
-
outline: W.value.table.th.outline
|
|
1080
|
-
},
|
|
1081
|
-
td: {
|
|
1082
|
-
backgroundColor: W.value.table.td.backgroundColor,
|
|
1083
|
-
color: W.value.table.td.color,
|
|
1084
|
-
outline: W.value.table.td.outline
|
|
1085
|
-
},
|
|
1086
|
-
breakpoint: W.value.table.responsiveBreakpoint
|
|
1087
|
-
};
|
|
1088
|
-
return {
|
|
1089
|
-
colNames: [W.value.table.columnNames.series, W.value.table.columnNames.value],
|
|
1090
|
-
head: e,
|
|
1091
|
-
body: t,
|
|
1092
|
-
a11yBody: n,
|
|
1093
|
-
config: r
|
|
1094
|
-
};
|
|
1095
|
-
}), Q = I(!1);
|
|
1096
|
-
function Vt(e) {
|
|
1097
|
-
Q.value = e, ze.value += 1;
|
|
1098
|
-
}
|
|
1099
|
-
function Ht() {
|
|
1100
|
-
return X.value;
|
|
1101
|
-
}
|
|
1102
|
-
function Ut() {
|
|
1103
|
-
Y.value.showTable = !Y.value.showTable;
|
|
1104
|
-
}
|
|
1105
|
-
function Wt() {
|
|
1106
|
-
Y.value.showTooltip = !Y.value.showTooltip;
|
|
1107
|
-
}
|
|
1108
|
-
let Gt = I(!1);
|
|
1109
|
-
function Kt() {
|
|
1110
|
-
Gt.value = !Gt.value;
|
|
1111
|
-
}
|
|
1112
|
-
function qt() {
|
|
1113
|
-
Y.value.showZoom = !Y.value.showZoom;
|
|
1114
|
-
}
|
|
1115
|
-
let Jt = D(() => !Gt.value && Y.value.showZoom), { viewBox: Yt, resetZoom: Xt, isZoom: Zt, setInitialViewBox: Qt, zoomByFactor: $t, scale: en } = oe(K, {
|
|
1116
|
-
x: 0,
|
|
1117
|
-
y: 0,
|
|
1118
|
-
width: q.value.width <= 0 ? 10 : q.value.width,
|
|
1119
|
-
height: q.value.height <= 0 ? 10 : q.value.height
|
|
1120
|
-
}, 1, Jt);
|
|
1121
|
-
we(() => B.dataset, () => {
|
|
1122
|
-
_t.value = vt(), W.value.responsive || (Rt(), wt());
|
|
1123
|
-
}, { immediate: !0 });
|
|
1124
|
-
async function tn({ scale: e = 2 } = {}) {
|
|
1125
|
-
if (!H.value) return;
|
|
1126
|
-
let { width: t, height: n } = H.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await C({
|
|
1127
|
-
domElement: H.value,
|
|
1128
|
-
base64: !0,
|
|
1129
|
-
img: !0,
|
|
1130
|
-
scale: e
|
|
1131
|
-
});
|
|
1132
|
-
return {
|
|
1133
|
-
imageUri: i,
|
|
1134
|
-
base64: a,
|
|
1135
|
-
title: W.value.style.chart.title.text,
|
|
1136
|
-
width: t,
|
|
1137
|
-
height: n,
|
|
1138
|
-
aspectRatio: r
|
|
1139
|
-
};
|
|
1140
|
-
}
|
|
1141
|
-
let nn = D(() => {
|
|
1142
|
-
let e = W.value.table.useDialog && !W.value.table.show, t = Y.value.showTable;
|
|
1143
|
-
return {
|
|
1144
|
-
component: e ? Ne : Oe,
|
|
1145
|
-
title: `${W.value.style.chart.title.text}${W.value.style.chart.title.subtitle.text ? `: ${W.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1146
|
-
props: e ? {
|
|
1147
|
-
backgroundColor: W.value.table.th.backgroundColor,
|
|
1148
|
-
color: W.value.table.th.color,
|
|
1149
|
-
headerColor: W.value.table.th.color,
|
|
1150
|
-
headerBg: W.value.table.th.backgroundColor,
|
|
1151
|
-
isFullscreen: Q.value,
|
|
1152
|
-
fullscreenParent: H.value,
|
|
1153
|
-
forcedWidth: Math.min(500, window.innerWidth * .8),
|
|
1154
|
-
isCursorPointer: G.value
|
|
1155
|
-
} : {
|
|
1156
|
-
hideDetails: !0,
|
|
1157
|
-
config: {
|
|
1158
|
-
open: t,
|
|
1159
|
-
maxHeight: 1e4,
|
|
1160
|
-
body: {
|
|
1161
|
-
backgroundColor: W.value.style.chart.backgroundColor,
|
|
1162
|
-
color: W.value.style.chart.color
|
|
1163
|
-
},
|
|
1164
|
-
head: {
|
|
1165
|
-
backgroundColor: W.value.style.chart.backgroundColor,
|
|
1166
|
-
color: W.value.style.chart.color
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
};
|
|
1171
|
-
});
|
|
1172
|
-
we(() => Y.value.showTable, (e) => {
|
|
1173
|
-
W.value.table.show || (e && W.value.table.useDialog && Ge.value ? Ge.value.open() : "close" in Ge.value && Ge.value.close());
|
|
1174
|
-
});
|
|
1175
|
-
function rn() {
|
|
1176
|
-
Y.value.showTable = !1, Ke.value && Ke.value.setTableIconState(!1);
|
|
1177
|
-
}
|
|
1178
|
-
let an = D(() => W.value.style.chart.backgroundColor), on = D(() => W.value.style.chart.title), { isCallbackImaging: sn, isCallbackSvg: cn, generateSvg: ln, onGenerateImage: un } = S({
|
|
1179
|
-
svg: K,
|
|
1180
|
-
title: on,
|
|
1181
|
-
legend: null,
|
|
1182
|
-
legendItems: null,
|
|
1183
|
-
backgroundColor: an,
|
|
1184
|
-
getSvgCallback: () => W.value.userOptions.callbacks.svg,
|
|
1185
|
-
generateImage: Ft
|
|
1186
|
-
});
|
|
1187
|
-
function dn() {
|
|
1188
|
-
$t(1.5, !0);
|
|
1189
|
-
}
|
|
1190
|
-
function fn() {
|
|
1191
|
-
$t(1 / 1.5, !0);
|
|
1192
|
-
}
|
|
1193
|
-
let $ = I(null), pn = I(!1), mn = I(""), hn = I(null);
|
|
1194
|
-
function gn() {
|
|
1195
|
-
$.value = null, U.value = null, We.value = !1;
|
|
1196
|
-
}
|
|
1197
|
-
function _n(e, t) {
|
|
1198
|
-
W.value.events.datapointLeave && W.value.events.datapointLeave({
|
|
1199
|
-
datapoint: e,
|
|
1200
|
-
seriesIndex: t
|
|
1201
|
-
}), (U.value !== t || dt.value !== "keyboard") && ($.value = null, We.value = !1);
|
|
1202
|
-
}
|
|
1203
|
-
function vn(e, t) {
|
|
1204
|
-
W.value.events.datapointClick && W.value.events.datapointClick({
|
|
1205
|
-
datapoint: e,
|
|
1206
|
-
seriesIndex: t
|
|
1207
|
-
});
|
|
1208
|
-
}
|
|
1209
|
-
function yn(e) {
|
|
1210
|
-
if (!K.value || e == null) return;
|
|
1211
|
-
let t = K.value.querySelector(`[data-a11y-word-index="${e}-${V.value}"]`);
|
|
1212
|
-
if (!t) return;
|
|
1213
|
-
let n = t.getBoundingClientRect();
|
|
1214
|
-
ut.value = {
|
|
1215
|
-
x: n.left + n.width / 2,
|
|
1216
|
-
y: n.top + n.height / 2
|
|
1217
|
-
};
|
|
1218
|
-
}
|
|
1219
|
-
function bn(e, t, r = "pointer") {
|
|
1220
|
-
if (W.value.events.datapointEnter && W.value.events.datapointEnter({
|
|
1221
|
-
datapoint: e,
|
|
1222
|
-
seriesIndex: t
|
|
1223
|
-
}), !Y.value.showTooltip) return;
|
|
1224
|
-
dt.value = r, U.value = t, $.value = e.id, hn.value = {
|
|
1225
|
-
datapoint: e,
|
|
1226
|
-
config: W.value,
|
|
1227
|
-
seriesIndex: t
|
|
1228
|
-
};
|
|
1229
|
-
let i = W.value.style.chart.tooltip.customFormat;
|
|
1230
|
-
if (pn.value = !1, n(i)) try {
|
|
1231
|
-
let t = i({
|
|
1232
|
-
datapoint: e,
|
|
1233
|
-
config: W.value
|
|
1234
|
-
});
|
|
1235
|
-
typeof t == "string" && (mn.value = t, pn.value = !0);
|
|
1236
|
-
} catch {
|
|
1237
|
-
console.warn("Custom format cannot be applied."), pn.value = !1;
|
|
1238
|
-
}
|
|
1239
|
-
if (!pn.value) {
|
|
1240
|
-
let t = `<svg viewBox="0 0 10 10" height="${W.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${e.color}"/></svg><span>${e.name}:</span><b>${(e.value || 0).toFixed(W.value.style.chart.tooltip.roundingValue)}</b>`;
|
|
1241
|
-
mn.value = `<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${t}</div>`;
|
|
1242
|
-
}
|
|
1243
|
-
r === "keyboard" && me(() => {
|
|
1244
|
-
yn(t);
|
|
1245
|
-
}), We.value = !0;
|
|
1246
|
-
}
|
|
1247
|
-
async function xn() {
|
|
1248
|
-
if (Le("copyAlt", {
|
|
1249
|
-
config: W.value,
|
|
1250
|
-
dataset: X.value
|
|
1251
|
-
}), !W.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(W.value.userOptions.callbacks.altCopy({
|
|
1256
|
-
config: W.value,
|
|
1257
|
-
dataset: X.value
|
|
1258
|
-
}));
|
|
1259
|
-
}
|
|
1260
|
-
function Sn() {
|
|
1261
|
-
U.value = null, ft.value = !0;
|
|
1262
|
-
}
|
|
1263
|
-
function Cn() {
|
|
1264
|
-
gn(), ft.value = !1;
|
|
1265
|
-
}
|
|
1266
|
-
function wn(e) {
|
|
1267
|
-
if (!K.value || Gt.value || document.activeElement !== K.value || !X.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
|
-
gn();
|
|
1272
|
-
return;
|
|
1273
|
-
}
|
|
1274
|
-
if (r) {
|
|
1275
|
-
if (U.value === null) return;
|
|
1276
|
-
let e = X.value[U.value];
|
|
1277
|
-
if (!e) return;
|
|
1278
|
-
vn(e, U.value);
|
|
1279
|
-
return;
|
|
1280
|
-
}
|
|
1281
|
-
let a = U.value;
|
|
1282
|
-
a === null || a < 0 || a >= X.value.length ? a = n ? 0 : X.value.length - 1 : (a += n ? 1 : -1, a < 0 && (a = X.value.length - 1), a >= X.value.length && (a = 0));
|
|
1283
|
-
let o = X.value[a];
|
|
1284
|
-
o && bn(o, a, "keyboard");
|
|
1285
|
-
}
|
|
1286
|
-
let Tn = D(() => ({
|
|
1287
|
-
headers: Z.value?.colNames ?? [],
|
|
1288
|
-
rows: Z.value?.a11yBody ?? []
|
|
1289
|
-
}));
|
|
1290
|
-
return T({
|
|
1291
|
-
getData: Ht,
|
|
1292
|
-
getImage: tn,
|
|
1293
|
-
generateCsv: Bt,
|
|
1294
|
-
generatePdf: Pt,
|
|
1295
|
-
generateImage: Ft,
|
|
1296
|
-
generateSvg: ln,
|
|
1297
|
-
resetZoom: Xt,
|
|
1298
|
-
toggleTable: Ut,
|
|
1299
|
-
toggleTooltip: Wt,
|
|
1300
|
-
toggleAnnotator: Kt,
|
|
1301
|
-
toggleFullscreen: Vt,
|
|
1302
|
-
toggleZoom: qt,
|
|
1303
|
-
copyAlt: xn
|
|
1304
|
-
}), (e, t) => (F(), A("div", {
|
|
1305
|
-
class: "vue-data-ui-component vue-ui-word-cloud",
|
|
1306
|
-
ref_key: "wordCloudChart",
|
|
1307
|
-
ref: H,
|
|
1308
|
-
id: `wordCloud_${V.value}`,
|
|
1309
|
-
"data-resizing": Et.value,
|
|
1310
|
-
"data-relayout": Je.value,
|
|
1311
|
-
style: ge(`width: 100%; font-family:${W.value.style.fontFamily};background:${W.value.style.chart.backgroundColor};${W.value.responsive ? "height:100%" : ""}`),
|
|
1312
|
-
onMouseenter: t[3] ||= () => R(bt)(!0),
|
|
1313
|
-
onMouseleave: t[4] ||= () => {
|
|
1314
|
-
R(bt)(!1), ft.value || gn();
|
|
1315
|
-
}
|
|
1316
|
-
}, [
|
|
1317
|
-
j("div", {
|
|
1318
|
-
id: `chart-instructions-${V.value}`,
|
|
1319
|
-
class: "sr-only"
|
|
1320
|
-
}, [j("p", null, Se(W.value.a11y.translations.keyboardNavigation), 1)], 8, Qe),
|
|
1321
|
-
Tn.value?.rows?.length ? (F(), O(ie, {
|
|
1322
|
-
key: 0,
|
|
1323
|
-
uid: V.value,
|
|
1324
|
-
head: Tn.value.headers,
|
|
1325
|
-
body: Tn.value.rows,
|
|
1326
|
-
notice: W.value.a11y.translations.tableAvailable,
|
|
1327
|
-
caption: W.value.a11y.translations.tableCaption
|
|
1328
|
-
}, null, 8, [
|
|
1329
|
-
"uid",
|
|
1330
|
-
"head",
|
|
1331
|
-
"body",
|
|
1332
|
-
"notice",
|
|
1333
|
-
"caption"
|
|
1334
|
-
])) : k("", !0),
|
|
1335
|
-
W.value.userOptions.buttons.annotator ? (F(), O(R(Ae), {
|
|
1336
|
-
key: 1,
|
|
1337
|
-
svgRef: R(K),
|
|
1338
|
-
backgroundColor: W.value.style.chart.backgroundColor,
|
|
1339
|
-
color: W.value.style.chart.color,
|
|
1340
|
-
active: Gt.value,
|
|
1341
|
-
isCursorPointer: G.value,
|
|
1342
|
-
palette: W.value.userOptions.annotatorPalette,
|
|
1343
|
-
onClose: Kt
|
|
1344
|
-
}, {
|
|
1345
|
-
"annotator-action-close": z(() => [L(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1346
|
-
"annotator-action-color": z(({ color: t }) => [L(e.$slots, "annotator-action-color", P(N({ color: t })), void 0, !0)]),
|
|
1347
|
-
"annotator-action-draw": z(({ mode: t }) => [L(e.$slots, "annotator-action-draw", P(N({ mode: t })), void 0, !0)]),
|
|
1348
|
-
"annotator-action-undo": z(({ disabled: t }) => [L(e.$slots, "annotator-action-undo", P(N({ disabled: t })), void 0, !0)]),
|
|
1349
|
-
"annotator-action-redo": z(({ disabled: t }) => [L(e.$slots, "annotator-action-redo", P(N({ disabled: t })), void 0, !0)]),
|
|
1350
|
-
"annotator-action-delete": z(({ disabled: t }) => [L(e.$slots, "annotator-action-delete", P(N({ disabled: t })), void 0, !0)]),
|
|
1351
|
-
_: 3
|
|
1352
|
-
}, 8, [
|
|
1353
|
-
"svgRef",
|
|
1354
|
-
"backgroundColor",
|
|
1355
|
-
"color",
|
|
1356
|
-
"active",
|
|
1357
|
-
"isCursorPointer",
|
|
1358
|
-
"palette"
|
|
1359
|
-
])) : k("", !0),
|
|
1360
|
-
W.value.style.chart.title.text ? (F(), A("div", {
|
|
1361
|
-
key: 2,
|
|
1362
|
-
ref_key: "chartTitle",
|
|
1363
|
-
ref: Be,
|
|
1364
|
-
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
1365
|
-
}, [(F(), O(w, {
|
|
1366
|
-
key: `title_${He.value}`,
|
|
1367
|
-
config: {
|
|
1368
|
-
title: { ...W.value.style.chart.title },
|
|
1369
|
-
subtitle: { ...W.value.style.chart.title.subtitle }
|
|
1370
|
-
}
|
|
1371
|
-
}, null, 8, ["config"]))], 512)) : k("", !0),
|
|
1372
|
-
W.value.userOptions.show && Re.value && (R(xt) || R(yt)) ? (F(), O(R(je), {
|
|
1373
|
-
ref_key: "userOptionsRef",
|
|
1374
|
-
ref: Ke,
|
|
1375
|
-
key: `user_option_${ze.value}`,
|
|
1376
|
-
backgroundColor: W.value.style.chart.backgroundColor,
|
|
1377
|
-
color: W.value.style.chart.color,
|
|
1378
|
-
isPrinting: R(Mt),
|
|
1379
|
-
isImaging: R(Nt),
|
|
1380
|
-
uid: V.value,
|
|
1381
|
-
hasPdf: W.value.userOptions.buttons.pdf,
|
|
1382
|
-
hasXls: W.value.userOptions.buttons.csv,
|
|
1383
|
-
hasImg: W.value.userOptions.buttons.img,
|
|
1384
|
-
hasSvg: W.value.userOptions.buttons.svg,
|
|
1385
|
-
hasTable: W.value.userOptions.buttons.table,
|
|
1386
|
-
hasFullscreen: W.value.userOptions.buttons.fullscreen,
|
|
1387
|
-
hasAltCopy: W.value.userOptions.buttons.altCopy,
|
|
1388
|
-
isFullscreen: Q.value,
|
|
1389
|
-
titles: { ...W.value.userOptions.buttonTitles },
|
|
1390
|
-
chartElement: H.value,
|
|
1391
|
-
position: W.value.userOptions.position,
|
|
1392
|
-
hasTooltip: W.value.style.chart.tooltip.show && W.value.userOptions.buttons.tooltip,
|
|
1393
|
-
isTooltip: Y.value.showTooltip,
|
|
1394
|
-
hasAnnotator: W.value.userOptions.buttons.annotator,
|
|
1395
|
-
isAnnotation: Gt.value,
|
|
1396
|
-
callbacks: W.value.userOptions.callbacks,
|
|
1397
|
-
printScale: W.value.userOptions.print.scale,
|
|
1398
|
-
tableDialog: W.value.table.useDialog,
|
|
1399
|
-
hasZoom: W.value.userOptions.buttons.zoom,
|
|
1400
|
-
isZoom: Y.value.showZoom,
|
|
1401
|
-
isCursorPointer: G.value,
|
|
1402
|
-
onToggleFullscreen: Vt,
|
|
1403
|
-
onGeneratePdf: R(Pt),
|
|
1404
|
-
onGenerateCsv: Bt,
|
|
1405
|
-
onGenerateImage: R(un),
|
|
1406
|
-
onGenerateSvg: R(ln),
|
|
1407
|
-
onToggleTable: Ut,
|
|
1408
|
-
onToggleTooltip: Wt,
|
|
1409
|
-
onToggleAnnotator: Kt,
|
|
1410
|
-
onToggleZoom: qt,
|
|
1411
|
-
onCopyAlt: xn,
|
|
1412
|
-
style: ge({ visibility: R(xt) ? R(yt) ? "visible" : "hidden" : "visible" })
|
|
1413
|
-
}, ue({ _: 2 }, [
|
|
1414
|
-
e.$slots.menuIcon ? {
|
|
1415
|
-
name: "menuIcon",
|
|
1416
|
-
fn: z(({ isOpen: t, color: n }) => [L(e.$slots, "menuIcon", P(N({
|
|
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: z(() => [L(e.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1425
|
-
key: "1"
|
|
1426
|
-
} : void 0,
|
|
1427
|
-
e.$slots.optionPdf ? {
|
|
1428
|
-
name: "optionPdf",
|
|
1429
|
-
fn: z(() => [L(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1430
|
-
key: "2"
|
|
1431
|
-
} : void 0,
|
|
1432
|
-
e.$slots.optionCsv ? {
|
|
1433
|
-
name: "optionCsv",
|
|
1434
|
-
fn: z(() => [L(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1435
|
-
key: "3"
|
|
1436
|
-
} : void 0,
|
|
1437
|
-
e.$slots.optionImg ? {
|
|
1438
|
-
name: "optionImg",
|
|
1439
|
-
fn: z(() => [L(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1440
|
-
key: "4"
|
|
1441
|
-
} : void 0,
|
|
1442
|
-
e.$slots.optionSvg ? {
|
|
1443
|
-
name: "optionSvg",
|
|
1444
|
-
fn: z(() => [L(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1445
|
-
key: "5"
|
|
1446
|
-
} : void 0,
|
|
1447
|
-
e.$slots.optionTable ? {
|
|
1448
|
-
name: "optionTable",
|
|
1449
|
-
fn: z(() => [L(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1450
|
-
key: "6"
|
|
1451
|
-
} : void 0,
|
|
1452
|
-
e.$slots.optionFullscreen ? {
|
|
1453
|
-
name: "optionFullscreen",
|
|
1454
|
-
fn: z(({ toggleFullscreen: t, isFullscreen: n }) => [L(e.$slots, "optionFullscreen", P(N({
|
|
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: z(({ toggleAnnotator: t, isAnnotator: n }) => [L(e.$slots, "optionAnnotator", P(N({
|
|
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: z(({ toggleZoom: t, isZoomLocked: n }) => [L(e.$slots, "optionZoom", P(N({
|
|
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: z(({ altCopy: t }) => [L(e.$slots, "optionAltCopy", P(N({ altCopy: t })), void 0, !0)]),
|
|
1479
|
-
key: "10"
|
|
1480
|
-
} : void 0,
|
|
1481
|
-
e.$slots["custom-menu-before"] ? {
|
|
1482
|
-
name: "custom-menu-before",
|
|
1483
|
-
fn: z(() => [L(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: z(() => [L(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("."))) : k("", !0),
|
|
1492
|
-
W.value.style.chart.controls.position === "top" && W.value.style.chart.controls.show && !R(mt) ? (F(), O(ce, {
|
|
1493
|
-
key: 4,
|
|
1494
|
-
ref_key: "zoomControls",
|
|
1495
|
-
ref: Ye,
|
|
1496
|
-
config: W.value,
|
|
1497
|
-
scale: R(en),
|
|
1498
|
-
isFullscreen: Q.value,
|
|
1499
|
-
isCursorPointer: G.value,
|
|
1500
|
-
onZoomIn: dn,
|
|
1501
|
-
onZoomOut: fn,
|
|
1502
|
-
onResetZoom: t[0] ||= (e) => R(Xt)(!0)
|
|
1503
|
-
}, null, 8, [
|
|
1504
|
-
"config",
|
|
1505
|
-
"scale",
|
|
1506
|
-
"isFullscreen",
|
|
1507
|
-
"isCursorPointer"
|
|
1508
|
-
])) : k("", !0),
|
|
1509
|
-
j("div", $e, [(F(), A("svg", {
|
|
1510
|
-
ref_key: "svgRef",
|
|
1511
|
-
ref: K,
|
|
1512
|
-
class: he({
|
|
1513
|
-
"vue-data-ui-fullscreen--on": Q.value,
|
|
1514
|
-
"vue-data-ui-fulscreen--off": !Q.value
|
|
1515
|
-
}),
|
|
1516
|
-
"aria-describedby": `chart-instructions-${V.value}`,
|
|
1517
|
-
xmlns: R(h),
|
|
1518
|
-
viewBox: `${R(Yt).x} ${R(Yt).y} ${R(Yt).width} ${R(Yt).height}`,
|
|
1519
|
-
style: "overflow:hidden;background:transparent;display:block",
|
|
1520
|
-
tabindex: "0",
|
|
1521
|
-
onFocus: Sn,
|
|
1522
|
-
onBlur: Cn,
|
|
1523
|
-
onKeydown: wn
|
|
1524
|
-
}, [
|
|
1525
|
-
fe(R(Me)),
|
|
1526
|
-
e.$slots["chart-background"] ? (F(), A("foreignObject", {
|
|
1527
|
-
key: 0,
|
|
1528
|
-
x: 0,
|
|
1529
|
-
y: 0,
|
|
1530
|
-
width: q.value.width <= 0 ? 10 : q.value.width,
|
|
1531
|
-
height: q.value.height <= 0 ? 10 : q.value.height,
|
|
1532
|
-
style: { pointerEvents: "none" }
|
|
1533
|
-
}, [L(e.$slots, "chart-background", {}, void 0, !0)], 8, tt)) : k("", !0),
|
|
1534
|
-
j("g", {
|
|
1535
|
-
transform: `translate(${Ct.value.x}, ${Ct.value.y})`,
|
|
1536
|
-
class: he({ "wc-finalized": qe.value })
|
|
1537
|
-
}, [(F(!0), A(le, null, ye(X.value, (e, t) => (F(), A("g", {
|
|
1538
|
-
key: e.id,
|
|
1539
|
-
class: "vue-ui-word-cloud-word",
|
|
1540
|
-
transform: `translate(${e.x}, ${e.y})`
|
|
1541
|
-
}, [e.minX === void 0 ? k("", !0) : (F(), A("rect", {
|
|
1542
|
-
key: 0,
|
|
1543
|
-
"data-a11y-word-index": `${t}-${V.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(W.value.style.chart.tooltip.roundingValue)}`,
|
|
1551
|
-
onMouseover: (n) => bn(e, t),
|
|
1552
|
-
onMouseleave: (n) => _n(e, t),
|
|
1553
|
-
onClick: (n) => vn(e, t)
|
|
1554
|
-
}, null, 40, it)), j("text", {
|
|
1555
|
-
fill: e.color,
|
|
1556
|
-
"font-weight": W.value.style.chart.words.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: !$.value || $.value === e.id ? W.value.style.chart.words.selectedStroke : void 0,
|
|
1565
|
-
"stroke-width": e.height * .05,
|
|
1566
|
-
"stroke-linecap": "round",
|
|
1567
|
-
"stroke-linejoin": "round",
|
|
1568
|
-
style: ge(`
|
|
1569
|
-
pointer-events:none;
|
|
1570
|
-
fill-opacity:${!$.value || $.value === e.id || !qe.value ? 1 : W.value.style.chart.words.hoverOpacity} !important;
|
|
1571
|
-
`)
|
|
1572
|
-
}, Se(e.name), 13, at)], 8, rt))), 128))], 10, nt),
|
|
1573
|
-
L(e.$slots, "svg", { svg: {
|
|
1574
|
-
...q.value,
|
|
1575
|
-
isPrintingImg: R(Mt) || R(Nt) || R(sn),
|
|
1576
|
-
isPrintingSvg: R(cn)
|
|
1577
|
-
} }, void 0, !0)
|
|
1578
|
-
], 42, et)), e.$slots.hint ? (F(), A("div", ot, [L(e.$slots, "hint", P(N({
|
|
1579
|
-
hint: W.value.a11y.translations.keyboardNavigation,
|
|
1580
|
-
isVisible: ft.value
|
|
1581
|
-
})), void 0, !0)])) : k("", !0)]),
|
|
1582
|
-
e.$slots.watermark ? (F(), A("div", st, [L(e.$slots, "watermark", P(N({ isPrinting: R(Mt) || R(Nt) || R(sn) || R(cn) })), void 0, !0)])) : k("", !0),
|
|
1583
|
-
R(Zt) ? (F(), A("div", ct, [L(e.$slots, "reset-action", { reset: R(Xt) }, void 0, !0)])) : k("", !0),
|
|
1584
|
-
W.value.style.chart.controls.position === "bottom" && W.value.style.chart.controls.show && !R(mt) ? (F(), O(ce, {
|
|
1585
|
-
key: 7,
|
|
1586
|
-
ref_key: "zoomControls",
|
|
1587
|
-
ref: Ye,
|
|
1588
|
-
config: W.value,
|
|
1589
|
-
scale: R(en),
|
|
1590
|
-
isFullscreen: Q.value,
|
|
1591
|
-
isCursorPointer: G.value,
|
|
1592
|
-
onZoomIn: dn,
|
|
1593
|
-
onZoomOut: fn,
|
|
1594
|
-
onResetZoom: t[1] ||= (e) => R(Xt)(!0)
|
|
1595
|
-
}, null, 8, [
|
|
1596
|
-
"config",
|
|
1597
|
-
"scale",
|
|
1598
|
-
"isFullscreen",
|
|
1599
|
-
"isCursorPointer"
|
|
1600
|
-
])) : k("", !0),
|
|
1601
|
-
fe(R(Ee), {
|
|
1602
|
-
teleportTo: W.value.style.chart.tooltip.teleportTo,
|
|
1603
|
-
show: Y.value.showTooltip && We.value,
|
|
1604
|
-
backgroundColor: W.value.style.chart.tooltip.backgroundColor,
|
|
1605
|
-
color: W.value.style.chart.tooltip.color,
|
|
1606
|
-
fontSize: W.value.style.chart.tooltip.fontSize,
|
|
1607
|
-
borderRadius: W.value.style.chart.tooltip.borderRadius,
|
|
1608
|
-
borderColor: W.value.style.chart.tooltip.borderColor,
|
|
1609
|
-
borderWidth: W.value.style.chart.tooltip.borderWidth,
|
|
1610
|
-
backgroundOpacity: W.value.style.chart.tooltip.backgroundOpacity,
|
|
1611
|
-
position: W.value.style.chart.tooltip.position,
|
|
1612
|
-
offsetX: W.value.style.chart.tooltip.offsetX,
|
|
1613
|
-
offsetY: W.value.style.chart.tooltip.offsetY,
|
|
1614
|
-
parent: H.value,
|
|
1615
|
-
content: mn.value,
|
|
1616
|
-
isCustom: pn.value,
|
|
1617
|
-
isFullscreen: Q.value,
|
|
1618
|
-
smooth: W.value.style.chart.tooltip.smooth,
|
|
1619
|
-
backdropFilter: W.value.style.chart.tooltip.backdropFilter,
|
|
1620
|
-
smoothForce: W.value.style.chart.tooltip.smoothForce,
|
|
1621
|
-
smoothSnapThreshold: W.value.style.chart.tooltip.smoothSnapThreshold,
|
|
1622
|
-
isA11yMode: dt.value === "keyboard",
|
|
1623
|
-
a11yPosition: ut.value
|
|
1624
|
-
}, {
|
|
1625
|
-
"tooltip-before": z(() => [L(e.$slots, "tooltip-before", P(N({ ...hn.value })), void 0, !0)]),
|
|
1626
|
-
tooltip: z(() => [L(e.$slots, "tooltip", P(N({ ...hn.value })), void 0, !0)]),
|
|
1627
|
-
"tooltip-after": z(() => [L(e.$slots, "tooltip-after", P(N({ ...hn.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 ? (F(), A("div", {
|
|
1654
|
-
key: 8,
|
|
1655
|
-
ref_key: "source",
|
|
1656
|
-
ref: Ve,
|
|
1657
|
-
dir: "auto"
|
|
1658
|
-
}, [L(e.$slots, "source", {}, void 0, !0)], 512)) : k("", !0),
|
|
1659
|
-
Re.value && W.value.userOptions.buttons.table ? (F(), O(be(nn.value.component), pe({ key: 9 }, nn.value.props, {
|
|
1660
|
-
ref_key: "tableUnit",
|
|
1661
|
-
ref: Ge,
|
|
1662
|
-
onClose: rn
|
|
1663
|
-
}), ue({
|
|
1664
|
-
content: z(() => [(F(), O(R(ke), {
|
|
1665
|
-
key: `table_${Ue.value}`,
|
|
1666
|
-
colNames: Z.value.colNames,
|
|
1667
|
-
head: Z.value.head,
|
|
1668
|
-
body: Z.value.body,
|
|
1669
|
-
config: Z.value.config,
|
|
1670
|
-
title: W.value.table.useDialog ? "" : nn.value.title,
|
|
1671
|
-
withCloseButton: !W.value.table.useDialog,
|
|
1672
|
-
isCursorPointer: G.value,
|
|
1673
|
-
onClose: rn
|
|
1674
|
-
}, {
|
|
1675
|
-
th: z(({ th: e }) => [j("div", lt, Se(e), 1)]),
|
|
1676
|
-
td: z(({ td: e }) => [de(Se(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
|
-
}, [W.value.table.useDialog ? {
|
|
1689
|
-
name: "title",
|
|
1690
|
-
fn: z(() => [de(Se(nn.value.title), 1)]),
|
|
1691
|
-
key: "0"
|
|
1692
|
-
} : void 0, W.value.table.useDialog ? {
|
|
1693
|
-
name: "actions",
|
|
1694
|
-
fn: z(() => [j("button", {
|
|
1695
|
-
tabindex: "0",
|
|
1696
|
-
class: "vue-ui-user-options-button",
|
|
1697
|
-
onClick: t[2] ||= (e) => Bt(W.value.userOptions.callbacks.csv),
|
|
1698
|
-
style: ge({ cursor: G.value ? "pointer" : "default" })
|
|
1699
|
-
}, [fe(R(De), {
|
|
1700
|
-
name: "fileCsv",
|
|
1701
|
-
stroke: nn.value.props.color
|
|
1702
|
-
}, null, 8, ["stroke"])], 4)]),
|
|
1703
|
-
key: "1"
|
|
1704
|
-
} : void 0]), 1040)) : k("", !0),
|
|
1705
|
-
L(e.$slots, "skeleton", {}, () => [R(mt) ? (F(), O(te, { key: 0 })) : k("", !0)], !0)
|
|
1706
|
-
], 44, Ze));
|
|
1707
|
-
}
|
|
1708
|
-
}, [["__scopeId", "data-v-4462fe15"]]);
|
|
1709
|
-
//#endregion
|
|
1710
|
-
export { U as n, ut as t };
|