@templatical/editor 0.14.0 → 0.15.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 (152) hide show
  1. package/dist/{AiChatSidebar-J8iO_sX7.js → AiChatSidebar-BIKvYREk.js} +57 -56
  2. package/dist/{AiFeatureMenu-F2diEDgV.js → AiFeatureMenu-QbD82crt.js} +20 -20
  3. package/dist/{BlockIssueBadge-a-qlByxF.js → BlockIssueBadge-B3xVgMTh.js} +11 -11
  4. package/dist/{CloudEditor-CDjtwb4i.js → CloudEditor-DptuSf7A.js} +470 -468
  5. package/dist/{CollaboratorBar-B_EnJLtW.js → CollaboratorBar-DrA_K69w.js} +20 -20
  6. package/dist/{CommentsSidebar-DaP9BA_r.js → CommentsSidebar-D_tSGvTX.js} +154 -153
  7. package/dist/CountdownBlock-apiYUhkQ.js +92 -0
  8. package/dist/CountdownToolbar-CS0axcjz.js +210 -0
  9. package/dist/{DesignReferenceSidebar-BHRlTqlT.js → DesignReferenceSidebar-DWYK9nTk.js} +58 -57
  10. package/dist/{IssuesPanel-u7ee3Wrl.js → IssuesPanel-CR1MPaDE.js} +40 -40
  11. package/dist/{LoadingTrack-CV3ID80N.js → LoadingTrack-DsecR8Rw.js} +1 -1
  12. package/dist/MergeTagSuggestion-CH2SUxBo.js +1327 -0
  13. package/dist/{ModuleBrowserModal-DOsdaS6s.js → ModuleBrowserModal-D45rBj5C.js} +60 -59
  14. package/dist/{ModulePreviewCanvas-Cx4MOJ0X.js → ModulePreviewCanvas-BiQ6B2-l.js} +29 -29
  15. package/dist/{NumberWithSuffix-D2mW_DhT.js → NumberWithSuffix-CrA6quxx.js} +143 -142
  16. package/dist/{ParagraphEditor-DMzkVnST.js → ParagraphEditor-1NaUJpZO.js} +247 -246
  17. package/dist/{RichTextEditorContent-CRCxCwKf.js → RichTextEditorContent-BqLHIZY7.js} +45 -44
  18. package/dist/{SaveModuleDialog-DuEKgumL.js → SaveModuleDialog-B0sPOTgO.js} +38 -37
  19. package/dist/{SnapshotHistory-CVgiNJtE.js → SnapshotHistory-DslVzmSb.js} +34 -33
  20. package/dist/{TemplateScoringPanel-lm0_9nYi.js → TemplateScoringPanel-CZ62rGHz.js} +83 -82
  21. package/dist/{TestEmailModal-WBMdiW5S.js → TestEmailModal-DWGniJVu.js} +22 -21
  22. package/dist/{TitleEditor-eyT0h-Sa.js → TitleEditor-D4t_gZZJ.js} +44 -44
  23. package/dist/{TplModal-tjQ7OB0g.js → TplModal-Br2VG6cn.js} +14 -13
  24. package/dist/{blockTypeIcons-DdB3uTKD.js → blockTypeIcons-CXhCS5WV.js} +2 -2
  25. package/dist/bundle-stats.json +8 -8
  26. package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js → AiFeatureMenu-3Slo_LGA.js} +5 -5
  27. package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js.map → AiFeatureMenu-3Slo_LGA.js.map} +1 -1
  28. package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js → BlockIssueBadge-BxwEiiF3.js} +3 -3
  29. package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js.map → BlockIssueBadge-BxwEiiF3.js.map} +1 -1
  30. package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js → CloudEditor-DFIFWD9G.js} +89 -89
  31. package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js.map → CloudEditor-DFIFWD9G.js.map} +1 -1
  32. package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js → CollaboratorBar-Cu3vuN66.js} +4 -4
  33. package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js.map → CollaboratorBar-Cu3vuN66.js.map} +1 -1
  34. package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js → CountdownBlock-BEVAJQtQ.js} +3 -3
  35. package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js.map → CountdownBlock-BEVAJQtQ.js.map} +1 -1
  36. package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js → CountdownToolbar-CI2sQZv5.js} +4 -4
  37. package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js.map → CountdownToolbar-CI2sQZv5.js.map} +1 -1
  38. package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js → IssuesPanel-BdeDoTcn.js} +4 -4
  39. package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js.map → IssuesPanel-BdeDoTcn.js.map} +1 -1
  40. package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js +213 -0
  41. package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js.map +1 -0
  42. package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js → ModuleBrowserModal-Dz-I5zfj.js} +6 -6
  43. package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js.map → ModuleBrowserModal-Dz-I5zfj.js.map} +1 -1
  44. package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js → ModulePreviewCanvas-BfinyuAN.js} +3 -3
  45. package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js.map → ModulePreviewCanvas-BfinyuAN.js.map} +1 -1
  46. package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js → NumberWithSuffix-CDjEa08X.js} +6 -6
  47. package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js.map → NumberWithSuffix-CDjEa08X.js.map} +1 -1
  48. package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js → ParagraphEditor-B3fG0vge.js} +22 -22
  49. package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js.map → ParagraphEditor-B3fG0vge.js.map} +1 -1
  50. package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js → RichTextEditorContent-C6YPCp9j.js} +4 -4
  51. package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js.map → RichTextEditorContent-C6YPCp9j.js.map} +1 -1
  52. package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js → SaveModuleDialog-C6UIIVAM.js} +3 -3
  53. package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js.map → SaveModuleDialog-C6UIIVAM.js.map} +1 -1
  54. package/dist/cdn/chunks/{TitleEditor-DO1-h3RY.js → TitleEditor-BiZbLYF1.js} +10 -10
  55. package/dist/cdn/chunks/{TitleEditor-DO1-h3RY.js.map → TitleEditor-BiZbLYF1.js.map} +1 -1
  56. package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js → blockTypeIcons-BernVG06.js} +3 -3
  57. package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js.map → blockTypeIcons-BernVG06.js.map} +1 -1
  58. package/dist/cdn/chunks/{draggable-kPCz_3zM.js → draggable-kG-D5Xsm.js} +6 -6
  59. package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +1 -0
  60. package/dist/cdn/chunks/extensions-Drp8UDc6.js +421 -0
  61. package/dist/cdn/chunks/extensions-Drp8UDc6.js.map +1 -0
  62. package/dist/cdn/chunks/{features-CkTMVylx.js → features-Dpczf9Su.js} +884 -835
  63. package/dist/cdn/chunks/features-Dpczf9Su.js.map +1 -0
  64. package/dist/cdn/chunks/{icons-9zjCuoJx.js → icons-CuxnJiGQ.js} +26 -26
  65. package/dist/cdn/chunks/{icons-9zjCuoJx.js.map → icons-CuxnJiGQ.js.map} +1 -1
  66. package/dist/cdn/chunks/{liquid.browser-DKKBzRQu.js → liquid.browser-BJOEu6Cg.js} +693 -678
  67. package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +1 -0
  68. package/dist/cdn/chunks/{media-library-DMRIPx4g.js → media-library-CiYl_BO7.js} +33 -33
  69. package/dist/cdn/chunks/{media-library-DMRIPx4g.js.map → media-library-CiYl_BO7.js.map} +1 -1
  70. package/dist/cdn/chunks/{pusher-CdEqyLwF.js → pusher-CIwiKF8H.js} +4 -4
  71. package/dist/cdn/chunks/{pusher-CdEqyLwF.js.map → pusher-CIwiKF8H.js.map} +1 -1
  72. package/dist/cdn/chunks/{quality-CyeUgs_c.js → quality-CNjGxBG0.js} +112 -112
  73. package/dist/cdn/chunks/{quality-CyeUgs_c.js.map → quality-CNjGxBG0.js.map} +1 -1
  74. package/dist/cdn/chunks/{renderer-BIKUEKDD.js → renderer-CFkg8h-K.js} +20 -20
  75. package/dist/cdn/chunks/renderer-CFkg8h-K.js.map +1 -0
  76. package/dist/cdn/chunks/{src-pDy_imWG.js → src-DRpKu4Dy.js} +5 -5
  77. package/dist/cdn/chunks/{src-pDy_imWG.js.map → src-DRpKu4Dy.js.map} +1 -1
  78. package/dist/cdn/chunks/{styles-D4Bd3SCx.js → styles-B7wryV0l.js} +1484 -1344
  79. package/dist/cdn/chunks/styles-B7wryV0l.js.map +1 -0
  80. package/dist/cdn/chunks/{tiptap-BlLFFU3M.js → tiptap-DF9PEiqH.js} +6859 -6823
  81. package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +1 -0
  82. package/dist/cdn/editor.css +1 -1
  83. package/dist/cdn/editor.js +35 -35
  84. package/dist/cdn/editor.js.map +1 -1
  85. package/dist/{check-CYJwFmjy.js → check-rl7ok6uJ.js} +1 -1
  86. package/dist/{chevron-down-C5l-DzAA.js → chevron-down-BKe__NOD.js} +1 -1
  87. package/dist/{circle-alert-wf5HUFZY.js → circle-alert-C8xmpMsK.js} +1 -1
  88. package/dist/{clock-Bj0bQw-K.js → clock-BW4JuDCN.js} +1 -1
  89. package/dist/{cloud-CoFDm9YA.js → cloud-BQusL53H.js} +208 -208
  90. package/dist/createLucideIcon-Dx-EjR9r.js +43 -0
  91. package/dist/{dist-CLpPNKy9.js → dist-B5Sov3sS.js} +7 -7
  92. package/dist/dist-BEWiuOMi.js +251 -0
  93. package/dist/{dist-CrQZ_af9.js → dist-BFmE-7hB.js} +2 -2
  94. package/dist/{dist-U5vfDdYI.js → dist-BMoa33wT.js} +2 -2
  95. package/dist/{dist-BctFrpeA.js → dist-BibU4HNl.js} +74 -65
  96. package/dist/{dist-Dd3ibRZm.js → dist-BsCGIDSt.js} +103 -102
  97. package/dist/dist-CNLKj9wa.js +5 -0
  98. package/dist/{dist-BX3gGwL8.js → dist-CNXDNYQn.js} +728 -694
  99. package/dist/{dist-Bn703mnA.js → dist-COG3IdPK.js} +3 -3
  100. package/dist/{dist-B7w6xTU6.js → dist-CQZxDvFw.js} +3 -3
  101. package/dist/{dist-34OcyoK1.js → dist-CRsjOQM-.js} +2 -2
  102. package/dist/dist-CTT6WYJ6.js +134 -0
  103. package/dist/dist-Cqa6aeAJ.js +5 -0
  104. package/dist/{dist-ChMninLH.js → dist-SXJJ2v41.js} +2 -2
  105. package/dist/{dist-CyjyYg52.js → dist-itdjZraK.js} +28 -23
  106. package/dist/extensions-DwaZAqm6.js +423 -0
  107. package/dist/{image-up-x8-WXfsx.js → image-up-BwBCmQ4P.js} +1 -1
  108. package/dist/{info-RS_fGcGi.js → info-TCn7uWR5.js} +1 -1
  109. package/dist/{keys-DgYXDafq.js → keys-Cv8-8GsD.js} +1 -1
  110. package/dist/{liquid.browser-CVjP5Mex.js → liquid.browser-DZLtv26k.js} +692 -677
  111. package/dist/{list-checks-Bf7XdDyv.js → list-checks-CSrOWNgq.js} +1 -1
  112. package/dist/{loader-circle-CLZ0_FvW.js → loader-circle-BLmicnPG.js} +1 -1
  113. package/dist/{message-circle-B-1bN9ab.js → message-circle-C9hHMQCI.js} +1 -1
  114. package/dist/{refresh-cw-CWKWqJYG.js → refresh-cw-D1JQ1LNa.js} +1 -1
  115. package/dist/runtime-dom.esm-bundler-BzuoCyNp.js +523 -0
  116. package/dist/{scan-line-BtK5dEai.js → scan-line-DgijVq9y.js} +1 -1
  117. package/dist/{send-Cn1IUdzh.js → send-DjPdq69F.js} +1 -1
  118. package/dist/{shield-check-CrvMk4Ea.js → shield-check-Bqluu8FS.js} +1 -1
  119. package/dist/{sparkles-CgfjwvnG.js → sparkles-M4azPVSP.js} +1 -1
  120. package/dist/style.css +1 -1
  121. package/dist/styles-D7fQ7f_1.js +4164 -0
  122. package/dist/templatical-editor.js +127 -126
  123. package/dist/{text-align-start-C3r_Rnvy.js → text-align-start-CMya5pCQ.js} +11 -11
  124. package/dist/{trash-2-CjERg4x9.js → trash-2-C-81rkLS.js} +1 -1
  125. package/dist/{triangle-alert-Chkny574.js → triangle-alert-BuRWnynk.js} +1 -1
  126. package/dist/{upload-e5kDRkPb.js → upload-CWBIoLd4.js} +1 -1
  127. package/dist/{useAliveFlag-cUQj9rmB.js → useAliveFlag-CECL_OUb.js} +1 -1
  128. package/dist/{useCloudI18n-CYJKqXtI.js → useCloudI18n-AKCy98qD.js} +2 -2
  129. package/dist/{useEditorCore-8JxXDOA4.js → useEditorCore-vcWLdnjN.js} +1406 -1364
  130. package/dist/{useI18n-BWqM8i78.js → useI18n-C-TDeJBt.js} +2 -2
  131. package/dist/{useMergeTag-NHC4ylza.js → useMergeTag-DSrBY0-2.js} +5 -5
  132. package/dist/usePopoverRoot-DKUDnr55.js +8 -0
  133. package/dist/{vue.runtime.esm-bundler-BPa483TZ.js → vue.runtime.esm-bundler-l0XAqiyv.js} +626 -1147
  134. package/dist/{x-DiPIbccg.js → x-CQSvXnGR.js} +1 -1
  135. package/package.json +26 -26
  136. package/dist/CountdownBlock-DtAokAVw.js +0 -92
  137. package/dist/CountdownToolbar-Dtqgwy0g.js +0 -210
  138. package/dist/cdn/chunks/draggable-kPCz_3zM.js.map +0 -1
  139. package/dist/cdn/chunks/extensions-iwBXnEwq.js +0 -605
  140. package/dist/cdn/chunks/extensions-iwBXnEwq.js.map +0 -1
  141. package/dist/cdn/chunks/features-CkTMVylx.js.map +0 -1
  142. package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +0 -1
  143. package/dist/cdn/chunks/renderer-BIKUEKDD.js.map +0 -1
  144. package/dist/cdn/chunks/styles-D4Bd3SCx.js.map +0 -1
  145. package/dist/cdn/chunks/tiptap-BlLFFU3M.js.map +0 -1
  146. package/dist/createLucideIcon-Bad2kKE0.js +0 -43
  147. package/dist/dist-CADDCv0o.js +0 -5
  148. package/dist/dist-CGvz7vkq.js +0 -5
  149. package/dist/dist-DuCzdgDA.js +0 -382
  150. package/dist/extensions-J439b7y7.js +0 -1720
  151. package/dist/styles-BUwDOWd3.js +0 -4022
  152. package/dist/usePopoverRoot-B1sdY4es.js +0 -8
@@ -1,50 +1,52 @@
1
- import { A as e, B as t, D as n, E as r, F as i, G as a, J as o, L as s, M as c, N as l, O as u, Q as d, S as f, U as p, V as m, X as h, Y as g, _, at as v, b as y, c as b, d as x, et as S, f as C, h as w, it as T, j as E, k as ee, l as D, m as O, nt as k, o as te, ot as A, p as j, q as ne, rt as M, s as re, st as N, tt as ie, v as P, w as F, x as ae, y as oe, z as se } from "./vue.runtime.esm-bundler-BPa483TZ.js";
2
- import { A as ce, C as le, D as ue, E as de, M as fe, N as pe, O as me, S as he, _ as ge, b as _e, c as ve, d as ye, f as be, g as xe, h as Se, j as Ce, l as we, m as Te, n as Ee, o as De, p as Oe, r as ke, s as Ae, t as je, u as Me, v as Ne, w as Pe, x as Fe, y as Ie } from "./dist-BctFrpeA.js";
3
- import { a as Le, d as Re, i as ze, l as Be, n as Ve, r as He, s as Ue, u as We } from "./dist-DuCzdgDA.js";
4
- import { A as Ge, C as Ke, D as qe, E as Je, F as Ye, I as Xe, L as Ze, N as Qe, O as $e, P as et, S as tt, T as nt, _ as rt, a as it, b as at, d as ot, f as st, g as ct, h as lt, i as ut, k as dt, m as ft, n as pt, o as mt, p as ht, s as gt, u as _t, v as vt, w as yt, x as bt, y as xt } from "./keys-DgYXDafq.js";
5
- import { t as St } from "./useI18n-BWqM8i78.js";
6
- import { t as I } from "./createLucideIcon-Bad2kKE0.js";
7
- import { t as Ct } from "./loader-circle-CLZ0_FvW.js";
8
- import { t as wt } from "./message-circle-B-1bN9ab.js";
9
- import { t as Tt } from "./trash-2-CjERg4x9.js";
10
- import { t as Et } from "./triangle-alert-Chkny574.js";
11
- import { t as Dt } from "./upload-e5kDRkPb.js";
12
- import { t as Ot } from "./LoadingTrack-CV3ID80N.js";
13
- import { t as kt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
14
- import "./useCloudI18n-CYJKqXtI.js";
15
- import { t as At } from "./useMergeTag-NHC4ylza.js";
16
- import { t as jt } from "./useAliveFlag-cUQj9rmB.js";
1
+ import { $ as e, A as t, B as n, D as r, Dt as i, E as a, Et as o, H as s, I as c, J as l, K as u, N as d, O as f, Ot as p, R as m, T as h, W as g, Y as _, Z as v, _ as y, c as b, d as x, et as S, g as C, h as w, j as T, k as E, l as D, m as O, nt as k, q as ee, r as A, rt as te, s as j, tt as ne, u as M, v as re, w as ie, x as N, y as ae, z as oe } from "./vue.runtime.esm-bundler-l0XAqiyv.js";
2
+ import { c as P, o as se, s as ce } from "./runtime-dom.esm-bundler-BzuoCyNp.js";
3
+ import { A as le, C as ue, D as de, M as fe, N as pe, O as me, P as he, S as ge, T as _e, _ as ve, b as ye, c as be, d as xe, f as Se, g as Ce, h as we, j as Te, k as Ee, l as De, m as Oe, n as ke, o as Ae, p as je, r as Me, s as Ne, t as Pe, u as Fe, v as Ie, w as Le, x as Re, y as ze } from "./dist-BibU4HNl.js";
4
+ import { f as Be, g as Ve, h as He, m as Ue } from "./dist-CTT6WYJ6.js";
5
+ import { a as We, i as Ge, n as Ke, r as qe } from "./dist-BEWiuOMi.js";
6
+ import { A as Je, C as Ye, D as Xe, E as Ze, F as Qe, I as $e, L as et, N as tt, O as nt, P as rt, S as it, T as at, _ as ot, a as st, b as ct, d as lt, f as ut, g as dt, h as ft, i as pt, k as mt, m as ht, n as gt, o as _t, p as vt, s as yt, u as bt, v as xt, w as St, x as Ct, y as wt } from "./keys-Cv8-8GsD.js";
7
+ import { t as Tt } from "./useI18n-C-TDeJBt.js";
8
+ import { t as F } from "./createLucideIcon-Dx-EjR9r.js";
9
+ import { t as Et } from "./loader-circle-BLmicnPG.js";
10
+ import { t as Dt } from "./message-circle-C9hHMQCI.js";
11
+ import { t as Ot } from "./trash-2-C-81rkLS.js";
12
+ import { t as kt } from "./triangle-alert-BuRWnynk.js";
13
+ import { t as At } from "./upload-CWBIoLd4.js";
14
+ import { t as jt } from "./LoadingTrack-DsecR8Rw.js";
15
+ import { t as Mt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
16
+ import "./useCloudI18n-AKCy98qD.js";
17
+ import { t as Nt } from "./useMergeTag-DSrBY0-2.js";
18
+ import { t as Pt } from "./useAliveFlag-CECL_OUb.js";
17
19
  //#region ../core/dist/index.js
18
- function Mt(e) {
20
+ function Ft(e) {
19
21
  return e === "1" ? 1 : e === "3" ? 3 : 2;
20
22
  }
21
- function Nt(e) {
22
- let t = o({
23
- content: e.content ?? ye(e.defaultFontFamily, e.templateDefaults),
23
+ function It(e) {
24
+ let t = ee({
25
+ content: e.content ?? xe(e.defaultFontFamily, e.templateDefaults),
24
26
  selectedBlockId: null,
25
27
  viewport: "desktop",
26
28
  darkMode: !1,
27
29
  previewMode: !1,
28
30
  isDirty: !1,
29
31
  uiTheme: "auto"
30
- }), n = m({
32
+ }), r = n({
31
33
  get: () => t.content,
32
34
  set: (e) => {
33
35
  t.content = e, t.isDirty = !0;
34
36
  }
35
- }), r = m(() => t.selectedBlockId ? i(t.content.blocks, t.selectedBlockId) : null);
36
- function i(e, t) {
37
+ }), i = n(() => t.selectedBlockId ? a(t.content.blocks, t.selectedBlockId) : null);
38
+ function a(e, t) {
37
39
  for (let n of e) {
38
40
  if (n.id === t) return n;
39
41
  if (n.type === "section") for (let e of n.children) {
40
- let n = i(e, t);
42
+ let n = a(e, t);
41
43
  if (n) return n;
42
44
  }
43
45
  }
44
46
  return null;
45
47
  }
46
- function a(e, t) {
47
- if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) a(e, t);
48
+ function o(e, t) {
49
+ if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) o(e, t);
48
50
  }
49
51
  function s(e, t, n = { blocks: e }) {
50
52
  for (let r = 0; r < e.length; r++) {
@@ -64,7 +66,7 @@ function Nt(e) {
64
66
  function c(t) {
65
67
  return e.lockedBlocks?.value.has(t) ?? !1;
66
68
  }
67
- function l(e) {
69
+ function u(e) {
68
70
  let n = s(t.content.blocks, e);
69
71
  if (!n) return null;
70
72
  let r = n.blocks.findIndex((t) => t.id === e);
@@ -74,51 +76,51 @@ function Nt(e) {
74
76
  index: r
75
77
  };
76
78
  }
77
- function u(e, n = !0) {
79
+ function d(e, n = !0) {
78
80
  t.content = e, n && (t.isDirty = !0);
79
81
  }
80
- function d(e) {
82
+ function f(e) {
81
83
  e && c(e) || (t.selectedBlockId = e);
82
84
  }
83
- function f(e) {
85
+ function p(e) {
84
86
  t.viewport = e;
85
87
  }
86
- function p(e) {
88
+ function m(e) {
87
89
  t.darkMode = e;
88
90
  }
89
91
  function h(e) {
90
92
  t.uiTheme = e;
91
93
  }
92
- function _(e) {
94
+ function g(e) {
93
95
  t.previewMode = e, e && (t.selectedBlockId = null);
94
96
  }
95
- function v(e, n) {
97
+ function _(e, n) {
96
98
  if (c(e)) return;
97
- let r = i(t.content.blocks, e);
99
+ let r = a(t.content.blocks, e);
98
100
  r && (Object.assign(r, n), t.isDirty = !0);
99
101
  }
100
- function y(e) {
102
+ function v(e) {
101
103
  t.content.settings = {
102
104
  ...t.content.settings,
103
105
  ...e
104
106
  }, t.isDirty = !0;
105
107
  }
106
- function b(e, n, r = 0, a) {
108
+ function y(e, n, r = 0, i) {
107
109
  if (!(n && e.type === "section")) {
108
110
  if (n) {
109
111
  if (c(n)) return;
110
- let o = i(t.content.blocks, n);
112
+ let o = a(t.content.blocks, n);
111
113
  if (o && o.type === "section") {
112
- if (r < 0 || r >= Mt(o.columns)) return;
114
+ if (r < 0 || r >= Ft(o.columns)) return;
113
115
  o.children[r] = o.children[r] || [];
114
116
  let t = o.children[r];
115
- a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
117
+ i !== void 0 && i < t.length ? t.splice(i, 0, e) : t.push(e);
116
118
  }
117
- } else a !== void 0 && a < t.content.blocks.length ? t.content.blocks.splice(a, 0, e) : t.content.blocks.push(e);
119
+ } else i !== void 0 && i < t.content.blocks.length ? t.content.blocks.splice(i, 0, e) : t.content.blocks.push(e);
118
120
  t.isDirty = !0;
119
121
  }
120
122
  }
121
- function x(e) {
123
+ function b(e) {
122
124
  if (c(e)) return;
123
125
  let n = s(t.content.blocks, e);
124
126
  if (n) {
@@ -127,13 +129,13 @@ function Nt(e) {
127
129
  let [e] = n.blocks.splice(r, 1);
128
130
  if (t.selectedBlockId) {
129
131
  let n = /* @__PURE__ */ new Set();
130
- a(e, n), n.has(t.selectedBlockId) && (t.selectedBlockId = null);
132
+ o(e, n), n.has(t.selectedBlockId) && (t.selectedBlockId = null);
131
133
  }
132
134
  t.isDirty = !0;
133
135
  }
134
136
  }
135
137
  }
136
- function S(e, n, r, a = 0) {
138
+ function x(e, n, r, i = 0) {
137
139
  if (c(e) || r && c(r)) return;
138
140
  let o = s(t.content.blocks, e);
139
141
  if (!o) return;
@@ -141,129 +143,129 @@ function Nt(e) {
141
143
  if (l === -1 || r && o.blocks[l].type === "section") return;
142
144
  let u;
143
145
  if (r) {
144
- let e = i(t.content.blocks, r);
145
- if (!e || e.type !== "section" || a < 0 || a >= Mt(e.columns)) return;
146
- e.children[a] = e.children[a] || [], u = e.children[a];
146
+ let e = a(t.content.blocks, r);
147
+ if (!e || e.type !== "section" || i < 0 || i >= Ft(e.columns)) return;
148
+ e.children[i] = e.children[i] || [], u = e.children[i];
147
149
  } else u = t.content.blocks;
148
150
  let [d] = o.blocks.splice(l, 1);
149
151
  u.splice(n, 0, d), t.isDirty = !0;
150
152
  }
151
- function C() {
153
+ function S() {
152
154
  t.isDirty = !0;
153
155
  }
154
156
  return {
155
- state: g(t),
156
- content: n,
157
- selectedBlock: r,
157
+ state: l(t),
158
+ content: r,
159
+ selectedBlock: i,
158
160
  isBlockLocked: c,
159
- setContent: u,
160
- selectBlock: d,
161
- setViewport: f,
162
- setDarkMode: p,
161
+ setContent: d,
162
+ selectBlock: f,
163
+ setViewport: p,
164
+ setDarkMode: m,
163
165
  setUiTheme: h,
164
- setPreviewMode: _,
165
- updateBlock: v,
166
- updateSettings: y,
167
- addBlock: b,
168
- removeBlock: x,
169
- moveBlock: S,
170
- markDirty: C,
171
- findBlockLocation: l
166
+ setPreviewMode: g,
167
+ updateBlock: _,
168
+ updateSettings: v,
169
+ addBlock: y,
170
+ removeBlock: b,
171
+ moveBlock: x,
172
+ markDirty: S,
173
+ findBlockLocation: u
172
174
  };
173
175
  }
174
- var Pt = 50, Ft = 300, It = 1500;
175
- function Lt(e) {
176
- let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = Pt } = e, a = h([]), o = h([]), s = h(!1), c = null, l = null, u = m(() => a.value.length > 0), d = m(() => o.value.length > 0);
177
- function f() {
178
- return pe(t.value);
176
+ var Lt = 50, Rt = 300, zt = 1500;
177
+ function Bt(e) {
178
+ let { content: t, setContent: r, isRemoteOperation: i, maxSize: a = Lt } = e, o = _([]), s = _([]), c = _(!1), l = null, u = null, d = n(() => o.value.length > 0), f = n(() => s.value.length > 0);
179
+ function p() {
180
+ return he(t.value);
179
181
  }
180
- function p(e) {
181
- a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
182
+ function m(e) {
183
+ o.value.push(e), o.value.length > a && o.value.splice(0, o.value.length - a);
182
184
  }
183
- function g() {
184
- l &&= (clearTimeout(l.timeoutId), null);
185
+ function h() {
186
+ u &&= (clearTimeout(u.timeoutId), null);
185
187
  }
186
- function _() {
187
- r?.() || (g(), p(f()), o.value = []);
188
+ function g() {
189
+ i?.() || (h(), m(p()), s.value = []);
188
190
  }
189
191
  function v(e) {
190
- if (!r?.()) {
191
- if (l && l.blockId === e) {
192
- clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
193
- l = null;
194
- }, Ft);
192
+ if (!i?.()) {
193
+ if (u && u.blockId === e) {
194
+ clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
195
+ u = null;
196
+ }, Rt);
195
197
  return;
196
198
  }
197
- g(), p(f()), o.value = [], l = {
199
+ h(), m(p()), s.value = [], u = {
198
200
  blockId: e,
199
201
  timeoutId: setTimeout(() => {
200
- l = null;
201
- }, Ft)
202
+ u = null;
203
+ }, Rt)
202
204
  };
203
205
  }
204
206
  }
205
207
  function y() {
206
- s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
207
- s.value = !1, c = null;
208
- }, It);
208
+ c.value = !0, l && clearTimeout(l), l = setTimeout(() => {
209
+ c.value = !1, l = null;
210
+ }, zt);
209
211
  }
210
212
  function b() {
211
- if (a.value.length === 0) return;
212
- g();
213
- let e = a.value.pop();
214
- o.value.push(f()), n(e, !0), y();
215
- }
216
- function x() {
217
213
  if (o.value.length === 0) return;
218
- g();
214
+ h();
219
215
  let e = o.value.pop();
220
- a.value.push(f()), n(e, !0), y();
216
+ s.value.push(p()), r(e, !0), y();
217
+ }
218
+ function x() {
219
+ if (s.value.length === 0) return;
220
+ h();
221
+ let e = s.value.pop();
222
+ o.value.push(p()), r(e, !0), y();
221
223
  }
222
224
  function S() {
223
- a.value = [], o.value = [], g();
225
+ o.value = [], s.value = [], h();
224
226
  }
225
227
  function C() {
226
- S(), c &&= (clearTimeout(c), null);
228
+ S(), l &&= (clearTimeout(l), null);
227
229
  }
228
230
  return {
229
- canUndo: u,
230
- canRedo: d,
231
- isNavigating: s,
231
+ canUndo: d,
232
+ canRedo: f,
233
+ isNavigating: c,
232
234
  undo: b,
233
235
  redo: x,
234
- record: _,
236
+ record: g,
235
237
  recordDebounced: v,
236
238
  clear: S,
237
239
  destroy: C
238
240
  };
239
241
  }
240
- function Rt(e) {
242
+ function Vt(e) {
241
243
  e.type === "table" ? e.rows = e.rows.map((e) => ({
242
244
  ...e,
243
- id: le(),
245
+ id: ue(),
244
246
  cells: e.cells.map((e) => ({
245
247
  ...e,
246
- id: le()
248
+ id: ue()
247
249
  }))
248
250
  })) : e.type === "social" ? e.icons = e.icons.map((e) => ({
249
251
  ...e,
250
- id: le()
252
+ id: ue()
251
253
  })) : e.type === "menu" && (e.items = e.items.map((e) => ({
252
254
  ...e,
253
- id: le()
255
+ id: ue()
254
256
  })));
255
257
  }
256
- function zt(e) {
258
+ function Ht(e) {
257
259
  let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
258
260
  function o(n, r, a) {
259
- let o = Ae(n, e.blockDefaults);
261
+ let o = Ne(n, e.blockDefaults);
260
262
  return t(o, r, a), i(o.id), o;
261
263
  }
262
264
  function s(e, n, r) {
263
265
  let o = JSON.parse(JSON.stringify(e));
264
- if (o.id = le(), Rt(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
266
+ if (o.id = ue(), Vt(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
265
267
  let t = JSON.parse(JSON.stringify(e));
266
- return t.id = le(), Rt(t), t;
268
+ return t.id = ue(), Vt(t), t;
267
269
  }))), n !== void 0 || r !== void 0) t(o, n, r);
268
270
  else {
269
271
  let i = a?.(e.id) ?? null;
@@ -284,7 +286,7 @@ function zt(e) {
284
286
  updateBlockProperty: l
285
287
  };
286
288
  }
287
- function Bt(e) {
289
+ function Ut(e) {
288
290
  let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
289
291
  function c() {
290
292
  return typeof a == "function" ? a() : a;
@@ -306,7 +308,7 @@ function Bt(e) {
306
308
  o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
307
309
  }, i));
308
310
  }
309
- let m = T(t, () => {
311
+ let m = te(t, () => {
310
312
  c() && !s && n() && p();
311
313
  }, { deep: !0 });
312
314
  function h() {
@@ -320,41 +322,41 @@ function Bt(e) {
320
322
  destroy: h
321
323
  };
322
324
  }
323
- function Vt(e) {
324
- let t = o(/* @__PURE__ */ new Set()), n = m(() => t.size > 0);
325
- function r(e) {
325
+ function Wt(e) {
326
+ let t = ee(/* @__PURE__ */ new Set()), r = n(() => t.size > 0);
327
+ function i(e) {
326
328
  return t.has(e);
327
329
  }
328
- function i(n) {
330
+ function a(n) {
329
331
  t.has(n) ? t.delete(n) : (t.add(n), e.state.selectedBlockId === n && e.selectBlock(null));
330
332
  }
331
- function a() {
333
+ function o() {
332
334
  t.clear();
333
335
  }
334
336
  return {
335
- isHidden: r,
336
- toggleBlock: i,
337
- reset: a,
338
- hasHiddenBlocks: n
337
+ isHidden: i,
338
+ toggleBlock: a,
339
+ reset: o,
340
+ hasHiddenBlocks: r
339
341
  };
340
342
  }
341
- function Ht(e) {
342
- let t = h(!1), n = h(!1), r = m(() => !!e.definition.value?.dataSource), i = m(() => r.value && !e.block.value.dataSourceFetched);
343
- async function a() {
344
- let r = e.definition.value;
345
- if (r?.dataSource) {
346
- t.value = !0, n.value = !1;
343
+ function Gt(e) {
344
+ let t = _(!1), r = _(!1), i = n(() => !!e.definition.value?.dataSource), a = n(() => i.value && !e.block.value.dataSourceFetched);
345
+ async function o() {
346
+ let n = e.definition.value;
347
+ if (n?.dataSource) {
348
+ t.value = !0, r.value = !1;
347
349
  try {
348
- let t = await r.dataSource.onFetch({
350
+ let t = await n.dataSource.onFetch({
349
351
  fieldValues: { ...e.block.value.fieldValues },
350
352
  blockId: e.block.value.id
351
353
  });
352
354
  if (t == null) return;
353
- let n = { ...e.block.value.fieldValues };
354
- for (let e of Object.keys(n)) e in t && (n[e] = t[e]);
355
- e.onUpdate(n, !0);
355
+ let r = { ...e.block.value.fieldValues };
356
+ for (let e of Object.keys(r)) e in t && (r[e] = t[e]);
357
+ e.onUpdate(r, !0);
356
358
  } catch (e) {
357
- console.warn("[Templatical] Data source fetch error:", e), n.value = !0;
359
+ console.warn("[Templatical] Data source fetch error:", e), r.value = !0;
358
360
  } finally {
359
361
  t.value = !1;
360
362
  }
@@ -362,13 +364,13 @@ function Ht(e) {
362
364
  }
363
365
  return {
364
366
  isFetching: t,
365
- fetchError: n,
366
- fetch: a,
367
- hasDataSource: r,
368
- needsFetch: i
367
+ fetchError: r,
368
+ fetch: o,
369
+ hasDataSource: i,
370
+ needsFetch: a
369
371
  };
370
372
  }
371
- function Ut(e, t) {
373
+ function Kt(e, t) {
372
374
  let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
373
375
  e.addBlock = (r, i, a, o) => {
374
376
  i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
@@ -384,27 +386,27 @@ function Ut(e, t) {
384
386
  }
385
387
  //#endregion
386
388
  //#region src/utils/activeEditorTracker.ts
387
- var Wt = /* @__PURE__ */ new Set(), Gt = 0, Kt = 0;
388
- function qt() {
389
- let e = ++Kt;
390
- return Wt.add(e), Gt === 0 && (Gt = e), {
389
+ var qt = /* @__PURE__ */ new Set(), Jt = 0, Yt = 0;
390
+ function Xt() {
391
+ let e = ++Yt;
392
+ return qt.add(e), Jt === 0 && (Jt = e), {
391
393
  id: e,
392
- isActive: () => Wt.size <= 1 || Gt === e,
394
+ isActive: () => qt.size <= 1 || Jt === e,
393
395
  claim: () => {
394
- Gt = e;
396
+ Jt = e;
395
397
  },
396
398
  dispose: () => {
397
- if (Wt.delete(e), Gt === e) {
398
- let e = Array.from(Wt);
399
- Gt = e[e.length - 1] ?? 0;
399
+ if (qt.delete(e), Jt === e) {
400
+ let e = Array.from(qt);
401
+ Jt = e[e.length - 1] ?? 0;
400
402
  }
401
403
  }
402
404
  };
403
405
  }
404
406
  //#endregion
405
407
  //#region src/composables/useMergeTagPicker.ts
406
- function Jt() {
407
- let e = h(!1), t = h([]), n = null;
408
+ function Zt() {
409
+ let e = _(!1), t = _([]), n = null;
408
410
  function r(r) {
409
411
  if (n) {
410
412
  let e = n;
@@ -418,7 +420,7 @@ function Jt() {
418
420
  let i = n;
419
421
  n = null, e.value = !1, t.value = [], i && i(r);
420
422
  }
421
- return p() && ne(() => {
423
+ return s() && u(() => {
422
424
  if (n) {
423
425
  let e = n;
424
426
  n = null, e(null);
@@ -433,8 +435,8 @@ function Jt() {
433
435
  }
434
436
  //#endregion
435
437
  //#region src/composables/useLogicTagPicker.ts
436
- function Yt() {
437
- let e = h(!1), t = h([]), n = h([]), r = null;
438
+ function Qt() {
439
+ let e = _(!1), t = _([]), n = _([]), r = null;
438
440
  function i(i, a) {
439
441
  if (r) {
440
442
  let e = r;
@@ -448,7 +450,7 @@ function Yt() {
448
450
  let a = r;
449
451
  r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
450
452
  }
451
- return p() && ne(() => {
453
+ return s() && u(() => {
452
454
  if (r) {
453
455
  let e = r;
454
456
  r = null, e(null);
@@ -464,58 +466,58 @@ function Yt() {
464
466
  }
465
467
  //#endregion
466
468
  //#region src/composables/useTemplateLint.ts
467
- function Xt(e) {
468
- return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
469
+ function $t(e) {
470
+ return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
469
471
  }
470
- function Zt(e) {
471
- let t = h([]), n = h(!1), r = h(!1), i = d(null), a = Xt(e.options), o = null, c = !1;
472
+ function en(e) {
473
+ let t = _([]), n = _(!1), r = _(!1), i = v(null), a = $t(e.options), o = null, s = !1;
472
474
  a || l();
473
475
  async function l() {
474
476
  try {
475
477
  let t = await import("@templatical/quality");
476
- if (c) return;
477
- i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o = Re(e.content, u, {
478
+ if (s) return;
479
+ i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o = Ve(e.content, u, {
478
480
  debounce: e.debounce ?? 500,
479
481
  deep: !0
480
482
  });
481
483
  } catch {
482
- if (c) return;
484
+ if (s) return;
483
485
  r.value = !0;
484
486
  }
485
487
  }
486
488
  function u() {
487
489
  i.value && (t.value = i.value.lintTemplate(e.content.value, e.options));
488
490
  }
489
- let f = s(() => e.options, () => {
491
+ let d = c(() => e.options, () => {
490
492
  i.value && u();
491
493
  }, { deep: !0 });
492
- function p(t) {
494
+ function f(t) {
493
495
  t.fix && t.fix.apply({
494
496
  updateBlock: e.updateBlock,
495
497
  updateSettings: e.updateSettings,
496
498
  removeBlock: e.removeBlock
497
499
  });
498
500
  }
499
- function m() {
500
- c = !0, o?.(), f();
501
+ function p() {
502
+ s = !0, o?.(), d();
501
503
  }
502
504
  return {
503
505
  issues: t,
504
506
  ready: n,
505
507
  unavailable: r,
506
- applyFix: p,
507
- destroy: m
508
+ applyFix: f,
509
+ destroy: p
508
510
  };
509
511
  }
510
512
  //#endregion
511
513
  //#region src/utils/blockTypeLabels.ts
512
- function Qt(e, t) {
514
+ function tn(e, t) {
513
515
  return t.blocks[e] ?? e;
514
516
  }
515
517
  //#endregion
516
518
  //#region src/composables/useKeyboardReorder.ts
517
- function $t(e, t) {
518
- let n = h(null), r = h(""), i = null;
519
+ function nn(e, t) {
520
+ let n = _(null), r = _(""), i = null;
519
521
  function a(t) {
520
522
  let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
521
523
  if (r !== -1) return {
@@ -541,7 +543,7 @@ function $t(e, t) {
541
543
  let r = a(n);
542
544
  if (!r) return "";
543
545
  let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
544
- return i ? Qt(i.type, t.t) : "";
546
+ return i ? tn(i.type, t.t) : "";
545
547
  }
546
548
  function s(t, n) {
547
549
  return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
@@ -586,7 +588,7 @@ function $t(e, t) {
586
588
  total: String(r.total)
587
589
  })), n.value = null, i = null;
588
590
  }
589
- function g() {
591
+ function h() {
590
592
  let r = n.value;
591
593
  if (r && i) {
592
594
  let n = a(r), s = !!n && (n.sectionId !== i.sectionId || n.columnIndex !== i.columnIndex), l = !!n && n.index !== i.index;
@@ -602,7 +604,7 @@ function $t(e, t) {
602
604
  announcement: r,
603
605
  isLifted: l,
604
606
  lift: u,
605
- cancel: g,
607
+ cancel: h,
606
608
  moveUp: f,
607
609
  moveDown: p,
608
610
  drop: m
@@ -610,13 +612,13 @@ function $t(e, t) {
610
612
  }
611
613
  //#endregion
612
614
  //#region src/composables/useUiTheme.ts
613
- function en(e) {
614
- let t = Le("(prefers-color-scheme: dark)");
615
- return { resolvedTheme: x(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
615
+ function rn(e) {
616
+ let t = We("(prefers-color-scheme: dark)");
617
+ return { resolvedTheme: j(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
616
618
  }
617
619
  //#endregion
618
620
  //#region src/composables/useThemeStyles.ts
619
- var tn = {
621
+ var an = {
620
622
  bg: "--tpl-bg",
621
623
  bgElevated: "--tpl-bg-elevated",
622
624
  bgHover: "--tpl-bg-hover",
@@ -640,10 +642,10 @@ var tn = {
640
642
  dangerLight: "--tpl-danger-light",
641
643
  canvasBg: "--tpl-canvas-bg"
642
644
  };
643
- function nn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
644
- return { themeStyles: x(() => {
645
+ function on({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
646
+ return { themeStyles: j(() => {
645
647
  let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
646
- if (a) for (let [e, t] of Object.entries(tn)) {
648
+ if (a) for (let [e, t] of Object.entries(an)) {
647
649
  let n = a[e];
648
650
  n && (r[t] = n);
649
651
  }
@@ -652,38 +654,38 @@ function nn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
652
654
  }
653
655
  //#endregion
654
656
  //#region src/utils/logger.ts
655
- var rn = "[Templatical]";
656
- function an() {
657
+ var sn = "[Templatical]";
658
+ function cn() {
657
659
  return typeof process < "u" && process.env.NODE_ENV === "production";
658
660
  }
659
- var on = {
661
+ var ln = {
660
662
  warn(...e) {
661
- console.warn(rn, ...e);
663
+ console.warn(sn, ...e);
662
664
  },
663
665
  error(...e) {
664
- console.error(rn, ...e);
666
+ console.error(sn, ...e);
665
667
  },
666
668
  debug(...e) {
667
- an() || console.debug(rn, ...e);
669
+ cn() || console.debug(sn, ...e);
668
670
  },
669
671
  info(...e) {
670
- an() || console.info(rn, ...e);
672
+ cn() || console.info(sn, ...e);
671
673
  }
672
674
  };
673
675
  //#endregion
674
676
  //#region src/composables/useBlockRegistry.ts
675
- function sn() {
676
- let e = d(/* @__PURE__ */ new Map());
677
+ function un() {
678
+ let e = v(/* @__PURE__ */ new Map());
677
679
  function t(t, n) {
678
- e.value.set(t, n), k(e);
680
+ e.value.set(t, n), ne(e);
679
681
  }
680
682
  function n(t, n) {
681
683
  let r = `custom:${t.type}`, i = {
682
684
  component: n,
683
- createBlock: () => Me(t),
685
+ createBlock: () => Fe(t),
684
686
  definition: t
685
687
  };
686
- e.value.set(r, i), k(e);
688
+ e.value.set(r, i), ne(e);
687
689
  }
688
690
  function r(t) {
689
691
  if (t.type === "custom") {
@@ -706,13 +708,13 @@ function sn() {
706
708
  let t = a(e.customType);
707
709
  if (!t) return o("Block definition not found");
708
710
  try {
709
- let { Liquid: n } = await import("./liquid.browser-CVjP5Mex.js");
711
+ let { Liquid: n } = await import("./liquid.browser-DZLtv26k.js");
710
712
  return await new n({
711
713
  strictVariables: !1,
712
714
  strictFilters: !1
713
715
  }).parseAndRender(t.template, e.fieldValues);
714
716
  } catch (t) {
715
- return on.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
717
+ return ln.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
716
718
  }
717
719
  }
718
720
  function c(t) {
@@ -730,9 +732,9 @@ function sn() {
730
732
  }
731
733
  //#endregion
732
734
  //#region src/composables/useCustomBlockStylesheets.ts
733
- function cn(e, t) {
734
- return x(() => {
735
- let n = ln(e.value.blocks);
735
+ function dn(e, t) {
736
+ return j(() => {
737
+ let n = fn(e.value.blocks);
736
738
  if (n.size === 0) return [];
737
739
  let r = /* @__PURE__ */ new Set(), i = [];
738
740
  for (let e of n) {
@@ -744,81 +746,81 @@ function cn(e, t) {
744
746
  return i;
745
747
  });
746
748
  }
747
- function ln(e) {
749
+ function fn(e) {
748
750
  let t = /* @__PURE__ */ new Set();
749
- return un(e, t), t;
751
+ return pn(e, t), t;
750
752
  }
751
- function un(e, t) {
753
+ function pn(e, t) {
752
754
  for (let n of e) {
753
- if (ue(n)) {
755
+ if (me(n)) {
754
756
  t.add(n.customType);
755
757
  continue;
756
758
  }
757
759
  if (n.type === "section") {
758
760
  let e = n.children;
759
761
  if (!e) continue;
760
- for (let n of e) un(n, t);
762
+ for (let n of e) pn(n, t);
761
763
  }
762
764
  }
763
765
  }
764
766
  //#endregion
765
767
  //#region src/utils/registerBuiltInBlocks.ts
766
- var dn = [
768
+ var mn = [
767
769
  {
768
770
  type: "section",
769
- createBlock: ge
771
+ createBlock: ve
770
772
  },
771
773
  {
772
774
  type: "title",
773
- createBlock: Fe
775
+ createBlock: Re
774
776
  },
775
777
  {
776
778
  type: "paragraph",
777
- createBlock: xe
779
+ createBlock: Ce
778
780
  },
779
781
  {
780
782
  type: "image",
781
- createBlock: Te
783
+ createBlock: Oe
782
784
  },
783
785
  {
784
786
  type: "button",
785
- createBlock: ve
787
+ createBlock: be
786
788
  },
787
789
  {
788
790
  type: "divider",
789
- createBlock: be
791
+ createBlock: Se
790
792
  },
791
793
  {
792
794
  type: "video",
793
- createBlock: he
795
+ createBlock: ge
794
796
  },
795
797
  {
796
798
  type: "social",
797
- createBlock: Ne
799
+ createBlock: Ie
798
800
  },
799
801
  {
800
802
  type: "menu",
801
- createBlock: Se
803
+ createBlock: we
802
804
  },
803
805
  {
804
806
  type: "table",
805
- createBlock: _e
807
+ createBlock: ye
806
808
  },
807
809
  {
808
810
  type: "spacer",
809
- createBlock: Ie
811
+ createBlock: ze
810
812
  },
811
813
  {
812
814
  type: "html",
813
- createBlock: Oe
815
+ createBlock: je
814
816
  },
815
817
  {
816
818
  type: "countdown",
817
- createBlock: we
819
+ createBlock: De
818
820
  }
819
821
  ];
820
- function fn(e, t) {
821
- for (let n of dn) {
822
+ function hn(e, t) {
823
+ for (let n of mn) {
822
824
  let r = t[n.type];
823
825
  r && e.registerBuiltIn(n.type, {
824
826
  component: r,
@@ -828,7 +830,7 @@ function fn(e, t) {
828
830
  }
829
831
  //#endregion
830
832
  //#region src/utils/keyboardShortcuts.ts
831
- function pn(e) {
833
+ function gn(e) {
832
834
  for (let t of e.composedPath()) {
833
835
  if (!(t instanceof HTMLElement)) continue;
834
836
  if (t.isContentEditable) return !0;
@@ -837,14 +839,14 @@ function pn(e) {
837
839
  }
838
840
  return !1;
839
841
  }
840
- function mn(e, t) {
842
+ function _n(e, t) {
841
843
  let n = e.metaKey || e.ctrlKey;
842
844
  if (n && e.key.toLowerCase() === "s") {
843
845
  e.preventDefault(), t.onSave?.();
844
846
  return;
845
847
  }
846
848
  if (n && e.key.toLowerCase() === "z") {
847
- if (pn(e)) return;
849
+ if (gn(e)) return;
848
850
  e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
849
851
  return;
850
852
  }
@@ -852,42 +854,82 @@ function mn(e, t) {
852
854
  t.selectBlock(null);
853
855
  return;
854
856
  }
855
- (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !pn(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
857
+ (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !gn(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
856
858
  }
857
859
  //#endregion
858
- //#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
859
- var hn = { class: "tpl:text-center" }, gn = ["href"], _n = /* @__PURE__ */ y({
860
+ //#region src/utils/mergeTagLabelSegments.ts
861
+ function vn(e, t, n) {
862
+ if (!e) return [];
863
+ let r = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), i = [], a = 0, o;
864
+ for (; (o = r.exec(e)) !== null;) {
865
+ o.index > a && i.push({
866
+ type: "text",
867
+ value: e.slice(a, o.index)
868
+ });
869
+ let r = o[0];
870
+ le(r, n) ? i.push({
871
+ type: "tag",
872
+ value: _e(r, t)
873
+ }) : Ee(r, n) ? i.push({
874
+ type: "tag",
875
+ value: Le(r, n)
876
+ }) : i.push({
877
+ type: "text",
878
+ value: r
879
+ }), a = o.index + r.length;
880
+ }
881
+ return a < e.length && i.push({
882
+ type: "text",
883
+ value: e.slice(a)
884
+ }), i;
885
+ }
886
+ //#endregion
887
+ //#region src/components/MergeTagPreviewText.vue
888
+ var yn = y({
889
+ name: "MergeTagPreviewText",
890
+ props: { text: {
891
+ type: String,
892
+ required: !0
893
+ } },
894
+ setup(e) {
895
+ let t = N(it, []), n = N(at, Me.liquid), r = j(() => vn(e.text, t, n));
896
+ return () => r.value.map((e, t) => e.type === "tag" ? ae("span", {
897
+ key: t,
898
+ class: "tpl-merge-tag-label"
899
+ }, e.value) : e.value);
900
+ }
901
+ }), bn = { class: "tpl:text-center" }, xn = ["href"], Sn = /* @__PURE__ */ y({
860
902
  __name: "ButtonBlock",
861
903
  props: {
862
904
  block: {},
863
905
  viewport: {}
864
906
  },
865
- setup(t) {
866
- let n = t, r = x(() => {
907
+ setup(e) {
908
+ let t = e, n = j(() => {
867
909
  let e = {
868
910
  display: "inline-block",
869
- padding: `${n.block.buttonPadding.top}px ${n.block.buttonPadding.right}px ${n.block.buttonPadding.bottom}px ${n.block.buttonPadding.left}px`,
870
- backgroundColor: n.block.backgroundColor,
871
- color: n.block.textColor,
872
- fontSize: `${n.block.fontSize}px`,
911
+ padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
912
+ backgroundColor: t.block.backgroundColor,
913
+ color: t.block.textColor,
914
+ fontSize: `${t.block.fontSize}px`,
873
915
  fontWeight: "bold",
874
916
  textDecoration: "none",
875
- borderRadius: `${n.block.borderRadius}px`,
917
+ borderRadius: `${t.block.borderRadius}px`,
876
918
  textAlign: "center"
877
919
  };
878
- return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), n.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof n.block.width == "number" && (e.width = `${n.block.width}px`, e.boxSizing = "border-box"), e;
920
+ return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
879
921
  });
880
- return (n, i) => (e(), w("div", hn, [C("a", {
881
- href: t.block.url || "#",
882
- style: A(r.value),
922
+ return (t, r) => (f(), x("div", bn, [b("a", {
923
+ href: e.block.url || "#",
924
+ style: i(n.value),
883
925
  class: "tpl:cursor-default",
884
- onClick: i[0] ||= b(() => {}, ["prevent"])
885
- }, N(t.block.text), 13, gn)]));
926
+ onClick: r[0] ||= P(() => {}, ["prevent"])
927
+ }, [w(yn, { text: e.block.text }, null, 8, ["text"])], 12, xn)]));
886
928
  }
887
- }), vn = I("bookmark", [["path", {
929
+ }), Cn = F("bookmark", [["path", {
888
930
  d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
889
931
  key: "oz39mx"
890
- }]]), yn = I("box", [
932
+ }]]), wn = F("box", [
891
933
  ["path", {
892
934
  d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
893
935
  key: "hh9hay"
@@ -900,13 +942,13 @@ var hn = { class: "tpl:text-center" }, gn = ["href"], _n = /* @__PURE__ */ y({
900
942
  d: "M12 22V12",
901
943
  key: "d0xqtd"
902
944
  }]
903
- ]), bn = I("code", [["path", {
945
+ ]), Tn = F("code", [["path", {
904
946
  d: "m16 18 6-6-6-6",
905
947
  key: "eg8j8"
906
948
  }], ["path", {
907
949
  d: "m8 6-6 6 6 6",
908
950
  key: "ppft3o"
909
- }]]), xn = I("copy", [["rect", {
951
+ }]]), En = F("copy", [["rect", {
910
952
  width: "14",
911
953
  height: "14",
912
954
  x: "8",
@@ -917,7 +959,7 @@ var hn = { class: "tpl:text-center" }, gn = ["href"], _n = /* @__PURE__ */ y({
917
959
  }], ["path", {
918
960
  d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
919
961
  key: "zix9uf"
920
- }]]), Sn = I("eye-off", [
962
+ }]]), Dn = F("eye-off", [
921
963
  ["path", {
922
964
  d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
923
965
  key: "ct8e1f"
@@ -934,10 +976,10 @@ var hn = { class: "tpl:text-center" }, gn = ["href"], _n = /* @__PURE__ */ y({
934
976
  d: "m2 2 20 20",
935
977
  key: "1ooewy"
936
978
  }]
937
- ]), Cn = I("funnel", [["path", {
979
+ ]), On = F("funnel", [["path", {
938
980
  d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
939
981
  key: "sc7q7i"
940
- }]]), wn = I("grip-vertical", [
982
+ }]]), kn = F("grip-vertical", [
941
983
  ["circle", {
942
984
  cx: "9",
943
985
  cy: "12",
@@ -974,7 +1016,7 @@ var hn = { class: "tpl:text-center" }, gn = ["href"], _n = /* @__PURE__ */ y({
974
1016
  r: "1",
975
1017
  key: "f4zoj3"
976
1018
  }]
977
- ]), Tn = I("image", [
1019
+ ]), An = F("image", [
978
1020
  ["rect", {
979
1021
  width: "18",
980
1022
  height: "18",
@@ -994,13 +1036,13 @@ var hn = { class: "tpl:text-center" }, gn = ["href"], _n = /* @__PURE__ */ y({
994
1036
  d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
995
1037
  key: "1xmnt7"
996
1038
  }]
997
- ]), En = I("navigation", [["polygon", {
1039
+ ]), jn = F("navigation", [["polygon", {
998
1040
  points: "3 11 22 2 13 21 11 13 3 11",
999
1041
  key: "1ltx0t"
1000
- }]]), Dn = I("puzzle", [["path", {
1042
+ }]]), Mn = F("puzzle", [["path", {
1001
1043
  d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
1002
1044
  key: "w46dr5"
1003
- }]]), On = I("share-2", [
1045
+ }]]), Nn = F("share-2", [
1004
1046
  ["circle", {
1005
1047
  cx: "18",
1006
1048
  cy: "5",
@@ -1033,7 +1075,7 @@ var hn = { class: "tpl:text-center" }, gn = ["href"], _n = /* @__PURE__ */ y({
1033
1075
  y2: "10.49",
1034
1076
  key: "1n3mei"
1035
1077
  }]
1036
- ]), kn = I("table", [
1078
+ ]), Pn = F("table", [
1037
1079
  ["path", {
1038
1080
  d: "M12 3v18",
1039
1081
  key: "108xh3"
@@ -1054,7 +1096,7 @@ var hn = { class: "tpl:text-center" }, gn = ["href"], _n = /* @__PURE__ */ y({
1054
1096
  d: "M3 15h18",
1055
1097
  key: "5xshup"
1056
1098
  }]
1057
- ]), An = I("video", [["path", {
1099
+ ]), Fn = F("video", [["path", {
1058
1100
  d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
1059
1101
  key: "ftymec"
1060
1102
  }], ["rect", {
@@ -1064,54 +1106,54 @@ var hn = { class: "tpl:text-center" }, gn = ["href"], _n = /* @__PURE__ */ y({
1064
1106
  height: "12",
1065
1107
  rx: "2",
1066
1108
  key: "158x01"
1067
- }]]), jn = ["innerHTML"], Mn = [
1109
+ }]]), In = ["innerHTML"], Ln = [
1068
1110
  "src",
1069
1111
  "width",
1070
1112
  "height"
1071
- ], Nn = /* @__PURE__ */ y({
1113
+ ], Rn = /* @__PURE__ */ y({
1072
1114
  __name: "CustomBlockIcon",
1073
1115
  props: {
1074
1116
  icon: {},
1075
1117
  size: {}
1076
1118
  },
1077
- setup(t) {
1078
- let n = t, r = x(() => n.size ?? 20), i = x(() => n.icon && (n.icon.trimStart().startsWith("<svg") || n.icon.trimStart().startsWith("<SVG"))), a = x(() => n.icon && !i.value && (n.icon.startsWith("http") || n.icon.startsWith("/")));
1079
- return (n, o) => i.value ? (e(), w("span", {
1119
+ setup(e) {
1120
+ let t = e, n = j(() => t.size ?? 20), r = j(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), a = j(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
1121
+ return (t, o) => r.value ? (f(), x("span", {
1080
1122
  key: 0,
1081
1123
  class: "tpl:inline-flex tpl:items-center tpl:justify-center",
1082
- style: A({
1083
- width: `${r.value}px`,
1084
- height: `${r.value}px`
1124
+ style: i({
1125
+ width: `${n.value}px`,
1126
+ height: `${n.value}px`
1085
1127
  }),
1086
- innerHTML: t.icon
1087
- }, null, 12, jn)) : a.value ? (e(), w("img", {
1128
+ innerHTML: e.icon
1129
+ }, null, 12, In)) : a.value ? (f(), x("img", {
1088
1130
  key: 1,
1089
- src: t.icon,
1090
- width: r.value,
1091
- height: r.value,
1131
+ src: e.icon,
1132
+ width: n.value,
1133
+ height: n.value,
1092
1134
  class: "tpl:inline-block",
1093
1135
  alt: ""
1094
- }, null, 8, Mn)) : (e(), j(M(yn), {
1136
+ }, null, 8, Ln)) : (f(), D(k(wn), {
1095
1137
  key: 2,
1096
- size: r.value,
1138
+ size: n.value,
1097
1139
  "stroke-width": 1.5
1098
1140
  }, null, 8, ["size"]));
1099
1141
  }
1100
1142
  });
1101
1143
  //#endregion
1102
1144
  //#region src/composables/useEditorRoot.ts
1103
- function Pn() {
1104
- return F(lt, document) ?? document;
1145
+ function zn() {
1146
+ return N(ft, document) ?? document;
1105
1147
  }
1106
1148
  //#endregion
1107
1149
  //#region src/composables/useFocusTrap.ts
1108
- var Fn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1109
- function In(e, t) {
1110
- let n = Pn(), r = null, i = null, a = null;
1150
+ var Bn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1151
+ function Vn(e, t) {
1152
+ let n = zn(), r = null, i = null, a = null;
1111
1153
  function o() {
1112
- return e.value ? Array.from(e.value.querySelectorAll(Fn)).filter((e) => e.offsetParent !== null) : [];
1154
+ return e.value ? Array.from(e.value.querySelectorAll(Bn)).filter((e) => e.offsetParent !== null) : [];
1113
1155
  }
1114
- function c(e) {
1156
+ function s(e) {
1115
1157
  if (e.key !== "Tab") return;
1116
1158
  let t = o();
1117
1159
  if (t.length === 0) return;
@@ -1120,30 +1162,30 @@ function In(e, t) {
1120
1162
  }
1121
1163
  function l() {
1122
1164
  let t = i !== null || a !== null;
1123
- t && u({ restoreFocus: !1 }), t || (r = n.activeElement), a = requestAnimationFrame(() => {
1165
+ t && d({ restoreFocus: !1 }), t || (r = n.activeElement), a = requestAnimationFrame(() => {
1124
1166
  a = null;
1125
1167
  let t = o();
1126
1168
  t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
1127
- }), i = ze(e, "keydown", c);
1169
+ }), i = Ge(e, "keydown", s);
1128
1170
  }
1129
- function u(e = {}) {
1171
+ function d(e = {}) {
1130
1172
  let t = e.restoreFocus !== !1;
1131
1173
  a !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(a), a = null), i?.(), i = null, t && r && r.focus && (r.focus(), r = null);
1132
1174
  }
1133
- let d = s([t, e], ([e, t]) => {
1134
- e && t ? l() : u();
1175
+ let f = c([t, e], ([e, t]) => {
1176
+ e && t ? l() : d();
1135
1177
  }, { flush: "post" });
1136
- ne(() => {
1137
- d(), u();
1178
+ u(() => {
1179
+ f(), d();
1138
1180
  });
1139
1181
  }
1140
1182
  //#endregion
1141
1183
  //#region src/composables/useEmoji.ts
1142
- function Ln() {
1143
- let [e, t] = We(!1), n = d([]), r = !1;
1144
- ne(() => {
1184
+ function Hn() {
1185
+ let [e, t] = He(!1), n = v([]), r = !1;
1186
+ u(() => {
1145
1187
  r = !0;
1146
- }), s(e, async (e) => {
1188
+ }), c(e, async (e) => {
1147
1189
  if (e && n.value.length === 0) {
1148
1190
  let { emojiCategories: e } = await import("./emojiData-6m0DBh7O.js");
1149
1191
  if (r) return;
@@ -1165,8 +1207,8 @@ function Ln() {
1165
1207
  }
1166
1208
  //#endregion
1167
1209
  //#region src/composables/useDragDrop.ts
1168
- function Rn(e) {
1169
- let { onBlockMove: t, onBlockAdd: n } = e, r = h(!1), i = h(null), a = h(null);
1210
+ function Un(e) {
1211
+ let { onBlockMove: t, onBlockAdd: n } = e, r = _(!1), i = _(null), a = _(null);
1170
1212
  function o(e) {
1171
1213
  r.value = !0, i.value = e;
1172
1214
  }
@@ -1215,7 +1257,7 @@ function Rn(e) {
1215
1257
  }
1216
1258
  //#endregion
1217
1259
  //#region src/composables/useFonts.ts
1218
- var zn = [
1260
+ var Wn = [
1219
1261
  {
1220
1262
  value: "Arial",
1221
1263
  label: "Arial"
@@ -1244,7 +1286,7 @@ var zn = [
1244
1286
  value: "Courier New",
1245
1287
  label: "Courier New"
1246
1288
  }
1247
- ], Bn = {
1289
+ ], Gn = {
1248
1290
  arial: "Arial, sans-serif",
1249
1291
  helvetica: "Helvetica, sans-serif",
1250
1292
  georgia: "Georgia, serif",
@@ -1252,14 +1294,14 @@ var zn = [
1252
1294
  verdana: "Verdana, sans-serif",
1253
1295
  "trebuchet ms": "'Trebuchet MS', sans-serif",
1254
1296
  "courier new": "'Courier New', monospace"
1255
- }, Vn = "Arial, sans-serif";
1256
- function Hn(e) {
1257
- let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ?? Vn);
1297
+ }, Kn = "Arial, sans-serif";
1298
+ function qn(e) {
1299
+ let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i = j(() => e?.defaultFallback ?? Kn);
1258
1300
  function a(e) {
1259
1301
  n.value = e;
1260
1302
  }
1261
- let o = x(() => {
1262
- let e = [...zn];
1303
+ let o = j(() => {
1304
+ let e = [...Wn];
1263
1305
  if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
1264
1306
  let r = t.value.map((e) => ({
1265
1307
  value: e.name,
@@ -1268,75 +1310,75 @@ function Hn(e) {
1268
1310
  })), i = [...e, ...r];
1269
1311
  return i.sort((e, t) => e.label.localeCompare(t.label)), i;
1270
1312
  });
1271
- function s(e) {
1313
+ function c(e) {
1272
1314
  return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1273
1315
  }
1274
- function c(e) {
1275
- return zn.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1316
+ function l(e) {
1317
+ return Wn.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1276
1318
  }
1277
- function l() {
1319
+ function d() {
1278
1320
  if (e?.defaultFont) {
1279
- if (!n.value && !c(e.defaultFont)) return Vn;
1280
- if (s(e.defaultFont)) {
1321
+ if (!n.value && !l(e.defaultFont)) return Kn;
1322
+ if (c(e.defaultFont)) {
1281
1323
  let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
1282
1324
  if (t) return t.value;
1283
1325
  }
1284
1326
  }
1285
- return Vn;
1327
+ return Kn;
1286
1328
  }
1287
- let u = x(() => l());
1288
- function d(e) {
1329
+ let f = j(() => d());
1330
+ function p(e) {
1289
1331
  if (!e) return i.value;
1290
1332
  let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
1291
1333
  if (n) {
1292
1334
  let e = n.fallback ?? i.value;
1293
1335
  return `'${n.name}', ${e}`;
1294
1336
  }
1295
- return Bn[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
1337
+ return Gn[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
1296
1338
  }
1297
- let f = [], m = !1;
1339
+ let m = [], h = !1;
1298
1340
  async function g() {
1299
1341
  if (t.value.length === 0) {
1300
- m || (r.value = !0);
1342
+ h || (r.value = !0);
1301
1343
  return;
1302
1344
  }
1303
1345
  let e = t.value.map(async (e) => {
1304
1346
  try {
1305
1347
  if (document.querySelector(`link[data-custom-font="${CSS.escape(e.name)}"]`)) return;
1306
1348
  let t = document.createElement("link");
1307
- t.rel = "stylesheet", t.href = e.url, t.setAttribute("data-custom-font", e.name), f.push(t), await new Promise((n, r) => {
1349
+ t.rel = "stylesheet", t.href = e.url, t.setAttribute("data-custom-font", e.name), m.push(t), await new Promise((n, r) => {
1308
1350
  t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
1309
1351
  });
1310
1352
  } catch (t) {
1311
- on.warn(`Failed to load custom font "${e.name}":`, t);
1353
+ ln.warn(`Failed to load custom font "${e.name}":`, t);
1312
1354
  }
1313
1355
  });
1314
- await Promise.allSettled(e), !m && (r.value = !0);
1356
+ await Promise.allSettled(e), !h && (r.value = !0);
1315
1357
  }
1316
- function _() {
1317
- for (let e of f) e.remove();
1318
- f.length = 0;
1358
+ function v() {
1359
+ for (let e of m) e.remove();
1360
+ m.length = 0;
1319
1361
  }
1320
- return p() && ne(() => {
1321
- m = !0, _();
1362
+ return s() && u(() => {
1363
+ h = !0, v();
1322
1364
  }), {
1323
1365
  fonts: o,
1324
- defaultFont: u,
1366
+ defaultFont: f,
1325
1367
  defaultFallback: i,
1326
1368
  customFonts: t,
1327
1369
  customFontsEnabled: n,
1328
1370
  isLoaded: r,
1329
1371
  setCustomFontsEnabled: a,
1330
1372
  loadCustomFonts: g,
1331
- cleanupFontLinks: _,
1332
- getFontWithFallback: d,
1333
- getDefaultFont: l
1373
+ cleanupFontLinks: v,
1374
+ getFontWithFallback: p,
1375
+ getDefaultFont: d
1334
1376
  };
1335
1377
  }
1336
1378
  //#endregion
1337
1379
  //#region src/composables/useLogicTag.ts
1338
- function Un() {
1339
- let e = F(at, []), t = F(xt, []), n = F(nt, ke.liquid), r = F(Je, null), i = F(bt, null), a = h(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
1380
+ function Jn() {
1381
+ let e = N(ct, []), t = N(wt, []), n = N(at, Me.liquid), r = N(Ze, null), i = N(Ct, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
1340
1382
  async function c() {
1341
1383
  if (r) {
1342
1384
  a.value = !0;
@@ -1367,12 +1409,12 @@ function Un() {
1367
1409
  }
1368
1410
  //#endregion
1369
1411
  //#region src/utils/mergeTagNodeSpec.ts
1370
- function Wn(e, t, n) {
1371
- return me(e, n) ? {
1412
+ function Yn(e, t, n) {
1413
+ return Ee(e, n) ? {
1372
1414
  type: "logicMergeTagNode",
1373
1415
  attrs: {
1374
1416
  value: e,
1375
- keyword: Pe(e, n)
1417
+ keyword: Le(e, n)
1376
1418
  }
1377
1419
  } : {
1378
1420
  type: "mergeTagNode",
@@ -1384,15 +1426,15 @@ function Wn(e, t, n) {
1384
1426
  }
1385
1427
  //#endregion
1386
1428
  //#region src/utils/insertLogicTag.ts
1387
- function Gn(e) {
1429
+ function Xn(e) {
1388
1430
  return "before" in e && "after" in e;
1389
1431
  }
1390
- function Kn(e, t, n) {
1391
- if (!Gn(t)) {
1392
- e.chain().focus().insertContent(Wn(t.value, t.label, n)).run();
1432
+ function Zn(e, t, n) {
1433
+ if (!Xn(t)) {
1434
+ e.chain().focus().insertContent(Yn(t.value, t.label, n)).run();
1393
1435
  return;
1394
1436
  }
1395
- let r = Wn(t.before, t.label, n), i = Wn(t.after, t.label, n), { from: a, to: o } = e.state.selection;
1437
+ let r = Yn(t.before, t.label, n), i = Yn(t.after, t.label, n), { from: a, to: o } = e.state.selection;
1396
1438
  if (a !== o) {
1397
1439
  e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
1398
1440
  return;
@@ -1401,9 +1443,9 @@ function Kn(e, t, n) {
1401
1443
  }
1402
1444
  //#endregion
1403
1445
  //#region src/composables/useRichTextLinkDialog.ts
1404
- function qn(e) {
1405
- let t = h(!1), n = h(""), r = h(null);
1406
- In(r, t);
1446
+ function Qn(e) {
1447
+ let t = _(!1), n = _(""), r = _(null);
1448
+ Vn(r, t);
1407
1449
  function i() {
1408
1450
  let r = e.value?.getAttributes("link").href || "";
1409
1451
  n.value = r, t.value = !0;
@@ -1455,24 +1497,24 @@ function qn(e) {
1455
1497
  }
1456
1498
  //#endregion
1457
1499
  //#region src/composables/useRichTextEditor.ts
1458
- function Jn(e) {
1459
- let t = F(ft, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = At(), { canInsertLogicTag: f, isRequesting: p, requestLogicTag: m } = Un(), g = F(Ye, null), _ = (a(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", v = de(l), y = d(null), { showLinkDialog: b, linkUrl: x, linkDialogRef: S, openLinkDialog: C, insertLink: w, removeLink: T, closeLinkDialog: E, handleLinkKeydown: ee } = qn(y), { start: D, stop: O } = Be(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), k = d(null), te = h(!0), A = h(null), j = !1;
1500
+ function $n(e) {
1501
+ let t = N(ht, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: i, requestMergeTag: a, syntax: o, autocomplete: s } = Nt(), { canInsertLogicTag: l, isRequesting: u, requestLogicTag: d } = Jn(), f = N(Qe, null), p = (g(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = de(o), y = v(null), { showLinkDialog: b, linkUrl: x, linkDialogRef: S, openLinkDialog: C, insertLink: w, removeLink: T, closeLinkDialog: E, handleLinkKeydown: D } = Qn(y), { start: O, stop: k } = Ue(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), ee = v(null), A = _(!0), te = _(null), j = !1;
1460
1502
  async function ne() {
1461
- A.value = null, te.value = !0;
1503
+ te.value = null, A.value = !0;
1462
1504
  try {
1463
- let { TiptapEditor: n, EC: i, extensions: a } = await e.loadExtensions({
1464
- mergeTags: r,
1465
- syntax: l,
1466
- triggerChar: v,
1467
- autocompleteEnabled: u,
1468
- suggestionEmptyText: _
1505
+ let { TiptapEditor: r, EC: i, extensions: a } = await e.loadExtensions({
1506
+ mergeTags: n,
1507
+ syntax: o,
1508
+ triggerChar: m,
1509
+ autocompleteEnabled: s,
1510
+ suggestionEmptyText: p
1469
1511
  });
1470
1512
  if (j) return;
1471
- k.value = i;
1472
- let o = /* @__PURE__ */ new Map();
1473
- a.forEach((e, t) => o.set(e.name, t));
1474
- let s = new n({
1475
- extensions: a.filter((e, t) => o.get(e.name) === t),
1513
+ ee.value = i;
1514
+ let c = /* @__PURE__ */ new Map();
1515
+ a.forEach((e, t) => c.set(e.name, t));
1516
+ let l = new r({
1517
+ extensions: a.filter((e, t) => c.get(e.name) === t),
1476
1518
  content: e.blockContent(),
1477
1519
  editable: !0,
1478
1520
  onUpdate: ({ editor: n }) => {
@@ -1480,103 +1522,103 @@ function Jn(e) {
1480
1522
  }
1481
1523
  });
1482
1524
  if (j) {
1483
- s.destroy();
1525
+ l.destroy();
1484
1526
  return;
1485
1527
  }
1486
- y.value = s, te.value = !1, D();
1528
+ y.value = l, A.value = !1, O();
1487
1529
  } catch (t) {
1488
1530
  if (j) return;
1489
- on.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), A.value = t instanceof Error ? t.message : "Failed to load editor", te.value = !1;
1531
+ ln.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), te.value = t instanceof Error ? t.message : "Failed to load editor", A.value = !1;
1490
1532
  }
1491
1533
  }
1492
1534
  function M() {
1493
1535
  y.value?.destroy(), y.value = null, ne();
1494
1536
  }
1495
1537
  ne();
1496
- let re = s(() => e.blockContent(), (e) => {
1538
+ let re = c(() => e.blockContent(), (e) => {
1497
1539
  y.value && y.value.getHTML() !== e && y.value.commands.setContent(e, { emitUpdate: !1 });
1498
1540
  });
1499
- function N(t) {
1500
- if (o.value || p.value) return;
1541
+ function ie(t) {
1542
+ if (i.value || u.value) return;
1501
1543
  let n = t.composedPath().find((e) => e instanceof HTMLElement);
1502
1544
  n && (e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone());
1503
1545
  }
1504
- ze(document, "mousedown", N), n(() => {
1505
- j = !0, re(), O(), y.value?.destroy();
1546
+ Ge(document, "mousedown", ie), h(() => {
1547
+ j = !0, re(), k(), y.value?.destroy();
1506
1548
  });
1507
- async function ie() {
1508
- let e = await c();
1549
+ async function ae() {
1550
+ let e = await a();
1509
1551
  j || (e && y.value ? y.value.chain().focus().insertMergeTag({
1510
1552
  label: e.label,
1511
1553
  value: e.value
1512
1554
  }).run() : y.value?.commands.focus());
1513
1555
  }
1514
- async function P() {
1515
- let e = await m();
1516
- j || (e && y.value ? Kn(y.value, e, l) : y.value?.commands.focus());
1556
+ async function oe() {
1557
+ let e = await d();
1558
+ j || (e && y.value ? Zn(y.value, e, o) : y.value?.commands.focus());
1517
1559
  }
1518
1560
  return {
1519
1561
  editor: y,
1520
- EditorContent: k,
1521
- isLoading: te,
1522
- initError: A,
1562
+ EditorContent: ee,
1563
+ isLoading: A,
1564
+ initError: te,
1523
1565
  retry: M,
1524
1566
  showLinkDialog: b,
1525
1567
  linkUrl: x,
1526
1568
  linkDialogRef: S,
1527
- mergeTags: r,
1528
- canRequestMergeTag: i,
1529
- isRequestingMergeTag: o,
1530
- syntax: l,
1531
- canInsertLogicTag: f,
1532
- isRequestingLogicTag: p,
1569
+ mergeTags: n,
1570
+ canRequestMergeTag: r,
1571
+ isRequestingMergeTag: i,
1572
+ syntax: o,
1573
+ canInsertLogicTag: l,
1574
+ isRequestingLogicTag: u,
1533
1575
  openLinkDialog: C,
1534
1576
  insertLink: w,
1535
1577
  removeLink: T,
1536
1578
  closeLinkDialog: E,
1537
- handleLinkKeydown: ee,
1538
- handleAddMergeTag: ie,
1539
- handleAddLogicTag: P
1579
+ handleLinkKeydown: D,
1580
+ handleAddMergeTag: ae,
1581
+ handleAddLogicTag: oe
1540
1582
  };
1541
1583
  }
1542
1584
  //#endregion
1543
1585
  //#region src/composables/useSmallScreenNotice.ts
1544
- var Yn = "(max-width: 767px)";
1545
- function Xn(e) {
1546
- let t = Le(Yn);
1586
+ var er = "(max-width: 767px)";
1587
+ function tr(e) {
1588
+ let t = We(er);
1547
1589
  return {
1548
1590
  isSmallScreen: t,
1549
- showNotice: x(() => (ie(e) ?? !0) && t.value)
1591
+ showNotice: j(() => (S(e) ?? !0) && t.value)
1550
1592
  };
1551
1593
  }
1552
1594
  //#endregion
1553
1595
  //#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
1554
- var Zn = { class: "tpl:w-full" }, Qn = {
1596
+ var nr = { class: "tpl:w-full" }, rr = {
1555
1597
  key: 0,
1556
1598
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
1557
- }, $n = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, er = {
1599
+ }, ir = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ar = {
1558
1600
  key: 1,
1559
1601
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
1560
- }, tr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, nr = {
1602
+ }, or = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, sr = {
1561
1603
  key: 2,
1562
1604
  class: "tpl:relative"
1563
- }, rr = ["innerHTML"], ir = {
1605
+ }, cr = ["innerHTML"], lr = {
1564
1606
  key: 0,
1565
1607
  class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
1566
1608
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
1567
- }, ar = /* @__PURE__ */ y({
1609
+ }, ur = /* @__PURE__ */ y({
1568
1610
  __name: "CustomBlock",
1569
1611
  props: {
1570
1612
  block: {},
1571
1613
  viewport: {}
1572
1614
  },
1573
1615
  emits: ["fetchData"],
1574
- setup(t, { emit: n }) {
1575
- let r = t, i = n, { t: a } = St(), o = F(mt, null), c = h(""), l = h(!1), d = x(() => o?.getDefinition(r.block.customType)), f = x(() => !!d.value), { isFetching: p, fetch: m, needsFetch: g, hasDataSource: v } = Ht({
1576
- definition: d,
1577
- block: x(() => r.block),
1616
+ setup(e, { emit: t }) {
1617
+ let n = e, r = t, { t: i } = Tt(), o = N(_t, null), s = _(""), l = _(!1), u = j(() => o?.getDefinition(n.block.customType)), d = j(() => !!u.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: v } = Gt({
1618
+ definition: u,
1619
+ block: j(() => n.block),
1578
1620
  onUpdate: (e, t) => {
1579
- i("fetchData", {
1621
+ r("fetchData", {
1580
1622
  fieldValues: e,
1581
1623
  dataSourceFetched: t
1582
1624
  });
@@ -1586,118 +1628,118 @@ var Zn = { class: "tpl:w-full" }, Qn = {
1586
1628
  if (o) {
1587
1629
  l.value = !1;
1588
1630
  try {
1589
- let e = await o.renderCustomBlock(r.block);
1590
- e.includes("Template render error:") && (l.value = !0), c.value = e;
1631
+ let e = await o.renderCustomBlock(n.block);
1632
+ e.includes("Template render error:") && (l.value = !0), s.value = e;
1591
1633
  } catch {
1592
- l.value = !0, c.value = "";
1634
+ l.value = !0, s.value = "";
1593
1635
  }
1594
1636
  }
1595
1637
  }
1596
- let S = Ue(y, 150);
1597
- return u(() => {
1638
+ let S = Be(y, 150);
1639
+ return a(() => {
1598
1640
  y();
1599
- }), s(() => r.block.fieldValues, () => {
1641
+ }), c(() => n.block.fieldValues, () => {
1600
1642
  S();
1601
- }, { deep: !0 }), (t, n) => (e(), w("div", Zn, [f.value ? l.value ? (e(), w("div", er, [P(M(Et), {
1643
+ }, { deep: !0 }), (e, t) => (f(), x("div", nr, [d.value ? l.value ? (f(), x("div", ar, [w(k(kt), {
1602
1644
  size: 24,
1603
1645
  class: "tpl:text-[var(--tpl-danger)]"
1604
- }), C("span", tr, N(M(a).customBlocks.renderError), 1)])) : (e(), w("div", nr, [C("div", { innerHTML: c.value }, null, 8, rr), M(v) && M(g) ? (e(), w("div", ir, [M(p) ? (e(), j(Ot, {
1646
+ }), b("span", or, p(k(i).customBlocks.renderError), 1)])) : (f(), x("div", sr, [b("div", { innerHTML: s.value }, null, 8, cr), k(v) && k(g) ? (f(), x("div", lr, [k(m) ? (f(), D(jt, {
1605
1647
  key: 1,
1606
1648
  class: "tpl:w-48"
1607
- })) : (e(), w("button", {
1649
+ })) : (f(), x("button", {
1608
1650
  key: 0,
1609
1651
  type: "button",
1610
1652
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
1611
- onClick: n[0] ||= b((...e) => M(m) && M(m)(...e), ["stop"])
1612
- }, [d.value?.icon ? (e(), j(Nn, {
1653
+ onClick: t[0] ||= P((...e) => k(h) && k(h)(...e), ["stop"])
1654
+ }, [u.value?.icon ? (f(), D(Rn, {
1613
1655
  key: 0,
1614
- icon: d.value.icon,
1656
+ icon: u.value.icon,
1615
1657
  size: 16
1616
- }, null, 8, ["icon"])) : O("", !0), _(" " + N(d.value?.dataSource?.label || M(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div", Qn, [P(M(Dn), {
1658
+ }, null, 8, ["icon"])) : M("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : M("", !0)])) : (f(), x("div", rr, [w(k(Mn), {
1617
1659
  size: 24,
1618
1660
  class: "tpl:text-[var(--tpl-warning)]"
1619
- }), C("span", $n, N(M(a).customBlocks.definitionNotFound), 1)]))]));
1661
+ }), b("span", ir, p(k(i).customBlocks.definitionNotFound), 1)]))]));
1620
1662
  }
1621
- }), or = { class: "tpl:w-full" }, sr = /* @__PURE__ */ y({
1663
+ }), dr = { class: "tpl:w-full" }, fr = /* @__PURE__ */ y({
1622
1664
  __name: "DividerBlock",
1623
1665
  props: {
1624
1666
  block: {},
1625
1667
  viewport: {}
1626
1668
  },
1627
- setup(t) {
1628
- let n = t, r = x(() => ({
1629
- borderTop: `${n.block.thickness}px ${n.block.lineStyle} ${n.block.color}`,
1630
- width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
1631
- margin: n.block.width === "full" ? "0" : "0 auto"
1669
+ setup(e) {
1670
+ let t = e, n = j(() => ({
1671
+ borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
1672
+ width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
1673
+ margin: t.block.width === "full" ? "0" : "0 auto"
1632
1674
  }));
1633
- return (t, n) => (e(), w("div", or, [C("hr", {
1675
+ return (e, t) => (f(), x("div", dr, [b("hr", {
1634
1676
  class: "tpl:m-0 tpl:border-none",
1635
- style: A(r.value)
1677
+ style: i(n.value)
1636
1678
  }, null, 4)]));
1637
1679
  }
1638
- }), cr = { class: "tpl:w-full" }, lr = { class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]" }, ur = {
1680
+ }), pr = { class: "tpl:w-full" }, mr = { class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]" }, hr = {
1639
1681
  key: 0,
1640
1682
  class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
1641
- }, dr = {
1683
+ }, gr = {
1642
1684
  key: 1,
1643
1685
  class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
1644
- }, fr = /* @__PURE__ */ y({
1686
+ }, _r = /* @__PURE__ */ y({
1645
1687
  __name: "HtmlBlock",
1646
1688
  props: {
1647
1689
  block: {},
1648
1690
  viewport: {}
1649
1691
  },
1650
- setup(t) {
1651
- let n = t, { t: r } = St(), i = x(() => n.block.content.trim().length > 0);
1652
- return (t, n) => (e(), w("div", cr, [C("div", lr, [P(M(bn), {
1692
+ setup(e) {
1693
+ let t = e, { t: n } = Tt(), r = j(() => t.block.content.trim().length > 0);
1694
+ return (e, t) => (f(), x("div", pr, [b("div", mr, [w(k(Tn), {
1653
1695
  size: 24,
1654
1696
  class: "tpl:text-[var(--tpl-text-dim)]"
1655
- }), i.value ? (e(), w("span", ur, N(M(r).html.preview), 1)) : (e(), w("span", dr, N(M(r).html.empty), 1))])]));
1697
+ }), r.value ? (f(), x("span", hr, p(k(n).html.preview), 1)) : (f(), x("span", gr, p(k(n).html.empty), 1))])]));
1656
1698
  }
1657
- }), pr = "image/";
1658
- function mr(e) {
1659
- let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 ? !0 : ie(r), { isOverDropZone: a } = Ve(t, {
1699
+ }), vr = "image/";
1700
+ function yr(e) {
1701
+ let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } = Ke(t, {
1660
1702
  preventDefaultForUnhandled: !0,
1661
1703
  onDrop: (e) => {
1662
1704
  if (!i()) return;
1663
- let t = (e ?? []).filter((e) => e.type.startsWith(pr));
1705
+ let t = (e ?? []).filter((e) => e.type.startsWith(vr));
1664
1706
  t.length > 0 && n([t[0]]);
1665
1707
  }
1666
1708
  });
1667
- return { isOver: x(() => i() && a.value) };
1709
+ return { isOver: j(() => i() && a.value) };
1668
1710
  }
1669
1711
  //#endregion
1670
1712
  //#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
1671
- var hr = {
1713
+ var br = {
1672
1714
  key: 0,
1673
1715
  class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
1674
1716
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
1675
- }, gr = ["href"], _r = ["src", "alt"], vr = ["src", "alt"], yr = {
1717
+ }, xr = ["href"], Sr = ["src", "alt"], Cr = ["src", "alt"], wr = {
1676
1718
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
1677
1719
  style: { opacity: "0.7" }
1678
- }, br = ["href"], xr = ["src", "alt"], Sr = ["src", "alt"], Cr = {
1720
+ }, Tr = ["href"], Er = ["src", "alt"], Dr = ["src", "alt"], Or = {
1679
1721
  key: 4,
1680
1722
  class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
1681
- }, wr = ["aria-label"], Tr = { key: 1 }, Er = /* @__PURE__ */ y({
1723
+ }, kr = ["aria-label"], Ar = { key: 1 }, jr = /* @__PURE__ */ y({
1682
1724
  __name: "ImageBlock",
1683
1725
  props: {
1684
1726
  block: {},
1685
1727
  viewport: {}
1686
1728
  },
1687
1729
  emits: ["update"],
1688
- setup(t, { emit: n }) {
1689
- let r = t, i = n, { t: a } = St(), { syntax: o } = At(), s = F(qe, null), c = x(() => !!s), l = jt();
1730
+ setup(e, { emit: t }) {
1731
+ let n = e, r = t, { t: a } = Tt(), { syntax: o } = Nt(), s = N(Xe, null), c = j(() => !!s), l = Pt();
1690
1732
  async function u() {
1691
1733
  let e = await s?.({ accept: ["images"] });
1692
1734
  if (l.alive && e) {
1693
1735
  let t = { src: e.url };
1694
- e.alt && (t.alt = e.alt), i("update", t);
1736
+ e.alt && (t.alt = e.alt), r("update", t);
1695
1737
  }
1696
1738
  }
1697
- let d = h(), f = h(!1), p = x(() => c.value && !f.value && !S.value);
1698
- async function m(e) {
1739
+ let d = _(), m = _(!1), h = j(() => c.value && !m.value && !C.value);
1740
+ async function g(e) {
1699
1741
  if (s) {
1700
- f.value = !0;
1742
+ m.value = !0;
1701
1743
  try {
1702
1744
  let t = await s({
1703
1745
  accept: ["images"],
@@ -1706,106 +1748,106 @@ var hr = {
1706
1748
  if (!l.alive) return;
1707
1749
  if (t) {
1708
1750
  let e = { src: t.url };
1709
- t.alt && (e.alt = t.alt), i("update", e);
1751
+ t.alt && (e.alt = t.alt), r("update", e);
1710
1752
  }
1711
1753
  } finally {
1712
- l.alive && (f.value = !1);
1754
+ l.alive && (m.value = !1);
1713
1755
  }
1714
1756
  }
1715
1757
  }
1716
- let { isOver: g } = mr({
1758
+ let { isOver: v } = yr({
1717
1759
  target: d,
1718
- enabled: p,
1719
- onFiles: m
1720
- }), v = x(() => ({ textAlign: r.block.align })), y = x(() => {
1721
- let e = r.block.align;
1760
+ enabled: h,
1761
+ onFiles: g
1762
+ }), y = j(() => ({ textAlign: n.block.align })), S = j(() => {
1763
+ let e = n.block.align;
1722
1764
  return {
1723
1765
  maxWidth: "100%",
1724
- width: r.block.width === "full" ? "100%" : `${r.block.width}px`,
1766
+ width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
1725
1767
  display: "block",
1726
1768
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
1727
1769
  marginRight: e === "center" ? "auto" : void 0
1728
1770
  };
1729
- }), S = x(() => De(r.block.src, o));
1730
- return (n, r) => (e(), w("div", {
1771
+ }), C = j(() => Ae(n.block.src, o));
1772
+ return (t, n) => (f(), x("div", {
1731
1773
  ref_key: "dropZoneRef",
1732
1774
  ref: d,
1733
1775
  "data-testid": "image-drop-zone",
1734
1776
  class: "tpl:relative tpl:w-full",
1735
- style: A(v.value)
1736
- }, [p.value && (M(g) || f.value) ? (e(), w("div", hr, [f.value ? (e(), w(D, { key: 0 }, [P(M(Ct), {
1777
+ style: i(y.value)
1778
+ }, [h.value && (k(v) || m.value) ? (f(), x("div", br, [m.value ? (f(), x(A, { key: 0 }, [w(k(Et), {
1737
1779
  class: "tpl-spinner",
1738
1780
  size: 20,
1739
1781
  "stroke-width": 2
1740
- }), _(" " + N(M(a).image.uploading), 1)], 64)) : (e(), w(D, { key: 1 }, [P(M(Dt), {
1782
+ }), O(" " + p(k(a).image.uploading), 1)], 64)) : (f(), x(A, { key: 1 }, [w(k(At), {
1741
1783
  size: 20,
1742
1784
  "stroke-width": 1.5
1743
- }), _(" " + N(M(a).image.dropToUpload), 1)], 64))])) : O("", !0), t.block.src && S.value && t.block.placeholderUrl ? (e(), w(D, { key: 1 }, [t.block.linkUrl ? (e(), w("a", {
1785
+ }), O(" " + p(k(a).image.dropToUpload), 1)], 64))])) : M("", !0), e.block.src && C.value && e.block.placeholderUrl ? (f(), x(A, { key: 1 }, [e.block.linkUrl ? (f(), x("a", {
1744
1786
  key: 0,
1745
- href: t.block.linkUrl,
1787
+ href: e.block.linkUrl,
1746
1788
  target: "_blank",
1747
1789
  rel: "noopener noreferrer",
1748
- onClick: r[0] ||= b(() => {}, ["prevent"])
1749
- }, [C("img", {
1790
+ onClick: n[0] ||= P(() => {}, ["prevent"])
1791
+ }, [b("img", {
1750
1792
  class: "tpl:border-0",
1751
1793
  loading: "lazy",
1752
- src: t.block.placeholderUrl,
1753
- alt: t.block.alt || M(a).image.altTextPlaceholder,
1754
- style: A(y.value)
1755
- }, null, 12, _r)], 8, gr)) : (e(), w("img", {
1794
+ src: e.block.placeholderUrl,
1795
+ alt: e.block.alt || k(a).image.altTextPlaceholder,
1796
+ style: i(S.value)
1797
+ }, null, 12, Sr)], 8, xr)) : (f(), x("img", {
1756
1798
  key: 1,
1757
1799
  class: "tpl:border-0",
1758
- src: t.block.placeholderUrl,
1759
- alt: t.block.alt,
1760
- style: A(y.value)
1761
- }, null, 12, vr))], 64)) : t.block.src && S.value ? (e(), w("div", {
1800
+ src: e.block.placeholderUrl,
1801
+ alt: e.block.alt,
1802
+ style: i(S.value)
1803
+ }, null, 12, Cr))], 64)) : e.block.src && C.value ? (f(), x("div", {
1762
1804
  key: 2,
1763
1805
  class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
1764
- style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, y.value])
1765
- }, [P(M(Tn), {
1806
+ style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, S.value])
1807
+ }, [w(k(An), {
1766
1808
  size: 32,
1767
1809
  "stroke-width": 1.5,
1768
1810
  class: "tpl:text-[var(--tpl-primary)]",
1769
1811
  style: { opacity: "0.5" }
1770
- }), C("span", yr, N(t.block.src), 1)], 4)) : t.block.src ? (e(), w(D, { key: 3 }, [t.block.linkUrl ? (e(), w("a", {
1812
+ }), b("span", wr, [w(yn, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), x(A, { key: 3 }, [e.block.linkUrl ? (f(), x("a", {
1771
1813
  key: 0,
1772
- href: t.block.linkUrl,
1814
+ href: e.block.linkUrl,
1773
1815
  target: "_blank",
1774
1816
  rel: "noopener noreferrer",
1775
- onClick: r[1] ||= b(() => {}, ["prevent"])
1776
- }, [C("img", {
1817
+ onClick: n[1] ||= P(() => {}, ["prevent"])
1818
+ }, [b("img", {
1777
1819
  class: "tpl:border-0",
1778
1820
  loading: "lazy",
1779
- src: t.block.src,
1780
- alt: t.block.alt || M(a).image.altTextPlaceholder,
1781
- style: A(y.value)
1782
- }, null, 12, xr)], 8, br)) : (e(), w("img", {
1821
+ src: e.block.src,
1822
+ alt: e.block.alt || k(a).image.altTextPlaceholder,
1823
+ style: i(S.value)
1824
+ }, null, 12, Er)], 8, Tr)) : (f(), x("img", {
1783
1825
  key: 1,
1784
1826
  class: "tpl:border-0",
1785
- src: t.block.src,
1786
- alt: t.block.alt,
1787
- style: A(y.value)
1788
- }, null, 12, Sr))], 64)) : (e(), w("div", Cr, [c.value ? (e(), w("button", {
1827
+ src: e.block.src,
1828
+ alt: e.block.alt,
1829
+ style: i(S.value)
1830
+ }, null, 12, Dr))], 64)) : (f(), x("div", Or, [c.value ? (f(), x("button", {
1789
1831
  key: 0,
1790
- "aria-label": M(a).image.browseMedia,
1832
+ "aria-label": k(a).image.browseMedia,
1791
1833
  class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
1792
- onClick: b(u, ["stop"])
1793
- }, [P(M(Tn), {
1834
+ onClick: P(u, ["stop"])
1835
+ }, [w(k(An), {
1794
1836
  size: 14,
1795
1837
  "stroke-width": 1.5
1796
- }), _(" " + N(M(a).image.browseMedia), 1)], 8, wr)) : (e(), w("span", Tr, N(M(a).image.clickToAdd), 1))]))], 4));
1838
+ }), O(" " + p(k(a).image.browseMedia), 1)], 8, kr)) : (f(), x("span", Ar, p(k(a).image.clickToAdd), 1))]))], 4));
1797
1839
  }
1798
- }), Dr = { class: "tpl:w-full" }, Or = ["href"], kr = {
1840
+ }), Mr = { class: "tpl:w-full" }, Nr = ["href"], Pr = {
1799
1841
  key: 1,
1800
1842
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
1801
- }, Ar = /* @__PURE__ */ y({
1843
+ }, Fr = /* @__PURE__ */ y({
1802
1844
  __name: "MenuBlock",
1803
1845
  props: {
1804
1846
  block: {},
1805
1847
  viewport: {}
1806
1848
  },
1807
- setup(t) {
1808
- let n = t, { t: r } = St(), i = x(() => ({
1849
+ setup(e) {
1850
+ let n = e, { t: r } = Tt(), a = j(() => ({
1809
1851
  display: "flex",
1810
1852
  flexWrap: "wrap",
1811
1853
  gap: `0 ${n.block.spacing}px`,
@@ -1813,31 +1855,31 @@ var hr = {
1813
1855
  fontSize: `${n.block.fontSize}px`,
1814
1856
  fontFamily: n.block.fontFamily || "inherit",
1815
1857
  alignItems: "center"
1816
- })), a = x(() => n.block.items.length > 0);
1817
- function o(e) {
1858
+ })), o = j(() => n.block.items.length > 0);
1859
+ function s(e) {
1818
1860
  return e || n.block.linkColor || n.block.color;
1819
1861
  }
1820
- return (n, s) => (e(), w("div", Dr, [a.value ? (e(), w("div", {
1862
+ return (n, c) => (f(), x("div", Mr, [o.value ? (f(), x("div", {
1821
1863
  key: 0,
1822
- style: A(i.value)
1823
- }, [(e(!0), w(D, null, c(t.block.items, (n, r) => (e(), w(D, { key: n.id }, [C("a", {
1824
- href: n.url || "#",
1864
+ style: i(a.value)
1865
+ }, [(f(!0), x(A, null, t(e.block.items, (t, n) => (f(), x(A, { key: t.id }, [b("a", {
1866
+ href: t.url || "#",
1825
1867
  class: "tpl:cursor-default tpl:no-underline",
1826
- style: A({
1827
- color: o(n.color),
1828
- fontWeight: n.bold ? "bold" : "normal",
1829
- textDecoration: n.underline ? "underline" : "none"
1868
+ style: i({
1869
+ color: s(t.color),
1870
+ fontWeight: t.bold ? "bold" : "normal",
1871
+ textDecoration: t.underline ? "underline" : "none"
1830
1872
  }),
1831
- onClick: s[0] ||= b(() => {}, ["prevent"])
1832
- }, N(n.text || "..."), 13, Or), r < t.block.items.length - 1 ? (e(), w("span", {
1873
+ onClick: c[0] ||= P(() => {}, ["prevent"])
1874
+ }, [w(yn, { text: t.text || "..." }, null, 8, ["text"])], 12, Nr), n < e.block.items.length - 1 ? (f(), x("span", {
1833
1875
  key: 0,
1834
- style: A({
1835
- color: t.block.separatorColor,
1836
- padding: `0 ${t.block.spacing}px`
1876
+ style: i({
1877
+ color: e.block.separatorColor,
1878
+ padding: `0 ${e.block.spacing}px`
1837
1879
  })
1838
- }, N(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div", kr, [P(M(En), { size: 16 }), C("span", null, N(M(r).menu.addLinks), 1)]))]));
1880
+ }, p(e.block.separator), 5)) : M("", !0)], 64))), 128))], 4)) : (f(), x("div", Pr, [w(k(jn), { size: 16 }), b("span", null, p(k(r).menu.addLinks), 1)]))]));
1839
1881
  }
1840
- }), jr = /* @__PURE__ */ new Set([
1882
+ }), Ir = /* @__PURE__ */ new Set([
1841
1883
  "http",
1842
1884
  "https",
1843
1885
  "mailto",
@@ -1847,7 +1889,7 @@ var hr = {
1847
1889
  "sms",
1848
1890
  "xmpp",
1849
1891
  "cid"
1850
- ]), Mr = /* @__PURE__ */ new Set([
1892
+ ]), Lr = /* @__PURE__ */ new Set([
1851
1893
  "SCRIPT",
1852
1894
  "STYLE",
1853
1895
  "IFRAME",
@@ -1857,7 +1899,7 @@ var hr = {
1857
1899
  "META",
1858
1900
  "BASE",
1859
1901
  "FORM"
1860
- ]), Nr = /* @__PURE__ */ new Set([
1902
+ ]), Rr = /* @__PURE__ */ new Set([
1861
1903
  "href",
1862
1904
  "xlink:href",
1863
1905
  "formaction",
@@ -1866,16 +1908,16 @@ var hr = {
1866
1908
  "background",
1867
1909
  "poster"
1868
1910
  ]);
1869
- function Pr(e, t) {
1911
+ function zr(e, t) {
1870
1912
  let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
1871
1913
  if (!n || n.startsWith("#")) return !0;
1872
1914
  let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
1873
1915
  if (!r) return !0;
1874
1916
  let i = r[1].toLowerCase();
1875
- return jr.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
1917
+ return Ir.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
1876
1918
  }
1877
- function Fr(e) {
1878
- if (Mr.has(e.tagName)) {
1919
+ function Br(e) {
1920
+ if (Lr.has(e.tagName)) {
1879
1921
  e.remove();
1880
1922
  return;
1881
1923
  }
@@ -1887,29 +1929,29 @@ function Fr(e) {
1887
1929
  e.removeAttribute(n);
1888
1930
  continue;
1889
1931
  }
1890
- if (Nr.has(t)) {
1891
- Pr(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
1932
+ if (Rr.has(t)) {
1933
+ zr(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
1892
1934
  continue;
1893
1935
  }
1894
1936
  if (t === "src") {
1895
- Pr(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
1937
+ zr(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
1896
1938
  continue;
1897
1939
  }
1898
1940
  t === "srcdoc" && e.removeAttribute(n);
1899
1941
  }
1900
1942
  let n = Array.from(e.children);
1901
- for (let e of n) Fr(e);
1943
+ for (let e of n) Br(e);
1902
1944
  }
1903
- function Ir(e) {
1945
+ function Vr(e) {
1904
1946
  if (typeof DOMParser > "u") return e;
1905
1947
  let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
1906
- for (let e of n) Fr(e);
1948
+ for (let e of n) Br(e);
1907
1949
  return t.innerHTML;
1908
1950
  }
1909
1951
  //#endregion
1910
1952
  //#region src/composables/useEditableTextBlock.ts
1911
- function Lr(e) {
1912
- let t = F(tt, []), { syntax: n } = At(), r = x(() => Ir(ce(Ce(e(), t), n))), i = h(!1), a = h(null), { top: o, left: s } = He(a), c = x(() => ({
1953
+ function Hr(e) {
1954
+ let t = N(it, []), { syntax: n } = Nt(), r = j(() => Vr(Te(fe(e(), t), n))), i = _(!1), a = _(null), { top: o, left: s } = qe(a), c = j(() => ({
1913
1955
  top: o.value - 8,
1914
1956
  left: s.value
1915
1957
  }));
@@ -1930,72 +1972,72 @@ function Lr(e) {
1930
1972
  }
1931
1973
  //#endregion
1932
1974
  //#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
1933
- var Rr = ["innerHTML"], zr = /* @__PURE__ */ y({
1975
+ var Ur = ["innerHTML"], Wr = /* @__PURE__ */ y({
1934
1976
  __name: "ParagraphBlock",
1935
1977
  props: {
1936
1978
  block: {},
1937
1979
  viewport: {}
1938
1980
  },
1939
- setup(t) {
1940
- let n = t, r = oe(() => import("./ParagraphEditor-DMzkVnST.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Lr(() => n.block.content);
1941
- return (n, u) => (e(), w("div", {
1981
+ setup(e) {
1982
+ let t = e, n = C(() => import("./ParagraphEditor-1NaUJpZO.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Hr(() => t.block.content);
1983
+ return (t, l) => (f(), x("div", {
1942
1984
  ref_key: "blockRef",
1943
- ref: a,
1985
+ ref: i,
1944
1986
  class: "tpl:min-h-[1em] tpl:w-full",
1945
- onDblclick: u[0] ||= (...e) => M(c) && M(c)(...e)
1946
- }, [M(i) ? (e(), j(M(r), {
1987
+ onDblclick: l[0] ||= (...e) => k(s) && k(s)(...e)
1988
+ }, [k(r) ? (f(), D(k(n), {
1947
1989
  key: 0,
1948
- block: t.block,
1949
- "toolbar-position": M(o),
1950
- onDone: M(l)
1990
+ block: e.block,
1991
+ "toolbar-position": k(a),
1992
+ onDone: k(c)
1951
1993
  }, null, 8, [
1952
1994
  "block",
1953
1995
  "toolbar-position",
1954
1996
  "onDone"
1955
- ])) : (e(), w("div", {
1997
+ ])) : (f(), x("div", {
1956
1998
  key: 1,
1957
1999
  class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
1958
- innerHTML: M(s)
1959
- }, null, 8, Rr))], 544));
2000
+ innerHTML: k(o)
2001
+ }, null, 8, Ur))], 544));
1960
2002
  }
1961
2003
  });
1962
2004
  //#endregion
1963
2005
  //#region src/utils/blockComponentResolver.ts
1964
- function Br(e, t, n) {
2006
+ function Gr(e, t, n) {
1965
2007
  if (t) {
1966
2008
  let n = t.getComponent(e);
1967
2009
  if (n) return n;
1968
2010
  }
1969
2011
  return n[e.type] ?? null;
1970
2012
  }
1971
- function Vr(e) {
2013
+ function Kr(e) {
1972
2014
  let { padding: t, backgroundColor: n } = e.styles, r = {
1973
2015
  padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
1974
2016
  backgroundColor: n || "transparent"
1975
2017
  };
1976
2018
  return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
1977
2019
  }
1978
- function Hr(e) {
2020
+ function qr(e) {
1979
2021
  if (e.type !== "section" || !e.wrapper) return null;
1980
2022
  let t = e.wrapper, n = {};
1981
2023
  return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
1982
2024
  }
1983
2025
  //#endregion
1984
2026
  //#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
1985
- var Ur = ["data-block-id", "data-block-type"], Wr = ["aria-label"], Gr = [
2027
+ var Jr = ["data-block-id", "data-block-type"], Yr = ["aria-label"], Xr = [
1986
2028
  "aria-label",
1987
2029
  "aria-pressed",
1988
2030
  "title"
1989
- ], Kr = ["aria-label", "title"], qr = ["aria-label", "title"], Jr = ["aria-label", "title"], Yr = {
2031
+ ], Zr = ["aria-label", "title"], Qr = ["aria-label", "title"], $r = ["aria-label", "title"], ei = {
1990
2032
  key: 1,
1991
2033
  class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
1992
- }, Xr = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, Zr = {
2034
+ }, ti = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, ni = {
1993
2035
  key: 2,
1994
2036
  class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
1995
- }, Qr = ["aria-label", "title"], $r = {
2037
+ }, ri = ["aria-label", "title"], ii = {
1996
2038
  key: 3,
1997
2039
  class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
1998
- }, ei = ["aria-label"], ti = /*#__PURE__*/ kt(/* @__PURE__ */ y({
2040
+ }, ai = ["aria-label"], oi = /*#__PURE__*/ Mt(/* @__PURE__ */ y({
1999
2041
  __name: "BlockWrapper",
2000
2042
  props: {
2001
2043
  block: {},
@@ -2004,281 +2046,281 @@ var Ur = ["data-block-id", "data-block-type"], Wr = ["aria-label"], Gr = [
2004
2046
  previewMode: { type: Boolean }
2005
2047
  },
2006
2048
  emits: ["select"],
2007
- setup(t, { emit: n }) {
2008
- let i = oe(() => import("./BlockIssueBadge-a-qlByxF.js")), a = t, o = n, { t: s, format: c } = St(), u = F(vt, null), d = h(null), f = x(() => u?.liftedBlockId.value === a.block.id), p = x(() => f.value ? c(s.blockActions.dragLifted, { block: a.block.type }) : s.blockActions.drag);
2009
- async function m() {
2010
- await r(), d.value?.focus();
2049
+ setup(e, { emit: t }) {
2050
+ let n = C(() => import("./BlockIssueBadge-B3xVgMTh.js")), r = e, a = t, { t: s, format: c } = Tt(), l = N(xt, null), u = _(null), d = j(() => l?.liftedBlockId.value === r.block.id), m = j(() => d.value ? c(s.blockActions.dragLifted, { block: r.block.type }) : s.blockActions.drag);
2051
+ async function h() {
2052
+ await ie(), u.value?.focus();
2011
2053
  }
2012
2054
  function g(e) {
2013
- if (u) {
2055
+ if (l) {
2014
2056
  if (e.key === " " || e.key === "Enter") {
2015
- e.preventDefault(), e.stopPropagation(), f.value ? u.drop(a.block.id) : u.lift(a.block.id);
2057
+ e.preventDefault(), e.stopPropagation(), d.value ? l.drop(r.block.id) : l.lift(r.block.id);
2016
2058
  return;
2017
2059
  }
2018
- if (f.value) {
2060
+ if (d.value) {
2019
2061
  if (e.key === "Escape") {
2020
- e.preventDefault(), e.stopPropagation(), u.cancel(), m();
2062
+ e.preventDefault(), e.stopPropagation(), l.cancel(), h();
2021
2063
  return;
2022
2064
  }
2023
2065
  if (e.key === "ArrowUp") {
2024
- e.preventDefault(), e.stopPropagation(), u.moveUp(a.block.id), m();
2066
+ e.preventDefault(), e.stopPropagation(), l.moveUp(r.block.id), h();
2025
2067
  return;
2026
2068
  }
2027
- e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), u.moveDown(a.block.id), m());
2069
+ e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), l.moveDown(r.block.id), h());
2028
2070
  }
2029
2071
  }
2030
2072
  }
2031
- let y = x(() => !a.viewport || !a.block.visibility ? !1 : a.block.visibility[a.viewport] === !1), S = x(() => a.previewMode === !0 && y.value), T = x(() => a.viewport ? {
2073
+ let v = j(() => !r.viewport || !r.block.visibility ? !1 : r.block.visibility[r.viewport] === !1), y = j(() => r.previewMode === !0 && v.value), S = j(() => r.viewport ? {
2032
2074
  desktop: s.viewport.desktop,
2033
2075
  mobile: s.viewport.mobile
2034
- }[a.viewport] ?? a.viewport : ""), E = x(() => !!a.block.displayCondition), ee = F(ut, null), D = F(_t, null), k = F(gt, {}), te = x(() => !!k.savedModules), j = x(() => k.comments?.getBlockCount(a.block.id) ?? 0), ne = x(() => {
2035
- let e = Vr(a.block), t = {
2076
+ }[r.viewport] ?? r.viewport : ""), E = j(() => !!r.block.displayCondition), D = N(pt, null), ee = N(bt, null), A = N(yt, {}), te = j(() => !!A.savedModules), ne = j(() => A.comments?.getBlockCount(r.block.id) ?? 0), re = j(() => {
2077
+ let e = Kr(r.block), t = {
2036
2078
  padding: e.padding,
2037
2079
  backgroundColor: e.backgroundColor
2038
2080
  };
2039
2081
  return e.borderRadius && (t.borderRadius = e.borderRadius), t;
2040
- }), re = x(() => Hr(a.block));
2041
- function ie(e) {
2042
- a.previewMode || (e.stopPropagation(), o("select"));
2043
- }
2044
- function ae() {
2045
- ee?.deleteBlock(a.block.id);
2082
+ }), ae = j(() => qr(r.block));
2083
+ function oe(e) {
2084
+ r.previewMode || (e.stopPropagation(), a("select"));
2046
2085
  }
2047
2086
  function se() {
2048
- ee?.duplicateBlock(a.block);
2087
+ D?.deleteBlock(r.block.id);
2049
2088
  }
2050
2089
  function ce() {
2051
- k.savedModules?.openSaveDialog(a.block.id);
2090
+ D?.duplicateBlock(r.block);
2052
2091
  }
2053
2092
  function le() {
2054
- D?.toggleBlock(a.block.id);
2093
+ A.savedModules?.openSaveDialog(r.block.id);
2055
2094
  }
2056
- return (n, r) => S.value ? O("", !0) : (e(), w("div", {
2095
+ function ue() {
2096
+ ee?.toggleBlock(r.block.id);
2097
+ }
2098
+ return (t, r) => y.value ? M("", !0) : (f(), x("div", {
2057
2099
  key: 0,
2058
- class: v(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
2059
- "tpl-block--selected": t.isSelected,
2060
- "tpl-block--idle": !t.isSelected,
2061
- "tpl-block--lifted": f.value
2100
+ class: o(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
2101
+ "tpl-block--selected": e.isSelected,
2102
+ "tpl-block--idle": !e.isSelected,
2103
+ "tpl-block--lifted": d.value
2062
2104
  }]),
2063
- "data-block-id": t.block.id,
2064
- "data-block-type": t.block.type,
2065
- onClick: ie
2105
+ "data-block-id": e.block.id,
2106
+ "data-block-type": e.block.type,
2107
+ onClick: oe
2066
2108
  }, [
2067
- P(M(i), { "block-id": t.block.id }, null, 8, ["block-id"]),
2068
- t.isSelected ? (e(), w("div", {
2109
+ w(k(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
2110
+ e.isSelected ? (f(), x("div", {
2069
2111
  key: 0,
2070
2112
  role: "toolbar",
2071
- "aria-label": M(s).blockActions.drag,
2113
+ "aria-label": k(s).blockActions.drag,
2072
2114
  class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
2073
2115
  }, [
2074
- C("button", {
2116
+ b("button", {
2075
2117
  ref_key: "dragButtonRef",
2076
- ref: d,
2118
+ ref: u,
2077
2119
  class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150 tpl:active:cursor-grabbing",
2078
- "aria-label": p.value,
2079
- "aria-pressed": f.value,
2120
+ "aria-label": m.value,
2121
+ "aria-pressed": d.value,
2080
2122
  "aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
2081
- title: M(s).blockActions.drag,
2123
+ title: k(s).blockActions.drag,
2082
2124
  onKeydown: g
2083
- }, [P(M(wn), {
2125
+ }, [w(k(kn), {
2084
2126
  size: 14,
2085
2127
  "stroke-width": 1.5
2086
- })], 40, Gr),
2087
- C("button", {
2128
+ })], 40, Xr),
2129
+ b("button", {
2088
2130
  class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
2089
- "aria-label": M(s).blockActions.duplicate,
2090
- title: M(s).blockActions.duplicate,
2091
- onClick: b(se, ["stop"])
2092
- }, [P(M(xn), {
2131
+ "aria-label": k(s).blockActions.duplicate,
2132
+ title: k(s).blockActions.duplicate,
2133
+ onClick: P(ce, ["stop"])
2134
+ }, [w(k(En), {
2093
2135
  size: 14,
2094
2136
  "stroke-width": 1.5
2095
- })], 8, Kr),
2096
- te.value ? (e(), w("button", {
2137
+ })], 8, Zr),
2138
+ te.value ? (f(), x("button", {
2097
2139
  key: 0,
2098
2140
  class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
2099
- "aria-label": M(s).blockActions.saveAsModule,
2100
- title: M(s).blockActions.saveAsModule,
2101
- onClick: b(ce, ["stop"])
2102
- }, [P(M(vn), {
2141
+ "aria-label": k(s).blockActions.saveAsModule,
2142
+ title: k(s).blockActions.saveAsModule,
2143
+ onClick: P(le, ["stop"])
2144
+ }, [w(k(Cn), {
2103
2145
  size: 14,
2104
2146
  "stroke-width": 1.5
2105
- })], 8, qr)) : O("", !0),
2106
- C("button", {
2147
+ })], 8, Qr)) : M("", !0),
2148
+ b("button", {
2107
2149
  class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
2108
- "aria-label": M(s).blockActions.delete,
2109
- title: M(s).blockActions.delete,
2110
- onClick: b(ae, ["stop"])
2111
- }, [P(M(Tt), {
2150
+ "aria-label": k(s).blockActions.delete,
2151
+ title: k(s).blockActions.delete,
2152
+ onClick: P(se, ["stop"])
2153
+ }, [w(k(Ot), {
2112
2154
  size: 14,
2113
2155
  "stroke-width": 1.5
2114
- })], 8, Jr)
2115
- ], 8, Wr)) : O("", !0),
2116
- y.value ? (e(), w("div", Yr, [C("span", Xr, [P(M(Sn), {
2156
+ })], 8, $r)
2157
+ ], 8, Yr)) : M("", !0),
2158
+ v.value ? (f(), x("div", ei, [b("span", ti, [w(k(Dn), {
2117
2159
  size: 12,
2118
2160
  "stroke-width": 1.5
2119
- }), _(" " + N(M(c)(M(s).blockActions.hiddenOnViewport, { viewport: T.value })), 1)])])) : O("", !0),
2120
- E.value && !y.value ? (e(), w("div", Zr, [C("button", {
2161
+ }), O(" " + p(k(c)(k(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : M("", !0),
2162
+ E.value && !v.value ? (f(), x("div", ni, [b("button", {
2121
2163
  class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
2122
- "aria-label": M(s).blockActions.conditionToggle,
2123
- title: t.block.displayCondition?.label,
2124
- onClick: b(le, ["stop"])
2125
- }, [P(M(Cn), {
2164
+ "aria-label": k(s).blockActions.conditionToggle,
2165
+ title: e.block.displayCondition?.label,
2166
+ onClick: P(ue, ["stop"])
2167
+ }, [w(k(On), {
2126
2168
  size: 12,
2127
2169
  "stroke-width": 2
2128
- })], 8, Qr)])) : O("", !0),
2129
- j.value > 0 && !y.value ? (e(), w("div", $r, [C("button", {
2170
+ })], 8, ri)])) : M("", !0),
2171
+ ne.value > 0 && !v.value ? (f(), x("div", ii, [b("button", {
2130
2172
  class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]",
2131
- "aria-label": M(c)(M(s).blockActions.comments, { count: String(j.value) }),
2132
- onClick: r[0] ||= b((e) => M(k).comments?.openForBlock(t.block.id), ["stop"])
2133
- }, [P(M(wt), {
2173
+ "aria-label": k(c)(k(s).blockActions.comments, { count: String(ne.value) }),
2174
+ onClick: r[0] ||= P((t) => k(A).comments?.openForBlock(e.block.id), ["stop"])
2175
+ }, [w(k(Dt), {
2134
2176
  size: 12,
2135
2177
  "stroke-width": 2.5
2136
- }), _(" " + N(j.value), 1)], 8, ei)])) : O("", !0),
2137
- re.value ? (e(), w("div", {
2178
+ }), O(" " + p(ne.value), 1)], 8, ai)])) : M("", !0),
2179
+ ae.value ? (f(), x("div", {
2138
2180
  key: 4,
2139
2181
  class: "tpl-section-wrapper",
2140
- style: A(re.value)
2141
- }, [C("div", {
2182
+ style: i(ae.value)
2183
+ }, [b("div", {
2142
2184
  class: "tpl-block-content",
2143
- style: A(ne.value)
2144
- }, [l(n.$slots, "default", {}, void 0, !0)], 4)], 4)) : (e(), w("div", {
2185
+ style: i(re.value)
2186
+ }, [T(t.$slots, "default", {}, void 0, !0)], 4)], 4)) : (f(), x("div", {
2145
2187
  key: 5,
2146
2188
  class: "tpl-block-content",
2147
- style: A(ne.value)
2148
- }, [l(n.$slots, "default", {}, void 0, !0)], 4))
2149
- ], 10, Ur));
2189
+ style: i(re.value)
2190
+ }, [T(t.$slots, "default", {}, void 0, !0)], 4))
2191
+ ], 10, Jr));
2150
2192
  }
2151
2193
  }), [["__scopeId", "data-v-7aeef19d"]]);
2152
2194
  //#endregion
2153
2195
  //#region src/utils/unwrapParagraph.ts
2154
- function ni(e) {
2196
+ function si(e) {
2155
2197
  let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
2156
2198
  return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
2157
2199
  }
2158
2200
  //#endregion
2159
2201
  //#region src/components/blocks/TitleBlock.vue
2160
- var ri = /* @__PURE__ */ y({
2202
+ var ci = /* @__PURE__ */ y({
2161
2203
  __name: "TitleBlock",
2162
2204
  props: {
2163
2205
  block: {},
2164
2206
  viewport: {}
2165
2207
  },
2166
- setup(t) {
2167
- let n = t, r = oe(() => import("./TitleEditor-eyT0h-Sa.js")), { isEditing: a, blockRef: o, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = Lr(() => n.block.content), d = x(() => {
2208
+ setup(e) {
2209
+ let t = e, n = C(() => import("./TitleEditor-D4t_gZZJ.js")), { isEditing: r, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Hr(() => t.block.content), u = j(() => {
2168
2210
  let e = {
2169
- fontSize: `${je[n.block.level]}px`,
2170
- color: n.block.color,
2171
- textAlign: n.block.textAlign
2211
+ fontSize: `${Pe[t.block.level]}px`,
2212
+ color: t.block.color,
2213
+ textAlign: t.block.textAlign
2172
2214
  };
2173
- return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
2174
- }), f = x(() => `h${n.block.level}`), p = x(() => ni(c.value));
2175
- return (n, c) => (e(), w("div", {
2215
+ return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
2216
+ }), p = j(() => `h${t.block.level}`), m = j(() => si(s.value));
2217
+ return (t, s) => (f(), x("div", {
2176
2218
  ref_key: "blockRef",
2177
- ref: o,
2219
+ ref: a,
2178
2220
  class: "tpl:min-h-[1em] tpl:w-full",
2179
- style: A(d.value),
2180
- onDblclick: c[0] ||= (...e) => M(l) && M(l)(...e)
2181
- }, [M(a) ? (e(), j(M(r), {
2221
+ style: i(u.value),
2222
+ onDblclick: s[0] ||= (...e) => k(c) && k(c)(...e)
2223
+ }, [k(r) ? (f(), D(k(n), {
2182
2224
  key: 0,
2183
- block: t.block,
2184
- "toolbar-position": M(s),
2185
- onDone: M(u)
2225
+ block: e.block,
2226
+ "toolbar-position": k(o),
2227
+ onDone: k(l)
2186
2228
  }, null, 8, [
2187
2229
  "block",
2188
2230
  "toolbar-position",
2189
2231
  "onDone"
2190
- ])) : (e(), j(i(f.value), {
2232
+ ])) : (f(), D(d(p.value), {
2191
2233
  key: 1,
2192
2234
  class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-tight tpl:outline-none [&_a]:tpl:underline [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0",
2193
2235
  style: { color: "inherit" },
2194
- innerHTML: p.value
2236
+ innerHTML: m.value
2195
2237
  }, null, 8, ["innerHTML"]))], 36));
2196
2238
  }
2197
2239
  });
2198
2240
  //#endregion
2199
2241
  //#region src/utils/sectionColumnDrop.ts
2200
- function ii(e) {
2242
+ function li(e) {
2201
2243
  return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
2202
2244
  }
2203
2245
  //#endregion
2204
2246
  //#region ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
2205
- var ai = Object.defineProperty, oi = Object.getOwnPropertySymbols, si = Object.prototype.hasOwnProperty, ci = Object.prototype.propertyIsEnumerable, li = (e, t, n) => t in e ? ai(e, t, {
2247
+ var ui = Object.defineProperty, di = Object.getOwnPropertySymbols, fi = Object.prototype.hasOwnProperty, pi = Object.prototype.propertyIsEnumerable, mi = (e, t, n) => t in e ? ui(e, t, {
2206
2248
  enumerable: !0,
2207
2249
  configurable: !0,
2208
2250
  writable: !0,
2209
2251
  value: n
2210
- }) : e[t] = n, ui = (e, t) => {
2211
- for (var n in t ||= {}) si.call(t, n) && li(e, n, t[n]);
2212
- if (oi) for (var n of oi(t)) ci.call(t, n) && li(e, n, t[n]);
2252
+ }) : e[t] = n, hi = (e, t) => {
2253
+ for (var n in t ||= {}) fi.call(t, n) && mi(e, n, t[n]);
2254
+ if (di) for (var n of di(t)) pi.call(t, n) && mi(e, n, t[n]);
2213
2255
  return e;
2214
- }, di = (e, t) => {
2256
+ }, gi = (e, t) => {
2215
2257
  var n = {};
2216
- for (var r in e) si.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
2217
- if (e != null && oi) for (var r of oi(e)) t.indexOf(r) < 0 && ci.call(e, r) && (n[r] = e[r]);
2258
+ for (var r in e) fi.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
2259
+ if (e != null && di) for (var r of di(e)) t.indexOf(r) < 0 && pi.call(e, r) && (n[r] = e[r]);
2218
2260
  return n;
2219
- }, fi = "[vue-draggable-plus]: ";
2220
- function pi(e) {
2221
- console.warn(fi + e);
2261
+ }, _i = "[vue-draggable-plus]: ";
2262
+ function vi(e) {
2263
+ console.warn(_i + e);
2222
2264
  }
2223
- function mi(e) {
2224
- console.error(fi + e);
2265
+ function yi(e) {
2266
+ console.error(_i + e);
2225
2267
  }
2226
- function hi(e, t, n) {
2268
+ function bi(e, t, n) {
2227
2269
  return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
2228
2270
  }
2229
- function gi(e) {
2271
+ function xi(e) {
2230
2272
  return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
2231
2273
  }
2232
- function _i(e) {
2233
- return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[gi(n)] = e[n]), t), {});
2274
+ function Si(e) {
2275
+ return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[xi(n)] = e[n]), t), {});
2234
2276
  }
2235
- function vi(e, t) {
2277
+ function Ci(e, t) {
2236
2278
  return Array.isArray(e) && e.splice(t, 1), e;
2237
2279
  }
2238
- function yi(e, t, n) {
2280
+ function wi(e, t, n) {
2239
2281
  return Array.isArray(e) && e.splice(t, 0, n), e;
2240
2282
  }
2241
- function bi(e) {
2283
+ function Ti(e) {
2242
2284
  return e === void 0;
2243
2285
  }
2244
- function xi(e) {
2286
+ function Ei(e) {
2245
2287
  return typeof e == "string";
2246
2288
  }
2247
- function Si(e, t, n) {
2289
+ function Di(e, t, n) {
2248
2290
  let r = e.children[n];
2249
2291
  e.insertBefore(t, r);
2250
2292
  }
2251
- function Ci(e) {
2293
+ function Oi(e) {
2252
2294
  e.parentNode && e.parentNode.removeChild(e);
2253
2295
  }
2254
- function wi(e, t = document) {
2296
+ function ki(e, t = document) {
2255
2297
  let n = null;
2256
- return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || pi(`Element not found: ${e}`), n;
2298
+ return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || vi(`Element not found: ${e}`), n;
2257
2299
  }
2258
- function Ti(e, t, n = null) {
2300
+ function Ai(e, t, n = null) {
2259
2301
  return function(...r) {
2260
2302
  return e.apply(n, r), t.apply(n, r);
2261
2303
  };
2262
2304
  }
2263
- function Ei(e, t) {
2264
- let n = ui({}, e);
2305
+ function ji(e, t) {
2306
+ let n = hi({}, e);
2265
2307
  return Object.keys(t).forEach((r) => {
2266
- n[r] ? n[r] = Ti(e[r], t[r]) : n[r] = t[r];
2308
+ n[r] ? n[r] = Ai(e[r], t[r]) : n[r] = t[r];
2267
2309
  }), n;
2268
2310
  }
2269
- function Di(e) {
2311
+ function Mi(e) {
2270
2312
  return e instanceof HTMLElement;
2271
2313
  }
2272
- function Oi(e, t) {
2314
+ function Ni(e, t) {
2273
2315
  Object.keys(e).forEach((n) => {
2274
2316
  t(n, e[n]);
2275
2317
  });
2276
2318
  }
2277
- function ki(e) {
2319
+ function Pi(e) {
2278
2320
  return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
2279
2321
  }
2280
- var Ai = Object.assign;
2281
- function ji(e, t) {
2322
+ var Fi = Object.assign;
2323
+ function Ii(e, t) {
2282
2324
  var n = Object.keys(e);
2283
2325
  if (Object.getOwnPropertySymbols) {
2284
2326
  var r = Object.getOwnPropertySymbols(e);
@@ -2288,26 +2330,26 @@ function ji(e, t) {
2288
2330
  }
2289
2331
  return n;
2290
2332
  }
2291
- function Mi(e) {
2333
+ function Li(e) {
2292
2334
  for (var t = 1; t < arguments.length; t++) {
2293
2335
  var n = arguments[t] == null ? {} : arguments[t];
2294
- t % 2 ? ji(Object(n), !0).forEach(function(t) {
2295
- Pi(e, t, n[t]);
2296
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ji(Object(n)).forEach(function(t) {
2336
+ t % 2 ? Ii(Object(n), !0).forEach(function(t) {
2337
+ zi(e, t, n[t]);
2338
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ii(Object(n)).forEach(function(t) {
2297
2339
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
2298
2340
  });
2299
2341
  }
2300
2342
  return e;
2301
2343
  }
2302
- function Ni(e) {
2344
+ function Ri(e) {
2303
2345
  "@babel/helpers - typeof";
2304
- return Ni = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2346
+ return Ri = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2305
2347
  return typeof e;
2306
2348
  } : function(e) {
2307
2349
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2308
- }, Ni(e);
2350
+ }, Ri(e);
2309
2351
  }
2310
- function Pi(e, t, n) {
2352
+ function zi(e, t, n) {
2311
2353
  return t in e ? Object.defineProperty(e, t, {
2312
2354
  value: n,
2313
2355
  enumerable: !0,
@@ -2315,45 +2357,45 @@ function Pi(e, t, n) {
2315
2357
  writable: !0
2316
2358
  }) : e[t] = n, e;
2317
2359
  }
2318
- function Fi() {
2319
- return Fi = Object.assign || function(e) {
2360
+ function Bi() {
2361
+ return Bi = Object.assign || function(e) {
2320
2362
  for (var t = 1; t < arguments.length; t++) {
2321
2363
  var n = arguments[t];
2322
2364
  for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
2323
2365
  }
2324
2366
  return e;
2325
- }, Fi.apply(this, arguments);
2367
+ }, Bi.apply(this, arguments);
2326
2368
  }
2327
- function Ii(e, t) {
2369
+ function Vi(e, t) {
2328
2370
  if (e == null) return {};
2329
2371
  var n = {}, r = Object.keys(e), i, a;
2330
2372
  for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
2331
2373
  return n;
2332
2374
  }
2333
- function Li(e, t) {
2375
+ function Hi(e, t) {
2334
2376
  if (e == null) return {};
2335
- var n = Ii(e, t), r, i;
2377
+ var n = Vi(e, t), r, i;
2336
2378
  if (Object.getOwnPropertySymbols) {
2337
2379
  var a = Object.getOwnPropertySymbols(e);
2338
2380
  for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
2339
2381
  }
2340
2382
  return n;
2341
2383
  }
2342
- var Ri = "1.15.2";
2343
- function zi(e) {
2384
+ var Ui = "1.15.2";
2385
+ function Wi(e) {
2344
2386
  if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
2345
2387
  }
2346
- var Bi = zi(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Vi = zi(/Edge/i), Hi = zi(/firefox/i), Ui = zi(/safari/i) && !zi(/chrome/i) && !zi(/android/i), Wi = zi(/iP(ad|od|hone)/i), Gi = zi(/chrome/i) && zi(/android/i), Ki = {
2388
+ var Gi = Wi(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Ki = Wi(/Edge/i), qi = Wi(/firefox/i), Ji = Wi(/safari/i) && !Wi(/chrome/i) && !Wi(/android/i), Yi = Wi(/iP(ad|od|hone)/i), Xi = Wi(/chrome/i) && Wi(/android/i), Zi = {
2347
2389
  capture: !1,
2348
2390
  passive: !1
2349
2391
  };
2350
- function L(e, t, n) {
2351
- e.addEventListener(t, n, !Bi && Ki);
2392
+ function I(e, t, n) {
2393
+ e.addEventListener(t, n, !Gi && Zi);
2352
2394
  }
2353
- function R(e, t, n) {
2354
- e.removeEventListener(t, n, !Bi && Ki);
2395
+ function L(e, t, n) {
2396
+ e.removeEventListener(t, n, !Gi && Zi);
2355
2397
  }
2356
- function qi(e, t) {
2398
+ function Qi(e, t) {
2357
2399
  if (t) {
2358
2400
  if (t[0] === ">" && (t = t.substring(1)), e) try {
2359
2401
  if (e.matches) return e.matches(t);
@@ -2365,41 +2407,41 @@ function qi(e, t) {
2365
2407
  return !1;
2366
2408
  }
2367
2409
  }
2368
- function Ji(e) {
2410
+ function $i(e) {
2369
2411
  return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
2370
2412
  }
2371
- function Yi(e, t, n, r) {
2413
+ function ea(e, t, n, r) {
2372
2414
  if (e) {
2373
2415
  n ||= document;
2374
2416
  do {
2375
- if (t != null && (t[0] === ">" ? e.parentNode === n && qi(e, t) : qi(e, t)) || r && e === n) return e;
2417
+ if (t != null && (t[0] === ">" ? e.parentNode === n && Qi(e, t) : Qi(e, t)) || r && e === n) return e;
2376
2418
  if (e === n) break;
2377
- } while (e = Ji(e));
2419
+ } while (e = $i(e));
2378
2420
  }
2379
2421
  return null;
2380
2422
  }
2381
- var Xi = /\s+/g;
2382
- function z(e, t, n) {
2383
- e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Xi, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Xi, " "));
2423
+ var ta = /\s+/g;
2424
+ function R(e, t, n) {
2425
+ e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(ta, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(ta, " "));
2384
2426
  }
2385
- function B(e, t, n) {
2427
+ function z(e, t, n) {
2386
2428
  var r = e && e.style;
2387
2429
  if (r) {
2388
2430
  if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
2389
2431
  !(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
2390
2432
  }
2391
2433
  }
2392
- function Zi(e, t) {
2434
+ function na(e, t) {
2393
2435
  var n = "";
2394
2436
  if (typeof e == "string") n = e;
2395
2437
  else do {
2396
- var r = B(e, "transform");
2438
+ var r = z(e, "transform");
2397
2439
  r && r !== "none" && (n = r + " " + n);
2398
2440
  } while (!t && (e = e.parentNode));
2399
2441
  var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
2400
2442
  return i && new i(n);
2401
2443
  }
2402
- function Qi(e, t, n) {
2444
+ function ra(e, t, n) {
2403
2445
  if (e) {
2404
2446
  var r = e.getElementsByTagName(t), i = 0, a = r.length;
2405
2447
  if (n) for (; i < a; i++) n(r[i], i);
@@ -2407,21 +2449,21 @@ function Qi(e, t, n) {
2407
2449
  }
2408
2450
  return [];
2409
2451
  }
2410
- function $i() {
2452
+ function ia() {
2411
2453
  return document.scrollingElement || document.documentElement;
2412
2454
  }
2413
- function V(e, t, n, r, i) {
2455
+ function B(e, t, n, r, i) {
2414
2456
  if (!(!e.getBoundingClientRect && e !== window)) {
2415
2457
  var a, o, s, c, l, u, d;
2416
- if (e !== window && e.parentNode && e !== $i() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !Bi)) do
2417
- if (i && i.getBoundingClientRect && (B(i, "transform") !== "none" || n && B(i, "position") !== "static")) {
2458
+ if (e !== window && e.parentNode && e !== ia() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !Gi)) do
2459
+ if (i && i.getBoundingClientRect && (z(i, "transform") !== "none" || n && z(i, "position") !== "static")) {
2418
2460
  var f = i.getBoundingClientRect();
2419
- o -= f.top + parseInt(B(i, "border-top-width")), s -= f.left + parseInt(B(i, "border-left-width")), c = o + a.height, l = s + a.width;
2461
+ o -= f.top + parseInt(z(i, "border-top-width")), s -= f.left + parseInt(z(i, "border-left-width")), c = o + a.height, l = s + a.width;
2420
2462
  break;
2421
2463
  }
2422
2464
  while (i = i.parentNode);
2423
2465
  if (r && e !== window) {
2424
- var p = Zi(i || e), m = p && p.a, h = p && p.d;
2466
+ var p = na(i || e), m = p && p.a, h = p && p.d;
2425
2467
  p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
2426
2468
  }
2427
2469
  return {
@@ -2434,18 +2476,18 @@ function V(e, t, n, r, i) {
2434
2476
  };
2435
2477
  }
2436
2478
  }
2437
- function ea(e, t, n) {
2438
- for (var r = oa(e, !0), i = V(e)[t]; r;) {
2439
- var a = V(r)[n], o = void 0;
2479
+ function aa(e, t, n) {
2480
+ for (var r = da(e, !0), i = B(e)[t]; r;) {
2481
+ var a = B(r)[n], o = void 0;
2440
2482
  if (o = i >= a, !o) return r;
2441
- if (r === $i()) break;
2442
- r = oa(r, !1);
2483
+ if (r === ia()) break;
2484
+ r = da(r, !1);
2443
2485
  }
2444
2486
  return !1;
2445
2487
  }
2446
- function ta(e, t, n, r) {
2488
+ function oa(e, t, n, r) {
2447
2489
  for (var i = 0, a = 0, o = e.children; a < o.length;) {
2448
- if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Yi(o[a], n.draggable, e, !1)) {
2490
+ if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && ea(o[a], n.draggable, e, !1)) {
2449
2491
  if (i === t) return o[a];
2450
2492
  i++;
2451
2493
  }
@@ -2453,96 +2495,96 @@ function ta(e, t, n, r) {
2453
2495
  }
2454
2496
  return null;
2455
2497
  }
2456
- function na(e, t) {
2457
- for (var n = e.lastElementChild; n && (n === Q.ghost || B(n, "display") === "none" || t && !qi(n, t));) n = n.previousElementSibling;
2498
+ function sa(e, t) {
2499
+ for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !Qi(n, t));) n = n.previousElementSibling;
2458
2500
  return n || null;
2459
2501
  }
2460
- function ra(e, t) {
2502
+ function ca(e, t) {
2461
2503
  var n = 0;
2462
2504
  if (!e || !e.parentNode) return -1;
2463
- for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || qi(e, t)) && n++;
2505
+ for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || Qi(e, t)) && n++;
2464
2506
  return n;
2465
2507
  }
2466
- function ia(e) {
2467
- var t = 0, n = 0, r = $i();
2508
+ function la(e) {
2509
+ var t = 0, n = 0, r = ia();
2468
2510
  if (e) do {
2469
- var i = Zi(e), a = i.a, o = i.d;
2511
+ var i = na(e), a = i.a, o = i.d;
2470
2512
  t += e.scrollLeft * a, n += e.scrollTop * o;
2471
2513
  } while (e !== r && (e = e.parentNode));
2472
2514
  return [t, n];
2473
2515
  }
2474
- function aa(e, t) {
2516
+ function ua(e, t) {
2475
2517
  for (var n in e) if (e.hasOwnProperty(n)) {
2476
2518
  for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
2477
2519
  }
2478
2520
  return -1;
2479
2521
  }
2480
- function oa(e, t) {
2481
- if (!e || !e.getBoundingClientRect) return $i();
2522
+ function da(e, t) {
2523
+ if (!e || !e.getBoundingClientRect) return ia();
2482
2524
  var n = e, r = !1;
2483
2525
  do
2484
2526
  if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
2485
- var i = B(n);
2527
+ var i = z(n);
2486
2528
  if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
2487
- if (!n.getBoundingClientRect || n === document.body) return $i();
2529
+ if (!n.getBoundingClientRect || n === document.body) return ia();
2488
2530
  if (r || t) return n;
2489
2531
  r = !0;
2490
2532
  }
2491
2533
  }
2492
2534
  while (n = n.parentNode);
2493
- return $i();
2535
+ return ia();
2494
2536
  }
2495
- function sa(e, t) {
2537
+ function fa(e, t) {
2496
2538
  if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
2497
2539
  return e;
2498
2540
  }
2499
- function ca(e, t) {
2541
+ function pa(e, t) {
2500
2542
  return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
2501
2543
  }
2502
- var la;
2503
- function ua(e, t) {
2544
+ var ma;
2545
+ function ha(e, t) {
2504
2546
  return function() {
2505
- if (!la) {
2547
+ if (!ma) {
2506
2548
  var n = arguments, r = this;
2507
- n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), la = setTimeout(function() {
2508
- la = void 0;
2549
+ n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), ma = setTimeout(function() {
2550
+ ma = void 0;
2509
2551
  }, t);
2510
2552
  }
2511
2553
  };
2512
2554
  }
2513
- function da() {
2514
- clearTimeout(la), la = void 0;
2555
+ function ga() {
2556
+ clearTimeout(ma), ma = void 0;
2515
2557
  }
2516
- function fa(e, t, n) {
2558
+ function _a(e, t, n) {
2517
2559
  e.scrollLeft += t, e.scrollTop += n;
2518
2560
  }
2519
- function pa(e) {
2561
+ function va(e) {
2520
2562
  var t = window.Polymer, n = window.jQuery || window.Zepto;
2521
2563
  return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
2522
2564
  }
2523
- function ma(e, t, n) {
2565
+ function ya(e, t, n) {
2524
2566
  var r = {};
2525
2567
  return Array.from(e.children).forEach(function(i) {
2526
- if (!(!Yi(i, t.draggable, e, !1) || i.animated || i === n)) {
2527
- var a = V(i);
2568
+ if (!(!ea(i, t.draggable, e, !1) || i.animated || i === n)) {
2569
+ var a = B(i);
2528
2570
  r.left = Math.min(r.left ?? Infinity, a.left), r.top = Math.min(r.top ?? Infinity, a.top), r.right = Math.max(r.right ?? -Infinity, a.right), r.bottom = Math.max(r.bottom ?? -Infinity, a.bottom);
2529
2571
  }
2530
2572
  }), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
2531
2573
  }
2532
- var H = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
2533
- function ha() {
2574
+ var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
2575
+ function ba() {
2534
2576
  var e = [], t;
2535
2577
  return {
2536
2578
  captureAnimationState: function() {
2537
2579
  e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
2538
- if (!(B(t, "display") === "none" || t === Q.ghost)) {
2580
+ if (!(z(t, "display") === "none" || t === Q.ghost)) {
2539
2581
  e.push({
2540
2582
  target: t,
2541
- rect: V(t)
2583
+ rect: B(t)
2542
2584
  });
2543
- var n = Mi({}, e[e.length - 1].rect);
2585
+ var n = Li({}, e[e.length - 1].rect);
2544
2586
  if (t.thisAnimationDuration) {
2545
- var r = Zi(t, !0);
2587
+ var r = na(t, !0);
2546
2588
  r && (n.top -= r.f, n.left -= r.e);
2547
2589
  }
2548
2590
  t.fromRect = n;
@@ -2553,7 +2595,7 @@ function ha() {
2553
2595
  e.push(t);
2554
2596
  },
2555
2597
  removeAnimationState: function(t) {
2556
- e.splice(aa(e, { target: t }), 1);
2598
+ e.splice(ua(e, { target: t }), 1);
2557
2599
  },
2558
2600
  animateAll: function(n) {
2559
2601
  var r = this;
@@ -2563,8 +2605,8 @@ function ha() {
2563
2605
  }
2564
2606
  var i = !1, a = 0;
2565
2607
  e.forEach(function(e) {
2566
- var t = 0, n = e.target, o = n.fromRect, s = V(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Zi(n, !0);
2567
- d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && ca(c, s) && !ca(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = _a(u, c, l, r.options)), ca(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
2608
+ var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = na(n, !0);
2609
+ d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && pa(c, s) && !pa(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Sa(u, c, l, r.options)), pa(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
2568
2610
  n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
2569
2611
  }, t), n.thisAnimationDuration = t);
2570
2612
  }), clearTimeout(t), i ? t = setTimeout(function() {
@@ -2573,27 +2615,27 @@ function ha() {
2573
2615
  },
2574
2616
  animate: function(e, t, n, r) {
2575
2617
  if (r) {
2576
- B(e, "transition", ""), B(e, "transform", "");
2577
- var i = Zi(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
2578
- e.animatingX = !!s, e.animatingY = !!c, B(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = ga(e), B(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), B(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
2579
- B(e, "transition", ""), B(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
2618
+ z(e, "transition", ""), z(e, "transform", "");
2619
+ var i = na(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
2620
+ e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = xa(e), z(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), z(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
2621
+ z(e, "transition", ""), z(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
2580
2622
  }, r);
2581
2623
  }
2582
2624
  }
2583
2625
  };
2584
2626
  }
2585
- function ga(e) {
2627
+ function xa(e) {
2586
2628
  return e.offsetWidth;
2587
2629
  }
2588
- function _a(e, t, n, r) {
2630
+ function Sa(e, t, n, r) {
2589
2631
  return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
2590
2632
  }
2591
- var va = [], ya = { initializeByDefault: !0 }, ba = {
2633
+ var Ca = [], wa = { initializeByDefault: !0 }, Ta = {
2592
2634
  mount: function(e) {
2593
- for (var t in ya) ya.hasOwnProperty(t) && !(t in e) && (e[t] = ya[t]);
2594
- va.forEach(function(t) {
2635
+ for (var t in wa) wa.hasOwnProperty(t) && !(t in e) && (e[t] = wa[t]);
2636
+ Ca.forEach(function(t) {
2595
2637
  if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
2596
- }), va.push(e);
2638
+ }), Ca.push(e);
2597
2639
  },
2598
2640
  pluginEvent: function(e, t, n) {
2599
2641
  var r = this;
@@ -2601,16 +2643,16 @@ var va = [], ya = { initializeByDefault: !0 }, ba = {
2601
2643
  r.eventCanceled = !0;
2602
2644
  };
2603
2645
  var i = e + "Global";
2604
- va.forEach(function(r) {
2605
- t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Mi({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Mi({ sortable: t }, n)));
2646
+ Ca.forEach(function(r) {
2647
+ t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Li({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Li({ sortable: t }, n)));
2606
2648
  });
2607
2649
  },
2608
2650
  initializePlugins: function(e, t, n, r) {
2609
- for (var i in va.forEach(function(r) {
2651
+ for (var i in Ca.forEach(function(r) {
2610
2652
  var i = r.pluginName;
2611
2653
  if (!(!e.options[i] && !r.initializeByDefault)) {
2612
2654
  var a = new r(e, t, e.options);
2613
- a.sortable = e, a.options = e.options, e[i] = a, Fi(n, a.defaults);
2655
+ a.sortable = e, a.options = e.options, e[i] = a, Bi(n, a.defaults);
2614
2656
  }
2615
2657
  }), e.options) if (e.options.hasOwnProperty(i)) {
2616
2658
  var a = this.modifyOption(e, i, e.options[i]);
@@ -2619,59 +2661,59 @@ var va = [], ya = { initializeByDefault: !0 }, ba = {
2619
2661
  },
2620
2662
  getEventProperties: function(e, t) {
2621
2663
  var n = {};
2622
- return va.forEach(function(r) {
2623
- typeof r.eventProperties == "function" && Fi(n, r.eventProperties.call(t[r.pluginName], e));
2664
+ return Ca.forEach(function(r) {
2665
+ typeof r.eventProperties == "function" && Bi(n, r.eventProperties.call(t[r.pluginName], e));
2624
2666
  }), n;
2625
2667
  },
2626
2668
  modifyOption: function(e, t, n) {
2627
2669
  var r;
2628
- return va.forEach(function(i) {
2670
+ return Ca.forEach(function(i) {
2629
2671
  e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
2630
2672
  }), r;
2631
2673
  }
2632
2674
  };
2633
- function xa(e) {
2675
+ function Ea(e) {
2634
2676
  var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
2635
- if (t ||= n && n[H], t) {
2677
+ if (t ||= n && n[V], t) {
2636
2678
  var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
2637
- window.CustomEvent && !Bi && !Vi ? h = new CustomEvent(r, {
2679
+ window.CustomEvent && !Gi && !Ki ? h = new CustomEvent(r, {
2638
2680
  bubbles: !0,
2639
2681
  cancelable: !0
2640
2682
  }) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
2641
- var v = Mi(Mi({}, m), ba.getEventProperties(r, t));
2683
+ var v = Li(Li({}, m), Ta.getEventProperties(r, t));
2642
2684
  for (var y in v) h[y] = v[y];
2643
2685
  n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
2644
2686
  }
2645
2687
  }
2646
- var Sa = ["evt"], U = function(e, t) {
2647
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Li(n, Sa);
2648
- ba.pluginEvent.bind(Q)(e, t, Mi({
2649
- dragEl: G,
2650
- parentEl: K,
2651
- ghostEl: q,
2652
- rootEl: J,
2653
- nextEl: Ca,
2654
- lastDownEl: wa,
2655
- cloneEl: Y,
2656
- cloneHidden: Ta,
2657
- dragStarted: Ba,
2688
+ var Da = ["evt"], H = function(e, t) {
2689
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Hi(n, Da);
2690
+ Ta.pluginEvent.bind(Q)(e, t, Li({
2691
+ dragEl: W,
2692
+ parentEl: G,
2693
+ ghostEl: K,
2694
+ rootEl: q,
2695
+ nextEl: Oa,
2696
+ lastDownEl: ka,
2697
+ cloneEl: J,
2698
+ cloneHidden: Aa,
2699
+ dragStarted: Wa,
2658
2700
  putSortable: X,
2659
2701
  activeSortable: Q.active,
2660
2702
  originalEvent: r,
2661
- oldIndex: Ea,
2662
- oldDraggableIndex: Oa,
2663
- newIndex: Da,
2664
- newDraggableIndex: ka,
2665
- hideGhostForTarget: io,
2666
- unhideGhostForTarget: ao,
2703
+ oldIndex: ja,
2704
+ oldDraggableIndex: Ma,
2705
+ newIndex: Y,
2706
+ newDraggableIndex: Na,
2707
+ hideGhostForTarget: co,
2708
+ unhideGhostForTarget: lo,
2667
2709
  cloneNowHidden: function() {
2668
- Ta = !0;
2710
+ Aa = !0;
2669
2711
  },
2670
2712
  cloneNowShown: function() {
2671
- Ta = !1;
2713
+ Aa = !1;
2672
2714
  },
2673
2715
  dispatchSortableEvent: function(e) {
2674
- W({
2716
+ U({
2675
2717
  sortable: t,
2676
2718
  name: e,
2677
2719
  originalEvent: r
@@ -2679,46 +2721,46 @@ var Sa = ["evt"], U = function(e, t) {
2679
2721
  }
2680
2722
  }, i));
2681
2723
  };
2682
- function W(e) {
2683
- xa(Mi({
2724
+ function U(e) {
2725
+ Ea(Li({
2684
2726
  putSortable: X,
2685
- cloneEl: Y,
2686
- targetEl: G,
2687
- rootEl: J,
2688
- oldIndex: Ea,
2689
- oldDraggableIndex: Oa,
2690
- newIndex: Da,
2691
- newDraggableIndex: ka
2727
+ cloneEl: J,
2728
+ targetEl: W,
2729
+ rootEl: q,
2730
+ oldIndex: ja,
2731
+ oldDraggableIndex: Ma,
2732
+ newIndex: Y,
2733
+ newDraggableIndex: Na
2692
2734
  }, e));
2693
2735
  }
2694
- var G, K, q, J, Ca, wa, Y, Ta, Ea, Da, Oa, ka, Aa, X, ja = !1, Ma = !1, Na = [], Pa, Fa, Ia, La, Ra, za, Ba, Va, Ha, Ua = !1, Wa = !1, Ga, Z, Ka = [], qa = !1, Ja = [], Ya = typeof document < "u", Xa = Wi, Za = Vi || Bi ? "cssFloat" : "float", Qa = Ya && !Gi && !Wi && "draggable" in document.createElement("div"), $a = function() {
2695
- if (Ya) {
2696
- if (Bi) return !1;
2736
+ var W, G, K, q, Oa, ka, J, Aa, ja, Y, Ma, Na, Pa, X, Fa = !1, Ia = !1, La = [], Ra, za, Ba, Va, Ha, Ua, Wa, Ga, Ka, qa = !1, Ja = !1, Ya, Z, Xa = [], Za = !1, Qa = [], $a = typeof document < "u", eo = Yi, to = Ki || Gi ? "cssFloat" : "float", no = $a && !Xi && !Yi && "draggable" in document.createElement("div"), ro = function() {
2737
+ if ($a) {
2738
+ if (Gi) return !1;
2697
2739
  var e = document.createElement("x");
2698
2740
  return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
2699
2741
  }
2700
- }(), eo = function(e, t) {
2701
- var n = B(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = ta(e, 0, t), a = ta(e, 1, t), o = i && B(i), s = a && B(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + V(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + V(a).width;
2742
+ }(), io = function(e, t) {
2743
+ var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = oa(e, 0, t), a = oa(e, 1, t), o = i && z(i), s = a && z(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + B(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + B(a).width;
2702
2744
  if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
2703
2745
  if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
2704
2746
  if (i && o.float && o.float !== "none") {
2705
2747
  var u = o.float === "left" ? "left" : "right";
2706
2748
  return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
2707
2749
  }
2708
- return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Za] === "none" || a && n[Za] === "none" && c + l > r) ? "vertical" : "horizontal";
2709
- }, to = function(e, t, n) {
2750
+ return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[to] === "none" || a && n[to] === "none" && c + l > r) ? "vertical" : "horizontal";
2751
+ }, ao = function(e, t, n) {
2710
2752
  var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
2711
2753
  return r === o || i === s || r + a / 2 === o + c / 2;
2712
- }, no = function(e, t) {
2754
+ }, oo = function(e, t) {
2713
2755
  var n;
2714
- return Na.some(function(r) {
2715
- var i = r[H].options.emptyInsertThreshold;
2716
- if (!(!i || na(r))) {
2717
- var a = V(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
2756
+ return La.some(function(r) {
2757
+ var i = r[V].options.emptyInsertThreshold;
2758
+ if (!(!i || sa(r))) {
2759
+ var a = B(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
2718
2760
  if (o && s) return n = r;
2719
2761
  }
2720
2762
  }), n;
2721
- }, ro = function(e) {
2763
+ }, so = function(e) {
2722
2764
  function t(e, n) {
2723
2765
  return function(r, i, a, o) {
2724
2766
  var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
@@ -2731,31 +2773,31 @@ var G, K, q, J, Ca, wa, Y, Ta, Ea, Da, Oa, ka, Aa, X, ja = !1, Ma = !1, Na = [],
2731
2773
  };
2732
2774
  }
2733
2775
  var n = {}, r = e.group;
2734
- (!r || Ni(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
2735
- }, io = function() {
2736
- !$a && q && B(q, "display", "none");
2737
- }, ao = function() {
2738
- !$a && q && B(q, "display", "");
2776
+ (!r || Ri(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
2777
+ }, co = function() {
2778
+ !ro && K && z(K, "display", "none");
2779
+ }, lo = function() {
2780
+ !ro && K && z(K, "display", "");
2739
2781
  };
2740
- Ya && !Gi && document.addEventListener("click", function(e) {
2741
- if (Ma) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Ma = !1, !1;
2782
+ $a && !Xi && document.addEventListener("click", function(e) {
2783
+ if (Ia) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Ia = !1, !1;
2742
2784
  }, !0);
2743
- var oo = function(e) {
2744
- if (G) {
2785
+ var uo = function(e) {
2786
+ if (W) {
2745
2787
  e = e.touches ? e.touches[0] : e;
2746
- var t = no(e.clientX, e.clientY);
2788
+ var t = oo(e.clientX, e.clientY);
2747
2789
  if (t) {
2748
2790
  var n = {};
2749
2791
  for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
2750
- n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[H]._onDragOver(n);
2792
+ n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
2751
2793
  }
2752
2794
  }
2753
- }, so = function(e) {
2754
- G && G.parentNode[H]._isOutsideThisEl(e.target);
2795
+ }, fo = function(e) {
2796
+ W && W.parentNode[V]._isOutsideThisEl(e.target);
2755
2797
  };
2756
2798
  function Q(e, t) {
2757
2799
  if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
2758
- this.el = e, this.options = t = Fi({}, t), e[H] = this;
2800
+ this.el = e, this.options = t = Bi({}, t), e[V] = this;
2759
2801
  var n = {
2760
2802
  group: null,
2761
2803
  sort: !0,
@@ -2768,7 +2810,7 @@ function Q(e, t) {
2768
2810
  invertedSwapThreshold: null,
2769
2811
  removeCloneOnHide: !0,
2770
2812
  direction: function() {
2771
- return eo(e, this.options);
2813
+ return io(e, this.options);
2772
2814
  },
2773
2815
  ghostClass: "sortable-ghost",
2774
2816
  chosenClass: "sortable-chosen",
@@ -2795,80 +2837,80 @@ function Q(e, t) {
2795
2837
  x: 0,
2796
2838
  y: 0
2797
2839
  },
2798
- supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Ui,
2840
+ supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Ji,
2799
2841
  emptyInsertThreshold: 5
2800
2842
  };
2801
- for (var r in ba.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
2802
- for (var i in ro(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
2803
- this.nativeDraggable = t.forceFallback ? !1 : Qa, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? L(e, "pointerdown", this._onTapStart) : (L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart)), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), Na.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Fi(this, ha());
2843
+ for (var r in Ta.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
2844
+ for (var i in so(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
2845
+ this.nativeDraggable = !t.forceFallback && no, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? I(e, "pointerdown", this._onTapStart) : (I(e, "mousedown", this._onTapStart), I(e, "touchstart", this._onTapStart)), this.nativeDraggable && (I(e, "dragover", this), I(e, "dragenter", this)), La.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Bi(this, ba());
2804
2846
  }
2805
2847
  Q.prototype = {
2806
2848
  constructor: Q,
2807
2849
  _isOutsideThisEl: function(e) {
2808
- !this.el.contains(e) && e !== this.el && (Va = null);
2850
+ !this.el.contains(e) && e !== this.el && (Ga = null);
2809
2851
  },
2810
2852
  _getDirection: function(e, t) {
2811
- return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
2853
+ return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
2812
2854
  },
2813
2855
  _onTapStart: function(e) {
2814
2856
  if (e.cancelable) {
2815
2857
  var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
2816
- if (vo(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Ui && s && s.tagName.toUpperCase() === "SELECT") && (s = Yi(s, r.draggable, n, !1), !(s && s.animated) && wa !== s)) {
2817
- if (Ea = ra(s), Oa = ra(s, r.draggable), typeof l == "function") {
2858
+ if (So(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Ji && s && s.tagName.toUpperCase() === "SELECT") && (s = ea(s, r.draggable, n, !1), !(s && s.animated) && ka !== s)) {
2859
+ if (ja = ca(s), Ma = ca(s, r.draggable), typeof l == "function") {
2818
2860
  if (l.call(this, e, s, this)) {
2819
- W({
2861
+ U({
2820
2862
  sortable: t,
2821
2863
  rootEl: c,
2822
2864
  name: "filter",
2823
2865
  targetEl: s,
2824
2866
  toEl: n,
2825
2867
  fromEl: n
2826
- }), U("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
2868
+ }), H("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
2827
2869
  return;
2828
2870
  }
2829
2871
  } else if (l && (l = l.split(",").some(function(r) {
2830
- if (r = Yi(c, r.trim(), n, !1), r) return W({
2872
+ if (r = ea(c, r.trim(), n, !1), r) return U({
2831
2873
  sortable: t,
2832
2874
  rootEl: r,
2833
2875
  name: "filter",
2834
2876
  targetEl: s,
2835
2877
  fromEl: n,
2836
2878
  toEl: n
2837
- }), U("filter", t, { evt: e }), !0;
2879
+ }), H("filter", t, { evt: e }), !0;
2838
2880
  }), l)) {
2839
2881
  i && e.cancelable && e.preventDefault();
2840
2882
  return;
2841
2883
  }
2842
- r.handle && !Yi(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
2884
+ r.handle && !ea(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
2843
2885
  }
2844
2886
  }
2845
2887
  },
2846
2888
  _prepareDragStart: function(e, t, n) {
2847
2889
  var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
2848
- if (n && !G && n.parentNode === i) {
2849
- var c = V(n);
2850
- if (J = i, G = n, K = G.parentNode, Ca = G.nextSibling, wa = n, Aa = a.group, Q.dragged = G, Pa = {
2851
- target: G,
2890
+ if (n && !W && n.parentNode === i) {
2891
+ var c = B(n);
2892
+ if (q = i, W = n, G = W.parentNode, Oa = W.nextSibling, ka = n, Pa = a.group, Q.dragged = W, Ra = {
2893
+ target: W,
2852
2894
  clientX: (t || e).clientX,
2853
2895
  clientY: (t || e).clientY
2854
- }, Ra = Pa.clientX - c.left, za = Pa.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
2855
- if (U("delayEnded", r, { evt: e }), Q.eventCanceled) {
2896
+ }, Ha = Ra.clientX - c.left, Ua = Ra.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
2897
+ if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
2856
2898
  r._onDrop();
2857
2899
  return;
2858
2900
  }
2859
- r._disableDelayedDragEvents(), !Hi && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), W({
2901
+ r._disableDelayedDragEvents(), !qi && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
2860
2902
  sortable: r,
2861
2903
  name: "choose",
2862
2904
  originalEvent: e
2863
- }), z(G, a.chosenClass, !0);
2905
+ }), R(W, a.chosenClass, !0);
2864
2906
  }, a.ignore.split(",").forEach(function(e) {
2865
- Qi(G, e.trim(), uo);
2866
- }), L(o, "dragover", oo), L(o, "mousemove", oo), L(o, "touchmove", oo), L(o, "mouseup", r._onDrop), L(o, "touchend", r._onDrop), L(o, "touchcancel", r._onDrop), Hi && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), U("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Vi || Bi))) {
2907
+ ra(W, e.trim(), ho);
2908
+ }), I(o, "dragover", uo), I(o, "mousemove", uo), I(o, "touchmove", uo), I(o, "mouseup", r._onDrop), I(o, "touchend", r._onDrop), I(o, "touchcancel", r._onDrop), qi && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Ki || Gi))) {
2867
2909
  if (Q.eventCanceled) {
2868
2910
  this._onDrop();
2869
2911
  return;
2870
2912
  }
2871
- L(o, "mouseup", r._disableDelayedDrag), L(o, "touchend", r._disableDelayedDrag), L(o, "touchcancel", r._disableDelayedDrag), L(o, "mousemove", r._delayedDragTouchMoveHandler), L(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && L(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
2913
+ I(o, "mouseup", r._disableDelayedDrag), I(o, "touchend", r._disableDelayedDrag), I(o, "touchcancel", r._disableDelayedDrag), I(o, "mousemove", r._delayedDragTouchMoveHandler), I(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && I(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
2872
2914
  } else s();
2873
2915
  }
2874
2916
  },
@@ -2877,25 +2919,25 @@ Q.prototype = {
2877
2919
  Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
2878
2920
  },
2879
2921
  _disableDelayedDrag: function() {
2880
- G && uo(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
2922
+ W && ho(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
2881
2923
  },
2882
2924
  _disableDelayedDragEvents: function() {
2883
2925
  var e = this.el.ownerDocument;
2884
- R(e, "mouseup", this._disableDelayedDrag), R(e, "touchend", this._disableDelayedDrag), R(e, "touchcancel", this._disableDelayedDrag), R(e, "mousemove", this._delayedDragTouchMoveHandler), R(e, "touchmove", this._delayedDragTouchMoveHandler), R(e, "pointermove", this._delayedDragTouchMoveHandler);
2926
+ L(e, "mouseup", this._disableDelayedDrag), L(e, "touchend", this._disableDelayedDrag), L(e, "touchcancel", this._disableDelayedDrag), L(e, "mousemove", this._delayedDragTouchMoveHandler), L(e, "touchmove", this._delayedDragTouchMoveHandler), L(e, "pointermove", this._delayedDragTouchMoveHandler);
2885
2927
  },
2886
2928
  _triggerDragStart: function(e, t) {
2887
- t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? L(document, "pointermove", this._onTouchMove) : t ? L(document, "touchmove", this._onTouchMove) : L(document, "mousemove", this._onTouchMove) : (L(G, "dragend", this), L(J, "dragstart", this._onDragStart));
2929
+ t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? I(document, "pointermove", this._onTouchMove) : t ? I(document, "touchmove", this._onTouchMove) : I(document, "mousemove", this._onTouchMove) : (I(W, "dragend", this), I(q, "dragstart", this._onDragStart));
2888
2930
  try {
2889
- document.selection ? yo(function() {
2931
+ document.selection ? Co(function() {
2890
2932
  document.selection.empty();
2891
2933
  }) : window.getSelection().removeAllRanges();
2892
2934
  } catch {}
2893
2935
  },
2894
2936
  _dragStarted: function(e, t) {
2895
- if (ja = !1, J && G) {
2896
- U("dragStarted", this, { evt: t }), this.nativeDraggable && L(document, "dragover", so);
2937
+ if (Fa = !1, q && W) {
2938
+ H("dragStarted", this, { evt: t }), this.nativeDraggable && I(document, "dragover", fo);
2897
2939
  var n = this.options;
2898
- !e && z(G, n.dragClass, !1), z(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), W({
2940
+ !e && R(W, n.dragClass, !1), R(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
2899
2941
  sortable: this,
2900
2942
  name: "start",
2901
2943
  originalEvent: t
@@ -2903,33 +2945,33 @@ Q.prototype = {
2903
2945
  } else this._nulling();
2904
2946
  },
2905
2947
  _emulateDragOver: function() {
2906
- if (Fa) {
2907
- this._lastX = Fa.clientX, this._lastY = Fa.clientY, io();
2908
- for (var e = document.elementFromPoint(Fa.clientX, Fa.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Fa.clientX, Fa.clientY), e !== t);) t = e;
2909
- if (G.parentNode[H]._isOutsideThisEl(e), t) do {
2910
- if (t[H]) {
2948
+ if (za) {
2949
+ this._lastX = za.clientX, this._lastY = za.clientY, co();
2950
+ for (var e = document.elementFromPoint(za.clientX, za.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(za.clientX, za.clientY), e !== t);) t = e;
2951
+ if (W.parentNode[V]._isOutsideThisEl(e), t) do {
2952
+ if (t[V]) {
2911
2953
  var n = void 0;
2912
- if (n = t[H]._onDragOver({
2913
- clientX: Fa.clientX,
2914
- clientY: Fa.clientY,
2954
+ if (n = t[V]._onDragOver({
2955
+ clientX: za.clientX,
2956
+ clientY: za.clientY,
2915
2957
  target: e,
2916
2958
  rootEl: t
2917
2959
  }), n && !this.options.dragoverBubble) break;
2918
2960
  }
2919
2961
  e = t;
2920
2962
  } while (t = t.parentNode);
2921
- ao();
2963
+ lo();
2922
2964
  }
2923
2965
  },
2924
2966
  _onTouchMove: function(e) {
2925
- if (Pa) {
2926
- var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && Zi(q, !0), o = q && a && a.a, s = q && a && a.d, c = Xa && Z && ia(Z), l = (i.clientX - Pa.clientX + r.x) / (o || 1) + (c ? c[0] - Ka[0] : 0) / (o || 1), u = (i.clientY - Pa.clientY + r.y) / (s || 1) + (c ? c[1] - Ka[1] : 0) / (s || 1);
2927
- if (!Q.active && !ja) {
2967
+ if (Ra) {
2968
+ var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && na(K, !0), o = K && a && a.a, s = K && a && a.d, c = eo && Z && la(Z), l = (i.clientX - Ra.clientX + r.x) / (o || 1) + (c ? c[0] - Xa[0] : 0) / (o || 1), u = (i.clientY - Ra.clientY + r.y) / (s || 1) + (c ? c[1] - Xa[1] : 0) / (s || 1);
2969
+ if (!Q.active && !Fa) {
2928
2970
  if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
2929
2971
  this._onDragStart(e, !0);
2930
2972
  }
2931
- if (q) {
2932
- a ? (a.e += l - (Ia || 0), a.f += u - (La || 0)) : a = {
2973
+ if (K) {
2974
+ a ? (a.e += l - (Ba || 0), a.f += u - (Va || 0)) : a = {
2933
2975
  a: 1,
2934
2976
  b: 0,
2935
2977
  c: 0,
@@ -2938,39 +2980,39 @@ Q.prototype = {
2938
2980
  f: u
2939
2981
  };
2940
2982
  var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
2941
- B(q, "webkitTransform", d), B(q, "mozTransform", d), B(q, "msTransform", d), B(q, "transform", d), Ia = l, La = u, Fa = i;
2983
+ z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d), Ba = l, Va = u, za = i;
2942
2984
  }
2943
2985
  e.cancelable && e.preventDefault();
2944
2986
  }
2945
2987
  },
2946
2988
  _appendGhost: function() {
2947
- if (!q) {
2948
- var e = this.options.fallbackOnBody ? document.body : J, t = V(G, !0, Xa, !0, e), n = this.options;
2949
- if (Xa) {
2950
- for (Z = e; B(Z, "position") === "static" && B(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
2951
- Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = $i()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = $i(), Ka = ia(Z);
2989
+ if (!K) {
2990
+ var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0, eo, !0, e), n = this.options;
2991
+ if (eo) {
2992
+ for (Z = e; z(Z, "position") === "static" && z(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
2993
+ Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = ia()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = ia(), Xa = la(Z);
2952
2994
  }
2953
- q = G.cloneNode(!0), z(q, n.ghostClass, !1), z(q, n.fallbackClass, !0), z(q, n.dragClass, !0), B(q, "transition", ""), B(q, "transform", ""), B(q, "box-sizing", "border-box"), B(q, "margin", 0), B(q, "top", t.top), B(q, "left", t.left), B(q, "width", t.width), B(q, "height", t.height), B(q, "opacity", "0.8"), B(q, "position", Xa ? "absolute" : "fixed"), B(q, "zIndex", "100000"), B(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), B(q, "transform-origin", Ra / parseInt(q.style.width) * 100 + "% " + za / parseInt(q.style.height) * 100 + "%");
2995
+ K = W.cloneNode(!0), R(K, n.ghostClass, !1), R(K, n.fallbackClass, !0), R(K, n.dragClass, !0), z(K, "transition", ""), z(K, "transform", ""), z(K, "box-sizing", "border-box"), z(K, "margin", 0), z(K, "top", t.top), z(K, "left", t.left), z(K, "width", t.width), z(K, "height", t.height), z(K, "opacity", "0.8"), z(K, "position", eo ? "absolute" : "fixed"), z(K, "zIndex", "100000"), z(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), z(K, "transform-origin", Ha / parseInt(K.style.width) * 100 + "% " + Ua / parseInt(K.style.height) * 100 + "%");
2954
2996
  }
2955
2997
  },
2956
2998
  _onDragStart: function(e, t) {
2957
2999
  var n = this, r = e.dataTransfer, i = n.options;
2958
- if (U("dragStart", this, { evt: e }), Q.eventCanceled) {
3000
+ if (H("dragStart", this, { evt: e }), Q.eventCanceled) {
2959
3001
  this._onDrop();
2960
3002
  return;
2961
3003
  }
2962
- U("setupClone", this), Q.eventCanceled || (Y = pa(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), z(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = yo(function() {
2963
- U("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), W({
3004
+ H("setupClone", this), Q.eventCanceled || (J = va(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), R(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Co(function() {
3005
+ H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
2964
3006
  sortable: n,
2965
3007
  name: "clone"
2966
3008
  }));
2967
- }), !t && z(G, i.dragClass, !0), t ? (Ma = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (R(document, "mouseup", n._onDrop), R(document, "touchend", n._onDrop), R(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), L(document, "drop", n), B(G, "transform", "translateZ(0)")), ja = !0, n._dragStartId = yo(n._dragStarted.bind(n, t, e)), L(document, "selectstart", n), Ba = !0, Ui && B(document.body, "user-select", "none");
3009
+ }), !t && R(W, i.dragClass, !0), t ? (Ia = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (L(document, "mouseup", n._onDrop), L(document, "touchend", n._onDrop), L(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), I(document, "drop", n), z(W, "transform", "translateZ(0)")), Fa = !0, n._dragStartId = Co(n._dragStarted.bind(n, t, e)), I(document, "selectstart", n), Wa = !0, Ji && z(document.body, "user-select", "none");
2968
3010
  },
2969
3011
  _onDragOver: function(e) {
2970
- var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Aa === s, u = o.sort, d = X || c, f, p = this, m = !1;
2971
- if (qa) return;
3012
+ var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Pa === s, u = o.sort, d = X || c, f, p = this, m = !1;
3013
+ if (Za) return;
2972
3014
  function h(o, s) {
2973
- U(o, p, Mi({
3015
+ H(o, p, Li({
2974
3016
  evt: e,
2975
3017
  isOwner: l,
2976
3018
  axis: f ? "vertical" : "horizontal",
@@ -2982,7 +3024,7 @@ Q.prototype = {
2982
3024
  target: n,
2983
3025
  completed: _,
2984
3026
  onMove: function(n, i) {
2985
- return lo(J, t, G, r, n, V(n), e, i);
3027
+ return mo(q, t, W, r, n, B(n), e, i);
2986
3028
  },
2987
3029
  changed: v
2988
3030
  }, s));
@@ -2991,119 +3033,119 @@ Q.prototype = {
2991
3033
  h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
2992
3034
  }
2993
3035
  function _(r) {
2994
- return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (z(G, X ? X.options.ghostClass : c.options.ghostClass, !1), z(G, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
3036
+ return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (R(W, X ? X.options.ghostClass : c.options.ghostClass, !1), R(W, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
2995
3037
  h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
2996
- }), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (Va = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[H]._isOutsideThisEl(e.target), !r && oo(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
3038
+ }), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (Ga = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && uo(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
2997
3039
  }
2998
3040
  function v() {
2999
- Da = ra(G), ka = ra(G, o.draggable), W({
3041
+ Y = ca(W), Na = ca(W, o.draggable), U({
3000
3042
  sortable: p,
3001
3043
  name: "change",
3002
3044
  toEl: t,
3003
- newIndex: Da,
3004
- newDraggableIndex: ka,
3045
+ newIndex: Y,
3046
+ newDraggableIndex: Na,
3005
3047
  originalEvent: e
3006
3048
  });
3007
3049
  }
3008
- if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Yi(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
3009
- if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
3010
- if (Ma = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = Aa.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
3011
- if (f = this._getDirection(e, n) === "vertical", r = V(G), h("dragOverValid"), Q.eventCanceled) return m;
3012
- if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Ca ? J.insertBefore(G, Ca) : J.appendChild(G)), _(!0);
3013
- var y = na(t, o.draggable);
3014
- if (!y || mo(e, f, this) && !y.animated) {
3015
- if (y === G) return _(!1);
3016
- if (y && t === e.target && (n = y), n && (i = V(n)), lo(J, t, G, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(G, y.nextSibling) : t.appendChild(G), K = t, v(), _(!0);
3017
- } else if (y && po(e, f, this)) {
3018
- var b = ta(t, 0, o, !0);
3019
- if (b === G) return _(!1);
3020
- if (n = b, i = V(n), lo(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
3050
+ if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = ea(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
3051
+ if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
3052
+ if (Ia = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = Pa.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
3053
+ if (f = this._getDirection(e, n) === "vertical", r = B(W), h("dragOverValid"), Q.eventCanceled) return m;
3054
+ if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Oa ? q.insertBefore(W, Oa) : q.appendChild(W)), _(!0);
3055
+ var y = sa(t, o.draggable);
3056
+ if (!y || vo(e, f, this) && !y.animated) {
3057
+ if (y === W) return _(!1);
3058
+ if (y && t === e.target && (n = y), n && (i = B(n)), mo(q, t, W, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(W, y.nextSibling) : t.appendChild(W), G = t, v(), _(!0);
3059
+ } else if (y && _o(e, f, this)) {
3060
+ var b = oa(t, 0, o, !0);
3061
+ if (b === W) return _(!1);
3062
+ if (n = b, i = B(n), mo(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
3021
3063
  } else if (n.parentNode === t) {
3022
- i = V(n);
3023
- var x = 0, S, C = G.parentNode !== t, w = !to(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = ea(n, "top", "top") || ea(G, "top", "top"), ee = E ? E.scrollTop : void 0;
3024
- Va !== n && (S = i[T], Ua = !1, Wa = !w && o.invertSwap || C), x = ho(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Wa, Va === n);
3025
- var D;
3064
+ i = B(n);
3065
+ var x = 0, S, C = W.parentNode !== t, w = !ao(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = aa(n, "top", "top") || aa(W, "top", "top"), D = E ? E.scrollTop : void 0;
3066
+ Ga !== n && (S = i[T], qa = !1, Ja = !w && o.invertSwap || C), x = yo(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Ja, Ga === n);
3067
+ var O;
3026
3068
  if (x !== 0) {
3027
- var O = ra(G);
3069
+ var k = ca(W);
3028
3070
  do
3029
- O -= x, D = K.children[O];
3030
- while (D && (B(D, "display") === "none" || D === q));
3071
+ k -= x, O = G.children[k];
3072
+ while (O && (z(O, "display") === "none" || O === K));
3031
3073
  }
3032
- if (x === 0 || D === n) return _(!1);
3033
- Va = n, Ha = x;
3034
- var k = n.nextElementSibling, te = !1;
3035
- te = x === 1;
3036
- var A = lo(J, t, G, r, n, i, e, te);
3037
- if (A !== !1) return (A === 1 || A === -1) && (te = A === 1), qa = !0, setTimeout(fo, 30), g(), te && !k ? t.appendChild(G) : n.parentNode.insertBefore(G, te ? k : n), E && fa(E, 0, ee - E.scrollTop), K = G.parentNode, S !== void 0 && !Wa && (Ga = Math.abs(S - V(n)[T])), v(), _(!0);
3074
+ if (x === 0 || O === n) return _(!1);
3075
+ Ga = n, Ka = x;
3076
+ var ee = n.nextElementSibling, A = !1;
3077
+ A = x === 1;
3078
+ var te = mo(q, t, W, r, n, i, e, A);
3079
+ if (te !== !1) return (te === 1 || te === -1) && (A = te === 1), Za = !0, setTimeout(go, 30), g(), A && !ee ? t.appendChild(W) : n.parentNode.insertBefore(W, A ? ee : n), E && _a(E, 0, D - E.scrollTop), G = W.parentNode, S !== void 0 && !Ja && (Ya = Math.abs(S - B(n)[T])), v(), _(!0);
3038
3080
  }
3039
- if (t.contains(G)) return _(!1);
3081
+ if (t.contains(W)) return _(!1);
3040
3082
  }
3041
3083
  return !1;
3042
3084
  },
3043
3085
  _ignoreWhileAnimating: null,
3044
3086
  _offMoveEvents: function() {
3045
- R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover", oo), R(document, "mousemove", oo), R(document, "touchmove", oo);
3087
+ L(document, "mousemove", this._onTouchMove), L(document, "touchmove", this._onTouchMove), L(document, "pointermove", this._onTouchMove), L(document, "dragover", uo), L(document, "mousemove", uo), L(document, "touchmove", uo);
3046
3088
  },
3047
3089
  _offUpEvents: function() {
3048
3090
  var e = this.el.ownerDocument;
3049
- R(e, "mouseup", this._onDrop), R(e, "touchend", this._onDrop), R(e, "pointerup", this._onDrop), R(e, "touchcancel", this._onDrop), R(document, "selectstart", this);
3091
+ L(e, "mouseup", this._onDrop), L(e, "touchend", this._onDrop), L(e, "pointerup", this._onDrop), L(e, "touchcancel", this._onDrop), L(document, "selectstart", this);
3050
3092
  },
3051
3093
  _onDrop: function(e) {
3052
3094
  var t = this.el, n = this.options;
3053
- if (Da = ra(G), ka = ra(G, n.draggable), U("drop", this, { evt: e }), K = G && G.parentNode, Da = ra(G), ka = ra(G, n.draggable), Q.eventCanceled) {
3095
+ if (Y = ca(W), Na = ca(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = ca(W), Na = ca(W, n.draggable), Q.eventCanceled) {
3054
3096
  this._nulling();
3055
3097
  return;
3056
3098
  }
3057
- ja = !1, Wa = !1, Ua = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), bo(this.cloneId), bo(this._dragStartId), this.nativeDraggable && (R(document, "drop", this), R(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ui && B(document.body, "user-select", ""), B(G, "transform", ""), e && (Ba && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), q && q.parentNode && q.parentNode.removeChild(q), (J === K || X && X.lastPutMode !== "clone") && Y && Y.parentNode && Y.parentNode.removeChild(Y), G && (this.nativeDraggable && R(G, "dragend", this), uo(G), G.style["will-change"] = "", Ba && !ja && z(G, X ? X.options.ghostClass : this.options.ghostClass, !1), z(G, this.options.chosenClass, !1), W({
3099
+ Fa = !1, Ja = !1, qa = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), wo(this.cloneId), wo(this._dragStartId), this.nativeDraggable && (L(document, "drop", this), L(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ji && z(document.body, "user-select", ""), z(W, "transform", ""), e && (Wa && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), K && K.parentNode && K.parentNode.removeChild(K), (q === G || X && X.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), W && (this.nativeDraggable && L(W, "dragend", this), ho(W), W.style["will-change"] = "", Wa && !Fa && R(W, X ? X.options.ghostClass : this.options.ghostClass, !1), R(W, this.options.chosenClass, !1), U({
3058
3100
  sortable: this,
3059
3101
  name: "unchoose",
3060
- toEl: K,
3102
+ toEl: G,
3061
3103
  newIndex: null,
3062
3104
  newDraggableIndex: null,
3063
3105
  originalEvent: e
3064
- }), J === K ? Da !== Ea && Da >= 0 && (W({
3106
+ }), q === G ? Y !== ja && Y >= 0 && (U({
3065
3107
  sortable: this,
3066
3108
  name: "update",
3067
- toEl: K,
3109
+ toEl: G,
3068
3110
  originalEvent: e
3069
- }), W({
3111
+ }), U({
3070
3112
  sortable: this,
3071
3113
  name: "sort",
3072
- toEl: K,
3114
+ toEl: G,
3073
3115
  originalEvent: e
3074
- })) : (Da >= 0 && (W({
3075
- rootEl: K,
3116
+ })) : (Y >= 0 && (U({
3117
+ rootEl: G,
3076
3118
  name: "add",
3077
- toEl: K,
3078
- fromEl: J,
3119
+ toEl: G,
3120
+ fromEl: q,
3079
3121
  originalEvent: e
3080
- }), W({
3122
+ }), U({
3081
3123
  sortable: this,
3082
3124
  name: "remove",
3083
- toEl: K,
3125
+ toEl: G,
3084
3126
  originalEvent: e
3085
- }), W({
3086
- rootEl: K,
3127
+ }), U({
3128
+ rootEl: G,
3087
3129
  name: "sort",
3088
- toEl: K,
3089
- fromEl: J,
3130
+ toEl: G,
3131
+ fromEl: q,
3090
3132
  originalEvent: e
3091
- }), W({
3133
+ }), U({
3092
3134
  sortable: this,
3093
3135
  name: "sort",
3094
- toEl: K,
3136
+ toEl: G,
3095
3137
  originalEvent: e
3096
- })), X && X.save()), Q.active && ((Da == null || Da === -1) && (Da = Ea, ka = Oa), W({
3138
+ })), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = ja, Na = Ma), U({
3097
3139
  sortable: this,
3098
3140
  name: "end",
3099
- toEl: K,
3141
+ toEl: G,
3100
3142
  originalEvent: e
3101
3143
  }), this.save()))), this._nulling();
3102
3144
  },
3103
3145
  _nulling: function() {
3104
- U("nulling", this), J = G = K = q = Ca = Y = wa = Ta = Pa = Fa = Ba = Da = ka = Ea = Oa = Va = Ha = X = Aa = Q.dragged = Q.ghost = Q.clone = Q.active = null, Ja.forEach(function(e) {
3146
+ H("nulling", this), q = W = G = K = Oa = J = ka = Aa = Ra = za = Wa = Y = Na = ja = Ma = Ga = Ka = X = Pa = Q.dragged = Q.ghost = Q.clone = Q.active = null, Qa.forEach(function(e) {
3105
3147
  e.checked = !0;
3106
- }), Ja.length = Ia = La = 0;
3148
+ }), Qa.length = Ba = Va = 0;
3107
3149
  },
3108
3150
  handleEvent: function(e) {
3109
3151
  switch (e.type) {
@@ -3113,7 +3155,7 @@ Q.prototype = {
3113
3155
  break;
3114
3156
  case "dragenter":
3115
3157
  case "dragover":
3116
- G && (this._onDragOver(e), co(e));
3158
+ W && (this._onDragOver(e), po(e));
3117
3159
  break;
3118
3160
  case "selectstart":
3119
3161
  e.preventDefault();
@@ -3121,14 +3163,14 @@ Q.prototype = {
3121
3163
  }
3122
3164
  },
3123
3165
  toArray: function() {
3124
- for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Yi(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || _o(t));
3166
+ for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], ea(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || xo(t));
3125
3167
  return e;
3126
3168
  },
3127
3169
  sort: function(e, t) {
3128
3170
  var n = {}, r = this.el;
3129
3171
  this.toArray().forEach(function(e, t) {
3130
3172
  var i = r.children[t];
3131
- Yi(i, this.options.draggable, r, !1) && (n[e] = i);
3173
+ ea(i, this.options.draggable, r, !1) && (n[e] = i);
3132
3174
  }, this), t && this.captureAnimationState(), e.forEach(function(e) {
3133
3175
  n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
3134
3176
  }), t && this.animateAll();
@@ -3138,25 +3180,25 @@ Q.prototype = {
3138
3180
  e && e.set && e.set(this);
3139
3181
  },
3140
3182
  closest: function(e, t) {
3141
- return Yi(e, t || this.options.draggable, this.el, !1);
3183
+ return ea(e, t || this.options.draggable, this.el, !1);
3142
3184
  },
3143
3185
  option: function(e, t) {
3144
3186
  var n = this.options;
3145
3187
  if (t === void 0) return n[e];
3146
- var r = ba.modifyOption(this, e, t);
3147
- r === void 0 ? n[e] = t : n[e] = r, e === "group" && ro(n);
3188
+ var r = Ta.modifyOption(this, e, t);
3189
+ r === void 0 ? n[e] = t : n[e] = r, e === "group" && so(n);
3148
3190
  },
3149
3191
  destroy: function() {
3150
- U("destroy", this);
3192
+ H("destroy", this);
3151
3193
  var e = this.el;
3152
- e[H] = null, R(e, "mousedown", this._onTapStart), R(e, "touchstart", this._onTapStart), R(e, "pointerdown", this._onTapStart), this.nativeDraggable && (R(e, "dragover", this), R(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
3194
+ e[V] = null, L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart), L(e, "pointerdown", this._onTapStart), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
3153
3195
  e.removeAttribute("draggable");
3154
- }), this._onDrop(), this._disableDelayedDragEvents(), Na.splice(Na.indexOf(this.el), 1), this.el = e = null;
3196
+ }), this._onDrop(), this._disableDelayedDragEvents(), La.splice(La.indexOf(this.el), 1), this.el = e = null;
3155
3197
  },
3156
3198
  _hideClone: function() {
3157
- if (!Ta) {
3158
- if (U("hideClone", this), Q.eventCanceled) return;
3159
- B(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), Ta = !0;
3199
+ if (!Aa) {
3200
+ if (H("hideClone", this), Q.eventCanceled) return;
3201
+ z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Aa = !0;
3160
3202
  }
3161
3203
  },
3162
3204
  _showClone: function(e) {
@@ -3164,99 +3206,99 @@ Q.prototype = {
3164
3206
  this._hideClone();
3165
3207
  return;
3166
3208
  }
3167
- if (Ta) {
3168
- if (U("showClone", this), Q.eventCanceled) return;
3169
- G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : Ca ? J.insertBefore(Y, Ca) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), B(Y, "display", ""), Ta = !1;
3209
+ if (Aa) {
3210
+ if (H("showClone", this), Q.eventCanceled) return;
3211
+ W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : Oa ? q.insertBefore(J, Oa) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), z(J, "display", ""), Aa = !1;
3170
3212
  }
3171
3213
  }
3172
3214
  };
3173
- function co(e) {
3215
+ function po(e) {
3174
3216
  e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
3175
3217
  }
3176
- function lo(e, t, n, r, i, a, o, s) {
3177
- var c, l = e[H], u = l.options.onMove, d;
3178
- return window.CustomEvent && !Bi && !Vi ? c = new CustomEvent("move", {
3218
+ function mo(e, t, n, r, i, a, o, s) {
3219
+ var c, l = e[V], u = l.options.onMove, d;
3220
+ return window.CustomEvent && !Gi && !Ki ? c = new CustomEvent("move", {
3179
3221
  bubbles: !0,
3180
3222
  cancelable: !0
3181
- }) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || V(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
3223
+ }) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || B(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
3182
3224
  }
3183
- function uo(e) {
3225
+ function ho(e) {
3184
3226
  e.draggable = !1;
3185
3227
  }
3186
- function fo() {
3187
- qa = !1;
3228
+ function go() {
3229
+ Za = !1;
3188
3230
  }
3189
- function po(e, t, n) {
3190
- var r = V(ta(n.el, 0, n.options, !0)), i = ma(n.el, n.options, q), a = 10;
3231
+ function _o(e, t, n) {
3232
+ var r = B(oa(n.el, 0, n.options, !0)), i = ya(n.el, n.options, K), a = 10;
3191
3233
  return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
3192
3234
  }
3193
- function mo(e, t, n) {
3194
- var r = V(na(n.el, n.options.draggable)), i = ma(n.el, n.options, q), a = 10;
3235
+ function vo(e, t, n) {
3236
+ var r = B(sa(n.el, n.options.draggable)), i = ya(n.el, n.options, K), a = 10;
3195
3237
  return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
3196
3238
  }
3197
- function ho(e, t, n, r, i, a, o, s) {
3239
+ function yo(e, t, n, r, i, a, o, s) {
3198
3240
  var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
3199
3241
  if (!o) {
3200
- if (s && Ga < l * i) {
3201
- if (!Ua && (Ha === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Ua = !0), Ua) f = !0;
3202
- else if (Ha === 1 ? c < u + Ga : c > d - Ga) return -Ha;
3203
- } else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return go(t);
3242
+ if (s && Ya < l * i) {
3243
+ if (!qa && (Ka === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (qa = !0), qa) f = !0;
3244
+ else if (Ka === 1 ? c < u + Ya : c > d - Ya) return -Ka;
3245
+ } else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return bo(t);
3204
3246
  }
3205
3247
  return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
3206
3248
  }
3207
- function go(e) {
3208
- return ra(G) < ra(e) ? 1 : -1;
3249
+ function bo(e) {
3250
+ return ca(W) < ca(e) ? 1 : -1;
3209
3251
  }
3210
- function _o(e) {
3252
+ function xo(e) {
3211
3253
  for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
3212
3254
  return r.toString(36);
3213
3255
  }
3214
- function vo(e) {
3215
- Ja.length = 0;
3256
+ function So(e) {
3257
+ Qa.length = 0;
3216
3258
  for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
3217
3259
  var r = t[n];
3218
- r.checked && Ja.push(r);
3260
+ r.checked && Qa.push(r);
3219
3261
  }
3220
3262
  }
3221
- function yo(e) {
3263
+ function Co(e) {
3222
3264
  return setTimeout(e, 0);
3223
3265
  }
3224
- function bo(e) {
3266
+ function wo(e) {
3225
3267
  return clearTimeout(e);
3226
3268
  }
3227
- Ya && L(document, "touchmove", function(e) {
3228
- (Q.active || ja) && e.cancelable && e.preventDefault();
3269
+ $a && I(document, "touchmove", function(e) {
3270
+ (Q.active || Fa) && e.cancelable && e.preventDefault();
3229
3271
  }), Q.utils = {
3230
- on: L,
3231
- off: R,
3232
- css: B,
3233
- find: Qi,
3272
+ on: I,
3273
+ off: L,
3274
+ css: z,
3275
+ find: ra,
3234
3276
  is: function(e, t) {
3235
- return !!Yi(e, t, e, !1);
3277
+ return !!ea(e, t, e, !1);
3236
3278
  },
3237
- extend: sa,
3238
- throttle: ua,
3239
- closest: Yi,
3240
- toggleClass: z,
3241
- clone: pa,
3242
- index: ra,
3243
- nextTick: yo,
3244
- cancelNextTick: bo,
3245
- detectDirection: eo,
3246
- getChild: ta
3279
+ extend: fa,
3280
+ throttle: ha,
3281
+ closest: ea,
3282
+ toggleClass: R,
3283
+ clone: va,
3284
+ index: ca,
3285
+ nextTick: Co,
3286
+ cancelNextTick: wo,
3287
+ detectDirection: io,
3288
+ getChild: oa
3247
3289
  }, Q.get = function(e) {
3248
- return e[H];
3290
+ return e[V];
3249
3291
  }, Q.mount = function() {
3250
3292
  var e = [...arguments];
3251
3293
  e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
3252
3294
  if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
3253
- e.utils && (Q.utils = Mi(Mi({}, Q.utils), e.utils)), ba.mount(e);
3295
+ e.utils && (Q.utils = Li(Li({}, Q.utils), e.utils)), Ta.mount(e);
3254
3296
  });
3255
3297
  }, Q.create = function(e, t) {
3256
3298
  return new Q(e, t);
3257
- }, Q.version = Ri;
3258
- var $ = [], xo, So, Co = !1, wo, To, Eo, Do;
3259
- function Oo() {
3299
+ }, Q.version = Ui;
3300
+ var $ = [], To, Eo, Do = !1, Oo, ko, Ao, jo;
3301
+ function Mo() {
3260
3302
  function e() {
3261
3303
  for (var e in this.defaults = {
3262
3304
  scroll: !0,
@@ -3269,70 +3311,70 @@ function Oo() {
3269
3311
  return e.prototype = {
3270
3312
  dragStarted: function(e) {
3271
3313
  var t = e.originalEvent;
3272
- this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? L(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? L(document, "touchmove", this._handleFallbackAutoScroll) : L(document, "mousemove", this._handleFallbackAutoScroll);
3314
+ this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? I(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? I(document, "touchmove", this._handleFallbackAutoScroll) : I(document, "mousemove", this._handleFallbackAutoScroll);
3273
3315
  },
3274
3316
  dragOverCompleted: function(e) {
3275
3317
  var t = e.originalEvent;
3276
3318
  !this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
3277
3319
  },
3278
3320
  drop: function() {
3279
- this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)), Ao(), ko(), da();
3321
+ this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)), Po(), No(), ga();
3280
3322
  },
3281
3323
  nulling: function() {
3282
- Eo = So = xo = Co = Do = wo = To = null, $.length = 0;
3324
+ Ao = Eo = To = Do = jo = Oo = ko = null, $.length = 0;
3283
3325
  },
3284
3326
  _handleFallbackAutoScroll: function(e) {
3285
3327
  this._handleAutoScroll(e, !0);
3286
3328
  },
3287
3329
  _handleAutoScroll: function(e, t) {
3288
3330
  var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
3289
- if (Eo = e, t || this.options.forceAutoScrollFallback || Vi || Bi || Ui) {
3290
- jo(e, this.options, a, t);
3291
- var o = oa(a, !0);
3292
- Co && (!Do || r !== wo || i !== To) && (Do && Ao(), Do = setInterval(function() {
3293
- var a = oa(document.elementFromPoint(r, i), !0);
3294
- a !== o && (o = a, ko()), jo(e, n.options, a, t);
3295
- }, 10), wo = r, To = i);
3331
+ if (Ao = e, t || this.options.forceAutoScrollFallback || Ki || Gi || Ji) {
3332
+ Fo(e, this.options, a, t);
3333
+ var o = da(a, !0);
3334
+ Do && (!jo || r !== Oo || i !== ko) && (jo && Po(), jo = setInterval(function() {
3335
+ var a = da(document.elementFromPoint(r, i), !0);
3336
+ a !== o && (o = a, No()), Fo(e, n.options, a, t);
3337
+ }, 10), Oo = r, ko = i);
3296
3338
  } else {
3297
- if (!this.options.bubbleScroll || oa(a, !0) === $i()) {
3298
- ko();
3339
+ if (!this.options.bubbleScroll || da(a, !0) === ia()) {
3340
+ No();
3299
3341
  return;
3300
3342
  }
3301
- jo(e, this.options, oa(a, !1), !1);
3343
+ Fo(e, this.options, da(a, !1), !1);
3302
3344
  }
3303
3345
  }
3304
- }, Fi(e, {
3346
+ }, Bi(e, {
3305
3347
  pluginName: "scroll",
3306
3348
  initializeByDefault: !0
3307
3349
  });
3308
3350
  }
3309
- function ko() {
3351
+ function No() {
3310
3352
  $.forEach(function(e) {
3311
3353
  clearInterval(e.pid);
3312
3354
  }), $ = [];
3313
3355
  }
3314
- function Ao() {
3315
- clearInterval(Do);
3356
+ function Po() {
3357
+ clearInterval(jo);
3316
3358
  }
3317
- var jo = ua(function(e, t, n, r) {
3359
+ var Fo = ha(function(e, t, n, r) {
3318
3360
  if (t.scroll) {
3319
- var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = $i(), l = !1, u;
3320
- So !== n && (So = n, ko(), xo = t.scroll, u = t.scrollFn, xo === !0 && (xo = oa(n, !0)));
3321
- var d = 0, f = xo;
3361
+ var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = ia(), l = !1, u;
3362
+ Eo !== n && (Eo = n, No(), To = t.scroll, u = t.scrollFn, To === !0 && (To = da(n, !0)));
3363
+ var d = 0, f = To;
3322
3364
  do {
3323
- var p = f, m = V(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = B(p), E = p.scrollLeft, ee = p.scrollTop;
3365
+ var p = f, m = B(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = z(p), E = p.scrollLeft, D = p.scrollTop;
3324
3366
  p === c ? (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll" || T.overflowX === "visible"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll" || T.overflowY === "visible")) : (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll"));
3325
- var D = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), O = S && (Math.abs(g - a) <= o && ee + b < w) - (Math.abs(h - a) <= o && !!ee);
3326
- if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
3327
- ($[d].vx != D || $[d].vy != O || $[d].el !== p) && ($[d].el = p, $[d].vx = D, $[d].vy = O, clearInterval($[d].pid), (D != 0 || O != 0) && (l = !0, $[d].pid = setInterval(function() {
3328
- r && this.layer === 0 && Q.active._onTouchMove(Eo);
3367
+ var O = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), k = S && (Math.abs(g - a) <= o && D + b < w) - (Math.abs(h - a) <= o && !!D);
3368
+ if (!$[d]) for (var ee = 0; ee <= d; ee++) $[ee] || ($[ee] = {});
3369
+ ($[d].vx != O || $[d].vy != k || $[d].el !== p) && ($[d].el = p, $[d].vx = O, $[d].vy = k, clearInterval($[d].pid), (O != 0 || k != 0) && (l = !0, $[d].pid = setInterval(function() {
3370
+ r && this.layer === 0 && Q.active._onTouchMove(Ao);
3329
3371
  var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
3330
- typeof u == "function" && u.call(Q.dragged.parentNode[H], n, t, e, Eo, $[this.layer].el) !== "continue" || fa($[this.layer].el, n, t);
3372
+ typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, Ao, $[this.layer].el) !== "continue" || _a($[this.layer].el, n, t);
3331
3373
  }.bind({ layer: d }), 24))), d++;
3332
- } while (t.bubbleScroll && f !== c && (f = oa(f, !1)));
3333
- Co = l;
3374
+ } while (t.bubbleScroll && f !== c && (f = da(f, !1)));
3375
+ Do = l;
3334
3376
  }
3335
- }, 30), Mo = function(e) {
3377
+ }, 30), Io = function(e) {
3336
3378
  var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
3337
3379
  if (t) {
3338
3380
  var c = n || i;
@@ -3344,8 +3386,8 @@ var jo = ua(function(e, t, n, r) {
3344
3386
  }));
3345
3387
  }
3346
3388
  };
3347
- function No() {}
3348
- No.prototype = {
3389
+ function Lo() {}
3390
+ Lo.prototype = {
3349
3391
  startIndex: null,
3350
3392
  dragStart: function(e) {
3351
3393
  var t = e.oldDraggableIndex;
@@ -3354,149 +3396,149 @@ No.prototype = {
3354
3396
  onSpill: function(e) {
3355
3397
  var t = e.dragEl, n = e.putSortable;
3356
3398
  this.sortable.captureAnimationState(), n && n.captureAnimationState();
3357
- var r = ta(this.sortable.el, this.startIndex, this.options);
3399
+ var r = oa(this.sortable.el, this.startIndex, this.options);
3358
3400
  r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
3359
3401
  },
3360
- drop: Mo
3361
- }, Fi(No, { pluginName: "revertOnSpill" });
3362
- function Po() {}
3363
- Po.prototype = {
3402
+ drop: Io
3403
+ }, Bi(Lo, { pluginName: "revertOnSpill" });
3404
+ function Ro() {}
3405
+ Ro.prototype = {
3364
3406
  onSpill: function(e) {
3365
3407
  var t = e.dragEl, n = e.putSortable || this.sortable;
3366
3408
  n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
3367
3409
  },
3368
- drop: Mo
3369
- }, Fi(Po, { pluginName: "removeOnSpill" }), Q.mount(new Oo()), Q.mount(Po, No);
3370
- function Fo(e) {
3410
+ drop: Io
3411
+ }, Bi(Ro, { pluginName: "removeOnSpill" }), Q.mount(new Mo()), Q.mount(Ro, Lo);
3412
+ function zo(e) {
3371
3413
  return e == null ? e : JSON.parse(JSON.stringify(e));
3372
3414
  }
3373
- function Io(e) {
3374
- ae() && ee(e);
3415
+ function Bo(e) {
3416
+ re() && r(e);
3375
3417
  }
3376
- function Lo(e) {
3377
- ae() ? u(e) : r(e);
3418
+ function Vo(e) {
3419
+ re() ? a(e) : ie(e);
3378
3420
  }
3379
- var Ro = null, zo = null;
3380
- function Bo(e = null, t = null) {
3381
- Ro = e, zo = t;
3421
+ var Ho = null, Uo = null;
3422
+ function Wo(e = null, t = null) {
3423
+ Ho = e, Uo = t;
3382
3424
  }
3383
- function Vo() {
3425
+ function Go() {
3384
3426
  return {
3385
- data: Ro,
3386
- clonedData: zo
3427
+ data: Ho,
3428
+ clonedData: Uo
3387
3429
  };
3388
3430
  }
3389
- var Ho = Symbol("cloneElement");
3390
- function Uo(...e) {
3391
- let t = ae()?.proxy, n = null, i = e[0], [, o, c] = e;
3392
- Array.isArray(M(o)) || (c = o, o = null);
3393
- let l = null, { immediate: u = !0, clone: d = Fo, forceFallback: f, fallbackOnBody: p, customUpdate: m } = M(c) ?? {};
3394
- function h(e) {
3395
- let { from: t, oldIndex: r, item: i } = e, a = Array.from(t.childNodes);
3396
- n = f && !p ? a.slice(0, -1) : a;
3397
- let s = M(M(o)?.[r]), c = d(s);
3398
- Bo(s, c), i[Ho] = c;
3431
+ var Ko = Symbol("cloneElement");
3432
+ function qo(...e) {
3433
+ let t = re()?.proxy, n = null, r = e[0], [, i, a] = e;
3434
+ Array.isArray(k(i)) || (a = i, i = null);
3435
+ let o = null, { immediate: s = !0, clone: l = zo, forceFallback: u, fallbackOnBody: d, customUpdate: f } = k(a) ?? {};
3436
+ function p(e) {
3437
+ let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
3438
+ n = u && !d ? o.slice(0, -1) : o;
3439
+ let s = k(k(i)?.[r]), c = l(s);
3440
+ Wo(s, c), a[Ko] = c;
3399
3441
  }
3400
- function g(e) {
3401
- let t = e.item[Ho];
3402
- if (!bi(t)) {
3403
- if (Ci(e.item), a(o)) {
3404
- let n = [...M(o)];
3405
- o.value = yi(n, e.newDraggableIndex, t);
3442
+ function m(e) {
3443
+ let t = e.item[Ko];
3444
+ if (!Ti(t)) {
3445
+ if (Oi(e.item), g(i)) {
3446
+ let n = [...k(i)];
3447
+ i.value = wi(n, e.newDraggableIndex, t);
3406
3448
  return;
3407
3449
  }
3408
- yi(M(o), e.newDraggableIndex, t);
3450
+ wi(k(i), e.newDraggableIndex, t);
3409
3451
  }
3410
3452
  }
3411
- function _(e) {
3412
- let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, pullMode: s, clone: c } = e;
3413
- if (Si(t, n, r), s === "clone") {
3414
- Ci(c);
3453
+ function h(e) {
3454
+ let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
3455
+ if (Di(t, n, r), o === "clone") {
3456
+ Oi(s);
3415
3457
  return;
3416
3458
  }
3417
- if (a(o)) {
3418
- let e = [...M(o)];
3419
- o.value = vi(e, i);
3459
+ if (g(i)) {
3460
+ let e = [...k(i)];
3461
+ i.value = Ci(e, a);
3420
3462
  return;
3421
3463
  }
3422
- vi(M(o), i);
3464
+ Ci(k(i), a);
3423
3465
  }
3424
- function v(e) {
3425
- if (m) {
3426
- m(e);
3466
+ function _(e) {
3467
+ if (f) {
3468
+ f(e);
3427
3469
  return;
3428
3470
  }
3429
- let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, newDraggableIndex: s } = e;
3430
- if (Ci(n), Si(t, n, r), a(o)) {
3431
- let e = [...M(o)];
3432
- o.value = hi(e, i, s);
3471
+ let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
3472
+ if (Oi(n), Di(t, n, r), g(i)) {
3473
+ let e = [...k(i)];
3474
+ i.value = bi(e, a, o);
3433
3475
  return;
3434
3476
  }
3435
- hi(M(o), i, s);
3477
+ bi(k(i), a, o);
3436
3478
  }
3437
- function y(e) {
3438
- let { newIndex: t, oldIndex: i, from: a, to: o } = e, s = null, c = t === i && a === o;
3479
+ function v(e) {
3480
+ let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
3439
3481
  try {
3440
- if (c) {
3482
+ if (s) {
3441
3483
  let e = null;
3442
3484
  n?.some((t, r) => {
3443
- if (e && n?.length !== o.childNodes.length) return a.insertBefore(e, t.nextSibling), !0;
3444
- let i = o.childNodes[r];
3445
- e = o?.replaceChild(t, i);
3485
+ if (e && n?.length !== a.childNodes.length) return i.insertBefore(e, t.nextSibling), !0;
3486
+ let o = a.childNodes[r];
3487
+ e = a?.replaceChild(t, o);
3446
3488
  });
3447
3489
  }
3448
3490
  } catch (e) {
3449
- s = e;
3491
+ o = e;
3450
3492
  } finally {
3451
3493
  n = null;
3452
3494
  }
3453
- r(() => {
3454
- if (Bo(), s) throw s;
3495
+ ie(() => {
3496
+ if (Wo(), o) throw o;
3455
3497
  });
3456
3498
  }
3457
- let b = {
3458
- onUpdate: v,
3459
- onStart: h,
3460
- onAdd: g,
3461
- onRemove: _,
3462
- onEnd: y
3499
+ let y = {
3500
+ onUpdate: _,
3501
+ onStart: p,
3502
+ onAdd: m,
3503
+ onRemove: h,
3504
+ onEnd: v
3463
3505
  };
3464
- function x(e) {
3465
- let n = M(i);
3466
- return e ||= xi(n) ? wi(n, t?.$el) : n, e && !Di(e) && (e = e.$el), e || mi("Root element not found"), e;
3506
+ function b(e) {
3507
+ let n = k(r);
3508
+ return e ||= Ei(n) ? ki(n, t?.$el) : n, e && !Mi(e) && (e = e.$el), e || yi("Root element not found"), e;
3467
3509
  }
3468
- function S() {
3469
- let e = M(c) ?? {}, { immediate: t, clone: n } = e, r = di(e, ["immediate", "clone"]);
3470
- return Oi(r, (e, t) => {
3471
- ki(e) && (r[e] = (e, ...n) => (Ai(e, Vo()), t(e, ...n)));
3472
- }), Ei(o === null ? {} : b, r);
3510
+ function x() {
3511
+ let e = k(a) ?? {}, { immediate: t, clone: n } = e, r = gi(e, ["immediate", "clone"]);
3512
+ return Ni(r, (e, t) => {
3513
+ Pi(e) && (r[e] = (e, ...n) => (Fi(e, Go()), t(e, ...n)));
3514
+ }), ji(i === null ? {} : y, r);
3473
3515
  }
3474
- let C = (e) => {
3475
- e = x(e), l && w.destroy(), l = new Q(e, S());
3516
+ let S = (e) => {
3517
+ e = b(e), o && C.destroy(), o = new Q(e, x());
3476
3518
  };
3477
- s(() => c, () => {
3478
- l && Oi(S(), (e, t) => {
3479
- l?.option(e, t);
3519
+ c(() => a, () => {
3520
+ o && Ni(x(), (e, t) => {
3521
+ o?.option(e, t);
3480
3522
  });
3481
3523
  }, { deep: !0 });
3482
- let w = {
3483
- option: (e, t) => l?.option(e, t),
3524
+ let C = {
3525
+ option: (e, t) => o?.option(e, t),
3484
3526
  destroy: () => {
3485
- l?.destroy(), l = null;
3527
+ o?.destroy(), o = null;
3486
3528
  },
3487
- save: () => l?.save(),
3488
- toArray: () => l?.toArray(),
3489
- closest: (...e) => l?.closest(...e)
3529
+ save: () => o?.save(),
3530
+ toArray: () => o?.toArray(),
3531
+ closest: (...e) => o?.closest(...e)
3490
3532
  };
3491
- return Lo(() => {
3492
- u && C();
3493
- }), Io(w.destroy), ui({
3494
- start: C,
3495
- pause: () => w?.option("disabled", !0),
3496
- resume: () => w?.option("disabled", !1)
3497
- }, w);
3498
- }
3499
- var Wo = [
3533
+ return Vo(() => {
3534
+ s && S();
3535
+ }), Bo(C.destroy), hi({
3536
+ start: S,
3537
+ pause: () => C?.option("disabled", !0),
3538
+ resume: () => C?.option("disabled", !1)
3539
+ }, C);
3540
+ }
3541
+ var Jo = [
3500
3542
  "update",
3501
3543
  "start",
3502
3544
  "add",
@@ -3509,7 +3551,7 @@ var Wo = [
3509
3551
  "clone",
3510
3552
  "move",
3511
3553
  "change"
3512
- ], Go = y({
3554
+ ], Yo = y({
3513
3555
  name: "VueDraggable",
3514
3556
  model: {
3515
3557
  prop: "modelValue",
@@ -3559,52 +3601,52 @@ var Wo = [
3559
3601
  "tag",
3560
3602
  "target",
3561
3603
  "customUpdate",
3562
- ...Wo.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
3604
+ ...Jo.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
3563
3605
  ],
3564
- emits: ["update:modelValue", ...Wo],
3565
- setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
3566
- let a = Wo.reduce((e, t) => {
3567
- let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
3568
- return e[r] = (...e) => n(t, ...e), e;
3569
- }, {}), s = x(() => {
3570
- let t = S(e), { modelValue: n } = t, r = di(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
3571
- let r = M(n);
3606
+ emits: ["update:modelValue", ...Jo],
3607
+ setup(t, { slots: n, emit: r, expose: i, attrs: a }) {
3608
+ let o = Jo.reduce((e, t) => {
3609
+ let n = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
3610
+ return e[n] = (...e) => r(t, ...e), e;
3611
+ }, {}), s = j(() => {
3612
+ let n = e(t), { modelValue: r } = n, i = gi(n, ["modelValue"]), s = Object.entries(i).reduce((e, [t, n]) => {
3613
+ let r = k(n);
3572
3614
  return r !== void 0 && (e[t] = r), e;
3573
3615
  }, {});
3574
- return ui(ui({}, a), _i(ui(ui({}, i), o)));
3575
- }), c = x({
3576
- get: () => e.modelValue,
3577
- set: (e) => n("update:modelValue", e)
3578
- }), l = h(), u = o(Uo(e.target || l, c, s));
3579
- return r(u), () => f(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
3580
- }
3581
- }), Ko = {
3616
+ return hi(hi({}, o), Si(hi(hi({}, a), s)));
3617
+ }), c = j({
3618
+ get: () => t.modelValue,
3619
+ set: (e) => r("update:modelValue", e)
3620
+ }), l = _(), u = ee(qo(t.target || l, c, s));
3621
+ return i(u), () => ae(t.tag || "div", { ref: l }, (n?.default)?.call(n, u));
3622
+ }
3623
+ }), Xo = {
3582
3624
  mounted: "mounted",
3583
3625
  unmounted: "unmounted"
3584
3626
  };
3585
- Ko.mounted, Ko.unmounted;
3627
+ Xo.mounted, Xo.unmounted;
3586
3628
  //#endregion
3587
3629
  //#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
3588
- var qo = { class: "tpl:w-full" }, Jo = { class: "tpl:flex tpl:gap-0" }, Yo = {
3630
+ var Zo = { class: "tpl:w-full" }, Qo = { class: "tpl:flex tpl:gap-0" }, $o = {
3589
3631
  key: 0,
3590
3632
  "data-testid": "section-drop-hint",
3591
3633
  class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
3592
- }, Xo = /* @__PURE__ */ y({
3634
+ }, es = /* @__PURE__ */ y({
3593
3635
  __name: "SectionBlock",
3594
3636
  props: {
3595
3637
  block: {},
3596
3638
  viewport: {}
3597
3639
  },
3598
- setup(n) {
3599
- let r = {
3600
- title: ri,
3601
- paragraph: zr,
3602
- image: Er,
3603
- button: _n,
3604
- divider: sr,
3605
- custom: ar
3606
- }, a = n, { t: o } = St(), s = Ze(ft, "SectionBlock"), l = F(_t, null), u = F(mt, null), d = x(() => {
3607
- switch (a.block.columns) {
3640
+ setup(e) {
3641
+ let n = {
3642
+ title: ci,
3643
+ paragraph: Wr,
3644
+ image: jr,
3645
+ button: Sn,
3646
+ divider: fr,
3647
+ custom: ur
3648
+ }, r = e, { t: a } = Tt(), s = et(ht, "SectionBlock"), c = N(bt, null), l = N(_t, null), u = j(() => {
3649
+ switch (r.block.columns) {
3608
3650
  case "2": return ["50%", "50%"];
3609
3651
  case "3": return [
3610
3652
  "33.33%",
@@ -3615,38 +3657,38 @@ var qo = { class: "tpl:w-full" }, Jo = { class: "tpl:flex tpl:gap-0" }, Yo = {
3615
3657
  case "2-1": return ["66.67%", "33.33%"];
3616
3658
  default: return ["100%"];
3617
3659
  }
3618
- }), f = x(() => {
3619
- let e = d.value.length, t = [...a.block.children];
3660
+ }), h = j(() => {
3661
+ let e = u.value.length, t = [...r.block.children];
3620
3662
  for (; t.length < e;) t.push([]);
3621
3663
  return t.slice(0, e);
3622
3664
  });
3623
- function p(e) {
3624
- return f.value[e] || [];
3665
+ function g(e) {
3666
+ return h.value[e] || [];
3625
3667
  }
3626
- function m(e, t) {
3627
- let n = t.map((e) => JSON.parse(JSON.stringify(e))), r = [...a.block.children];
3628
- for (; r.length <= e;) r.push([]);
3629
- r[e] = n, s.updateBlock(a.block.id, { children: r });
3668
+ function _(e, t) {
3669
+ let n = t.map((e) => JSON.parse(JSON.stringify(e))), i = [...r.block.children];
3670
+ for (; i.length <= e;) i.push([]);
3671
+ i[e] = n, s.updateBlock(r.block.id, { children: i });
3630
3672
  }
3631
- function h(e) {
3632
- return Br(e, u, r);
3673
+ function v(e) {
3674
+ return Gr(e, l, n);
3633
3675
  }
3634
- function g(e, t) {
3676
+ function y(e, t) {
3635
3677
  e.type === "custom" && s.updateBlock(e.id, {
3636
3678
  fieldValues: t.fieldValues,
3637
3679
  dataSourceFetched: t.dataSourceFetched
3638
3680
  });
3639
3681
  }
3640
- return (r, a) => (e(), w("div", qo, [C("div", Jo, [(e(!0), w(D, null, c(f.value, (r, a) => (e(), w("div", {
3641
- key: a,
3642
- class: v(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(a).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
3643
- style: A({ width: d.value[a] })
3644
- }, [P(M(Go), {
3645
- "model-value": p(a),
3682
+ return (n, r) => (f(), x("div", Zo, [b("div", Qo, [(f(!0), x(A, null, t(h.value, (n, r) => (f(), x("div", {
3683
+ key: r,
3684
+ class: o(["tpl:relative tpl:min-h-[60px] tpl:rounded", g(r).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
3685
+ style: i({ width: u.value[r] })
3686
+ }, [w(k(Yo), {
3687
+ "model-value": g(r),
3646
3688
  group: {
3647
3689
  name: "blocks",
3648
3690
  pull: !0,
3649
- put: (e, t, n) => M(ii)(n)
3691
+ put: (e, t, n) => k(li)(n)
3650
3692
  },
3651
3693
  animation: 150,
3652
3694
  "ghost-class": "tpl-ghost",
@@ -3657,20 +3699,20 @@ var qo = { class: "tpl:w-full" }, Jo = { class: "tpl:flex tpl:gap-0" }, Yo = {
3657
3699
  "empty-insert-threshold": 20,
3658
3700
  "force-fallback": !0,
3659
3701
  class: "tpl:min-h-[60px]",
3660
- "onUpdate:modelValue": (e) => m(a, e)
3702
+ "onUpdate:modelValue": (e) => _(r, e)
3661
3703
  }, {
3662
- default: se(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [P(ti, {
3663
- block: r,
3664
- "is-selected": M(s).state.selectedBlockId === r.id,
3665
- viewport: n.viewport,
3666
- "preview-mode": M(s).state.previewMode,
3667
- onSelect: (e) => M(s).selectBlock(r.id)
3704
+ default: m(() => [(f(!0), x(A, null, t(g(r), (t) => oe((f(), x("div", { key: t.id }, [w(oi, {
3705
+ block: t,
3706
+ "is-selected": k(s).state.selectedBlockId === t.id,
3707
+ viewport: e.viewport,
3708
+ "preview-mode": k(s).state.previewMode,
3709
+ onSelect: (e) => k(s).selectBlock(t.id)
3668
3710
  }, {
3669
- default: se(() => [(e(), j(i(h(r)), {
3670
- block: r,
3671
- viewport: n.viewport,
3672
- onFetchData: (e) => g(r, e),
3673
- onUpdate: (e) => M(s).updateBlock(r.id, e)
3711
+ default: m(() => [(f(), D(d(v(t)), {
3712
+ block: t,
3713
+ viewport: e.viewport,
3714
+ onFetchData: (e) => y(t, e),
3715
+ onUpdate: (e) => k(s).updateBlock(t.id, e)
3674
3716
  }, null, 40, [
3675
3717
  "block",
3676
3718
  "viewport",
@@ -3684,19 +3726,19 @@ var qo = { class: "tpl:w-full" }, Jo = { class: "tpl:flex tpl:gap-0" }, Yo = {
3684
3726
  "viewport",
3685
3727
  "preview-mode",
3686
3728
  "onSelect"
3687
- ])])), [[te, !M(l)?.isHidden(r.id)]])), 128))]),
3729
+ ])])), [[se, !k(c)?.isHidden(t.id)]])), 128))]),
3688
3730
  _: 2
3689
3731
  }, 1032, [
3690
3732
  "model-value",
3691
3733
  "group",
3692
3734
  "onUpdate:modelValue"
3693
- ]), p(a).length === 0 ? (e(), w("div", Yo, [C("span", null, N(M(o).section.dropHere), 1)])) : O("", !0)], 6))), 128))])]));
3735
+ ]), g(r).length === 0 ? (f(), x("div", $o, [b("span", null, p(k(a).section.dropHere), 1)])) : M("", !0)], 6))), 128))])]));
3694
3736
  }
3695
- }), Zo = Ee, Qo = {
3737
+ }), ts = ke, ns = {
3696
3738
  small: 24,
3697
3739
  medium: 32,
3698
3740
  large: 48
3699
- }, $o = [
3741
+ }, rs = [
3700
3742
  "facebook",
3701
3743
  "twitter",
3702
3744
  "instagram",
@@ -3714,219 +3756,219 @@ var qo = { class: "tpl:w-full" }, Jo = { class: "tpl:flex tpl:gap-0" }, Yo = {
3714
3756
  "github",
3715
3757
  "dribbble",
3716
3758
  "behance"
3717
- ], es = [
3759
+ ], is = [
3718
3760
  "width",
3719
3761
  "height",
3720
3762
  "fill"
3721
- ], ts = ["d"], ns = /* @__PURE__ */ y({
3763
+ ], as = ["d"], os = /* @__PURE__ */ y({
3722
3764
  __name: "SocialIconSvg",
3723
3765
  props: {
3724
3766
  platform: {},
3725
3767
  iconStyle: {},
3726
3768
  iconSize: {}
3727
3769
  },
3728
- setup(t) {
3729
- let n = t, r = x(() => Zo[n.platform]), i = x(() => Qo[n.iconSize]), a = x(() => {
3770
+ setup(e) {
3771
+ let t = e, n = j(() => ts[t.platform]), r = j(() => ns[t.iconSize]), a = j(() => {
3730
3772
  let e = {
3731
3773
  display: "inline-flex",
3732
3774
  alignItems: "center",
3733
3775
  justifyContent: "center",
3734
- width: `${i.value}px`,
3735
- height: `${i.value}px`
3776
+ width: `${r.value}px`,
3777
+ height: `${r.value}px`
3736
3778
  };
3737
- switch (n.iconStyle) {
3779
+ switch (t.iconStyle) {
3738
3780
  case "solid": return {
3739
3781
  ...e,
3740
- backgroundColor: r.value.color,
3782
+ backgroundColor: n.value.color,
3741
3783
  borderRadius: "4px"
3742
3784
  };
3743
3785
  case "outlined": return {
3744
3786
  ...e,
3745
3787
  backgroundColor: "transparent",
3746
- border: `2px solid ${r.value.color}`,
3788
+ border: `2px solid ${n.value.color}`,
3747
3789
  borderRadius: "4px"
3748
3790
  };
3749
3791
  case "rounded": return {
3750
3792
  ...e,
3751
- backgroundColor: r.value.color,
3793
+ backgroundColor: n.value.color,
3752
3794
  borderRadius: "8px"
3753
3795
  };
3754
3796
  case "square": return {
3755
3797
  ...e,
3756
- backgroundColor: r.value.color,
3798
+ backgroundColor: n.value.color,
3757
3799
  borderRadius: "0"
3758
3800
  };
3759
3801
  case "circle": return {
3760
3802
  ...e,
3761
- backgroundColor: r.value.color,
3803
+ backgroundColor: n.value.color,
3762
3804
  borderRadius: "50%"
3763
3805
  };
3764
3806
  default: return e;
3765
3807
  }
3766
- }), o = x(() => Math.floor(i.value * .6)), s = x(() => n.iconStyle === "outlined" ? r.value.color : "#ffffff");
3767
- return (t, n) => (e(), w("span", { style: A(a.value) }, [(e(), w("svg", {
3808
+ }), o = j(() => Math.floor(r.value * .6)), s = j(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
3809
+ return (e, t) => (f(), x("span", { style: i(a.value) }, [(f(), x("svg", {
3768
3810
  width: o.value,
3769
3811
  height: o.value,
3770
3812
  viewBox: "0 0 24 24",
3771
3813
  fill: s.value,
3772
3814
  xmlns: "http://www.w3.org/2000/svg"
3773
- }, [C("path", { d: r.value.path }, null, 8, ts)], 8, es))], 4));
3815
+ }, [b("path", { d: n.value.path }, null, 8, as)], 8, is))], 4));
3774
3816
  }
3775
- }), rs = { class: "tpl:w-full" }, is = ["href"], as = {
3817
+ }), ss = { class: "tpl:w-full" }, cs = ["href"], ls = {
3776
3818
  key: 1,
3777
3819
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
3778
- }, os = /* @__PURE__ */ y({
3820
+ }, us = /* @__PURE__ */ y({
3779
3821
  __name: "SocialIconsBlock",
3780
3822
  props: {
3781
3823
  block: {},
3782
3824
  viewport: {}
3783
3825
  },
3784
- setup(t) {
3785
- let n = t, { t: r } = St(), i = x(() => ({
3826
+ setup(e) {
3827
+ let n = e, { t: r } = Tt(), a = j(() => ({
3786
3828
  display: "flex",
3787
3829
  flexWrap: "wrap",
3788
3830
  gap: `${n.block.spacing}px`,
3789
3831
  justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
3790
- })), a = x(() => n.block.icons.length > 0);
3791
- return (n, o) => (e(), w("div", rs, [a.value ? (e(), w("div", {
3832
+ })), o = j(() => n.block.icons.length > 0);
3833
+ return (n, s) => (f(), x("div", ss, [o.value ? (f(), x("div", {
3792
3834
  key: 0,
3793
- style: A(i.value)
3794
- }, [(e(!0), w(D, null, c(t.block.icons, (n) => (e(), w("a", {
3795
- key: n.id,
3796
- href: n.url || "#",
3835
+ style: i(a.value)
3836
+ }, [(f(!0), x(A, null, t(e.block.icons, (t) => (f(), x("a", {
3837
+ key: t.id,
3838
+ href: t.url || "#",
3797
3839
  class: "tpl:cursor-default",
3798
- onClick: o[0] ||= b(() => {}, ["prevent"])
3799
- }, [P(ns, {
3800
- platform: n.platform,
3801
- "icon-style": t.block.iconStyle,
3802
- "icon-size": t.block.iconSize
3840
+ onClick: s[0] ||= P(() => {}, ["prevent"])
3841
+ }, [w(os, {
3842
+ platform: t.platform,
3843
+ "icon-style": e.block.iconStyle,
3844
+ "icon-size": e.block.iconSize
3803
3845
  }, null, 8, [
3804
3846
  "platform",
3805
3847
  "icon-style",
3806
3848
  "icon-size"
3807
- ])], 8, is))), 128))], 4)) : (e(), w("div", as, [P(M(On), { size: 16 }), C("span", null, N(M(r).social.addIcons), 1)]))]));
3849
+ ])], 8, cs))), 128))], 4)) : (f(), x("div", ls, [w(k(Nn), { size: 16 }), b("span", null, p(k(r).social.addIcons), 1)]))]));
3808
3850
  }
3809
- }), ss = { class: "tpl:w-full" }, cs = {
3851
+ }), ds = { class: "tpl:w-full" }, fs = {
3810
3852
  key: 0,
3811
3853
  class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
3812
3854
  style: {
3813
3855
  "background-color": "var(--tpl-bg-hover)",
3814
3856
  color: "var(--tpl-text-dim)"
3815
3857
  }
3816
- }, ls = /* @__PURE__ */ y({
3858
+ }, ps = /* @__PURE__ */ y({
3817
3859
  __name: "SpacerBlock",
3818
3860
  props: {
3819
3861
  block: {},
3820
3862
  viewport: {}
3821
3863
  },
3822
- setup(t) {
3823
- let n = t, r = Ze(ft, "SpacerBlock"), i = x(() => ({
3824
- height: `${n.block.height}px`,
3825
- minHeight: `${n.block.height}px`,
3826
- ...r.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
3864
+ setup(e) {
3865
+ let t = e, n = et(ht, "SpacerBlock"), r = j(() => ({
3866
+ height: `${t.block.height}px`,
3867
+ minHeight: `${t.block.height}px`,
3868
+ ...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
3827
3869
  }));
3828
- return (n, a) => (e(), w("div", ss, [C("div", {
3829
- style: A(i.value),
3830
- class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !M(r).state.previewMode }])
3831
- }, [M(r).state.previewMode ? O("", !0) : (e(), w("span", cs, N(t.block.height) + "px ", 1))], 6)]));
3870
+ return (t, a) => (f(), x("div", ds, [b("div", {
3871
+ style: i(r.value),
3872
+ class: o(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !k(n).state.previewMode }])
3873
+ }, [k(n).state.previewMode ? M("", !0) : (f(), x("span", fs, p(e.block.height) + "px ", 1))], 6)]));
3832
3874
  }
3833
- }), us = { class: "tpl:w-full" }, ds = { key: 0 }, fs = [
3875
+ }), ms = { class: "tpl:w-full" }, hs = { key: 0 }, gs = [
3834
3876
  "aria-label",
3835
3877
  "data-placeholder",
3836
3878
  "onBlur"
3837
- ], ps = [
3879
+ ], _s = [
3838
3880
  "aria-label",
3839
3881
  "data-placeholder",
3840
3882
  "onBlur"
3841
- ], ms = {
3883
+ ], vs = {
3842
3884
  key: 1,
3843
3885
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
3844
- }, hs = /*#__PURE__*/ kt(/* @__PURE__ */ y({
3886
+ }, ys = /*#__PURE__*/ Mt(/* @__PURE__ */ y({
3845
3887
  __name: "TableBlock",
3846
3888
  props: {
3847
3889
  block: {},
3848
3890
  viewport: {}
3849
3891
  },
3850
- setup(n) {
3851
- let r = {
3892
+ setup(e) {
3893
+ let n = {
3852
3894
  mounted(e, t) {
3853
3895
  e.textContent = t.value ?? "";
3854
3896
  },
3855
3897
  updated(e, t) {
3856
3898
  t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
3857
3899
  }
3858
- }, i = n, { t: a } = St(), o = Ze(ft, "TableBlock"), s = x(() => i.block.rows.length > 0), l = x(() => ({
3900
+ }, r = e, { t: a } = Tt(), o = et(ht, "TableBlock"), s = j(() => r.block.rows.length > 0), c = j(() => ({
3859
3901
  width: "100%",
3860
3902
  borderCollapse: "collapse",
3861
- fontSize: `${i.block.fontSize}px`,
3862
- color: i.block.color,
3863
- textAlign: i.block.textAlign,
3864
- fontFamily: i.block.fontFamily || "inherit"
3865
- })), u = x(() => ({
3866
- border: `${i.block.borderWidth}px solid ${i.block.borderColor}`,
3867
- padding: `${i.block.cellPadding}px`,
3868
- textAlign: i.block.textAlign
3869
- })), d = x(() => ({
3870
- ...u.value,
3903
+ fontSize: `${r.block.fontSize}px`,
3904
+ color: r.block.color,
3905
+ textAlign: r.block.textAlign,
3906
+ fontFamily: r.block.fontFamily || "inherit"
3907
+ })), l = j(() => ({
3908
+ border: `${r.block.borderWidth}px solid ${r.block.borderColor}`,
3909
+ padding: `${r.block.cellPadding}px`,
3910
+ textAlign: r.block.textAlign
3911
+ })), u = j(() => ({
3912
+ ...l.value,
3871
3913
  fontWeight: "bold",
3872
- backgroundColor: i.block.headerBackgroundColor || "transparent"
3873
- })), f = x(() => i.block.hasHeaderRow && i.block.rows.length > 0 ? i.block.rows[0] : null), p = x(() => i.block.hasHeaderRow ? i.block.rows.slice(1) : i.block.rows);
3874
- function m() {
3875
- o.selectBlock(i.block.id);
3914
+ backgroundColor: r.block.headerBackgroundColor || "transparent"
3915
+ })), d = j(() => r.block.hasHeaderRow && r.block.rows.length > 0 ? r.block.rows[0] : null), m = j(() => r.block.hasHeaderRow ? r.block.rows.slice(1) : r.block.rows);
3916
+ function h() {
3917
+ o.selectBlock(r.block.id);
3876
3918
  }
3877
- function h(e, t, n) {
3878
- let r = n.target.innerText.trim(), a = i.block.rows.map((n) => n.id === e ? {
3919
+ function g(e, t, n) {
3920
+ let i = n.target.innerText.trim(), a = r.block.rows.map((n) => n.id === e ? {
3879
3921
  ...n,
3880
3922
  cells: n.cells.map((e) => e.id === t ? {
3881
3923
  ...e,
3882
- content: r
3924
+ content: i
3883
3925
  } : e)
3884
3926
  } : n);
3885
- o.updateBlock(i.block.id, { rows: a });
3927
+ o.updateBlock(r.block.id, { rows: a });
3886
3928
  }
3887
- return (n, i) => (e(), w("div", us, [s.value ? (e(), w("table", {
3929
+ return (e, r) => (f(), x("div", ms, [s.value ? (f(), x("table", {
3888
3930
  key: 0,
3889
- style: A(l.value),
3931
+ style: i(c.value),
3890
3932
  class: "tpl-table-editable"
3891
- }, [f.value ? (e(), w("thead", ds, [C("tr", null, [(e(!0), w(D, null, c(f.value.cells, (n) => t((e(), w("th", {
3892
- key: n.id,
3893
- style: A(d.value),
3894
- "aria-label": M(a).table.cellPlaceholder,
3933
+ }, [d.value ? (f(), x("thead", hs, [b("tr", null, [(f(!0), x(A, null, t(d.value.cells, (e) => oe((f(), x("th", {
3934
+ key: e.id,
3935
+ style: i(u.value),
3936
+ "aria-label": k(a).table.cellPlaceholder,
3895
3937
  contenteditable: "true",
3896
- "data-placeholder": M(a).table.cellPlaceholder,
3897
- onBlur: (e) => h(f.value.id, n.id, e),
3898
- onKeydown: i[0] ||= re(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
3899
- onClick: b(m, ["stop"])
3900
- }, null, 44, fs)), [[r, n.content]])), 128))])])) : O("", !0), C("tbody", null, [(e(!0), w(D, null, c(p.value, (n) => (e(), w("tr", { key: n.id }, [(e(!0), w(D, null, c(n.cells, (o) => t((e(), w("td", {
3901
- key: o.id,
3902
- style: A(u.value),
3903
- "aria-label": M(a).table.cellPlaceholder,
3938
+ "data-placeholder": k(a).table.cellPlaceholder,
3939
+ onBlur: (t) => g(d.value.id, e.id, t),
3940
+ onKeydown: r[0] ||= ce(P((e) => e.target.blur(), ["prevent"]), ["enter"]),
3941
+ onClick: P(h, ["stop"])
3942
+ }, null, 44, gs)), [[n, e.content]])), 128))])])) : M("", !0), b("tbody", null, [(f(!0), x(A, null, t(m.value, (e) => (f(), x("tr", { key: e.id }, [(f(!0), x(A, null, t(e.cells, (t) => oe((f(), x("td", {
3943
+ key: t.id,
3944
+ style: i(l.value),
3945
+ "aria-label": k(a).table.cellPlaceholder,
3904
3946
  contenteditable: "true",
3905
- "data-placeholder": M(a).table.cellPlaceholder,
3906
- onBlur: (e) => h(n.id, o.id, e),
3907
- onKeydown: i[1] ||= re(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
3908
- onClick: b(m, ["stop"])
3909
- }, null, 44, ps)), [[r, o.content]])), 128))]))), 128))])], 4)) : (e(), w("div", ms, [P(M(kn), { size: 16 }), C("span", null, N(M(a).table.empty), 1)]))]));
3947
+ "data-placeholder": k(a).table.cellPlaceholder,
3948
+ onBlur: (n) => g(e.id, t.id, n),
3949
+ onKeydown: r[1] ||= ce(P((e) => e.target.blur(), ["prevent"]), ["enter"]),
3950
+ onClick: P(h, ["stop"])
3951
+ }, null, 44, _s)), [[n, t.content]])), 128))]))), 128))])], 4)) : (f(), x("div", vs, [w(k(Pn), { size: 16 }), b("span", null, p(k(a).table.empty), 1)]))]));
3910
3952
  }
3911
- }), [["__scopeId", "data-v-f065872a"]]), gs = /* @__PURE__ */ y({
3953
+ }), [["__scopeId", "data-v-f065872a"]]), bs = /* @__PURE__ */ y({
3912
3954
  __name: "VideoPlayButton",
3913
3955
  props: { hoverEffect: {
3914
3956
  type: Boolean,
3915
3957
  default: !1
3916
3958
  } },
3917
- setup(t) {
3918
- return (n, r) => (e(), w("div", { class: v(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", t.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...r[0] ||= [C("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-white/90 tpl:shadow-lg" }, [C("svg", {
3959
+ setup(e) {
3960
+ return (t, n) => (f(), x("div", { class: o(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [b("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-white/90 tpl:shadow-lg" }, [b("svg", {
3919
3961
  class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
3920
3962
  width: "28",
3921
3963
  height: "28",
3922
3964
  viewBox: "0 0 24 24",
3923
3965
  fill: "currentColor"
3924
- }, [C("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
3966
+ }, [b("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
3925
3967
  }
3926
3968
  });
3927
3969
  //#endregion
3928
3970
  //#region src/utils/videoThumbnail.ts
3929
- function _s(e) {
3971
+ function xs(e) {
3930
3972
  if (!e) return {
3931
3973
  platform: "unknown",
3932
3974
  videoId: null,
@@ -3958,142 +4000,142 @@ function _s(e) {
3958
4000
  thumbnailUrl: null
3959
4001
  };
3960
4002
  }
3961
- function vs(e, t) {
3962
- return t || _s(e).thumbnailUrl;
4003
+ function Ss(e, t) {
4004
+ return t || xs(e).thumbnailUrl;
3963
4005
  }
3964
4006
  //#endregion
3965
4007
  //#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
3966
- var ys = ["src", "alt"], bs = {
4008
+ var Cs = ["src", "alt"], ws = {
3967
4009
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
3968
4010
  style: { opacity: "0.7" }
3969
- }, xs = ["href"], Ss = ["src", "alt"], Cs = ["src", "alt"], ws = {
4011
+ }, Ts = ["href"], Es = ["src", "alt"], Ds = ["src", "alt"], Os = {
3970
4012
  key: 3,
3971
4013
  class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
3972
- }, Ts = /* @__PURE__ */ y({
4014
+ }, ks = /* @__PURE__ */ y({
3973
4015
  __name: "VideoBlock",
3974
4016
  props: {
3975
4017
  block: {},
3976
4018
  viewport: {}
3977
4019
  },
3978
- setup(t) {
3979
- let n = t, { t: r } = St(), { syntax: i } = At(), a = x(() => De(n.block.url, i) || De(n.block.thumbnailUrl, i)), o = x(() => a.value ? null : vs(n.block.url, n.block.thumbnailUrl)), s = x(() => ({ textAlign: n.block.align })), c = x(() => {
3980
- let e = n.block.align;
4020
+ setup(e) {
4021
+ let t = e, { t: n } = Tt(), { syntax: r } = Nt(), a = j(() => Ae(t.block.url, r) || Ae(t.block.thumbnailUrl, r)), o = j(() => a.value ? null : Ss(t.block.url, t.block.thumbnailUrl)), s = j(() => ({ textAlign: t.block.align })), c = j(() => {
4022
+ let e = t.block.align;
3981
4023
  return {
3982
4024
  maxWidth: "100%",
3983
- width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
4025
+ width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
3984
4026
  display: "block",
3985
4027
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
3986
4028
  marginRight: e === "center" ? "auto" : void 0
3987
4029
  };
3988
- }), l = x(() => De(n.block.url, i) ? n.block.url : n.block.thumbnailUrl);
3989
- return (n, i) => (e(), w("div", {
4030
+ }), l = j(() => Ae(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
4031
+ return (t, r) => (f(), x("div", {
3990
4032
  class: "tpl:w-full",
3991
- style: A(s.value)
3992
- }, [a.value && t.block.placeholderUrl ? (e(), w("div", {
4033
+ style: i(s.value)
4034
+ }, [a.value && e.block.placeholderUrl ? (f(), x("div", {
3993
4035
  key: 0,
3994
4036
  class: "tpl:relative tpl:inline-block",
3995
- style: A(c.value)
3996
- }, [C("img", {
4037
+ style: i(c.value)
4038
+ }, [b("img", {
3997
4039
  class: "tpl:w-full tpl:border-0",
3998
- src: t.block.placeholderUrl,
3999
- alt: t.block.alt
4000
- }, null, 8, ys), P(gs)], 4)) : a.value ? (e(), w("div", {
4040
+ src: e.block.placeholderUrl,
4041
+ alt: e.block.alt
4042
+ }, null, 8, Cs), w(bs)], 4)) : a.value ? (f(), x("div", {
4001
4043
  key: 1,
4002
4044
  class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
4003
- style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
4004
- }, [P(M(An), {
4045
+ style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
4046
+ }, [w(k(Fn), {
4005
4047
  size: 36,
4006
4048
  "stroke-width": 1.5,
4007
4049
  class: "tpl:text-[var(--tpl-primary)]",
4008
4050
  style: { opacity: "0.5" }
4009
- }), C("span", bs, N(l.value), 1)], 4)) : o.value ? (e(), w(D, { key: 2 }, [t.block.url ? (e(), w("a", {
4051
+ }), b("span", ws, [w(yn, { text: l.value }, null, 8, ["text"])])], 4)) : o.value ? (f(), x(A, { key: 2 }, [e.block.url ? (f(), x("a", {
4010
4052
  key: 0,
4011
- href: t.block.url,
4053
+ href: e.block.url,
4012
4054
  target: "_blank",
4013
4055
  rel: "noopener noreferrer",
4014
4056
  class: "tpl:group tpl:relative tpl:inline-block",
4015
- style: A(c.value),
4016
- onClick: i[0] ||= b(() => {}, ["prevent"])
4017
- }, [C("img", {
4057
+ style: i(c.value),
4058
+ onClick: r[0] ||= P(() => {}, ["prevent"])
4059
+ }, [b("img", {
4018
4060
  class: "tpl:w-full tpl:border-0",
4019
4061
  src: o.value,
4020
- alt: t.block.alt
4021
- }, null, 8, Ss), P(gs, { "hover-effect": "" })], 12, xs)) : (e(), w("div", {
4062
+ alt: e.block.alt
4063
+ }, null, 8, Es), w(bs, { "hover-effect": "" })], 12, Ts)) : (f(), x("div", {
4022
4064
  key: 1,
4023
4065
  class: "tpl:relative tpl:inline-block",
4024
- style: A(c.value)
4025
- }, [C("img", {
4066
+ style: i(c.value)
4067
+ }, [b("img", {
4026
4068
  class: "tpl:w-full tpl:border-0",
4027
4069
  src: o.value,
4028
- alt: t.block.alt
4029
- }, null, 8, Cs), P(gs)], 4))], 64)) : (e(), w("div", ws, [P(M(An), {
4070
+ alt: e.block.alt
4071
+ }, null, 8, Ds), w(bs)], 4))], 64)) : (f(), x("div", Os, [w(k(Fn), {
4030
4072
  size: 40,
4031
4073
  "stroke-width": 1.5,
4032
4074
  class: "tpl:text-[var(--tpl-border-light)]"
4033
- }), C("span", null, N(M(r).video.addVideo), 1)]))], 4));
4034
- }
4035
- }), Es = {
4036
- section: Xo,
4037
- title: ri,
4038
- paragraph: zr,
4039
- image: Er,
4040
- button: _n,
4041
- divider: sr,
4042
- video: Ts,
4043
- social: os,
4044
- menu: Ar,
4045
- table: hs,
4046
- spacer: ls,
4047
- html: fr,
4048
- countdown: oe(() => import("./CountdownBlock-DtAokAVw.js").then((e) => e.n))
4075
+ }), b("span", null, p(k(n).video.addVideo), 1)]))], 4));
4076
+ }
4077
+ }), As = {
4078
+ section: es,
4079
+ title: ci,
4080
+ paragraph: Wr,
4081
+ image: jr,
4082
+ button: Sn,
4083
+ divider: fr,
4084
+ video: ks,
4085
+ social: us,
4086
+ menu: Fr,
4087
+ table: ys,
4088
+ spacer: ps,
4089
+ html: _r,
4090
+ countdown: C(() => import("./CountdownBlock-apiYUhkQ.js").then((e) => e.n))
4049
4091
  };
4050
- function Ds(e) {
4051
- let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = St(r);
4092
+ function js(e) {
4093
+ let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Tt(r);
4052
4094
  t.setUiTheme(n.uiTheme ?? "auto");
4053
- let { resolvedTheme: c } = en(x(() => t.state.uiTheme)), l = h(n.theme ?? {}), { themeStyles: u } = nn({
4054
- themeOverrides: l,
4055
- resolvedTheme: c,
4095
+ let { resolvedTheme: l } = rn(j(() => t.state.uiTheme)), d = _(n.theme ?? {}), { themeStyles: f } = on({
4096
+ themeOverrides: d,
4097
+ resolvedTheme: l,
4056
4098
  extraStyles: e.themeExtraStyles
4057
- }), d = Lt({
4099
+ }), p = Bt({
4058
4100
  content: t.content,
4059
4101
  setContent: (e, n) => t.setContent(e, n),
4060
4102
  ...e.historyOptions
4061
4103
  });
4062
- Ut(t, d);
4063
- let f = zt({
4104
+ Kt(t, p);
4105
+ let m = Ht({
4064
4106
  addBlock: t.addBlock,
4065
4107
  removeBlock: t.removeBlock,
4066
4108
  updateBlock: t.updateBlock,
4067
4109
  selectBlock: t.selectBlock,
4068
4110
  findBlockLocation: t.findBlockLocation,
4069
4111
  blockDefaults: n.blockDefaults
4070
- }), m = Vt(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Bt({
4112
+ }), h = Wt(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Ut({
4071
4113
  content: t.content,
4072
4114
  isDirty: () => t.state.isDirty,
4073
4115
  ...e.autoSaveOptions
4074
- }) : null, _ = null;
4075
- g && (_ = s(d.isNavigating, (e) => {
4116
+ }) : null, v = null;
4117
+ g && (v = c(p.isNavigating, (e) => {
4076
4118
  e ? g.pause() : g.resume();
4077
4119
  }));
4078
- let v = $t(t, {
4120
+ let y = nn(t, {
4079
4121
  t: a,
4080
4122
  format: o
4081
- }), y = sn();
4082
- if (fn(y, Es), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, ar);
4083
- function b(e) {
4084
- for (let t of e) y.registerCustom(t, ar);
4123
+ }), b = un();
4124
+ if (hn(b, As), n.customBlocks?.length) for (let e of n.customBlocks) b.registerCustom(e, ur);
4125
+ function x(e) {
4126
+ for (let t of e) b.registerCustom(t, ur);
4085
4127
  }
4086
- let S = qt();
4087
- if (p() && ne(S.dispose), e.containerEl) {
4128
+ let S = Xt();
4129
+ if (s() && u(S.dispose), e.containerEl) {
4088
4130
  let t = e.containerEl;
4089
- ze(document, "pointerdown", (e) => {
4131
+ Ge(document, "pointerdown", (e) => {
4090
4132
  let n = t.value;
4091
4133
  n && (e.composedPath?.() ?? []).includes(n) && S.claim();
4092
4134
  }, { capture: !0 });
4093
4135
  }
4094
4136
  function C(r) {
4095
- S.isActive() && mn(r, {
4096
- history: d,
4137
+ S.isActive() && _n(r, {
4138
+ history: p,
4097
4139
  selectBlock: (e) => t.selectBlock(e),
4098
4140
  getSelectedBlockId: () => t.state.selectedBlockId,
4099
4141
  removeBlock: (e) => t.removeBlock(e),
@@ -4101,39 +4143,39 @@ function Ds(e) {
4101
4143
  onBeforeUndo: e.keyboardOptions?.onBeforeUndo
4102
4144
  });
4103
4145
  }
4104
- ze(document, "keydown", C);
4105
- let w = h(null);
4106
- E(lt, e.editorRoot ?? document), E(Ge, w), E(Ye, r), E(ft, t), E(rt, d), E(ut, f), E(_t, m), E(ct, i), E(et, u), E(Xe, c), E(it, n.blockDefaults), E(mt, y), E(ot, n.customBlocks ?? []), E(dt, n.paletteBlocks), E(st, cn(t.content, y));
4107
- let T = fe(n.mergeTags?.syntax);
4108
- E(tt, n.mergeTags?.tags ?? []), E(nt, T), E($e, n.mergeTags?.onRequest ?? null), E(Ke, n.mergeTags?.autocomplete !== !1), E(yt, Jt()), E(at, n.logicTags?.tags ?? []), E(xt, n.logicTags?.pairs ?? []), E(Je, n.logicTags?.onRequest ?? null), E(bt, Yt()), E(qe, n.onRequestMedia ?? null), E(ht, n.displayConditions?.conditions ?? []), E(pt, n.displayConditions?.allowCustom ?? !1), E(gt, e.capabilities ?? {}), E(vt, v);
4109
- let ee = Xt(n.lint) ? null : Zt({
4146
+ Ge(document, "keydown", C);
4147
+ let w = _(null);
4148
+ E(ft, e.editorRoot ?? document), E(Je, w), E(Qe, r), E(ht, t), E(ot, p), E(pt, m), E(bt, h), E(dt, i), E(rt, f), E($e, l), E(st, n.blockDefaults), E(_t, b), E(lt, n.customBlocks ?? []), E(mt, n.paletteBlocks), E(ut, dn(t.content, b));
4149
+ let T = pe(n.mergeTags?.syntax);
4150
+ E(it, n.mergeTags?.tags ?? []), E(at, T), E(nt, n.mergeTags?.onRequest ?? null), E(Ye, n.mergeTags?.autocomplete !== !1), E(St, Zt()), E(ct, n.logicTags?.tags ?? []), E(wt, n.logicTags?.pairs ?? []), E(Ze, n.logicTags?.onRequest ?? null), E(Ct, Qt()), E(Xe, n.onRequestMedia ?? null), E(vt, n.displayConditions?.conditions ?? []), E(gt, n.displayConditions?.allowCustom ?? !1), E(yt, e.capabilities ?? {}), E(xt, y);
4151
+ let D = $t(n.lint) ? null : en({
4110
4152
  content: t.content,
4111
4153
  options: n.lint ?? {},
4112
4154
  updateBlock: t.updateBlock,
4113
4155
  updateSettings: t.updateSettings,
4114
4156
  removeBlock: t.removeBlock
4115
4157
  });
4116
- E(Qe, ee);
4117
- function D() {
4118
- _?.(), ee?.destroy(), g?.destroy(), d.destroy();
4158
+ E(tt, D);
4159
+ function O() {
4160
+ v?.(), D?.destroy(), g?.destroy(), p.destroy();
4119
4161
  }
4120
4162
  return {
4121
4163
  t: a,
4122
4164
  format: o,
4123
- history: d,
4124
- blockActions: f,
4125
- conditionPreview: m,
4165
+ history: p,
4166
+ blockActions: m,
4167
+ conditionPreview: h,
4126
4168
  autoSave: g,
4127
- resolvedTheme: c,
4128
- themeStyles: u,
4129
- themeOverrides: l,
4130
- registry: y,
4131
- keyboardReorder: v,
4132
- templateLint: ee,
4169
+ resolvedTheme: l,
4170
+ themeStyles: f,
4171
+ themeOverrides: d,
4172
+ registry: b,
4173
+ keyboardReorder: y,
4174
+ templateLint: D,
4133
4175
  popoverRoot: w,
4134
- registerCustomBlocks: b,
4135
- destroy: D
4176
+ registerCustomBlocks: x,
4177
+ destroy: O
4136
4178
  };
4137
4179
  }
4138
4180
  //#endregion
4139
- export { En as A, Hn as C, Nn as D, In as E, _n as F, on as I, Qt as L, Sn as M, xn as N, kn as O, bn as P, Ht as R, Un as S, Ln as T, fr as _, os as a, Xn as b, Go as c, Vr as d, Br as f, mr as g, Er as h, ls as i, Tn as j, On as k, ri as l, Ar as m, Ts as n, $o as o, zr as p, hs as r, Xo as s, Ds as t, ti as u, sr as v, Rn as w, Jn as x, ar as y, Nt as z };
4181
+ export { jn as A, qn as C, Rn as D, Vn as E, Sn as F, ln as I, tn as L, Dn as M, En as N, Pn as O, Tn as P, Gt as R, Jn as S, Hn as T, _r as _, us as a, tr as b, Yo as c, Kr as d, Gr as f, yr as g, jr as h, ps as i, An as j, Nn as k, ci as l, Fr as m, ks as n, rs as o, Wr as p, ys as r, es as s, js as t, oi as u, fr as v, Un as w, $n as x, ur as y, It as z };