@templatical/editor 0.26.0 → 0.26.2

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 (83) hide show
  1. package/dist/{AiChatSidebar-c-3yyjN1.js → AiChatSidebar-CMBz6Wix.js} +1 -1
  2. package/dist/{AiFeatureMenu-B-COyG7k.js → AiFeatureMenu-BY6mubnR.js} +1 -1
  3. package/dist/{BlockPreviewCanvas-CJPHGI93.js → BlockPreviewCanvas-DbNOqSI1.js} +1 -1
  4. package/dist/{CloudEditor-BdSQ8hfv.js → CloudEditor-DEnMNMbm.js} +8 -8
  5. package/dist/{CollaboratorBar-mGoi6yye.js → CollaboratorBar-zvfvE7f-.js} +1 -1
  6. package/dist/{DesignReferenceSidebar-CgYkySre.js → DesignReferenceSidebar-Bx96XFmK.js} +1 -1
  7. package/dist/{MergeTagModeToggle-hAJgIKhw.js → MergeTagModeToggle-P-UguQHc.js} +1 -1
  8. package/dist/{ParagraphEditor-DBG63S70.js → ParagraphEditor-CLvv5Ija.js} +2 -2
  9. package/dist/{SaveBlockDialog-Dq9UVihi.js → SaveBlockDialog-fVp_PwZi.js} +3 -3
  10. package/dist/{SavedBlocksBrowserModal-CtFG4zeV.js → SavedBlocksBrowserModal-KWlaiLlr.js} +4 -4
  11. package/dist/{SavedBlocksPanels-DNVdso_W.js → SavedBlocksPanels-CQsZvWO_.js} +1 -1
  12. package/dist/{SavedBlocksPickBar-Cv4dIpP-.js → SavedBlocksPickBar-C3h8oL3r.js} +1 -1
  13. package/dist/{SnapshotHistory-DsOtMHOV.js → SnapshotHistory-DjA3Ej_i.js} +1 -1
  14. package/dist/{TestEmailModal-CIwqtGfr.js → TestEmailModal-EM0RP_9L.js} +5 -5
  15. package/dist/{TestEmailPanel-l6LDmBGM.js → TestEmailPanel-B6goIAxT.js} +1 -1
  16. package/dist/{TitleEditor-imoBUynh.js → TitleEditor-JEaP9jVF.js} +2 -2
  17. package/dist/{TplModal-DDDHcoir.js → TplModal-DoneXIj_.js} +1 -1
  18. package/dist/{blockTypeIcons-CfLN4A6t.js → blockTypeIcons-2_85L_CL.js} +1 -1
  19. package/dist/bundle-stats.json +6 -6
  20. package/dist/cdn/chunks/{AiChatSidebar-BHqNxNcX.js → AiChatSidebar-CQ8KUmNB.js} +2 -2
  21. package/dist/cdn/chunks/{AiChatSidebar-BHqNxNcX.js.map → AiChatSidebar-CQ8KUmNB.js.map} +1 -1
  22. package/dist/cdn/chunks/{AiFeatureMenu-D2AIDwEG.js → AiFeatureMenu-Cwj8afsi.js} +2 -2
  23. package/dist/cdn/chunks/{AiFeatureMenu-D2AIDwEG.js.map → AiFeatureMenu-Cwj8afsi.js.map} +1 -1
  24. package/dist/cdn/chunks/{BlockPreviewCanvas-DH5ULGkw.js → BlockPreviewCanvas-DPtiMsVz.js} +2 -2
  25. package/dist/cdn/chunks/{BlockPreviewCanvas-DH5ULGkw.js.map → BlockPreviewCanvas-DPtiMsVz.js.map} +1 -1
  26. package/dist/cdn/chunks/{CloudEditor-C0nB1JfD.js → CloudEditor-CQ830jJt.js} +11 -11
  27. package/dist/cdn/chunks/{CloudEditor-C0nB1JfD.js.map → CloudEditor-CQ830jJt.js.map} +1 -1
  28. package/dist/cdn/chunks/{CollaboratorBar-f6Ni7KNH.js → CollaboratorBar-BF469_AN.js} +2 -2
  29. package/dist/cdn/chunks/{CollaboratorBar-f6Ni7KNH.js.map → CollaboratorBar-BF469_AN.js.map} +1 -1
  30. package/dist/cdn/chunks/{DesignReferenceSidebar-DBoEBKxQ.js → DesignReferenceSidebar-B-HFXV0W.js} +2 -2
  31. package/dist/cdn/chunks/{DesignReferenceSidebar-DBoEBKxQ.js.map → DesignReferenceSidebar-B-HFXV0W.js.map} +1 -1
  32. package/dist/cdn/chunks/{MergeTagModeToggle-D8iKvz7v.js → MergeTagModeToggle-DQ79SqQc.js} +2 -2
  33. package/dist/cdn/chunks/{MergeTagModeToggle-D8iKvz7v.js.map → MergeTagModeToggle-DQ79SqQc.js.map} +1 -1
  34. package/dist/cdn/chunks/{ParagraphEditor-Cuc83Blj.js → ParagraphEditor-Bzcma_Lm.js} +3 -3
  35. package/dist/cdn/chunks/{ParagraphEditor-Cuc83Blj.js.map → ParagraphEditor-Bzcma_Lm.js.map} +1 -1
  36. package/dist/cdn/chunks/{SaveBlockDialog-B8KHhVkI.js → SaveBlockDialog-BfNVeXXV.js} +4 -4
  37. package/dist/cdn/chunks/{SaveBlockDialog-B8KHhVkI.js.map → SaveBlockDialog-BfNVeXXV.js.map} +1 -1
  38. package/dist/cdn/chunks/{SavedBlocksBrowserModal-B-sjsIJv.js → SavedBlocksBrowserModal-C59D4G5C.js} +4 -4
  39. package/dist/cdn/chunks/{SavedBlocksBrowserModal-B-sjsIJv.js.map → SavedBlocksBrowserModal-C59D4G5C.js.map} +1 -1
  40. package/dist/cdn/chunks/{SavedBlocksPanels-Bb-eDMAh.js → SavedBlocksPanels-e4HyTZ8v.js} +2 -2
  41. package/dist/cdn/chunks/{SavedBlocksPanels-Bb-eDMAh.js.map → SavedBlocksPanels-e4HyTZ8v.js.map} +1 -1
  42. package/dist/cdn/chunks/{SavedBlocksPickBar-GudFfXa4.js → SavedBlocksPickBar-DMHxPCM4.js} +2 -2
  43. package/dist/cdn/chunks/{SavedBlocksPickBar-GudFfXa4.js.map → SavedBlocksPickBar-DMHxPCM4.js.map} +1 -1
  44. package/dist/cdn/chunks/{SnapshotHistory-Srpzt2na.js → SnapshotHistory-80tAU_VX.js} +2 -2
  45. package/dist/cdn/chunks/{SnapshotHistory-Srpzt2na.js.map → SnapshotHistory-80tAU_VX.js.map} +1 -1
  46. package/dist/cdn/chunks/{TestEmailModal-DLeoJqaJ.js → TestEmailModal-DdWfAGNe.js} +6 -6
  47. package/dist/cdn/chunks/{TestEmailModal-DLeoJqaJ.js.map → TestEmailModal-DdWfAGNe.js.map} +1 -1
  48. package/dist/cdn/chunks/{TestEmailPanel-Dr7Dkq2P.js → TestEmailPanel-CZAG1gQE.js} +2 -2
  49. package/dist/cdn/chunks/{TestEmailPanel-Dr7Dkq2P.js.map → TestEmailPanel-CZAG1gQE.js.map} +1 -1
  50. package/dist/cdn/chunks/{TitleEditor-DzYRr18C.js → TitleEditor-D0_LY2Ex.js} +3 -3
  51. package/dist/cdn/chunks/{TitleEditor-DzYRr18C.js.map → TitleEditor-D0_LY2Ex.js.map} +1 -1
  52. package/dist/cdn/chunks/{TplModal-byw7-3wg.js → TplModal-iCmoKB2k.js} +2 -2
  53. package/dist/cdn/chunks/{TplModal-byw7-3wg.js.map → TplModal-iCmoKB2k.js.map} +1 -1
  54. package/dist/cdn/chunks/{cloud-CuItCnN_.js → cloud-DcC8bPwn.js} +2 -2
  55. package/dist/cdn/chunks/{cloud-CuItCnN_.js.map → cloud-DcC8bPwn.js.map} +1 -1
  56. package/dist/cdn/chunks/{extensions-B7laxHjs.js → extensions-C7h52yuk.js} +7 -3
  57. package/dist/cdn/chunks/extensions-C7h52yuk.js.map +1 -0
  58. package/dist/cdn/chunks/{src-EKTTBQ0y.js → src-B_QJduQD.js} +237 -166
  59. package/dist/cdn/chunks/src-B_QJduQD.js.map +1 -0
  60. package/dist/cdn/chunks/{src-BYKYmEOD.js → src-CUKUsRzX.js} +120 -121
  61. package/dist/cdn/chunks/src-CUKUsRzX.js.map +1 -0
  62. package/dist/cdn/chunks/{src-Bi-Qhtfs.js → src-Cx70q30o.js} +79 -79
  63. package/dist/cdn/chunks/{src-Bi-Qhtfs.js.map → src-Cx70q30o.js.map} +1 -1
  64. package/dist/cdn/chunks/{src-C0N74uvF.js → src-xkGep9eN.js} +2 -2
  65. package/dist/cdn/chunks/{src-C0N74uvF.js.map → src-xkGep9eN.js.map} +1 -1
  66. package/dist/cdn/chunks/{styles-C7s-VtJi.js → styles-CND3ey2g.js} +452 -452
  67. package/dist/cdn/chunks/{styles-C7s-VtJi.js.map → styles-CND3ey2g.js.map} +1 -1
  68. package/dist/cdn/chunks/{useEditorCore-C_nUXiph.js → useEditorCore-CKQ9gmoo.js} +36 -36
  69. package/dist/cdn/chunks/{useEditorCore-C_nUXiph.js.map → useEditorCore-CKQ9gmoo.js.map} +1 -1
  70. package/dist/cdn/chunks/{useMergeTag-CPa_9VOq.js → useMergeTag-JmXOtpln.js} +2 -2
  71. package/dist/cdn/chunks/{useMergeTag-CPa_9VOq.js.map → useMergeTag-JmXOtpln.js.map} +1 -1
  72. package/dist/cdn/editor.js +7 -7
  73. package/dist/{cloud-C7-FhzMc.js → cloud-qINCmQbn.js} +1 -1
  74. package/dist/{dist-D5zCZFdU.js → dist-B1kLn1rs.js} +120 -51
  75. package/dist/{extensions-CxwhoG8v.js → extensions-DzKNPITR.js} +6 -2
  76. package/dist/{styles-C_slTGwp.js → styles-BK36D1sy.js} +6 -6
  77. package/dist/templatical-editor.js +7 -7
  78. package/dist/{useEditorCore-r4gWzCBA.js → useEditorCore-idmPLUeb.js} +4 -4
  79. package/dist/{useMergeTag-C-_WxrgL.js → useMergeTag-CYZk7dZD.js} +1 -1
  80. package/package.json +8 -8
  81. package/dist/cdn/chunks/extensions-B7laxHjs.js.map +0 -1
  82. package/dist/cdn/chunks/src-BYKYmEOD.js.map +0 -1
  83. package/dist/cdn/chunks/src-EKTTBQ0y.js.map +0 -1
@@ -106,27 +106,27 @@ function u(e) {
106
106
  function d(e) {
107
107
  return e.type === "html";
108
108
  }
109
- function f(e) {
109
+ function ee(e) {
110
110
  return e.type === "menu";
111
111
  }
112
- function p(e) {
112
+ function te(e) {
113
113
  return e.type === "table";
114
114
  }
115
- function ee(e) {
115
+ function ne(e) {
116
116
  return e.type === "custom";
117
117
  }
118
118
  //#endregion
119
119
  //#region ../types/src/defaults.ts
120
- var m = {
120
+ var f = {
121
121
  content: "<p>Enter your title</p>",
122
122
  level: 2,
123
123
  textAlign: "left"
124
- }, h = { content: "<p>Enter your text here</p>" }, g = {
124
+ }, p = { content: "<p>Enter your text here</p>" }, m = {
125
125
  src: "",
126
126
  alt: "",
127
127
  width: "full",
128
128
  align: "center"
129
- }, _ = {
129
+ }, h = {
130
130
  text: "Click Here",
131
131
  url: "",
132
132
  backgroundColor: "#333333",
@@ -140,36 +140,36 @@ var m = {
140
140
  left: 24
141
141
  },
142
142
  align: "center"
143
- }, v = {
143
+ }, g = {
144
144
  lineStyle: "solid",
145
145
  color: "#e0e0e0",
146
146
  thickness: 1,
147
147
  width: "full"
148
- }, y = { columns: "1" }, b = {
148
+ }, _ = { columns: "1" }, re = {
149
149
  url: "",
150
150
  thumbnailUrl: "",
151
151
  alt: "Video",
152
152
  width: "full",
153
153
  align: "center"
154
- }, x = {
154
+ }, v = {
155
155
  iconStyle: "solid",
156
156
  iconSize: "medium",
157
157
  spacing: 10,
158
158
  align: "center"
159
- }, S = { height: 24 }, C = { content: "" }, w = {
159
+ }, y = { height: 24 }, b = { content: "" }, x = {
160
160
  fontSize: 15,
161
161
  textAlign: "center",
162
162
  separator: "|",
163
163
  separatorColor: "#e0e0e0",
164
164
  spacing: 10
165
- }, T = {
165
+ }, S = {
166
166
  hasHeaderRow: !0,
167
167
  borderColor: "#e0e0e0",
168
168
  borderWidth: 1,
169
169
  cellPadding: 8,
170
170
  fontSize: 15,
171
171
  textAlign: "left"
172
- }, E = {
172
+ }, C = {
173
173
  targetDate: "",
174
174
  timezone: "UTC",
175
175
  showDays: !0,
@@ -189,21 +189,21 @@ var m = {
189
189
  expiredMessage: "This offer has expired",
190
190
  expiredImageUrl: "",
191
191
  hideOnExpiry: !1
192
- }, te = {
193
- title: m,
194
- paragraph: h,
195
- image: g,
196
- button: _,
197
- divider: v,
198
- section: y,
199
- video: b,
200
- social: x,
201
- spacer: S,
202
- html: C,
203
- menu: w,
204
- table: T,
205
- countdown: E
206
- }, D = {
192
+ }, ie = {
193
+ title: f,
194
+ paragraph: p,
195
+ image: m,
196
+ button: h,
197
+ divider: g,
198
+ section: _,
199
+ video: re,
200
+ social: v,
201
+ spacer: y,
202
+ html: b,
203
+ menu: x,
204
+ table: S,
205
+ countdown: C
206
+ }, w = {
207
207
  width: 600,
208
208
  backgroundColor: "#ffffff",
209
209
  textColor: "#1a1a1a",
@@ -211,24 +211,24 @@ var m = {
211
211
  fontFamily: "Arial",
212
212
  locale: "en"
213
213
  };
214
- function O(e) {
214
+ function T(e) {
215
215
  return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
216
216
  }
217
- function k(e, t) {
217
+ function E(e, t) {
218
218
  let n = { ...e };
219
219
  for (let r of Object.keys(t)) {
220
220
  let i = e[r], a = t[r];
221
- a !== void 0 && (n[r] = O(i) && O(a) ? k(i, a) : a);
221
+ a !== void 0 && (n[r] = T(i) && T(a) ? E(i, a) : a);
222
222
  }
223
223
  return n;
224
224
  }
225
225
  //#endregion
226
226
  //#region ../types/src/template.ts
227
- function ne(e = "Arial", t) {
227
+ function ae(e = "Arial", t) {
228
228
  return {
229
229
  blocks: [],
230
230
  settings: {
231
- ...D,
231
+ ...w,
232
232
  fontFamily: e,
233
233
  ...t
234
234
  }
@@ -236,13 +236,13 @@ function ne(e = "Arial", t) {
236
236
  }
237
237
  //#endregion
238
238
  //#region ../types/src/factory.ts
239
- function A(e, t) {
240
- return !t || Object.keys(t).length === 0 ? e : k(e, t);
239
+ function D(e, t) {
240
+ return !t || Object.keys(t).length === 0 ? e : E(e, t);
241
241
  }
242
- function j() {
242
+ function O() {
243
243
  return crypto.randomUUID();
244
244
  }
245
- function re(e = 0) {
245
+ function oe(e = 0) {
246
246
  return {
247
247
  top: e,
248
248
  right: e,
@@ -250,135 +250,135 @@ function re(e = 0) {
250
250
  left: e
251
251
  };
252
252
  }
253
- function M(e = 10) {
254
- return { padding: re(e) };
253
+ function k(e = 10) {
254
+ return { padding: oe(e) };
255
255
  }
256
- function N(e = {}) {
257
- return A({
258
- id: j(),
256
+ function A(e = {}) {
257
+ return D({
258
+ id: O(),
259
259
  type: "title",
260
- ...m,
261
- styles: M()
260
+ ...f,
261
+ styles: k()
262
262
  }, e);
263
263
  }
264
- function P(e = {}) {
265
- return A({
266
- id: j(),
264
+ function j(e = {}) {
265
+ return D({
266
+ id: O(),
267
267
  type: "paragraph",
268
- ...h,
269
- styles: M()
268
+ ...p,
269
+ styles: k()
270
270
  }, e);
271
271
  }
272
- function F(e = {}) {
273
- return A({
274
- id: j(),
272
+ function M(e = {}) {
273
+ return D({
274
+ id: O(),
275
275
  type: "image",
276
- ...g,
277
- styles: M()
276
+ ...m,
277
+ styles: k()
278
278
  }, e);
279
279
  }
280
- function I(e = {}) {
281
- return A({
282
- id: j(),
280
+ function N(e = {}) {
281
+ return D({
282
+ id: O(),
283
283
  type: "button",
284
- ..._,
285
- styles: M()
284
+ ...h,
285
+ styles: k()
286
286
  }, e);
287
287
  }
288
- function L(e = {}) {
289
- return A({
290
- id: j(),
288
+ function P(e = {}) {
289
+ return D({
290
+ id: O(),
291
291
  type: "divider",
292
- ...v,
293
- styles: M(20)
292
+ ...g,
293
+ styles: k(20)
294
294
  }, e);
295
295
  }
296
- function R(e = {}) {
297
- return A({
298
- id: j(),
296
+ function F(e = {}) {
297
+ return D({
298
+ id: O(),
299
299
  type: "section",
300
- ...y,
300
+ ..._,
301
301
  children: [[]],
302
- styles: M(20)
302
+ styles: k(20)
303
303
  }, e);
304
304
  }
305
- function z(e = {}) {
306
- return A({
307
- id: j(),
305
+ function I(e = {}) {
306
+ return D({
307
+ id: O(),
308
308
  type: "video",
309
- ...b,
310
- styles: M()
309
+ ...re,
310
+ styles: k()
311
311
  }, e);
312
312
  }
313
- function B(e = {}) {
314
- return A({
315
- id: j(),
313
+ function L(e = {}) {
314
+ return D({
315
+ id: O(),
316
316
  type: "social",
317
317
  icons: [],
318
- ...x,
319
- styles: M()
318
+ ...v,
319
+ styles: k()
320
320
  }, e);
321
321
  }
322
- function V(e = {}) {
323
- return A({
324
- id: j(),
322
+ function R(e = {}) {
323
+ return D({
324
+ id: O(),
325
325
  type: "spacer",
326
- ...S,
327
- styles: M(0)
326
+ ...y,
327
+ styles: k(0)
328
328
  }, e);
329
329
  }
330
- function H(e = {}) {
331
- return A({
332
- id: j(),
330
+ function z(e = {}) {
331
+ return D({
332
+ id: O(),
333
333
  type: "html",
334
- ...C,
335
- styles: M()
334
+ ...b,
335
+ styles: k()
336
336
  }, e);
337
337
  }
338
- function U(e = {}) {
339
- return A({
340
- id: j(),
338
+ function B(e = {}) {
339
+ return D({
340
+ id: O(),
341
341
  type: "menu",
342
342
  items: [],
343
- ...w,
344
- styles: M()
343
+ ...x,
344
+ styles: k()
345
345
  }, e);
346
346
  }
347
- function ie(e, t) {
347
+ function se(e, t) {
348
348
  return Array.from({ length: t }, () => ({
349
- id: j(),
349
+ id: O(),
350
350
  cells: Array.from({ length: e }, () => ({
351
- id: j(),
351
+ id: O(),
352
352
  content: ""
353
353
  }))
354
354
  }));
355
355
  }
356
- function W(e = {}) {
357
- return A({
358
- id: j(),
356
+ function V(e = {}) {
357
+ return D({
358
+ id: O(),
359
359
  type: "table",
360
- rows: ie(3, 3),
361
- ...T,
362
- styles: M()
360
+ rows: se(3, 3),
361
+ ...S,
362
+ styles: k()
363
363
  }, e);
364
364
  }
365
- function G(e = {}) {
366
- return A({
367
- id: j(),
365
+ function ce(e = {}) {
366
+ return D({
367
+ id: O(),
368
368
  type: "countdown",
369
- ...E,
370
- styles: M()
369
+ ...C,
370
+ styles: k()
371
371
  }, e);
372
372
  }
373
- function ae(e) {
373
+ function le(e) {
374
374
  return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
375
375
  }
376
- function oe(e) {
376
+ function ue(e) {
377
377
  let t = {};
378
- for (let n of e.fields) t[n.key] = ae(n);
379
- let n = A(M(), e.defaultStyles);
378
+ for (let n of e.fields) t[n.key] = le(n);
379
+ let n = D(k(), e.defaultStyles);
380
380
  return {
381
- id: j(),
381
+ id: O(),
382
382
  type: "custom",
383
383
  customType: e.type,
384
384
  fieldValues: t,
@@ -386,31 +386,31 @@ function oe(e) {
386
386
  ...e.dataSource ? { dataSourceFetched: !1 } : {}
387
387
  };
388
388
  }
389
- function K(e, t) {
389
+ function de(e, t) {
390
390
  switch (e) {
391
- case "section": return R(t?.section);
392
- case "title": return N(t?.title);
393
- case "paragraph": return P(t?.paragraph);
394
- case "image": return F(t?.image);
395
- case "button": return I(t?.button);
396
- case "divider": return L(t?.divider);
397
- case "video": return z(t?.video);
398
- case "social": return B(t?.social);
399
- case "spacer": return V(t?.spacer);
400
- case "html": return H(t?.html);
401
- case "menu": return U(t?.menu);
402
- case "table": return W(t?.table);
403
- case "countdown": return G(t?.countdown);
391
+ case "section": return F(t?.section);
392
+ case "title": return A(t?.title);
393
+ case "paragraph": return j(t?.paragraph);
394
+ case "image": return M(t?.image);
395
+ case "button": return N(t?.button);
396
+ case "divider": return P(t?.divider);
397
+ case "video": return I(t?.video);
398
+ case "social": return L(t?.social);
399
+ case "spacer": return R(t?.spacer);
400
+ case "html": return z(t?.html);
401
+ case "menu": return B(t?.menu);
402
+ case "table": return V(t?.table);
403
+ case "countdown": return ce(t?.countdown);
404
404
  default: throw Error(`Unknown block type: ${e}`);
405
405
  }
406
406
  }
407
- function q(e) {
407
+ function H(e) {
408
408
  let t = JSON.parse(JSON.stringify(e));
409
- return t.id = j(), t.type === "section" && (t.children = t.children.map((e) => e.map((e) => q(e)))), t;
409
+ return t.id = O(), t.type === "section" && (t.children = t.children.map((e) => e.map((e) => H(e)))), t;
410
410
  }
411
411
  //#endregion
412
412
  //#region ../types/src/clone.ts
413
- function se(e) {
413
+ function fe(e) {
414
414
  let t = /* @__PURE__ */ new WeakSet();
415
415
  return JSON.parse(JSON.stringify(e, (e, n) => {
416
416
  if (typeof n == "object" && n) {
@@ -421,6 +421,77 @@ function se(e) {
421
421
  }));
422
422
  }
423
423
  //#endregion
424
+ //#region ../types/src/html-scan.ts
425
+ var U = /* @__PURE__ */ new Set(["\"", "'"]);
426
+ function W(e, t) {
427
+ let n = null;
428
+ for (let r = t; r < e.length; r++) {
429
+ let t = e[r];
430
+ if (n !== null) {
431
+ t === n && (n = null);
432
+ continue;
433
+ }
434
+ if (U.has(t)) {
435
+ n = t;
436
+ continue;
437
+ }
438
+ if (t === ">") return r;
439
+ }
440
+ return -1;
441
+ }
442
+ function pe(e) {
443
+ return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
444
+ }
445
+ function G(e) {
446
+ return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
447
+ }
448
+ var me = {
449
+ amp: "&",
450
+ lt: "<",
451
+ gt: ">",
452
+ quot: "\"",
453
+ apos: "'",
454
+ nbsp: "\xA0"
455
+ };
456
+ function K(e) {
457
+ return e.includes("&") ? e.replace(/&(#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g, (e, t) => {
458
+ if (t[0] === "#") {
459
+ let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
460
+ return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
461
+ }
462
+ return me[t.toLowerCase()] ?? e;
463
+ }) : e;
464
+ }
465
+ function q(e, t) {
466
+ let n = t.toLowerCase(), r = 0;
467
+ for (; r < e.length;) {
468
+ for (; r < e.length && (G(e[r]) || e[r] === "/");) r++;
469
+ if (r >= e.length) break;
470
+ let t = r;
471
+ for (; r < e.length && pe(e[r]);) r++;
472
+ let i = e.substring(t, r).toLowerCase();
473
+ if (i === "") {
474
+ r++;
475
+ continue;
476
+ }
477
+ for (; r < e.length && G(e[r]);) r++;
478
+ if (e[r] !== "=") continue;
479
+ for (r++; r < e.length && G(e[r]);) r++;
480
+ let a = e[r];
481
+ if (U.has(a)) {
482
+ let t = r + 1, o = e.indexOf(a, t);
483
+ if (o === -1) return null;
484
+ if (i === n) return K(e.substring(t, o));
485
+ r = o + 1;
486
+ continue;
487
+ }
488
+ let o = r;
489
+ for (; r < e.length && !G(e[r]) && e[r] !== ">";) r++;
490
+ if (i === n) return K(e.substring(o, r));
491
+ }
492
+ return null;
493
+ }
494
+ //#endregion
424
495
  //#region ../types/src/merge-tags.ts
425
496
  var J = {
426
497
  liquid: {
@@ -439,33 +510,33 @@ var J = {
439
510
  value: /%%=.+?=%%/g,
440
511
  logic: /%%\[\s*(\w+).*?\]%%/g
441
512
  }
442
- }, ce = {
513
+ }, he = {
443
514
  liquid: "{{",
444
515
  handlebars: "{{",
445
516
  mailchimp: "*|",
446
517
  ampscript: "%%="
447
- }, le = {
518
+ }, ge = {
448
519
  liquid: "}}",
449
520
  handlebars: "}}",
450
521
  mailchimp: "|*",
451
522
  ampscript: "=%%"
452
523
  };
453
- function ue(e) {
454
- for (let t of Object.keys(J)) if (J[t].value.source === e.value.source) return ce[t];
524
+ function _e(e) {
525
+ for (let t of Object.keys(J)) if (J[t].value.source === e.value.source) return he[t];
455
526
  return null;
456
527
  }
457
- function de(e) {
458
- for (let t of Object.keys(J)) if (J[t].value.source === e.value.source) return le[t];
528
+ function ve(e) {
529
+ for (let t of Object.keys(J)) if (J[t].value.source === e.value.source) return ge[t];
459
530
  return null;
460
531
  }
461
- function fe(e) {
532
+ function ye(e) {
462
533
  return e ? typeof e == "string" ? J[e] ?? J.liquid : e : J.liquid;
463
534
  }
464
535
  function Y(e) {
465
536
  let t = e.source, n = e.flags.replace("g", "");
466
537
  return RegExp(`^${t}$`, n);
467
538
  }
468
- function pe(e, t) {
539
+ function be(e, t) {
469
540
  let n = e?.trim() || "";
470
541
  return !Y(t.logic).test(n) && Y(t.value).test(n);
471
542
  }
@@ -473,83 +544,83 @@ function X(e, t) {
473
544
  let n = t.find((t) => t.value === e);
474
545
  return n ? n.label : e;
475
546
  }
476
- function me(e, t) {
547
+ function xe(e, t) {
477
548
  return $(e, "data-merge-tag", (e) => X(e, t));
478
549
  }
479
550
  function Z(e, t) {
480
551
  return t.find((t) => t.value === e)?.sample;
481
552
  }
482
- function he(e, t) {
483
- return $(e, "data-merge-tag", (e) => ve(Z(e, t) ?? X(e, t)), { unwrap: (e) => Z(e, t) !== void 0 });
553
+ function Se(e, t) {
554
+ return $(e, "data-merge-tag", (e) => Te(Z(e, t) ?? X(e, t)), { unwrap: (e) => Z(e, t) !== void 0 });
484
555
  }
485
- function ge(e) {
556
+ function Ce(e) {
486
557
  return e.some((e) => e.sample !== void 0);
487
558
  }
488
- function _e(e, t) {
559
+ function we(e, t) {
489
560
  if (!e) return e;
490
561
  let n = e;
491
562
  for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
492
563
  return n;
493
564
  }
494
- function ve(e) {
565
+ function Te(e) {
495
566
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
496
567
  }
497
- function ye(e, t) {
568
+ function Ee(e, t) {
498
569
  if (!e) return !1;
499
570
  let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
500
571
  return n.test(e) || r.test(e);
501
572
  }
502
- function be(e, t) {
573
+ function De(e, t) {
503
574
  return Y(t.logic).test(e?.trim() || "");
504
575
  }
505
576
  function Q(e, t) {
506
577
  let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
507
578
  return r && r[1] ? r[1].toUpperCase() : e;
508
579
  }
509
- function xe(e, t) {
580
+ function Oe(e, t) {
510
581
  return $(e, "data-logic-merge-tag", (e) => Q(e, t));
511
582
  }
512
583
  function $(e, t, n, r) {
513
- let i = RegExp(`(?:^|\\s)${t}="([^"<>]*)"`), a = "", o = 0;
514
- for (; o < e.length;) {
515
- let t = e.indexOf("<span", o);
516
- if (t === -1) {
517
- a += e.substring(o);
584
+ let i = "", a = 0;
585
+ for (; a < e.length;) {
586
+ let o = e.indexOf("<span", a);
587
+ if (o === -1) {
588
+ i += e.substring(a);
518
589
  break;
519
590
  }
520
- let s = e[t + 5];
591
+ let s = e[o + 5];
521
592
  if (s !== ">" && s !== " " && s !== " " && s !== "\n" && s !== "\r" && s !== "/") {
522
- a += e.substring(o, t + 5), o = t + 5;
593
+ i += e.substring(a, o + 5), a = o + 5;
523
594
  continue;
524
595
  }
525
- let c = e.indexOf(">", t + 5);
596
+ let c = W(e, o + 5);
526
597
  if (c === -1) {
527
- a += e.substring(o);
598
+ i += e.substring(a);
528
599
  break;
529
600
  }
530
601
  let l = e.indexOf("</span>", c + 1);
531
602
  if (l === -1) {
532
- a += e.substring(o);
603
+ i += e.substring(a);
533
604
  break;
534
605
  }
535
- let u = e.substring(t + 5, c), d = i.exec(u);
536
- if (!d) {
537
- a += e.substring(o, t + 5), o = t + 5;
606
+ let u = q(e.substring(o + 5, c), t);
607
+ if (u === null) {
608
+ i += e.substring(a, o + 5), a = o + 5;
538
609
  continue;
539
610
  }
540
- let f = d[1], p = n(f);
541
- r?.unwrap?.(f) ? (a += e.substring(o, t), a += p) : (a += e.substring(o, c + 1), a += p, a += "</span>"), o = l + 7;
611
+ let d = n(u);
612
+ r?.unwrap?.(u) ? (i += e.substring(a, o), i += d) : (i += e.substring(a, c + 1), i += d, i += "</span>"), a = l + 7;
542
613
  }
543
- return a;
614
+ return i;
544
615
  }
545
616
  //#endregion
546
617
  //#region ../types/src/preview-resolution.ts
547
- function Se(e) {
618
+ function ke(e) {
548
619
  return typeof e != "object" || !e ? !1 : Array.isArray(e.blocks);
549
620
  }
550
621
  //#endregion
551
622
  //#region ../types/src/config.ts
552
- var Ce = class extends Error {
623
+ var Ae = class extends Error {
553
624
  statusCode;
554
625
  constructor(e, t) {
555
626
  super(e), this.statusCode = t, this.name = "SdkError";
@@ -565,6 +636,6 @@ var Ce = class extends Error {
565
636
  }
566
637
  };
567
638
  //#endregion
568
- export { e as $, B as A, ee as B, oe as C, U as D, F as E, j as F, i as G, d as H, ne as I, u as J, n as K, te as L, W as M, N, P as O, z as P, t as Q, D as R, G as S, H as T, a as U, s as V, f as W, r as X, p as Y, c as Z, _e as _, Q as a, K as b, de as c, be as d, pe as f, he as g, fe as h, ye as i, V as j, R as k, ue as l, me as m, Se as n, X as o, xe as p, l as q, J as r, Z as s, Ce as t, ge as u, se as v, L as w, I as x, q as y, o as z };
639
+ export { c as $, j as A, w as B, N as C, z as D, P as E, A as F, a as G, ne as H, I, n as J, ee as K, O as L, L as M, R as N, M as O, V as P, r as Q, ae as R, de as S, ue as T, s as U, o as V, d as W, u as X, l as Y, te as Z, we as _, Q as a, fe as b, ve as c, De as d, t as et, be as f, Se as g, ye as h, Ee as i, F as j, B as k, _e as l, xe as m, ke as n, X as o, Oe as p, i as q, J as r, Z as s, Ae as t, e as tt, Ce as u, W as v, ce as w, H as x, q as y, ie as z };
569
640
 
570
- //# sourceMappingURL=src-EKTTBQ0y.js.map
641
+ //# sourceMappingURL=src-B_QJduQD.js.map