@templatical/editor 0.54.1 → 0.54.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 (131) hide show
  1. package/dist/{AiAltTextPopover-NMJqQKvD.js → AiAltTextPopover-BBKVJ6HA.js} +1 -1
  2. package/dist/{AiAltTextReview-Ci4zHwRc.js → AiAltTextReview-BuVbeQh-.js} +1 -1
  3. package/dist/{AiRewriteMenu-arKoTjsQ.js → AiRewriteMenu-ZpYJfm-O.js} +4 -4
  4. package/dist/{BlockPreviewCanvas-BTieuBmH.js → BlockPreviewCanvas-DtOo5y3U.js} +6 -6
  5. package/dist/{CloudPanels-Hxdp0doU.js → CloudPanels-DQRWMc59.js} +1 -1
  6. package/dist/{CountdownToolbar-CM4XNEuO.js → CountdownToolbar-DTpMEDyh.js} +4 -4
  7. package/dist/{IssuesPanel-1wGV0wiy.js → IssuesPanel-BZn7-p9e.js} +1 -1
  8. package/dist/{LanguageMenu-BpxbIJEx.js → LanguageMenu-OOmQWVzO.js} +5 -5
  9. package/dist/{LogicTagInsertButton-DgTJ6Lvx.js → LogicTagInsertButton-XESwnJia.js} +8 -8
  10. package/dist/{MergeTagInput-B_51YcQO.js → MergeTagInput-CAsBRoSm.js} +1 -1
  11. package/dist/{MergeTagModeToggle-D3Q2z317.js → MergeTagModeToggle-bOf27Hg1.js} +1 -1
  12. package/dist/{MergeTagTextarea-DZz1L9DE.js → MergeTagTextarea-DH_6JFui.js} +2 -2
  13. package/dist/{ParagraphEditor-B38t4E2p.js → ParagraphEditor-XGUkV5Uw.js} +8 -8
  14. package/dist/{RestoreVersionDialog-n7FSmWXB.js → RestoreVersionDialog-C72kWccI.js} +1 -1
  15. package/dist/{RichTextEditorContent-Dstovi0m.js → RichTextEditorContent-BZN8KRvR.js} +2 -2
  16. package/dist/{SaveBlockDialog-B94NpmDV.js → SaveBlockDialog-CKOnTMTU.js} +4 -4
  17. package/dist/{SavedBlocksBrowserModal-C1vSc8iM.js → SavedBlocksBrowserModal-BrlNxqDH.js} +4 -4
  18. package/dist/{SavedBlocksPanels-DLDmIYeL.js → SavedBlocksPanels--lPR6gdh.js} +1 -1
  19. package/dist/{SavedBlocksPickBar-ngf2sFEs.js → SavedBlocksPickBar-4ON4_KKl.js} +1 -1
  20. package/dist/{TemplateSettings-Baar78_s.js → TemplateSettings-BE0jZmRJ.js} +4 -4
  21. package/dist/{TestEmailModal-CB_9I1bl.js → TestEmailModal-BKmNGrZN.js} +5 -5
  22. package/dist/{TestEmailPanel-BUq-dbXQ.js → TestEmailPanel-DT1wllX3.js} +1 -1
  23. package/dist/{TitleEditor-BLP41rwy.js → TitleEditor-HjVZuUTB.js} +4 -4
  24. package/dist/{Toolbar-bOZ_eq7X.js → Toolbar-BppchV2k.js} +617 -617
  25. package/dist/{TplModal-DFKqmJQz.js → TplModal-BFWOoK8l.js} +1 -1
  26. package/dist/{VersionHistoryPanels-DPxj3mec.js → VersionHistoryPanels-D4yNVLvq.js} +1 -1
  27. package/dist/{WrapperBlock-BdVIuGMR.js → WrapperBlock-BUzQTZuu.js} +3 -3
  28. package/dist/{blockTypeIcons-BUyPZ7Su.js → blockTypeIcons-D91v9k0x.js} +1 -1
  29. package/dist/bundle-stats.json +5 -5
  30. package/dist/cdn/chunks/{AiAltTextPopover-Cnc_kUmb.js → AiAltTextPopover-CAI18sdv.js} +2 -2
  31. package/dist/cdn/chunks/{AiAltTextPopover-Cnc_kUmb.js.map → AiAltTextPopover-CAI18sdv.js.map} +1 -1
  32. package/dist/cdn/chunks/{AiAltTextReview-DPeSY-7r.js → AiAltTextReview-CWEyMOF-.js} +2 -2
  33. package/dist/cdn/chunks/{AiAltTextReview-DPeSY-7r.js.map → AiAltTextReview-CWEyMOF-.js.map} +1 -1
  34. package/dist/cdn/chunks/{AiRewriteMenu-YcVFv6RS.js → AiRewriteMenu-BEepu1vo.js} +5 -5
  35. package/dist/cdn/chunks/{AiRewriteMenu-YcVFv6RS.js.map → AiRewriteMenu-BEepu1vo.js.map} +1 -1
  36. package/dist/cdn/chunks/{BlockPreviewCanvas-6ck15xz9.js → BlockPreviewCanvas-B6ndvof2.js} +5 -5
  37. package/dist/cdn/chunks/{BlockPreviewCanvas-6ck15xz9.js.map → BlockPreviewCanvas-B6ndvof2.js.map} +1 -1
  38. package/dist/cdn/chunks/{CloudPanels-BHHpNckC.js → CloudPanels-BGwDb0jB.js} +2 -2
  39. package/dist/cdn/chunks/{CloudPanels-BHHpNckC.js.map → CloudPanels-BGwDb0jB.js.map} +1 -1
  40. package/dist/cdn/chunks/{CountdownToolbar-CNgsNL5-.js → CountdownToolbar-B-0FsTj-.js} +5 -5
  41. package/dist/cdn/chunks/{CountdownToolbar-CNgsNL5-.js.map → CountdownToolbar-B-0FsTj-.js.map} +1 -1
  42. package/dist/cdn/chunks/{IssuesPanel-Duic0mIs.js → IssuesPanel-LyjMBDok.js} +3 -3
  43. package/dist/cdn/chunks/{IssuesPanel-Duic0mIs.js.map → IssuesPanel-LyjMBDok.js.map} +1 -1
  44. package/dist/cdn/chunks/{LanguageMenu-C6utRx_4.js → LanguageMenu-CGwMCOQ5.js} +4 -4
  45. package/dist/cdn/chunks/{LanguageMenu-C6utRx_4.js.map → LanguageMenu-CGwMCOQ5.js.map} +1 -1
  46. package/dist/cdn/chunks/{LogicTagInsertButton-Bhvi0nWz.js → LogicTagInsertButton-PDKuo2J3.js} +4 -4
  47. package/dist/cdn/chunks/{LogicTagInsertButton-Bhvi0nWz.js.map → LogicTagInsertButton-PDKuo2J3.js.map} +1 -1
  48. package/dist/cdn/chunks/{MergeTagInput-CrhZm-AW.js → MergeTagInput-DoQHBJk2.js} +2 -2
  49. package/dist/cdn/chunks/{MergeTagInput-CrhZm-AW.js.map → MergeTagInput-DoQHBJk2.js.map} +1 -1
  50. package/dist/cdn/chunks/{MergeTagModeToggle-CWVtXLYa.js → MergeTagModeToggle-Ct5IG4VW.js} +2 -2
  51. package/dist/cdn/chunks/{MergeTagModeToggle-CWVtXLYa.js.map → MergeTagModeToggle-Ct5IG4VW.js.map} +1 -1
  52. package/dist/cdn/chunks/{MergeTagTextarea-hTIBwX0F.js → MergeTagTextarea-BMsnjphR.js} +3 -3
  53. package/dist/cdn/chunks/{MergeTagTextarea-hTIBwX0F.js.map → MergeTagTextarea-BMsnjphR.js.map} +1 -1
  54. package/dist/cdn/chunks/{ParagraphEditor-B3EQ0Ai6.js → ParagraphEditor-CVW-kuHW.js} +9 -9
  55. package/dist/cdn/chunks/{ParagraphEditor-B3EQ0Ai6.js.map → ParagraphEditor-CVW-kuHW.js.map} +1 -1
  56. package/dist/cdn/chunks/{RestoreVersionDialog-DfNrVi0R.js → RestoreVersionDialog-7MFZz-Sb.js} +2 -2
  57. package/dist/cdn/chunks/{RestoreVersionDialog-DfNrVi0R.js.map → RestoreVersionDialog-7MFZz-Sb.js.map} +1 -1
  58. package/dist/cdn/chunks/{RichTextEditorContent-up4AqL7D.js → RichTextEditorContent-CiL-SkZg.js} +3 -3
  59. package/dist/cdn/chunks/{RichTextEditorContent-up4AqL7D.js.map → RichTextEditorContent-CiL-SkZg.js.map} +1 -1
  60. package/dist/cdn/chunks/{SaveBlockDialog-BqglcKcN.js → SaveBlockDialog-CxdekCYy.js} +5 -5
  61. package/dist/cdn/chunks/{SaveBlockDialog-BqglcKcN.js.map → SaveBlockDialog-CxdekCYy.js.map} +1 -1
  62. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BewXGlrK.js → SavedBlocksBrowserModal-D9CAa2U3.js} +4 -4
  63. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BewXGlrK.js.map → SavedBlocksBrowserModal-D9CAa2U3.js.map} +1 -1
  64. package/dist/cdn/chunks/{SavedBlocksPanels-0ZpX-jXI.js → SavedBlocksPanels-jfkYWtss.js} +2 -2
  65. package/dist/cdn/chunks/{SavedBlocksPanels-0ZpX-jXI.js.map → SavedBlocksPanels-jfkYWtss.js.map} +1 -1
  66. package/dist/cdn/chunks/{SavedBlocksPickBar-DHah-Uf7.js → SavedBlocksPickBar-yaCumC4j.js} +2 -2
  67. package/dist/cdn/chunks/{SavedBlocksPickBar-DHah-Uf7.js.map → SavedBlocksPickBar-yaCumC4j.js.map} +1 -1
  68. package/dist/cdn/chunks/{TemplateSettings-CWUpUKJb.js → TemplateSettings-SaV2UVh_.js} +5 -5
  69. package/dist/cdn/chunks/{TemplateSettings-CWUpUKJb.js.map → TemplateSettings-SaV2UVh_.js.map} +1 -1
  70. package/dist/cdn/chunks/{TestEmailModal-7pUDYLrk.js → TestEmailModal-ByfhP_sm.js} +6 -6
  71. package/dist/cdn/chunks/{TestEmailModal-7pUDYLrk.js.map → TestEmailModal-ByfhP_sm.js.map} +1 -1
  72. package/dist/cdn/chunks/{TestEmailPanel-DBWwMsH1.js → TestEmailPanel-CfzpqpDs.js} +2 -2
  73. package/dist/cdn/chunks/{TestEmailPanel-DBWwMsH1.js.map → TestEmailPanel-CfzpqpDs.js.map} +1 -1
  74. package/dist/cdn/chunks/{TitleEditor-VAanUjPQ.js → TitleEditor-Ceb0YfWv.js} +4 -4
  75. package/dist/cdn/chunks/{TitleEditor-VAanUjPQ.js.map → TitleEditor-Ceb0YfWv.js.map} +1 -1
  76. package/dist/cdn/chunks/{Toolbar-BlWVQRcA.js → Toolbar-Cv6Rv1S-.js} +9 -9
  77. package/dist/cdn/chunks/{Toolbar-BlWVQRcA.js.map → Toolbar-Cv6Rv1S-.js.map} +1 -1
  78. package/dist/cdn/chunks/{TplModal-DDlR7mk3.js → TplModal-DGpGdwgf.js} +2 -2
  79. package/dist/cdn/chunks/{TplModal-DDlR7mk3.js.map → TplModal-DGpGdwgf.js.map} +1 -1
  80. package/dist/cdn/chunks/{VersionHistoryPanels-DJDeaf1B.js → VersionHistoryPanels-BJnHCMAH.js} +2 -2
  81. package/dist/cdn/chunks/{VersionHistoryPanels-DJDeaf1B.js.map → VersionHistoryPanels-BJnHCMAH.js.map} +1 -1
  82. package/dist/cdn/chunks/{WrapperBlock-DRJnrgy-.js → WrapperBlock-C_uE5rPJ.js} +4 -4
  83. package/dist/cdn/chunks/{WrapperBlock-DRJnrgy-.js.map → WrapperBlock-C_uE5rPJ.js.map} +1 -1
  84. package/dist/cdn/chunks/{composables-Jc3uZuLs.js → composables-BxikPuC1.js} +449 -443
  85. package/dist/cdn/chunks/composables-BxikPuC1.js.map +1 -0
  86. package/dist/cdn/chunks/{createCloudRuntime-C2Zs5F1O.js → createCloudRuntime-D2DUaudp.js} +3 -3
  87. package/dist/cdn/chunks/{createCloudRuntime-C2Zs5F1O.js.map → createCloudRuntime-D2DUaudp.js.map} +1 -1
  88. package/dist/cdn/chunks/{extensions-DcMKZpzh.js → extensions-DuDWpKo7.js} +4 -4
  89. package/dist/cdn/chunks/{extensions-DcMKZpzh.js.map → extensions-DuDWpKo7.js.map} +1 -1
  90. package/dist/cdn/chunks/{normalizeMergeTagMarkup-cC32Ox6A.js → normalizeMergeTagMarkup-Bn_hl4jd.js} +2 -2
  91. package/dist/cdn/chunks/{normalizeMergeTagMarkup-cC32Ox6A.js.map → normalizeMergeTagMarkup-Bn_hl4jd.js.map} +1 -1
  92. package/dist/cdn/chunks/{preRenderCustomBlocks-f7GEKdvw.js → preRenderCustomBlocks-C9oavydG.js} +2 -2
  93. package/dist/cdn/chunks/{preRenderCustomBlocks-f7GEKdvw.js.map → preRenderCustomBlocks-C9oavydG.js.map} +1 -1
  94. package/dist/cdn/chunks/{sanitizeHtml-WTfz9lZd.js → sanitizeHtml-DfXoetOm.js} +2 -2
  95. package/dist/cdn/chunks/{sanitizeHtml-WTfz9lZd.js.map → sanitizeHtml-DfXoetOm.js.map} +1 -1
  96. package/dist/cdn/chunks/{socialIcons-DeCYorUT.js → socialIcons-DPwkrn5v.js} +2 -2
  97. package/dist/cdn/chunks/{socialIcons-DeCYorUT.js.map → socialIcons-DPwkrn5v.js.map} +1 -1
  98. package/dist/cdn/chunks/{src-A_cKeTM_.js → src-712f3ofG.js} +2 -2
  99. package/dist/cdn/chunks/{src-A_cKeTM_.js.map → src-712f3ofG.js.map} +1 -1
  100. package/dist/cdn/chunks/{src-8bYYJPCt.js → src-B2tQbzf6.js} +152 -146
  101. package/dist/cdn/chunks/src-B2tQbzf6.js.map +1 -0
  102. package/dist/cdn/chunks/{src-BQUv2CYU.js → src-ZFw5fg_z.js} +40 -27
  103. package/dist/cdn/chunks/{src-BQUv2CYU.js.map → src-ZFw5fg_z.js.map} +1 -1
  104. package/dist/cdn/chunks/{useLocalizedDisplay-aGfnO90D.js → useLocalizedDisplay-DiNjT22M.js} +2 -2
  105. package/dist/cdn/chunks/{useLocalizedDisplay-aGfnO90D.js.map → useLocalizedDisplay-DiNjT22M.js.map} +1 -1
  106. package/dist/cdn/chunks/{useLogicTag-DtYe8HIq.js → useLogicTag-SvMW4g00.js} +2 -2
  107. package/dist/cdn/chunks/{useLogicTag-DtYe8HIq.js.map → useLogicTag-SvMW4g00.js.map} +1 -1
  108. package/dist/cdn/chunks/{useMergeTag-B8ULmsnp.js → useMergeTag-JLz3Pqcw.js} +2 -2
  109. package/dist/cdn/chunks/{useMergeTag-B8ULmsnp.js.map → useMergeTag-JLz3Pqcw.js.map} +1 -1
  110. package/dist/cdn/chunks/{withCurrentFont-MK8ga9q9.js → withCurrentFont-BcoPpkDS.js} +2 -2
  111. package/dist/cdn/chunks/{withCurrentFont-MK8ga9q9.js.map → withCurrentFont-BcoPpkDS.js.map} +1 -1
  112. package/dist/cdn/editor.css +1 -1
  113. package/dist/cdn/editor.js +18 -18
  114. package/dist/{composables-XjYKaKhY.js → composables-BbPFRlBf.js} +908 -902
  115. package/dist/{createCloudRuntime-DGV5a5Af.js → createCloudRuntime-Dlrg88gS.js} +2 -2
  116. package/dist/{dist-Cdkm20M6.js → dist-C34cYI5S.js} +126 -113
  117. package/dist/{extensions-BJ184osp.js → extensions-xCiyqSg7.js} +16 -16
  118. package/dist/{normalizeMergeTagMarkup-CUCo7B5X.js → normalizeMergeTagMarkup-C7FGNURu.js} +22 -22
  119. package/dist/{preRenderCustomBlocks-Bs3N9no-.js → preRenderCustomBlocks-DvbRa3L3.js} +3 -3
  120. package/dist/{sanitizeHtml-2rjV0r-6.js → sanitizeHtml-D_ab7dD6.js} +5 -5
  121. package/dist/{socialIcons-TFiOkpoU.js → socialIcons-DhAolBjt.js} +342 -342
  122. package/dist/style.css +1 -1
  123. package/dist/templatical-editor.js +190 -190
  124. package/dist/useLocalizedDisplay-C9MBFUr4.js +31 -0
  125. package/dist/{useLogicTag-BXXXQQmi.js → useLogicTag-BmuakZBd.js} +1 -1
  126. package/dist/{useMergeTag-C9Okr87y.js → useMergeTag-DC4a8b_v.js} +3 -3
  127. package/dist/{withCurrentFont-DJiQqZzL.js → withCurrentFont-BSxJai99.js} +1 -1
  128. package/package.json +7 -7
  129. package/dist/cdn/chunks/composables-Jc3uZuLs.js.map +0 -1
  130. package/dist/cdn/chunks/src-8bYYJPCt.js.map +0 -1
  131. package/dist/useLocalizedDisplay-DNNwDRxL.js +0 -31
@@ -1,8 +1,8 @@
1
1
  import { B as e, N as t, c as n, et as r } from "./vue.runtime.esm-bundler-BJXc_Mri.js";
2
- import { _ as i } from "./dist-Cdkm20M6.js";
2
+ import { _ as i } from "./dist-C34cYI5S.js";
3
3
  import { f as a, o } from "./keys-BCqskl51.js";
4
4
  import { t as s } from "./logger-BOu7oEtk.js";
5
- import { t as c } from "./preRenderCustomBlocks-Bs3N9no-.js";
5
+ import { t as c } from "./preRenderCustomBlocks-DvbRa3L3.js";
6
6
  // ../core/dist/cloud/index.js
7
7
  function l(e) {
8
8
  let t = e instanceof i ? e.statusCode : void 0;
@@ -579,7 +579,7 @@ function Ne(e, t, n = {}) {
579
579
  };
580
580
  }
581
581
  function Pe(e, t, n = []) {
582
- let r = Object.fromEntries(L(e.blocks).flatMap((e) => {
582
+ let r = Object.fromEntries(I(e.blocks).flatMap((e) => {
583
583
  if (e.type !== "custom") return [];
584
584
  let t = x(e, n).filter((t) => typeof v(e, t) == "string");
585
585
  return t.length && Be.has(e.id) && O("invalid_operation", 0, Ve), t.length ? [[e.id, t]] : [];
@@ -610,7 +610,7 @@ function D(e, t, n = {}) {
610
610
  locks: n.locks ?? [],
611
611
  session: n.session ?? null
612
612
  };
613
- t.forEach((t, n) => rt(e, t, n, r));
613
+ t.forEach((t, n) => it(e, t, n, r));
614
614
  }
615
615
  var Le = /* @__PURE__ */ new Set([
616
616
  "id",
@@ -681,25 +681,25 @@ function N(e) {
681
681
  function Ue(e) {
682
682
  return e.flatMap((e) => k(e) ? N(e) : []);
683
683
  }
684
- function P(e, t) {
684
+ function We(e, t) {
685
685
  return typeof e.blockId != "string" || e.blockId === "" ? O("invalid_operation", t, "blockId must be a block id.") : e.blockId;
686
686
  }
687
- function We(e, t) {
687
+ function Ge(e, t) {
688
688
  let n = e.parent;
689
689
  return n === null ? null : k(n) && typeof n.sectionId == "string" && typeof n.column == "number" && Number.isInteger(n.column) ? {
690
690
  sectionId: n.sectionId,
691
691
  column: n.column
692
692
  } : O("invalid_operation", t, "parent must be null or { \"sectionId\", \"column\" }.");
693
693
  }
694
- function Ge(e, t) {
694
+ function Ke(e, t) {
695
695
  let n = e.after;
696
696
  return n === null ? null : typeof n == "string" && n !== "" ? n : O("invalid_operation", t, "after must be null or a block id.");
697
697
  }
698
- function F(e, t) {
698
+ function P(e, t) {
699
699
  let n = e.expect;
700
700
  return n == null ? null : k(n) ? n : O("invalid_operation", t, "expect must be an object.");
701
701
  }
702
- function Ke(e, t, n) {
702
+ function qe(e, t, n) {
703
703
  let r = e.set ?? null, i = e.unset ?? [];
704
704
  (r === null || k(r)) && Array.isArray(i) && i.every((e) => typeof e == "string") || O("invalid_operation", t, "set must be an object and unset a list of keys.");
705
705
  let a = r === null ? {} : r, o = Object.keys(a).filter((e) => a[e] !== void 0);
@@ -711,27 +711,27 @@ function Ke(e, t, n) {
711
711
  unset: i
712
712
  };
713
713
  }
714
- function qe(e, t, n) {
714
+ function Je(e, t, n) {
715
715
  if (k(e) && typeof e.id == "string" && e.id !== "" && typeof e.type == "string" || O("invalid_operation", t, "A block needs a non-empty string id and a string type."), !A(e)) return;
716
716
  n && O("invalid_operation", t, "Sections can only be placed at the top level.");
717
717
  let r = e.children;
718
718
  Array.isArray(r) && r.every((e) => Array.isArray(e)) || O("invalid_operation", t, "A section needs children: a list of columns, each a list of blocks.");
719
- for (let e of r) for (let n of e) qe(n, t, !0);
719
+ for (let e of r) for (let n of e) Je(n, t, !0);
720
720
  }
721
- function I(e, t) {
721
+ function F(e, t) {
722
722
  return e.session === null || t.sessionId !== e.session;
723
723
  }
724
- function Je(e, t, n) {
725
- let r = e.locks.find((n) => t.includes(n.blockId) && I(e, n));
724
+ function Ye(e, t, n) {
725
+ let r = e.locks.find((n) => t.includes(n.blockId) && F(e, n));
726
726
  r && O("lock_held", n, `Block "${r.blockId}" is being edited in another session.`, r.blockId);
727
727
  }
728
- function Ye(e, t, n, r) {
729
- e.locks.find((r) => I(e, r) && r.blockId === t && ((r.locale ?? null) === null || r.locale === n)) && O("lock_held", r, `Block "${t}" is being edited in another session.`, t);
730
- }
731
728
  function Xe(e, t, n, r) {
729
+ e.locks.find((r) => F(e, r) && r.blockId === t && ((r.locale ?? null) === null || r.locale === n)) && O("lock_held", r, `Block "${t}" is being edited in another session.`, t);
730
+ }
731
+ function Ze(e, t, n, r) {
732
732
  for (let [i, a] of Object.entries(t)) a !== void 0 && (m(Object.hasOwn(e, i) && e[i] !== void 0 ? e[i] : null, a) || O("precondition_failed", n, r === void 0 ? `Setting "${i}" has changed since.` : `"${i}" of block "${r}" has changed since.`, r));
733
733
  }
734
- function Ze(e, t, n) {
734
+ function Qe(e, t, n) {
735
735
  if (t === null) return Array.isArray(e.blocks) || (e.blocks = []), e.blocks;
736
736
  let r = M(e, t.sectionId);
737
737
  if (!r) return O("block_missing", n, `No section with id "${t.sectionId}".`, t.sectionId);
@@ -739,12 +739,12 @@ function Ze(e, t, n) {
739
739
  let i = r.block.children;
740
740
  return !Array.isArray(i) || t.column < 0 || t.column >= i.length ? O("invalid_operation", n, `Section "${t.sectionId}" has no column ${t.column}.`) : (Array.isArray(i[t.column]) || (i[t.column] = []), i[t.column]);
741
741
  }
742
- function Qe(e, t, n) {
742
+ function $e(e, t, n) {
743
743
  if (t === null) return 0;
744
744
  let r = e.findIndex((e) => k(e) && e.id === t);
745
745
  return r === -1 ? O("anchor_missing", n, `No block "${t}" in the target container.`, t) : r + 1;
746
746
  }
747
- function $e(e, t, n, r) {
747
+ function et(e, t, n, r) {
748
748
  let i = Fe(t), a = Array.isArray(e.children) ? e.children : [];
749
749
  for (let e = i; e < a.length; e++) {
750
750
  let t = a[e];
@@ -754,7 +754,7 @@ function $e(e, t, n, r) {
754
754
  for (; o.length < i;) o.push([]);
755
755
  e.children = o;
756
756
  }
757
- function et(e, t, n) {
757
+ function tt(e, t, n) {
758
758
  for (let [n, r] of Object.entries(t)) n === "__proto__" ? Object.defineProperty(e, n, {
759
759
  value: p(r),
760
760
  writable: !0,
@@ -763,7 +763,7 @@ function et(e, t, n) {
763
763
  }) : e[n] = p(r);
764
764
  for (let t of n) delete e[t];
765
765
  }
766
- function tt(e) {
766
+ function nt(e) {
767
767
  return pe(e).map((t) => {
768
768
  let n = t.path.replace(/\.(items|icons|rows)\[.*$/, "").replace(/\[(\d+)\]/g, ".$1").split(".").reduce((e, t) => e[t], e);
769
769
  return {
@@ -772,113 +772,113 @@ function tt(e) {
772
772
  };
773
773
  });
774
774
  }
775
- function nt(e, t, n) {
776
- let r = ({ id: e, blockId: t }) => JSON.stringify([t ?? null, e]), i = new Set(n ? tt(n).map(r) : []), a = tt(e).find((e) => !i.has(r(e)));
775
+ function rt(e, t, n) {
776
+ let r = ({ id: e, blockId: t }) => JSON.stringify([t ?? null, e]), i = new Set(n ? nt(n).map(r) : []), a = nt(e).find((e) => !i.has(r(e)));
777
777
  a && O("invalid_operation", t, `Element id "${a.id}" must not contain "." or "/".`, a.blockId);
778
778
  }
779
- function rt(e, t, n, r) {
779
+ function it(e, t, n, r) {
780
780
  let i = t;
781
781
  switch (k(i) && typeof i.op == "string" || O("invalid_operation", n, "Each operation must be an object with an \"op\"."), i.op) {
782
- case "addBlock": return it(e, i, n);
783
- case "moveBlock": return at(e, i, n, r);
784
- case "deleteBlock": return ot(e, i, n, r);
785
- case "updateBlock": return st(e, i, n, r);
786
- case "updateSettings": return ct(e, i, n);
787
- case "setContent": return Ct(e, i, n, r);
788
- case "setDefaultLocale": return wt(e, i, n, r);
789
- case "addLocale": return dt(e, i, n);
790
- case "removeLocale": return pt(e, i, n);
791
- case "updateBlockLocale": return xt(e, i, n, r);
792
- case "updateSettingsLocale": return St(e, i, n);
782
+ case "addBlock": return at(e, i, n);
783
+ case "moveBlock": return ot(e, i, n, r);
784
+ case "deleteBlock": return st(e, i, n, r);
785
+ case "updateBlock": return ct(e, i, n, r);
786
+ case "updateSettings": return lt(e, i, n);
787
+ case "setContent": return wt(e, i, n, r);
788
+ case "setDefaultLocale": return Tt(e, i, n, r);
789
+ case "addLocale": return ft(e, i, n);
790
+ case "removeLocale": return mt(e, i, n);
791
+ case "updateBlockLocale": return St(e, i, n, r);
792
+ case "updateSettingsLocale": return Ct(e, i, n);
793
793
  default: O("invalid_operation", n, `Unknown operation "${i.op}".`);
794
794
  }
795
795
  }
796
- function it(e, t, n) {
797
- let r = We(t, n), i = Ge(t, n), a = t.block;
798
- qe(a, n, r !== null), nt({
796
+ function at(e, t, n) {
797
+ let r = Ge(t, n), i = Ke(t, n), a = t.block;
798
+ Je(a, n, r !== null), rt({
799
799
  blocks: [a],
800
800
  settings: e.settings
801
801
  }, n);
802
802
  let o = new Set(Ue(j(e))), s = /* @__PURE__ */ new Set();
803
803
  for (let e of N(a)) (o.has(e) || s.has(e)) && O("block_exists", n, `A block with id "${e}" already exists.`, e), s.add(e);
804
- let c = Ze(e, r, n), l = Qe(c, i, n);
805
- bt(e, a, r, n, !0), c.splice(l, 0, p(a));
804
+ let c = Qe(e, r, n), l = $e(c, i, n);
805
+ xt(e, a, r, n, !0), c.splice(l, 0, p(a));
806
806
  }
807
- function at(e, t, n, r) {
808
- let i = P(t, n), a = We(t, n), o = Ge(t, n), s = F(t, n), c = M(e, i);
807
+ function ot(e, t, n, r) {
808
+ let i = We(t, n), a = Ge(t, n), o = Ke(t, n), s = P(t, n), c = M(e, i);
809
809
  if (!c) return O("block_missing", n, `No block with id "${i}".`, i);
810
- if (Je(r, N(c.block), n), s) {
810
+ if (Ye(r, N(c.block), n), s) {
811
811
  let e = c.index > 0 ? c.list[c.index - 1] : null, t = k(e) ? e.id ?? null : null;
812
812
  m(c.parent, s.parent ?? null) && m(t, s.after ?? null) || O("precondition_failed", n, `Block "${i}" has moved since.`, i);
813
813
  }
814
814
  A(c.block) && a !== null && O("invalid_operation", n, "Sections can only be placed at the top level."), o === i && O("invalid_operation", n, "A block can't be placed after itself.");
815
- let l = Ze(e, a, n);
816
- Qe(l.filter((e) => e !== c.block), o, n), bt(e, c.block, a, n, !1), c.list.splice(c.index, 1), l.splice(Qe(l, o, n), 0, c.block);
815
+ let l = Qe(e, a, n);
816
+ $e(l.filter((e) => e !== c.block), o, n), xt(e, c.block, a, n, !1), c.list.splice(c.index, 1), l.splice($e(l, o, n), 0, c.block);
817
817
  }
818
- function ot(e, t, n, r) {
819
- let i = P(t, n), a = F(t, n), o = M(e, i);
818
+ function st(e, t, n, r) {
819
+ let i = We(t, n), a = P(t, n), o = M(e, i);
820
820
  if (!o) return O("block_missing", n, `No block with id "${i}".`, i);
821
- Je(r, N(o.block), n), a && !m(o.block, a.block ?? null) && O("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
821
+ Ye(r, N(o.block), n), a && !m(o.block, a.block ?? null) && O("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
822
822
  }
823
- function st(e, t, n, r) {
824
- let i = P(t, n), { set: a, unset: o } = Ke(t, n, Le), s = F(t, n), c = M(e, i);
823
+ function ct(e, t, n, r) {
824
+ let i = We(t, n), { set: a, unset: o } = qe(t, n, Le), s = P(t, n), c = M(e, i);
825
825
  if (!c) return O("block_missing", n, `No block with id "${i}".`, i);
826
826
  let l = c.block, u = A(l);
827
- u && o.includes("columns") && O("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), Je(r, [i], n), s && Xe(l, s, n, i);
827
+ u && o.includes("columns") && O("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), Ye(r, [i], n), s && Ze(l, s, n, i);
828
828
  let d = { ...l };
829
- et(d, a, o), nt({
829
+ tt(d, a, o), rt({
830
830
  blocks: [d],
831
831
  settings: e.settings
832
832
  }, n, {
833
833
  blocks: [l],
834
834
  settings: e.settings
835
- }), u && Object.hasOwn(a, "columns") && $e(l, a.columns, n, i), et(l, a, o);
835
+ }), u && Object.hasOwn(a, "columns") && et(l, a.columns, n, i), tt(l, a, o);
836
836
  let f = y(l);
837
837
  m(l.l10n, f.l10n) || (f.l10n ? l.l10n = f.l10n : delete l.l10n), u && f.type === "section" && !m(l.children, f.children) && (l.children = f.children);
838
838
  }
839
- function ct(e, t, n) {
840
- let { set: r, unset: i } = Ke(t, n, Re), a = F(t, n);
839
+ function lt(e, t, n) {
840
+ let { set: r, unset: i } = qe(t, n, Re), a = P(t, n);
841
841
  e.settings?.locales?.length && (Object.hasOwn(r, "locale") || i.includes("locale")) && O("invalid_operation", n, "The default locale can't change while language versions exist."), k(e.settings) || (e.settings = {});
842
842
  let o = e.settings;
843
- a && Xe(o, a, n), et(o, r, i);
843
+ a && Ze(o, a, n), tt(o, r, i);
844
844
  let s = Se(e.settings);
845
845
  m(o.l10n, s.l10n) || (s.l10n ? o.l10n = s.l10n : delete o.l10n);
846
846
  }
847
- function lt(e, t) {
847
+ function ut(e, t) {
848
848
  let n = e.locale;
849
849
  return _e(n) && n !== "__proto__" && n !== "constructor" && n !== "prototype" || O("invalid_operation", t, "locale must be a language tag."), n;
850
850
  }
851
- function ut(e, t, n) {
852
- let r = lt(t, n);
851
+ function dt(e, t, n) {
852
+ let r = ut(t, n);
853
853
  return e.settings.locales?.includes(r) || O("invalid_operation", n, `Locale "${r}" isn't in settings.locales.`), r;
854
854
  }
855
- function dt(e, t, n) {
856
- let r = lt(t, n), i = e.settings.locales ?? [], a = r.toLowerCase(), o = t.position === void 0 ? i.length : t.position;
855
+ function ft(e, t, n) {
856
+ let r = ut(t, n), i = e.settings.locales ?? [], a = r.toLowerCase(), o = t.position === void 0 ? i.length : t.position;
857
857
  (T(e).toLowerCase() === a || i.some((e) => e.toLowerCase() === a) || typeof o != "number" || !Number.isInteger(o) || o < 0 || o > i.length) && O("invalid_operation", n, "The locale already exists or its insertion position is invalid."), e.settings.locales || (e.settings.locales = []), e.settings.locales.splice(o, 0, r);
858
858
  }
859
- function L(e) {
860
- return e.flatMap((e) => k(e) ? [e, ...A(e) ? He(e).flatMap(L) : e.type === "wrapper" && Array.isArray(e.children) ? L(e.children) : []] : []);
859
+ function I(e) {
860
+ return e.flatMap((e) => k(e) ? [e, ...A(e) ? He(e).flatMap(I) : e.type === "wrapper" && Array.isArray(e.children) ? I(e.children) : []] : []);
861
861
  }
862
- function ft(e, t) {
862
+ function pt(e, t) {
863
863
  let n = e.l10n;
864
864
  return k(n) && k(n[t]) ? n[t] : {};
865
865
  }
866
- function pt(e, t, n) {
867
- let r = ut(e, t, n), i = F(t, n);
866
+ function mt(e, t, n) {
867
+ let r = dt(e, t, n), i = P(t, n);
868
868
  i && (!k(i.blocks) || i.settings !== void 0 && !k(i.settings)) && O("invalid_operation", n, "expect needs a blocks object and an optional settings layer.");
869
- let a = e.settings, o = L(j(e)), s = Object.fromEntries(o.flatMap((e) => k(e.l10n) && Object.hasOwn(e.l10n, r) ? [[String(e.id), e.l10n[r]]] : []));
869
+ let a = e.settings, o = I(j(e)), s = Object.fromEntries(o.flatMap((e) => k(e.l10n) && Object.hasOwn(e.l10n, r) ? [[String(e.id), e.l10n[r]]] : []));
870
870
  !i || m(s, i.blocks) && m(k(a.l10n) ? a.l10n[r] : void 0, i.settings) || O("precondition_failed", n, `Locale "${r}" has changed since.`);
871
871
  for (let e of [...o, a]) k(e.l10n) && (delete e.l10n[r], Object.keys(e.l10n).length === 0 && delete e.l10n);
872
872
  e.settings.locales.splice(e.settings.locales.indexOf(r), 1), e.settings.locales.length === 0 && delete e.settings.locales;
873
873
  }
874
- function mt(e, t, n) {
874
+ function ht(e, t, n) {
875
875
  (e.text === void 0 || ((e) => k(e) && Object.values(e).every((e) => k(e) && typeof e.value == "string" && typeof e.sourceHash == "string"))(e.text)) && (e.set === void 0 || k(e.set) && !Object.values(e.set).some((e) => e === void 0)) && (e.unset === void 0 || Array.isArray(e.unset) && e.unset.every((e) => typeof e == "string" && e !== "" && _(e))) && (e.hidden === void 0 || !n && typeof e.hidden == "boolean") && [
876
876
  "text",
877
877
  "set",
878
878
  "unset",
879
879
  ...n ? [] : ["hidden"]
880
880
  ].some((t) => e[t] !== void 0) || O("invalid_operation", t, "A locale update needs text, set, unset or a block's boolean hidden.");
881
- let r = F(e, t);
881
+ let r = P(e, t);
882
882
  return r && (r.text !== void 0 && !k(r.text) || r.set !== void 0 && !k(r.set) || r.hidden !== void 0 && (n || typeof r.hidden != "boolean")) && O("invalid_operation", t, "The locale layer expect is malformed."), {
883
883
  text: e.text ?? {},
884
884
  set: e.set ?? {},
@@ -887,20 +887,20 @@ function mt(e, t, n) {
887
887
  expect: r
888
888
  };
889
889
  }
890
- function ht(e, t, n, r) {
890
+ function gt(e, t, n, r) {
891
891
  for (let i of Object.keys(t.text)) _(i) && (r ? h.includes(i) : S(String(e.type), i)) && v(e, i) !== void 0 || O("invalid_operation", n, `Text path "${i}" isn't translatable or doesn't resolve.`);
892
892
  for (let i of Object.keys(t.set)) {
893
893
  let a = i.split("."), o = r ? ze : Le, s = a.length === 1 ? e : v(e, a.slice(0, -1).join("."));
894
894
  (!_(i) || o.has(a[0]) || !r && xe(e, i, t.set[i]) || v(e, i) === void 0 && !k(s)) && O("invalid_operation", n, `Override path "${i}" is immutable or doesn't resolve.`);
895
895
  }
896
896
  }
897
- function gt(e, t, n, r) {
897
+ function _t(e, t, n, r) {
898
898
  if (t) {
899
899
  for (let i of ["text", "set"]) for (let [a, o] of Object.entries(t[i] ?? {})) m(e[i]?.[a] ?? null, o) || O("precondition_failed", n, `Locale path "${a}" has changed since.`, r);
900
900
  t.hidden !== void 0 && !m(e.hidden === !0, t.hidden) && O("precondition_failed", n, "The locale's hidden state has changed since.", r);
901
901
  }
902
902
  }
903
- function _t(e, t, n) {
903
+ function vt(e, t, n) {
904
904
  k(e.l10n) || (e.l10n = {});
905
905
  let r = e.l10n;
906
906
  k(r[t]) || (r[t] = {});
@@ -910,45 +910,45 @@ function _t(e, t, n) {
910
910
  for (let [e, t] of Object.entries(n.set)) i.set ||= {}, i.set[e] = p(t), i.text && delete i.text[e];
911
911
  n.hidden === !0 ? i.hidden = !0 : n.hidden === !1 && delete i.hidden, i.text && Object.keys(i.text).length === 0 && delete i.text, i.set && Object.keys(i.set).length === 0 && delete i.set, Object.keys(i).length === 0 && delete r[t], Object.keys(r).length === 0 && delete e.l10n;
912
912
  }
913
- function R(e) {
914
- return k(e) ? e.type === "slot" || Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(R) : R(e)) : !1;
913
+ function L(e) {
914
+ return k(e) ? e.type === "slot" || Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(L) : L(e)) : !1;
915
915
  }
916
- function vt(e) {
916
+ function yt(e) {
917
917
  return k(e) && k(e.l10n) && Object.values(e.l10n).some((e) => k(e) && e.hidden === !0);
918
918
  }
919
- function yt(e) {
920
- return !k(e) || !R(e) ? !1 : vt(e) ? !0 : Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(yt) : yt(e));
919
+ function bt(e) {
920
+ return !k(e) || !L(e) ? !1 : yt(e) ? !0 : Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(bt) : bt(e));
921
921
  }
922
- function bt(e, t, n, r, i) {
923
- if (!R(t)) return;
922
+ function xt(e, t, n, r, i) {
923
+ if (!L(t)) return;
924
924
  let a = n === null ? null : M(e, n.sectionId);
925
- (a !== null && vt(a.block) || i && yt(t)) && O("invalid_operation", r, "A layout's slot block can't be placed inside a block that a language hides.", k(t) && typeof t.id == "string" ? t.id : void 0);
925
+ (a !== null && yt(a.block) || i && bt(t)) && O("invalid_operation", r, "A layout's slot block can't be placed inside a block that a language hides.", k(t) && typeof t.id == "string" ? t.id : void 0);
926
926
  }
927
- function xt(e, t, n, r) {
928
- let i = ut(e, t, n), a = P(t, n), o = mt(t, n, !1), s = L(j(e)).find((e) => e.id === a);
929
- s || O("block_missing", n, `No block with id "${a}".`, a), ht(s, o, n, !1), Ye(r, a, i, n), gt(ft(s, i), o.expect, n, a), o.hidden === !0 && R(s) && O("invalid_operation", n, "A layout's slot block, and any block that contains it, can't be hidden.", a), _t(s, i, o);
927
+ function St(e, t, n, r) {
928
+ let i = dt(e, t, n), a = We(t, n), o = ht(t, n, !1), s = I(j(e)).find((e) => e.id === a);
929
+ s || O("block_missing", n, `No block with id "${a}".`, a), gt(s, o, n, !1), Xe(r, a, i, n), _t(pt(s, i), o.expect, n, a), o.hidden === !0 && L(s) && O("invalid_operation", n, "A layout's slot block, and any block that contains it, can't be hidden.", a), vt(s, i, o);
930
930
  }
931
- function St(e, t, n) {
932
- let r = ut(e, t, n), i = mt(t, n, !0), a = e.settings;
933
- ht(a, i, n, !0), gt(ft(a, r), i.expect, n), _t(a, r, i);
931
+ function Ct(e, t, n) {
932
+ let r = dt(e, t, n), i = ht(t, n, !0), a = e.settings;
933
+ gt(a, i, n, !0), _t(pt(a, r), i.expect, n), vt(a, r, i);
934
934
  }
935
- function Ct(e, t, n, r) {
935
+ function wt(e, t, n, r) {
936
936
  let i = t.content;
937
937
  if (!k(i) || !Array.isArray(i.blocks) || !k(i.settings)) return O("invalid_operation", n, "setContent needs content with a blocks array and a settings object.");
938
- nt(i, n, e);
939
- let a = r.locks.find((e) => I(r, e));
938
+ rt(i, n, e);
939
+ let a = r.locks.find((e) => F(r, e));
940
940
  a && O("locked_by_others", n, "Other sessions hold locks on this template.", a.blockId), e.blocks = p(i.blocks), e.settings = p(i.settings);
941
941
  }
942
- function wt(e, t, n, r) {
943
- let i = lt(t, n);
942
+ function Tt(e, t, n, r) {
943
+ let i = ut(t, n);
944
944
  e.settings.locales?.includes(i) || O("invalid_operation", n, `"${i}" is not a language version of this template.`);
945
945
  let a = Ae(e, i);
946
946
  a.length && O("invalid_operation", n, a.length === 1 ? `1 block is hidden in "${i}". Show it before making it the default.` : `${a.length} blocks are hidden in "${i}". Show them before making it the default.`, a[0]);
947
- let o = r.locks.find((e) => I(r, e));
947
+ let o = r.locks.find((e) => F(r, e));
948
948
  o && O("locked_by_others", n, "Other sessions hold locks on this template.", o.blockId);
949
949
  let s = t.customTextFields;
950
950
  if (s !== void 0) {
951
- let t = L(e.blocks);
951
+ let t = I(e.blocks);
952
952
  (!k(s) || Object.getOwnPropertyNames(s).some((e) => {
953
953
  if (Be.has(e)) return !0;
954
954
  let n = s[e], r = t.find((t) => t.id === e);
@@ -958,11 +958,11 @@ function wt(e, t, n, r) {
958
958
  let c = Ne(e, i, t.customTextFields);
959
959
  e.blocks = c.blocks, e.settings = c.settings;
960
960
  }
961
- function Tt(e) {
961
+ function Et(e) {
962
962
  let t = e.children;
963
963
  return e.type === "section" && Array.isArray(t) ? t : [];
964
964
  }
965
- function Et(e, t, n = null) {
965
+ function Dt(e, t, n = null) {
966
966
  for (let r = 0; r < e.length; r++) {
967
967
  let i = e[r];
968
968
  if (i.id === t) return {
@@ -970,10 +970,10 @@ function Et(e, t, n = null) {
970
970
  parent: n,
971
971
  after: r > 0 ? e[r - 1].id : null
972
972
  };
973
- let a = Tt(i);
973
+ let a = Et(i);
974
974
  for (let e = 0; e < a.length; e++) {
975
975
  if (!Array.isArray(a[e])) continue;
976
- let n = Et(a[e], t, {
976
+ let n = Dt(a[e], t, {
977
977
  sectionId: i.id,
978
978
  column: e
979
979
  });
@@ -982,12 +982,12 @@ function Et(e, t, n = null) {
982
982
  }
983
983
  return null;
984
984
  }
985
- function Dt(e, t, n) {
986
- let r = Et(e.blocks, t);
985
+ function Ot(e, t, n) {
986
+ let r = Dt(e.blocks, t);
987
987
  if (!r) throw new E("block_missing", n, `No block with id "${t}".`, t);
988
988
  return r;
989
989
  }
990
- function Ot(e, t, n) {
990
+ function kt(e, t, n) {
991
991
  let r = {}, i = [], a = {}, o = [.../* @__PURE__ */ new Set([...Object.keys(t ?? {}), ...n ?? []])];
992
992
  for (let n of o) {
993
993
  let o = e[n];
@@ -1001,7 +1001,7 @@ function Ot(e, t, n) {
1001
1001
  expect: a
1002
1002
  };
1003
1003
  }
1004
- function kt(e, t) {
1004
+ function R(e, t) {
1005
1005
  return e.l10n?.[t] ?? {};
1006
1006
  }
1007
1007
  function z(e, t, n, r) {
@@ -1021,7 +1021,7 @@ function At(e) {
1021
1021
  return n;
1022
1022
  }
1023
1023
  function B(e) {
1024
- return e.flatMap((e) => [e, ...e.type === "wrapper" ? B(e.children) : Tt(e).flatMap(B)]);
1024
+ return e.flatMap((e) => [e, ...e.type === "wrapper" ? B(e.children) : Et(e).flatMap(B)]);
1025
1025
  }
1026
1026
  function jt(e, t) {
1027
1027
  let n = p(e);
@@ -1061,7 +1061,7 @@ function Mt(e, t, n) {
1061
1061
  expect: { block: p(t.block) }
1062
1062
  };
1063
1063
  case "deleteBlock": {
1064
- let r = Dt(e, t.blockId, n);
1064
+ let r = Ot(e, t.blockId, n);
1065
1065
  return {
1066
1066
  op: "addBlock",
1067
1067
  block: p(r.block),
@@ -1070,7 +1070,7 @@ function Mt(e, t, n) {
1070
1070
  };
1071
1071
  }
1072
1072
  case "moveBlock": {
1073
- let r = Dt(e, t.blockId, n);
1073
+ let r = Ot(e, t.blockId, n);
1074
1074
  return {
1075
1075
  op: "moveBlock",
1076
1076
  blockId: t.blockId,
@@ -1083,7 +1083,7 @@ function Mt(e, t, n) {
1083
1083
  };
1084
1084
  }
1085
1085
  case "updateBlock": {
1086
- let r = Dt(e, t.blockId, n).block, { set: i, unset: a, expect: o } = Ot(r, t.set, t.unset);
1086
+ let r = Ot(e, t.blockId, n).block, { set: i, unset: a, expect: o } = kt(r, t.set, t.unset);
1087
1087
  return [{
1088
1088
  op: "updateBlock",
1089
1089
  blockId: t.blockId,
@@ -1093,7 +1093,7 @@ function Mt(e, t, n) {
1093
1093
  }, ...jt(e, t)];
1094
1094
  }
1095
1095
  case "updateSettings": {
1096
- let { set: n, unset: r, expect: i } = Ot(e.settings, t.set, t.unset);
1096
+ let { set: n, unset: r, expect: i } = kt(e.settings, t.set, t.unset);
1097
1097
  return [{
1098
1098
  op: "updateSettings",
1099
1099
  ...Object.keys(n).length > 0 ? { set: n } : {},
@@ -1147,10 +1147,10 @@ function Mt(e, t, n) {
1147
1147
  op: "updateBlockLocale",
1148
1148
  blockId: t.blockId,
1149
1149
  locale: t.locale,
1150
- ...z(kt(i, t.locale), kt(a, t.locale), r, t.hidden !== void 0)
1150
+ ...z(R(i, t.locale), R(a, t.locale), r, t.hidden !== void 0)
1151
1151
  };
1152
1152
  }
1153
- let { hidden: i, ...a } = z(kt(e.settings, t.locale), kt(n.settings, t.locale), r, !1);
1153
+ let { hidden: i, ...a } = z(R(e.settings, t.locale), R(n.settings, t.locale), r, !1);
1154
1154
  return {
1155
1155
  op: "updateSettingsLocale",
1156
1156
  locale: t.locale,
@@ -1339,12 +1339,25 @@ function an(e) {
1339
1339
  }
1340
1340
  var on = 2e4, sn = /* @__PURE__ */ new Set(["\"", "'"]);
1341
1341
  function U(e, t) {
1342
- let n = null;
1343
- for (let r = t; r < e.length; r++) {
1344
- let t = e[r];
1342
+ let n = null, r = "tag";
1343
+ for (let i = t; i < e.length; i++) {
1344
+ let t = e[i];
1345
1345
  if (n !== null) t === n && (n = null);
1346
- else if (sn.has(t)) n = t;
1347
- else if (t === ">") return r;
1346
+ else {
1347
+ if (r === "beforeValue") {
1348
+ if (W(t)) continue;
1349
+ if (sn.has(t)) {
1350
+ n = t, r = "tag";
1351
+ continue;
1352
+ }
1353
+ r = "unquotedValue";
1354
+ }
1355
+ if (r === "unquotedValue") {
1356
+ if (t === ">") return i;
1357
+ W(t) && (r = "tag");
1358
+ } else if (t === "=") r = "beforeValue";
1359
+ else if (t === ">") return i;
1360
+ }
1348
1361
  }
1349
1362
  return -1;
1350
1363
  }
@@ -2539,4 +2552,4 @@ function Qr(e) {
2539
2552
  let t = e;
2540
2553
  return Array.isArray(t.blocks);
2541
2554
  }
2542
- export { je as $, r as $t, Zn as A, kn as At, Pn as B, ie as Bt, Ie as C, V as Ct, Z as D, cr as Dt, sr as E, H as Et, tn as F, v as Ft, Vn as G, p as Gt, Pe as H, Vr as Ht, Ln as I, dn as It, zn as J, de as Jt, Gn as K, ue as Kt, Hn as L, ne as Lt, Kn as M, Or as Mt, Jn as N, y as Nt, qr as O, ke as Ot, jn as P, Se as Pt, en as Q, n as Qt, Fn as R, an as Rt, An as S, It as St, or as T, S as Tt, Yn as U, Oe as Ut, Rn as V, Xr as Vt, Bn as W, Lr as Wt, G as X, Ur as Xt, Xn as Y, C as Yt, m as Z, Gr as Zt, he as _, Jr as _t, Ft as a, Y as at, on as b, yr as bt, s as c, Br as ct, E as d, Fr as dt, o as en, T as et, l as f, Wr as ft, $ as g, _e as gt, se as h, Lt as ht, e as i, ar as in, jr as it, In as j, Te as jt, ee as k, Ae as kt, vr as l, Hr as lt, h as m, Nt as mt, f as n, t as nn, hr as nt, Zt as o, Fe as ot, pr as p, oe as pt, Nn as q, fe as qt, i as r, En as rn, Cr as rt, Qt as s, Yr as st, d as t, x as tn, te as tt, _r as u, Ir as ut, c as v, zr as vt, D as w, xe as wt, fr as x, _ as xt, gn as y, Qr as yt, Un as z, Mr as zt };
2555
+ export { je as $, n as $t, Zn as A, Ae as At, Pn as B, Mr as Bt, Ie as C, It as Ct, Z as D, H as Dt, sr as E, S as Et, tn as F, Se as Ft, Vn as G, Lr as Gt, Pe as H, Xr as Ht, Ln as I, v as It, zn as J, fe as Jt, Gn as K, p as Kt, Hn as L, dn as Lt, Kn as M, Te as Mt, Jn as N, Or as Nt, qr as O, cr as Ot, jn as P, y as Pt, en as Q, Gr as Qt, Fn as R, ne as Rt, An as S, _ as St, or as T, xe as Tt, Yn as U, Vr as Ut, Rn as V, ie as Vt, Bn as W, Oe as Wt, G as X, C as Xt, Xn as Y, de as Yt, m as Z, Ur as Zt, he as _, _e as _t, Ft as a, ar as an, jr as at, on as b, Qr as bt, s as c, Yr as ct, E as d, Ir as dt, r as en, T as et, l as f, Fr as ft, $ as g, Lt as gt, se as h, Nt as ht, e as i, En as in, U as it, In as j, kn as jt, ee as k, ke as kt, vr as l, Br as lt, h as m, oe as mt, f as n, x as nn, hr as nt, Zt as o, Y as ot, pr as p, Wr as pt, Nn as q, ue as qt, i as r, t as rn, Cr as rt, Qt as s, Fe as st, d as t, o as tn, te as tt, _r as u, Hr as ut, c as v, Jr as vt, D as w, V as wt, fr as x, yr as xt, gn as y, zr as yt, Un as z, an as zt };
@@ -1,9 +1,9 @@
1
1
  import { Ft as e, M as t, Mt as n, O as r, Pt as i, U as a, W as o, Z as s, c, ct as l, d as u, et as d, f, l as p, u as m, y as h } from "./vue.runtime.esm-bundler-BJXc_Mri.js";
2
2
  import { a as g, c as _, s as v } from "./runtime-dom.esm-bundler-DlHp8xgy.js";
3
- import { _t as y, ct as b, g as x, st as S } from "./dist-Cdkm20M6.js";
4
- import { a as C, o as w, s as T } from "./LogicTagInsertButton-DgTJ6Lvx.js";
3
+ import { ct as y, g as b, lt as x, vt as S } from "./dist-C34cYI5S.js";
4
+ import { a as C, o as w, s as T } from "./LogicTagInsertButton-XESwnJia.js";
5
5
  import { t as ee } from "./useI18n-CgtvtF4C.js";
6
- import { t as E } from "./useMergeTag-C9Okr87y.js";
6
+ import { t as E } from "./useMergeTag-DC4a8b_v.js";
7
7
  import { H as D, Kn as O, Qn as k, Zn as A, _n as j, m as M, qn as te, s as N, u as ne, v as re } from "./dist-BWflWcpW.js";
8
8
  import { n as P, t as ie } from "./dist-fqSers8_.js";
9
9
  // src/extensions/FontSize.ts
@@ -101,7 +101,7 @@ var ae = N.create({
101
101
  updateAttributes: { type: Function }
102
102
  },
103
103
  setup(s) {
104
- let h = s, { syntax: b } = E(), { t: x } = ee(), C = c(() => y(h.node.attrs.value, b)), w = c(() => S(h.node.attrs.value, b)), T = d(!1), D = d(""), O = d(null), k = !1;
104
+ let h = s, { syntax: b } = E(), { t: x } = ee(), C = c(() => S(h.node.attrs.value, b)), w = c(() => y(h.node.attrs.value, b)), T = d(!1), D = d(""), O = d(null), k = !1;
105
105
  function A() {
106
106
  D.value = h.node.attrs.value, k = !1, T.value = !0, r(() => {
107
107
  O.value?.focus(), O.value?.select();
@@ -113,7 +113,7 @@ var ae = N.create({
113
113
  let e = D.value.trim();
114
114
  e && e !== h.node.attrs.value && h.updateAttributes({
115
115
  value: e,
116
- keyword: y(e, b) ? S(e, b) : ""
116
+ keyword: S(e, b) ? y(e, b) : ""
117
117
  }), T.value = !1;
118
118
  }
119
119
  function M(e) {
@@ -196,7 +196,7 @@ var me = M.create({
196
196
  inline: !0,
197
197
  atom: !0,
198
198
  addOptions() {
199
- return { syntax: x.liquid };
199
+ return { syntax: b.liquid };
200
200
  },
201
201
  addAttributes() {
202
202
  return {
@@ -216,12 +216,12 @@ var me = M.create({
216
216
  return [{ tag: "span[data-logic-merge-tag]" }];
217
217
  },
218
218
  renderHTML({ node: e, HTMLAttributes: t }) {
219
- if (!y(e.attrs.value, this.options.syntax)) return [
219
+ if (!S(e.attrs.value, this.options.syntax)) return [
220
220
  "span",
221
221
  {},
222
222
  e.attrs.value
223
223
  ];
224
- let n = S(e.attrs.value, this.options.syntax);
224
+ let n = y(e.attrs.value, this.options.syntax);
225
225
  return [
226
226
  "span",
227
227
  j(t, {
@@ -246,8 +246,8 @@ var me = M.create({
246
246
  find: e,
247
247
  handler: ({ state: e, range: t, match: n }) => {
248
248
  let r = n[0];
249
- if (!y(r, this.options.syntax)) return;
250
- let i = S(r, this.options.syntax), a = this.type.create({
249
+ if (!S(r, this.options.syntax)) return;
250
+ let i = y(r, this.options.syntax), a = this.type.create({
251
251
  value: r,
252
252
  keyword: i
253
253
  });
@@ -261,8 +261,8 @@ var me = M.create({
261
261
  find: e,
262
262
  handler: ({ state: e, range: t, match: n }) => {
263
263
  let r = n[0];
264
- if (!y(r, this.options.syntax)) return;
265
- let i = S(r, this.options.syntax), a = this.type.create({
264
+ if (!S(r, this.options.syntax)) return;
265
+ let i = y(r, this.options.syntax), a = this.type.create({
266
266
  value: r,
267
267
  keyword: i
268
268
  });
@@ -379,7 +379,7 @@ var me = M.create({
379
379
  addOptions() {
380
380
  return {
381
381
  mergeTags: () => [],
382
- syntax: x.liquid
382
+ syntax: b.liquid
383
383
  };
384
384
  },
385
385
  addAttributes() {
@@ -400,7 +400,7 @@ var me = M.create({
400
400
  return [{ tag: "span[data-merge-tag]" }];
401
401
  },
402
402
  renderHTML({ node: e, HTMLAttributes: t }) {
403
- let n = b(e.attrs.value, this.options.mergeTags());
403
+ let n = x(e.attrs.value, this.options.mergeTags());
404
404
  return [
405
405
  "span",
406
406
  j(t, {
@@ -433,7 +433,7 @@ var me = M.create({
433
433
  return [new ne({
434
434
  find: e,
435
435
  handler: ({ state: e, range: t, match: n }) => {
436
- let r = n[0], i = b(r, this.options.mergeTags()), a = this.type.create({
436
+ let r = n[0], i = x(r, this.options.mergeTags()), a = this.type.create({
437
437
  label: i,
438
438
  value: r
439
439
  });
@@ -446,7 +446,7 @@ var me = M.create({
446
446
  return [new re({
447
447
  find: e,
448
448
  handler: ({ state: e, range: t, match: n }) => {
449
- let r = n[0], i = b(r, this.options.mergeTags()), a = this.type.create({
449
+ let r = n[0], i = x(r, this.options.mergeTags()), a = this.type.create({
450
450
  label: i,
451
451
  value: r
452
452
  });