vue-data-ui 3.17.13 → 3.18.0
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-BU2Z7mfz.js +116 -0
- package/dist/BaseDraggableDialog-LE75fWYz.js +272 -0
- package/dist/BaseIcon-CL6Y7alf.js +499 -0
- package/dist/BaseLegendToggle-BvPOFMVZ.js +56 -0
- package/dist/BaseScanner-C7dmAref.js +27 -0
- package/dist/BaseZoomControls-DSwf4HhS.js +111 -0
- package/dist/ColorPicker-BGbMrtup.js +255 -0
- package/dist/DataTable-ZG4GX2Zg.js +150 -0
- package/dist/Legend-BPb8i4aC.js +114 -0
- package/dist/NonSvgPenAndPaper-BT3YMjgo.js +577 -0
- package/dist/PackageVersion-B1cPtZ3Q.js +11 -0
- package/dist/PenAndPaper-DxBCVZAx.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-Dbug7CtK.js +141 -0
- package/dist/Slicer-SEdaKYPX.js +1144 -0
- package/dist/SlicerPreview-BLlQTUI_.js +1523 -0
- package/dist/SparkTooltip-BaONR2nq.js +93 -0
- package/dist/Title-ByyzJzpc.js +87 -0
- package/dist/Tooltip-V6Z0Ko-1.js +307 -0
- package/dist/UserOptions-Gaw1761w.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-C9UOX1d2.js +237 -0
- package/dist/exposedLib-BQjH823l.js +19 -0
- package/dist/geoProjections-CQIkC70z.js +146 -0
- package/dist/img-NMY-_LiJ.js +74 -0
- package/dist/labelUtils-BiSegLOT.js +19 -0
- package/dist/lib-B83ZCydz.js +1879 -0
- package/dist/patternUtils-B7BWu5bV.js +258 -0
- package/dist/pdf-Ey2KFETK.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 +4766 -630
- 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-De0rTecW.js +50 -0
- package/dist/useChartAccessibility-Do37qcw2.js +12 -0
- package/dist/useConfig-KnOLHtlJ.js +7419 -0
- package/dist/useFitSvgText-C-MEdAfe.js +63 -0
- package/dist/useNestedProp-CcxL1gUU.js +10 -0
- package/dist/useObjectBindings-Dc8Rf6Qy.js +189 -0
- package/dist/usePanZoom-B-4M_gmY.js +157 -0
- package/dist/usePrefersMotion-BywLbIko.js +15 -0
- package/dist/usePrinter-CMLF900n.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-D1REqS_k.js +274 -0
- package/dist/vue-data-ui.js +76 -167
- package/dist/vue-ui-3d-bar-vO_kSCd6.js +1747 -0
- package/dist/vue-ui-accordion-Cf-jZELj.js +81 -0
- package/dist/vue-ui-age-pyramid-DHXhrP_3.js +1226 -0
- package/dist/vue-ui-annotator-B0o6czmF.js +2899 -0
- package/dist/vue-ui-bullet-C93-cf0H.js +700 -0
- package/dist/vue-ui-bump-C_Szk9AZ.js +1239 -0
- package/dist/vue-ui-candlestick-6JdMEJKO.js +1802 -0
- package/dist/vue-ui-carousel-table-CZ_HK0Iw.js +445 -0
- package/dist/vue-ui-chestnut-B8ixU585.js +2000 -0
- package/dist/vue-ui-chord-DC5sLapz.js +1381 -0
- package/dist/vue-ui-circle-pack-CsmSEwt3.js +1183 -0
- package/dist/vue-ui-cursor-B-QODIL3.js +283 -0
- package/dist/vue-ui-dag-C9LYfjS_.js +2899 -0
- package/dist/vue-ui-dashboard-D-f4ZaLi.js +503 -0
- package/dist/vue-ui-digits-CcB3odN7.js +209 -0
- package/dist/vue-ui-donut-DR0ngnZC.js +2396 -0
- package/dist/vue-ui-donut-evolution-BXpOscCe.js +1490 -0
- package/dist/vue-ui-dumbbell-CB_clJWA.js +1517 -0
- package/dist/vue-ui-flow-CUiOAEy1.js +1223 -0
- package/dist/vue-ui-funnel-BAlGDK0o.js +767 -0
- package/dist/vue-ui-galaxy-DbYNfSHb.js +1062 -0
- package/dist/vue-ui-gauge-Cie7jykM.js +910 -0
- package/dist/vue-ui-geo-Ce_gBRye.js +1504 -0
- package/dist/vue-ui-gizmo-B9POi_SN.js +225 -0
- package/dist/vue-ui-heatmap-DFfRSbnk.js +1556 -0
- package/dist/vue-ui-history-plot-DHp5WFgx.js +1551 -0
- package/dist/vue-ui-horizontal-bar-DI4yoARv.js +1669 -0
- package/dist/vue-ui-kpi-oUfso4UP.js +96 -0
- package/dist/vue-ui-mini-loader-aZMi1_uX.js +125 -0
- package/dist/vue-ui-molecule-D72kzel_.js +912 -0
- package/dist/vue-ui-mood-radar-Tw2ZFP7Y.js +1138 -0
- package/dist/vue-ui-nested-donuts-Bza1LczX.js +1472 -0
- package/dist/vue-ui-onion-BOuuib5d.js +1188 -0
- package/dist/vue-ui-parallel-coordinate-plot-BuQUq6-o.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-zNFIXNt9.js +1966 -0
- package/dist/vue-ui-quick-chart-B1a8QVUn.js +2459 -0
- package/dist/vue-ui-radar-VFn-YP_2.js +1214 -0
- package/dist/vue-ui-rating-Dxgn21FA.js +343 -0
- package/dist/vue-ui-relation-circle-B0sZaCgX.js +914 -0
- package/dist/vue-ui-ridgeline-BsBAbg5V.js +1612 -0
- package/dist/vue-ui-rings-CDwUzMF-.js +1231 -0
- package/dist/vue-ui-scatter-Du_b-zM8.js +2380 -0
- package/dist/vue-ui-skeleton-BAq6J_6G.js +2556 -0
- package/dist/vue-ui-smiley-CoHvkS0c.js +356 -0
- package/dist/vue-ui-spark-trend-BmCcJ17C.js +438 -0
- package/dist/vue-ui-sparkbar-9z05IMx8.js +393 -0
- package/dist/vue-ui-sparkgauge-BlWri9DP.js +255 -0
- package/dist/vue-ui-sparkhistogram-CHZTt8d8.js +560 -0
- package/dist/vue-ui-sparkline-DirLW9Nd.js +1503 -0
- package/dist/vue-ui-sparkstackbar-Dk6cEI2o.js +660 -0
- package/dist/vue-ui-stackbar-DNIrGHkt.js +2235 -0
- package/dist/vue-ui-stackline-HoWn_ur2.js +2362 -0
- package/dist/vue-ui-strip-plot-Bi8u_fLr.js +1328 -0
- package/dist/vue-ui-table-XLjOOfdI.js +1338 -0
- package/dist/vue-ui-table-heatmap-DvnFiveI.js +334 -0
- package/dist/vue-ui-table-sparkline-CSZf8XxP.js +697 -0
- package/dist/vue-ui-thermometer-7eUO_7CP.js +753 -0
- package/dist/vue-ui-timer-DCbxsREb.js +439 -0
- package/dist/vue-ui-tiremarks-p_sfTufv.js +542 -0
- package/dist/vue-ui-treemap-BdZOW7TM.js +1575 -0
- package/dist/vue-ui-waffle-Bf9dWWCM.js +1350 -0
- package/dist/vue-ui-wheel-CZrIiB0K.js +875 -0
- package/dist/vue-ui-word-cloud-BeLjxoRe.js +1644 -0
- package/dist/vue-ui-world-D9ahzEQ2.js +14252 -0
- package/dist/vue-ui-xy-DrvbVuHO.js +4063 -0
- package/dist/vue-ui-xy-canvas-DU7vFrQr.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,2899 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
|
|
2
|
+
import { H as t, b as n, wt as r, zt as i } from "./lib-B83ZCydz.js";
|
|
3
|
+
import { t as a } from "./useConfig-KnOLHtlJ.js";
|
|
4
|
+
import { t as o } from "./usePrinter-CMLF900n.js";
|
|
5
|
+
import { t as s } from "./dom-to-png-C9UOX1d2.js";
|
|
6
|
+
import { t as c } from "./_plugin-vue_export-helper-Dq1MygBL.js";
|
|
7
|
+
import { t as l } from "./BaseIcon-CL6Y7alf.js";
|
|
8
|
+
import { t as ee } from "./vue-ui-accordion-Cf-jZELj.js";
|
|
9
|
+
import { t as te } from "./ColorPicker-BGbMrtup.js";
|
|
10
|
+
import { Fragment as ne, Teleport as re, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, nextTick as ie, normalizeClass as _, normalizeStyle as v, onBeforeUnmount as ae, onMounted as oe, openBlock as y, ref as b, renderList as se, renderSlot as ce, toDisplayString as x, unref as le, vModelCheckbox as ue, vModelText as de, watch as fe, withCtx as S, withDirectives as pe, withModifiers as me } from "vue";
|
|
11
|
+
//#region src/registerAnnotatorShortcuts.js
|
|
12
|
+
function he(e) {
|
|
13
|
+
let t = (t) => e.isMacLike.value ? t.metaKey : t.ctrlKey, n = (e) => {
|
|
14
|
+
let t = e;
|
|
15
|
+
if (!t) return !1;
|
|
16
|
+
let n = (t.tagName || "").toLowerCase();
|
|
17
|
+
return t.isContentEditable || n === "input" || n === "textarea" || n === "select";
|
|
18
|
+
}, r = (t) => !!(!e.isSummaryOpen.value || n(t.target) || e.isWriting.value), i = () => {
|
|
19
|
+
e.isDeleteMode.value = !1, e.isMoveMode.value = !1, e.isResizeMode.value = !1, e.isSelectMode.value = !1, e.isDrawMode.value = !1, e.isTextMode.value = !1, e.activeShape.value = void 0, e.showCaret.value = !1;
|
|
20
|
+
}, a = (t) => {
|
|
21
|
+
switch (i(), t) {
|
|
22
|
+
case "m":
|
|
23
|
+
e.isMoveMode.value = !0;
|
|
24
|
+
break;
|
|
25
|
+
case "r":
|
|
26
|
+
e.isResizeMode.value = !0;
|
|
27
|
+
break;
|
|
28
|
+
case "d":
|
|
29
|
+
e.isDeleteMode.value = !0;
|
|
30
|
+
break;
|
|
31
|
+
case "g":
|
|
32
|
+
e.isSelectMode.value = !0, e.setShapeTo("group"), e.activeShape.value = "group";
|
|
33
|
+
break;
|
|
34
|
+
case "t":
|
|
35
|
+
e.isTextMode.value = !0, e.isWriting.value = !1, e.showCaret.value = !1;
|
|
36
|
+
break;
|
|
37
|
+
default: break;
|
|
38
|
+
}
|
|
39
|
+
}, o = (t) => {
|
|
40
|
+
switch (t) {
|
|
41
|
+
case "c":
|
|
42
|
+
e.setShapeTo("circle");
|
|
43
|
+
break;
|
|
44
|
+
case "s":
|
|
45
|
+
e.setShapeTo("rect");
|
|
46
|
+
break;
|
|
47
|
+
case "a":
|
|
48
|
+
e.setShapeTo("arrow");
|
|
49
|
+
break;
|
|
50
|
+
case "l":
|
|
51
|
+
e.setShapeTo("line");
|
|
52
|
+
break;
|
|
53
|
+
default: break;
|
|
54
|
+
}
|
|
55
|
+
}, s = (t, n) => {
|
|
56
|
+
let r = e.lastSelectedShape.value;
|
|
57
|
+
if (!r) return;
|
|
58
|
+
let i = (e, t) => {
|
|
59
|
+
typeof r[e] == "number" && (r[e] += t);
|
|
60
|
+
};
|
|
61
|
+
switch (r.type) {
|
|
62
|
+
case "rect":
|
|
63
|
+
case "circle":
|
|
64
|
+
case "text":
|
|
65
|
+
i("x", t), i("y", n);
|
|
66
|
+
break;
|
|
67
|
+
case "arrow":
|
|
68
|
+
i("x", t), i("y", n), i("endX", t), i("endY", n);
|
|
69
|
+
break;
|
|
70
|
+
default: break;
|
|
71
|
+
}
|
|
72
|
+
}, c = () => {
|
|
73
|
+
let t = e.lastSelectedShape.value;
|
|
74
|
+
t && (e.shapes.value = e.shapes.value.filter((e) => e.id !== t.id), e.lastSelectedShape.value = void 0);
|
|
75
|
+
}, l = !1, ee = null, te = () => {
|
|
76
|
+
l || (l = !0, e.history?.value?.begin?.("nudge"));
|
|
77
|
+
}, ne = () => {
|
|
78
|
+
l && (clearTimeout(ee), ee = setTimeout(() => {
|
|
79
|
+
l = !1, e.history?.value?.end?.();
|
|
80
|
+
}, 160));
|
|
81
|
+
}, re = () => {
|
|
82
|
+
clearTimeout(ee), l && e.history?.value?.end?.(), l = !1;
|
|
83
|
+
}, u = (n) => {
|
|
84
|
+
if (t(n) && !n.shiftKey && n.key.toLowerCase() === "z") {
|
|
85
|
+
if (r(n)) return;
|
|
86
|
+
n.preventDefault(), e.undoLastShape?.();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (t(n) && n.shiftKey && n.key.toLowerCase() === "z" || t(n) && n.key.toLowerCase() === "y") {
|
|
90
|
+
if (r(n)) return;
|
|
91
|
+
n.preventDefault(), typeof e.redoLastShape == "function" ? e.redoLastShape() : e.history?.value?.redo?.();
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (r(n)) return;
|
|
95
|
+
let l = n.key.toLowerCase();
|
|
96
|
+
if (l === "escape") {
|
|
97
|
+
n.preventDefault(), i();
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (l === "delete" || l === "backspace") {
|
|
101
|
+
n.preventDefault(), c();
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if ([
|
|
105
|
+
"m",
|
|
106
|
+
"r",
|
|
107
|
+
"d",
|
|
108
|
+
"g",
|
|
109
|
+
"t"
|
|
110
|
+
].includes(l)) {
|
|
111
|
+
n.preventDefault(), a(l);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if ([
|
|
115
|
+
"c",
|
|
116
|
+
"a",
|
|
117
|
+
"l",
|
|
118
|
+
"s"
|
|
119
|
+
].includes(l)) {
|
|
120
|
+
n.preventDefault(), o(l);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (n.key === "ArrowUp" || n.key === "ArrowDown" || n.key === "ArrowLeft" || n.key === "ArrowRight") {
|
|
124
|
+
n.preventDefault(), te();
|
|
125
|
+
let e = n.shiftKey ? 10 : 1;
|
|
126
|
+
n.key === "ArrowUp" && s(0, -e), n.key === "ArrowDown" && s(0, e), n.key === "ArrowLeft" && s(-e, 0), n.key === "ArrowRight" && s(e, 0), ne();
|
|
127
|
+
}
|
|
128
|
+
}, d = (e) => {
|
|
129
|
+
e.key.startsWith("Arrow") && ne();
|
|
130
|
+
};
|
|
131
|
+
return window.addEventListener("keydown", u), window.addEventListener("keyup", d), function() {
|
|
132
|
+
window.removeEventListener("keydown", u), window.removeEventListener("keyup", d), re();
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region src/atoms/TeleportedTooltip.vue
|
|
137
|
+
var ge = { class: "teleport-tooltip__inner" }, C = /* @__PURE__ */ c({
|
|
138
|
+
__name: "TeleportedTooltip",
|
|
139
|
+
props: {
|
|
140
|
+
show: {
|
|
141
|
+
type: Boolean,
|
|
142
|
+
default: !1
|
|
143
|
+
},
|
|
144
|
+
x: {
|
|
145
|
+
type: Number,
|
|
146
|
+
required: !0
|
|
147
|
+
},
|
|
148
|
+
y: {
|
|
149
|
+
type: Number,
|
|
150
|
+
required: !0
|
|
151
|
+
},
|
|
152
|
+
placement: {
|
|
153
|
+
type: String,
|
|
154
|
+
default: "top"
|
|
155
|
+
},
|
|
156
|
+
styleObject: {
|
|
157
|
+
type: Object,
|
|
158
|
+
default() {
|
|
159
|
+
return {};
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
delay: {
|
|
163
|
+
type: Number,
|
|
164
|
+
default: 0
|
|
165
|
+
},
|
|
166
|
+
delayIn: {
|
|
167
|
+
type: Number,
|
|
168
|
+
default: 300
|
|
169
|
+
},
|
|
170
|
+
delayOut: {
|
|
171
|
+
type: Number,
|
|
172
|
+
default: 0
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
setup(e) {
|
|
176
|
+
let t = e, n = u(() => t.delayIn ?? t.delay), r = u(() => t.delayOut ?? t.delay), i = b(!1), a = null, o = null;
|
|
177
|
+
function s() {
|
|
178
|
+
a &&= (clearTimeout(a), null), o &&= (clearTimeout(o), null);
|
|
179
|
+
}
|
|
180
|
+
function c() {
|
|
181
|
+
s();
|
|
182
|
+
let e = Math.max(0, n.value || 0);
|
|
183
|
+
e === 0 ? i.value = !0 : a = setTimeout(() => {
|
|
184
|
+
i.value = !0, a = null;
|
|
185
|
+
}, e);
|
|
186
|
+
}
|
|
187
|
+
function l() {
|
|
188
|
+
s();
|
|
189
|
+
let e = Math.max(0, r.value || 0);
|
|
190
|
+
e === 0 ? i.value = !1 : o = setTimeout(() => {
|
|
191
|
+
i.value = !1, o = null;
|
|
192
|
+
}, e);
|
|
193
|
+
}
|
|
194
|
+
fe(() => t.show, (e) => {
|
|
195
|
+
e ? c() : l();
|
|
196
|
+
}, { immediate: !0 }), oe(() => {
|
|
197
|
+
t.show && c();
|
|
198
|
+
}), ae(() => {
|
|
199
|
+
s();
|
|
200
|
+
});
|
|
201
|
+
let ee = u(() => ({
|
|
202
|
+
position: "fixed",
|
|
203
|
+
zIndex: 2147483647,
|
|
204
|
+
top: `${t.y}px`,
|
|
205
|
+
left: `${t.x}px`,
|
|
206
|
+
transform: t.placement === "bottom" ? "translate(-50%, 8px)" : "translate(-50%, -100%)",
|
|
207
|
+
pointerEvents: "none",
|
|
208
|
+
...t.styleObject
|
|
209
|
+
}));
|
|
210
|
+
return (t, n) => (y(), d(re, { to: "body" }, [i.value ? (y(), p("div", {
|
|
211
|
+
key: 0,
|
|
212
|
+
class: _(["teleport-tooltip", e.placement]),
|
|
213
|
+
style: v(ee.value),
|
|
214
|
+
role: "tooltip",
|
|
215
|
+
"aria-hidden": "false"
|
|
216
|
+
}, [m("div", ge, [ce(t.$slots, "default", {}, void 0, !0)])], 6)) : f("", !0)]));
|
|
217
|
+
}
|
|
218
|
+
}, [["__scopeId", "data-v-c292996f"]]), _e = /* @__PURE__ */ e({ default: () => vt }), ve = { class: "vue-data-ui-component vue-ui-annotator" }, ye = { "data-dom-to-png-ignore": "" }, be = ["disabled"], xe = ["disabled"], Se = ["disabled"], Ce = ["disabled"], we = ["disabled"], Te = ["disabled"], Ee = ["disabled"], De = ["disabled"], Oe = ["disabled"], ke = {
|
|
219
|
+
class: "tool-selection",
|
|
220
|
+
style: { "margin-top": "6px" }
|
|
221
|
+
}, Ae = {
|
|
222
|
+
viewBox: "0 0 12 12",
|
|
223
|
+
style: { width: "100%" }
|
|
224
|
+
}, je = ["fill"], Me = { key: 0 }, Ne = { class: "tool-input" }, Pe = ["checked"], Fe = {
|
|
225
|
+
viewBox: "0 0 12 12",
|
|
226
|
+
style: { width: "100%" }
|
|
227
|
+
}, Ie = ["fill"], Le = { key: 1 }, Re = { class: "tool-input" }, ze = ["checked"], Be = {
|
|
228
|
+
viewBox: "0 0 24 24",
|
|
229
|
+
style: { width: "100%" }
|
|
230
|
+
}, Ve = ["stroke"], He = { key: 2 }, Ue = { style: {
|
|
231
|
+
display: "flex",
|
|
232
|
+
"flex-direction": "column",
|
|
233
|
+
"align-items": "center",
|
|
234
|
+
"justify-content": "center"
|
|
235
|
+
} }, We = { class: "tool-input" }, Ge = { key: 3 }, Ke = { style: {
|
|
236
|
+
display: "flex",
|
|
237
|
+
"flex-direction": "column",
|
|
238
|
+
"align-items": "center",
|
|
239
|
+
"justify-content": "center"
|
|
240
|
+
} }, qe = { class: "tool-input" }, Je = {
|
|
241
|
+
viewBox: "0 0 24 24",
|
|
242
|
+
height: "24",
|
|
243
|
+
width: "24",
|
|
244
|
+
style: {
|
|
245
|
+
"margin-bottom": "-5px",
|
|
246
|
+
"margin-top": "-10px"
|
|
247
|
+
}
|
|
248
|
+
}, Ye = ["checked"], Xe = { key: 4 }, Ze = { style: {
|
|
249
|
+
display: "flex",
|
|
250
|
+
"flex-direction": "column",
|
|
251
|
+
"align-items": "center",
|
|
252
|
+
"justify-content": "center"
|
|
253
|
+
} }, Qe = { class: "tool-input" }, $e = { key: 5 }, et = { key: 6 }, tt = ["disabled"], nt = { key: 7 }, rt = ["disabled"], it = { key: 8 }, at = { key: 9 }, ot = { key: 10 }, st = { key: 11 }, ct = {
|
|
254
|
+
style: {
|
|
255
|
+
display: "flex",
|
|
256
|
+
"flex-direction": "column",
|
|
257
|
+
"align-items": "center",
|
|
258
|
+
"justify-content": "center"
|
|
259
|
+
},
|
|
260
|
+
class: "tooltip"
|
|
261
|
+
}, lt = { style: {
|
|
262
|
+
display: "flex",
|
|
263
|
+
"flex-direction": "column",
|
|
264
|
+
"align-items": "start",
|
|
265
|
+
"justify-content": "center"
|
|
266
|
+
} }, ut = {
|
|
267
|
+
class: "tool-input",
|
|
268
|
+
style: { "font-variant-numeric": "tabular-nums" }
|
|
269
|
+
}, dt = ["id"], ft = [
|
|
270
|
+
"viewBox",
|
|
271
|
+
"width",
|
|
272
|
+
"height"
|
|
273
|
+
], pt = [
|
|
274
|
+
"width",
|
|
275
|
+
"height",
|
|
276
|
+
"pointer-events"
|
|
277
|
+
], mt = ["innerHTML"], ht = [
|
|
278
|
+
"height",
|
|
279
|
+
"viewBox",
|
|
280
|
+
"width"
|
|
281
|
+
], gt = ["cx", "cy"], _t = "annotations", vt = /* @__PURE__ */ c({
|
|
282
|
+
__name: "vue-ui-annotator",
|
|
283
|
+
props: {
|
|
284
|
+
config: {
|
|
285
|
+
type: Object,
|
|
286
|
+
default() {
|
|
287
|
+
return {};
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
dataset: {
|
|
291
|
+
type: Object,
|
|
292
|
+
default() {
|
|
293
|
+
return {
|
|
294
|
+
shapes: [],
|
|
295
|
+
lastSelectedShape: void 0
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
emits: ["toggleOpenState", "saveAnnotations"],
|
|
301
|
+
setup(e, { emit: c }) {
|
|
302
|
+
let re = e, ge = c, _e = b(t()), { isImaging: vt, generateImage: yt } = o({
|
|
303
|
+
elementId: _e.value,
|
|
304
|
+
fileName: _t
|
|
305
|
+
}), w = b(void 0), bt = b(1), T = b({
|
|
306
|
+
start: {
|
|
307
|
+
x: 0,
|
|
308
|
+
y: 0
|
|
309
|
+
},
|
|
310
|
+
end: {
|
|
311
|
+
x: 0,
|
|
312
|
+
y: 0
|
|
313
|
+
}
|
|
314
|
+
}), E = b(void 0), D = b(void 0), xt = b(!1), O = b(!1), St = b(!1), k = b(!1), Ct = b(!1), wt = b(!0), A = b(!1), Tt = b(!1), Et = b(!1), j = b(!1), Dt = b(!1), M = b(!1), N = b(!1), Ot = b(!1), P = b(!1), kt = b(!1), F = b(!1), I = b(re.dataset?.lastSelectedShape ?? void 0), L = b({
|
|
315
|
+
x: 0,
|
|
316
|
+
y: 0
|
|
317
|
+
}), At = b(!0), R = b([]), z = b(re.dataset?.shapes || []);
|
|
318
|
+
b([]);
|
|
319
|
+
let jt = b(Math.round(Math.random()) * 1e5), Mt = b(1e3), Nt = b(1e3), B = b({
|
|
320
|
+
arrow: {
|
|
321
|
+
color: "grey",
|
|
322
|
+
filled: !0
|
|
323
|
+
},
|
|
324
|
+
circle: {
|
|
325
|
+
color: "grey",
|
|
326
|
+
filled: !1,
|
|
327
|
+
radius: 3,
|
|
328
|
+
strokeWidth: 2
|
|
329
|
+
},
|
|
330
|
+
rect: {
|
|
331
|
+
color: "grey",
|
|
332
|
+
filled: !1,
|
|
333
|
+
strokeWidth: 2,
|
|
334
|
+
height: 12,
|
|
335
|
+
width: 12
|
|
336
|
+
}
|
|
337
|
+
}), Pt = b("#1A1A1A"), V = b(!1), Ft = b(1), It = b(void 0), Lt = b(1), Rt = b(1), H = b("start"), zt = b(20), Bt = b(100), Vt = r, Ht = b(null), U = b(!1), W = b(null), G = b({
|
|
338
|
+
x: 0,
|
|
339
|
+
y: 0
|
|
340
|
+
}), Ut = b(null), K = b([]), Wt = b(!1), Gt = b(null), Kt = b({
|
|
341
|
+
undo: 0,
|
|
342
|
+
redo: 0
|
|
343
|
+
}), qt = b(null);
|
|
344
|
+
b(null), b(null);
|
|
345
|
+
let Jt = b(null), q = u(() => {
|
|
346
|
+
let e = a().vue_ui_annotator;
|
|
347
|
+
return Object.keys(re.config || {}).length ? n(i({
|
|
348
|
+
defaultConfig: e,
|
|
349
|
+
userConfig: re.config
|
|
350
|
+
})) : e;
|
|
351
|
+
}), J = u(() => q.value.useCursorPointer), Y = u(() => {
|
|
352
|
+
let e = q.value.style.tooltips;
|
|
353
|
+
return {
|
|
354
|
+
backgroundColor: e.backgroundColor,
|
|
355
|
+
color: e.color,
|
|
356
|
+
border: e.border,
|
|
357
|
+
borderRadius: `${e.borderRadius}px`,
|
|
358
|
+
boxShadow: e.boxShadow
|
|
359
|
+
};
|
|
360
|
+
}), Yt = u(() => z.value.filter((e) => !["line", "group"].includes(e.type)).length > 1), Xt = u(() => Vt[Bt.value > 98 ? 98 : Bt.value]), Zt = u(() => {
|
|
361
|
+
switch (!0) {
|
|
362
|
+
case k.value: return "default";
|
|
363
|
+
case j.value: return "move";
|
|
364
|
+
case P.value: return "text";
|
|
365
|
+
case M.value: return "se-resize";
|
|
366
|
+
default: return "";
|
|
367
|
+
}
|
|
368
|
+
}), Qt = u(() => z.value), X = b(null);
|
|
369
|
+
function $t(e) {
|
|
370
|
+
if (e) switch (!0) {
|
|
371
|
+
case e.type === "rect": return `
|
|
372
|
+
<rect
|
|
373
|
+
id="${e.id}"
|
|
374
|
+
style="stroke-dasharray: 10; display:${D.value && D.value === e.id ? "initial" : "none"}"
|
|
375
|
+
x="${e.x - 20}"
|
|
376
|
+
y="${e.y - 20}"
|
|
377
|
+
height="${e.rectHeight + 40}"
|
|
378
|
+
width="${e.rectWidth + 40}"
|
|
379
|
+
fill="transparent"
|
|
380
|
+
stroke="grey"
|
|
381
|
+
/>
|
|
382
|
+
`;
|
|
383
|
+
case e.type === "circle": return `
|
|
384
|
+
<rect
|
|
385
|
+
id="${e.id}"
|
|
386
|
+
style="stroke-dasharray: 10; display:${D.value && D.value === e.id ? "initial" : "none"}"
|
|
387
|
+
x="${e.x - e.circleRadius - 20}"
|
|
388
|
+
y="${e.y - e.circleRadius - 20}"
|
|
389
|
+
height="${e.circleRadius * 2 + 40}"
|
|
390
|
+
width="${e.circleRadius * 2 + 40}"
|
|
391
|
+
fill="transparent"
|
|
392
|
+
stroke="grey"
|
|
393
|
+
/>
|
|
394
|
+
`;
|
|
395
|
+
case e.type === "arrow":
|
|
396
|
+
let t = e.endX - e.x > 0, n = e.endY - e.y > 0;
|
|
397
|
+
return `
|
|
398
|
+
<rect
|
|
399
|
+
id="${e.id}"
|
|
400
|
+
style="stroke-dasharray: 10; display:${D.value && D.value === e.id ? "initial" : "none"}"
|
|
401
|
+
x="${t ? e.x - 20 : e.endX - 20}"
|
|
402
|
+
y="${n ? e.y - 20 : e.endY - 20}"
|
|
403
|
+
height="${n ? e.endY - e.y + 40 : e.y - e.endY + 40}"
|
|
404
|
+
width="${t ? e.endX - e.x + 40 : e.x - e.endX + 40}"
|
|
405
|
+
fill="transparent"
|
|
406
|
+
stroke="grey"
|
|
407
|
+
/>
|
|
408
|
+
`;
|
|
409
|
+
case e.type === "text":
|
|
410
|
+
let r = X.value ? Array.from(X.value.getElementsByTagName("text")).find((t) => t.id === e.id) : null;
|
|
411
|
+
if (!r) return;
|
|
412
|
+
let { x: i, y: a, width: o, height: s } = r.getBBox();
|
|
413
|
+
return `
|
|
414
|
+
<rect
|
|
415
|
+
id="${e.id}"
|
|
416
|
+
style="stroke-dasharray: 10; display:${D.value && D.value === e.id ? "initial" : "none"}"
|
|
417
|
+
x="${i - 20}"
|
|
418
|
+
y="${a - 20}"
|
|
419
|
+
height="${s + 40}"
|
|
420
|
+
width="${o + 40}"
|
|
421
|
+
fill="transparent"
|
|
422
|
+
stroke="grey"
|
|
423
|
+
/>
|
|
424
|
+
`;
|
|
425
|
+
default: return "";
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
function en(e, t = !1) {
|
|
429
|
+
switch (!0) {
|
|
430
|
+
case e.type === "circle": return `
|
|
431
|
+
<g id="${e.id}" style="display:${k.value ? "initial" : "none"};">
|
|
432
|
+
<circle id="${e.id}" cx="${e.x}" cy="${e.y}" r="12" fill="red"/>
|
|
433
|
+
<line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x - 4}" y1="${e.y - 4}" x2="${e.x + 4}" y2="${e.y + 4}"/>
|
|
434
|
+
<line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x + 4}" y1="${e.y - 4}" x2="${e.x - 4}" y2="${e.y + 4}"/>
|
|
435
|
+
</g>
|
|
436
|
+
`;
|
|
437
|
+
case e.type === "text":
|
|
438
|
+
let n, r = [
|
|
439
|
+
-8,
|
|
440
|
+
-12,
|
|
441
|
+
-4,
|
|
442
|
+
-12,
|
|
443
|
+
-4
|
|
444
|
+
];
|
|
445
|
+
switch (!0) {
|
|
446
|
+
case e.textAlign === "start":
|
|
447
|
+
n = t ? [
|
|
448
|
+
-20,
|
|
449
|
+
-24,
|
|
450
|
+
-16,
|
|
451
|
+
-16,
|
|
452
|
+
-24
|
|
453
|
+
] : [
|
|
454
|
+
-16,
|
|
455
|
+
-20,
|
|
456
|
+
-12,
|
|
457
|
+
-12,
|
|
458
|
+
-20
|
|
459
|
+
];
|
|
460
|
+
break;
|
|
461
|
+
case e.textAlign === "middle":
|
|
462
|
+
n = [
|
|
463
|
+
0,
|
|
464
|
+
-4,
|
|
465
|
+
4,
|
|
466
|
+
4,
|
|
467
|
+
-4
|
|
468
|
+
], r = [
|
|
469
|
+
-32,
|
|
470
|
+
-36,
|
|
471
|
+
-28,
|
|
472
|
+
-36,
|
|
473
|
+
-28
|
|
474
|
+
];
|
|
475
|
+
break;
|
|
476
|
+
case e.textAlign === "end":
|
|
477
|
+
n = [
|
|
478
|
+
16,
|
|
479
|
+
20,
|
|
480
|
+
12,
|
|
481
|
+
12,
|
|
482
|
+
20
|
|
483
|
+
];
|
|
484
|
+
break;
|
|
485
|
+
default:
|
|
486
|
+
n = [
|
|
487
|
+
0,
|
|
488
|
+
0,
|
|
489
|
+
0
|
|
490
|
+
];
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
return `
|
|
494
|
+
<g id="${e.id}" style="display:${k.value ? "initial" : "none"};">
|
|
495
|
+
<circle id="${e.id}" cx="${e.x + n[0]}" cy="${e.y + r[0]}" r="12" fill="red"/>
|
|
496
|
+
<line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x + n[1]}" y1="${e.y + r[1]}" x2="${e.x + n[2]}" y2="${e.y + r[2]}"/>
|
|
497
|
+
<line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x + n[3]}" y1="${e.y + r[3]}" x2="${e.x + n[4]}" y2="${e.y + r[4]}"/>
|
|
498
|
+
</g>
|
|
499
|
+
`;
|
|
500
|
+
default: return `
|
|
501
|
+
<g id="${e.id}" style="display:${k.value ? "initial" : "none"};">
|
|
502
|
+
<circle id="${e.id}" cx="${e.x - 4}" cy="${e.y - 4}" r="12" fill="red"/>
|
|
503
|
+
<line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x - 8}" y1="${e.y - 8}" x2="${e.x}" y2="${e.y}"/>
|
|
504
|
+
<line stroke="white" stroke-width="2" id="${e.id}" x1="${e.x}" y1="${e.y - 8}" x2="${e.x - 8}" y2="${e.y}"/>
|
|
505
|
+
</g>
|
|
506
|
+
`;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
function tn(e) {
|
|
510
|
+
switch (!0) {
|
|
511
|
+
case e.textAlign === "middle": return `<path class="vue-ui-annotator-caret" stroke="black" stroke-width="2" d="M${e.x},${e.y - e.fontSize} ${e.x},${e.y - e.fontSize - 15}" /> <path class="vue-ui-annotator-caret" stroke="black" stroke-width="2" d="M${e.x - 3},${e.y - e.fontSize - 5} ${e.x},${e.y - e.fontSize} ${e.x + 3},${e.y - e.fontSize - 5}"/>`;
|
|
512
|
+
case e.textAlign === "start":
|
|
513
|
+
let t = e.isBulletTextMode ? e.fontSize : 0;
|
|
514
|
+
return `<path class="vue-ui-annotator-caret" d="M${e.x - 20 - t},${e.y - e.fontSize / 6} ${e.x - 5 - t},${e.y - e.fontSize / 6}" stroke="black" stroke-width="2" />
|
|
515
|
+
<path class="vue-ui-annotator-caret" d="M${e.x - 10 - t},${e.y - e.fontSize / 3} ${e.x - 5 - t},${e.y - e.fontSize / 6} ${e.x - 10 - t},${e.y}" stroke="black" stroke-width="2">`;
|
|
516
|
+
case e.textAlign === "end": return `<path class="vue-ui-annotator-caret" d="M${e.x + 20},${e.y - e.fontSize / 6} ${e.x + 5},${e.y - e.fontSize / 6}" stroke="black" stroke-width="2" />
|
|
517
|
+
<path class="vue-ui-annotator-caret" d="M${e.x + 10},${e.y - e.fontSize / 3} ${e.x + 5},${e.y - e.fontSize / 6} ${e.x + 10},${e.y}" stroke="black" stroke-width="2">`;
|
|
518
|
+
default: return "";
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
function nn(e, t, n = !1) {
|
|
522
|
+
switch (!0) {
|
|
523
|
+
case e.textAlign === "start": return `
|
|
524
|
+
<g id="${e.id}">
|
|
525
|
+
<rect
|
|
526
|
+
id="${e.id}"
|
|
527
|
+
style="display:${I.value && I.value.id === e.id ? "initial" : "none"};"
|
|
528
|
+
x="${e.x}"
|
|
529
|
+
y="${e.y - 50}"
|
|
530
|
+
height="${e.lines === 0 || e.lines === 1 ? e.fontSize * 4 : e.fontSize * 2 * e.lines}"
|
|
531
|
+
width="100"
|
|
532
|
+
fill="rgba(0,0,0,0)"
|
|
533
|
+
/>
|
|
534
|
+
<text
|
|
535
|
+
style="user-select:none; height:100px;"
|
|
536
|
+
id="${e.id}"
|
|
537
|
+
x="${e.x}"
|
|
538
|
+
y="${e.y}"
|
|
539
|
+
text-anchor="${e.textAlign}"
|
|
540
|
+
font-size="${e.fontSize}"
|
|
541
|
+
fill="${e.color}"
|
|
542
|
+
font-weight="${e.isBold ? "bold" : "normal"}"
|
|
543
|
+
font-style="${e.isItalic ? "italic" : "normal"}"
|
|
544
|
+
text-decoration="${e.isUnderline ? "underline" : "none"}"
|
|
545
|
+
>
|
|
546
|
+
${t.join("")}
|
|
547
|
+
</text>
|
|
548
|
+
${V.value && I.value && I.value.id === e.id ? tn(e) : ""}
|
|
549
|
+
${en(e, n)}
|
|
550
|
+
</g>
|
|
551
|
+
`;
|
|
552
|
+
case e.textAlign === "middle": return `
|
|
553
|
+
<g id="${e.id}">
|
|
554
|
+
<rect
|
|
555
|
+
id="${e.id}"
|
|
556
|
+
style="display:${I.value && I.value.id === e.id ? "initial" : "none"};"
|
|
557
|
+
x="${e.x - 50}"
|
|
558
|
+
y="${e.y - 50}"
|
|
559
|
+
height="${e.lines === 0 || e.lines === 1 ? e.fontSize * 4 : e.fontSize * 2 * e.lines}"
|
|
560
|
+
width="100"
|
|
561
|
+
fill="rgba(0,0,0,0)"
|
|
562
|
+
/>
|
|
563
|
+
<text
|
|
564
|
+
style="user-select:none; height:100px;"
|
|
565
|
+
id="${e.id}"
|
|
566
|
+
x="${e.x}"
|
|
567
|
+
y="${e.y}"
|
|
568
|
+
text-anchor="${e.textAlign}"
|
|
569
|
+
font-size="${e.fontSize}"
|
|
570
|
+
fill="${e.color}"
|
|
571
|
+
font-weight="${e.isBold ? "bold" : "normal"}"
|
|
572
|
+
font-style="${e.isItalic ? "italic" : "normal"}"
|
|
573
|
+
text-decoration="${e.isUnderline ? "underline" : "none"}"
|
|
574
|
+
>
|
|
575
|
+
${t.join("")}
|
|
576
|
+
</text>
|
|
577
|
+
${V.value && I.value && I.value.id === e.id ? tn(e) : ""}
|
|
578
|
+
${en(e)}
|
|
579
|
+
</g>
|
|
580
|
+
`;
|
|
581
|
+
case e.textAlign === "end": return `
|
|
582
|
+
<g id="${e.id}">
|
|
583
|
+
<rect
|
|
584
|
+
id="${e.id}"
|
|
585
|
+
style="display:${I.value && I.value.id === e.id ? "initial" : "none"};"
|
|
586
|
+
x="${e.x - 100}"
|
|
587
|
+
y="${e.y - 50}"
|
|
588
|
+
height="${e.lines === 0 || e.lines === 1 ? e.fontSize * 4 : e.fontSize * 2 * e.lines}"
|
|
589
|
+
width="100"
|
|
590
|
+
fill="rgba(0,0,0,0)"
|
|
591
|
+
/>
|
|
592
|
+
<text
|
|
593
|
+
style="user-select:none; height:100px;"
|
|
594
|
+
id="${e.id}"
|
|
595
|
+
x="${e.x}"
|
|
596
|
+
y="${e.y}"
|
|
597
|
+
text-anchor="${e.textAlign}"
|
|
598
|
+
font-size="${e.fontSize}"
|
|
599
|
+
fill="${e.color}"
|
|
600
|
+
font-weight="${e.isBold ? "bold" : "normal"}"
|
|
601
|
+
font-style="${e.isItalic ? "italic" : "normal"}"
|
|
602
|
+
text-decoration="${e.isUnderline ? "underline" : "none"}"
|
|
603
|
+
>
|
|
604
|
+
${t.join("")}
|
|
605
|
+
</text>
|
|
606
|
+
${V.value && I.value && I.value.id === e.id ? tn(e) : ""}
|
|
607
|
+
${en(e)}
|
|
608
|
+
</g>
|
|
609
|
+
`;
|
|
610
|
+
default: return "";
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
let rn = u(() => Qt.value.map((e) => {
|
|
614
|
+
switch (!0) {
|
|
615
|
+
case e && e.type === "arrow":
|
|
616
|
+
let t = e.strokeWidth > 3 ? 5 : 10, n = e.strokeWidth > 3 ? 2.5 : 5;
|
|
617
|
+
return {
|
|
618
|
+
html: `
|
|
619
|
+
<defs>
|
|
620
|
+
<marker
|
|
621
|
+
id="${e.id}"
|
|
622
|
+
markerWidth="${t}"
|
|
623
|
+
markerHeight="${t}"
|
|
624
|
+
refX="0"
|
|
625
|
+
refY="${n}"
|
|
626
|
+
orient="auto"
|
|
627
|
+
>
|
|
628
|
+
<polygon
|
|
629
|
+
points="0 0,${t} ${n}, 0 ${t}"
|
|
630
|
+
fill="${e.color}"
|
|
631
|
+
/>
|
|
632
|
+
</marker>
|
|
633
|
+
</defs>
|
|
634
|
+
${$t(e)}
|
|
635
|
+
<g id="${e.id}">
|
|
636
|
+
<path
|
|
637
|
+
style="stroke-linecap: round !important; ${e.isDash ? `stroke-dasharray: ${e.strokeWidth * 3}` : ""}"
|
|
638
|
+
stroke="${e.color}"
|
|
639
|
+
id="${e.id}"
|
|
640
|
+
d="M${e.x},${e.y} ${e.endX},${e.endY}"
|
|
641
|
+
stroke-width="${e.strokeWidth}"
|
|
642
|
+
marker-end="url(#${e.id})"
|
|
643
|
+
/>
|
|
644
|
+
</g>
|
|
645
|
+
<g id="${e.id}">
|
|
646
|
+
<rect
|
|
647
|
+
id="${e.id}"
|
|
648
|
+
x="${e.x - 10}"
|
|
649
|
+
y="${e.y - 10}"
|
|
650
|
+
height="20"
|
|
651
|
+
width="20"
|
|
652
|
+
fill="rgba(0,0,0,0.3)"
|
|
653
|
+
style="display:${M.value || j.value ? "initial" : "none"}; rx:1 !important; ry:1 !important;"
|
|
654
|
+
/>
|
|
655
|
+
</g>
|
|
656
|
+
${en(e)}
|
|
657
|
+
</g>
|
|
658
|
+
`,
|
|
659
|
+
id: e.id
|
|
660
|
+
};
|
|
661
|
+
case e && e.type === "circle": return {
|
|
662
|
+
html: `
|
|
663
|
+
<g id="${e.id}">
|
|
664
|
+
${$t(e)}
|
|
665
|
+
<circle
|
|
666
|
+
id="${e.id}"
|
|
667
|
+
cx="${e.x}"
|
|
668
|
+
cy="${e.y}"
|
|
669
|
+
r="${e.circleRadius ? e.circleRadius : Number.MIN_VALUE}"
|
|
670
|
+
fill="${e.isFilled ? e.color + e.alpha : "rgba(255,255,255,0.001)"}"
|
|
671
|
+
stroke="${e.color + e.alpha}"
|
|
672
|
+
stroke-width="${e.strokeWidth}"
|
|
673
|
+
style="${e.isDash ? `stroke-dasharray: ${e.strokeWidth * 3}` : ""}"
|
|
674
|
+
>
|
|
675
|
+
</circle>
|
|
676
|
+
</g>
|
|
677
|
+
|
|
678
|
+
${en(e)}`,
|
|
679
|
+
id: e.id
|
|
680
|
+
};
|
|
681
|
+
case e && e.type === "group": return {
|
|
682
|
+
html: `<g id="${e.id}">
|
|
683
|
+
<rect
|
|
684
|
+
id="${M.value ? "" : e.id}"
|
|
685
|
+
x="${e.x}"
|
|
686
|
+
y="${e.y}"
|
|
687
|
+
fill="transparent"
|
|
688
|
+
height="${e.rectHeight}"
|
|
689
|
+
width="${e.rectWidth}"
|
|
690
|
+
stroke="grey"
|
|
691
|
+
stroke-width="1"
|
|
692
|
+
style="rx:1 !important; ry:1 !important; ${e.isDash ? `stroke-dasharray: ${e.strokeWidth * 3}` : ""}; display:${N.value || k.value || D.value && D.value === e.id ? "initial" : "none"};"
|
|
693
|
+
/>
|
|
694
|
+
<g id="${e.id}">
|
|
695
|
+
${e.content ? e.content : ""}
|
|
696
|
+
</g>
|
|
697
|
+
${en(e)}
|
|
698
|
+
</g> `,
|
|
699
|
+
id: e.id
|
|
700
|
+
};
|
|
701
|
+
case e && e.type === "rect": return {
|
|
702
|
+
html: `<g id="${e.id}">
|
|
703
|
+
${$t(e)}
|
|
704
|
+
<rect
|
|
705
|
+
id="${M.value ? "" : e.id}"
|
|
706
|
+
x="${e.x}"
|
|
707
|
+
y="${e.y}"
|
|
708
|
+
fill="${e.isFilled ? e.color + e.alpha : "rgba(255,255,255,0.001)"}"
|
|
709
|
+
height="${e.rectHeight}"
|
|
710
|
+
width="${e.rectWidth}"
|
|
711
|
+
stroke="${e.color + e.alpha}"
|
|
712
|
+
stroke-width="${e.strokeWidth}"
|
|
713
|
+
style="rx:1 !important; ry:1 !important; ${e.isDash ? `stroke-dasharray: ${e.strokeWidth * 3}` : ""}"
|
|
714
|
+
/>
|
|
715
|
+
<rect id="${e.id}"
|
|
716
|
+
x="${e.x + e.rectWidth}"
|
|
717
|
+
y="${e.y + e.rectHeight}"
|
|
718
|
+
height="20"
|
|
719
|
+
width="20"
|
|
720
|
+
fill="rgba(0,0,0,0.3)"
|
|
721
|
+
style="display:${M.value ? "initial" : "none"}; rx:1 !important; ry:1 !important;"
|
|
722
|
+
/>
|
|
723
|
+
${en(e)}
|
|
724
|
+
</g> `,
|
|
725
|
+
id: e.id
|
|
726
|
+
};
|
|
727
|
+
case e && e.type === "line": return {
|
|
728
|
+
html: `
|
|
729
|
+
<g id="${e.id}">
|
|
730
|
+
<path
|
|
731
|
+
id="${e.id}"
|
|
732
|
+
d="M${e.path ? e.path : ""}"
|
|
733
|
+
style="stroke:${e.color + e.alpha} !important; fill:none; stroke-width:${e.strokeWidth} !important; stroke-linecap: round !important; stroke-linejoin: round !important;"
|
|
734
|
+
/>
|
|
735
|
+
${en(e)}
|
|
736
|
+
</g>
|
|
737
|
+
`,
|
|
738
|
+
id: e.id
|
|
739
|
+
};
|
|
740
|
+
case e && e.type === "text":
|
|
741
|
+
let r = e.textContent.split(""), i = [];
|
|
742
|
+
for (let t = 0; t < r.length; t += 1) i.push(`
|
|
743
|
+
${e.isBulletTextMode ? `<tspan x="${e.x - e.fontSize}" y="${e.y + e.fontSize * t}" id="${e.id}" font-size="${e.fontSize / 2}">⬤</tspan>` : ""}
|
|
744
|
+
<tspan id="${e.id}" x="${e.x}" y="${e.y + e.fontSize * t}">
|
|
745
|
+
${r[t]}
|
|
746
|
+
</tspan>`);
|
|
747
|
+
return {
|
|
748
|
+
html: `
|
|
749
|
+
${$t(e)}
|
|
750
|
+
${nn(e, i, e.isBulletTextMode)}
|
|
751
|
+
`,
|
|
752
|
+
id: e.id
|
|
753
|
+
};
|
|
754
|
+
default: break;
|
|
755
|
+
}
|
|
756
|
+
}));
|
|
757
|
+
function Z(e) {
|
|
758
|
+
if (e == null) return e;
|
|
759
|
+
try {
|
|
760
|
+
return typeof structuredClone == "function" ? structuredClone(e) : JSON.parse(JSON.stringify(e));
|
|
761
|
+
} catch {
|
|
762
|
+
return Array.isArray(e) ? e.map((e) => Z(e)) : typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Z(t)])) : e;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
function an(e = !1) {
|
|
766
|
+
if (!w.value || !Ct.value) return;
|
|
767
|
+
T.value.end = {
|
|
768
|
+
x: L.value.x,
|
|
769
|
+
y: L.value.y
|
|
770
|
+
};
|
|
771
|
+
let t;
|
|
772
|
+
z.value.length > 0 && E.value && (t = [...z.value].find((e) => e.id === E.value.id));
|
|
773
|
+
let n, r, i;
|
|
774
|
+
t && (n = t.x - T.value.end.x, r = t.y - T.value.end.y, i = Math.sqrt(n * n + r * r));
|
|
775
|
+
let a, o;
|
|
776
|
+
switch (e ? (a = Math.max(T.value.end.x, t.x), o = Math.min(T.value.end.x, t.x), Math.max(T.value.end.y, t.y), Math.min(T.value.end.y, t.y)) : (a = Math.max(T.value.end.x, T.value.start.x), o = Math.min(T.value.end.x, T.value.start.x), Math.max(T.value.end.y, T.value.start.y), Math.min(T.value.end.y, T.value.start.y)), !0) {
|
|
777
|
+
case w.value === "arrow":
|
|
778
|
+
z.value.at(-1).endX = T.value.end.x, z.value.at(-1).endY = T.value.end.y;
|
|
779
|
+
break;
|
|
780
|
+
case w.value === "circle":
|
|
781
|
+
z.value.at(-1).circleRadius = wt.value ? Z(a - o) + 20 : i + 20;
|
|
782
|
+
break;
|
|
783
|
+
case w.value === "line":
|
|
784
|
+
z.value.at(-1).path += ` ${L.value.x} ${L.value.y} `;
|
|
785
|
+
break;
|
|
786
|
+
case ["rect", "group"].includes(w.value): z.value.at(-1).rectWidth = Z(T.value.end.x - z.value.at(-1).x) > 0 ? Z(T.value.end.x - z.value.at(-1).x) : 20, z.value.at(-1).rectHeight = Z(T.value.end.y - z.value.at(-1).y) > 0 ? Z(T.value.end.y - z.value.at(-1).y) : 20;
|
|
787
|
+
default: break;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
function on() {
|
|
791
|
+
if (!Ct.value) {
|
|
792
|
+
qt.value = null;
|
|
793
|
+
return;
|
|
794
|
+
}
|
|
795
|
+
an(), qt.value = requestAnimationFrame(on);
|
|
796
|
+
}
|
|
797
|
+
function sn(e) {
|
|
798
|
+
let t = z.value.findIndex((t) => t.id === e);
|
|
799
|
+
if (t > -1 && t !== z.value.length - 1) {
|
|
800
|
+
let [e] = z.value.splice(t, 1);
|
|
801
|
+
z.value.push(e);
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
function cn(e) {
|
|
805
|
+
let t = (e) => !!e && z.value.some((t) => t.id === e);
|
|
806
|
+
if (t(e?.target?.id)) return e.target.id;
|
|
807
|
+
let n = X.value?.querySelector(".annotator__glass");
|
|
808
|
+
if (!n) return null;
|
|
809
|
+
let r = n.style.pointerEvents;
|
|
810
|
+
n.style.pointerEvents = "none";
|
|
811
|
+
let i = document.elementFromPoint(e.clientX, e.clientY);
|
|
812
|
+
return n.style.pointerEvents = r || "all", t(i?.id) ? i.id : null;
|
|
813
|
+
}
|
|
814
|
+
function ln(e = {}) {
|
|
815
|
+
let { maxEntries: t = 200, maxBytes: n = 2e6 } = e, r = {
|
|
816
|
+
open: !1,
|
|
817
|
+
before: null,
|
|
818
|
+
undo: [],
|
|
819
|
+
redo: []
|
|
820
|
+
}, i = {
|
|
821
|
+
undo: 0,
|
|
822
|
+
redo: 0
|
|
823
|
+
}, a = (e) => typeof e == "string" ? e.length * 2 : 0, o = () => JSON.stringify({
|
|
824
|
+
shapes: Z(z.value),
|
|
825
|
+
lastSelectedShape: Z(I.value)
|
|
826
|
+
}), s = (e) => {
|
|
827
|
+
let t = JSON.parse(e);
|
|
828
|
+
z.value = t.shapes, I.value = t.lastSelectedShape;
|
|
829
|
+
}, c = () => {
|
|
830
|
+
Kt.value.undo = r.undo.length, Kt.value.redo = r.redo.length;
|
|
831
|
+
}, l = (e, o) => {
|
|
832
|
+
let s = r[e];
|
|
833
|
+
for (s.push(o), i[e] += a(o); s.length > t || i[e] > n;) {
|
|
834
|
+
let t = s.shift();
|
|
835
|
+
i[e] -= a(t);
|
|
836
|
+
}
|
|
837
|
+
};
|
|
838
|
+
return {
|
|
839
|
+
begin() {
|
|
840
|
+
r.open || (r.open = !0, r.before = o());
|
|
841
|
+
},
|
|
842
|
+
end() {
|
|
843
|
+
r.open && (r.open = !1, o() !== r.before && (l("undo", r.before), r.redo.length = 0, i.redo = 0), r.before = null, c());
|
|
844
|
+
},
|
|
845
|
+
undo() {
|
|
846
|
+
let e = r.undo.pop();
|
|
847
|
+
e && (i.undo -= a(e), l("redo", o()), s(e), c());
|
|
848
|
+
},
|
|
849
|
+
redo() {
|
|
850
|
+
let e = r.redo.pop();
|
|
851
|
+
e && (i.redo -= a(e), l("undo", o()), s(e), c());
|
|
852
|
+
},
|
|
853
|
+
size() {
|
|
854
|
+
return {
|
|
855
|
+
undo: r.undo.length,
|
|
856
|
+
redo: r.redo.length,
|
|
857
|
+
approxBytes: {
|
|
858
|
+
undo: i.undo,
|
|
859
|
+
redo: i.redo
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
function un() {
|
|
866
|
+
if (!Ut.value) return;
|
|
867
|
+
let e = Ut.value.getBoundingClientRect();
|
|
868
|
+
G.value = {
|
|
869
|
+
x: e.left + e.width / 2,
|
|
870
|
+
y: e.top
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
function Q(e, t, n = "top") {
|
|
874
|
+
W.value = e, Ut.value = t.currentTarget || t.target, un(), U.value = !0, window.addEventListener("scroll", un, !0), window.addEventListener("resize", un, { passive: !0 });
|
|
875
|
+
}
|
|
876
|
+
function $() {
|
|
877
|
+
U.value = !1, W.value = null, Ut.value = null, window.removeEventListener("scroll", un, !0), window.removeEventListener("resize", un);
|
|
878
|
+
}
|
|
879
|
+
function dn(e) {
|
|
880
|
+
let t = e?.target && e.target.id || E.value && E.value.id, n = z.value.find((e) => e.id === t);
|
|
881
|
+
if (!n) {
|
|
882
|
+
Ht.value = null;
|
|
883
|
+
return;
|
|
884
|
+
}
|
|
885
|
+
I.value = n;
|
|
886
|
+
let r = L.value.x, i = L.value.y;
|
|
887
|
+
switch (n.type) {
|
|
888
|
+
case "rect":
|
|
889
|
+
case "circle":
|
|
890
|
+
case "text":
|
|
891
|
+
Ht.value = {
|
|
892
|
+
dx: r - n.x,
|
|
893
|
+
dy: i - n.y
|
|
894
|
+
};
|
|
895
|
+
break;
|
|
896
|
+
case "arrow":
|
|
897
|
+
Ht.value = {
|
|
898
|
+
dx: r - n.x,
|
|
899
|
+
dy: i - n.y,
|
|
900
|
+
endDx: r - n.endX,
|
|
901
|
+
endDy: i - n.endY
|
|
902
|
+
};
|
|
903
|
+
break;
|
|
904
|
+
case "group":
|
|
905
|
+
Ht.value = {
|
|
906
|
+
dx: r - (n.x || 0),
|
|
907
|
+
dy: i - (n.y || 0)
|
|
908
|
+
};
|
|
909
|
+
break;
|
|
910
|
+
default:
|
|
911
|
+
Ht.value = {
|
|
912
|
+
dx: 0,
|
|
913
|
+
dy: 0
|
|
914
|
+
};
|
|
915
|
+
break;
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
function fn(e) {
|
|
919
|
+
let t = z.value.find((e) => e.id === I.value.id);
|
|
920
|
+
switch (!0) {
|
|
921
|
+
case e === "front":
|
|
922
|
+
z.value = z.value.filter((e) => e.id !== t.id), z.value.push(t);
|
|
923
|
+
break;
|
|
924
|
+
case e === "back":
|
|
925
|
+
z.value = z.value.filter((e) => e.id !== t.id), z.value = [t, ...z.value];
|
|
926
|
+
break;
|
|
927
|
+
default: return;
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
function pn() {
|
|
931
|
+
if (!I.value?.id) return;
|
|
932
|
+
let e = {
|
|
933
|
+
...I.value,
|
|
934
|
+
id: `${I.value.id}_copy_${t()}`,
|
|
935
|
+
x: I.value.x - 100 < 0 ? 1 : I.value.x - 100,
|
|
936
|
+
y: I.value.y - 100 < 0 ? 1 : I.value.y - 100
|
|
937
|
+
};
|
|
938
|
+
z.value.push(e);
|
|
939
|
+
}
|
|
940
|
+
function mn(e) {
|
|
941
|
+
e.preventDefault(), At.value = !1, e.target && e.target.id && (D.value = e.target.id);
|
|
942
|
+
}
|
|
943
|
+
function hn() {
|
|
944
|
+
!I.value || !I.value.id.includes("text") || I.value.textContent === "" && (z.value = z.value.filter((e) => e.id !== I.value.id), I.value = z.value.at(-1));
|
|
945
|
+
}
|
|
946
|
+
function gn(e) {
|
|
947
|
+
if (k.value) return;
|
|
948
|
+
e.preventDefault(), e.stopPropagation(), hn(), P.value ? (F.value = !0, V.value = !0) : (F.value = !1, V.value = !1, P.value = !1);
|
|
949
|
+
let n = `text_${t()}`;
|
|
950
|
+
if (F.value) {
|
|
951
|
+
K.value?.begin(), z.value.push({
|
|
952
|
+
id: n,
|
|
953
|
+
type: "text",
|
|
954
|
+
lines: 0,
|
|
955
|
+
x: L.value.x,
|
|
956
|
+
y: L.value.y,
|
|
957
|
+
textContent: "",
|
|
958
|
+
fontSize: Z(zt.value),
|
|
959
|
+
textAlign: Z(H.value),
|
|
960
|
+
isBold: Z(xt.value),
|
|
961
|
+
isItalic: Z(Tt.value),
|
|
962
|
+
isUnderline: Z(kt.value),
|
|
963
|
+
color: Z(Pt.value),
|
|
964
|
+
isBulletTextMode: Z(O.value)
|
|
965
|
+
}), E.value = z.value.at(-1), I.value = z.value.at(-1), K.value?.end();
|
|
966
|
+
return;
|
|
967
|
+
}
|
|
968
|
+
let r = () => {
|
|
969
|
+
St.value = z.value.find((t) => t.id === e.target.id).isDash;
|
|
970
|
+
}, i = () => {
|
|
971
|
+
bt.value = z.value.find((t) => t.id === e.target.id).strokeWidth;
|
|
972
|
+
};
|
|
973
|
+
if (N.value = !1, e.target.id.includes("arrow")) {
|
|
974
|
+
w.value = "arrow", r(), i();
|
|
975
|
+
return;
|
|
976
|
+
}
|
|
977
|
+
if (e.target.id.includes("circle")) {
|
|
978
|
+
w.value = "circle", B.value.circle.filled = z.value.find((t) => t.id === e.target.id).isFilled, r(), i();
|
|
979
|
+
return;
|
|
980
|
+
}
|
|
981
|
+
if (e.target.id.includes("rect")) {
|
|
982
|
+
w.value = "rect", B.value.rect.filled = z.value.find((t) => t.id === e.target.id).isFilled, r(), i();
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
985
|
+
if (e.target.id.includes("line")) {
|
|
986
|
+
w.value = "line", i();
|
|
987
|
+
return;
|
|
988
|
+
}
|
|
989
|
+
if (e.target.id.includes("text")) {
|
|
990
|
+
P.value = !0, F.value = !0, V.value = !0;
|
|
991
|
+
let t = z.value.find((t) => t.id === e.target.id);
|
|
992
|
+
t && t.textAlign && (H.value = z.value.find((t) => t.id === e.target.id).textAlign), t && (O.value = z.value.find((t) => t.id === e.target.id).isBulletTextMode);
|
|
993
|
+
return;
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
function _n(e) {
|
|
997
|
+
!I.value || I.value.type !== "text" || (I.value.textAlign = e);
|
|
998
|
+
}
|
|
999
|
+
function vn() {
|
|
1000
|
+
K.value?.undo?.();
|
|
1001
|
+
}
|
|
1002
|
+
function yn() {
|
|
1003
|
+
K.value?.redo?.();
|
|
1004
|
+
}
|
|
1005
|
+
let bn = [
|
|
1006
|
+
16,
|
|
1007
|
+
17,
|
|
1008
|
+
18,
|
|
1009
|
+
20,
|
|
1010
|
+
27,
|
|
1011
|
+
33,
|
|
1012
|
+
34,
|
|
1013
|
+
35,
|
|
1014
|
+
36,
|
|
1015
|
+
37,
|
|
1016
|
+
38,
|
|
1017
|
+
39,
|
|
1018
|
+
40,
|
|
1019
|
+
45,
|
|
1020
|
+
91,
|
|
1021
|
+
112,
|
|
1022
|
+
113,
|
|
1023
|
+
114,
|
|
1024
|
+
115,
|
|
1025
|
+
116,
|
|
1026
|
+
117,
|
|
1027
|
+
118,
|
|
1028
|
+
119,
|
|
1029
|
+
120,
|
|
1030
|
+
121,
|
|
1031
|
+
122,
|
|
1032
|
+
123,
|
|
1033
|
+
221,
|
|
1034
|
+
255,
|
|
1035
|
+
"Unidentified"
|
|
1036
|
+
];
|
|
1037
|
+
function xn(e) {
|
|
1038
|
+
if (At.value) return;
|
|
1039
|
+
e.preventDefault();
|
|
1040
|
+
let t = e.keyCode;
|
|
1041
|
+
if (!F.value) return;
|
|
1042
|
+
V.value = !0;
|
|
1043
|
+
let n;
|
|
1044
|
+
if (n = I.value.type === "text" ? z.value.find((e) => e.id === I.value.id) : z.value.at(-1), E.value = n, n.type === "text") switch (E.value.isBold = Z(xt.value), E.value.isItalic = Z(Tt.value), E.value.isUnderline = Z(kt.value), !0) {
|
|
1045
|
+
case [8, 46].includes(t):
|
|
1046
|
+
n.textContent = n.textContent.slice(0, -1);
|
|
1047
|
+
break;
|
|
1048
|
+
case t === 9:
|
|
1049
|
+
n.textContent += " ";
|
|
1050
|
+
break;
|
|
1051
|
+
case t === 13:
|
|
1052
|
+
n.lines += 1, n.textContent += "";
|
|
1053
|
+
return;
|
|
1054
|
+
case bn.includes(t): return;
|
|
1055
|
+
default: n.textContent += e.key;
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
function Sn() {
|
|
1059
|
+
if (R.value = [], w.value !== "group") {
|
|
1060
|
+
N.value = !1, z.value = z.value.filter((e) => e.type !== "group");
|
|
1061
|
+
return;
|
|
1062
|
+
}
|
|
1063
|
+
let e = z.value.at(-1);
|
|
1064
|
+
if (z.value.forEach((t) => {
|
|
1065
|
+
if (t.type !== "group") switch (!0) {
|
|
1066
|
+
case t.type === "arrow":
|
|
1067
|
+
let n = t.x <= t.endX && t.y <= t.endY && e.x <= t.x && e.y <= t.y && e.x + e.rectWidth >= t.endX && e.y + e.rectHeight >= t.endY, r = t.endY < t.y && t.x < t.endX && e.x <= t.x && e.y <= t.y && e.x + e.rectWidth >= t.endX && e.y + e.rectHeight >= t.y, i = t.x > t.endX && t.y < t.endY && e.x <= t.endX && e.y <= t.endY && e.x + e.rectWidth >= t.x && e.y + e.rectHeight >= t.endY, a = t.x > t.endX && t.y > t.endY && e.x <= t.endX && e.y <= t.endY && e.x + e.rectWidth >= t.x && e.y + e.rectHeight >= t.y;
|
|
1068
|
+
(n || r || i || a) && R.value.push(t);
|
|
1069
|
+
break;
|
|
1070
|
+
case t.type === "circle":
|
|
1071
|
+
e.x <= t.x + t.circleRadius && e.y <= t.y + t.circleRadius && t.x + t.circleRadius <= e.x + e.rectWidth && t.y + t.circleRadius <= e.y + e.rectHeight && R.value.push(t);
|
|
1072
|
+
break;
|
|
1073
|
+
case t.type === "rect":
|
|
1074
|
+
e.x <= t.x && e.y <= t.y && t.x <= e.x + e.rectWidth && t.y <= e.y + e.rectHeight && t.x + t.rectWidth <= e.x + e.rectWidth && t.y + t.rectHeight <= e.y + e.rectHeight && t.rectWidth <= e.rectWidth && t.rectHeight <= e.rectHeight && R.value.push(t);
|
|
1075
|
+
break;
|
|
1076
|
+
case t.type === "text":
|
|
1077
|
+
e.x <= t.x && e.y <= t.y && R.value.push(t);
|
|
1078
|
+
break;
|
|
1079
|
+
default: break;
|
|
1080
|
+
}
|
|
1081
|
+
}), R.value = R.value.map((t) => ({
|
|
1082
|
+
...t,
|
|
1083
|
+
id: e.id,
|
|
1084
|
+
oldId: t.id,
|
|
1085
|
+
diffX: t.x - e.x,
|
|
1086
|
+
diffY: t.y - e.y,
|
|
1087
|
+
diffEndX: t.endX ? t.endX - e.x : 0,
|
|
1088
|
+
diffEndY: t.endY ? t.endY - e.y : 0
|
|
1089
|
+
})), e.source = R.value, R.value.length > 1) {
|
|
1090
|
+
let n = Z(R.value).map((e) => e.oldId);
|
|
1091
|
+
z.value = z.value.filter((e) => !n.includes(e.id)), R.value.forEach((n) => {
|
|
1092
|
+
switch (!0) {
|
|
1093
|
+
case n.type === "circle":
|
|
1094
|
+
e.content += `
|
|
1095
|
+
<circle
|
|
1096
|
+
id="${n.id}"
|
|
1097
|
+
cx="${n.x}"
|
|
1098
|
+
cy="${n.y}"
|
|
1099
|
+
r="${n.circleRadius ? n.circleRadius : Number.MIN_VALUE}"
|
|
1100
|
+
fill="${n.isFilled ? n.color + n.alpha : "rgba(255,255,255,0.001)"}"
|
|
1101
|
+
stroke="${n.color + n.alpha}"
|
|
1102
|
+
stroke-width="${n.strokeWidth}"
|
|
1103
|
+
style="${n.isDash ? `stroke-dasharray: ${n.strokeWidth * 3}` : ""}"
|
|
1104
|
+
/>
|
|
1105
|
+
`;
|
|
1106
|
+
break;
|
|
1107
|
+
case n.type === "rect":
|
|
1108
|
+
e.content += `
|
|
1109
|
+
<rect
|
|
1110
|
+
id="${M.value ? "" : n.id}"
|
|
1111
|
+
x="${n.x}"
|
|
1112
|
+
y="${n.y}"
|
|
1113
|
+
fill="${n.isFilled ? n.color + n.alpha : "rgba(255,255,255,0.001)"}"
|
|
1114
|
+
height="${n.rectHeight}"
|
|
1115
|
+
width="${n.rectWidth}"
|
|
1116
|
+
stroke="${n.color + n.alpha}"
|
|
1117
|
+
stroke-width="${n.strokeWidth}"
|
|
1118
|
+
style="rx:1 !important; ry:1 !important; ${n.isDash ? `stroke-dasharray: ${n.strokeWidth * 3}` : ""}"
|
|
1119
|
+
/>
|
|
1120
|
+
`;
|
|
1121
|
+
break;
|
|
1122
|
+
case n.type === "arrow":
|
|
1123
|
+
let r = n.strokeWidth > 3 ? 5 : 10, i = n.strokeWidth > 3 ? 2.5 : 5, a = t();
|
|
1124
|
+
e.content += `
|
|
1125
|
+
<g id="${n.id}">
|
|
1126
|
+
<defs>
|
|
1127
|
+
<marker
|
|
1128
|
+
id="${a}"
|
|
1129
|
+
markerWidth="${r}"
|
|
1130
|
+
markerHeight="${r}"
|
|
1131
|
+
refX="0"
|
|
1132
|
+
refY="${i}"
|
|
1133
|
+
orient="auto"
|
|
1134
|
+
>
|
|
1135
|
+
<polygon
|
|
1136
|
+
points="0 0,${r} ${i}, 0 ${r}"
|
|
1137
|
+
fill="${n.color}"
|
|
1138
|
+
/>
|
|
1139
|
+
</marker>
|
|
1140
|
+
</defs>
|
|
1141
|
+
|
|
1142
|
+
<path
|
|
1143
|
+
style="stroke-linecap: round !important; ${n.isDash ? `stroke-dasharray: ${n.strokeWidth * 3}` : ""}"
|
|
1144
|
+
stroke="${n.color}"
|
|
1145
|
+
id="${n.id}"
|
|
1146
|
+
d="M${n.x},${n.y} ${n.endX},${n.endY}"
|
|
1147
|
+
stroke-width="${n.strokeWidth}"
|
|
1148
|
+
marker-end="url(#${a})"
|
|
1149
|
+
/>
|
|
1150
|
+
</g>
|
|
1151
|
+
`;
|
|
1152
|
+
break;
|
|
1153
|
+
case n.type === "text":
|
|
1154
|
+
let o = n.textContent.split(""), s = [];
|
|
1155
|
+
for (let e = 0; e < o.length; e += 1) s.push(`
|
|
1156
|
+
${n.isBulletTextMode ? `<tspan x="${n.x - n.fontSize}" y="${n.y + n.fontSize * e}" id="${n.id}" font-size="${n.fontSize / 2}">⬤</tspan>` : ""}
|
|
1157
|
+
<tspan id="${n.id}" x="${n.x}" y="${n.y + n.fontSize * e}">
|
|
1158
|
+
${o[e]}
|
|
1159
|
+
</tspan>`);
|
|
1160
|
+
e.content += `
|
|
1161
|
+
${nn(n, s, n.isBulletTextMode)}
|
|
1162
|
+
`;
|
|
1163
|
+
break;
|
|
1164
|
+
default: break;
|
|
1165
|
+
}
|
|
1166
|
+
});
|
|
1167
|
+
} else z.value = z.value.filter((t) => t.id !== e.id);
|
|
1168
|
+
}
|
|
1169
|
+
function Cn(e) {
|
|
1170
|
+
e.content = "";
|
|
1171
|
+
let n = e.x || 0, r = e.y || 0;
|
|
1172
|
+
(e.source || []).forEach((i) => {
|
|
1173
|
+
switch (i.type) {
|
|
1174
|
+
case "circle": {
|
|
1175
|
+
let t = n + i.diffX, a = r + i.diffY;
|
|
1176
|
+
e.content += `
|
|
1177
|
+
<circle
|
|
1178
|
+
id="${i.id}"
|
|
1179
|
+
cx="${t}"
|
|
1180
|
+
cy="${a}"
|
|
1181
|
+
r="${i.circleRadius ? i.circleRadius : Number.MIN_VALUE}"
|
|
1182
|
+
fill="${i.isFilled ? i.color + i.alpha : "rgba(255,255,255,0.001)"}"
|
|
1183
|
+
stroke="${i.color + i.alpha}"
|
|
1184
|
+
stroke-width="${i.strokeWidth}"
|
|
1185
|
+
style="${i.isDash ? `stroke-dasharray: ${i.strokeWidth * 3}` : ""}"
|
|
1186
|
+
/>
|
|
1187
|
+
`;
|
|
1188
|
+
break;
|
|
1189
|
+
}
|
|
1190
|
+
case "rect": {
|
|
1191
|
+
let t = n + i.diffX, a = r + i.diffY;
|
|
1192
|
+
e.content += `
|
|
1193
|
+
<rect
|
|
1194
|
+
id="${M.value ? "" : i.id}"
|
|
1195
|
+
x="${t}"
|
|
1196
|
+
y="${a}"
|
|
1197
|
+
fill="${i.isFilled ? i.color + i.alpha : "rgba(255,255,255,0.001)"}"
|
|
1198
|
+
height="${i.rectHeight}"
|
|
1199
|
+
width="${i.rectWidth}"
|
|
1200
|
+
stroke="${i.color + i.alpha}"
|
|
1201
|
+
stroke-width="${i.strokeWidth}"
|
|
1202
|
+
style="rx:1 !important; ry:1 !important; ${i.isDash ? `stroke-dasharray: ${i.strokeWidth * 3}` : ""}"
|
|
1203
|
+
/>
|
|
1204
|
+
`;
|
|
1205
|
+
break;
|
|
1206
|
+
}
|
|
1207
|
+
case "arrow": {
|
|
1208
|
+
let a = n + i.diffX, o = r + i.diffY, s = n + i.diffEndX, c = r + i.diffEndY, l = i.strokeWidth > 3 ? 5 : 10, ee = i.strokeWidth > 3 ? 2.5 : 5, te = `m_${i.id}_${t()}`;
|
|
1209
|
+
e.content += `
|
|
1210
|
+
<g id="${i.id}">
|
|
1211
|
+
<defs>
|
|
1212
|
+
<marker
|
|
1213
|
+
id="${te}"
|
|
1214
|
+
markerWidth="${l}"
|
|
1215
|
+
markerHeight="${l}"
|
|
1216
|
+
refX="0"
|
|
1217
|
+
refY="${ee}"
|
|
1218
|
+
orient="auto">
|
|
1219
|
+
<polygon points="0 0,${l} ${ee}, 0 ${l}" fill="${i.color}" />
|
|
1220
|
+
</marker>
|
|
1221
|
+
</defs>
|
|
1222
|
+
<path
|
|
1223
|
+
style="stroke-linecap: round !important; ${i.isDash ? `stroke-dasharray: ${i.strokeWidth * 3}` : ""}"
|
|
1224
|
+
stroke="${i.color}"
|
|
1225
|
+
id="${i.id}"
|
|
1226
|
+
d="M${a},${o} ${s},${c}"
|
|
1227
|
+
stroke-width="${i.strokeWidth}"
|
|
1228
|
+
marker-end="url(#${te})"
|
|
1229
|
+
/>
|
|
1230
|
+
</g>
|
|
1231
|
+
`;
|
|
1232
|
+
break;
|
|
1233
|
+
}
|
|
1234
|
+
case "text": {
|
|
1235
|
+
let t = (i.textContent || "").split("").map((e, t) => `
|
|
1236
|
+
${i.isBulletTextMode ? `<tspan x="${n + i.diffX - i.fontSize}" y="${r + i.diffY + i.fontSize * t}" id="${i.id}" font-size="${i.fontSize / 2}">⬤</tspan>` : ""}
|
|
1237
|
+
<tspan id="${i.id}" x="${n + i.diffX}" y="${r + i.diffY + i.fontSize * t}">
|
|
1238
|
+
${e}
|
|
1239
|
+
</tspan>
|
|
1240
|
+
`).join("");
|
|
1241
|
+
e.content += `
|
|
1242
|
+
<g id="${i.id}">
|
|
1243
|
+
<text
|
|
1244
|
+
style="user-select:none; height:100px;"
|
|
1245
|
+
id="${i.id}"
|
|
1246
|
+
x="${n + i.diffX}"
|
|
1247
|
+
y="${r + i.diffY}"
|
|
1248
|
+
text-anchor="${i.textAlign}"
|
|
1249
|
+
font-size="${i.fontSize}"
|
|
1250
|
+
fill="${i.color}"
|
|
1251
|
+
font-weight="${i.isBold ? "bold" : "normal"}"
|
|
1252
|
+
font-style="${i.isItalic ? "italic" : "normal"}"
|
|
1253
|
+
text-decoration="${i.isUnderline ? "underline" : "none"}">
|
|
1254
|
+
${t}
|
|
1255
|
+
</text>
|
|
1256
|
+
</g>
|
|
1257
|
+
`;
|
|
1258
|
+
break;
|
|
1259
|
+
}
|
|
1260
|
+
default: break;
|
|
1261
|
+
}
|
|
1262
|
+
});
|
|
1263
|
+
}
|
|
1264
|
+
function wn(e) {
|
|
1265
|
+
e.relatedTarget && X.value && X.value.contains(e.relatedTarget) || (At.value = !0, D.value = void 0);
|
|
1266
|
+
}
|
|
1267
|
+
function Tn() {
|
|
1268
|
+
if (Ct.value = !0, !w.value && !N.value || !Ct.value) return;
|
|
1269
|
+
wt.value = !0, T.value.start = {
|
|
1270
|
+
x: L.value.x,
|
|
1271
|
+
y: L.value.y
|
|
1272
|
+
};
|
|
1273
|
+
let e = `${N.value ? "group" : w.value}_${t()}`;
|
|
1274
|
+
switch (!0) {
|
|
1275
|
+
case w.value === "arrow":
|
|
1276
|
+
z.value.push({
|
|
1277
|
+
id: e,
|
|
1278
|
+
x: L.value.x,
|
|
1279
|
+
y: L.value.y,
|
|
1280
|
+
endX: L.value.x,
|
|
1281
|
+
endY: L.value.y,
|
|
1282
|
+
type: w.value,
|
|
1283
|
+
color: Z(Pt.value),
|
|
1284
|
+
strokeWidth: Z(Math.abs(bt.value)),
|
|
1285
|
+
isDash: Z(St.value)
|
|
1286
|
+
}), I.value = z.value.at(-1);
|
|
1287
|
+
break;
|
|
1288
|
+
case w.value === "circle":
|
|
1289
|
+
z.value.push({
|
|
1290
|
+
alpha: B.value.circle.filled ? Xt.value : "",
|
|
1291
|
+
id: e,
|
|
1292
|
+
color: Z(Pt.value),
|
|
1293
|
+
isFilled: Z(B.value.circle.filled),
|
|
1294
|
+
circleRadius: Z(B.value.circle.radius),
|
|
1295
|
+
circleStrokeWidth: Z(B.value.circle.strokeWidth),
|
|
1296
|
+
type: w.value,
|
|
1297
|
+
x: L.value.x,
|
|
1298
|
+
y: L.value.y,
|
|
1299
|
+
strokeWidth: Z(Math.abs(bt.value)),
|
|
1300
|
+
isDash: Z(St.value)
|
|
1301
|
+
}), I.value = z.value.at(-1);
|
|
1302
|
+
break;
|
|
1303
|
+
case w.value === "line":
|
|
1304
|
+
z.value.push({
|
|
1305
|
+
alpha: Z(Xt.value),
|
|
1306
|
+
id: e,
|
|
1307
|
+
x: L.value.x,
|
|
1308
|
+
y: L.value.y,
|
|
1309
|
+
type: w.value,
|
|
1310
|
+
color: Z(Pt.value),
|
|
1311
|
+
strokeWidth: Z(Math.abs(bt.value)),
|
|
1312
|
+
isDash: Z(St.value),
|
|
1313
|
+
path: `${L.value.x} ${L.value.y}`
|
|
1314
|
+
}), I.value = z.value.at(-1);
|
|
1315
|
+
break;
|
|
1316
|
+
case w.value === "rect":
|
|
1317
|
+
z.value.push({
|
|
1318
|
+
alpha: B.value.rect.filled ? Xt.value : "",
|
|
1319
|
+
id: e,
|
|
1320
|
+
color: Z(Pt.value),
|
|
1321
|
+
isFilled: Z(B.value.rect.filled),
|
|
1322
|
+
rectStrokeWidth: Z(B.value.rect.strokeWidth),
|
|
1323
|
+
rectHeight: Z(B.value.rect.height),
|
|
1324
|
+
rectWidth: Z(B.value.rect.width),
|
|
1325
|
+
type: w.value,
|
|
1326
|
+
x: L.value.x,
|
|
1327
|
+
y: L.value.y,
|
|
1328
|
+
strokeWidth: Z(Math.abs(bt.value)),
|
|
1329
|
+
isDash: Z(St.value)
|
|
1330
|
+
}), I.value = z.value.at(-1);
|
|
1331
|
+
break;
|
|
1332
|
+
case w.value === "group":
|
|
1333
|
+
z.value.push({
|
|
1334
|
+
alpha: 1,
|
|
1335
|
+
id: `group_${t()}`,
|
|
1336
|
+
x: L.value.x,
|
|
1337
|
+
y: L.value.y,
|
|
1338
|
+
isFilled: !1,
|
|
1339
|
+
rectHeight: Z(B.value.rect.height),
|
|
1340
|
+
rectWidth: Z(B.value.rect.width),
|
|
1341
|
+
rectStrokeWidth: 1,
|
|
1342
|
+
type: "group",
|
|
1343
|
+
color: "grey",
|
|
1344
|
+
strokeWidth: 1,
|
|
1345
|
+
isDash: !0,
|
|
1346
|
+
content: ""
|
|
1347
|
+
});
|
|
1348
|
+
break;
|
|
1349
|
+
default: break;
|
|
1350
|
+
}
|
|
1351
|
+
qt.value ||= requestAnimationFrame(on);
|
|
1352
|
+
}
|
|
1353
|
+
function En(e) {
|
|
1354
|
+
if (k.value) {
|
|
1355
|
+
Et.value = !1;
|
|
1356
|
+
return;
|
|
1357
|
+
}
|
|
1358
|
+
if (e.preventDefault(), e.stopPropagation(), Et.value = !0, e.pointerId != null) {
|
|
1359
|
+
try {
|
|
1360
|
+
X.value?.setPointerCapture?.(e.pointerId);
|
|
1361
|
+
} catch {}
|
|
1362
|
+
Jt.value = e.pointerId;
|
|
1363
|
+
} else Jt.value = null;
|
|
1364
|
+
if ((A.value || j.value || M.value || N.value) && K.value?.begin?.(), A.value) {
|
|
1365
|
+
Tn();
|
|
1366
|
+
return;
|
|
1367
|
+
}
|
|
1368
|
+
if (j.value) {
|
|
1369
|
+
let t = cn(e) || D.value || I.value?.id;
|
|
1370
|
+
t && (sn(t), E.value = { id: t }), dn(e);
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
function Dn(e) {
|
|
1374
|
+
if (!e || !e.id || e.type === "line" || !Ht.value && (dn({ target: { id: e.id } }), !Ht.value)) return;
|
|
1375
|
+
let { dx: t, dy: n, endDx: r, endDy: i } = Ht.value, a = L.value.x, o = L.value.y;
|
|
1376
|
+
switch (I.value = e, e.type) {
|
|
1377
|
+
case "arrow":
|
|
1378
|
+
e.x = a - t, e.y = o - n, e.endX = a - (r ?? t), e.endY = o - (i ?? n);
|
|
1379
|
+
break;
|
|
1380
|
+
case "circle":
|
|
1381
|
+
e.x = a - t, e.y = o - n;
|
|
1382
|
+
break;
|
|
1383
|
+
case "rect":
|
|
1384
|
+
e.x = a - t, e.y = o - n;
|
|
1385
|
+
break;
|
|
1386
|
+
case "text":
|
|
1387
|
+
e.x = a - t, e.y = o - n;
|
|
1388
|
+
break;
|
|
1389
|
+
case "group":
|
|
1390
|
+
e.x = a - t, e.y = o - n, Cn(e);
|
|
1391
|
+
break;
|
|
1392
|
+
default: break;
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
function On() {
|
|
1396
|
+
let e = E.value?.id || D.value;
|
|
1397
|
+
if (!e) return;
|
|
1398
|
+
let t = z.value.find((t) => t.id === e);
|
|
1399
|
+
t && Dn(t);
|
|
1400
|
+
}
|
|
1401
|
+
function kn() {
|
|
1402
|
+
wt.value = !1;
|
|
1403
|
+
let e = E.value.id;
|
|
1404
|
+
if (!e) return;
|
|
1405
|
+
Ct.value = !0;
|
|
1406
|
+
let t = z.value.find((t) => t.id === e);
|
|
1407
|
+
w.value = t.type, z.value = z.value.filter((t) => t.id !== e), z.value.push(t), an(!0);
|
|
1408
|
+
}
|
|
1409
|
+
function An(e) {
|
|
1410
|
+
k.value || (e.preventDefault(), e.stopPropagation(), e.target.localName !== "svg" && (E.value = e.target), j.value && Et.value ? On() : M.value && Et.value && kn());
|
|
1411
|
+
}
|
|
1412
|
+
function jn(e) {
|
|
1413
|
+
let t = e.target.id;
|
|
1414
|
+
switch (!0) {
|
|
1415
|
+
case k.value:
|
|
1416
|
+
K.value?.begin(), z.value = [...z.value].filter((e) => e.id !== t), I.value = void 0, K.value?.end();
|
|
1417
|
+
return;
|
|
1418
|
+
default:
|
|
1419
|
+
I.value = z.value.find((e) => e.id === t);
|
|
1420
|
+
break;
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
let Mn = b(null);
|
|
1424
|
+
function Nn(e, t) {
|
|
1425
|
+
for (t(e), e = e.firstChild; e;) Nn(e, t), e = e.nextSibling;
|
|
1426
|
+
}
|
|
1427
|
+
function Pn() {
|
|
1428
|
+
Dt.value = !0, k.value = !1, j.value = !1, M.value = !1, P.value = !1, F.value = !1, N.value = !1, w.value = void 0, V.value = !1, ie(async () => {
|
|
1429
|
+
let e = Mn.value;
|
|
1430
|
+
if (e) {
|
|
1431
|
+
Nn(e, (e) => {
|
|
1432
|
+
e && e.nodeType === 1 && (e.setAttribute("font-family", "Helvetica"), e.style.fontFamily = "Helvetica");
|
|
1433
|
+
});
|
|
1434
|
+
try {
|
|
1435
|
+
let t;
|
|
1436
|
+
try {
|
|
1437
|
+
t = (await import("jspdf")).default;
|
|
1438
|
+
} catch {
|
|
1439
|
+
throw Error("jspdf is not installed. Run npm install jspdf");
|
|
1440
|
+
}
|
|
1441
|
+
let n = await s({
|
|
1442
|
+
container: e,
|
|
1443
|
+
scale: 2
|
|
1444
|
+
}), r = new Image();
|
|
1445
|
+
r.src = n, r.onload = () => {
|
|
1446
|
+
let e = {
|
|
1447
|
+
width: 595.28,
|
|
1448
|
+
height: 841.89
|
|
1449
|
+
}, i = r.width, a = r.height, o = i / e.width * e.height, s = e.width, c = s / i * a, l = new t("", "pt", "a4"), ee = 0, te = a;
|
|
1450
|
+
if (te < o) l.addImage(n, "PNG", 0, 0, s, c, "", "FAST");
|
|
1451
|
+
else for (; te > 0;) l.addImage(n, "PNG", 0, ee, s, c, "", "FAST"), te -= o, ee -= e.height, te > 0 && l.addPage();
|
|
1452
|
+
l.save(`${(/* @__PURE__ */ new Date()).toLocaleDateString()}_annotations.pdf`);
|
|
1453
|
+
};
|
|
1454
|
+
} catch (e) {
|
|
1455
|
+
console.error("Error generating image:", e);
|
|
1456
|
+
} finally {
|
|
1457
|
+
Dt.value = !1, Nn(e, (e) => {
|
|
1458
|
+
e && e.nodeType === 1 && (e.setAttribute("font-family", q.value.style.fontFamily), e.style.fontFamily = q.value.style.fontFamily);
|
|
1459
|
+
});
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1464
|
+
function Fn(e) {
|
|
1465
|
+
if (!k.value && e && (e.preventDefault(), e.stopPropagation()), Ct.value = !1, Et.value = !1, Ht.value = null, Jt.value != null) {
|
|
1466
|
+
try {
|
|
1467
|
+
X.value?.releasePointerCapture?.(Jt.value);
|
|
1468
|
+
} catch {}
|
|
1469
|
+
Jt.value = null;
|
|
1470
|
+
}
|
|
1471
|
+
qt.value &&= (cancelAnimationFrame(qt.value), null), N.value && Sn(), K.value?.end();
|
|
1472
|
+
}
|
|
1473
|
+
function In() {
|
|
1474
|
+
!I.value || !I.value.id.includes("rect") || (I.value.isFilled = !I.value.isFilled);
|
|
1475
|
+
}
|
|
1476
|
+
function Ln() {
|
|
1477
|
+
!I.value || !I.value.id.includes("circle") || (I.value.isFilled = !I.value.isFilled);
|
|
1478
|
+
}
|
|
1479
|
+
function Rn() {
|
|
1480
|
+
!I.value || I.value.type === "text" || (I.value.isDash = Z(St.value));
|
|
1481
|
+
}
|
|
1482
|
+
function zn() {
|
|
1483
|
+
!I.value || ["arrow", "text"].includes(I.value.id) || (I.value.alpha = Z(Xt.value));
|
|
1484
|
+
}
|
|
1485
|
+
function Bn() {
|
|
1486
|
+
!I.value || ![
|
|
1487
|
+
"arrow",
|
|
1488
|
+
"circle",
|
|
1489
|
+
"rect",
|
|
1490
|
+
"line"
|
|
1491
|
+
].includes(I.value.type) || (I.value.strokeWidth = Z(Math.abs(bt.value)));
|
|
1492
|
+
}
|
|
1493
|
+
function Vn() {
|
|
1494
|
+
!I.value || I.value.type !== "text" || (I.value.isBold = Z(xt.value), I.value.isItalic = Z(Tt.value), I.value.isUnderline = Z(kt.value), I.value.fontSize = Z(zt.value), I.value.isBulletTextMode = Z(O.value));
|
|
1495
|
+
}
|
|
1496
|
+
function Hn(e) {
|
|
1497
|
+
if (e.preventDefault(), !X.value) return;
|
|
1498
|
+
let t = X.value.getBoundingClientRect(), n, r;
|
|
1499
|
+
e.touches && e.touches.length > 0 ? (n = e.touches[0].clientX, r = e.touches[0].clientY) : (n = e.clientX, r = e.clientY), L.value.x = (n - t.left) / t.width * Nt.value, L.value.y = (r - t.top) / t.height * Mt.value;
|
|
1500
|
+
}
|
|
1501
|
+
function Un(e) {
|
|
1502
|
+
if (V.value = !1, hn(), e === w.value) {
|
|
1503
|
+
w.value = void 0, A.value = !1;
|
|
1504
|
+
return;
|
|
1505
|
+
}
|
|
1506
|
+
A.value = !0, k.value = !1, j.value = !1, M.value = !1, P.value = !1, w.value = e;
|
|
1507
|
+
}
|
|
1508
|
+
function Wn() {
|
|
1509
|
+
Ot.value = !Ot.value, Ot.value || (j.value = !1, M.value = !1, P.value = !1, F.value = !1, w.value = void 0, V.value = !1, k.value = !1, F.value = !1), ge("toggleOpenState", { isOpen: Ot.value });
|
|
1510
|
+
}
|
|
1511
|
+
function Gn() {
|
|
1512
|
+
ge("saveAnnotations", {
|
|
1513
|
+
shapes: z.value,
|
|
1514
|
+
lastSelectedShape: I.value
|
|
1515
|
+
});
|
|
1516
|
+
}
|
|
1517
|
+
let Kn = null;
|
|
1518
|
+
return oe(() => {
|
|
1519
|
+
if (Mn.value) {
|
|
1520
|
+
let e = !1;
|
|
1521
|
+
Nn(Mn.value, (t) => {
|
|
1522
|
+
if (!e && [
|
|
1523
|
+
"DIV",
|
|
1524
|
+
"svg",
|
|
1525
|
+
"section",
|
|
1526
|
+
"canvas"
|
|
1527
|
+
].includes(t.tagName)) {
|
|
1528
|
+
It.value = t, e = !0;
|
|
1529
|
+
return;
|
|
1530
|
+
}
|
|
1531
|
+
});
|
|
1532
|
+
}
|
|
1533
|
+
Wt.value = (() => {
|
|
1534
|
+
if (typeof navigator > "u") return !1;
|
|
1535
|
+
let e = navigator.userAgentData?.platform ?? "";
|
|
1536
|
+
if (e) return /mac|ios/i.test(e);
|
|
1537
|
+
let t = navigator.userAgent ?? "";
|
|
1538
|
+
return /(Mac|iPhone|iPad|iPod)/i.test(t);
|
|
1539
|
+
})();
|
|
1540
|
+
let e = It?.value.getBoundingClientRect();
|
|
1541
|
+
if (Ft.value = e.height / e.width, Nt.value = 1e3, Mt.value = Ft.value * 1e3, Lt.value = e.width, Rt.value = e.height, new ResizeObserver((e) => {
|
|
1542
|
+
e.forEach((e) => {
|
|
1543
|
+
Lt.value = e.contentRect.width, Rt.value = e.contentRect.height, Ft.value = e.contentRect.height / e.contentRect.width, Mt.value = Ft.value * 1e3;
|
|
1544
|
+
});
|
|
1545
|
+
}).observe(It.value), Gt.value = (e) => xn(e), window.addEventListener("keydown", Gt.value), K.value = ln(), K.value.size) {
|
|
1546
|
+
let e = K.value.size();
|
|
1547
|
+
Kt.value.undo = e.undo, Kt.value.redo = e.redo;
|
|
1548
|
+
}
|
|
1549
|
+
Kn = he({
|
|
1550
|
+
isMacLike: Wt,
|
|
1551
|
+
isSummaryOpen: Ot,
|
|
1552
|
+
isWriting: F,
|
|
1553
|
+
isDeleteMode: k,
|
|
1554
|
+
isMoveMode: j,
|
|
1555
|
+
isResizeMode: M,
|
|
1556
|
+
isSelectMode: N,
|
|
1557
|
+
isDrawMode: A,
|
|
1558
|
+
isTextMode: P,
|
|
1559
|
+
activeShape: w,
|
|
1560
|
+
showCaret: V,
|
|
1561
|
+
lastSelectedShape: I,
|
|
1562
|
+
shapes: z,
|
|
1563
|
+
history: K,
|
|
1564
|
+
setShapeTo: Un,
|
|
1565
|
+
undoLastShape: vn,
|
|
1566
|
+
redoLastShape: yn
|
|
1567
|
+
});
|
|
1568
|
+
}), ae(() => {
|
|
1569
|
+
$(), qt.value && cancelAnimationFrame(qt.value), Gt.value && window.removeEventListener("keydown", Gt.value), Kn && Kn(), window.removeEventListener("keydown", xn);
|
|
1570
|
+
}), fe(z, (e) => {
|
|
1571
|
+
e.length === 0 && (I.value = void 0);
|
|
1572
|
+
}), fe(P, (e) => {
|
|
1573
|
+
V.value = e;
|
|
1574
|
+
}), (e, t) => (y(), p("div", ve, [m("div", ye, [g(ee, {
|
|
1575
|
+
config: {
|
|
1576
|
+
maxHeight: 1e3,
|
|
1577
|
+
useCursorPointer: J.value,
|
|
1578
|
+
head: {
|
|
1579
|
+
backgroundColor: q.value.style.backgroundColor,
|
|
1580
|
+
color: q.value.style.color,
|
|
1581
|
+
iconColor: q.value.style.color,
|
|
1582
|
+
iconSize: 20,
|
|
1583
|
+
icon: Ot.value ? "close" : "annotator",
|
|
1584
|
+
padding: "6px"
|
|
1585
|
+
},
|
|
1586
|
+
body: {
|
|
1587
|
+
backgroundColor: q.value.style.backgroundColor,
|
|
1588
|
+
color: q.value.style.color
|
|
1589
|
+
}
|
|
1590
|
+
},
|
|
1591
|
+
onToggle: Wn
|
|
1592
|
+
}, {
|
|
1593
|
+
title: S(({ color: e }) => [m("div", { style: v({ color: e }) }, x(q.value.translations.title), 5)]),
|
|
1594
|
+
content: S(({ backgroundColor: n }) => [m("div", {
|
|
1595
|
+
class: "tool-selection",
|
|
1596
|
+
style: v({ backgroundColor: n })
|
|
1597
|
+
}, [
|
|
1598
|
+
m("button", {
|
|
1599
|
+
disabled: z.value.length === 0,
|
|
1600
|
+
style: v({
|
|
1601
|
+
background: j.value ? q.value.style.buttons.controls.selected.backgroundColor : q.value.style.buttons.controls.backgroundColor,
|
|
1602
|
+
border: j.value ? q.value.style.buttons.controls.selected.border : q.value.style.buttons.controls.border,
|
|
1603
|
+
color: j.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color,
|
|
1604
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
1605
|
+
cursor: J.value ? "pointer" : "default"
|
|
1606
|
+
}),
|
|
1607
|
+
class: _({
|
|
1608
|
+
"button-tool": !0,
|
|
1609
|
+
"button-tool--selected": j.value,
|
|
1610
|
+
tooltip: !0
|
|
1611
|
+
}),
|
|
1612
|
+
onClick: t[0] ||= (e) => {
|
|
1613
|
+
hn(), j.value = !j.value, w.value = void 0, k.value = !1, A.value = !1, M.value = !1, N.value = !1, P.value = !1, F.value = !1, V.value = !1;
|
|
1614
|
+
},
|
|
1615
|
+
onMouseenter: t[1] ||= (e) => q.value.style.showTooltips && Q("move", e, "top"),
|
|
1616
|
+
onMouseleave: $,
|
|
1617
|
+
onFocus: t[2] ||= (e) => q.value.style.showTooltips && Q("move", e, "top"),
|
|
1618
|
+
onBlur: $
|
|
1619
|
+
}, [g(l, {
|
|
1620
|
+
name: "move",
|
|
1621
|
+
stroke: j.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color
|
|
1622
|
+
}, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
|
|
1623
|
+
key: 0,
|
|
1624
|
+
show: U.value && W.value === "move",
|
|
1625
|
+
x: G.value.x,
|
|
1626
|
+
y: G.value.y - 6,
|
|
1627
|
+
placement: "top",
|
|
1628
|
+
styleObject: Y.value
|
|
1629
|
+
}, {
|
|
1630
|
+
default: S(() => [h(x(q.value.translations.tooltipMove) + " ", 1), t[91] ||= m("kbd", null, "M", -1)]),
|
|
1631
|
+
_: 1
|
|
1632
|
+
}, 8, [
|
|
1633
|
+
"show",
|
|
1634
|
+
"x",
|
|
1635
|
+
"y",
|
|
1636
|
+
"styleObject"
|
|
1637
|
+
])) : f("", !0)], 46, be),
|
|
1638
|
+
m("button", {
|
|
1639
|
+
disabled: z.value.length === 0 || w.value === "line",
|
|
1640
|
+
style: v({
|
|
1641
|
+
background: M.value ? q.value.style.buttons.controls.selected.backgroundColor : q.value.style.buttons.controls.backgroundColor,
|
|
1642
|
+
border: M.value ? q.value.style.buttons.controls.selected.border : q.value.style.buttons.controls.border,
|
|
1643
|
+
color: M.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color,
|
|
1644
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
1645
|
+
cursor: J.value ? "pointer" : "default"
|
|
1646
|
+
}),
|
|
1647
|
+
class: _({
|
|
1648
|
+
"button-tool": !0,
|
|
1649
|
+
"button-tool--selected": M.value,
|
|
1650
|
+
tooltip: !0
|
|
1651
|
+
}),
|
|
1652
|
+
onClick: t[3] ||= (e) => {
|
|
1653
|
+
hn(), M.value = !M.value, j.value = !1, k.value = !1, A.value = !1, N.value = !1, P.value = !1, F.value = !1, w.value = void 0, V.value = !1;
|
|
1654
|
+
},
|
|
1655
|
+
onMouseenter: t[4] ||= (e) => q.value.style.showTooltips && Q("resize", e, "top"),
|
|
1656
|
+
onMouseleave: $,
|
|
1657
|
+
onFocus: t[5] ||= (e) => q.value.style.showTooltips && Q("resize", e, "top"),
|
|
1658
|
+
onBlur: $
|
|
1659
|
+
}, [g(l, {
|
|
1660
|
+
name: "resize",
|
|
1661
|
+
stroke: M.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color
|
|
1662
|
+
}, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
|
|
1663
|
+
key: 0,
|
|
1664
|
+
show: U.value && W.value === "resize",
|
|
1665
|
+
x: G.value.x,
|
|
1666
|
+
y: G.value.y - 6,
|
|
1667
|
+
placement: "top",
|
|
1668
|
+
styleObject: Y.value
|
|
1669
|
+
}, {
|
|
1670
|
+
default: S(() => [h(x(q.value.translations.tooltipResize) + " ", 1), t[92] ||= m("kbd", null, "R", -1)]),
|
|
1671
|
+
_: 1
|
|
1672
|
+
}, 8, [
|
|
1673
|
+
"show",
|
|
1674
|
+
"x",
|
|
1675
|
+
"y",
|
|
1676
|
+
"styleObject"
|
|
1677
|
+
])) : f("", !0)], 46, xe),
|
|
1678
|
+
m("button", {
|
|
1679
|
+
disabled: z.value.length === 0,
|
|
1680
|
+
style: v({
|
|
1681
|
+
background: k.value ? q.value.style.buttons.controls.selected.backgroundColor : q.value.style.buttons.controls.backgroundColor,
|
|
1682
|
+
border: k.value ? q.value.style.buttons.controls.selected.border : q.value.style.buttons.controls.border,
|
|
1683
|
+
color: k.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color,
|
|
1684
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
1685
|
+
cursor: J.value ? "pointer" : "default"
|
|
1686
|
+
}),
|
|
1687
|
+
class: _({
|
|
1688
|
+
"button-tool": !0,
|
|
1689
|
+
"button-tool--selected": k.value,
|
|
1690
|
+
tooltip: !0
|
|
1691
|
+
}),
|
|
1692
|
+
onClick: t[6] ||= (e) => {
|
|
1693
|
+
hn(), k.value = !k.value, j.value = !1, M.value = !1, N.value = !1, P.value = !1, F.value = !1, w.value = void 0, V.value = !1;
|
|
1694
|
+
},
|
|
1695
|
+
onMouseenter: t[7] ||= (e) => q.value.style.showTooltips && Q("delete", e, "top"),
|
|
1696
|
+
onMouseleave: $,
|
|
1697
|
+
onFocus: t[8] ||= (e) => q.value.style.showTooltips && Q("delete", e, "top"),
|
|
1698
|
+
onBlur: $
|
|
1699
|
+
}, [g(l, {
|
|
1700
|
+
name: "trash",
|
|
1701
|
+
stroke: k.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color
|
|
1702
|
+
}, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
|
|
1703
|
+
key: 0,
|
|
1704
|
+
show: U.value && W.value === "delete",
|
|
1705
|
+
x: G.value.x,
|
|
1706
|
+
y: G.value.y - 6,
|
|
1707
|
+
placement: "top",
|
|
1708
|
+
styleObject: Y.value
|
|
1709
|
+
}, {
|
|
1710
|
+
default: S(() => [h(x(q.value.translations.tooltipDelete) + " ", 1), t[93] ||= m("kbd", null, "D", -1)]),
|
|
1711
|
+
_: 1
|
|
1712
|
+
}, 8, [
|
|
1713
|
+
"show",
|
|
1714
|
+
"x",
|
|
1715
|
+
"y",
|
|
1716
|
+
"styleObject"
|
|
1717
|
+
])) : f("", !0)], 46, Se),
|
|
1718
|
+
m("button", {
|
|
1719
|
+
disabled: !Yt.value,
|
|
1720
|
+
style: v({
|
|
1721
|
+
background: N.value ? q.value.style.buttons.controls.selected.backgroundColor : q.value.style.buttons.controls.backgroundColor,
|
|
1722
|
+
border: N.value ? q.value.style.buttons.controls.selected.border : q.value.style.buttons.controls.border,
|
|
1723
|
+
color: N.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color,
|
|
1724
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
1725
|
+
cursor: J.value ? "pointer" : "default"
|
|
1726
|
+
}),
|
|
1727
|
+
class: _({
|
|
1728
|
+
"button-tool": !0,
|
|
1729
|
+
"button-tool--selected": N.value,
|
|
1730
|
+
tooltip: !0
|
|
1731
|
+
}),
|
|
1732
|
+
onClick: t[9] ||= (e) => {
|
|
1733
|
+
hn(), Un("group"), N.value = !N.value, k.value = !1, j.value = !1, M.value = !1, P.value = !1, F.value = !1, w.value = "group", V.value = !1;
|
|
1734
|
+
},
|
|
1735
|
+
onMouseenter: t[10] ||= (e) => q.value.style.showTooltips && Q("selectAndGroup", e, "top"),
|
|
1736
|
+
onMouseleave: $,
|
|
1737
|
+
onFocus: t[11] ||= (e) => q.value.style.showTooltips && Q("selectAndGroup", e, "top"),
|
|
1738
|
+
onBlur: $
|
|
1739
|
+
}, [g(l, {
|
|
1740
|
+
name: "selectAndGroup",
|
|
1741
|
+
stroke: N.value ? q.value.style.buttons.controls.selected.color : q.value.style.buttons.controls.color
|
|
1742
|
+
}, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
|
|
1743
|
+
key: 0,
|
|
1744
|
+
show: U.value && W.value === "selectAndGroup",
|
|
1745
|
+
x: G.value.x,
|
|
1746
|
+
y: G.value.y - 6,
|
|
1747
|
+
placement: "top",
|
|
1748
|
+
styleObject: Y.value
|
|
1749
|
+
}, {
|
|
1750
|
+
default: S(() => [h(x(q.value.translations.tooltipGroup) + " ", 1), t[94] ||= m("kbd", null, "G", -1)]),
|
|
1751
|
+
_: 1
|
|
1752
|
+
}, 8, [
|
|
1753
|
+
"show",
|
|
1754
|
+
"x",
|
|
1755
|
+
"y",
|
|
1756
|
+
"styleObject"
|
|
1757
|
+
])) : f("", !0)], 46, Ce),
|
|
1758
|
+
m("button", {
|
|
1759
|
+
disabled: z.value.length === 0,
|
|
1760
|
+
style: v({
|
|
1761
|
+
background: q.value.style.buttons.controls.backgroundColor,
|
|
1762
|
+
border: q.value.style.buttons.controls.border,
|
|
1763
|
+
color: q.value.style.buttons.controls.color,
|
|
1764
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
1765
|
+
cursor: J.value ? "pointer" : "default"
|
|
1766
|
+
}),
|
|
1767
|
+
class: _({
|
|
1768
|
+
"button-tool": !0,
|
|
1769
|
+
tooltip: !0
|
|
1770
|
+
}),
|
|
1771
|
+
onClick: t[12] ||= (e) => {
|
|
1772
|
+
M.value = !1, j.value = !0, k.value = !1, A.value = !1, N.value = !1, P.value = !1, F.value = !1, V.value = !1, fn("front");
|
|
1773
|
+
},
|
|
1774
|
+
onMouseenter: t[13] ||= (e) => q.value.style.showTooltips && Q("bringToFront", e, "top"),
|
|
1775
|
+
onMouseleave: $,
|
|
1776
|
+
onFocus: t[14] ||= (e) => q.value.style.showTooltips && Q("bringToFront", e, "top"),
|
|
1777
|
+
onBlur: $
|
|
1778
|
+
}, [g(l, {
|
|
1779
|
+
name: "bringToFront",
|
|
1780
|
+
stroke: q.value.style.buttons.controls.color
|
|
1781
|
+
}, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
|
|
1782
|
+
key: 0,
|
|
1783
|
+
show: U.value && W.value === "bringToFront",
|
|
1784
|
+
x: G.value.x,
|
|
1785
|
+
y: G.value.y - 6,
|
|
1786
|
+
placement: "top",
|
|
1787
|
+
styleObject: Y.value
|
|
1788
|
+
}, {
|
|
1789
|
+
default: S(() => [h(x(q.value.translations.tooltipBringToFront), 1)]),
|
|
1790
|
+
_: 1
|
|
1791
|
+
}, 8, [
|
|
1792
|
+
"show",
|
|
1793
|
+
"x",
|
|
1794
|
+
"y",
|
|
1795
|
+
"styleObject"
|
|
1796
|
+
])) : f("", !0)], 44, we),
|
|
1797
|
+
m("button", {
|
|
1798
|
+
disabled: z.value.length === 0,
|
|
1799
|
+
style: v({
|
|
1800
|
+
background: q.value.style.buttons.controls.backgroundColor,
|
|
1801
|
+
border: q.value.style.buttons.controls.border,
|
|
1802
|
+
color: q.value.style.buttons.controls.color,
|
|
1803
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
1804
|
+
cursor: J.value ? "pointer" : "default"
|
|
1805
|
+
}),
|
|
1806
|
+
class: _({
|
|
1807
|
+
"button-tool": !0,
|
|
1808
|
+
tooltip: !0
|
|
1809
|
+
}),
|
|
1810
|
+
onClick: t[15] ||= (e) => {
|
|
1811
|
+
M.value = !1, j.value = !0, k.value = !1, A.value = !1, N.value = !1, P.value = !1, F.value = !1, V.value = !1, fn("back");
|
|
1812
|
+
},
|
|
1813
|
+
onMouseenter: t[16] ||= (e) => q.value.style.showTooltips && Q("bringToBack", e, "top"),
|
|
1814
|
+
onMouseleave: $,
|
|
1815
|
+
onFocus: t[17] ||= (e) => q.value.style.showTooltips && Q("bringToBack", e, "top"),
|
|
1816
|
+
onBlur: $
|
|
1817
|
+
}, [g(l, {
|
|
1818
|
+
name: "bringToBack",
|
|
1819
|
+
stroke: q.value.style.buttons.controls.color
|
|
1820
|
+
}, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
|
|
1821
|
+
key: 0,
|
|
1822
|
+
show: U.value && W.value === "bringToBack",
|
|
1823
|
+
x: G.value.x,
|
|
1824
|
+
y: G.value.y - 6,
|
|
1825
|
+
placement: "top",
|
|
1826
|
+
styleObject: Y.value
|
|
1827
|
+
}, {
|
|
1828
|
+
default: S(() => [h(x(q.value.translations.tooltipBringToBack), 1)]),
|
|
1829
|
+
_: 1
|
|
1830
|
+
}, 8, [
|
|
1831
|
+
"show",
|
|
1832
|
+
"x",
|
|
1833
|
+
"y",
|
|
1834
|
+
"styleObject"
|
|
1835
|
+
])) : f("", !0)], 44, Te),
|
|
1836
|
+
m("button", {
|
|
1837
|
+
disabled: z.value.length === 0 || w.value === "line",
|
|
1838
|
+
style: v({
|
|
1839
|
+
background: q.value.style.buttons.controls.backgroundColor,
|
|
1840
|
+
border: q.value.style.buttons.controls.border,
|
|
1841
|
+
color: q.value.style.buttons.controls.color,
|
|
1842
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
1843
|
+
cursor: J.value ? "pointer" : "default"
|
|
1844
|
+
}),
|
|
1845
|
+
class: _({
|
|
1846
|
+
"button-tool": !0,
|
|
1847
|
+
tooltip: !0
|
|
1848
|
+
}),
|
|
1849
|
+
onClick: t[18] ||= (e) => {
|
|
1850
|
+
hn(), M.value = !1, j.value = !0, k.value = !1, A.value = !1, N.value = !1, P.value = !1, F.value = !1, V.value = !1, pn();
|
|
1851
|
+
},
|
|
1852
|
+
onMouseenter: t[19] ||= (e) => q.value.style.showTooltips && Q("duplicate", e, "top"),
|
|
1853
|
+
onMouseleave: $,
|
|
1854
|
+
onFocus: t[20] ||= (e) => q.value.style.showTooltips && Q("duplicate", e, "top"),
|
|
1855
|
+
onBlur: $
|
|
1856
|
+
}, [g(l, {
|
|
1857
|
+
name: "copy",
|
|
1858
|
+
stroke: q.value.style.buttons.controls.color,
|
|
1859
|
+
size: 18
|
|
1860
|
+
}, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
|
|
1861
|
+
key: 0,
|
|
1862
|
+
show: U.value && W.value === "duplicate",
|
|
1863
|
+
x: G.value.x,
|
|
1864
|
+
y: G.value.y - 6,
|
|
1865
|
+
placement: "top",
|
|
1866
|
+
styleObject: Y.value
|
|
1867
|
+
}, {
|
|
1868
|
+
default: S(() => [h(x(q.value.translations.tooltipDuplicate), 1)]),
|
|
1869
|
+
_: 1
|
|
1870
|
+
}, 8, [
|
|
1871
|
+
"show",
|
|
1872
|
+
"x",
|
|
1873
|
+
"y",
|
|
1874
|
+
"styleObject"
|
|
1875
|
+
])) : f("", !0)], 44, Ee),
|
|
1876
|
+
m("button", {
|
|
1877
|
+
disabled: Kt.value.undo === 0,
|
|
1878
|
+
style: v({
|
|
1879
|
+
background: q.value.style.buttons.controls.backgroundColor,
|
|
1880
|
+
border: q.value.style.buttons.controls.border,
|
|
1881
|
+
color: q.value.style.buttons.controls.color,
|
|
1882
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
1883
|
+
cursor: J.value ? "pointer" : "default"
|
|
1884
|
+
}),
|
|
1885
|
+
class: _({
|
|
1886
|
+
"button-tool": !0,
|
|
1887
|
+
"button-tool--one-shot": !0,
|
|
1888
|
+
tooltip: !0
|
|
1889
|
+
}),
|
|
1890
|
+
onClick: t[21] ||= (e) => {
|
|
1891
|
+
M.value = !1, j.value = !1, k.value = !1, A.value = !1, N.value = !1, P.value = !1, F.value = !1, w.value = void 0, V.value = !1, vn();
|
|
1892
|
+
},
|
|
1893
|
+
onMouseenter: t[22] ||= (e) => q.value.style.showTooltips && Q("undoLast", e, "top"),
|
|
1894
|
+
onMouseleave: $,
|
|
1895
|
+
onFocus: t[23] ||= (e) => q.value.style.showTooltips && Q("undoLast", e, "top"),
|
|
1896
|
+
onBlur: $
|
|
1897
|
+
}, [g(l, {
|
|
1898
|
+
name: "refresh",
|
|
1899
|
+
stroke: q.value.style.buttons.controls.color,
|
|
1900
|
+
size: 20
|
|
1901
|
+
}, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
|
|
1902
|
+
key: 0,
|
|
1903
|
+
show: U.value && W.value === "undoLast",
|
|
1904
|
+
x: G.value.x,
|
|
1905
|
+
y: G.value.y - 6,
|
|
1906
|
+
placement: "top",
|
|
1907
|
+
styleObject: Y.value
|
|
1908
|
+
}, {
|
|
1909
|
+
default: S(() => [
|
|
1910
|
+
h(x(q.value.translations.tooltipUndo) + " ", 1),
|
|
1911
|
+
m("kbd", null, x(Wt.value ? "⌘" : "Ctrl"), 1),
|
|
1912
|
+
t[95] ||= m("kbd", null, "Z", -1)
|
|
1913
|
+
]),
|
|
1914
|
+
_: 1
|
|
1915
|
+
}, 8, [
|
|
1916
|
+
"show",
|
|
1917
|
+
"x",
|
|
1918
|
+
"y",
|
|
1919
|
+
"styleObject"
|
|
1920
|
+
])) : f("", !0)], 44, De),
|
|
1921
|
+
m("button", {
|
|
1922
|
+
disabled: Kt.value.redo === 0,
|
|
1923
|
+
style: v({
|
|
1924
|
+
background: q.value.style.buttons.controls.backgroundColor,
|
|
1925
|
+
border: q.value.style.buttons.controls.border,
|
|
1926
|
+
color: q.value.style.buttons.controls.color,
|
|
1927
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
1928
|
+
cursor: J.value ? "pointer" : "default"
|
|
1929
|
+
}),
|
|
1930
|
+
class: _({
|
|
1931
|
+
"button-tool": !0,
|
|
1932
|
+
"button-tool--one-shot": !0,
|
|
1933
|
+
tooltip: !0
|
|
1934
|
+
}),
|
|
1935
|
+
onClick: t[24] ||= (e) => {
|
|
1936
|
+
M.value = !1, j.value = !1, k.value = !1, A.value = !1, N.value = !1, P.value = !1, F.value = !1, w.value = void 0, V.value = !1, yn();
|
|
1937
|
+
},
|
|
1938
|
+
onMouseenter: t[25] ||= (e) => q.value.style.showTooltips && Q("redoLast", e, "top"),
|
|
1939
|
+
onMouseleave: $,
|
|
1940
|
+
onFocus: t[26] ||= (e) => q.value.style.showTooltips && Q("redoLast", e, "top"),
|
|
1941
|
+
onBlur: $
|
|
1942
|
+
}, [g(l, {
|
|
1943
|
+
name: "refresh",
|
|
1944
|
+
stroke: q.value.style.buttons.controls.color,
|
|
1945
|
+
size: 20,
|
|
1946
|
+
style: { transform: "rotateX(0deg) rotateY(180deg)" }
|
|
1947
|
+
}, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
|
|
1948
|
+
key: 0,
|
|
1949
|
+
show: U.value && W.value === "redoLast",
|
|
1950
|
+
x: G.value.x,
|
|
1951
|
+
y: G.value.y - 6,
|
|
1952
|
+
placement: "top",
|
|
1953
|
+
styleObject: Y.value
|
|
1954
|
+
}, {
|
|
1955
|
+
default: S(() => [
|
|
1956
|
+
h(x(q.value.translations.tooltipRedo) + " ", 1),
|
|
1957
|
+
m("kbd", null, x(Wt.value ? "⌘" : "Ctrl"), 1),
|
|
1958
|
+
t[96] ||= m("kbd", null, "Y", -1)
|
|
1959
|
+
]),
|
|
1960
|
+
_: 1
|
|
1961
|
+
}, 8, [
|
|
1962
|
+
"show",
|
|
1963
|
+
"x",
|
|
1964
|
+
"y",
|
|
1965
|
+
"styleObject"
|
|
1966
|
+
])) : f("", !0)], 44, Oe),
|
|
1967
|
+
q.value.style.showPrint ? (y(), p("button", {
|
|
1968
|
+
key: 0,
|
|
1969
|
+
style: v({
|
|
1970
|
+
background: q.value.style.buttons.controls.backgroundColor,
|
|
1971
|
+
border: q.value.style.buttons.controls.border,
|
|
1972
|
+
color: q.value.style.buttons.controls.color,
|
|
1973
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
1974
|
+
cursor: J.value ? "pointer" : "default"
|
|
1975
|
+
}),
|
|
1976
|
+
class: _({
|
|
1977
|
+
"button-tool": !0,
|
|
1978
|
+
tooltip: !0
|
|
1979
|
+
}),
|
|
1980
|
+
onClick: Pn,
|
|
1981
|
+
onMouseenter: t[27] ||= (e) => q.value.style.showTooltips && Q("printPdf", e, "top"),
|
|
1982
|
+
onMouseleave: $,
|
|
1983
|
+
onFocus: t[28] ||= (e) => q.value.style.showTooltips && Q("printPdf", e, "top"),
|
|
1984
|
+
onBlur: $
|
|
1985
|
+
}, [g(l, {
|
|
1986
|
+
name: "printer",
|
|
1987
|
+
stroke: q.value.style.buttons.controls.color
|
|
1988
|
+
}, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
|
|
1989
|
+
key: 0,
|
|
1990
|
+
show: U.value && W.value === "printPdf",
|
|
1991
|
+
x: G.value.x,
|
|
1992
|
+
y: G.value.y - 6,
|
|
1993
|
+
placement: "top",
|
|
1994
|
+
styleObject: Y.value
|
|
1995
|
+
}, {
|
|
1996
|
+
default: S(() => [h(x(q.value.translations.tooltipPdf), 1)]),
|
|
1997
|
+
_: 1
|
|
1998
|
+
}, 8, [
|
|
1999
|
+
"show",
|
|
2000
|
+
"x",
|
|
2001
|
+
"y",
|
|
2002
|
+
"styleObject"
|
|
2003
|
+
])) : f("", !0)], 36)) : f("", !0),
|
|
2004
|
+
q.value.style.showImage ? (y(), p("button", {
|
|
2005
|
+
key: 1,
|
|
2006
|
+
style: v({
|
|
2007
|
+
background: q.value.style.buttons.controls.backgroundColor,
|
|
2008
|
+
border: q.value.style.buttons.controls.border,
|
|
2009
|
+
color: q.value.style.buttons.controls.color,
|
|
2010
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
2011
|
+
cursor: J.value ? "pointer" : "default"
|
|
2012
|
+
}),
|
|
2013
|
+
class: _({
|
|
2014
|
+
"button-tool": !0,
|
|
2015
|
+
tooltip: !0
|
|
2016
|
+
}),
|
|
2017
|
+
onClick: t[29] ||= (...e) => le(yt) && le(yt)(...e),
|
|
2018
|
+
onMouseenter: t[30] ||= (e) => q.value.style.showTooltips && Q("printImage", e, "top"),
|
|
2019
|
+
onMouseleave: $,
|
|
2020
|
+
onFocus: t[31] ||= (e) => q.value.style.showTooltips && Q("printImage", e, "top"),
|
|
2021
|
+
onBlur: $
|
|
2022
|
+
}, [g(l, {
|
|
2023
|
+
name: "image",
|
|
2024
|
+
stroke: q.value.style.buttons.controls.color,
|
|
2025
|
+
size: 20
|
|
2026
|
+
}, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
|
|
2027
|
+
key: 0,
|
|
2028
|
+
show: U.value && W.value === "printImage",
|
|
2029
|
+
x: G.value.x,
|
|
2030
|
+
y: G.value.y - 6,
|
|
2031
|
+
placement: "top",
|
|
2032
|
+
styleObject: Y.value
|
|
2033
|
+
}, {
|
|
2034
|
+
default: S(() => [h(x(q.value.translations.tooltipImage), 1)]),
|
|
2035
|
+
_: 1
|
|
2036
|
+
}, 8, [
|
|
2037
|
+
"show",
|
|
2038
|
+
"x",
|
|
2039
|
+
"y",
|
|
2040
|
+
"styleObject"
|
|
2041
|
+
])) : f("", !0)], 36)) : f("", !0),
|
|
2042
|
+
q.value.style.showSave && e.$attrs.onSaveAnnotations ? (y(), p("button", {
|
|
2043
|
+
key: 2,
|
|
2044
|
+
style: v({
|
|
2045
|
+
background: q.value.style.buttons.controls.backgroundColor,
|
|
2046
|
+
border: q.value.style.buttons.controls.border,
|
|
2047
|
+
color: q.value.style.buttons.controls.color,
|
|
2048
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
2049
|
+
cursor: J.value ? "pointer" : "default"
|
|
2050
|
+
}),
|
|
2051
|
+
class: _({
|
|
2052
|
+
"button-tool": !0,
|
|
2053
|
+
tooltip: !0
|
|
2054
|
+
}),
|
|
2055
|
+
onClick: Gn,
|
|
2056
|
+
onMouseenter: t[32] ||= (e) => q.value.style.showTooltips && Q("saveAction", e, "top"),
|
|
2057
|
+
onMouseleave: $,
|
|
2058
|
+
onFocus: t[33] ||= (e) => q.value.style.showTooltips && Q("saveAction", e, "top"),
|
|
2059
|
+
onBlur: $
|
|
2060
|
+
}, [g(l, {
|
|
2061
|
+
name: "save",
|
|
2062
|
+
stroke: q.value.style.buttons.controls.color
|
|
2063
|
+
}, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
|
|
2064
|
+
key: 0,
|
|
2065
|
+
show: U.value && W.value === "saveAction",
|
|
2066
|
+
x: G.value.x,
|
|
2067
|
+
y: G.value.y - 6,
|
|
2068
|
+
placement: "top",
|
|
2069
|
+
styleObject: Y.value
|
|
2070
|
+
}, {
|
|
2071
|
+
default: S(() => [h(x(q.value.translations.tooltipSave), 1)]),
|
|
2072
|
+
_: 1
|
|
2073
|
+
}, 8, [
|
|
2074
|
+
"show",
|
|
2075
|
+
"x",
|
|
2076
|
+
"y",
|
|
2077
|
+
"styleObject"
|
|
2078
|
+
])) : f("", !0)], 36)) : f("", !0)
|
|
2079
|
+
], 4), m("div", ke, [
|
|
2080
|
+
m("button", {
|
|
2081
|
+
class: _({
|
|
2082
|
+
"button-tool": !0,
|
|
2083
|
+
"button-tool--selected": w.value === "circle",
|
|
2084
|
+
tooltip: !0
|
|
2085
|
+
}),
|
|
2086
|
+
style: v({
|
|
2087
|
+
background: w.value === "circle" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
|
|
2088
|
+
border: w.value === "circle" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
|
|
2089
|
+
color: w.value === "circle" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
|
|
2090
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
2091
|
+
cursor: J.value ? "pointer" : "default"
|
|
2092
|
+
}),
|
|
2093
|
+
onClick: t[34] ||= (e) => {
|
|
2094
|
+
Un("circle"), N.value = !1;
|
|
2095
|
+
},
|
|
2096
|
+
onMouseenter: t[35] ||= (e) => q.value.style.showTooltips && Q("setCircle", e, "top"),
|
|
2097
|
+
onMouseleave: $,
|
|
2098
|
+
onFocus: t[36] ||= (e) => q.value.style.showTooltips && Q("setCircle", e, "top"),
|
|
2099
|
+
onBlur: $
|
|
2100
|
+
}, [(y(), p("svg", Ae, [m("circle", {
|
|
2101
|
+
cx: 6,
|
|
2102
|
+
cy: 6,
|
|
2103
|
+
r: "4",
|
|
2104
|
+
fill: B.value.circle.filled ? (w.value, Pt.value + Xt.value) : "none",
|
|
2105
|
+
stroke: "currentColor"
|
|
2106
|
+
}, null, 8, je)])), q.value.style.showTooltips ? (y(), d(C, {
|
|
2107
|
+
key: 0,
|
|
2108
|
+
show: U.value && W.value === "setCircle",
|
|
2109
|
+
x: G.value.x,
|
|
2110
|
+
y: G.value.y - 6,
|
|
2111
|
+
placement: "top",
|
|
2112
|
+
styleObject: Y.value
|
|
2113
|
+
}, {
|
|
2114
|
+
default: S(() => [h(x(q.value.translations.tooltipShapeCircle) + " ", 1), t[97] ||= m("kbd", null, "C", -1)]),
|
|
2115
|
+
_: 1
|
|
2116
|
+
}, 8, [
|
|
2117
|
+
"show",
|
|
2118
|
+
"x",
|
|
2119
|
+
"y",
|
|
2120
|
+
"styleObject"
|
|
2121
|
+
])) : f("", !0)], 38),
|
|
2122
|
+
w.value === "circle" ? (y(), p("div", Me, [m("label", Ne, [h(x(q.value.translations.filled) + " ", 1), pe(m("input", {
|
|
2123
|
+
type: "checkbox",
|
|
2124
|
+
"onUpdate:modelValue": t[37] ||= (e) => B.value.circle.filled = e,
|
|
2125
|
+
onChange: Ln,
|
|
2126
|
+
checked: B.value.circle.filled,
|
|
2127
|
+
style: v({
|
|
2128
|
+
all: "revert",
|
|
2129
|
+
appearance: "auto",
|
|
2130
|
+
"-webkit-appearance": "auto",
|
|
2131
|
+
accentColor: q.value.style.color + " !important"
|
|
2132
|
+
})
|
|
2133
|
+
}, null, 44, Pe), [[ue, B.value.circle.filled]])])])) : f("", !0),
|
|
2134
|
+
m("button", {
|
|
2135
|
+
class: _({
|
|
2136
|
+
"button-tool": !0,
|
|
2137
|
+
"button-tool--selected": w.value === "rect",
|
|
2138
|
+
tooltip: !0
|
|
2139
|
+
}),
|
|
2140
|
+
style: v({
|
|
2141
|
+
background: w.value === "rect" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
|
|
2142
|
+
border: w.value === "rect" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
|
|
2143
|
+
color: w.value === "rect" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
|
|
2144
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
2145
|
+
cursor: J.value ? "pointer" : "default"
|
|
2146
|
+
}),
|
|
2147
|
+
onClick: t[38] ||= (e) => {
|
|
2148
|
+
Un("rect"), N.value = !1;
|
|
2149
|
+
},
|
|
2150
|
+
onMouseenter: t[39] ||= (e) => q.value.style.showTooltips && Q("setRect", e, "top"),
|
|
2151
|
+
onMouseleave: $,
|
|
2152
|
+
onFocus: t[40] ||= (e) => q.value.style.showTooltips && Q("setRect", e, "top"),
|
|
2153
|
+
onBlur: $
|
|
2154
|
+
}, [(y(), p("svg", Fe, [m("rect", {
|
|
2155
|
+
x: "3",
|
|
2156
|
+
y: "3",
|
|
2157
|
+
style: {
|
|
2158
|
+
rx: "0 !important",
|
|
2159
|
+
ry: "0 !important"
|
|
2160
|
+
},
|
|
2161
|
+
height: "6",
|
|
2162
|
+
width: "6",
|
|
2163
|
+
fill: B.value.rect.filled ? (w.value, Pt.value + Xt.value) : "none",
|
|
2164
|
+
stroke: "currentColor"
|
|
2165
|
+
}, null, 8, Ie)])), q.value.style.showTooltips ? (y(), d(C, {
|
|
2166
|
+
key: 0,
|
|
2167
|
+
show: U.value && W.value === "setRect",
|
|
2168
|
+
x: G.value.x,
|
|
2169
|
+
y: G.value.y - 6,
|
|
2170
|
+
placement: "top",
|
|
2171
|
+
styleObject: Y.value
|
|
2172
|
+
}, {
|
|
2173
|
+
default: S(() => [h(x(q.value.translations.tooltipShapeRect) + " ", 1), t[98] ||= m("kbd", null, "S", -1)]),
|
|
2174
|
+
_: 1
|
|
2175
|
+
}, 8, [
|
|
2176
|
+
"show",
|
|
2177
|
+
"x",
|
|
2178
|
+
"y",
|
|
2179
|
+
"styleObject"
|
|
2180
|
+
])) : f("", !0)], 38),
|
|
2181
|
+
w.value === "rect" ? (y(), p("div", Le, [m("label", Re, [h(x(q.value.translations.filled) + " ", 1), pe(m("input", {
|
|
2182
|
+
type: "checkbox",
|
|
2183
|
+
"onUpdate:modelValue": t[41] ||= (e) => B.value.rect.filled = e,
|
|
2184
|
+
onChange: In,
|
|
2185
|
+
checked: B.value.rect.filled,
|
|
2186
|
+
style: v({
|
|
2187
|
+
all: "revert",
|
|
2188
|
+
appearance: "auto",
|
|
2189
|
+
"-webkit-appearance": "auto",
|
|
2190
|
+
accentColor: q.value.style.color + " !important"
|
|
2191
|
+
})
|
|
2192
|
+
}, null, 44, ze), [[ue, B.value.rect.filled]])])])) : f("", !0),
|
|
2193
|
+
m("button", {
|
|
2194
|
+
class: _({
|
|
2195
|
+
"button-tool": !0,
|
|
2196
|
+
"button-tool--selected": w.value === "arrow",
|
|
2197
|
+
tooltip: !0
|
|
2198
|
+
}),
|
|
2199
|
+
style: v({
|
|
2200
|
+
background: w.value === "arrow" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
|
|
2201
|
+
border: w.value === "arrow" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
|
|
2202
|
+
color: w.value === "arrow" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
|
|
2203
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
2204
|
+
cursor: J.value ? "pointer" : "default"
|
|
2205
|
+
}),
|
|
2206
|
+
onClick: t[42] ||= (e) => {
|
|
2207
|
+
Un("arrow"), N.value = !1;
|
|
2208
|
+
},
|
|
2209
|
+
onMouseenter: t[43] ||= (e) => q.value.style.showTooltips && Q("setArrow", e, "top"),
|
|
2210
|
+
onMouseleave: $,
|
|
2211
|
+
onFocus: t[44] ||= (e) => q.value.style.showTooltips && Q("setArrow", e, "top"),
|
|
2212
|
+
onBlur: $
|
|
2213
|
+
}, [(y(), p("svg", Be, [m("path", {
|
|
2214
|
+
stroke: B.value.arrow.filled ? w.value === "arrow" ? "white" : "grey" : "none",
|
|
2215
|
+
"stroke-width": "2",
|
|
2216
|
+
d: "M5,19 19,5 14,5 19,10.5 19,5",
|
|
2217
|
+
fill: "none",
|
|
2218
|
+
"stroke-linecap": "round",
|
|
2219
|
+
"stroke-linejoin": "round"
|
|
2220
|
+
}, null, 8, Ve)])), q.value.style.showTooltips ? (y(), d(C, {
|
|
2221
|
+
key: 0,
|
|
2222
|
+
show: U.value && W.value === "setArrow",
|
|
2223
|
+
x: G.value.x,
|
|
2224
|
+
y: G.value.y - 6,
|
|
2225
|
+
placement: "top",
|
|
2226
|
+
styleObject: Y.value
|
|
2227
|
+
}, {
|
|
2228
|
+
default: S(() => [h(x(q.value.translations.tooltipShapeArrow) + " ", 1), t[99] ||= m("kbd", null, "A", -1)]),
|
|
2229
|
+
_: 1
|
|
2230
|
+
}, 8, [
|
|
2231
|
+
"show",
|
|
2232
|
+
"x",
|
|
2233
|
+
"y",
|
|
2234
|
+
"styleObject"
|
|
2235
|
+
])) : f("", !0)], 38),
|
|
2236
|
+
m("button", {
|
|
2237
|
+
class: _({
|
|
2238
|
+
"button-tool": !0,
|
|
2239
|
+
"button-tool--selected": w.value === "line",
|
|
2240
|
+
tooltip: !0
|
|
2241
|
+
}),
|
|
2242
|
+
style: v({
|
|
2243
|
+
background: w.value === "line" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
|
|
2244
|
+
border: w.value === "line" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
|
|
2245
|
+
color: w.value === "line" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
|
|
2246
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
2247
|
+
cursor: J.value ? "pointer" : "default"
|
|
2248
|
+
}),
|
|
2249
|
+
onClick: t[45] ||= (e) => {
|
|
2250
|
+
Un("line"), N.value = !1;
|
|
2251
|
+
},
|
|
2252
|
+
onMouseenter: t[46] ||= (e) => q.value.style.showTooltips && Q("setFreehand", e, "top"),
|
|
2253
|
+
onMouseleave: $,
|
|
2254
|
+
onFocus: t[47] ||= (e) => q.value.style.showTooltips && Q("setFreehand", e, "top"),
|
|
2255
|
+
onBlur: $
|
|
2256
|
+
}, [t[101] ||= m("svg", {
|
|
2257
|
+
width: "80%",
|
|
2258
|
+
viewBox: "0 0 24 24",
|
|
2259
|
+
"stroke-width": "2",
|
|
2260
|
+
stroke: "currentColor",
|
|
2261
|
+
fill: "none",
|
|
2262
|
+
"stroke-linecap": "round",
|
|
2263
|
+
"stroke-linejoin": "round"
|
|
2264
|
+
}, [m("path", {
|
|
2265
|
+
stroke: "none",
|
|
2266
|
+
d: "M0 0h24v24H0z",
|
|
2267
|
+
fill: "none"
|
|
2268
|
+
}), m("path", { d: "M3 15c2 3 4 4 7 4s7 -3 7 -7s-3 -7 -6 -7s-5 1.5 -5 4s2 5 6 5s8.408 -2.453 10 -5" })], -1), q.value.style.showTooltips ? (y(), d(C, {
|
|
2269
|
+
key: 0,
|
|
2270
|
+
show: U.value && W.value === "setFreehand",
|
|
2271
|
+
x: G.value.x,
|
|
2272
|
+
y: G.value.y - 6,
|
|
2273
|
+
placement: "top",
|
|
2274
|
+
styleObject: Y.value
|
|
2275
|
+
}, {
|
|
2276
|
+
default: S(() => [h(x(q.value.translations.tooltipShapeFreehand) + " ", 1), t[100] ||= m("kbd", null, "L", -1)]),
|
|
2277
|
+
_: 1
|
|
2278
|
+
}, 8, [
|
|
2279
|
+
"show",
|
|
2280
|
+
"x",
|
|
2281
|
+
"y",
|
|
2282
|
+
"styleObject"
|
|
2283
|
+
])) : f("", !0)], 38),
|
|
2284
|
+
[
|
|
2285
|
+
"arrow",
|
|
2286
|
+
"circle",
|
|
2287
|
+
"rect",
|
|
2288
|
+
"line"
|
|
2289
|
+
].includes(w.value) ? (y(), p("div", He, [m("div", Ue, [m("label", We, [h(x(q.value.translations.thickness) + " ", 1), pe(m("input", {
|
|
2290
|
+
type: "number",
|
|
2291
|
+
"onUpdate:modelValue": t[48] ||= (e) => bt.value = e,
|
|
2292
|
+
onInput: Bn,
|
|
2293
|
+
min: 1,
|
|
2294
|
+
style: {
|
|
2295
|
+
padding: "0 4px",
|
|
2296
|
+
width: "40px",
|
|
2297
|
+
border: "1px solid #dadada",
|
|
2298
|
+
"border-radius": "3px"
|
|
2299
|
+
}
|
|
2300
|
+
}, null, 544), [[de, bt.value]])])])])) : f("", !0),
|
|
2301
|
+
[
|
|
2302
|
+
"arrow",
|
|
2303
|
+
"circle",
|
|
2304
|
+
"rect"
|
|
2305
|
+
].includes(w.value) ? (y(), p("div", Ge, [m("div", Ke, [m("label", qe, [
|
|
2306
|
+
h(x(q.value.translations.dashedLines) + " ", 1),
|
|
2307
|
+
(y(), p("svg", Je, [...t[102] ||= [m("line", {
|
|
2308
|
+
x1: "0",
|
|
2309
|
+
x2: "24",
|
|
2310
|
+
y1: "12",
|
|
2311
|
+
y2: "12",
|
|
2312
|
+
"stroke-width": "2",
|
|
2313
|
+
stroke: "black",
|
|
2314
|
+
"stroke-dasharray": "3"
|
|
2315
|
+
}, null, -1)]])),
|
|
2316
|
+
pe(m("input", {
|
|
2317
|
+
name: "dashStyle",
|
|
2318
|
+
type: "checkbox",
|
|
2319
|
+
"onUpdate:modelValue": t[49] ||= (e) => St.value = e,
|
|
2320
|
+
onChange: Rn,
|
|
2321
|
+
checked: St.value,
|
|
2322
|
+
style: v({
|
|
2323
|
+
all: "revert",
|
|
2324
|
+
appearance: "auto",
|
|
2325
|
+
"-webkit-appearance": "auto",
|
|
2326
|
+
accentColor: q.value.style.color + " !important"
|
|
2327
|
+
})
|
|
2328
|
+
}, null, 44, Ye), [[ue, St.value]])
|
|
2329
|
+
])])])) : f("", !0),
|
|
2330
|
+
m("button", {
|
|
2331
|
+
class: _({
|
|
2332
|
+
"button-tool": !0,
|
|
2333
|
+
"button-tool--selected": P.value,
|
|
2334
|
+
tooltip: !0
|
|
2335
|
+
}),
|
|
2336
|
+
style: v({
|
|
2337
|
+
background: P.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
|
|
2338
|
+
border: P.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
|
|
2339
|
+
color: P.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
|
|
2340
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
2341
|
+
cursor: J.value ? "pointer" : "default"
|
|
2342
|
+
}),
|
|
2343
|
+
onClick: t[50] ||= (e) => {
|
|
2344
|
+
hn(), P.value = !P.value, k.value = !1, j.value = !1, M.value = !1, N.value = !1, A.value = !1, w.value = void 0;
|
|
2345
|
+
},
|
|
2346
|
+
onMouseenter: t[51] ||= (e) => q.value.style.showTooltips && Q("setText", e, "top"),
|
|
2347
|
+
onMouseleave: $,
|
|
2348
|
+
onFocus: t[52] ||= (e) => q.value.style.showTooltips && Q("setText", e, "top"),
|
|
2349
|
+
onBlur: $
|
|
2350
|
+
}, [g(l, {
|
|
2351
|
+
name: "text",
|
|
2352
|
+
stroke: P.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color
|
|
2353
|
+
}, null, 8, ["stroke"]), q.value.style.showTooltips ? (y(), d(C, {
|
|
2354
|
+
key: 0,
|
|
2355
|
+
show: U.value && W.value === "setText",
|
|
2356
|
+
x: G.value.x,
|
|
2357
|
+
y: G.value.y - 6,
|
|
2358
|
+
placement: "top",
|
|
2359
|
+
styleObject: Y.value
|
|
2360
|
+
}, {
|
|
2361
|
+
default: S(() => [h(x(q.value.translations.tooltipShapeText) + " ", 1), t[103] ||= m("kbd", null, "T", -1)]),
|
|
2362
|
+
_: 1
|
|
2363
|
+
}, 8, [
|
|
2364
|
+
"show",
|
|
2365
|
+
"x",
|
|
2366
|
+
"y",
|
|
2367
|
+
"styleObject"
|
|
2368
|
+
])) : f("", !0)], 38),
|
|
2369
|
+
P.value ? (y(), p("div", Xe, [m("div", Ze, [m("label", Qe, [h(x(q.value.translations.fontSize) + " ", 1), pe(m("input", {
|
|
2370
|
+
type: "number",
|
|
2371
|
+
"onUpdate:modelValue": t[53] ||= (e) => zt.value = e,
|
|
2372
|
+
onInput: Vn,
|
|
2373
|
+
style: {
|
|
2374
|
+
padding: "0 4px",
|
|
2375
|
+
width: "40px",
|
|
2376
|
+
border: "1px solid #dadada",
|
|
2377
|
+
"border-radius": "3px"
|
|
2378
|
+
}
|
|
2379
|
+
}, null, 544), [[de, zt.value]])])])])) : f("", !0),
|
|
2380
|
+
P.value ? (y(), p("div", $e, [m("button", {
|
|
2381
|
+
class: _({
|
|
2382
|
+
"button-tool": !0,
|
|
2383
|
+
"button-tool--selected": H.value === "start",
|
|
2384
|
+
tooltip: !0
|
|
2385
|
+
}),
|
|
2386
|
+
style: v({
|
|
2387
|
+
background: H.value === "start" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
|
|
2388
|
+
border: H.value === "start" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
|
|
2389
|
+
color: H.value === "start" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
|
|
2390
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
2391
|
+
cursor: J.value ? "pointer" : "default"
|
|
2392
|
+
}),
|
|
2393
|
+
onClick: t[54] ||= (e) => {
|
|
2394
|
+
k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, H.value = "start", _n("start");
|
|
2395
|
+
},
|
|
2396
|
+
onMouseenter: t[55] ||= (e) => q.value.style.showTooltips && Q("setAlignStart", e, "top"),
|
|
2397
|
+
onMouseleave: $,
|
|
2398
|
+
onFocus: t[56] ||= (e) => q.value.style.showTooltips && Q("setAlignStart", e, "top"),
|
|
2399
|
+
onBlur: $
|
|
2400
|
+
}, [t[104] ||= m("svg", {
|
|
2401
|
+
width: "80%",
|
|
2402
|
+
viewBox: "0 0 24 24",
|
|
2403
|
+
"stroke-width": "2",
|
|
2404
|
+
stroke: "currentColor",
|
|
2405
|
+
fill: "none",
|
|
2406
|
+
"stroke-linecap": "round",
|
|
2407
|
+
"stroke-linejoin": "round"
|
|
2408
|
+
}, [
|
|
2409
|
+
m("path", {
|
|
2410
|
+
stroke: "none",
|
|
2411
|
+
d: "M0 0h24v24H0z",
|
|
2412
|
+
fill: "none"
|
|
2413
|
+
}),
|
|
2414
|
+
m("path", { d: "M4 6l16 0" }),
|
|
2415
|
+
m("path", { d: "M4 12l10 0" }),
|
|
2416
|
+
m("path", { d: "M4 18l14 0" })
|
|
2417
|
+
], -1), q.value.style.showTooltips ? (y(), d(C, {
|
|
2418
|
+
key: 0,
|
|
2419
|
+
show: U.value && W.value === "setAlignStart",
|
|
2420
|
+
x: G.value.x,
|
|
2421
|
+
y: G.value.y - 6,
|
|
2422
|
+
placement: "top",
|
|
2423
|
+
styleObject: Y.value
|
|
2424
|
+
}, {
|
|
2425
|
+
default: S(() => [h(x(q.value.translations.tooltipShapeTextLeft), 1)]),
|
|
2426
|
+
_: 1
|
|
2427
|
+
}, 8, [
|
|
2428
|
+
"show",
|
|
2429
|
+
"x",
|
|
2430
|
+
"y",
|
|
2431
|
+
"styleObject"
|
|
2432
|
+
])) : f("", !0)], 38)])) : f("", !0),
|
|
2433
|
+
P.value ? (y(), p("div", et, [m("button", {
|
|
2434
|
+
class: _({
|
|
2435
|
+
"button-tool": !0,
|
|
2436
|
+
"button-tool--selected": H.value === "middle",
|
|
2437
|
+
tooltip: !0
|
|
2438
|
+
}),
|
|
2439
|
+
style: v({
|
|
2440
|
+
background: H.value === "middle" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
|
|
2441
|
+
border: H.value === "middle" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
|
|
2442
|
+
color: H.value === "middle" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
|
|
2443
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
2444
|
+
cursor: J.value ? "pointer" : "default"
|
|
2445
|
+
}),
|
|
2446
|
+
disabled: O.value,
|
|
2447
|
+
onClick: t[57] ||= (e) => {
|
|
2448
|
+
k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, H.value = "middle", _n("middle");
|
|
2449
|
+
},
|
|
2450
|
+
onMouseenter: t[58] ||= (e) => q.value.style.showTooltips && Q("setAlignMiddle", e, "top"),
|
|
2451
|
+
onMouseleave: $,
|
|
2452
|
+
onFocus: t[59] ||= (e) => q.value.style.showTooltips && Q("setAlignMiddle", e, "top"),
|
|
2453
|
+
onBlur: $
|
|
2454
|
+
}, [t[105] ||= m("svg", {
|
|
2455
|
+
width: "80%",
|
|
2456
|
+
viewBox: "0 0 24 24",
|
|
2457
|
+
"stroke-width": "2",
|
|
2458
|
+
stroke: "currentColor",
|
|
2459
|
+
fill: "none",
|
|
2460
|
+
"stroke-linecap": "round",
|
|
2461
|
+
"stroke-linejoin": "round"
|
|
2462
|
+
}, [
|
|
2463
|
+
m("path", {
|
|
2464
|
+
stroke: "none",
|
|
2465
|
+
d: "M0 0h24v24H0z",
|
|
2466
|
+
fill: "none"
|
|
2467
|
+
}),
|
|
2468
|
+
m("path", { d: "M4 6l16 0" }),
|
|
2469
|
+
m("path", { d: "M8 12l8 0" }),
|
|
2470
|
+
m("path", { d: "M6 18l12 0" })
|
|
2471
|
+
], -1), q.value.style.showTooltips ? (y(), d(C, {
|
|
2472
|
+
key: 0,
|
|
2473
|
+
show: U.value && W.value === "setAlignMiddle",
|
|
2474
|
+
x: G.value.x,
|
|
2475
|
+
y: G.value.y - 6,
|
|
2476
|
+
placement: "top",
|
|
2477
|
+
styleObject: Y.value
|
|
2478
|
+
}, {
|
|
2479
|
+
default: S(() => [h(x(q.value.translations.tooltipShapeTextCenter), 1)]),
|
|
2480
|
+
_: 1
|
|
2481
|
+
}, 8, [
|
|
2482
|
+
"show",
|
|
2483
|
+
"x",
|
|
2484
|
+
"y",
|
|
2485
|
+
"styleObject"
|
|
2486
|
+
])) : f("", !0)], 46, tt)])) : f("", !0),
|
|
2487
|
+
P.value ? (y(), p("div", nt, [m("button", {
|
|
2488
|
+
class: _({
|
|
2489
|
+
"button-tool": !0,
|
|
2490
|
+
"button-tool--selected": H.value === "end",
|
|
2491
|
+
tooltip: !0
|
|
2492
|
+
}),
|
|
2493
|
+
style: v({
|
|
2494
|
+
background: H.value === "end" ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
|
|
2495
|
+
border: H.value === "end" ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
|
|
2496
|
+
color: H.value === "end" ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
|
|
2497
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
2498
|
+
cursor: J.value ? "pointer" : "default"
|
|
2499
|
+
}),
|
|
2500
|
+
disabled: O.value,
|
|
2501
|
+
onClick: t[60] ||= (e) => {
|
|
2502
|
+
k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, H.value = "end", _n("end");
|
|
2503
|
+
},
|
|
2504
|
+
onMouseenter: t[61] ||= (e) => q.value.style.showTooltips && Q("setAlignEnd", e, "top"),
|
|
2505
|
+
onMouseleave: $,
|
|
2506
|
+
onFocus: t[62] ||= (e) => q.value.style.showTooltips && Q("setAlignEnd", e, "top"),
|
|
2507
|
+
onBlur: $
|
|
2508
|
+
}, [t[106] ||= m("svg", {
|
|
2509
|
+
width: "80%",
|
|
2510
|
+
viewBox: "0 0 24 24",
|
|
2511
|
+
"stroke-width": "2",
|
|
2512
|
+
stroke: "currentColor",
|
|
2513
|
+
fill: "none",
|
|
2514
|
+
"stroke-linecap": "round",
|
|
2515
|
+
"stroke-linejoin": "round"
|
|
2516
|
+
}, [
|
|
2517
|
+
m("path", {
|
|
2518
|
+
stroke: "none",
|
|
2519
|
+
d: "M0 0h24v24H0z",
|
|
2520
|
+
fill: "none"
|
|
2521
|
+
}),
|
|
2522
|
+
m("path", { d: "M4 6l16 0" }),
|
|
2523
|
+
m("path", { d: "M10 12l10 0" }),
|
|
2524
|
+
m("path", { d: "M6 18l14 0" })
|
|
2525
|
+
], -1), q.value.style.showTooltips ? (y(), d(C, {
|
|
2526
|
+
key: 0,
|
|
2527
|
+
show: U.value && W.value === "setAlignEnd",
|
|
2528
|
+
x: G.value.x,
|
|
2529
|
+
y: G.value.y - 6,
|
|
2530
|
+
placement: "top",
|
|
2531
|
+
styleObject: Y.value
|
|
2532
|
+
}, {
|
|
2533
|
+
default: S(() => [h(x(q.value.translations.tooltipShapeTextRight), 1)]),
|
|
2534
|
+
_: 1
|
|
2535
|
+
}, 8, [
|
|
2536
|
+
"show",
|
|
2537
|
+
"x",
|
|
2538
|
+
"y",
|
|
2539
|
+
"styleObject"
|
|
2540
|
+
])) : f("", !0)], 46, rt)])) : f("", !0),
|
|
2541
|
+
P.value ? (y(), p("div", it, [m("button", {
|
|
2542
|
+
class: _({
|
|
2543
|
+
"button-tool": !0,
|
|
2544
|
+
"button-tool--selected": O.value,
|
|
2545
|
+
tooltip: !0
|
|
2546
|
+
}),
|
|
2547
|
+
style: v({
|
|
2548
|
+
background: O.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
|
|
2549
|
+
border: O.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
|
|
2550
|
+
color: O.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
|
|
2551
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
2552
|
+
cursor: J.value ? "pointer" : "default"
|
|
2553
|
+
}),
|
|
2554
|
+
onClick: t[63] ||= (e) => {
|
|
2555
|
+
k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, O.value = !O.value, H.value = "start", _n("start"), Vn();
|
|
2556
|
+
},
|
|
2557
|
+
onMouseenter: t[64] ||= (e) => q.value.style.showTooltips && Q("setBulletMode", e, "top"),
|
|
2558
|
+
onMouseleave: $,
|
|
2559
|
+
onFocus: t[65] ||= (e) => q.value.style.showTooltips && Q("setBulletMode", e, "top"),
|
|
2560
|
+
onBlur: $
|
|
2561
|
+
}, [t[107] ||= m("svg", {
|
|
2562
|
+
width: "100%",
|
|
2563
|
+
viewBox: "0 0 24 24",
|
|
2564
|
+
"stroke-width": "2",
|
|
2565
|
+
stroke: "currentColor",
|
|
2566
|
+
fill: "none",
|
|
2567
|
+
"stroke-linecap": "round",
|
|
2568
|
+
"stroke-linejoin": "round"
|
|
2569
|
+
}, [
|
|
2570
|
+
m("path", {
|
|
2571
|
+
stroke: "none",
|
|
2572
|
+
d: "M0 0h24v24H0z",
|
|
2573
|
+
fill: "none"
|
|
2574
|
+
}),
|
|
2575
|
+
m("path", { d: "M9 6l11 0" }),
|
|
2576
|
+
m("path", { d: "M9 12l11 0" }),
|
|
2577
|
+
m("path", { d: "M9 18l11 0" }),
|
|
2578
|
+
m("path", { d: "M5 6l0 .01" }),
|
|
2579
|
+
m("path", { d: "M5 12l0 .01" }),
|
|
2580
|
+
m("path", { d: "M5 18l0 .01" })
|
|
2581
|
+
], -1), q.value.style.showTooltips ? (y(), d(C, {
|
|
2582
|
+
key: 0,
|
|
2583
|
+
show: U.value && W.value === "setBulletMode",
|
|
2584
|
+
x: G.value.x,
|
|
2585
|
+
y: G.value.y - 6,
|
|
2586
|
+
placement: "top",
|
|
2587
|
+
styleObject: Y.value
|
|
2588
|
+
}, {
|
|
2589
|
+
default: S(() => [h(x(q.value.translations.tooltipShapeTextBullet), 1)]),
|
|
2590
|
+
_: 1
|
|
2591
|
+
}, 8, [
|
|
2592
|
+
"show",
|
|
2593
|
+
"x",
|
|
2594
|
+
"y",
|
|
2595
|
+
"styleObject"
|
|
2596
|
+
])) : f("", !0)], 38)])) : f("", !0),
|
|
2597
|
+
P.value ? (y(), p("div", at, [m("button", {
|
|
2598
|
+
class: _({
|
|
2599
|
+
"button-tool": !0,
|
|
2600
|
+
"button-tool--selected": xt.value,
|
|
2601
|
+
tooltip: !0
|
|
2602
|
+
}),
|
|
2603
|
+
style: v({
|
|
2604
|
+
background: xt.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
|
|
2605
|
+
border: xt.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
|
|
2606
|
+
color: xt.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
|
|
2607
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
2608
|
+
cursor: J.value ? "pointer" : "default"
|
|
2609
|
+
}),
|
|
2610
|
+
onClick: t[66] ||= (e) => {
|
|
2611
|
+
k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, xt.value = !xt.value, Vn();
|
|
2612
|
+
},
|
|
2613
|
+
onMouseenter: t[67] ||= (e) => q.value.style.showTooltips && Q("setBold", e, "top"),
|
|
2614
|
+
onMouseleave: $,
|
|
2615
|
+
onFocus: t[68] ||= (e) => q.value.style.showTooltips && Q("setBold", e, "top"),
|
|
2616
|
+
onBlur: $
|
|
2617
|
+
}, [t[108] ||= m("svg", {
|
|
2618
|
+
width: "100%",
|
|
2619
|
+
viewBox: "0 0 24 24",
|
|
2620
|
+
"stroke-width": "3",
|
|
2621
|
+
stroke: "currentColor",
|
|
2622
|
+
fill: "none",
|
|
2623
|
+
"stroke-linecap": "round",
|
|
2624
|
+
"stroke-linejoin": "round"
|
|
2625
|
+
}, [
|
|
2626
|
+
m("path", {
|
|
2627
|
+
stroke: "none",
|
|
2628
|
+
d: "M0 0h24v24H0z",
|
|
2629
|
+
fill: "none"
|
|
2630
|
+
}),
|
|
2631
|
+
m("path", { d: "M7 5h6a3.5 3.5 0 0 1 0 7h-6z" }),
|
|
2632
|
+
m("path", { d: "M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7" })
|
|
2633
|
+
], -1), q.value.style.showTooltips ? (y(), d(C, {
|
|
2634
|
+
key: 0,
|
|
2635
|
+
show: U.value && W.value === "setBold",
|
|
2636
|
+
x: G.value.x,
|
|
2637
|
+
y: G.value.y - 6,
|
|
2638
|
+
placement: "top",
|
|
2639
|
+
styleObject: Y.value
|
|
2640
|
+
}, {
|
|
2641
|
+
default: S(() => [h(x(q.value.translations.tooltipShapeTextBold), 1)]),
|
|
2642
|
+
_: 1
|
|
2643
|
+
}, 8, [
|
|
2644
|
+
"show",
|
|
2645
|
+
"x",
|
|
2646
|
+
"y",
|
|
2647
|
+
"styleObject"
|
|
2648
|
+
])) : f("", !0)], 38)])) : f("", !0),
|
|
2649
|
+
P.value ? (y(), p("div", ot, [m("button", {
|
|
2650
|
+
class: _({
|
|
2651
|
+
"button-tool": !0,
|
|
2652
|
+
"button-tool--selected": Tt.value,
|
|
2653
|
+
tooltip: !0
|
|
2654
|
+
}),
|
|
2655
|
+
style: v({
|
|
2656
|
+
background: Tt.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
|
|
2657
|
+
border: Tt.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
|
|
2658
|
+
color: Tt.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
|
|
2659
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
2660
|
+
cursor: J.value ? "pointer" : "default"
|
|
2661
|
+
}),
|
|
2662
|
+
onClick: t[69] ||= (e) => {
|
|
2663
|
+
k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, Tt.value = !Tt.value, Vn();
|
|
2664
|
+
},
|
|
2665
|
+
onMouseenter: t[70] ||= (e) => q.value.style.showTooltips && Q("setItalic", e, "top"),
|
|
2666
|
+
onMouseleave: $,
|
|
2667
|
+
onFocus: t[71] ||= (e) => q.value.style.showTooltips && Q("setItalic", e, "top"),
|
|
2668
|
+
onBlur: $
|
|
2669
|
+
}, [t[109] ||= m("svg", {
|
|
2670
|
+
width: "100%",
|
|
2671
|
+
height: "44",
|
|
2672
|
+
viewBox: "0 0 24 24",
|
|
2673
|
+
"stroke-width": "2",
|
|
2674
|
+
stroke: "currentColor",
|
|
2675
|
+
fill: "none",
|
|
2676
|
+
"stroke-linecap": "round",
|
|
2677
|
+
"stroke-linejoin": "round"
|
|
2678
|
+
}, [
|
|
2679
|
+
m("path", {
|
|
2680
|
+
stroke: "none",
|
|
2681
|
+
d: "M0 0h24v24H0z",
|
|
2682
|
+
fill: "none"
|
|
2683
|
+
}),
|
|
2684
|
+
m("path", { d: "M11 5l6 0" }),
|
|
2685
|
+
m("path", { d: "M7 19l6 0" }),
|
|
2686
|
+
m("path", { d: "M14 5l-4 14" })
|
|
2687
|
+
], -1), q.value.style.showTooltips ? (y(), d(C, {
|
|
2688
|
+
key: 0,
|
|
2689
|
+
show: U.value && W.value === "setItalic",
|
|
2690
|
+
x: G.value.x,
|
|
2691
|
+
y: G.value.y - 6,
|
|
2692
|
+
placement: "top",
|
|
2693
|
+
styleObject: Y.value
|
|
2694
|
+
}, {
|
|
2695
|
+
default: S(() => [h(x(q.value.translations.tooltipShapeTextItalic), 1)]),
|
|
2696
|
+
_: 1
|
|
2697
|
+
}, 8, [
|
|
2698
|
+
"show",
|
|
2699
|
+
"x",
|
|
2700
|
+
"y",
|
|
2701
|
+
"styleObject"
|
|
2702
|
+
])) : f("", !0)], 38)])) : f("", !0),
|
|
2703
|
+
P.value ? (y(), p("div", st, [m("button", {
|
|
2704
|
+
class: _({
|
|
2705
|
+
"button-tool": !0,
|
|
2706
|
+
"button-tool--selected": kt.value,
|
|
2707
|
+
tooltip: !0
|
|
2708
|
+
}),
|
|
2709
|
+
style: v({
|
|
2710
|
+
background: kt.value ? q.value.style.buttons.shapes.selected.backgroundColor : q.value.style.buttons.shapes.backgroundColor,
|
|
2711
|
+
border: kt.value ? q.value.style.buttons.shapes.selected.border : q.value.style.buttons.shapes.border,
|
|
2712
|
+
color: kt.value ? q.value.style.buttons.shapes.selected.color : q.value.style.buttons.shapes.color,
|
|
2713
|
+
borderRadius: `${q.value.style.buttons.borderRadius}px`,
|
|
2714
|
+
cursor: J.value ? "pointer" : "default"
|
|
2715
|
+
}),
|
|
2716
|
+
onClick: t[72] ||= (e) => {
|
|
2717
|
+
k.value = !1, j.value = !1, M.value = !1, A.value = !1, N.value = !1, w.value = void 0, kt.value = !kt.value, Vn();
|
|
2718
|
+
},
|
|
2719
|
+
onMouseenter: t[73] ||= (e) => q.value.style.showTooltips && Q("setUnderline", e, "top"),
|
|
2720
|
+
onMouseleave: $,
|
|
2721
|
+
onFocus: t[74] ||= (e) => q.value.style.showTooltips && Q("setUnderline", e, "top"),
|
|
2722
|
+
onBlur: $
|
|
2723
|
+
}, [t[110] ||= m("svg", {
|
|
2724
|
+
width: "100%",
|
|
2725
|
+
viewBox: "0 0 24 24",
|
|
2726
|
+
"stroke-width": "2",
|
|
2727
|
+
stroke: "currentColor",
|
|
2728
|
+
fill: "none",
|
|
2729
|
+
"stroke-linecap": "round",
|
|
2730
|
+
"stroke-linejoin": "round"
|
|
2731
|
+
}, [
|
|
2732
|
+
m("path", {
|
|
2733
|
+
stroke: "none",
|
|
2734
|
+
d: "M0 0h24v24H0z",
|
|
2735
|
+
fill: "none"
|
|
2736
|
+
}),
|
|
2737
|
+
m("path", { d: "M7 5v5a5 5 0 0 0 10 0v-5" }),
|
|
2738
|
+
m("path", { d: "M5 19h14" })
|
|
2739
|
+
], -1), q.value.style.showTooltips ? (y(), d(C, {
|
|
2740
|
+
key: 0,
|
|
2741
|
+
show: U.value && W.value === "setUnderline",
|
|
2742
|
+
x: G.value.x,
|
|
2743
|
+
y: G.value.y - 6,
|
|
2744
|
+
placement: "top",
|
|
2745
|
+
styleObject: Y.value
|
|
2746
|
+
}, {
|
|
2747
|
+
default: S(() => [h(x(q.value.translations.tooltipShapeTextUnderline), 1)]),
|
|
2748
|
+
_: 1
|
|
2749
|
+
}, 8, [
|
|
2750
|
+
"show",
|
|
2751
|
+
"x",
|
|
2752
|
+
"y",
|
|
2753
|
+
"styleObject"
|
|
2754
|
+
])) : f("", !0)], 38)])) : f("", !0),
|
|
2755
|
+
m("div", ct, [m("button", {
|
|
2756
|
+
class: _({
|
|
2757
|
+
"button-tool": !0,
|
|
2758
|
+
tooltip: !0
|
|
2759
|
+
}),
|
|
2760
|
+
style: { borderRadius: "6px" },
|
|
2761
|
+
onMouseenter: t[76] ||= (e) => q.value.style.showTooltips && Q("setColor", e, "top"),
|
|
2762
|
+
onMouseleave: $,
|
|
2763
|
+
onFocus: t[77] ||= (e) => q.value.style.showTooltips && Q("setColor", e, "top"),
|
|
2764
|
+
onBlur: $
|
|
2765
|
+
}, [g(te, {
|
|
2766
|
+
value: Pt.value,
|
|
2767
|
+
"onUpdate:value": t[75] ||= (e) => Pt.value = e,
|
|
2768
|
+
backgroundColor: q.value.style.backgroundColor,
|
|
2769
|
+
buttonBorderColor: q.value.style.color,
|
|
2770
|
+
isCursorPointer: J.value,
|
|
2771
|
+
teleported: ""
|
|
2772
|
+
}, null, 8, [
|
|
2773
|
+
"value",
|
|
2774
|
+
"backgroundColor",
|
|
2775
|
+
"buttonBorderColor",
|
|
2776
|
+
"isCursorPointer"
|
|
2777
|
+
])], 32), q.value.style.showTooltips ? (y(), d(C, {
|
|
2778
|
+
key: 0,
|
|
2779
|
+
show: U.value && W.value === "setColor",
|
|
2780
|
+
x: G.value.x,
|
|
2781
|
+
y: G.value.y - 6,
|
|
2782
|
+
placement: "top",
|
|
2783
|
+
styleObject: Y.value
|
|
2784
|
+
}, {
|
|
2785
|
+
default: S(() => [h(x(q.value.translations.tooltipShapeColor), 1)]),
|
|
2786
|
+
_: 1
|
|
2787
|
+
}, 8, [
|
|
2788
|
+
"show",
|
|
2789
|
+
"x",
|
|
2790
|
+
"y",
|
|
2791
|
+
"styleObject"
|
|
2792
|
+
])) : f("", !0)]),
|
|
2793
|
+
m("div", lt, [m("label", ut, [h(x(q.value.translations.colorAlpha) + ": " + x(Bt.value > 98 ? 100 : Bt.value) + " % ", 1), pe(m("input", {
|
|
2794
|
+
name: "colorTransparency",
|
|
2795
|
+
type: "range",
|
|
2796
|
+
"onUpdate:modelValue": t[78] ||= (e) => Bt.value = e,
|
|
2797
|
+
onInput: zn,
|
|
2798
|
+
min: 0,
|
|
2799
|
+
max: 100,
|
|
2800
|
+
style: v({
|
|
2801
|
+
width: "100%",
|
|
2802
|
+
accentColor: q.value.style.color + " !important"
|
|
2803
|
+
})
|
|
2804
|
+
}, null, 36), [[de, Bt.value]])])])
|
|
2805
|
+
])]),
|
|
2806
|
+
_: 1
|
|
2807
|
+
}, 8, ["config"])]), m("div", {
|
|
2808
|
+
class: "annotator annotator__wrapper",
|
|
2809
|
+
ref_key: "drawSvgContainer",
|
|
2810
|
+
ref: Mn,
|
|
2811
|
+
style: { position: "relative" },
|
|
2812
|
+
id: _e.value,
|
|
2813
|
+
"data-annotator-content": ""
|
|
2814
|
+
}, [
|
|
2815
|
+
m("div", {
|
|
2816
|
+
class: "annotator__content-layer",
|
|
2817
|
+
style: v(`${Ot.value ? "pointer-events: none;" : ""}`)
|
|
2818
|
+
}, [ce(e.$slots, "default", {}, void 0, !0)], 4),
|
|
2819
|
+
Ot.value || q.value.alwaysVisible ? (y(), p("svg", {
|
|
2820
|
+
id: "annotatorSvg",
|
|
2821
|
+
key: jt.value,
|
|
2822
|
+
ref_key: "mainSvg",
|
|
2823
|
+
ref: X,
|
|
2824
|
+
class: _({
|
|
2825
|
+
annotator__overlay: !0,
|
|
2826
|
+
draw: !0,
|
|
2827
|
+
"draw--free": w.value === "line"
|
|
2828
|
+
}),
|
|
2829
|
+
viewBox: `0 0 ${Nt.value} ${Mt.value}`,
|
|
2830
|
+
width: Lt.value,
|
|
2831
|
+
height: Rt.value,
|
|
2832
|
+
onPointerdown: t[83] ||= (e) => En(e),
|
|
2833
|
+
onPointerup: t[84] ||= (e) => Fn(e),
|
|
2834
|
+
onTouchend: t[85] ||= (e) => Fn(e),
|
|
2835
|
+
onTouchstart: t[86] ||= (e) => {
|
|
2836
|
+
Hn(e), gn(e);
|
|
2837
|
+
},
|
|
2838
|
+
onPointermove: t[87] ||= (e) => {
|
|
2839
|
+
Hn(e), An(e);
|
|
2840
|
+
},
|
|
2841
|
+
onPointerout: t[88] ||= (e) => wn(e),
|
|
2842
|
+
onPointerover: t[89] ||= (e) => mn(e),
|
|
2843
|
+
onClick: t[90] ||= (e) => gn(e),
|
|
2844
|
+
style: v({
|
|
2845
|
+
position: "absolute",
|
|
2846
|
+
top: 0,
|
|
2847
|
+
left: 0,
|
|
2848
|
+
cursor: Zt.value,
|
|
2849
|
+
fontFamily: "Helvetica",
|
|
2850
|
+
zIndex: 1e8,
|
|
2851
|
+
pointerEvents: Ot.value ? "all" : "none"
|
|
2852
|
+
})
|
|
2853
|
+
}, [m("rect", {
|
|
2854
|
+
class: "annotator__glass",
|
|
2855
|
+
x: "0",
|
|
2856
|
+
y: "0",
|
|
2857
|
+
width: Nt.value,
|
|
2858
|
+
height: Mt.value,
|
|
2859
|
+
fill: "transparent",
|
|
2860
|
+
"pointer-events": Ot.value ? "all" : "none",
|
|
2861
|
+
style: { cursor: "inherit" },
|
|
2862
|
+
onPointerdown: t[79] ||= me((e) => En(e), ["stop", "prevent"]),
|
|
2863
|
+
onPointermove: t[80] ||= me((e) => {
|
|
2864
|
+
Hn(e), An(e);
|
|
2865
|
+
}, ["stop", "prevent"]),
|
|
2866
|
+
onPointerup: me(Fn, ["stop", "prevent"]),
|
|
2867
|
+
onClick: t[81] ||= me(() => {}, ["stop", "prevent"])
|
|
2868
|
+
}, null, 40, pt), (y(!0), p(ne, null, se(rn.value, (e) => (y(), p("g", {
|
|
2869
|
+
key: e.id,
|
|
2870
|
+
innerHTML: e.html,
|
|
2871
|
+
onClick: t[82] ||= (e) => {
|
|
2872
|
+
jn(e), j.value = !1;
|
|
2873
|
+
}
|
|
2874
|
+
}, null, 8, mt))), 128))], 46, ft)) : f("", !0),
|
|
2875
|
+
Dt.value || le(vt) ? (y(), p("svg", {
|
|
2876
|
+
key: 1,
|
|
2877
|
+
style: {
|
|
2878
|
+
position: "absolute",
|
|
2879
|
+
top: "0",
|
|
2880
|
+
left: "0"
|
|
2881
|
+
},
|
|
2882
|
+
height: Rt.value,
|
|
2883
|
+
viewBox: `0 0 ${Nt.value} ${Mt.value}`,
|
|
2884
|
+
width: Lt.value,
|
|
2885
|
+
"data-dom-to-png-ignore": ""
|
|
2886
|
+
}, [m("circle", {
|
|
2887
|
+
class: "animated-circle-print",
|
|
2888
|
+
cx: Nt.value / 2,
|
|
2889
|
+
cy: Mt.value / 2,
|
|
2890
|
+
r: "50",
|
|
2891
|
+
stroke: "#6376DD",
|
|
2892
|
+
"stroke-width": "10",
|
|
2893
|
+
fill: "none"
|
|
2894
|
+
}, null, 8, gt)], 8, ht)) : f("", !0)
|
|
2895
|
+
], 8, dt)]));
|
|
2896
|
+
}
|
|
2897
|
+
}, [["__scopeId", "data-v-4a2d539c"]]);
|
|
2898
|
+
//#endregion
|
|
2899
|
+
export { _e as n, vt as t };
|