vue-data-ui 3.20.3 → 3.20.4
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/A11yDataTable-BCbtxMU6.js +45 -0
- package/dist/Arrow-D6j6ocXm.js +116 -0
- package/dist/BaseDraggableDialog-4hDW-Rj2.js +272 -0
- package/dist/BaseIcon-DfLoHNUj.js +502 -0
- package/dist/BaseLegendToggle-C_Db-y7s.js +56 -0
- package/dist/BaseScanner-Dr2a1Msy.js +27 -0
- package/dist/BaseZoomControls-CG7hI_1P.js +111 -0
- package/dist/ColorPicker-Bjwxnvfh.js +255 -0
- package/dist/DataTable-B--IN22e.js +150 -0
- package/dist/Legend-Cz2uQ5gs.js +114 -0
- package/dist/NonSvgPenAndPaper-gLNJ1Lmr.js +577 -0
- package/dist/PackageVersion-BYcZLGDG.js +11 -0
- package/dist/PenAndPaper-DqrClVfb.js +461 -0
- package/dist/RecursiveCircles-D6aDPmoe.js +117 -0
- package/dist/RecursiveLabels-D9rfID6q.js +56 -0
- package/dist/RecursiveLinks-BygcpDiT.js +78 -0
- package/dist/Shape-BPCJfphn.js +141 -0
- package/dist/Slicer-SHBj0VaV.js +1144 -0
- package/dist/SlicerPreview-DdihbUSJ.js +1668 -0
- package/dist/SparkTooltip-CfE6yCad.js +93 -0
- package/dist/Title-NWp4qB4K.js +87 -0
- package/dist/Tooltip-BENq327o.js +312 -0
- package/dist/UserOptions-C1NgoGu6.js +1411 -0
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
- package/dist/canvas-lib-BOP_HS11.js +79 -0
- package/dist/components/arrow.js +2 -0
- package/dist/components/vue-ui-3d-bar.js +2 -0
- package/dist/components/vue-ui-accordion.js +2 -0
- package/dist/components/vue-ui-age-pyramid.js +2 -0
- package/dist/components/vue-ui-annotator.js +2 -0
- package/dist/components/vue-ui-bullet.js +2 -0
- package/dist/components/vue-ui-bump.js +2 -0
- package/dist/components/vue-ui-candlestick.js +2 -0
- package/dist/components/vue-ui-carousel-table.js +2 -0
- package/dist/components/vue-ui-chestnut.js +2 -0
- package/dist/components/vue-ui-chord.js +2 -0
- package/dist/components/vue-ui-circle-pack.js +2 -0
- package/dist/components/vue-ui-cursor.js +2 -0
- package/dist/components/vue-ui-dag.js +2 -0
- package/dist/components/vue-ui-dashboard.js +2 -0
- package/dist/components/vue-ui-digits.js +2 -0
- package/dist/components/vue-ui-donut-evolution.js +2 -0
- package/dist/components/vue-ui-donut.js +2 -0
- package/dist/components/vue-ui-dumbbell.js +2 -0
- package/dist/components/vue-ui-flow.js +2 -0
- package/dist/components/vue-ui-funnel.js +2 -0
- package/dist/components/vue-ui-galaxy.js +2 -0
- package/dist/components/vue-ui-gauge.js +2 -0
- package/dist/components/vue-ui-geo.js +2 -0
- package/dist/components/vue-ui-gizmo.js +2 -0
- package/dist/components/vue-ui-heatmap.js +2 -0
- package/dist/components/vue-ui-history-plot.js +2 -0
- package/dist/components/vue-ui-horizontal-bar.js +2 -0
- package/dist/components/vue-ui-icon.js +2 -0
- package/dist/components/vue-ui-kpi.js +2 -0
- package/dist/components/vue-ui-mini-loader.js +2 -0
- package/dist/components/vue-ui-molecule.js +2 -0
- package/dist/components/vue-ui-mood-radar.js +2 -0
- package/dist/components/vue-ui-nested-donuts.js +2 -0
- package/dist/components/vue-ui-onion.js +2 -0
- package/dist/components/vue-ui-parallel-coordinate-plot.js +2 -0
- package/dist/components/vue-ui-pattern-seed.js +2 -0
- package/dist/components/vue-ui-pattern.js +2 -0
- package/dist/components/vue-ui-quadrant.js +2 -0
- package/dist/components/vue-ui-quick-chart.js +2 -0
- package/dist/components/vue-ui-radar.js +2 -0
- package/dist/components/vue-ui-rating.js +2 -0
- package/dist/components/vue-ui-relation-circle.js +2 -0
- package/dist/components/vue-ui-ridgeline.js +2 -0
- package/dist/components/vue-ui-rings.js +2 -0
- package/dist/components/vue-ui-scatter.js +2 -0
- package/dist/components/vue-ui-skeleton.js +2 -0
- package/dist/components/vue-ui-smiley.js +2 -0
- package/dist/components/vue-ui-spark-trend.js +2 -0
- package/dist/components/vue-ui-sparkbar.js +2 -0
- package/dist/components/vue-ui-sparkgauge.js +2 -0
- package/dist/components/vue-ui-sparkhistogram.js +2 -0
- package/dist/components/vue-ui-sparkline.js +2 -0
- package/dist/components/vue-ui-sparkstackbar.js +2 -0
- package/dist/components/vue-ui-stackbar.js +2 -0
- package/dist/components/vue-ui-stackline.js +2 -0
- package/dist/components/vue-ui-strip-plot.js +2 -0
- package/dist/components/vue-ui-table-heatmap.js +2 -0
- package/dist/components/vue-ui-table-sparkline.js +2 -0
- package/dist/components/vue-ui-table.js +2 -0
- package/dist/components/vue-ui-thermometer.js +2 -0
- package/dist/components/vue-ui-timer.js +2 -0
- package/dist/components/vue-ui-tiremarks.js +2 -0
- package/dist/components/vue-ui-treemap.js +2 -0
- package/dist/components/vue-ui-vertical-bar.js +2 -0
- package/dist/components/vue-ui-waffle.js +2 -0
- package/dist/components/vue-ui-wheel.js +2 -0
- package/dist/components/vue-ui-word-cloud.js +2 -0
- package/dist/components/vue-ui-world.js +2 -0
- package/dist/components/vue-ui-xy-canvas.js +2 -0
- package/dist/components/vue-ui-xy.js +2 -0
- package/dist/dom-to-png-BYtB4BF3.js +237 -0
- package/dist/exposedLib-CI8ji8G-.js +19 -0
- package/dist/geoProjections-Czak6Jn1.js +145 -0
- package/dist/img-1cKsci8e.js +74 -0
- package/dist/labelUtils-CUctkYoA.js +19 -0
- package/dist/lib-DUeYQsS0.js +1882 -0
- package/dist/llms.txt +232 -0
- package/dist/patternUtils-CS7hn6at.js +258 -0
- package/dist/pdf-D0eZ99cP.js +90 -0
- package/dist/rolldown-runtime-Dy4uBu1J.js +11 -0
- package/dist/style.css +2 -0
- package/dist/types/arrow.d.ts +4 -0
- package/dist/types/utils.d.ts +551 -0
- package/dist/types/vue-data-ui.d.ts +17190 -0
- package/dist/types/vue-ui-3d-bar.d.ts +93 -0
- package/dist/types/vue-ui-accordion.d.ts +11 -0
- package/dist/types/vue-ui-age-pyramid.d.ts +108 -0
- package/dist/types/vue-ui-annotator.d.ts +34 -0
- package/dist/types/vue-ui-bullet.d.ts +85 -0
- package/dist/types/vue-ui-bump.d.ts +92 -0
- package/dist/types/vue-ui-candlestick.d.ts +106 -0
- package/dist/types/vue-ui-carousel-table.d.ts +59 -0
- package/dist/types/vue-ui-chestnut.d.ts +98 -0
- package/dist/types/vue-ui-chord.d.ts +110 -0
- package/dist/types/vue-ui-circle-pack.d.ts +126 -0
- package/dist/types/vue-ui-cursor.d.ts +9 -0
- package/dist/types/vue-ui-dag.d.ts +125 -0
- package/dist/types/vue-ui-dashboard.d.ts +68 -0
- package/dist/types/vue-ui-digits.d.ts +12 -0
- package/dist/types/vue-ui-donut-evolution.d.ts +98 -0
- package/dist/types/vue-ui-donut.d.ts +123 -0
- package/dist/types/vue-ui-dumbbell.d.ts +94 -0
- package/dist/types/vue-ui-flow.d.ts +106 -0
- package/dist/types/vue-ui-funnel.d.ts +79 -0
- package/dist/types/vue-ui-galaxy.d.ts +114 -0
- package/dist/types/vue-ui-gauge.d.ts +89 -0
- package/dist/types/vue-ui-geo.d.ts +94 -0
- package/dist/types/vue-ui-gizmo.d.ts +22 -0
- package/dist/types/vue-ui-heatmap.d.ts +101 -0
- package/dist/types/vue-ui-history-plot.d.ts +114 -0
- package/dist/types/vue-ui-horizontal-bar.d.ts +116 -0
- package/dist/types/vue-ui-icon.d.ts +15 -0
- package/dist/types/vue-ui-kpi.d.ts +25 -0
- package/dist/types/vue-ui-mini-loader.d.ts +15 -0
- package/dist/types/vue-ui-molecule.d.ts +112 -0
- package/dist/types/vue-ui-mood-radar.d.ts +92 -0
- package/dist/types/vue-ui-nested-donuts.d.ts +111 -0
- package/dist/types/vue-ui-onion.d.ts +106 -0
- package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +125 -0
- package/dist/types/vue-ui-pattern-seed.d.ts +14 -0
- package/dist/types/vue-ui-pattern.d.ts +15 -0
- package/dist/types/vue-ui-quadrant.d.ts +125 -0
- package/dist/types/vue-ui-quick-chart.d.ts +108 -0
- package/dist/types/vue-ui-radar.d.ts +116 -0
- package/dist/types/vue-ui-rating.d.ts +42 -0
- package/dist/types/vue-ui-relation-circle.d.ts +92 -0
- package/dist/types/vue-ui-ridgeline.d.ts +106 -0
- package/dist/types/vue-ui-rings.d.ts +98 -0
- package/dist/types/vue-ui-scatter.d.ts +97 -0
- package/dist/types/vue-ui-skeleton.d.ts +11 -0
- package/dist/types/vue-ui-smiley.d.ts +28 -0
- package/dist/types/vue-ui-spark-trend.d.ts +19 -0
- package/dist/types/vue-ui-sparkbar.d.ts +49 -0
- package/dist/types/vue-ui-sparkgauge.d.ts +28 -0
- package/dist/types/vue-ui-sparkhistogram.d.ts +46 -0
- package/dist/types/vue-ui-sparkline.d.ts +59 -0
- package/dist/types/vue-ui-sparkstackbar.d.ts +60 -0
- package/dist/types/vue-ui-stackbar.d.ts +118 -0
- package/dist/types/vue-ui-stackline.d.ts +114 -0
- package/dist/types/vue-ui-strip-plot.d.ts +96 -0
- package/dist/types/vue-ui-table-heatmap.d.ts +62 -0
- package/dist/types/vue-ui-table-sparkline.d.ts +53 -0
- package/dist/types/vue-ui-table.d.ts +38 -0
- package/dist/types/vue-ui-thermometer.d.ts +70 -0
- package/dist/types/vue-ui-timer.d.ts +49 -0
- package/dist/types/vue-ui-tiremarks.d.ts +70 -0
- package/dist/types/vue-ui-treemap.d.ts +104 -0
- package/dist/types/vue-ui-vertical-bar.d.ts +22 -0
- package/dist/types/vue-ui-waffle.d.ts +101 -0
- package/dist/types/vue-ui-wheel.d.ts +70 -0
- package/dist/types/vue-ui-word-cloud.d.ts +97 -0
- package/dist/types/vue-ui-world.d.ts +98 -0
- package/dist/types/vue-ui-xy-canvas.d.ts +101 -0
- package/dist/types/vue-ui-xy.d.ts +146 -0
- package/dist/useAutoSizeLabelsInsideViewbox-BIVntRZp.js +50 -0
- package/dist/useChartAccessibility-DYqac8yF.js +12 -0
- package/dist/useConfig-DAyQk86L.js +7479 -0
- package/dist/useFitSvgText-CT3nmlaS.js +63 -0
- package/dist/useNestedProp-CNcoy38D.js +10 -0
- package/dist/useObjectBindings-BI7hP-BC.js +189 -0
- package/dist/usePanZoom-CYU3B4T3.js +157 -0
- package/dist/usePrefersMotion-BC-CsqR1.js +15 -0
- package/dist/usePrinter-C1Gqt_Sp.js +49 -0
- package/dist/useResponsive-BfnK0KxU.js +19 -0
- package/dist/useStableElementSize-C7KADDKj.js +77 -0
- package/dist/useSvgExport-SVIsDot8.js +755 -0
- package/dist/useTableResponsive-B24Uwt2E.js +24 -0
- package/dist/useThemeCheck-C43Tcqmk.js +24 -0
- package/dist/useTimeLabelCollider-AEcY4Ioe.js +57 -0
- package/dist/useTimeLabels-BmBRv27Y.js +272 -0
- package/dist/useUserOptionState-DK-_1ddE.js +15 -0
- package/dist/utils.js +28 -0
- package/dist/vClickOutside-DUrZWttG.js +13 -0
- package/dist/vue-data-ui-DuLO91Bk.js +274 -0
- package/dist/vue-data-ui.js +76 -0
- package/dist/vue-ui-3d-bar-DMDfraIo.js +1757 -0
- package/dist/vue-ui-accordion-Dw4MHKVB.js +81 -0
- package/dist/vue-ui-age-pyramid-CN68d9su.js +1238 -0
- package/dist/vue-ui-annotator-DLPUAKlm.js +2899 -0
- package/dist/vue-ui-bullet-V21vyb4T.js +710 -0
- package/dist/vue-ui-bump-BvnBJcx0.js +1249 -0
- package/dist/vue-ui-candlestick-DaIeT5kU.js +1826 -0
- package/dist/vue-ui-carousel-table-BBTm1Etq.js +455 -0
- package/dist/vue-ui-chestnut-BLtE39N7.js +2010 -0
- package/dist/vue-ui-chord-D1UVle9f.js +1391 -0
- package/dist/vue-ui-circle-pack-BDDVjuT1.js +1608 -0
- package/dist/vue-ui-cursor-CiU4ttGN.js +283 -0
- package/dist/vue-ui-dag-D2U673ns.js +2909 -0
- package/dist/vue-ui-dashboard-JK7v_bwo.js +513 -0
- package/dist/vue-ui-digits-D5b3eJ5q.js +209 -0
- package/dist/vue-ui-donut-BYf4FbjI.js +2410 -0
- package/dist/vue-ui-donut-evolution-Id7YwbiG.js +1510 -0
- package/dist/vue-ui-dumbbell-CToh2l5g.js +1530 -0
- package/dist/vue-ui-flow-CmBI0IKa.js +1235 -0
- package/dist/vue-ui-funnel-B67L6mTB.js +777 -0
- package/dist/vue-ui-galaxy-CFZP36s4.js +1077 -0
- package/dist/vue-ui-gauge-sZxKMn7t.js +920 -0
- package/dist/vue-ui-geo-DK8fAoZd.js +1516 -0
- package/dist/vue-ui-gizmo-DsJtcBEf.js +225 -0
- package/dist/vue-ui-heatmap-B87-9zpu.js +1568 -0
- package/dist/vue-ui-history-plot-Dhv-zMSR.js +1554 -0
- package/dist/vue-ui-horizontal-bar-BAT7IYhL.js +1681 -0
- package/dist/vue-ui-kpi-BggezxVU.js +96 -0
- package/dist/vue-ui-mini-loader-CyqBt2g4.js +125 -0
- package/dist/vue-ui-molecule-uXC5g9qp.js +925 -0
- package/dist/vue-ui-mood-radar-BYoxNRMc.js +1148 -0
- package/dist/vue-ui-nested-donuts-BVniVpDM.js +1487 -0
- package/dist/vue-ui-onion-CWzeZ5Ak.js +1200 -0
- package/dist/vue-ui-parallel-coordinate-plot-Dbx6W4ZW.js +1416 -0
- package/dist/vue-ui-pattern-DKozfnVn.js +154 -0
- package/dist/vue-ui-pattern-seed-BB1honLm.js +61 -0
- package/dist/vue-ui-quadrant-BrPLv-sz.js +1978 -0
- package/dist/vue-ui-quick-chart-B0S_4DeW.js +2469 -0
- package/dist/vue-ui-radar-CUo6FWXZ.js +1229 -0
- package/dist/vue-ui-rating-BG4lf1z8.js +343 -0
- package/dist/vue-ui-relation-circle-2a6IZgKe.js +924 -0
- package/dist/vue-ui-ridgeline-DnQBrx71.js +1622 -0
- package/dist/vue-ui-rings-BibWJNh2.js +1246 -0
- package/dist/vue-ui-scatter-8srfWwTp.js +2413 -0
- package/dist/vue-ui-skeleton-BoKB7qJM.js +2556 -0
- package/dist/vue-ui-smiley-G89TxRU-.js +356 -0
- package/dist/vue-ui-spark-trend-Cq4pIgWr.js +438 -0
- package/dist/vue-ui-sparkbar-CgFKnZEF.js +393 -0
- package/dist/vue-ui-sparkgauge-ea-PGnBC.js +255 -0
- package/dist/vue-ui-sparkhistogram-BfgnG41U.js +560 -0
- package/dist/vue-ui-sparkline-CDOa3xh8.js +1507 -0
- package/dist/vue-ui-sparkstackbar-DEsSr92Z.js +662 -0
- package/dist/vue-ui-stackbar-BeegxXk_.js +2270 -0
- package/dist/vue-ui-stackline-_G-cbZRe.js +2398 -0
- package/dist/vue-ui-strip-plot-VasAk496.js +1340 -0
- package/dist/vue-ui-table-DysBVxy5.js +1338 -0
- package/dist/vue-ui-table-heatmap-CCGjbSzQ.js +344 -0
- package/dist/vue-ui-table-sparkline-DQduGRPm.js +707 -0
- package/dist/vue-ui-thermometer-1l6KUpS8.js +763 -0
- package/dist/vue-ui-timer-Db2d4LNp.js +439 -0
- package/dist/vue-ui-tiremarks-YtFZjYFp.js +552 -0
- package/dist/vue-ui-treemap-DxwEGZ9p.js +1587 -0
- package/dist/vue-ui-waffle-C9bzj7pV.js +1362 -0
- package/dist/vue-ui-wheel-DKzocpS-.js +885 -0
- package/dist/vue-ui-word-cloud-DkNU1GFp.js +1656 -0
- package/dist/vue-ui-world-DhnfDaFE.js +14264 -0
- package/dist/vue-ui-xy-BzhW8pHi.js +4578 -0
- package/dist/vue-ui-xy-canvas-BUPnRZ3C.js +1787 -0
- package/dist/vue_ui_3d_bar-C4R7o-yX.js +185 -0
- package/dist/vue_ui_age_pyramid-BY6c-oX_.js +301 -0
- package/dist/vue_ui_bullet-ClzdLoOv.js +186 -0
- package/dist/vue_ui_bump-Vl-zYAtG.js +201 -0
- package/dist/vue_ui_candlestick-J8jmJvxP.js +374 -0
- package/dist/vue_ui_chestnut-D2oUhad6.js +305 -0
- package/dist/vue_ui_chord-DPfS1Umc.js +275 -0
- package/dist/vue_ui_circle_pack-DZC_rdfn.js +172 -0
- package/dist/vue_ui_dag-TsJ_azQq.js +258 -0
- package/dist/vue_ui_donut-BDGqG07h.js +358 -0
- package/dist/vue_ui_donut_evolution-D1yAAIHr.js +717 -0
- package/dist/vue_ui_dumbbell-Bfe_jFyi.js +304 -0
- package/dist/vue_ui_flow-BewZjjKG.js +238 -0
- package/dist/vue_ui_funnel-_Og4EEkO.js +234 -0
- package/dist/vue_ui_galaxy-Ig0cc1_h.js +265 -0
- package/dist/vue_ui_gauge-Cf1RZc9q.js +178 -0
- package/dist/vue_ui_geo-B8TODs-G.js +248 -0
- package/dist/vue_ui_heatmap-B2BBBSWG.js +319 -0
- package/dist/vue_ui_history_plot-CuN63VEc.js +413 -0
- package/dist/vue_ui_horizontal_bar-C4J4QzXf.js +341 -0
- package/dist/vue_ui_molecule-CO9L59SF.js +231 -0
- package/dist/vue_ui_mood_radar-BA6LAKhk.js +281 -0
- package/dist/vue_ui_nested_donuts-B8csIoVO.js +273 -0
- package/dist/vue_ui_onion-1FTFFS46.js +293 -0
- package/dist/vue_ui_parallel_coordinate_plot-CBiOBira.js +278 -0
- package/dist/vue_ui_quadrant-CDSTKTJz.js +428 -0
- package/dist/vue_ui_quick_chart-mZBdml3Z.js +139 -0
- package/dist/vue_ui_radar-jafTED5j.js +306 -0
- package/dist/vue_ui_relation_circle-D0p4mXmv.js +98 -0
- package/dist/vue_ui_ridgeline-VM8_mx4J.js +767 -0
- package/dist/vue_ui_rings-BVgD2aMn.js +320 -0
- package/dist/vue_ui_scatter-I0POnicu.js +479 -0
- package/dist/vue_ui_spark_trend-DxVmpkmC.js +82 -0
- package/dist/vue_ui_sparkbar-z6qO--Kf.js +64 -0
- package/dist/vue_ui_sparkgauge-BX1MS3bA.js +90 -0
- package/dist/vue_ui_sparkhistogram-BRgvKUH6.js +123 -0
- package/dist/vue_ui_sparkline-auZhap6Y.js +151 -0
- package/dist/vue_ui_sparkstackbar-BOjuQnZd.js +175 -0
- package/dist/vue_ui_stackbar-COOrQQdK.js +412 -0
- package/dist/vue_ui_stackline-DQqKPA9z.js +460 -0
- package/dist/vue_ui_strip_plot-CtJe8_gq.js +301 -0
- package/dist/vue_ui_table_heatmap-w8vx5k6f.js +80 -0
- package/dist/vue_ui_table_sparkline-DAbkUrNz.js +124 -0
- package/dist/vue_ui_thermometer-DxgqWKlE.js +123 -0
- package/dist/vue_ui_tiremarks-CdEPieWV.js +122 -0
- package/dist/vue_ui_treemap-DoEtkRN6.js +328 -0
- package/dist/vue_ui_vertical_bar-CP-MKz1j.js +247 -0
- package/dist/vue_ui_waffle-DIARFc7g.js +292 -0
- package/dist/vue_ui_wheel-DZ_nR--t.js +133 -0
- package/dist/vue_ui_word_cloud-C-qIMNLu.js +254 -0
- package/dist/vue_ui_xy-BLUkWEAm.js +482 -0
- package/dist/vue_ui_xy_canvas-Cb6dg3eK.js +408 -0
- package/package.json +120 -120
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { t as e } from "./lib-DUeYQsS0.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 };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Bt as e, Nt as t, W as n, bt as r, y as i } from "./lib-DUeYQsS0.js";
|
|
2
|
+
//#region src/exposedLib.js
|
|
3
|
+
function a(e, t) {
|
|
4
|
+
return r(i(e), t);
|
|
5
|
+
}
|
|
6
|
+
function o(e, t) {
|
|
7
|
+
return n(i(e), t);
|
|
8
|
+
}
|
|
9
|
+
function s(e, n) {
|
|
10
|
+
return t(i(e), n);
|
|
11
|
+
}
|
|
12
|
+
function c({ defaultConfig: t, userConfig: n }) {
|
|
13
|
+
return e({
|
|
14
|
+
defaultConfig: t,
|
|
15
|
+
userConfig: n
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { s as i, a as n, c as r, o as t };
|
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
t = Math.max(Math.min(t, 85.05113), -85.05113);
|
|
20
|
+
let [a, o] = i, s = (e - a) * Math.PI / 180, c = n / (2 * Math.PI) * (s + Math.PI), l = (e) => Math.log(Math.tan(Math.PI / 4 + e * Math.PI / 180 / 2)), u = l(85.05113), d = l(-72);
|
|
21
|
+
return [c, (l(t) - u) / (d - u) * r];
|
|
22
|
+
},
|
|
23
|
+
equirectangular([e, t], n, r, i) {
|
|
24
|
+
let [a, o] = i;
|
|
25
|
+
return t = Math.max(Math.min(t, 90), -80), [(e - a + 180) / 360 * n, (90 - (t - o)) / 170 * r];
|
|
26
|
+
},
|
|
27
|
+
robinson([e, t], n, r, i) {
|
|
28
|
+
let a = [
|
|
29
|
+
[1, 0],
|
|
30
|
+
[.9986, .062],
|
|
31
|
+
[.9954, .124],
|
|
32
|
+
[.99, .186],
|
|
33
|
+
[.9822, .248],
|
|
34
|
+
[.973, .31],
|
|
35
|
+
[.96, .372],
|
|
36
|
+
[.9427, .434],
|
|
37
|
+
[.9216, .4958],
|
|
38
|
+
[.8962, .5571],
|
|
39
|
+
[.8679, .6176],
|
|
40
|
+
[.835, .6769],
|
|
41
|
+
[.7986, .7346],
|
|
42
|
+
[.7597, .7903],
|
|
43
|
+
[.7186, .8435],
|
|
44
|
+
[.6732, .8936],
|
|
45
|
+
[.6213, .9394],
|
|
46
|
+
[.5722, .9761],
|
|
47
|
+
[.5322, 1]
|
|
48
|
+
], [o, s] = i;
|
|
49
|
+
e -= o, t = Math.max(-89.9999, Math.min(89.9999, t));
|
|
50
|
+
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;
|
|
51
|
+
return !Number.isFinite(v) || !Number.isFinite(y) ? [-9999, -9999] : [v, y];
|
|
52
|
+
},
|
|
53
|
+
mollweide([e, t], n, r, i) {
|
|
54
|
+
t = Math.max(Math.min(t, 89.9999), -89.9999);
|
|
55
|
+
let [a] = i, o = (e - a) * Math.PI / 180, s = t * Math.PI / 180, c = s, l = 1, u = 0;
|
|
56
|
+
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++;
|
|
57
|
+
isFinite(c) || (c = s > 0 ? Math.PI / 2 : -Math.PI / 2);
|
|
58
|
+
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;
|
|
59
|
+
return [isFinite(f) ? f : 0, isFinite(g) ? g : 0];
|
|
60
|
+
},
|
|
61
|
+
winkelTripel([e, t], n, r, i) {
|
|
62
|
+
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);
|
|
63
|
+
return [n / 2 + n / (2 * Math.PI) * (l + f) / 2, r / 2 - r / (2 * Math.PI) * (u + p) / 2];
|
|
64
|
+
},
|
|
65
|
+
aitoff([e, t], n, r, i) {
|
|
66
|
+
Math.sinc || (Math.sinc = function(e) {
|
|
67
|
+
return e === 0 ? 1 : Math.sin(Math.PI * e) / (Math.PI * e);
|
|
68
|
+
});
|
|
69
|
+
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;
|
|
70
|
+
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];
|
|
71
|
+
},
|
|
72
|
+
hammer([e, t], n, r, i) {
|
|
73
|
+
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));
|
|
74
|
+
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];
|
|
75
|
+
},
|
|
76
|
+
bonne([e, t], n, r, i = [0, 0]) {
|
|
77
|
+
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;
|
|
78
|
+
return [n / 2 + p * d * Math.sin(f), r / 2 - p * (u - d * Math.cos(f))];
|
|
79
|
+
},
|
|
80
|
+
sinusoidal([e, t], n, r, i) {
|
|
81
|
+
let [a, o] = i, s = (e - a) * Math.PI / 180, c = t * Math.PI / 180;
|
|
82
|
+
return [n / 2 + n / (2 * Math.PI) * s * Math.cos(c), r / 2 - r / Math.PI * c];
|
|
83
|
+
},
|
|
84
|
+
gallPeters([e, t], n, r, i) {
|
|
85
|
+
let [a, o] = i;
|
|
86
|
+
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)];
|
|
87
|
+
},
|
|
88
|
+
vanDerGrinten([e, t], n, r, i = [0, 0]) {
|
|
89
|
+
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;
|
|
90
|
+
if (d < s) f = c, p = 0;
|
|
91
|
+
else if (u < s || Math.abs(d - o) < s) f = 0, p = Math.sign(l) * a * Math.tan(Math.asin(d / o) / 2);
|
|
92
|
+
else {
|
|
93
|
+
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;
|
|
94
|
+
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;
|
|
95
|
+
}
|
|
96
|
+
let m = n / 2 / a * .98, h = n / 2, g = r / 2;
|
|
97
|
+
return [h + f * m, g - p * m];
|
|
98
|
+
},
|
|
99
|
+
globe([e, t], n, r, i) {
|
|
100
|
+
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;
|
|
101
|
+
return Math.sin(l) * Math.sin(c) + Math.cos(l) * Math.cos(c) * Math.cos(s) < 0 ? [NaN, NaN] : [p, m];
|
|
102
|
+
},
|
|
103
|
+
azimuthalEquidistant([e, t], n, r, i = [0, 0]) {
|
|
104
|
+
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;
|
|
105
|
+
return [_ + m * g, v - h * g];
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
function n(e, t, n, r, i = [0, 0]) {
|
|
109
|
+
let a = Infinity, o = Infinity, s = -Infinity, c = -Infinity;
|
|
110
|
+
for (let l of t) {
|
|
111
|
+
let t = l.geometry, u = t.type === "Polygon" ? [t.coordinates] : t.type === "MultiPolygon" ? t.coordinates : [];
|
|
112
|
+
for (let t of u) for (let l of t) for (let [t, u] of l) {
|
|
113
|
+
let [l, d] = e([t, u], n, r, i);
|
|
114
|
+
!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));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
minX: Math.floor(a) - 10,
|
|
119
|
+
minY: Math.floor(o) - 10,
|
|
120
|
+
width: Math.ceil(s - a) + 20,
|
|
121
|
+
height: Math.ceil(c - o) + 20
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function r(e, t, n) {
|
|
125
|
+
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);
|
|
126
|
+
return r && i && (r.geometry.type === "Polygon" && (r.geometry = {
|
|
127
|
+
type: "MultiPolygon",
|
|
128
|
+
coordinates: [r.geometry.coordinates]
|
|
129
|
+
}), 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;
|
|
130
|
+
}
|
|
131
|
+
function i(e, t) {
|
|
132
|
+
let n = Array.isArray(t) ? t.map((e) => ({ ...e })) : t.features ? t.features.map((e) => ({ ...e })) : [];
|
|
133
|
+
return e.style.chart.territory.showTaiwanAsPartOfChina && (n = r(n, "China", "Taiwan")), t.type === "FeatureCollection" ? {
|
|
134
|
+
...t,
|
|
135
|
+
features: n
|
|
136
|
+
} : n;
|
|
137
|
+
}
|
|
138
|
+
var a = {
|
|
139
|
+
projections: t,
|
|
140
|
+
getProjectedBounds: n,
|
|
141
|
+
setupTerritories: i,
|
|
142
|
+
simplifyGeoJSON: e
|
|
143
|
+
};
|
|
144
|
+
//#endregion
|
|
145
|
+
export { a as t };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { t } from "./dom-to-png-BYtB4BF3.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 };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Dt as e } from "./lib-DUeYQsS0.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 };
|