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