@spiffcommerce/core 28.0.1-beta.ac9a049c-ad73-555a-adbf-f7557a7cdbde → 28.0.1-beta.bfc4858f-0e0f-569a-aec4-7fcae31d702c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ import yt from "lodash.clonedeep";
11
11
  import { toString as on } from "qrcode";
12
12
  import gr from "svg-path-bbox";
13
13
  import { parse as Xe } from "opentype.js";
14
- import { jsx as x, jsxs as ct, Fragment as Gt } from "preact/jsx-runtime";
14
+ import { jsx as x, jsxs as ct, Fragment as zt } from "preact/jsx-runtime";
15
15
  import pr from "handlebars";
16
16
  import { dataUriToBuffer as fr } from "data-uri-to-buffer";
17
17
  import xa from "lodash.chunk";
@@ -23,7 +23,7 @@ import { split as Ze } from "unicode-default-word-boundary";
23
23
  import cn from "lodash.debounce";
24
24
  import "fs";
25
25
  import "path";
26
- var Ce = /* @__PURE__ */ ((r) => (r.Data = "Data", r.Font = "Font", r.Frame = "Frame", r.Illustration = "Illustration", r.Image = "Image", r.Model = "Model", r.Material = "Material", r.Color = "Color", r.QuestionnaireCollateral = "QuestionnaireCollateral", r.RequestCollateral = "RequestCollateral", r.SignupCollateral = "SignupCollateral", r.Video = "Video", r.ColorProfile = "ColorProfile", r.Environment = "Environment", r))(Ce || {}), z = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(z || {}), P = /* @__PURE__ */ ((r) => (r.Information = "Information", r.Bulk = "Bulk", r.DigitalContent = "DigitalContent", r.Finish = "Finish", r.Frame = "Frame", r.Illustration = "Illustration", r.Introduction = "Introduction", r.Material = "Material", r.Model = "Model", r.Module = "Module", r.Picture = "Picture", r.Photo = "Photo", r.ProductOverlay = "ProductOverlay", r.Question = "Question", r.Shape = "Shape", r.SilentIllustration = "SilentIllustration", r.Text = "Text", r))(P || {}), Sr = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(Sr || {}), Ht = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Ht || {}), M = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(M || {}), vr = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(vr || {}), Er = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(Er || {}), br = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(br || {}), ua = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(ua || {}), Br = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(Br || {}), we = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(we || {}), kt = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(kt || {}), H = /* @__PURE__ */ ((r) => (r[r.North = 0] = "North", r[r.Northeast = 1] = "Northeast", r[r.East = 2] = "East", r[r.Southeast = 3] = "Southeast", r[r.South = 4] = "South", r[r.Southwest = 5] = "Southwest", r[r.West = 6] = "West", r[r.Northwest = 7] = "Northwest", r))(H || {}), Ir = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Ir || {});
26
+ var Ce = /* @__PURE__ */ ((r) => (r.Data = "Data", r.Font = "Font", r.Frame = "Frame", r.Illustration = "Illustration", r.Image = "Image", r.Model = "Model", r.Material = "Material", r.Color = "Color", r.QuestionnaireCollateral = "QuestionnaireCollateral", r.RequestCollateral = "RequestCollateral", r.SignupCollateral = "SignupCollateral", r.Video = "Video", r.ColorProfile = "ColorProfile", r.Environment = "Environment", r))(Ce || {}), G = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(G || {}), P = /* @__PURE__ */ ((r) => (r.Information = "Information", r.Bulk = "Bulk", r.DigitalContent = "DigitalContent", r.Finish = "Finish", r.Frame = "Frame", r.Illustration = "Illustration", r.Introduction = "Introduction", r.Material = "Material", r.Model = "Model", r.Module = "Module", r.Picture = "Picture", r.Photo = "Photo", r.ProductOverlay = "ProductOverlay", r.Question = "Question", r.Shape = "Shape", r.SilentIllustration = "SilentIllustration", r.Text = "Text", r))(P || {}), Sr = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(Sr || {}), Ht = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Ht || {}), M = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(M || {}), vr = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(vr || {}), Er = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(Er || {}), br = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(br || {}), ua = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(ua || {}), Br = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(Br || {}), we = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(we || {}), kt = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(kt || {}), H = /* @__PURE__ */ ((r) => (r[r.North = 0] = "North", r[r.Northeast = 1] = "Northeast", r[r.East = 2] = "East", r[r.Southeast = 3] = "Southeast", r[r.South = 4] = "South", r[r.Southwest = 5] = "Southwest", r[r.West = 6] = "West", r[r.Northwest = 7] = "Northwest", r))(H || {}), Ir = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Ir || {});
27
27
  class dn extends Error {
28
28
  constructor(t) {
29
29
  super(t), this.name = this.constructor.name;
@@ -64,7 +64,7 @@ class De extends dn {
64
64
  super(`ImplementationError - ${t}`);
65
65
  }
66
66
  }
67
- class G extends De {
67
+ class z extends De {
68
68
  constructor(t) {
69
69
  super(`Unhandled Behavior Encountered: ${t}`);
70
70
  }
@@ -303,7 +303,7 @@ const Lr = (r) => {
303
303
  a.origin === t && (window.removeEventListener("message", e), r(a.data));
304
304
  };
305
305
  window.parent !== window && (window.addEventListener("message", e, !1), window.parent.postMessage("ready", t));
306
- }), zr = async () => {
306
+ }), Gr = async () => {
307
307
  const r = {
308
308
  applicationKey: ma,
309
309
  customerToken: Or,
@@ -311,7 +311,7 @@ const Lr = (r) => {
311
311
  };
312
312
  return typeof window < "u" && (window.location.href.includes("/workflows/product/") || window.location.href.includes("hub=true")) ? { ...await Vr(), ...r } : r;
313
313
  };
314
- async function Gr(r, t) {
314
+ async function zr(r, t) {
315
315
  const e = mt.getServerUrl(), a = e.includes(".aumelbdev.spiffcommerce.com") ? "https://moonlight.aumelbdev.spiffcommerce.com" : e.includes(".us.spiffcommerce.com") ? "https://moonlight.us.spiffcommerce.com" : "https://moonlight.au.spiffcommerce.com";
316
316
  let n = await rt(r, { ...t, redirect: "manual" });
317
317
  return n.type === "opaqueredirect" && (typeof r != "string" && "url" in r ? n = await rt({ ...r, url: `${a}/graphql` }, t) : n = await rt(`${a}/graphql`, t)), n;
@@ -331,9 +331,9 @@ class Wr {
331
331
  constructShadowGraphqlClient() {
332
332
  const t = ir({
333
333
  uri: `${mt.getServerUrl()}/graphql`,
334
- fetch: Gr
334
+ fetch: zr
335
335
  }), e = cr(async (i, s) => {
336
- const { headers: o } = s, l = o || {}, c = await zr();
336
+ const { headers: o } = s, l = o || {}, c = await Gr();
337
337
  let d = s.bearer ?? c.bearer;
338
338
  if (this.spiffClient)
339
339
  try {
@@ -3558,7 +3558,7 @@ class ui {
3558
3558
  if (this.cache.has(t)) {
3559
3559
  const n = this.cache.get(t);
3560
3560
  if (!n)
3561
- throw new G("Failed to get asset from cache!");
3561
+ throw new z("Failed to get asset from cache!");
3562
3562
  return n;
3563
3563
  }
3564
3564
  const a = (async () => (await ve([t]))[0])();
@@ -3585,7 +3585,7 @@ class ui {
3585
3585
  */
3586
3586
  cacheAsset(t) {
3587
3587
  if (!t.key)
3588
- throw new G("Asset has no key!");
3588
+ throw new z("Asset has no key!");
3589
3589
  this.cache.has(t.key) || this.cache.set(t.key, Promise.resolve(t));
3590
3590
  }
3591
3591
  /**
@@ -3593,7 +3593,7 @@ class ui {
3593
3593
  */
3594
3594
  cacheMaterial(t) {
3595
3595
  if (!t.id)
3596
- throw new G("Material has no id!");
3596
+ throw new z("Material has no id!");
3597
3597
  this.materialCache.has(t.id) || this.materialCache.set(t.id, Promise.resolve(t));
3598
3598
  }
3599
3599
  /**
@@ -3711,7 +3711,7 @@ class ui {
3711
3711
  case "mkv":
3712
3712
  return "video/x-matroska";
3713
3713
  default:
3714
- throw new G("Unexpected mimetype: " + e);
3714
+ throw new z("Unexpected mimetype: " + e);
3715
3715
  }
3716
3716
  }
3717
3717
  }
@@ -5145,7 +5145,7 @@ const q = new Ci(), bn = v`
5145
5145
  timestamp
5146
5146
  }
5147
5147
  }
5148
- `, Ot = [P.SilentIllustration, P.ProductOverlay], zi = async (r) => {
5148
+ `, Ot = [P.SilentIllustration, P.ProductOverlay], Gi = async (r) => {
5149
5149
  const t = [];
5150
5150
  r.introduction && t.push({
5151
5151
  name: "Introduction",
@@ -5163,7 +5163,7 @@ const q = new Ci(), bn = v`
5163
5163
  silentSteps: []
5164
5164
  });
5165
5165
  for (const a of r.steps) {
5166
- const n = Gi(a.stepName, r.stepGroups);
5166
+ const n = zi(a.stepName, r.stepGroups);
5167
5167
  if (!n)
5168
5168
  t.push({
5169
5169
  name: a.stepName,
@@ -5200,7 +5200,7 @@ const q = new Ci(), bn = v`
5200
5200
  ],
5201
5201
  silentSteps: []
5202
5202
  }), t;
5203
- }, Gi = (r, t) => t.find((e) => e.stepNames.includes(r)), wt = (r, t) => (r.conditions || []).every((e) => {
5203
+ }, zi = (r, t) => t.find((e) => e.stepNames.includes(r)), wt = (r, t) => (r.conditions || []).every((e) => {
5204
5204
  const a = t[e.targetStepName];
5205
5205
  if (a && a.selectedVariants) {
5206
5206
  const n = a.selectedVariants;
@@ -5327,10 +5327,10 @@ const Q = () => {
5327
5327
  viewBox: A,
5328
5328
  width: u
5329
5329
  }) => {
5330
- var E;
5331
- const h = e || 0, m = 2 * ((l == null ? void 0 : l.scale) || 1), g = A || { x: 0, y: 0, width: u, height: i }, p = `${g.x} ${g.y} ${g.width} ${g.height}`, f = Q(), C = a.purpose === Ht.FreeDesign && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ x("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ x("rect", { width: g.width, height: g.height, rx: h }) }) }), w = (E = a.colorProfiles) == null ? void 0 : E.map((b, I) => (
5330
+ var I;
5331
+ const h = e || 0, m = 2 * ((l == null ? void 0 : l.scale) || 1), g = A || { x: 0, y: 0, width: u, height: i }, p = `${g.x} ${g.y} ${g.width} ${g.height}`, f = Q(), C = a.purpose === Ht.FreeDesign && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ x("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ x("rect", { width: g.width, height: g.height, rx: h }) }) }), w = (I = a.colorProfiles) == null ? void 0 : I.map((b, E) => (
5332
5332
  /* @ts-ignore */
5333
- /* @__PURE__ */ x("color-profile", { name: b.name, xlinkHref: b.key, children: " " }, I)
5333
+ /* @__PURE__ */ x("color-profile", { name: b.name, xlinkHref: b.key, children: " " }, E)
5334
5334
  )), S = n.map((b) => ({
5335
5335
  ...b,
5336
5336
  _renderingConfiguration: a,
@@ -5436,10 +5436,10 @@ const Q = () => {
5436
5436
  }), Vc = (r, t, e, a) => ({
5437
5437
  x: r.x + (t == null ? void 0 : t.x) * e,
5438
5438
  y: r.y + (t == null ? void 0 : t.y) * a
5439
- }), zc = (r, t, e, a) => ({
5439
+ }), Gc = (r, t, e, a) => ({
5440
5440
  x: r.x + ((t == null ? void 0 : t.x) + (t == null ? void 0 : t.width)) * e,
5441
5441
  y: r.y + (t == null ? void 0 : t.y) * a
5442
- }), Gc = (r, t, e, a) => ({
5442
+ }), zc = (r, t, e, a) => ({
5443
5443
  x: r.x + ((t == null ? void 0 : t.x) + (t == null ? void 0 : t.width)) * e,
5444
5444
  y: r.y + ((t == null ? void 0 : t.y) + (t == null ? void 0 : t.height)) * a
5445
5445
  }), It = (r) => {
@@ -5516,7 +5516,7 @@ const Q = () => {
5516
5516
  }, Mn = (r) => {
5517
5517
  var l;
5518
5518
  const t = `spiff-group-clip-${r.id}`, e = r.rotation || 0, a = pt(e), n = Math.cos(a), i = -Math.sin(a), s = va(r.children);
5519
- return /* @__PURE__ */ ct(Gt, { children: [
5519
+ return /* @__PURE__ */ ct(zt, { children: [
5520
5520
  /* @__PURE__ */ x("defs", { children: (() => /* @__PURE__ */ x("clipPath", { id: t, preserveAspectRatio: "none", children: r.clipPath ? /* @__PURE__ */ x("path", { d: r.clipPath }) : /* @__PURE__ */ x("rect", { x: 0, y: 0, width: r.width, height: r.height }) }))() }),
5521
5521
  /* @__PURE__ */ ct(
5522
5522
  "g",
@@ -5556,8 +5556,8 @@ const Q = () => {
5556
5556
  return r.pattern.src;
5557
5557
  };
5558
5558
  if (!a())
5559
- return /* @__PURE__ */ x(Gt, {});
5560
- const n = () => r.threshold ? r.invertThreshold ? "1 ".repeat(r.threshold) + "0 ".repeat(256 - r.threshold) : "0 ".repeat(r.threshold) + "1 ".repeat(256 - r.threshold) : "", i = () => /* @__PURE__ */ x(Gt, { children: r.useThreshold && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ ct("filter", { id: e, "color-interpolation-filters": "sRGB", children: [
5559
+ return /* @__PURE__ */ x(zt, {});
5560
+ const n = () => r.threshold ? r.invertThreshold ? "1 ".repeat(r.threshold) + "0 ".repeat(256 - r.threshold) : "0 ".repeat(r.threshold) + "1 ".repeat(256 - r.threshold) : "", i = () => /* @__PURE__ */ x(zt, { children: r.useThreshold && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ ct("filter", { id: e, "color-interpolation-filters": "sRGB", children: [
5561
5561
  /* @__PURE__ */ x(
5562
5562
  "feColorMatrix",
5563
5563
  {
@@ -5577,8 +5577,8 @@ const Q = () => {
5577
5577
  /* @__PURE__ */ x("feFuncB", { type: "discrete", tableValues: n() })
5578
5578
  ] })
5579
5579
  ] }) }) }), s = r.rotation || 0, o = pt(s), l = Math.cos(o), c = -Math.sin(o), d = () => {
5580
- var w, S, y, E, b, I, D, F, k, T;
5581
- const A = ((w = r.pattern) == null ? void 0 : w.x) || 0, u = ((S = r.pattern) == null ? void 0 : S.y) || 0, h = ((y = r.pattern) == null ? void 0 : y.width) || 0, m = ((E = r.pattern) == null ? void 0 : E.height) || 0, g = ((b = r.pattern) == null ? void 0 : b.scaleX) || 1, p = ((I = r.pattern) == null ? void 0 : I.scaleY) || 1, f = ((D = r.pattern) == null ? void 0 : D.rotation) || 0;
5580
+ var w, S, y, I, b, E, D, F, k, T;
5581
+ const A = ((w = r.pattern) == null ? void 0 : w.x) || 0, u = ((S = r.pattern) == null ? void 0 : S.y) || 0, h = ((y = r.pattern) == null ? void 0 : y.width) || 0, m = ((I = r.pattern) == null ? void 0 : I.height) || 0, g = ((b = r.pattern) == null ? void 0 : b.scaleX) || 1, p = ((E = r.pattern) == null ? void 0 : E.scaleY) || 1, f = ((D = r.pattern) == null ? void 0 : D.rotation) || 0;
5582
5582
  return [(F = r.pattern) != null && F.svg ? {
5583
5583
  id: `${t}-contents`,
5584
5584
  type: M.Illustration,
@@ -5601,7 +5601,7 @@ const Q = () => {
5601
5601
  src: a()
5602
5602
  }];
5603
5603
  };
5604
- return /* @__PURE__ */ ct(Gt, { children: [
5604
+ return /* @__PURE__ */ ct(zt, { children: [
5605
5605
  i(),
5606
5606
  /* @__PURE__ */ x(
5607
5607
  "g",
@@ -5739,8 +5739,8 @@ const Ji = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Le = /* @_
5739
5739
  parseInt(u.getAttribute("font-size") ?? "72")
5740
5740
  ), S = w.getBoundingBox().x2 - w.getBoundingBox().x1;
5741
5741
  let y = 0;
5742
- const E = A.getAttribute("text-anchor");
5743
- E === "middle" ? y = S / 2 : E === "end" && (y = S);
5742
+ const I = A.getAttribute("text-anchor");
5743
+ I === "middle" ? y = S / 2 : I === "end" && (y = S);
5744
5744
  const b = g.getPath(
5745
5745
  A.innerHTML,
5746
5746
  parseFloat(A.getAttribute("x") ?? "0") - y,
@@ -5748,7 +5748,7 @@ const Ji = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Le = /* @_
5748
5748
  parseInt(u.getAttribute("font-size") ?? "72")
5749
5749
  );
5750
5750
  b.fill = p, b.stroke = f, b.strokeWidth = parseFloat(C ?? "0");
5751
- const I = b.toSVG(2), F = t.parseFromString(I, "image/svg+xml").firstElementChild;
5751
+ const E = b.toSVG(2), F = t.parseFromString(E, "image/svg+xml").firstElementChild;
5752
5752
  h.appendChild(F);
5753
5753
  }
5754
5754
  return e.querySelectorAll("text").forEach((d) => d.remove()), bt().serializeToString(a);
@@ -5901,7 +5901,7 @@ const Ji = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Le = /* @_
5901
5901
  var w;
5902
5902
  return r.textFillImage ? `url("#${s}")` : (w = r._renderingConfiguration) != null && w.spotColors && r.fillSpotColorDefinition ? `${r.fill} ${Cn(r.fillSpotColorDefinition)}` : r.fill;
5903
5903
  };
5904
- return /* @__PURE__ */ ct(Gt, { children: [
5904
+ return /* @__PURE__ */ ct(zt, { children: [
5905
5905
  /* @__PURE__ */ ct("defs", { children: [
5906
5906
  r.textFillImage && /* @__PURE__ */ x(
5907
5907
  "pattern",
@@ -6185,7 +6185,7 @@ const ae = (r) => {
6185
6185
  if (r.defaultVariant !== void 0)
6186
6186
  return t.find((e) => e.id === r.defaultVariant);
6187
6187
  }
6188
- }, At = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ new Map(), On = async (r, t) => {
6188
+ }, At = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), Ge = /* @__PURE__ */ new Map(), On = async (r, t) => {
6189
6189
  if (!t) {
6190
6190
  if (!r)
6191
6191
  throw new Error("No region or src supplied. Cannot construct frame!");
@@ -6209,8 +6209,8 @@ const ae = (r) => {
6209
6209
  throw new Error(`No asset for variant with ID: ${r.frameVariantId}`);
6210
6210
  return e;
6211
6211
  }, Qe = async (r) => {
6212
- if (ze.has(r))
6213
- return ze.get(r);
6212
+ if (Ge.has(r))
6213
+ return Ge.get(r);
6214
6214
  const e = (async () => {
6215
6215
  if (Vt.has(r))
6216
6216
  return Vt.get(r);
@@ -6246,7 +6246,7 @@ const ae = (r) => {
6246
6246
  }
6247
6247
  throw new Error("Malformed frame SVG");
6248
6248
  })();
6249
- return ze.set(r, e), e;
6249
+ return Ge.set(r, e), e;
6250
6250
  }, Ea = (r, t, e, a) => {
6251
6251
  const n = t.width / t.height, i = r.width / r.height;
6252
6252
  let s;
@@ -6290,11 +6290,11 @@ const ae = (r) => {
6290
6290
  }, ba = async (r) => {
6291
6291
  const t = await at(r);
6292
6292
  return $n(t);
6293
- }, za = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r), $n = (r) => {
6293
+ }, Ga = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r), $n = (r) => {
6294
6294
  const a = dt().parseFromString(r, "image/svg+xml").querySelector("svg");
6295
6295
  if (!a)
6296
6296
  throw new Error("No svg tag found, this svg must be malformed!");
6297
- const n = a.getAttribute("viewBox"), i = a.getAttribute("width"), s = a.getAttribute("height"), o = s && i ? [0, 0, za(i), za(s)] : n == null ? void 0 : n.split(" ").map((l) => Number(l));
6297
+ const n = a.getAttribute("viewBox"), i = a.getAttribute("width"), s = a.getAttribute("height"), o = s && i ? [0, 0, Ga(i), Ga(s)] : n == null ? void 0 : n.split(" ").map((l) => Number(l));
6298
6298
  if (!o)
6299
6299
  throw new Error("No viewbox or width/height values detected on SVG file!");
6300
6300
  return {
@@ -6308,9 +6308,9 @@ const ae = (r) => {
6308
6308
  at(r).then((e) => {
6309
6309
  t(e);
6310
6310
  }).catch((e) => console.error(e));
6311
- }), Ge = /* @__PURE__ */ new Map(), Kt = async (r) => {
6312
- if (Ge.has(r))
6313
- return Ge.get(r);
6311
+ }), ze = /* @__PURE__ */ new Map(), Kt = async (r) => {
6312
+ if (ze.has(r))
6313
+ return ze.get(r);
6314
6314
  const t = async (n) => new Promise((i, s) => {
6315
6315
  try {
6316
6316
  if (!(!!URL && !!URL.createObjectURL))
@@ -6342,7 +6342,7 @@ const ae = (r) => {
6342
6342
  A.resize(m, m);
6343
6343
  return await A.render(), await t(c);
6344
6344
  })();
6345
- return Ge.set(r, a), a;
6345
+ return ze.set(r, a), a;
6346
6346
  }, Ut = async (r, t, e, a) => {
6347
6347
  const n = r.layoutState.layout.useEditableArea && r.layoutState.layout.editableArea || {
6348
6348
  width: r.layoutState.layout.width,
@@ -6541,7 +6541,7 @@ const L = (r, t) => _(r, t).elements.find((n) => n.id === r), _ = (r, t) => {
6541
6541
  if (!e)
6542
6542
  throw new V();
6543
6543
  return e;
6544
- }, Z = (r, t) => {
6544
+ }, X = (r, t) => {
6545
6545
  const e = [...t.elements.filter((n) => n.id !== r.id), r], a = va(e);
6546
6546
  return {
6547
6547
  layout: t.layout,
@@ -6610,7 +6610,7 @@ class O {
6610
6610
  this.oldState = t;
6611
6611
  }
6612
6612
  }
6613
- class Ga extends O {
6613
+ class za extends O {
6614
6614
  constructor(t) {
6615
6615
  super(), this.serializableWorkflow = t;
6616
6616
  }
@@ -6634,7 +6634,7 @@ class Kc extends O {
6634
6634
  ...e,
6635
6635
  x: this.x,
6636
6636
  y: this.y
6637
- }, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
6637
+ }, n = _(e.id, Object.values(t.layouts)), i = X(a, n);
6638
6638
  return {
6639
6639
  ...t,
6640
6640
  layouts: {
@@ -6656,7 +6656,7 @@ class _c extends O {
6656
6656
  const a = {
6657
6657
  ...e,
6658
6658
  rotation: this.angle
6659
- }, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
6659
+ }, n = _(e.id, Object.values(t.layouts)), i = X(a, n);
6660
6660
  return {
6661
6661
  ...t,
6662
6662
  layouts: {
@@ -6687,7 +6687,7 @@ class Xc extends O {
6687
6687
  const s = a, o = (!s.algorithm || s.algorithm === kt.Autosize ? s.text : s.input) ?? "";
6688
6688
  a = ee(s, o, e);
6689
6689
  }
6690
- const n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
6690
+ const n = _(e.id, Object.values(t.layouts)), i = X(a, n);
6691
6691
  return {
6692
6692
  ...t,
6693
6693
  layouts: {
@@ -6819,7 +6819,7 @@ class ds extends O {
6819
6819
  fill: this.color,
6820
6820
  fillSpotColorDefinition: this.textFillSpotColor,
6821
6821
  textFillImage: void 0
6822
- }, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
6822
+ }, n = _(e.id, Object.values(t.layouts)), i = X(a, n);
6823
6823
  return {
6824
6824
  ...t,
6825
6825
  layouts: {
@@ -6841,7 +6841,7 @@ class We extends O {
6841
6841
  const a = {
6842
6842
  ...e,
6843
6843
  textFillImage: this.imageFill
6844
- }, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
6844
+ }, n = _(e.id, Object.values(t.layouts)), i = X(a, n);
6845
6845
  return {
6846
6846
  ...t,
6847
6847
  layouts: {
@@ -6863,7 +6863,7 @@ class As extends O {
6863
6863
  const a = {
6864
6864
  ...e,
6865
6865
  fontSize: this.size
6866
- }, n = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", s = Z(ee(a, i), n);
6866
+ }, n = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", s = X(ee(a, i), n);
6867
6867
  return {
6868
6868
  ...t,
6869
6869
  layouts: {
@@ -6885,7 +6885,7 @@ class Wa extends O {
6885
6885
  const a = {
6886
6886
  ...e,
6887
6887
  fontData: this.fontData
6888
- }, n = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", s = Z(ee(a, i), n);
6888
+ }, n = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", s = X(ee(a, i), n);
6889
6889
  return {
6890
6890
  ...t,
6891
6891
  layouts: {
@@ -6907,7 +6907,7 @@ class us extends O {
6907
6907
  const a = {
6908
6908
  ...e,
6909
6909
  align: this.align
6910
- }, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
6910
+ }, n = _(e.id, Object.values(t.layouts)), i = X(a, n);
6911
6911
  return {
6912
6912
  ...t,
6913
6913
  layouts: {
@@ -6968,7 +6968,7 @@ class ms extends O {
6968
6968
  invertThreshold: this.invertThreshold,
6969
6969
  threshold: this.threshold,
6970
6970
  thresholdSaturation: this.thresholdSaturation
6971
- }, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
6971
+ }, n = _(e.id, Object.values(t.layouts)), i = X(a, n);
6972
6972
  return {
6973
6973
  ...t,
6974
6974
  layouts: {
@@ -6990,7 +6990,7 @@ class Zc extends O {
6990
6990
  const a = {
6991
6991
  ...e,
6992
6992
  src: this.src
6993
- }, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
6993
+ }, n = _(e.id, Object.values(t.layouts)), i = X(a, n);
6994
6994
  return {
6995
6995
  ...t,
6996
6996
  layouts: {
@@ -7009,7 +7009,7 @@ class gs extends O {
7009
7009
  const e = L(this.id, Object.values(t.layouts));
7010
7010
  if (!e.id)
7011
7011
  throw new V();
7012
- const a = _(e.id, Object.values(t.layouts)), n = Z(ee(e, this.text, e), a);
7012
+ const a = _(e.id, Object.values(t.layouts)), n = X(ee(e, this.text, e), a);
7013
7013
  return {
7014
7014
  ...t,
7015
7015
  layouts: {
@@ -7032,7 +7032,7 @@ class je extends O {
7032
7032
  ...e,
7033
7033
  strokeColor: this.strokeColor,
7034
7034
  strokeThickness: this.strokeThickness
7035
- }, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
7035
+ }, n = _(e.id, Object.values(t.layouts)), i = X(a, n);
7036
7036
  return {
7037
7037
  ...t,
7038
7038
  layouts: {
@@ -7064,7 +7064,7 @@ class oa extends O {
7064
7064
  const i = {
7065
7065
  ...e,
7066
7066
  colors: a
7067
- }, s = _(e.id, Object.values(t.layouts)), o = Z(i, s);
7067
+ }, s = _(e.id, Object.values(t.layouts)), o = X(i, s);
7068
7068
  return {
7069
7069
  ...t,
7070
7070
  layouts: {
@@ -7087,7 +7087,7 @@ class ps extends O {
7087
7087
  ...e,
7088
7088
  svg: this.svgBody,
7089
7089
  cachedObjectURL: this.objectURL
7090
- }, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
7090
+ }, n = _(e.id, Object.values(t.layouts)), i = X(a, n);
7091
7091
  return {
7092
7092
  ...t,
7093
7093
  layouts: {
@@ -7441,7 +7441,7 @@ class Cs {
7441
7441
  } };
7442
7442
  }
7443
7443
  }
7444
- const zn = new Cs();
7444
+ const Gn = new Cs();
7445
7445
  class Be {
7446
7446
  constructor() {
7447
7447
  this.frameSourceSvg = async (t, e) => {
@@ -7733,7 +7733,7 @@ class Be {
7733
7733
  i && i(!0);
7734
7734
  const c = t.data.initialZoomLevel, d = await Promise.all(
7735
7735
  t.data.regions.map(async (m, g) => {
7736
- const p = await Qe(l[g]), f = o.getImageData(), C = a.map((I) => new Et(I.id)), w = f ? Ea(
7736
+ const p = await Qe(l[g]), f = o.getImageData(), C = a.map((E) => new Et(E.id)), w = f ? Ea(
7737
7737
  f,
7738
7738
  p,
7739
7739
  c && !t.data.forceImageCover ? { scale: c } : void 0,
@@ -7748,7 +7748,7 @@ class Be {
7748
7748
  scaleX: (w == null ? void 0 : w.zoom) || 1,
7749
7749
  scaleY: (w == null ? void 0 : w.zoom) || 1,
7750
7750
  rotation: 0
7751
- } : void 0, y = Q(), b = n.getLayouts().find((I) => I.panelId === m.panelId);
7751
+ } : void 0, y = Q(), b = n.getLayouts().find((E) => E.panelId === m.panelId);
7752
7752
  if (!b)
7753
7753
  throw new Y(m);
7754
7754
  return {
@@ -8042,8 +8042,8 @@ class ws {
8042
8042
  const y = {};
8043
8043
  (((S = o.assetConfiguration) == null ? void 0 : S.channelNumbers) || []).forEach((b) => {
8044
8044
  var D;
8045
- const I = C.find((F) => F.channelNumber === b.number);
8046
- I && (y[`${b.id.replace(/\W/g, "")}`] = { browserValue: ((D = I == null ? void 0 : I.variant) == null ? void 0 : D.color) || "" });
8045
+ const E = C.find((F) => F.channelNumber === b.number);
8046
+ E && (y[`${b.id.replace(/\W/g, "")}`] = { browserValue: ((D = E == null ? void 0 : E.variant) == null ? void 0 : D.color) || "" });
8047
8047
  }), await this.changeColors(
8048
8048
  t,
8049
8049
  u.map((b) => b.regionElement),
@@ -8053,20 +8053,20 @@ class ws {
8053
8053
  );
8054
8054
  }
8055
8055
  if (t.data.colorPickerEnabled) {
8056
- const y = await this.availableColors(t, i) || [], E = Object.keys(c.colors), b = y.length === 1 && E.length === 1;
8056
+ const y = await this.availableColors(t, i) || [], I = Object.keys(c.colors), b = y.length === 1 && I.length === 1;
8057
8057
  if (b) {
8058
- const I = y[0], D = E[0];
8058
+ const E = y[0], D = I[0];
8059
8059
  await this.changeColors(
8060
8060
  t,
8061
8061
  u.map((F) => F.regionElement),
8062
8062
  i,
8063
8063
  () => i.getCommandContext().getAllLayouts(),
8064
- /* @__PURE__ */ new Map([[D, I.variant.color]])
8064
+ /* @__PURE__ */ new Map([[D, E.variant.color]])
8065
8065
  );
8066
8066
  }
8067
8067
  !b && C.length === 0 && await this.changeColors(
8068
8068
  t,
8069
- u.map((I) => I.regionElement),
8069
+ u.map((E) => E.regionElement),
8070
8070
  i,
8071
8071
  () => i.getCommandContext().getAllLayouts(),
8072
8072
  /* @__PURE__ */ new Map()
@@ -8154,7 +8154,7 @@ class ys {
8154
8154
  };
8155
8155
  }
8156
8156
  }
8157
- const Gn = new ys();
8157
+ const zn = new ys();
8158
8158
  class Ss {
8159
8159
  async init(t, e, a) {
8160
8160
  const n = t.option;
@@ -8677,7 +8677,7 @@ class Bs {
8677
8677
  }
8678
8678
  }
8679
8679
  }
8680
- const zt = new Bs();
8680
+ const Gt = new Bs();
8681
8681
  class Is {
8682
8682
  constructor() {
8683
8683
  this.latestToast = null, this.toastType = null, this.toastCallbacks = [];
@@ -8814,7 +8814,7 @@ class Fs {
8814
8814
  if (p && t.globalPropertyAspectConfigurations) {
8815
8815
  const C = (s = p.getGlobalPropertyConfiguration()) == null ? void 0 : s.aspects, w = C == null ? void 0 : C.find((S) => {
8816
8816
  var y;
8817
- return S.type === z.Text && ((y = t.globalPropertyAspectConfigurations) == null ? void 0 : y.map((E) => E.aspectName).includes(S.name));
8817
+ return S.type === G.Text && ((y = t.globalPropertyAspectConfigurations) == null ? void 0 : y.map((I) => I.aspectName).includes(S.name));
8818
8818
  });
8819
8819
  if (w) {
8820
8820
  const y = p.getGlobalPropertyStateManager().getAspect(w.name);
@@ -9000,7 +9000,7 @@ class Fs {
9000
9000
  const l = [], c = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
9001
9001
  for (const A of e) {
9002
9002
  if (!A.fontData)
9003
- throw new G("Failed to resolve font data for text.");
9003
+ throw new z("Failed to resolve font data for text.");
9004
9004
  const [u, h] = pe(
9005
9005
  A.fontSize,
9006
9006
  A.fontData,
@@ -9056,13 +9056,13 @@ class Fs {
9056
9056
  let w = (A = n.storage) == null ? void 0 : A.text;
9057
9057
  const S = e.getWorkflowExperience().getBundle();
9058
9058
  if (S && t.globalPropertyAspectConfigurations) {
9059
- const y = (u = S.getGlobalPropertyConfiguration()) == null ? void 0 : u.aspects, E = y == null ? void 0 : y.find((b) => {
9060
- var I;
9061
- return b.type === z.Text && ((I = t.globalPropertyAspectConfigurations) == null ? void 0 : I.map((D) => D.aspectName).includes(b.name));
9059
+ const y = (u = S.getGlobalPropertyConfiguration()) == null ? void 0 : u.aspects, I = y == null ? void 0 : y.find((b) => {
9060
+ var E;
9061
+ return b.type === G.Text && ((E = t.globalPropertyAspectConfigurations) == null ? void 0 : E.map((D) => D.aspectName).includes(b.name));
9062
9062
  });
9063
- if (E) {
9064
- const I = S.getGlobalPropertyStateManager().getAspect(E.name);
9065
- I && (w = I);
9063
+ if (I) {
9064
+ const E = S.getGlobalPropertyStateManager().getAspect(I.name);
9065
+ E && (w = E);
9066
9066
  }
9067
9067
  }
9068
9068
  if (await e.setSelectionsAndElements(
@@ -9071,13 +9071,13 @@ class Fs {
9071
9071
  f,
9072
9072
  async () => {
9073
9073
  e.updateMetadata(t.stepName, { color: C, text: w }), e.updateStorage(t.stepName, { text: w, inputText: w });
9074
- const y = o.map((b) => new Wa(b.id, p)), E = new $(y);
9075
- e.getCommandDispatcher()(E);
9074
+ const y = o.map((b) => new Wa(b.id, p)), I = new $(y);
9075
+ e.getCommandDispatcher()(I);
9076
9076
  }
9077
9077
  ), o.length === 0 && l) {
9078
9078
  const y = q.getDefaultVariant(l);
9079
9079
  if (y) {
9080
- const E = await this.selectVariantCommand(
9080
+ const I = await this.selectVariantCommand(
9081
9081
  t,
9082
9082
  y,
9083
9083
  { text: w },
@@ -9088,7 +9088,7 @@ class Fs {
9088
9088
  () => {
9089
9089
  }
9090
9090
  );
9091
- e.getCommandDispatcher()(E.command);
9091
+ e.getCommandDispatcher()(I.command);
9092
9092
  }
9093
9093
  } else {
9094
9094
  const { command: y } = j.updateInputText(
@@ -9106,7 +9106,7 @@ class Fs {
9106
9106
  if (m && t.globalPropertyAspectConfigurations) {
9107
9107
  const g = (h = m.getGlobalPropertyConfiguration()) == null ? void 0 : h.aspects, p = g == null ? void 0 : g.find((f) => {
9108
9108
  var C;
9109
- return f.type === z.Text && ((C = t.globalPropertyAspectConfigurations) == null ? void 0 : C.map((w) => w.aspectName).includes(f.name));
9109
+ return f.type === G.Text && ((C = t.globalPropertyAspectConfigurations) == null ? void 0 : C.map((w) => w.aspectName).includes(f.name));
9110
9110
  });
9111
9111
  if (p) {
9112
9112
  const C = m.getGlobalPropertyStateManager().getAspect(p.name);
@@ -9298,10 +9298,10 @@ class Fs {
9298
9298
  curved: a.curved,
9299
9299
  paths: a.paths,
9300
9300
  fillSpotColorDefinition: f
9301
- }, y = [], E = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
9301
+ }, y = [], I = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
9302
9302
  if (!S.fontData)
9303
- throw new G("Failed to resolve font data for text.");
9304
- const [I, D] = pe(
9303
+ throw new z("Failed to resolve font data for text.");
9304
+ const [E, D] = pe(
9305
9305
  S.fontSize,
9306
9306
  S.fontData,
9307
9307
  {
@@ -9315,11 +9315,11 @@ class Fs {
9315
9315
  [l],
9316
9316
  { size: a.size, minSize: a.minSize, maxSize: a.maxSize }
9317
9317
  );
9318
- E.set(S.id, I), b.set(S.id, D);
9318
+ I.set(S.id, E), b.set(S.id, D);
9319
9319
  const F = a.curved || a.vertical ? l : (D || []).join(`
9320
9320
  `);
9321
9321
  y.push(
9322
- this.generateTextChangeCommandsForRegion(I, a, S.id, F)
9322
+ this.generateTextChangeCommandsForRegion(E, a, S.id, F)
9323
9323
  );
9324
9324
  const k = new W(S, h);
9325
9325
  return {
@@ -9362,23 +9362,23 @@ class Fs {
9362
9362
  const A = (n || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = this.getProcessedInput(A, t.data, o), h = s.getRegionElements(t.stepName), m = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
9363
9363
  for (const S of h)
9364
9364
  if (S.region) {
9365
- const [y, E] = pe(
9365
+ const [y, I] = pe(
9366
9366
  e,
9367
9367
  a,
9368
9368
  S.region,
9369
9369
  [u],
9370
9370
  { size: t.data.size, minSize: t.data.minSize, maxSize: t.data.maxSize }
9371
9371
  );
9372
- m.set(S.id, y), g.set(S.id, E);
9372
+ m.set(S.id, y), g.set(S.id, I);
9373
9373
  }
9374
9374
  const f = (() => {
9375
9375
  if (t.data && t.data.maxLength && u.length > t.data.maxLength)
9376
9376
  return d && d(!0), { info: "0" };
9377
9377
  const S = s.getProfanities(), y = Ze(u.toLowerCase());
9378
- for (const E of y)
9378
+ for (const I of y)
9379
9379
  for (const b in S) {
9380
- const I = S[b].toLowerCase().replace(/\s/g, "");
9381
- if (E === I)
9380
+ const E = S[b].toLowerCase().replace(/\s/g, "");
9381
+ if (I === E)
9382
9382
  return l(!0), { error: "Blocked profanity." };
9383
9383
  }
9384
9384
  return !t.data.vertical && !t.data.allowNewlines && (u.includes(`
@@ -9572,12 +9572,12 @@ class $s extends xs {
9572
9572
  w.appendChild(S), S.appendChild(Ts(0, 2, 2, "shadow"));
9573
9573
  const y = et("path");
9574
9574
  y.setAttribute("d", d), y.setAttribute("stroke", "black"), y.setAttribute("stroke-width", "3"), S.appendChild(y);
9575
- const E = et("g");
9576
- E.classList.add("module-layer0"), w.appendChild(E), E.setAttribute("filter", "url(#shadow)"), E.innerHTML = y.outerHTML;
9575
+ const I = et("g");
9576
+ I.classList.add("module-layer0"), w.appendChild(I), I.setAttribute("filter", "url(#shadow)"), I.innerHTML = y.outerHTML;
9577
9577
  const b = et("g");
9578
9578
  b.classList.add("module-layer1"), w.appendChild(b), b.setAttribute("stroke-width", "3"), b.setAttribute("stroke", "rgb(45,41,38)"), b.setAttribute("fill", "rgb(45,41,38)"), b.setAttribute("transform", "translate(0.5,0)"), b.innerHTML = o;
9579
- const I = et("g");
9580
- I.classList.add("module-layer2"), w.appendChild(I), I.setAttribute("fill", "rgb(255,209,0)"), I.setAttribute("transform", "translate(1,-0.1)"), I.innerHTML = o;
9579
+ const E = et("g");
9580
+ E.classList.add("module-layer2"), w.appendChild(E), E.setAttribute("fill", "rgb(255,209,0)"), E.setAttribute("transform", "translate(1,-0.1)"), E.innerHTML = o;
9581
9581
  const D = et("g");
9582
9582
  return D.classList.add("module-layer3"), w.appendChild(D), D.setAttribute("fill", "white"), D.innerHTML = o, new Os(w).transform(([k, T]) => [k, T + (c / 2 - k) ** 2 / (c * 6)]), w;
9583
9583
  }, u = et("g");
@@ -9599,7 +9599,7 @@ class $s extends xs {
9599
9599
  async function Yn(r) {
9600
9600
  if (r === "Vegemite")
9601
9601
  return new $s();
9602
- throw new G(`Failed to resolve Module, Module ${r} not found`);
9602
+ throw new z(`Failed to resolve Module, Module ${r} not found`);
9603
9603
  }
9604
9604
  const ne = v`
9605
9605
  fragment GlobalPropertyStateAspectFields on GlobalPropertyStateAspect {
@@ -9660,7 +9660,7 @@ const ne = v`
9660
9660
  variables: {
9661
9661
  bundleId: r
9662
9662
  }
9663
- })).data.globalPropertyState, zs = v`
9663
+ })).data.globalPropertyState, Gs = v`
9664
9664
  ${Te}
9665
9665
  fragment ProductFields on Product {
9666
9666
  id
@@ -9706,7 +9706,7 @@ const ne = v`
9706
9706
  }
9707
9707
  }
9708
9708
  `, Ba = v`
9709
- ${zs}
9709
+ ${Gs}
9710
9710
  fragment ProductCollectionProductFields on ProductCollectionProduct {
9711
9711
  id
9712
9712
  productId
@@ -9773,7 +9773,7 @@ const ne = v`
9773
9773
  }
9774
9774
  }
9775
9775
  }
9776
- `, Gs = (r) => v`
9776
+ `, zs = (r) => v`
9777
9777
  ${ne}
9778
9778
  ${re(r)}
9779
9779
  query GetBundle($id: String!) {
@@ -10290,10 +10290,10 @@ class Co {
10290
10290
  constructor(t, e, a, n, i, s, o, l, c, d, A, u, h, m = !1, g, p = !1, f = !1, C = !1) {
10291
10291
  var w;
10292
10292
  this.workflowStatePromiseQueue = new xn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
10293
- var E;
10293
+ var I;
10294
10294
  if (!this.previewService)
10295
10295
  return;
10296
- const S = this.getCommandContext().getAllLayouts(), y = (E = this.getLayoutPreviewService()) == null ? void 0 : E.getAll();
10296
+ const S = this.getCommandContext().getAllLayouts(), y = (I = this.getLayoutPreviewService()) == null ? void 0 : I.getAll();
10297
10297
  if (y)
10298
10298
  for (const [, b] of y)
10299
10299
  b.render(S);
@@ -10391,6 +10391,7 @@ class Co {
10391
10391
  this.recipientCallbacks.forEach((p) => p(this.transaction.recipient));
10392
10392
  }
10393
10393
  async initializeDefaultWorkflowState(t) {
10394
+ console.log("LOG: default workflow state?"), console.trace();
10394
10395
  const e = () => {
10395
10396
  var d, A;
10396
10397
  const o = this.workflow.finalizeStepConfig;
@@ -10401,7 +10402,7 @@ class Co {
10401
10402
  };
10402
10403
  this.reloadedState && this.reloadedState.serializableWorkflow.steps.forEach((o) => {
10403
10404
  this.storage[o.stepName] = o.storage || {};
10404
- }), this.allScenes = await zi(t);
10405
+ }), this.allScenes = await Gi(t);
10405
10406
  const n = Pt(this.allScenes, this.stepSelections).map((o) => o.silentSteps).flat(), { stepElements: i, commands: s } = await this.stepElementsForIntroducedSilentSteps(n, !!this.reloadedState);
10406
10407
  this.commandContext.apply(new $(s), !0), this.stepElements = { ...this.stepElements, ...i }, await this.ensureStepsAreLoaded(), !this.isReloadedTransaction && this.updateStateWithServer(), this.renderLayouts(), this.reloadedState && e();
10407
10408
  }
@@ -10620,7 +10621,7 @@ class Co {
10620
10621
  const l = o[0];
10621
10622
  if (s.type === P.Model) {
10622
10623
  if (!this.modelContainer)
10623
- throw new G(
10624
+ throw new z(
10624
10625
  "We should always have a model container when injecting a preview!"
10625
10626
  );
10626
10627
  const u = (A = l.asset) == null ? void 0 : A.fileLink;
@@ -10645,7 +10646,7 @@ class Co {
10645
10646
  }
10646
10647
  s.data.targetMaterials.forEach((m) => {
10647
10648
  if (!this.modelContainer)
10648
- throw new G(
10649
+ throw new z(
10649
10650
  "We should always have a model container when injecting a preview!"
10650
10651
  );
10651
10652
  this.modelContainer.applyMaterialVariant(m, s.option.id, u);
@@ -10668,7 +10669,7 @@ class Co {
10668
10669
  };
10669
10670
  if (!ln(a, this.storage)) {
10670
10671
  this.storage = a;
10671
- const n = new Ga(this.constructSerializableWorkflow());
10672
+ const n = new za(this.constructSerializableWorkflow());
10672
10673
  this.commandContext.apply(n, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
10673
10674
  }
10674
10675
  }
@@ -10719,7 +10720,7 @@ class Co {
10719
10720
  serialize() {
10720
10721
  const t = this.getCommandContext().getState();
10721
10722
  if (!t)
10722
- throw new G("Attempted to serialize state before it was initialized.");
10723
+ throw new z("Attempted to serialize state before it was initialized.");
10723
10724
  const e = yt(t.transaction), a = this.dehydrateState(e);
10724
10725
  return JSON.stringify(a);
10725
10726
  }
@@ -10851,26 +10852,27 @@ class Co {
10851
10852
  });
10852
10853
  }
10853
10854
  async reset() {
10854
- this.commandContext.getAllLayouts().forEach(
10855
+ console.log("LOG: reset?"), this.commandContext.getAllLayouts().forEach(
10855
10856
  (e) => e.layoutState.elements.forEach((a) => {
10856
10857
  this.getCommandDispatcher()(new Et(a.id));
10857
10858
  })
10858
10859
  ), this.stepElements = {}, this.stepInitialised = {}, this.stepMetadata = {}, this.stepSelections = {}, this.storage = {}, await this.ensureStepsAreLoaded();
10859
10860
  }
10860
10861
  async setSelectionsAndElements(t, e, a, n) {
10861
- var y;
10862
+ var y, I, b;
10863
+ console.log(`LOG: set selection of step ${t} to variant ${(y = e == null ? void 0 : e[0]) == null ? void 0 : y.name} (${(I = e == null ? void 0 : e[0]) == null ? void 0 : I.id})`), console.trace();
10862
10864
  const i = this.stepSelections;
10863
10865
  this.stepSelections = {
10864
10866
  ...this.stepSelections,
10865
10867
  [t]: { selectedVariants: e }
10866
- }, this.selectionCost = Object.values(this.stepSelections).reduce((E, b) => E + b.selectedVariants.map((I) => I.priceModifier || 0).reduce((I, D) => I + D, 0), 0), this.workflow.steps.forEach((E) => {
10867
- wt(E, this.stepSelections) || (this.stepInitialised[E.stepName] = !1, delete this.stepMetadata[E.stepName], delete this.stepSelections[E.stepName], delete this.storage[E.stepName]);
10868
+ }, this.selectionCost = Object.values(this.stepSelections).reduce((E, D) => E + D.selectedVariants.map((F) => F.priceModifier || 0).reduce((F, k) => F + k, 0), 0), this.workflow.steps.forEach((E) => {
10869
+ wt(E, this.stepSelections) || (console.log(`LOG: uniniting step ${E.stepTitle} (${E.stepName})`), this.stepInitialised[E.stepName] = !1, delete this.stepMetadata[E.stepName], delete this.stepSelections[E.stepName], delete this.storage[E.stepName]);
10868
10870
  });
10869
10871
  const s = this.allScenes, o = Pt(s, i), l = Pt(s, this.stepSelections), c = o.map((E) => E.silentSteps).flat(), A = l.map((E) => E.silentSteps).flat().filter(
10870
- (E) => !c.some((b) => b.stepName === E.stepName)
10872
+ (E) => !c.some((D) => D.stepName === E.stepName)
10871
10873
  );
10872
10874
  c.forEach((E) => {
10873
- wt(E, this.stepSelections) || (this.stepInitialised[E.stepName] = !1);
10875
+ wt(E, this.stepSelections) || (console.log(`LOG: uniniting silent step ${E.stepTitle} (${E.stepName})`), this.stepInitialised[E.stepName] = !1);
10874
10876
  });
10875
10877
  const u = this.getInvalidCanvasRegions(), { stepElements: h, commands: m } = await this.stepElementsForIntroducedSilentSteps(A, !1);
10876
10878
  this.stepElements = {
@@ -10880,16 +10882,16 @@ class Co {
10880
10882
  }, this.removeElements(u);
10881
10883
  const g = this.workflow.steps.find((E) => E.stepName === t);
10882
10884
  if ((g == null ? void 0 : g.type) === P.Frame) {
10883
- const E = (y = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : y.frameService;
10884
- E == null || E.setTargetElements(a.map((b) => b.id));
10885
+ const E = (b = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : b.frameService;
10886
+ E == null || E.setTargetElements(a.map((D) => D.id));
10885
10887
  }
10886
- const p = u.map((E) => new Et(E.id)), f = new Ga(this.constructSerializableWorkflow()), C = [...m, ...p, f];
10888
+ const p = u.map((E) => new Et(E.id)), f = new za(this.constructSerializableWorkflow()), C = [...m, ...p, f];
10887
10889
  C.length > 0 && this.commandContext.apply(new $(C), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
10888
10890
  const w = this.getInvalidModelVariants(), S = this.modelContainer;
10889
10891
  if (S) {
10890
10892
  const E = w.map(
10891
- (b) => S.applyModelVariant(
10892
- b,
10893
+ (D) => S.applyModelVariant(
10894
+ D,
10893
10895
  {
10894
10896
  contextService: this.getLayoutPreviewService()
10895
10897
  },
@@ -10901,13 +10903,14 @@ class Co {
10901
10903
  await this.onSelectionChange(), n && await n();
10902
10904
  }
10903
10905
  async ensureStepsAreLoaded() {
10906
+ console.log("LOG: ensure steps loaded");
10904
10907
  const e = Pt(this.allScenes, this.stepSelections).map((l) => l.renderableSteps), a = [], n = e.flat();
10905
10908
  for (const l of n)
10906
10909
  if (!this.stepInitialised[l.stepName])
10907
- switch (this.stepInitialised[l.stepName] = !0, l.type) {
10910
+ switch (console.log(`LOG: step ${l.stepTitle} (${l.stepName}) was not inited`), this.stepInitialised[l.stepName] = !0, l.type) {
10908
10911
  case P.DigitalContent:
10909
10912
  a.push(
10910
- zn.init(
10913
+ Gn.init(
10911
10914
  l,
10912
10915
  this,
10913
10916
  this.reloadedState
@@ -10924,7 +10927,7 @@ class Co {
10924
10927
  break;
10925
10928
  case P.Material:
10926
10929
  a.push(
10927
- Gn.init(l, this, this.reloadedState)
10930
+ zn.init(l, this, this.reloadedState)
10928
10931
  );
10929
10932
  break;
10930
10933
  case P.Model:
@@ -10948,7 +10951,7 @@ class Co {
10948
10951
  );
10949
10952
  break;
10950
10953
  case P.Shape:
10951
- a.push(zt.init(l, this, this.reloadedState));
10954
+ a.push(Gt.init(l, this, this.reloadedState));
10952
10955
  break;
10953
10956
  case P.Text:
10954
10957
  a.push(j.init(l, this, this.reloadedState));
@@ -11313,7 +11316,7 @@ class yo extends it {
11313
11316
  super(t, e, a);
11314
11317
  }
11315
11318
  selectVariant(t) {
11316
- return Gn.selectVariant(
11319
+ return zn.selectVariant(
11317
11320
  this.step,
11318
11321
  t.getResource(),
11319
11322
  this.manager,
@@ -11375,7 +11378,7 @@ class bo extends it {
11375
11378
  }
11376
11379
  selectVariant(t) {
11377
11380
  const e = t.getResource();
11378
- return zt.selectVariant(
11381
+ return Gt.selectVariant(
11379
11382
  this.step,
11380
11383
  {
11381
11384
  fill: e.color,
@@ -11393,7 +11396,7 @@ class bo extends it {
11393
11396
  * @deprecated The shape step can now pass through colors returned by getColors via selectVariant. Please swap setColor for selectVariant.
11394
11397
  */
11395
11398
  setColor(t) {
11396
- return zt.selectVariant(
11399
+ return Gt.selectVariant(
11397
11400
  this.step,
11398
11401
  t,
11399
11402
  this.manager.getRegionElements(this.step.stepName) || [],
@@ -11405,7 +11408,7 @@ class bo extends it {
11405
11408
  * @returns A list of color definitions that are currently applied to the illustration.
11406
11409
  */
11407
11410
  getColors() {
11408
- return zt.availableColours(this.step);
11411
+ return Gt.availableColours(this.step);
11409
11412
  }
11410
11413
  /**
11411
11414
  * Allows for setting a custom color when the custom variant is selected. Will
@@ -11413,7 +11416,7 @@ class bo extends it {
11413
11416
  */
11414
11417
  setCustomColor(t) {
11415
11418
  var e, a;
11416
- return ((e = this.getCurrentVariant()) == null ? void 0 : e.getColor()) !== "#custom" && console.warn(`setting custom color for step ${this.step.stepName} but color is ${(a = this.getCurrentVariant()) == null ? void 0 : a.getColor()}`), zt.setCustomColor(t, this.step, this.manager);
11419
+ return ((e = this.getCurrentVariant()) == null ? void 0 : e.getColor()) !== "#custom" && console.warn(`setting custom color for step ${this.step.stepName} but color is ${(a = this.getCurrentVariant()) == null ? void 0 : a.getColor()}`), Gt.setCustomColor(t, this.step, this.manager);
11417
11420
  }
11418
11421
  getCustomColor() {
11419
11422
  var e, a, n;
@@ -11468,7 +11471,7 @@ class Bo extends it {
11468
11471
  */
11469
11472
  async setFillColor(t) {
11470
11473
  const e = this.manager.getRegionElements(this.step.stepName);
11471
- await j.changeFillColor(this.step, t, e, this.manager);
11474
+ console.log(`LOG: changing fill color of step ${this.step.stepTitle} (${this.step.stepName}) with ${e.length} elements to ${t}`), await j.changeFillColor(this.step, t, e, this.manager);
11472
11475
  }
11473
11476
  /**
11474
11477
  * Gets the color currently applied to the element.
@@ -11657,7 +11660,7 @@ class Po extends it {
11657
11660
  * @returns The final URL string for the QR code.
11658
11661
  */
11659
11662
  async selectVideo(t) {
11660
- return zn.regenerateQRCode(
11663
+ return Gn.regenerateQRCode(
11661
11664
  this.manager.getRegionElements(this.step.stepName),
11662
11665
  t.key,
11663
11666
  this.manager,
@@ -11739,7 +11742,7 @@ class ce {
11739
11742
  case P.Module:
11740
11743
  return new Do(t, e, t.getStepTags(e.stepName));
11741
11744
  default:
11742
- throw new G(`Step type ${e.type} not yet supported in Core SDK`);
11745
+ throw new z(`Step type ${e.type} not yet supported in Core SDK`);
11743
11746
  }
11744
11747
  }
11745
11748
  }
@@ -11964,7 +11967,7 @@ const ko = async (r, t) => {
11964
11967
  };
11965
11968
  return i && (h.metadata = i), a && (h.selectedVariants = a), n && (h.sku = n), h;
11966
11969
  }, Xn = async (r, t, e, a, n, i, s, o, l, c) => {
11967
- var I;
11970
+ var E;
11968
11971
  await (async () => {
11969
11972
  var R;
11970
11973
  if (c !== void 0)
@@ -11983,29 +11986,29 @@ const ko = async (r, t) => {
11983
11986
  T.errors && console.log("Server Error:", tt.message);
11984
11987
  }), null) : nt ?? null;
11985
11988
  })() || (console.warn("State mismatch detected. Uploading known state explicitly"), console.warn("State Object:", JSON.stringify(a())), await r.updateStateWithServerImmediate(a), console.log("Server state is undefined @ Workflow completion"));
11986
- const u = r.getPreviewService(), h = (I = t == null ? void 0 : t.finalizeStepConfig) == null ? void 0 : I.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, g = l && ca(l, t, !0), p = l && ca(l, t, !1), f = async (D) => {
11989
+ const u = r.getPreviewService(), h = (E = t == null ? void 0 : t.finalizeStepConfig) == null ? void 0 : E.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, g = l && ca(l, t, !0), p = l && ca(l, t, !1), f = async (D) => {
11987
11990
  const F = {};
11988
11991
  let k = 0;
11989
11992
  if (Object.keys(i).length > 0)
11990
11993
  for (const T of Object.keys(i)) {
11991
11994
  const nt = i[T], R = t.steps.find((tt) => tt.stepName === T);
11992
11995
  for (let tt = 0; tt < nt.selections.length; ++tt) {
11993
- const X = nt.selections[tt];
11996
+ const Z = nt.selections[tt];
11994
11997
  if (R && (!D || R.option && (R.option.variants || []).length > 1 && !R.data.hideSelectionInCart && !R.data.hideSelectionsInCart)) {
11995
11998
  const Nt = R.stepTitle;
11996
11999
  F[Nt] ? F[Nt].push({
11997
- id: X.id || "",
11998
- name: X.name,
11999
- priceModifier: X.priceModifier
12000
+ id: Z.id || "",
12001
+ name: Z.name,
12002
+ priceModifier: Z.priceModifier
12000
12003
  }) : F[Nt] = [
12001
12004
  {
12002
- id: X.id || "",
12003
- name: X.name,
12004
- priceModifier: X.priceModifier
12005
+ id: Z.id || "",
12006
+ name: Z.name,
12007
+ priceModifier: Z.priceModifier
12005
12008
  }
12006
12009
  ];
12007
12010
  }
12008
- k += X.priceModifier;
12011
+ k += Z.priceModifier;
12009
12012
  }
12010
12013
  }
12011
12014
  return [F, k];
@@ -12017,10 +12020,10 @@ const ko = async (r, t) => {
12017
12020
  S[D].map((F) => F.id)
12018
12021
  ])
12019
12022
  );
12020
- let E = await o(m, n.id);
12021
- if (E) {
12022
- const D = await (await rt(E)).blob();
12023
- E = (await U.uploadAsset(
12023
+ let I = await o(m, n.id);
12024
+ if (I) {
12025
+ const D = await (await rt(I)).blob();
12026
+ I = (await U.uploadAsset(
12024
12027
  { name: `${n.id}-preview-image.png`, blob: D },
12025
12028
  Ce.Image,
12026
12029
  !0,
@@ -12038,7 +12041,7 @@ const ko = async (r, t) => {
12038
12041
  workflowId: t.id,
12039
12042
  transactionId: n.id,
12040
12043
  useThreeDimPreview: !!m,
12041
- previewImage: E
12044
+ previewImage: I
12042
12045
  };
12043
12046
  if (p) {
12044
12047
  const F = [];
@@ -12161,7 +12164,7 @@ class Ro {
12161
12164
  const t = N.get(this.localPersistenceKey);
12162
12165
  return t ? JSON.parse(t) : [];
12163
12166
  }
12164
- throw new G("Unexpected storage method requested");
12167
+ throw new z("Unexpected storage method requested");
12165
12168
  }
12166
12169
  /**
12167
12170
  * Search for a transaction that has been saved.
@@ -12201,7 +12204,7 @@ class Ro {
12201
12204
  N.set(this.localPersistenceKey, JSON.stringify(t));
12202
12205
  return;
12203
12206
  }
12204
- throw new G("Unexpected storage method requested");
12207
+ throw new z("Unexpected storage method requested");
12205
12208
  }
12206
12209
  }
12207
12210
  const Ye = new Ro(), Oo = v`
@@ -12551,7 +12554,7 @@ class Vo {
12551
12554
  }
12552
12555
  async save(t) {
12553
12556
  if (!this.getCommandContext().getState())
12554
- throw new G("State undefined!");
12557
+ throw new z("State undefined!");
12555
12558
  const n = {
12556
12559
  title: await (async () => {
12557
12560
  var l;
@@ -12574,10 +12577,10 @@ class Vo {
12574
12577
  var s;
12575
12578
  const t = yt(this.getCommandContext().getState());
12576
12579
  if (!t)
12577
- throw new G("Internal state is undefined! Cannot copy experience!");
12580
+ throw new z("Internal state is undefined! Cannot copy experience!");
12578
12581
  const e = JSON.stringify(t.transaction), a = this.getWorkflowManager().getWorkflow(), n = (s = this.getWorkflowManager().getTransaction().integrationProduct) == null ? void 0 : s.id;
12579
12582
  if (!n)
12580
- throw new G("Integration product id is undefined!");
12583
+ throw new z("Integration product id is undefined!");
12581
12584
  return await this.getClient().getWorkflowExperience({
12582
12585
  type: "integration",
12583
12586
  integrationProductId: n,
@@ -12676,7 +12679,7 @@ class Vo {
12676
12679
  (this.eventCallbacks.get(t) || []).forEach((e) => e(this));
12677
12680
  }
12678
12681
  }
12679
- const zo = [
12682
+ const Go = [
12680
12683
  "altGlyph",
12681
12684
  "circle",
12682
12685
  "ellipse",
@@ -12688,7 +12691,7 @@ const zo = [
12688
12691
  "textPath",
12689
12692
  "tref",
12690
12693
  "tspan"
12691
- ], Go = async (r, t, e) => {
12694
+ ], zo = async (r, t, e) => {
12692
12695
  const a = t.data, n = e.data.baseUrl, i = a.assetUrl.replace("localhost", "localstack"), s = n.slice(0, 4) === "http" ? "" : "https://", o = new URL(s + n);
12693
12696
  o.searchParams.append("video", Ra(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
12694
12697
  const l = o.toString(), d = `data:image/svg+xml;base64,${Ra(await on(l, { type: "svg" }))}`, A = (h) => {
@@ -12774,7 +12777,7 @@ const zo = [
12774
12777
  return console.error(o), [];
12775
12778
  }
12776
12779
  }, jo = async (r, t, e, a) => {
12777
- var y, E;
12780
+ var y, I;
12778
12781
  const n = e.data, i = a.option;
12779
12782
  if (!i)
12780
12783
  return console.error(`No option for step ${a.stepName}.`), [];
@@ -12784,7 +12787,7 @@ const zo = [
12784
12787
  if (!s.asset)
12785
12788
  return console.error(`No asset for variant with ID: ${n.illustrationVariantId}`), [];
12786
12789
  t[a.stepName] = { selectedVariants: [s] };
12787
- const o = (E = s.asset) == null ? void 0 : E.fileLink;
12790
+ const o = (I = s.asset) == null ? void 0 : I.fileLink;
12788
12791
  if (!o)
12789
12792
  return console.error(`No asset link for variant with ID: ${n.illustrationVariantId}`), [];
12790
12793
  const l = await at(o, !0), c = /<svg.*?<\/svg>/s, d = l.match(c) || [], A = (d == null ? void 0 : d.length) > 0 ? d[0] : "", m = dt().parseFromString(A, "image/svg+xml").firstElementChild;
@@ -12793,10 +12796,10 @@ const zo = [
12793
12796
  pa(m);
12794
12797
  const g = {};
12795
12798
  xt(m, (b) => {
12796
- zo.includes(b.tagName) && !b.attributes.getNamedItem("fill") && b.setAttribute("fill", "#000000");
12797
- const I = b.attributes.getNamedItem("fill");
12798
- if (I && I.value !== "none") {
12799
- const F = I.value, T = `spiff-fill-${F.replace(/\W/g, "")}`;
12799
+ Go.includes(b.tagName) && !b.attributes.getNamedItem("fill") && b.setAttribute("fill", "#000000");
12800
+ const E = b.attributes.getNamedItem("fill");
12801
+ if (E && E.value !== "none") {
12802
+ const F = E.value, T = `spiff-fill-${F.replace(/\W/g, "")}`;
12800
12803
  b.classList.add(T), g[T] = { browserValue: F };
12801
12804
  }
12802
12805
  const D = b.attributes.getNamedItem("stroke");
@@ -12807,16 +12810,16 @@ const zo = [
12807
12810
  });
12808
12811
  const f = bt().serializeToString(m), C = n.colors;
12809
12812
  if (C) {
12810
- for (const [b, I] of Object.entries(g))
12813
+ for (const [b, E] of Object.entries(g))
12811
12814
  for (const D of Object.keys(C))
12812
- if (I.browserValue === D) {
12815
+ if (E.browserValue === D) {
12813
12816
  g[b] = { browserValue: C[D] };
12814
12817
  break;
12815
12818
  }
12816
12819
  }
12817
12820
  const w = (b) => {
12818
- const I = r.find((F) => F.panelId === b.panelId);
12819
- if (!I)
12821
+ const E = r.find((F) => F.panelId === b.panelId);
12822
+ if (!E)
12820
12823
  throw new Y(b);
12821
12824
  const D = Q();
12822
12825
  return new W(
@@ -12834,7 +12837,7 @@ const zo = [
12834
12837
  layerIndex: b.layerIndex,
12835
12838
  immutable: b.immutable
12836
12839
  },
12837
- I
12840
+ E
12838
12841
  );
12839
12842
  }, S = a.data.regions;
12840
12843
  try {
@@ -13144,7 +13147,7 @@ const zo = [
13144
13147
  switch (o.type) {
13145
13148
  case P.DigitalContent:
13146
13149
  n.push(
13147
- ...await Go(e, s, o)
13150
+ ...await zo(e, s, o)
13148
13151
  );
13149
13152
  break;
13150
13153
  case P.Frame:
@@ -13434,19 +13437,19 @@ class rl {
13434
13437
  }
13435
13438
  async createHandle(t) {
13436
13439
  switch (t.type) {
13437
- case z.FileUpload:
13440
+ case G.FileUpload:
13438
13441
  return new il(this.bundle, t).initialize();
13439
- case z.ColorOption:
13442
+ case G.ColorOption:
13440
13443
  return new Ja(
13441
13444
  this.bundle,
13442
13445
  t,
13443
13446
  t.entityId ? await q.getOption(t.entityId) : void 0
13444
13447
  );
13445
- case z.Option: {
13448
+ case G.Option: {
13446
13449
  const e = t.entityId ? await q.getOption(t.entityId) : void 0;
13447
13450
  return (e == null ? void 0 : e.type) === "Color" ? new Ja(this.bundle, t, e) : new Zn(this.bundle, t, e);
13448
13451
  }
13449
- case z.Text:
13452
+ case G.Text:
13450
13453
  return new sl(this.bundle, t);
13451
13454
  default:
13452
13455
  throw new Error("Unhandled Global Property Aspect Type");
@@ -13492,17 +13495,15 @@ class Ia {
13492
13495
  * @param targetExperiences Optionally filter the steps to only those in the given experiences.
13493
13496
  */
13494
13497
  getSharedSteps(t) {
13495
- return (t ?? this.bundle.getWorkflowExperiences()).flatMap(
13496
- (n) => n.getStepsConditionallyActive().filter((i) => {
13497
- var s;
13498
- return i.getOverrideGlobalPropertyConfiguration(this.property.type) ? !1 : (s = i.getRaw().globalPropertyAspectConfigurations) == null ? void 0 : s.some(
13499
- (o) => {
13500
- var l, c;
13501
- return o.globalPropertyConfigurationId === ((c = (l = this.bundle.getProductCollection()) == null ? void 0 : l.getResource().globalPropertyConfiguration) == null ? void 0 : c.id) && o.aspectName === this.property.name;
13502
- }
13503
- );
13504
- })
13505
- );
13498
+ return (t ?? this.bundle.getWorkflowExperiences()).flatMap((n) => n.getSteps().filter((s) => {
13499
+ var o;
13500
+ return s.getOverrideGlobalPropertyConfiguration(this.property.type) ? !1 : (o = s.getRaw().globalPropertyAspectConfigurations) == null ? void 0 : o.some(
13501
+ (l) => {
13502
+ var c, d;
13503
+ return l.globalPropertyConfigurationId === ((d = (c = this.bundle.getProductCollection()) == null ? void 0 : c.getResource().globalPropertyConfiguration) == null ? void 0 : d.id) && l.aspectName === this.property.name;
13504
+ }
13505
+ );
13506
+ }));
13506
13507
  }
13507
13508
  getStateValue() {
13508
13509
  return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);
@@ -13869,6 +13870,7 @@ class Ja extends Zn {
13869
13870
  }
13870
13871
  async applyGlobalState(t) {
13871
13872
  var i, s, o;
13873
+ console.log(`LOG: applying global state for color ${this.property.name}`);
13872
13874
  const e = this.getStateValue();
13873
13875
  if (!e)
13874
13876
  return Promise.resolve();
@@ -13877,11 +13879,13 @@ class Ja extends Zn {
13877
13879
  return Promise.resolve();
13878
13880
  await this.applyColorVariant(new st(a), t);
13879
13881
  const n = (o = this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)) == null ? void 0 : o.customColor;
13880
- n && this.setCustomColor(n);
13882
+ console.log(`LOG: end of apply global state for color ${this.property.name}`), n && this.setCustomColor(n);
13881
13883
  }
13882
13884
  async applyColorVariant(t, e, a) {
13883
- const i = this.getSharedSteps(e).map((s) => {
13884
- switch (s.getType()) {
13885
+ const n = this.getSharedSteps(e);
13886
+ console.log(`LOG: applying color variant ${t.getName()} for ${n.length} shared steps`);
13887
+ const i = n.map((s) => {
13888
+ switch (console.log(`LOG: applying to step type ${s.getType()}`), s.getType()) {
13885
13889
  case P.Shape:
13886
13890
  return s.selectVariant(t);
13887
13891
  case P.Text:
@@ -14046,15 +14050,15 @@ class cl {
14046
14050
  let i = n.type && n.storage ? {} : void 0;
14047
14051
  if (i)
14048
14052
  switch (n.type) {
14049
- case z.FileUpload: {
14053
+ case G.FileUpload: {
14050
14054
  i.fileUpload = n.storage;
14051
14055
  break;
14052
14056
  }
14053
- case z.Option: {
14057
+ case G.Option: {
14054
14058
  i.option = n.storage;
14055
14059
  break;
14056
14060
  }
14057
- case z.ColorOption: {
14061
+ case G.ColorOption: {
14058
14062
  i = n.storage;
14059
14063
  break;
14060
14064
  }
@@ -14734,7 +14738,7 @@ class Je {
14734
14738
  const m = this.globalPropertyStateManager.getGlobalPropertyState();
14735
14739
  m ? this.globalPropertyHandleService.getHandles().then((g) => {
14736
14740
  const p = g.map((f) => {
14737
- if (f.getType() === z.ColorOption || f.getType() === z.Option) {
14741
+ if (f.getType() === G.ColorOption || f.getType() === G.Option) {
14738
14742
  const C = f;
14739
14743
  if (!m.aspects.find((S) => S.name === C.getName()))
14740
14744
  return C.initDefaultVariant();
@@ -14871,7 +14875,7 @@ class Je {
14871
14875
  const i = n == null ? void 0 : n.name, s = e.find((o) => o.getName() === i);
14872
14876
  if (s)
14873
14877
  switch (n.type) {
14874
- case z.FileUpload: {
14878
+ case G.FileUpload: {
14875
14879
  const o = s, l = await ve([n.value]);
14876
14880
  l.length > 0 && await o.selectImage(l[0]);
14877
14881
  const c = (a = n.storage) == null ? void 0 : a.colors;
@@ -14883,21 +14887,21 @@ class Je {
14883
14887
  }
14884
14888
  break;
14885
14889
  }
14886
- case z.ColorOption: {
14890
+ case G.ColorOption: {
14887
14891
  const o = s;
14888
- if (n.type === z.ColorOption) {
14892
+ if (n.type === G.ColorOption) {
14889
14893
  const c = o.getAllVariants().find((d) => d.getId() === n.value);
14890
14894
  c && await o.selectVariant(c);
14891
14895
  } else
14892
14896
  o.setCustomColor(n.value);
14893
14897
  break;
14894
14898
  }
14895
- case z.Option: {
14899
+ case G.Option: {
14896
14900
  const o = s, c = o.getAllVariants().find((d) => d.getId() === n.value);
14897
14901
  c && await o.selectVariant(c);
14898
14902
  break;
14899
14903
  }
14900
- case z.Text: {
14904
+ case G.Text: {
14901
14905
  await s.setText(n.value);
14902
14906
  break;
14903
14907
  }
@@ -14908,7 +14912,7 @@ class Je {
14908
14912
  return this.globalPropertyStateManager;
14909
14913
  }
14910
14914
  async getGlobalPropertyTotalSubunits() {
14911
- return (await this.globalPropertyHandleService.getHandles()).filter((a) => a.getType() === z.Option).map((a) => {
14915
+ return (await this.globalPropertyHandleService.getHandles()).filter((a) => a.getType() === G.Option).map((a) => {
14912
14916
  var n;
14913
14917
  return ((n = a.getCurrentVariant()) == null ? void 0 : n.getPrice()) || 0;
14914
14918
  }).reduce((a, n) => a + n, 0);
@@ -14927,7 +14931,7 @@ class Je {
14927
14931
  const c = (e = this.getGlobalPropertyConfiguration()) == null ? void 0 : e.aspects.find(
14928
14932
  (d) => d.name === l
14929
14933
  );
14930
- if (c && c.type === z.ColorOption) {
14934
+ if (c && c.type === G.ColorOption) {
14931
14935
  const d = (a = s.getCurrentVariant()) == null ? void 0 : a.getAssetResource(), A = ((n = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : n.channelNumbers) || [], u = ((i = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : i.defaultColorVariants) || [], h = ll(
14932
14936
  this.getWorkflowExperiences(),
14933
14937
  this.globalConfigurationPropertyId || "",
@@ -15992,7 +15996,7 @@ class Ad {
15992
15996
  } catch (a) {
15993
15997
  throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
15994
15998
  }
15995
- }, this.options = t, this.options.applicationKey && $r(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 28.0.1-beta.29d7ea3f-e4d3-5c03-bd48-b02b5e782f5a"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15999
+ }, this.options = t, this.options.applicationKey && $r(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 28.0.1-beta.dfd45d89-6b78-5804-8247-b45fe6487531"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15996
16000
  }
15997
16001
  configure(t) {
15998
16002
  mt.setHubUrl(t.hubUrl), mt.setServerUrl(t.serverUrl), mt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && Lr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
@@ -16101,7 +16105,7 @@ class Ad {
16101
16105
  const C = ((h = (u = this.customer) == null ? void 0 : u.bundleStakeholders) == null ? void 0 : h.find(
16102
16106
  (w) => {
16103
16107
  var S, y;
16104
- return (y = (S = w.bundle) == null ? void 0 : S.transactions) == null ? void 0 : y.some((E) => E.id === t);
16108
+ return (y = (S = w.bundle) == null ? void 0 : S.transactions) == null ? void 0 : y.some((I) => I.id === t);
16105
16109
  }
16106
16110
  )) || ((g = (m = this.customer) == null ? void 0 : m.stakeholders) == null ? void 0 : g.find(
16107
16111
  (w) => {
@@ -16328,11 +16332,11 @@ class Ad {
16328
16332
  * @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
16329
16333
  */
16330
16334
  async getExistingBundle(t, e, a, n) {
16331
- var h, m, g, p, f, C, w, S, y, E, b;
16335
+ var h, m, g, p, f, C, w, S, y, I, b;
16332
16336
  const i = N.getMap("bundleOwnerIds"), s = i == null ? void 0 : i.get(t), o = {};
16333
16337
  try {
16334
- const I = await this.loggedInBearerToken();
16335
- o.Authorization = `Bearer ${I}`;
16338
+ const E = await this.loggedInBearerToken();
16339
+ o.Authorization = `Bearer ${E}`;
16336
16340
  } catch {
16337
16341
  const F = ((h = Object.entries(localStorage).find(([T, nt]) => T.startsWith("CognitoIdentityServiceProvider") && T.endsWith("idToken"))) == null ? void 0 : h[0]) || "", k = localStorage.getItem(F);
16338
16342
  k && !Wt(k) && (o.Authorization = `Bearer ${k}`);
@@ -16342,7 +16346,7 @@ class Ad {
16342
16346
  ...o,
16343
16347
  ...(m = n == null ? void 0 : n.graphql) == null ? void 0 : m.additionalHeaders
16344
16348
  }, c = await B.getShadowGraphqlClient().query({
16345
- query: Gs(((p = (g = n == null ? void 0 : n.graphql) == null ? void 0 : g.productCollection) == null ? void 0 : p.eagerFetchProducts) || !1),
16349
+ query: zs(((p = (g = n == null ? void 0 : n.graphql) == null ? void 0 : g.productCollection) == null ? void 0 : p.eagerFetchProducts) || !1),
16346
16350
  variables: {
16347
16351
  id: t
16348
16352
  },
@@ -16357,7 +16361,7 @@ class Ad {
16357
16361
  A.set(d.id, d.partner.id), N.setMap("bundlePartnerIds", A);
16358
16362
  const u = new Je(this, d, e, a, s, {
16359
16363
  additionalHeaders: (y = n == null ? void 0 : n.graphql) == null ? void 0 : y.additionalHeaders,
16360
- eagerFetchProducts: (b = (E = n == null ? void 0 : n.graphql) == null ? void 0 : E.productCollection) == null ? void 0 : b.eagerFetchProducts,
16364
+ eagerFetchProducts: (b = (I = n == null ? void 0 : n.graphql) == null ? void 0 : I.productCollection) == null ? void 0 : b.eagerFetchProducts,
16361
16365
  existingGlobalPropertyState: c.data.globalPropertyState,
16362
16366
  readonly: n == null ? void 0 : n.readonly
16363
16367
  });
@@ -16376,7 +16380,7 @@ class Ad {
16376
16380
  const C = await this.loggedInBearerToken();
16377
16381
  s.Authorization = `Bearer ${C}`;
16378
16382
  } catch {
16379
- const S = ((h = Object.entries(localStorage).find(([E, b]) => E.startsWith("CognitoIdentityServiceProvider") && E.endsWith("idToken"))) == null ? void 0 : h[0]) || "", y = localStorage.getItem(S);
16383
+ const S = ((h = Object.entries(localStorage).find(([I, b]) => I.startsWith("CognitoIdentityServiceProvider") && I.endsWith("idToken"))) == null ? void 0 : h[0]) || "", y = localStorage.getItem(S);
16380
16384
  y && !Wt(y) && (s.Authorization = `Bearer ${y}`);
16381
16385
  }
16382
16386
  const o = {
@@ -16483,19 +16487,19 @@ class Ad {
16483
16487
  var D, F, k;
16484
16488
  if (y.length === 0)
16485
16489
  return [];
16486
- const E = y.map((T) => T.option.transactionId), b = await a.query({
16490
+ const I = y.map((T) => T.option.transactionId), b = await a.query({
16487
16491
  query: yi,
16488
16492
  variables: {
16489
- ids: E
16493
+ ids: I
16490
16494
  },
16491
16495
  errorPolicy: "all",
16492
16496
  fetchPolicy: "no-cache"
16493
- }), I = b.data.transactions;
16494
- if (I.length !== y.length) {
16497
+ }), E = b.data.transactions;
16498
+ if (E.length !== y.length) {
16495
16499
  const T = ((F = (D = b.errors) == null ? void 0 : D[0]) == null ? void 0 : F.message) || "Unknown error";
16496
16500
  throw new ut(`Not all transactions were found: ${T}`);
16497
16501
  }
16498
- return !this.activeIntegration && ((k = I[0].integrationProduct) != null && k.integration) && (this.activeIntegration = Promise.resolve(I[0].integrationProduct.integration)), I.map((T, nt) => {
16502
+ return !this.activeIntegration && ((k = E[0].integrationProduct) != null && k.integration) && (this.activeIntegration = Promise.resolve(E[0].integrationProduct.integration)), E.map((T, nt) => {
16499
16503
  var R;
16500
16504
  return {
16501
16505
  transaction: T,
@@ -16505,10 +16509,10 @@ class Ad {
16505
16509
  };
16506
16510
  });
16507
16511
  }, i = async (y) => {
16508
- var I, D, F;
16512
+ var E, D, F;
16509
16513
  if (y.length === 0)
16510
16514
  return [];
16511
- const E = await a.mutate({
16515
+ const I = await a.mutate({
16512
16516
  mutation: wi,
16513
16517
  variables: {
16514
16518
  inputs: y.map((k) => ({
@@ -16524,9 +16528,9 @@ class Ad {
16524
16528
  },
16525
16529
  errorPolicy: "all",
16526
16530
  fetchPolicy: "no-cache"
16527
- }), b = (I = E.data) == null ? void 0 : I.transactionCreateMany;
16531
+ }), b = (E = I.data) == null ? void 0 : E.transactionCreateMany;
16528
16532
  if (!b || b.length === 0) {
16529
- const k = ((F = (D = E.errors) == null ? void 0 : D[0]) == null ? void 0 : F.message) || "Unknown error";
16533
+ const k = ((F = (D = I.errors) == null ? void 0 : D[0]) == null ? void 0 : F.message) || "Unknown error";
16530
16534
  throw new ut(`Failed to create transactions: ${k}`);
16531
16535
  }
16532
16536
  return b.map((k, T) => ({
@@ -16535,37 +16539,37 @@ class Ad {
16535
16539
  readOnly: !1,
16536
16540
  index: y[T].index
16537
16541
  }));
16538
- }, s = t.map((y, E) => ({ option: y, index: E })), o = s.filter((y) => y.option.type === "transaction"), l = s.filter(
16542
+ }, s = t.map((y, I) => ({ option: y, index: I })), o = s.filter((y) => y.option.type === "transaction"), l = s.filter(
16539
16543
  (y) => y.option.type === "integration" || y.option.type === "external"
16540
16544
  ), c = xa(o, 10), d = xa(l, 10), A = (await Promise.all([
16541
16545
  ...c.map(n),
16542
16546
  ...d.map(i)
16543
16547
  ])).flat(), u = [...new Set(A.map((y) => y.workflowId))], h = await ar(u, e), m = new Map(h.map((y) => [y.id, y])), g = N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), p = A.map(async (y) => {
16544
16548
  var tt;
16545
- const { transaction: E, workflowId: b, readOnly: I, index: D } = y, F = m.get(b), k = t[D];
16546
- !g.get(E.id) && E.transactionOwnerId && g.set(E.id, E.transactionOwnerId);
16547
- const T = g.get(E.id) || void 0, nt = new Fl({
16549
+ const { transaction: I, workflowId: b, readOnly: E, index: D } = y, F = m.get(b), k = t[D];
16550
+ !g.get(I.id) && I.transactionOwnerId && g.set(I.id, I.transactionOwnerId);
16551
+ const T = g.get(I.id) || void 0, nt = new Fl({
16548
16552
  onMutate: () => ({ context: { transactionOwnerId: T, bundleOwnerId: e == null ? void 0 : e.bundleOwnerId } }),
16549
16553
  onQuery: () => ({ context: { transactionOwnerId: T, bundleOwnerId: e == null ? void 0 : e.bundleOwnerId } })
16550
16554
  }), R = {
16551
- product: E.product,
16552
- transaction: E,
16555
+ product: I.product,
16556
+ transaction: I,
16553
16557
  layouts: [],
16554
16558
  singleVariantsRenderable: (tt = k == null ? void 0 : k.workflowConfiguration) == null ? void 0 : tt.singleVariantsRenderable,
16555
- stateMutationFunc: I ? async () => {
16556
- throw new G("State mutation is forbidden in read only mode!");
16557
- } : async (X) => (console.log(`LOG: updating transaction with options ${JSON.stringify(X, null, 2)}`), console.trace(), this.updateTransactionState({
16558
- ...X,
16559
+ stateMutationFunc: E ? async () => {
16560
+ throw new z("State mutation is forbidden in read only mode!");
16561
+ } : async (Z) => (console.log("LOG: updating transaction"), this.updateTransactionState({
16562
+ ...Z,
16559
16563
  context: { transactionOwnerId: T, bundleOwnerId: e == null ? void 0 : e.bundleOwnerId }
16560
16564
  })),
16561
16565
  graphQlClient: () => nt,
16562
- readOnly: I,
16566
+ readOnly: E,
16563
16567
  workflow: F,
16564
16568
  isReloadedTransaction: k.type === "transaction"
16565
16569
  };
16566
- if (!I && k.workflowState) {
16567
- const X = JSON.parse(k.workflowState);
16568
- R.layouts = Object.values(X.layouts || {}).map((Nt) => Nt.layout), await cs(X), R.reloadedState = X;
16570
+ if (!E && k.workflowState) {
16571
+ const Z = JSON.parse(k.workflowState);
16572
+ R.layouts = Object.values(Z.layouts || {}).map((Nt) => Nt.layout), await cs(Z), R.reloadedState = Z;
16569
16573
  } else
16570
16574
  R.layouts = Rl(
16571
16575
  R.transaction,
@@ -16576,9 +16580,9 @@ class Ad {
16576
16580
  ), R.delayWorkflowStateSync = !0, { experienceOptions: R, index: D, options: k };
16577
16581
  }), f = await Promise.all(p);
16578
16582
  N.setMap("transactionOwnerIds", g);
16579
- const w = f.sort((y, E) => y.index - E.index).map(async (y) => {
16580
- const { experienceOptions: E, options: b } = y, I = new Vo(this, E);
16581
- return await I.getWorkflowManager().getInitializationPromise(), b.type !== "transaction" && this.customer && await I.attachCustomerDetails({ email: this.customer.emailAddress }), I;
16583
+ const w = f.sort((y, I) => y.index - I.index).map(async (y) => {
16584
+ const { experienceOptions: I, options: b } = y, E = new Vo(this, I);
16585
+ return await E.getWorkflowManager().getInitializationPromise(), b.type !== "transaction" && this.customer && await E.attachCustomerDetails({ email: this.customer.emailAddress }), E;
16582
16586
  }), S = await Promise.all(w);
16583
16587
  return S.forEach((y) => y.getWorkflowManager().setWorkflowStateSyncEnabled(!0)), S;
16584
16588
  }
@@ -16852,7 +16856,7 @@ class Ul {
16852
16856
  if (!n || !this.frameData)
16853
16857
  return;
16854
16858
  if (this.frameData.length !== t.length)
16855
- throw new G(
16859
+ throw new z(
16856
16860
  "Frame data and offsets are not the same length. This is a bug. Please report it."
16857
16861
  );
16858
16862
  if (!this.offsets.some((s, o) => !(t[o].x === s.x && t[o].y === s.y && t[o].zoom === s.zoom)) && !a) {
@@ -16896,9 +16900,9 @@ class Ul {
16896
16900
  */
16897
16901
  updateFrameOffsets(t, e, a, n, i) {
16898
16902
  if (!a || a.length === 0 || a.some((o) => !o))
16899
- throw new G("Frame data not set. This is a bug");
16903
+ throw new z("Frame data not set. This is a bug");
16900
16904
  if (!this.workflowManager)
16901
- throw new G("No workflow manager set, cannot update offsets.");
16905
+ throw new z("No workflow manager set, cannot update offsets.");
16902
16906
  const s = this.workflowManager.getCommandDispatcher();
16903
16907
  this.targetElements.forEach((o, l) => {
16904
16908
  s(
@@ -17275,7 +17279,7 @@ class Vl extends it {
17275
17279
  return this.manager.getStepStorage(this.step.stepName);
17276
17280
  }
17277
17281
  }
17278
- const zl = v`
17282
+ const Gl = v`
17279
17283
  query GetLoggedInCustomer($email: String!) {
17280
17284
  customer(emailAddress: $email) {
17281
17285
  id
@@ -17318,7 +17322,7 @@ const zl = v`
17318
17322
  total
17319
17323
  }
17320
17324
  }
17321
- `, Gl = v`
17325
+ `, zl = v`
17322
17326
  mutation SetTransactionDesignName($id: String!, $name: String!) {
17323
17327
  transactionUpdate(id: $id, designName: $name) {
17324
17328
  id
@@ -17404,7 +17408,7 @@ const zl = v`
17404
17408
  },
17405
17409
  context: e
17406
17410
  }), Cd = async (r, t) => await B.getShadowGraphqlClient().mutate({
17407
- mutation: Gl,
17411
+ mutation: zl,
17408
17412
  errorPolicy: "all",
17409
17413
  variables: {
17410
17414
  id: r,
@@ -17425,7 +17429,7 @@ const zl = v`
17425
17429
  template: t
17426
17430
  }
17427
17431
  }), Sd = async (r) => (await B.getShadowGraphqlClient().query({
17428
- query: zl,
17432
+ query: Gl,
17429
17433
  errorPolicy: "all",
17430
17434
  variables: {
17431
17435
  email: r
@@ -17742,7 +17746,7 @@ export {
17742
17746
  ic as AddressValidationJobStatus,
17743
17747
  rc as AddressValidationResultConfirmationLevel,
17744
17748
  cd as ArrayInput,
17745
- z as AspectType,
17749
+ G as AspectType,
17746
17750
  St as AssetNotFoundError,
17747
17751
  Ce as AssetType,
17748
17752
  ad as BringForwardCommand,
@@ -17822,7 +17826,7 @@ export {
17822
17826
  Bo as TextStepHandle,
17823
17827
  pl as Transform,
17824
17828
  gl as TransformCollection,
17825
- G as UnhandledBehaviorError,
17829
+ z as UnhandledBehaviorError,
17826
17830
  Ir as UnitOfMeasurement,
17827
17831
  Zc as UpdateImageSourceCommand,
17828
17832
  st as Variant,
@@ -17836,7 +17840,7 @@ export {
17836
17840
  Mc as dataUrlFromExternalUrl,
17837
17841
  Ye as designService,
17838
17842
  pe as determineCorrectFontSizeAndLines,
17839
- zn as digitalContentStepService,
17843
+ Gn as digitalContentStepService,
17840
17844
  dt as domParser,
17841
17845
  wd as duplicateBundle,
17842
17846
  yd as duplicateTransaction,
@@ -17861,13 +17865,13 @@ export {
17861
17865
  Qe as getFrameData,
17862
17866
  rd as getGlobalPropertyStateForBundle,
17863
17867
  Ol as getIntegration,
17864
- zc as getNEPoint,
17868
+ Gc as getNEPoint,
17865
17869
  Vc as getNWPoint,
17866
17870
  Bd as getOrderedTransactions,
17867
17871
  hd as getOverrideThemeConfiguration,
17868
17872
  Lc as getPointOfRotation,
17869
17873
  od as getProductCollections,
17870
- Gc as getSEPoint,
17874
+ zc as getSEPoint,
17871
17875
  Sa as getSvgElement,
17872
17876
  Pd as getTemplateBundles,
17873
17877
  Id as getTemplateTransactions,
@@ -17884,7 +17888,7 @@ export {
17884
17888
  $c as isCloseToValue,
17885
17889
  Tt as loadFont,
17886
17890
  Nc as matchHexToPms,
17887
- Gn as materialStepService,
17891
+ zn as materialStepService,
17888
17892
  hl as metafieldManager,
17889
17893
  Hc as mmPerPixel,
17890
17894
  Wn as modelStepService,
@@ -17907,7 +17911,7 @@ export {
17907
17911
  pa as sanitizeSvgTree,
17908
17912
  Lr as setBearerAuthenticationToken,
17909
17913
  pn as setCanvasModule,
17910
- zt as shapeStepService,
17914
+ Gt as shapeStepService,
17911
17915
  fs as shortenUrl,
17912
17916
  mt as spiffCoreConfiguration,
17913
17917
  id as stepAspectValuesToDesignInputSteps,