@useinsider/guido 3.11.0-beta.7f03578 → 3.11.0-beta.88cf651

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.
@@ -1,5 +1,5 @@
1
- import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
2
- import { object as a, number as s, optional as e, string as t, picklist as l, pipe as p, minLength as b, custom as h, boolean as o, array as c, record as k, literal as i, looseObject as y, variant as g, union as f, unknown as n } from "../../node_modules/valibot/dist/index.js";
1
+ import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
2
+ import { object as a, number as n, optional as e, string as t, picklist as l, pipe as p, minLength as b, custom as f, boolean as o, array as c, record as k, fallback as C, literal as i, looseObject as g, variant as R, union as h, unknown as s, lazy as T } from "../../node_modules/valibot/dist/index.js";
3
3
  const d = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -12,7 +12,7 @@ const d = {
12
12
  ARCHITECT: 49,
13
13
  /** Unsubscribe page builder */
14
14
  UNSUBSCRIBE_PAGES: 97
15
- }, R = a({
15
+ }, A = a({
16
16
  /** Unique identifier for the template being edited */
17
17
  templateId: p(
18
18
  t(),
@@ -25,12 +25,12 @@ const d = {
25
25
  ),
26
26
  /** Optional variation ID for A/B testing */
27
27
  variationId: e(t())
28
- }), T = a({
28
+ }), I = a({
29
29
  /** Fallback font name (e.g., "Georgia") */
30
30
  name: t(),
31
31
  /** Fallback font family (e.g., "serif" or "sans-serif") */
32
32
  family: t()
33
- }), C = a({
33
+ }), L = a({
34
34
  /** Partner/organization name (required) */
35
35
  name: p(
36
36
  t(),
@@ -53,8 +53,8 @@ const d = {
53
53
  /** Display name for the current user */
54
54
  username: e(t(), "Guido User"),
55
55
  /** Fallback font settings from partner settings — used to match backend size calculation */
56
- fallbackFont: e(T)
57
- }), A = a({
56
+ fallbackFont: e(I)
57
+ }), v = a({
58
58
  /** Display text for the dynamic content */
59
59
  text: t(),
60
60
  /** Template variable value (e.g., {{username}}) */
@@ -68,35 +68,46 @@ const d = {
68
68
  value: t()
69
69
  })
70
70
  )
71
- }), I = y({
71
+ }), S = T(() => g({
72
+ text: e(t()),
73
+ // eslint-disable-next-line camelcase -- backend field name
74
+ tag_text: e(t()),
75
+ value: e(t()),
76
+ children: e(c(S)),
77
+ // eslint-disable-next-line camelcase -- backend field name
78
+ select_items: e(c(S))
79
+ })), P = k(
80
+ t(),
81
+ C(c(S), [])
82
+ ), D = g({
72
83
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
73
- id: e(s()),
84
+ id: e(n()),
74
85
  /** Decimal places for price display (legacy data may use string or number) */
75
- decimalCount: e(f([t(), s()])),
86
+ decimalCount: e(h([t(), n()])),
76
87
  /** Pinned product IDs (empty array when filter-driven) */
77
- productIds: e(c(n())),
88
+ productIds: e(c(s())),
78
89
  /** Whether the block requested live products at send time */
79
90
  sendProductRequestFlag: e(o()),
80
91
  /** Whether to randomize product order */
81
92
  shuffleProducts: e(o()),
82
93
  /** Filter rules driving product selection */
83
- filters: e(c(n())),
94
+ filters: e(c(s())),
84
95
  /** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
85
96
  currency: e(t()),
86
97
  /** Currency display settings (separators, alignment, decimals) */
87
- currencySettings: e(n()),
98
+ currencySettings: e(s()),
88
99
  /** Locale (e.g. 'nl_NL') */
89
100
  language: e(t()),
90
101
  /** Recommendation strategy key (e.g. 'newArrivals') */
91
102
  strategy: e(t()),
92
103
  /** Snapshot of products as rendered by the legacy block */
93
- recommendedProducts: e(c(n())),
104
+ recommendedProducts: e(c(s())),
94
105
  /** Number of product cards per row */
95
- cardsInRow: e(s()),
106
+ cardsInRow: e(n()),
96
107
  /** Mobile-only padding (right) */
97
- mobileRightPadding: e(s()),
108
+ mobileRightPadding: e(n()),
98
109
  /** Mobile-only padding (left) */
99
- mobileLeftPadding: e(s()),
110
+ mobileLeftPadding: e(n()),
100
111
  /** Disable responsive scaling */
101
112
  unresponsive: e(o()),
102
113
  /** Layout orientation ('vertical' | 'horizontal') */
@@ -106,14 +117,14 @@ const d = {
106
117
  /** Block type marker used by some legacy variants */
107
118
  blockType: e(t()),
108
119
  /** Size variant marker (legacy data may use string or number) */
109
- size: e(f([t(), s()])),
120
+ size: e(h([t(), n()])),
110
121
  /** Vertical responsiveness flag (legacy size=1 variants) */
111
122
  verticalResponsiveness: e(o()),
112
123
  /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
113
124
  isPriceMovedToNextLine: e(o()),
114
125
  /** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
115
126
  isPriceDeletedForZeroSale: e(o())
116
- }), L = a({
127
+ }), E = a({
117
128
  /**
118
129
  * Legacy recommendation block configs keyed by block ID.
119
130
  * Pass this when loading a template authored with the v1
@@ -121,51 +132,58 @@ const d = {
121
132
  * strategy, currency, locale, and layout data.
122
133
  */
123
134
  recommendationConfigs: e(
124
- k(t(), I),
135
+ k(t(), D),
125
136
  {}
126
137
  )
127
- }), P = a({
138
+ }), M = a({
128
139
  /** Initial HTML content */
129
140
  html: e(t(), ""),
130
141
  /** Initial CSS content */
131
142
  css: e(t(), ""),
132
143
  /** Preselected dynamic content items */
133
144
  preselectedDynamicContent: e(
134
- c(A),
145
+ c(v),
135
146
  []
136
147
  ),
148
+ /**
149
+ * Partner-keyed set of dynamic-content items the account offers, e.g.
150
+ * `{ [partnerName]: [{ text, value, children }] }`. Guido flattens the active
151
+ * (first) partner's leaf attributes into the label→token map that repairs
152
+ * label-form placeholders (`{{ Phone Number }}`) in dropped saved modules.
153
+ */
154
+ dynamicContentList: e(P, {}),
137
155
  /** Valid custom field attribute names from the partner's categorized fields */
138
156
  customFieldAttributes: e(c(t()), []),
139
157
  /** Selected unsubscribe page IDs */
140
- selectedUnsubscribePages: e(c(s()), []),
158
+ selectedUnsubscribePages: e(c(n()), []),
141
159
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
142
160
  forceRecreate: e(o(), !1),
143
161
  /** Migration-only inputs (legacy block configs) */
144
- migration: e(L, {})
145
- }), v = a({
162
+ migration: e(E, {})
163
+ }), N = a({
146
164
  /** Sender display name */
147
165
  senderName: e(t(), ""),
148
166
  /** Email subject line */
149
167
  subject: e(t(), "")
150
- }), E = a({
168
+ }), O = a({
151
169
  /** Locale for the editor UI */
152
170
  locale: e(t(), "en"),
153
171
  /** Path to translations object */
154
172
  translationsPath: e(t(), "window.trans[Object.keys(window.trans)[0]]"),
155
173
  /** Migration date for template compatibility */
156
- migrationDate: e(s(), 1759696858),
174
+ migrationDate: e(n(), 1759696858),
157
175
  /** Email header settings */
158
- emailHeader: e(v, { senderName: "", subject: "" }),
176
+ emailHeader: e(N, { senderName: "", subject: "" }),
159
177
  /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
160
- savedModulesFolderName: e(t(), S.SAVED_MODULES),
178
+ savedModulesFolderName: e(t(), y.SAVED_MODULES),
161
179
  /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
162
- defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
163
- }), M = a({
180
+ defaultModulesFolderName: e(t(), y.DEFAULT_MODULES)
181
+ }), x = a({
164
182
  /** Whether to show the header bar */
165
183
  showHeader: e(o(), !0),
166
184
  /** Custom label for back button (if shown) */
167
185
  backButtonLabel: e(t())
168
- }), O = a({
186
+ }), F = a({
169
187
  /** Enable dynamic content insertion */
170
188
  dynamicContent: e(o(), !0),
171
189
  /** Enable save as template functionality */
@@ -184,7 +202,7 @@ const d = {
184
202
  liquidSyntax: e(o(), !1),
185
203
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
186
204
  autosave: e(o(), !1)
187
- }), N = l([
205
+ }), U = l([
188
206
  "amp-accordion",
189
207
  "amp-carousel",
190
208
  "amp-form-controls",
@@ -198,7 +216,7 @@ const d = {
198
216
  "text-block",
199
217
  "timer-block",
200
218
  "video-block"
201
- ]), D = l([
219
+ ]), B = l([
202
220
  "dynamic-content",
203
221
  "checkbox-block",
204
222
  "radio-button-block",
@@ -206,15 +224,15 @@ const d = {
206
224
  "unsubscribe-block",
207
225
  "coupon-block",
208
226
  "items-block"
209
- ]), x = a({
227
+ ]), w = a({
210
228
  /** Default blocks to exclude from the editor */
211
229
  excludeDefaults: e(
212
- c(N),
230
+ c(U),
213
231
  []
214
232
  ),
215
233
  /** Custom blocks to include in the editor */
216
234
  includeCustoms: e(
217
- c(D),
235
+ c(B),
218
236
  []
219
237
  )
220
238
  }), m = a({
@@ -223,8 +241,8 @@ const d = {
223
241
  /** Human-readable description */
224
242
  description: e(t()),
225
243
  /** Priority for rule ordering (lower = earlier) */
226
- priority: s()
227
- }), F = a({
244
+ priority: n()
245
+ }), H = a({
228
246
  ...m.entries,
229
247
  type: i("replace"),
230
248
  /** String to search for */
@@ -233,7 +251,7 @@ const d = {
233
251
  replacement: t(),
234
252
  /** Replace all occurrences (default: false) */
235
253
  replaceAll: e(o())
236
- }), U = a({
254
+ }), _ = a({
237
255
  ...m.entries,
238
256
  type: i("regex"),
239
257
  /** Regex pattern string */
@@ -242,85 +260,87 @@ const d = {
242
260
  replacement: t(),
243
261
  /** Regex flags (e.g., 'gi') */
244
262
  flags: e(t())
245
- }), B = a({
263
+ }), j = a({
246
264
  ...m.entries,
247
265
  type: i("remove"),
248
266
  /** Strings or patterns to remove */
249
267
  targets: c(t())
250
- }), w = a({
268
+ }), q = a({
251
269
  ...m.entries,
252
270
  type: i("custom"),
253
271
  /** Custom processor function */
254
- processor: h(
272
+ processor: f(
255
273
  (u) => typeof u == "function",
256
274
  "processor must be a function"
257
275
  )
258
- }), H = g("type", [
259
- F,
260
- U,
261
- B,
262
- w
263
- ]), j = a({
276
+ }), G = R("type", [
277
+ H,
278
+ _,
279
+ j,
280
+ q
281
+ ]), V = a({
264
282
  /** Custom compiler rules to apply */
265
- customRules: e(c(H), []),
283
+ customRules: e(c(G), []),
266
284
  /** Skip default compiler rules */
267
285
  ignoreDefaultRules: e(o(), !1)
268
- }), q = a({
286
+ }), z = a({
269
287
  /**
270
288
  * External validation handler called before save completes.
271
289
  * Return false to cancel the save operation.
272
290
  */
273
291
  externalValidation: e(
274
- h(
292
+ f(
275
293
  (u) => typeof u == "function",
276
294
  "externalValidation must be a function"
277
295
  )
278
296
  )
279
- }), V = a({
297
+ }), K = a({
280
298
  // Required sections
281
299
  /** Identity configuration (required) */
282
- identity: R,
300
+ identity: A,
283
301
  /** Partner configuration (required) */
284
- partner: C,
302
+ partner: L,
285
303
  // Optional sections (with defaults)
286
304
  /** Template content and presets */
287
- template: e(P, {}),
305
+ template: e(M, {}),
288
306
  /** Editor settings */
289
- editor: e(E, {}),
307
+ editor: e(O, {}),
290
308
  /** UI configuration */
291
- ui: e(M, {}),
309
+ ui: e(x, {}),
292
310
  /** Feature toggles */
293
- features: e(O, {}),
311
+ features: e(F, {}),
294
312
  /** Block configuration */
295
- blocks: e(x, {}),
313
+ blocks: e(w, {}),
296
314
  /** Compiler configuration */
297
- compiler: e(j, {}),
315
+ compiler: e(V, {}),
298
316
  /** Callbacks and event handlers */
299
- callbacks: e(q, {})
317
+ callbacks: e(z, {})
300
318
  });
301
319
  export {
302
- x as BlocksSchema,
303
- q as CallbacksSchema,
304
- H as CompilerRuleSchema,
305
- j as CompilerSchema,
306
- D as CustomBlockTypeSchema,
307
- w as CustomRuleSchema,
308
- N as DefaultBlockTypeSchema,
309
- A as DynamicContentSchema,
310
- E as EditorSchema,
311
- v as EmailHeaderSchema,
312
- T as FallbackFontSchema,
313
- O as FeaturesSchema,
314
- V as GuidoConfigSchema,
315
- R as IdentitySchema,
316
- I as LegacyRecommendationConfigSchema,
320
+ w as BlocksSchema,
321
+ z as CallbacksSchema,
322
+ G as CompilerRuleSchema,
323
+ V as CompilerSchema,
324
+ B as CustomBlockTypeSchema,
325
+ q as CustomRuleSchema,
326
+ U as DefaultBlockTypeSchema,
327
+ P as DynamicContentListSchema,
328
+ S as DynamicContentNodeSchema,
329
+ v as DynamicContentSchema,
330
+ O as EditorSchema,
331
+ N as EmailHeaderSchema,
332
+ I as FallbackFontSchema,
333
+ F as FeaturesSchema,
334
+ K as GuidoConfigSchema,
335
+ A as IdentitySchema,
336
+ D as LegacyRecommendationConfigSchema,
317
337
  d as MessageType,
318
- C as PartnerSchema,
338
+ L as PartnerSchema,
319
339
  r as ProductType,
320
- U as RegexRuleSchema,
321
- B as RemoveRuleSchema,
322
- F as ReplaceRuleSchema,
323
- L as TemplateMigrationSchema,
324
- P as TemplateSchema,
325
- M as UISchema
340
+ _ as RegexRuleSchema,
341
+ j as RemoveRuleSchema,
342
+ H as ReplaceRuleSchema,
343
+ E as TemplateMigrationSchema,
344
+ M as TemplateSchema,
345
+ x as UISchema
326
346
  };
@@ -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 {
@@ -0,0 +1,37 @@
1
+ import { useConfig as C } from "./useConfig.js";
2
+ import { useToaster as D } from "./useToaster.js";
3
+ import { useTranslations as T } from "./useTranslations.js";
4
+ import { ToasterTypeOptions as g } from "../enums/toaster.js";
5
+ import { buildDynamicContentLookup as h, convertModuleDynamicContent as O } from "../utils/dynamicContentConverter.js";
6
+ import { flattenDynamicContentList as f } from "../utils/genericUtil.js";
7
+ const M = "dynamic-content.unresolved-attributes-on-drop", b = () => {
8
+ const { template: i, isFeatureEnabled: p } = C(), { showToaster: m } = D(), a = T();
9
+ return { handleModuleAdd: (n, o) => {
10
+ var s, c, l;
11
+ try {
12
+ if ((n == null ? void 0 : n.action) !== "ADD" && (n == null ? void 0 : n.action) !== "COPY")
13
+ return;
14
+ const e = h(f((s = i.value) == null ? void 0 : s.dynamicContentList));
15
+ if (e.size === 0)
16
+ return;
17
+ const t = (c = o == null ? void 0 : o.getTargetNode) == null ? void 0 : c.call(o), r = (l = t == null ? void 0 : t.getOuterHTML) == null ? void 0 : l.call(t);
18
+ if (!t || typeof r != "string")
19
+ return;
20
+ const { html: u, unresolved: y } = O(
21
+ r,
22
+ e,
23
+ p("liquidSyntax")
24
+ );
25
+ u !== r && o.modifyHtml(t).replaceWith(u), y.length > 0 && m({
26
+ type: g.Warning,
27
+ message: a(M)
28
+ });
29
+ } catch (e) {
30
+ console.error("Failed to repair dynamic content on module add:", e);
31
+ }
32
+ } };
33
+ };
34
+ export {
35
+ M as UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY,
36
+ b as useModuleDynamicContentRepair
37
+ };
@@ -1,44 +1,45 @@
1
- import { useActionsApi as U } from "./useActionsApi.js";
2
- import { useBlocksConfig as R } from "./useBlocksConfig.js";
3
- import { useConfig as x } from "./useConfig.js";
4
- import { useCustomInterfaceAppearance as O } from "./useCustomInterfaceAppearance.js";
5
- import { useFullStoryBridge as q } from "./useFullStoryBridge.js";
6
- import { useStripoEventHandler as H } from "./useStripoEventHandler.js";
7
- import { useStripoNotifications as N } from "./useStripoNotifications.js";
8
- import { useToaster as z } from "./useToaster.js";
9
- import { localePatch as L } from "../config/i18n/index.js";
10
- import { en as h } from "../config/i18n/en/index.js";
11
- import { ToasterTypeOptions as $ } from "../enums/toaster.js";
12
- import { useStripoApi as G } from "../services/stripoApi.js";
13
- import J from "../static/styles/customEditorStyle.css.js";
14
- import { useEditorStore as E } from "../stores/editor.js";
15
- import { dynamicContentToMergeTags as X } from "../utils/genericUtil.js";
16
- import j from "../package.json.js";
17
- const fo = (C, l) => {
18
- const { features: c, template: w, isFeatureEnabled: u } = x(), { handleError: m, showToaster: b } = z(), { getToken: T, getCustomFonts: k, getSyncModulesStatus: B } = G(), { handleEvent: F } = H(), { getStripoBlocksConfig: v } = R(), { getStripoNotifications: V } = N(), _ = async (s, i = [], r = !1) => {
19
- var g, S, y;
20
- const o = E(), { html: p, css: a } = s, { baseBlocks: t, extensions: d } = await v(), f = ((g = c.value) == null ? void 0 : g.displayConditions) ?? !0, M = ((S = c.value) == null ? void 0 : S.modulesDisabled) ?? !1, P = ((y = w.value) == null ? void 0 : y.forceRecreate) ?? !1;
1
+ import { useActionsApi as x } from "./useActionsApi.js";
2
+ import { useBlocksConfig as O } from "./useBlocksConfig.js";
3
+ import { useConfig as q } from "./useConfig.js";
4
+ import { useCustomInterfaceAppearance as H } from "./useCustomInterfaceAppearance.js";
5
+ import { useFullStoryBridge as L } from "./useFullStoryBridge.js";
6
+ import { useModuleDynamicContentRepair as N } from "./useModuleDynamicContentRepair.js";
7
+ import { useStripoEventHandler as z } from "./useStripoEventHandler.js";
8
+ import { useStripoNotifications as $ } from "./useStripoNotifications.js";
9
+ import { useToaster as G } from "./useToaster.js";
10
+ import { localePatch as J } from "../config/i18n/index.js";
11
+ import { en as E } from "../config/i18n/en/index.js";
12
+ import { ToasterTypeOptions as X } from "../enums/toaster.js";
13
+ import { useStripoApi as j } from "../services/stripoApi.js";
14
+ import K from "../static/styles/customEditorStyle.css.js";
15
+ import { useEditorStore as w } from "../stores/editor.js";
16
+ import { buildMergeTagEntries as Q, flattenDynamicContentList as W } from "../utils/genericUtil.js";
17
+ import Y from "../package.json.js";
18
+ const he = (b, l) => {
19
+ const { features: c, template: u, isFeatureEnabled: m } = q(), { handleError: p, showToaster: k } = G(), { getToken: T, getCustomFonts: v, getSyncModulesStatus: B } = j(), { handleEvent: F } = z(), { handleModuleAdd: M } = N(), { getStripoBlocksConfig: A } = O(), { getStripoNotifications: V } = $(), _ = async (n, i = [], r = !1) => {
20
+ var S, y, h, C;
21
+ const e = w(), { html: f, css: a } = n, { baseBlocks: o, extensions: d } = await A(), g = ((S = c.value) == null ? void 0 : S.displayConditions) ?? !0, P = ((y = c.value) == null ? void 0 : y.modulesDisabled) ?? !1, I = ((h = u.value) == null ? void 0 : h.forceRecreate) ?? !1;
21
22
  await window.UIEditor.initEditor(
22
23
  document.querySelector("#guido-editor"),
23
24
  {
24
- metadata: C,
25
- html: p,
25
+ metadata: b,
26
+ html: f,
26
27
  css: a,
27
- forceRecreate: P,
28
+ forceRecreate: I,
28
29
  locale: "en",
29
30
  undoButtonSelector: "#guido__undo-button",
30
31
  redoButtonSelector: "#guido__redo-button",
31
32
  mobileViewButtonSelector: ".guido__view-option-selection-mobile",
32
33
  desktopViewButtonSelector: ".guido__view-option-selection-desktop",
33
34
  codeEditorButtonSelector: "#guido__code-button",
34
- customAppearanceMergetags: !u("liquidSyntax"),
35
+ customAppearanceMergetags: !m("liquidSyntax"),
35
36
  customAppearanceMergetagsBorderColor: "#f1f3fe",
36
37
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
37
- customViewStyles: J,
38
- conditionsEnabled: f,
39
- customConditionsEnabled: f,
38
+ customViewStyles: K,
39
+ conditionsEnabled: g,
40
+ customConditionsEnabled: g,
40
41
  enableXSSSecurity: !0,
41
- modulesDisabled: M,
42
+ modulesDisabled: P,
42
43
  syncModulesEnabled: r,
43
44
  messageSettingsEnabled: !0,
44
45
  displayGmailAnnotations: !0,
@@ -48,7 +49,7 @@ const fo = (C, l) => {
48
49
  selectElementAfterDrop: !0,
49
50
  sameFontSizeForOutlook: !0,
50
51
  allowedScriptSourceDomains: "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com",
51
- ...t ? { baseBlocks: t } : {},
52
+ ...o ? { baseBlocks: o } : {},
52
53
  editorFonts: {
53
54
  showDefaultStandardFonts: !0,
54
55
  showDefaultNotStandardFonts: !0,
@@ -56,43 +57,45 @@ const fo = (C, l) => {
56
57
  },
57
58
  mergeTags: [
58
59
  {
59
- entries: X(
60
+ entries: Q(
60
61
  l.preselectedDynamicContentList,
61
- u("liquidSyntax")
62
+ W((C = u.value) == null ? void 0 : C.dynamicContentList),
63
+ m("liquidSyntax")
62
64
  )
63
65
  }
64
66
  ],
65
- async onTokenRefreshRequest(e) {
67
+ async onTokenRefreshRequest(t) {
66
68
  try {
67
- const n = await T();
68
- e(n);
69
- } catch (n) {
70
- m(n, "Failed to refresh token");
69
+ const s = await T();
70
+ t(s);
71
+ } catch (s) {
72
+ p(s, "Failed to refresh token");
71
73
  }
72
74
  },
73
75
  onTemplateLoaded() {
74
76
  try {
75
- const { importCss: e } = O(), { activateCustomViewStyles: n, updateTimerInClonedTemplate: D } = U(), { injectFullStory: I } = q();
76
- e(), n(), I(), D(), l.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
77
- o.hasChanges = !1;
77
+ const { importCss: t } = H(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: R } = x(), { injectFullStory: U } = L();
78
+ t(), s(), U(), R(), l.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
79
+ e.hasChanges = !1;
78
80
  }, 1e3);
79
- } catch (e) {
80
- m(e, "Failed to load custom interface appearance");
81
+ } catch (t) {
82
+ p(t, "Failed to load custom interface appearance");
81
83
  }
82
84
  },
83
- onCodeEditorVisibilityChanged(e) {
84
- o.isCodeEditorOpen = e;
85
+ onCodeEditorVisibilityChanged(t) {
86
+ e.isCodeEditorOpen = t;
85
87
  },
86
- onEditorVisualModeChanged(e) {
87
- o.editorVisualMode = e.toLowerCase();
88
+ onEditorVisualModeChanged(t) {
89
+ e.editorVisualMode = t.toLowerCase();
88
90
  },
89
- onVersionHistoryVisibilityChanged(e) {
90
- o.isVersionHistoryOpen = e;
91
+ onVersionHistoryVisibilityChanged(t) {
92
+ e.isVersionHistoryOpen = t;
91
93
  },
92
94
  onDataChanged() {
93
- o.hasChanges = !0;
95
+ e.hasChanges = !0;
94
96
  },
95
97
  onEvent: F,
98
+ onModuleAdd: M,
96
99
  notifications: V(),
97
100
  ignoreClickOutsideSelectors: [
98
101
  "#guido-dynamic-content-modal",
@@ -100,38 +103,38 @@ const fo = (C, l) => {
100
103
  ".in-drawer__container"
101
104
  ],
102
105
  extensions: d,
103
- localePatch: L
106
+ localePatch: J
104
107
  }
105
108
  );
106
- }, A = (s) => new Promise((i, r) => {
109
+ }, D = (n) => new Promise((i, r) => {
107
110
  var d;
108
111
  if (document.getElementById("UiEditorScript")) {
109
- Promise.resolve(s()).then(i, r);
112
+ Promise.resolve(n()).then(i, r);
110
113
  return;
111
114
  }
112
- const o = j.guido, a = `https://email-static.useinsider.com/guido/${(d = o == null ? void 0 : o.stripo) == null ? void 0 : d.version}/UIEditor.js`, t = document.createElement("script");
113
- t.id = "UiEditorScript", t.type = "module", t.src = a, t.onload = () => {
114
- Promise.resolve(s()).then(i, r);
115
- }, t.onerror = () => {
115
+ const e = Y.guido, a = `https://email-static.useinsider.com/guido/${(d = e == null ? void 0 : e.stripo) == null ? void 0 : d.version}/UIEditor.js`, o = document.createElement("script");
116
+ o.id = "UiEditorScript", o.type = "module", o.src = a, o.onload = () => {
117
+ Promise.resolve(n()).then(i, r);
118
+ }, o.onerror = () => {
116
119
  r(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
117
- }, document.body.appendChild(t);
120
+ }, document.body.appendChild(o);
118
121
  });
119
- return { initPlugin: async (s) => {
120
- const i = E();
122
+ return { initPlugin: async (n) => {
123
+ const i = w();
121
124
  try {
122
- await A(async () => {
123
- const [r, o] = await Promise.all([
124
- k(),
125
+ await D(async () => {
126
+ const [r, e] = await Promise.all([
127
+ v(),
125
128
  B()
126
129
  ]);
127
- i.syncModulesEnabled = o, await _(s, r, o);
130
+ i.syncModulesEnabled = e, await _(n, r, e);
128
131
  });
129
132
  } catch {
130
- i.loadingStatus = !1, b({
131
- type: $.Error,
132
- message: h["An error has occurred. Please report the error code to support."],
133
+ i.loadingStatus = !1, k({
134
+ type: X.Error,
135
+ message: E["An error has occurred. Please report the error code to support."],
133
136
  actionButton: {
134
- text: h["Reload page"],
137
+ text: E["Reload page"],
135
138
  onClick: () => window.location.reload()
136
139
  }
137
140
  });
@@ -139,5 +142,5 @@ const fo = (C, l) => {
139
142
  } };
140
143
  };
141
144
  export {
142
- fo as useStripo
145
+ he as useStripo
143
146
  };