@aswin.dev/editor 0.7.1 → 0.7.3

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 (116) hide show
  1. package/LICENSE +56 -0
  2. package/dist/{AiChatSidebar-DWGPVtvC.js → AiChatSidebar-Dt5pvG5t.js} +37 -51
  3. package/dist/{AiFeatureMenu-duUFSfDf.js → AiFeatureMenu-BipxcGap.js} +1 -1
  4. package/dist/{CloudEditor-CFldoCOb.js → CloudEditor-CnUX0IOW.js} +283 -239
  5. package/dist/{CollaboratorBar-Bw-lbt61.js → CollaboratorBar-NaaZTjbs.js} +2 -2
  6. package/dist/{CommentsSidebar-BaD5F53-.js → CommentsSidebar-DE6ZsM4D.js} +9 -10
  7. package/dist/CountdownBlock-Ba3T-i2X.js +1536 -0
  8. package/dist/{CountdownToolbar-Dg4F8MTk.js → CountdownToolbar-CbhSp_uq.js} +1 -1
  9. package/dist/{DesignReferenceSidebar-BSH7uNP_.js → DesignReferenceSidebar-CZg97bbj.js} +1 -1
  10. package/dist/{ModuleBrowserModal-6phxZSKI.js → ModuleBrowserModal-D2EVdexc.js} +4 -4
  11. package/dist/{ModulePreviewCanvas-BW8L3eQX.js → ModulePreviewCanvas-P3N-nxkU.js} +52 -47
  12. package/dist/{NumberWithSuffix-BpUzQOJt.js → NumberWithSuffix-CihczoAd.js} +1 -1
  13. package/dist/{ParagraphEditor-DNSzAB-I.js → ParagraphEditor-BbRuKhWv.js} +7 -7
  14. package/dist/{SaveModuleDialog-zMQTpez7.js → SaveModuleDialog-DLZa3m3O.js} +2 -2
  15. package/dist/{SnapshotHistory-Do-A5rYU.js → SnapshotHistory-Csg1_jXi.js} +3 -3
  16. package/dist/{TestEmailModal-DGj_9V1u.js → TestEmailModal-m3okLbJz.js} +2 -2
  17. package/dist/{TitleEditor-C7IDnAoS.js → TitleEditor-CtJIS5ER.js} +2 -2
  18. package/dist/{TplModal-BAsVzcTb.js → TplModal-CQCrKeKP.js} +1 -1
  19. package/dist/{blockTypeIcons-C6LDKvmd.js → blockTypeIcons-Dah0pgt-.js} +50 -19
  20. package/dist/bundle-stats.json +8 -8
  21. package/dist/cdn/chunks/AccessibilityPanel-Bt_fD7QT.js +97 -0
  22. package/dist/cdn/chunks/AccessibilityPanel-Bt_fD7QT.js.map +1 -0
  23. package/dist/cdn/chunks/AiFeatureMenu-Bn-0rgfr.js +59 -0
  24. package/dist/cdn/chunks/AiFeatureMenu-Bn-0rgfr.js.map +1 -0
  25. package/dist/cdn/chunks/BlockA11yBadge-Cj18Iw0p.js +33 -0
  26. package/dist/cdn/chunks/BlockA11yBadge-Cj18Iw0p.js.map +1 -0
  27. package/dist/cdn/chunks/CloudEditor-56lVcdot.js +1220 -0
  28. package/dist/cdn/chunks/CloudEditor-56lVcdot.js.map +1 -0
  29. package/dist/cdn/chunks/CollaboratorBar-B7DCV3xp.js +51 -0
  30. package/dist/cdn/chunks/CollaboratorBar-B7DCV3xp.js.map +1 -0
  31. package/dist/cdn/chunks/CountdownToolbar-BtaD3d3-.js +212 -0
  32. package/dist/cdn/chunks/CountdownToolbar-BtaD3d3-.js.map +1 -0
  33. package/dist/cdn/chunks/ModuleBrowserModal-CiIY7ZGv.js +195 -0
  34. package/dist/cdn/chunks/ModuleBrowserModal-CiIY7ZGv.js.map +1 -0
  35. package/dist/cdn/chunks/ModulePreviewCanvas-M7_OGV2m.js +113 -0
  36. package/dist/cdn/chunks/ModulePreviewCanvas-M7_OGV2m.js.map +1 -0
  37. package/dist/cdn/chunks/NumberWithSuffix-DfVBnsgc.js +423 -0
  38. package/dist/cdn/chunks/NumberWithSuffix-DfVBnsgc.js.map +1 -0
  39. package/dist/cdn/chunks/ParagraphEditor-1XJOpiLX.js +544 -0
  40. package/dist/cdn/chunks/ParagraphEditor-1XJOpiLX.js.map +1 -0
  41. package/dist/cdn/chunks/RichTextEditorContent-C2q8sbp2.js +106 -0
  42. package/dist/cdn/chunks/RichTextEditorContent-C2q8sbp2.js.map +1 -0
  43. package/dist/cdn/chunks/SaveModuleDialog-BNxh1jPT.js +119 -0
  44. package/dist/cdn/chunks/SaveModuleDialog-BNxh1jPT.js.map +1 -0
  45. package/dist/cdn/chunks/TitleEditor-IF7VzLTk.js +171 -0
  46. package/dist/cdn/chunks/TitleEditor-IF7VzLTk.js.map +1 -0
  47. package/dist/cdn/chunks/blockTypeIcons-tPBKQ8WC.js +24 -0
  48. package/dist/cdn/chunks/blockTypeIcons-tPBKQ8WC.js.map +1 -0
  49. package/dist/cdn/chunks/de-B05yW8Gi.js +840 -0
  50. package/dist/cdn/chunks/de-B05yW8Gi.js.map +1 -0
  51. package/dist/cdn/chunks/de-BPHtelu7.js +209 -0
  52. package/dist/cdn/chunks/de-BPHtelu7.js.map +1 -0
  53. package/dist/cdn/chunks/de-BRDqJwJe.js +89 -0
  54. package/dist/cdn/chunks/de-BRDqJwJe.js.map +1 -0
  55. package/dist/cdn/chunks/draggable-C-1_gch3.js +11572 -0
  56. package/dist/cdn/chunks/draggable-C-1_gch3.js.map +1 -0
  57. package/dist/cdn/chunks/emojiData-DUHzsh4j.js +19 -0
  58. package/dist/cdn/chunks/emojiData-DUHzsh4j.js.map +1 -0
  59. package/dist/cdn/chunks/en-BII7695P.js +840 -0
  60. package/dist/cdn/chunks/en-BII7695P.js.map +1 -0
  61. package/dist/cdn/chunks/en-Cdj_Ikl1.js +89 -0
  62. package/dist/cdn/chunks/en-Cdj_Ikl1.js.map +1 -0
  63. package/dist/cdn/chunks/en-DejwuJhw.js +209 -0
  64. package/dist/cdn/chunks/en-DejwuJhw.js.map +1 -0
  65. package/dist/cdn/chunks/extensions-B0eT-yjf.js +598 -0
  66. package/dist/cdn/chunks/extensions-B0eT-yjf.js.map +1 -0
  67. package/dist/cdn/chunks/features-BrvE2Fzv.js +9677 -0
  68. package/dist/cdn/chunks/features-BrvE2Fzv.js.map +1 -0
  69. package/dist/cdn/chunks/icons-C7wtAD8p.js +1043 -0
  70. package/dist/cdn/chunks/icons-C7wtAD8p.js.map +1 -0
  71. package/dist/cdn/chunks/liquid.browser-CllF-us3.js +3279 -0
  72. package/dist/cdn/chunks/liquid.browser-CllF-us3.js.map +1 -0
  73. package/dist/cdn/chunks/media-library-Cl5XuaKy.js +6030 -0
  74. package/dist/cdn/chunks/media-library-Cl5XuaKy.js.map +1 -0
  75. package/dist/cdn/chunks/pusher-i7-OBujc.js +2508 -0
  76. package/dist/cdn/chunks/pusher-i7-OBujc.js.map +1 -0
  77. package/dist/cdn/chunks/quality-Va91a3N8.js +1456 -0
  78. package/dist/cdn/chunks/quality-Va91a3N8.js.map +1 -0
  79. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +32 -0
  80. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -0
  81. package/dist/cdn/chunks/renderer-si0Zgxeb.js +642 -0
  82. package/dist/cdn/chunks/renderer-si0Zgxeb.js.map +1 -0
  83. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +20 -0
  84. package/dist/cdn/chunks/src-BLyYIbdZ.js +497 -0
  85. package/dist/cdn/chunks/src-BLyYIbdZ.js.map +1 -0
  86. package/dist/cdn/chunks/styleConstants-DfcU8u_r.js +57 -0
  87. package/dist/cdn/chunks/styleConstants-DfcU8u_r.js.map +1 -0
  88. package/dist/cdn/chunks/styles-C6BQLT9F.js +5807 -0
  89. package/dist/cdn/chunks/styles-C6BQLT9F.js.map +1 -0
  90. package/dist/cdn/chunks/tiptap-D8whBv5F.js +14654 -0
  91. package/dist/cdn/chunks/tiptap-D8whBv5F.js.map +1 -0
  92. package/dist/cdn/editor.css +2 -0
  93. package/dist/cdn/editor.js +367 -0
  94. package/dist/cdn/editor.js.map +1 -0
  95. package/dist/{cloud-6ZmAvF0j.js → cloud-BoS0J0vs.js} +1 -1
  96. package/dist/{de-DWcgp-7T.js → de-C74F9xK3.js} +112 -3
  97. package/dist/dist-C2grMquk.js +1261 -0
  98. package/dist/{dist-CivF9P8b.js → dist-Djgi0A6k.js} +92 -77
  99. package/dist/{en-Cxd4fhNm.js → en-B24jVTeO.js} +112 -3
  100. package/dist/{extensions-D__hOlV1.js → extensions-DsmjHqBF.js} +14 -14
  101. package/dist/index.d.ts +21 -10
  102. package/dist/{pencil-BZJPNYWR.js → pencil-Bpimrzzw.js} +5 -2
  103. package/dist/style.css +1 -1
  104. package/dist/styles-BMFMtR9R.js +6341 -0
  105. package/dist/templatical-editor.js +197 -139
  106. package/dist/undo-2-m1EUDbUg.js +16 -0
  107. package/dist/{useEditorCore-wslttMH-.js → useEditorCore-CtNAo0uy.js} +2154 -2025
  108. package/dist/useMergeTag-2vTcVpNo.js +34 -0
  109. package/package.json +12 -12
  110. package/dist/CountdownBlock-DaYGxKqo.js +0 -92
  111. package/dist/check-DJrpDKO_.js +0 -7
  112. package/dist/dist-C04s_fLA.js +0 -563
  113. package/dist/styles-B4tjX5SP.js +0 -5224
  114. package/dist/useMergeTag-DX0XG5V9.js +0 -34
  115. /package/dist/{clock-ik2pRJKG.js → clock-Ba4p3rJM.js} +0 -0
  116. /package/dist/{readableTextColor-DVuzNX1y.js → readableTextColor-C_9OpzBw.js} +0 -0
@@ -1,563 +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
- borderWidth: 0,
35
- borderColor: "#000000",
36
- borderSides: "all"
37
- }, ee = {
38
- inputType: "text",
39
- name: "field",
40
- label: "Label",
41
- placeholder: "",
42
- defaultValue: "",
43
- required: !1,
44
- labelMargin: {
45
- top: 0,
46
- right: 0,
47
- bottom: 8,
48
- left: 0
49
- },
50
- labelPadding: {
51
- top: 0,
52
- right: 0,
53
- bottom: 0,
54
- left: 0
55
- },
56
- labelFontSize: 14,
57
- labelColor: "#374151",
58
- labelFontWeight: "normal",
59
- labelTextAlign: "left",
60
- inputMargin: {
61
- top: 0,
62
- right: 0,
63
- bottom: 0,
64
- left: 0
65
- },
66
- inputPadding: {
67
- top: 10,
68
- right: 12,
69
- bottom: 10,
70
- left: 12
71
- },
72
- inputBackgroundColor: "#ffffff",
73
- inputTextColor: "#111827",
74
- inputPlaceholderColor: "#9ca3af",
75
- inputFontSize: 15,
76
- inputBorderRadius: 6,
77
- inputBorderWidth: 1,
78
- inputBorderColor: "#d1d5db",
79
- inputBorderSides: "all",
80
- inputWidth: "full"
81
- }, o = {
82
- lineStyle: "solid",
83
- color: "#e0e0e0",
84
- thickness: 1,
85
- width: "full"
86
- }, s = { columns: "1" }, c = {
87
- url: "",
88
- thumbnailUrl: "",
89
- alt: "Video",
90
- width: "full",
91
- align: "center"
92
- }, l = {
93
- iconStyle: "solid",
94
- iconSize: "medium",
95
- spacing: 10,
96
- align: "center"
97
- }, u = { height: 24 }, d = { content: "" }, f = {
98
- fontSize: 15,
99
- color: "#1a1a1a",
100
- textAlign: "center",
101
- separator: "|",
102
- separatorColor: "#e0e0e0",
103
- spacing: 10
104
- }, p = {
105
- hasHeaderRow: !0,
106
- borderColor: "#e0e0e0",
107
- borderWidth: 1,
108
- cellPadding: 8,
109
- fontSize: 15,
110
- color: "#1a1a1a",
111
- textAlign: "left"
112
- }, m = {
113
- targetDate: "",
114
- timezone: "UTC",
115
- showDays: !0,
116
- showHours: !0,
117
- showMinutes: !0,
118
- showSeconds: !0,
119
- separator: ":",
120
- digitFontSize: 32,
121
- digitColor: "#1a1a1a",
122
- labelColor: "#6b7280",
123
- labelFontSize: 12,
124
- backgroundColor: "#ffffff",
125
- labelDays: "Days",
126
- labelHours: "Hours",
127
- labelMinutes: "Minutes",
128
- labelSeconds: "Seconds",
129
- expiredMessage: "This offer has expired",
130
- expiredImageUrl: "",
131
- hideOnExpiry: !1
132
- }, h = {
133
- width: 600,
134
- backgroundColor: "#ffffff",
135
- fontFamily: "Arial",
136
- locale: "en"
137
- };
138
- function g(e) {
139
- return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
140
- }
141
- function _(e, t) {
142
- let n = { ...e };
143
- for (let r of Object.keys(t)) {
144
- let i = e[r], a = t[r];
145
- a !== void 0 && (g(i) && g(a) ? n[r] = _(i, a) : n[r] = a);
146
- }
147
- return n;
148
- }
149
- function v(e) {
150
- if (!e.canvasPages?.length) return e;
151
- let t = e.activeCanvasPageId ?? e.canvasPages[0].id, n = e.canvasPages.find((e) => e.id === t) ?? e.canvasPages[0];
152
- return {
153
- ...e,
154
- activeCanvasPageId: n.id,
155
- blocks: n.blocks
156
- };
157
- }
158
- function te(e = "Arial", t) {
159
- return {
160
- blocks: [],
161
- settings: {
162
- ...h,
163
- fontFamily: e,
164
- ...t
165
- }
166
- };
167
- }
168
- var y = [
169
- {
170
- id: "UTC",
171
- label: "GMT+0000 (Coordinated Universal Time)"
172
- },
173
- {
174
- id: "America/Los_Angeles",
175
- label: "GMT−0800 (Pacific Time)"
176
- },
177
- {
178
- id: "America/Denver",
179
- label: "GMT−0700 (Mountain Time)"
180
- },
181
- {
182
- id: "America/Chicago",
183
- label: "GMT−0600 (Central Time)"
184
- },
185
- {
186
- id: "America/New_York",
187
- label: "GMT−0500 (Eastern Time)"
188
- },
189
- {
190
- id: "America/Sao_Paulo",
191
- label: "GMT−0300 (Brasília Time)"
192
- },
193
- {
194
- id: "Europe/London",
195
- label: "GMT+0000 (United Kingdom)"
196
- },
197
- {
198
- id: "Europe/Paris",
199
- label: "GMT+0100 (Central European Time)"
200
- },
201
- {
202
- id: "Asia/Dubai",
203
- label: "GMT+0400 (Gulf Standard Time)"
204
- },
205
- {
206
- id: "Asia/Kolkata",
207
- label: "GMT+0530 (India Standard Time)"
208
- },
209
- {
210
- id: "Asia/Singapore",
211
- label: "GMT+0800 (Singapore)"
212
- },
213
- {
214
- id: "Asia/Tokyo",
215
- label: "GMT+0900 (Japan Standard Time)"
216
- },
217
- {
218
- id: "Australia/Sydney",
219
- label: "GMT+1000 / GMT+1100 (Australian Eastern)"
220
- },
221
- {
222
- id: "Pacific/Auckland",
223
- label: "GMT+1200 / GMT+1300 (New Zealand)"
224
- }
225
- ], b = {
226
- small: 380,
227
- medium: 480,
228
- large: 600,
229
- fullscreen: 960,
230
- fullHeight: 420,
231
- custom: 600
232
- };
233
- function x() {
234
- return [{
235
- id: "schedule-slot-1",
236
- dayPreset: "everyday",
237
- startTime: "00:00",
238
- endTime: "23:59"
239
- }, {
240
- id: "schedule-slot-2",
241
- dayPreset: "everyday",
242
- startTime: "00:00",
243
- endTime: "23:59"
244
- }];
245
- }
246
- function S() {
247
- return {
248
- triggers: {
249
- onLanding: {
250
- enabled: !0,
251
- triggerConditions: !1
252
- },
253
- onExit: { enabled: !1 },
254
- onScroll: {
255
- enabled: !1,
256
- scrollPercent: 50,
257
- triggerConditions: !1
258
- },
259
- onClick: {
260
- enabled: !1,
261
- clickAnchor: "#popup",
262
- triggerConditions: !1
263
- },
264
- onHover: {
265
- enabled: !1,
266
- hoverElementId: "",
267
- triggerConditions: !1
268
- },
269
- onCustomEvent: {
270
- enabled: !1,
271
- customEventName: "",
272
- triggerConditions: !1
273
- }
274
- },
275
- design: {
276
- sizePreset: "large",
277
- contentPadding: {
278
- top: 24,
279
- right: 24,
280
- bottom: 24,
281
- left: 24
282
- },
283
- useOverlay: !0,
284
- overlayImage: !1,
285
- backgroundImage: !1,
286
- multiColumnEnabled: !0,
287
- multiColumnPreset: "two",
288
- rtl: !1,
289
- popupPosition: "center",
290
- displayAnimation: "smooth",
291
- displayCloseButton: !0,
292
- closeButtonPosition: "right",
293
- closeOnOverlayClick: !0
294
- },
295
- schedule: {
296
- timeZone: "Asia/Kolkata",
297
- startDate: "",
298
- endDate: "",
299
- detailedScheduleEnabled: !0,
300
- slots: x()
301
- }
302
- };
303
- }
304
- function C(e, t) {
305
- return !t || Object.keys(t).length === 0 ? e : _(e, t);
306
- }
307
- function w() {
308
- return crypto.randomUUID();
309
- }
310
- function T(e = 0) {
311
- return {
312
- top: e,
313
- right: e,
314
- bottom: e,
315
- left: e
316
- };
317
- }
318
- function E(e = 10) {
319
- return {
320
- padding: T(e),
321
- margin: T(0)
322
- };
323
- }
324
- function D(e = {}) {
325
- return C({
326
- id: w(),
327
- type: "title",
328
- ...n,
329
- styles: E()
330
- }, e);
331
- }
332
- function O(e = {}) {
333
- return C({
334
- id: w(),
335
- type: "paragraph",
336
- ...r,
337
- styles: E()
338
- }, e);
339
- }
340
- function k(e = {}) {
341
- return C({
342
- id: w(),
343
- type: "image",
344
- ...i,
345
- styles: E()
346
- }, e);
347
- }
348
- function A(e = {}) {
349
- return C({
350
- id: w(),
351
- type: "button",
352
- ...a,
353
- styles: E()
354
- }, e);
355
- }
356
- function j(e = {}) {
357
- return C({
358
- id: w(),
359
- type: "input",
360
- ...ee,
361
- styles: E()
362
- }, e);
363
- }
364
- function M(e = {}) {
365
- return C({
366
- id: w(),
367
- type: "divider",
368
- ...o,
369
- styles: E(20)
370
- }, e);
371
- }
372
- function N(e = {}) {
373
- return C({
374
- id: w(),
375
- type: "section",
376
- ...s,
377
- children: [[]],
378
- styles: E(20)
379
- }, e);
380
- }
381
- function P(e = {}) {
382
- return C({
383
- id: w(),
384
- type: "video",
385
- ...c,
386
- styles: E()
387
- }, e);
388
- }
389
- function F(e = {}) {
390
- return C({
391
- id: w(),
392
- type: "social",
393
- icons: [],
394
- ...l,
395
- styles: E()
396
- }, e);
397
- }
398
- function I(e = {}) {
399
- return C({
400
- id: w(),
401
- type: "spacer",
402
- ...u,
403
- styles: E(0)
404
- }, e);
405
- }
406
- function L(e = {}) {
407
- return C({
408
- id: w(),
409
- type: "html",
410
- ...d,
411
- styles: E()
412
- }, e);
413
- }
414
- function R(e = {}) {
415
- return C({
416
- id: w(),
417
- type: "menu",
418
- items: [],
419
- ...f,
420
- styles: E()
421
- }, e);
422
- }
423
- function z(e, t) {
424
- return Array.from({ length: t }, () => ({
425
- id: w(),
426
- cells: Array.from({ length: e }, () => ({
427
- id: w(),
428
- content: ""
429
- }))
430
- }));
431
- }
432
- function B(e = {}) {
433
- return C({
434
- id: w(),
435
- type: "table",
436
- rows: z(3, 3),
437
- ...p,
438
- styles: E()
439
- }, e);
440
- }
441
- function V(e = {}) {
442
- return C({
443
- id: w(),
444
- type: "countdown",
445
- ...m,
446
- styles: E()
447
- }, e);
448
- }
449
- function H(e) {
450
- return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
451
- }
452
- function U(e) {
453
- let t = {};
454
- for (let n of e.fields) t[n.key] = H(n);
455
- return {
456
- id: w(),
457
- type: "custom",
458
- customType: e.type,
459
- fieldValues: t,
460
- styles: E(),
461
- ...e.dataSource ? { dataSourceFetched: !1 } : {}
462
- };
463
- }
464
- function W(e, t) {
465
- switch (e) {
466
- case "section": return N(t?.section);
467
- case "title": return D(t?.title);
468
- case "paragraph": return O(t?.paragraph);
469
- case "image": return k(t?.image);
470
- case "button": return A(t?.button);
471
- case "input": return j(t?.input);
472
- case "divider": return M(t?.divider);
473
- case "video": return P(t?.video);
474
- case "social": return F(t?.social);
475
- case "spacer": return I(t?.spacer);
476
- case "html": return L(t?.html);
477
- case "menu": return R(t?.menu);
478
- case "table": return B(t?.table);
479
- case "countdown": return V(t?.countdown);
480
- default: throw Error(`Unknown block type: ${e}`);
481
- }
482
- }
483
- function G(e) {
484
- let t = JSON.parse(JSON.stringify(e));
485
- return t.id = w(), t.type === "section" && (t.children = t.children.map((e) => e.map((e) => G(e)))), t;
486
- }
487
- var K = {
488
- liquid: {
489
- value: /\{\{.+?\}\}/g,
490
- logic: /\{%-?\s*(\w+).*?-?%\}/g
491
- },
492
- handlebars: {
493
- value: /\{\{\{?.+?\}?\}\}/g,
494
- logic: /\{\{[#/](\w+).*?\}\}/g
495
- },
496
- mailchimp: {
497
- value: /\*\|\w+\|\*/g,
498
- logic: /\*\|(\w+)[:|].*?\|\*/g
499
- },
500
- ampscript: {
501
- value: /%%=.+?=%%/g,
502
- logic: /%%\[\s*(\w+).*?\]%%/g
503
- }
504
- }, q = {
505
- liquid: "{{",
506
- handlebars: "{{",
507
- mailchimp: "*|",
508
- ampscript: "%%="
509
- };
510
- function J(e) {
511
- for (let t of Object.keys(K)) if (K[t].value.source === e.value.source) return q[t];
512
- return null;
513
- }
514
- function Y(e) {
515
- return e ? typeof e == "string" ? K[e] ?? K.liquid : e : K.liquid;
516
- }
517
- function X(e) {
518
- let t = e.source, n = e.flags.replace("g", "");
519
- return RegExp(`^${t}$`, n);
520
- }
521
- function Z(e, t) {
522
- let n = e?.trim() || "";
523
- return X(t.logic).test(n) ? !1 : X(t.value).test(n);
524
- }
525
- function Q(e, t) {
526
- let n = t.find((t) => t.value === e);
527
- return n ? n.label : e;
528
- }
529
- function ne(e, t) {
530
- return e.replace(/(<span[^>]*\sdata-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${Q(r, t)}${a}`);
531
- }
532
- function re(e, t) {
533
- if (!e) return !1;
534
- let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
535
- return n.test(e) || r.test(e);
536
- }
537
- function ie(e, t) {
538
- return X(t.logic).test(e?.trim() || "");
539
- }
540
- function $(e, t) {
541
- let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
542
- return r && r[1] ? r[1].toUpperCase() : e;
543
- }
544
- function ae(e, t) {
545
- return e.replace(/(<span[^>]*\sdata-logic-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${$(r, t)}${a}`);
546
- }
547
- var oe = class extends Error {
548
- constructor(e, t) {
549
- super(e), this.statusCode = t, this.name = "SdkError";
550
- }
551
- statusCode;
552
- get isNotFound() {
553
- return this.statusCode === 404;
554
- }
555
- get isUnauthorized() {
556
- return this.statusCode === 401;
557
- }
558
- get isServerError() {
559
- return this.statusCode !== void 0 && this.statusCode >= 500;
560
- }
561
- };
562
- //#endregion
563
- export { t as A, B as C, $ as D, w as E, ne as F, Y as I, Z as M, v as N, Q as O, ae as P, I as S, P as T, j as _, oe as a, N as b, W as c, U as d, S as f, k as g, L as h, K as i, ie as j, J as k, A as l, M as m, y as n, G as o, te as p, b as r, re as s, e as t, V as u, R as v, D as w, F as x, O as y };