vue-data-ui 3.19.9 → 3.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +120 -120
- package/dist/A11yDataTable-q2-8fSlJ.js +0 -45
- package/dist/Arrow-Cj6W6Xbi.js +0 -116
- package/dist/BaseDraggableDialog-DUUu2E2Q.js +0 -272
- package/dist/BaseIcon-DM1x8hQF.js +0 -502
- package/dist/BaseLegendToggle-CJTwLGXL.js +0 -56
- package/dist/BaseScanner-C7dmAref.js +0 -27
- package/dist/BaseZoomControls-BkajQ8q9.js +0 -111
- package/dist/ColorPicker-DTQeqKUV.js +0 -255
- package/dist/DataTable-DmE8Oo4i.js +0 -150
- package/dist/Legend-Gg5Q4Clb.js +0 -114
- package/dist/NonSvgPenAndPaper-tvWXeCsd.js +0 -577
- package/dist/PackageVersion-Dl9W5zJD.js +0 -11
- package/dist/PenAndPaper-DNgm6y3l.js +0 -461
- package/dist/RecursiveCircles-DPpLel6f.js +0 -117
- package/dist/RecursiveLabels-DBMJf_to.js +0 -56
- package/dist/RecursiveLinks-D06dBL4a.js +0 -78
- package/dist/Shape-DEGOZ6GG.js +0 -141
- package/dist/Slicer-CPWGgGSp.js +0 -1144
- package/dist/SlicerPreview-BU3ZeHjR.js +0 -1555
- package/dist/SparkTooltip-c2DL7gqD.js +0 -93
- package/dist/Title-__gWq2g6.js +0 -87
- package/dist/Tooltip-CuWEYGr3.js +0 -312
- package/dist/UserOptions-D7zR0tnR.js +0 -1411
- package/dist/_plugin-vue_export-helper-Dq1MygBL.js +0 -8
- package/dist/canvas-lib-DTaADQOK.js +0 -79
- package/dist/components/arrow.js +0 -2
- package/dist/components/vue-ui-3d-bar.js +0 -2
- package/dist/components/vue-ui-accordion.js +0 -2
- package/dist/components/vue-ui-age-pyramid.js +0 -2
- package/dist/components/vue-ui-annotator.js +0 -2
- package/dist/components/vue-ui-bullet.js +0 -2
- package/dist/components/vue-ui-bump.js +0 -2
- package/dist/components/vue-ui-candlestick.js +0 -2
- package/dist/components/vue-ui-carousel-table.js +0 -2
- package/dist/components/vue-ui-chestnut.js +0 -2
- package/dist/components/vue-ui-chord.js +0 -2
- package/dist/components/vue-ui-circle-pack.js +0 -2
- package/dist/components/vue-ui-cursor.js +0 -2
- package/dist/components/vue-ui-dag.js +0 -2
- package/dist/components/vue-ui-dashboard.js +0 -2
- package/dist/components/vue-ui-digits.js +0 -2
- package/dist/components/vue-ui-donut-evolution.js +0 -2
- package/dist/components/vue-ui-donut.js +0 -2
- package/dist/components/vue-ui-dumbbell.js +0 -2
- package/dist/components/vue-ui-flow.js +0 -2
- package/dist/components/vue-ui-funnel.js +0 -2
- package/dist/components/vue-ui-galaxy.js +0 -2
- package/dist/components/vue-ui-gauge.js +0 -2
- package/dist/components/vue-ui-geo.js +0 -2
- package/dist/components/vue-ui-gizmo.js +0 -2
- package/dist/components/vue-ui-heatmap.js +0 -2
- package/dist/components/vue-ui-history-plot.js +0 -2
- package/dist/components/vue-ui-horizontal-bar.js +0 -2
- package/dist/components/vue-ui-icon.js +0 -2
- package/dist/components/vue-ui-kpi.js +0 -2
- package/dist/components/vue-ui-mini-loader.js +0 -2
- package/dist/components/vue-ui-molecule.js +0 -2
- package/dist/components/vue-ui-mood-radar.js +0 -2
- package/dist/components/vue-ui-nested-donuts.js +0 -2
- package/dist/components/vue-ui-onion.js +0 -2
- package/dist/components/vue-ui-parallel-coordinate-plot.js +0 -2
- package/dist/components/vue-ui-pattern-seed.js +0 -2
- package/dist/components/vue-ui-pattern.js +0 -2
- package/dist/components/vue-ui-quadrant.js +0 -2
- package/dist/components/vue-ui-quick-chart.js +0 -2
- package/dist/components/vue-ui-radar.js +0 -2
- package/dist/components/vue-ui-rating.js +0 -2
- package/dist/components/vue-ui-relation-circle.js +0 -2
- package/dist/components/vue-ui-ridgeline.js +0 -2
- package/dist/components/vue-ui-rings.js +0 -2
- package/dist/components/vue-ui-scatter.js +0 -2
- package/dist/components/vue-ui-skeleton.js +0 -2
- package/dist/components/vue-ui-smiley.js +0 -2
- package/dist/components/vue-ui-spark-trend.js +0 -2
- package/dist/components/vue-ui-sparkbar.js +0 -2
- package/dist/components/vue-ui-sparkgauge.js +0 -2
- package/dist/components/vue-ui-sparkhistogram.js +0 -2
- package/dist/components/vue-ui-sparkline.js +0 -2
- package/dist/components/vue-ui-sparkstackbar.js +0 -2
- package/dist/components/vue-ui-stackbar.js +0 -2
- package/dist/components/vue-ui-stackline.js +0 -2
- package/dist/components/vue-ui-strip-plot.js +0 -2
- package/dist/components/vue-ui-table-heatmap.js +0 -2
- package/dist/components/vue-ui-table-sparkline.js +0 -2
- package/dist/components/vue-ui-table.js +0 -2
- package/dist/components/vue-ui-thermometer.js +0 -2
- package/dist/components/vue-ui-timer.js +0 -2
- package/dist/components/vue-ui-tiremarks.js +0 -2
- package/dist/components/vue-ui-treemap.js +0 -2
- package/dist/components/vue-ui-vertical-bar.js +0 -2
- package/dist/components/vue-ui-waffle.js +0 -2
- package/dist/components/vue-ui-wheel.js +0 -2
- package/dist/components/vue-ui-word-cloud.js +0 -2
- package/dist/components/vue-ui-world.js +0 -2
- package/dist/components/vue-ui-xy-canvas.js +0 -2
- package/dist/components/vue-ui-xy.js +0 -2
- package/dist/dom-to-png-9WSt6hXe.js +0 -237
- package/dist/exposedLib-CwWU4zv-.js +0 -19
- package/dist/geoProjections-CQIkC70z.js +0 -146
- package/dist/img-BjOr008R.js +0 -74
- package/dist/labelUtils-Cr97N8E1.js +0 -19
- package/dist/lib-BkiwukKO.js +0 -1879
- package/dist/llms.txt +0 -232
- package/dist/patternUtils-B7BWu5bV.js +0 -258
- package/dist/pdf-DSXSFUnK.js +0 -90
- package/dist/rolldown-runtime-CAFD8bLK.js +0 -11
- package/dist/style.css +0 -2
- package/dist/types/arrow.d.ts +0 -4
- package/dist/types/utils.d.ts +0 -551
- package/dist/types/vue-data-ui.d.ts +0 -15826
- package/dist/types/vue-ui-3d-bar.d.ts +0 -78
- package/dist/types/vue-ui-accordion.d.ts +0 -11
- package/dist/types/vue-ui-age-pyramid.d.ts +0 -95
- package/dist/types/vue-ui-annotator.d.ts +0 -12
- package/dist/types/vue-ui-bullet.d.ts +0 -72
- package/dist/types/vue-ui-bump.d.ts +0 -77
- package/dist/types/vue-ui-candlestick.d.ts +0 -93
- package/dist/types/vue-ui-carousel-table.d.ts +0 -46
- package/dist/types/vue-ui-chestnut.d.ts +0 -79
- package/dist/types/vue-ui-chord.d.ts +0 -91
- package/dist/types/vue-ui-circle-pack.d.ts +0 -111
- package/dist/types/vue-ui-cursor.d.ts +0 -9
- package/dist/types/vue-ui-dag.d.ts +0 -106
- package/dist/types/vue-ui-dashboard.d.ts +0 -53
- package/dist/types/vue-ui-digits.d.ts +0 -12
- package/dist/types/vue-ui-donut-evolution.d.ts +0 -81
- package/dist/types/vue-ui-donut.d.ts +0 -106
- package/dist/types/vue-ui-dumbbell.d.ts +0 -79
- package/dist/types/vue-ui-flow.d.ts +0 -93
- package/dist/types/vue-ui-funnel.d.ts +0 -66
- package/dist/types/vue-ui-galaxy.d.ts +0 -97
- package/dist/types/vue-ui-gauge.d.ts +0 -76
- package/dist/types/vue-ui-geo.d.ts +0 -81
- package/dist/types/vue-ui-gizmo.d.ts +0 -22
- package/dist/types/vue-ui-heatmap.d.ts +0 -86
- package/dist/types/vue-ui-history-plot.d.ts +0 -97
- package/dist/types/vue-ui-horizontal-bar.d.ts +0 -99
- package/dist/types/vue-ui-icon.d.ts +0 -15
- package/dist/types/vue-ui-kpi.d.ts +0 -25
- package/dist/types/vue-ui-mini-loader.d.ts +0 -15
- package/dist/types/vue-ui-molecule.d.ts +0 -97
- package/dist/types/vue-ui-mood-radar.d.ts +0 -79
- package/dist/types/vue-ui-nested-donuts.d.ts +0 -94
- package/dist/types/vue-ui-onion.d.ts +0 -91
- package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +0 -108
- package/dist/types/vue-ui-pattern-seed.d.ts +0 -14
- package/dist/types/vue-ui-pattern.d.ts +0 -15
- package/dist/types/vue-ui-quadrant.d.ts +0 -102
- package/dist/types/vue-ui-quick-chart.d.ts +0 -89
- package/dist/types/vue-ui-radar.d.ts +0 -101
- package/dist/types/vue-ui-rating.d.ts +0 -31
- package/dist/types/vue-ui-relation-circle.d.ts +0 -79
- package/dist/types/vue-ui-ridgeline.d.ts +0 -85
- package/dist/types/vue-ui-rings.d.ts +0 -83
- package/dist/types/vue-ui-scatter.d.ts +0 -82
- package/dist/types/vue-ui-skeleton.d.ts +0 -11
- package/dist/types/vue-ui-smiley.d.ts +0 -12
- package/dist/types/vue-ui-spark-trend.d.ts +0 -19
- package/dist/types/vue-ui-sparkbar.d.ts +0 -36
- package/dist/types/vue-ui-sparkgauge.d.ts +0 -28
- package/dist/types/vue-ui-sparkhistogram.d.ts +0 -33
- package/dist/types/vue-ui-sparkline.d.ts +0 -44
- package/dist/types/vue-ui-sparkstackbar.d.ts +0 -45
- package/dist/types/vue-ui-stackbar.d.ts +0 -97
- package/dist/types/vue-ui-stackline.d.ts +0 -93
- package/dist/types/vue-ui-strip-plot.d.ts +0 -81
- package/dist/types/vue-ui-table-heatmap.d.ts +0 -62
- package/dist/types/vue-ui-table-sparkline.d.ts +0 -40
- package/dist/types/vue-ui-table.d.ts +0 -25
- package/dist/types/vue-ui-thermometer.d.ts +0 -57
- package/dist/types/vue-ui-timer.d.ts +0 -36
- package/dist/types/vue-ui-tiremarks.d.ts +0 -57
- package/dist/types/vue-ui-treemap.d.ts +0 -87
- package/dist/types/vue-ui-vertical-bar.d.ts +0 -22
- package/dist/types/vue-ui-waffle.d.ts +0 -86
- package/dist/types/vue-ui-wheel.d.ts +0 -57
- package/dist/types/vue-ui-word-cloud.d.ts +0 -84
- package/dist/types/vue-ui-world.d.ts +0 -81
- package/dist/types/vue-ui-xy-canvas.d.ts +0 -84
- package/dist/types/vue-ui-xy.d.ts +0 -125
- package/dist/useAutoSizeLabelsInsideViewbox-dp-3Gg97.js +0 -50
- package/dist/useChartAccessibility-Do37qcw2.js +0 -12
- package/dist/useConfig-ByaaSKhz.js +0 -7471
- package/dist/useFitSvgText-C-MEdAfe.js +0 -63
- package/dist/useNestedProp-Ck4hsrpu.js +0 -10
- package/dist/useObjectBindings-BR1sGimd.js +0 -189
- package/dist/usePanZoom-B-4M_gmY.js +0 -157
- package/dist/usePrefersMotion-BywLbIko.js +0 -15
- package/dist/usePrinter-X0yWOynH.js +0 -49
- package/dist/useResponsive-CrAInupd.js +0 -19
- package/dist/useStableElementSize-0I1IpHPl.js +0 -77
- package/dist/useSvgExport-Dtu973wa.js +0 -755
- package/dist/useTableResponsive-DrM1xqII.js +0 -24
- package/dist/useThemeCheck-rFK9Zlb_.js +0 -24
- package/dist/useTimeLabelCollider-Dm55Emzg.js +0 -57
- package/dist/useTimeLabels-C0x7zUXP.js +0 -272
- package/dist/useUserOptionState-CjPJPTg2.js +0 -15
- package/dist/utils.js +0 -28
- package/dist/vClickOutside-CbX_bC9A.js +0 -13
- package/dist/vue-data-ui-nsosW-n5.js +0 -274
- package/dist/vue-data-ui.js +0 -76
- package/dist/vue-ui-3d-bar-CTvvvgBE.js +0 -1757
- package/dist/vue-ui-accordion-BX9WL-QF.js +0 -81
- package/dist/vue-ui-age-pyramid-ckZtLlmH.js +0 -1238
- package/dist/vue-ui-annotator-Be3VpH8Z.js +0 -2899
- package/dist/vue-ui-bullet-3CkhGOSb.js +0 -710
- package/dist/vue-ui-bump-LQuPTOlm.js +0 -1249
- package/dist/vue-ui-candlestick-BeO06tlH.js +0 -1826
- package/dist/vue-ui-carousel-table-nZJ1k6se.js +0 -455
- package/dist/vue-ui-chestnut-BWItE1hg.js +0 -2010
- package/dist/vue-ui-chord-YflKRyWK.js +0 -1391
- package/dist/vue-ui-circle-pack-DyTYvEg3.js +0 -1608
- package/dist/vue-ui-cursor-C5_wkWul.js +0 -283
- package/dist/vue-ui-dag-mH0baWM3.js +0 -2909
- package/dist/vue-ui-dashboard-F7pEuJDh.js +0 -513
- package/dist/vue-ui-digits-BYBtwXy_.js +0 -209
- package/dist/vue-ui-donut-B3L7jeHL.js +0 -2410
- package/dist/vue-ui-donut-evolution-C46h0gLy.js +0 -1510
- package/dist/vue-ui-dumbbell-xekp1obI.js +0 -1527
- package/dist/vue-ui-flow-BYYyk5KL.js +0 -1235
- package/dist/vue-ui-funnel-BfY509t-.js +0 -777
- package/dist/vue-ui-galaxy-D061gTYS.js +0 -1077
- package/dist/vue-ui-gauge-BRxZNBBS.js +0 -920
- package/dist/vue-ui-geo-BwOMFUVr.js +0 -1516
- package/dist/vue-ui-gizmo-CQsP8Nd3.js +0 -225
- package/dist/vue-ui-heatmap-DOsulVoP.js +0 -1568
- package/dist/vue-ui-history-plot-CXW6lF42.js +0 -1559
- package/dist/vue-ui-horizontal-bar-CideXtlg.js +0 -1681
- package/dist/vue-ui-kpi-CE-JFZ1o.js +0 -96
- package/dist/vue-ui-mini-loader-DDJUya9e.js +0 -125
- package/dist/vue-ui-molecule-B1Prm5Lk.js +0 -925
- package/dist/vue-ui-mood-radar-B29gVcTN.js +0 -1148
- package/dist/vue-ui-nested-donuts-Bsx5f9Gv.js +0 -1487
- package/dist/vue-ui-onion-MN-PjNJq.js +0 -1200
- package/dist/vue-ui-parallel-coordinate-plot-C9zU7MP5.js +0 -1421
- package/dist/vue-ui-pattern-Bj-IPFr2.js +0 -154
- package/dist/vue-ui-pattern-seed-abRweCDE.js +0 -61
- package/dist/vue-ui-quadrant-h-QFG9O4.js +0 -1978
- package/dist/vue-ui-quick-chart-PAVz4c9z.js +0 -2469
- package/dist/vue-ui-radar-D2pVd53z.js +0 -1229
- package/dist/vue-ui-rating-D_QR_A3V.js +0 -343
- package/dist/vue-ui-relation-circle-BjB0J53V.js +0 -924
- package/dist/vue-ui-ridgeline-DamvqiyJ.js +0 -1622
- package/dist/vue-ui-rings-DkHS5dwd.js +0 -1246
- package/dist/vue-ui-scatter-dFDowCVQ.js +0 -2413
- package/dist/vue-ui-skeleton-zhkS1cmh.js +0 -2556
- package/dist/vue-ui-smiley-rFdGxZK6.js +0 -356
- package/dist/vue-ui-spark-trend-fQ10-UvM.js +0 -438
- package/dist/vue-ui-sparkbar-D5toou8V.js +0 -393
- package/dist/vue-ui-sparkgauge-DRZcIPYf.js +0 -255
- package/dist/vue-ui-sparkhistogram-YizEqFdN.js +0 -560
- package/dist/vue-ui-sparkline-w2nclIW0.js +0 -1507
- package/dist/vue-ui-sparkstackbar-CTShNXhW.js +0 -662
- package/dist/vue-ui-stackbar-BFLCEsRk.js +0 -2267
- package/dist/vue-ui-stackline-CU6s-hhv.js +0 -2395
- package/dist/vue-ui-strip-plot-ByaDLFSL.js +0 -1340
- package/dist/vue-ui-table-DuA_CfGn.js +0 -1338
- package/dist/vue-ui-table-heatmap-BFKyJTr1.js +0 -344
- package/dist/vue-ui-table-sparkline-Dfei_QrJ.js +0 -707
- package/dist/vue-ui-thermometer-biw3ivMI.js +0 -763
- package/dist/vue-ui-timer-9LNNDl4q.js +0 -439
- package/dist/vue-ui-tiremarks-kF0Baqia.js +0 -552
- package/dist/vue-ui-treemap-BexKMBhz.js +0 -1587
- package/dist/vue-ui-waffle-Dq50j_uw.js +0 -1362
- package/dist/vue-ui-wheel-BETHlWsO.js +0 -885
- package/dist/vue-ui-word-cloud-D1AQtzmT.js +0 -1656
- package/dist/vue-ui-world-CcgbuSp_.js +0 -14264
- package/dist/vue-ui-xy-BQ1YONCq.js +0 -4219
- package/dist/vue-ui-xy-canvas-4ABYnasj.js +0 -1786
- package/dist/vue_ui_3d_bar-CXKqO5Ej.js +0 -185
- package/dist/vue_ui_age_pyramid-BON8QI6X.js +0 -301
- package/dist/vue_ui_bullet-CE5sFT7u.js +0 -186
- package/dist/vue_ui_bump-frnXaXul.js +0 -201
- package/dist/vue_ui_candlestick-sY6UtOop.js +0 -374
- package/dist/vue_ui_chestnut-BiUZFv40.js +0 -305
- package/dist/vue_ui_chord-DpyR_b9A.js +0 -275
- package/dist/vue_ui_circle_pack-FjH0ZQeb.js +0 -172
- package/dist/vue_ui_dag-Ci_MOnvd.js +0 -258
- package/dist/vue_ui_donut-Cx2_BGcQ.js +0 -358
- package/dist/vue_ui_donut_evolution-CAJefrHs.js +0 -717
- package/dist/vue_ui_dumbbell-CClzAZTN.js +0 -304
- package/dist/vue_ui_flow-CCHO1Lo9.js +0 -238
- package/dist/vue_ui_funnel-h8q2mRpC.js +0 -234
- package/dist/vue_ui_galaxy-70vtkEBw.js +0 -265
- package/dist/vue_ui_gauge-C17CgfzN.js +0 -178
- package/dist/vue_ui_geo-C0UbQ0Lc.js +0 -248
- package/dist/vue_ui_heatmap-BqPP3J4M.js +0 -319
- package/dist/vue_ui_history_plot-C5nytDHh.js +0 -413
- package/dist/vue_ui_horizontal_bar-Bqxorkc_.js +0 -341
- package/dist/vue_ui_molecule-Dka4JBOp.js +0 -231
- package/dist/vue_ui_mood_radar-Dg4ijm53.js +0 -281
- package/dist/vue_ui_nested_donuts-BY9cOoHF.js +0 -273
- package/dist/vue_ui_onion-DTV9cup-.js +0 -293
- package/dist/vue_ui_parallel_coordinate_plot-CNWrDh96.js +0 -278
- package/dist/vue_ui_quadrant-3kjYvxpj.js +0 -428
- package/dist/vue_ui_quick_chart--VaYQuM4.js +0 -139
- package/dist/vue_ui_radar-Dxx9GJmj.js +0 -306
- package/dist/vue_ui_relation_circle-Cr0I2SoU.js +0 -98
- package/dist/vue_ui_ridgeline-CAtYca4b.js +0 -767
- package/dist/vue_ui_rings-DXC1VeX5.js +0 -320
- package/dist/vue_ui_scatter-D2S2j0ap.js +0 -479
- package/dist/vue_ui_spark_trend-BHMQ6_1p.js +0 -82
- package/dist/vue_ui_sparkbar-BR6hbuDE.js +0 -64
- package/dist/vue_ui_sparkgauge-xfPRHnMv.js +0 -90
- package/dist/vue_ui_sparkhistogram-CJRENZ1C.js +0 -123
- package/dist/vue_ui_sparkline-wgk7yO7E.js +0 -151
- package/dist/vue_ui_sparkstackbar-C5qZMmAl.js +0 -175
- package/dist/vue_ui_stackbar-BW_C3MXw.js +0 -412
- package/dist/vue_ui_stackline-DXxzibUd.js +0 -460
- package/dist/vue_ui_strip_plot-8ZelqC5b.js +0 -301
- package/dist/vue_ui_table_heatmap-BGUjA0WA.js +0 -80
- package/dist/vue_ui_table_sparkline-i0Q-N_we.js +0 -124
- package/dist/vue_ui_thermometer-CuN7Gpez.js +0 -123
- package/dist/vue_ui_tiremarks-A6UHC0c3.js +0 -122
- package/dist/vue_ui_treemap-BQp06q-g.js +0 -328
- package/dist/vue_ui_vertical_bar-CJSD1FZS.js +0 -247
- package/dist/vue_ui_waffle-C_Ev4l7B.js +0 -292
- package/dist/vue_ui_wheel-DdkTPXJU.js +0 -133
- package/dist/vue_ui_word_cloud-B1PbsYPc.js +0 -254
- package/dist/vue_ui_xy-BYPqfYyx.js +0 -482
- package/dist/vue_ui_xy_canvas-CMHGNrLf.js +0 -408
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./lib-BkiwukKO.js";
|
|
2
|
-
//#region src/dom-to-png.js
|
|
3
|
-
async function t(e) {
|
|
4
|
-
let t = e.querySelectorAll("img"), n = Array.from(t).map((e) => new Promise((t) => {
|
|
5
|
-
if (!e.src || e.src.startsWith("data:")) return t();
|
|
6
|
-
if (e.complete && e.naturalWidth !== 0) {
|
|
7
|
-
try {
|
|
8
|
-
let t = document.createElement("canvas");
|
|
9
|
-
t.width = e.naturalWidth, t.height = e.naturalHeight, t.getContext("2d").drawImage(e, 0, 0), e.src = t.toDataURL();
|
|
10
|
-
} catch {}
|
|
11
|
-
return t();
|
|
12
|
-
}
|
|
13
|
-
let n = new window.Image();
|
|
14
|
-
n.crossOrigin = "anonymous", n.onload = function() {
|
|
15
|
-
try {
|
|
16
|
-
let t = document.createElement("canvas");
|
|
17
|
-
t.width = n.naturalWidth, t.height = n.naturalHeight, t.getContext("2d").drawImage(n, 0, 0), e.src = t.toDataURL();
|
|
18
|
-
} catch {}
|
|
19
|
-
t();
|
|
20
|
-
}, n.onerror = function() {
|
|
21
|
-
t();
|
|
22
|
-
}, n.src = e.src;
|
|
23
|
-
}));
|
|
24
|
-
await Promise.all(n);
|
|
25
|
-
}
|
|
26
|
-
function n(e) {
|
|
27
|
-
e.querySelectorAll("[data-dom-to-png-ignore]").forEach((e) => {
|
|
28
|
-
e.remove();
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function r(e, t, n) {
|
|
32
|
-
let i = window.getComputedStyle(t), a = t.getBoundingClientRect(), o = i.display.includes("flex"), s = {}, c = e.getAttribute("style");
|
|
33
|
-
typeof c != "string" && (c = ""), c.split(";").forEach((e) => {
|
|
34
|
-
if (typeof e == "string" && e.trim()) {
|
|
35
|
-
let [t, n] = e.split(":");
|
|
36
|
-
t && n !== void 0 && (s[t.trim()] = n.trim());
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
for (let e = 0; e < i.length; e += 1) {
|
|
40
|
-
let t = i[e];
|
|
41
|
-
s[t] = i.getPropertyValue(t);
|
|
42
|
-
}
|
|
43
|
-
s.color = i.color, s["background-color"] = i.backgroundColor;
|
|
44
|
-
let l = i.fontFamily || n || "";
|
|
45
|
-
(!l || l.trim() === "" || l === "inherit" || l === "initial" || l.toLowerCase().startsWith("system-ui") || l.toLowerCase() === "sans-serif" || l.toLowerCase() === "serif" || l.toLowerCase() === "monospace") && (l = "Helvetica, Arial, sans-serif"), s["font-family"] = l, s["font-size"] = i.fontSize, s["font-weight"] = i.fontWeight, (o || i.display.includes("grid") || [
|
|
46
|
-
"inline-block",
|
|
47
|
-
"absolute",
|
|
48
|
-
"fixed"
|
|
49
|
-
].includes(i.position)) && (a.width > 0 && (s.width = a.width + "px"), a.height > 0 && (s.height = a.height + "px")), o && i.flexWrap === "nowrap" && (s["white-space"] = "nowrap"), [
|
|
50
|
-
"box-sizing",
|
|
51
|
-
"padding",
|
|
52
|
-
"margin",
|
|
53
|
-
"border"
|
|
54
|
-
].forEach((e) => {
|
|
55
|
-
s[e] = i.getPropertyValue(e);
|
|
56
|
-
}), s.overflow = "visible", s["overflow-x"] = "visible", s["overflow-y"] = "visible";
|
|
57
|
-
let u = "";
|
|
58
|
-
for (let e in s) u += `${e}:${s[e]};`;
|
|
59
|
-
e.setAttribute("style", u);
|
|
60
|
-
let d = e.children || [], f = t.children || [];
|
|
61
|
-
for (let e = 0; e < d.length; e++) d[e].nodeType === 1 && f[e] && r(d[e], f[e], l);
|
|
62
|
-
}
|
|
63
|
-
function i(e, t) {
|
|
64
|
-
e.querySelectorAll("text").forEach((e) => {
|
|
65
|
-
e.setAttribute("font-family", t), e.style.fontFamily = t;
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
function a(e) {
|
|
69
|
-
let t = new TextEncoder().encode(e), n = "";
|
|
70
|
-
return t.forEach((e) => n += String.fromCharCode(e)), btoa(n);
|
|
71
|
-
}
|
|
72
|
-
function o(e, t, n) {
|
|
73
|
-
let r = new XMLSerializer().serializeToString(e);
|
|
74
|
-
r.match(/^<svg[^>]+xmlns="http\:\/\/www\.w3\.org\/2000\/svg"/) || (r = r.replace(/^<svg/, "<svg xmlns=\"http://www.w3.org/2000/svg\""));
|
|
75
|
-
let i = window.btoa(unescape(encodeURIComponent(r))), a = new window.Image();
|
|
76
|
-
return a.src = `data:image/svg+xml;base64,${i}`, new Promise((e, r) => {
|
|
77
|
-
a.onload = function() {
|
|
78
|
-
let r = document.createElement("canvas");
|
|
79
|
-
r.width = t, r.height = n, r.getContext("2d").drawImage(a, 0, 0, t, n), e(r.toDataURL("image/png", 1));
|
|
80
|
-
}, a.onerror = (e) => r(e);
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
function s(e) {
|
|
84
|
-
if (e.nodeType !== 1) return;
|
|
85
|
-
let t = window.getComputedStyle(e), n = "";
|
|
86
|
-
for (let e = 0; e < t.length; e++) {
|
|
87
|
-
let r = t[e];
|
|
88
|
-
n += `${r}:${t.getPropertyValue(r)};`;
|
|
89
|
-
}
|
|
90
|
-
e.setAttribute("style", n);
|
|
91
|
-
for (let t = 0; t < e.children.length; t++) s(e.children[t]);
|
|
92
|
-
}
|
|
93
|
-
function c() {
|
|
94
|
-
let e = [];
|
|
95
|
-
for (let t of document.styleSheets) try {
|
|
96
|
-
let n = t.cssRules;
|
|
97
|
-
if (!n) continue;
|
|
98
|
-
for (let t of n) (typeof CSSFontFaceRule < "u" && t instanceof CSSFontFaceRule || t.cssText.trim().startsWith("@font-face")) && e.push(t.cssText);
|
|
99
|
-
} catch {
|
|
100
|
-
continue;
|
|
101
|
-
}
|
|
102
|
-
return e;
|
|
103
|
-
}
|
|
104
|
-
function l(e) {
|
|
105
|
-
let t = c();
|
|
106
|
-
if (!t.length) return;
|
|
107
|
-
let n = document.createElement("style");
|
|
108
|
-
n.setAttribute("type", "text/css"), n.textContent = t.join("\n");
|
|
109
|
-
let r = e.querySelector("defs") || document.createElementNS("http://www.w3.org/2000/svg", "defs");
|
|
110
|
-
r.appendChild(n), e.querySelector("defs") || e.insertBefore(r, e.firstChild);
|
|
111
|
-
}
|
|
112
|
-
function u(e, t) {
|
|
113
|
-
let n = e.querySelectorAll("foreignObject"), r = t.querySelectorAll("foreignObject");
|
|
114
|
-
n.forEach((e, t) => {
|
|
115
|
-
let n = r[t];
|
|
116
|
-
if (!n) return;
|
|
117
|
-
function i(e, t) {
|
|
118
|
-
if (!e || !t) return;
|
|
119
|
-
if (e.nodeType === 1 && t.nodeType === 1) {
|
|
120
|
-
let n = window.getComputedStyle(t), r = "";
|
|
121
|
-
for (let e = 0; e < n.length; e++) {
|
|
122
|
-
let t = n[e];
|
|
123
|
-
r += `${t}:${n.getPropertyValue(t)};`;
|
|
124
|
-
}
|
|
125
|
-
e.setAttribute("style", r);
|
|
126
|
-
}
|
|
127
|
-
let n = e.children || [], r = t.children || [];
|
|
128
|
-
for (let e = 0; e < n.length; e++) i(n[e], r[e]);
|
|
129
|
-
}
|
|
130
|
-
i(e, n);
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
function d(e) {
|
|
134
|
-
e.querySelectorAll("foreignObject").forEach((e) => {
|
|
135
|
-
let t = "", n = Array.from(e.querySelectorAll("*"));
|
|
136
|
-
if (n.length !== 0) {
|
|
137
|
-
for (let e of document.styleSheets) {
|
|
138
|
-
let r;
|
|
139
|
-
try {
|
|
140
|
-
r = e.cssRules;
|
|
141
|
-
} catch {
|
|
142
|
-
continue;
|
|
143
|
-
}
|
|
144
|
-
if (r) {
|
|
145
|
-
for (let e of r) if (!(typeof CSSStyleRule < "u" && !(e instanceof CSSStyleRule))) try {
|
|
146
|
-
n.some((t) => t.matches(e.selectorText)) && (t += e.cssText + "\n");
|
|
147
|
-
} catch {
|
|
148
|
-
continue;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
if (t) {
|
|
153
|
-
let n = document.createElement("style");
|
|
154
|
-
n.textContent = t, e.insertBefore(n, e.firstChild);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
function f(e) {
|
|
160
|
-
e.querySelectorAll("foreignObject").forEach((e) => {
|
|
161
|
-
let t = e.firstElementChild;
|
|
162
|
-
t && t.tagName.toLowerCase() !== "svg" && t.setAttribute("xmlns", "http://www.w3.org/1999/xhtml");
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
function p(e, t) {
|
|
166
|
-
let n = e.querySelectorAll("foreignObject"), r = t.querySelectorAll("foreignObject");
|
|
167
|
-
n.forEach((e, t) => {
|
|
168
|
-
let n = r[t];
|
|
169
|
-
if (!e || !n) return;
|
|
170
|
-
let i = e.firstElementChild, a = n.firstElementChild;
|
|
171
|
-
i && a && m(i, a);
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
function m(e, t) {
|
|
175
|
-
if (e.nodeType !== 1 || !t) return;
|
|
176
|
-
r(e, t);
|
|
177
|
-
let n = e.children || [], i = t.children || [];
|
|
178
|
-
for (let e = 0; e < n.length; e++) m(n[e], i[e]);
|
|
179
|
-
}
|
|
180
|
-
function h(e, t) {
|
|
181
|
-
let n = Array.from(t.querySelectorAll("img"));
|
|
182
|
-
e.querySelectorAll("img").forEach((e) => {
|
|
183
|
-
let t = e.getAttribute("src"), r = n.find((e) => e.getAttribute("src") === t);
|
|
184
|
-
if (r) {
|
|
185
|
-
let t = window.getComputedStyle(r), n = "";
|
|
186
|
-
for (let e = 0; e < t.length; e++) {
|
|
187
|
-
let r = t[e];
|
|
188
|
-
n += `${r}:${t.getPropertyValue(r)};`;
|
|
189
|
-
}
|
|
190
|
-
e.setAttribute("style", n);
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
async function g({ container: c, scale: m = 2, base64: g = !1 }) {
|
|
195
|
-
if (!c) throw Error("No container provided");
|
|
196
|
-
await document.fonts.ready;
|
|
197
|
-
let _ = window.getComputedStyle(c).fontFamily || "Helvetica";
|
|
198
|
-
_.toLowerCase().includes("helvetica") || (_ += ", Helvetica");
|
|
199
|
-
let v = c.cloneNode(!0), y = v.querySelectorAll("canvas"), b = c.querySelectorAll("canvas");
|
|
200
|
-
for (let e = 0; e < b.length; e += 1) {
|
|
201
|
-
let t = b[e], n = y[e];
|
|
202
|
-
if (t && n) {
|
|
203
|
-
let e = document.createElement("img");
|
|
204
|
-
e.src = t.toDataURL("image/png"), e.width = t.width, e.height = t.height, e.style.width = t.style.width || t.width + "px", e.style.height = t.style.height || t.height + "px", n.replaceWith(e);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
let x = c.querySelector("svg[aria-label]"), S = v.querySelector("svg[aria-label]");
|
|
208
|
-
if (x && S) {
|
|
209
|
-
f(S), d(S), u(S, x), p(S, x), s(S), i(S, _), h(S, x), await t(S);
|
|
210
|
-
let e = x.getBoundingClientRect(), n = e.width, r = e.height, a = await o(S, Math.round(n * m), Math.round(r * m)), c = document.createElement("img");
|
|
211
|
-
c.src = a, c.width = n, c.height = r, c.style.width = n + "px", c.style.height = r + "px", S.parentNode.replaceChild(c, S);
|
|
212
|
-
}
|
|
213
|
-
r(v, c, _), h(v, c), n(v), await t(v);
|
|
214
|
-
let { width: C, height: w } = c.getBoundingClientRect(), T = Math.round(Math.max(v.scrollWidth, C) * m), E = Math.round(Math.max(v.scrollHeight, w) * 1.01 * m), D = document.createElementNS(e, "svg");
|
|
215
|
-
D.setAttribute("viewBox", `0 0 ${T} ${E}`), D.setAttribute("width", T), D.setAttribute("height", E), D.setAttribute("style", `font-family:${_};`);
|
|
216
|
-
let O = document.createElementNS(e, "foreignObject");
|
|
217
|
-
O.setAttribute("x", 0), O.setAttribute("y", 0), O.setAttribute("width", T), O.setAttribute("height", E), O.setAttribute("style", `font-family:${_};`), v.style.transform = `scale(${m})`, v.style.transformOrigin = "top left", v.style.width = C + "px", v.style.height = w + "px", v.style.background = window.getComputedStyle(c).backgroundColor, O.appendChild(v), l(D), D.appendChild(O);
|
|
218
|
-
let k = a(new XMLSerializer().serializeToString(D)), A = new window.Image();
|
|
219
|
-
A.crossOrigin = "anonymous";
|
|
220
|
-
let j = `data:image/svg+xml;base64,${k}`;
|
|
221
|
-
return A.src = j, g ? new Promise((e) => {
|
|
222
|
-
e(j);
|
|
223
|
-
}) : new Promise((e, t) => {
|
|
224
|
-
A.onload = function() {
|
|
225
|
-
try {
|
|
226
|
-
let t = document.createElement("canvas");
|
|
227
|
-
t.width = T, t.height = E, t.getContext("2d").drawImage(A, 0, 0, T, E), e(t.toDataURL("image/png", 1));
|
|
228
|
-
} catch (e) {
|
|
229
|
-
t("Failed to draw SVG on canvas: " + e);
|
|
230
|
-
}
|
|
231
|
-
}, A.onerror = function() {
|
|
232
|
-
t("Failed to load SVG image for conversion");
|
|
233
|
-
};
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
//#endregion
|
|
237
|
-
export { g as t };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Mt as e, W as t, y as n, yt as r, zt as i } from "./lib-BkiwukKO.js";
|
|
2
|
-
//#region src/exposedLib.js
|
|
3
|
-
function a(e, t) {
|
|
4
|
-
return r(n(e), t);
|
|
5
|
-
}
|
|
6
|
-
function o(e, r) {
|
|
7
|
-
return t(n(e), r);
|
|
8
|
-
}
|
|
9
|
-
function s(t, r) {
|
|
10
|
-
return e(n(t), r);
|
|
11
|
-
}
|
|
12
|
-
function c({ defaultConfig: e, userConfig: t }) {
|
|
13
|
-
return i({
|
|
14
|
-
defaultConfig: e,
|
|
15
|
-
userConfig: t
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { s as i, a as n, c as r, o as t };
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
//#region src/geoProjections.js
|
|
2
|
-
function e(e, t = []) {
|
|
3
|
-
return {
|
|
4
|
-
type: "FeatureCollection",
|
|
5
|
-
features: e.features.map((e) => {
|
|
6
|
-
let n = {};
|
|
7
|
-
return t.forEach((t) => {
|
|
8
|
-
e.properties && e.properties.hasOwnProperty(t) && (n[t] = e.properties[t]);
|
|
9
|
-
}), {
|
|
10
|
-
type: "Feature",
|
|
11
|
-
geometry: e.geometry,
|
|
12
|
-
properties: n
|
|
13
|
-
};
|
|
14
|
-
})
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
var t = {
|
|
18
|
-
mercator([e, t], n, r, i) {
|
|
19
|
-
let a = 85.05113;
|
|
20
|
-
t = Math.max(Math.min(t, a), -a);
|
|
21
|
-
let [o, s] = i, c = (e - o) * Math.PI / 180, l = n / (2 * Math.PI) * (c + Math.PI), u = (e) => Math.log(Math.tan(Math.PI / 4 + e * Math.PI / 180 / 2)), d = u(85.05113), f = u(-72);
|
|
22
|
-
return [l, (u(t) - d) / (f - d) * r];
|
|
23
|
-
},
|
|
24
|
-
equirectangular([e, t], n, r, i) {
|
|
25
|
-
let [a, o] = i;
|
|
26
|
-
return t = Math.max(Math.min(t, 90), -80), [(e - a + 180) / 360 * n, (90 - (t - o)) / 170 * r];
|
|
27
|
-
},
|
|
28
|
-
robinson([e, t], n, r, i) {
|
|
29
|
-
let a = [
|
|
30
|
-
[1, 0],
|
|
31
|
-
[.9986, .062],
|
|
32
|
-
[.9954, .124],
|
|
33
|
-
[.99, .186],
|
|
34
|
-
[.9822, .248],
|
|
35
|
-
[.973, .31],
|
|
36
|
-
[.96, .372],
|
|
37
|
-
[.9427, .434],
|
|
38
|
-
[.9216, .4958],
|
|
39
|
-
[.8962, .5571],
|
|
40
|
-
[.8679, .6176],
|
|
41
|
-
[.835, .6769],
|
|
42
|
-
[.7986, .7346],
|
|
43
|
-
[.7597, .7903],
|
|
44
|
-
[.7186, .8435],
|
|
45
|
-
[.6732, .8936],
|
|
46
|
-
[.6213, .9394],
|
|
47
|
-
[.5722, .9761],
|
|
48
|
-
[.5322, 1]
|
|
49
|
-
], [o, s] = i;
|
|
50
|
-
e -= o, t = Math.max(-89.9999, Math.min(89.9999, t));
|
|
51
|
-
let c = Math.abs(t), l = Math.floor(c / 5), u = c % 5 / 5, [d, f] = a[l], [p, m] = a[Math.min(l + 1, a.length - 1)], h = d + (p - d) * u, g = f + (m - f) * u, _ = e * Math.PI / 180, v = n / 2 + n / 2 * h * _ / Math.PI, y = r / 2 - r / 2 * Math.sign(t) * g / 1;
|
|
52
|
-
return !Number.isFinite(v) || !Number.isFinite(y) ? [-9999, -9999] : [v, y];
|
|
53
|
-
},
|
|
54
|
-
mollweide([e, t], n, r, i) {
|
|
55
|
-
t = Math.max(Math.min(t, 89.9999), -89.9999);
|
|
56
|
-
let [a] = i, o = (e - a) * Math.PI / 180, s = t * Math.PI / 180, c = s, l = 1, u = 0;
|
|
57
|
-
for (; Math.abs(l) > 1e-10 && u < 10;) l = -(2 * c + Math.sin(2 * c) - Math.PI * Math.sin(s)) / (2 + 2 * Math.cos(2 * c)), c += l, u++;
|
|
58
|
-
isFinite(c) || (c = s > 0 ? Math.PI / 2 : -Math.PI / 2);
|
|
59
|
-
let d = n / (2 * Math.SQRT2), f = (d * (2 * Math.SQRT2 / Math.PI) * o * Math.cos(c) + 2 * d) / (4.6 * d) * n, p = -d * Math.SQRT2 * Math.sin(c), m = -d * Math.SQRT2, h = d * Math.SQRT2, g = (p - m) / (h - m) * r;
|
|
60
|
-
return [isFinite(f) ? f : 0, isFinite(g) ? g : 0];
|
|
61
|
-
},
|
|
62
|
-
winkelTripel([e, t], n, r, i) {
|
|
63
|
-
let [a, o] = i, s = (e - a) * Math.PI / 180, c = t * Math.PI / 180, l = s * Math.cos(Math.PI / 6), u = c, d = Math.acos(Math.cos(c) * Math.cos(s / 2)), f = 2 * Math.cos(c) * Math.sin(s / 2) / (Math.sin(d) / d || 1), p = Math.sin(c) / (Math.sin(d) / d || 1);
|
|
64
|
-
return [n / 2 + n / (2 * Math.PI) * (l + f) / 2, r / 2 - r / (2 * Math.PI) * (u + p) / 2];
|
|
65
|
-
},
|
|
66
|
-
aitoff([e, t], n, r, i) {
|
|
67
|
-
Math.sinc || (Math.sinc = function(e) {
|
|
68
|
-
return e === 0 ? 1 : Math.sin(Math.PI * e) / (Math.PI * e);
|
|
69
|
-
});
|
|
70
|
-
let [a, o] = i, s = (e - a) * Math.PI / 180, c = t * Math.PI / 180, l = Math.acos(Math.cos(c) * Math.cos(s / 2)), u = 0, d = 0;
|
|
71
|
-
return l !== 0 && (u = 2 * Math.cos(c) * Math.sin(s / 2) / Math.sinc(l / Math.PI), d = Math.sin(c) / Math.sinc(l / Math.PI)), u = n / 2 + n / 4 * u, d = r / 2 - r / 2 * d, [u, d];
|
|
72
|
-
},
|
|
73
|
-
hammer([e, t], n, r, i) {
|
|
74
|
-
let [a, o] = i, s = (e - a) * Math.PI / 180, c = t * Math.PI / 180, l = Math.sqrt(1 + Math.cos(c) * Math.cos(s / 2));
|
|
75
|
-
return [n / 2 + n / 2 * (2 * Math.SQRT2 * Math.cos(c) * Math.sin(s / 2) / l) / 2.8284271247461903, r / 2 - r / 2 * (Math.SQRT2 * Math.sin(c) / l) / 1.4142135623730951];
|
|
76
|
-
},
|
|
77
|
-
bonne([e, t], n, r, i = [0, 0]) {
|
|
78
|
-
let a = 45 * Math.PI / 180, [o, s] = i, c = (e - o) * Math.PI / 180, l = Math.max(Math.min(t, 89.9), -89.9) * Math.PI / 180, u = 1 / Math.tan(a), d = u + a - l, f = d === 0 ? 0 : c * Math.cos(l) / d, p = Math.min(n, r) / 2.6;
|
|
79
|
-
return [n / 2 + p * d * Math.sin(f), r / 2 - p * (u - d * Math.cos(f))];
|
|
80
|
-
},
|
|
81
|
-
sinusoidal([e, t], n, r, i) {
|
|
82
|
-
let [a, o] = i, s = (e - a) * Math.PI / 180, c = t * Math.PI / 180;
|
|
83
|
-
return [n / 2 + n / (2 * Math.PI) * s * Math.cos(c), r / 2 - r / Math.PI * c];
|
|
84
|
-
},
|
|
85
|
-
gallPeters([e, t], n, r, i) {
|
|
86
|
-
let [a, o] = i;
|
|
87
|
-
return t = Math.max(Math.min(t, 89.9999), -89.9999), [(e - a + 180) / 360 * n, r / 2 - r / Math.PI * Math.sin(t * Math.PI / 180)];
|
|
88
|
-
},
|
|
89
|
-
vanDerGrinten([e, t], n, r, i = [0, 0]) {
|
|
90
|
-
let a = Math.PI, o = Math.PI / 2, s = 1e-6, c = (e - (i[0] || 0)) * a / 180, l = (t - (i[1] || 0)) * a / 180, u = Math.abs(c), d = Math.abs(l), f, p;
|
|
91
|
-
if (d < s) f = c, p = 0;
|
|
92
|
-
else if (u < s || Math.abs(d - o) < s) f = 0, p = Math.sign(l) * a * Math.tan(Math.asin(d / o) / 2);
|
|
93
|
-
else {
|
|
94
|
-
let e = d / o, t = Math.cos(Math.asin(e)), n = .5 * Math.abs(a / c - c / a), r = n * n, i = t / (e + t - 1), s = i * (2 / e - 1), u = s * s, m = u + r, h = i - u, g = r + i;
|
|
95
|
-
f = Math.sign(c) * a * (n * h + Math.sqrt(Math.max(0, r * h * h - m * (i * i - u)))) / m, p = Math.sign(l) * a * (s * g - n * Math.sqrt(Math.max(0, (r + 1) * m - g * g))) / m;
|
|
96
|
-
}
|
|
97
|
-
let m = n / 2 / a * .98, h = n / 2, g = r / 2;
|
|
98
|
-
return [h + f * m, g - p * m];
|
|
99
|
-
},
|
|
100
|
-
globe([e, t], n, r, i) {
|
|
101
|
-
let [a, o] = i, s = (e - a) * Math.PI / 180, c = t * Math.PI / 180, l = o * Math.PI / 180, u = Math.min(n, r) / 2 * .95, d = n / 2, f = r / 2, p = u * Math.cos(c) * Math.sin(s) + d, m = -u * (Math.cos(l) * Math.sin(c) - Math.sin(l) * Math.cos(c) * Math.cos(s)) + f;
|
|
102
|
-
return Math.sin(l) * Math.sin(c) + Math.cos(l) * Math.cos(c) * Math.cos(s) < 0 ? [NaN, NaN] : [p, m];
|
|
103
|
-
},
|
|
104
|
-
azimuthalEquidistant([e, t], n, r, i = [0, 0]) {
|
|
105
|
-
let a = (e) => e * Math.PI / 180, [o, s] = i, c = a(e - o), l = a(t), u = a(s), d = Math.sin(u) * Math.sin(l) + Math.cos(u) * Math.cos(l) * Math.cos(c), f = Math.acos(Math.max(-1, Math.min(1, d))), p = f === 0 ? 1 : f / Math.sin(f), m = p * Math.cos(l) * Math.sin(c), h = p * (Math.cos(u) * Math.sin(l) - Math.sin(u) * Math.cos(l) * Math.cos(c)), g = Math.min(n, r) / 2 / Math.PI, _ = n / 2, v = r / 2;
|
|
106
|
-
return [_ + m * g, v - h * g];
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
function n(e, t, n, r, i = [0, 0]) {
|
|
110
|
-
let a = Infinity, o = Infinity, s = -Infinity, c = -Infinity;
|
|
111
|
-
for (let l of t) {
|
|
112
|
-
let t = l.geometry, u = t.type === "Polygon" ? [t.coordinates] : t.type === "MultiPolygon" ? t.coordinates : [];
|
|
113
|
-
for (let t of u) for (let l of t) for (let [t, u] of l) {
|
|
114
|
-
let [l, d] = e([t, u], n, r, i);
|
|
115
|
-
!Number.isFinite(l) || !Number.isFinite(d) || (a = Math.min(a, l), s = Math.max(s, l), o = Math.min(o, d), c = Math.max(c, d));
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return {
|
|
119
|
-
minX: Math.floor(a) - 10,
|
|
120
|
-
minY: Math.floor(o) - 10,
|
|
121
|
-
width: Math.ceil(s - a) + 20,
|
|
122
|
-
height: Math.ceil(c - o) + 20
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
function r(e, t, n) {
|
|
126
|
-
let r = e.find((e) => e.properties.admin === t || e.properties.name === t), i = e.find((e) => e.properties.admin === n || e.properties.name === n);
|
|
127
|
-
return r && i && (r.geometry.type === "Polygon" && (r.geometry = {
|
|
128
|
-
type: "MultiPolygon",
|
|
129
|
-
coordinates: [r.geometry.coordinates]
|
|
130
|
-
}), i.geometry.type === "Polygon" ? r.geometry.coordinates.push(i.geometry.coordinates) : i.geometry.type === "MultiPolygon" && r.geometry.coordinates.push(...i.geometry.coordinates), e = e.filter((e) => !(e.properties.admin === n || e.properties.name === n))), e;
|
|
131
|
-
}
|
|
132
|
-
function i(e, t) {
|
|
133
|
-
let n = Array.isArray(t) ? t.map((e) => ({ ...e })) : t.features ? t.features.map((e) => ({ ...e })) : [];
|
|
134
|
-
return e.style.chart.territory.showTaiwanAsPartOfChina && (n = r(n, "China", "Taiwan")), t.type === "FeatureCollection" ? {
|
|
135
|
-
...t,
|
|
136
|
-
features: n
|
|
137
|
-
} : n;
|
|
138
|
-
}
|
|
139
|
-
var a = {
|
|
140
|
-
projections: t,
|
|
141
|
-
getProjectedBounds: n,
|
|
142
|
-
setupTerritories: i,
|
|
143
|
-
simplifyGeoJSON: e
|
|
144
|
-
};
|
|
145
|
-
//#endregion
|
|
146
|
-
export { a as t };
|
package/dist/img-BjOr008R.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
|
|
2
|
-
import { t } from "./dom-to-png-9WSt6hXe.js";
|
|
3
|
-
//#region src/img.js
|
|
4
|
-
var n = /* @__PURE__ */ e({ default: () => r });
|
|
5
|
-
async function r({ domElement: e, fileName: n, format: r = "png", scale: i = 2, base64: a = !1, img: o = !1 }) {
|
|
6
|
-
if (!e) return Promise.reject("No element provided");
|
|
7
|
-
let s = typeof navigator < "u" && /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
8
|
-
if (await new Promise((e) => setTimeout(e, 200)), s) try {
|
|
9
|
-
await t({
|
|
10
|
-
container: e,
|
|
11
|
-
scale: i
|
|
12
|
-
}), await t({
|
|
13
|
-
container: e,
|
|
14
|
-
scale: i
|
|
15
|
-
}), await t({
|
|
16
|
-
container: e,
|
|
17
|
-
scale: i
|
|
18
|
-
}), await t({
|
|
19
|
-
container: e,
|
|
20
|
-
scale: i
|
|
21
|
-
}), a && (await t({
|
|
22
|
-
container: e,
|
|
23
|
-
scale: i,
|
|
24
|
-
base64: a
|
|
25
|
-
}), await t({
|
|
26
|
-
container: e,
|
|
27
|
-
scale: i,
|
|
28
|
-
base64: a
|
|
29
|
-
}), await t({
|
|
30
|
-
container: e,
|
|
31
|
-
scale: i,
|
|
32
|
-
base64: a
|
|
33
|
-
}), await t({
|
|
34
|
-
container: e,
|
|
35
|
-
scale: i,
|
|
36
|
-
base64: a
|
|
37
|
-
}));
|
|
38
|
-
} catch {}
|
|
39
|
-
if (a && o) try {
|
|
40
|
-
return {
|
|
41
|
-
imageUri: await t({
|
|
42
|
-
container: e,
|
|
43
|
-
scale: i
|
|
44
|
-
}).then((e) => e),
|
|
45
|
-
base64: await t({
|
|
46
|
-
container: e,
|
|
47
|
-
scale: i,
|
|
48
|
-
base64: a
|
|
49
|
-
}).then((e) => e)
|
|
50
|
-
};
|
|
51
|
-
} catch (e) {
|
|
52
|
-
console.error("Error generating image information for the chart", e);
|
|
53
|
-
}
|
|
54
|
-
else if (a) try {
|
|
55
|
-
return t({
|
|
56
|
-
container: e,
|
|
57
|
-
scale: i,
|
|
58
|
-
base64: a
|
|
59
|
-
}).then((e) => e);
|
|
60
|
-
} catch (e) {
|
|
61
|
-
console.error("Error generating the base64 string of the chart", e);
|
|
62
|
-
}
|
|
63
|
-
else try {
|
|
64
|
-
let a = await t({
|
|
65
|
-
container: e,
|
|
66
|
-
scale: i
|
|
67
|
-
}), o = document.createElement("a");
|
|
68
|
-
o.href = a, o.download = `${n}.${r}`, document.body.appendChild(o), o.click(), document.body.removeChild(o);
|
|
69
|
-
} catch (e) {
|
|
70
|
-
throw console.error("Error generating image:", e), e;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
//#endregion
|
|
74
|
-
export { n, r as t };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Et as e } from "./lib-BkiwukKO.js";
|
|
2
|
-
//#region src/labelUtils.js
|
|
3
|
-
function t({ config: t = {
|
|
4
|
-
useValueParens: !1,
|
|
5
|
-
usePercentageParens: !0,
|
|
6
|
-
showValueFirst: !0
|
|
7
|
-
}, val: n, percentage: r, showVal: i = !0, showPercentage: a = !0 }) {
|
|
8
|
-
if (!i && !a) return "";
|
|
9
|
-
let o = {
|
|
10
|
-
value: t.useValueParens ? e(n) : n,
|
|
11
|
-
percentage: t.usePercentageParens ? e(r) : r
|
|
12
|
-
};
|
|
13
|
-
return i && a ? t.showValueFirst ? `${o.value} ${o.percentage}` : `${o.percentage} ${o.value}` : i ? o.value : a ? o.percentage : "";
|
|
14
|
-
}
|
|
15
|
-
function n({ rounding: e, num: t, filler: n = "-" }) {
|
|
16
|
-
return t.toFixed(e).split("").map((e) => n).join("");
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { n, t };
|