vue-data-ui 3.9.8 → 3.9.10
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/{PackageVersion-k7oxI-bc.js → PackageVersion-DCZIL0_B.js} +1 -1
- package/dist/{Title-D1h0XGFy.js → Title-DFtCaCah.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-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-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.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/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +6 -0
- package/dist/{useNestedProp-B3m37PKe.js → useNestedProp-D-jUHecl.js} +6 -0
- package/dist/{vue-data-ui-wG8URsR4.js → vue-data-ui-ClRXBGda.js} +66 -66
- package/dist/vue-data-ui.js +68 -68
- package/dist/{vue-ui-3d-bar-Cv3ejm7T.js → vue-ui-3d-bar-TNgpzuEc.js} +3 -3
- package/dist/{vue-ui-accordion-CyEsYJt-.js → vue-ui-accordion-B6BX2vhq.js} +1 -1
- package/dist/{vue-ui-age-pyramid-nnJnP083.js → vue-ui-age-pyramid-BPTzdmW0.js} +3 -3
- package/dist/{vue-ui-annotator-ltpJX8iC.js → vue-ui-annotator-DB6dpuUU.js} +2 -2
- package/dist/{vue-ui-bullet-Cyf5C02W.js → vue-ui-bullet-DzFbSsu2.js} +3 -3
- package/dist/{vue-ui-candlestick-or8YNppc.js → vue-ui-candlestick-CAboED0U.js} +3 -3
- package/dist/{vue-ui-carousel-table-3RIzGfmz.js → vue-ui-carousel-table-DlrmY97e.js} +2 -2
- package/dist/{vue-ui-chestnut-W-WHzag3.js → vue-ui-chestnut-pbykwsi2.js} +2 -2
- package/dist/{vue-ui-chord-B1tkSoSL.js → vue-ui-chord-DJfFRfKV.js} +3 -3
- package/dist/{vue-ui-circle-pack-dR2peCrN.js → vue-ui-circle-pack-CQRZOtuK.js} +3 -3
- package/dist/{vue-ui-cursor-JhWOPlue.js → vue-ui-cursor-yyls4HGT.js} +2 -2
- package/dist/{vue-ui-dag-DSbiWNRz.js → vue-ui-dag-C8K66G3E.js} +654 -644
- package/dist/{vue-ui-dashboard-DDWIirwt.js → vue-ui-dashboard-D3Iyv0JD.js} +64 -64
- package/dist/{vue-ui-digits-BSPgk-5O.js → vue-ui-digits-DQz1eJc-.js} +1 -1
- package/dist/{vue-ui-donut-evolution-BbdMmK42.js → vue-ui-donut-evolution-fhLI01zC.js} +3 -3
- package/dist/{vue-ui-donut-dyuA_lh-.js → vue-ui-donut-xcE---Po.js} +3 -3
- package/dist/{vue-ui-dumbbell-B5q7CHPm.js → vue-ui-dumbbell-C9O0Bkf9.js} +3 -3
- package/dist/{vue-ui-flow-BQSAx0of.js → vue-ui-flow-CGOye6P4.js} +3 -3
- package/dist/{vue-ui-funnel-DqeutrjP.js → vue-ui-funnel-DsTz2cnF.js} +3 -3
- package/dist/{vue-ui-galaxy-BJn_YID0.js → vue-ui-galaxy-DU-o6sLX.js} +3 -3
- package/dist/{vue-ui-gauge-DK2PPQcs.js → vue-ui-gauge-RYEhh2WB.js} +3 -3
- package/dist/vue-ui-geo-DzFx9KIT.js +1298 -0
- package/dist/{vue-ui-gizmo-C0ruoX7v.js → vue-ui-gizmo-B4GeLU_H.js} +2 -2
- package/dist/{vue-ui-heatmap-CK0Z2Afj.js → vue-ui-heatmap-Di39E10i.js} +489 -424
- package/dist/{vue-ui-history-plot-CNUXKSKz.js → vue-ui-history-plot-DweGUMrh.js} +3 -3
- package/dist/{vue-ui-horizontal-bar-47vUiD1a.js → vue-ui-horizontal-bar-BRk_Qnvt.js} +4 -4
- package/dist/{vue-ui-kpi-ZQIY3YxS.js → vue-ui-kpi-BnCqocoi.js} +2 -2
- package/dist/{vue-ui-mini-loader-BFyTygMK.js → vue-ui-mini-loader-Dzqusv9i.js} +1 -1
- package/dist/{vue-ui-molecule-ChiK-Wl8.js → vue-ui-molecule-Dn3L3Pzv.js} +2 -2
- package/dist/{vue-ui-mood-radar-Bpni9n8k.js → vue-ui-mood-radar-CR8x29EU.js} +3 -3
- package/dist/{vue-ui-nested-donuts-B_eaN5fo.js → vue-ui-nested-donuts-DEmXu87c.js} +3 -3
- package/dist/{vue-ui-onion-B2aokd1_.js → vue-ui-onion-B_bd4qUM.js} +3 -3
- package/dist/{vue-ui-parallel-coordinate-plot-D9vq53-4.js → vue-ui-parallel-coordinate-plot-CjKb6-Uq.js} +3 -3
- package/dist/{vue-ui-quadrant-C6bsqo12.js → vue-ui-quadrant-B5OfygHr.js} +3 -3
- package/dist/{vue-ui-quick-chart-BycSnSJ9.js → vue-ui-quick-chart-MdfHmOs2.js} +2 -2
- package/dist/{vue-ui-radar-ciuRu1P4.js → vue-ui-radar-BLFDJ69V.js} +3 -3
- package/dist/{vue-ui-rating-YwRDNhIj.js → vue-ui-rating-BciQHmzs.js} +1 -1
- package/dist/{vue-ui-relation-circle-CvoN1OSn.js → vue-ui-relation-circle-xGWmFHf_.js} +3 -3
- package/dist/{vue-ui-ridgeline-DLMIzPvD.js → vue-ui-ridgeline-Dvwi6E9_.js} +3 -3
- package/dist/{vue-ui-rings-DeEPzX1M.js → vue-ui-rings-CGOWZybm.js} +3 -3
- package/dist/{vue-ui-scatter-gx--XmgC.js → vue-ui-scatter-CdCUg54d.js} +3 -3
- package/dist/{vue-ui-skeleton-D9VBR-dM.js → vue-ui-skeleton-DaomVcWl.js} +2 -2
- package/dist/{vue-ui-smiley-DSHWKC6h.js → vue-ui-smiley-C0Bqip2_.js} +1 -1
- package/dist/{vue-ui-spark-trend-Kkjw_ZVf.js → vue-ui-spark-trend-CCPXy2ZD.js} +2 -2
- package/dist/{vue-ui-sparkbar-BnBIa2eJ.js → vue-ui-sparkbar-DMuih6Dx.js} +2 -2
- package/dist/{vue-ui-sparkgauge-B1zvTOG5.js → vue-ui-sparkgauge-BZFeEMV9.js} +2 -2
- package/dist/{vue-ui-sparkhistogram-Dh_HlHC9.js → vue-ui-sparkhistogram-DahIfjLU.js} +2 -2
- package/dist/{vue-ui-sparkline-BOA11MZR.js → vue-ui-sparkline-CaehcwBo.js} +2 -2
- package/dist/{vue-ui-sparkstackbar-BSte0Azx.js → vue-ui-sparkstackbar-On4F24cq.js} +2 -2
- package/dist/{vue-ui-stackbar-DrOYeLWK.js → vue-ui-stackbar-aN5cfErv.js} +3 -3
- package/dist/{vue-ui-stackline-kuSASJXR.js → vue-ui-stackline-CTPUaU0K.js} +3 -3
- package/dist/{vue-ui-strip-plot-Bs0K-e1Z.js → vue-ui-strip-plot-BO7YQnRj.js} +3 -3
- package/dist/{vue-ui-table-oNEaOWiu.js → vue-ui-table-Dg6j7T65.js} +3 -3
- package/dist/{vue-ui-table-heatmap-BGEjaJLQ.js → vue-ui-table-heatmap-CDnzIKGy.js} +1 -1
- package/dist/{vue-ui-table-sparkline-BFbSph66.js → vue-ui-table-sparkline-DE_LyDJV.js} +2 -2
- package/dist/{vue-ui-thermometer-07xalNuL.js → vue-ui-thermometer-C6LrWdX4.js} +3 -3
- package/dist/{vue-ui-timer-Dl7m3cB6.js → vue-ui-timer-DCENDOVz.js} +3 -3
- package/dist/{vue-ui-tiremarks-C8pPFmMU.js → vue-ui-tiremarks-CEQM_3u0.js} +3 -3
- package/dist/{vue-ui-treemap-COJ74Xt4.js → vue-ui-treemap-Cighusxg.js} +3 -3
- package/dist/{vue-ui-waffle-7tGsSzS6.js → vue-ui-waffle-Cs4LXcYi.js} +3 -3
- package/dist/{vue-ui-wheel-DDYtoMJf.js → vue-ui-wheel-DchTydjv.js} +3 -3
- package/dist/{vue-ui-word-cloud-CwS6NzLs.js → vue-ui-word-cloud-BlsRq_M1.js} +3 -3
- package/dist/{vue-ui-world-DgrnTh0K.js → vue-ui-world-C8zN4MHP.js} +2 -2
- package/dist/{vue-ui-xy-3OjLID83.js → vue-ui-xy-1vhl0WmV.js} +4 -4
- package/dist/{vue-ui-xy-canvas-BOQ3nptA.js → vue-ui-xy-canvas-9tgX_s2v.js} +3 -3
- package/package.json +1 -1
- package/dist/vue-ui-geo-DbXBoMee.js +0 -1243
|
@@ -1,1243 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as fe, ref as h, toRefs as go, computed as d, watch as ne, nextTick as re, onBeforeUnmount as kt, onMounted as yo, createElementBlock as F, openBlock as g, normalizeStyle as de, normalizeClass as At, createCommentVNode as S, createBlock as J, createVNode as Ft, unref as y, withCtx as A, renderSlot as b, normalizeProps as $, guardReactiveProps as T, createSlots as bo, createElementVNode as ie, Fragment as ve, renderList as he, mergeProps as Co, toDisplayString as ko } from "vue";
|
|
2
|
-
import { c as Ao, t as Fo, l as wo, X as No, x as wt } from "./lib-W9waxHL3.js";
|
|
3
|
-
import { u as Po } from "./usePanZoom-CDF7rb3o.js";
|
|
4
|
-
import { t as $o, u as To } from "./useResponsive-DfdjqQps.js";
|
|
5
|
-
import { u as xo, a as Ie } from "./useNestedProp-B3m37PKe.js";
|
|
6
|
-
import { u as Io, B as Bo } from "./BaseScanner-BMpwQAfz.js";
|
|
7
|
-
import { u as Eo } from "./usePrinter-DhoMn87n.js";
|
|
8
|
-
import { u as So } from "./useSvgExport-ByUukOZt.js";
|
|
9
|
-
import { u as Oo } from "./useThemeCheck-DGJ31Vi5.js";
|
|
10
|
-
import { u as Ro } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
|
-
import { u as jo } from "./useChartAccessibility-9icAAmYg.js";
|
|
12
|
-
import Mo from "./img-BJzUSmkm.js";
|
|
13
|
-
import { g as _o } from "./geoProjections-D0Vxsz_O.js";
|
|
14
|
-
import zo from "./Title-D1h0XGFy.js";
|
|
15
|
-
import { B as Nt } from "./BaseZoomControls-D8N7fb-c.js";
|
|
16
|
-
import { _ as Go } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
|
-
const $t = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", controls: { backgroundColor: "#2A2A2A", buttonColor: "#2A2A2A", color: "#CCCCCC", border: "1px solid #4A4A4A" }, territory: { fill: "#2A2A2A", stroke: "#5A5A5A", hover: { fill: "#3A3A3A", stroke: "#6A6A6A" } }, points: { stroke: "#1A1A1A", fill: "#CCCCCC", labels: { color: "#CCCCCC" } }, title: { color: "#CCCCCC", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#1A1A1A", backgroundOpacity: 70, color: "#CCCCCC", borderColor: "#5A5A5A" } } } }, Tt = { style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", controls: { backgroundColor: "#FFF8E1", buttonColor: "#FFF8E1", color: "#424242", border: "1px solid #d9bbb2" }, title: { color: "#424242", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#FFECB3", backgroundOpacity: 30, color: "#424242", borderColor: "#FF8A65" }, territory: { fill: "#e3dcc8", stroke: "#f7c0b0", hover: { fill: "#FFECB3", stroke: "#FF8A65" } }, points: { stroke: "#FFF8E1", fill: "#424242", labels: { color: "#424242" } } } } }, xt = { style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", controls: { backgroundColor: "#1E1E1E", buttonColor: "#1E1E1E", color: "#BDBDBD", border: "1px solid #3A3A3A" }, title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } }, tooltip: { backgroundColor: "#1E1E1E", backgroundOpacity: 30, color: "#FFF8E1", borderColor: "#FF8A65" }, territory: { fill: "#2A1E1E", stroke: "#6e483c", hover: { fill: "#403e39", stroke: "#805244" } }, points: { stroke: "#1E1E1E", fill: "#BDBDBD", labels: { color: "#BDBDBD" } } } } }, It = { style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", controls: { backgroundColor: "#fbfafa", buttonColor: "#fbfafa", color: "#99AA99", border: "1px solid #ebded3" }, title: { color: "#8A9892", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#fbfafa", color: "#8A9892" }, territory: { fill: "#e6e2df", stroke: "#fbfafa", hover: { fill: "#dbd5d0", stroke: "#fbfafa" } }, points: { stroke: "#fbfafa", fill: "#8A9892", labels: { color: "#8A9892" } } } } }, Bt = { style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", controls: { backgroundColor: "#1A1A1A", buttonColor: "#1A1A1A", color: "#99AA99", border: "1px solid #1e361e" }, title: { color: "#66CC66", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#2A2F2A", color: "#AACCAA", borderColor: "#66CC66" }, territory: { fill: "#1A1F1A", stroke: "#2c5c2c", hover: { fill: "#3A3A3A", stroke: "#66CC66" } }, points: { stroke: "#2c5c2c", fill: "#66CC66", labels: { color: "#99AA99" } } } } }, Et = { style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", controls: { backgroundColor: "#f6f6fb", buttonColor: "#f6f6fb", color: "#50606C", border: "1px solid #98aab8", borderRadius: "0" }, title: { color: "#50606C", subtitle: { color: "#718890" } }, tooltip: { backgroundColor: "#f6f6fb", color: "#50606C" }, territory: { fill: "#cfdae3", stroke: "#98aab8", hover: { fill: "#bcc8d1", stroke: "#50606C" } }, points: { stroke: "#f6f6fb", fill: "#50606C", labels: { color: "#50606C" } } } } }, St = {
|
|
18
|
-
default: {},
|
|
19
|
-
dark: $t,
|
|
20
|
-
celebration: Tt,
|
|
21
|
-
celebrationNight: xt,
|
|
22
|
-
zen: It,
|
|
23
|
-
hack: Bt,
|
|
24
|
-
concrete: Et
|
|
25
|
-
}, mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
26
|
-
__proto__: null,
|
|
27
|
-
celebration: Tt,
|
|
28
|
-
celebrationNight: xt,
|
|
29
|
-
concrete: Et,
|
|
30
|
-
dark: $t,
|
|
31
|
-
default: St,
|
|
32
|
-
hack: Bt,
|
|
33
|
-
zen: It
|
|
34
|
-
}, Symbol.toStringTag, { value: "Module" })), Do = ["id"], Zo = ["xmlns", "viewBox", "id"], Lo = ["transform"], Wo = ["d", "fill", "stroke", "stroke-width", "onMouseenter", "onMouseleave", "onClick"], Yo = ["d", "stroke", "stroke-width", "onMouseenter", "onMouseleave", "onClick"], qo = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseenter", "onMouseleave"], Xo = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseenter", "onMouseleave", "onClick"], Ho = ["x", "y", "fill", "font-size"], Uo = {
|
|
35
|
-
key: 5,
|
|
36
|
-
class: "vue-data-ui-watermark"
|
|
37
|
-
}, Pt = 1.5, Vo = {
|
|
38
|
-
__name: "vue-ui-geo",
|
|
39
|
-
props: {
|
|
40
|
-
config: {
|
|
41
|
-
type: Object,
|
|
42
|
-
default() {
|
|
43
|
-
return {};
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
dataset: {
|
|
47
|
-
type: [Array, Object],
|
|
48
|
-
default() {
|
|
49
|
-
return [];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
setup(Ot, { expose: Rt }) {
|
|
54
|
-
const jt = fe(() => import("./Tooltip-B79qvriT.js")), Mt = fe(() => import("./UserOptions-B-2A_KRb.js")), _t = fe(() => import("./PenAndPaper-CsqBamFZ.js")), zt = fe(() => import("./PackageVersion-k7oxI-bc.js")), K = Ot, { vue_ui_geo: Gt } = xo(), { isThemeValid: Dt, warnInvalidTheme: Zt } = Oo(), R = h(Ao()), me = h(0), Be = h(0), x = h(null), j = h(!1), le = h(null), Ee = h(null), Se = h(null), Oe = h(null), L = h(null), W = h(null), Re = h(null), je = h(null), M = h(!1);
|
|
55
|
-
function Me(e) {
|
|
56
|
-
M.value = e, me.value += 1;
|
|
57
|
-
}
|
|
58
|
-
function pe() {
|
|
59
|
-
const e = Ie({
|
|
60
|
-
userConfig: K.config,
|
|
61
|
-
defaultConfig: Gt
|
|
62
|
-
}), o = e.theme;
|
|
63
|
-
if (!o) return e;
|
|
64
|
-
if (!Dt.value(e))
|
|
65
|
-
return Zt(e), e;
|
|
66
|
-
const t = Ie({
|
|
67
|
-
userConfig: St[o] || K.config,
|
|
68
|
-
defaultConfig: e
|
|
69
|
-
});
|
|
70
|
-
return Ie({
|
|
71
|
-
userConfig: K.config,
|
|
72
|
-
defaultConfig: t
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
const n = h(pe()), { userOptionsVisible: _e, keepUserOptionState: ze } = Ro({
|
|
76
|
-
config: n.value
|
|
77
|
-
}), { svgRef: ae } = jo({
|
|
78
|
-
config: n.value.style.chart.title
|
|
79
|
-
}), { loading: ge, FINAL_DATASET: Lt } = Io({
|
|
80
|
-
...go(K),
|
|
81
|
-
FINAL_CONFIG: n,
|
|
82
|
-
prepareConfig: pe,
|
|
83
|
-
allowEmptyDataset: !0,
|
|
84
|
-
skeletonDataset: [],
|
|
85
|
-
skeletonConfig: Fo({
|
|
86
|
-
defaultConfig: n.value,
|
|
87
|
-
userConfig: {
|
|
88
|
-
map: {
|
|
89
|
-
geoJson: {
|
|
90
|
-
type: "FeatureCollection",
|
|
91
|
-
features: [
|
|
92
|
-
{
|
|
93
|
-
type: "Feature",
|
|
94
|
-
properties: { name: "Island A" },
|
|
95
|
-
geometry: {
|
|
96
|
-
type: "Polygon",
|
|
97
|
-
coordinates: [
|
|
98
|
-
[
|
|
99
|
-
[-6, 2],
|
|
100
|
-
[-4, 2],
|
|
101
|
-
[-4, 4],
|
|
102
|
-
[-6, 4],
|
|
103
|
-
[-6, 2]
|
|
104
|
-
]
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
type: "Feature",
|
|
110
|
-
properties: { name: "Island B" },
|
|
111
|
-
geometry: {
|
|
112
|
-
type: "Polygon",
|
|
113
|
-
coordinates: [
|
|
114
|
-
[
|
|
115
|
-
[-2, -1],
|
|
116
|
-
[1, -1],
|
|
117
|
-
[1, 2],
|
|
118
|
-
[-2, 2],
|
|
119
|
-
[-2, -1]
|
|
120
|
-
]
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
type: "Feature",
|
|
126
|
-
properties: { name: "Island C" },
|
|
127
|
-
geometry: {
|
|
128
|
-
type: "Polygon",
|
|
129
|
-
coordinates: [
|
|
130
|
-
[
|
|
131
|
-
[3, -3],
|
|
132
|
-
[5, -3],
|
|
133
|
-
[5, -1],
|
|
134
|
-
[3, -1],
|
|
135
|
-
[3, -3]
|
|
136
|
-
]
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
type: "Feature",
|
|
142
|
-
properties: { name: "Island D" },
|
|
143
|
-
geometry: {
|
|
144
|
-
type: "Polygon",
|
|
145
|
-
coordinates: [
|
|
146
|
-
[
|
|
147
|
-
[4, 3],
|
|
148
|
-
[7, 3],
|
|
149
|
-
[7, 5],
|
|
150
|
-
[4, 5],
|
|
151
|
-
[4, 3]
|
|
152
|
-
]
|
|
153
|
-
]
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
]
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
userOptions: { show: !1 },
|
|
160
|
-
style: {
|
|
161
|
-
chart: {
|
|
162
|
-
backgroundColor: "#99999930",
|
|
163
|
-
territory: {
|
|
164
|
-
fill: "#99999950",
|
|
165
|
-
stroke: "#8A8A8A",
|
|
166
|
-
strokeWidth: 0.5
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
})
|
|
172
|
-
}), { isPrinting: Ge, isImaging: De, generatePdf: Ze, generateImage: Le } = Eo({
|
|
173
|
-
elementId: `vue-ui-geo_${R.value}`,
|
|
174
|
-
fileName: n.value.style.chart.title.text || "vue-ui-geo",
|
|
175
|
-
options: n.value.userOptions.print
|
|
176
|
-
}), Wt = d(() => n.value.style.chart.controls.show ? n.value.style.chart.controls.position === "top" ? Re.value?.$el ?? null : n.value.style.chart.controls.position === "bottom" ? je.value?.$el ?? null : null : null);
|
|
177
|
-
function ye() {
|
|
178
|
-
L.value && (W.value && L.value.unobserve(W.value), L.value.disconnect(), L.value = null, W.value = null);
|
|
179
|
-
}
|
|
180
|
-
const Y = d(() => !!n.value.responsive && !M.value);
|
|
181
|
-
ne(
|
|
182
|
-
() => M.value,
|
|
183
|
-
async (e) => {
|
|
184
|
-
if (e) {
|
|
185
|
-
ye(), q.value = Number(n.value.style.chart.dimensions.width) || q.value, _.value = Number(n.value.style.chart.dimensions.height) || _.value, await re(), j.value = !1, requestAnimationFrame(() => {
|
|
186
|
-
j.value || ue();
|
|
187
|
-
});
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
n.value.responsive && (await re(), be());
|
|
191
|
-
}
|
|
192
|
-
);
|
|
193
|
-
function be() {
|
|
194
|
-
if (ye(), !Y.value) return;
|
|
195
|
-
const e = $o(() => {
|
|
196
|
-
if (!x.value) return;
|
|
197
|
-
const { width: o, height: t } = To({
|
|
198
|
-
chart: x.value,
|
|
199
|
-
noTitle: We.value ? Se.value : null,
|
|
200
|
-
title: n.value.style.chart.title.text ? Ee.value : null,
|
|
201
|
-
legend: Wt.value,
|
|
202
|
-
source: Oe.value
|
|
203
|
-
});
|
|
204
|
-
requestAnimationFrame(() => {
|
|
205
|
-
q.value = Math.max(0.1, Number(o) || 0.1), _.value = Math.max(0.1, Number(t) || 0.1) - 24;
|
|
206
|
-
});
|
|
207
|
-
});
|
|
208
|
-
L.value = new ResizeObserver(e), W.value = x.value ? x.value.parentNode : null, W.value && L.value.observe(W.value), e();
|
|
209
|
-
}
|
|
210
|
-
const We = d(() => n.value.userOptions.show && !n.value.style.chart.title.text), Q = h({
|
|
211
|
-
showTooltip: n.value.style.chart.tooltip.show
|
|
212
|
-
}), I = h(n.value.style.chart.zoom.active);
|
|
213
|
-
ne(
|
|
214
|
-
() => K.config,
|
|
215
|
-
() => {
|
|
216
|
-
n.value = pe(), Q.value.showTooltip = n.value.style.chart.tooltip.show, I.value = n.value.style.chart.zoom.active, q.value = n.value.style.chart.dimensions.width, _.value = n.value.style.chart.dimensions.height, be(), Be.value += 1, me.value += 1;
|
|
217
|
-
},
|
|
218
|
-
{ deep: !0 }
|
|
219
|
-
);
|
|
220
|
-
const { projections: Ye } = _o, qe = d(
|
|
221
|
-
() => n.value?.projection || "equirectangular"
|
|
222
|
-
), Yt = d(() => {
|
|
223
|
-
const e = Ye?.[qe.value];
|
|
224
|
-
return typeof e == "function" ? e : Ye.equirectangular;
|
|
225
|
-
}), Xe = d(() => n.value.map.geoJson ?? null), He = {
|
|
226
|
-
aitoff: { width: 1e3, height: 500 },
|
|
227
|
-
azimuthalEquidistant: { width: 1e3, height: 1e3 },
|
|
228
|
-
bonne: { width: 1e3, height: 1e3 },
|
|
229
|
-
equirectangular: { width: 1e3, height: 700 },
|
|
230
|
-
gallPeters: { width: 1e3, height: 800 },
|
|
231
|
-
globe: { width: 1e3, height: 1e3 },
|
|
232
|
-
hammer: { width: 1e3, height: 500 },
|
|
233
|
-
mercator: { width: 1e3, height: 750 },
|
|
234
|
-
mollweide: { width: 1e3, height: 600 },
|
|
235
|
-
robinson: { width: 1e3, height: 600 },
|
|
236
|
-
sinusoidal: { width: 1e3, height: 500 },
|
|
237
|
-
vanDerGrinten: { width: 1e3, height: 1e3 },
|
|
238
|
-
winkelTripel: { width: 1e3, height: 1e3 }
|
|
239
|
-
}, q = h(n.value.style.chart.dimensions.width), _ = h(n.value.style.chart.dimensions.height), Ce = d(() => {
|
|
240
|
-
const e = He[qe.value] || He.equirectangular;
|
|
241
|
-
return { width: e.width, height: e.height };
|
|
242
|
-
}), P = d(() => {
|
|
243
|
-
const e = Ce.value, o = q.value, t = _.value, r = Number.isFinite(o) && o > 0, i = Number.isFinite(t) && t > 0;
|
|
244
|
-
if (r && i)
|
|
245
|
-
return { width: o, height: t };
|
|
246
|
-
if (r && !i) {
|
|
247
|
-
const l = e.height / e.width;
|
|
248
|
-
return { width: o, height: o * l };
|
|
249
|
-
}
|
|
250
|
-
if (!r && i) {
|
|
251
|
-
const l = e.width / e.height;
|
|
252
|
-
return { width: t * l, height: t };
|
|
253
|
-
}
|
|
254
|
-
return { width: e.width, height: e.height };
|
|
255
|
-
}), qt = d(() => {
|
|
256
|
-
const e = n.value?.map?.center, o = [0, 0];
|
|
257
|
-
if (!Array.isArray(e) || e.length !== 2) return o;
|
|
258
|
-
const t = Number(e[0]), r = Number(e[1]);
|
|
259
|
-
return !Number.isFinite(t) || !Number.isFinite(r) ? o : [t, r];
|
|
260
|
-
});
|
|
261
|
-
function X([e, o]) {
|
|
262
|
-
return Yt.value(
|
|
263
|
-
[e, o],
|
|
264
|
-
Ce.value.width,
|
|
265
|
-
Ce.value.height,
|
|
266
|
-
qt.value
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
function Xt(e, o = {}) {
|
|
270
|
-
const {
|
|
271
|
-
defaultName: t = "",
|
|
272
|
-
namePropertyCandidates: r = [
|
|
273
|
-
"name",
|
|
274
|
-
"admin",
|
|
275
|
-
"NAME",
|
|
276
|
-
"label",
|
|
277
|
-
"title",
|
|
278
|
-
"description",
|
|
279
|
-
"DESCRIPTION"
|
|
280
|
-
],
|
|
281
|
-
includeNullGeometries: i = !1
|
|
282
|
-
} = o, l = { type: "FeatureCollection", features: [] };
|
|
283
|
-
function a(u) {
|
|
284
|
-
return u !== null && typeof u == "object" && !Array.isArray(u);
|
|
285
|
-
}
|
|
286
|
-
function c(u) {
|
|
287
|
-
return !a(u) || typeof u.type != "string" ? !1 : u.type === "GeometryCollection" ? Array.isArray(u.geometries) : Object.hasOwn(u, "coordinates");
|
|
288
|
-
}
|
|
289
|
-
function f(u) {
|
|
290
|
-
if (!a(u)) return "";
|
|
291
|
-
for (const m of r) {
|
|
292
|
-
const C = u[m];
|
|
293
|
-
if (typeof C == "string" && C.trim())
|
|
294
|
-
return C.trim();
|
|
295
|
-
}
|
|
296
|
-
return "";
|
|
297
|
-
}
|
|
298
|
-
function s({ geometry: u, properties: m, fallbackName: C, featureIndex: v }) {
|
|
299
|
-
const p = a(m) ? { ...m } : {}, E = f(p), k = t ? `${t} ${v + 1}` : "", V = E || (typeof C == "string" ? C.trim() : "") || k;
|
|
300
|
-
return !p.name && V && (p.name = V), {
|
|
301
|
-
type: "Feature",
|
|
302
|
-
geometry: u,
|
|
303
|
-
properties: p
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
function z(u, m, C, v, p) {
|
|
307
|
-
const E = Array.isArray(u?.geometries) ? u.geometries : [];
|
|
308
|
-
let k = v;
|
|
309
|
-
for (let V = 0; V < E.length; V += 1) {
|
|
310
|
-
const G = E[V];
|
|
311
|
-
if (G) {
|
|
312
|
-
if (a(G) && G.type === "GeometryCollection") {
|
|
313
|
-
k = z(
|
|
314
|
-
G,
|
|
315
|
-
m,
|
|
316
|
-
C,
|
|
317
|
-
k,
|
|
318
|
-
p
|
|
319
|
-
);
|
|
320
|
-
continue;
|
|
321
|
-
}
|
|
322
|
-
if (c(G)) {
|
|
323
|
-
if (G.coordinates == null && G.type !== "GeometryCollection") {
|
|
324
|
-
i && (p.push(
|
|
325
|
-
s({
|
|
326
|
-
geometry: null,
|
|
327
|
-
properties: m,
|
|
328
|
-
fallbackName: C,
|
|
329
|
-
featureIndex: k
|
|
330
|
-
})
|
|
331
|
-
), k += 1);
|
|
332
|
-
continue;
|
|
333
|
-
}
|
|
334
|
-
p.push(
|
|
335
|
-
s({
|
|
336
|
-
geometry: G,
|
|
337
|
-
properties: m,
|
|
338
|
-
fallbackName: C,
|
|
339
|
-
featureIndex: k
|
|
340
|
-
})
|
|
341
|
-
), k += 1;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
return k;
|
|
346
|
-
}
|
|
347
|
-
function w(u, m, C = 0) {
|
|
348
|
-
let v = C;
|
|
349
|
-
if (u == null) return v;
|
|
350
|
-
if (Array.isArray(u)) {
|
|
351
|
-
for (const p of u)
|
|
352
|
-
v = w(p, m, v);
|
|
353
|
-
return v;
|
|
354
|
-
}
|
|
355
|
-
if (!a(u) || typeof u.type != "string")
|
|
356
|
-
return v;
|
|
357
|
-
if (u.type === "FeatureCollection") {
|
|
358
|
-
const p = Array.isArray(u.features) ? u.features : [];
|
|
359
|
-
for (const E of p)
|
|
360
|
-
v = w(E, m, v);
|
|
361
|
-
return v;
|
|
362
|
-
}
|
|
363
|
-
if (u.type === "Feature") {
|
|
364
|
-
const p = a(u.properties) ? u.properties : {}, E = f(p), k = u.geometry ?? null;
|
|
365
|
-
return k == null ? (i && (m.push(
|
|
366
|
-
s({
|
|
367
|
-
geometry: null,
|
|
368
|
-
properties: p,
|
|
369
|
-
fallbackName: E,
|
|
370
|
-
featureIndex: v
|
|
371
|
-
})
|
|
372
|
-
), v += 1), v) : a(k) && k.type === "GeometryCollection" ? z(
|
|
373
|
-
k,
|
|
374
|
-
p,
|
|
375
|
-
E,
|
|
376
|
-
v,
|
|
377
|
-
m
|
|
378
|
-
) : (c(k) && (m.push(
|
|
379
|
-
s({
|
|
380
|
-
geometry: k,
|
|
381
|
-
properties: p,
|
|
382
|
-
fallbackName: E,
|
|
383
|
-
featureIndex: v
|
|
384
|
-
})
|
|
385
|
-
), v += 1), v);
|
|
386
|
-
}
|
|
387
|
-
return u.type === "GeometryCollection" ? z(u, {}, "", v, m) : (c(u) && (m.push(
|
|
388
|
-
s({
|
|
389
|
-
geometry: u,
|
|
390
|
-
properties: {},
|
|
391
|
-
fallbackName: "",
|
|
392
|
-
featureIndex: v
|
|
393
|
-
})
|
|
394
|
-
), v += 1), v);
|
|
395
|
-
}
|
|
396
|
-
const O = [];
|
|
397
|
-
return w(e, O, 0), { ...l, features: O };
|
|
398
|
-
}
|
|
399
|
-
function Ht(e) {
|
|
400
|
-
return (Array.isArray(e?.features) ? e.features : []).filter((t) => t && t.type === "Feature" && t.geometry).map((t, r) => {
|
|
401
|
-
const i = t.properties || {}, l = i.name || i.admin || i.NAME || i.label || i.title || i.description || i.DESCRIPTION || "";
|
|
402
|
-
return {
|
|
403
|
-
feature: t,
|
|
404
|
-
geometry: t.geometry,
|
|
405
|
-
properties: i,
|
|
406
|
-
name: l,
|
|
407
|
-
uid: `map-feature-${R.value}-${r}`,
|
|
408
|
-
index: r
|
|
409
|
-
};
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
const Ut = d(
|
|
413
|
-
() => Xt(Xe.value, {
|
|
414
|
-
defaultName: "",
|
|
415
|
-
includeNullGeometries: !1
|
|
416
|
-
})
|
|
417
|
-
), se = d(
|
|
418
|
-
() => Ht(Ut.value)
|
|
419
|
-
);
|
|
420
|
-
function Ue(e) {
|
|
421
|
-
if (!e || typeof e.type != "string") return "";
|
|
422
|
-
const o = (i) => {
|
|
423
|
-
if (!Array.isArray(i) || i.length < 2) return null;
|
|
424
|
-
const l = Number(i[0]), a = Number(i[1]);
|
|
425
|
-
if (!Number.isFinite(l) || !Number.isFinite(a)) return null;
|
|
426
|
-
const c = X([l, a]);
|
|
427
|
-
if (!Array.isArray(c) || c.length < 2) return null;
|
|
428
|
-
const f = Number(c[0]), s = Number(c[1]);
|
|
429
|
-
return !Number.isFinite(f) || !Number.isFinite(s) ? null : [f, s];
|
|
430
|
-
}, t = (i) => {
|
|
431
|
-
const l = (i || []).map(o).filter(Boolean);
|
|
432
|
-
return l.length < 2 ? "" : "M" + l.map(([a, c]) => `${a},${c}`).join("L");
|
|
433
|
-
}, r = (i) => (i || []).map((l) => {
|
|
434
|
-
const a = t(l);
|
|
435
|
-
return a ? a + "Z" : "";
|
|
436
|
-
}).filter(Boolean).join(" ");
|
|
437
|
-
return e.type === "Polygon" ? r(e.coordinates) : e.type === "MultiPolygon" ? (e.coordinates || []).map(r).filter(Boolean).join(" ") : e.type === "LineString" ? t(e.coordinates) : e.type === "MultiLineString" ? (e.coordinates || []).map(t).filter(Boolean).join(" ") : "";
|
|
438
|
-
}
|
|
439
|
-
function Vt(e) {
|
|
440
|
-
return e ? e.type === "Point" ? Array.isArray(e.coordinates) ? [e.coordinates] : [] : e.type === "MultiPoint" ? Array.isArray(e.coordinates) ? e.coordinates : [] : [] : [];
|
|
441
|
-
}
|
|
442
|
-
const Jt = d(
|
|
443
|
-
() => se.value.filter((e) => {
|
|
444
|
-
const o = e.geometry?.type;
|
|
445
|
-
return o === "Polygon" || o === "MultiPolygon";
|
|
446
|
-
})
|
|
447
|
-
), Kt = d(
|
|
448
|
-
() => se.value.filter((e) => {
|
|
449
|
-
const o = e.geometry?.type;
|
|
450
|
-
return o === "LineString" || o === "MultiLineString";
|
|
451
|
-
})
|
|
452
|
-
), Qt = d(
|
|
453
|
-
() => se.value.filter((e) => {
|
|
454
|
-
const o = e.geometry?.type;
|
|
455
|
-
return o === "Point" || o === "MultiPoint";
|
|
456
|
-
})
|
|
457
|
-
), Ve = d(() => Jt.value.map((e) => {
|
|
458
|
-
const o = Ue(e.geometry);
|
|
459
|
-
return o ? { ...e, path: o } : null;
|
|
460
|
-
}).filter(Boolean)), Je = d(() => Kt.value.map((e) => {
|
|
461
|
-
const o = Ue(e.geometry);
|
|
462
|
-
return o ? { ...e, path: o } : null;
|
|
463
|
-
}).filter(Boolean)), Ke = d(() => {
|
|
464
|
-
const e = [];
|
|
465
|
-
for (const o of Qt.value) {
|
|
466
|
-
const t = Vt(o.geometry);
|
|
467
|
-
for (let r = 0; r < t.length; r += 1) {
|
|
468
|
-
const i = t[r];
|
|
469
|
-
if (!Array.isArray(i) || i.length < 2) continue;
|
|
470
|
-
const l = Number(i[0]), a = Number(i[1]);
|
|
471
|
-
if (!Number.isFinite(l) || !Number.isFinite(a)) continue;
|
|
472
|
-
const c = X([l, a]), f = c?.[0], s = c?.[1];
|
|
473
|
-
!Number.isFinite(f) || !Number.isFinite(s) || e.push({
|
|
474
|
-
uid: `${o.uid}-geojson-point-${r}`,
|
|
475
|
-
name: o.name || "",
|
|
476
|
-
x: f,
|
|
477
|
-
y: s,
|
|
478
|
-
originalFeature: o.feature,
|
|
479
|
-
featureIndex: o.index,
|
|
480
|
-
pointIndex: r
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
return e;
|
|
485
|
-
});
|
|
486
|
-
function Qe(e) {
|
|
487
|
-
if (!e || typeof e.type != "string") return [];
|
|
488
|
-
const o = [], t = (i) => {
|
|
489
|
-
if (!Array.isArray(i) || i.length < 2) return;
|
|
490
|
-
const l = Number(i[0]), a = Number(i[1]);
|
|
491
|
-
if (!Number.isFinite(l) || !Number.isFinite(a)) return;
|
|
492
|
-
const c = X([l, a]), f = c?.[0], s = c?.[1];
|
|
493
|
-
!Number.isFinite(f) || !Number.isFinite(s) || o.push([f, s]);
|
|
494
|
-
}, r = (i) => {
|
|
495
|
-
if (Array.isArray(i)) {
|
|
496
|
-
if (i.length >= 2 && typeof i[0] == "number" && typeof i[1] == "number") {
|
|
497
|
-
t(i);
|
|
498
|
-
return;
|
|
499
|
-
}
|
|
500
|
-
for (const l of i)
|
|
501
|
-
r(l);
|
|
502
|
-
}
|
|
503
|
-
};
|
|
504
|
-
if (e.type === "GeometryCollection" && Array.isArray(e.geometries)) {
|
|
505
|
-
for (const i of e.geometries)
|
|
506
|
-
o.push(...Qe(i));
|
|
507
|
-
return o;
|
|
508
|
-
}
|
|
509
|
-
return e.type === "Point" ? (t(e.coordinates), o) : e.type === "MultiPoint" ? ((e.coordinates || []).forEach(t), o) : (r(e.coordinates), o);
|
|
510
|
-
}
|
|
511
|
-
function eo(e) {
|
|
512
|
-
const o = [];
|
|
513
|
-
for (const f of e)
|
|
514
|
-
o.push(...Qe(f.geometry));
|
|
515
|
-
if (!o.length) return null;
|
|
516
|
-
let t = 1 / 0, r = 1 / 0, i = -1 / 0, l = -1 / 0;
|
|
517
|
-
for (const [f, s] of o)
|
|
518
|
-
f < t && (t = f), s < r && (r = s), f > i && (i = f), s > l && (l = s);
|
|
519
|
-
const a = i - t, c = l - r;
|
|
520
|
-
return !(a > 0) || !(c > 0) ? null : { minX: t, minY: r, maxX: i, maxY: l, width: a, height: c };
|
|
521
|
-
}
|
|
522
|
-
const to = d(() => eo(se.value));
|
|
523
|
-
function oo({ bounds: e, targetWidth: o, targetHeight: t, padding: r }) {
|
|
524
|
-
if (!e || !(e.width > 0) || !(e.height > 0))
|
|
525
|
-
return { scale: 1, translateX: 0, translateY: 0, transform: "" };
|
|
526
|
-
const i = Number.isFinite(Number(r)) ? Number(r) : 0, l = Math.max(1, o - i * 2), a = Math.max(1, t - i * 2), c = l / e.width, f = a / e.height, s = Math.min(c, f), z = e.width * s, w = e.height * s, O = i + (l - z) / 2, u = i + (a - w) / 2, m = O - e.minX * s, C = u - e.minY * s;
|
|
527
|
-
return {
|
|
528
|
-
scale: s,
|
|
529
|
-
translateX: m,
|
|
530
|
-
translateY: C,
|
|
531
|
-
transform: `translate(${m} ${C}) scale(${s})`
|
|
532
|
-
};
|
|
533
|
-
}
|
|
534
|
-
const et = d(() => {
|
|
535
|
-
const e = to.value;
|
|
536
|
-
if (!e) return { scale: 1, translateX: 0, translateY: 0, transform: "" };
|
|
537
|
-
const o = n.value?.map?.fitPadding, t = Number.isFinite(Number(o)) ? Number(o) : 0;
|
|
538
|
-
return oo({
|
|
539
|
-
bounds: e,
|
|
540
|
-
targetWidth: P.value.width,
|
|
541
|
-
targetHeight: P.value.height,
|
|
542
|
-
padding: t
|
|
543
|
-
});
|
|
544
|
-
}), no = d(() => {
|
|
545
|
-
const e = P.value.width, o = P.value.height;
|
|
546
|
-
return `0 0 ${e} ${o}`;
|
|
547
|
-
}), {
|
|
548
|
-
viewBox: ee,
|
|
549
|
-
resetZoom: tt,
|
|
550
|
-
setInitialViewBox: ke,
|
|
551
|
-
scale: ot,
|
|
552
|
-
zoomByFactor: nt
|
|
553
|
-
} = Po(
|
|
554
|
-
ae,
|
|
555
|
-
{ x: 0, y: 0, width: P.value.width, height: P.value.height },
|
|
556
|
-
1,
|
|
557
|
-
I
|
|
558
|
-
);
|
|
559
|
-
function ro() {
|
|
560
|
-
I.value = !I.value;
|
|
561
|
-
}
|
|
562
|
-
function rt(e) {
|
|
563
|
-
const o = et.value, t = Number(o?.scale) || 1, r = Number(o?.translateX) || 0, i = Number(o?.translateY) || 0;
|
|
564
|
-
return {
|
|
565
|
-
x: e.x * t + r,
|
|
566
|
-
y: e.y * t + i
|
|
567
|
-
};
|
|
568
|
-
}
|
|
569
|
-
function it() {
|
|
570
|
-
const e = n.value?.map?.center, o = Number(e?.[0]), t = Number(e?.[1]), r = Array.isArray(e) && e.length === 2 && Number.isFinite(o) && Number.isFinite(t) && (o !== 0 || t !== 0), i = P.value.width, l = P.value.height;
|
|
571
|
-
if (!r)
|
|
572
|
-
return { x: 0, y: 0, width: i, height: l };
|
|
573
|
-
const a = X([o, t]), c = a?.[0], f = a?.[1];
|
|
574
|
-
if (!Number.isFinite(c) || !Number.isFinite(f))
|
|
575
|
-
return { x: 0, y: 0, width: i, height: l };
|
|
576
|
-
const s = rt({ x: c, y: f });
|
|
577
|
-
return {
|
|
578
|
-
x: s.x - i / 2,
|
|
579
|
-
y: s.y - l / 2,
|
|
580
|
-
width: i,
|
|
581
|
-
height: l
|
|
582
|
-
};
|
|
583
|
-
}
|
|
584
|
-
function ue() {
|
|
585
|
-
const e = it();
|
|
586
|
-
ke(e, { overwriteCurrentIfNotZoomed: !0 }), j.value = !0;
|
|
587
|
-
}
|
|
588
|
-
const lt = d(() => {
|
|
589
|
-
const e = ee.value;
|
|
590
|
-
return e ? `${e.x} ${e.y} ${e.width} ${e.height}` : no.value;
|
|
591
|
-
});
|
|
592
|
-
function Ae() {
|
|
593
|
-
nt(Pt, !0);
|
|
594
|
-
}
|
|
595
|
-
function Fe() {
|
|
596
|
-
nt(1 / Pt, !0);
|
|
597
|
-
}
|
|
598
|
-
async function at() {
|
|
599
|
-
const e = it();
|
|
600
|
-
ke(e, { overwriteCurrentIfNotZoomed: !0 }), tt(!0);
|
|
601
|
-
}
|
|
602
|
-
ne(
|
|
603
|
-
() => [
|
|
604
|
-
n.value.projection,
|
|
605
|
-
n.value.map.center?.[0],
|
|
606
|
-
n.value.map.center?.[1],
|
|
607
|
-
n.value.map.fitPadding,
|
|
608
|
-
Xe.value
|
|
609
|
-
],
|
|
610
|
-
async () => {
|
|
611
|
-
j.value = !1, await re(), requestAnimationFrame(() => {
|
|
612
|
-
j.value || ue();
|
|
613
|
-
});
|
|
614
|
-
},
|
|
615
|
-
{ deep: !1 }
|
|
616
|
-
), ne(
|
|
617
|
-
() => [q.value, _.value, Y.value],
|
|
618
|
-
async () => {
|
|
619
|
-
Y.value && (await re(), ke(
|
|
620
|
-
{ x: 0, y: 0, width: P.value.width, height: P.value.height },
|
|
621
|
-
{ overwriteCurrentIfNotZoomed: !0 }
|
|
622
|
-
), j.value = !1, requestAnimationFrame(() => {
|
|
623
|
-
j.value || ue();
|
|
624
|
-
}));
|
|
625
|
-
},
|
|
626
|
-
{ flush: "post" }
|
|
627
|
-
);
|
|
628
|
-
function io(e) {
|
|
629
|
-
return e ? e.type === "FeatureCollection" && Array.isArray(e.features) ? e.features.filter((o) => o?.type === "Feature" && o.geometry?.type === "Point").map((o, t) => {
|
|
630
|
-
const r = o.properties || {}, i = r.name || r.label || r.title || `Point ${t + 1}`, l = o.geometry.coordinates;
|
|
631
|
-
return {
|
|
632
|
-
uid: `map-point-${R.value}-${t}`,
|
|
633
|
-
name: i,
|
|
634
|
-
coordinates: l,
|
|
635
|
-
color: r.color ?? null,
|
|
636
|
-
radius: r.radius ?? null,
|
|
637
|
-
hoverRadiusRatio: n.value.style.chart.points.hoverRadiusRatio,
|
|
638
|
-
description: r.description ?? null,
|
|
639
|
-
original: o,
|
|
640
|
-
index: t
|
|
641
|
-
};
|
|
642
|
-
}) : Array.isArray(e) ? e.map((o, t) => {
|
|
643
|
-
let r = null, i = `Point ${t + 1}`, l = null, a = null, c = null;
|
|
644
|
-
Array.isArray(o) && o.length >= 2 ? r = [Number(o[0]), Number(o[1])] : o && typeof o == "object" && (Array.isArray(o.coordinates) && o.coordinates.length >= 2 ? r = [Number(o.coordinates[0]), Number(o.coordinates[1])] : Number.isFinite(Number(o.lon)) && Number.isFinite(Number(o.lat)) && (r = [Number(o.lon), Number(o.lat)]), typeof o.name == "string" && o.name.trim() && (i = o.name), o.description != null && (l = o.description), o.color != null && (a = o.color), o.radius != null && (c = o.radius));
|
|
645
|
-
const f = r ? r[0] : NaN, s = r ? r[1] : NaN;
|
|
646
|
-
return !Number.isFinite(f) || !Number.isFinite(s) ? null : {
|
|
647
|
-
uid: `map-point-${R.value}-${t}`,
|
|
648
|
-
name: i,
|
|
649
|
-
coordinates: [f, s],
|
|
650
|
-
color: a,
|
|
651
|
-
radius: c,
|
|
652
|
-
hoverRadiusRatio: n.value.style.chart.points.hoverRadiusRatio,
|
|
653
|
-
description: l,
|
|
654
|
-
original: o,
|
|
655
|
-
index: t
|
|
656
|
-
};
|
|
657
|
-
}).filter(Boolean) : typeof e == "object" ? Object.entries(e).map(([o, t], r) => {
|
|
658
|
-
if (!t || typeof t != "object") return null;
|
|
659
|
-
const i = Array.isArray(t.coordinates) ? t.coordinates : null;
|
|
660
|
-
if (!i || i.length < 2) return null;
|
|
661
|
-
const l = Number(i[0]), a = Number(i[1]);
|
|
662
|
-
return !Number.isFinite(l) || !Number.isFinite(a) ? null : {
|
|
663
|
-
uid: `map-point-${R.value}-${r}-${o}`,
|
|
664
|
-
name: t.name || o,
|
|
665
|
-
coordinates: [l, a],
|
|
666
|
-
color: t.color ?? null,
|
|
667
|
-
radius: t.radius ?? null,
|
|
668
|
-
hoverRadiusRatio: n.value.style.chart.points.hoverRadiusRatio,
|
|
669
|
-
description: t.description ?? null,
|
|
670
|
-
original: t,
|
|
671
|
-
index: r
|
|
672
|
-
};
|
|
673
|
-
}).filter(Boolean) : [] : [];
|
|
674
|
-
}
|
|
675
|
-
const st = d(() => io(Lt.value)), ut = d(() => st.value.map((e) => {
|
|
676
|
-
const o = X(e.coordinates), t = o?.[0], r = o?.[1];
|
|
677
|
-
return !Number.isFinite(t) || !Number.isFinite(r) ? null : {
|
|
678
|
-
...e,
|
|
679
|
-
x: t,
|
|
680
|
-
y: r,
|
|
681
|
-
fill: e.color ? wo(e.color) : n.value.style.chart.points.fill,
|
|
682
|
-
radius: Number.isFinite(Number(e.radius)) ? Number(e.radius) : n.value.style.chart.points.radius
|
|
683
|
-
};
|
|
684
|
-
}).filter(Boolean)), we = h(!1), Ne = h(""), D = h(!1), te = h(null), N = h(null);
|
|
685
|
-
function Pe(e) {
|
|
686
|
-
Ne.value = e, we.value = !0;
|
|
687
|
-
}
|
|
688
|
-
function ce() {
|
|
689
|
-
we.value = !1, Ne.value = "";
|
|
690
|
-
}
|
|
691
|
-
function $e(e) {
|
|
692
|
-
return String(e ?? "").replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
693
|
-
}
|
|
694
|
-
function lo(e) {
|
|
695
|
-
le.value = {
|
|
696
|
-
datapoint: e,
|
|
697
|
-
seriesIndex: e.index,
|
|
698
|
-
series: st.value,
|
|
699
|
-
config: n.value
|
|
700
|
-
}, D.value = !1;
|
|
701
|
-
const o = n.value.style.chart.tooltip.customFormat;
|
|
702
|
-
if (wt(o))
|
|
703
|
-
try {
|
|
704
|
-
const i = o(le.value);
|
|
705
|
-
if (typeof i == "string")
|
|
706
|
-
return D.value = !0, i;
|
|
707
|
-
} catch {
|
|
708
|
-
console.warn("Custom format cannot be applied."), D.value = !1;
|
|
709
|
-
}
|
|
710
|
-
const t = $e(e.name), r = e.description != null ? `<div style="margin-top:6px">${$e(e.description)}</div>` : "";
|
|
711
|
-
return `<div><div style="font-weight:600">${t}</div>${r}</div>`;
|
|
712
|
-
}
|
|
713
|
-
function ct(e) {
|
|
714
|
-
D.value = !1;
|
|
715
|
-
const o = n.value.style.chart.tooltip.customFormat;
|
|
716
|
-
if (wt(o))
|
|
717
|
-
try {
|
|
718
|
-
const r = o({
|
|
719
|
-
datapoint: e,
|
|
720
|
-
config: n.value
|
|
721
|
-
});
|
|
722
|
-
if (typeof r == "string")
|
|
723
|
-
return D.value = !0, r;
|
|
724
|
-
} catch {
|
|
725
|
-
console.warn("Custom format cannot be applied."), D.value = !1;
|
|
726
|
-
}
|
|
727
|
-
const t = typeof e?.name == "string" ? e.name.trim() : "";
|
|
728
|
-
return t ? `<div><div style="font-weight:600">${$e(t)}</div></div>` : "";
|
|
729
|
-
}
|
|
730
|
-
function ft(e) {
|
|
731
|
-
if (n.value.events.territoryEnter && n.value.events.territoryEnter({
|
|
732
|
-
datapoint: e,
|
|
733
|
-
seriesIndex: e.index
|
|
734
|
-
}), !(typeof e?.name == "string" ? e.name.trim() : "") && !n.value.style.chart.territory.hover.enabledWhenEmpty) {
|
|
735
|
-
N.value === e.uid && (N.value = null), ce();
|
|
736
|
-
return;
|
|
737
|
-
}
|
|
738
|
-
N.value = e.uid, Pe(ct(e));
|
|
739
|
-
}
|
|
740
|
-
function dt(e) {
|
|
741
|
-
N.value === e.uid && (N.value = null), ce(), n.value.events.territoryLeave && n.value.events.territoryLeave({
|
|
742
|
-
datapoint: e,
|
|
743
|
-
seriesIndex: e.index
|
|
744
|
-
});
|
|
745
|
-
}
|
|
746
|
-
function vt(e) {
|
|
747
|
-
n.value.events.territoryClick && n.value.events.territoryClick({
|
|
748
|
-
datapoint: e,
|
|
749
|
-
seriesIndex: e.index
|
|
750
|
-
});
|
|
751
|
-
}
|
|
752
|
-
function ht(e) {
|
|
753
|
-
te.value = e.uid, Pe(lo(e)), n.value.events.datapointEnter && n.value.events.datapointEnter({
|
|
754
|
-
datapoint: e,
|
|
755
|
-
seriesIndex: e.index
|
|
756
|
-
});
|
|
757
|
-
}
|
|
758
|
-
function mt(e) {
|
|
759
|
-
te.value = null, ce(), n.value.events.datapointLeave && n.value.events.datapointLeave({
|
|
760
|
-
datapoint: e,
|
|
761
|
-
seriesIndex: e.index
|
|
762
|
-
});
|
|
763
|
-
}
|
|
764
|
-
const pt = d(() => !!n.value.events.datapointClick && typeof n.value.events.datapointClick == "function");
|
|
765
|
-
function gt(e) {
|
|
766
|
-
pt.value && n.value.events.datapointClick({
|
|
767
|
-
datapoint: e,
|
|
768
|
-
seriesIndex: e.index
|
|
769
|
-
});
|
|
770
|
-
}
|
|
771
|
-
const B = d(() => n.value.style.chart.territory), H = d(() => n.value.style.chart.points);
|
|
772
|
-
function ao(e) {
|
|
773
|
-
const t = {
|
|
774
|
-
name: typeof e?.name == "string" ? e.name.trim() : "",
|
|
775
|
-
uid: e.uid,
|
|
776
|
-
index: e.featureIndex,
|
|
777
|
-
properties: {}
|
|
778
|
-
};
|
|
779
|
-
N.value = e.uid, Pe(ct(t));
|
|
780
|
-
}
|
|
781
|
-
function so(e) {
|
|
782
|
-
e?.uid && N.value === e.uid && (N.value = null), ce();
|
|
783
|
-
}
|
|
784
|
-
const oe = h(!1);
|
|
785
|
-
function Te() {
|
|
786
|
-
oe.value = !oe.value;
|
|
787
|
-
}
|
|
788
|
-
ne(
|
|
789
|
-
() => oe.value,
|
|
790
|
-
(e) => {
|
|
791
|
-
I.value = !e;
|
|
792
|
-
}
|
|
793
|
-
);
|
|
794
|
-
function yt() {
|
|
795
|
-
Q.value.showTooltip = !Q.value.showTooltip;
|
|
796
|
-
}
|
|
797
|
-
const uo = d(() => n.value.style.chart.backgroundColor), co = d(() => n.value.style.chart.title), { exportSvg: fo, getSvg: vo } = So({
|
|
798
|
-
svg: ae,
|
|
799
|
-
title: co,
|
|
800
|
-
legend: void 0,
|
|
801
|
-
legendItems: void 0,
|
|
802
|
-
backgroundColor: uo
|
|
803
|
-
});
|
|
804
|
-
async function bt({ isCb: e }) {
|
|
805
|
-
if (e) {
|
|
806
|
-
const { blob: o, url: t, text: r, dataUrl: i } = await vo();
|
|
807
|
-
n.value.userOptions.callbacks.svg({ blob: o, url: t, text: r, dataUrl: i });
|
|
808
|
-
} else
|
|
809
|
-
fo();
|
|
810
|
-
}
|
|
811
|
-
async function ho({ scale: e = 2 } = {}) {
|
|
812
|
-
if (!x.value) return;
|
|
813
|
-
const { width: o, height: t } = x.value.getBoundingClientRect(), r = o / t, { imageUri: i, base64: l } = await Mo({
|
|
814
|
-
domElement: x.value,
|
|
815
|
-
base64: !0,
|
|
816
|
-
img: !0,
|
|
817
|
-
scale: e
|
|
818
|
-
});
|
|
819
|
-
return {
|
|
820
|
-
imageUri: i,
|
|
821
|
-
base64: l,
|
|
822
|
-
title: n.value.style.chart.title.text,
|
|
823
|
-
width: o,
|
|
824
|
-
height: t,
|
|
825
|
-
aspectRatio: r
|
|
826
|
-
};
|
|
827
|
-
}
|
|
828
|
-
const Z = h(!1);
|
|
829
|
-
let U = null;
|
|
830
|
-
function mo() {
|
|
831
|
-
I.value && (Z.value = !0);
|
|
832
|
-
}
|
|
833
|
-
function xe() {
|
|
834
|
-
Z.value = !1;
|
|
835
|
-
}
|
|
836
|
-
function po() {
|
|
837
|
-
I.value && (Z.value = !0, U && clearTimeout(U), U = setTimeout(() => {
|
|
838
|
-
Z.value = !1, U = null;
|
|
839
|
-
}, 140));
|
|
840
|
-
}
|
|
841
|
-
kt(() => {
|
|
842
|
-
U && clearTimeout(U);
|
|
843
|
-
});
|
|
844
|
-
async function Ct([e, o], { animated: t = !0 } = {}) {
|
|
845
|
-
const r = Number(e), i = Number(o);
|
|
846
|
-
if (!Number.isFinite(r) || !Number.isFinite(i)) return;
|
|
847
|
-
const l = X([r, i]), a = l?.[0], c = l?.[1];
|
|
848
|
-
if (!Number.isFinite(a) || !Number.isFinite(c)) return;
|
|
849
|
-
const f = rt({ x: a, y: c }), s = ee.value ? { ...ee.value } : { x: 0, y: 0, width: P.value.width, height: P.value.height }, z = {
|
|
850
|
-
x: f.x - s.width / 2,
|
|
851
|
-
y: f.y - s.height / 2,
|
|
852
|
-
width: s.width,
|
|
853
|
-
height: s.height
|
|
854
|
-
};
|
|
855
|
-
if (!t) {
|
|
856
|
-
ee.value = z;
|
|
857
|
-
return;
|
|
858
|
-
}
|
|
859
|
-
const w = { ...s }, O = { ...z }, u = 250;
|
|
860
|
-
let m = null;
|
|
861
|
-
const C = (v) => {
|
|
862
|
-
m == null && (m = v);
|
|
863
|
-
const p = Math.min((v - m) / u, 1);
|
|
864
|
-
ee.value = {
|
|
865
|
-
x: w.x + (O.x - w.x) * p,
|
|
866
|
-
y: w.y + (O.y - w.y) * p,
|
|
867
|
-
width: w.width + (O.width - w.width) * p,
|
|
868
|
-
height: w.height + (O.height - w.height) * p
|
|
869
|
-
}, p < 1 && requestAnimationFrame(C);
|
|
870
|
-
};
|
|
871
|
-
requestAnimationFrame(C);
|
|
872
|
-
}
|
|
873
|
-
return yo(async () => {
|
|
874
|
-
be(), await re(), requestAnimationFrame(() => {
|
|
875
|
-
j.value || (ue(), (n.value.map.center?.[0] || n.value.map.center?.[1]) && Ct(n.value.map.center, { animated: !1 }));
|
|
876
|
-
});
|
|
877
|
-
}), kt(() => {
|
|
878
|
-
ye();
|
|
879
|
-
}), Rt({
|
|
880
|
-
getImage: ho,
|
|
881
|
-
generatePdf: Ze,
|
|
882
|
-
generateImage: Le,
|
|
883
|
-
generateSvg: bt,
|
|
884
|
-
toggleTooltip: yt,
|
|
885
|
-
toggleAnnotator: Te,
|
|
886
|
-
toggleFullscreen: Me,
|
|
887
|
-
zoomIn: Ae,
|
|
888
|
-
zoomOut: Fe,
|
|
889
|
-
resetZoom: tt,
|
|
890
|
-
focusLocation: Ct
|
|
891
|
-
}), (e, o) => (g(), F("div", {
|
|
892
|
-
class: At(`vue-data-ui-component vue-ui-geo ${M.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${Y.value ? "vue-ui-geo-responsive" : ""} ${Z.value ? "vue-ui-geo-interacting" : ""}`),
|
|
893
|
-
ref_key: "geoChart",
|
|
894
|
-
ref: x,
|
|
895
|
-
id: `map_${R.value}`,
|
|
896
|
-
dir: "auto",
|
|
897
|
-
style: de({
|
|
898
|
-
fontFamily: n.value.style.fontFamily,
|
|
899
|
-
width: "100%",
|
|
900
|
-
backgroundColor: n.value.style.chart.backgroundColor,
|
|
901
|
-
height: Y.value ? `${_.value}px` : void 0
|
|
902
|
-
})
|
|
903
|
-
}, [
|
|
904
|
-
We.value ? (g(), F("div", {
|
|
905
|
-
key: 0,
|
|
906
|
-
ref_key: "noTitle",
|
|
907
|
-
ref: Se,
|
|
908
|
-
class: "vue-data-ui-no-title-space",
|
|
909
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
910
|
-
}, null, 512)) : S("", !0),
|
|
911
|
-
n.value.style.chart.title.text ? (g(), F("div", {
|
|
912
|
-
key: 1,
|
|
913
|
-
ref_key: "chartTitle",
|
|
914
|
-
ref: Ee,
|
|
915
|
-
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
916
|
-
}, [
|
|
917
|
-
(g(), J(zo, {
|
|
918
|
-
key: `title_${Be.value}`,
|
|
919
|
-
config: {
|
|
920
|
-
title: {
|
|
921
|
-
cy: "geo-title",
|
|
922
|
-
...n.value.style.chart.title
|
|
923
|
-
},
|
|
924
|
-
subtitle: {
|
|
925
|
-
cy: "geo-subtitle",
|
|
926
|
-
...n.value.style.chart.title.subtitle
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
}, null, 8, ["config"]))
|
|
930
|
-
], 512)) : S("", !0),
|
|
931
|
-
n.value.userOptions.buttons.annotator ? (g(), J(y(_t), {
|
|
932
|
-
key: 2,
|
|
933
|
-
svgRef: y(ae),
|
|
934
|
-
backgroundColor: n.value.style.chart.backgroundColor,
|
|
935
|
-
color: n.value.style.chart.color,
|
|
936
|
-
active: oe.value,
|
|
937
|
-
onClose: Te
|
|
938
|
-
}, {
|
|
939
|
-
"annotator-action-close": A(() => [
|
|
940
|
-
b(e.$slots, "annotator-action-close", {}, void 0, !0)
|
|
941
|
-
]),
|
|
942
|
-
"annotator-action-color": A(({ color: t }) => [
|
|
943
|
-
b(e.$slots, "annotator-action-color", $(T({ color: t })), void 0, !0)
|
|
944
|
-
]),
|
|
945
|
-
"annotator-action-draw": A(({ mode: t }) => [
|
|
946
|
-
b(e.$slots, "annotator-action-draw", $(T({ mode: t })), void 0, !0)
|
|
947
|
-
]),
|
|
948
|
-
"annotator-action-undo": A(({ disabled: t }) => [
|
|
949
|
-
b(e.$slots, "annotator-action-undo", $(T({ disabled: t })), void 0, !0)
|
|
950
|
-
]),
|
|
951
|
-
"annotator-action-redo": A(({ disabled: t }) => [
|
|
952
|
-
b(e.$slots, "annotator-action-redo", $(T({ disabled: t })), void 0, !0)
|
|
953
|
-
]),
|
|
954
|
-
"annotator-action-delete": A(({ disabled: t }) => [
|
|
955
|
-
b(e.$slots, "annotator-action-delete", $(T({ disabled: t })), void 0, !0)
|
|
956
|
-
]),
|
|
957
|
-
_: 3
|
|
958
|
-
}, 8, ["svgRef", "backgroundColor", "color", "active"])) : S("", !0),
|
|
959
|
-
n.value.userOptions.show && (y(ze) || y(_e)) ? (g(), J(y(Mt), {
|
|
960
|
-
ref: "userOptionsRef",
|
|
961
|
-
key: `user_options_${me.value}`,
|
|
962
|
-
backgroundColor: n.value.style.chart.backgroundColor,
|
|
963
|
-
color: n.value.style.chart.color,
|
|
964
|
-
isPrinting: y(Ge),
|
|
965
|
-
isImaging: y(De),
|
|
966
|
-
uid: R.value,
|
|
967
|
-
hasXls: !1,
|
|
968
|
-
hasTable: !1,
|
|
969
|
-
hasTooltip: n.value.userOptions.buttons.tooltip && n.value.style.chart.tooltip.show,
|
|
970
|
-
hasPdf: n.value.userOptions.buttons.pdf,
|
|
971
|
-
hasImg: n.value.userOptions.buttons.img,
|
|
972
|
-
hasSvg: n.value.userOptions.buttons.svg,
|
|
973
|
-
hasFullscreen: n.value.userOptions.buttons.fullscreen,
|
|
974
|
-
hasAnnotator: n.value.userOptions.buttons.annotator,
|
|
975
|
-
hasZoom: n.value.userOptions.buttons.zoom,
|
|
976
|
-
isZoom: I.value,
|
|
977
|
-
isFullscreen: M.value,
|
|
978
|
-
isTooltip: Q.value.showTooltip,
|
|
979
|
-
titles: { ...n.value.userOptions.buttonTitles },
|
|
980
|
-
chartElement: x.value,
|
|
981
|
-
position: n.value.userOptions.position,
|
|
982
|
-
isAnnotation: oe.value,
|
|
983
|
-
callbacks: n.value.userOptions.callbacks,
|
|
984
|
-
printScale: n.value.userOptions.print.scale,
|
|
985
|
-
onToggleFullscreen: Me,
|
|
986
|
-
onGeneratePdf: y(Ze),
|
|
987
|
-
onGenerateImage: y(Le),
|
|
988
|
-
onGenerateSvg: bt,
|
|
989
|
-
onToggleTooltip: yt,
|
|
990
|
-
onToggleAnnotator: Te,
|
|
991
|
-
onToggleZoom: ro,
|
|
992
|
-
style: de({
|
|
993
|
-
visibility: y(ze) ? y(_e) ? "visible" : "hidden" : "visible"
|
|
994
|
-
})
|
|
995
|
-
}, bo({ _: 2 }, [
|
|
996
|
-
e.$slots.menuIcon ? {
|
|
997
|
-
name: "menuIcon",
|
|
998
|
-
fn: A(({ isOpen: t, color: r }) => [
|
|
999
|
-
b(e.$slots, "menuIcon", $(T({ isOpen: t, color: r })), void 0, !0)
|
|
1000
|
-
]),
|
|
1001
|
-
key: "0"
|
|
1002
|
-
} : void 0,
|
|
1003
|
-
e.$slots.optionTooltip ? {
|
|
1004
|
-
name: "optionTooltip",
|
|
1005
|
-
fn: A(() => [
|
|
1006
|
-
b(e.$slots, "optionTooltip", {}, void 0, !0)
|
|
1007
|
-
]),
|
|
1008
|
-
key: "1"
|
|
1009
|
-
} : void 0,
|
|
1010
|
-
e.$slots.optionPdf ? {
|
|
1011
|
-
name: "optionPdf",
|
|
1012
|
-
fn: A(() => [
|
|
1013
|
-
b(e.$slots, "optionPdf", {}, void 0, !0)
|
|
1014
|
-
]),
|
|
1015
|
-
key: "2"
|
|
1016
|
-
} : void 0,
|
|
1017
|
-
e.$slots.optionImg ? {
|
|
1018
|
-
name: "optionImg",
|
|
1019
|
-
fn: A(() => [
|
|
1020
|
-
b(e.$slots, "optionImg", {}, void 0, !0)
|
|
1021
|
-
]),
|
|
1022
|
-
key: "3"
|
|
1023
|
-
} : void 0,
|
|
1024
|
-
e.$slots.optionSvg ? {
|
|
1025
|
-
name: "optionSvg",
|
|
1026
|
-
fn: A(() => [
|
|
1027
|
-
b(e.$slots, "optionSvg", {}, void 0, !0)
|
|
1028
|
-
]),
|
|
1029
|
-
key: "4"
|
|
1030
|
-
} : void 0,
|
|
1031
|
-
e.$slots.optionFullscreen ? {
|
|
1032
|
-
name: "optionFullscreen",
|
|
1033
|
-
fn: A(({ toggleFullscreen: t, isFullscreen: r }) => [
|
|
1034
|
-
b(e.$slots, "optionFullscreen", $(T({ toggleFullscreen: t, isFullscreen: r })), void 0, !0)
|
|
1035
|
-
]),
|
|
1036
|
-
key: "5"
|
|
1037
|
-
} : void 0,
|
|
1038
|
-
e.$slots.optionAnnotator ? {
|
|
1039
|
-
name: "optionAnnotator",
|
|
1040
|
-
fn: A(({ toggleAnnotator: t, isAnnotator: r }) => [
|
|
1041
|
-
b(e.$slots, "optionAnnotator", $(T({ toggleAnnotator: t, isAnnotator: r })), void 0, !0)
|
|
1042
|
-
]),
|
|
1043
|
-
key: "6"
|
|
1044
|
-
} : void 0,
|
|
1045
|
-
e.$slots.optionZoom ? {
|
|
1046
|
-
name: "optionZoom",
|
|
1047
|
-
fn: A(({ toggleZoom: t, isZoomLocked: r }) => [
|
|
1048
|
-
b(e.$slots, "optionZoom", $(T({ toggleZoom: t, isZoomLocked: r })), void 0, !0)
|
|
1049
|
-
]),
|
|
1050
|
-
key: "7"
|
|
1051
|
-
} : void 0
|
|
1052
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasFullscreen", "hasAnnotator", "hasZoom", "isZoom", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : S("", !0),
|
|
1053
|
-
n.value.style.chart.controls.position === "top" && n.value.style.chart.controls.show && !y(ge) ? (g(), J(Nt, {
|
|
1054
|
-
key: 4,
|
|
1055
|
-
ref_key: "zoomControlsTop",
|
|
1056
|
-
ref: Re,
|
|
1057
|
-
config: n.value,
|
|
1058
|
-
scale: y(ot),
|
|
1059
|
-
isFullscreen: M.value,
|
|
1060
|
-
onZoomIn: Ae,
|
|
1061
|
-
onZoomOut: Fe,
|
|
1062
|
-
onResetZoom: at
|
|
1063
|
-
}, null, 8, ["config", "scale", "isFullscreen"])) : S("", !0),
|
|
1064
|
-
(g(), F("svg", {
|
|
1065
|
-
ref_key: "svgRef",
|
|
1066
|
-
ref: ae,
|
|
1067
|
-
xmlns: y(No),
|
|
1068
|
-
viewBox: lt.value,
|
|
1069
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
1070
|
-
style: de({
|
|
1071
|
-
display: "block",
|
|
1072
|
-
width: "100%",
|
|
1073
|
-
height: Y.value ? `${_.value}px` : "auto",
|
|
1074
|
-
background: n.value.style.chart.backgroundColor,
|
|
1075
|
-
touchAction: I.value ? "none" : "auto",
|
|
1076
|
-
cursor: I.value ? Z.value ? "grabbing" : "grab" : "default"
|
|
1077
|
-
}),
|
|
1078
|
-
id: `vue-ui-geo_${R.value}`,
|
|
1079
|
-
onPointerdown: mo,
|
|
1080
|
-
onPointerup: xe,
|
|
1081
|
-
onPointercancel: xe,
|
|
1082
|
-
onPointerleave: xe,
|
|
1083
|
-
onWheel: po
|
|
1084
|
-
}, [
|
|
1085
|
-
Ft(y(zt)),
|
|
1086
|
-
ie("g", {
|
|
1087
|
-
transform: et.value.transform,
|
|
1088
|
-
style: de({ pointerEvents: Z.value ? "none" : "auto" })
|
|
1089
|
-
}, [
|
|
1090
|
-
ie("g", null, [
|
|
1091
|
-
(g(!0), F(ve, null, he(Ve.value, (t) => (g(), F("path", {
|
|
1092
|
-
class: "vue-ui-geo-territory",
|
|
1093
|
-
key: t.uid,
|
|
1094
|
-
d: t.path,
|
|
1095
|
-
fill: N.value === t.uid ? B.value.hover.fill : B.value.fill,
|
|
1096
|
-
stroke: N.value === t.uid ? B.value.hover.stroke : B.value.stroke,
|
|
1097
|
-
"stroke-width": N.value === t.uid ? B.value.hover.strokeWidth : B.value.strokeWidth,
|
|
1098
|
-
"vector-effect": "non-scaling-stroke",
|
|
1099
|
-
onMouseenter: (r) => ft(t),
|
|
1100
|
-
onMouseleave: (r) => dt(t),
|
|
1101
|
-
onClick: (r) => vt(t)
|
|
1102
|
-
}, null, 40, Wo))), 128))
|
|
1103
|
-
]),
|
|
1104
|
-
ie("g", null, [
|
|
1105
|
-
(g(!0), F(ve, null, he(Je.value, (t) => (g(), F("path", {
|
|
1106
|
-
class: "vue-ui-geo-territory",
|
|
1107
|
-
key: t.uid,
|
|
1108
|
-
d: t.path,
|
|
1109
|
-
fill: "none",
|
|
1110
|
-
stroke: N.value === t.uid ? B.value.hover.stroke : B.value.stroke,
|
|
1111
|
-
"stroke-width": N.value === t.uid ? B.value.hover.strokeWidth : B.value.strokeWidth,
|
|
1112
|
-
"vector-effect": "non-scaling-stroke",
|
|
1113
|
-
onMouseenter: (r) => ft(t),
|
|
1114
|
-
onMouseleave: (r) => dt(t),
|
|
1115
|
-
onClick: (r) => vt(t)
|
|
1116
|
-
}, null, 40, Yo))), 128))
|
|
1117
|
-
]),
|
|
1118
|
-
ie("g", null, [
|
|
1119
|
-
(g(!0), F(ve, null, he(Ke.value, (t) => (g(), F("circle", {
|
|
1120
|
-
key: t.uid,
|
|
1121
|
-
cx: t.x,
|
|
1122
|
-
cy: t.y,
|
|
1123
|
-
r: H.value.radius,
|
|
1124
|
-
fill: H.value.fill,
|
|
1125
|
-
stroke: H.value.stroke,
|
|
1126
|
-
"stroke-width": H.value.strokeWidth,
|
|
1127
|
-
"vector-effect": "non-scaling-stroke",
|
|
1128
|
-
onMouseenter: (r) => ao(t),
|
|
1129
|
-
onMouseleave: (r) => so(t)
|
|
1130
|
-
}, null, 40, qo))), 128))
|
|
1131
|
-
]),
|
|
1132
|
-
(g(!0), F(ve, null, he(ut.value, (t) => (g(), F("g", {
|
|
1133
|
-
key: t.uid
|
|
1134
|
-
}, [
|
|
1135
|
-
b(e.$slots, "datapoint", Co({ ref_for: !0 }, {
|
|
1136
|
-
point: t,
|
|
1137
|
-
onPointEnter: ht,
|
|
1138
|
-
onPointLeave: mt,
|
|
1139
|
-
onPointClick: gt,
|
|
1140
|
-
highlighted: te.value === t.uid
|
|
1141
|
-
}), () => [
|
|
1142
|
-
ie("circle", {
|
|
1143
|
-
class: At({
|
|
1144
|
-
"vue-ui-geo-point": !0,
|
|
1145
|
-
"vue-ui-geo-point-with-event": pt.value
|
|
1146
|
-
}),
|
|
1147
|
-
cx: t.x,
|
|
1148
|
-
cy: t.y,
|
|
1149
|
-
r: te.value === t.uid ? t.radius * t.hoverRadiusRatio : t.radius,
|
|
1150
|
-
fill: t.fill,
|
|
1151
|
-
stroke: H.value.stroke,
|
|
1152
|
-
"stroke-width": H.value.strokeWidth,
|
|
1153
|
-
"vector-effect": "non-scaling-stroke",
|
|
1154
|
-
onMouseenter: (r) => ht(t),
|
|
1155
|
-
onMouseleave: (r) => mt(t),
|
|
1156
|
-
onClick: (r) => gt(t)
|
|
1157
|
-
}, null, 42, Xo)
|
|
1158
|
-
], !0),
|
|
1159
|
-
n.value.style.chart.points.labels.show ? (g(), F("text", {
|
|
1160
|
-
key: 0,
|
|
1161
|
-
class: "vue-ui-geo-point-label",
|
|
1162
|
-
x: t.x,
|
|
1163
|
-
y: t.y + (te.value === t.uid ? t.radius * t.hoverRadiusRatio : t.radius) + n.value.style.chart.points.labels.offsetY + 1 * n.value.style.chart.points.labels.fontSizeRatio,
|
|
1164
|
-
"text-anchor": "middle",
|
|
1165
|
-
fill: n.value.style.chart.points.labels.color,
|
|
1166
|
-
"font-size": 1 * n.value.style.chart.points.labels.fontSizeRatio
|
|
1167
|
-
}, ko(t.name), 9, Ho)) : S("", !0)
|
|
1168
|
-
]))), 128))
|
|
1169
|
-
], 12, Lo),
|
|
1170
|
-
b(e.$slots, "svg", {
|
|
1171
|
-
svg: {
|
|
1172
|
-
drawingArea: lt.value,
|
|
1173
|
-
data: {
|
|
1174
|
-
areaPaths: Ve.value,
|
|
1175
|
-
linePaths: Je.value,
|
|
1176
|
-
geoJsonPoints: Ke.value,
|
|
1177
|
-
projectedPoints: ut.value
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
}, void 0, !0)
|
|
1181
|
-
], 44, Zo)),
|
|
1182
|
-
e.$slots.watermark ? (g(), F("div", Uo, [
|
|
1183
|
-
b(e.$slots, "watermark", $(T({ isPrinting: y(Ge) || y(De) })), void 0, !0)
|
|
1184
|
-
])) : S("", !0),
|
|
1185
|
-
n.value.style.chart.controls.position === "bottom" && n.value.style.chart.controls.show && !y(ge) ? (g(), J(Nt, {
|
|
1186
|
-
key: 6,
|
|
1187
|
-
ref_key: "zoomControlsBottom",
|
|
1188
|
-
ref: je,
|
|
1189
|
-
config: n.value,
|
|
1190
|
-
scale: y(ot),
|
|
1191
|
-
isFullscreen: M.value,
|
|
1192
|
-
onZoomIn: Ae,
|
|
1193
|
-
onZoomOut: Fe,
|
|
1194
|
-
onResetZoom: at
|
|
1195
|
-
}, null, 8, ["config", "scale", "isFullscreen"])) : S("", !0),
|
|
1196
|
-
Ft(y(jt), {
|
|
1197
|
-
show: Q.value.showTooltip && we.value,
|
|
1198
|
-
backgroundColor: n.value.style.chart.tooltip.backgroundColor,
|
|
1199
|
-
color: n.value.style.chart.tooltip.color,
|
|
1200
|
-
fontSize: n.value.style.chart.tooltip.fontSize,
|
|
1201
|
-
borderRadius: n.value.style.chart.tooltip.borderRadius,
|
|
1202
|
-
borderColor: n.value.style.chart.tooltip.borderColor,
|
|
1203
|
-
borderWidth: n.value.style.chart.tooltip.borderWidth,
|
|
1204
|
-
backgroundOpacity: n.value.style.chart.tooltip.backgroundOpacity,
|
|
1205
|
-
position: n.value.style.chart.tooltip.position,
|
|
1206
|
-
offsetY: n.value.style.chart.tooltip.offsetY,
|
|
1207
|
-
parent: x.value,
|
|
1208
|
-
content: Ne.value,
|
|
1209
|
-
isCustom: D.value,
|
|
1210
|
-
isFullscreen: M.value,
|
|
1211
|
-
smooth: n.value.style.chart.tooltip.smooth,
|
|
1212
|
-
backdropFilter: n.value.style.chart.tooltip.backdropFilter,
|
|
1213
|
-
smoothForce: n.value.style.chart.tooltip.smoothForce,
|
|
1214
|
-
smoothSnapThreshold: n.value.style.chart.tooltip.smoothSnapThreshold
|
|
1215
|
-
}, {
|
|
1216
|
-
"tooltip-before": A(() => [
|
|
1217
|
-
b(e.$slots, "tooltip-before", $(T({ ...le.value })), void 0, !0)
|
|
1218
|
-
]),
|
|
1219
|
-
"tooltip-after": A(() => [
|
|
1220
|
-
b(e.$slots, "tooltip-after", $(T({ ...le.value })), void 0, !0)
|
|
1221
|
-
]),
|
|
1222
|
-
_: 3
|
|
1223
|
-
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
|
|
1224
|
-
e.$slots.source ? (g(), F("div", {
|
|
1225
|
-
key: 7,
|
|
1226
|
-
ref_key: "source",
|
|
1227
|
-
ref: Oe,
|
|
1228
|
-
dir: "auto"
|
|
1229
|
-
}, [
|
|
1230
|
-
b(e.$slots, "source", {}, void 0, !0)
|
|
1231
|
-
], 512)) : S("", !0),
|
|
1232
|
-
y(ge) ? (g(), J(Bo, { key: 8 })) : S("", !0)
|
|
1233
|
-
], 14, Do));
|
|
1234
|
-
}
|
|
1235
|
-
}, Jo = /* @__PURE__ */ Go(Vo, [["__scopeId", "data-v-ecbb1dee"]]), pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1236
|
-
__proto__: null,
|
|
1237
|
-
default: Jo
|
|
1238
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
1239
|
-
export {
|
|
1240
|
-
mn as a,
|
|
1241
|
-
pn as b,
|
|
1242
|
-
Jo as v
|
|
1243
|
-
};
|