@spiffcommerce/core 34.0.1 → 34.0.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
@@ -6,7 +6,7 @@ import { removeTypenameFromVariables as Di } from "@apollo/client/link/remove-ty
6
6
  import { orientation as ki } from "exifr/dist/mini.umd.cjs";
7
7
  import { parse as yn } from "css";
8
8
  import Mi from "fuse.js";
9
- import { Pith as va } from "pith";
9
+ import { Pith as Ea } from "pith";
10
10
  import Et from "lodash.clonedeep";
11
11
  import jt from "lodash.isequal";
12
12
  import { jsx as P, jsxs as ct, Fragment as Gt } from "preact/jsx-runtime";
@@ -16,7 +16,7 @@ import { dataUriToBuffer as Ni } from "data-uri-to-buffer";
16
16
  import { toString as Sn } from "qrcode";
17
17
  import { split as ca } from "unicode-default-word-boundary";
18
18
  import Qi from "svg-path-bbox";
19
- import La from "lodash.chunk";
19
+ import da from "lodash.chunk";
20
20
  import { CognitoIdentityProviderClient as Ri, InitiateAuthCommand as Va, RespondToAuthChallengeCommand as Oi } from "@aws-sdk/client-cognito-identity-provider";
21
21
  import $i from "dinero.js";
22
22
  import * as za from "currency-codes";
@@ -24,7 +24,7 @@ import vn from "lodash.debounce";
24
24
  import "fs";
25
25
  import "path";
26
26
  import Ui from "lodash.omit";
27
- var Ee = /* @__PURE__ */ ((n) => (n.Data = "Data", n.Font = "Font", n.Frame = "Frame", n.Illustration = "Illustration", n.Image = "Image", n.Model = "Model", n.Material = "Material", n.Color = "Color", n.QuestionnaireCollateral = "QuestionnaireCollateral", n.RequestCollateral = "RequestCollateral", n.SignupCollateral = "SignupCollateral", n.Video = "Video", n.ColorProfile = "ColorProfile", n.Environment = "Environment", n))(Ee || {}), En = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(En || {}), z = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(z || {}), b = /* @__PURE__ */ ((n) => (n.Information = "Information", n.Bulk = "Bulk", n.DigitalContent = "DigitalContent", n.Finish = "Finish", n.Frame = "Frame", n.Illustration = "Illustration", n.Introduction = "Introduction", n.Material = "Material", n.Model = "Model", n.Module = "Module", n.Picture = "Picture", n.Photo = "Photo", n.ProductOverlay = "ProductOverlay", n.Question = "Question", n.Shape = "Shape", n.SilentIllustration = "SilentIllustration", n.Text = "Text", n))(b || {}), Li = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Li || {}), Yt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Yt || {}), F = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(F || {}), Vi = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Vi || {}), bn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(bn || {}), zi = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(zi || {}), Gi = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(Gi || {}), Ea = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(Ea || {}), Wi = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Wi || {}), be = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(be || {}), kt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(kt || {}), j = /* @__PURE__ */ ((n) => (n[n.North = 0] = "North", n[n.Northeast = 1] = "Northeast", n[n.East = 2] = "East", n[n.Southeast = 3] = "Southeast", n[n.South = 4] = "South", n[n.Southwest = 5] = "Southwest", n[n.West = 6] = "West", n[n.Northwest = 7] = "Northwest", n))(j || {}), qi = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(qi || {});
27
+ var Ee = /* @__PURE__ */ ((n) => (n.Data = "Data", n.Font = "Font", n.Frame = "Frame", n.Illustration = "Illustration", n.Image = "Image", n.Model = "Model", n.Material = "Material", n.Color = "Color", n.QuestionnaireCollateral = "QuestionnaireCollateral", n.RequestCollateral = "RequestCollateral", n.SignupCollateral = "SignupCollateral", n.Video = "Video", n.ColorProfile = "ColorProfile", n.Environment = "Environment", n))(Ee || {}), En = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(En || {}), z = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(z || {}), b = /* @__PURE__ */ ((n) => (n.Information = "Information", n.Bulk = "Bulk", n.DigitalContent = "DigitalContent", n.Finish = "Finish", n.Frame = "Frame", n.Illustration = "Illustration", n.Introduction = "Introduction", n.Material = "Material", n.Model = "Model", n.Module = "Module", n.Picture = "Picture", n.Photo = "Photo", n.ProductOverlay = "ProductOverlay", n.Question = "Question", n.Shape = "Shape", n.SilentIllustration = "SilentIllustration", n.Text = "Text", n))(b || {}), Li = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Li || {}), Yt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Yt || {}), F = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(F || {}), Vi = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Vi || {}), bn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(bn || {}), zi = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(zi || {}), Gi = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(Gi || {}), ba = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(ba || {}), Wi = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Wi || {}), be = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(be || {}), kt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(kt || {}), j = /* @__PURE__ */ ((n) => (n[n.North = 0] = "North", n[n.Northeast = 1] = "Northeast", n[n.East = 2] = "East", n[n.Southeast = 3] = "Southeast", n[n.South = 4] = "South", n[n.Southwest = 5] = "Southwest", n[n.West = 6] = "West", n[n.Northwest = 7] = "Northwest", n))(j || {}), qi = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(qi || {});
28
28
  class In extends Error {
29
29
  constructor(t) {
30
30
  super(t), this.name = this.constructor.name;
@@ -162,27 +162,27 @@ class Yi {
162
162
  }
163
163
  }
164
164
  const pt = new Yi();
165
- let da, Aa;
165
+ let Aa, ua;
166
166
  function nd(n) {
167
- da = n;
167
+ Aa = n;
168
168
  }
169
169
  function id(n) {
170
- Aa = n;
170
+ ua = n;
171
171
  }
172
172
  function te() {
173
- return da ? new da().window : (console.log(
173
+ return Aa ? new Aa().window : (console.log(
174
174
  "DOM constructor is not registered. Assuming browser environment. If not, please register DOM constructor before calling this function."
175
175
  ), window);
176
176
  }
177
177
  function nt(n, t) {
178
- if (!Aa) {
178
+ if (!ua) {
179
179
  if (typeof window < "u" && window.fetch)
180
180
  return window.fetch(n, t);
181
181
  if (typeof global < "u" && global.fetch)
182
182
  return global.fetch(n, t);
183
183
  throw new Error("Fetch implementation is not registered. Please register it before calling this function.");
184
184
  }
185
- return Aa(n, t);
185
+ return ua(n, t);
186
186
  }
187
187
  const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @__PURE__ */ new Map(), Pn = async (n) => {
188
188
  const t = Wa.get(n);
@@ -269,7 +269,7 @@ const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @_
269
269
  }, tr = async (n) => {
270
270
  const t = Oe(n), e = new Uint8Array(n), a = Zi(e), i = btoa(a);
271
271
  return `data:${t};base64,${i}`;
272
- }, ba = (n) => `data:image/svg+xml;base64,${btoa(n)}`, Fn = (n) => {
272
+ }, Ia = (n) => `data:image/svg+xml;base64,${btoa(n)}`, Fn = (n) => {
273
273
  const t = n.replace(/\r?\n/g, ""), e = t.indexOf(",");
274
274
  if (e === -1 || e <= 4)
275
275
  throw new TypeError("malformed data: URI");
@@ -288,10 +288,10 @@ const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @_
288
288
  !r || !r.result ? e() : t(r.result.toString());
289
289
  }, a.readAsDataURL(n);
290
290
  });
291
- let ar, Ia;
291
+ let ar, Ba;
292
292
  const nr = (n) => {
293
- Ia = n;
294
- }, ir = () => Ia;
293
+ Ba = n;
294
+ }, ir = () => Ba;
295
295
  let Dn;
296
296
  const rr = (n) => {
297
297
  Dn = n;
@@ -302,7 +302,7 @@ const rr = (n) => {
302
302
  window.parent !== window && (window.addEventListener("message", e, !1), window.parent.postMessage("ready", t));
303
303
  }), sr = async () => {
304
304
  const n = {
305
- applicationKey: Ia,
305
+ applicationKey: Ba,
306
306
  customerToken: ar,
307
307
  bearer: Dn
308
308
  };
@@ -365,10 +365,10 @@ class cr {
365
365
  }
366
366
  }
367
367
  const y = new cr();
368
- let ua, ha;
368
+ let ha, ga;
369
369
  const ft = (n, t, e) => {
370
- if (ua !== void 0)
371
- return ua(n, t, e);
370
+ if (ha !== void 0)
371
+ return ha(n, t, e);
372
372
  try {
373
373
  const a = Mn(!0);
374
374
  return kn(a), a.createCanvas(n, t, e);
@@ -376,8 +376,8 @@ const ft = (n, t, e) => {
376
376
  throw new Error("Canvas module not set");
377
377
  }
378
378
  }, ee = (n, t) => {
379
- if (ha !== void 0)
380
- return ha(n, t);
379
+ if (ga !== void 0)
380
+ return ga(n, t);
381
381
  try {
382
382
  const e = Mn(!0);
383
383
  return kn(e), e.loadImage(n, t);
@@ -386,7 +386,7 @@ const ft = (n, t, e) => {
386
386
  }
387
387
  };
388
388
  function kn(n) {
389
- ua = n?.createCanvas, ha = n?.loadImage;
389
+ ha = n?.createCanvas, ga = n?.loadImage;
390
390
  }
391
391
  function Mn(n) {
392
392
  try {
@@ -408,7 +408,7 @@ function Mn(n) {
408
408
  }
409
409
  }
410
410
  let Ye;
411
- function Ba() {
411
+ function Pa() {
412
412
  return Ye === void 0 && (Ye = _i()), Ye;
413
413
  }
414
414
  let ce = null;
@@ -3253,7 +3253,7 @@ const de = (n) => {
3253
3253
  } catch {
3254
3254
  return n.classList.contains(t.substring(1));
3255
3255
  }
3256
- }, Pa = (n, t = !1) => {
3256
+ }, xa = (n, t = !1) => {
3257
3257
  !t && n.setAttribute("preserveAspectRatio", "none");
3258
3258
  const e = [];
3259
3259
  Dt(n, (a) => {
@@ -3336,12 +3336,12 @@ const de = (n) => {
3336
3336
  }
3337
3337
  });
3338
3338
  });
3339
- }, On = (n) => It().serializeToString(n), xa = (n, t, e, a, i) => {
3339
+ }, On = (n) => It().serializeToString(n), Fa = (n, t, e, a, i) => {
3340
3340
  const r = Qn(n);
3341
3341
  if (!r)
3342
3342
  throw new Error("Failed to read SVG.");
3343
3343
  return vr(r, t, e), Rn(r, a, i), On(r);
3344
- }, Fa = (n, t, e) => {
3344
+ }, Da = (n, t, e) => {
3345
3345
  const a = Qn(n);
3346
3346
  if (!a)
3347
3347
  throw new Error("Failed to read SVG.");
@@ -3353,7 +3353,7 @@ const de = (n) => {
3353
3353
  const e = Er(n).firstElementChild;
3354
3354
  if (!e)
3355
3355
  throw new Error("Failed to read SVG.");
3356
- Pa(e);
3356
+ xa(e);
3357
3357
  const a = {};
3358
3358
  Dt(e, (o) => {
3359
3359
  if (Cr.includes(o.tagName) && !o.attributes.getNamedItem("fill")) {
@@ -3445,7 +3445,7 @@ const de = (n) => {
3445
3445
  ...AssetFields
3446
3446
  }
3447
3447
  }
3448
- `, Da = C`
3448
+ `, ka = C`
3449
3449
  fragment MaterialFields on Material {
3450
3450
  id
3451
3451
  name
@@ -3493,7 +3493,7 @@ const de = (n) => {
3493
3493
  }
3494
3494
  }
3495
3495
  `, Br = C`
3496
- ${Da}
3496
+ ${ka}
3497
3497
  query GetMaterials($ids: [String]) {
3498
3498
  materials(id: $ids) {
3499
3499
  ...MaterialFields
@@ -3877,7 +3877,7 @@ const _t = new Mr(), $n = C`
3877
3877
  }
3878
3878
  `, Tr = C`
3879
3879
  ${ae(!1)}
3880
- ${Da}
3880
+ ${ka}
3881
3881
  ${$n}
3882
3882
  query GetOptions($ids: [String]!) {
3883
3883
  options(ids: $ids) {
@@ -4561,7 +4561,7 @@ const Y = new Or(), Un = C`
4561
4561
  }
4562
4562
  `, ao = (n) => C`
4563
4563
  ${ae(n)}
4564
- ${Da}
4564
+ ${ka}
4565
4565
  ${$n}
4566
4566
  ${Xr}
4567
4567
  ${Zr}
@@ -5314,7 +5314,7 @@ const M = () => {
5314
5314
  ...E,
5315
5315
  _renderingConfiguration: a,
5316
5316
  mask: l ? `url(#viewmask-${f})` : void 0
5317
- })), v = Ma(x);
5317
+ })), v = Ta(x);
5318
5318
  return /* @__PURE__ */ ct(
5319
5319
  "svg",
5320
5320
  {
@@ -5493,7 +5493,7 @@ const M = () => {
5493
5493
  }
5494
5494
  ) });
5495
5495
  }, jn = (n) => {
5496
- const t = `spiff-group-clip-${n.id}`, e = n.rotation || 0, a = Ct(e), i = Math.cos(a), r = -Math.sin(a), o = Ma(n.children);
5496
+ const t = `spiff-group-clip-${n.id}`, e = n.rotation || 0, a = Ct(e), i = Math.cos(a), r = -Math.sin(a), o = Ta(n.children);
5497
5497
  return /* @__PURE__ */ ct(Gt, { children: [
5498
5498
  /* @__PURE__ */ P("defs", { children: /* @__PURE__ */ P("clipPath", { id: t, preserveAspectRatio: "none", children: n.clipPath ? /* @__PURE__ */ P("path", { d: n.clipPath }) : /* @__PURE__ */ P("rect", { x: 0, y: 0, width: n.width, height: n.height }) }) }),
5499
5499
  /* @__PURE__ */ ct(
@@ -5528,8 +5528,8 @@ const M = () => {
5528
5528
  if (!n.pattern)
5529
5529
  return "";
5530
5530
  if (n.pattern.svg) {
5531
- const A = Fa(n.pattern.svg, n.pattern.colors || {}, !1);
5532
- return ba(A);
5531
+ const A = Da(n.pattern.svg, n.pattern.colors || {}, !1);
5532
+ return Ia(A);
5533
5533
  }
5534
5534
  return n.pattern.src;
5535
5535
  };
@@ -5673,23 +5673,23 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
5673
5673
  } catch {
5674
5674
  if (wo(n)) {
5675
5675
  const a = Fn(n), i = la(a);
5676
- return ga(n, i), i;
5676
+ return ma(n, i), i;
5677
5677
  } else {
5678
5678
  const a = await Re(n, !0), i = la(a);
5679
- return ga(n, i), await Xi(i, n), i;
5679
+ return ma(n, i), await Xi(i, n), i;
5680
5680
  }
5681
5681
  }
5682
5682
  })();
5683
5683
  return Ke.set(n, e), e;
5684
5684
  }, yo = (n) => {
5685
5685
  const t = Fn(n), e = la(t);
5686
- return ga(n, e), e;
5686
+ return ma(n, e), e;
5687
5687
  }, wt = (n) => {
5688
5688
  const t = Yn.get(n);
5689
5689
  if (t)
5690
5690
  return t;
5691
5691
  throw new Error("Font metrics unavailable for font");
5692
- }, ga = (n, t) => {
5692
+ }, ma = (n, t) => {
5693
5693
  const e = new Co(t);
5694
5694
  return Yn.set(n, e), e;
5695
5695
  }, Sd = async (n) => {
@@ -6011,7 +6011,7 @@ const Po = (n) => {
6011
6011
  {
6012
6012
  transform: r,
6013
6013
  dangerouslySetInnerHTML: {
6014
- __html: xa(
6014
+ __html: Fa(
6015
6015
  n.svg,
6016
6016
  n.width,
6017
6017
  n.height,
@@ -6087,7 +6087,7 @@ class ko {
6087
6087
  layout: t,
6088
6088
  elements: e
6089
6089
  },
6090
- getComponentWithProps: (a) => ka(t, e, a)
6090
+ getComponentWithProps: (a) => Ma(t, e, a)
6091
6091
  };
6092
6092
  }
6093
6093
  initialize(t, e) {
@@ -6112,7 +6112,7 @@ class ko {
6112
6112
  return { ...t, transaction: e.apply(a) };
6113
6113
  }
6114
6114
  }
6115
- const Zn = (n) => n.type === F.Image ? /* @__PURE__ */ P(Hn, { ...n }, n.id) : n.type === F.Frame ? /* @__PURE__ */ P(fo, { ...n }, n.id) : n.type === F.Illustration ? /* @__PURE__ */ P(Do, { ...n }, n.id) : n.type === F.Textbox ? /* @__PURE__ */ P(Po, { ...n }, n.id) : n.type === F.Group ? /* @__PURE__ */ P(jn, { ...n }, n.id) : null, ka = (n, t, e) => {
6115
+ const Zn = (n) => n.type === F.Image ? /* @__PURE__ */ P(Hn, { ...n }, n.id) : n.type === F.Frame ? /* @__PURE__ */ P(fo, { ...n }, n.id) : n.type === F.Illustration ? /* @__PURE__ */ P(Do, { ...n }, n.id) : n.type === F.Textbox ? /* @__PURE__ */ P(Po, { ...n }, n.id) : n.type === F.Group ? /* @__PURE__ */ P(jn, { ...n }, n.id) : null, Ma = (n, t, e) => {
6116
6116
  const a = e.renderingConfiguration, i = a?.removeExcludedElements ? t.filter((r) => !r.excludeFromExport) : t;
6117
6117
  return /* @__PURE__ */ P(
6118
6118
  po,
@@ -6143,7 +6143,7 @@ const Zn = (n) => n.type === F.Image ? /* @__PURE__ */ P(Hn, { ...n }, n.id) : n
6143
6143
  }
6144
6144
  );
6145
6145
  };
6146
- function Ma(n) {
6146
+ function Ta(n) {
6147
6147
  return n.sort((t, e) => {
6148
6148
  const a = t.layer || 0, i = e.layer || 0;
6149
6149
  if (a < i) return -1;
@@ -6163,10 +6163,10 @@ const re = (n) => {
6163
6163
  }, ht = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), Xe = /* @__PURE__ */ new Map(), ti = async (n, t) => {
6164
6164
  if (!t) {
6165
6165
  if (!n) throw new Error("No region or src supplied. Cannot construct frame!");
6166
- return ma(n);
6166
+ return pa(n);
6167
6167
  }
6168
6168
  return at(t);
6169
- }, ma = (n) => {
6169
+ }, pa = (n) => {
6170
6170
  const t = n.width, e = n.height;
6171
6171
  return `<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 ${t} ${e}'>
6172
6172
  <path id="target-path" d='M0 0 h ${t} v ${e} h ${-t} Z' />
@@ -6220,7 +6220,7 @@ const re = (n) => {
6220
6220
  throw new Error("Malformed frame SVG");
6221
6221
  })();
6222
6222
  return Xe.set(n, e), e;
6223
- }, Ta = (n, t, e, a) => {
6223
+ }, Na = (n, t, e, a) => {
6224
6224
  const i = t.width / t.height, r = n.width / n.height;
6225
6225
  let o;
6226
6226
  a ? r > i ? o = t.height / n.height : o = t.width / n.width : r > i ? o = t.width / n.width : o = t.height / n.height, e?.scale !== void 0 && (o *= e?.scale);
@@ -6230,7 +6230,7 @@ const re = (n) => {
6230
6230
  y: u,
6231
6231
  zoom: o
6232
6232
  };
6233
- }, pa = async (n) => {
6233
+ }, fa = async (n) => {
6234
6234
  if (ht.has(n))
6235
6235
  return ht.get(n);
6236
6236
  if (n.startsWith("data:image/svg+xml")) {
@@ -6243,7 +6243,7 @@ const re = (n) => {
6243
6243
  return ht.set(n, r), r;
6244
6244
  }
6245
6245
  if ((n.split(".").pop()?.toLowerCase() ?? "") === "svg") {
6246
- const e = await Na(n), a = e.width, i = e.height, r = {
6246
+ const e = await Qa(n), a = e.width, i = e.height, r = {
6247
6247
  src: n,
6248
6248
  width: a,
6249
6249
  height: i,
@@ -6259,7 +6259,7 @@ const re = (n) => {
6259
6259
  };
6260
6260
  return ht.set(n, i), i;
6261
6261
  }
6262
- }, Na = async (n) => {
6262
+ }, Qa = async (n) => {
6263
6263
  const t = await at(n);
6264
6264
  return ei(t);
6265
6265
  }, Xa = (n) => n.endsWith("mm") ? Number(n.replace("mm", "")) * 3.7795275591 : n.endsWith("px") ? Number(n.replace("px", "")) : Number(n), ei = (n) => {
@@ -6298,12 +6298,12 @@ const re = (n) => {
6298
6298
  const o = dt().parseFromString(n, "image/svg+xml").firstElementChild;
6299
6299
  if (!o)
6300
6300
  throw new Error("Failed to read SVG");
6301
- const l = It().serializeToString(o), c = ft(), d = c.getContext("2d"), A = await va.from(d, l, {
6301
+ const l = It().serializeToString(o), c = ft(), d = c.getContext("2d"), A = await Ea.from(d, l, {
6302
6302
  anonymousCrossOrigin: !0,
6303
6303
  ignoreDimensions: !1,
6304
6304
  createCanvas: ft,
6305
6305
  createImage: ee,
6306
- DOMParser: Ba(),
6306
+ DOMParser: Pa(),
6307
6307
  fetch: nt
6308
6308
  }), u = o.getAttribute("width"), h = o.getAttribute("height"), g = 2048;
6309
6309
  if (h && u) {
@@ -6513,7 +6513,7 @@ const V = (n, t) => X(n, t).elements.find((i) => i.id === n), X = (n, t) => {
6513
6513
  throw new G();
6514
6514
  return e;
6515
6515
  }, Z = (n, t) => {
6516
- const e = [...t.elements.filter((i) => i.id !== n.id), n], a = Ma(e);
6516
+ const e = [...t.elements.filter((i) => i.id !== n.id), n], a = Ta(e);
6517
6517
  return {
6518
6518
  layout: t.layout,
6519
6519
  elements: a,
@@ -6529,7 +6529,7 @@ const V = (n, t) => X(n, t).elements.find((i) => i.id === n), X = (n, t) => {
6529
6529
  const s = o;
6530
6530
  if (s.src && !s.svg) {
6531
6531
  const l = await at(s.src), c = await st(l);
6532
- s.svg = xa(
6532
+ s.svg = Fa(
6533
6533
  c.svg,
6534
6534
  s.width,
6535
6535
  s.height,
@@ -7010,7 +7010,7 @@ class ea extends O {
7010
7010
  };
7011
7011
  }
7012
7012
  }
7013
- class fa extends O {
7013
+ class Ca extends O {
7014
7014
  constructor(t, e, a) {
7015
7015
  super(), this.id = t, this.className = e, this.fill = a;
7016
7016
  }
@@ -7414,7 +7414,7 @@ class De {
7414
7414
  constructor() {
7415
7415
  this.frameSourceSvg = async (t, e) => {
7416
7416
  if (!t)
7417
- return ma(e);
7417
+ return pa(e);
7418
7418
  const a = t.asset;
7419
7419
  if (!a)
7420
7420
  throw new bt(t);
@@ -7467,7 +7467,7 @@ class De {
7467
7467
  regionIndex: c.stepRegionIndex
7468
7468
  }));
7469
7469
  if (!t.option || (t.option.variants || []).length === 0) {
7470
- const c = t.data.regions.map((d) => ma(d));
7470
+ const c = t.data.regions.map((d) => pa(d));
7471
7471
  e.updateStorage(t.stepName, {
7472
7472
  currentFrameSources: c
7473
7473
  });
@@ -7586,7 +7586,7 @@ class De {
7586
7586
  }
7587
7587
  async loadPatternFromString(t, e, a = !0, i = void 0, r) {
7588
7588
  if (t.endsWith("svg")) {
7589
- const o = await Na(t), s = o.width, l = o.height, c = await at(t);
7589
+ const o = await Qa(t), s = o.width, l = o.height, c = await at(t);
7590
7590
  if (r) {
7591
7591
  const u = c.match(/<(image|linearGradient|radialGradient)(\s|>|\/>)/gim);
7592
7592
  if (u && u.length > 0)
@@ -7689,7 +7689,7 @@ class De {
7689
7689
  r && r(!0);
7690
7690
  const c = t.data.initialZoomLevel, d = await Promise.all(
7691
7691
  t.data.regions.map(async (h, g) => {
7692
- const m = await Ve(l[g]), p = s.getImageData(), f = a.map((I) => new Nt(I.id)), S = p ? Ta(
7692
+ const m = await Ve(l[g]), p = s.getImageData(), f = a.map((I) => new Nt(I.id)), S = p ? Na(
7693
7693
  p,
7694
7694
  m,
7695
7695
  c && !t.data.forceImageCover ? { scale: c } : void 0,
@@ -7891,10 +7891,10 @@ class zo {
7891
7891
  spotColor: A.spotColor,
7892
7892
  pmsValue: A.pmsValue
7893
7893
  };
7894
- const s = xa(t, e, a, o), l = await Xt(s), c = [];
7894
+ const s = Fa(t, e, a, o), l = await Xt(s), c = [];
7895
7895
  for (const d of i) {
7896
7896
  for (const [A, u] of r.entries())
7897
- c.push(new fa(d, A, u));
7897
+ c.push(new Ca(d, A, u));
7898
7898
  c.push(new Uo(d, s, l));
7899
7899
  }
7900
7900
  return new $(c);
@@ -8474,7 +8474,7 @@ class Yo {
8474
8474
  const i = a.getLayouts(), o = (a.getRegionElements(e.stepName) || []).map((s) => {
8475
8475
  const l = s.region;
8476
8476
  if (!i.find((d) => d.panelId === l?.panelId)) throw new J(l);
8477
- return new fa(s.id, this.shapeFillId, t);
8477
+ return new Ca(s.id, this.shapeFillId, t);
8478
8478
  }).filter((s) => !!s);
8479
8479
  a.getCommandDispatcher()(new $(o)), a.updateStorage(e.stepName, { colour: t });
8480
8480
  }
@@ -8544,7 +8544,7 @@ class Yo {
8544
8544
  if (!r.find((g) => g.panelId === A?.panelId))
8545
8545
  throw new J(A);
8546
8546
  const h = s();
8547
- return new fa(d.id, this.shapeFillId, h);
8547
+ return new Ca(d.id, this.shapeFillId, h);
8548
8548
  }, c = a.map(l).filter((d) => !!d);
8549
8549
  return {
8550
8550
  command: new $(c),
@@ -8748,7 +8748,7 @@ class Xo {
8748
8748
  if (a)
8749
8749
  await this.reload(t, e, a);
8750
8750
  else {
8751
- const r = this.getDefaultImageFillVariant(t.data), o = r?.asset?.fileLink, s = o ? await pa(o) : void 0, l = s ? {
8751
+ const r = this.getDefaultImageFillVariant(t.data), o = r?.asset?.fileLink, s = o ? await fa(o) : void 0, l = s ? {
8752
8752
  src: s.src,
8753
8753
  height: s.height,
8754
8754
  width: s.width,
@@ -8855,7 +8855,7 @@ class Xo {
8855
8855
  const a = e.variants?.map((i) => i.asset?.fileLink)?.filter((i) => !!i) || [];
8856
8856
  return Promise.all(
8857
8857
  a.map(async (i) => {
8858
- const r = await pa(i);
8858
+ const r = await fa(i);
8859
8859
  return {
8860
8860
  src: i,
8861
8861
  width: r.width,
@@ -9567,7 +9567,7 @@ const ls = [
9567
9567
  return console.error(h), [];
9568
9568
  }
9569
9569
  }, ds = async (n, t, e, a) => {
9570
- const i = e.data, r = i.assetUrl, o = await pa(r);
9570
+ const i = e.data, r = i.assetUrl, o = await fa(r);
9571
9571
  try {
9572
9572
  const s = Mo(i, a.option);
9573
9573
  s && (t[a.stepName] = { selectedVariants: [s] });
@@ -9575,7 +9575,7 @@ const ls = [
9575
9575
  const d = await ti(c, s?.asset?.fileLink), A = await Ve(d), u = M(), h = n.find((m) => m.panelId === c.panelId);
9576
9576
  if (!h)
9577
9577
  throw new J(c);
9578
- const g = Ta(
9578
+ const g = Na(
9579
9579
  o,
9580
9580
  A,
9581
9581
  {
@@ -9639,7 +9639,7 @@ const ls = [
9639
9639
  const l = await at(s, !0), c = /<svg.*?<\/svg>/s, d = l.match(c) || [], A = d?.length > 0 ? d[0] : "", g = dt().parseFromString(A, "image/svg+xml").firstElementChild;
9640
9640
  if (!g)
9641
9641
  return console.error("Failed to read SVG."), [];
9642
- Pa(g);
9642
+ xa(g);
9643
9643
  const m = {};
9644
9644
  Dt(g, (v) => {
9645
9645
  ls.includes(v.tagName) && !v.attributes.getNamedItem("fill") && v.setAttribute("fill", "#000000");
@@ -9853,7 +9853,7 @@ const ls = [
9853
9853
  const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], g = h?.length > 0 ? h[0] : "", f = dt().parseFromString(g, "image/svg+xml").firstElementChild;
9854
9854
  if (!f)
9855
9855
  throw new Pt("Failed to read SVG.");
9856
- return Pa(f), It().serializeToString(f);
9856
+ return xa(f), It().serializeToString(f);
9857
9857
  };
9858
9858
  l.forEach((A) => {
9859
9859
  const u = n.find((g) => g.panelId === A.panelId);
@@ -10189,12 +10189,12 @@ class Es extends Wn {
10189
10189
  l = p.width, c = p.height;
10190
10190
  } else
10191
10191
  l = r.width, c = r.height;
10192
- const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = ka(t.layoutState.layout, e, {
10192
+ const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = Ma(t.layoutState.layout, e, {
10193
10193
  renderingConfiguration: {
10194
10194
  purpose: Yt.ThreeD,
10195
10195
  templatingContext: d
10196
10196
  }
10197
- }), u = xn(A), h = await va.from(this.ctx, u, {
10197
+ }), u = xn(A), h = await Ea.from(this.ctx, u, {
10198
10198
  anonymousCrossOrigin: !0,
10199
10199
  ignoreDimensions: !this.nonPOTSupport,
10200
10200
  ignoreAnimation: !0,
@@ -10203,7 +10203,7 @@ class Es extends Wn {
10203
10203
  enableRedraw: !1,
10204
10204
  createCanvas: ft,
10205
10205
  createImage: ee,
10206
- DOMParser: Ba(),
10206
+ DOMParser: Pa(),
10207
10207
  fetch
10208
10208
  });
10209
10209
  h.resize(l, c), await h.render(), this.onRender();
@@ -10332,7 +10332,7 @@ const kd = (n, t) => {
10332
10332
  name
10333
10333
  }
10334
10334
  }
10335
- `, Qa = (n) => C`
10335
+ `, Ra = (n) => C`
10336
10336
  ${Ps(n)}
10337
10337
  fragment ProductCollectionProductFields on ProductCollectionProduct {
10338
10338
  id
@@ -10343,7 +10343,7 @@ const kd = (n, t) => {
10343
10343
  }
10344
10344
  }
10345
10345
  `, Ge = (n, t = !1) => C`
10346
- ${n ? Qa(t) : ""}
10346
+ ${n ? Ra(t) : ""}
10347
10347
  fragment ProductCollectionFields on ProductCollection {
10348
10348
  id
10349
10349
  name
@@ -10544,7 +10544,7 @@ const kd = (n, t) => {
10544
10544
  }
10545
10545
  }
10546
10546
  `, Ds = C`
10547
- ${Qa(!1)}
10547
+ ${Ra(!1)}
10548
10548
  query GetProductCollectionProducts($id: String!, $productIds: [String!]) {
10549
10549
  productCollections(ids: [$id], productIds: $productIds) {
10550
10550
  id
@@ -10577,7 +10577,7 @@ const kd = (n, t) => {
10577
10577
  }
10578
10578
  }
10579
10579
  `, Ms = C`
10580
- ${Qa(!0)}
10580
+ ${Ra(!0)}
10581
10581
  query GetProductCollectionForProductsFeed(
10582
10582
  $id: String!
10583
10583
  $limit: Int
@@ -11020,7 +11020,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11020
11020
  customField4: m ?? w.recipient.customField4,
11021
11021
  customField5: p ?? w.recipient.customField5,
11022
11022
  conversionConfigurationId: f || w.recipient.conversionConfigurationId
11023
- }, this.experience.callEvent(wa.RecipientChanged), await this.graphQlClient().mutate({
11023
+ }, this.experience.callEvent(ya.RecipientChanged), await this.graphQlClient().mutate({
11024
11024
  mutation: Xs,
11025
11025
  errorPolicy: "all",
11026
11026
  fetchPolicy: "no-cache",
@@ -11090,7 +11090,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11090
11090
  customField4: m,
11091
11091
  customField5: p,
11092
11092
  conversionConfigurationId: f
11093
- }, this.experience.callEvent(wa.RecipientChanged), await this.graphQlClient().mutate({
11093
+ }, this.experience.callEvent(ya.RecipientChanged), await this.graphQlClient().mutate({
11094
11094
  mutation: Zs,
11095
11095
  errorPolicy: "all",
11096
11096
  fetchPolicy: "no-cache",
@@ -11731,7 +11731,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11731
11731
  }
11732
11732
  };
11733
11733
  qt.configurationPromiseMap = /* @__PURE__ */ new Map();
11734
- let Ca = qt;
11734
+ let wa = qt;
11735
11735
  class rt {
11736
11736
  constructor(t) {
11737
11737
  this.variantData = t;
@@ -12682,19 +12682,25 @@ const pl = async (n, t) => {
12682
12682
  );
12683
12683
  const a = await (async () => {
12684
12684
  const o = y.getShadowGraphqlClient(), s = await Promise.all(
12685
- n.map(async (c) => ({
12686
- id: c.transaction.id,
12687
- hash: await c.workflowManager.getStateHash()
12685
+ n.map(async (A) => ({
12686
+ id: A.transaction.id,
12687
+ hash: await A.workflowManager.getStateHash()
12688
12688
  }))
12689
- ), l = await o.query({
12690
- query: jr,
12691
- variables: {
12692
- transactions: s
12693
- },
12694
- fetchPolicy: "no-cache",
12695
- errorPolicy: "all"
12696
- });
12697
- return l.errors && l.errors.length > 0 ? s.map((c) => c.id) : l.data?.transactionConfirmWorkflowStates ?? [];
12689
+ ), c = da(s, 100), d = [];
12690
+ for (const A of c) {
12691
+ const u = await o.query({
12692
+ query: jr,
12693
+ variables: {
12694
+ items: A
12695
+ },
12696
+ fetchPolicy: "no-cache",
12697
+ errorPolicy: "all"
12698
+ });
12699
+ if (u.errors && u.errors.length > 0)
12700
+ return s.map((h) => h.id);
12701
+ d.push(...u.data?.transactionConfirmWorkflowStates ?? []);
12702
+ }
12703
+ return d;
12698
12704
  })(), i = await Promise.all(
12699
12705
  n.map(async (o) => await wl(
12700
12706
  o.workflowManager,
@@ -12923,7 +12929,7 @@ const ra = new yl(), Sl = C`
12923
12929
  }
12924
12930
  }
12925
12931
  `;
12926
- var wa = /* @__PURE__ */ ((n) => (n.PriceBreakChanged = "PriceBreakChanged", n.ProductChanged = "ProductChanged", n.QuantityChanged = "QuantityChanged", n.RecipientChanged = "RecipientChanged", n.SelectionChanged = "SelectionChanged", n))(wa || {});
12932
+ var ya = /* @__PURE__ */ ((n) => (n.PriceBreakChanged = "PriceBreakChanged", n.ProductChanged = "ProductChanged", n.QuantityChanged = "QuantityChanged", n.RecipientChanged = "RecipientChanged", n.SelectionChanged = "SelectionChanged", n))(ya || {});
12927
12933
  class bl {
12928
12934
  constructor(t, e) {
12929
12935
  this.cachedStepHandles = /* @__PURE__ */ new Map(), this.profanityList = [], this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = vn(async () => {
@@ -12939,7 +12945,7 @@ class bl {
12939
12945
  } catch (o) {
12940
12946
  r(o);
12941
12947
  }
12942
- }), this.client = t, this.transaction = e.transaction, this.workflow = e.workflow, this.profanityList = this.transaction.product?.profanities?.map((a) => a.word) || [], this.isReadOnly = e.transaction.isOrdered || !!e.readOnly, this.graphQlClient = e.graphQlClient, this.workflowManager = new Ca(
12948
+ }), this.client = t, this.transaction = e.transaction, this.workflow = e.workflow, this.profanityList = this.transaction.product?.profanities?.map((a) => a.word) || [], this.isReadOnly = e.transaction.isOrdered || !!e.readOnly, this.graphQlClient = e.graphQlClient, this.workflowManager = new wa(
12943
12949
  this,
12944
12950
  t,
12945
12951
  (a) => {
@@ -13108,19 +13114,19 @@ class bl {
13108
13114
  }, u = this.workflowManager.getCommandContext().getLayoutById(d.layoutState.layout.id), h = o.getContext("2d");
13109
13115
  if (!h)
13110
13116
  throw new Qe("Failed to obtain 2D context for preview image creation");
13111
- const g = this.workflowManager.getTemplatingContext(), m = ka(u.layoutState.layout, u.layoutState.elements, {
13117
+ const g = this.workflowManager.getTemplatingContext(), m = Ma(u.layoutState.layout, u.layoutState.elements, {
13112
13118
  renderingConfiguration: {
13113
13119
  purpose: Yt.Print,
13114
13120
  region: { left: A.x, top: A.y, width: A.width, height: A.height },
13115
13121
  templatingContext: g
13116
13122
  }
13117
13123
  }), p = xn(m);
13118
- await (await va.from(h, p, {
13124
+ await (await Ea.from(h, p, {
13119
13125
  anonymousCrossOrigin: !0,
13120
13126
  ignoreDimensions: !1,
13121
13127
  createCanvas: ft,
13122
13128
  createImage: ee,
13123
- DOMParser: Ba(),
13129
+ DOMParser: Pa(),
13124
13130
  fetch
13125
13131
  })).render();
13126
13132
  const S = await this.getCanvasObjectURLAsync(o);
@@ -13531,7 +13537,7 @@ class Pl {
13531
13537
  }
13532
13538
  }
13533
13539
  }
13534
- class Ra {
13540
+ class Oa {
13535
13541
  constructor(t, e) {
13536
13542
  this.bundle = t, this.property = e;
13537
13543
  }
@@ -13592,7 +13598,7 @@ class Ra {
13592
13598
  return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);
13593
13599
  }
13594
13600
  }
13595
- class xl extends Ra {
13601
+ class xl extends Oa {
13596
13602
  constructor(t, e) {
13597
13603
  super(t, e);
13598
13604
  }
@@ -13603,7 +13609,7 @@ class xl extends Ra {
13603
13609
  const t = await this.getImage();
13604
13610
  if (t?.fileLink)
13605
13611
  if (t?.fileLink.endsWith(".svg")) {
13606
- const e = await at(t?.fileLink), a = await Na(t?.fileLink), i = a.width, r = a.height, o = await st(e);
13612
+ const e = await at(t?.fileLink), a = await Qa(t?.fileLink), i = a.width, r = a.height, o = await st(e);
13607
13613
  this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.colors?.forEach((c) => {
13608
13614
  o.colors[c.key] = {
13609
13615
  browserValue: c.browserValue,
@@ -13646,7 +13652,7 @@ class xl extends Ra {
13646
13652
  ]);
13647
13653
  }
13648
13654
  async canUseBackgroundRemover() {
13649
- return this.bundle.getClient().canUseAddon(Ea.BackgroundRemover);
13655
+ return this.bundle.getClient().canUseAddon(ba.BackgroundRemover);
13650
13656
  }
13651
13657
  /**
13652
13658
  * Removes the background from an image, stores it in the state, and returns the new asset.
@@ -13684,7 +13690,7 @@ class xl extends Ra {
13684
13690
  return U.getLocalOrFromServer(t);
13685
13691
  }
13686
13692
  async getImageWithColors() {
13687
- return await this.loadImageData(), this.imageData?.svg ? ba(Fa(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
13693
+ return await this.loadImageData(), this.imageData?.svg ? Ia(Da(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
13688
13694
  }
13689
13695
  /**
13690
13696
  * Retrieves the original, unmodified image selection, if one exists.
@@ -13818,7 +13824,7 @@ class xl extends Ra {
13818
13824
  );
13819
13825
  }
13820
13826
  }
13821
- class Fl extends Ra {
13827
+ class Fl extends Oa {
13822
13828
  constructor(t, e) {
13823
13829
  super(t, e);
13824
13830
  }
@@ -13857,7 +13863,7 @@ class Fl extends Ra {
13857
13863
  await Promise.all(i);
13858
13864
  }
13859
13865
  }
13860
- class gi extends Ra {
13866
+ class gi extends Oa {
13861
13867
  constructor(t, e, a) {
13862
13868
  super(t, e), this.optionResource = a;
13863
13869
  }
@@ -13981,15 +13987,15 @@ const Dl = (n, t, e, a) => n.flatMap((i) => i.getSteps()).filter((i) => i.getGlo
13981
13987
  });
13982
13988
  return Math.max(...i);
13983
13989
  };
13984
- function ya(n, t) {
13990
+ function Sa(n, t) {
13985
13991
  function e(a) {
13986
13992
  if (typeof a > "u" || !Array.isArray(a) && !Tl(a))
13987
13993
  return a;
13988
13994
  if (Array.isArray(a))
13989
- return ya(a, t);
13995
+ return Sa(a, t);
13990
13996
  let i = {};
13991
13997
  for (const [r, o] of Object.entries(a))
13992
- i[r] = Ml(o) ? o : ya(o, t);
13998
+ i[r] = Ml(o) ? o : Sa(o, t);
13993
13999
  return Ui(i, t);
13994
14000
  }
13995
14001
  return Array.isArray(n) ? n.map(e) : e(n);
@@ -14007,7 +14013,7 @@ function mi(n) {
14007
14013
  }), t;
14008
14014
  }
14009
14015
  function he(n) {
14010
- return ya(n, ["__typename"]);
14016
+ return Sa(n, ["__typename"]);
14011
14017
  }
14012
14018
  class Nl {
14013
14019
  constructor(t, e, a, i, r) {
@@ -15746,7 +15752,7 @@ class me {
15746
15752
  return this.getArtifacts().get(t);
15747
15753
  }
15748
15754
  }
15749
- class Oa {
15755
+ class $a {
15750
15756
  constructor(t) {
15751
15757
  this.value = t;
15752
15758
  }
@@ -15759,12 +15765,12 @@ class Oa {
15759
15765
  }
15760
15766
  }
15761
15767
  var Kl = /* @__PURE__ */ ((n) => (n.Transaction = "Transaction", n.Bundle = "Bundle", n.Product = "Product", n.Variant = "Variant", n.Option = "Option", n.LineItem = "LineItem", n.Asset = "Asset", n))(Kl || {});
15762
- class Qd extends Oa {
15768
+ class Qd extends $a {
15763
15769
  constructor(t) {
15764
15770
  super(`"${t}"`);
15765
15771
  }
15766
15772
  }
15767
- class fi extends Oa {
15773
+ class fi extends $a {
15768
15774
  constructor(t, e) {
15769
15775
  if (e !== "Asset" && !fi.validUUID(t))
15770
15776
  throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");
@@ -15774,7 +15780,7 @@ class fi extends Oa {
15774
15780
  return t.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
15775
15781
  }
15776
15782
  }
15777
- class Rd extends Oa {
15783
+ class Rd extends $a {
15778
15784
  constructor(t) {
15779
15785
  super(`[${t.map((e) => e.getRaw()).join(",")}]`);
15780
15786
  }
@@ -16144,7 +16150,7 @@ class Od {
16144
16150
  } catch (a) {
16145
16151
  throw console.error(a), new gt("Critical - Unable to synchronize workflow state with server.");
16146
16152
  }
16147
- }, this.options = t, this.options.applicationKey && nr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.0.1"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16153
+ }, this.options = t, this.options.applicationKey && nr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.0.2"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16148
16154
  }
16149
16155
  configure(t) {
16150
16156
  pt.setHubUrl(t.hubUrl), pt.setServerUrl(t.serverUrl), pt.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 && rr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
@@ -16604,7 +16610,7 @@ class Od {
16604
16610
  throw new gt("No options provided!");
16605
16611
  const r = t.map((B, T) => ({ option: B, index: T })), o = r.filter((B) => B.option.type === "transaction"), s = r.filter(
16606
16612
  (B) => B.option.type === "integration" || B.option.type === "external" || B.option.type === "blank"
16607
- ), l = 50, c = La(o, l), d = La(s, l);
16613
+ ), l = 50, c = da(o, l), d = da(s, l);
16608
16614
  let A = 0;
16609
16615
  const u = y.getShadowGraphqlClient(), h = async (B) => {
16610
16616
  if (B.length === 0)
@@ -16938,8 +16944,8 @@ class dc {
16938
16944
  getImageSrc() {
16939
16945
  if (this.imageData) {
16940
16946
  if (this.imageData.svg) {
16941
- const t = Fa(this.imageData.svg, this.imageData.colors || {}, !1);
16942
- return ba(t);
16947
+ const t = Da(this.imageData.svg, this.imageData.colors || {}, !1);
16948
+ return Ia(t);
16943
16949
  }
16944
16950
  return this.imageData.src;
16945
16951
  }
@@ -17076,7 +17082,7 @@ class dc {
17076
17082
  }
17077
17083
  recalculateOffsets(t) {
17078
17084
  this.frameData && ((!this.offsets || this.offsets.length !== this.frameData.length) && (this.offsets = new Array(this.frameData.length)), this.frameData.forEach((e, a) => {
17079
- this.offsets[a] = Ta(
17085
+ this.offsets[a] = Na(
17080
17086
  t,
17081
17087
  e,
17082
17088
  this.initialZoom && !this.forceImageCover ? { scale: this.initialZoom } : void 0,
@@ -17292,7 +17298,7 @@ class uc extends tt {
17292
17298
  * Returns `true` if the Background Remover is available for the current session.
17293
17299
  */
17294
17300
  async canUseBackgroundRemover() {
17295
- return this.manager.getClient().canUseAddon(Ea.BackgroundRemover);
17301
+ return this.manager.getClient().canUseAddon(ba.BackgroundRemover);
17296
17302
  }
17297
17303
  /**
17298
17304
  * Returns `true` if the Background Remover is available for the current session and if the associated frame has a user-supplied raster image.
@@ -17418,7 +17424,7 @@ const hc = C`
17418
17424
  id
17419
17425
  }
17420
17426
  }
17421
- `, $a = C`
17427
+ `, Ua = C`
17422
17428
  query GetCustomerTransactions(
17423
17429
  $id: String!
17424
17430
  $limit: Int!
@@ -17585,7 +17591,7 @@ const hc = C`
17585
17591
  },
17586
17592
  context: t
17587
17593
  }), _d = async (n, t, e) => (await y.getShadowGraphqlClient().query({
17588
- query: $a,
17594
+ query: Ua,
17589
17595
  errorPolicy: "all",
17590
17596
  fetchPolicy: "no-cache",
17591
17597
  variables: {
@@ -17605,7 +17611,7 @@ const hc = C`
17605
17611
  limit: t
17606
17612
  }
17607
17613
  }))?.data.customerTransactionsFeed?.items || [], Xd = async (n, t, e) => (await y.getShadowGraphqlClient().query({
17608
- query: $a,
17614
+ query: Ua,
17609
17615
  errorPolicy: "all",
17610
17616
  fetchPolicy: "no-cache",
17611
17617
  variables: {
@@ -17625,7 +17631,7 @@ const hc = C`
17625
17631
  limit: t
17626
17632
  }
17627
17633
  }))?.data.customerTransactionsFeed?.items || [], Zd = async (n, t, e) => (await y.getShadowGraphqlClient().query({
17628
- query: $a,
17634
+ query: Ua,
17629
17635
  errorPolicy: "all",
17630
17636
  fetchPolicy: "no-cache",
17631
17637
  variables: {
@@ -17677,7 +17683,7 @@ function vc() {
17677
17683
  for (var n; n = yi.shift(); )
17678
17684
  if (n.__P && n.__H)
17679
17685
  try {
17680
- n.__H.__h.forEach(ve), n.__H.__h.forEach(Sa), n.__H.__h = [];
17686
+ n.__H.__h.forEach(ve), n.__H.__h.forEach(va), n.__H.__h = [];
17681
17687
  } catch (t) {
17682
17688
  n.__H.__h = [], _.__e(t, n.__v);
17683
17689
  }
@@ -17689,7 +17695,7 @@ _.__b = function(n) {
17689
17695
  var t = (ot = n.__c).__H;
17690
17696
  t && (oa === ot ? (t.__h = [], ot.__h = [], t.__.forEach(function(e) {
17691
17697
  e.__N && (e.__ = e.__N), e.__V = sa, e.__N = e.i = void 0;
17692
- })) : (t.__h.forEach(ve), t.__h.forEach(Sa), t.__h = [])), oa = ot;
17698
+ })) : (t.__h.forEach(ve), t.__h.forEach(va), t.__h = [])), oa = ot;
17693
17699
  }, _.diffed = function(n) {
17694
17700
  pn && pn(n);
17695
17701
  var t = n.__c;
@@ -17700,7 +17706,7 @@ _.__b = function(n) {
17700
17706
  t.some(function(e) {
17701
17707
  try {
17702
17708
  e.__h.forEach(ve), e.__h = e.__h.filter(function(a) {
17703
- return !a.__ || Sa(a);
17709
+ return !a.__ || va(a);
17704
17710
  });
17705
17711
  } catch (a) {
17706
17712
  t.some(function(i) {
@@ -17730,7 +17736,7 @@ function ve(n) {
17730
17736
  var t = ot, e = n.__c;
17731
17737
  typeof e == "function" && (n.__c = void 0, e()), ot = t;
17732
17738
  }
17733
- function Sa(n) {
17739
+ function va(n) {
17734
17740
  var t = ot;
17735
17741
  n.__c = n.__(), ot = t;
17736
17742
  }
@@ -17756,7 +17762,7 @@ const Si = C`
17756
17762
  }
17757
17763
  missingComponentTypes
17758
17764
  }
17759
- `, Ua = C`
17765
+ `, La = C`
17760
17766
  ${Si}
17761
17767
  fragment AddressValidationJobFields on AddressValidationJob {
17762
17768
  id
@@ -17769,14 +17775,14 @@ const Si = C`
17769
17775
  }
17770
17776
  }
17771
17777
  `, bc = C`
17772
- ${Ua}
17778
+ ${La}
17773
17779
  query GetAddressValidationJobs($ids: [String!]!) {
17774
17780
  addressValidationJobs(ids: $ids) {
17775
17781
  ...AddressValidationJobFields
17776
17782
  }
17777
17783
  }
17778
17784
  `, Ic = C`
17779
- ${Ua}
17785
+ ${La}
17780
17786
  query GetRecipientsWithAddressValidationJobs($ids: [String!]!) {
17781
17787
  recipients(ids: $ids) {
17782
17788
  id
@@ -17793,7 +17799,7 @@ const Si = C`
17793
17799
  }
17794
17800
  }
17795
17801
  `, Pc = C`
17796
- ${Ua}
17802
+ ${La}
17797
17803
  mutation BatchValidateRecipientAddress($ids: [String!]!) {
17798
17804
  recipientValidateBatch(ids: $ids) {
17799
17805
  ...AddressValidationJobFields
@@ -17878,7 +17884,7 @@ const eA = async (n) => {
17878
17884
  }
17879
17885
  })).data.integrationProducts;
17880
17886
  export {
17881
- Ea as AddonHandle,
17887
+ ba as AddonHandle,
17882
17888
  Dc as AddressValidationJobStatus,
17883
17889
  Fc as AddressValidationResultConfirmationLevel,
17884
17890
  bn as AddressValidationStatus,
@@ -17913,7 +17919,7 @@ export {
17913
17919
  dc as FrameService,
17914
17920
  Ac as FrameStep,
17915
17921
  uc as FrameStepHandle,
17916
- Ra as GlobalPropertyHandle,
17922
+ Oa as GlobalPropertyHandle,
17917
17923
  $ as GroupCommand,
17918
17924
  il as IllustrationStepHandle,
17919
17925
  We as InformationMessageType,
@@ -17967,7 +17973,7 @@ export {
17967
17973
  qi as UnitOfMeasurement,
17968
17974
  Bd as UpdateImageSourceCommand,
17969
17975
  rt as Variant,
17970
- wa as WorkflowExperienceEventType,
17976
+ ya as WorkflowExperienceEventType,
17971
17977
  bl as WorkflowExperienceImpl,
17972
17978
  U as assetService,
17973
17979
  fr as browserColorToHex,
@@ -18010,7 +18016,7 @@ export {
18010
18016
  hd as getPointOfRotation,
18011
18017
  Nd as getProductCollections,
18012
18018
  pd as getSEPoint,
18013
- ka as getSvgElement,
18019
+ Ma as getSvgElement,
18014
18020
  tA as getTemplateBundles,
18015
18021
  Zd as getTemplateTransactions,
18016
18022
  $d as getTransaction,
@@ -18030,7 +18036,7 @@ export {
18030
18036
  $l as metafieldManager,
18031
18037
  wd as mmPerPixel,
18032
18038
  si as modelStepService,
18033
- Fa as modifySVGColors,
18039
+ Da as modifySVGColors,
18034
18040
  li as moduleStepService,
18035
18041
  Wd as nameBundle,
18036
18042
  qd as nameTransaction,
@@ -18047,7 +18053,7 @@ export {
18047
18053
  Za as rehydrateSerializedLayout,
18048
18054
  gr as rgbToPms,
18049
18055
  Ae as rotateAroundPoint,
18050
- Pa as sanitizeSvgTree,
18056
+ xa as sanitizeSvgTree,
18051
18057
  rr as setBearerAuthenticationToken,
18052
18058
  kn as setCanvasModule,
18053
18059
  zt as shapeStepService,
@@ -18056,7 +18062,7 @@ export {
18056
18062
  kd as stepAspectValuesToDesignInputSteps,
18057
18063
  Ya as svgColorValueToDefinition,
18058
18064
  ei as svgStringDimensions,
18059
- ba as svgToDataUrl,
18065
+ Ia as svgToDataUrl,
18060
18066
  H as textStepService,
18061
18067
  Ko as toast,
18062
18068
  nA as validateWorkflowExperienceRecipient,