@templatical/editor 0.6.4 → 0.6.6

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 (128) hide show
  1. package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-B2MT0M58.js} +34 -34
  2. package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-w5ek3Z76.js} +62 -62
  3. package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-ChlAWywJ.js} +20 -20
  4. package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-C0S6kPC4.js} +12 -12
  5. package/dist/{CloudEditor-nzrRhHIi.js → CloudEditor-DYYaScFe.js} +441 -441
  6. package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-Bo8vtPId.js} +20 -20
  7. package/dist/CommentsSidebar-BQROg36f.js +441 -0
  8. package/dist/{cdn/chunks/CountdownBlock-5YdT1uUu.js → CountdownBlock-Bxqe7zwL.js} +21 -22
  9. package/dist/CountdownToolbar-CpFAnjSo.js +210 -0
  10. package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-CfqpcWX6.js} +52 -52
  11. package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-CFkDkjBb.js} +1 -1
  12. package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-CKhsaPnA.js} +79 -79
  13. package/dist/{ModulePreviewCanvas-CHdOwV_4.js → ModulePreviewCanvas-Cw9GeGus.js} +29 -29
  14. package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Dw8dN1Pt.js} +88 -88
  15. package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-DjDiUzmv.js} +218 -218
  16. package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CK3Om7ES.js} +38 -38
  17. package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-CSUPmfRP.js} +34 -34
  18. package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-DwX2fj6N.js} +33 -33
  19. package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-BIAeCAEP.js} +82 -82
  20. package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-CIlBvWWn.js} +30 -30
  21. package/dist/{TitleEditor-fStSADI-.js → TitleEditor-BCV5k6wj.js} +67 -67
  22. package/dist/{TplModal-BwSfxIHf.js → TplModal-C3Hq9b58.js} +14 -14
  23. package/dist/{accessibility-e8JYu_zd.js → accessibility-BgUEA-Ai.js} +1 -1
  24. package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-iUurP50H.js} +2 -2
  25. package/dist/bundle-stats.json +6 -6
  26. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-AQD2ygU6.js} +34 -34
  27. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-AQD2ygU6.js.map} +1 -1
  28. package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-CDh9ifC8.js} +16 -16
  29. package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js.map → AiFeatureMenu-CDh9ifC8.js.map} +1 -1
  30. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-BxZr3s7T.js} +10 -10
  31. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-BxZr3s7T.js.map} +1 -1
  32. package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js → CloudEditor-Fg7pQ9IQ.js} +425 -425
  33. package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js.map → CloudEditor-Fg7pQ9IQ.js.map} +1 -1
  34. package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-B5a8eBXN.js} +20 -20
  35. package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js.map → CollaboratorBar-B5a8eBXN.js.map} +1 -1
  36. package/dist/cdn/chunks/CountdownBlock-BeHkO19t.js +93 -0
  37. package/dist/cdn/chunks/{CountdownBlock-5YdT1uUu.js.map → CountdownBlock-BeHkO19t.js.map} +1 -1
  38. package/dist/cdn/chunks/CountdownToolbar-8UfW0jb1.js +212 -0
  39. package/dist/cdn/chunks/{CountdownToolbar-DXPXrbAA.js.map → CountdownToolbar-8UfW0jb1.js.map} +1 -1
  40. package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js → ModuleBrowserModal-BMUyAmmj.js} +43 -43
  41. package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js.map → ModuleBrowserModal-BMUyAmmj.js.map} +1 -1
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js → ModulePreviewCanvas-CxSc7Pvd.js} +23 -23
  43. package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js.map → ModulePreviewCanvas-CxSc7Pvd.js.map} +1 -1
  44. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-BSOUOUCL.js} +108 -108
  45. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-BSOUOUCL.js.map} +1 -1
  46. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-S1bpgxe5.js} +187 -187
  47. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-S1bpgxe5.js.map} +1 -1
  48. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-ByehRfEA.js} +33 -33
  49. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-ByehRfEA.js.map} +1 -1
  50. package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-5CNMvgYL.js} +27 -27
  51. package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js.map → SaveModuleDialog-5CNMvgYL.js.map} +1 -1
  52. package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-BASWPsCM.js} +66 -66
  53. package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js.map → TitleEditor-BASWPsCM.js.map} +1 -1
  54. package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js → blockTypeIcons-DfOffaYP.js} +3 -3
  55. package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js.map → blockTypeIcons-DfOffaYP.js.map} +1 -1
  56. package/dist/cdn/chunks/draggable-CNhyCGIO.js +4804 -0
  57. package/dist/cdn/chunks/draggable-CNhyCGIO.js.map +1 -0
  58. package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-BJOV1jre.js} +95 -95
  59. package/dist/cdn/chunks/{extensions-DIxF31tA.js.map → extensions-BJOV1jre.js.map} +1 -1
  60. package/dist/cdn/chunks/{features-DEMb13KS.js → features-D6FoOm8v.js} +2272 -2269
  61. package/dist/cdn/chunks/features-D6FoOm8v.js.map +1 -0
  62. package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-CpsjWPU-.js} +2 -2
  63. package/dist/cdn/chunks/{icons-CsLTcirh.js.map → icons-CpsjWPU-.js.map} +1 -1
  64. package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-CEd7Lqxk.js} +1397 -1397
  65. package/dist/cdn/chunks/{media-library-CVaNvhpM.js.map → media-library-CEd7Lqxk.js.map} +1 -1
  66. package/dist/cdn/chunks/{pusher-CDbNlZBE.js → pusher-bjpcqCZG.js} +2 -2
  67. package/dist/cdn/chunks/{pusher-CDbNlZBE.js.map → pusher-bjpcqCZG.js.map} +1 -1
  68. package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-Bx1oORXQ.js} +3 -3
  69. package/dist/cdn/chunks/{quality-BaBfc54_.js.map → quality-Bx1oORXQ.js.map} +1 -1
  70. package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-CwxCisa-.js} +3 -3
  71. package/dist/cdn/chunks/{renderer-CUxvx7ro.js.map → renderer-CwxCisa-.js.map} +1 -1
  72. package/dist/{rolldown-runtime-BZGGJVDF.js → cdn/chunks/rolldown-runtime-C266TIVP.js} +5 -5
  73. package/dist/cdn/chunks/{src-CRaqN-p8.js → src-DDSInEkE.js} +171 -171
  74. package/dist/cdn/chunks/{src-CRaqN-p8.js.map → src-DDSInEkE.js.map} +1 -1
  75. package/dist/cdn/chunks/styles-B1uu-Cc9.js +2944 -0
  76. package/dist/cdn/chunks/styles-B1uu-Cc9.js.map +1 -0
  77. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-IyIsncxY.js} +45 -46
  78. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-IyIsncxY.js.map} +1 -1
  79. package/dist/cdn/editor.css +1 -1
  80. package/dist/cdn/editor.js +122 -122
  81. package/dist/cdn/editor.js.map +1 -1
  82. package/dist/{check-Da05j8yl.js → check-Bg5yrRmX.js} +1 -1
  83. package/dist/{chevron-down-R2uY34iD.js → chevron-down-tee-ghFi.js} +1 -1
  84. package/dist/{circle-alert-DZuGWPX-.js → circle-alert-C0L9pUQ4.js} +1 -1
  85. package/dist/{clock-CRp2sIub.js → clock-CDlEdqiP.js} +1 -1
  86. package/dist/{cloud-DEk_b4CR.js → cloud-a3VovHva.js} +145 -145
  87. package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-Di4mqmGn.js} +9 -9
  88. package/dist/{dist-B1IR0bpH.js → dist-BzRLLpfq.js} +107 -107
  89. package/dist/{dist-BFawx6IS.js → dist-Pk4MhWMP.js} +35 -35
  90. package/dist/{extensions-CUcl9Ok4.js → extensions-BF39Siqk.js} +103 -103
  91. package/dist/{image-up-MBZKKg9p.js → image-up-1D_3XDdO.js} +1 -1
  92. package/dist/index.d.ts +8 -8
  93. package/dist/{info-CJEC7piy.js → info-DTGrc0Bx.js} +1 -1
  94. package/dist/{keys-ciNfSSGj.js → keys-Bqs_0du9.js} +1 -1
  95. package/dist/{loader-circle-DsY5Yg33.js → loader-circle-_9bP23op.js} +1 -1
  96. package/dist/{message-circle-yElBbR2C.js → message-circle-gzy2ZGJ3.js} +1 -1
  97. package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-BNAhAmtL.js} +1 -1
  98. package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
  99. package/dist/{scan-line-D0vcUekt.js → scan-line-DUEg6DoT.js} +1 -1
  100. package/dist/{send-DH4oDQqC.js → send-BatIZC9a.js} +1 -1
  101. package/dist/{shield-check-CfJgs2Hd.js → shield-check-C5Gv2cM1.js} +1 -1
  102. package/dist/{sparkles-CvRXGqFs.js → sparkles-D1IGi_cC.js} +1 -1
  103. package/dist/style.css +1 -1
  104. package/dist/styles-BgmKdc2x.js +3173 -0
  105. package/dist/templatical-editor.js +99 -99
  106. package/dist/{text-align-start-BT9VUDxK.js → text-align-start-DG3aAH7Y.js} +1 -1
  107. package/dist/{trash-2-DbP2Y6t2.js → trash-2-424iqbpN.js} +1 -1
  108. package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DWQySIE2.js} +1 -1
  109. package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-CL_AwWwi.js} +4 -4
  110. package/dist/useEditorCore-CnXrv71D.js +3794 -0
  111. package/dist/{useI18n-lb2DHDiu.js → useI18n-CgmQftNf.js} +4 -4
  112. package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-vpwrZ9eQ.js} +3 -3
  113. package/dist/vue.runtime.esm-bundler-Bxqkjqhc.js +4300 -0
  114. package/dist/{x-u2oVmjN_.js → x-Dlaenqta.js} +1 -1
  115. package/package.json +8 -8
  116. package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
  117. package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
  118. package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
  119. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
  120. package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
  121. package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
  122. package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
  123. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
  124. package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
  125. package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
  126. package/dist/styles-DEXEkBvg.js +0 -3176
  127. package/dist/useEditorCore-C6ost42Q.js +0 -9342
  128. package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +0 -5775
@@ -0,0 +1,3794 @@
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, v as N, w as ae, x as oe, y as se, z as ce } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
2
+ import { A as le, S as ue, T as de, _ as fe, a as pe, b as me, c as he, d as ge, f as _e, g as ve, h as ye, j as be, k as xe, l as Se, m as Ce, o as we, p as Te, s as Ee, t as De, u as Oe, v as ke, x as Ae, y as je } from "./dist-DJmnUmW9.js";
3
+ import { a as Me, c as Ne, i as Pe, l as Fe, n as Ie, r as Le, s as Re } from "./dist-BzRLLpfq.js";
4
+ import { D as ze, E as Be, O as Ve, S as He, T as Ue, _ as We, a as Ge, b as Ke, c as qe, d as Je, f as Ye, g as Xe, h as Ze, m as Qe, o as $e, p as et, r as tt, s as nt, t as rt, v as it, x as at, y as ot } from "./keys-Bqs_0du9.js";
5
+ import { t as st } from "./useI18n-CgmQftNf.js";
6
+ import { t as P } from "./createLucideIcon-Di4mqmGn.js";
7
+ import { t as ct } from "./message-circle-gzy2ZGJ3.js";
8
+ import { t as lt } from "./trash-2-424iqbpN.js";
9
+ import { t as ut } from "./triangle-alert-DWQySIE2.js";
10
+ import { t as dt } from "./LoadingTrack-CFkDkjBb.js";
11
+ import { t as ft } from "./_plugin-vue_export-helper-B0hnzhyu.js";
12
+ import "./useCloudI18n-CL_AwWwi.js";
13
+ import { t as pt } from "./useMergeTag-vpwrZ9eQ.js";
14
+ //#region ../core/dist/index.js
15
+ function mt(e) {
16
+ let t = o({
17
+ content: e.content ?? Oe(e.defaultFontFamily, e.templateDefaults),
18
+ selectedBlockId: null,
19
+ viewport: "desktop",
20
+ darkMode: !1,
21
+ previewMode: !1,
22
+ isDirty: !1,
23
+ uiTheme: "auto"
24
+ }), n = m({
25
+ get: () => t.content,
26
+ set: (e) => {
27
+ t.content = e, t.isDirty = !0;
28
+ }
29
+ }), r = m(() => t.selectedBlockId ? i(t.content.blocks, t.selectedBlockId) : null);
30
+ function i(e, t) {
31
+ for (let n of e) {
32
+ if (n.id === t) return n;
33
+ if (n.type === "section") for (let e of n.children) {
34
+ let n = i(e, t);
35
+ if (n) return n;
36
+ }
37
+ }
38
+ return null;
39
+ }
40
+ function a(e, t, n = { blocks: e }) {
41
+ for (let r = 0; r < e.length; r++) {
42
+ let i = e[r];
43
+ if (i.id === t) return n;
44
+ if (i.type === "section") for (let e = 0; e < i.children.length; e++) {
45
+ let n = a(i.children[e], t, {
46
+ blocks: i.children[e],
47
+ sectionId: i.id,
48
+ columnIndex: e
49
+ });
50
+ if (n) return n;
51
+ }
52
+ }
53
+ return null;
54
+ }
55
+ function s(t) {
56
+ return e.lockedBlocks?.value.has(t) ?? !1;
57
+ }
58
+ function c(e, n = !0) {
59
+ t.content = e, n && (t.isDirty = !0);
60
+ }
61
+ function l(e) {
62
+ e && s(e) || (t.selectedBlockId = e);
63
+ }
64
+ function u(e) {
65
+ t.viewport = e;
66
+ }
67
+ function d(e) {
68
+ t.darkMode = e;
69
+ }
70
+ function f(e) {
71
+ t.uiTheme = e;
72
+ }
73
+ function p(e) {
74
+ t.previewMode = e, e && (t.selectedBlockId = null);
75
+ }
76
+ function h(e, n) {
77
+ if (s(e)) return;
78
+ let r = i(t.content.blocks, e);
79
+ r && (Object.assign(r, n), t.isDirty = !0);
80
+ }
81
+ function _(e) {
82
+ t.content.settings = {
83
+ ...t.content.settings,
84
+ ...e
85
+ }, t.isDirty = !0;
86
+ }
87
+ function v(e, n, r = 0, a) {
88
+ if (n) {
89
+ if (s(n)) return;
90
+ let o = i(t.content.blocks, n);
91
+ if (o && o.type === "section") {
92
+ o.children[r] = o.children[r] || [];
93
+ let t = o.children[r];
94
+ a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
95
+ }
96
+ } else a !== void 0 && a < t.content.blocks.length ? t.content.blocks.splice(a, 0, e) : t.content.blocks.push(e);
97
+ t.isDirty = !0;
98
+ }
99
+ function y(e) {
100
+ if (s(e)) return;
101
+ let n = a(t.content.blocks, e);
102
+ if (n) {
103
+ let r = n.blocks.findIndex((t) => t.id === e);
104
+ r !== -1 && (n.blocks.splice(r, 1), t.selectedBlockId === e && (t.selectedBlockId = null), t.isDirty = !0);
105
+ }
106
+ }
107
+ function b(e, n, r, o = 0) {
108
+ if (s(e) || r && s(r)) return;
109
+ let c = a(t.content.blocks, e);
110
+ if (!c) return;
111
+ let l = c.blocks.findIndex((t) => t.id === e);
112
+ if (l === -1) return;
113
+ let u;
114
+ if (r) {
115
+ let e = i(t.content.blocks, r);
116
+ if (!e || e.type !== "section") return;
117
+ e.children[o] = e.children[o] || [], u = e.children[o];
118
+ } else u = t.content.blocks;
119
+ let [d] = c.blocks.splice(l, 1);
120
+ u.splice(n, 0, d), t.isDirty = !0;
121
+ }
122
+ function x() {
123
+ t.isDirty = !0;
124
+ }
125
+ return {
126
+ state: g(t),
127
+ content: n,
128
+ selectedBlock: r,
129
+ isBlockLocked: s,
130
+ setContent: c,
131
+ selectBlock: l,
132
+ setViewport: u,
133
+ setDarkMode: d,
134
+ setUiTheme: f,
135
+ setPreviewMode: p,
136
+ updateBlock: h,
137
+ updateSettings: _,
138
+ addBlock: v,
139
+ removeBlock: y,
140
+ moveBlock: b,
141
+ markDirty: x
142
+ };
143
+ }
144
+ var ht = 50, gt = 300, _t = 1500;
145
+ function vt(e) {
146
+ let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = ht } = e, a = h([]), o = h([]), s = h(!1), c = null, l = null, u = m(() => a.value.length > 0), d = m(() => o.value.length > 0);
147
+ function f() {
148
+ return JSON.parse(JSON.stringify(t.value));
149
+ }
150
+ function p(e) {
151
+ a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
152
+ }
153
+ function g() {
154
+ l &&= (clearTimeout(l.timeoutId), null);
155
+ }
156
+ function _() {
157
+ r?.() || (g(), p(f()), o.value = []);
158
+ }
159
+ function v(e) {
160
+ if (!r?.()) {
161
+ if (l && l.blockId === e) {
162
+ clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
163
+ l = null;
164
+ }, gt);
165
+ return;
166
+ }
167
+ g(), p(f()), o.value = [], l = {
168
+ blockId: e,
169
+ timeoutId: setTimeout(() => {
170
+ l = null;
171
+ }, gt)
172
+ };
173
+ }
174
+ }
175
+ function y() {
176
+ s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
177
+ s.value = !1, c = null;
178
+ }, _t);
179
+ }
180
+ function b() {
181
+ if (a.value.length === 0) return;
182
+ g();
183
+ let e = a.value.pop();
184
+ o.value.push(f()), n(e, !0), y();
185
+ }
186
+ function x() {
187
+ if (o.value.length === 0) return;
188
+ g();
189
+ let e = o.value.pop();
190
+ a.value.push(f()), n(e, !0), y();
191
+ }
192
+ function S() {
193
+ a.value = [], o.value = [], g();
194
+ }
195
+ function C() {
196
+ S(), c &&= (clearTimeout(c), null);
197
+ }
198
+ return {
199
+ canUndo: u,
200
+ canRedo: d,
201
+ isNavigating: s,
202
+ undo: b,
203
+ redo: x,
204
+ record: _,
205
+ recordDebounced: v,
206
+ clear: S,
207
+ destroy: C
208
+ };
209
+ }
210
+ function yt(e) {
211
+ let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i } = e;
212
+ function a(n, r, a) {
213
+ let o = we(n, e.blockDefaults);
214
+ return t(o, r, a), i(o.id), o;
215
+ }
216
+ function o(e, n, r) {
217
+ let a = JSON.parse(JSON.stringify(e));
218
+ return a.id = ue(), a.type === "section" && (a.children = a.children.map((e) => e.map((e) => {
219
+ let t = JSON.parse(JSON.stringify(e));
220
+ return t.id = ue(), t;
221
+ }))), t(a, n, r), i(a.id), a;
222
+ }
223
+ function s(e) {
224
+ n(e);
225
+ }
226
+ function c(e, t, n) {
227
+ r(e, { [t]: n });
228
+ }
229
+ return {
230
+ createAndAddBlock: a,
231
+ duplicateBlock: o,
232
+ deleteBlock: s,
233
+ updateBlockProperty: c
234
+ };
235
+ }
236
+ function bt(e) {
237
+ let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
238
+ function c() {
239
+ return typeof a == "function" ? a() : a;
240
+ }
241
+ function l() {
242
+ s = !0, d();
243
+ }
244
+ function u() {
245
+ s = !1;
246
+ }
247
+ function d() {
248
+ o &&= (clearTimeout(o), null);
249
+ }
250
+ function f() {
251
+ d(), n() && r(JSON.parse(JSON.stringify(t.value)));
252
+ }
253
+ function p() {
254
+ !c() || s || (d(), o = setTimeout(() => {
255
+ o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
256
+ }, i));
257
+ }
258
+ let m = T(t, () => {
259
+ c() && !s && n() && p();
260
+ }, { deep: !0 });
261
+ function h() {
262
+ m(), d();
263
+ }
264
+ return {
265
+ flush: f,
266
+ cancel: d,
267
+ pause: l,
268
+ resume: u,
269
+ destroy: h
270
+ };
271
+ }
272
+ function xt(e) {
273
+ let t = o(/* @__PURE__ */ new Set()), n = m(() => t.size > 0);
274
+ function r(e) {
275
+ return t.has(e);
276
+ }
277
+ function i(n) {
278
+ t.has(n) ? t.delete(n) : (t.add(n), e.state.selectedBlockId === n && e.selectBlock(null));
279
+ }
280
+ function a() {
281
+ t.clear();
282
+ }
283
+ return {
284
+ isHidden: r,
285
+ toggleBlock: i,
286
+ reset: a,
287
+ hasHiddenBlocks: n
288
+ };
289
+ }
290
+ function St(e) {
291
+ let t = h(!1), n = h(!1), r = m(() => !!e.definition.value?.dataSource), i = m(() => r.value && !e.block.value.dataSourceFetched);
292
+ async function a() {
293
+ let r = e.definition.value;
294
+ if (r?.dataSource) {
295
+ t.value = !0, n.value = !1;
296
+ try {
297
+ let t = await r.dataSource.onFetch({
298
+ fieldValues: { ...e.block.value.fieldValues },
299
+ blockId: e.block.value.id
300
+ });
301
+ if (t == null) return;
302
+ let n = { ...e.block.value.fieldValues };
303
+ for (let e of Object.keys(n)) e in t && (n[e] = t[e]);
304
+ e.onUpdate(n, !0);
305
+ } catch (e) {
306
+ console.warn("[Templatical] Data source fetch error:", e), n.value = !0;
307
+ } finally {
308
+ t.value = !1;
309
+ }
310
+ }
311
+ }
312
+ return {
313
+ isFetching: t,
314
+ fetchError: n,
315
+ fetch: a,
316
+ hasDataSource: r,
317
+ needsFetch: i
318
+ };
319
+ }
320
+ function Ct(e, t) {
321
+ let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
322
+ e.addBlock = (r, i, a, o) => {
323
+ i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
324
+ }, e.removeBlock = (n) => {
325
+ e.isBlockLocked(n) || (t.record(), r(n));
326
+ }, e.moveBlock = (n, r, a, o) => {
327
+ e.isBlockLocked(n) || a && e.isBlockLocked(a) || (t.record(), i(n, r, a, o));
328
+ }, e.updateBlock = (n, r) => {
329
+ e.isBlockLocked(n) || (t.recordDebounced(n), a(n, r));
330
+ }, e.updateSettings = (e) => {
331
+ t.record(), o(e);
332
+ };
333
+ }
334
+ //#endregion
335
+ //#region src/composables/useAccessibilityLint.ts
336
+ function wt(e) {
337
+ let t = h([]), n = h(!1), r = h(!1), i = d(null), a = e.options.disabled === !0, o = null, c = !1;
338
+ a || l();
339
+ async function l() {
340
+ try {
341
+ let t = await import("@templatical/quality");
342
+ if (c) return;
343
+ i.value = t.lintAccessibility, n.value = !0, u(), o = Fe(e.content, u, {
344
+ debounce: e.debounce ?? 500,
345
+ deep: !0
346
+ });
347
+ } catch {
348
+ if (c) return;
349
+ r.value = !0;
350
+ }
351
+ }
352
+ function u() {
353
+ i.value && (t.value = i.value(e.content.value, e.options));
354
+ }
355
+ let f = s(() => e.options, () => {
356
+ i.value && u();
357
+ }, { deep: !0 });
358
+ function p(t) {
359
+ t.fix && t.fix.apply({
360
+ updateBlock: e.updateBlock,
361
+ updateSettings: e.updateSettings
362
+ });
363
+ }
364
+ function m() {
365
+ c = !0, o?.(), f();
366
+ }
367
+ return {
368
+ issues: t,
369
+ ready: n,
370
+ unavailable: r,
371
+ applyFix: p,
372
+ destroy: m
373
+ };
374
+ }
375
+ //#endregion
376
+ //#region src/utils/blockTypeLabels.ts
377
+ function Tt(e, t) {
378
+ return t.blocks[e] ?? e;
379
+ }
380
+ //#endregion
381
+ //#region src/composables/useKeyboardReorder.ts
382
+ function Et(e, t) {
383
+ let n = h(null), r = h(""), i = null;
384
+ function a(t) {
385
+ let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
386
+ if (r !== -1) return {
387
+ index: r,
388
+ total: n.length
389
+ };
390
+ for (let e of n) {
391
+ if (e.type !== "section") continue;
392
+ let n = e;
393
+ for (let e = 0; e < n.children.length; e++) {
394
+ let r = n.children[e], i = r.findIndex((e) => e.id === t);
395
+ if (i !== -1) return {
396
+ index: i,
397
+ total: r.length,
398
+ sectionId: n.id,
399
+ columnIndex: e
400
+ };
401
+ }
402
+ }
403
+ return null;
404
+ }
405
+ function o(n) {
406
+ let r = a(n);
407
+ if (!r) return "";
408
+ let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
409
+ return i ? Tt(i.type, t.t) : "";
410
+ }
411
+ function s(t, n) {
412
+ return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
413
+ }
414
+ function c(e) {
415
+ r.value = "", queueMicrotask(() => {
416
+ r.value = e;
417
+ });
418
+ }
419
+ function l(e) {
420
+ return n.value === e;
421
+ }
422
+ function u(e) {
423
+ let r = a(e);
424
+ r && (n.value = e, i = r, c(t.format(t.t.blockActions.lifted, {
425
+ block: o(e),
426
+ position: String(r.index + 1),
427
+ total: String(r.total)
428
+ })));
429
+ }
430
+ function d(n, r) {
431
+ let i = a(n);
432
+ if (!i) return;
433
+ let s = i.index + r;
434
+ s < 0 || s >= i.total || (e.moveBlock(n, s, i.sectionId, i.columnIndex), c(t.format(t.t.blockActions.moved, {
435
+ block: o(n),
436
+ position: String(s + 1),
437
+ total: String(i.total)
438
+ })));
439
+ }
440
+ function f(e) {
441
+ d(e, -1);
442
+ }
443
+ function p(e) {
444
+ d(e, 1);
445
+ }
446
+ function m(e) {
447
+ let r = a(e);
448
+ r && c(t.format(t.t.blockActions.dropped, {
449
+ block: o(e),
450
+ position: String(r.index + 1),
451
+ total: String(r.total)
452
+ })), n.value = null, i = null;
453
+ }
454
+ function g() {
455
+ let r = n.value;
456
+ if (r && i) {
457
+ let n = a(r), s = !!n && (n.sectionId !== i.sectionId || n.columnIndex !== i.columnIndex), l = !!n && n.index !== i.index;
458
+ n && (s || l) && e.moveBlock(r, i.index, i.sectionId, i.columnIndex), c(t.format(t.t.blockActions.cancelled, {
459
+ block: o(r),
460
+ position: String(i.index + 1)
461
+ }));
462
+ }
463
+ n.value = null, i = null;
464
+ }
465
+ return {
466
+ liftedBlockId: n,
467
+ announcement: r,
468
+ isLifted: l,
469
+ lift: u,
470
+ cancel: g,
471
+ moveUp: f,
472
+ moveDown: p,
473
+ drop: m
474
+ };
475
+ }
476
+ //#endregion
477
+ //#region src/composables/useUiTheme.ts
478
+ function Dt(e) {
479
+ let t = Pe("(prefers-color-scheme: dark)");
480
+ return { resolvedTheme: x(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
481
+ }
482
+ //#endregion
483
+ //#region src/composables/useThemeStyles.ts
484
+ var Ot = {
485
+ bg: "--tpl-bg",
486
+ bgElevated: "--tpl-bg-elevated",
487
+ bgHover: "--tpl-bg-hover",
488
+ bgActive: "--tpl-bg-active",
489
+ border: "--tpl-border",
490
+ borderLight: "--tpl-border-light",
491
+ text: "--tpl-text",
492
+ textMuted: "--tpl-text-muted",
493
+ textDim: "--tpl-text-dim",
494
+ primary: "--tpl-primary",
495
+ primaryHover: "--tpl-primary-hover",
496
+ primaryLight: "--tpl-primary-light",
497
+ secondary: "--tpl-secondary",
498
+ secondaryHover: "--tpl-secondary-hover",
499
+ secondaryLight: "--tpl-secondary-light",
500
+ success: "--tpl-success",
501
+ successLight: "--tpl-success-light",
502
+ warning: "--tpl-warning",
503
+ warningLight: "--tpl-warning-light",
504
+ danger: "--tpl-danger",
505
+ dangerLight: "--tpl-danger-light",
506
+ canvasBg: "--tpl-canvas-bg"
507
+ };
508
+ function kt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
509
+ return { themeStyles: x(() => {
510
+ let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
511
+ if (a) for (let [e, t] of Object.entries(Ot)) {
512
+ let n = a[e];
513
+ n && (r[t] = n);
514
+ }
515
+ return n && Object.assign(r, n()), r;
516
+ }) };
517
+ }
518
+ //#endregion
519
+ //#region src/utils/logger.ts
520
+ var At = "[Templatical]";
521
+ function jt() {
522
+ return typeof process < "u" && process.env.NODE_ENV === "production";
523
+ }
524
+ var Mt = {
525
+ warn(...e) {
526
+ console.warn(At, ...e);
527
+ },
528
+ error(...e) {
529
+ console.error(At, ...e);
530
+ },
531
+ debug(...e) {
532
+ jt() || console.debug(At, ...e);
533
+ },
534
+ info(...e) {
535
+ jt() || console.info(At, ...e);
536
+ }
537
+ };
538
+ //#endregion
539
+ //#region src/composables/useBlockRegistry.ts
540
+ function Nt() {
541
+ let e = d(/* @__PURE__ */ new Map());
542
+ function t(t, n) {
543
+ e.value.set(t, n), k(e);
544
+ }
545
+ function n(t, n) {
546
+ let r = `custom:${t.type}`, i = {
547
+ component: n,
548
+ createBlock: () => Se(t),
549
+ sidebarItem: {
550
+ type: r,
551
+ label: t.name,
552
+ icon: t.icon,
553
+ description: t.description,
554
+ isCustom: !0
555
+ },
556
+ definition: t
557
+ };
558
+ e.value.set(r, i), k(e);
559
+ }
560
+ function r(t) {
561
+ if (t.type === "custom") {
562
+ let n = `custom:${t.customType}`;
563
+ return e.value.get(n)?.component;
564
+ }
565
+ return e.value.get(t.type)?.component;
566
+ }
567
+ function i(t) {
568
+ return e.value.get(t)?.createBlock();
569
+ }
570
+ function a() {
571
+ let t = [], n = [];
572
+ for (let r of e.value.values()) r.sidebarItem.isCustom ? n.push(r.sidebarItem) : t.push(r.sidebarItem);
573
+ return [...t, ...n];
574
+ }
575
+ function o(t) {
576
+ let n = `custom:${t}`;
577
+ return e.value.get(n)?.definition;
578
+ }
579
+ function s(e) {
580
+ return `<div style="color: var(--tpl-text-muted); padding: 16px; text-align: center; border: 1px dashed var(--tpl-border); border-radius: var(--tpl-radius-sm); font-family: var(--tpl-font-family); font-size: 14px;">${e}</div>`;
581
+ }
582
+ async function c(e) {
583
+ let t = o(e.customType);
584
+ if (!t) return s("Block definition not found");
585
+ try {
586
+ let { Liquid: n } = await import("./liquid.browser-CdMv1BTn.js");
587
+ return await new n({
588
+ strictVariables: !1,
589
+ strictFilters: !1
590
+ }).parseAndRender(t.template, e.fieldValues);
591
+ } catch (t) {
592
+ return Mt.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
593
+ }
594
+ }
595
+ function l(t) {
596
+ return e.value.has(t);
597
+ }
598
+ return {
599
+ registerBuiltIn: t,
600
+ registerCustom: n,
601
+ getComponent: r,
602
+ createBlock: i,
603
+ getSidebarItems: a,
604
+ getDefinition: o,
605
+ renderCustomBlock: c,
606
+ isRegistered: l
607
+ };
608
+ }
609
+ //#endregion
610
+ //#region src/utils/registerBuiltInBlocks.ts
611
+ var Pt = [
612
+ {
613
+ type: "section",
614
+ label: "Section",
615
+ createBlock: ve
616
+ },
617
+ {
618
+ type: "title",
619
+ label: "Title",
620
+ createBlock: me
621
+ },
622
+ {
623
+ type: "paragraph",
624
+ label: "Paragraph",
625
+ createBlock: ye
626
+ },
627
+ {
628
+ type: "image",
629
+ label: "Image",
630
+ createBlock: Te
631
+ },
632
+ {
633
+ type: "button",
634
+ label: "Button",
635
+ createBlock: Ee
636
+ },
637
+ {
638
+ type: "divider",
639
+ label: "Divider",
640
+ createBlock: ge
641
+ },
642
+ {
643
+ type: "video",
644
+ label: "Video",
645
+ createBlock: Ae
646
+ },
647
+ {
648
+ type: "social",
649
+ label: "Social",
650
+ createBlock: fe
651
+ },
652
+ {
653
+ type: "menu",
654
+ label: "Menu",
655
+ createBlock: Ce
656
+ },
657
+ {
658
+ type: "table",
659
+ label: "Table",
660
+ createBlock: je
661
+ },
662
+ {
663
+ type: "spacer",
664
+ label: "Spacer",
665
+ createBlock: ke
666
+ },
667
+ {
668
+ type: "html",
669
+ label: "HTML",
670
+ createBlock: _e
671
+ },
672
+ {
673
+ type: "countdown",
674
+ label: "Countdown",
675
+ createBlock: he
676
+ }
677
+ ];
678
+ function Ft(e, t) {
679
+ for (let n of Pt) {
680
+ let r = t[n.type];
681
+ r && e.registerBuiltIn(n.type, {
682
+ component: r,
683
+ createBlock: n.createBlock,
684
+ sidebarItem: {
685
+ type: n.type,
686
+ label: n.label,
687
+ isCustom: !1
688
+ }
689
+ });
690
+ }
691
+ }
692
+ //#endregion
693
+ //#region src/utils/keyboardShortcuts.ts
694
+ function It(e) {
695
+ let t = e.target;
696
+ return t.isContentEditable || t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.tagName === "SELECT";
697
+ }
698
+ function Lt(e, t) {
699
+ let n = e.metaKey || e.ctrlKey;
700
+ if (n && e.key.toLowerCase() === "s") {
701
+ e.preventDefault(), t.onSave?.();
702
+ return;
703
+ }
704
+ if (n && e.key.toLowerCase() === "z") {
705
+ if (It(e)) return;
706
+ e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
707
+ return;
708
+ }
709
+ if (e.key === "Escape") {
710
+ t.selectBlock(null);
711
+ return;
712
+ }
713
+ (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !It(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
714
+ }
715
+ //#endregion
716
+ //#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
717
+ var Rt = { class: "tpl:text-center" }, zt = ["href"], Bt = /* @__PURE__ */ y({
718
+ __name: "ButtonBlock",
719
+ props: {
720
+ block: {},
721
+ viewport: {}
722
+ },
723
+ setup(t) {
724
+ let n = t, r = x(() => {
725
+ let e = {
726
+ display: "inline-block",
727
+ padding: `${n.block.buttonPadding.top}px ${n.block.buttonPadding.right}px ${n.block.buttonPadding.bottom}px ${n.block.buttonPadding.left}px`,
728
+ backgroundColor: n.block.backgroundColor,
729
+ color: n.block.textColor,
730
+ fontSize: `${n.block.fontSize}px`,
731
+ fontWeight: "bold",
732
+ textDecoration: "none",
733
+ borderRadius: `${n.block.borderRadius}px`,
734
+ textAlign: "center"
735
+ };
736
+ return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
737
+ });
738
+ return (n, i) => (e(), w("div", Rt, [C("a", {
739
+ href: t.block.url || "#",
740
+ style: A(r.value),
741
+ class: "tpl:cursor-default",
742
+ onClick: i[0] ||= b(() => {}, ["prevent"])
743
+ }, M(t.block.text), 13, zt)]));
744
+ }
745
+ }), Vt = P("bookmark", [["path", {
746
+ 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",
747
+ key: "oz39mx"
748
+ }]]), Ht = P("box", [
749
+ ["path", {
750
+ 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",
751
+ key: "hh9hay"
752
+ }],
753
+ ["path", {
754
+ d: "m3.3 7 8.7 5 8.7-5",
755
+ key: "g66t2b"
756
+ }],
757
+ ["path", {
758
+ d: "M12 22V12",
759
+ key: "d0xqtd"
760
+ }]
761
+ ]), Ut = P("code", [["path", {
762
+ d: "m16 18 6-6-6-6",
763
+ key: "eg8j8"
764
+ }], ["path", {
765
+ d: "m8 6-6 6 6 6",
766
+ key: "ppft3o"
767
+ }]]), Wt = P("copy", [["rect", {
768
+ width: "14",
769
+ height: "14",
770
+ x: "8",
771
+ y: "8",
772
+ rx: "2",
773
+ ry: "2",
774
+ key: "17jyea"
775
+ }], ["path", {
776
+ d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
777
+ key: "zix9uf"
778
+ }]]), Gt = P("eye-off", [
779
+ ["path", {
780
+ 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",
781
+ key: "ct8e1f"
782
+ }],
783
+ ["path", {
784
+ d: "M14.084 14.158a3 3 0 0 1-4.242-4.242",
785
+ key: "151rxh"
786
+ }],
787
+ ["path", {
788
+ d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
789
+ key: "13bj9a"
790
+ }],
791
+ ["path", {
792
+ d: "m2 2 20 20",
793
+ key: "1ooewy"
794
+ }]
795
+ ]), Kt = P("funnel", [["path", {
796
+ 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",
797
+ key: "sc7q7i"
798
+ }]]), qt = P("grip-vertical", [
799
+ ["circle", {
800
+ cx: "9",
801
+ cy: "12",
802
+ r: "1",
803
+ key: "1vctgf"
804
+ }],
805
+ ["circle", {
806
+ cx: "9",
807
+ cy: "5",
808
+ r: "1",
809
+ key: "hp0tcf"
810
+ }],
811
+ ["circle", {
812
+ cx: "9",
813
+ cy: "19",
814
+ r: "1",
815
+ key: "fkjjf6"
816
+ }],
817
+ ["circle", {
818
+ cx: "15",
819
+ cy: "12",
820
+ r: "1",
821
+ key: "1tmaij"
822
+ }],
823
+ ["circle", {
824
+ cx: "15",
825
+ cy: "5",
826
+ r: "1",
827
+ key: "19l28e"
828
+ }],
829
+ ["circle", {
830
+ cx: "15",
831
+ cy: "19",
832
+ r: "1",
833
+ key: "f4zoj3"
834
+ }]
835
+ ]), Jt = P("image", [
836
+ ["rect", {
837
+ width: "18",
838
+ height: "18",
839
+ x: "3",
840
+ y: "3",
841
+ rx: "2",
842
+ ry: "2",
843
+ key: "1m3agn"
844
+ }],
845
+ ["circle", {
846
+ cx: "9",
847
+ cy: "9",
848
+ r: "2",
849
+ key: "af1f0g"
850
+ }],
851
+ ["path", {
852
+ d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
853
+ key: "1xmnt7"
854
+ }]
855
+ ]), Yt = P("navigation", [["polygon", {
856
+ points: "3 11 22 2 13 21 11 13 3 11",
857
+ key: "1ltx0t"
858
+ }]]), Xt = P("puzzle", [["path", {
859
+ 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",
860
+ key: "w46dr5"
861
+ }]]), Zt = P("share-2", [
862
+ ["circle", {
863
+ cx: "18",
864
+ cy: "5",
865
+ r: "3",
866
+ key: "gq8acd"
867
+ }],
868
+ ["circle", {
869
+ cx: "6",
870
+ cy: "12",
871
+ r: "3",
872
+ key: "w7nqdw"
873
+ }],
874
+ ["circle", {
875
+ cx: "18",
876
+ cy: "19",
877
+ r: "3",
878
+ key: "1xt0gg"
879
+ }],
880
+ ["line", {
881
+ x1: "8.59",
882
+ x2: "15.42",
883
+ y1: "13.51",
884
+ y2: "17.49",
885
+ key: "47mynk"
886
+ }],
887
+ ["line", {
888
+ x1: "15.41",
889
+ x2: "8.59",
890
+ y1: "6.51",
891
+ y2: "10.49",
892
+ key: "1n3mei"
893
+ }]
894
+ ]), Qt = P("table", [
895
+ ["path", {
896
+ d: "M12 3v18",
897
+ key: "108xh3"
898
+ }],
899
+ ["rect", {
900
+ width: "18",
901
+ height: "18",
902
+ x: "3",
903
+ y: "3",
904
+ rx: "2",
905
+ key: "afitv7"
906
+ }],
907
+ ["path", {
908
+ d: "M3 9h18",
909
+ key: "1pudct"
910
+ }],
911
+ ["path", {
912
+ d: "M3 15h18",
913
+ key: "5xshup"
914
+ }]
915
+ ]), $t = P("video", [["path", {
916
+ d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
917
+ key: "ftymec"
918
+ }], ["rect", {
919
+ x: "2",
920
+ y: "6",
921
+ width: "14",
922
+ height: "12",
923
+ rx: "2",
924
+ key: "158x01"
925
+ }]]), en = ["innerHTML"], tn = [
926
+ "src",
927
+ "width",
928
+ "height"
929
+ ], nn = /* @__PURE__ */ y({
930
+ __name: "CustomBlockIcon",
931
+ props: {
932
+ icon: {},
933
+ size: {}
934
+ },
935
+ setup(t) {
936
+ 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("/")));
937
+ return (n, o) => i.value ? (e(), w("span", {
938
+ key: 0,
939
+ class: "tpl:inline-flex tpl:items-center tpl:justify-center",
940
+ style: A({
941
+ width: `${r.value}px`,
942
+ height: `${r.value}px`
943
+ }),
944
+ innerHTML: t.icon
945
+ }, null, 12, en)) : a.value ? (e(), w("img", {
946
+ key: 1,
947
+ src: t.icon,
948
+ width: r.value,
949
+ height: r.value,
950
+ class: "tpl:inline-block",
951
+ alt: ""
952
+ }, null, 8, tn)) : (e(), ne(j(Ht), {
953
+ key: 2,
954
+ size: r.value,
955
+ "stroke-width": 1.5
956
+ }, null, 8, ["size"]));
957
+ }
958
+ }), rn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
959
+ function an(e, t) {
960
+ let n = null, r = null, i = null;
961
+ function a() {
962
+ return e.value ? Array.from(e.value.querySelectorAll(rn)).filter((e) => e.offsetParent !== null) : [];
963
+ }
964
+ function o(e) {
965
+ if (e.key !== "Tab") return;
966
+ let t = a();
967
+ if (t.length === 0) return;
968
+ let n = t[0], r = t[t.length - 1];
969
+ e.shiftKey ? document.activeElement === n && (e.preventDefault(), r.focus()) : document.activeElement === r && (e.preventDefault(), n.focus());
970
+ }
971
+ function c() {
972
+ let t = r !== null || i !== null;
973
+ t && l({ restoreFocus: !1 }), t || (n = document.activeElement), i = requestAnimationFrame(() => {
974
+ i = null;
975
+ let t = a();
976
+ t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
977
+ }), r = Le(e, "keydown", o);
978
+ }
979
+ function l(e = {}) {
980
+ let t = e.restoreFocus !== !1;
981
+ i !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(i), i = null), r?.(), r = null, t && n && n.focus && (n.focus(), n = null);
982
+ }
983
+ let u = s([t, e], ([e, t]) => {
984
+ e && t ? c() : l();
985
+ }, { flush: "post" });
986
+ re(() => {
987
+ u(), l();
988
+ });
989
+ }
990
+ //#endregion
991
+ //#region src/composables/useEmoji.ts
992
+ function on() {
993
+ let [e, t] = Ne(!1), n = d([]), r = !1;
994
+ re(() => {
995
+ r = !0;
996
+ }), s(e, async (e) => {
997
+ if (e && n.value.length === 0) {
998
+ let { emojiCategories: e } = await import("./emojiData-PQyVa4bU.js");
999
+ if (r) return;
1000
+ n.value = e;
1001
+ }
1002
+ });
1003
+ function i() {
1004
+ t();
1005
+ }
1006
+ function a() {
1007
+ e.value = !1;
1008
+ }
1009
+ return {
1010
+ categories: n,
1011
+ isOpen: e,
1012
+ toggle: i,
1013
+ close: a
1014
+ };
1015
+ }
1016
+ //#endregion
1017
+ //#region src/composables/useDragDrop.ts
1018
+ function sn(e) {
1019
+ let { onBlockMove: t, onBlockAdd: n } = e, r = h(!1), i = h(null), a = h(null);
1020
+ function o(e) {
1021
+ r.value = !0, i.value = e;
1022
+ }
1023
+ function s() {
1024
+ r.value = !1, i.value = null, a.value = null;
1025
+ }
1026
+ function c(e) {
1027
+ a.value = e;
1028
+ }
1029
+ function l(e, r, a, o) {
1030
+ i.value && (e.findIndex((e) => e.id === i.value.id) === -1 ? n(i.value, a, o) : t(i.value.id, r, a, o), s());
1031
+ }
1032
+ function u(e, n, i) {
1033
+ return {
1034
+ group: e,
1035
+ animation: 150,
1036
+ ghostClass: "tpl-ghost",
1037
+ dragClass: "tpl-drag",
1038
+ handle: ".tpl-drag-handle",
1039
+ onStart: (e) => {
1040
+ e.item.dataset.blockId && (r.value = !0);
1041
+ },
1042
+ onEnd: () => {
1043
+ s();
1044
+ },
1045
+ onAdd: (e) => {
1046
+ let r = e.item.dataset.blockId;
1047
+ r && t(r, e.newIndex, n, i);
1048
+ },
1049
+ onUpdate: (e) => {
1050
+ let r = e.item.dataset.blockId;
1051
+ r && t(r, e.newIndex, n, i);
1052
+ }
1053
+ };
1054
+ }
1055
+ return {
1056
+ isDragging: r,
1057
+ draggedBlock: i,
1058
+ dropTargetId: a,
1059
+ startDrag: o,
1060
+ endDrag: s,
1061
+ setDropTarget: c,
1062
+ handleDrop: l,
1063
+ getSortableOptions: u
1064
+ };
1065
+ }
1066
+ //#endregion
1067
+ //#region src/composables/useFonts.ts
1068
+ var cn = [
1069
+ {
1070
+ value: "Arial",
1071
+ label: "Arial"
1072
+ },
1073
+ {
1074
+ value: "Helvetica",
1075
+ label: "Helvetica"
1076
+ },
1077
+ {
1078
+ value: "Georgia",
1079
+ label: "Georgia"
1080
+ },
1081
+ {
1082
+ value: "Times New Roman",
1083
+ label: "Times New Roman"
1084
+ },
1085
+ {
1086
+ value: "Verdana",
1087
+ label: "Verdana"
1088
+ },
1089
+ {
1090
+ value: "Trebuchet MS",
1091
+ label: "Trebuchet MS"
1092
+ },
1093
+ {
1094
+ value: "Courier New",
1095
+ label: "Courier New"
1096
+ }
1097
+ ], ln = {
1098
+ arial: "Arial, sans-serif",
1099
+ helvetica: "Helvetica, sans-serif",
1100
+ georgia: "Georgia, serif",
1101
+ "times new roman": "'Times New Roman', serif",
1102
+ verdana: "Verdana, sans-serif",
1103
+ "trebuchet ms": "'Trebuchet MS', sans-serif",
1104
+ "courier new": "'Courier New', monospace"
1105
+ }, un = "Arial, sans-serif";
1106
+ function dn(e) {
1107
+ let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ?? un);
1108
+ function a(e) {
1109
+ n.value = e;
1110
+ }
1111
+ let o = x(() => {
1112
+ let e = [...cn];
1113
+ if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
1114
+ let r = t.value.map((e) => ({
1115
+ value: e.name,
1116
+ label: e.name,
1117
+ isCustom: !0
1118
+ })), i = [...e, ...r];
1119
+ return i.sort((e, t) => e.label.localeCompare(t.label)), i;
1120
+ });
1121
+ function s(e) {
1122
+ return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1123
+ }
1124
+ function c(e) {
1125
+ return cn.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1126
+ }
1127
+ function l() {
1128
+ if (e?.defaultFont) {
1129
+ if (!n.value && !c(e.defaultFont)) return un;
1130
+ if (s(e.defaultFont)) {
1131
+ let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
1132
+ if (t) return t.value;
1133
+ }
1134
+ }
1135
+ return un;
1136
+ }
1137
+ let u = x(() => l());
1138
+ function d(e) {
1139
+ if (!e) return i.value;
1140
+ let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
1141
+ if (n) {
1142
+ let e = n.fallback ?? i.value;
1143
+ return `'${n.name}', ${e}`;
1144
+ }
1145
+ return ln[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
1146
+ }
1147
+ let f = [];
1148
+ async function m() {
1149
+ if (t.value.length === 0) {
1150
+ r.value = !0;
1151
+ return;
1152
+ }
1153
+ let e = t.value.map(async (e) => {
1154
+ try {
1155
+ if (document.querySelector(`link[data-custom-font="${CSS.escape(e.name)}"]`)) return;
1156
+ let t = document.createElement("link");
1157
+ t.rel = "stylesheet", t.href = e.url, t.setAttribute("data-custom-font", e.name), f.push(t), await new Promise((n, r) => {
1158
+ t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
1159
+ });
1160
+ } catch (t) {
1161
+ Mt.warn(`Failed to load custom font "${e.name}":`, t);
1162
+ }
1163
+ });
1164
+ await Promise.allSettled(e), r.value = !0;
1165
+ }
1166
+ function g() {
1167
+ for (let e of f) e.remove();
1168
+ f.length = 0;
1169
+ }
1170
+ return p() && re(g), {
1171
+ fonts: o,
1172
+ defaultFont: u,
1173
+ defaultFallback: i,
1174
+ customFonts: t,
1175
+ customFontsEnabled: n,
1176
+ isLoaded: r,
1177
+ setCustomFontsEnabled: a,
1178
+ loadCustomFonts: m,
1179
+ cleanupFontLinks: g,
1180
+ getFontWithFallback: d,
1181
+ getDefaultFont: l
1182
+ };
1183
+ }
1184
+ //#endregion
1185
+ //#region src/composables/useRichTextLinkDialog.ts
1186
+ function fn(e) {
1187
+ let t = h(!1), n = h(""), r = h(null);
1188
+ an(r, t);
1189
+ function i() {
1190
+ n.value = e.value?.getAttributes("link").href || "", t.value = !0;
1191
+ }
1192
+ function a() {
1193
+ if (n.value) {
1194
+ let t = o(n.value);
1195
+ e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).run();
1196
+ }
1197
+ c();
1198
+ }
1199
+ function o(e) {
1200
+ return /^[a-z][a-z0-9+.-]*:/i.test(e) || e.startsWith("#") ? e : `https://${e}`;
1201
+ }
1202
+ function s() {
1203
+ e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), c();
1204
+ }
1205
+ function c() {
1206
+ t.value = !1, n.value = "";
1207
+ }
1208
+ function l(e) {
1209
+ e.key === "Enter" ? (e.preventDefault(), a()) : e.key === "Escape" && c();
1210
+ }
1211
+ return {
1212
+ showLinkDialog: t,
1213
+ linkUrl: n,
1214
+ linkDialogRef: r,
1215
+ openLinkDialog: i,
1216
+ insertLink: a,
1217
+ removeLink: s,
1218
+ closeLinkDialog: c,
1219
+ handleLinkKeydown: l
1220
+ };
1221
+ }
1222
+ //#endregion
1223
+ //#region src/composables/useRichTextEditor.ts
1224
+ function pn(e) {
1225
+ let t = ae(Qe, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = pt(), f = ae(Be, null), p = (a(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = de(l), g = d(null), { showLinkDialog: _, linkUrl: v, linkDialogRef: y, openLinkDialog: b, insertLink: x, removeLink: S, closeLinkDialog: C, handleLinkKeydown: w } = fn(g), { start: T, stop: E } = Re(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ee = d(null), D = h(!0), O = h(null), k = !1;
1226
+ async function te() {
1227
+ O.value = null, D.value = !0;
1228
+ try {
1229
+ let { TiptapEditor: n, EC: i, extensions: a } = await e.loadExtensions({
1230
+ mergeTags: r,
1231
+ syntax: l,
1232
+ triggerChar: m,
1233
+ autocompleteEnabled: u,
1234
+ suggestionEmptyText: p
1235
+ });
1236
+ if (k) return;
1237
+ ee.value = i;
1238
+ let o = /* @__PURE__ */ new Map();
1239
+ a.forEach((e, t) => o.set(e.name, t));
1240
+ let s = new n({
1241
+ extensions: a.filter((e, t) => o.get(e.name) === t),
1242
+ content: e.blockContent(),
1243
+ editable: !0,
1244
+ onUpdate: ({ editor: n }) => {
1245
+ k || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
1246
+ }
1247
+ });
1248
+ if (k) {
1249
+ s.destroy();
1250
+ return;
1251
+ }
1252
+ g.value = s, D.value = !1, T();
1253
+ } catch (t) {
1254
+ if (k) return;
1255
+ Mt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), O.value = t instanceof Error ? t.message : "Failed to load editor", D.value = !1;
1256
+ }
1257
+ }
1258
+ function A() {
1259
+ g.value?.destroy(), g.value = null, te();
1260
+ }
1261
+ te();
1262
+ let ne = s(() => e.blockContent(), (e) => {
1263
+ g.value && g.value.getHTML() !== e && g.value.commands.setContent(e, { emitUpdate: !1 });
1264
+ });
1265
+ function re(t) {
1266
+ if (o.value) return;
1267
+ let n = t.target;
1268
+ e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone();
1269
+ }
1270
+ Le(document, "mousedown", re), n(() => {
1271
+ k = !0, ne(), E(), g.value?.destroy();
1272
+ });
1273
+ async function j() {
1274
+ let e = await c();
1275
+ k || (e && g.value ? g.value.chain().focus().insertMergeTag({
1276
+ label: e.label,
1277
+ value: e.value
1278
+ }).run() : g.value?.commands.focus());
1279
+ }
1280
+ return {
1281
+ editor: g,
1282
+ EditorContent: ee,
1283
+ isLoading: D,
1284
+ initError: O,
1285
+ retry: A,
1286
+ showLinkDialog: _,
1287
+ linkUrl: v,
1288
+ linkDialogRef: y,
1289
+ mergeTags: r,
1290
+ canRequestMergeTag: i,
1291
+ isRequestingMergeTag: o,
1292
+ syntax: l,
1293
+ openLinkDialog: b,
1294
+ insertLink: x,
1295
+ removeLink: S,
1296
+ closeLinkDialog: C,
1297
+ handleLinkKeydown: w,
1298
+ handleAddMergeTag: j
1299
+ };
1300
+ }
1301
+ //#endregion
1302
+ //#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
1303
+ var mn = { class: "tpl:w-full" }, hn = {
1304
+ key: 0,
1305
+ 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)]"
1306
+ }, gn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, _n = {
1307
+ key: 1,
1308
+ 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)]"
1309
+ }, vn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, yn = {
1310
+ key: 2,
1311
+ class: "tpl:relative"
1312
+ }, bn = ["innerHTML"], xn = {
1313
+ key: 0,
1314
+ 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]",
1315
+ style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
1316
+ }, Sn = /* @__PURE__ */ y({
1317
+ __name: "CustomBlock",
1318
+ props: {
1319
+ block: {},
1320
+ viewport: {}
1321
+ },
1322
+ emits: ["fetchData"],
1323
+ setup(t, { emit: n }) {
1324
+ let r = t, i = n, { t: a } = st(), o = ae(nt, 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 } = St({
1325
+ definition: d,
1326
+ block: x(() => r.block),
1327
+ onUpdate: (e, t) => {
1328
+ i("fetchData", {
1329
+ fieldValues: e,
1330
+ dataSourceFetched: t
1331
+ });
1332
+ }
1333
+ });
1334
+ async function y() {
1335
+ if (o) {
1336
+ l.value = !1;
1337
+ try {
1338
+ let e = await o.renderCustomBlock(r.block);
1339
+ e.includes("Template render error:") && (l.value = !0), c.value = e;
1340
+ } catch {
1341
+ l.value = !0, c.value = "";
1342
+ }
1343
+ }
1344
+ }
1345
+ let S = Me(y, 150);
1346
+ return u(() => {
1347
+ y();
1348
+ }), s(() => r.block.fieldValues, () => {
1349
+ S();
1350
+ }, { deep: !0 }), (t, n) => (e(), w("div", mn, [f.value ? l.value ? (e(), w("div", _n, [N(j(ut), {
1351
+ size: 24,
1352
+ class: "tpl:text-[var(--tpl-danger)]"
1353
+ }), C("span", vn, M(j(a).customBlocks.renderError), 1)])) : (e(), w("div", yn, [C("div", { innerHTML: c.value }, null, 8, bn), j(v) && j(g) ? (e(), w("div", xn, [j(p) ? (e(), ne(dt, {
1354
+ key: 1,
1355
+ class: "tpl:w-48"
1356
+ })) : (e(), w("button", {
1357
+ key: 0,
1358
+ type: "button",
1359
+ 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)]",
1360
+ onClick: n[0] ||= b((...e) => j(m) && j(m)(...e), ["stop"])
1361
+ }, [d.value?.icon ? (e(), ne(nn, {
1362
+ key: 0,
1363
+ icon: d.value.icon,
1364
+ size: 16
1365
+ }, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div", hn, [N(j(Xt), {
1366
+ size: 24,
1367
+ class: "tpl:text-[var(--tpl-warning)]"
1368
+ }), C("span", gn, M(j(a).customBlocks.definitionNotFound), 1)]))]));
1369
+ }
1370
+ }), Cn = { class: "tpl:w-full" }, wn = /* @__PURE__ */ y({
1371
+ __name: "DividerBlock",
1372
+ props: {
1373
+ block: {},
1374
+ viewport: {}
1375
+ },
1376
+ setup(t) {
1377
+ let n = t, r = x(() => ({
1378
+ borderTop: `${n.block.thickness}px ${n.block.lineStyle} ${n.block.color}`,
1379
+ width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
1380
+ margin: n.block.width === "full" ? "0" : "0 auto"
1381
+ }));
1382
+ return (t, n) => (e(), w("div", Cn, [C("hr", {
1383
+ class: "tpl:m-0 tpl:border-none",
1384
+ style: A(r.value)
1385
+ }, null, 4)]));
1386
+ }
1387
+ }), Tn = { class: "tpl:w-full" }, En = { 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)]" }, Dn = {
1388
+ key: 0,
1389
+ class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
1390
+ }, On = {
1391
+ key: 1,
1392
+ class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
1393
+ }, kn = /* @__PURE__ */ y({
1394
+ __name: "HtmlBlock",
1395
+ props: {
1396
+ block: {},
1397
+ viewport: {}
1398
+ },
1399
+ setup(t) {
1400
+ let n = t, { t: r } = st(), i = x(() => n.block.content.trim().length > 0);
1401
+ return (t, n) => (e(), w("div", Tn, [C("div", En, [N(j(Ut), {
1402
+ size: 24,
1403
+ class: "tpl:text-[var(--tpl-text-dim)]"
1404
+ }), i.value ? (e(), w("span", Dn, M(j(r).html.preview), 1)) : (e(), w("span", On, M(j(r).html.empty), 1))])]));
1405
+ }
1406
+ }), An = ["href"], jn = ["src", "alt"], Mn = ["src", "alt"], Nn = {
1407
+ class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
1408
+ style: { opacity: "0.7" }
1409
+ }, Pn = ["href"], Fn = ["src", "alt"], In = ["src", "alt"], Ln = {
1410
+ key: 3,
1411
+ 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)]"
1412
+ }, Rn = ["aria-label"], zn = { key: 1 }, Bn = /* @__PURE__ */ y({
1413
+ __name: "ImageBlock",
1414
+ props: {
1415
+ block: {},
1416
+ viewport: {}
1417
+ },
1418
+ emits: ["update"],
1419
+ setup(t, { emit: n }) {
1420
+ let r = t, i = n, { t: a } = st(), { syntax: o } = pt(), s = ae(at, null), c = x(() => !!s);
1421
+ async function l() {
1422
+ let e = await s?.({ accept: ["images"] });
1423
+ if (e) {
1424
+ let t = { src: e.url };
1425
+ e.alt && (t.alt = e.alt), i("update", t);
1426
+ }
1427
+ }
1428
+ let u = x(() => ({ textAlign: r.block.align })), d = x(() => ({
1429
+ maxWidth: "100%",
1430
+ width: r.block.width === "full" ? "100%" : `${r.block.width}px`,
1431
+ display: "block",
1432
+ margin: r.block.align === "center" ? "0 auto" : void 0,
1433
+ marginLeft: r.block.align === "right" ? "auto" : void 0
1434
+ })), f = x(() => pe(r.block.src, o));
1435
+ return (n, r) => (e(), w("div", {
1436
+ class: "tpl:w-full",
1437
+ style: A(u.value)
1438
+ }, [t.block.src && f.value && t.block.placeholderUrl ? (e(), w(D, { key: 0 }, [t.block.linkUrl ? (e(), w("a", {
1439
+ key: 0,
1440
+ href: t.block.linkUrl,
1441
+ target: "_blank",
1442
+ rel: "noopener noreferrer",
1443
+ onClick: r[0] ||= b(() => {}, ["prevent"])
1444
+ }, [C("img", {
1445
+ class: "tpl:border-0",
1446
+ loading: "lazy",
1447
+ src: t.block.placeholderUrl,
1448
+ alt: t.block.alt || j(a).image.altTextPlaceholder,
1449
+ style: A(d.value)
1450
+ }, null, 12, jn)], 8, An)) : (e(), w("img", {
1451
+ key: 1,
1452
+ class: "tpl:border-0",
1453
+ src: t.block.placeholderUrl,
1454
+ alt: t.block.alt,
1455
+ style: A(d.value)
1456
+ }, null, 12, Mn))], 64)) : t.block.src && f.value ? (e(), w("div", {
1457
+ key: 1,
1458
+ 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)]",
1459
+ style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
1460
+ }, [N(j(Jt), {
1461
+ size: 32,
1462
+ "stroke-width": 1.5,
1463
+ class: "tpl:text-[var(--tpl-primary)]",
1464
+ style: { opacity: "0.5" }
1465
+ }), C("span", Nn, M(t.block.src), 1)], 4)) : t.block.src ? (e(), w(D, { key: 2 }, [t.block.linkUrl ? (e(), w("a", {
1466
+ key: 0,
1467
+ href: t.block.linkUrl,
1468
+ target: "_blank",
1469
+ rel: "noopener noreferrer",
1470
+ onClick: r[1] ||= b(() => {}, ["prevent"])
1471
+ }, [C("img", {
1472
+ class: "tpl:border-0",
1473
+ loading: "lazy",
1474
+ src: t.block.src,
1475
+ alt: t.block.alt || j(a).image.altTextPlaceholder,
1476
+ style: A(d.value)
1477
+ }, null, 12, Fn)], 8, Pn)) : (e(), w("img", {
1478
+ key: 1,
1479
+ class: "tpl:border-0",
1480
+ src: t.block.src,
1481
+ alt: t.block.alt,
1482
+ style: A(d.value)
1483
+ }, null, 12, In))], 64)) : (e(), w("div", Ln, [c.value ? (e(), w("button", {
1484
+ key: 0,
1485
+ "aria-label": j(a).image.browseMedia,
1486
+ 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)]",
1487
+ onClick: b(l, ["stop"])
1488
+ }, [N(j(Jt), {
1489
+ size: 14,
1490
+ "stroke-width": 1.5
1491
+ }), _(" " + M(j(a).image.browseMedia), 1)], 8, Rn)) : (e(), w("span", zn, M(j(a).image.clickToAdd), 1))]))], 4));
1492
+ }
1493
+ }), Vn = { class: "tpl:w-full" }, Hn = ["href"], Un = {
1494
+ key: 1,
1495
+ 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)]"
1496
+ }, Wn = /* @__PURE__ */ y({
1497
+ __name: "MenuBlock",
1498
+ props: {
1499
+ block: {},
1500
+ viewport: {}
1501
+ },
1502
+ setup(t) {
1503
+ let n = t, { t: r } = st(), i = x(() => ({
1504
+ display: "flex",
1505
+ flexWrap: "wrap",
1506
+ gap: `0 ${n.block.spacing}px`,
1507
+ justifyContent: n.block.textAlign === "left" ? "flex-start" : n.block.textAlign === "right" ? "flex-end" : "center",
1508
+ fontSize: `${n.block.fontSize}px`,
1509
+ fontFamily: n.block.fontFamily || "inherit",
1510
+ alignItems: "center"
1511
+ })), a = x(() => n.block.items.length > 0);
1512
+ function o(e) {
1513
+ return e || n.block.linkColor || n.block.color;
1514
+ }
1515
+ return (n, s) => (e(), w("div", Vn, [a.value ? (e(), w("div", {
1516
+ key: 0,
1517
+ style: A(i.value)
1518
+ }, [(e(!0), w(D, null, c(t.block.items, (n, r) => (e(), w(D, { key: n.id }, [C("a", {
1519
+ href: n.url || "#",
1520
+ class: "tpl:cursor-default tpl:no-underline",
1521
+ style: A({
1522
+ color: o(n.color),
1523
+ fontWeight: n.bold ? "bold" : "normal",
1524
+ textDecoration: n.underline ? "underline" : "none"
1525
+ }),
1526
+ onClick: s[0] ||= b(() => {}, ["prevent"])
1527
+ }, M(n.text || "..."), 13, Hn), r < t.block.items.length - 1 ? (e(), w("span", {
1528
+ key: 0,
1529
+ style: A({
1530
+ color: t.block.separatorColor,
1531
+ padding: `0 ${t.block.spacing}px`
1532
+ })
1533
+ }, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div", Un, [N(j(Yt), { size: 16 }), C("span", null, M(j(r).menu.addLinks), 1)]))]));
1534
+ }
1535
+ });
1536
+ //#endregion
1537
+ //#region src/composables/useEditableTextBlock.ts
1538
+ function Gn(e) {
1539
+ let t = ae(it, []), { syntax: n } = pt(), r = x(() => xe(le(e(), t), n)), i = h(!1), a = h(null), { top: o, left: s } = Ie(a), c = x(() => ({
1540
+ top: o.value - 8,
1541
+ left: s.value
1542
+ }));
1543
+ function l() {
1544
+ i.value = !0;
1545
+ }
1546
+ function u() {
1547
+ i.value = !1;
1548
+ }
1549
+ return {
1550
+ isEditing: i,
1551
+ blockRef: a,
1552
+ toolbarPosition: c,
1553
+ resolvedContent: r,
1554
+ handleDoubleClick: l,
1555
+ handleEditorDone: u
1556
+ };
1557
+ }
1558
+ //#endregion
1559
+ //#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
1560
+ var Kn = ["innerHTML"], qn = /* @__PURE__ */ y({
1561
+ __name: "ParagraphBlock",
1562
+ props: {
1563
+ block: {},
1564
+ viewport: {}
1565
+ },
1566
+ setup(t) {
1567
+ let n = t, r = se(() => import("./ParagraphEditor-DjDiUzmv.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Gn(() => n.block.content);
1568
+ return (n, u) => (e(), w("div", {
1569
+ ref_key: "blockRef",
1570
+ ref: a,
1571
+ class: "tpl:min-h-[1em] tpl:w-full",
1572
+ onDblclick: u[0] ||= (...e) => j(c) && j(c)(...e)
1573
+ }, [j(i) ? (e(), ne(j(r), {
1574
+ key: 0,
1575
+ block: t.block,
1576
+ "toolbar-position": j(o),
1577
+ onDone: j(l)
1578
+ }, null, 8, [
1579
+ "block",
1580
+ "toolbar-position",
1581
+ "onDone"
1582
+ ])) : (e(), w("div", {
1583
+ key: 1,
1584
+ 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",
1585
+ innerHTML: j(s)
1586
+ }, null, 8, Kn))], 544));
1587
+ }
1588
+ });
1589
+ //#endregion
1590
+ //#region src/utils/blockComponentResolver.ts
1591
+ function Jn(e, t, n) {
1592
+ if (t) {
1593
+ let n = t.getComponent(e);
1594
+ if (n) return n;
1595
+ }
1596
+ return n[e.type] ?? null;
1597
+ }
1598
+ function Yn(e) {
1599
+ let { padding: t, margin: n, backgroundColor: r } = e.styles;
1600
+ return {
1601
+ padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
1602
+ margin: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
1603
+ backgroundColor: r || "transparent"
1604
+ };
1605
+ }
1606
+ //#endregion
1607
+ //#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
1608
+ var Xn = ["data-block-id", "data-block-type"], Zn = ["aria-label"], Qn = [
1609
+ "aria-label",
1610
+ "aria-pressed",
1611
+ "title"
1612
+ ], $n = ["aria-label", "title"], er = ["aria-label", "title"], tr = ["aria-label", "title"], nr = {
1613
+ key: 1,
1614
+ 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"
1615
+ }, rr = { 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)]" }, ir = {
1616
+ key: 2,
1617
+ class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
1618
+ }, ar = ["aria-label", "title"], or = {
1619
+ key: 3,
1620
+ class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
1621
+ }, sr = ["aria-label"], cr = /* @__PURE__ */ ft(/* @__PURE__ */ y({
1622
+ __name: "BlockWrapper",
1623
+ props: {
1624
+ block: {},
1625
+ isSelected: { type: Boolean },
1626
+ viewport: {},
1627
+ previewMode: { type: Boolean }
1628
+ },
1629
+ emits: ["select"],
1630
+ setup(t, { emit: n }) {
1631
+ let i = se(() => import("./BlockA11yBadge-C0S6kPC4.js")), a = t, o = n, { t: s, format: c } = st(), u = ae(We, 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);
1632
+ async function m() {
1633
+ await r(), d.value?.focus();
1634
+ }
1635
+ function g(e) {
1636
+ if (u) {
1637
+ if (e.key === " " || e.key === "Enter") {
1638
+ e.preventDefault(), e.stopPropagation(), f.value ? u.drop(a.block.id) : u.lift(a.block.id);
1639
+ return;
1640
+ }
1641
+ if (f.value) {
1642
+ if (e.key === "Escape") {
1643
+ e.preventDefault(), e.stopPropagation(), u.cancel(), m();
1644
+ return;
1645
+ }
1646
+ if (e.key === "ArrowUp") {
1647
+ e.preventDefault(), e.stopPropagation(), u.moveUp(a.block.id), m();
1648
+ return;
1649
+ }
1650
+ e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), u.moveDown(a.block.id), m());
1651
+ }
1652
+ }
1653
+ }
1654
+ let y = x(() => !a.viewport || !a.block.visibility ? !1 : a.block.visibility[a.viewport] === !1), S = x(() => a.viewport ? {
1655
+ desktop: s.viewport.desktop,
1656
+ tablet: s.viewport.tablet,
1657
+ mobile: s.viewport.mobile
1658
+ }[a.viewport] ?? a.viewport : ""), T = x(() => !!a.block.displayCondition), E = ae(Ge, null), ee = ae(Je, null), D = ae(qe, {}), k = x(() => !!D.savedModules), te = x(() => D.comments?.getBlockCount(a.block.id) ?? 0), ne = x(() => Yn(a.block));
1659
+ function re(e) {
1660
+ a.previewMode || (e.stopPropagation(), o("select"));
1661
+ }
1662
+ function ie() {
1663
+ E?.deleteBlock(a.block.id);
1664
+ }
1665
+ function oe() {
1666
+ E?.duplicateBlock(a.block);
1667
+ }
1668
+ function ce() {
1669
+ D.savedModules?.openSaveDialog(a.block.id);
1670
+ }
1671
+ function le() {
1672
+ ee?.toggleBlock(a.block.id);
1673
+ }
1674
+ return (n, r) => (e(), w("div", {
1675
+ class: v(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
1676
+ "tpl-block--selected": t.isSelected,
1677
+ "tpl-block--idle": !t.isSelected,
1678
+ "tpl-block--lifted": f.value
1679
+ }]),
1680
+ style: A(ne.value),
1681
+ "data-block-id": t.block.id,
1682
+ "data-block-type": t.block.type,
1683
+ draggable: "false",
1684
+ onClick: re
1685
+ }, [
1686
+ N(j(i), { "block-id": t.block.id }, null, 8, ["block-id"]),
1687
+ t.isSelected ? (e(), w("div", {
1688
+ key: 0,
1689
+ role: "toolbar",
1690
+ "aria-label": j(s).blockActions.drag,
1691
+ 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)]"
1692
+ }, [
1693
+ C("button", {
1694
+ ref_key: "dragButtonRef",
1695
+ ref: d,
1696
+ 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",
1697
+ "aria-label": p.value,
1698
+ "aria-pressed": f.value,
1699
+ "aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
1700
+ title: j(s).blockActions.drag,
1701
+ onKeydown: g
1702
+ }, [N(j(qt), {
1703
+ size: 14,
1704
+ "stroke-width": 1.5
1705
+ })], 40, Qn),
1706
+ C("button", {
1707
+ 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",
1708
+ "aria-label": j(s).blockActions.duplicate,
1709
+ title: j(s).blockActions.duplicate,
1710
+ onClick: b(oe, ["stop"])
1711
+ }, [N(j(Wt), {
1712
+ size: 14,
1713
+ "stroke-width": 1.5
1714
+ })], 8, $n),
1715
+ k.value ? (e(), w("button", {
1716
+ key: 0,
1717
+ 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",
1718
+ "aria-label": j(s).blockActions.saveAsModule,
1719
+ title: j(s).blockActions.saveAsModule,
1720
+ onClick: b(ce, ["stop"])
1721
+ }, [N(j(Vt), {
1722
+ size: 14,
1723
+ "stroke-width": 1.5
1724
+ })], 8, er)) : O("", !0),
1725
+ C("button", {
1726
+ 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",
1727
+ "aria-label": j(s).blockActions.delete,
1728
+ title: j(s).blockActions.delete,
1729
+ onClick: b(ie, ["stop"])
1730
+ }, [N(j(lt), {
1731
+ size: 14,
1732
+ "stroke-width": 1.5
1733
+ })], 8, tr)
1734
+ ], 8, Zn)) : O("", !0),
1735
+ y.value ? (e(), w("div", nr, [C("span", rr, [N(j(Gt), {
1736
+ size: 12,
1737
+ "stroke-width": 1.5
1738
+ }), _(" " + M(j(c)(j(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : O("", !0),
1739
+ T.value && !y.value ? (e(), w("div", ir, [C("button", {
1740
+ 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)]",
1741
+ "aria-label": j(s).blockActions.conditionToggle,
1742
+ title: t.block.displayCondition?.label,
1743
+ onClick: b(le, ["stop"])
1744
+ }, [N(j(Kt), {
1745
+ size: 12,
1746
+ "stroke-width": 2
1747
+ })], 8, ar)])) : O("", !0),
1748
+ te.value > 0 && !y.value ? (e(), w("div", or, [C("button", {
1749
+ 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)]",
1750
+ "aria-label": j(c)(j(s).blockActions.comments, { count: String(te.value) }),
1751
+ onClick: r[0] ||= b((e) => j(D).comments?.openForBlock(t.block.id), ["stop"])
1752
+ }, [N(j(ct), {
1753
+ size: 12,
1754
+ "stroke-width": 2.5
1755
+ }), _(" " + M(te.value), 1)], 8, sr)])) : O("", !0),
1756
+ l(n.$slots, "default", {}, void 0, !0)
1757
+ ], 14, Xn));
1758
+ }
1759
+ }), [["__scopeId", "data-v-850614e7"]]);
1760
+ //#endregion
1761
+ //#region src/utils/unwrapParagraph.ts
1762
+ function lr(e) {
1763
+ let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
1764
+ return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
1765
+ }
1766
+ //#endregion
1767
+ //#region src/components/blocks/TitleBlock.vue
1768
+ var ur = /* @__PURE__ */ y({
1769
+ __name: "TitleBlock",
1770
+ props: {
1771
+ block: {},
1772
+ viewport: {}
1773
+ },
1774
+ setup(t) {
1775
+ let n = t, r = se(() => import("./TitleEditor-BCV5k6wj.js")), { isEditing: a, blockRef: o, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = Gn(() => n.block.content), d = x(() => {
1776
+ let e = {
1777
+ fontSize: `${De[n.block.level]}px`,
1778
+ color: n.block.color,
1779
+ textAlign: n.block.textAlign
1780
+ };
1781
+ return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
1782
+ }), f = x(() => `h${n.block.level}`), p = x(() => lr(c.value));
1783
+ return (n, c) => (e(), w("div", {
1784
+ ref_key: "blockRef",
1785
+ ref: o,
1786
+ class: "tpl:min-h-[1em] tpl:w-full",
1787
+ style: A(d.value),
1788
+ onDblclick: c[0] ||= (...e) => j(l) && j(l)(...e)
1789
+ }, [j(a) ? (e(), ne(j(r), {
1790
+ key: 0,
1791
+ block: t.block,
1792
+ "toolbar-position": j(s),
1793
+ onDone: j(u)
1794
+ }, null, 8, [
1795
+ "block",
1796
+ "toolbar-position",
1797
+ "onDone"
1798
+ ])) : (e(), ne(i(f.value), {
1799
+ key: 1,
1800
+ 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",
1801
+ style: { color: "inherit" },
1802
+ innerHTML: p.value
1803
+ }, null, 8, ["innerHTML"]))], 36));
1804
+ }
1805
+ }), dr = Object.defineProperty, fr = Object.getOwnPropertySymbols, pr = Object.prototype.hasOwnProperty, mr = Object.prototype.propertyIsEnumerable, hr = (e, t, n) => t in e ? dr(e, t, {
1806
+ enumerable: !0,
1807
+ configurable: !0,
1808
+ writable: !0,
1809
+ value: n
1810
+ }) : e[t] = n, gr = (e, t) => {
1811
+ for (var n in t ||= {}) pr.call(t, n) && hr(e, n, t[n]);
1812
+ if (fr) for (var n of fr(t)) mr.call(t, n) && hr(e, n, t[n]);
1813
+ return e;
1814
+ }, _r = (e, t) => {
1815
+ var n = {};
1816
+ for (var r in e) pr.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
1817
+ if (e != null && fr) for (var r of fr(e)) t.indexOf(r) < 0 && mr.call(e, r) && (n[r] = e[r]);
1818
+ return n;
1819
+ }, vr = "[vue-draggable-plus]: ";
1820
+ function yr(e) {
1821
+ console.warn(vr + e);
1822
+ }
1823
+ function br(e) {
1824
+ console.error(vr + e);
1825
+ }
1826
+ function xr(e, t, n) {
1827
+ return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
1828
+ }
1829
+ function Sr(e) {
1830
+ return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
1831
+ }
1832
+ function Cr(e) {
1833
+ return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Sr(n)] = e[n]), t), {});
1834
+ }
1835
+ function wr(e, t) {
1836
+ return Array.isArray(e) && e.splice(t, 1), e;
1837
+ }
1838
+ function Tr(e, t, n) {
1839
+ return Array.isArray(e) && e.splice(t, 0, n), e;
1840
+ }
1841
+ function Er(e) {
1842
+ return e === void 0;
1843
+ }
1844
+ function Dr(e) {
1845
+ return typeof e == "string";
1846
+ }
1847
+ function Or(e, t, n) {
1848
+ let r = e.children[n];
1849
+ e.insertBefore(t, r);
1850
+ }
1851
+ function kr(e) {
1852
+ e.parentNode && e.parentNode.removeChild(e);
1853
+ }
1854
+ function Ar(e, t = document) {
1855
+ let n = null;
1856
+ return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || yr(`Element not found: ${e}`), n;
1857
+ }
1858
+ function jr(e, t, n = null) {
1859
+ return function(...r) {
1860
+ return e.apply(n, r), t.apply(n, r);
1861
+ };
1862
+ }
1863
+ function Mr(e, t) {
1864
+ let n = gr({}, e);
1865
+ return Object.keys(t).forEach((r) => {
1866
+ n[r] ? n[r] = jr(e[r], t[r]) : n[r] = t[r];
1867
+ }), n;
1868
+ }
1869
+ function Nr(e) {
1870
+ return e instanceof HTMLElement;
1871
+ }
1872
+ function Pr(e, t) {
1873
+ Object.keys(e).forEach((n) => {
1874
+ t(n, e[n]);
1875
+ });
1876
+ }
1877
+ function Fr(e) {
1878
+ return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
1879
+ }
1880
+ var Ir = Object.assign;
1881
+ function Lr(e, t) {
1882
+ var n = Object.keys(e);
1883
+ if (Object.getOwnPropertySymbols) {
1884
+ var r = Object.getOwnPropertySymbols(e);
1885
+ t && (r = r.filter(function(t) {
1886
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
1887
+ })), n.push.apply(n, r);
1888
+ }
1889
+ return n;
1890
+ }
1891
+ function Rr(e) {
1892
+ for (var t = 1; t < arguments.length; t++) {
1893
+ var n = arguments[t] == null ? {} : arguments[t];
1894
+ t % 2 ? Lr(Object(n), !0).forEach(function(t) {
1895
+ Br(e, t, n[t]);
1896
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Lr(Object(n)).forEach(function(t) {
1897
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
1898
+ });
1899
+ }
1900
+ return e;
1901
+ }
1902
+ function zr(e) {
1903
+ "@babel/helpers - typeof";
1904
+ return zr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
1905
+ return typeof e;
1906
+ } : function(e) {
1907
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1908
+ }, zr(e);
1909
+ }
1910
+ function Br(e, t, n) {
1911
+ return t in e ? Object.defineProperty(e, t, {
1912
+ value: n,
1913
+ enumerable: !0,
1914
+ configurable: !0,
1915
+ writable: !0
1916
+ }) : e[t] = n, e;
1917
+ }
1918
+ function Vr() {
1919
+ return Vr = Object.assign || function(e) {
1920
+ for (var t = 1; t < arguments.length; t++) {
1921
+ var n = arguments[t];
1922
+ for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
1923
+ }
1924
+ return e;
1925
+ }, Vr.apply(this, arguments);
1926
+ }
1927
+ function Hr(e, t) {
1928
+ if (e == null) return {};
1929
+ var n = {}, r = Object.keys(e), i, a;
1930
+ for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
1931
+ return n;
1932
+ }
1933
+ function Ur(e, t) {
1934
+ if (e == null) return {};
1935
+ var n = Hr(e, t), r, i;
1936
+ if (Object.getOwnPropertySymbols) {
1937
+ var a = Object.getOwnPropertySymbols(e);
1938
+ for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
1939
+ }
1940
+ return n;
1941
+ }
1942
+ var Wr = "1.15.2";
1943
+ function Gr(e) {
1944
+ if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
1945
+ }
1946
+ var Kr = Gr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), qr = Gr(/Edge/i), Jr = Gr(/firefox/i), Yr = Gr(/safari/i) && !Gr(/chrome/i) && !Gr(/android/i), Xr = Gr(/iP(ad|od|hone)/i), Zr = Gr(/chrome/i) && Gr(/android/i), Qr = {
1947
+ capture: !1,
1948
+ passive: !1
1949
+ };
1950
+ function F(e, t, n) {
1951
+ e.addEventListener(t, n, !Kr && Qr);
1952
+ }
1953
+ function I(e, t, n) {
1954
+ e.removeEventListener(t, n, !Kr && Qr);
1955
+ }
1956
+ function $r(e, t) {
1957
+ if (t) {
1958
+ if (t[0] === ">" && (t = t.substring(1)), e) try {
1959
+ if (e.matches) return e.matches(t);
1960
+ if (e.msMatchesSelector) return e.msMatchesSelector(t);
1961
+ if (e.webkitMatchesSelector) return e.webkitMatchesSelector(t);
1962
+ } catch {
1963
+ return !1;
1964
+ }
1965
+ return !1;
1966
+ }
1967
+ }
1968
+ function ei(e) {
1969
+ return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
1970
+ }
1971
+ function ti(e, t, n, r) {
1972
+ if (e) {
1973
+ n ||= document;
1974
+ do {
1975
+ if (t != null && (t[0] === ">" ? e.parentNode === n && $r(e, t) : $r(e, t)) || r && e === n) return e;
1976
+ if (e === n) break;
1977
+ } while (e = ei(e));
1978
+ }
1979
+ return null;
1980
+ }
1981
+ var ni = /\s+/g;
1982
+ function L(e, t, n) {
1983
+ e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(ni, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(ni, " "));
1984
+ }
1985
+ function R(e, t, n) {
1986
+ var r = e && e.style;
1987
+ if (r) {
1988
+ 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];
1989
+ !(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
1990
+ }
1991
+ }
1992
+ function ri(e, t) {
1993
+ var n = "";
1994
+ if (typeof e == "string") n = e;
1995
+ else do {
1996
+ var r = R(e, "transform");
1997
+ r && r !== "none" && (n = r + " " + n);
1998
+ } while (!t && (e = e.parentNode));
1999
+ var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
2000
+ return i && new i(n);
2001
+ }
2002
+ function ii(e, t, n) {
2003
+ if (e) {
2004
+ var r = e.getElementsByTagName(t), i = 0, a = r.length;
2005
+ if (n) for (; i < a; i++) n(r[i], i);
2006
+ return r;
2007
+ }
2008
+ return [];
2009
+ }
2010
+ function ai() {
2011
+ return document.scrollingElement || document.documentElement;
2012
+ }
2013
+ function z(e, t, n, r, i) {
2014
+ if (!(!e.getBoundingClientRect && e !== window)) {
2015
+ var a, o, s, c, l, u, d;
2016
+ if (e !== window && e.parentNode && e !== ai() ? (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, !Kr)) do
2017
+ if (i && i.getBoundingClientRect && (R(i, "transform") !== "none" || n && R(i, "position") !== "static")) {
2018
+ var f = i.getBoundingClientRect();
2019
+ 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;
2020
+ break;
2021
+ }
2022
+ while (i = i.parentNode);
2023
+ if (r && e !== window) {
2024
+ var p = ri(i || e), m = p && p.a, h = p && p.d;
2025
+ p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
2026
+ }
2027
+ return {
2028
+ top: o,
2029
+ left: s,
2030
+ bottom: c,
2031
+ right: l,
2032
+ width: d,
2033
+ height: u
2034
+ };
2035
+ }
2036
+ }
2037
+ function oi(e, t, n) {
2038
+ for (var r = di(e, !0), i = z(e)[t]; r;) {
2039
+ var a = z(r)[n], o = void 0;
2040
+ if (o = i >= a, !o) return r;
2041
+ if (r === ai()) break;
2042
+ r = di(r, !1);
2043
+ }
2044
+ return !1;
2045
+ }
2046
+ function si(e, t, n, r) {
2047
+ for (var i = 0, a = 0, o = e.children; a < o.length;) {
2048
+ if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && ti(o[a], n.draggable, e, !1)) {
2049
+ if (i === t) return o[a];
2050
+ i++;
2051
+ }
2052
+ a++;
2053
+ }
2054
+ return null;
2055
+ }
2056
+ function ci(e, t) {
2057
+ for (var n = e.lastElementChild; n && (n === Q.ghost || R(n, "display") === "none" || t && !$r(n, t));) n = n.previousElementSibling;
2058
+ return n || null;
2059
+ }
2060
+ function B(e, t) {
2061
+ var n = 0;
2062
+ if (!e || !e.parentNode) return -1;
2063
+ for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || $r(e, t)) && n++;
2064
+ return n;
2065
+ }
2066
+ function li(e) {
2067
+ var t = 0, n = 0, r = ai();
2068
+ if (e) do {
2069
+ var i = ri(e), a = i.a, o = i.d;
2070
+ t += e.scrollLeft * a, n += e.scrollTop * o;
2071
+ } while (e !== r && (e = e.parentNode));
2072
+ return [t, n];
2073
+ }
2074
+ function ui(e, t) {
2075
+ for (var n in e) if (e.hasOwnProperty(n)) {
2076
+ for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
2077
+ }
2078
+ return -1;
2079
+ }
2080
+ function di(e, t) {
2081
+ if (!e || !e.getBoundingClientRect) return ai();
2082
+ var n = e, r = !1;
2083
+ do
2084
+ if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
2085
+ var i = R(n);
2086
+ if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
2087
+ if (!n.getBoundingClientRect || n === document.body) return ai();
2088
+ if (r || t) return n;
2089
+ r = !0;
2090
+ }
2091
+ }
2092
+ while (n = n.parentNode);
2093
+ return ai();
2094
+ }
2095
+ function fi(e, t) {
2096
+ if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
2097
+ return e;
2098
+ }
2099
+ function pi(e, t) {
2100
+ 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);
2101
+ }
2102
+ var mi;
2103
+ function hi(e, t) {
2104
+ return function() {
2105
+ if (!mi) {
2106
+ var n = arguments, r = this;
2107
+ n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), mi = setTimeout(function() {
2108
+ mi = void 0;
2109
+ }, t);
2110
+ }
2111
+ };
2112
+ }
2113
+ function gi() {
2114
+ clearTimeout(mi), mi = void 0;
2115
+ }
2116
+ function _i(e, t, n) {
2117
+ e.scrollLeft += t, e.scrollTop += n;
2118
+ }
2119
+ function vi(e) {
2120
+ var t = window.Polymer, n = window.jQuery || window.Zepto;
2121
+ return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
2122
+ }
2123
+ function yi(e, t, n) {
2124
+ var r = {};
2125
+ return Array.from(e.children).forEach(function(i) {
2126
+ if (!(!ti(i, t.draggable, e, !1) || i.animated || i === n)) {
2127
+ var a = z(i);
2128
+ 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);
2129
+ }
2130
+ }), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
2131
+ }
2132
+ var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
2133
+ function bi() {
2134
+ var e = [], t;
2135
+ return {
2136
+ captureAnimationState: function() {
2137
+ e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
2138
+ if (!(R(t, "display") === "none" || t === Q.ghost)) {
2139
+ e.push({
2140
+ target: t,
2141
+ rect: z(t)
2142
+ });
2143
+ var n = Rr({}, e[e.length - 1].rect);
2144
+ if (t.thisAnimationDuration) {
2145
+ var r = ri(t, !0);
2146
+ r && (n.top -= r.f, n.left -= r.e);
2147
+ }
2148
+ t.fromRect = n;
2149
+ }
2150
+ });
2151
+ },
2152
+ addAnimationState: function(t) {
2153
+ e.push(t);
2154
+ },
2155
+ removeAnimationState: function(t) {
2156
+ e.splice(ui(e, { target: t }), 1);
2157
+ },
2158
+ animateAll: function(n) {
2159
+ var r = this;
2160
+ if (!this.options.animation) {
2161
+ clearTimeout(t), typeof n == "function" && n();
2162
+ return;
2163
+ }
2164
+ var i = !1, a = 0;
2165
+ e.forEach(function(e) {
2166
+ var t = 0, n = e.target, o = n.fromRect, s = z(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = ri(n, !0);
2167
+ d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && pi(c, s) && !pi(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Si(u, c, l, r.options)), pi(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() {
2168
+ n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
2169
+ }, t), n.thisAnimationDuration = t);
2170
+ }), clearTimeout(t), i ? t = setTimeout(function() {
2171
+ typeof n == "function" && n();
2172
+ }, a) : typeof n == "function" && n(), e = [];
2173
+ },
2174
+ animate: function(e, t, n, r) {
2175
+ if (r) {
2176
+ R(e, "transition", ""), R(e, "transform", "");
2177
+ var i = ri(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
2178
+ e.animatingX = !!s, e.animatingY = !!c, R(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = xi(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() {
2179
+ R(e, "transition", ""), R(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
2180
+ }, r);
2181
+ }
2182
+ }
2183
+ };
2184
+ }
2185
+ function xi(e) {
2186
+ return e.offsetWidth;
2187
+ }
2188
+ function Si(e, t, n, r) {
2189
+ 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;
2190
+ }
2191
+ var Ci = [], wi = { initializeByDefault: !0 }, Ti = {
2192
+ mount: function(e) {
2193
+ for (var t in wi) wi.hasOwnProperty(t) && !(t in e) && (e[t] = wi[t]);
2194
+ Ci.forEach(function(t) {
2195
+ if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
2196
+ }), Ci.push(e);
2197
+ },
2198
+ pluginEvent: function(e, t, n) {
2199
+ var r = this;
2200
+ this.eventCanceled = !1, n.cancel = function() {
2201
+ r.eventCanceled = !0;
2202
+ };
2203
+ var i = e + "Global";
2204
+ Ci.forEach(function(r) {
2205
+ t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Rr({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Rr({ sortable: t }, n)));
2206
+ });
2207
+ },
2208
+ initializePlugins: function(e, t, n, r) {
2209
+ for (var i in Ci.forEach(function(r) {
2210
+ var i = r.pluginName;
2211
+ if (!(!e.options[i] && !r.initializeByDefault)) {
2212
+ var a = new r(e, t, e.options);
2213
+ a.sortable = e, a.options = e.options, e[i] = a, Vr(n, a.defaults);
2214
+ }
2215
+ }), e.options) if (e.options.hasOwnProperty(i)) {
2216
+ var a = this.modifyOption(e, i, e.options[i]);
2217
+ a !== void 0 && (e.options[i] = a);
2218
+ }
2219
+ },
2220
+ getEventProperties: function(e, t) {
2221
+ var n = {};
2222
+ return Ci.forEach(function(r) {
2223
+ typeof r.eventProperties == "function" && Vr(n, r.eventProperties.call(t[r.pluginName], e));
2224
+ }), n;
2225
+ },
2226
+ modifyOption: function(e, t, n) {
2227
+ var r;
2228
+ return Ci.forEach(function(i) {
2229
+ e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
2230
+ }), r;
2231
+ }
2232
+ };
2233
+ function Ei(e) {
2234
+ 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;
2235
+ if (t ||= n && n[V], t) {
2236
+ var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
2237
+ window.CustomEvent && !Kr && !qr ? h = new CustomEvent(r, {
2238
+ bubbles: !0,
2239
+ cancelable: !0
2240
+ }) : (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;
2241
+ var v = Rr(Rr({}, m), Ti.getEventProperties(r, t));
2242
+ for (var y in v) h[y] = v[y];
2243
+ n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
2244
+ }
2245
+ }
2246
+ var Di = ["evt"], H = function(e, t) {
2247
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Ur(n, Di);
2248
+ Ti.pluginEvent.bind(Q)(e, t, Rr({
2249
+ dragEl: W,
2250
+ parentEl: G,
2251
+ ghostEl: K,
2252
+ rootEl: q,
2253
+ nextEl: Oi,
2254
+ lastDownEl: ki,
2255
+ cloneEl: J,
2256
+ cloneHidden: Ai,
2257
+ dragStarted: Wi,
2258
+ putSortable: X,
2259
+ activeSortable: Q.active,
2260
+ originalEvent: r,
2261
+ oldIndex: ji,
2262
+ oldDraggableIndex: Mi,
2263
+ newIndex: Y,
2264
+ newDraggableIndex: Ni,
2265
+ hideGhostForTarget: ca,
2266
+ unhideGhostForTarget: la,
2267
+ cloneNowHidden: function() {
2268
+ Ai = !0;
2269
+ },
2270
+ cloneNowShown: function() {
2271
+ Ai = !1;
2272
+ },
2273
+ dispatchSortableEvent: function(e) {
2274
+ U({
2275
+ sortable: t,
2276
+ name: e,
2277
+ originalEvent: r
2278
+ });
2279
+ }
2280
+ }, i));
2281
+ };
2282
+ function U(e) {
2283
+ Ei(Rr({
2284
+ putSortable: X,
2285
+ cloneEl: J,
2286
+ targetEl: W,
2287
+ rootEl: q,
2288
+ oldIndex: ji,
2289
+ oldDraggableIndex: Mi,
2290
+ newIndex: Y,
2291
+ newDraggableIndex: Ni
2292
+ }, e));
2293
+ }
2294
+ var W, G, K, q, Oi, ki, J, Ai, ji, Y, Mi, Ni, Pi, X, Fi = !1, Ii = !1, Li = [], Ri, zi, Bi, Vi, Hi, Ui, Wi, Gi, Ki, qi = !1, Ji = !1, Yi, Z, Xi = [], Zi = !1, Qi = [], $i = typeof document < "u", ea = Xr, ta = qr || Kr ? "cssFloat" : "float", na = $i && !Zr && !Xr && "draggable" in document.createElement("div"), ra = function() {
2295
+ if ($i) {
2296
+ if (Kr) return !1;
2297
+ var e = document.createElement("x");
2298
+ return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
2299
+ }
2300
+ }(), ia = function(e, t) {
2301
+ var n = R(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = si(e, 0, t), a = si(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;
2302
+ if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
2303
+ if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
2304
+ if (i && o.float && o.float !== "none") {
2305
+ var u = o.float === "left" ? "left" : "right";
2306
+ return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
2307
+ }
2308
+ return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[ta] === "none" || a && n[ta] === "none" && c + l > r) ? "vertical" : "horizontal";
2309
+ }, aa = function(e, t, n) {
2310
+ 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;
2311
+ return r === o || i === s || r + a / 2 === o + c / 2;
2312
+ }, oa = function(e, t) {
2313
+ var n;
2314
+ return Li.some(function(r) {
2315
+ var i = r[V].options.emptyInsertThreshold;
2316
+ if (!(!i || ci(r))) {
2317
+ var a = z(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
2318
+ if (o && s) return n = r;
2319
+ }
2320
+ }), n;
2321
+ }, sa = function(e) {
2322
+ function t(e, n) {
2323
+ return function(r, i, a, o) {
2324
+ var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
2325
+ if (e == null && (n || s)) return !0;
2326
+ if (e == null || e === !1) return !1;
2327
+ if (n && e === "clone") return e;
2328
+ if (typeof e == "function") return t(e(r, i, a, o), n)(r, i, a, o);
2329
+ var c = (n ? r : i).options.group.name;
2330
+ return e === !0 || typeof e == "string" && e === c || e.join && e.indexOf(c) > -1;
2331
+ };
2332
+ }
2333
+ var n = {}, r = e.group;
2334
+ (!r || zr(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;
2335
+ }, ca = function() {
2336
+ !ra && K && R(K, "display", "none");
2337
+ }, la = function() {
2338
+ !ra && K && R(K, "display", "");
2339
+ };
2340
+ $i && !Zr && document.addEventListener("click", function(e) {
2341
+ if (Ii) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Ii = !1, !1;
2342
+ }, !0);
2343
+ var ua = function(e) {
2344
+ if (W) {
2345
+ e = e.touches ? e.touches[0] : e;
2346
+ var t = oa(e.clientX, e.clientY);
2347
+ if (t) {
2348
+ var n = {};
2349
+ for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
2350
+ n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
2351
+ }
2352
+ }
2353
+ }, da = function(e) {
2354
+ W && W.parentNode[V]._isOutsideThisEl(e.target);
2355
+ };
2356
+ function Q(e, t) {
2357
+ if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
2358
+ this.el = e, this.options = t = Vr({}, t), e[V] = this;
2359
+ var n = {
2360
+ group: null,
2361
+ sort: !0,
2362
+ disabled: !1,
2363
+ store: null,
2364
+ handle: null,
2365
+ draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
2366
+ swapThreshold: 1,
2367
+ invertSwap: !1,
2368
+ invertedSwapThreshold: null,
2369
+ removeCloneOnHide: !0,
2370
+ direction: function() {
2371
+ return ia(e, this.options);
2372
+ },
2373
+ ghostClass: "sortable-ghost",
2374
+ chosenClass: "sortable-chosen",
2375
+ dragClass: "sortable-drag",
2376
+ ignore: "a, img",
2377
+ filter: null,
2378
+ preventOnFilter: !0,
2379
+ animation: 0,
2380
+ easing: null,
2381
+ setData: function(e, t) {
2382
+ e.setData("Text", t.textContent);
2383
+ },
2384
+ dropBubble: !1,
2385
+ dragoverBubble: !1,
2386
+ dataIdAttr: "data-id",
2387
+ delay: 0,
2388
+ delayOnTouchOnly: !1,
2389
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
2390
+ forceFallback: !1,
2391
+ fallbackClass: "sortable-fallback",
2392
+ fallbackOnBody: !1,
2393
+ fallbackTolerance: 0,
2394
+ fallbackOffset: {
2395
+ x: 0,
2396
+ y: 0
2397
+ },
2398
+ supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Yr,
2399
+ emptyInsertThreshold: 5
2400
+ };
2401
+ for (var r in Ti.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
2402
+ for (var i in sa(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
2403
+ this.nativeDraggable = t.forceFallback ? !1 : na, 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)), Li.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Vr(this, bi());
2404
+ }
2405
+ Q.prototype = {
2406
+ constructor: Q,
2407
+ _isOutsideThisEl: function(e) {
2408
+ !this.el.contains(e) && e !== this.el && (Gi = null);
2409
+ },
2410
+ _getDirection: function(e, t) {
2411
+ return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
2412
+ },
2413
+ _onTapStart: function(e) {
2414
+ if (e.cancelable) {
2415
+ 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;
2416
+ if (xa(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Yr && s && s.tagName.toUpperCase() === "SELECT") && (s = ti(s, r.draggable, n, !1), !(s && s.animated) && ki !== s)) {
2417
+ if (ji = B(s), Mi = B(s, r.draggable), typeof l == "function") {
2418
+ if (l.call(this, e, s, this)) {
2419
+ U({
2420
+ sortable: t,
2421
+ rootEl: c,
2422
+ name: "filter",
2423
+ targetEl: s,
2424
+ toEl: n,
2425
+ fromEl: n
2426
+ }), H("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
2427
+ return;
2428
+ }
2429
+ } else if (l && (l = l.split(",").some(function(r) {
2430
+ if (r = ti(c, r.trim(), n, !1), r) return U({
2431
+ sortable: t,
2432
+ rootEl: r,
2433
+ name: "filter",
2434
+ targetEl: s,
2435
+ fromEl: n,
2436
+ toEl: n
2437
+ }), H("filter", t, { evt: e }), !0;
2438
+ }), l)) {
2439
+ i && e.cancelable && e.preventDefault();
2440
+ return;
2441
+ }
2442
+ r.handle && !ti(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
2443
+ }
2444
+ }
2445
+ },
2446
+ _prepareDragStart: function(e, t, n) {
2447
+ var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
2448
+ if (n && !W && n.parentNode === i) {
2449
+ var c = z(n);
2450
+ if (q = i, W = n, G = W.parentNode, Oi = W.nextSibling, ki = n, Pi = a.group, Q.dragged = W, Ri = {
2451
+ target: W,
2452
+ clientX: (t || e).clientX,
2453
+ clientY: (t || e).clientY
2454
+ }, Hi = Ri.clientX - c.left, Ui = Ri.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
2455
+ if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
2456
+ r._onDrop();
2457
+ return;
2458
+ }
2459
+ r._disableDelayedDragEvents(), !Jr && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
2460
+ sortable: r,
2461
+ name: "choose",
2462
+ originalEvent: e
2463
+ }), L(W, a.chosenClass, !0);
2464
+ }, a.ignore.split(",").forEach(function(e) {
2465
+ ii(W, e.trim(), ma);
2466
+ }), F(o, "dragover", ua), F(o, "mousemove", ua), F(o, "touchmove", ua), F(o, "mouseup", r._onDrop), F(o, "touchend", r._onDrop), F(o, "touchcancel", r._onDrop), Jr && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(qr || Kr))) {
2467
+ if (Q.eventCanceled) {
2468
+ this._onDrop();
2469
+ return;
2470
+ }
2471
+ 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);
2472
+ } else s();
2473
+ }
2474
+ },
2475
+ _delayedDragTouchMoveHandler: function(e) {
2476
+ var t = e.touches ? e.touches[0] : e;
2477
+ 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();
2478
+ },
2479
+ _disableDelayedDrag: function() {
2480
+ W && ma(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
2481
+ },
2482
+ _disableDelayedDragEvents: function() {
2483
+ var e = this.el.ownerDocument;
2484
+ 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);
2485
+ },
2486
+ _triggerDragStart: function(e, t) {
2487
+ 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));
2488
+ try {
2489
+ document.selection ? Sa(function() {
2490
+ document.selection.empty();
2491
+ }) : window.getSelection().removeAllRanges();
2492
+ } catch {}
2493
+ },
2494
+ _dragStarted: function(e, t) {
2495
+ if (Fi = !1, q && W) {
2496
+ H("dragStarted", this, { evt: t }), this.nativeDraggable && F(document, "dragover", da);
2497
+ var n = this.options;
2498
+ !e && L(W, n.dragClass, !1), L(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
2499
+ sortable: this,
2500
+ name: "start",
2501
+ originalEvent: t
2502
+ });
2503
+ } else this._nulling();
2504
+ },
2505
+ _emulateDragOver: function() {
2506
+ if (zi) {
2507
+ this._lastX = zi.clientX, this._lastY = zi.clientY, ca();
2508
+ for (var e = document.elementFromPoint(zi.clientX, zi.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(zi.clientX, zi.clientY), e !== t);) t = e;
2509
+ if (W.parentNode[V]._isOutsideThisEl(e), t) do {
2510
+ if (t[V]) {
2511
+ var n = void 0;
2512
+ if (n = t[V]._onDragOver({
2513
+ clientX: zi.clientX,
2514
+ clientY: zi.clientY,
2515
+ target: e,
2516
+ rootEl: t
2517
+ }), n && !this.options.dragoverBubble) break;
2518
+ }
2519
+ e = t;
2520
+ } while (t = t.parentNode);
2521
+ la();
2522
+ }
2523
+ },
2524
+ _onTouchMove: function(e) {
2525
+ if (Ri) {
2526
+ var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && ri(K, !0), o = K && a && a.a, s = K && a && a.d, c = ea && Z && li(Z), l = (i.clientX - Ri.clientX + r.x) / (o || 1) + (c ? c[0] - Xi[0] : 0) / (o || 1), u = (i.clientY - Ri.clientY + r.y) / (s || 1) + (c ? c[1] - Xi[1] : 0) / (s || 1);
2527
+ if (!Q.active && !Fi) {
2528
+ if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
2529
+ this._onDragStart(e, !0);
2530
+ }
2531
+ if (K) {
2532
+ a ? (a.e += l - (Bi || 0), a.f += u - (Vi || 0)) : a = {
2533
+ a: 1,
2534
+ b: 0,
2535
+ c: 0,
2536
+ d: 1,
2537
+ e: l,
2538
+ f: u
2539
+ };
2540
+ var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
2541
+ R(K, "webkitTransform", d), R(K, "mozTransform", d), R(K, "msTransform", d), R(K, "transform", d), Bi = l, Vi = u, zi = i;
2542
+ }
2543
+ e.cancelable && e.preventDefault();
2544
+ }
2545
+ },
2546
+ _appendGhost: function() {
2547
+ if (!K) {
2548
+ var e = this.options.fallbackOnBody ? document.body : q, t = z(W, !0, ea, !0, e), n = this.options;
2549
+ if (ea) {
2550
+ for (Z = e; R(Z, "position") === "static" && R(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
2551
+ Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = ai()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = ai(), Xi = li(Z);
2552
+ }
2553
+ 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", ea ? "absolute" : "fixed"), R(K, "zIndex", "100000"), R(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), R(K, "transform-origin", Hi / parseInt(K.style.width) * 100 + "% " + Ui / parseInt(K.style.height) * 100 + "%");
2554
+ }
2555
+ },
2556
+ _onDragStart: function(e, t) {
2557
+ var n = this, r = e.dataTransfer, i = n.options;
2558
+ if (H("dragStart", this, { evt: e }), Q.eventCanceled) {
2559
+ this._onDrop();
2560
+ return;
2561
+ }
2562
+ H("setupClone", this), Q.eventCanceled || (J = vi(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), L(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Sa(function() {
2563
+ H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
2564
+ sortable: n,
2565
+ name: "clone"
2566
+ }));
2567
+ }), !t && L(W, i.dragClass, !0), t ? (Ii = !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)")), Fi = !0, n._dragStartId = Sa(n._dragStarted.bind(n, t, e)), F(document, "selectstart", n), Wi = !0, Yr && R(document.body, "user-select", "none");
2568
+ },
2569
+ _onDragOver: function(e) {
2570
+ var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Pi === s, u = o.sort, d = X || c, f, p = this, m = !1;
2571
+ if (Zi) return;
2572
+ function h(o, s) {
2573
+ H(o, p, Rr({
2574
+ evt: e,
2575
+ isOwner: l,
2576
+ axis: f ? "vertical" : "horizontal",
2577
+ revert: a,
2578
+ dragRect: r,
2579
+ targetRect: i,
2580
+ canSort: u,
2581
+ fromSortable: d,
2582
+ target: n,
2583
+ completed: _,
2584
+ onMove: function(n, i) {
2585
+ return pa(q, t, W, r, n, z(n), e, i);
2586
+ },
2587
+ changed: v
2588
+ }, s));
2589
+ }
2590
+ function g() {
2591
+ h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
2592
+ }
2593
+ function _(r) {
2594
+ 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() {
2595
+ h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
2596
+ }), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (Gi = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && ua(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
2597
+ }
2598
+ function v() {
2599
+ Y = B(W), Ni = B(W, o.draggable), U({
2600
+ sortable: p,
2601
+ name: "change",
2602
+ toEl: t,
2603
+ newIndex: Y,
2604
+ newDraggableIndex: Ni,
2605
+ originalEvent: e
2606
+ });
2607
+ }
2608
+ if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = ti(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
2609
+ if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
2610
+ if (Ii = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = Pi.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
2611
+ if (f = this._getDirection(e, n) === "vertical", r = z(W), h("dragOverValid"), Q.eventCanceled) return m;
2612
+ if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Oi ? q.insertBefore(W, Oi) : q.appendChild(W)), _(!0);
2613
+ var y = ci(t, o.draggable);
2614
+ if (!y || _a(e, f, this) && !y.animated) {
2615
+ if (y === W) return _(!1);
2616
+ if (y && t === e.target && (n = y), n && (i = z(n)), pa(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);
2617
+ } else if (y && ga(e, f, this)) {
2618
+ var b = si(t, 0, o, !0);
2619
+ if (b === W) return _(!1);
2620
+ if (n = b, i = z(n), pa(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
2621
+ } else if (n.parentNode === t) {
2622
+ i = z(n);
2623
+ var x = 0, S, C = W.parentNode !== t, w = !aa(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = oi(n, "top", "top") || oi(W, "top", "top"), ee = E ? E.scrollTop : void 0;
2624
+ Gi !== n && (S = i[T], qi = !1, Ji = !w && o.invertSwap || C), x = va(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Ji, Gi === n);
2625
+ var D;
2626
+ if (x !== 0) {
2627
+ var O = B(W);
2628
+ do
2629
+ O -= x, D = G.children[O];
2630
+ while (D && (R(D, "display") === "none" || D === K));
2631
+ }
2632
+ if (x === 0 || D === n) return _(!1);
2633
+ Gi = n, Ki = x;
2634
+ var k = n.nextElementSibling, te = !1;
2635
+ te = x === 1;
2636
+ var A = pa(q, t, W, r, n, i, e, te);
2637
+ if (A !== !1) return (A === 1 || A === -1) && (te = A === 1), Zi = !0, setTimeout(ha, 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 && !Ji && (Yi = Math.abs(S - z(n)[T])), v(), _(!0);
2638
+ }
2639
+ if (t.contains(W)) return _(!1);
2640
+ }
2641
+ return !1;
2642
+ },
2643
+ _ignoreWhileAnimating: null,
2644
+ _offMoveEvents: function() {
2645
+ I(document, "mousemove", this._onTouchMove), I(document, "touchmove", this._onTouchMove), I(document, "pointermove", this._onTouchMove), I(document, "dragover", ua), I(document, "mousemove", ua), I(document, "touchmove", ua);
2646
+ },
2647
+ _offUpEvents: function() {
2648
+ var e = this.el.ownerDocument;
2649
+ I(e, "mouseup", this._onDrop), I(e, "touchend", this._onDrop), I(e, "pointerup", this._onDrop), I(e, "touchcancel", this._onDrop), I(document, "selectstart", this);
2650
+ },
2651
+ _onDrop: function(e) {
2652
+ var t = this.el, n = this.options;
2653
+ if (Y = B(W), Ni = B(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = B(W), Ni = B(W, n.draggable), Q.eventCanceled) {
2654
+ this._nulling();
2655
+ return;
2656
+ }
2657
+ Fi = !1, Ji = !1, qi = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ca(this.cloneId), Ca(this._dragStartId), this.nativeDraggable && (I(document, "drop", this), I(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Yr && R(document.body, "user-select", ""), R(W, "transform", ""), e && (Wi && (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), ma(W), W.style["will-change"] = "", Wi && !Fi && L(W, X ? X.options.ghostClass : this.options.ghostClass, !1), L(W, this.options.chosenClass, !1), U({
2658
+ sortable: this,
2659
+ name: "unchoose",
2660
+ toEl: G,
2661
+ newIndex: null,
2662
+ newDraggableIndex: null,
2663
+ originalEvent: e
2664
+ }), q === G ? Y !== ji && Y >= 0 && (U({
2665
+ sortable: this,
2666
+ name: "update",
2667
+ toEl: G,
2668
+ originalEvent: e
2669
+ }), U({
2670
+ sortable: this,
2671
+ name: "sort",
2672
+ toEl: G,
2673
+ originalEvent: e
2674
+ })) : (Y >= 0 && (U({
2675
+ rootEl: G,
2676
+ name: "add",
2677
+ toEl: G,
2678
+ fromEl: q,
2679
+ originalEvent: e
2680
+ }), U({
2681
+ sortable: this,
2682
+ name: "remove",
2683
+ toEl: G,
2684
+ originalEvent: e
2685
+ }), U({
2686
+ rootEl: G,
2687
+ name: "sort",
2688
+ toEl: G,
2689
+ fromEl: q,
2690
+ originalEvent: e
2691
+ }), U({
2692
+ sortable: this,
2693
+ name: "sort",
2694
+ toEl: G,
2695
+ originalEvent: e
2696
+ })), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = ji, Ni = Mi), U({
2697
+ sortable: this,
2698
+ name: "end",
2699
+ toEl: G,
2700
+ originalEvent: e
2701
+ }), this.save()))), this._nulling();
2702
+ },
2703
+ _nulling: function() {
2704
+ H("nulling", this), q = W = G = K = Oi = J = ki = Ai = Ri = zi = Wi = Y = Ni = ji = Mi = Gi = Ki = X = Pi = Q.dragged = Q.ghost = Q.clone = Q.active = null, Qi.forEach(function(e) {
2705
+ e.checked = !0;
2706
+ }), Qi.length = Bi = Vi = 0;
2707
+ },
2708
+ handleEvent: function(e) {
2709
+ switch (e.type) {
2710
+ case "drop":
2711
+ case "dragend":
2712
+ this._onDrop(e);
2713
+ break;
2714
+ case "dragenter":
2715
+ case "dragover":
2716
+ W && (this._onDragOver(e), fa(e));
2717
+ break;
2718
+ case "selectstart":
2719
+ e.preventDefault();
2720
+ break;
2721
+ }
2722
+ },
2723
+ toArray: function() {
2724
+ for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], ti(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || ba(t));
2725
+ return e;
2726
+ },
2727
+ sort: function(e, t) {
2728
+ var n = {}, r = this.el;
2729
+ this.toArray().forEach(function(e, t) {
2730
+ var i = r.children[t];
2731
+ ti(i, this.options.draggable, r, !1) && (n[e] = i);
2732
+ }, this), t && this.captureAnimationState(), e.forEach(function(e) {
2733
+ n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
2734
+ }), t && this.animateAll();
2735
+ },
2736
+ save: function() {
2737
+ var e = this.options.store;
2738
+ e && e.set && e.set(this);
2739
+ },
2740
+ closest: function(e, t) {
2741
+ return ti(e, t || this.options.draggable, this.el, !1);
2742
+ },
2743
+ option: function(e, t) {
2744
+ var n = this.options;
2745
+ if (t === void 0) return n[e];
2746
+ var r = Ti.modifyOption(this, e, t);
2747
+ r === void 0 ? n[e] = t : n[e] = r, e === "group" && sa(n);
2748
+ },
2749
+ destroy: function() {
2750
+ H("destroy", this);
2751
+ var e = this.el;
2752
+ 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) {
2753
+ e.removeAttribute("draggable");
2754
+ }), this._onDrop(), this._disableDelayedDragEvents(), Li.splice(Li.indexOf(this.el), 1), this.el = e = null;
2755
+ },
2756
+ _hideClone: function() {
2757
+ if (!Ai) {
2758
+ if (H("hideClone", this), Q.eventCanceled) return;
2759
+ R(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Ai = !0;
2760
+ }
2761
+ },
2762
+ _showClone: function(e) {
2763
+ if (e.lastPutMode !== "clone") {
2764
+ this._hideClone();
2765
+ return;
2766
+ }
2767
+ if (Ai) {
2768
+ if (H("showClone", this), Q.eventCanceled) return;
2769
+ W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : Oi ? q.insertBefore(J, Oi) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), R(J, "display", ""), Ai = !1;
2770
+ }
2771
+ }
2772
+ };
2773
+ function fa(e) {
2774
+ e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
2775
+ }
2776
+ function pa(e, t, n, r, i, a, o, s) {
2777
+ var c, l = e[V], u = l.options.onMove, d;
2778
+ return window.CustomEvent && !Kr && !qr ? c = new CustomEvent("move", {
2779
+ bubbles: !0,
2780
+ cancelable: !0
2781
+ }) : (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;
2782
+ }
2783
+ function ma(e) {
2784
+ e.draggable = !1;
2785
+ }
2786
+ function ha() {
2787
+ Zi = !1;
2788
+ }
2789
+ function ga(e, t, n) {
2790
+ var r = z(si(n.el, 0, n.options, !0)), i = yi(n.el, n.options, K), a = 10;
2791
+ 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;
2792
+ }
2793
+ function _a(e, t, n) {
2794
+ var r = z(ci(n.el, n.options.draggable)), i = yi(n.el, n.options, K), a = 10;
2795
+ 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;
2796
+ }
2797
+ function va(e, t, n, r, i, a, o, s) {
2798
+ 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;
2799
+ if (!o) {
2800
+ if (s && Yi < l * i) {
2801
+ if (!qi && (Ki === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (qi = !0), qi) f = !0;
2802
+ else if (Ki === 1 ? c < u + Yi : c > d - Yi) return -Ki;
2803
+ } else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return ya(t);
2804
+ }
2805
+ return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
2806
+ }
2807
+ function ya(e) {
2808
+ return B(W) < B(e) ? 1 : -1;
2809
+ }
2810
+ function ba(e) {
2811
+ for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
2812
+ return r.toString(36);
2813
+ }
2814
+ function xa(e) {
2815
+ Qi.length = 0;
2816
+ for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
2817
+ var r = t[n];
2818
+ r.checked && Qi.push(r);
2819
+ }
2820
+ }
2821
+ function Sa(e) {
2822
+ return setTimeout(e, 0);
2823
+ }
2824
+ function Ca(e) {
2825
+ return clearTimeout(e);
2826
+ }
2827
+ $i && F(document, "touchmove", function(e) {
2828
+ (Q.active || Fi) && e.cancelable && e.preventDefault();
2829
+ }), Q.utils = {
2830
+ on: F,
2831
+ off: I,
2832
+ css: R,
2833
+ find: ii,
2834
+ is: function(e, t) {
2835
+ return !!ti(e, t, e, !1);
2836
+ },
2837
+ extend: fi,
2838
+ throttle: hi,
2839
+ closest: ti,
2840
+ toggleClass: L,
2841
+ clone: vi,
2842
+ index: B,
2843
+ nextTick: Sa,
2844
+ cancelNextTick: Ca,
2845
+ detectDirection: ia,
2846
+ getChild: si
2847
+ }, Q.get = function(e) {
2848
+ return e[V];
2849
+ }, Q.mount = function() {
2850
+ var e = [...arguments];
2851
+ e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
2852
+ if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
2853
+ e.utils && (Q.utils = Rr(Rr({}, Q.utils), e.utils)), Ti.mount(e);
2854
+ });
2855
+ }, Q.create = function(e, t) {
2856
+ return new Q(e, t);
2857
+ }, Q.version = Wr;
2858
+ var $ = [], wa, Ta, Ea = !1, Da, Oa, ka, Aa;
2859
+ function ja() {
2860
+ function e() {
2861
+ for (var e in this.defaults = {
2862
+ scroll: !0,
2863
+ forceAutoScrollFallback: !1,
2864
+ scrollSensitivity: 30,
2865
+ scrollSpeed: 10,
2866
+ bubbleScroll: !0
2867
+ }, this) e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
2868
+ }
2869
+ return e.prototype = {
2870
+ dragStarted: function(e) {
2871
+ var t = e.originalEvent;
2872
+ 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);
2873
+ },
2874
+ dragOverCompleted: function(e) {
2875
+ var t = e.originalEvent;
2876
+ !this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
2877
+ },
2878
+ drop: function() {
2879
+ this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : (I(document, "pointermove", this._handleFallbackAutoScroll), I(document, "touchmove", this._handleFallbackAutoScroll), I(document, "mousemove", this._handleFallbackAutoScroll)), Na(), Ma(), gi();
2880
+ },
2881
+ nulling: function() {
2882
+ ka = Ta = wa = Ea = Aa = Da = Oa = null, $.length = 0;
2883
+ },
2884
+ _handleFallbackAutoScroll: function(e) {
2885
+ this._handleAutoScroll(e, !0);
2886
+ },
2887
+ _handleAutoScroll: function(e, t) {
2888
+ var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
2889
+ if (ka = e, t || this.options.forceAutoScrollFallback || qr || Kr || Yr) {
2890
+ Pa(e, this.options, a, t);
2891
+ var o = di(a, !0);
2892
+ Ea && (!Aa || r !== Da || i !== Oa) && (Aa && Na(), Aa = setInterval(function() {
2893
+ var a = di(document.elementFromPoint(r, i), !0);
2894
+ a !== o && (o = a, Ma()), Pa(e, n.options, a, t);
2895
+ }, 10), Da = r, Oa = i);
2896
+ } else {
2897
+ if (!this.options.bubbleScroll || di(a, !0) === ai()) {
2898
+ Ma();
2899
+ return;
2900
+ }
2901
+ Pa(e, this.options, di(a, !1), !1);
2902
+ }
2903
+ }
2904
+ }, Vr(e, {
2905
+ pluginName: "scroll",
2906
+ initializeByDefault: !0
2907
+ });
2908
+ }
2909
+ function Ma() {
2910
+ $.forEach(function(e) {
2911
+ clearInterval(e.pid);
2912
+ }), $ = [];
2913
+ }
2914
+ function Na() {
2915
+ clearInterval(Aa);
2916
+ }
2917
+ var Pa = hi(function(e, t, n, r) {
2918
+ if (t.scroll) {
2919
+ var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = ai(), l = !1, u;
2920
+ Ta !== n && (Ta = n, Ma(), wa = t.scroll, u = t.scrollFn, wa === !0 && (wa = di(n, !0)));
2921
+ var d = 0, f = wa;
2922
+ do {
2923
+ 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;
2924
+ 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"));
2925
+ 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);
2926
+ if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
2927
+ ($[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() {
2928
+ r && this.layer === 0 && Q.active._onTouchMove(ka);
2929
+ var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
2930
+ typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, ka, $[this.layer].el) !== "continue" || _i($[this.layer].el, n, t);
2931
+ }.bind({ layer: d }), 24))), d++;
2932
+ } while (t.bubbleScroll && f !== c && (f = di(f, !1)));
2933
+ Ea = l;
2934
+ }
2935
+ }, 30), Fa = function(e) {
2936
+ var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
2937
+ if (t) {
2938
+ var c = n || i;
2939
+ o();
2940
+ var l = t.changedTouches && t.changedTouches.length ? t.changedTouches[0] : t, u = document.elementFromPoint(l.clientX, l.clientY);
2941
+ s(), c && !c.el.contains(u) && (a("spill"), this.onSpill({
2942
+ dragEl: r,
2943
+ putSortable: n
2944
+ }));
2945
+ }
2946
+ };
2947
+ function Ia() {}
2948
+ Ia.prototype = {
2949
+ startIndex: null,
2950
+ dragStart: function(e) {
2951
+ var t = e.oldDraggableIndex;
2952
+ this.startIndex = t;
2953
+ },
2954
+ onSpill: function(e) {
2955
+ var t = e.dragEl, n = e.putSortable;
2956
+ this.sortable.captureAnimationState(), n && n.captureAnimationState();
2957
+ var r = si(this.sortable.el, this.startIndex, this.options);
2958
+ r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
2959
+ },
2960
+ drop: Fa
2961
+ }, Vr(Ia, { pluginName: "revertOnSpill" });
2962
+ function La() {}
2963
+ La.prototype = {
2964
+ onSpill: function(e) {
2965
+ var t = e.dragEl, n = e.putSortable || this.sortable;
2966
+ n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
2967
+ },
2968
+ drop: Fa
2969
+ }, Vr(La, { pluginName: "removeOnSpill" }), Q.mount(new ja()), Q.mount(La, Ia);
2970
+ function Ra(e) {
2971
+ return e == null ? e : JSON.parse(JSON.stringify(e));
2972
+ }
2973
+ function za(e) {
2974
+ oe() && ee(e);
2975
+ }
2976
+ function Ba(e) {
2977
+ oe() ? u(e) : r(e);
2978
+ }
2979
+ var Va = null, Ha = null;
2980
+ function Ua(e = null, t = null) {
2981
+ Va = e, Ha = t;
2982
+ }
2983
+ function Wa() {
2984
+ return {
2985
+ data: Va,
2986
+ clonedData: Ha
2987
+ };
2988
+ }
2989
+ var Ga = Symbol("cloneElement");
2990
+ function Ka(...e) {
2991
+ let t = oe()?.proxy, n = null, i = e[0], [, o, c] = e;
2992
+ Array.isArray(j(o)) || (c = o, o = null);
2993
+ let l = null, { immediate: u = !0, clone: d = Ra, forceFallback: f, fallbackOnBody: p, customUpdate: m } = j(c) ?? {};
2994
+ function h(e) {
2995
+ let { from: t, oldIndex: r, item: i } = e, a = Array.from(t.childNodes);
2996
+ n = f && !p ? a.slice(0, -1) : a;
2997
+ let s = j(j(o)?.[r]), c = d(s);
2998
+ Ua(s, c), i[Ga] = c;
2999
+ }
3000
+ function g(e) {
3001
+ let t = e.item[Ga];
3002
+ if (!Er(t)) {
3003
+ if (kr(e.item), a(o)) {
3004
+ let n = [...j(o)];
3005
+ o.value = Tr(n, e.newDraggableIndex, t);
3006
+ return;
3007
+ }
3008
+ Tr(j(o), e.newDraggableIndex, t);
3009
+ }
3010
+ }
3011
+ function _(e) {
3012
+ let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, pullMode: s, clone: c } = e;
3013
+ if (Or(t, n, r), s === "clone") {
3014
+ kr(c);
3015
+ return;
3016
+ }
3017
+ if (a(o)) {
3018
+ let e = [...j(o)];
3019
+ o.value = wr(e, i);
3020
+ return;
3021
+ }
3022
+ wr(j(o), i);
3023
+ }
3024
+ function v(e) {
3025
+ if (m) {
3026
+ m(e);
3027
+ return;
3028
+ }
3029
+ let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, newDraggableIndex: s } = e;
3030
+ if (kr(n), Or(t, n, r), a(o)) {
3031
+ let e = [...j(o)];
3032
+ o.value = xr(e, i, s);
3033
+ return;
3034
+ }
3035
+ xr(j(o), i, s);
3036
+ }
3037
+ function y(e) {
3038
+ let { newIndex: t, oldIndex: i, from: a, to: o } = e, s = null, c = t === i && a === o;
3039
+ try {
3040
+ if (c) {
3041
+ let e = null;
3042
+ n?.some((t, r) => {
3043
+ if (e && n?.length !== o.childNodes.length) return a.insertBefore(e, t.nextSibling), !0;
3044
+ let i = o.childNodes[r];
3045
+ e = o?.replaceChild(t, i);
3046
+ });
3047
+ }
3048
+ } catch (e) {
3049
+ s = e;
3050
+ } finally {
3051
+ n = null;
3052
+ }
3053
+ r(() => {
3054
+ if (Ua(), s) throw s;
3055
+ });
3056
+ }
3057
+ let b = {
3058
+ onUpdate: v,
3059
+ onStart: h,
3060
+ onAdd: g,
3061
+ onRemove: _,
3062
+ onEnd: y
3063
+ };
3064
+ function x(e) {
3065
+ let n = j(i);
3066
+ return e ||= Dr(n) ? Ar(n, t?.$el) : n, e && !Nr(e) && (e = e.$el), e || br("Root element not found"), e;
3067
+ }
3068
+ function S() {
3069
+ let e = j(c) ?? {}, { immediate: t, clone: n } = e, r = _r(e, ["immediate", "clone"]);
3070
+ return Pr(r, (e, t) => {
3071
+ Fr(e) && (r[e] = (e, ...n) => (Ir(e, Wa()), t(e, ...n)));
3072
+ }), Mr(o === null ? {} : b, r);
3073
+ }
3074
+ let C = (e) => {
3075
+ e = x(e), l && w.destroy(), l = new Q(e, S());
3076
+ };
3077
+ s(() => c, () => {
3078
+ l && Pr(S(), (e, t) => {
3079
+ l?.option(e, t);
3080
+ });
3081
+ }, { deep: !0 });
3082
+ let w = {
3083
+ option: (e, t) => l?.option(e, t),
3084
+ destroy: () => {
3085
+ l?.destroy(), l = null;
3086
+ },
3087
+ save: () => l?.save(),
3088
+ toArray: () => l?.toArray(),
3089
+ closest: (...e) => l?.closest(...e)
3090
+ };
3091
+ return Ba(() => {
3092
+ u && C();
3093
+ }), za(w.destroy), gr({
3094
+ start: C,
3095
+ pause: () => w?.option("disabled", !0),
3096
+ resume: () => w?.option("disabled", !1)
3097
+ }, w);
3098
+ }
3099
+ var qa = [
3100
+ "update",
3101
+ "start",
3102
+ "add",
3103
+ "remove",
3104
+ "choose",
3105
+ "unchoose",
3106
+ "end",
3107
+ "sort",
3108
+ "filter",
3109
+ "clone",
3110
+ "move",
3111
+ "change"
3112
+ ], Ja = y({
3113
+ name: "VueDraggable",
3114
+ model: {
3115
+ prop: "modelValue",
3116
+ event: "update:modelValue"
3117
+ },
3118
+ props: [
3119
+ "clone",
3120
+ "animation",
3121
+ "ghostClass",
3122
+ "group",
3123
+ "sort",
3124
+ "disabled",
3125
+ "store",
3126
+ "handle",
3127
+ "draggable",
3128
+ "swapThreshold",
3129
+ "invertSwap",
3130
+ "invertedSwapThreshold",
3131
+ "removeCloneOnHide",
3132
+ "direction",
3133
+ "chosenClass",
3134
+ "dragClass",
3135
+ "ignore",
3136
+ "filter",
3137
+ "preventOnFilter",
3138
+ "easing",
3139
+ "setData",
3140
+ "dropBubble",
3141
+ "dragoverBubble",
3142
+ "dataIdAttr",
3143
+ "delay",
3144
+ "delayOnTouchOnly",
3145
+ "touchStartThreshold",
3146
+ "forceFallback",
3147
+ "fallbackClass",
3148
+ "fallbackOnBody",
3149
+ "fallbackTolerance",
3150
+ "fallbackOffset",
3151
+ "supportPointer",
3152
+ "emptyInsertThreshold",
3153
+ "scroll",
3154
+ "forceAutoScrollFallback",
3155
+ "scrollSensitivity",
3156
+ "scrollSpeed",
3157
+ "bubbleScroll",
3158
+ "modelValue",
3159
+ "tag",
3160
+ "target",
3161
+ "customUpdate",
3162
+ ...qa.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
3163
+ ],
3164
+ emits: ["update:modelValue", ...qa],
3165
+ setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
3166
+ let a = qa.reduce((e, t) => {
3167
+ let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
3168
+ return e[r] = (...e) => n(t, ...e), e;
3169
+ }, {}), s = x(() => {
3170
+ let t = S(e), { modelValue: n } = t, r = _r(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
3171
+ let r = j(n);
3172
+ return r !== void 0 && (e[t] = r), e;
3173
+ }, {});
3174
+ return gr(gr({}, a), Cr(gr(gr({}, i), o)));
3175
+ }), c = x({
3176
+ get: () => e.modelValue,
3177
+ set: (e) => n("update:modelValue", e)
3178
+ }), l = h(), u = o(Ka(e.target || l, c, s));
3179
+ return r(u), () => f(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
3180
+ }
3181
+ }), Ya = {
3182
+ mounted: "mounted",
3183
+ unmounted: "unmounted"
3184
+ };
3185
+ Ya.mounted, Ya.unmounted;
3186
+ //#endregion
3187
+ //#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
3188
+ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
3189
+ key: 0,
3190
+ "data-testid": "section-drop-hint",
3191
+ 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)]"
3192
+ }, $a = /* @__PURE__ */ y({
3193
+ __name: "SectionBlock",
3194
+ props: {
3195
+ block: {},
3196
+ viewport: {}
3197
+ },
3198
+ setup(n) {
3199
+ let r = {
3200
+ title: ur,
3201
+ paragraph: qn,
3202
+ image: Bn,
3203
+ button: Bt,
3204
+ divider: wn,
3205
+ custom: Sn
3206
+ }, a = n, { t: o } = st(), s = Ve(Qe, "SectionBlock"), l = ae(Je, null), u = ae(nt, null), d = x(() => {
3207
+ switch (a.block.columns) {
3208
+ case "2": return ["50%", "50%"];
3209
+ case "3": return [
3210
+ "33.33%",
3211
+ "33.33%",
3212
+ "33.33%"
3213
+ ];
3214
+ case "1-2": return ["33.33%", "66.67%"];
3215
+ case "2-1": return ["66.67%", "33.33%"];
3216
+ default: return ["100%"];
3217
+ }
3218
+ }), f = x(() => {
3219
+ let e = d.value.length, t = [...a.block.children];
3220
+ for (; t.length < e;) t.push([]);
3221
+ return t.slice(0, e);
3222
+ });
3223
+ function p(e) {
3224
+ return f.value[e] || [];
3225
+ }
3226
+ function m(e, t) {
3227
+ let n = [...a.block.children];
3228
+ for (; n.length <= e;) n.push([]);
3229
+ n[e] = t, s.updateBlock(a.block.id, { children: n });
3230
+ }
3231
+ function h(e) {
3232
+ return Jn(e, u, r);
3233
+ }
3234
+ function g(e, t) {
3235
+ e.type === "custom" && s.updateBlock(e.id, {
3236
+ fieldValues: t.fieldValues,
3237
+ dataSourceFetched: t.dataSourceFetched
3238
+ });
3239
+ }
3240
+ return (r, a) => (e(), w("div", Xa, [C("div", Za, [(e(!0), w(D, null, c(f.value, (r, a) => (e(), w("div", {
3241
+ key: a,
3242
+ class: v(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(a).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
3243
+ style: A({ width: d.value[a] })
3244
+ }, [N(j(Ja), {
3245
+ "model-value": p(a),
3246
+ group: {
3247
+ name: "blocks",
3248
+ pull: !0,
3249
+ put: (e, t, n) => n.dataset.blockType !== "section"
3250
+ },
3251
+ animation: 150,
3252
+ "ghost-class": "tpl-ghost",
3253
+ "empty-insert-threshold": 20,
3254
+ class: "tpl:min-h-[60px]",
3255
+ "onUpdate:modelValue": (e) => m(a, e)
3256
+ }, {
3257
+ default: ce(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(cr, {
3258
+ block: r,
3259
+ "is-selected": j(s).state.selectedBlockId === r.id,
3260
+ viewport: n.viewport,
3261
+ onSelect: (e) => j(s).selectBlock(r.id)
3262
+ }, {
3263
+ default: ce(() => [(e(), ne(i(h(r)), {
3264
+ block: r,
3265
+ viewport: n.viewport,
3266
+ onFetchData: (e) => g(r, e)
3267
+ }, null, 40, [
3268
+ "block",
3269
+ "viewport",
3270
+ "onFetchData"
3271
+ ]))]),
3272
+ _: 2
3273
+ }, 1032, [
3274
+ "block",
3275
+ "is-selected",
3276
+ "viewport",
3277
+ "onSelect"
3278
+ ])])), [[te, !j(l)?.isHidden(r.id)]])), 128))]),
3279
+ _: 2
3280
+ }, 1032, [
3281
+ "model-value",
3282
+ "group",
3283
+ "onUpdate:modelValue"
3284
+ ]), p(a).length === 0 ? (e(), w("div", Qa, [C("span", null, M(j(o).section.dropHere), 1)])) : O("", !0)], 6))), 128))])]));
3285
+ }
3286
+ }), eo = {
3287
+ facebook: {
3288
+ name: "Facebook",
3289
+ color: "#1877F2",
3290
+ path: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"
3291
+ },
3292
+ twitter: {
3293
+ name: "X",
3294
+ color: "#000000",
3295
+ path: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
3296
+ },
3297
+ instagram: {
3298
+ name: "Instagram",
3299
+ color: "#E4405F",
3300
+ path: "M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"
3301
+ },
3302
+ linkedin: {
3303
+ name: "LinkedIn",
3304
+ color: "#0A66C2",
3305
+ path: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"
3306
+ },
3307
+ youtube: {
3308
+ name: "YouTube",
3309
+ color: "#FF0000",
3310
+ path: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
3311
+ },
3312
+ tiktok: {
3313
+ name: "TikTok",
3314
+ color: "#000000",
3315
+ path: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"
3316
+ },
3317
+ pinterest: {
3318
+ name: "Pinterest",
3319
+ color: "#BD081C",
3320
+ path: "M12 0C5.373 0 0 5.372 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738.098.119.112.224.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12 0-6.628-5.373-12-12-12z"
3321
+ },
3322
+ email: {
3323
+ name: "Email",
3324
+ color: "#6B7280",
3325
+ path: "M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z"
3326
+ },
3327
+ whatsapp: {
3328
+ name: "WhatsApp",
3329
+ color: "#25D366",
3330
+ path: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"
3331
+ },
3332
+ telegram: {
3333
+ name: "Telegram",
3334
+ color: "#26A5E4",
3335
+ path: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"
3336
+ },
3337
+ discord: {
3338
+ name: "Discord",
3339
+ color: "#5865F2",
3340
+ path: "M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189z"
3341
+ },
3342
+ snapchat: {
3343
+ name: "Snapchat",
3344
+ color: "#FFFC00",
3345
+ path: "M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146 1.124.347 2.317.535 3.554.535 6.627 0 12.017-5.373 12.017-12.001C24.034 5.367 18.644 0 12.017 0z"
3346
+ },
3347
+ reddit: {
3348
+ name: "Reddit",
3349
+ color: "#FF4500",
3350
+ path: "M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"
3351
+ },
3352
+ github: {
3353
+ name: "GitHub",
3354
+ color: "#181717",
3355
+ path: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"
3356
+ },
3357
+ dribbble: {
3358
+ name: "Dribbble",
3359
+ color: "#EA4C89",
3360
+ path: "M12 24C5.385 24 0 18.615 0 12S5.385 0 12 0s12 5.385 12 12-5.385 12-12 12zm10.12-10.358c-.35-.11-3.17-.953-6.384-.438 1.34 3.684 1.887 6.684 1.992 7.308 2.3-1.555 3.936-4.02 4.392-6.87zm-6.115 7.808c-.153-.9-.75-4.032-2.19-7.77l-.066.02c-5.79 2.015-7.86 6.025-8.04 6.4 1.73 1.358 3.92 2.166 6.29 2.166 1.42 0 2.77-.29 4-.814zm-11.62-2.58c.232-.4 3.045-5.055 8.332-6.765.135-.045.27-.084.405-.12-.26-.585-.54-1.167-.832-1.74C7.17 11.775 2.206 11.71 1.756 11.7l-.004.312c0 2.633.998 5.037 2.634 6.855zm-2.42-8.955c.46.008 4.683.026 9.477-1.248-1.698-3.018-3.53-5.558-3.8-5.928-2.868 1.35-5.01 3.99-5.676 7.17zM9.6 2.052c.282.38 2.145 2.914 3.822 6 3.645-1.365 5.19-3.44 5.373-3.702-1.81-1.61-4.19-2.586-6.795-2.586-.825 0-1.63.1-2.4.285zm10.335 3.483c-.218.29-1.935 2.493-5.724 4.04.24.49.47.985.68 1.486.08.18.15.36.22.53 3.41-.43 6.8.26 7.14.33-.02-2.42-.88-4.64-2.31-6.38z"
3361
+ },
3362
+ behance: {
3363
+ name: "Behance",
3364
+ color: "#1769FF",
3365
+ path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
3366
+ }
3367
+ }, to = {
3368
+ small: 24,
3369
+ medium: 32,
3370
+ large: 48
3371
+ }, no = [
3372
+ "facebook",
3373
+ "twitter",
3374
+ "instagram",
3375
+ "linkedin",
3376
+ "youtube",
3377
+ "tiktok",
3378
+ "pinterest",
3379
+ "email",
3380
+ "whatsapp",
3381
+ "telegram",
3382
+ "discord",
3383
+ "snapchat",
3384
+ "reddit",
3385
+ "github",
3386
+ "dribbble",
3387
+ "behance"
3388
+ ], ro = [
3389
+ "width",
3390
+ "height",
3391
+ "fill"
3392
+ ], io = ["d"], ao = /* @__PURE__ */ y({
3393
+ __name: "SocialIconSvg",
3394
+ props: {
3395
+ platform: {},
3396
+ iconStyle: {},
3397
+ iconSize: {}
3398
+ },
3399
+ setup(t) {
3400
+ let n = t, r = x(() => eo[n.platform]), i = x(() => to[n.iconSize]), a = x(() => {
3401
+ let e = {
3402
+ display: "inline-flex",
3403
+ alignItems: "center",
3404
+ justifyContent: "center",
3405
+ width: `${i.value}px`,
3406
+ height: `${i.value}px`
3407
+ };
3408
+ switch (n.iconStyle) {
3409
+ case "solid": return {
3410
+ ...e,
3411
+ backgroundColor: r.value.color,
3412
+ borderRadius: "4px"
3413
+ };
3414
+ case "outlined": return {
3415
+ ...e,
3416
+ backgroundColor: "transparent",
3417
+ border: `2px solid ${r.value.color}`,
3418
+ borderRadius: "4px"
3419
+ };
3420
+ case "rounded": return {
3421
+ ...e,
3422
+ backgroundColor: r.value.color,
3423
+ borderRadius: "8px"
3424
+ };
3425
+ case "square": return {
3426
+ ...e,
3427
+ backgroundColor: r.value.color,
3428
+ borderRadius: "0"
3429
+ };
3430
+ case "circle": return {
3431
+ ...e,
3432
+ backgroundColor: r.value.color,
3433
+ borderRadius: "50%"
3434
+ };
3435
+ default: return e;
3436
+ }
3437
+ }), o = x(() => Math.floor(i.value * .6)), s = x(() => n.iconStyle === "outlined" ? r.value.color : "#ffffff");
3438
+ return (t, n) => (e(), w("span", { style: A(a.value) }, [(e(), w("svg", {
3439
+ width: o.value,
3440
+ height: o.value,
3441
+ viewBox: "0 0 24 24",
3442
+ fill: s.value,
3443
+ xmlns: "http://www.w3.org/2000/svg"
3444
+ }, [C("path", { d: r.value.path }, null, 8, io)], 8, ro))], 4));
3445
+ }
3446
+ }), oo = { class: "tpl:w-full" }, so = ["href"], co = {
3447
+ key: 1,
3448
+ 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)]"
3449
+ }, lo = /* @__PURE__ */ y({
3450
+ __name: "SocialIconsBlock",
3451
+ props: {
3452
+ block: {},
3453
+ viewport: {}
3454
+ },
3455
+ setup(t) {
3456
+ let n = t, { t: r } = st(), i = x(() => ({
3457
+ display: "flex",
3458
+ flexWrap: "wrap",
3459
+ gap: `${n.block.spacing}px`,
3460
+ justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
3461
+ })), a = x(() => n.block.icons.length > 0);
3462
+ return (n, o) => (e(), w("div", oo, [a.value ? (e(), w("div", {
3463
+ key: 0,
3464
+ style: A(i.value)
3465
+ }, [(e(!0), w(D, null, c(t.block.icons, (n) => (e(), w("a", {
3466
+ key: n.id,
3467
+ href: n.url || "#",
3468
+ class: "tpl:cursor-default",
3469
+ onClick: o[0] ||= b(() => {}, ["prevent"])
3470
+ }, [N(ao, {
3471
+ platform: n.platform,
3472
+ "icon-style": t.block.iconStyle,
3473
+ "icon-size": t.block.iconSize
3474
+ }, null, 8, [
3475
+ "platform",
3476
+ "icon-style",
3477
+ "icon-size"
3478
+ ])], 8, so))), 128))], 4)) : (e(), w("div", co, [N(j(Zt), { size: 16 }), C("span", null, M(j(r).social.addIcons), 1)]))]));
3479
+ }
3480
+ }), uo = { class: "tpl:w-full" }, fo = {
3481
+ key: 0,
3482
+ class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
3483
+ style: {
3484
+ "background-color": "var(--tpl-bg-hover)",
3485
+ color: "var(--tpl-text-dim)"
3486
+ }
3487
+ }, po = /* @__PURE__ */ y({
3488
+ __name: "SpacerBlock",
3489
+ props: {
3490
+ block: {},
3491
+ viewport: {}
3492
+ },
3493
+ setup(t) {
3494
+ let n = t, r = Ve(Qe, "SpacerBlock"), i = x(() => ({
3495
+ height: `${n.block.height}px`,
3496
+ minHeight: `${n.block.height}px`,
3497
+ ...r.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
3498
+ }));
3499
+ return (n, a) => (e(), w("div", uo, [C("div", {
3500
+ style: A(i.value),
3501
+ class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(r).state.previewMode }])
3502
+ }, [j(r).state.previewMode ? O("", !0) : (e(), w("span", fo, M(t.block.height) + "px ", 1))], 6)]));
3503
+ }
3504
+ }), mo = { class: "tpl:w-full" }, ho = { key: 0 }, go = [
3505
+ "aria-label",
3506
+ "data-placeholder",
3507
+ "onBlur"
3508
+ ], _o = [
3509
+ "aria-label",
3510
+ "data-placeholder",
3511
+ "onBlur"
3512
+ ], vo = {
3513
+ key: 1,
3514
+ 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)]"
3515
+ }, yo = /* @__PURE__ */ ft(/* @__PURE__ */ y({
3516
+ __name: "TableBlock",
3517
+ props: {
3518
+ block: {},
3519
+ viewport: {}
3520
+ },
3521
+ setup(n) {
3522
+ let r = {
3523
+ mounted(e, t) {
3524
+ e.textContent = t.value ?? "";
3525
+ },
3526
+ updated(e, t) {
3527
+ t.value !== t.oldValue && e.ownerDocument.activeElement !== e && (e.textContent = t.value ?? "");
3528
+ }
3529
+ }, i = n, { t: a } = st(), o = Ve(Qe, "TableBlock"), s = x(() => i.block.rows.length > 0), l = x(() => ({
3530
+ width: "100%",
3531
+ borderCollapse: "collapse",
3532
+ fontSize: `${i.block.fontSize}px`,
3533
+ color: i.block.color,
3534
+ textAlign: i.block.textAlign,
3535
+ fontFamily: i.block.fontFamily || "inherit"
3536
+ })), u = x(() => ({
3537
+ border: `${i.block.borderWidth}px solid ${i.block.borderColor}`,
3538
+ padding: `${i.block.cellPadding}px`,
3539
+ textAlign: i.block.textAlign
3540
+ })), d = x(() => ({
3541
+ ...u.value,
3542
+ fontWeight: "bold",
3543
+ backgroundColor: i.block.headerBackgroundColor || "transparent"
3544
+ })), 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);
3545
+ function m() {
3546
+ o.selectBlock(i.block.id);
3547
+ }
3548
+ function h(e, t, n) {
3549
+ let r = n.target.innerText.trim(), a = i.block.rows.map((n) => n.id === e ? {
3550
+ ...n,
3551
+ cells: n.cells.map((e) => e.id === t ? {
3552
+ ...e,
3553
+ content: r
3554
+ } : e)
3555
+ } : n);
3556
+ o.updateBlock(i.block.id, { rows: a });
3557
+ }
3558
+ return (n, i) => (e(), w("div", mo, [s.value ? (e(), w("table", {
3559
+ key: 0,
3560
+ style: A(l.value),
3561
+ class: "tpl-table-editable"
3562
+ }, [f.value ? (e(), w("thead", ho, [C("tr", null, [(e(!0), w(D, null, c(f.value.cells, (n) => t((e(), w("th", {
3563
+ key: n.id,
3564
+ style: A(d.value),
3565
+ "aria-label": j(a).table.cellPlaceholder,
3566
+ contenteditable: "true",
3567
+ "data-placeholder": j(a).table.cellPlaceholder,
3568
+ onBlur: (e) => h(f.value.id, n.id, e),
3569
+ onKeydown: i[0] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
3570
+ onClick: b(m, ["stop"])
3571
+ }, null, 44, go)), [[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", {
3572
+ key: o.id,
3573
+ style: A(u.value),
3574
+ "aria-label": j(a).table.cellPlaceholder,
3575
+ contenteditable: "true",
3576
+ "data-placeholder": j(a).table.cellPlaceholder,
3577
+ onBlur: (e) => h(n.id, o.id, e),
3578
+ onKeydown: i[1] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
3579
+ onClick: b(m, ["stop"])
3580
+ }, null, 44, _o)), [[r, o.content]])), 128))]))), 128))])], 4)) : (e(), w("div", vo, [N(j(Qt), { size: 16 }), C("span", null, M(j(a).table.empty), 1)]))]));
3581
+ }
3582
+ }), [["__scopeId", "data-v-4f49860b"]]), bo = /* @__PURE__ */ y({
3583
+ __name: "VideoPlayButton",
3584
+ props: { hoverEffect: {
3585
+ type: Boolean,
3586
+ default: !1
3587
+ } },
3588
+ setup(t) {
3589
+ 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", {
3590
+ class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
3591
+ width: "28",
3592
+ height: "28",
3593
+ viewBox: "0 0 24 24",
3594
+ fill: "currentColor"
3595
+ }, [C("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
3596
+ }
3597
+ });
3598
+ //#endregion
3599
+ //#region src/utils/videoThumbnail.ts
3600
+ function xo(e) {
3601
+ if (!e) return {
3602
+ platform: "unknown",
3603
+ videoId: null,
3604
+ thumbnailUrl: null
3605
+ };
3606
+ for (let t of [/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/i, /youtube\.com\/shorts\/([a-zA-Z0-9_-]{11})/i]) {
3607
+ let n = e.match(t);
3608
+ if (n) {
3609
+ let e = n[1];
3610
+ return {
3611
+ platform: "youtube",
3612
+ videoId: e,
3613
+ thumbnailUrl: `https://img.youtube.com/vi/${e}/maxresdefault.jpg`
3614
+ };
3615
+ }
3616
+ }
3617
+ let t = e.match(/vimeo\.com\/(?:video\/)?(\d+)/i);
3618
+ if (t) {
3619
+ let e = t[1];
3620
+ return {
3621
+ platform: "vimeo",
3622
+ videoId: e,
3623
+ thumbnailUrl: `https://vumbnail.com/${e}.jpg`
3624
+ };
3625
+ }
3626
+ return {
3627
+ platform: "unknown",
3628
+ videoId: null,
3629
+ thumbnailUrl: null
3630
+ };
3631
+ }
3632
+ function So(e, t) {
3633
+ return t || xo(e).thumbnailUrl;
3634
+ }
3635
+ //#endregion
3636
+ //#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
3637
+ var Co = ["src", "alt"], wo = {
3638
+ class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
3639
+ style: { opacity: "0.7" }
3640
+ }, To = ["href"], Eo = ["src", "alt"], Do = ["src", "alt"], Oo = {
3641
+ key: 3,
3642
+ 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)]"
3643
+ }, ko = /* @__PURE__ */ y({
3644
+ __name: "VideoBlock",
3645
+ props: {
3646
+ block: {},
3647
+ viewport: {}
3648
+ },
3649
+ setup(t) {
3650
+ let n = t, { t: r } = st(), { syntax: i } = pt(), a = x(() => pe(n.block.url, i) || pe(n.block.thumbnailUrl, i)), o = x(() => a.value ? null : So(n.block.url, n.block.thumbnailUrl)), s = x(() => ({ textAlign: n.block.align })), c = x(() => ({
3651
+ maxWidth: "100%",
3652
+ width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
3653
+ display: "block",
3654
+ margin: n.block.align === "center" ? "0 auto" : void 0,
3655
+ marginLeft: n.block.align === "right" ? "auto" : void 0
3656
+ })), l = x(() => pe(n.block.url, i) ? n.block.url : n.block.thumbnailUrl);
3657
+ return (n, i) => (e(), w("div", {
3658
+ class: "tpl:w-full",
3659
+ style: A(s.value)
3660
+ }, [a.value && t.block.placeholderUrl ? (e(), w("div", {
3661
+ key: 0,
3662
+ class: "tpl:relative tpl:inline-block",
3663
+ style: A(c.value)
3664
+ }, [C("img", {
3665
+ class: "tpl:w-full tpl:border-0",
3666
+ src: t.block.placeholderUrl,
3667
+ alt: t.block.alt
3668
+ }, null, 8, Co), N(bo)], 4)) : a.value ? (e(), w("div", {
3669
+ key: 1,
3670
+ 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)]",
3671
+ style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
3672
+ }, [N(j($t), {
3673
+ size: 36,
3674
+ "stroke-width": 1.5,
3675
+ class: "tpl:text-[var(--tpl-primary)]",
3676
+ style: { opacity: "0.5" }
3677
+ }), C("span", wo, M(l.value), 1)], 4)) : o.value ? (e(), w(D, { key: 2 }, [t.block.url ? (e(), w("a", {
3678
+ key: 0,
3679
+ href: t.block.url,
3680
+ target: "_blank",
3681
+ rel: "noopener noreferrer",
3682
+ class: "tpl:group tpl:relative tpl:inline-block",
3683
+ style: A(c.value),
3684
+ onClick: i[0] ||= b(() => {}, ["prevent"])
3685
+ }, [C("img", {
3686
+ class: "tpl:w-full tpl:border-0",
3687
+ src: o.value,
3688
+ alt: t.block.alt
3689
+ }, null, 8, Eo), N(bo, { "hover-effect": "" })], 12, To)) : (e(), w("div", {
3690
+ key: 1,
3691
+ class: "tpl:relative tpl:inline-block",
3692
+ style: A(c.value)
3693
+ }, [C("img", {
3694
+ class: "tpl:w-full tpl:border-0",
3695
+ src: o.value,
3696
+ alt: t.block.alt
3697
+ }, null, 8, Do), N(bo)], 4))], 64)) : (e(), w("div", Oo, [N(j($t), {
3698
+ size: 40,
3699
+ "stroke-width": 1.5,
3700
+ class: "tpl:text-[var(--tpl-border-light)]"
3701
+ }), C("span", null, M(j(r).video.addVideo), 1)]))], 4));
3702
+ }
3703
+ }), Ao = {
3704
+ section: $a,
3705
+ title: ur,
3706
+ paragraph: qn,
3707
+ image: Bn,
3708
+ button: Bt,
3709
+ divider: wn,
3710
+ video: ko,
3711
+ social: lo,
3712
+ menu: Wn,
3713
+ table: yo,
3714
+ spacer: po,
3715
+ html: kn,
3716
+ countdown: se(() => import("./CountdownBlock-Bxqe7zwL.js").then((e) => e.n))
3717
+ };
3718
+ function jo(e) {
3719
+ let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = st(r);
3720
+ t.setUiTheme(n.uiTheme ?? "auto");
3721
+ let { resolvedTheme: c } = Dt(x(() => t.state.uiTheme)), l = h(n.theme ?? {}), { themeStyles: u } = kt({
3722
+ themeOverrides: l,
3723
+ resolvedTheme: c,
3724
+ extraStyles: e.themeExtraStyles
3725
+ }), d = vt({
3726
+ content: t.content,
3727
+ setContent: (e, n) => t.setContent(e, n),
3728
+ ...e.historyOptions
3729
+ });
3730
+ Ct(t, d);
3731
+ let f = yt({
3732
+ addBlock: t.addBlock,
3733
+ removeBlock: t.removeBlock,
3734
+ updateBlock: t.updateBlock,
3735
+ selectBlock: t.selectBlock,
3736
+ blockDefaults: n.blockDefaults
3737
+ }), p = xt(t), m = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? bt({
3738
+ content: t.content,
3739
+ isDirty: () => t.state.isDirty,
3740
+ ...e.autoSaveOptions
3741
+ }) : null, g = null;
3742
+ m && (g = s(d.isNavigating, (e) => {
3743
+ e ? m.pause() : m.resume();
3744
+ }));
3745
+ let _ = Et(t, {
3746
+ t: a,
3747
+ format: o
3748
+ }), v = Nt();
3749
+ if (Ft(v, Ao), n.customBlocks?.length) for (let e of n.customBlocks) v.registerCustom(e, Sn);
3750
+ function y(e) {
3751
+ for (let t of e) v.registerCustom(t, Sn);
3752
+ }
3753
+ function b(r) {
3754
+ Lt(r, {
3755
+ history: d,
3756
+ selectBlock: (e) => t.selectBlock(e),
3757
+ getSelectedBlockId: () => t.state.selectedBlockId,
3758
+ removeBlock: (e) => t.removeBlock(e),
3759
+ onSave: n.onSave,
3760
+ onBeforeUndo: e.keyboardOptions?.onBeforeUndo
3761
+ });
3762
+ }
3763
+ Le(document, "keydown", b), E(Be, r), E(Qe, t), E(Xe, d), E(Ge, f), E(Je, p), E(Ze, i), E(Ue, u), E(ze, c), E($e, n.blockDefaults), E(nt, v), E(Ye, n.customBlocks ?? []);
3764
+ let S = be(n.mergeTags?.syntax);
3765
+ E(it, n.mergeTags?.tags ?? []), E(Ke, S), E(He, n.mergeTags?.onRequest ?? null), E(ot, n.mergeTags?.autocomplete !== !1), E(at, n.onRequestMedia ?? null), E(et, n.displayConditions?.conditions ?? []), E(tt, n.displayConditions?.allowCustom ?? !1), E(qe, e.capabilities ?? {}), E(We, _);
3766
+ let C = n.accessibility?.disabled === !0 ? null : wt({
3767
+ content: t.content,
3768
+ options: n.accessibility ?? {},
3769
+ updateBlock: t.updateBlock,
3770
+ updateSettings: t.updateSettings
3771
+ });
3772
+ E(rt, C);
3773
+ function w() {
3774
+ g?.(), C?.destroy(), m?.destroy(), d.destroy();
3775
+ }
3776
+ return {
3777
+ t: a,
3778
+ format: o,
3779
+ history: d,
3780
+ blockActions: f,
3781
+ conditionPreview: p,
3782
+ autoSave: m,
3783
+ resolvedTheme: c,
3784
+ themeStyles: u,
3785
+ themeOverrides: l,
3786
+ registry: v,
3787
+ keyboardReorder: _,
3788
+ accessibilityLint: C,
3789
+ registerCustomBlocks: y,
3790
+ destroy: w
3791
+ };
3792
+ }
3793
+ //#endregion
3794
+ export { Gt as A, on as C, Zt as D, Qt as E, Tt as F, St as I, mt as L, Ut as M, Bt as N, Yt as O, Mt as P, sn as S, nn as T, kn as _, lo as a, pn as b, $a as c, cr as d, Yn as f, Bn as g, Wn as h, po as i, Wt as j, Jt as k, Ja as l, qn as m, ko as n, eo as o, Jn as p, yo as r, no as s, jo as t, ur as u, wn as v, an as w, dn as x, Sn as y };