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