@templatical/editor 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/dist/{AiChatSidebar-Cm5RM5Qh.js → AiChatSidebar-CXH7l1Ar.js} +13 -13
  2. package/dist/{AiFeatureMenu-D4D2Sqfk.js → AiFeatureMenu-BKbUUc1D.js} +10 -10
  3. package/dist/{BlockIssueBadge-BF4sdsr4.js → BlockIssueBadge-C-EPqWsh.js} +5 -5
  4. package/dist/{CloudEditor-CLwyq3kf.js → CloudEditor-F5YV5hE3.js} +166 -165
  5. package/dist/{CollaboratorBar-DjX-o5Pi.js → CollaboratorBar-ACUA7lBJ.js} +4 -4
  6. package/dist/{CommentsSidebar-BQJzyCc6.js → CommentsSidebar-CpRLN40c.js} +19 -19
  7. package/dist/{CountdownBlock-D_AsF4F3.js → CountdownBlock-C-6o19qS.js} +3 -3
  8. package/dist/{CountdownToolbar-BGTkFky9.js → CountdownToolbar-CDy9_2Yj.js} +3 -3
  9. package/dist/{DesignReferenceSidebar-O3epZMXD.js → DesignReferenceSidebar-0dTsBW08.js} +9 -9
  10. package/dist/{IssuesPanel-CPBbR8yp.js → IssuesPanel-I0z6k6-H.js} +11 -11
  11. package/dist/{LoadingTrack-e67FA0NP.js → LoadingTrack-C7mGWPHS.js} +1 -1
  12. package/dist/{ModuleBrowserModal-CVS4Sf7H.js → ModuleBrowserModal-Bz9hSjMS.js} +10 -10
  13. package/dist/{ModulePreviewCanvas-C10YXsL_.js → ModulePreviewCanvas-CpaumPMS.js} +23 -23
  14. package/dist/{NumberWithSuffix-eI9pPDWT.js → NumberWithSuffix-Cd7bz1Wk.js} +3 -3
  15. package/dist/{ParagraphEditor-BKoqcKIt.js → ParagraphEditor-BqRFV_Y-.js} +43 -43
  16. package/dist/{RichTextEditorContent-Dvn4woIt.js → RichTextEditorContent-Q5altsx1.js} +6 -6
  17. package/dist/{SaveModuleDialog-BMuIjxVn.js → SaveModuleDialog-DmfvH5D0.js} +7 -7
  18. package/dist/{SnapshotHistory-DZ5_W7e4.js → SnapshotHistory-C052o-8U.js} +13 -13
  19. package/dist/{TemplateScoringPanel-Bt5Rsgen.js → TemplateScoringPanel-CUs8XmIi.js} +24 -24
  20. package/dist/{TestEmailModal-EjpH-F-W.js → TestEmailModal-BIIxRWUt.js} +5 -5
  21. package/dist/{TitleEditor-Rv1deuV7.js → TitleEditor-FMh54Cx5.js} +18 -18
  22. package/dist/{TplModal-DSmCQIm4.js → TplModal-utMtXzSO.js} +4 -4
  23. package/dist/{blockTypeIcons-OhEkQhYj.js → blockTypeIcons-C6UGDmrC.js} +2 -2
  24. package/dist/bundle-stats.json +6 -6
  25. package/dist/cdn/chunks/{AiFeatureMenu-Dm9CL3u0.js → AiFeatureMenu-4NhCFeTh.js} +8 -8
  26. package/dist/cdn/chunks/{AiFeatureMenu-Dm9CL3u0.js.map → AiFeatureMenu-4NhCFeTh.js.map} +1 -1
  27. package/dist/cdn/chunks/{BlockIssueBadge-DjnFAeWq.js → BlockIssueBadge-BYKThwhE.js} +5 -5
  28. package/dist/cdn/chunks/{BlockIssueBadge-DjnFAeWq.js.map → BlockIssueBadge-BYKThwhE.js.map} +1 -1
  29. package/dist/cdn/chunks/{CloudEditor-XSmLmdgp.js → CloudEditor-OO8hWAVp.js} +177 -176
  30. package/dist/cdn/chunks/{CloudEditor-XSmLmdgp.js.map → CloudEditor-OO8hWAVp.js.map} +1 -1
  31. package/dist/cdn/chunks/{CollaboratorBar-BfoGJhns.js → CollaboratorBar-Dn5gXNDt.js} +4 -4
  32. package/dist/cdn/chunks/{CollaboratorBar-BfoGJhns.js.map → CollaboratorBar-Dn5gXNDt.js.map} +1 -1
  33. package/dist/cdn/chunks/{CountdownBlock-GRio55a1.js → CountdownBlock-hYoJdVOt.js} +3 -3
  34. package/dist/cdn/chunks/{CountdownBlock-GRio55a1.js.map → CountdownBlock-hYoJdVOt.js.map} +1 -1
  35. package/dist/cdn/chunks/{CountdownToolbar-Cd1oEopw.js → CountdownToolbar-BXjDFRHI.js} +4 -4
  36. package/dist/cdn/chunks/{CountdownToolbar-Cd1oEopw.js.map → CountdownToolbar-BXjDFRHI.js.map} +1 -1
  37. package/dist/cdn/chunks/{IssuesPanel-C-BiFQDQ.js → IssuesPanel-_5fEnivU.js} +10 -10
  38. package/dist/cdn/chunks/{IssuesPanel-C-BiFQDQ.js.map → IssuesPanel-_5fEnivU.js.map} +1 -1
  39. package/dist/cdn/chunks/{ModuleBrowserModal-Dj7gRT4Q.js → ModuleBrowserModal-DtCksAeW.js} +7 -7
  40. package/dist/cdn/chunks/{ModuleBrowserModal-Dj7gRT4Q.js.map → ModuleBrowserModal-DtCksAeW.js.map} +1 -1
  41. package/dist/cdn/chunks/{ModulePreviewCanvas-hwdveKb0.js → ModulePreviewCanvas-CCOvabZd.js} +31 -31
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-hwdveKb0.js.map → ModulePreviewCanvas-CCOvabZd.js.map} +1 -1
  43. package/dist/cdn/chunks/{NumberWithSuffix-bE_6cfiA.js → NumberWithSuffix-ZuJ2ePB0.js} +3 -3
  44. package/dist/cdn/chunks/{NumberWithSuffix-bE_6cfiA.js.map → NumberWithSuffix-ZuJ2ePB0.js.map} +1 -1
  45. package/dist/cdn/chunks/{ParagraphEditor-y1kGJRBX.js → ParagraphEditor-BnhnFOW1.js} +34 -34
  46. package/dist/cdn/chunks/{ParagraphEditor-y1kGJRBX.js.map → ParagraphEditor-BnhnFOW1.js.map} +1 -1
  47. package/dist/cdn/chunks/{RichTextEditorContent-DPy9D4hc.js → RichTextEditorContent-DV2yknp8.js} +3 -3
  48. package/dist/cdn/chunks/{RichTextEditorContent-DPy9D4hc.js.map → RichTextEditorContent-DV2yknp8.js.map} +1 -1
  49. package/dist/cdn/chunks/{SaveModuleDialog-CPu5e2VG.js → SaveModuleDialog-CCX5U7VA.js} +5 -5
  50. package/dist/cdn/chunks/{SaveModuleDialog-CPu5e2VG.js.map → SaveModuleDialog-CCX5U7VA.js.map} +1 -1
  51. package/dist/cdn/chunks/{TitleEditor-CMzzOPye.js → TitleEditor-CQqklX0D.js} +13 -13
  52. package/dist/cdn/chunks/{TitleEditor-CMzzOPye.js.map → TitleEditor-CQqklX0D.js.map} +1 -1
  53. package/dist/cdn/chunks/blockTypeIcons-CpGPHppB.js +22 -0
  54. package/dist/cdn/chunks/{blockTypeIcons-BC5qpvuV.js.map → blockTypeIcons-CpGPHppB.js.map} +1 -1
  55. package/dist/{de-DIAGP7yH.js → cdn/chunks/de-DpBN9H7-.js} +13 -1
  56. package/dist/cdn/chunks/de-DpBN9H7-.js.map +1 -0
  57. package/dist/cdn/chunks/{draggable-iAb7QVJo.js → draggable-Bci-fq8y.js} +473 -465
  58. package/dist/cdn/chunks/draggable-Bci-fq8y.js.map +1 -0
  59. package/dist/{en-nqIW8Q9W.js → cdn/chunks/en-BhHtdIiU.js} +13 -1
  60. package/dist/cdn/chunks/en-BhHtdIiU.js.map +1 -0
  61. package/dist/cdn/chunks/{extensions-DH7ESsaz.js → extensions-Ds9GnMcd.js} +4 -4
  62. package/dist/cdn/chunks/{extensions-DH7ESsaz.js.map → extensions-Ds9GnMcd.js.map} +1 -1
  63. package/dist/cdn/chunks/{features-DmUOSthI.js → features-DxWz_Enw.js} +1055 -1056
  64. package/dist/cdn/chunks/features-DxWz_Enw.js.map +1 -0
  65. package/dist/cdn/chunks/{icons-DguD4x_X.js → icons-BflGUmFY.js} +146 -146
  66. package/dist/cdn/chunks/icons-BflGUmFY.js.map +1 -0
  67. package/dist/cdn/chunks/{liquid.browser-DUDc3U21.js → liquid.browser-DKKBzRQu.js} +502 -497
  68. package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +1 -0
  69. package/dist/cdn/chunks/{media-library-ClQUPxRM.js → media-library-C479-QcE.js} +364 -364
  70. package/dist/cdn/chunks/{media-library-ClQUPxRM.js.map → media-library-C479-QcE.js.map} +1 -1
  71. package/dist/cdn/chunks/{pt-BR-DCNnLLx9.js → pt-BR-Bth5a93y.js} +12 -2
  72. package/dist/cdn/chunks/pt-BR-Bth5a93y.js.map +1 -0
  73. package/dist/cdn/chunks/{pusher-CHo5Cua0.js → pusher-BICWUP2j.js} +3 -3
  74. package/dist/cdn/chunks/{pusher-CHo5Cua0.js.map → pusher-BICWUP2j.js.map} +1 -1
  75. package/dist/cdn/chunks/{quality-CIw_7cXv.js → quality-BL_pEvFP.js} +20 -20
  76. package/dist/cdn/chunks/{quality-CIw_7cXv.js.map → quality-BL_pEvFP.js.map} +1 -1
  77. package/dist/cdn/chunks/readableTextColor-f8Kykfnh.js.map +1 -1
  78. package/dist/cdn/chunks/{renderer-Bx8I7_Rb.js → renderer-DwPomkBw.js} +42 -39
  79. package/dist/cdn/chunks/renderer-DwPomkBw.js.map +1 -0
  80. package/dist/cdn/chunks/{src-C-GlM149.js → src-DzvOWQ9S.js} +62 -62
  81. package/dist/cdn/chunks/{src-C-GlM149.js.map → src-DzvOWQ9S.js.map} +1 -1
  82. package/dist/cdn/chunks/{styles-CfqCvq0Z.js → styles-D45rgVq8.js} +712 -624
  83. package/dist/cdn/chunks/styles-D45rgVq8.js.map +1 -0
  84. package/dist/cdn/chunks/{tiptap-BAwu9VcJ.js → tiptap-CwScfbsM.js} +5 -4
  85. package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +1 -0
  86. package/dist/cdn/editor.css +1 -1
  87. package/dist/cdn/editor.js +105 -104
  88. package/dist/cdn/editor.js.map +1 -1
  89. package/dist/{check-BsNM6BDs.js → check-BRzXxFHr.js} +1 -1
  90. package/dist/{chevron-down-fcsZ5DU7.js → chevron-down-DmEgzmYT.js} +1 -1
  91. package/dist/{circle-alert-BZTbwc-B.js → circle-alert-BStvZr3O.js} +1 -1
  92. package/dist/{clock-B7iQRubC.js → clock-Blwp_1R6.js} +1 -1
  93. package/dist/{cloud-Dom4EH5Z.js → cloud-_olro76D.js} +6 -6
  94. package/dist/{createLucideIcon-C_fetdGM.js → createLucideIcon-CmPAC-gt.js} +3 -3
  95. package/dist/{cdn/chunks/de-DIAGP7yH.js → de-DpBN9H7-.js} +11 -3
  96. package/dist/{dist-ByBVNmRN.js → dist-412xXefB.js} +1 -1
  97. package/dist/{dist-XdF11ZkX.js → dist-BCQZZUE9.js} +1 -1
  98. package/dist/{dist-CD3wbUoR.js → dist-BNEdeWub.js} +1 -1
  99. package/dist/dist-BctFrpeA.js +472 -0
  100. package/dist/{dist-eVlXvuKI.js → dist-BlG7k25W.js} +1 -1
  101. package/dist/{dist-BLcYl_de.js → dist-BwgjpLfr.js} +1 -1
  102. package/dist/{dist-Dhs3W2WW.js → dist-Cz79qrLL.js} +1 -1
  103. package/dist/{dist-c2sj5PQ5.js → dist-D6x1cQeh.js} +3 -3
  104. package/dist/{dist-cT52Hh9L.js → dist-DJ9aD8yA.js} +3 -3
  105. package/dist/{dist-Cwl7XXr4.js → dist-DULfKmTh.js} +3 -3
  106. package/dist/{dist-Dem8ODLh.js → dist-DhKTdU52.js} +3 -2
  107. package/dist/{dist-BOHAk4zI.js → dist-b7Ak-CuM.js} +1 -1
  108. package/dist/{dist-B4NkMBYc.js → dist-o73iaGqy.js} +1 -1
  109. package/dist/{dist-BsB4nPJD.js → dist-u0iIJH3V.js} +1 -1
  110. package/dist/{cdn/chunks/en-nqIW8Q9W.js → en-BhHtdIiU.js} +11 -3
  111. package/dist/{extensions-B2lSGCA8.js → extensions-XPlNAKIL.js} +23 -23
  112. package/dist/formatRelativeTime-CtUU-QZ8.js +10 -0
  113. package/dist/{image-up-1xrPPJYH.js → image-up-BFPbw_Zq.js} +1 -1
  114. package/dist/index.d.ts +32 -0
  115. package/dist/{info-ByAFxArD.js → info-B_qLEBN2.js} +1 -1
  116. package/dist/{keys-DsRdOmg3.js → keys-mFiJ5N0_.js} +1 -1
  117. package/dist/{liquid.browser--qtl1Fqy.js → liquid.browser-CVjP5Mex.js} +501 -496
  118. package/dist/{list-checks-CKUP4UZU.js → list-checks-CGg7JxPm.js} +1 -1
  119. package/dist/{loader-circle-BuxX338d.js → loader-circle-CDF8eR_Q.js} +1 -1
  120. package/dist/{message-circle-nLwqegRi.js → message-circle-C3cHsCJl.js} +1 -1
  121. package/dist/{pt-BR-DCNnLLx9.js → pt-BR-Bth5a93y.js} +11 -1
  122. package/dist/{refresh-cw-DAkD6iDI.js → refresh-cw-Butml7Q4.js} +1 -1
  123. package/dist/{scan-line-DEELRJJ5.js → scan-line-XYEqim_E.js} +1 -1
  124. package/dist/{send-DCMgrNT4.js → send-k7npFJNO.js} +1 -1
  125. package/dist/{shield-check-BFtVr_ov.js → shield-check-CV6GbmCu.js} +1 -1
  126. package/dist/{sparkles-CeYIQ5RJ.js → sparkles-C965Xop4.js} +1 -1
  127. package/dist/style.css +1 -1
  128. package/dist/{styles-D_ztiOsh.js → styles-Dp4mJuCM.js} +817 -729
  129. package/dist/templatical-editor.js +117 -116
  130. package/dist/{text-align-start-BsmIoqLS.js → text-align-start-Bxnps8fH.js} +1 -1
  131. package/dist/{trash-2-C2S4-CIH.js → trash-2-DpGb7fIt.js} +1 -1
  132. package/dist/{triangle-alert-DMdedF6W.js → triangle-alert-BKYElAwz.js} +1 -1
  133. package/dist/{useAliveFlag-DlVvpZxc.js → useAliveFlag-BinvbqQR.js} +1 -1
  134. package/dist/{useCloudI18n-BEuiZdzs.js → useCloudI18n-L3H2XvdW.js} +2 -2
  135. package/dist/{useEditorCore-tZGAVvNz.js → useEditorCore-D7dQFRkw.js} +699 -769
  136. package/dist/{useI18n-DNspT6uw.js → useI18n-CTs_bP9d.js} +2 -2
  137. package/dist/{useMergeTag-abutjUud.js → useMergeTag-e3RSY-s3.js} +6 -6
  138. package/dist/usePopoverRoot-DVh7NY1q.js +8 -0
  139. package/dist/{vue.runtime.esm-bundler-mPytWZFh.js → vue.runtime.esm-bundler-B2k01iQh.js} +345 -337
  140. package/dist/{x-_9jw816B.js → x-CGjkjdKK.js} +1 -1
  141. package/package.json +11 -11
  142. package/dist/cdn/chunks/blockTypeIcons-BC5qpvuV.js +0 -22
  143. package/dist/cdn/chunks/de-DIAGP7yH.js.map +0 -1
  144. package/dist/cdn/chunks/draggable-iAb7QVJo.js.map +0 -1
  145. package/dist/cdn/chunks/en-nqIW8Q9W.js.map +0 -1
  146. package/dist/cdn/chunks/features-DmUOSthI.js.map +0 -1
  147. package/dist/cdn/chunks/icons-DguD4x_X.js.map +0 -1
  148. package/dist/cdn/chunks/liquid.browser-DUDc3U21.js.map +0 -1
  149. package/dist/cdn/chunks/pt-BR-DCNnLLx9.js.map +0 -1
  150. package/dist/cdn/chunks/renderer-Bx8I7_Rb.js.map +0 -1
  151. package/dist/cdn/chunks/styles-CfqCvq0Z.js.map +0 -1
  152. package/dist/cdn/chunks/tiptap-BAwu9VcJ.js.map +0 -1
  153. package/dist/dist-D6L_WdRL.js +0 -403
  154. package/dist/formatRelativeTime-CyDg5cDD.js +0 -12
  155. package/dist/usePopoverRoot-DG3mlvd1.js +0 -8
@@ -1,403 +0,0 @@
1
- //#region ../types/dist/index.js
2
- var e = {
3
- 1: 36,
4
- 2: 28,
5
- 3: 22,
6
- 4: 18
7
- };
8
- function t(e) {
9
- return e.type === "custom";
10
- }
11
- var n = {
12
- content: "<p>Enter your title</p>",
13
- level: 2,
14
- color: "#1a1a1a",
15
- textAlign: "left"
16
- }, r = { content: "<p>Enter your text here</p>" }, i = {
17
- src: "",
18
- alt: "",
19
- width: "full",
20
- align: "center"
21
- }, a = {
22
- text: "Click Here",
23
- url: "",
24
- backgroundColor: "#333333",
25
- textColor: "#ffffff",
26
- borderRadius: 6,
27
- fontSize: 15,
28
- buttonPadding: {
29
- top: 12,
30
- right: 24,
31
- bottom: 12,
32
- left: 24
33
- }
34
- }, o = {
35
- lineStyle: "solid",
36
- color: "#e0e0e0",
37
- thickness: 1,
38
- width: "full"
39
- }, s = { columns: "1" }, c = {
40
- url: "",
41
- thumbnailUrl: "",
42
- alt: "Video",
43
- width: "full",
44
- align: "center"
45
- }, l = {
46
- iconStyle: "solid",
47
- iconSize: "medium",
48
- spacing: 10,
49
- align: "center"
50
- }, u = { height: 24 }, d = { content: "" }, f = {
51
- fontSize: 15,
52
- color: "#1a1a1a",
53
- textAlign: "center",
54
- separator: "|",
55
- separatorColor: "#e0e0e0",
56
- spacing: 10
57
- }, p = {
58
- hasHeaderRow: !0,
59
- borderColor: "#e0e0e0",
60
- borderWidth: 1,
61
- cellPadding: 8,
62
- fontSize: 15,
63
- color: "#1a1a1a",
64
- textAlign: "left"
65
- }, m = {
66
- targetDate: "",
67
- timezone: "UTC",
68
- showDays: !0,
69
- showHours: !0,
70
- showMinutes: !0,
71
- showSeconds: !0,
72
- separator: ":",
73
- digitFontSize: 32,
74
- digitColor: "#1a1a1a",
75
- labelColor: "#6b7280",
76
- labelFontSize: 12,
77
- backgroundColor: "#ffffff",
78
- labelDays: "Days",
79
- labelHours: "Hours",
80
- labelMinutes: "Minutes",
81
- labelSeconds: "Seconds",
82
- expiredMessage: "This offer has expired",
83
- expiredImageUrl: "",
84
- hideOnExpiry: !1
85
- }, h = {
86
- width: 600,
87
- backgroundColor: "#ffffff",
88
- fontFamily: "Arial",
89
- locale: "en"
90
- };
91
- function g(e) {
92
- return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
93
- }
94
- function _(e, t) {
95
- let n = { ...e };
96
- for (let r of Object.keys(t)) {
97
- let i = e[r], a = t[r];
98
- a !== void 0 && (g(i) && g(a) ? n[r] = _(i, a) : n[r] = a);
99
- }
100
- return n;
101
- }
102
- function ee(e = "Arial", t) {
103
- return {
104
- blocks: [],
105
- settings: {
106
- ...h,
107
- fontFamily: e,
108
- ...t
109
- }
110
- };
111
- }
112
- function v(e, t) {
113
- return !t || Object.keys(t).length === 0 ? e : _(e, t);
114
- }
115
- function y() {
116
- return crypto.randomUUID();
117
- }
118
- function b(e = 0) {
119
- return {
120
- top: e,
121
- right: e,
122
- bottom: e,
123
- left: e
124
- };
125
- }
126
- function x(e = 10) {
127
- return { padding: b(e) };
128
- }
129
- function S(e = {}) {
130
- return v({
131
- id: y(),
132
- type: "title",
133
- ...n,
134
- styles: x()
135
- }, e);
136
- }
137
- function C(e = {}) {
138
- return v({
139
- id: y(),
140
- type: "paragraph",
141
- ...r,
142
- styles: x()
143
- }, e);
144
- }
145
- function w(e = {}) {
146
- return v({
147
- id: y(),
148
- type: "image",
149
- ...i,
150
- styles: x()
151
- }, e);
152
- }
153
- function T(e = {}) {
154
- return v({
155
- id: y(),
156
- type: "button",
157
- ...a,
158
- styles: x()
159
- }, e);
160
- }
161
- function E(e = {}) {
162
- return v({
163
- id: y(),
164
- type: "divider",
165
- ...o,
166
- styles: x(20)
167
- }, e);
168
- }
169
- function D(e = {}) {
170
- return v({
171
- id: y(),
172
- type: "section",
173
- ...s,
174
- children: [[]],
175
- styles: x(20)
176
- }, e);
177
- }
178
- function O(e = {}) {
179
- return v({
180
- id: y(),
181
- type: "video",
182
- ...c,
183
- styles: x()
184
- }, e);
185
- }
186
- function k(e = {}) {
187
- return v({
188
- id: y(),
189
- type: "social",
190
- icons: [],
191
- ...l,
192
- styles: x()
193
- }, e);
194
- }
195
- function A(e = {}) {
196
- return v({
197
- id: y(),
198
- type: "spacer",
199
- ...u,
200
- styles: x(0)
201
- }, e);
202
- }
203
- function j(e = {}) {
204
- return v({
205
- id: y(),
206
- type: "html",
207
- ...d,
208
- styles: x()
209
- }, e);
210
- }
211
- function M(e = {}) {
212
- return v({
213
- id: y(),
214
- type: "menu",
215
- items: [],
216
- ...f,
217
- styles: x()
218
- }, e);
219
- }
220
- function N(e, t) {
221
- return Array.from({ length: t }, () => ({
222
- id: y(),
223
- cells: Array.from({ length: e }, () => ({
224
- id: y(),
225
- content: ""
226
- }))
227
- }));
228
- }
229
- function P(e = {}) {
230
- return v({
231
- id: y(),
232
- type: "table",
233
- rows: N(3, 3),
234
- ...p,
235
- styles: x()
236
- }, e);
237
- }
238
- function F(e = {}) {
239
- return v({
240
- id: y(),
241
- type: "countdown",
242
- ...m,
243
- styles: x()
244
- }, e);
245
- }
246
- function I(e) {
247
- return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
248
- }
249
- function L(e) {
250
- let t = {};
251
- for (let n of e.fields) t[n.key] = I(n);
252
- let n = v(x(), e.defaultStyles);
253
- return {
254
- id: y(),
255
- type: "custom",
256
- customType: e.type,
257
- fieldValues: t,
258
- styles: n,
259
- ...e.dataSource ? { dataSourceFetched: !1 } : {}
260
- };
261
- }
262
- function R(e, t) {
263
- switch (e) {
264
- case "section": return D(t?.section);
265
- case "title": return S(t?.title);
266
- case "paragraph": return C(t?.paragraph);
267
- case "image": return w(t?.image);
268
- case "button": return T(t?.button);
269
- case "divider": return E(t?.divider);
270
- case "video": return O(t?.video);
271
- case "social": return k(t?.social);
272
- case "spacer": return A(t?.spacer);
273
- case "html": return j(t?.html);
274
- case "menu": return M(t?.menu);
275
- case "table": return P(t?.table);
276
- case "countdown": return F(t?.countdown);
277
- default: throw Error(`Unknown block type: ${e}`);
278
- }
279
- }
280
- function z(e) {
281
- let t = JSON.parse(JSON.stringify(e));
282
- return t.id = y(), t.type === "section" && (t.children = t.children.map((e) => e.map((e) => z(e)))), t;
283
- }
284
- function B(e) {
285
- let t = /* @__PURE__ */ new WeakSet();
286
- return JSON.parse(JSON.stringify(e, (e, n) => {
287
- if (typeof n == "object" && n) {
288
- if (t.has(n)) return;
289
- t.add(n);
290
- }
291
- return n;
292
- }));
293
- }
294
- var V = {
295
- liquid: {
296
- value: /\{\{.+?\}\}/g,
297
- logic: /\{%-?\s*(\w+).*?-?%\}/g
298
- },
299
- handlebars: {
300
- value: /\{\{\{?.+?\}?\}\}/g,
301
- logic: /\{\{[#/](\w+).*?\}\}/g
302
- },
303
- mailchimp: {
304
- value: /\*\|\w+\|\*/g,
305
- logic: /\*\|(\w+)[:|].*?\|\*/g
306
- },
307
- ampscript: {
308
- value: /%%=.+?=%%/g,
309
- logic: /%%\[\s*(\w+).*?\]%%/g
310
- }
311
- }, H = {
312
- liquid: "{{",
313
- handlebars: "{{",
314
- mailchimp: "*|",
315
- ampscript: "%%="
316
- };
317
- function U(e) {
318
- for (let t of Object.keys(V)) if (V[t].value.source === e.value.source) return H[t];
319
- return null;
320
- }
321
- function W(e) {
322
- return e ? typeof e == "string" ? V[e] ?? V.liquid : e : V.liquid;
323
- }
324
- function G(e) {
325
- let t = e.source, n = e.flags.replace("g", "");
326
- return RegExp(`^${t}$`, n);
327
- }
328
- function K(e, t) {
329
- let n = e?.trim() || "";
330
- return G(t.logic).test(n) ? !1 : G(t.value).test(n);
331
- }
332
- function q(e, t) {
333
- let n = t.find((t) => t.value === e);
334
- return n ? n.label : e;
335
- }
336
- function J(e, t) {
337
- return $(e, "data-merge-tag", (e) => q(e, t));
338
- }
339
- function Y(e, t) {
340
- if (!e) return !1;
341
- let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
342
- return n.test(e) || r.test(e);
343
- }
344
- function X(e, t) {
345
- return G(t.logic).test(e?.trim() || "");
346
- }
347
- function Z(e, t) {
348
- let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
349
- return r && r[1] ? r[1].toUpperCase() : e;
350
- }
351
- function Q(e, t) {
352
- return $(e, "data-logic-merge-tag", (e) => Z(e, t));
353
- }
354
- function $(e, t, n) {
355
- let r = RegExp(`(?:^|\\s)${t}="([^"<>]*)"`), i = "", a = 0;
356
- for (; a < e.length;) {
357
- let t = e.indexOf("<span", a);
358
- if (t === -1) {
359
- i += e.substring(a);
360
- break;
361
- }
362
- let o = e[t + 5];
363
- if (o !== ">" && o !== " " && o !== " " && o !== "\n" && o !== "\r" && o !== "/") {
364
- i += e.substring(a, t + 5), a = t + 5;
365
- continue;
366
- }
367
- let s = e.indexOf(">", t + 5);
368
- if (s === -1) {
369
- i += e.substring(a);
370
- break;
371
- }
372
- let c = e.indexOf("</span>", s + 1);
373
- if (c === -1) {
374
- i += e.substring(a);
375
- break;
376
- }
377
- let l = e.substring(t + 5, s), u = r.exec(l);
378
- if (!u) {
379
- i += e.substring(a, t + 5), a = t + 5;
380
- continue;
381
- }
382
- let d = u[1], f = n(d);
383
- i += e.substring(a, s + 1), i += f, i += "</span>", a = c + 7;
384
- }
385
- return i;
386
- }
387
- var te = class extends Error {
388
- statusCode;
389
- constructor(e, t) {
390
- super(e), this.statusCode = t, this.name = "SdkError";
391
- }
392
- get isNotFound() {
393
- return this.statusCode === 404;
394
- }
395
- get isUnauthorized() {
396
- return this.statusCode === 401;
397
- }
398
- get isServerError() {
399
- return this.statusCode !== void 0 && this.statusCode >= 500;
400
- }
401
- };
402
- //#endregion
403
- export { J as A, Z as C, X as D, t as E, B as M, K as O, y as S, U as T, k as _, Y as a, S as b, F as c, E as d, j as f, D as g, C as h, z as i, W as j, Q as k, L as l, M as m, V as n, R as o, w as p, te as r, T as s, e as t, ee as u, A as v, q as w, O as x, P as y };
@@ -1,12 +0,0 @@
1
- //#region src/utils/formatRelativeTime.ts
2
- var e = 6e4, t = 36e5, n = 864e5;
3
- function r(r, i, a, o) {
4
- let s = new Date(r).getTime();
5
- if (Number.isNaN(s)) return null;
6
- let c = Date.now() - s;
7
- if (c < -6e4) return null;
8
- let l = Math.floor(c / e), u = Math.floor(c / t), d = Math.floor(c / n);
9
- return l < 1 ? i.justNow : l < 60 ? a ? a(i.minutesAgo, { minutes: l }) : i.minutesAgo.replace("{minutes}", String(l)) : u < 24 ? a ? a(i.hoursAgo, { hours: u }) : i.hoursAgo.replace("{hours}", String(u)) : o !== void 0 && d >= o ? null : a ? a(i.daysAgo, { days: d }) : i.daysAgo.replace("{days}", String(d));
10
- }
11
- //#endregion
12
- export { r as t };
@@ -1,8 +0,0 @@
1
- import { X as e, w as t } from "./vue.runtime.esm-bundler-mPytWZFh.js";
2
- import { E as n } from "./keys-DsRdOmg3.js";
3
- //#region src/composables/usePopoverRoot.ts
4
- function r() {
5
- return t(n, e(null));
6
- }
7
- //#endregion
8
- export { r as t };