@spiffcommerce/core 26.7.1 → 26.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ import IA from "lodash.chunk";
17
17
  import KA from "lodash.isequal";
18
18
  import { split as ze } from "unicode-default-word-boundary";
19
19
  import WA from "lodash.debounce";
20
- var le = /* @__PURE__ */ ((i) => (i.Data = "Data", i.Font = "Font", i.Frame = "Frame", i.Illustration = "Illustration", i.Image = "Image", i.Model = "Model", i.Material = "Material", i.Color = "Color", i.QuestionnaireCollateral = "QuestionnaireCollateral", i.RequestCollateral = "RequestCollateral", i.SignupCollateral = "SignupCollateral", i.Video = "Video", i.ColorProfile = "ColorProfile", i.Environment = "Environment", i))(le || {}), it = /* @__PURE__ */ ((i) => (i.FileUpload = "FileUpload", i.Option = "Option", i.ColorOption = "ColorOption", i.Text = "Text", i))(it || {}), M = /* @__PURE__ */ ((i) => (i.Information = "Information", i.Bulk = "Bulk", i.DigitalContent = "DigitalContent", i.Finish = "Finish", i.Frame = "Frame", i.Illustration = "Illustration", i.Introduction = "Introduction", i.Material = "Material", i.Model = "Model", i.Module = "Module", i.Picture = "Picture", i.Photo = "Photo", i.ProductOverlay = "ProductOverlay", i.Question = "Question", i.Shape = "Shape", i.SilentIllustration = "SilentIllustration", i.Text = "Text", i))(M || {}), si = /* @__PURE__ */ ((i) => (i.Color = "Color", i.Colors = "Colors", i.Selection = "Selection", i.Selections = "Selections", i.Text = "Text", i.Upload = "Upload", i))(si || {}), Jt = /* @__PURE__ */ ((i) => (i.ThreeD = "ThreeD", i.FreeDesign = "FreeDesign", i.Print = "Print", i))(Jt || {}), k = /* @__PURE__ */ ((i) => (i.Frame = "frame", i.Group = "group", i.Image = "image", i.Pattern = "pattern", i.Illustration = "illustration", i.Textbox = "textbox", i))(k || {}), oi = /* @__PURE__ */ ((i) => (i.Hyperlink = "Hyperlink", i.Edit = "Edit", i.Approve = "Approve", i))(oi || {}), ri = /* @__PURE__ */ ((i) => (i.Hub = "Hub", i.Shopify = "Shopify", i))(ri || {}), iA = /* @__PURE__ */ ((i) => (i.BackgroundRemover = "BackgroundRemover", i.ConversionAccelerator = "Conversion Accelerator", i.ProcessBuilder = "ProcessBuilder", i))(iA || {}), ci = /* @__PURE__ */ ((i) => (i[i.Orbit = 0] = "Orbit", i[i.Pan = 1] = "Pan", i))(ci || {}), li = /* @__PURE__ */ ((i) => (i.Manual = "Manual", i.OnStart = "OnStart", i.OnQuit = "OnQuit", i.OnEnd = "OnEnd", i))(li || {}), gi = /* @__PURE__ */ ((i) => (i.Email = "Email", i.FirstName = "FirstName", i.LastName = "LastName", i.Phone = "Phone", i))(gi || {}), ge = /* @__PURE__ */ ((i) => (i.Owner = "Owner", i.Approver = "Approver", i.Editor = "Editor", i.Viewer = "Viewer", i))(ge || {}), xt = /* @__PURE__ */ ((i) => (i.Autosize = "Autosize", i.Traditional = "Traditional", i))(xt || {}), K = /* @__PURE__ */ ((i) => (i[i.North = 0] = "North", i[i.Northeast = 1] = "Northeast", i[i.East = 2] = "East", i[i.Southeast = 3] = "Southeast", i[i.South = 4] = "South", i[i.Southwest = 5] = "Southwest", i[i.West = 6] = "West", i[i.Northwest = 7] = "Northwest", i))(K || {}), di = /* @__PURE__ */ ((i) => (i.Pixel = "px", i.Millimeter = "mm", i.Centimeter = "cm", i))(di || {});
20
+ var le = /* @__PURE__ */ ((i) => (i.Data = "Data", i.Font = "Font", i.Frame = "Frame", i.Illustration = "Illustration", i.Image = "Image", i.Model = "Model", i.Material = "Material", i.Color = "Color", i.QuestionnaireCollateral = "QuestionnaireCollateral", i.RequestCollateral = "RequestCollateral", i.SignupCollateral = "SignupCollateral", i.Video = "Video", i.ColorProfile = "ColorProfile", i.Environment = "Environment", i))(le || {}), it = /* @__PURE__ */ ((i) => (i.FileUpload = "FileUpload", i.Option = "Option", i.ColorOption = "ColorOption", i.Text = "Text", i))(it || {}), M = /* @__PURE__ */ ((i) => (i.Information = "Information", i.Bulk = "Bulk", i.DigitalContent = "DigitalContent", i.Finish = "Finish", i.Frame = "Frame", i.Illustration = "Illustration", i.Introduction = "Introduction", i.Material = "Material", i.Model = "Model", i.Module = "Module", i.Picture = "Picture", i.Photo = "Photo", i.ProductOverlay = "ProductOverlay", i.Question = "Question", i.Shape = "Shape", i.SilentIllustration = "SilentIllustration", i.Text = "Text", i))(M || {}), si = /* @__PURE__ */ ((i) => (i.Color = "Color", i.Colors = "Colors", i.Selection = "Selection", i.Selections = "Selections", i.Text = "Text", i.Upload = "Upload", i))(si || {}), Jt = /* @__PURE__ */ ((i) => (i.ThreeD = "ThreeD", i.FreeDesign = "FreeDesign", i.Print = "Print", i))(Jt || {}), N = /* @__PURE__ */ ((i) => (i.Frame = "frame", i.Group = "group", i.Image = "image", i.Pattern = "pattern", i.Illustration = "illustration", i.Textbox = "textbox", i))(N || {}), oi = /* @__PURE__ */ ((i) => (i.Hyperlink = "Hyperlink", i.Edit = "Edit", i.Approve = "Approve", i))(oi || {}), ri = /* @__PURE__ */ ((i) => (i.Hub = "Hub", i.Shopify = "Shopify", i))(ri || {}), iA = /* @__PURE__ */ ((i) => (i.BackgroundRemover = "BackgroundRemover", i.ConversionAccelerator = "Conversion Accelerator", i.ProcessBuilder = "ProcessBuilder", i))(iA || {}), ci = /* @__PURE__ */ ((i) => (i[i.Orbit = 0] = "Orbit", i[i.Pan = 1] = "Pan", i))(ci || {}), li = /* @__PURE__ */ ((i) => (i.Manual = "Manual", i.OnStart = "OnStart", i.OnQuit = "OnQuit", i.OnEnd = "OnEnd", i))(li || {}), gi = /* @__PURE__ */ ((i) => (i.Email = "Email", i.FirstName = "FirstName", i.LastName = "LastName", i.Phone = "Phone", i))(gi || {}), ge = /* @__PURE__ */ ((i) => (i.Owner = "Owner", i.Approver = "Approver", i.Editor = "Editor", i.Viewer = "Viewer", i))(ge || {}), xt = /* @__PURE__ */ ((i) => (i.Autosize = "Autosize", i.Traditional = "Traditional", i))(xt || {}), K = /* @__PURE__ */ ((i) => (i[i.North = 0] = "North", i[i.Northeast = 1] = "Northeast", i[i.East = 2] = "East", i[i.Southeast = 3] = "Southeast", i[i.South = 4] = "South", i[i.Southwest = 5] = "Southwest", i[i.West = 6] = "West", i[i.Northwest = 7] = "Northwest", i))(K || {}), di = /* @__PURE__ */ ((i) => (i.Pixel = "px", i.Millimeter = "mm", i.Centimeter = "cm", i))(di || {});
21
21
  class XA extends Error {
22
22
  constructor(t) {
23
23
  super(t), this.name = this.constructor.name;
@@ -127,7 +127,7 @@ const hi = () => {
127
127
  } catch {
128
128
  return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new DA();
129
129
  }
130
- }, N = hi();
130
+ }, k = hi();
131
131
  class Ci {
132
132
  constructor() {
133
133
  this.defaultServerUrl = "https://api.au.spiffcommerce.com", this.defaultServicesApiUrl = "https://services.au.spiffcommerce.com", this.defaultHubUrl = "https://hub.au.spiffcommerce.com", this.serverUrl = this.defaultServerUrl, this.servicesApiUrl = this.defaultServicesApiUrl, this.hubUrl = this.defaultHubUrl, this.serverUrlCallbacks = [];
@@ -3145,12 +3145,12 @@ function Gr(i) {
3145
3145
  const t = Ot.indexOf(i);
3146
3146
  return t >= 0 ? Mt[t] : "";
3147
3147
  }
3148
- function Ni(i) {
3148
+ function ki(i) {
3149
3149
  const t = Mt.indexOf(i);
3150
3150
  return t >= 0 ? Ot[t] : "";
3151
3151
  }
3152
3152
  function Tr(i, t = 64) {
3153
- const e = [], A = [], a = Ni(i);
3153
+ const e = [], A = [], a = ki(i);
3154
3154
  a && e.push({
3155
3155
  pms: a,
3156
3156
  hex: i,
@@ -3167,7 +3167,7 @@ function Tr(i, t = 64) {
3167
3167
  A[g] <= t && !e.some((d) => d.pms === Ot[g]) && e.push({ pms: Ot[g], hex: Mt[g], distance: A[g] });
3168
3168
  return e.sort((g, d) => g.distance - d.distance);
3169
3169
  }
3170
- const ki = Ot.map((i, t) => ({ pms: i, hex: Mt[t] })), bi = new ii(ki, { keys: ["pms"] });
3170
+ const Ni = Ot.map((i, t) => ({ pms: i, hex: Mt[t] })), bi = new ii(Ni, { keys: ["pms"] });
3171
3171
  function Jr(i, t) {
3172
3172
  return bi.search(i, t ? { limit: t } : void 0);
3173
3173
  }
@@ -3667,7 +3667,7 @@ class qi {
3667
3667
  }
3668
3668
  }
3669
3669
  }
3670
- const Nt = "persistentAssets", la = class Bt {
3670
+ const kt = "persistentAssets", la = class Bt {
3671
3671
  /**
3672
3672
  * Add a new asset to persistence
3673
3673
  * @param asset The asset to add.
@@ -3679,27 +3679,27 @@ const Nt = "persistentAssets", la = class Bt {
3679
3679
  }
3680
3680
  const e = /* @__PURE__ */ new Map();
3681
3681
  e.set(t.key || "", t.fileLink);
3682
- const A = N.getMap(Nt);
3682
+ const A = k.getMap(kt);
3683
3683
  A && A.forEach((a, n) => {
3684
3684
  e.set(n, a);
3685
- }), N.setMap(Nt, e), Bt.executeCallbacks();
3685
+ }), k.setMap(kt, e), Bt.executeCallbacks();
3686
3686
  }
3687
3687
  /**
3688
3688
  * Remove an existing asset from persistence. Noop if the asset doesn't exist.
3689
3689
  * @param assetKey The key to remove.
3690
3690
  */
3691
3691
  static remove(t) {
3692
- const e = N.getMap(Nt);
3692
+ const e = k.getMap(kt);
3693
3693
  if (!e)
3694
3694
  return;
3695
3695
  const A = Array.from(e.entries()).find((a) => a[0] === t);
3696
- A && (e.delete(A[0]), N.setMap(Nt, e), Bt.executeCallbacks());
3696
+ A && (e.delete(A[0]), k.setMap(kt, e), Bt.executeCallbacks());
3697
3697
  }
3698
3698
  /**
3699
3699
  * Get a list of all persisted assets.
3700
3700
  */
3701
3701
  static list() {
3702
- const t = N.getMap(Nt);
3702
+ const t = k.getMap(kt);
3703
3703
  return t ? Array.from(t.entries()).map((e) => ({ assetKey: e[0], src: e[1] })) : [];
3704
3704
  }
3705
3705
  /**
@@ -3747,10 +3747,10 @@ class q {
3747
3747
  A && (e.delete(A), q.setMap(e));
3748
3748
  }
3749
3749
  static getMap() {
3750
- return N.getMap(PA) || /* @__PURE__ */ new Map();
3750
+ return k.getMap(PA) || /* @__PURE__ */ new Map();
3751
3751
  }
3752
3752
  static setMap(t) {
3753
- N.setMap(PA, t);
3753
+ k.setMap(PA, t);
3754
3754
  }
3755
3755
  }
3756
3756
  const T = new qi();
@@ -5036,7 +5036,7 @@ const $ = new An(), da = I`
5036
5036
  internalId
5037
5037
  }
5038
5038
  }
5039
- `, kt = [M.SilentIllustration, M.ProductOverlay], Fn = async (i) => {
5039
+ `, Nt = [M.SilentIllustration, M.ProductOverlay], Fn = async (i) => {
5040
5040
  const t = [];
5041
5041
  i.introduction && t.push({
5042
5042
  name: "Introduction",
@@ -5059,16 +5059,16 @@ const $ = new An(), da = I`
5059
5059
  t.push({
5060
5060
  name: A.stepName,
5061
5061
  title: A.stepTitle,
5062
- renderableSteps: kt.includes(A.type) ? [] : [A],
5063
- silentSteps: kt.includes(A.type) ? [A] : []
5062
+ renderableSteps: Nt.includes(A.type) ? [] : [A],
5063
+ silentSteps: Nt.includes(A.type) ? [A] : []
5064
5064
  });
5065
5065
  else {
5066
5066
  const n = t.find((s) => s.name === a.name);
5067
- n ? kt.includes(A.type) ? n.silentSteps.push(A) : n.renderableSteps.push(A) : t.push({
5067
+ n ? Nt.includes(A.type) ? n.silentSteps.push(A) : n.renderableSteps.push(A) : t.push({
5068
5068
  name: a.name,
5069
5069
  title: a.name,
5070
- renderableSteps: kt.includes(A.type) ? [] : [A],
5071
- silentSteps: kt.includes(A.type) ? [A] : []
5070
+ renderableSteps: Nt.includes(A.type) ? [] : [A],
5071
+ silentSteps: Nt.includes(A.type) ? [A] : []
5072
5072
  });
5073
5073
  }
5074
5074
  }
@@ -5472,7 +5472,7 @@ const b = () => {
5472
5472
  const g = ((m = i.pattern) == null ? void 0 : m.x) || 0, d = ((f = i.pattern) == null ? void 0 : f.y) || 0, B = ((Q = i.pattern) == null ? void 0 : Q.width) || 0, h = ((p = i.pattern) == null ? void 0 : p.height) || 0, C = ((D = i.pattern) == null ? void 0 : D.scaleX) || 1, w = ((F = i.pattern) == null ? void 0 : F.scaleY) || 1, u = ((S = i.pattern) == null ? void 0 : S.rotation) || 0;
5473
5473
  return [(x = i.pattern) != null && x.svg ? {
5474
5474
  id: `${t}-contents`,
5475
- type: k.Illustration,
5475
+ type: N.Illustration,
5476
5476
  x: g,
5477
5477
  y: d,
5478
5478
  rotation: u,
@@ -5483,7 +5483,7 @@ const b = () => {
5483
5483
  colors: (P = i.pattern) == null ? void 0 : P.colors
5484
5484
  } : {
5485
5485
  id: `${t}-contents`,
5486
- type: k.Image,
5486
+ type: N.Image,
5487
5487
  x: g,
5488
5488
  y: d,
5489
5489
  rotation: u,
@@ -5579,14 +5579,14 @@ class vn {
5579
5579
  }), A - a;
5580
5580
  }
5581
5581
  }
5582
- const Nn = (i) => i.substring(0, 5).toLowerCase().trim() === "data:", Ne = /* @__PURE__ */ new Map(), Pt = async (i) => {
5583
- if (Ne.has(i))
5584
- return Ne.get(i);
5582
+ const kn = (i) => i.substring(0, 5).toLowerCase().trim() === "data:", ke = /* @__PURE__ */ new Map(), Pt = async (i) => {
5583
+ if (ke.has(i))
5584
+ return ke.get(i);
5585
5585
  const e = (async () => {
5586
5586
  try {
5587
5587
  return mt(i).getFont();
5588
5588
  } catch {
5589
- if (Nn(i)) {
5589
+ if (kn(i)) {
5590
5590
  const A = ta(i), a = Oe.parse(A);
5591
5591
  return qe(i, a), a;
5592
5592
  } else {
@@ -5595,7 +5595,7 @@ const Nn = (i) => i.substring(0, 5).toLowerCase().trim() === "data:", Ne = /* @_
5595
5595
  }
5596
5596
  }
5597
5597
  })();
5598
- return Ne.set(i, e), e;
5598
+ return ke.set(i, e), e;
5599
5599
  }, lA = (i) => {
5600
5600
  const t = ta(i), e = Oe.parse(t);
5601
5601
  return qe(i, e), e;
@@ -5683,7 +5683,7 @@ const Nn = (i) => i.substring(0, 5).toLowerCase().trim() === "data:", Ne = /* @_
5683
5683
  if (r < 0)
5684
5684
  throw new Error(`No max width calculated for text: ${o}.`);
5685
5685
  return { lines: o, width: r };
5686
- }, kn = (i, t, e, A, a, n) => {
5686
+ }, Nn = (i, t, e, A, a, n) => {
5687
5687
  const s = (n ?? gA) * t.getApproximateHeight(), o = 1 / e.unitsPerEm, r = pa(i, o, t), c = i.length * s * o, l = A / r, g = a / c;
5688
5688
  return Math.min(g, l);
5689
5689
  }, bn = (i, t, e, A) => {
@@ -5706,14 +5706,14 @@ const Nn = (i) => i.substring(0, 5).toLowerCase().trim() === "data:", Ne = /* @_
5706
5706
  lines: o,
5707
5707
  requiredHeight: t.height,
5708
5708
  requiredWidth: he(o, t.width, s, a),
5709
- fontSize: kn(o, a, n, t.width, t.height, A)
5709
+ fontSize: Nn(o, a, n, t.width, t.height, A)
5710
5710
  } : vA(t, i, t.fontSize, s, a, A);
5711
5711
  }, Rn = (i, t, e, A, a) => {
5712
5712
  const s = mt(t.assetUrl).getFont();
5713
5713
  let o = { ...i };
5714
5714
  const r = { ...i }, c = pa(A, e / s.unitsPerEm, mt(t.assetUrl));
5715
5715
  return c && c < o.width && (r.width = c, a === "left" ? (r.left += Math.sin(o.rotation * Math.PI / 360) * (o.width - c), r.top += Math.sin(o.rotation * Math.PI / 180) * (c - o.width) / 2) : a === "right" ? r.left += o.width - c : r.left += (o.width - c) / 2, A && Un(A, A).every(([l, g]) => l === g) && (o = r)), o;
5716
- }, ke = 1, ct = (i, t, e) => {
5716
+ }, Ne = 1, ct = (i, t, e) => {
5717
5717
  let A = 0;
5718
5718
  const a = e.getGlyphs(i);
5719
5719
  return a.forEach((n, s) => {
@@ -5736,12 +5736,12 @@ const Nn = (i) => i.substring(0, 5).toLowerCase().trim() === "data:", Ne = /* @_
5736
5736
  return i.forEach((a) => {
5737
5737
  A = Math.max(A, ct(a, t, e));
5738
5738
  }), A;
5739
- }, NA = {
5739
+ }, kA = {
5740
5740
  stripControlCharacters: !0,
5741
5741
  vertical: !1,
5742
5742
  uppercase: !1
5743
- }, Ce = (i, t = NA) => {
5744
- const e = { ...NA, ...t };
5743
+ }, Ce = (i, t = kA) => {
5744
+ const e = { ...kA, ...t };
5745
5745
  let A = i || "";
5746
5746
  return e.stripControlCharacters && (A = A.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (A = A.toUpperCase()), e.vertical && (A = A.split("").join(`
5747
5747
  `)), A;
@@ -6007,7 +6007,7 @@ class zn {
6007
6007
  return { ...t, transaction: e.apply(A) };
6008
6008
  }
6009
6009
  }
6010
- const Da = (i) => i.type === k.Image ? /* @__PURE__ */ v(ma, { ...i }, i.id) : i.type === k.Frame ? /* @__PURE__ */ v(Pn, { ...i }, i.id) : i.type === k.Illustration ? /* @__PURE__ */ v(On, { ...i }, i.id) : i.type === k.Textbox ? /* @__PURE__ */ v(Tn, { ...i }, i.id) : i.type === k.Group ? /* @__PURE__ */ v(fa, { ...i }, i.id) : null, dA = (i, t, e) => {
6010
+ const Da = (i) => i.type === N.Image ? /* @__PURE__ */ v(ma, { ...i }, i.id) : i.type === N.Frame ? /* @__PURE__ */ v(Pn, { ...i }, i.id) : i.type === N.Illustration ? /* @__PURE__ */ v(On, { ...i }, i.id) : i.type === N.Textbox ? /* @__PURE__ */ v(Tn, { ...i }, i.id) : i.type === N.Group ? /* @__PURE__ */ v(fa, { ...i }, i.id) : null, dA = (i, t, e) => {
6011
6011
  const A = e.renderingConfiguration, a = A != null && A.removeExcludedElements ? t.filter((n) => !n.excludeFromExport) : t;
6012
6012
  return /* @__PURE__ */ v(
6013
6013
  Yn,
@@ -6166,11 +6166,11 @@ const $t = (i) => {
6166
6166
  }, Fa = async (i) => {
6167
6167
  const t = await tt(i);
6168
6168
  return Ma(t);
6169
- }, kA = (i) => i.endsWith("mm") ? Number(i.replace("mm", "")) * 3.7795275591 : i.endsWith("px") ? Number(i.replace("px", "")) : Number(i), Ma = (i) => {
6169
+ }, NA = (i) => i.endsWith("mm") ? Number(i.replace("mm", "")) * 3.7795275591 : i.endsWith("px") ? Number(i.replace("px", "")) : Number(i), Ma = (i) => {
6170
6170
  const A = ot().parseFromString(i, "image/svg+xml").querySelector("svg");
6171
6171
  if (!A)
6172
6172
  throw new Error("No svg tag found, this svg must be malformed!");
6173
- const a = A.getAttribute("viewBox"), n = A.getAttribute("width"), s = A.getAttribute("height"), o = s && n ? [0, 0, kA(n), kA(s)] : a == null ? void 0 : a.split(" ").map((r) => Number(r));
6173
+ const a = A.getAttribute("viewBox"), n = A.getAttribute("width"), s = A.getAttribute("height"), o = s && n ? [0, 0, NA(n), NA(s)] : a == null ? void 0 : a.split(" ").map((r) => Number(r));
6174
6174
  if (!o)
6175
6175
  throw new Error("No viewbox or width/height values detected on SVG file!");
6176
6176
  return {
@@ -6233,18 +6233,18 @@ const $t = (i) => {
6233
6233
  rotation: 0,
6234
6234
  panelId: i.layoutState.layout.panelId
6235
6235
  };
6236
- if (e && t === k.Illustration) {
6236
+ if (e && t === N.Illustration) {
6237
6237
  const r = await gt(await Sa(e)), d = ot().parseFromString(r.svg, "image/svg+xml").firstElementChild.getAttribute("viewBox");
6238
6238
  if (!d)
6239
6239
  throw new Error("SVG missing viewBox.");
6240
6240
  const B = o.height, h = d.split(" "), C = parseFloat(h[2]) || 1, w = parseFloat(h[3]) || 1, u = C / w;
6241
6241
  o.height = o.width / u, o.top += (B - o.height) / 2;
6242
6242
  }
6243
- if (e && t === k.Image) {
6243
+ if (e && t === N.Image) {
6244
6244
  const r = o.height, c = await Qe(e), l = await pe(c), g = l.width / l.height;
6245
6245
  o.height = o.width / g, o.top += (r - o.height) / 2;
6246
6246
  }
6247
- if (e && t === k.Textbox && (A != null && A.text) && (A != null && A.fontScale)) {
6247
+ if (e && t === N.Textbox && (A != null && A.text) && (A != null && A.fontScale)) {
6248
6248
  await Pt(e);
6249
6249
  const r = mt(e), c = ct(A.text, A == null ? void 0 : A.fontScale, r);
6250
6250
  o.width = Math.min(c, a.width * 0.85), o.left = a.x + a.width / 2 - o.width / 2;
@@ -6253,7 +6253,7 @@ const $t = (i) => {
6253
6253
  };
6254
6254
  class ec {
6255
6255
  static async getFrame(t, e) {
6256
- const A = await ya(e.region, e.src), a = await ye(A), n = e.region || await Rt(t, k.Frame);
6256
+ const A = await ya(e.region, e.src), a = await ye(A), n = e.region || await Rt(t, N.Frame);
6257
6257
  return {
6258
6258
  id: b(),
6259
6259
  x: n.left,
@@ -6268,7 +6268,7 @@ class ec {
6268
6268
  path: a.path,
6269
6269
  dataWidth: a.width,
6270
6270
  dataHeight: a.height,
6271
- type: k.Frame,
6271
+ type: N.Frame,
6272
6272
  disablePlaceholder: e.configuration.disablePlaceholder,
6273
6273
  focalBlur: e.configuration.focalBlur,
6274
6274
  focalBlurStrength: e.configuration.focalBlurStrength,
@@ -6279,11 +6279,11 @@ class ec {
6279
6279
  };
6280
6280
  }
6281
6281
  static async getImage(t, e) {
6282
- const A = e.region || await Rt(t, k.Image, e.src);
6282
+ const A = e.region || await Rt(t, N.Image, e.src);
6283
6283
  return {
6284
6284
  id: b(),
6285
6285
  src: e.src,
6286
- type: k.Image,
6286
+ type: N.Image,
6287
6287
  y: A.top,
6288
6288
  x: A.left,
6289
6289
  rotation: A.rotation,
@@ -6303,13 +6303,13 @@ class ec {
6303
6303
  }, r = (n == null ? void 0 : n.text) || A.defaultText || "", c = A.replaceableText ? A.replaceableText.replace("{{}}", r) : r, l = Ce(c, {
6304
6304
  vertical: A.vertical,
6305
6305
  uppercase: A.uppercase
6306
- }), g = e.region || await Rt(t, k.Textbox, a, {
6306
+ }), g = e.region || await Rt(t, N.Textbox, a, {
6307
6307
  text: l,
6308
6308
  fontScale: A.size ? A.size / s.unitsPerEm : void 0
6309
6309
  }), d = Zt(
6310
6310
  {
6311
6311
  id: b(),
6312
- type: k.Textbox,
6312
+ type: N.Textbox,
6313
6313
  x: g.left,
6314
6314
  y: g.top,
6315
6315
  width: g.width,
@@ -6369,13 +6369,13 @@ class ec {
6369
6369
  </svg>
6370
6370
  `, a = {};
6371
6371
  a["spiff-fill-shape"] = { browserValue: e.color };
6372
- const n = e.region || await Rt(t, k.Illustration), s = b();
6372
+ const n = e.region || await Rt(t, N.Illustration), s = b();
6373
6373
  return {
6374
6374
  stepRegion: e.region,
6375
6375
  colors: a,
6376
6376
  id: s,
6377
6377
  svg: A,
6378
- type: k.Illustration,
6378
+ type: N.Illustration,
6379
6379
  y: n.top,
6380
6380
  x: n.left,
6381
6381
  rotation: n.rotation,
@@ -6387,7 +6387,7 @@ class ec {
6387
6387
  };
6388
6388
  }
6389
6389
  static async getIllustration(t, e) {
6390
- const A = e.region || await Rt(t, k.Illustration, e.src), a = await gt(await Sa(e.src)), n = await jt(a.svg), s = b();
6390
+ const A = e.region || await Rt(t, N.Illustration, e.src), a = await gt(await Sa(e.src)), n = await jt(a.svg), s = b();
6391
6391
  return {
6392
6392
  cachedObjectURL: n,
6393
6393
  stepRegion: e.region,
@@ -6395,7 +6395,7 @@ class ec {
6395
6395
  id: s,
6396
6396
  src: e.src,
6397
6397
  svg: a.svg,
6398
- type: k.Illustration,
6398
+ type: N.Illustration,
6399
6399
  y: A.top,
6400
6400
  x: A.left,
6401
6401
  rotation: A.rotation,
@@ -6456,7 +6456,7 @@ const J = (i, t) => Z(i, t).elements.find((a) => a.id === i), Z = (i, t) => {
6456
6456
  }
6457
6457
  for (const a in i.layouts) {
6458
6458
  const n = i.layouts[a].elements.filter(
6459
- (o) => o.type === k.Illustration
6459
+ (o) => o.type === N.Illustration
6460
6460
  );
6461
6461
  for (let o = 0; o < n.length; ++o) {
6462
6462
  const r = n[o];
@@ -6468,7 +6468,7 @@ const J = (i, t) => Z(i, t).elements.find((a) => a.id === i), Z = (i, t) => {
6468
6468
  }
6469
6469
  }
6470
6470
  const s = i.layouts[a].elements.filter(
6471
- (o) => o.type === k.Textbox
6471
+ (o) => o.type === N.Textbox
6472
6472
  );
6473
6473
  for (let o = 0; o < s.length; ++o) {
6474
6474
  const r = s[o];
@@ -7101,7 +7101,7 @@ class UA {
7101
7101
  throw new Be(this.configuration, "Couldn't find an asset for product overlay step");
7102
7102
  }
7103
7103
  const o = this.evaluateAssetType();
7104
- if (o === k.Image) {
7104
+ if (o === N.Image) {
7105
7105
  const d = this.configuration.type === M.SilentIllustration ? (c = this.configuration.data.asset) == null ? void 0 : c.fileLink : (l = this.product) == null ? void 0 : l.overlayImageUrl;
7106
7106
  if (!d)
7107
7107
  throw new Error("Undefined raster silent step source");
@@ -7185,7 +7185,7 @@ class UA {
7185
7185
  evaluateAssetType() {
7186
7186
  var e, A, a;
7187
7187
  const t = this.configuration.type === M.ProductOverlay && ((e = this.product) != null && e.overlayImageUrl) ? this.product.overlayImageUrl.toLowerCase() : (a = (A = this.configuration.data.asset) == null ? void 0 : A.fileLink) == null ? void 0 : a.toLowerCase().split("?")[0];
7188
- return t != null && t.startsWith("data:image/png") || t != null && t.endsWith(".jpeg") || t != null && t.endsWith(".jpg") || t != null && t.endsWith(".png") ? k.Image : (t != null && t.endsWith(".svg") || t != null && t.startsWith("image/svg+xml"), k.Illustration);
7188
+ return t != null && t.startsWith("data:image/png") || t != null && t.endsWith(".jpeg") || t != null && t.endsWith(".jpg") || t != null && t.endsWith(".png") ? N.Image : (t != null && t.endsWith(".svg") || t != null && t.startsWith("image/svg+xml"), N.Illustration);
7189
7189
  }
7190
7190
  }
7191
7191
  const _n = async (i) => {
@@ -7303,7 +7303,7 @@ class ts {
7303
7303
  stepName: a,
7304
7304
  id: c.id,
7305
7305
  src: o,
7306
- type: k.Image,
7306
+ type: N.Image,
7307
7307
  y: l.top,
7308
7308
  x: l.left,
7309
7309
  width: l.width,
@@ -7471,7 +7471,7 @@ class es {
7471
7471
  return new j(
7472
7472
  {
7473
7473
  id: t,
7474
- type: k.Frame,
7474
+ type: N.Frame,
7475
7475
  x: e.left,
7476
7476
  y: e.top,
7477
7477
  width: e.width,
@@ -7721,7 +7721,7 @@ class As {
7721
7721
  src: a.src,
7722
7722
  svg: a.svg.svg,
7723
7723
  cachedObjectURL: a.objectURL,
7724
- type: k.Illustration,
7724
+ type: N.Illustration,
7725
7725
  y: e.top,
7726
7726
  x: e.left,
7727
7727
  rotation: e.rotation,
@@ -8096,7 +8096,7 @@ class is {
8096
8096
  };
8097
8097
  }
8098
8098
  }
8099
- const Na = new is();
8099
+ const ka = new is();
8100
8100
  class ns {
8101
8101
  async init(t, e, A) {
8102
8102
  if (A)
@@ -8144,7 +8144,7 @@ class ns {
8144
8144
  colors: {},
8145
8145
  id: h,
8146
8146
  svg: g,
8147
- type: k.Illustration,
8147
+ type: N.Illustration,
8148
8148
  y: d.top,
8149
8149
  x: d.left,
8150
8150
  rotation: d.rotation,
@@ -8209,7 +8209,7 @@ class ns {
8209
8209
  return a(""), !0;
8210
8210
  }
8211
8211
  }
8212
- const ka = new ns();
8212
+ const Na = new ns();
8213
8213
  class ss {
8214
8214
  async init(t, e, A) {
8215
8215
  const a = t.option;
@@ -8271,7 +8271,7 @@ class ss {
8271
8271
  stepRegion: g,
8272
8272
  id: h,
8273
8273
  src: s,
8274
- type: k.Image,
8274
+ type: N.Image,
8275
8275
  y: g.top,
8276
8276
  x: g.left,
8277
8277
  rotation: g.rotation,
@@ -8502,7 +8502,7 @@ class rs {
8502
8502
  colors: u,
8503
8503
  id: E,
8504
8504
  svg: w,
8505
- type: k.Illustration,
8505
+ type: N.Illustration,
8506
8506
  y: B.top,
8507
8507
  x: B.left,
8508
8508
  rotation: B.rotation,
@@ -8594,13 +8594,13 @@ const ls = new cs(), Ge = (i, t, e, A, a) => {
8594
8594
  return [n, s] = Ge(e, A, i, d, o), [a.size, n, s];
8595
8595
  }
8596
8596
  const c = 6;
8597
- let l = c - ke;
8597
+ let l = c - Ne;
8598
8598
  if (A.length > 0) {
8599
8599
  let d = A, B = 0;
8600
8600
  for (; (!a.maxSize || l <= a.maxSize) && d; )
8601
- l += ke, B = l / r.unitsPerEm, [d, s] = Ge(e, A, l, B, o);
8601
+ l += Ne, B = l / r.unitsPerEm, [d, s] = Ge(e, A, l, B, o);
8602
8602
  }
8603
- l > c && (l -= ke), a.minSize && l < a.minSize && (l = a.minSize);
8603
+ l > c && (l -= Ne), a.minSize && l < a.minSize && (l = a.minSize);
8604
8604
  const g = l / r.unitsPerEm;
8605
8605
  return [n, s] = Ge(e, A, l, g, o), [l, n, s];
8606
8606
  }, Te = 30;
@@ -8618,7 +8618,7 @@ class ue extends Error {
8618
8618
  }
8619
8619
  class ds {
8620
8620
  constructor() {
8621
- this.cachedColors = /* @__PURE__ */ new Map(), this.filterUnsupportedCharacters = (t, e) => {
8621
+ this.cachedColors = /* @__PURE__ */ new Map(), this.cachedStrokeColors = /* @__PURE__ */ new Map(), this.filterUnsupportedCharacters = (t, e) => {
8622
8622
  let A = t.replace(
8623
8623
  /(\r\n|\r|(\u2665|\u00a9|\u00ae|[\u2000-\u2017]|[\u201E-\u3300]]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]))/gm,
8624
8624
  ""
@@ -8793,7 +8793,7 @@ class ds {
8793
8793
  */
8794
8794
  availableStrokeColors(t) {
8795
8795
  var a;
8796
- const e = this.cachedColors.get(t.stepName);
8796
+ const e = this.cachedStrokeColors.get(t.stepName);
8797
8797
  if (e)
8798
8798
  return e;
8799
8799
  const A = t.data.strokeOption;
@@ -8803,7 +8803,7 @@ class ds {
8803
8803
  stroke: s.color,
8804
8804
  variant: s
8805
8805
  }))) || [];
8806
- return this.cachedColors.set(t.stepName, n), n;
8806
+ return this.cachedStrokeColors.set(t.stepName, n), n;
8807
8807
  }
8808
8808
  return [];
8809
8809
  }
@@ -9065,7 +9065,7 @@ class ds {
9065
9065
  rotation: g.rotation,
9066
9066
  text: r,
9067
9067
  input: o,
9068
- type: k.Textbox,
9068
+ type: N.Textbox,
9069
9069
  vertical: A.vertical,
9070
9070
  x: g.left,
9071
9071
  y: g.top,
@@ -11089,7 +11089,7 @@ const Fs = I`
11089
11089
  }
11090
11090
  }
11091
11091
  }
11092
- `, Ns = (i) => I`
11092
+ `, ks = (i) => I`
11093
11093
  ${Me(i)}
11094
11094
  mutation DuplicateBundle(
11095
11095
  $id: String!
@@ -11120,7 +11120,7 @@ const Fs = I`
11120
11120
  }
11121
11121
  }
11122
11122
  }
11123
- `, ks = I`
11123
+ `, Ns = I`
11124
11124
  mutation UpdateBundle($id: String!, $name: String, $metadata: [MetadataInput!], $bundleStateData: String) {
11125
11125
  bundleUpdate(id: $id, name: $name, metadata: $metadata, bundleStateData: $bundleStateData) {
11126
11126
  id
@@ -11850,13 +11850,13 @@ class $s {
11850
11850
  );
11851
11851
  break;
11852
11852
  case M.Model:
11853
- A.push(Na.init(r, this, this.reloadedState));
11853
+ A.push(ka.init(r, this, this.reloadedState));
11854
11854
  break;
11855
11855
  case M.Module:
11856
11856
  this.stepSpecificServices[r.stepName] = {
11857
11857
  module: await Ja(r.data.module)
11858
11858
  }, A.push(
11859
- ka.init(r, this, this.reloadedState)
11859
+ Na.init(r, this, this.reloadedState)
11860
11860
  );
11861
11861
  break;
11862
11862
  case M.Picture:
@@ -12225,7 +12225,7 @@ class eo extends At {
12225
12225
  super(t, e, A);
12226
12226
  }
12227
12227
  selectVariant(t) {
12228
- return Na.selectVariant(
12228
+ return ka.selectVariant(
12229
12229
  this.step,
12230
12230
  t.getResource(),
12231
12231
  this.manager,
@@ -12594,7 +12594,7 @@ class ro extends At {
12594
12594
  return ((t = this.manager.getStepStorage(this.step.stepName)) == null ? void 0 : t.text) || "";
12595
12595
  }
12596
12596
  setText(t) {
12597
- ka.changeText(this.step, t, this.manager, "", (e) => {
12597
+ Na.changeText(this.step, t, this.manager, "", (e) => {
12598
12598
  if (e)
12599
12599
  this.manager.setInformationResults([
12600
12600
  ...this.manager.getInformationResults(),
@@ -12819,7 +12819,7 @@ const go = async (i) => {
12819
12819
  return a;
12820
12820
  }, za = (i, t, e, A, a, n, s, o) => {
12821
12821
  var h, C;
12822
- const r = t.basePrice || 0, c = i.priceModifierTotal || 0, l = ho(A, e, void 0, n), d = (N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(i.id), B = {
12822
+ const r = t.basePrice || 0, c = i.priceModifierTotal || 0, l = ho(A, e, void 0, n), d = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(i.id), B = {
12823
12823
  additionalExternalProductId: (h = i.integrationProduct) == null ? void 0 : h.additionalExternalProductId,
12824
12824
  additionalExternalVariantId: (C = i.integrationProduct) == null ? void 0 : C.additionalExternalVariantId,
12825
12825
  baseCost: r,
@@ -12848,7 +12848,7 @@ const go = async (i) => {
12848
12848
  if (c !== void 0)
12849
12849
  return c;
12850
12850
  await i.outstandingRequestsPromise();
12851
- const x = (N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(a.id), P = await y.getShadowGraphqlClient().query({
12851
+ const x = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(a.id), P = await y.getShadowGraphqlClient().query({
12852
12852
  query: Ca,
12853
12853
  variables: { ids: [a.id] },
12854
12854
  fetchPolicy: "no-cache",
@@ -13037,7 +13037,7 @@ class uo {
13037
13037
  */
13038
13038
  async getSavedDesigns() {
13039
13039
  if (this.storageMethod === "Local") {
13040
- const t = N.get(this.localPersistenceKey);
13040
+ const t = k.get(this.localPersistenceKey);
13041
13041
  return t ? JSON.parse(t) : [];
13042
13042
  }
13043
13043
  throw new O("Unexpected storage method requested");
@@ -13077,7 +13077,7 @@ class uo {
13077
13077
  }
13078
13078
  async setDesigns(t) {
13079
13079
  if (this.storageMethod === "Local") {
13080
- N.set(this.localPersistenceKey, JSON.stringify(t));
13080
+ k.set(this.localPersistenceKey, JSON.stringify(t));
13081
13081
  return;
13082
13082
  }
13083
13083
  throw new O("Unexpected storage method requested");
@@ -13350,7 +13350,7 @@ class fo {
13350
13350
  }
13351
13351
  async assignCustomerDetails(t) {
13352
13352
  var s, o, r;
13353
- const A = (N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(this.getWorkflowManager().getTransaction().id), n = (r = (o = (s = (await y.getShadowGraphqlClient().mutate({
13353
+ const A = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(this.getWorkflowManager().getTransaction().id), n = (r = (o = (s = (await y.getShadowGraphqlClient().mutate({
13354
13354
  mutation: Eo,
13355
13355
  variables: {
13356
13356
  id: this.getWorkflowManager().getTransaction().id,
@@ -13368,8 +13368,8 @@ class fo {
13368
13368
  );
13369
13369
  if (n != null && n.customer) {
13370
13370
  this.getWorkflowManager().setTransactionCustomer(n.customer);
13371
- const c = N.getMap("transactionCustomerIds") || /* @__PURE__ */ new Map();
13372
- c.set(this.getWorkflowManager().getTransaction().id, n.customer.id), N.setMap("transactionCustomerIds", c);
13371
+ const c = k.getMap("transactionCustomerIds") || /* @__PURE__ */ new Map();
13372
+ c.set(this.getWorkflowManager().getTransaction().id, n.customer.id), k.setMap("transactionCustomerIds", c);
13373
13373
  }
13374
13374
  }
13375
13375
  attachRenderableSceneListener(t) {
@@ -13481,7 +13481,7 @@ class fo {
13481
13481
  "QuantityChanged"
13482
13482
  /* QuantityChanged */
13483
13483
  ), this.checkForPriceBreakChanges();
13484
- const e = N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), A = this.getWorkflowManager().getTransaction(), a = e.get(A.id) || void 0;
13484
+ const e = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), A = this.getWorkflowManager().getTransaction(), a = e.get(A.id) || void 0;
13485
13485
  await y.getShadowGraphqlClient().mutate({
13486
13486
  mutation: on,
13487
13487
  variables: {
@@ -13532,7 +13532,7 @@ const Qo = [
13532
13532
  {
13533
13533
  id: C,
13534
13534
  src: l,
13535
- type: k.Image,
13535
+ type: N.Image,
13536
13536
  y: B.top,
13537
13537
  x: B.left,
13538
13538
  width: B.width,
@@ -13572,7 +13572,7 @@ const Qo = [
13572
13572
  {
13573
13573
  id: d,
13574
13574
  path: g.path,
13575
- type: k.Frame,
13575
+ type: N.Frame,
13576
13576
  forceImageCover: A.data.forceImageCover,
13577
13577
  x: c.left,
13578
13578
  y: c.top,
@@ -13656,7 +13656,7 @@ const Qo = [
13656
13656
  colors: C,
13657
13657
  id: S,
13658
13658
  svg: u,
13659
- type: k.Illustration,
13659
+ type: N.Illustration,
13660
13660
  y: D.top,
13661
13661
  x: D.left,
13662
13662
  rotation: D.rotation,
@@ -13685,7 +13685,7 @@ const Qo = [
13685
13685
  colors: {},
13686
13686
  id: l,
13687
13687
  svg: o,
13688
- type: k.Illustration,
13688
+ type: N.Illustration,
13689
13689
  y: r.top,
13690
13690
  x: r.left,
13691
13691
  rotation: r.rotation,
@@ -13727,7 +13727,7 @@ const Qo = [
13727
13727
  {
13728
13728
  id: h,
13729
13729
  src: o,
13730
- type: k.Image,
13730
+ type: N.Image,
13731
13731
  y: d.top,
13732
13732
  x: d.left,
13733
13733
  rotation: d.rotation,
@@ -13785,7 +13785,7 @@ const Qo = [
13785
13785
  colors: h,
13786
13786
  id: C,
13787
13787
  svg: d,
13788
- type: k.Illustration,
13788
+ type: N.Illustration,
13789
13789
  y: l.top,
13790
13790
  x: l.left,
13791
13791
  rotation: l.rotation,
@@ -13807,7 +13807,7 @@ const Qo = [
13807
13807
  const A = [], n = (() => {
13808
13808
  var c, l;
13809
13809
  return t.type === M.ProductOverlay ? e || ((c = t.data.asset) == null ? void 0 : c.fileLink) || "" : ((l = t.data.asset) == null ? void 0 : l.fileLink) || "";
13810
- })(), o = (() => n.endsWith(".jpeg") || n.endsWith(".jpg") || n.endsWith(".png") ? k.Image : (n.endsWith(".svg"), k.Illustration))(), r = t.data.regions;
13810
+ })(), o = (() => n.endsWith(".jpeg") || n.endsWith(".jpg") || n.endsWith(".png") ? N.Image : (n.endsWith(".svg"), N.Illustration))(), r = t.data.regions;
13811
13811
  if (o === "image")
13812
13812
  try {
13813
13813
  r.forEach((c) => {
@@ -13920,7 +13920,7 @@ const Qo = [
13920
13920
  paths: A.data.paths,
13921
13921
  rotation: w.rotation,
13922
13922
  text: d,
13923
- type: k.Textbox,
13923
+ type: N.Textbox,
13924
13924
  vertical: A.data.vertical,
13925
13925
  verticalAlign: A.data.verticalAlign || "middle",
13926
13926
  width: w.width,
@@ -14042,14 +14042,14 @@ class vo {
14042
14042
  return this.layouts;
14043
14043
  }
14044
14044
  }
14045
- const No = () => new Promise((i, t) => {
14045
+ const ko = () => new Promise((i, t) => {
14046
14046
  try {
14047
14047
  const A = lt().getContext("webgl2");
14048
14048
  i(!!A);
14049
14049
  } catch {
14050
14050
  i(!1);
14051
14051
  }
14052
- }), ko = No();
14052
+ }), No = ko();
14053
14053
  class bo {
14054
14054
  constructor(t, e, A, a) {
14055
14055
  this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new Ea(2), this.id = t, this.name = e, this.service = A, this.panelSize = a;
@@ -14109,7 +14109,7 @@ class bo {
14109
14109
  new Ro(
14110
14110
  this.getID(),
14111
14111
  A,
14112
- await ko,
14112
+ await No,
14113
14113
  () => {
14114
14114
  this.markLastCompletedStaticRender(), this.setStaticContextDirty(!0);
14115
14115
  },
@@ -15259,7 +15259,7 @@ class Le {
15259
15259
  throw new Error(
15260
15260
  "Unable to add transaction to bundle - Already Exists: " + A.filter((o) => !!o).map((o) => o == null ? void 0 : o.getWorkflowManager().getTransaction().id).join(", ")
15261
15261
  );
15262
- const a = N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), n = e.map((o) => a.get(o));
15262
+ const a = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), n = e.map((o) => a.get(o));
15263
15263
  await y.getShadowGraphqlClient().mutate({
15264
15264
  mutation: Rs,
15265
15265
  variables: {
@@ -15289,7 +15289,7 @@ class Le {
15289
15289
  (o) => o.getWorkflowManager().getTransaction().id === A
15290
15290
  ))
15291
15291
  throw new Error("Unable to add transaction to bundle - Already Exists!");
15292
- const s = (N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(A);
15292
+ const s = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(A);
15293
15293
  await y.getShadowGraphqlClient().mutate({
15294
15294
  mutation: bs,
15295
15295
  variables: {
@@ -15637,7 +15637,7 @@ class Le {
15637
15637
  async updateBundle() {
15638
15638
  var e;
15639
15639
  if (!((e = (await y.getShadowGraphqlClient().mutate({
15640
- mutation: ks,
15640
+ mutation: Ns,
15641
15641
  variables: {
15642
15642
  id: this.id,
15643
15643
  name: this.name,
@@ -16111,7 +16111,7 @@ class Cc {
16111
16111
  } catch (A) {
16112
16112
  throw console.error(A), new rt("Critical - Unable to synchronize workflow state with server.");
16113
16113
  }
16114
- }, this.options = t, this.options.applicationKey && Ii(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.7.1"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16114
+ }, this.options = t, this.options.applicationKey && Ii(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.7.2"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16115
16115
  }
16116
16116
  configure(t) {
16117
16117
  ut.setHubUrl(t.hubUrl), ut.setServerUrl(t.serverUrl), ut.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && yi(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
@@ -16156,12 +16156,12 @@ class Cc {
16156
16156
  */
16157
16157
  async authenticateBundleFromLocalStorage(t) {
16158
16158
  var a, n;
16159
- const e = N.getMap("bundleOwnerIds");
16159
+ const e = k.getMap("bundleOwnerIds");
16160
16160
  if (e != null && e.has(t))
16161
16161
  return Promise.resolve({ success: !0, stakeholderType: ge.Owner });
16162
- const A = N.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16162
+ const A = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16163
16163
  if (A.has(t)) {
16164
- const s = A.get(t), r = (N.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map()).get(s);
16164
+ const s = A.get(t), r = (k.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map()).get(s);
16165
16165
  if (r && await this.authenticateCustomerId(r)) {
16166
16166
  const l = (n = (a = this.customer) == null ? void 0 : a.bundleStakeholders) == null ? void 0 : n.find(
16167
16167
  (g) => {
@@ -16205,10 +16205,10 @@ class Cc {
16205
16205
  throw new Error(`Unable to read transaction: ${t}`);
16206
16206
  if (a.isOrdered)
16207
16207
  return Promise.resolve({ success: !1, transactionReadOnly: !0 });
16208
- const s = N.getMap("transactionOwnerIds");
16208
+ const s = k.getMap("transactionOwnerIds");
16209
16209
  if (s != null && s.has(t))
16210
16210
  return Promise.resolve({ success: !0, stakeholderType: ge.Owner });
16211
- const o = N.getMap("transactionCustomerIds");
16211
+ const o = k.getMap("transactionCustomerIds");
16212
16212
  if (o != null && o.has(t)) {
16213
16213
  const w = o.get(t);
16214
16214
  if (w && await this.authenticateCustomerId(w)) {
@@ -16249,8 +16249,8 @@ class Cc {
16249
16249
  this.customer = void 0;
16250
16250
  }
16251
16251
  clearCustomerForTransaction(t) {
16252
- const e = N.getMap("transactionCustomerIds");
16253
- e != null && e.has(t) && (e.delete(t), N.setMap("transactionCustomerIds", e));
16252
+ const e = k.getMap("transactionCustomerIds");
16253
+ e != null && e.has(t) && (e.delete(t), k.setMap("transactionCustomerIds", e));
16254
16254
  }
16255
16255
  async customerHasBundleTemplates(t) {
16256
16256
  const a = (await y.getShadowGraphqlClient().query({
@@ -16315,7 +16315,7 @@ class Cc {
16315
16315
  }
16316
16316
  async authenticateCustomerId(t) {
16317
16317
  var o;
16318
- const e = y.getShadowGraphqlClient(), A = N.getMap("customerTokens");
16318
+ const e = y.getShadowGraphqlClient(), A = k.getMap("customerTokens");
16319
16319
  if (!(A != null && A.has(t)))
16320
16320
  return !1;
16321
16321
  const a = A.get(t);
@@ -16363,8 +16363,8 @@ class Cc {
16363
16363
  if (a != null && a.loginToken) {
16364
16364
  if (!((s = a.partner) != null && s.id))
16365
16365
  throw new Error(`Unable to find customer: ${t}`);
16366
- const o = N.getMap("customerTokens") || /* @__PURE__ */ new Map();
16367
- return o.set(a.id, a.loginToken), N.setMap("customerTokens", o), this.storeCustomer(a), SA(a.loginToken), this.customer = {
16366
+ const o = k.getMap("customerTokens") || /* @__PURE__ */ new Map();
16367
+ return o.set(a.id, a.loginToken), k.setMap("customerTokens", o), this.storeCustomer(a), SA(a.loginToken), this.customer = {
16368
16368
  ...a,
16369
16369
  loginToken: void 0
16370
16370
  }, !0;
@@ -16400,10 +16400,10 @@ class Cc {
16400
16400
  })).data) == null ? void 0 : g.bundleCreate;
16401
16401
  if (!(n != null && n.id))
16402
16402
  throw new Error("Unable to create bundle");
16403
- const s = N.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16404
- s.set(n.id, n.partner.id), N.setMap("bundlePartnerIds", s);
16405
- const o = N.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16406
- o.set(n.id, n.bundleOwnerId), N.setMap("bundleOwnerIds", o);
16403
+ const s = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16404
+ s.set(n.id, n.partner.id), k.setMap("bundlePartnerIds", s);
16405
+ const o = k.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16406
+ o.set(n.id, n.bundleOwnerId), k.setMap("bundleOwnerIds", o);
16407
16407
  const r = new Le(this, n, void 0, void 0, n.bundleOwnerId, {
16408
16408
  eagerFetchProducts: (B = (d = A == null ? void 0 : A.graphql) == null ? void 0 : d.productCollection) == null ? void 0 : B.eagerFetchProducts
16409
16409
  });
@@ -16418,7 +16418,7 @@ class Cc {
16418
16418
  */
16419
16419
  async getExistingBundle(t, e, A, a) {
16420
16420
  var w, u, E, m, f, Q, p, D, F, S, x;
16421
- const n = N.getMap("bundleOwnerIds"), s = n == null ? void 0 : n.get(t), r = ((w = Object.entries(localStorage).find(([Y, P]) => Y.startsWith("CognitoIdentityServiceProvider") && Y.endsWith("idToken"))) == null ? void 0 : w[0]) || "", c = localStorage.getItem(r), l = {};
16421
+ const n = k.getMap("bundleOwnerIds"), s = n == null ? void 0 : n.get(t), r = ((w = Object.entries(localStorage).find(([Y, P]) => Y.startsWith("CognitoIdentityServiceProvider") && Y.endsWith("idToken"))) == null ? void 0 : w[0]) || "", c = localStorage.getItem(r), l = {};
16422
16422
  c && !Ee(c) && (l.Authorization = `Bearer ${c}`);
16423
16423
  const g = {
16424
16424
  bundleOwnerId: s,
@@ -16436,8 +16436,8 @@ class Cc {
16436
16436
  });
16437
16437
  if (!((f = d.data) != null && f.bundles) || ((Q = d.data) == null ? void 0 : Q.bundles.length) === 0 || !((p = d.data) != null && p.bundles[0]))
16438
16438
  throw new Error(`Unable to find bundle: ${t}`);
16439
- const B = (D = d.data) == null ? void 0 : D.bundles[0], h = N.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16440
- h.set(B.id, B.partner.id), N.setMap("bundlePartnerIds", h);
16439
+ const B = (D = d.data) == null ? void 0 : D.bundles[0], h = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16440
+ h.set(B.id, B.partner.id), k.setMap("bundlePartnerIds", h);
16441
16441
  const C = new Le(this, B, e, A, s, {
16442
16442
  additionalHeaders: (F = a == null ? void 0 : a.graphql) == null ? void 0 : F.additionalHeaders,
16443
16443
  eagerFetchProducts: (x = (S = a == null ? void 0 : a.graphql) == null ? void 0 : S.productCollection) == null ? void 0 : x.eagerFetchProducts,
@@ -16453,14 +16453,14 @@ class Cc {
16453
16453
  */
16454
16454
  async duplicateBundle(t, e, A, a) {
16455
16455
  var w, u, E, m, f, Q, p, D;
16456
- const n = (w = N.getMap("bundleOwnerIds")) == null ? void 0 : w.get(t), o = ((u = Object.entries(localStorage).find(([F, S]) => F.startsWith("CognitoIdentityServiceProvider") && F.endsWith("idToken"))) == null ? void 0 : u[0]) || "", r = localStorage.getItem(o), c = {};
16456
+ const n = (w = k.getMap("bundleOwnerIds")) == null ? void 0 : w.get(t), o = ((u = Object.entries(localStorage).find(([F, S]) => F.startsWith("CognitoIdentityServiceProvider") && F.endsWith("idToken"))) == null ? void 0 : u[0]) || "", r = localStorage.getItem(o), c = {};
16457
16457
  r && !Ee(r) && (c.Authorization = `Bearer ${r}`);
16458
16458
  const l = {
16459
16459
  bundleOwnerId: n,
16460
16460
  ...c,
16461
16461
  ...(E = a == null ? void 0 : a.graphql) == null ? void 0 : E.additionalHeaders
16462
16462
  }, d = (Q = (await y.getShadowGraphqlClient().mutate({
16463
- mutation: Ns(((f = (m = a == null ? void 0 : a.graphql) == null ? void 0 : m.productCollection) == null ? void 0 : f.eagerFetchProducts) || !1),
16463
+ mutation: ks(((f = (m = a == null ? void 0 : a.graphql) == null ? void 0 : m.productCollection) == null ? void 0 : f.eagerFetchProducts) || !1),
16464
16464
  variables: {
16465
16465
  id: t,
16466
16466
  template: e,
@@ -16475,10 +16475,10 @@ class Cc {
16475
16475
  })).data) == null ? void 0 : Q.bundleDuplicate;
16476
16476
  if (!(d != null && d.id))
16477
16477
  throw new Error("Unable to duplicate bundle");
16478
- const B = N.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16479
- B.set(d.id, d.partner.id), N.setMap("bundlePartnerIds", B);
16480
- const h = N.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16481
- h.set(d.id, d.bundleOwnerId), N.setMap("bundleOwnerIds", h);
16478
+ const B = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16479
+ B.set(d.id, d.partner.id), k.setMap("bundlePartnerIds", B);
16480
+ const h = k.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16481
+ h.set(d.id, d.bundleOwnerId), k.setMap("bundleOwnerIds", h);
16482
16482
  const C = new Le(this, d, void 0, void 0, d.bundleOwnerId, {
16483
16483
  eagerFetchProducts: (D = (p = a == null ? void 0 : a.graphql) == null ? void 0 : p.productCollection) == null ? void 0 : D.eagerFetchProducts
16484
16484
  });
@@ -16524,11 +16524,11 @@ class Cc {
16524
16524
  });
16525
16525
  if (!((n = t.data) != null && n.customers) || t.data.customers.length === 0)
16526
16526
  throw new Error("Unable to find customer.");
16527
- const A = t.data.customers[0].bundleStakeholders || [], a = N.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16527
+ const A = t.data.customers[0].bundleStakeholders || [], a = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16528
16528
  return A.forEach((s) => {
16529
16529
  var o, r;
16530
16530
  (o = s.bundle) != null && o.id && ((r = s.bundle.partner) != null && r.id) && a.set(s.bundle.id, s.bundle.partner.id);
16531
- }), N.setMap("bundlePartnerIds", a), A;
16531
+ }), k.setMap("bundlePartnerIds", a), A;
16532
16532
  }
16533
16533
  /**
16534
16534
  * Creates a new instance of WorkflowExperience. A high level wrapper for workflows.
@@ -16613,7 +16613,7 @@ class Cc {
16613
16613
  ), c = IA(o, 10), l = IA(r, 10), g = (await Promise.all([
16614
16614
  ...c.map(a),
16615
16615
  ...l.map(n)
16616
- ])).flat(), d = [...new Set(g.map((Q) => Q.workflowId))], B = await Wa(d, e), h = new Map(B.map((Q) => [Q.id, Q])), C = N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), w = g.map(async (Q) => {
16616
+ ])).flat(), d = [...new Set(g.map((Q) => Q.workflowId))], B = await Wa(d, e), h = new Map(B.map((Q) => [Q.id, Q])), C = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), w = g.map(async (Q) => {
16617
16617
  var V;
16618
16618
  const { transaction: p, workflowId: D, readOnly: F, index: S } = Q, x = h.get(D), Y = t[S];
16619
16619
  !C.get(p.id) && p.transactionOwnerId && C.set(p.id, p.transactionOwnerId);
@@ -16647,7 +16647,7 @@ class Cc {
16647
16647
  H.layouts
16648
16648
  ), H.delayWorkflowStateSync = !0, { experienceOptions: H, index: S, options: Y };
16649
16649
  }), u = await Promise.all(w);
16650
- N.setMap("transactionOwnerIds", C);
16650
+ k.setMap("transactionOwnerIds", C);
16651
16651
  const m = u.sort((Q, p) => Q.index - p.index).map(async (Q) => {
16652
16652
  const { experienceOptions: p, options: D } = Q, F = new fo(this, p);
16653
16653
  return await F.getWorkflowManager().getInitializationPromise(), D.type !== "transaction" && this.customer && await F.attachCustomerDetails({ email: this.customer.emailAddress }), F;
@@ -16655,8 +16655,8 @@ class Cc {
16655
16655
  return f.forEach((Q) => Q.getWorkflowManager().setWorkflowStateSyncEnabled(!0)), f;
16656
16656
  }
16657
16657
  storeCustomer(t) {
16658
- const e = N.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map();
16659
- e.set(t.partner.id, t.id), N.setMap("partnerCustomerIds", e);
16658
+ const e = k.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map();
16659
+ e.set(t.partner.id, t.id), k.setMap("partnerCustomerIds", e);
16660
16660
  }
16661
16661
  async getIntegrationProductById(t) {
16662
16662
  var n, s;
@@ -16691,7 +16691,7 @@ class Cc {
16691
16691
  return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
16692
16692
  }
16693
16693
  async getShareActionsForTransaction(t) {
16694
- const A = (N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(t) || void 0, a = await y.getShadowGraphqlClient().query({
16694
+ const A = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(t) || void 0, a = await y.getShadowGraphqlClient().query({
16695
16695
  query: cn,
16696
16696
  errorPolicy: "all",
16697
16697
  fetchPolicy: "no-cache",
@@ -17632,7 +17632,7 @@ export {
17632
17632
  OA as IntegrationProduct,
17633
17633
  ri as IntegrationType,
17634
17634
  ec as LayoutElementFactory,
17635
- k as LayoutElementType,
17635
+ N as LayoutElementType,
17636
17636
  X as LayoutNotFoundError,
17637
17637
  Jt as LayoutRenderingPurpose,
17638
17638
  to as MaterialStepHandle,
@@ -17733,21 +17733,21 @@ export {
17733
17733
  Tr as matchHexToPms,
17734
17734
  va as materialStepService,
17735
17735
  $r as mmPerPixel,
17736
- Na as modelStepService,
17737
- ka as moduleStepService,
17736
+ ka as modelStepService,
17737
+ Na as moduleStepService,
17738
17738
  Qc as nameBundle,
17739
17739
  pc as nameTransaction,
17740
17740
  $ as optionService,
17741
17741
  tc as outlineFontsInSvg,
17742
17742
  Ct as patternImageDataCache,
17743
- N as persistenceService,
17743
+ k as persistenceService,
17744
17744
  ba as pictureStepService,
17745
17745
  Gr as pmsToRgb,
17746
17746
  Ra as questionStepService,
17747
17747
  Hr as registerFetchImplementation,
17748
17748
  Rr as registerWindowImplementation,
17749
17749
  bA as rehydrateSerializedLayout,
17750
- Ni as rgbToPms,
17750
+ ki as rgbToPms,
17751
17751
  Ae as rotateAroundPoint,
17752
17752
  oA as sanitizeSvgTree,
17753
17753
  yi as setBearerAuthenticationToken,