vue-data-ui 3.17.13 → 3.18.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/README.md +1 -1
- package/dist/A11yDataTable-q2-8fSlJ.js +45 -0
- package/dist/Arrow-Cj6W6Xbi.js +116 -0
- package/dist/BaseDraggableDialog-BQcmQAK5.js +272 -0
- package/dist/BaseIcon-CEmt3Ifx.js +499 -0
- package/dist/BaseLegendToggle-DUIqQmwM.js +56 -0
- package/dist/BaseScanner-C7dmAref.js +27 -0
- package/dist/BaseZoomControls-Ce1yqas1.js +111 -0
- package/dist/ColorPicker-DS_QkH3W.js +255 -0
- package/dist/DataTable-BvDJEAma.js +150 -0
- package/dist/Legend-Gg5Q4Clb.js +114 -0
- package/dist/NonSvgPenAndPaper-D4Gh7O43.js +577 -0
- package/dist/PackageVersion-DhDKg-ez.js +11 -0
- package/dist/PenAndPaper-DwpL8Z0l.js +461 -0
- package/dist/RecursiveCircles-DPpLel6f.js +117 -0
- package/dist/RecursiveLabels-DBMJf_to.js +56 -0
- package/dist/RecursiveLinks-D06dBL4a.js +78 -0
- package/dist/Shape-DEGOZ6GG.js +141 -0
- package/dist/Slicer-BlfyiHHD.js +1144 -0
- package/dist/SlicerPreview-BPS8mYO2.js +1523 -0
- package/dist/SparkTooltip-c2DL7gqD.js +93 -0
- package/dist/Title-__gWq2g6.js +87 -0
- package/dist/Tooltip-B7lmdbac.js +307 -0
- package/dist/UserOptions-DMw8EZEo.js +1407 -0
- package/dist/_plugin-vue_export-helper-Dq1MygBL.js +8 -0
- package/dist/canvas-lib-DTaADQOK.js +79 -0
- package/dist/components/arrow.js +2 -5
- package/dist/components/vue-ui-3d-bar.js +2 -5
- package/dist/components/vue-ui-accordion.js +2 -5
- package/dist/components/vue-ui-age-pyramid.js +2 -5
- package/dist/components/vue-ui-annotator.js +2 -5
- package/dist/components/vue-ui-bullet.js +2 -5
- package/dist/components/vue-ui-bump.js +2 -5
- package/dist/components/vue-ui-candlestick.js +2 -5
- package/dist/components/vue-ui-carousel-table.js +2 -5
- package/dist/components/vue-ui-chestnut.js +2 -5
- package/dist/components/vue-ui-chord.js +2 -5
- package/dist/components/vue-ui-circle-pack.js +2 -5
- package/dist/components/vue-ui-cursor.js +2 -5
- package/dist/components/vue-ui-dag.js +2 -5
- package/dist/components/vue-ui-dashboard.js +2 -5
- package/dist/components/vue-ui-digits.js +2 -5
- package/dist/components/vue-ui-donut-evolution.js +2 -5
- package/dist/components/vue-ui-donut.js +2 -5
- package/dist/components/vue-ui-dumbbell.js +2 -5
- package/dist/components/vue-ui-flow.js +2 -5
- package/dist/components/vue-ui-funnel.js +2 -5
- package/dist/components/vue-ui-galaxy.js +2 -5
- package/dist/components/vue-ui-gauge.js +2 -5
- package/dist/components/vue-ui-geo.js +2 -5
- package/dist/components/vue-ui-gizmo.js +2 -5
- package/dist/components/vue-ui-heatmap.js +2 -5
- package/dist/components/vue-ui-history-plot.js +2 -5
- package/dist/components/vue-ui-horizontal-bar.js +2 -5
- package/dist/components/vue-ui-icon.js +2 -5
- package/dist/components/vue-ui-kpi.js +2 -5
- package/dist/components/vue-ui-mini-loader.js +2 -5
- package/dist/components/vue-ui-molecule.js +2 -5
- package/dist/components/vue-ui-mood-radar.js +2 -5
- package/dist/components/vue-ui-nested-donuts.js +2 -5
- package/dist/components/vue-ui-onion.js +2 -5
- package/dist/components/vue-ui-parallel-coordinate-plot.js +2 -5
- package/dist/components/vue-ui-pattern-seed.js +2 -5
- package/dist/components/vue-ui-pattern.js +2 -5
- package/dist/components/vue-ui-quadrant.js +2 -5
- package/dist/components/vue-ui-quick-chart.js +2 -5
- package/dist/components/vue-ui-radar.js +2 -5
- package/dist/components/vue-ui-rating.js +2 -5
- package/dist/components/vue-ui-relation-circle.js +2 -5
- package/dist/components/vue-ui-ridgeline.js +2 -5
- package/dist/components/vue-ui-rings.js +2 -5
- package/dist/components/vue-ui-scatter.js +2 -5
- package/dist/components/vue-ui-skeleton.js +2 -5
- package/dist/components/vue-ui-smiley.js +2 -5
- package/dist/components/vue-ui-spark-trend.js +2 -5
- package/dist/components/vue-ui-sparkbar.js +2 -5
- package/dist/components/vue-ui-sparkgauge.js +2 -5
- package/dist/components/vue-ui-sparkhistogram.js +2 -5
- package/dist/components/vue-ui-sparkline.js +2 -5
- package/dist/components/vue-ui-sparkstackbar.js +2 -5
- package/dist/components/vue-ui-stackbar.js +2 -5
- package/dist/components/vue-ui-stackline.js +2 -5
- package/dist/components/vue-ui-strip-plot.js +2 -5
- package/dist/components/vue-ui-table-heatmap.js +2 -5
- package/dist/components/vue-ui-table-sparkline.js +2 -5
- package/dist/components/vue-ui-table.js +2 -5
- package/dist/components/vue-ui-thermometer.js +2 -5
- package/dist/components/vue-ui-timer.js +2 -5
- package/dist/components/vue-ui-tiremarks.js +2 -5
- package/dist/components/vue-ui-treemap.js +2 -5
- package/dist/components/vue-ui-vertical-bar.js +2 -5
- package/dist/components/vue-ui-waffle.js +2 -5
- package/dist/components/vue-ui-wheel.js +2 -5
- package/dist/components/vue-ui-word-cloud.js +2 -5
- package/dist/components/vue-ui-world.js +2 -5
- package/dist/components/vue-ui-xy-canvas.js +2 -5
- package/dist/components/vue-ui-xy.js +2 -5
- package/dist/dom-to-png-9WSt6hXe.js +237 -0
- package/dist/exposedLib-CwWU4zv-.js +19 -0
- package/dist/geoProjections-CQIkC70z.js +146 -0
- package/dist/img-BjOr008R.js +74 -0
- package/dist/labelUtils-Cr97N8E1.js +19 -0
- package/dist/lib-BkiwukKO.js +1879 -0
- package/dist/patternUtils-B7BWu5bV.js +258 -0
- package/dist/pdf-DSXSFUnK.js +90 -0
- package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
- package/dist/style.css +2 -1
- package/dist/types/arrow.d.ts +1 -1
- package/dist/types/utils.d.ts +23 -0
- package/dist/types/vue-data-ui.d.ts +4775 -627
- package/dist/types/vue-ui-3d-bar.d.ts +64 -9
- package/dist/types/vue-ui-accordion.d.ts +4 -3
- package/dist/types/vue-ui-age-pyramid.d.ts +79 -9
- package/dist/types/vue-ui-annotator.d.ts +3 -5
- package/dist/types/vue-ui-bullet.d.ts +60 -9
- package/dist/types/vue-ui-bump.d.ts +65 -9
- package/dist/types/vue-ui-candlestick.d.ts +83 -9
- package/dist/types/vue-ui-carousel-table.d.ts +36 -6
- package/dist/types/vue-ui-chestnut.d.ts +66 -9
- package/dist/types/vue-ui-chord.d.ts +78 -9
- package/dist/types/vue-ui-circle-pack.d.ts +86 -9
- package/dist/types/vue-ui-cursor.d.ts +4 -2
- package/dist/types/vue-ui-dag.d.ts +92 -9
- package/dist/types/vue-ui-dashboard.d.ts +43 -6
- package/dist/types/vue-ui-digits.d.ts +4 -2
- package/dist/types/vue-ui-donut-evolution.d.ts +70 -9
- package/dist/types/vue-ui-donut.d.ts +92 -9
- package/dist/types/vue-ui-dumbbell.d.ts +65 -9
- package/dist/types/vue-ui-flow.d.ts +79 -9
- package/dist/types/vue-ui-funnel.d.ts +55 -9
- package/dist/types/vue-ui-galaxy.d.ts +83 -9
- package/dist/types/vue-ui-gauge.d.ts +64 -9
- package/dist/types/vue-ui-geo.d.ts +71 -9
- package/dist/types/vue-ui-gizmo.d.ts +17 -6
- package/dist/types/vue-ui-heatmap.d.ts +73 -9
- package/dist/types/vue-ui-history-plot.d.ts +82 -9
- package/dist/types/vue-ui-horizontal-bar.d.ts +84 -9
- package/dist/types/vue-ui-icon.d.ts +2 -2
- package/dist/types/vue-ui-kpi.d.ts +21 -7
- package/dist/types/vue-ui-mini-loader.d.ts +5 -3
- package/dist/types/vue-ui-molecule.d.ts +86 -9
- package/dist/types/vue-ui-mood-radar.d.ts +66 -9
- package/dist/types/vue-ui-nested-donuts.d.ts +80 -9
- package/dist/types/vue-ui-onion.d.ts +77 -9
- package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +92 -9
- package/dist/types/vue-ui-pattern-seed.d.ts +1 -1
- package/dist/types/vue-ui-pattern.d.ts +2 -2
- package/dist/types/vue-ui-quadrant.d.ts +86 -9
- package/dist/types/vue-ui-quick-chart.d.ts +79 -9
- package/dist/types/vue-ui-radar.d.ts +83 -9
- package/dist/types/vue-ui-rating.d.ts +22 -6
- package/dist/types/vue-ui-relation-circle.d.ts +66 -9
- package/dist/types/vue-ui-ridgeline.d.ts +69 -9
- package/dist/types/vue-ui-rings.d.ts +70 -9
- package/dist/types/vue-ui-scatter.d.ts +67 -9
- package/dist/types/vue-ui-skeleton.d.ts +3 -2
- package/dist/types/vue-ui-smiley.d.ts +3 -2
- package/dist/types/vue-ui-spark-trend.d.ts +14 -6
- package/dist/types/vue-ui-sparkbar.d.ts +27 -6
- package/dist/types/vue-ui-sparkgauge.d.ts +20 -6
- package/dist/types/vue-ui-sparkhistogram.d.ts +24 -6
- package/dist/types/vue-ui-sparkline.d.ts +35 -6
- package/dist/types/vue-ui-sparkstackbar.d.ts +35 -6
- package/dist/types/vue-ui-stackbar.d.ts +85 -9
- package/dist/types/vue-ui-stackline.d.ts +81 -9
- package/dist/types/vue-ui-strip-plot.d.ts +66 -9
- package/dist/types/vue-ui-table-heatmap.d.ts +52 -6
- package/dist/types/vue-ui-table-sparkline.d.ts +30 -6
- package/dist/types/vue-ui-table.d.ts +10 -2
- package/dist/types/vue-ui-thermometer.d.ts +46 -9
- package/dist/types/vue-ui-timer.d.ts +31 -5
- package/dist/types/vue-ui-tiremarks.d.ts +46 -9
- package/dist/types/vue-ui-treemap.d.ts +73 -9
- package/dist/types/vue-ui-vertical-bar.d.ts +2 -2
- package/dist/types/vue-ui-waffle.d.ts +72 -9
- package/dist/types/vue-ui-wheel.d.ts +46 -9
- package/dist/types/vue-ui-word-cloud.d.ts +73 -9
- package/dist/types/vue-ui-world.d.ts +68 -9
- package/dist/types/vue-ui-xy-canvas.d.ts +75 -9
- package/dist/types/vue-ui-xy.d.ts +108 -10
- package/dist/useAutoSizeLabelsInsideViewbox-dp-3Gg97.js +50 -0
- package/dist/useChartAccessibility-Do37qcw2.js +12 -0
- package/dist/useConfig-BV0kTCnO.js +7431 -0
- package/dist/useFitSvgText-C-MEdAfe.js +63 -0
- package/dist/useNestedProp-Ck4hsrpu.js +10 -0
- package/dist/useObjectBindings-Ce_ZZk-f.js +189 -0
- package/dist/usePanZoom-B-4M_gmY.js +157 -0
- package/dist/usePrefersMotion-BywLbIko.js +15 -0
- package/dist/usePrinter-X0yWOynH.js +49 -0
- package/dist/useResponsive-CrAInupd.js +19 -0
- package/dist/useStableElementSize-0I1IpHPl.js +77 -0
- package/dist/useSvgExport-Dtu973wa.js +755 -0
- package/dist/useTableResponsive-DrM1xqII.js +24 -0
- package/dist/useThemeCheck-rFK9Zlb_.js +24 -0
- package/dist/useTimeLabelCollider-Dm55Emzg.js +57 -0
- package/dist/useTimeLabels-C0x7zUXP.js +272 -0
- package/dist/useUserOptionState-CjPJPTg2.js +15 -0
- package/dist/utils.js +27 -44
- package/dist/vClickOutside-CbX_bC9A.js +13 -0
- package/dist/vue-data-ui-DIh8ayZc.js +274 -0
- package/dist/vue-data-ui.js +76 -167
- package/dist/vue-ui-3d-bar-BZ8_6ylo.js +1747 -0
- package/dist/vue-ui-accordion-cVv18nTV.js +81 -0
- package/dist/vue-ui-age-pyramid-BR3i-CgS.js +1226 -0
- package/dist/vue-ui-annotator-B9mA_PlF.js +2899 -0
- package/dist/vue-ui-bullet-ByJdNLVf.js +700 -0
- package/dist/vue-ui-bump-Ps1gkA-F.js +1239 -0
- package/dist/vue-ui-candlestick-0C1QFoV4.js +1802 -0
- package/dist/vue-ui-carousel-table-1P28pCRK.js +445 -0
- package/dist/vue-ui-chestnut-CJOCGWwX.js +2000 -0
- package/dist/vue-ui-chord-BpiVJCCm.js +1381 -0
- package/dist/vue-ui-circle-pack-C3wvXz1f.js +1183 -0
- package/dist/vue-ui-cursor-CNn_3b24.js +283 -0
- package/dist/vue-ui-dag-DRVXVCJV.js +2899 -0
- package/dist/vue-ui-dashboard-gOXyms0o.js +503 -0
- package/dist/vue-ui-digits-DIKyN3z6.js +209 -0
- package/dist/vue-ui-donut-RogzKj0G.js +2396 -0
- package/dist/vue-ui-donut-evolution-Bxz06Qqf.js +1490 -0
- package/dist/vue-ui-dumbbell-D10T4gmB.js +1517 -0
- package/dist/vue-ui-flow-OK563Z46.js +1223 -0
- package/dist/vue-ui-funnel-nWmbiJu5.js +767 -0
- package/dist/vue-ui-galaxy-CtaTlHWZ.js +1062 -0
- package/dist/vue-ui-gauge-DWTEHJqX.js +910 -0
- package/dist/vue-ui-geo-DUpWvv5m.js +1504 -0
- package/dist/vue-ui-gizmo-vddzP4dM.js +225 -0
- package/dist/vue-ui-heatmap-CUE_zJQa.js +1556 -0
- package/dist/vue-ui-history-plot-CcRg_NgJ.js +1551 -0
- package/dist/vue-ui-horizontal-bar-DX5aZOEn.js +1669 -0
- package/dist/vue-ui-kpi-B74v84Hu.js +96 -0
- package/dist/vue-ui-mini-loader-BcCG6Yqb.js +125 -0
- package/dist/vue-ui-molecule-CVdB8rxf.js +912 -0
- package/dist/vue-ui-mood-radar-CWDVBOck.js +1138 -0
- package/dist/vue-ui-nested-donuts-Be8b5d81.js +1472 -0
- package/dist/vue-ui-onion-Cs90yQQZ.js +1188 -0
- package/dist/vue-ui-parallel-coordinate-plot-D-mZdTop.js +1413 -0
- package/dist/vue-ui-pattern-Bj-IPFr2.js +154 -0
- package/dist/vue-ui-pattern-seed-abRweCDE.js +61 -0
- package/dist/vue-ui-quadrant-DLD_ZR9M.js +1966 -0
- package/dist/vue-ui-quick-chart-UWjZdmzt.js +2459 -0
- package/dist/vue-ui-radar-Bxu07MOG.js +1214 -0
- package/dist/vue-ui-rating-DA9Bmfyb.js +343 -0
- package/dist/vue-ui-relation-circle-O5s1UJtt.js +914 -0
- package/dist/vue-ui-ridgeline-C3siN0d_.js +1612 -0
- package/dist/vue-ui-rings-DVVDtwhB.js +1231 -0
- package/dist/vue-ui-scatter-Cfvh06OC.js +2380 -0
- package/dist/vue-ui-skeleton-CxTmGCQp.js +2556 -0
- package/dist/vue-ui-smiley-B6nc7b71.js +356 -0
- package/dist/vue-ui-spark-trend--39vutfQ.js +438 -0
- package/dist/vue-ui-sparkbar-DhCRNOu4.js +393 -0
- package/dist/vue-ui-sparkgauge-6Igkqlqs.js +255 -0
- package/dist/vue-ui-sparkhistogram-BLEzZSZi.js +560 -0
- package/dist/vue-ui-sparkline-ppwKM4aO.js +1503 -0
- package/dist/vue-ui-sparkstackbar-uIzSq9Wh.js +660 -0
- package/dist/vue-ui-stackbar-CdOkMCbI.js +2235 -0
- package/dist/vue-ui-stackline-DifD9OXC.js +2362 -0
- package/dist/vue-ui-strip-plot-D1LjIVqK.js +1328 -0
- package/dist/vue-ui-table-WDkEyyQ0.js +1338 -0
- package/dist/vue-ui-table-heatmap-CfGJVzI3.js +334 -0
- package/dist/vue-ui-table-sparkline-BEWWP4Rq.js +697 -0
- package/dist/vue-ui-thermometer-CFWOAB8K.js +753 -0
- package/dist/vue-ui-timer-D1DQyf9i.js +439 -0
- package/dist/vue-ui-tiremarks-IeM3BlPW.js +542 -0
- package/dist/vue-ui-treemap-BGZM7ibv.js +1575 -0
- package/dist/vue-ui-waffle-a3dFVBk4.js +1350 -0
- package/dist/vue-ui-wheel-OnIRQJ8a.js +875 -0
- package/dist/vue-ui-word-cloud-C9SkyutR.js +1644 -0
- package/dist/vue-ui-world-CEevuFbk.js +14252 -0
- package/dist/vue-ui-xy-1hee-IEM.js +4114 -0
- package/dist/vue-ui-xy-canvas-D2f0d45c.js +1774 -0
- package/dist/vue_ui_3d_bar-CXKqO5Ej.js +185 -0
- package/dist/vue_ui_age_pyramid-BON8QI6X.js +301 -0
- package/dist/vue_ui_bullet-CE5sFT7u.js +186 -0
- package/dist/vue_ui_bump-frnXaXul.js +201 -0
- package/dist/vue_ui_candlestick-sY6UtOop.js +374 -0
- package/dist/vue_ui_chestnut-BiUZFv40.js +305 -0
- package/dist/vue_ui_chord-DpyR_b9A.js +275 -0
- package/dist/vue_ui_circle_pack-DBKz_Fi_.js +130 -0
- package/dist/vue_ui_dag-Ci_MOnvd.js +258 -0
- package/dist/vue_ui_donut-Cx2_BGcQ.js +358 -0
- package/dist/vue_ui_donut_evolution-CAJefrHs.js +717 -0
- package/dist/vue_ui_dumbbell-CClzAZTN.js +304 -0
- package/dist/vue_ui_flow-CCHO1Lo9.js +238 -0
- package/dist/vue_ui_funnel-h8q2mRpC.js +234 -0
- package/dist/vue_ui_galaxy-70vtkEBw.js +265 -0
- package/dist/vue_ui_gauge-C17CgfzN.js +178 -0
- package/dist/vue_ui_geo-C0UbQ0Lc.js +248 -0
- package/dist/vue_ui_heatmap-BqPP3J4M.js +319 -0
- package/dist/vue_ui_history_plot-C5nytDHh.js +413 -0
- package/dist/vue_ui_horizontal_bar-Bqxorkc_.js +341 -0
- package/dist/vue_ui_molecule-Dka4JBOp.js +231 -0
- package/dist/vue_ui_mood_radar-Dg4ijm53.js +281 -0
- package/dist/vue_ui_nested_donuts-BY9cOoHF.js +273 -0
- package/dist/vue_ui_onion-DTV9cup-.js +293 -0
- package/dist/vue_ui_parallel_coordinate_plot-CNWrDh96.js +278 -0
- package/dist/vue_ui_quadrant-3kjYvxpj.js +428 -0
- package/dist/vue_ui_quick_chart--VaYQuM4.js +139 -0
- package/dist/vue_ui_radar-Dxx9GJmj.js +306 -0
- package/dist/vue_ui_relation_circle-Cr0I2SoU.js +98 -0
- package/dist/vue_ui_ridgeline-CAtYca4b.js +767 -0
- package/dist/vue_ui_rings-DXC1VeX5.js +320 -0
- package/dist/vue_ui_scatter-D2S2j0ap.js +479 -0
- package/dist/vue_ui_spark_trend-BHMQ6_1p.js +82 -0
- package/dist/vue_ui_sparkbar-BR6hbuDE.js +64 -0
- package/dist/vue_ui_sparkgauge-xfPRHnMv.js +90 -0
- package/dist/vue_ui_sparkhistogram-CJRENZ1C.js +123 -0
- package/dist/vue_ui_sparkline-wgk7yO7E.js +151 -0
- package/dist/vue_ui_sparkstackbar-C5qZMmAl.js +175 -0
- package/dist/vue_ui_stackbar-BW_C3MXw.js +412 -0
- package/dist/vue_ui_stackline-DpI2LnjO.js +426 -0
- package/dist/vue_ui_strip_plot-8ZelqC5b.js +301 -0
- package/dist/vue_ui_table_heatmap-BGUjA0WA.js +80 -0
- package/dist/vue_ui_table_sparkline-i0Q-N_we.js +124 -0
- package/dist/vue_ui_thermometer-CuN7Gpez.js +123 -0
- package/dist/vue_ui_tiremarks-A6UHC0c3.js +122 -0
- package/dist/vue_ui_treemap-BQp06q-g.js +328 -0
- package/dist/vue_ui_vertical_bar-CJSD1FZS.js +247 -0
- package/dist/vue_ui_waffle-C_Ev4l7B.js +292 -0
- package/dist/vue_ui_wheel-DdkTPXJU.js +133 -0
- package/dist/vue_ui_word_cloud-B1PbsYPc.js +254 -0
- package/dist/vue_ui_xy-BYPqfYyx.js +482 -0
- package/dist/vue_ui_xy_canvas-CMHGNrLf.js +408 -0
- package/package.json +7 -7
- package/dist/A11yDataTable-BpmuNomI.js +0 -54
- package/dist/Arrow-dSvLFssU.js +0 -101
- package/dist/BaseDraggableDialog-Di8Hlru3.js +0 -249
- package/dist/BaseIcon-DX0hTWa-.js +0 -476
- package/dist/BaseLegendToggle-cMP8M2u0.js +0 -47
- package/dist/BaseScanner-C2j3TsSY.js +0 -36
- package/dist/BaseZoomControls-CVSC1-SU.js +0 -123
- package/dist/ColorPicker-bAxGcXK0.js +0 -271
- package/dist/DataTable-cMnb68Ik.js +0 -145
- package/dist/Legend-DGN5lY60.js +0 -104
- package/dist/NonSvgPenAndPaper-B6E0zEYe.js +0 -573
- package/dist/PackageVersion-BfrCAH6_.js +0 -10
- package/dist/PenAndPaper-CJDoB5H9.js +0 -527
- package/dist/RecursiveCircles-BE6GoMmo.js +0 -101
- package/dist/RecursiveLabels-BhQMS9Sm.js +0 -55
- package/dist/RecursiveLinks-BDwyYfP-.js +0 -83
- package/dist/Shape-CxJ5_Rre.js +0 -116
- package/dist/Slicer-D7UcO8sN.js +0 -1145
- package/dist/SlicerPreview-D_CgrN_7.js +0 -1580
- package/dist/SparkTooltip-D4bM-kfz.js +0 -68
- package/dist/Title-BbKoiBk2.js +0 -88
- package/dist/Tooltip-Cvt7Fi0Q.js +0 -299
- package/dist/UserOptions-DVduN6X7.js +0 -1474
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/dom-to-png-DGvx6i5V.js +0 -262
- package/dist/exposedLib-sJvY1pST.js +0 -22
- package/dist/geoProjections-BFq2sOBY.js +0 -162
- package/dist/img-CjTQXS0U.js +0 -57
- package/dist/labelUtils-DX9oyq3C.js +0 -26
- package/dist/lib-DMzrGQHK.js +0 -2477
- package/dist/patternUtils-BINhU4Ky.js +0 -615
- package/dist/pdf-C4H4o1Cj.js +0 -88
- package/dist/useAutoSizeLabelsInsideViewbox-izlGDfwu.js +0 -55
- package/dist/useChartAccessibility-cp6XQtqi.js +0 -15
- package/dist/useConfig-CG4HT3wS.js +0 -7901
- package/dist/useFitSvgText-2crs6Fv5.js +0 -69
- package/dist/useNestedProp-DH0BEVVS.js +0 -13
- package/dist/useObjectBindings-Dixg-RIe.js +0 -228
- package/dist/usePanZoom-BbDhcKWf.js +0 -141
- package/dist/usePrefersMotion-Co0nj1eS.js +0 -17
- package/dist/usePrinter-C4t8DdQ-.js +0 -51
- package/dist/useResponsive-DfdjqQps.js +0 -195
- package/dist/useStableElementSize-C48ZVcZQ.js +0 -77
- package/dist/useSvgExport-BTG4hVPO.js +0 -870
- package/dist/useTableResponsive-BpfiEtzR.js +0 -26
- package/dist/useThemeCheck-C9Ccl7U9.js +0 -36
- package/dist/useTimeLabelCollider-D3JeJ6Ye.js +0 -86
- package/dist/useTimeLabels-Cv0tD9In.js +0 -307
- package/dist/useUserOptionState-B7Ej974k.js +0 -19
- package/dist/vClickOutside-C6WiFswA.js +0 -13
- package/dist/vue-data-ui-D1ZI7Y4l.js +0 -433
- package/dist/vue-ui-3d-bar-DEjKYzI5.js +0 -1824
- package/dist/vue-ui-accordion-DFtpH_16.js +0 -92
- package/dist/vue-ui-age-pyramid-LiC9hTjP.js +0 -1179
- package/dist/vue-ui-annotator-DrKnQoHf.js +0 -2991
- package/dist/vue-ui-bullet-DdxEINdq.js +0 -769
- package/dist/vue-ui-bump-CdgO1V7z.js +0 -1250
- package/dist/vue-ui-candlestick-DxJnPwto.js +0 -1775
- package/dist/vue-ui-carousel-table-CMefu5TI.js +0 -487
- package/dist/vue-ui-chestnut-BnGN72PO.js +0 -2001
- package/dist/vue-ui-chord-DWyar45U.js +0 -1457
- package/dist/vue-ui-circle-pack-CQ8vF2XH.js +0 -1076
- package/dist/vue-ui-cursor-HHOdkmyB.js +0 -260
- package/dist/vue-ui-dag-BDWPBElq.js +0 -3209
- package/dist/vue-ui-dashboard-Dg_I3X2a.js +0 -627
- package/dist/vue-ui-digits-CZmdir8V.js +0 -211
- package/dist/vue-ui-donut-BKegKHxj.js +0 -2608
- package/dist/vue-ui-donut-evolution-047dE4Lu.js +0 -1578
- package/dist/vue-ui-dumbbell-BL4ZMChj.js +0 -1552
- package/dist/vue-ui-flow-BAqtyunQ.js +0 -1279
- package/dist/vue-ui-funnel-Pl2sEOZs.js +0 -823
- package/dist/vue-ui-galaxy-CBF5Wsax.js +0 -1108
- package/dist/vue-ui-gauge-COV_S0Vp.js +0 -955
- package/dist/vue-ui-geo-CaPXElPf.js +0 -1510
- package/dist/vue-ui-gizmo-Csn7up96.js +0 -238
- package/dist/vue-ui-heatmap-Cpb0BYLa.js +0 -1694
- package/dist/vue-ui-history-plot-ZZEdzFCE.js +0 -1564
- package/dist/vue-ui-horizontal-bar-BonPYUZf.js +0 -1735
- package/dist/vue-ui-kpi-DoHhSsDK.js +0 -130
- package/dist/vue-ui-mini-loader-DOTBVCLE.js +0 -138
- package/dist/vue-ui-molecule-mVYnXouV.js +0 -945
- package/dist/vue-ui-mood-radar-DPvwnc3z.js +0 -1197
- package/dist/vue-ui-nested-donuts-C7E6TXrZ.js +0 -1702
- package/dist/vue-ui-onion-BGIlFhGB.js +0 -1207
- package/dist/vue-ui-parallel-coordinate-plot-C6G_A9ua.js +0 -1432
- package/dist/vue-ui-pattern-mXZW_pvA.js +0 -146
- package/dist/vue-ui-pattern-seed-BcNlxb2i.js +0 -36
- package/dist/vue-ui-quadrant-CVpIeYOB.js +0 -1918
- package/dist/vue-ui-quick-chart-CcV8qn9-.js +0 -2514
- package/dist/vue-ui-radar-G4AV1rBo.js +0 -1259
- package/dist/vue-ui-rating-CqPlP88P.js +0 -370
- package/dist/vue-ui-relation-circle-CkZ8oFVV.js +0 -856
- package/dist/vue-ui-ridgeline-CBTyYn6Q.js +0 -1737
- package/dist/vue-ui-rings-CSIOqFiP.js +0 -1256
- package/dist/vue-ui-scatter-AuC46ufT.js +0 -2345
- package/dist/vue-ui-skeleton-YD6rZjY_.js +0 -2475
- package/dist/vue-ui-smiley-CY0WFv2j.js +0 -391
- package/dist/vue-ui-spark-trend-D8KGIt-R.js +0 -423
- package/dist/vue-ui-sparkbar-BjWGJjzN.js +0 -424
- package/dist/vue-ui-sparkgauge-Dab5mss7.js +0 -285
- package/dist/vue-ui-sparkhistogram-D0rsmiPh.js +0 -559
- package/dist/vue-ui-sparkline-BCaauQuX.js +0 -1550
- package/dist/vue-ui-sparkstackbar-NT5yD6xA.js +0 -672
- package/dist/vue-ui-stackbar-ChBk_A1c.js +0 -2393
- package/dist/vue-ui-stackline-Cujamlze.js +0 -2490
- package/dist/vue-ui-strip-plot-CGBumG6I.js +0 -1293
- package/dist/vue-ui-table-BX2iMku4.js +0 -1726
- package/dist/vue-ui-table-heatmap-KXgXYVXm.js +0 -353
- package/dist/vue-ui-table-sparkline-C3NWnry0.js +0 -803
- package/dist/vue-ui-thermometer-DvdceZB1.js +0 -743
- package/dist/vue-ui-timer-XWAbvuAY.js +0 -504
- package/dist/vue-ui-tiremarks-B-YI1RlT.js +0 -578
- package/dist/vue-ui-treemap-AzorGfmd.js +0 -1757
- package/dist/vue-ui-waffle-CKtUvdTE.js +0 -1442
- package/dist/vue-ui-wheel-CnsLEArZ.js +0 -908
- package/dist/vue-ui-word-cloud-iAme2ihe.js +0 -1644
- package/dist/vue-ui-world-D5rrC9rw.js +0 -14452
- package/dist/vue-ui-xy-C_Q9chQe.js +0 -4468
- package/dist/vue-ui-xy-canvas-DG0299qE.js +0 -2107
- package/dist/vue_ui_3d_bar-CL0iX8Qi.js +0 -22
- package/dist/vue_ui_age_pyramid-8H8WSL7J.js +0 -22
- package/dist/vue_ui_bullet-Ckqieba5.js +0 -22
- package/dist/vue_ui_bump-CIht647H.js +0 -22
- package/dist/vue_ui_candlestick-BAMn-VGw.js +0 -22
- package/dist/vue_ui_chestnut-BloFvDuV.js +0 -22
- package/dist/vue_ui_chord-Bc1_ocwK.js +0 -22
- package/dist/vue_ui_circle_pack-CLmw8nHe.js +0 -22
- package/dist/vue_ui_dag-ZOwuDBZ8.js +0 -22
- package/dist/vue_ui_donut-CA4dgV8J.js +0 -22
- package/dist/vue_ui_donut_evolution-DFQU-rqE.js +0 -22
- package/dist/vue_ui_dumbbell-BCOHDiPk.js +0 -22
- package/dist/vue_ui_flow-BErINgox.js +0 -22
- package/dist/vue_ui_funnel-yuaMZ-yb.js +0 -22
- package/dist/vue_ui_galaxy-D95AN4FT.js +0 -22
- package/dist/vue_ui_gauge-BMEuRC4J.js +0 -22
- package/dist/vue_ui_geo--kg4VoVX.js +0 -22
- package/dist/vue_ui_heatmap-C9u993qE.js +0 -22
- package/dist/vue_ui_history_plot-BCKk1CrQ.js +0 -22
- package/dist/vue_ui_horizontal_bar-BEagrV0T.js +0 -22
- package/dist/vue_ui_molecule-BtvlINUh.js +0 -22
- package/dist/vue_ui_mood_radar-BUs6Fdn8.js +0 -22
- package/dist/vue_ui_nested_donuts-DvTrWT_C.js +0 -22
- package/dist/vue_ui_onion-CxWH9_OZ.js +0 -22
- package/dist/vue_ui_parallel_coordinate_plot-DH3cFJ3n.js +0 -22
- package/dist/vue_ui_quadrant-DjRs--Uz.js +0 -22
- package/dist/vue_ui_quick_chart-DMCjEjPe.js +0 -22
- package/dist/vue_ui_radar-DryGBOrz.js +0 -22
- package/dist/vue_ui_relation_circle-CCroen7h.js +0 -22
- package/dist/vue_ui_ridgeline-j4rVmpEp.js +0 -22
- package/dist/vue_ui_rings-CxOrekqA.js +0 -22
- package/dist/vue_ui_scatter-Bu1EAy9H.js +0 -22
- package/dist/vue_ui_spark_trend-3BjrSprO.js +0 -22
- package/dist/vue_ui_sparkbar-BsMzz5Um.js +0 -22
- package/dist/vue_ui_sparkgauge-KnjASOZs.js +0 -22
- package/dist/vue_ui_sparkhistogram-GBdzIVvS.js +0 -22
- package/dist/vue_ui_sparkline-CQ8DJVJx.js +0 -22
- package/dist/vue_ui_sparkstackbar-BSexvOuM.js +0 -22
- package/dist/vue_ui_stackbar-CuDC4O4b.js +0 -22
- package/dist/vue_ui_stackline-QTh-nuxE.js +0 -22
- package/dist/vue_ui_strip_plot-B9ypi_F3.js +0 -22
- package/dist/vue_ui_table_heatmap-CkvipPVy.js +0 -16
- package/dist/vue_ui_table_sparkline-yQdijcyJ.js +0 -22
- package/dist/vue_ui_thermometer-BTmjRBH8.js +0 -22
- package/dist/vue_ui_tiremarks-DBotWfi8.js +0 -22
- package/dist/vue_ui_treemap-D9-AIkT-.js +0 -22
- package/dist/vue_ui_vertical_bar-CELc39b8.js +0 -18
- package/dist/vue_ui_waffle-M2h-uJQ_.js +0 -22
- package/dist/vue_ui_wheel-LqBz3lv4.js +0 -22
- package/dist/vue_ui_word_cloud-mKAtBxHR.js +0 -22
- package/dist/vue_ui_xy-esktmpg-.js +0 -22
- package/dist/vue_ui_xy_canvas-6BBDSowT.js +0 -22
|
@@ -0,0 +1,755 @@
|
|
|
1
|
+
import { isRef as e, nextTick as t, onMounted as n, ref as r, unref as i, watch as a } from "vue";
|
|
2
|
+
//#region src/useSvgExport.js
|
|
3
|
+
var o = "http://www.w3.org/2000/svg", s = "http://www.w3.org/1999/xlink", c = "system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", \"Liberation Sans\", sans-serif", l = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
function u(e) {
|
|
5
|
+
let t = l.get(e);
|
|
6
|
+
return t || (t = getComputedStyle(e), l.set(e, t)), t;
|
|
7
|
+
}
|
|
8
|
+
function d() {
|
|
9
|
+
l = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
}
|
|
11
|
+
function f(e) {
|
|
12
|
+
return document.createElementNS(o, e);
|
|
13
|
+
}
|
|
14
|
+
function p(e) {
|
|
15
|
+
return `${e}, ${c}`;
|
|
16
|
+
}
|
|
17
|
+
function m({ svg: c, title: l, legend: m, legendItems: _, backgroundColor: v, stretchTitle: y = !1, titleEmbedded: b = !1 }) {
|
|
18
|
+
let x = e(c) ? c : r(c), S = r(!1), C = /* @__PURE__ */ "fill.fill-opacity.stroke.stroke-width.stroke-opacity.opacity.color.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-dasharray.stroke-dashoffset.font-family.font-size.font-style.font-weight.font-variant.letter-spacing.word-spacing.text-anchor.dominant-baseline.shape-rendering.vector-effect.paint-order.mix-blend-mode.isolation.filter.clip-path.mask.transform.transform-origin.visibility.display".split("."), w = new Set(["font-family"]);
|
|
19
|
+
async function T({ timeoutMs: e = 4e3, log: n = "warn" } = {}) {
|
|
20
|
+
if (typeof window > "u" || typeof document > "u") return console.warn("SVG export only works in the browser."), null;
|
|
21
|
+
let r = performance.now() + e, a = () => {
|
|
22
|
+
let e = i(x);
|
|
23
|
+
return e && document.contains(e) ? e : null;
|
|
24
|
+
}, o = a();
|
|
25
|
+
if (o) return o;
|
|
26
|
+
let s = !1, c = (e) => {
|
|
27
|
+
if (!s && e) try {
|
|
28
|
+
e.disconnect();
|
|
29
|
+
} catch {}
|
|
30
|
+
s = !0;
|
|
31
|
+
}, l, u = new Promise((e) => {
|
|
32
|
+
try {
|
|
33
|
+
l = new MutationObserver(() => {
|
|
34
|
+
let t = a();
|
|
35
|
+
t && (c(l), e(t));
|
|
36
|
+
}), l.observe(document.documentElement, {
|
|
37
|
+
childList: !0,
|
|
38
|
+
subtree: !0
|
|
39
|
+
});
|
|
40
|
+
} catch {
|
|
41
|
+
e(null);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
for (; performance.now() < r;) {
|
|
45
|
+
let e = await Promise.race([u, new Promise((e) => requestAnimationFrame(e))]);
|
|
46
|
+
if (await t(), o = a() || e, o) return c(l), o;
|
|
47
|
+
}
|
|
48
|
+
return c(l), console.warn("SVG element not found or not mounted (timed out)."), null;
|
|
49
|
+
}
|
|
50
|
+
n(async () => {
|
|
51
|
+
try {
|
|
52
|
+
await T(), S.value = !0;
|
|
53
|
+
} catch {
|
|
54
|
+
S.value = !1;
|
|
55
|
+
}
|
|
56
|
+
}), a(x, async () => {
|
|
57
|
+
try {
|
|
58
|
+
await T(), S.value = !0;
|
|
59
|
+
} catch {
|
|
60
|
+
S.value = !1;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
let E = /* @__PURE__ */ new Map();
|
|
64
|
+
function D(e) {
|
|
65
|
+
if (E.has(e)) return E.get(e);
|
|
66
|
+
let t = f("svg");
|
|
67
|
+
t.setAttribute("width", "0"), t.setAttribute("height", "0"), t.style.position = "absolute", t.style.left = "-99999px", t.style.top = "-99999px";
|
|
68
|
+
let n = f(e);
|
|
69
|
+
t.appendChild(n), document.body.appendChild(t);
|
|
70
|
+
let r = window.getComputedStyle(n), i = {};
|
|
71
|
+
for (let e of C) i[e] = r.getPropertyValue(e);
|
|
72
|
+
return document.body.removeChild(t), E.set(e, i), i;
|
|
73
|
+
}
|
|
74
|
+
function O(e) {
|
|
75
|
+
let t = u(e), n = D(e.tagName.toLowerCase()), r = [];
|
|
76
|
+
for (let e of C) {
|
|
77
|
+
let i = t.getPropertyValue(e) || "", a = n[e] || "";
|
|
78
|
+
if (w.has(e)) {
|
|
79
|
+
e === "font-family" && i && (i = p(i)), i && r.push(`${e}:${i};`);
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
i && i !== a && r.push(`${e}:${i};`);
|
|
83
|
+
}
|
|
84
|
+
return r.join("");
|
|
85
|
+
}
|
|
86
|
+
function k(e, t) {
|
|
87
|
+
e.getAttribute("width") && t.setAttribute("width", e.getAttribute("width")), e.getAttribute("height") && t.setAttribute("height", e.getAttribute("height")), e.getAttribute("viewBox") && t.setAttribute("viewBox", e.getAttribute("viewBox"));
|
|
88
|
+
let n = [e, ...Array.from(e.querySelectorAll("*"))], r = [t, ...Array.from(t.querySelectorAll("*"))];
|
|
89
|
+
for (let e = 0; e < n.length; e += 1) {
|
|
90
|
+
let t = n[e], i = r[e], a = O(t);
|
|
91
|
+
a && i.setAttribute("style", a), [
|
|
92
|
+
"fill",
|
|
93
|
+
"stroke",
|
|
94
|
+
"filter",
|
|
95
|
+
"clip-path",
|
|
96
|
+
"mask"
|
|
97
|
+
].forEach((e) => {
|
|
98
|
+
let n = t.getAttribute(e);
|
|
99
|
+
n && i.setAttribute(e, n);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function A(e) {
|
|
104
|
+
let t = e.getAttribute("viewBox");
|
|
105
|
+
if (!t) return null;
|
|
106
|
+
let [n, r, i, a] = t.split(/\s+|,/).map(Number);
|
|
107
|
+
return [
|
|
108
|
+
n,
|
|
109
|
+
r,
|
|
110
|
+
i,
|
|
111
|
+
a
|
|
112
|
+
].some((e) => Number.isNaN(e)) ? null : {
|
|
113
|
+
minX: n,
|
|
114
|
+
minY: r,
|
|
115
|
+
width: i,
|
|
116
|
+
height: a
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function j(e) {
|
|
120
|
+
e.getAttribute("xmlns") || e.setAttribute("xmlns", o), e.getAttribute("xmlns:xlink") || e.setAttribute("xmlns:xlink", s), e.getAttribute("xml:space") || e.setAttribute("xml:space", "preserve");
|
|
121
|
+
}
|
|
122
|
+
function M(e) {
|
|
123
|
+
let t = document.createElement("div");
|
|
124
|
+
return t.style.position = "absolute", t.style.left = "-99999px", t.style.top = "-99999px", t.style.width = "0", t.style.height = "0", document.body.appendChild(t), t.appendChild(e), t;
|
|
125
|
+
}
|
|
126
|
+
function N(e) {
|
|
127
|
+
try {
|
|
128
|
+
e.remove();
|
|
129
|
+
} catch {}
|
|
130
|
+
}
|
|
131
|
+
function P(e, t, n, r, i) {
|
|
132
|
+
if (!l.value || !l.value.text) return 0;
|
|
133
|
+
let a = {
|
|
134
|
+
text: l.value.text || "",
|
|
135
|
+
color: l.value.color || "#111",
|
|
136
|
+
fontSize: l.value.fontSize || 20,
|
|
137
|
+
bold: !!l.value.bold,
|
|
138
|
+
textAlign: (l.value?.textAlign || "center").toLowerCase(),
|
|
139
|
+
paddingLeft: l.value.paddingLeft ?? 0,
|
|
140
|
+
paddingRight: l.value.paddingRight ?? 0,
|
|
141
|
+
subtitle: l.value.subtitle || null
|
|
142
|
+
}, o = f("g");
|
|
143
|
+
o.setAttribute("id", "__vdu_export_title"), e.appendChild(o);
|
|
144
|
+
let s = n + a.paddingLeft, c = n + t - (a.paddingRight || 0), u = n + t / 2, d = "start", p = s;
|
|
145
|
+
a.textAlign === "center" ? (d = "middle", p = u) : a.textAlign === "right" && (d = "end", p = c);
|
|
146
|
+
let m = r, h = Math.round(a.fontSize * .4), g = f("text");
|
|
147
|
+
g.setAttribute("x", String(p)), g.setAttribute("y", String(m + a.fontSize)), g.setAttribute("text-anchor", d), g.setAttribute("dominant-baseline", "ideographic"), g.setAttribute("style", `font-family:${i}; font-size:${a.fontSize}px; font-weight:${a.bold ? "700" : "400"}; fill:${a.color}; ${y ? "transform: scale(0.65, 1); transform-origin: center;" : ""}`), g.textContent = a.text, o.appendChild(g);
|
|
148
|
+
let _ = a.fontSize;
|
|
149
|
+
if (a.subtitle && a.subtitle.text) {
|
|
150
|
+
let e = {
|
|
151
|
+
color: a.subtitle.color || "#666",
|
|
152
|
+
text: a.subtitle.text,
|
|
153
|
+
fontSize: a.subtitle.fontSize || Math.max(12, Math.round(a.fontSize * .8)),
|
|
154
|
+
bold: !!a.subtitle.bold
|
|
155
|
+
}, t = f("text");
|
|
156
|
+
t.setAttribute("x", String(p)), t.setAttribute("y", String(m + a.fontSize + h + e.fontSize)), t.setAttribute("text-anchor", d), t.setAttribute("dominant-baseline", "ideographic"), t.setAttribute("style", `font-family:${i}; font-size:${e.fontSize}px; font-weight:${e.bold ? "600" : "400"}; fill:${e.color}; ${y ? "transform: scale(0.65, 1); transform-origin: center;" : ""}`), t.textContent = e.text, o.appendChild(t), _ += h + e.fontSize;
|
|
157
|
+
}
|
|
158
|
+
return _ + Math.round(a.fontSize * .4);
|
|
159
|
+
}
|
|
160
|
+
function F(e, t, n, r, i) {
|
|
161
|
+
if (!m.value || !m.value.show || !Array.isArray(_.value) || !_.value.length) return 0;
|
|
162
|
+
let a = {
|
|
163
|
+
bold: !!m.value.bold,
|
|
164
|
+
backgroundColor: m.value.backgroundColor || "transparent",
|
|
165
|
+
color: m.value.color || "#111",
|
|
166
|
+
fontSize: m.value.fontSize || 14,
|
|
167
|
+
paddingX: 14,
|
|
168
|
+
paddingY: 10,
|
|
169
|
+
itemGapX: 18,
|
|
170
|
+
itemGapY: 12,
|
|
171
|
+
markerSize: Math.max(8, Math.round((m.value.fontSize || 14) * .9)),
|
|
172
|
+
markerTextGap: 8,
|
|
173
|
+
lineHeight: Math.round((m.value.fontSize || 14) * 1.2),
|
|
174
|
+
maxWidth: t
|
|
175
|
+
}, o = f("g");
|
|
176
|
+
o.setAttribute("id", "__vdu_export_legend"), o.setAttribute("transform", `translate(${n}, ${r})`), e.appendChild(o);
|
|
177
|
+
let s = f("rect");
|
|
178
|
+
s.setAttribute("rx", "6"), s.setAttribute("ry", "6"), s.setAttribute("fill", a.backgroundColor), o.appendChild(s);
|
|
179
|
+
let c = f("g");
|
|
180
|
+
o.appendChild(c);
|
|
181
|
+
let l = f("text");
|
|
182
|
+
l.setAttribute("x", "0"), l.setAttribute("y", "0"), l.setAttribute("style", `font-family:${i}; font-size:${a.fontSize}px; font-weight:${a.bold ? "600" : "400"}; opacity:0;`), c.appendChild(l);
|
|
183
|
+
let u = (e) => (l.textContent = e || "", l.getComputedTextLength()), d = Math.max(1, a.maxWidth - a.paddingX * 2);
|
|
184
|
+
function p(e, t) {
|
|
185
|
+
let n = String(e || "").split(/\s+/).filter(Boolean), r = [];
|
|
186
|
+
if (!n.length) return [""];
|
|
187
|
+
let i = n.shift();
|
|
188
|
+
for (; n.length;) {
|
|
189
|
+
let e = `${i} ${n[0]}`;
|
|
190
|
+
if (u(e) <= t) i = e, n.shift();
|
|
191
|
+
else if (u(i) > t && i.length > 1) {
|
|
192
|
+
let e = "";
|
|
193
|
+
for (let n of i) {
|
|
194
|
+
let r = e + n;
|
|
195
|
+
if (u(r) <= t) e = r;
|
|
196
|
+
else break;
|
|
197
|
+
}
|
|
198
|
+
let a = i.slice(e.length);
|
|
199
|
+
r.push(e), i = a.length ? a : n.shift() || "";
|
|
200
|
+
} else r.push(i), i = n.shift() || "";
|
|
201
|
+
}
|
|
202
|
+
i && r.push(i);
|
|
203
|
+
let a = r[r.length - 1] || "";
|
|
204
|
+
if (u(a) > t && a.length > 1) {
|
|
205
|
+
let e = "";
|
|
206
|
+
for (let n of a) {
|
|
207
|
+
let r = e + n;
|
|
208
|
+
if (u(r) <= t) e = r;
|
|
209
|
+
else break;
|
|
210
|
+
}
|
|
211
|
+
let n = a.slice(e.length);
|
|
212
|
+
r[r.length - 1] = e, n && r.push(n);
|
|
213
|
+
}
|
|
214
|
+
return r;
|
|
215
|
+
}
|
|
216
|
+
let h = Math.PI / 180;
|
|
217
|
+
function g(e, t, n, r, i = -90) {
|
|
218
|
+
let a = i * h, o = "";
|
|
219
|
+
for (let i = 0; i < n; i += 1) {
|
|
220
|
+
let s = a + i * 2 * Math.PI / n, c = e + Math.cos(s) * r, l = t + Math.sin(s) * r;
|
|
221
|
+
o += (i === 0 ? "M" : "L") + c + "," + l;
|
|
222
|
+
}
|
|
223
|
+
return o + "Z";
|
|
224
|
+
}
|
|
225
|
+
function v(e, t, n = 5, r, i) {
|
|
226
|
+
let a = -90 * h, o = "";
|
|
227
|
+
for (let s = 0; s < n * 2; s += 1) {
|
|
228
|
+
let c = s % 2 == 0 ? r : i, l = a + s * Math.PI / n, u = e + Math.cos(l) * c, d = t + Math.sin(l) * c;
|
|
229
|
+
o += (s === 0 ? "M" : "L") + u + "," + d;
|
|
230
|
+
}
|
|
231
|
+
return o + "Z";
|
|
232
|
+
}
|
|
233
|
+
let y = _.value.map((e) => {
|
|
234
|
+
let t = Math.max(1, d - (a.markerSize + a.markerTextGap)), n = p(e.name || "", t), r = Math.max(...n.map(u), 0), i = a.markerSize + a.markerTextGap + r, o = Math.max(a.markerSize, n.length * a.lineHeight);
|
|
235
|
+
return {
|
|
236
|
+
...e,
|
|
237
|
+
lines: n,
|
|
238
|
+
itemW: i,
|
|
239
|
+
itemH: o
|
|
240
|
+
};
|
|
241
|
+
}), b = [], x = {
|
|
242
|
+
items: [],
|
|
243
|
+
width: 0,
|
|
244
|
+
height: 0
|
|
245
|
+
};
|
|
246
|
+
for (let e of y) {
|
|
247
|
+
let t = (x.items.length ? a.itemGapX : 0) + e.itemW;
|
|
248
|
+
x.items.length && x.width + t > d ? (b.push(x), x = {
|
|
249
|
+
items: [e],
|
|
250
|
+
width: e.itemW,
|
|
251
|
+
height: e.itemH
|
|
252
|
+
}) : (x.items.push(e), x.width += t, x.height = Math.max(x.height, e.itemH));
|
|
253
|
+
}
|
|
254
|
+
x.items.length && b.push(x);
|
|
255
|
+
let S = a.paddingY;
|
|
256
|
+
for (let e of b) {
|
|
257
|
+
let t = Math.max(a.paddingX, (a.maxWidth - e.width) / 2);
|
|
258
|
+
for (let n = 0; n < e.items.length; n += 1) {
|
|
259
|
+
let r = e.items[n], o = t + a.markerSize / 2, s = S + e.height / 2.5, l = a.markerSize / 2, u = String(r.shape || "rect").toLowerCase();
|
|
260
|
+
if (u === "circle") {
|
|
261
|
+
let e = f("circle");
|
|
262
|
+
e.setAttribute("cx", String(o)), e.setAttribute("cy", String(s)), e.setAttribute("r", String(l * .8)), e.setAttribute("fill", r.color || "#000"), c.appendChild(e);
|
|
263
|
+
} else if (u === "rect" || u === "square") {
|
|
264
|
+
let e = f("path");
|
|
265
|
+
e.setAttribute("d", g(o, s, 4, l, -45)), e.setAttribute("fill", r.color || "#000"), c.appendChild(e);
|
|
266
|
+
} else if (u === "diamond") {
|
|
267
|
+
let e = f("path");
|
|
268
|
+
e.setAttribute("d", g(o, s, 4, l, 45)), e.setAttribute("fill", r.color || "#000"), c.appendChild(e);
|
|
269
|
+
} else if (u === "triangle") {
|
|
270
|
+
let e = f("path");
|
|
271
|
+
e.setAttribute("d", g(o, s, 3, l, -90)), e.setAttribute("fill", r.color || "#000"), c.appendChild(e);
|
|
272
|
+
} else if (u === "pentagon") {
|
|
273
|
+
let e = f("path");
|
|
274
|
+
e.setAttribute("d", g(o, s, 5, l, -90)), e.setAttribute("fill", r.color || "#000"), c.appendChild(e);
|
|
275
|
+
} else if (u === "hexagon") {
|
|
276
|
+
let e = f("path");
|
|
277
|
+
e.setAttribute("d", g(o, s, 6, l, 0)), e.setAttribute("fill", r.color || "#000"), c.appendChild(e);
|
|
278
|
+
} else if (u === "star") {
|
|
279
|
+
let e = f("path"), t = l, n = l * .5;
|
|
280
|
+
e.setAttribute("d", v(o, s, 5, t, n)), e.setAttribute("fill", r.color || "#000"), c.appendChild(e);
|
|
281
|
+
} else {
|
|
282
|
+
let n = f("rect");
|
|
283
|
+
n.setAttribute("x", String(t)), n.setAttribute("y", String(S + (e.height - a.markerSize) / 2)), n.setAttribute("width", String(a.markerSize)), n.setAttribute("height", String(a.markerSize)), n.setAttribute("fill", r.color || "#000"), c.appendChild(n);
|
|
284
|
+
}
|
|
285
|
+
let d = t + a.markerSize + a.markerTextGap, p = S + (e.height - r.lines.length * a.lineHeight) / 2 + a.fontSize, m = f("text");
|
|
286
|
+
m.setAttribute("x", String(d)), m.setAttribute("y", String(p)), m.setAttribute("style", `font-family:${i}; font-size:${a.fontSize}px; font-weight:${a.bold ? "600" : "400"}; fill:${a.color};`), m.setAttribute("dominant-baseline", "ideographic");
|
|
287
|
+
let h = !0;
|
|
288
|
+
for (let e of r.lines) {
|
|
289
|
+
let t = f("tspan");
|
|
290
|
+
h || t.setAttribute("dy", String(a.lineHeight)), t.setAttribute("x", String(d)), t.textContent = e, m.appendChild(t), h = !1;
|
|
291
|
+
}
|
|
292
|
+
c.appendChild(m), t += r.itemW + (n < e.items.length - 1 ? a.itemGapX : 0);
|
|
293
|
+
}
|
|
294
|
+
S += e.height + a.itemGapY;
|
|
295
|
+
}
|
|
296
|
+
b.length && (S -= a.itemGapY);
|
|
297
|
+
let C = S + a.paddingY;
|
|
298
|
+
return s.setAttribute("x", "0"), s.setAttribute("y", "0"), s.setAttribute("width", String(a.maxWidth)), s.setAttribute("height", String(C)), l.remove(), C + Math.round(a.fontSize * .4);
|
|
299
|
+
}
|
|
300
|
+
function I(e) {
|
|
301
|
+
let t = e.cloneNode(!0);
|
|
302
|
+
return t.querySelectorAll("script").forEach((e) => e.remove()), k(e, t), j(t), t;
|
|
303
|
+
}
|
|
304
|
+
function L(e) {
|
|
305
|
+
let t = Array.from(e.childNodes).filter((e) => e.nodeType === 1 && e.nodeName.toLowerCase() === "defs"), n = Array.from(e.childNodes).filter((e) => !(e.nodeType === 1 && e.nodeName.toLowerCase() === "defs")), r = document.createElementNS(o, "g");
|
|
306
|
+
r.setAttribute("id", "__vdu_export_content");
|
|
307
|
+
for (let e of n) r.appendChild(e);
|
|
308
|
+
for (let n of t) e.appendChild(n);
|
|
309
|
+
return e.appendChild(r), r;
|
|
310
|
+
}
|
|
311
|
+
function R(e, t) {
|
|
312
|
+
t <= 0 || e.setAttribute("transform", `translate(0, ${t})`);
|
|
313
|
+
}
|
|
314
|
+
function z(e, t) {
|
|
315
|
+
if (t <= 0) return;
|
|
316
|
+
let n = A(e), r = e.getAttribute("height");
|
|
317
|
+
if (n) e.setAttribute("viewBox", `${n.minX} ${n.minY} ${n.width} ${n.height + t}`), r && e.setAttribute("height", String(Number(r) + t));
|
|
318
|
+
else if (r) e.setAttribute("height", String(Number(r) + t));
|
|
319
|
+
else {
|
|
320
|
+
let n = e.getBBox();
|
|
321
|
+
e.setAttribute("viewBox", `0 0 ${Math.max(1, n.width)} ${Math.max(1, n.height + t)}`);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
function B(e) {
|
|
325
|
+
let t = A(e);
|
|
326
|
+
if (t) return t.width;
|
|
327
|
+
let n = Number(e.getAttribute("width"));
|
|
328
|
+
return !Number.isNaN(n) && n > 0 ? n : e.getBBox().width || 0;
|
|
329
|
+
}
|
|
330
|
+
function V(e) {
|
|
331
|
+
let t = A(e);
|
|
332
|
+
if (t) return t.height;
|
|
333
|
+
let n = Number(e.getAttribute("height"));
|
|
334
|
+
return !Number.isNaN(n) && n > 0 ? n : e.getBBox().height || 0;
|
|
335
|
+
}
|
|
336
|
+
async function H(e) {
|
|
337
|
+
let t = M(e);
|
|
338
|
+
d();
|
|
339
|
+
try {
|
|
340
|
+
if (document.fonts?.ready) try {
|
|
341
|
+
await Promise.race([document.fonts.ready, new Promise((e) => setTimeout(e, 4e3))]);
|
|
342
|
+
} catch {}
|
|
343
|
+
let t = L(e), n = A(e), r = n ? n.minX : 0, i = n ? n.minY : 0, a = Math.max(1, B(e)), o = Math.max(1, V(e)), s = p(u(e).getPropertyValue("font-family") || ""), c = (b ? null : P(e, a, r, i, s)) ?? 0, d = m && m.value && m.value.position ? String(m.value.position).toLowerCase() : "top";
|
|
344
|
+
m && m.value && m.value.show && d === "top" && (c += F(e, a, r, i + c, s)), R(t, c);
|
|
345
|
+
let f = 0;
|
|
346
|
+
m && m.value && m.value.show && d === "bottom" && (f += F(e, a, r, i + c + o, s)), z(e, c + f), e.style.backgroundColor = v.value ?? "#FFF", await g(e, { mode: "raster" }), h(e, l.value.text ? -6 : -48);
|
|
347
|
+
} finally {
|
|
348
|
+
N(t), d();
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
async function U() {
|
|
352
|
+
let e = I(await T());
|
|
353
|
+
await H(e);
|
|
354
|
+
let t = `<?xml version="1.0" standalone="no"?>\n${new XMLSerializer().serializeToString(e)}`, n = new Blob([t], { type: "image/svg+xml;charset=utf-8" });
|
|
355
|
+
return {
|
|
356
|
+
blob: n,
|
|
357
|
+
url: URL.createObjectURL(n),
|
|
358
|
+
text: t,
|
|
359
|
+
dataUrl: `data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
async function W(e) {
|
|
363
|
+
let { url: t } = await U(), n = e || l.value?.text || "chart", r = document.createElement("a");
|
|
364
|
+
r.href = t, r.download = n.endsWith(".svg") ? n : `${n}.svg`, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(t);
|
|
365
|
+
}
|
|
366
|
+
return {
|
|
367
|
+
ready: S,
|
|
368
|
+
getSvg: U,
|
|
369
|
+
exportSvg: W
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
function h(e, t = -50) {
|
|
373
|
+
if (!t) return;
|
|
374
|
+
let n = e.getAttribute("viewBox"), r = (t) => {
|
|
375
|
+
if (!t) return;
|
|
376
|
+
let n = e.getAttribute("height");
|
|
377
|
+
if (!n) return;
|
|
378
|
+
let r = /^(\d+(\.\d+)?)(px)?$/.exec(n.trim());
|
|
379
|
+
if (!r) return;
|
|
380
|
+
let i = parseFloat(r[1]) || 0, a = Math.max(1, i + t);
|
|
381
|
+
e.setAttribute("height", String(a));
|
|
382
|
+
};
|
|
383
|
+
if (n) {
|
|
384
|
+
let i = n.trim().split(/\s+|,/).map(Number);
|
|
385
|
+
if (i.length !== 4 || i.some((e) => !Number.isFinite(e))) return;
|
|
386
|
+
let [a, o, s, c] = i, l = o + t, u = -t, d = Math.max(1, c + u);
|
|
387
|
+
e.setAttribute("viewBox", `${a} ${l} ${s} ${d}`), r(u);
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
let i = Number(e.getAttribute("width")), a = Number(e.getAttribute("height"));
|
|
391
|
+
if (!(i > 0 && a > 0)) {
|
|
392
|
+
let t = e.getBBox();
|
|
393
|
+
i = Math.max(1, t.width || 1), a = Math.max(1, t.height || 1);
|
|
394
|
+
}
|
|
395
|
+
let o = t, s = -t, c = Math.max(1, a + s);
|
|
396
|
+
e.setAttribute("viewBox", `0 ${o} ${i} ${c}`), (function() {
|
|
397
|
+
let t = e.getAttribute("height");
|
|
398
|
+
if (!t) return;
|
|
399
|
+
let n = /^(\d+(\.\d+)?)(px)?$/.exec(t.trim());
|
|
400
|
+
if (!n) return;
|
|
401
|
+
let r = parseFloat(n[1]) || 0, i = Math.max(1, r + s);
|
|
402
|
+
e.setAttribute("height", String(i));
|
|
403
|
+
})();
|
|
404
|
+
}
|
|
405
|
+
async function g(e, { mode: t = "raster" } = {}) {
|
|
406
|
+
let n = Array.from(e.querySelectorAll("foreignObject"));
|
|
407
|
+
if (!n.length) return {
|
|
408
|
+
converted: 0,
|
|
409
|
+
rasterized: 0,
|
|
410
|
+
skipped: 0,
|
|
411
|
+
errors: 0
|
|
412
|
+
};
|
|
413
|
+
let r = 0, i = 0, a = 0, c = 0, l = (e) => [
|
|
414
|
+
"div",
|
|
415
|
+
"p",
|
|
416
|
+
"span",
|
|
417
|
+
"strong",
|
|
418
|
+
"em",
|
|
419
|
+
"b",
|
|
420
|
+
"i",
|
|
421
|
+
"br"
|
|
422
|
+
].includes(e), d = (e) => {
|
|
423
|
+
try {
|
|
424
|
+
let t = e.firstElementChild;
|
|
425
|
+
if (!t) return !1;
|
|
426
|
+
let n = [t];
|
|
427
|
+
for (; n.length;) {
|
|
428
|
+
let e = n.pop();
|
|
429
|
+
if (e.nodeType !== 3) {
|
|
430
|
+
if (e.nodeType !== 1 || !l((e.tagName || "").toLowerCase()) || e.querySelector?.("img,svg,canvas,video,foreignObject")) return !1;
|
|
431
|
+
for (let t of Array.from(e.childNodes)) n.push(t);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
return !0;
|
|
435
|
+
} catch {
|
|
436
|
+
return !1;
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
function f(e) {
|
|
440
|
+
try {
|
|
441
|
+
let t = e.firstElementChild;
|
|
442
|
+
if (!t) return null;
|
|
443
|
+
let n = (e, t = 0) => Number.isFinite(+e) ? +e : t, r = n(e.getAttribute("x"), 0), i = n(e.getAttribute("y"), 0), a = n(e.getAttribute("width"), NaN);
|
|
444
|
+
if (!Number.isFinite(a) || a <= 0) {
|
|
445
|
+
let t = e.getBBox?.();
|
|
446
|
+
a = Math.max(1, n(t?.width, 0));
|
|
447
|
+
}
|
|
448
|
+
let s = (e, t) => {
|
|
449
|
+
if (!e) return Math.round(t * 1.2);
|
|
450
|
+
let n = e.trim().toLowerCase();
|
|
451
|
+
if (n === "normal") return Math.round(t * 1.2);
|
|
452
|
+
if (n.endsWith("px")) return parseFloat(n) || Math.round(t * 1.2);
|
|
453
|
+
if (n.endsWith("%")) return parseFloat(n) / 100 * t || Math.round(t * 1.2);
|
|
454
|
+
if (n.endsWith("em")) return (parseFloat(n) || 1) * t;
|
|
455
|
+
if (n.endsWith("rem")) {
|
|
456
|
+
let e = parseFloat(getComputedStyle(document.documentElement).fontSize) || t;
|
|
457
|
+
return (parseFloat(n) || 1) * e;
|
|
458
|
+
}
|
|
459
|
+
let r = Number(n);
|
|
460
|
+
return Number.isFinite(r) ? r * t : Math.round(t * 1.2);
|
|
461
|
+
}, c = (e) => {
|
|
462
|
+
let t = (e || "").split(/\s+/).map((e) => {
|
|
463
|
+
let t = (e || "").trim().toLowerCase();
|
|
464
|
+
if (t.endsWith("px")) return parseFloat(t) || 0;
|
|
465
|
+
if (t.endsWith("rem")) {
|
|
466
|
+
let e = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
467
|
+
return (parseFloat(t) || 0) * e;
|
|
468
|
+
}
|
|
469
|
+
if (t.endsWith("em")) {
|
|
470
|
+
let e = parseFloat(getComputedStyle(document.body).fontSize) || 16;
|
|
471
|
+
return (parseFloat(t) || 0) * e;
|
|
472
|
+
}
|
|
473
|
+
let n = Number(t);
|
|
474
|
+
return Number.isFinite(n) ? n : 0;
|
|
475
|
+
}).filter(Number.isFinite);
|
|
476
|
+
return t.length ? t.length === 1 ? [
|
|
477
|
+
t[0],
|
|
478
|
+
t[0],
|
|
479
|
+
t[0],
|
|
480
|
+
t[0]
|
|
481
|
+
] : t.length === 2 ? [
|
|
482
|
+
t[0],
|
|
483
|
+
t[1],
|
|
484
|
+
t[0],
|
|
485
|
+
t[1]
|
|
486
|
+
] : t.length === 3 ? [
|
|
487
|
+
t[0],
|
|
488
|
+
t[1],
|
|
489
|
+
t[2],
|
|
490
|
+
t[1]
|
|
491
|
+
] : [
|
|
492
|
+
t[0],
|
|
493
|
+
t[1],
|
|
494
|
+
t[2],
|
|
495
|
+
t[3]
|
|
496
|
+
] : [
|
|
497
|
+
0,
|
|
498
|
+
0,
|
|
499
|
+
0,
|
|
500
|
+
0
|
|
501
|
+
];
|
|
502
|
+
}, l = (e, t) => {
|
|
503
|
+
let n = u(e), r = n.getPropertyValue("font-family") || t?.ff || "system-ui";
|
|
504
|
+
r = p(r);
|
|
505
|
+
let i = parseFloat(n.getPropertyValue("font-size"));
|
|
506
|
+
Number.isFinite(i) || (i = t?.fs || 14);
|
|
507
|
+
let a = n.getPropertyValue("font-weight") || t?.fw || "400", o = n.getPropertyValue("font-style") || t?.fsty || "normal", l = n.getPropertyValue("font-stretch") || t?.fstc || "normal", d = n.getPropertyValue("letter-spacing") || t?.lsp || "normal", f = n.getPropertyValue("word-spacing") || t?.wsp || "0px", m = n.getPropertyValue("font-kerning") || t?.kern || "auto", h = n.getPropertyValue("font-variant-ligatures") || t?.liga || "normal", g = n.getPropertyValue("text-transform") || t?.ttfm || "none", _ = n.getPropertyValue("color") || t?.fill || "#000", v = n.getPropertyValue("line-height"), y = !v || v.trim().toLowerCase() === "normal" ? t?.lh ?? Math.round(i * 1.2) : s(v, i), b = (n.getPropertyValue("text-align") || t?.ta || "start").trim().toLowerCase(), x = parseFloat(n.getPropertyValue("padding-top")) || 0, S = parseFloat(n.getPropertyValue("padding-right")) || 0, C = parseFloat(n.getPropertyValue("padding-bottom")) || 0, w = parseFloat(n.getPropertyValue("padding-left")) || 0, T = n.getPropertyValue("padding");
|
|
508
|
+
if (T && x === 0 && S === 0 && C === 0 && w === 0) {
|
|
509
|
+
let [e, t, n, r] = c(T);
|
|
510
|
+
x = e, S = t, C = n, w = r;
|
|
511
|
+
}
|
|
512
|
+
let E = parseFloat(n.getPropertyValue("border-left-width")) || 0, D = parseFloat(n.getPropertyValue("border-right-width")) || 0, O = n.getPropertyValue("box-sizing") || "content-box";
|
|
513
|
+
return {
|
|
514
|
+
ff: r,
|
|
515
|
+
fs: i,
|
|
516
|
+
fw: a,
|
|
517
|
+
fsty: o,
|
|
518
|
+
fstc: l,
|
|
519
|
+
lsp: d,
|
|
520
|
+
wsp: f,
|
|
521
|
+
kern: m,
|
|
522
|
+
liga: h,
|
|
523
|
+
ttfm: g,
|
|
524
|
+
fill: _,
|
|
525
|
+
lh: y,
|
|
526
|
+
ta: b,
|
|
527
|
+
padL: w,
|
|
528
|
+
padR: S,
|
|
529
|
+
padT: x,
|
|
530
|
+
padB: C,
|
|
531
|
+
bL: E,
|
|
532
|
+
bR: D,
|
|
533
|
+
box: O
|
|
534
|
+
};
|
|
535
|
+
}, d = (e) => /^(div|p|section|article|ul|ol|li|h[1-6])$/.test(e), f = { __para__: !0 }, m = { __br__: !0 }, h = [], g = l(t), _ = (e, t, n) => {
|
|
536
|
+
if (e.nodeType === 3) {
|
|
537
|
+
let r = (e.nodeValue || "").replace(/\s+/g, " ").trim();
|
|
538
|
+
r && h.push({
|
|
539
|
+
text: r,
|
|
540
|
+
style: t,
|
|
541
|
+
path: n.slice()
|
|
542
|
+
});
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
if (e.nodeType !== 1) return;
|
|
546
|
+
let r = e.tagName.toLowerCase();
|
|
547
|
+
if (r === "br") {
|
|
548
|
+
h.push({
|
|
549
|
+
...m,
|
|
550
|
+
path: n.slice()
|
|
551
|
+
});
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
554
|
+
let i = l(e, t);
|
|
555
|
+
n.push(e);
|
|
556
|
+
for (let t of Array.from(e.childNodes)) _(t, i, n);
|
|
557
|
+
n.pop(), d(r) && h.push({
|
|
558
|
+
...f,
|
|
559
|
+
path: n.slice()
|
|
560
|
+
});
|
|
561
|
+
};
|
|
562
|
+
for (_(t, g, [t]); h.length && (h.at(-1).__para__ || h.at(-1).__br__);) h.pop();
|
|
563
|
+
if (!h.length) return null;
|
|
564
|
+
let v = h.filter((e) => !e.__para__ && !e.__br__), y = (() => {
|
|
565
|
+
if (!v.length) return [t];
|
|
566
|
+
let e = v.map((e) => e.path), n = Math.min(...e.map((e) => e.length)), r = 0;
|
|
567
|
+
for (; r < n;) {
|
|
568
|
+
let t = e[0][r];
|
|
569
|
+
if (e.every((e) => e[r] === t)) r += 1;
|
|
570
|
+
else break;
|
|
571
|
+
}
|
|
572
|
+
return e[0].slice(0, Math.max(1, r));
|
|
573
|
+
})(), b = l(y[y.length - 1] || t), x = 0, S = 0, C = 0;
|
|
574
|
+
for (let e of y) {
|
|
575
|
+
let t = l(e);
|
|
576
|
+
x += t.padL, S += t.padR, C += t.padT;
|
|
577
|
+
}
|
|
578
|
+
let w = [Math.max(1, a - x - S)];
|
|
579
|
+
for (let e of y) try {
|
|
580
|
+
let t = u(e);
|
|
581
|
+
if (e.clientWidth && e.clientWidth > 0) {
|
|
582
|
+
let n = parseFloat(t.paddingLeft) || 0, r = parseFloat(t.paddingRight) || 0, i = Math.max(1, e.clientWidth - n - r);
|
|
583
|
+
w.push(i);
|
|
584
|
+
}
|
|
585
|
+
let n = t.width, r = parseFloat(n);
|
|
586
|
+
if (Number.isFinite(r) && r > 0) {
|
|
587
|
+
let e = t.boxSizing || t.getPropertyValue("box-sizing") || "content-box", n = parseFloat(t.paddingLeft) || 0, i = parseFloat(t.paddingRight) || 0, a = parseFloat(t.borderLeftWidth) || 0, o = parseFloat(t.borderRightWidth) || 0, s = e === "border-box" ? Math.max(1, r - n - i - a - o) : Math.max(1, r);
|
|
588
|
+
w.push(s);
|
|
589
|
+
}
|
|
590
|
+
} catch {}
|
|
591
|
+
let T = Math.floor(Math.min(...w.filter(Number.isFinite))) - 1;
|
|
592
|
+
T > 0 || (T = 1);
|
|
593
|
+
let E = "start", D = r + x;
|
|
594
|
+
b.ta === "center" ? (E = "middle", D = r + x + T / 2) : (b.ta === "right" || b.ta === "end") && (E = "end", D = r + (a - S));
|
|
595
|
+
let O = e.ownerSVGElement || e.closest("svg"), k = document.createElementNS(o, "text");
|
|
596
|
+
k.setAttribute("x", String(D)), k.setAttribute("y", String(i + C)), k.setAttribute("text-anchor", E), k.setAttribute("dominant-baseline", "text-before-edge"), k.setAttribute("xml:space", "preserve");
|
|
597
|
+
let A = document.createElementNS(o, "text");
|
|
598
|
+
A.setAttribute("x", "0"), A.setAttribute("y", "0"), A.setAttribute("opacity", "0"), (O || e).appendChild(A);
|
|
599
|
+
let j = (e) => `font-family:${e.ff}; font-size:${e.fs}px; font-weight:${e.fw}; font-style:${e.fsty}; font-stretch:${e.fstc}; letter-spacing:${e.lsp}; word-spacing:${e.wsp}; font-kerning:${e.kern}; font-variant-ligatures:${e.liga}; text-transform:${e.ttfm};`, M = (e, t) => (A.textContent = e || "", A.setAttribute("style", j(t)), A.getComputedTextLength()), N = (e) => M(" ", e), P = [], F = [], I = 0, L = () => {
|
|
600
|
+
F.length && P.push({ segs: F.slice() }), F = [], I = 0;
|
|
601
|
+
}, R = (e, t, n) => {
|
|
602
|
+
let r = M(e, t);
|
|
603
|
+
if (n) {
|
|
604
|
+
let e = N(t);
|
|
605
|
+
r += e, F.push({
|
|
606
|
+
text: " ",
|
|
607
|
+
...t,
|
|
608
|
+
w: e,
|
|
609
|
+
isSpace: !0
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
F.push({
|
|
613
|
+
text: e,
|
|
614
|
+
...t,
|
|
615
|
+
w: r
|
|
616
|
+
}), I += r;
|
|
617
|
+
}, z = (e, t, n) => {
|
|
618
|
+
let r = "";
|
|
619
|
+
for (let i of e) {
|
|
620
|
+
let e = r + i;
|
|
621
|
+
if (M(e, t) <= n) r = e;
|
|
622
|
+
else break;
|
|
623
|
+
}
|
|
624
|
+
return r || e[0] || "";
|
|
625
|
+
};
|
|
626
|
+
for (let e of h) {
|
|
627
|
+
if (e.__para__ || e.__br__) {
|
|
628
|
+
L();
|
|
629
|
+
continue;
|
|
630
|
+
}
|
|
631
|
+
let t = e.style, n = e.text.split(/(\s+)/).filter((e) => e.length > 0), r = (e, n) => {
|
|
632
|
+
if (!e) return;
|
|
633
|
+
let r = Math.max(1, T), i = M(e, t) + (n ? N(t) : 0);
|
|
634
|
+
if (F.length === 0) if (i <= r) R(e, t, !1);
|
|
635
|
+
else {
|
|
636
|
+
let n = e;
|
|
637
|
+
for (; n;) {
|
|
638
|
+
let e = z(n, t, r);
|
|
639
|
+
R(e, t, !1), n = n.slice(e.length), n && L();
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
else if (I + i <= r) R(e, t, n);
|
|
643
|
+
else if (L(), M(e, t) <= r) R(e, t, !1);
|
|
644
|
+
else {
|
|
645
|
+
let n = e;
|
|
646
|
+
for (; n;) {
|
|
647
|
+
let e = z(n, t, r);
|
|
648
|
+
R(e, t, !1), n = n.slice(e.length), n && L();
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
}, i = !1;
|
|
652
|
+
for (let e of n) {
|
|
653
|
+
if (/^\s+$/.test(e)) {
|
|
654
|
+
i = !0;
|
|
655
|
+
continue;
|
|
656
|
+
}
|
|
657
|
+
r(e, i), i = !1;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
L();
|
|
661
|
+
for (let e = 0; e < P.length; e += 1) {
|
|
662
|
+
let t = P[e].segs, n = Math.max(...t.map((e) => e.fs || b.fs), b.fs), r = !0;
|
|
663
|
+
for (let i of t) {
|
|
664
|
+
let t = document.createElementNS(o, "tspan");
|
|
665
|
+
r &&= (t.setAttribute("x", String(D)), e > 0 && t.setAttribute("dy", String(n)), !1), t.setAttribute("style", `${j(i)} fill:${i.fill};`), t.textContent = i.text, k.appendChild(t);
|
|
666
|
+
}
|
|
667
|
+
if (!t.length && e > 0) {
|
|
668
|
+
let e = document.createElementNS(o, "tspan");
|
|
669
|
+
e.setAttribute("x", String(D)), e.setAttribute("dy", String(n)), e.textContent = "", k.appendChild(e);
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
try {
|
|
673
|
+
A.remove();
|
|
674
|
+
} catch {}
|
|
675
|
+
return k;
|
|
676
|
+
} catch {
|
|
677
|
+
return null;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
let m = (e) => {
|
|
681
|
+
try {
|
|
682
|
+
let t = document.createElement("div");
|
|
683
|
+
t.style.position = "absolute", t.style.left = "-99999px", t.style.top = "-99999px", t.style.visibility = "hidden", t.style.pointerEvents = "none", t.style.width = "auto", t.style.height = "auto";
|
|
684
|
+
let n = e.cloneNode(!0);
|
|
685
|
+
n.style.width = "auto", n.style.height = "auto", n.style.display = "inline-block", n.style.maxWidth = "none", n.style.maxHeight = "none", n.style.boxSizing = "content-box", document.body.appendChild(t), t.appendChild(n);
|
|
686
|
+
let r = n.getBoundingClientRect(), i = Math.ceil(r.width || n.scrollWidth || 0), a = Math.ceil(r.height || n.scrollHeight || 0);
|
|
687
|
+
return t.remove(), {
|
|
688
|
+
w: Math.max(1, i),
|
|
689
|
+
h: Math.max(1, a)
|
|
690
|
+
};
|
|
691
|
+
} catch {
|
|
692
|
+
return {
|
|
693
|
+
w: 0,
|
|
694
|
+
h: 0
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
};
|
|
698
|
+
for (let e of n) try {
|
|
699
|
+
if (e.hasAttribute("data-no-svg-export")) {
|
|
700
|
+
e.remove(), a += 1;
|
|
701
|
+
continue;
|
|
702
|
+
}
|
|
703
|
+
if (d(e)) {
|
|
704
|
+
let t = f(e);
|
|
705
|
+
if (t) {
|
|
706
|
+
e.parentNode.replaceChild(t, e), r += 1;
|
|
707
|
+
continue;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
a += 1;
|
|
711
|
+
} catch {
|
|
712
|
+
c += 1;
|
|
713
|
+
}
|
|
714
|
+
if (t === "raster") {
|
|
715
|
+
let t = Array.from(e.querySelectorAll("foreignObject"));
|
|
716
|
+
for (let e of t) try {
|
|
717
|
+
if (e.hasAttribute("data-no-svg-export")) {
|
|
718
|
+
e.remove(), a += 1;
|
|
719
|
+
continue;
|
|
720
|
+
}
|
|
721
|
+
await new Promise((e) => requestAnimationFrame(e));
|
|
722
|
+
let t = e.getBBox(), n = Math.max(1, Math.ceil(t.width)), r = Math.max(1, Math.ceil(t.height)), c = e.firstElementChild;
|
|
723
|
+
if (c) {
|
|
724
|
+
let t = m(c), i = parseFloat(e.getAttribute("width") || "0") || 0, a = parseFloat(e.getAttribute("height") || "0") || 0;
|
|
725
|
+
n = Math.max(n, i, t.w), r = Math.max(r, a, t.h);
|
|
726
|
+
}
|
|
727
|
+
if (!(n > 0 && r > 0)) {
|
|
728
|
+
a += 1;
|
|
729
|
+
continue;
|
|
730
|
+
}
|
|
731
|
+
let l = document.createElementNS(o, "svg");
|
|
732
|
+
l.setAttribute("xmlns", o), l.setAttribute("xmlns:xlink", s), l.setAttribute("width", String(n)), l.setAttribute("height", String(r)), l.setAttribute("viewBox", `0 0 ${n} ${r}`);
|
|
733
|
+
let u = e.cloneNode(!0);
|
|
734
|
+
u.setAttribute("x", "0"), u.setAttribute("y", "0"), u.setAttribute("width", String(n)), u.setAttribute("height", String(r)), l.appendChild(u);
|
|
735
|
+
let d = new XMLSerializer().serializeToString(l), f = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(d), p = document.createElement("canvas");
|
|
736
|
+
p.width = Math.max(1, Math.floor(n * 2)), p.height = Math.max(1, Math.floor(r * 2));
|
|
737
|
+
let h = p.getContext("2d"), g = new Image();
|
|
738
|
+
g.decoding = "sync", g.crossOrigin = "anonymous", await new Promise((e, t) => {
|
|
739
|
+
g.onload = e, g.onerror = t, g.src = f;
|
|
740
|
+
}), h.drawImage(g, 0, 0, p.width, p.height);
|
|
741
|
+
let _ = p.toDataURL("image/png"), v = document.createElementNS(o, "image");
|
|
742
|
+
v.setAttributeNS(s, "href", _), v.setAttribute("href", _), v.setAttribute("x", e.getAttribute("x") || String(t.x)), v.setAttribute("y", e.getAttribute("y") || String(t.y)), v.setAttribute("width", String(n)), v.setAttribute("height", String(r)), e.parentNode.replaceChild(v, e), i += 1;
|
|
743
|
+
} catch {
|
|
744
|
+
c += 1;
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
return {
|
|
748
|
+
converted: r,
|
|
749
|
+
rasterized: i,
|
|
750
|
+
skipped: a,
|
|
751
|
+
errors: c
|
|
752
|
+
};
|
|
753
|
+
}
|
|
754
|
+
//#endregion
|
|
755
|
+
export { m as t };
|