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