@templatical/editor 0.57.0 → 0.57.1
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.
- package/dist/{AiAltTextPopover-BjClNscQ.js → AiAltTextPopover-BiZHthAB.js} +1 -1
- package/dist/{AiAltTextReview-DeMdVbtT.js → AiAltTextReview-BwhROHiF.js} +1 -1
- package/dist/{AiRewriteMenu-BSzj1dKC.js → AiRewriteMenu-6b8GNj64.js} +4 -4
- package/dist/{BlockPreviewCanvas-D-If_vd_.js → BlockPreviewCanvas-BAYIy-QJ.js} +4 -4
- package/dist/{CloudPanels-DPeK_siQ.js → CloudPanels-Cb54vtYC.js} +1 -1
- package/dist/{CountdownToolbar-DBu2ZqC6.js → CountdownToolbar-CTbJPh8B.js} +4 -4
- package/dist/{IssuesPanel-BnUut-p-.js → IssuesPanel-BUKc8lld.js} +1 -1
- package/dist/{LanguageMenu-DfTxrbvp.js → LanguageMenu-DruJAMET.js} +3 -3
- package/dist/{LogicTagInsertButton-CJ1Jk6jv.js → LogicTagInsertButton-Ci7V0Exe.js} +3 -3
- package/dist/{MergeTagInput-CV-z85s9.js → MergeTagInput-BA89v7KJ.js} +1 -1
- package/dist/{MergeTagModeToggle-CixgX5C_.js → MergeTagModeToggle-De_FNmcG.js} +1 -1
- package/dist/{MergeTagTextarea-B1zOC_Nr.js → MergeTagTextarea-BRMB24Dg.js} +2 -2
- package/dist/{ParagraphEditor-C9UhWvRB.js → ParagraphEditor-DYqh0kEa.js} +8 -8
- package/dist/{RestoreVersionDialog-Do7fZWpT.js → RestoreVersionDialog-CRkyFafq.js} +1 -1
- package/dist/{RichTextEditorContent-wW_SMun2.js → RichTextEditorContent-WeCqqCy3.js} +2 -2
- package/dist/{SaveBlockDialog-CCHIUfR-.js → SaveBlockDialog-D992yyO4.js} +4 -4
- package/dist/{SavedBlocksBrowserModal-DtPHhfw9.js → SavedBlocksBrowserModal-tH74h2Tz.js} +4 -4
- package/dist/{SavedBlocksPanels-CYIby5pR.js → SavedBlocksPanels-BuzEwYfp.js} +1 -1
- package/dist/{SavedBlocksPickBar-CCwBugqN.js → SavedBlocksPickBar-DbULBPsI.js} +1 -1
- package/dist/{TemplateSettings-B8IVy5q9.js → TemplateSettings-eMBAy_wd.js} +4 -4
- package/dist/{TestEmailModal-CS5JoKRH.js → TestEmailModal-hb9iopaZ.js} +5 -5
- package/dist/{TestEmailPanel-sOIZfKzc.js → TestEmailPanel-DbeZjj0u.js} +1 -1
- package/dist/{TitleEditor-ZlBcq9_P.js → TitleEditor-CisDioGi.js} +4 -4
- package/dist/{Toolbar-c4_rLLJT.js → Toolbar-BUVRjylH.js} +9 -9
- package/dist/{TplModal-DnFFEulp.js → TplModal-BPPP-uM6.js} +1 -1
- package/dist/{VersionHistoryPanels-TdGaMaa_.js → VersionHistoryPanels-BNONrE-8.js} +1 -1
- package/dist/{WrapperBlock-BiW4ye3w.js → WrapperBlock-B3UAv5kv.js} +3 -3
- package/dist/{blockTypeIcons-D1aYMC1M.js → blockTypeIcons-BPPpqFc2.js} +1 -1
- package/dist/bundle-stats.json +5 -5
- package/dist/cdn/chunks/{AiAltTextPopover-CfGJNBOb.js → AiAltTextPopover-CafZSF50.js} +2 -2
- package/dist/cdn/chunks/{AiAltTextPopover-CfGJNBOb.js.map → AiAltTextPopover-CafZSF50.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-PKe31R_g.js → AiAltTextReview-BJcaqyp5.js} +2 -2
- package/dist/cdn/chunks/{AiAltTextReview-PKe31R_g.js.map → AiAltTextReview-BJcaqyp5.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-ZDBwReuU.js → AiRewriteMenu-DFUZWA7e.js} +5 -5
- package/dist/cdn/chunks/{AiRewriteMenu-ZDBwReuU.js.map → AiRewriteMenu-DFUZWA7e.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-D7U6nQ7t.js → BlockPreviewCanvas-D0VhkzY8.js} +5 -5
- package/dist/cdn/chunks/{BlockPreviewCanvas-D7U6nQ7t.js.map → BlockPreviewCanvas-D0VhkzY8.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-EXXNMLbs.js → CloudPanels-BiU1MD-4.js} +2 -2
- package/dist/cdn/chunks/{CloudPanels-EXXNMLbs.js.map → CloudPanels-BiU1MD-4.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BN2_zvRj.js → CountdownToolbar-CH8UK01N.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-BN2_zvRj.js.map → CountdownToolbar-CH8UK01N.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BDwegn0s.js → IssuesPanel-3NPqHXJx.js} +3 -3
- package/dist/cdn/chunks/{IssuesPanel-BDwegn0s.js.map → IssuesPanel-3NPqHXJx.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-DXq9cXUd.js → LanguageMenu-75uu4P2d.js} +4 -4
- package/dist/cdn/chunks/{LanguageMenu-DXq9cXUd.js.map → LanguageMenu-75uu4P2d.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BEArlbra.js → LogicTagInsertButton-C5L73hYh.js} +4 -4
- package/dist/cdn/chunks/{LogicTagInsertButton-BEArlbra.js.map → LogicTagInsertButton-C5L73hYh.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-B3SLXXzL.js → MergeTagInput-D8cbnnZu.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-B3SLXXzL.js.map → MergeTagInput-D8cbnnZu.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-Dywp9ntA.js → MergeTagModeToggle-D-RhwBsO.js} +2 -2
- package/dist/cdn/chunks/{MergeTagModeToggle-Dywp9ntA.js.map → MergeTagModeToggle-D-RhwBsO.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-B9TM7FgM.js → MergeTagTextarea-CAJIi2FE.js} +3 -3
- package/dist/cdn/chunks/{MergeTagTextarea-B9TM7FgM.js.map → MergeTagTextarea-CAJIi2FE.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CVGtTYta.js → ParagraphEditor-sRPXZDzp.js} +9 -9
- package/dist/cdn/chunks/{ParagraphEditor-CVGtTYta.js.map → ParagraphEditor-sRPXZDzp.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-Dt_0qOOW.js → RestoreVersionDialog-CJK-14PX.js} +2 -2
- package/dist/cdn/chunks/{RestoreVersionDialog-Dt_0qOOW.js.map → RestoreVersionDialog-CJK-14PX.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BjN4mnzL.js → RichTextEditorContent-DU0wtA_j.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-BjN4mnzL.js.map → RichTextEditorContent-DU0wtA_j.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-D9eBjE99.js → SaveBlockDialog-C8hY9xA-.js} +5 -5
- package/dist/cdn/chunks/{SaveBlockDialog-D9eBjE99.js.map → SaveBlockDialog-C8hY9xA-.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-ClsTpkdk.js → SavedBlocksBrowserModal-B3nFAgAa.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-ClsTpkdk.js.map → SavedBlocksBrowserModal-B3nFAgAa.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-CxlNHhUs.js → SavedBlocksPanels-CQenugHO.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-CxlNHhUs.js.map → SavedBlocksPanels-CQenugHO.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-C7_Z8phX.js → SavedBlocksPickBar-DzUP4IYv.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPickBar-C7_Z8phX.js.map → SavedBlocksPickBar-DzUP4IYv.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-B6zDtjSs.js → TemplateSettings-DnOwyN_1.js} +5 -5
- package/dist/cdn/chunks/{TemplateSettings-B6zDtjSs.js.map → TemplateSettings-DnOwyN_1.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-CJ_QYFua.js → TestEmailModal-BFqmfOZ1.js} +6 -6
- package/dist/cdn/chunks/{TestEmailModal-CJ_QYFua.js.map → TestEmailModal-BFqmfOZ1.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-CsFrTq_a.js → TestEmailPanel-DFOhhaa9.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-CsFrTq_a.js.map → TestEmailPanel-DFOhhaa9.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CuKJptyw.js → TitleEditor-ChPXTB9T.js} +4 -4
- package/dist/cdn/chunks/{TitleEditor-CuKJptyw.js.map → TitleEditor-ChPXTB9T.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-TS2WwlPW.js → Toolbar-bbO5WoKo.js} +9 -9
- package/dist/cdn/chunks/{Toolbar-TS2WwlPW.js.map → Toolbar-bbO5WoKo.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-CsadClrH.js → TplModal-Bg97XHIJ.js} +2 -2
- package/dist/cdn/chunks/{TplModal-CsadClrH.js.map → TplModal-Bg97XHIJ.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-CieY91f0.js → VersionHistoryPanels-CyyRXWPU.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-CieY91f0.js.map → VersionHistoryPanels-CyyRXWPU.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-DtnRuKWE.js → WrapperBlock-ZBCf7Y8u.js} +4 -4
- package/dist/cdn/chunks/{WrapperBlock-DtnRuKWE.js.map → WrapperBlock-ZBCf7Y8u.js.map} +1 -1
- package/dist/cdn/chunks/{composables-CUIiW9OD.js → composables-CMBZad02.js} +10 -10
- package/dist/cdn/chunks/{composables-CUIiW9OD.js.map → composables-CMBZad02.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-B7D04wKf.js → createCloudRuntime-BHGFjpek.js} +3 -3
- package/dist/cdn/chunks/{createCloudRuntime-B7D04wKf.js.map → createCloudRuntime-BHGFjpek.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-Cbvk9i08.js → extensions-Beg0g2wm.js} +4 -4
- package/dist/cdn/chunks/{extensions-Cbvk9i08.js.map → extensions-Beg0g2wm.js.map} +1 -1
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-BJ-MnCqF.js → normalizeMergeTagMarkup-B8yU4usU.js} +2 -2
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-BJ-MnCqF.js.map → normalizeMergeTagMarkup-B8yU4usU.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-D2wISRHq.js → preRenderCustomBlocks-CPHm2GOQ.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-D2wISRHq.js.map → preRenderCustomBlocks-CPHm2GOQ.js.map} +1 -1
- package/dist/cdn/chunks/{sanitizeHtml-CB7fjHFs.js → sanitizeHtml-B7LC0gKK.js} +2 -2
- package/dist/cdn/chunks/{sanitizeHtml-CB7fjHFs.js.map → sanitizeHtml-B7LC0gKK.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-C_yggK1_.js → socialIcons-D9D02_y5.js} +2 -2
- package/dist/cdn/chunks/{socialIcons-C_yggK1_.js.map → socialIcons-D9D02_y5.js.map} +1 -1
- package/dist/cdn/chunks/{src-Bp7bZcuD.js → src-BCrSqaj8.js} +2 -2
- package/dist/cdn/chunks/{src-Bp7bZcuD.js.map → src-BCrSqaj8.js.map} +1 -1
- package/dist/cdn/chunks/{src-D-URHI0Z.js → src-BO4aXl_Y.js} +3 -3
- package/dist/cdn/chunks/{src-D-URHI0Z.js.map → src-BO4aXl_Y.js.map} +1 -1
- package/dist/cdn/chunks/{src-CdVAke9t.js → src-DeywvttP.js} +547 -540
- package/dist/cdn/chunks/src-DeywvttP.js.map +1 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-slFOCPrh.js → useLocalizedDisplay-oykFcYrW.js} +2 -2
- package/dist/cdn/chunks/{useLocalizedDisplay-slFOCPrh.js.map → useLocalizedDisplay-oykFcYrW.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-lPjCGeGC.js → useLogicTag-D_qg9qqO.js} +2 -2
- package/dist/cdn/chunks/{useLogicTag-lPjCGeGC.js.map → useLogicTag-D_qg9qqO.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-BKNBwIry.js → useMergeTag-VLnVHtxV.js} +2 -2
- package/dist/cdn/chunks/{useMergeTag-BKNBwIry.js.map → useMergeTag-VLnVHtxV.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-CzTFFaJA.js → withCurrentFont-m6TtR0dC.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-CzTFFaJA.js.map → withCurrentFont-m6TtR0dC.js.map} +1 -1
- package/dist/cdn/editor.js +17 -17
- package/dist/{composables-DbjgUQlV.js → composables-Cq7rsxRc.js} +8 -8
- package/dist/{createCloudRuntime-Cnh2M6iT.js → createCloudRuntime-CHsFF8DI.js} +2 -2
- package/dist/{dist-CAvsz9cW.js → dist-C0hVefGI.js} +343 -336
- package/dist/{extensions-7fb-XtNJ.js → extensions-BSXjPQEc.js} +3 -3
- package/dist/{normalizeMergeTagMarkup-GrXJfXsQ.js → normalizeMergeTagMarkup-CBLCQe02.js} +1 -1
- package/dist/{preRenderCustomBlocks-DuXtzD-F.js → preRenderCustomBlocks-e2OlY4aU.js} +1 -1
- package/dist/{sanitizeHtml-eV4_BpI6.js → sanitizeHtml-Dfn-fH17.js} +1 -1
- package/dist/{socialIcons-brRkK9Om.js → socialIcons-BZRLo0eT.js} +1 -1
- package/dist/templatical-editor.js +17 -17
- package/dist/{useLocalizedDisplay-DoaT7nWk.js → useLocalizedDisplay-B7tlQF4g.js} +1 -1
- package/dist/{useLogicTag-cTC2KbWd.js → useLogicTag-k_y-4o4W.js} +1 -1
- package/dist/{useMergeTag-D2YDZ8vR.js → useMergeTag-BiZ6XOdL.js} +1 -1
- package/dist/{withCurrentFont-DAmED4fN.js → withCurrentFont-CPhRujet.js} +1 -1
- package/package.json +7 -7
- package/dist/cdn/chunks/src-CdVAke9t.js.map +0 -1
|
@@ -1213,28 +1213,28 @@ var Vt = class extends he {
|
|
|
1213
1213
|
super(e, t.status ?? Bt(t.code), t.code), this.name = "CollaborationConflict", t.opIndex !== void 0 && (this.opIndex = t.opIndex), t.holder !== void 0 && (this.holder = t.holder), t.holders !== void 0 && (this.holders = t.holders);
|
|
1214
1214
|
}
|
|
1215
1215
|
};
|
|
1216
|
-
function
|
|
1216
|
+
function B(e) {
|
|
1217
1217
|
return e.type === "section";
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1219
|
+
function Ht(e) {
|
|
1220
1220
|
return e.type === "custom";
|
|
1221
1221
|
}
|
|
1222
|
-
function
|
|
1222
|
+
function V(e) {
|
|
1223
1223
|
return e.type === "slot";
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function H(e) {
|
|
1226
1226
|
return e.type === "wrapper";
|
|
1227
1227
|
}
|
|
1228
|
-
var
|
|
1228
|
+
var Ut = {
|
|
1229
1229
|
content: "<p>Enter your title</p>",
|
|
1230
1230
|
level: 2,
|
|
1231
1231
|
textAlign: "left"
|
|
1232
|
-
},
|
|
1232
|
+
}, Wt = { content: "<p>Enter your text here</p>" }, Gt = {
|
|
1233
1233
|
src: "",
|
|
1234
1234
|
alt: "",
|
|
1235
1235
|
width: "full",
|
|
1236
1236
|
align: "center"
|
|
1237
|
-
},
|
|
1237
|
+
}, Kt = {
|
|
1238
1238
|
text: "Click Here",
|
|
1239
1239
|
url: "",
|
|
1240
1240
|
backgroundColor: "#333333",
|
|
@@ -1248,36 +1248,36 @@ var Wt = {
|
|
|
1248
1248
|
left: 24
|
|
1249
1249
|
},
|
|
1250
1250
|
align: "center"
|
|
1251
|
-
},
|
|
1251
|
+
}, qt = {
|
|
1252
1252
|
lineStyle: "solid",
|
|
1253
1253
|
color: "#e0e0e0",
|
|
1254
1254
|
thickness: 1,
|
|
1255
1255
|
width: "full"
|
|
1256
|
-
},
|
|
1256
|
+
}, Jt = { columns: "1" }, Yt = {
|
|
1257
1257
|
url: "",
|
|
1258
1258
|
thumbnailUrl: "",
|
|
1259
1259
|
alt: "Video",
|
|
1260
1260
|
width: "full",
|
|
1261
1261
|
align: "center"
|
|
1262
|
-
},
|
|
1262
|
+
}, Xt = {
|
|
1263
1263
|
iconStyle: "solid",
|
|
1264
1264
|
iconSize: "medium",
|
|
1265
1265
|
spacing: 10,
|
|
1266
1266
|
align: "center"
|
|
1267
|
-
},
|
|
1267
|
+
}, Zt = { height: 24 }, Qt = { content: "" }, $t = {
|
|
1268
1268
|
fontSize: 15,
|
|
1269
1269
|
textAlign: "center",
|
|
1270
1270
|
separator: "|",
|
|
1271
1271
|
separatorColor: "#e0e0e0",
|
|
1272
1272
|
spacing: 10
|
|
1273
|
-
},
|
|
1273
|
+
}, en = {
|
|
1274
1274
|
hasHeaderRow: !0,
|
|
1275
1275
|
borderColor: "#e0e0e0",
|
|
1276
1276
|
borderWidth: 1,
|
|
1277
1277
|
cellPadding: 8,
|
|
1278
1278
|
fontSize: 15,
|
|
1279
1279
|
textAlign: "left"
|
|
1280
|
-
},
|
|
1280
|
+
}, tn = {
|
|
1281
1281
|
targetDate: "",
|
|
1282
1282
|
timezone: "UTC",
|
|
1283
1283
|
showDays: !0,
|
|
@@ -1297,21 +1297,21 @@ var Wt = {
|
|
|
1297
1297
|
expiredMessage: "This offer has expired",
|
|
1298
1298
|
expiredImageUrl: "",
|
|
1299
1299
|
hideOnExpiry: !1
|
|
1300
|
+
}, nn = {
|
|
1301
|
+
title: Ut,
|
|
1302
|
+
paragraph: Wt,
|
|
1303
|
+
image: Gt,
|
|
1304
|
+
button: Kt,
|
|
1305
|
+
divider: qt,
|
|
1306
|
+
section: Jt,
|
|
1307
|
+
video: Yt,
|
|
1308
|
+
social: Xt,
|
|
1309
|
+
spacer: Zt,
|
|
1310
|
+
html: Qt,
|
|
1311
|
+
menu: $t,
|
|
1312
|
+
table: en,
|
|
1313
|
+
countdown: tn
|
|
1300
1314
|
}, rn = {
|
|
1301
|
-
title: Wt,
|
|
1302
|
-
paragraph: Gt,
|
|
1303
|
-
image: Kt,
|
|
1304
|
-
button: qt,
|
|
1305
|
-
divider: Jt,
|
|
1306
|
-
section: Yt,
|
|
1307
|
-
video: Xt,
|
|
1308
|
-
social: Zt,
|
|
1309
|
-
spacer: Qt,
|
|
1310
|
-
html: $t,
|
|
1311
|
-
menu: en,
|
|
1312
|
-
table: tn,
|
|
1313
|
-
countdown: nn
|
|
1314
|
-
}, an = {
|
|
1315
1315
|
width: 600,
|
|
1316
1316
|
backgroundColor: "#ffffff",
|
|
1317
1317
|
textColor: "#1a1a1a",
|
|
@@ -1319,28 +1319,28 @@ var Wt = {
|
|
|
1319
1319
|
fontFamily: "Arial",
|
|
1320
1320
|
locale: "en"
|
|
1321
1321
|
};
|
|
1322
|
-
function
|
|
1322
|
+
function an(e) {
|
|
1323
1323
|
return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1325
|
+
function on(e, t) {
|
|
1326
1326
|
let n = { ...e };
|
|
1327
1327
|
for (let r of Object.keys(t)) {
|
|
1328
1328
|
let i = e[r], a = t[r];
|
|
1329
|
-
a !== void 0 && (n[r] =
|
|
1329
|
+
a !== void 0 && (n[r] = an(i) && an(a) ? on(i, a) : a);
|
|
1330
1330
|
}
|
|
1331
1331
|
return n;
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1333
|
+
function sn(e = "Arial", t) {
|
|
1334
1334
|
return {
|
|
1335
1335
|
blocks: [],
|
|
1336
1336
|
settings: {
|
|
1337
|
-
...
|
|
1337
|
+
...rn,
|
|
1338
1338
|
fontFamily: e,
|
|
1339
1339
|
...t
|
|
1340
1340
|
}
|
|
1341
1341
|
};
|
|
1342
1342
|
}
|
|
1343
|
-
var
|
|
1343
|
+
var cn = [
|
|
1344
1344
|
"ar",
|
|
1345
1345
|
"he",
|
|
1346
1346
|
"iw",
|
|
@@ -1354,23 +1354,23 @@ var ln = [
|
|
|
1354
1354
|
"ckb",
|
|
1355
1355
|
"ks"
|
|
1356
1356
|
];
|
|
1357
|
-
function
|
|
1357
|
+
function ln(e) {
|
|
1358
1358
|
let t = e?.trim().replace(/_/g, "-").split("-")[0]?.toLowerCase();
|
|
1359
|
-
return !!t &&
|
|
1359
|
+
return !!t && cn.includes(t);
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1362
|
-
return e.direction === "ltr" || e.direction === "rtl" ? e.direction :
|
|
1361
|
+
function un(e) {
|
|
1362
|
+
return e.direction === "ltr" || e.direction === "rtl" ? e.direction : ln(e.locale) ? "rtl" : "ltr";
|
|
1363
1363
|
}
|
|
1364
|
-
var
|
|
1365
|
-
function
|
|
1364
|
+
var dn = 2e4, fn = /* @__PURE__ */ new Set(["\"", "'"]);
|
|
1365
|
+
function pn(e, t) {
|
|
1366
1366
|
let n = null, r = "tag";
|
|
1367
1367
|
for (let i = t; i < e.length; i++) {
|
|
1368
1368
|
let t = e[i];
|
|
1369
1369
|
if (n !== null) t === n && (n = null);
|
|
1370
1370
|
else {
|
|
1371
1371
|
if (r === "beforeValue") {
|
|
1372
|
-
if (
|
|
1373
|
-
if (
|
|
1372
|
+
if (U(t)) continue;
|
|
1373
|
+
if (fn.has(t)) {
|
|
1374
1374
|
n = t, r = "tag";
|
|
1375
1375
|
continue;
|
|
1376
1376
|
}
|
|
@@ -1378,19 +1378,19 @@ function mn(e, t) {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
if (r === "unquotedValue") {
|
|
1380
1380
|
if (t === ">") return i;
|
|
1381
|
-
|
|
1381
|
+
U(t) && (r = "tag");
|
|
1382
1382
|
} else if (t === "=") r = "beforeValue";
|
|
1383
1383
|
else if (t === ">") return i;
|
|
1384
1384
|
}
|
|
1385
1385
|
}
|
|
1386
1386
|
return -1;
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1388
|
+
function mn(e, t) {
|
|
1389
1389
|
let n = null;
|
|
1390
1390
|
for (let r = t; r < e.length; r++) {
|
|
1391
1391
|
let t = e[r];
|
|
1392
1392
|
if (n !== null) t === n && (n = null);
|
|
1393
|
-
else if (
|
|
1393
|
+
else if (fn.has(t)) n = t;
|
|
1394
1394
|
else if (t === ">") return {
|
|
1395
1395
|
end: r,
|
|
1396
1396
|
nextSpan: -1
|
|
@@ -1405,13 +1405,13 @@ function hn(e, t) {
|
|
|
1405
1405
|
nextSpan: -1
|
|
1406
1406
|
};
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1408
|
+
function hn(e) {
|
|
1409
1409
|
return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function U(e) {
|
|
1412
1412
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
1413
1413
|
}
|
|
1414
|
-
var
|
|
1414
|
+
var gn = {
|
|
1415
1415
|
AMP: "&",
|
|
1416
1416
|
COPY: "©",
|
|
1417
1417
|
GT: ">",
|
|
@@ -1672,50 +1672,50 @@ var _n = {
|
|
|
1672
1672
|
zwj: "",
|
|
1673
1673
|
zwnj: ""
|
|
1674
1674
|
};
|
|
1675
|
-
function
|
|
1675
|
+
function W(e) {
|
|
1676
1676
|
return e.includes("&") ? e.replace(/&(#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g, (e, t) => {
|
|
1677
1677
|
if (t[0] === "#") {
|
|
1678
1678
|
let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
|
|
1679
1679
|
return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
|
|
1680
1680
|
}
|
|
1681
|
-
return Object.hasOwn(
|
|
1681
|
+
return Object.hasOwn(gn, t) ? gn[t] : e;
|
|
1682
1682
|
}) : e;
|
|
1683
1683
|
}
|
|
1684
|
-
function
|
|
1684
|
+
function _n(e, t) {
|
|
1685
1685
|
let n = t.toLowerCase(), r = 0;
|
|
1686
1686
|
for (; r < e.length;) {
|
|
1687
|
-
for (; r < e.length && (
|
|
1687
|
+
for (; r < e.length && (U(e[r]) || e[r] === "/");) r++;
|
|
1688
1688
|
if (r >= e.length) break;
|
|
1689
1689
|
let t = r;
|
|
1690
|
-
for (; r < e.length &&
|
|
1690
|
+
for (; r < e.length && hn(e[r]);) r++;
|
|
1691
1691
|
let i = e.substring(t, r).toLowerCase();
|
|
1692
1692
|
if (i === "") {
|
|
1693
1693
|
r++;
|
|
1694
1694
|
continue;
|
|
1695
1695
|
}
|
|
1696
|
-
for (; r < e.length &&
|
|
1696
|
+
for (; r < e.length && U(e[r]);) r++;
|
|
1697
1697
|
if (e[r] !== "=") continue;
|
|
1698
|
-
for (r++; r < e.length &&
|
|
1698
|
+
for (r++; r < e.length && U(e[r]);) r++;
|
|
1699
1699
|
let a = e[r];
|
|
1700
|
-
if (
|
|
1700
|
+
if (fn.has(a)) {
|
|
1701
1701
|
let t = r + 1, o = e.indexOf(a, t);
|
|
1702
1702
|
if (o === -1) return null;
|
|
1703
|
-
if (i === n) return
|
|
1703
|
+
if (i === n) return W(e.substring(t, o));
|
|
1704
1704
|
r = o + 1;
|
|
1705
1705
|
continue;
|
|
1706
1706
|
}
|
|
1707
1707
|
let o = r;
|
|
1708
|
-
for (; r < e.length && !
|
|
1709
|
-
if (i === n) return
|
|
1708
|
+
for (; r < e.length && !U(e[r]) && e[r] !== ">";) r++;
|
|
1709
|
+
if (i === n) return W(e.substring(o, r));
|
|
1710
1710
|
}
|
|
1711
1711
|
return null;
|
|
1712
1712
|
}
|
|
1713
|
-
function
|
|
1714
|
-
return
|
|
1713
|
+
function vn(e, t) {
|
|
1714
|
+
return bn(e, t, !0);
|
|
1715
1715
|
}
|
|
1716
|
-
function
|
|
1716
|
+
function yn(e) {
|
|
1717
1717
|
let t = [];
|
|
1718
|
-
return
|
|
1718
|
+
return bn(e, (n, r, i) => {
|
|
1719
1719
|
let a = e.slice(r, i);
|
|
1720
1720
|
return t.push({
|
|
1721
1721
|
start: r,
|
|
@@ -1724,7 +1724,7 @@ function bn(e) {
|
|
|
1724
1724
|
}), a;
|
|
1725
1725
|
}, !0), t;
|
|
1726
1726
|
}
|
|
1727
|
-
function
|
|
1727
|
+
function bn(e, t, n) {
|
|
1728
1728
|
let r = "", i = 0;
|
|
1729
1729
|
for (; i < e.length;) {
|
|
1730
1730
|
let a = e.indexOf("<span", i);
|
|
@@ -1737,7 +1737,7 @@ function xn(e, t, n) {
|
|
|
1737
1737
|
r += e.substring(i, a + 5), i = a + 5;
|
|
1738
1738
|
continue;
|
|
1739
1739
|
}
|
|
1740
|
-
let { end: s, nextSpan: c } =
|
|
1740
|
+
let { end: s, nextSpan: c } = mn(e, a + 5);
|
|
1741
1741
|
if (c !== -1) {
|
|
1742
1742
|
r += e.substring(i, c), i = c;
|
|
1743
1743
|
continue;
|
|
@@ -1746,12 +1746,12 @@ function xn(e, t, n) {
|
|
|
1746
1746
|
r += e.substring(i);
|
|
1747
1747
|
break;
|
|
1748
1748
|
}
|
|
1749
|
-
let l = e.substring(a + 5, s), u =
|
|
1749
|
+
let l = e.substring(a + 5, s), u = Sn(l, "data-merge-tag") ?? Sn(l, "data-logic-merge-tag");
|
|
1750
1750
|
if (u === null) {
|
|
1751
1751
|
r += e.substring(i, s + 1), i = s + 1;
|
|
1752
1752
|
continue;
|
|
1753
1753
|
}
|
|
1754
|
-
let d =
|
|
1754
|
+
let d = xn(e, s + 1, n);
|
|
1755
1755
|
if (d === -1) {
|
|
1756
1756
|
r += e.substring(i);
|
|
1757
1757
|
break;
|
|
@@ -1760,7 +1760,7 @@ function xn(e, t, n) {
|
|
|
1760
1760
|
}
|
|
1761
1761
|
return r;
|
|
1762
1762
|
}
|
|
1763
|
-
function
|
|
1763
|
+
function xn(e, t, n) {
|
|
1764
1764
|
if (!n) {
|
|
1765
1765
|
let n = e.indexOf("</span>", t);
|
|
1766
1766
|
return n === -1 ? -1 : n + 7;
|
|
@@ -1769,7 +1769,7 @@ function Sn(e, t, n) {
|
|
|
1769
1769
|
for (; i < e.length;) {
|
|
1770
1770
|
let t = e.indexOf("<", i);
|
|
1771
1771
|
if (t === -1) return -1;
|
|
1772
|
-
let n =
|
|
1772
|
+
let n = pn(e, t + 1);
|
|
1773
1773
|
if (n === -1) return -1;
|
|
1774
1774
|
let a = e.startsWith("</span", t), o = e.startsWith("<span", t), s = e[t + (a ? 6 : 5)];
|
|
1775
1775
|
if ((o || a) && (s === ">" || s === "/" || /\s/.test(s)) && (r += a ? -1 : 1, r === 0)) return n + 1;
|
|
@@ -1777,10 +1777,10 @@ function Sn(e, t, n) {
|
|
|
1777
1777
|
}
|
|
1778
1778
|
return -1;
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1781
|
-
return
|
|
1780
|
+
function Sn(e, t) {
|
|
1781
|
+
return _n(e, t);
|
|
1782
1782
|
}
|
|
1783
|
-
var
|
|
1783
|
+
var G = {
|
|
1784
1784
|
liquid: {
|
|
1785
1785
|
value: /\{\{.+?\}\}/g,
|
|
1786
1786
|
logic: /\{%-?\s*(\w+).*?-?%\}/g,
|
|
@@ -1806,13 +1806,13 @@ var W = {
|
|
|
1806
1806
|
closer: "=%%"
|
|
1807
1807
|
}
|
|
1808
1808
|
};
|
|
1809
|
-
function
|
|
1810
|
-
return Object.keys(
|
|
1811
|
-
let n =
|
|
1809
|
+
function K(e) {
|
|
1810
|
+
return Object.keys(G).find((t) => {
|
|
1811
|
+
let n = G[t];
|
|
1812
1812
|
return (e.value === n.value || e.value.source === n.value.source && e.value.flags.replace(/[gy]/g, "") === n.value.flags.replace(/[gy]/g, "")) && (e.logic === n.logic || e.logic.source === n.logic.source && e.logic.flags.replace(/[gy]/g, "") === n.logic.flags.replace(/[gy]/g, ""));
|
|
1813
1813
|
});
|
|
1814
1814
|
}
|
|
1815
|
-
function
|
|
1815
|
+
function Cn(e, t, n) {
|
|
1816
1816
|
for (let r = n; r < e.length; r++) {
|
|
1817
1817
|
let n = e.charCodeAt(r);
|
|
1818
1818
|
if (n === 10 || n === 13 || n === 8232 || n === 8233) return {
|
|
@@ -1829,8 +1829,8 @@ function wn(e, t, n) {
|
|
|
1829
1829
|
lineBreak: -1
|
|
1830
1830
|
};
|
|
1831
1831
|
}
|
|
1832
|
-
function
|
|
1833
|
-
let a =
|
|
1832
|
+
function q(e, t, n, r = 0, i = Infinity) {
|
|
1833
|
+
let a = K(t);
|
|
1834
1834
|
if (!a) {
|
|
1835
1835
|
let a = t[n], o = new RegExp(a.source, a.flags.replace(/[gy]/g, "") + "g");
|
|
1836
1836
|
return o.lastIndex = r, [...e.matchAll(o)].slice(0, i).map((e) => ({
|
|
@@ -1854,7 +1854,7 @@ function K(e, t, n, r = 0, i = Infinity) {
|
|
|
1854
1854
|
let r = u?.lastIndex ?? t + s.length, i = a === "mailchimp" && n === "value" ? {
|
|
1855
1855
|
close: e.startsWith(c, r) ? r : -1,
|
|
1856
1856
|
lineBreak: -1
|
|
1857
|
-
} :
|
|
1857
|
+
} : Cn(e, c, Math.max(r, t + s.length + +(n === "value")));
|
|
1858
1858
|
if (i.lineBreak >= 0) {
|
|
1859
1859
|
let r = i.lineBreak, o = n === "logic" && (a === "liquid" || a === "ampscript") ? e.lastIndexOf(s, r) : -1;
|
|
1860
1860
|
p = o > t ? o : r + 1;
|
|
@@ -1876,8 +1876,8 @@ function K(e, t, n, r = 0, i = Infinity) {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
return f;
|
|
1878
1878
|
}
|
|
1879
|
-
function
|
|
1880
|
-
let n =
|
|
1879
|
+
function wn(e, t) {
|
|
1880
|
+
let n = K(t);
|
|
1881
1881
|
if (!n) {
|
|
1882
1882
|
let n = RegExp(`(${t.value.source}|${t.logic.source})`, "g");
|
|
1883
1883
|
return [...e.matchAll(n)].map((e) => ({
|
|
@@ -1885,7 +1885,7 @@ function Tn(e, t) {
|
|
|
1885
1885
|
value: e[0]
|
|
1886
1886
|
}));
|
|
1887
1887
|
}
|
|
1888
|
-
if (n === "handlebars") return
|
|
1888
|
+
if (n === "handlebars") return q(e, t, "value");
|
|
1889
1889
|
if (n === "mailchimp") {
|
|
1890
1890
|
let n = [], r = new RegExp(t.value.source, "y"), i = new RegExp(t.logic.source, "y"), a = /\*\|\w+[:|]/y, o = 0;
|
|
1891
1891
|
for (; o < e.length;) {
|
|
@@ -1904,7 +1904,7 @@ function Tn(e, t) {
|
|
|
1904
1904
|
o = t + 2;
|
|
1905
1905
|
continue;
|
|
1906
1906
|
}
|
|
1907
|
-
let c =
|
|
1907
|
+
let c = Cn(e, "|*", a.lastIndex);
|
|
1908
1908
|
if (c.lineBreak >= 0) {
|
|
1909
1909
|
o = c.lineBreak + 1;
|
|
1910
1910
|
continue;
|
|
@@ -1919,78 +1919,78 @@ function Tn(e, t) {
|
|
|
1919
1919
|
}
|
|
1920
1920
|
return n;
|
|
1921
1921
|
}
|
|
1922
|
-
let r = [], i = 0, a =
|
|
1922
|
+
let r = [], i = 0, a = q(e, t, "value", i, 1)[0], o = q(e, t, "logic", i, 1)[0];
|
|
1923
1923
|
for (; a || o;) {
|
|
1924
1924
|
let n = !o || a && a.index <= o.index ? a : o;
|
|
1925
|
-
r.push(n), i = n.index + n.value.length, (n === a || a && a.index < i) && (a =
|
|
1925
|
+
r.push(n), i = n.index + n.value.length, (n === a || a && a.index < i) && (a = q(e, t, "value", i, 1)[0]), (n === o || o && o.index < i) && (o = q(e, t, "logic", i, 1)[0]);
|
|
1926
1926
|
}
|
|
1927
1927
|
return r;
|
|
1928
1928
|
}
|
|
1929
|
-
function
|
|
1929
|
+
function Tn(e) {
|
|
1930
1930
|
return typeof e == "string" && e.trim() !== "" ? e : null;
|
|
1931
1931
|
}
|
|
1932
|
+
function En(e) {
|
|
1933
|
+
return Object.values(G).find((t) => t.value.source === e.value.source) ?? null;
|
|
1934
|
+
}
|
|
1932
1935
|
function Dn(e) {
|
|
1933
|
-
return
|
|
1936
|
+
return Tn(e.opener) ?? En(e)?.opener ?? null;
|
|
1934
1937
|
}
|
|
1935
1938
|
function On(e) {
|
|
1936
|
-
return
|
|
1939
|
+
return Tn(e.closer) ?? En(e)?.closer ?? null;
|
|
1937
1940
|
}
|
|
1938
1941
|
function kn(e) {
|
|
1939
|
-
return
|
|
1942
|
+
return e ? typeof e == "string" ? G[e] ?? G.liquid : e : G.liquid;
|
|
1940
1943
|
}
|
|
1941
1944
|
function An(e) {
|
|
1942
|
-
return e ? typeof e == "string" ? W[e] ?? W.liquid : e : W.liquid;
|
|
1943
|
-
}
|
|
1944
|
-
function jn(e) {
|
|
1945
1945
|
let t = e.source, n = e.flags.replace("g", "");
|
|
1946
1946
|
return RegExp(`^${t}$`, n);
|
|
1947
1947
|
}
|
|
1948
|
-
function
|
|
1948
|
+
function jn(e, t) {
|
|
1949
1949
|
let n = e?.trim() || "";
|
|
1950
|
-
return !
|
|
1950
|
+
return !An(t.logic).test(n) && An(t.value).test(n);
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1952
|
+
function Mn(e, t) {
|
|
1953
1953
|
let n = t.find((t) => t.value === e);
|
|
1954
1954
|
return n ? n.label : e;
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1957
|
-
return
|
|
1956
|
+
function Nn(e, t) {
|
|
1957
|
+
return Un(e, "data-merge-tag", (e) => Mn(e, t));
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1959
|
+
function Pn(e, t) {
|
|
1960
1960
|
return t.find((t) => t.value === e)?.sample;
|
|
1961
1961
|
}
|
|
1962
|
-
function
|
|
1963
|
-
return
|
|
1962
|
+
function Fn(e, t) {
|
|
1963
|
+
return Un(e, "data-merge-tag", (e) => Rn(Pn(e, t) ?? Mn(e, t)), { unwrap: (e) => Pn(e, t) !== void 0 });
|
|
1964
1964
|
}
|
|
1965
|
-
function
|
|
1965
|
+
function In(e) {
|
|
1966
1966
|
return e.some((e) => e.sample !== void 0);
|
|
1967
1967
|
}
|
|
1968
|
-
function
|
|
1968
|
+
function Ln(e, t) {
|
|
1969
1969
|
if (!e) return e;
|
|
1970
1970
|
let n = e;
|
|
1971
1971
|
for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
|
|
1972
1972
|
return n;
|
|
1973
1973
|
}
|
|
1974
|
-
function
|
|
1974
|
+
function Rn(e) {
|
|
1975
1975
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1976
1976
|
}
|
|
1977
|
-
function
|
|
1977
|
+
function zn(e, t) {
|
|
1978
1978
|
if (!e) return !1;
|
|
1979
|
-
if (
|
|
1979
|
+
if (K(t)) return q(e, t, "value", 0, 1).length > 0 || q(e, t, "logic", 0, 1).length > 0;
|
|
1980
1980
|
let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
|
|
1981
1981
|
return n.test(e) || r.test(e);
|
|
1982
1982
|
}
|
|
1983
|
-
function
|
|
1984
|
-
return
|
|
1983
|
+
function Bn(e, t) {
|
|
1984
|
+
return An(t.logic).test(e?.trim() || "");
|
|
1985
1985
|
}
|
|
1986
|
-
function
|
|
1986
|
+
function Vn(e, t) {
|
|
1987
1987
|
let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
|
|
1988
1988
|
return r && r[1] ? r[1].toUpperCase() : e;
|
|
1989
1989
|
}
|
|
1990
|
-
function
|
|
1991
|
-
return
|
|
1990
|
+
function Hn(e, t) {
|
|
1991
|
+
return Un(e, "data-logic-merge-tag", (e) => Vn(e, t));
|
|
1992
1992
|
}
|
|
1993
|
-
function
|
|
1993
|
+
function Un(e, t, n, r) {
|
|
1994
1994
|
let i = "", a = 0;
|
|
1995
1995
|
for (; a < e.length;) {
|
|
1996
1996
|
let o = e.indexOf("<span", a);
|
|
@@ -2003,7 +2003,7 @@ function Wn(e, t, n, r) {
|
|
|
2003
2003
|
i += e.substring(a, o + 5), a = o + 5;
|
|
2004
2004
|
continue;
|
|
2005
2005
|
}
|
|
2006
|
-
let { end: c, nextSpan: l } =
|
|
2006
|
+
let { end: c, nextSpan: l } = mn(e, o + 5);
|
|
2007
2007
|
if (l !== -1) {
|
|
2008
2008
|
i += e.substring(a, l), a = l;
|
|
2009
2009
|
continue;
|
|
@@ -2012,7 +2012,7 @@ function Wn(e, t, n, r) {
|
|
|
2012
2012
|
i += e.substring(a);
|
|
2013
2013
|
break;
|
|
2014
2014
|
}
|
|
2015
|
-
let u =
|
|
2015
|
+
let u = _n(e.substring(o + 5, c), t);
|
|
2016
2016
|
if (u === null) {
|
|
2017
2017
|
i += e.substring(a, c + 1), a = c + 1;
|
|
2018
2018
|
continue;
|
|
@@ -2027,14 +2027,14 @@ function Wn(e, t, n, r) {
|
|
|
2027
2027
|
}
|
|
2028
2028
|
return i;
|
|
2029
2029
|
}
|
|
2030
|
-
var
|
|
2030
|
+
var Wn = {
|
|
2031
2031
|
title: ["content"],
|
|
2032
2032
|
paragraph: ["content"]
|
|
2033
2033
|
};
|
|
2034
|
-
function
|
|
2034
|
+
function Gn(e) {
|
|
2035
2035
|
let t = [], n = /<[a-z][\w:-]*\b/gi;
|
|
2036
2036
|
for (; n.exec(e);) {
|
|
2037
|
-
let r =
|
|
2037
|
+
let r = pn(e, n.lastIndex);
|
|
2038
2038
|
if (r < 0) break;
|
|
2039
2039
|
let i = n.lastIndex, a = e.slice(i, r), o = /[^\s"'<>/=]+\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/g;
|
|
2040
2040
|
for (let e; e = o.exec(a);) {
|
|
@@ -2048,12 +2048,12 @@ function Kn(e) {
|
|
|
2048
2048
|
}
|
|
2049
2049
|
return t;
|
|
2050
2050
|
}
|
|
2051
|
-
function
|
|
2052
|
-
let r = n === "html" ?
|
|
2051
|
+
function Kn(e, t, n) {
|
|
2052
|
+
let r = n === "html" ? yn(e) : [], i = n === "html" ? Gn(e) : [], a = r.map((e) => ({
|
|
2053
2053
|
...e,
|
|
2054
2054
|
attribute: !1
|
|
2055
|
-
})), o = 0, s =
|
|
2056
|
-
let c = e.slice(n, r), l = ["logic", "value"], u = s ? l.map((e) =>
|
|
2055
|
+
})), o = 0, s = K(t) !== void 0, c = (n, r) => {
|
|
2056
|
+
let c = e.slice(n, r), l = ["logic", "value"], u = s ? l.map((e) => q(c, t, e, 0, 1)[0]) : [void 0, void 0], d = s ? null : [t.logic, t.value].map((e) => new RegExp(e.source, e.flags.replace(/[gy]/g, "") + "g")), f = 0;
|
|
2057
2057
|
for (; f < c.length;) {
|
|
2058
2058
|
let e = s ? u.flatMap((e) => e ? [e] : []) : d.flatMap((e, t) => {
|
|
2059
2059
|
let n = u[t];
|
|
@@ -2078,20 +2078,20 @@ function qn(e, t, n) {
|
|
|
2078
2078
|
end: ee,
|
|
2079
2079
|
markup: r.value,
|
|
2080
2080
|
attribute: i[o] !== void 0 && p >= i[o].start && ee <= i[o].end
|
|
2081
|
-
}), f = r.index + r.value.length, s) for (let e = 0; e < l.length; e++) u[e] && u[e].index < f && (u[e] =
|
|
2081
|
+
}), f = r.index + r.value.length, s) for (let e = 0; e < l.length; e++) u[e] && u[e].index < f && (u[e] = q(c, t, l[e], f, 1)[0]);
|
|
2082
2082
|
}
|
|
2083
2083
|
}, l = 0;
|
|
2084
2084
|
for (let e of r) c(l, e.start), l = e.end;
|
|
2085
2085
|
return c(l, e.length), a.sort((e, t) => e.start - t.start);
|
|
2086
2086
|
}
|
|
2087
|
-
function
|
|
2087
|
+
function qn(e) {
|
|
2088
2088
|
if (!e.includes("&")) return { text: e };
|
|
2089
2089
|
let t = "", n = [0], r = 0, i = (i) => {
|
|
2090
2090
|
for (t += e.slice(r, i); r < i;) n.push(++r);
|
|
2091
2091
|
};
|
|
2092
2092
|
for (let a of e.matchAll(/&(?:#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g)) {
|
|
2093
2093
|
i(a.index);
|
|
2094
|
-
let e =
|
|
2094
|
+
let e = W(a[0]);
|
|
2095
2095
|
t += e;
|
|
2096
2096
|
for (let t = 1; t < e.length; t++) n.push(-1);
|
|
2097
2097
|
r = a.index + a[0].length, n.push(r);
|
|
@@ -2101,17 +2101,17 @@ function Jn(e) {
|
|
|
2101
2101
|
offsets: n
|
|
2102
2102
|
};
|
|
2103
2103
|
}
|
|
2104
|
-
var
|
|
2105
|
-
function
|
|
2106
|
-
let t = JSON.stringify(e), n =
|
|
2104
|
+
var J = /* @__PURE__ */ new Map(), Jn = 32;
|
|
2105
|
+
function Yn(e) {
|
|
2106
|
+
let t = JSON.stringify(e), n = J.get(t);
|
|
2107
2107
|
if (n === void 0) {
|
|
2108
2108
|
let r = e.map((e) => e.trim()).filter(Boolean).sort((e, t) => t.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
2109
|
-
n = r.length ? RegExp(`(?<![\\p{L}\\p{N}_])(?:${r.join("|")})(?![\\p{L}\\p{N}_])`, "gu") : null,
|
|
2109
|
+
n = r.length ? RegExp(`(?<![\\p{L}\\p{N}_])(?:${r.join("|")})(?![\\p{L}\\p{N}_])`, "gu") : null, J.size >= Jn && J.delete(J.keys().next().value), J.set(t, n);
|
|
2110
2110
|
}
|
|
2111
2111
|
return n;
|
|
2112
2112
|
}
|
|
2113
|
-
function
|
|
2114
|
-
let r = n.length ?
|
|
2113
|
+
function Xn(e, t, n) {
|
|
2114
|
+
let r = n.length ? Yn(n) : null;
|
|
2115
2115
|
if (!r) return [];
|
|
2116
2116
|
let i = [];
|
|
2117
2117
|
if (t === "text") i.push({
|
|
@@ -2120,7 +2120,7 @@ function Zn(e, t, n) {
|
|
|
2120
2120
|
attribute: !1
|
|
2121
2121
|
});
|
|
2122
2122
|
else {
|
|
2123
|
-
i.push(...
|
|
2123
|
+
i.push(...Gn(e).map((e) => ({
|
|
2124
2124
|
...e,
|
|
2125
2125
|
attribute: !0
|
|
2126
2126
|
})));
|
|
@@ -2131,7 +2131,7 @@ function Zn(e, t, n) {
|
|
|
2131
2131
|
end: r.index,
|
|
2132
2132
|
attribute: !1
|
|
2133
2133
|
});
|
|
2134
|
-
let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) :
|
|
2134
|
+
let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) : pn(e, t.lastIndex);
|
|
2135
2135
|
if (a < 0) return [];
|
|
2136
2136
|
n = a + (r[0] === "<!--" ? 3 : 1), t.lastIndex = n;
|
|
2137
2137
|
}
|
|
@@ -2144,7 +2144,7 @@ function Zn(e, t, n) {
|
|
|
2144
2144
|
let a = [];
|
|
2145
2145
|
for (let n of i) {
|
|
2146
2146
|
r.lastIndex = 0;
|
|
2147
|
-
let i = e.slice(n.start, n.end), o = t === "html" ?
|
|
2147
|
+
let i = e.slice(n.start, n.end), o = t === "html" ? qn(i) : {
|
|
2148
2148
|
text: i,
|
|
2149
2149
|
offsets: void 0
|
|
2150
2150
|
};
|
|
@@ -2163,40 +2163,40 @@ function Zn(e, t, n) {
|
|
|
2163
2163
|
}
|
|
2164
2164
|
return a;
|
|
2165
2165
|
}
|
|
2166
|
-
function
|
|
2167
|
-
let i =
|
|
2166
|
+
function Zn(e, t, n, r) {
|
|
2167
|
+
let i = Kn(e, t, n), a = Xn(e, n, r?.doNotTranslate ?? []).filter((e) => !i.some((t) => e.start < t.end && e.end > t.start));
|
|
2168
2168
|
return [...i, ...a].sort((e, t) => e.start - t.start);
|
|
2169
2169
|
}
|
|
2170
|
-
function
|
|
2170
|
+
function Qn(e, t, n) {
|
|
2171
2171
|
let r = "", i = 0;
|
|
2172
2172
|
return t.forEach((t, a) => {
|
|
2173
2173
|
r += e.slice(i, t.start), r += t.attribute ? `__x${n[a]}__` : `<x id="${n[a]}"/>`, i = t.end;
|
|
2174
2174
|
}), r + e.slice(i);
|
|
2175
2175
|
}
|
|
2176
|
-
function
|
|
2177
|
-
let i =
|
|
2176
|
+
function $n(e, t, n, r) {
|
|
2177
|
+
let i = Zn(e, t, n, r);
|
|
2178
2178
|
return {
|
|
2179
|
-
text:
|
|
2179
|
+
text: Qn(e, i, i.map((e, t) => t + 1)),
|
|
2180
2180
|
tokens: i.map((e) => e.markup)
|
|
2181
2181
|
};
|
|
2182
2182
|
}
|
|
2183
|
-
function
|
|
2183
|
+
function er(e, t) {
|
|
2184
2184
|
let n = /* @__PURE__ */ new Set(), r = !0, i = e.replace(/<x id="(\d+)"\s*\/>|<x id="(\d+)"><\/x>|__x(\d+)__/g, (e, i, a, o) => {
|
|
2185
2185
|
let s = Number(i ?? a ?? o);
|
|
2186
2186
|
return (s < 1 || s > t.length || n.has(s)) && (r = !1), n.add(s), t[s - 1] ?? "";
|
|
2187
2187
|
});
|
|
2188
2188
|
return r && n.size === t.length ? i : null;
|
|
2189
2189
|
}
|
|
2190
|
-
function
|
|
2191
|
-
let a =
|
|
2190
|
+
function tr(e, t, n, r, i) {
|
|
2191
|
+
let a = Zn(e, n, r, i), o = /* @__PURE__ */ new Set(), s = (e) => {
|
|
2192
2192
|
let n = t.findIndex((t, n) => !o.has(n) && e(t));
|
|
2193
2193
|
return n >= 0 && o.add(n), n;
|
|
2194
2194
|
}, c = a.map((e) => s((t) => t === e.markup));
|
|
2195
2195
|
return a.forEach((e, t) => {
|
|
2196
|
-
c[t] < 0 && e.term !== void 0 && r === "html" && (c[t] = s((t) =>
|
|
2197
|
-
}), o.size !== t.length || a.some((e, t) => c[t] < 0 && e.term === void 0) ? null :
|
|
2196
|
+
c[t] < 0 && e.term !== void 0 && r === "html" && (c[t] = s((t) => W(t) === e.term));
|
|
2197
|
+
}), o.size !== t.length || a.some((e, t) => c[t] < 0 && e.term === void 0) ? null : Qn(e, a.filter((e, t) => c[t] >= 0), c.filter((e) => e >= 0).map((e) => e + 1));
|
|
2198
2198
|
}
|
|
2199
|
-
function
|
|
2199
|
+
function nr(e, t, n = []) {
|
|
2200
2200
|
let r = /* @__PURE__ */ new Map();
|
|
2201
2201
|
if (t === C(e) || !e.settings.locales?.includes(t)) return r;
|
|
2202
2202
|
let i = (e, n, i, a) => {
|
|
@@ -2209,7 +2209,7 @@ function rr(e, t, n = []) {
|
|
|
2209
2209
|
target: e,
|
|
2210
2210
|
path: t,
|
|
2211
2211
|
source: i,
|
|
2212
|
-
format: a &&
|
|
2212
|
+
format: a && Wn[a]?.includes(t) ? "html" : "text",
|
|
2213
2213
|
text: o?.text?.[t]
|
|
2214
2214
|
});
|
|
2215
2215
|
}
|
|
@@ -2224,11 +2224,11 @@ function rr(e, t, n = []) {
|
|
|
2224
2224
|
};
|
|
2225
2225
|
return a(e.blocks), i({ kind: "settings" }, e.settings, g), r;
|
|
2226
2226
|
}
|
|
2227
|
-
function
|
|
2227
|
+
function rr(e, t, n) {
|
|
2228
2228
|
let r = n.only === "all" ? null : Pe(e, t, n.definitions), i = r && /* @__PURE__ */ new Set([...r.missing, ...r.stale]), a = [], o = {};
|
|
2229
|
-
for (let [r, s] of
|
|
2229
|
+
for (let [r, s] of nr(e, t, n.definitions)) {
|
|
2230
2230
|
if (i && !i.has(r) || n.blockId !== void 0 && (s.target.kind !== "block" || s.target.blockId !== n.blockId)) continue;
|
|
2231
|
-
let e =
|
|
2231
|
+
let e = $n(s.source, n.syntax, s.format, n), t = s.text ? tr(s.text.value, e.tokens, n.syntax, s.format, n) : void 0;
|
|
2232
2232
|
a.push({
|
|
2233
2233
|
id: r,
|
|
2234
2234
|
format: s.format,
|
|
@@ -2242,8 +2242,8 @@ function ir(e, t, n) {
|
|
|
2242
2242
|
tokens: o
|
|
2243
2243
|
};
|
|
2244
2244
|
}
|
|
2245
|
-
function
|
|
2246
|
-
let i =
|
|
2245
|
+
function ir(e, t, n, r) {
|
|
2246
|
+
let i = nr(e, t, r.definitions), a = /* @__PURE__ */ new Map(), o = (e) => {
|
|
2247
2247
|
for (let t of e) if (a.set(t.id, t), t.type === "section") for (let e of t.children) o(e);
|
|
2248
2248
|
else t.type === "wrapper" && o(t.children);
|
|
2249
2249
|
};
|
|
@@ -2259,8 +2259,8 @@ function ar(e, t, n, r) {
|
|
|
2259
2259
|
});
|
|
2260
2260
|
continue;
|
|
2261
2261
|
}
|
|
2262
|
-
let o = Object.hasOwn(r.tokens, t.id) ? r.tokens[t.id] : void 0, u = o ?
|
|
2263
|
-
if (!o || u === null ||
|
|
2262
|
+
let o = Object.hasOwn(r.tokens, t.id) ? r.tokens[t.id] : void 0, u = o ? er(t.text, o) : null;
|
|
2263
|
+
if (!o || u === null || tr(u, o, r.syntax, n.format, r) === null) {
|
|
2264
2264
|
l.push({
|
|
2265
2265
|
id: t.id,
|
|
2266
2266
|
reason: "tags_changed"
|
|
@@ -2289,25 +2289,28 @@ function ar(e, t, n, r) {
|
|
|
2289
2289
|
rejected: l
|
|
2290
2290
|
};
|
|
2291
2291
|
}
|
|
2292
|
-
|
|
2292
|
+
var ar = 1e7, or = 2e3;
|
|
2293
|
+
function sr(e) {
|
|
2293
2294
|
return new e.Liquid({
|
|
2294
2295
|
strictVariables: !1,
|
|
2295
2296
|
strictFilters: !1,
|
|
2296
2297
|
outputEscape: "escape",
|
|
2298
|
+
memoryLimit: ar,
|
|
2299
|
+
renderLimit: or,
|
|
2297
2300
|
templates: {}
|
|
2298
2301
|
});
|
|
2299
2302
|
}
|
|
2300
|
-
function
|
|
2303
|
+
function Y(e, t) {
|
|
2301
2304
|
let n = m(e);
|
|
2302
|
-
return !t || Object.keys(t).length === 0 ? n :
|
|
2305
|
+
return !t || Object.keys(t).length === 0 ? n : on(n, t);
|
|
2303
2306
|
}
|
|
2304
|
-
function
|
|
2307
|
+
function X(e) {
|
|
2305
2308
|
return e === void 0 ? void 0 : m(e);
|
|
2306
2309
|
}
|
|
2307
|
-
function
|
|
2310
|
+
function Z() {
|
|
2308
2311
|
return crypto.randomUUID();
|
|
2309
2312
|
}
|
|
2310
|
-
function
|
|
2313
|
+
function cr(e = 0) {
|
|
2311
2314
|
return {
|
|
2312
2315
|
top: e,
|
|
2313
2316
|
right: e,
|
|
@@ -2315,135 +2318,135 @@ function sr(e = 0) {
|
|
|
2315
2318
|
left: e
|
|
2316
2319
|
};
|
|
2317
2320
|
}
|
|
2318
|
-
function
|
|
2319
|
-
return { padding:
|
|
2321
|
+
function Q(e = 10) {
|
|
2322
|
+
return { padding: cr(e) };
|
|
2320
2323
|
}
|
|
2321
|
-
function
|
|
2322
|
-
return
|
|
2323
|
-
id:
|
|
2324
|
+
function lr(e = {}) {
|
|
2325
|
+
return Y({
|
|
2326
|
+
id: Z(),
|
|
2324
2327
|
type: "title",
|
|
2325
|
-
...
|
|
2326
|
-
styles:
|
|
2328
|
+
...Ut,
|
|
2329
|
+
styles: Q()
|
|
2327
2330
|
}, e);
|
|
2328
2331
|
}
|
|
2329
|
-
function
|
|
2330
|
-
return
|
|
2331
|
-
id:
|
|
2332
|
+
function ur(e = {}) {
|
|
2333
|
+
return Y({
|
|
2334
|
+
id: Z(),
|
|
2332
2335
|
type: "paragraph",
|
|
2333
|
-
...
|
|
2334
|
-
styles:
|
|
2336
|
+
...Wt,
|
|
2337
|
+
styles: Q()
|
|
2335
2338
|
}, e);
|
|
2336
2339
|
}
|
|
2337
|
-
function
|
|
2338
|
-
return
|
|
2339
|
-
id:
|
|
2340
|
+
function dr(e = {}) {
|
|
2341
|
+
return Y({
|
|
2342
|
+
id: Z(),
|
|
2340
2343
|
type: "image",
|
|
2341
|
-
...
|
|
2342
|
-
styles:
|
|
2344
|
+
...Gt,
|
|
2345
|
+
styles: Q()
|
|
2343
2346
|
}, e);
|
|
2344
2347
|
}
|
|
2345
|
-
function
|
|
2346
|
-
return
|
|
2347
|
-
id:
|
|
2348
|
+
function fr(e = {}) {
|
|
2349
|
+
return Y({
|
|
2350
|
+
id: Z(),
|
|
2348
2351
|
type: "button",
|
|
2349
|
-
...
|
|
2350
|
-
styles:
|
|
2352
|
+
...Kt,
|
|
2353
|
+
styles: Q()
|
|
2351
2354
|
}, e);
|
|
2352
2355
|
}
|
|
2353
|
-
function
|
|
2354
|
-
return
|
|
2355
|
-
id:
|
|
2356
|
+
function pr(e = {}) {
|
|
2357
|
+
return Y({
|
|
2358
|
+
id: Z(),
|
|
2356
2359
|
type: "divider",
|
|
2357
|
-
...
|
|
2358
|
-
styles:
|
|
2360
|
+
...qt,
|
|
2361
|
+
styles: Q(20)
|
|
2359
2362
|
}, e);
|
|
2360
2363
|
}
|
|
2361
|
-
function
|
|
2362
|
-
return
|
|
2363
|
-
id:
|
|
2364
|
+
function mr(e = {}) {
|
|
2365
|
+
return Y({
|
|
2366
|
+
id: Z(),
|
|
2364
2367
|
type: "section",
|
|
2365
|
-
...
|
|
2368
|
+
...Jt,
|
|
2366
2369
|
children: [[]],
|
|
2367
|
-
styles:
|
|
2370
|
+
styles: Q(20)
|
|
2368
2371
|
}, e);
|
|
2369
2372
|
}
|
|
2370
|
-
function
|
|
2371
|
-
return
|
|
2372
|
-
id:
|
|
2373
|
+
function hr(e = {}) {
|
|
2374
|
+
return Y({
|
|
2375
|
+
id: Z(),
|
|
2373
2376
|
type: "video",
|
|
2374
|
-
...
|
|
2375
|
-
styles:
|
|
2377
|
+
...Yt,
|
|
2378
|
+
styles: Q()
|
|
2376
2379
|
}, e);
|
|
2377
2380
|
}
|
|
2378
|
-
function
|
|
2379
|
-
return
|
|
2380
|
-
id:
|
|
2381
|
+
function gr(e = {}) {
|
|
2382
|
+
return Y({
|
|
2383
|
+
id: Z(),
|
|
2381
2384
|
type: "social",
|
|
2382
2385
|
icons: [],
|
|
2383
|
-
...
|
|
2384
|
-
styles:
|
|
2386
|
+
...Xt,
|
|
2387
|
+
styles: Q()
|
|
2385
2388
|
}, e);
|
|
2386
2389
|
}
|
|
2387
|
-
function
|
|
2388
|
-
return
|
|
2389
|
-
id:
|
|
2390
|
+
function _r(e = {}) {
|
|
2391
|
+
return Y({
|
|
2392
|
+
id: Z(),
|
|
2390
2393
|
type: "spacer",
|
|
2391
|
-
...
|
|
2392
|
-
styles:
|
|
2394
|
+
...Zt,
|
|
2395
|
+
styles: Q(0)
|
|
2393
2396
|
}, e);
|
|
2394
2397
|
}
|
|
2395
|
-
function
|
|
2396
|
-
return
|
|
2397
|
-
id:
|
|
2398
|
+
function vr(e = {}) {
|
|
2399
|
+
return Y({
|
|
2400
|
+
id: Z(),
|
|
2398
2401
|
type: "html",
|
|
2399
|
-
|
|
2400
|
-
styles:
|
|
2402
|
+
...Qt,
|
|
2403
|
+
styles: Q()
|
|
2401
2404
|
}, e);
|
|
2402
2405
|
}
|
|
2403
|
-
function
|
|
2404
|
-
return
|
|
2405
|
-
id:
|
|
2406
|
+
function yr(e = {}) {
|
|
2407
|
+
return Y({
|
|
2408
|
+
id: Z(),
|
|
2406
2409
|
type: "menu",
|
|
2407
2410
|
items: [],
|
|
2408
|
-
|
|
2409
|
-
styles:
|
|
2411
|
+
...$t,
|
|
2412
|
+
styles: Q()
|
|
2410
2413
|
}, e);
|
|
2411
2414
|
}
|
|
2412
|
-
function
|
|
2415
|
+
function br(e, t) {
|
|
2413
2416
|
return Array.from({ length: t }, () => ({
|
|
2414
|
-
id:
|
|
2417
|
+
id: Z(),
|
|
2415
2418
|
cells: Array.from({ length: e }, () => ({
|
|
2416
|
-
id:
|
|
2419
|
+
id: Z(),
|
|
2417
2420
|
content: ""
|
|
2418
2421
|
}))
|
|
2419
2422
|
}));
|
|
2420
2423
|
}
|
|
2421
|
-
function
|
|
2422
|
-
return
|
|
2423
|
-
id:
|
|
2424
|
+
function xr(e = {}) {
|
|
2425
|
+
return Y({
|
|
2426
|
+
id: Z(),
|
|
2424
2427
|
type: "table",
|
|
2425
|
-
rows:
|
|
2426
|
-
...
|
|
2427
|
-
styles:
|
|
2428
|
+
rows: br(3, 3),
|
|
2429
|
+
...en,
|
|
2430
|
+
styles: Q()
|
|
2428
2431
|
}, e);
|
|
2429
2432
|
}
|
|
2430
|
-
function
|
|
2431
|
-
return
|
|
2432
|
-
id:
|
|
2433
|
+
function Sr(e = {}) {
|
|
2434
|
+
return Y({
|
|
2435
|
+
id: Z(),
|
|
2433
2436
|
type: "countdown",
|
|
2434
|
-
...
|
|
2435
|
-
styles:
|
|
2437
|
+
...tn,
|
|
2438
|
+
styles: Q()
|
|
2436
2439
|
}, e);
|
|
2437
2440
|
}
|
|
2438
|
-
function
|
|
2441
|
+
function Cr(e) {
|
|
2439
2442
|
return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
|
|
2440
2443
|
}
|
|
2441
|
-
function
|
|
2444
|
+
function wr(e) {
|
|
2442
2445
|
let t = {};
|
|
2443
|
-
for (let n of e.fields) t[n.key] =
|
|
2444
|
-
let n =
|
|
2446
|
+
for (let n of e.fields) t[n.key] = X(Cr(n));
|
|
2447
|
+
let n = Y(Q(), X(e.defaultStyles));
|
|
2445
2448
|
return {
|
|
2446
|
-
id:
|
|
2449
|
+
id: Z(),
|
|
2447
2450
|
type: "custom",
|
|
2448
2451
|
customType: e.type,
|
|
2449
2452
|
fieldValues: t,
|
|
@@ -2451,42 +2454,42 @@ function Cr(e) {
|
|
|
2451
2454
|
...e.dataSource ? { dataSourceFetched: !1 } : {}
|
|
2452
2455
|
};
|
|
2453
2456
|
}
|
|
2454
|
-
function
|
|
2457
|
+
function Tr() {
|
|
2455
2458
|
return {
|
|
2456
|
-
id:
|
|
2459
|
+
id: Z(),
|
|
2457
2460
|
type: "slot",
|
|
2458
|
-
styles:
|
|
2461
|
+
styles: Q(0)
|
|
2459
2462
|
};
|
|
2460
2463
|
}
|
|
2461
|
-
function
|
|
2462
|
-
return
|
|
2463
|
-
id:
|
|
2464
|
+
function Er(e = {}) {
|
|
2465
|
+
return Y({
|
|
2466
|
+
id: Z(),
|
|
2464
2467
|
type: "wrapper",
|
|
2465
2468
|
children: [],
|
|
2466
|
-
styles:
|
|
2469
|
+
styles: Q(0)
|
|
2467
2470
|
}, e);
|
|
2468
2471
|
}
|
|
2469
|
-
function
|
|
2472
|
+
function Dr(e, t) {
|
|
2470
2473
|
switch (e) {
|
|
2471
|
-
case "section": return
|
|
2472
|
-
case "title": return
|
|
2473
|
-
case "paragraph": return
|
|
2474
|
-
case "image": return
|
|
2475
|
-
case "button": return
|
|
2476
|
-
case "divider": return
|
|
2477
|
-
case "video": return
|
|
2478
|
-
case "social": return
|
|
2479
|
-
case "spacer": return
|
|
2480
|
-
case "html": return
|
|
2481
|
-
case "menu": return
|
|
2482
|
-
case "table": return
|
|
2483
|
-
case "countdown": return
|
|
2474
|
+
case "section": return mr(X(t?.section));
|
|
2475
|
+
case "title": return lr(X(t?.title));
|
|
2476
|
+
case "paragraph": return ur(X(t?.paragraph));
|
|
2477
|
+
case "image": return dr(X(t?.image));
|
|
2478
|
+
case "button": return fr(X(t?.button));
|
|
2479
|
+
case "divider": return pr(X(t?.divider));
|
|
2480
|
+
case "video": return hr(X(t?.video));
|
|
2481
|
+
case "social": return gr(X(t?.social));
|
|
2482
|
+
case "spacer": return _r(X(t?.spacer));
|
|
2483
|
+
case "html": return vr(X(t?.html));
|
|
2484
|
+
case "menu": return yr(X(t?.menu));
|
|
2485
|
+
case "table": return xr(X(t?.table));
|
|
2486
|
+
case "countdown": return Sr(X(t?.countdown));
|
|
2484
2487
|
case "slot": throw Error("[Templatical] slot cannot be inserted into content. Use createSlotBlock() to build a layout.");
|
|
2485
2488
|
case "wrapper": throw Error("[Templatical] wrapper cannot be inserted into content. Use createWrapperBlock() to build a layout.");
|
|
2486
2489
|
default: throw Error(`Unknown block type: ${e}`);
|
|
2487
2490
|
}
|
|
2488
2491
|
}
|
|
2489
|
-
function
|
|
2492
|
+
function Or(e, t) {
|
|
2490
2493
|
let n = e.l10n;
|
|
2491
2494
|
if (!n || t.size === 0) return;
|
|
2492
2495
|
let r = (n) => {
|
|
@@ -2501,91 +2504,95 @@ function Dr(e, t) {
|
|
|
2501
2504
|
n && (e[t] = Object.fromEntries(Object.entries(n).map(([e, t]) => [r(e), t])));
|
|
2502
2505
|
}
|
|
2503
2506
|
}
|
|
2504
|
-
function
|
|
2505
|
-
let t = JSON.parse(JSON.stringify(e))
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2507
|
+
function kr(e) {
|
|
2508
|
+
let t = JSON.parse(JSON.stringify(e)), n = (e) => {
|
|
2509
|
+
e.id = Z();
|
|
2510
|
+
let t = /* @__PURE__ */ new Map(), r = (e, n) => {
|
|
2511
|
+
let r = e.id;
|
|
2512
|
+
e.id = Z();
|
|
2513
|
+
let i = t.get(n);
|
|
2514
|
+
return i || (i = /* @__PURE__ */ new Map(), t.set(n, i)), i.set(r, e.id), r;
|
|
2515
|
+
};
|
|
2516
|
+
if (e.type === "table") for (let t of e.rows) {
|
|
2517
|
+
let e = r(t, "rows");
|
|
2518
|
+
for (let n of t.cells) r(n, `rows.${e}.cells`);
|
|
2519
|
+
}
|
|
2520
|
+
if (e.type === "menu") for (let t of e.items) r(t, "items");
|
|
2521
|
+
if (e.type === "social") for (let t of e.icons) r(t, "icons");
|
|
2522
|
+
if (e.type === "section") for (let t of e.children) for (let e of t) n(e);
|
|
2523
|
+
if (e.type === "wrapper") for (let t of e.children) n(t);
|
|
2524
|
+
Or(e, t);
|
|
2512
2525
|
};
|
|
2513
|
-
|
|
2514
|
-
let t = r(e, "rows");
|
|
2515
|
-
for (let n of e.cells) r(n, `rows.${t}.cells`);
|
|
2516
|
-
}
|
|
2517
|
-
if (t.type === "menu") for (let e of t.items) r(e, "items");
|
|
2518
|
-
if (t.type === "social") for (let e of t.icons) r(e, "icons");
|
|
2519
|
-
return t.type === "section" && (t.children = t.children.map((e) => e.map((e) => Q(e)))), t.type === "wrapper" && (t.children = t.children.map((e) => Q(e))), Dr(t, n), t;
|
|
2526
|
+
return n(t), t;
|
|
2520
2527
|
}
|
|
2521
|
-
var
|
|
2528
|
+
var Ar = "[Templatical] layout: must contain exactly one slot block", jr = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", Mr = "[Templatical] layout: a wrapper cannot contain a wrapper", Nr = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", Pr = "[Templatical] slot is not a valid content block", Fr = "[Templatical] layout: a wrapper cannot contain a section with its own wrapper (section.wrapper)", Ir = "[Templatical] wrapper is not a valid content block";
|
|
2522
2529
|
function $(e, t, n = null, r = !1, i = !1) {
|
|
2523
|
-
for (let a of e) if (t(a, n, r, i),
|
|
2524
|
-
else
|
|
2530
|
+
for (let a of e) if (t(a, n, r, i), B(a)) for (let e of a.children) $(e, t, a, !0, i);
|
|
2531
|
+
else H(a) && $(a.children, t, a, r, !0);
|
|
2525
2532
|
}
|
|
2526
|
-
function
|
|
2533
|
+
function Lr(e) {
|
|
2527
2534
|
let t = 0;
|
|
2528
2535
|
if ($(e.blocks, (e, n, r, i) => {
|
|
2529
|
-
if (i &&
|
|
2530
|
-
if (
|
|
2531
|
-
if (
|
|
2532
|
-
if (r) throw Error(
|
|
2533
|
-
if (e.children.some(
|
|
2536
|
+
if (i && B(e) && e.wrapper) throw Error(Fr);
|
|
2537
|
+
if (V(e) && (t += 1, r)) throw Error(jr);
|
|
2538
|
+
if (H(e)) {
|
|
2539
|
+
if (r) throw Error(jr);
|
|
2540
|
+
if (e.children.some(H)) throw Error(Mr);
|
|
2534
2541
|
}
|
|
2535
|
-
}), t !== 1) throw Error(
|
|
2542
|
+
}), t !== 1) throw Error(Ar);
|
|
2536
2543
|
}
|
|
2537
|
-
function
|
|
2544
|
+
function Rr(e) {
|
|
2538
2545
|
$(e.blocks, (e) => {
|
|
2539
|
-
if (
|
|
2546
|
+
if (V(e)) throw Error(Pr);
|
|
2540
2547
|
});
|
|
2541
2548
|
}
|
|
2542
|
-
function
|
|
2549
|
+
function zr(e) {
|
|
2543
2550
|
$(e.blocks, (e) => {
|
|
2544
|
-
if (
|
|
2551
|
+
if (H(e)) throw Error(Ir);
|
|
2545
2552
|
});
|
|
2546
2553
|
}
|
|
2547
|
-
function
|
|
2554
|
+
function Br(e) {
|
|
2548
2555
|
let t = !1;
|
|
2549
2556
|
return $(e.blocks, (e, n) => {
|
|
2550
|
-
|
|
2557
|
+
V(e) && n !== null && H(n) && (t = !0);
|
|
2551
2558
|
}), t;
|
|
2552
2559
|
}
|
|
2553
|
-
function
|
|
2554
|
-
if (
|
|
2555
|
-
if (
|
|
2556
|
-
let t =
|
|
2560
|
+
function Vr(e) {
|
|
2561
|
+
if (V(e)) return e;
|
|
2562
|
+
if (H(e)) {
|
|
2563
|
+
let t = kr({
|
|
2557
2564
|
...e,
|
|
2558
2565
|
children: []
|
|
2559
2566
|
});
|
|
2560
|
-
return t.children = e.children.map(
|
|
2567
|
+
return t.children = e.children.map(Vr), t;
|
|
2561
2568
|
}
|
|
2562
|
-
return
|
|
2569
|
+
return kr(e);
|
|
2563
2570
|
}
|
|
2564
|
-
function
|
|
2571
|
+
function Hr(e) {
|
|
2565
2572
|
for (let t = 0; t < e.length; t++) {
|
|
2566
2573
|
let n = e[t];
|
|
2567
|
-
if (
|
|
2574
|
+
if (V(n)) return {
|
|
2568
2575
|
parent: e,
|
|
2569
2576
|
index: t
|
|
2570
2577
|
};
|
|
2571
|
-
if (
|
|
2572
|
-
let e =
|
|
2578
|
+
if (H(n)) {
|
|
2579
|
+
let e = Hr(n.children);
|
|
2573
2580
|
if (e) return e;
|
|
2574
2581
|
}
|
|
2575
2582
|
}
|
|
2576
2583
|
return null;
|
|
2577
2584
|
}
|
|
2578
|
-
function
|
|
2579
|
-
for (let t of e) if (
|
|
2585
|
+
function Ur(e) {
|
|
2586
|
+
for (let t of e) if (B(t)) {
|
|
2580
2587
|
if (t.wrapper) return !0;
|
|
2581
|
-
for (let e of t.children) if (
|
|
2588
|
+
for (let e of t.children) if (Ur(e)) return !0;
|
|
2582
2589
|
}
|
|
2583
2590
|
return !1;
|
|
2584
2591
|
}
|
|
2585
|
-
function
|
|
2586
|
-
if (
|
|
2587
|
-
let n = e.blocks.map(
|
|
2588
|
-
if (!r) throw Error(
|
|
2592
|
+
function Wr(e, t) {
|
|
2593
|
+
if (Lr(e), Rr(t), zr(t), Br(e) && Ur(t.blocks)) throw Error(Nr);
|
|
2594
|
+
let n = e.blocks.map(Vr), r = Hr(n);
|
|
2595
|
+
if (!r) throw Error(Ar);
|
|
2589
2596
|
return r.parent.splice(r.index, 1, ...m(t.blocks)), {
|
|
2590
2597
|
blocks: n,
|
|
2591
2598
|
settings: {
|
|
@@ -2594,7 +2601,7 @@ function Hr(e, t) {
|
|
|
2594
2601
|
}
|
|
2595
2602
|
};
|
|
2596
2603
|
}
|
|
2597
|
-
var
|
|
2604
|
+
var Gr = Object.freeze([
|
|
2598
2605
|
"http",
|
|
2599
2606
|
"https",
|
|
2600
2607
|
"mailto",
|
|
@@ -2610,37 +2617,37 @@ Object.freeze([
|
|
|
2610
2617
|
"data",
|
|
2611
2618
|
"vbscript"
|
|
2612
2619
|
]);
|
|
2613
|
-
function
|
|
2620
|
+
function Kr(e) {
|
|
2614
2621
|
return e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2615
2622
|
}
|
|
2616
|
-
function
|
|
2617
|
-
let t = /^([a-z][a-z0-9+.-]*):/i.exec(
|
|
2623
|
+
function qr(e) {
|
|
2624
|
+
let t = /^([a-z][a-z0-9+.-]*):/i.exec(Kr(e));
|
|
2618
2625
|
return t ? t[1].toLowerCase() : null;
|
|
2619
2626
|
}
|
|
2620
|
-
var
|
|
2627
|
+
var Jr = /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i, Yr = Object.freeze([
|
|
2621
2628
|
"href",
|
|
2622
2629
|
"xlink:href",
|
|
2623
2630
|
"background",
|
|
2624
2631
|
"poster",
|
|
2625
2632
|
"src"
|
|
2626
|
-
]),
|
|
2633
|
+
]), Xr = Object.freeze([
|
|
2627
2634
|
"srcdoc",
|
|
2628
2635
|
"ping",
|
|
2629
2636
|
"formaction",
|
|
2630
2637
|
"action"
|
|
2631
2638
|
]);
|
|
2632
|
-
function
|
|
2633
|
-
let n =
|
|
2634
|
-
return r === null ||
|
|
2639
|
+
function Zr(e, t) {
|
|
2640
|
+
let n = Kr(e), r = qr(n);
|
|
2641
|
+
return r === null || Gr.some((e) => e === r) ? !0 : t.toLowerCase() === "src" && Jr.test(n);
|
|
2635
2642
|
}
|
|
2636
|
-
var
|
|
2637
|
-
function
|
|
2638
|
-
return e.replace(
|
|
2643
|
+
var Qr = /<\/?p\b[^<>]*>/gi, $r = /<p\b([^<>]*)>\s*<\/p>/gi;
|
|
2644
|
+
function ei(e) {
|
|
2645
|
+
return e.replace(Qr, "").trim() === "";
|
|
2639
2646
|
}
|
|
2640
|
-
function
|
|
2641
|
-
return
|
|
2647
|
+
function ti(e) {
|
|
2648
|
+
return ei(e) ? e : e.replace($r, "<p$1> </p>");
|
|
2642
2649
|
}
|
|
2643
|
-
var
|
|
2650
|
+
var ni = {
|
|
2644
2651
|
arial: "Arial, sans-serif",
|
|
2645
2652
|
helvetica: "Helvetica, sans-serif",
|
|
2646
2653
|
georgia: "Georgia, serif",
|
|
@@ -2649,13 +2656,13 @@ var ei = {
|
|
|
2649
2656
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2650
2657
|
"courier new": "'Courier New', monospace",
|
|
2651
2658
|
tahoma: "Tahoma, sans-serif"
|
|
2652
|
-
},
|
|
2659
|
+
}, ri = /* @__PURE__ */ new Set([
|
|
2653
2660
|
"inherit",
|
|
2654
2661
|
"initial",
|
|
2655
2662
|
"unset",
|
|
2656
2663
|
"revert",
|
|
2657
2664
|
"revert-layer"
|
|
2658
|
-
]),
|
|
2665
|
+
]), ii = /* @__PURE__ */ new Set([
|
|
2659
2666
|
"serif",
|
|
2660
2667
|
"sans-serif",
|
|
2661
2668
|
"monospace",
|
|
@@ -2670,14 +2677,14 @@ var ei = {
|
|
|
2670
2677
|
"math",
|
|
2671
2678
|
"fangsong"
|
|
2672
2679
|
]);
|
|
2673
|
-
function
|
|
2680
|
+
function ai(e) {
|
|
2674
2681
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
2675
2682
|
}
|
|
2676
|
-
function
|
|
2683
|
+
function oi(e) {
|
|
2677
2684
|
if (typeof e != "string") return [];
|
|
2678
2685
|
let t = e.replace(/!\s*important\s*$/i, ""), n = [], r = 0;
|
|
2679
2686
|
for (;;) {
|
|
2680
|
-
for (; r < t.length &&
|
|
2687
|
+
for (; r < t.length && ai(t[r]);) r++;
|
|
2681
2688
|
if (r >= t.length) return [];
|
|
2682
2689
|
let e = t[r];
|
|
2683
2690
|
if (e === "\"" || e === "'") {
|
|
@@ -2694,7 +2701,7 @@ function ii(e) {
|
|
|
2694
2701
|
}
|
|
2695
2702
|
}
|
|
2696
2703
|
if (!o) return [];
|
|
2697
|
-
for (; a < t.length &&
|
|
2704
|
+
for (; a < t.length && ai(t[a]);) a++;
|
|
2698
2705
|
if (a < t.length && t[a] !== ",") return [];
|
|
2699
2706
|
n.push({
|
|
2700
2707
|
name: i,
|
|
@@ -2702,7 +2709,7 @@ function ii(e) {
|
|
|
2702
2709
|
}), r = a;
|
|
2703
2710
|
} else {
|
|
2704
2711
|
let e = t.indexOf(",", r), i = e === -1 ? t.length : e, a = t.slice(r, i).trim().split(/\s+/).join(" ");
|
|
2705
|
-
if (a === "" || a.includes("\"") || a.includes("'") ||
|
|
2712
|
+
if (a === "" || a.includes("\"") || a.includes("'") || ri.has(a.toLowerCase())) return [];
|
|
2706
2713
|
n.push({
|
|
2707
2714
|
name: a,
|
|
2708
2715
|
quoted: !1
|
|
@@ -2712,26 +2719,26 @@ function ii(e) {
|
|
|
2712
2719
|
r++;
|
|
2713
2720
|
}
|
|
2714
2721
|
}
|
|
2715
|
-
function
|
|
2722
|
+
function si(e) {
|
|
2716
2723
|
return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
2717
2724
|
}
|
|
2718
|
-
function
|
|
2719
|
-
return !e.quoted &&
|
|
2725
|
+
function ci(e) {
|
|
2726
|
+
return !e.quoted && ii.has(e.name.toLowerCase());
|
|
2720
2727
|
}
|
|
2721
|
-
function
|
|
2722
|
-
return
|
|
2728
|
+
function li(e) {
|
|
2729
|
+
return oi(e)[0]?.name ?? "";
|
|
2723
2730
|
}
|
|
2724
|
-
function
|
|
2725
|
-
let n = (e) => `${
|
|
2731
|
+
function ui(e, t) {
|
|
2732
|
+
let n = (e) => `${si(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
|
|
2726
2733
|
if (i) return n(i);
|
|
2727
|
-
let a =
|
|
2734
|
+
let a = oi(e);
|
|
2728
2735
|
if (a.length !== 1) return e;
|
|
2729
2736
|
let [o] = a, s = o.name.toLowerCase(), c = t.customFonts.find((e) => e.name.toLowerCase() === s);
|
|
2730
|
-
return c ? n(c) :
|
|
2737
|
+
return c ? n(c) : ni[s] || (ci(o) ? e : `${si(o.name)}, ${t.defaultFallback}`);
|
|
2731
2738
|
}
|
|
2732
|
-
function
|
|
2739
|
+
function di(e) {
|
|
2733
2740
|
if (typeof e != "object" || !e) return !1;
|
|
2734
2741
|
let t = e;
|
|
2735
2742
|
return Array.isArray(t.blocks);
|
|
2736
2743
|
}
|
|
2737
|
-
export {
|
|
2744
|
+
export { W as $, fe as $t, kr as A, H as At, vr as B, vn as Bt, ir as C, di as Ct, zr as D, V as Dt, Rr as E, B as Et, Sr as F, Oe as Ft, Be as G, Hn as Gt, yr as H, un as Ht, wr as I, oi as It, _r as J, kn as Jt, Tr as K, Nn as Kt, sr as L, xe as Lt, ee as M, Pe as Mt, Dr as N, Fe as Nt, j as O, Se as Ot, fr as P, rr as Pt, Er as Q, ue as Qt, sn as R, Ce as Rt, Wr as S, jn as St, T, v as Tt, ur as U, ui as Ut, dr as V, ne as Vt, mr as W, ie as Wt, lr as X, wn as Xt, xr as Y, m as Yt, hr as Z, q as Zt, G as _, oe as _t, l as a, r as an, qr as at, Wn as b, _e as bt, rn as c, t as cn, li as ct, Yr as d, Vn as dt, de as en, h as et, w as f, Mn as ft, se as g, In as gt, g as h, Dn as ht, e as i, n as in, te as it, zn as j, Br as jt, K as k, Te as kt, s as l, er as ln, Z as lt, Gr as m, On as mt, p as n, Fn as nn, Ie as nt, Vt as o, o as on, ti as ot, u as p, Pn as pt, gr as q, Ne as qt, i as r, Ln as rn, C as rt, nn as s, x as sn, pn as st, f as t, S as tn, on as tt, Xr as u, Lr as un, Ve as ut, he as v, zt as vt, He as w, Zr as wt, dn as x, Bn as xt, c as y, Ht as yt, pr as z, y as zt };
|