@useinsider/guido 3.10.1-beta.e36dd40 → 3.11.0-beta.04af241

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 (50) hide show
  1. package/dist/components/organisms/header/EditorActions.vue.js +1 -1
  2. package/dist/components/organisms/header/HeaderWrapper.vue.js +3 -3
  3. package/dist/components/organisms/header/HeaderWrapper.vue2.js +2 -0
  4. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +1 -1
  5. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +5 -5
  6. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +2 -2
  7. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
  8. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +9 -9
  9. package/dist/composables/useCortexBlueprintBridge.js +7 -7
  10. package/dist/composables/useCustomInterfaceAppearance.js +16 -18
  11. package/dist/composables/useEmailTemplateApplier.js +9 -9
  12. package/dist/composables/useExport.js +18 -18
  13. package/dist/composables/useHtmlValidator.js +90 -90
  14. package/dist/composables/useStripo.js +53 -51
  15. package/dist/composables/useStripoNotifications.js +26 -0
  16. package/dist/composables/useToaster.js +11 -11
  17. package/dist/composables/useVersionHistoryApi.js +2 -2
  18. package/dist/composables/validators/useLiquidValidator.js +1 -1
  19. package/dist/composables/validators/useUnsubscribeBlockValidator.js +10 -10
  20. package/dist/config/compiler/recommendationCompilerRules.js +55 -38
  21. package/dist/config/compiler/utils/recommendationCompilerUtils.js +88 -77
  22. package/dist/config/i18n/en/labels.json.js +4 -1
  23. package/dist/enums/toaster.js +2 -2
  24. package/dist/enums/unsubscribe.js +41 -36
  25. package/dist/extensions/Blocks/Checkbox/block.js +5 -3
  26. package/dist/extensions/Blocks/Checkbox/control.js +42 -28
  27. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +43 -41
  28. package/dist/extensions/Blocks/RadioButton/block.js +9 -7
  29. package/dist/extensions/Blocks/RadioButton/control.js +64 -50
  30. package/dist/extensions/Blocks/Recommendation/useRecommendationBlockWarning.js +7 -7
  31. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMap.js +2 -0
  32. package/dist/guido.css +1 -1
  33. package/dist/package.json.js +1 -1
  34. package/dist/services/blankTemplate.js +1 -1
  35. package/dist/services/templateLibraryApi.js +8 -7
  36. package/dist/src/composables/useStripoNotifications.d.ts +10 -0
  37. package/dist/src/enums/toaster.d.ts +2 -2
  38. package/dist/src/enums/unsubscribe.d.ts +2 -0
  39. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +1 -0
  40. package/dist/src/stores/toaster.d.ts +2 -3
  41. package/dist/src/utils/environmentUtil.d.ts +5 -2
  42. package/dist/static/styles/components/dropdown-menu.css.js +12 -0
  43. package/dist/static/styles/components/wide-panel.css.js +7 -0
  44. package/dist/stores/toaster.js +10 -10
  45. package/dist/utils/environmentUtil.js +3 -2
  46. package/dist/utils/templatePreparation.js +20 -16
  47. package/package.json +12 -3
  48. package/dist/src/composables/useHtmlValidator.test.d.ts +0 -1
  49. package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +0 -1
  50. package/dist/static/styles/components/notification.css.js +0 -74
@@ -15,7 +15,7 @@ var u = function() {
15
15
  p,
16
16
  !1,
17
17
  null,
18
- "82128f7d"
18
+ "6e711fd7"
19
19
  );
20
20
  const v = c.exports;
21
21
  export {
@@ -10,9 +10,9 @@ var s = function() {
10
10
  d,
11
11
  !1,
12
12
  null,
13
- "5c02dcc7"
13
+ "d11dd577"
14
14
  );
15
- const p = i.exports;
15
+ const c = i.exports;
16
16
  export {
17
- p as default
17
+ c as default
18
18
  };
@@ -8,6 +8,8 @@ const c = /* @__PURE__ */ n({
8
8
  setup(l, { expose: r }) {
9
9
  const e = m(null);
10
10
  return r({
11
+ // Stryker disable next-line OptionalChaining: RightSlot is always rendered (no
12
+ // v-if), so rightSlotRef.value is never null and `?.` cannot short-circuit.
11
13
  handleSave: (t) => {
12
14
  var o;
13
15
  return (o = e.value) == null ? void 0 : o.handleSave(t);
@@ -14,7 +14,7 @@ var n = function() {
14
14
  a,
15
15
  !1,
16
16
  null,
17
- "64c52560"
17
+ "fad98586"
18
18
  );
19
19
  const _ = c.exports;
20
20
  export {
@@ -1,6 +1,6 @@
1
- import n from "./UnsubscribePageSelection.vue2.js";
1
+ import a from "./UnsubscribePageSelection.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ import n from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var o = function() {
5
5
  var r = this, e = r._self._c, t = r._self._setupProxy;
6
6
  return e(t.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", size: "large", "footer-button-group-options": t.footerButtonGroupOptions, status: t.unsubscribeStore.pageSelectionDrawerStatus, "title-text": t.trans("newsletter.select-a-template") }, on: { cancelOrBackButtonEvent: t.handleBack, onCloseEvent: t.handleClose, primaryButtonEvent: t.handleSave }, scopedSlots: r._u([{ key: "headerBottomSlot", fn: function() {
@@ -10,13 +10,13 @@ var o = function() {
10
10
  return t.selectTemplate(s.id);
11
11
  } } }, [e(t.InContainer, { staticClass: "template-container o-h", class: { selected: t.unsubscribeStore.getSelectedTemplateByActiveType === s.id }, attrs: { border: t.getBorderClass(s.id) } }, [e("div", { staticClass: "w-1 h-1 d-f j-c-c a-i-c" }, [e("img", { staticClass: "w-1 h-1 thumbnail o-h", attrs: { alt: s.name, src: s.thumbnail } })])]), e("div", { staticClass: "mt-1 f-s-1" }, [r._v(" " + r._s(s.name) + " ")])], 1);
12
12
  }), 0)]);
13
- }, i = [], c = /* @__PURE__ */ a(
14
- n,
13
+ }, i = [], c = /* @__PURE__ */ n(
14
+ a,
15
15
  o,
16
16
  i,
17
17
  !1,
18
18
  null,
19
- "669fe7cf"
19
+ "91a26acd"
20
20
  );
21
21
  const _ = c.exports;
22
22
  export {
@@ -29,9 +29,9 @@ const N = /* @__PURE__ */ y({
29
29
  t();
30
30
  }, 500);
31
31
  }, m = () => {
32
- n(), e.pageSelectionUpdateStatus || document.dispatchEvent(new CustomEvent("unsubscribe:cancel", {
32
+ e.pageSelectionDrawerStatus && (n(), e.pageSelectionUpdateStatus || document.dispatchEvent(new CustomEvent("unsubscribe:cancel", {
33
33
  detail: { blockId: e.pendingBlockId }
34
- }));
34
+ })));
35
35
  }, b = () => {
36
36
  if (e.isActiveTypeFirstInCollection) {
37
37
  n(), e.pageSelectionUpdateStatus || (e.typeSelectionDrawerStatus = !0);
@@ -2,15 +2,15 @@ import n from "./UnsubscribeTypeSelection.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var i = function() {
5
- var e = this, s = e._self._c, t = e._self._setupProxy;
6
- return s(t.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, status: t.unsubscribeStore.typeSelectionDrawerStatus, "title-text": t.trans("unsubscription-preference.select-unsubscribe-page-title") }, on: { cancelOrBackButtonEvent: t.closeModal, onCloseEvent: t.closeModal, primaryButtonEvent: t.selectCollection } }, [s(t.InSegments, { staticClass: "w-1", attrs: { "with-icon": "", align: "vertical", disable: t.isSelecting, "segment-list": t.segmentList, selected: t.selectedCollection, "skeleton-sizing": { width: 495, height: 180 }, "skeleton-status": t.skeletonStatus }, on: { click: t.changeCollection } })], 1);
5
+ var t = this, s = t._self._c, e = t._self._setupProxy;
6
+ return s(e.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", "description-text": e.descriptionText, "footer-button-group-options": e.footerButtonGroupOptions, status: e.unsubscribeStore.typeSelectionDrawerStatus, "title-text": e.trans("unsubscription-preference.select-unsubscribe-page-title") }, on: { cancelOrBackButtonEvent: e.closeModal, onCloseEvent: e.closeModal, primaryButtonEvent: e.selectCollection } }, [s(e.InSegments, { staticClass: "w-1", attrs: { "with-icon": "", align: "vertical", disable: e.isSelecting, "segment-list": e.segmentList, selected: e.selectedCollection, "skeleton-sizing": { width: 495, height: 180 }, "skeleton-status": e.skeletonStatus }, on: { click: e.changeCollection } })], 1);
7
7
  }, r = [], c = /* @__PURE__ */ o(
8
8
  n,
9
9
  i,
10
10
  r,
11
11
  !1,
12
12
  null,
13
- "7a305bb2"
13
+ "b9a93c6e"
14
14
  );
15
15
  const _ = c.exports;
16
16
  export {
@@ -10,10 +10,10 @@ import { InSegments as L } from "@useinsider/design-system-vue";
10
10
  const W = /* @__PURE__ */ _({
11
11
  __name: "UnsubscribeTypeSelection",
12
12
  setup(k) {
13
- const t = N(), { showToaster: d } = w(), e = G(), n = b(!1), o = b(!0), r = b(l.GLOBAL_UNSUBSCRIBE), T = t(
13
+ const t = N(), { showToaster: d } = w(), e = G(), n = b(!1), o = b(!0), r = b(l.GLOBAL_UNSUBSCRIBE), y = t(
14
14
  "unsubscription-preference.select-unsubscribe-page-description",
15
15
  { action: `<a href="${D.GLOBAL_UNSUBSCRIBE}" target="_blank">${t("ds-rules.visit-academy")}</a>` }
16
- ), y = f(() => [
16
+ ), T = f(() => [
17
17
  {
18
18
  description: t("unsubscription-preference.type-global-unsubscribe-description"),
19
19
  icon: "line-contact-global-unsub-page",
@@ -31,7 +31,7 @@ const W = /* @__PURE__ */ _({
31
31
  disable: e.isSubscriptionPreferencesCenterDisabled,
32
32
  tooltipText: e.isSubscriptionPreferencesCenterDisabled ? t("unsubscription-preference.pref-center-added") : ""
33
33
  }
34
- ]), g = f(
34
+ ]), S = f(
35
35
  () => e.isGlobalUnsubscribeDisabled && e.isSubscriptionPreferencesCenterDisabled
36
36
  ), C = f(() => ({
37
37
  primaryButton: {
@@ -41,7 +41,7 @@ const W = /* @__PURE__ */ _({
41
41
  n.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
42
42
  ),
43
43
  loadingStatus: n.value,
44
- disabledStatus: g.value,
44
+ disabledStatus: S.value,
45
45
  skeletonStatus: o.value,
46
46
  skeletonSizing: { width: 168, height: 40 }
47
47
  },
@@ -53,12 +53,12 @@ const W = /* @__PURE__ */ _({
53
53
  skeletonStatus: o.value,
54
54
  skeletonSizing: { width: 78, height: 40 }
55
55
  }
56
- })), S = (s) => {
57
- e.typeSelectionDrawerStatus = !1, document.dispatchEvent(new CustomEvent("unsubscribe:cancel", {
56
+ })), g = (s) => {
57
+ e.typeSelectionDrawerStatus && (e.typeSelectionDrawerStatus = !1, document.dispatchEvent(new CustomEvent("unsubscribe:cancel", {
58
58
  detail: { blockId: e.pendingBlockId }
59
59
  })), s && setTimeout(() => {
60
60
  s();
61
- }, 500);
61
+ }, 500));
62
62
  }, E = (s) => {
63
63
  r.value = s;
64
64
  }, m = () => {
@@ -98,14 +98,14 @@ const W = /* @__PURE__ */ _({
98
98
  }), !1;
99
99
  }, B = async () => {
100
100
  if (n.value = !0, await e.fetchTemplates(!0), e.setCollection(r.value), !m()) {
101
- n.value = !1, S();
101
+ n.value = !1, g();
102
102
  return;
103
103
  }
104
104
  n.value = !1, e.typeSelectionDrawerStatus = !1, e.pageSelectionDrawerStatus = !0;
105
105
  };
106
106
  return v(() => e.typeSelectionDrawerStatus, (s) => {
107
107
  s && (o.value = !0, r.value = l.GLOBAL_UNSUBSCRIBE, e.isGlobalUnsubscribeDisabled && (r.value = e.isSubscriptionPreferencesCenterDisabled ? 0 : l.SUBSCRIPTION_PREFERENCE_CENTER), o.value = !1);
108
- }), { __sfc: !0, trans: t, showToaster: d, unsubscribeStore: e, isSelecting: n, skeletonStatus: o, selectedCollection: r, descriptionText: T, segmentList: y, hasNoSelectableType: g, footerButtonGroupOptions: C, closeModal: S, changeCollection: E, validateTemplates: m, selectCollection: B, WpDrawer: U, InSegments: L };
108
+ }), { __sfc: !0, trans: t, showToaster: d, unsubscribeStore: e, isSelecting: n, skeletonStatus: o, selectedCollection: r, descriptionText: y, segmentList: T, hasNoSelectableType: S, footerButtonGroupOptions: C, closeModal: g, changeCollection: E, validateTemplates: m, selectCollection: B, WpDrawer: U, InSegments: L };
109
109
  }
110
110
  });
111
111
  export {
@@ -19,10 +19,10 @@ const x = "email_template", L = "chat", M = "guido:debug:ai", R = () => {
19
19
  const l = c._s, p = l == null ? void 0 : l.get(L);
20
20
  if (!p)
21
21
  return;
22
- const { markPending: d, applyTemplate: f, applyTemplateDebounced: T } = w(), { showToaster: h } = I(), y = P(), A = (r, t) => {
23
- const e = y(r);
22
+ const { markPending: d, applyTemplate: f, applyTemplateDebounced: T } = w(), { showToaster: E } = I(), h = P(), y = (r, t) => {
23
+ const e = h(r);
24
24
  return e === r ? t : e;
25
- }, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set(), u = R(), E = (r, t) => {
25
+ }, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set(), u = R(), A = (r, t) => {
26
26
  u && console.debug(`[guido:cortex] msg=${r ?? "?"} type=${(t == null ? void 0 : t.type) ?? "?"}`, t);
27
27
  }, b = (r) => {
28
28
  if (r.blueprintType !== x)
@@ -36,9 +36,9 @@ const x = "email_template", L = "chat", M = "guido:debug:ai", R = () => {
36
36
  }
37
37
  const o = i.get(t);
38
38
  o === void 0 ? (i.set(t, e.html), f(t, e)) : o !== e.html && (i.set(t, e.html), T(t, e));
39
- }, s = (r) => r === void 0 || a.has(r) ? !1 : (a.add(r), h({
40
- type: S.Alert,
41
- message: A("newsletter.ai-template-failed", "AI couldn't generate the template. Please try again.")
39
+ }, s = (r) => r === void 0 || a.has(r) ? !1 : (a.add(r), E({
40
+ type: S.Error,
41
+ message: y("newsletter.ai-template-failed", "AI couldn't generate the template. Please try again.")
42
42
  }), !0), m = B(
43
43
  () => p.messages,
44
44
  (r) => {
@@ -48,7 +48,7 @@ const x = "email_template", L = "chat", M = "guido:debug:ai", R = () => {
48
48
  const o = t == null ? void 0 : t.segments;
49
49
  Array.isArray(o) && o.forEach((n) => {
50
50
  if (n)
51
- switch (E(e, n), n.type) {
51
+ switch (A(e, n), n.type) {
52
52
  case "blueprint":
53
53
  b(n);
54
54
  break;
@@ -4,21 +4,20 @@ import e from "../static/styles/components/amp-block.css.js";
4
4
  import i from "../static/styles/components/base-input.css.js";
5
5
  import p from "../static/styles/components/button-group.css.js";
6
6
  import n from "../static/styles/components/button.css.js";
7
- import C from "../static/styles/components/combobox.css.js";
8
- import s from "../static/styles/components/counter.css.js";
7
+ import s from "../static/styles/components/combobox.css.js";
8
+ import C from "../static/styles/components/counter.css.js";
9
9
  import f from "../static/styles/components/dropdown-menu.css.js";
10
10
  import a from "../static/styles/components/loader.css.js";
11
11
  import u from "../static/styles/components/narrow-panel.css.js";
12
- import c from "../static/styles/components/notification.css.js";
13
- import d from "../static/styles/components/popup.css.js";
14
- import l from "../static/styles/components/switcher.css.js";
15
- import h from "../static/styles/components/tabs.css.js";
16
- import w from "../static/styles/components/tools.css.js";
17
- import y from "../static/styles/components/version-history.css.js";
18
- import B from "../static/styles/components/wide-panel.css.js";
19
- import b from "../static/styles/variables.css.js";
20
- const A = [
21
- b,
12
+ import c from "../static/styles/components/popup.css.js";
13
+ import d from "../static/styles/components/switcher.css.js";
14
+ import l from "../static/styles/components/tabs.css.js";
15
+ import h from "../static/styles/components/tools.css.js";
16
+ import w from "../static/styles/components/version-history.css.js";
17
+ import y from "../static/styles/components/wide-panel.css.js";
18
+ import B from "../static/styles/variables.css.js";
19
+ const b = [
20
+ B,
22
21
  // Must be on top
23
22
  S,
24
23
  // Must be on top
@@ -27,8 +26,8 @@ const A = [
27
26
  i,
28
27
  p,
29
28
  n,
30
- C,
31
29
  s,
30
+ C,
32
31
  f,
33
32
  a,
34
33
  u,
@@ -37,13 +36,12 @@ const A = [
37
36
  l,
38
37
  h,
39
38
  w,
40
- y,
41
- B
39
+ y
42
40
  ].join(`
43
41
 
44
- `), F = () => ({ importCss: () => {
42
+ `), v = () => ({ importCss: () => {
45
43
  const o = new CSSStyleSheet();
46
- o.replaceSync(A);
44
+ o.replaceSync(b);
47
45
  const r = document.querySelector("ui-editor");
48
46
  if (!r)
49
47
  return;
@@ -51,5 +49,5 @@ const A = [
51
49
  t && (t.adoptedStyleSheets = [o]);
52
50
  } });
53
51
  export {
54
- F as useCustomInterfaceAppearance
52
+ v as useCustomInterfaceAppearance
55
53
  };
@@ -3,19 +3,19 @@ import { useToaster as f } from "./useToaster.js";
3
3
  import { useTranslations as y } from "./useTranslations.js";
4
4
  import { ToasterTypeOptions as n } from "../enums/toaster.js";
5
5
  import { ref as v } from "vue";
6
- const h = 250, s = v({}), o = {}, j = () => {
7
- const { updateHtmlAndCss: l } = T(), { showToaster: r } = f(), i = y(), u = (e) => {
6
+ const E = 250, s = v({}), o = {}, j = () => {
7
+ const { updateHtmlAndCss: l } = T(), { showToaster: p } = f(), i = y(), u = (e) => {
8
8
  s.value[e] === void 0 && (s.value = { ...s.value, [e]: "pending" });
9
- }, c = (e, t, p) => {
9
+ }, c = (e, t, r) => {
10
10
  s.value = { ...s.value, [e]: "applying" };
11
11
  try {
12
- l(t, p), s.value = { ...s.value, [e]: "applied" }, r({
12
+ l(t, r), s.value = { ...s.value, [e]: "applied" }, p({
13
13
  type: n.Success,
14
14
  message: i("newsletter.ai-template-applied")
15
15
  });
16
16
  } catch (a) {
17
- s.value = { ...s.value, [e]: "failed" }, r({
18
- type: n.Alert,
17
+ s.value = { ...s.value, [e]: "failed" }, p({
18
+ type: n.Error,
19
19
  message: a instanceof Error ? a.message : "Failed to apply template"
20
20
  });
21
21
  }
@@ -29,10 +29,10 @@ const h = 250, s = v({}), o = {}, j = () => {
29
29
  if (!t.html)
30
30
  return;
31
31
  m(e);
32
- const { html: p } = t, a = t.css ?? "";
32
+ const { html: r } = t, a = t.css ?? "";
33
33
  o[e] = setTimeout(() => {
34
- delete o[e], c(e, p, a);
35
- }, h);
34
+ delete o[e], c(e, r, a);
35
+ }, E);
36
36
  } };
37
37
  }, k = () => {
38
38
  Object.values(o).forEach(clearTimeout), Object.keys(o).forEach((l) => delete o[l]), s.value = {};
@@ -3,39 +3,39 @@ import { useActionsApi as m } from "./useActionsApi.js";
3
3
  import { useHtmlCompiler as p } from "./useHtmlCompiler.js";
4
4
  import { useToaster as d } from "./useToaster.js";
5
5
  const H = () => {
6
- const l = (s, o, r) => {
7
- const i = new Blob([s], { type: r }), t = URL.createObjectURL(i), e = document.createElement("a");
6
+ const c = (s, o, n) => {
7
+ const i = new Blob([s], { type: n }), t = URL.createObjectURL(i), e = document.createElement("a");
8
8
  e.href = t, e.download = o, document.body.appendChild(e), e.click(), document.body.removeChild(e), URL.revokeObjectURL(t);
9
- }, c = (s) => {
10
- const o = /* @__PURE__ */ new Date(), r = String(o.getDate()).padStart(2, "0"), i = String(o.getMonth() + 1).padStart(2, "0"), t = o.getFullYear(), e = String(o.getHours()).padStart(2, "0"), n = String(o.getMinutes()).padStart(2, "0");
11
- return `${s}_${r}-${i}-${t}_${e}-${n}.html`;
9
+ }, l = (s) => {
10
+ const o = /* @__PURE__ */ new Date(), n = String(o.getDate()).padStart(2, "0"), i = String(o.getMonth() + 1).padStart(2, "0"), t = o.getFullYear(), e = String(o.getHours()).padStart(2, "0"), r = String(o.getMinutes()).padStart(2, "0");
11
+ return `${s}_${n}-${i}-${t}_${e}-${r}.html`;
12
12
  };
13
13
  return { exportHtml: async (s = !0) => {
14
- const { getCompiledEmail: o } = m(), { showToaster: r } = d(), { compileHtml: i } = p();
14
+ const { getCompiledEmail: o } = m(), { showToaster: n } = d(), { compileHtml: i } = p();
15
15
  try {
16
16
  const { html: t } = await o();
17
17
  if (t) {
18
18
  let e = t;
19
19
  if (s) {
20
- const n = i(t);
21
- e = n.compiledHtml, console.debug("HTML Compilation Stats:", {
22
- originalSize: n.stats.originalSize,
23
- compiledSize: n.stats.compiledSize,
24
- reduction: `${n.stats.reductionPercentage.toFixed(2)}%`,
25
- appliedRules: n.appliedRules,
26
- executionTime: `${n.stats.executionTime.toFixed(2)}ms`
20
+ const r = i(t);
21
+ e = r.compiledHtml, console.debug("HTML Compilation Stats:", {
22
+ originalSize: r.stats.originalSize,
23
+ compiledSize: r.stats.compiledSize,
24
+ reduction: `${r.stats.reductionPercentage.toFixed(2)}%`,
25
+ appliedRules: r.appliedRules,
26
+ executionTime: `${r.stats.executionTime.toFixed(2)}ms`
27
27
  });
28
28
  }
29
- l(e, c("HTML"), "text/html");
29
+ c(e, l("HTML"), "text/html");
30
30
  } else
31
- r({
32
- type: a.Alert,
31
+ n({
32
+ type: a.Error,
33
33
  message: "No HTML content to download"
34
34
  });
35
35
  } catch (t) {
36
36
  const e = t instanceof Error ? t.message : String(t);
37
- r({
38
- type: a.Alert,
37
+ n({
38
+ type: a.Error,
39
39
  message: `Error compiling email: ${e}`
40
40
  });
41
41
  }