@spiffcommerce/core 33.8.5-beta.e94080ea-3029-5470-9cb1-808219be0651 → 33.9.0-beta.09c79ef9-5c43-5036-b18e-8b04f98ca9b9

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,25 +6,25 @@ import { removeTypenameFromVariables as xr } from "@apollo/client/link/remove-ty
6
6
  import { orientation as kr } from "exifr/dist/mini.umd.cjs";
7
7
  import { parse as Cn } from "css";
8
8
  import Mr from "fuse.js";
9
- import { Pith as ya } from "pith";
9
+ import { Pith as Sa } from "pith";
10
10
  import bt from "lodash.clonedeep";
11
11
  import Kt from "lodash.isequal";
12
12
  import { jsx as P, jsxs as ct, Fragment as Ht } from "preact/jsx-runtime";
13
- import { parse as oa } from "opentype.js";
13
+ import { parse as sa } from "opentype.js";
14
14
  import Tr from "handlebars";
15
15
  import { dataUriToBuffer as Nr } from "data-uri-to-buffer";
16
16
  import { toString as wn } from "qrcode";
17
- import { split as sa } from "unicode-default-word-boundary";
17
+ import { split as la } from "unicode-default-word-boundary";
18
18
  import Qr from "svg-path-bbox";
19
- import $a from "lodash.chunk";
20
- import { CognitoIdentityProviderClient as Rr, InitiateAuthCommand as Ua, RespondToAuthChallengeCommand as Or } from "@aws-sdk/client-cognito-identity-provider";
19
+ import Ua from "lodash.chunk";
20
+ import { CognitoIdentityProviderClient as Rr, InitiateAuthCommand as La, RespondToAuthChallengeCommand as Or } from "@aws-sdk/client-cognito-identity-provider";
21
21
  import $r from "dinero.js";
22
- import * as La from "currency-codes";
22
+ import * as Va from "currency-codes";
23
23
  import yn from "lodash.debounce";
24
24
  import "fs";
25
25
  import "path";
26
26
  import Ur from "lodash.omit";
27
- var Pe = /* @__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))(Pe || {}), Sn = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(Sn || {}), z = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(z || {}), S = /* @__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))(S || {}), Lr = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Lr || {}), _t = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(_t || {}), x = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(x || {}), Vr = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Vr || {}), vn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(vn || {}), zr = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(zr || {}), Gr = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(Gr || {}), Sa = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(Sa || {}), Wr = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Wr || {}), Fe = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(Fe || {}), Mt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(Mt || {}), H = /* @__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))(H || {}), qr = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(qr || {});
27
+ var Pe = /* @__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))(Pe || {}), Sn = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(Sn || {}), z = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(z || {}), S = /* @__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))(S || {}), Lr = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Lr || {}), _t = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(_t || {}), x = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(x || {}), Vr = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Vr || {}), vn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(vn || {}), zr = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(zr || {}), Gr = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(Gr || {}), va = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(va || {}), Wr = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Wr || {}), Fe = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(Fe || {}), Mt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(Mt || {}), H = /* @__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))(H || {}), qr = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(qr || {});
28
28
  class En extends Error {
29
29
  constructor(t) {
30
30
  super(t), this.name = this.constructor.name;
@@ -105,7 +105,7 @@ class Hr {
105
105
  this.set(t, a);
106
106
  }
107
107
  }
108
- class Va {
108
+ class za {
109
109
  constructor() {
110
110
  this.storage = /* @__PURE__ */ new Map();
111
111
  }
@@ -130,9 +130,9 @@ class Va {
130
130
  }
131
131
  const jr = () => {
132
132
  try {
133
- return localStorage ? new Hr() : new Va();
133
+ return localStorage ? new Hr() : new za();
134
134
  } catch {
135
- return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new Va();
135
+ return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new za();
136
136
  }
137
137
  }, M = jr();
138
138
  class Yr {
@@ -162,41 +162,41 @@ class Yr {
162
162
  }
163
163
  }
164
164
  const gt = new Yr();
165
- let la, ca;
165
+ let ca, da;
166
166
  function ad(n) {
167
- la = n;
167
+ ca = n;
168
168
  }
169
169
  function nd(n) {
170
- ca = n;
170
+ da = n;
171
171
  }
172
172
  function re() {
173
- return la ? new la().window : (console.log(
173
+ return ca ? new ca().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 (!ca) {
178
+ if (!da) {
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 ca(n, t);
185
+ return da(n, t);
186
186
  }
187
- const bn = /* @__PURE__ */ new Map(), za = /* @__PURE__ */ new Map(), Ga = /* @__PURE__ */ new Map(), In = async (n) => {
188
- const t = za.get(n);
187
+ const bn = /* @__PURE__ */ new Map(), Ga = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), In = async (n) => {
188
+ const t = Ga.get(n);
189
189
  if (t) return t;
190
190
  const a = (async () => {
191
191
  const r = await nt(n);
192
192
  return bn.set(n, r.headers?.get("content-type") || ""), await r.arrayBuffer();
193
193
  })();
194
- return za.set(n, a), a;
194
+ return Ga.set(n, a), a;
195
195
  }, Jr = async (n) => {
196
- const t = Ga.get(n);
196
+ const t = Wa.get(n);
197
197
  if (t) return t;
198
198
  const a = (async () => await (await nt(n)).text())();
199
- return Ga.set(n, a), a;
199
+ return Wa.set(n, a), a;
200
200
  }, Tt = (n) => n.every((t) => t !== "undefined"), ue = (n) => Tt([typeof document]) ? document.createElement(n) : re().document.createElement(n), Kr = (n, t) => {
201
201
  if (Tt([typeof document]))
202
202
  return document.createElementNS(n, t);
@@ -231,7 +231,7 @@ const bn = /* @__PURE__ */ new Map(), za = /* @__PURE__ */ new Map(), Ga = /* @_
231
231
  return new XMLSerializer();
232
232
  const n = re();
233
233
  return new n.XMLSerializer();
234
- }, Wa = (n) => btoa(n), Le = (n) => {
234
+ }, qa = (n) => btoa(n), Le = (n) => {
235
235
  function t() {
236
236
  const a = new Uint8Array(n), r = 4;
237
237
  if (a.length >= r) {
@@ -269,7 +269,7 @@ const bn = /* @__PURE__ */ new Map(), za = /* @__PURE__ */ new Map(), Ga = /* @_
269
269
  }, ti = async (n) => {
270
270
  const t = Le(n), e = new Uint8Array(n), a = Zr(e), r = btoa(a);
271
271
  return `data:${t};base64,${r}`;
272
- }, va = (n) => `data:image/svg+xml;base64,${btoa(n)}`, Pn = (n) => {
272
+ }, Ea = (n) => `data:image/svg+xml;base64,${btoa(n)}`, Pn = (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(), za = /* @__PURE__ */ new Map(), Ga = /* @_
288
288
  !i || !i.result ? e() : t(i.result.toString());
289
289
  }, a.readAsDataURL(n);
290
290
  });
291
- let ai, Ea;
291
+ let ai, ba;
292
292
  const ni = (n) => {
293
- Ea = n;
294
- }, ri = () => Ea;
293
+ ba = n;
294
+ }, ri = () => ba;
295
295
  let Fn;
296
296
  const ii = (n) => {
297
297
  Fn = n;
@@ -302,7 +302,7 @@ const ii = (n) => {
302
302
  window.parent !== window && (window.addEventListener("message", e, !1), window.parent.postMessage("ready", t));
303
303
  }), si = async () => {
304
304
  const n = {
305
- applicationKey: Ea,
305
+ applicationKey: ba,
306
306
  customerToken: ai,
307
307
  bearer: Fn
308
308
  };
@@ -365,10 +365,10 @@ class ci {
365
365
  }
366
366
  }
367
367
  const y = new ci();
368
- let da, Aa;
368
+ let Aa, ua;
369
369
  const pt = (n, t, e) => {
370
- if (da !== void 0)
371
- return da(n, t, e);
370
+ if (Aa !== void 0)
371
+ return Aa(n, t, e);
372
372
  try {
373
373
  const a = xn(!0);
374
374
  return Dn(a), a.createCanvas(n, t, e);
@@ -376,8 +376,8 @@ const pt = (n, t, e) => {
376
376
  throw new Error("Canvas module not set");
377
377
  }
378
378
  }, ie = (n, t) => {
379
- if (Aa !== void 0)
380
- return Aa(n, t);
379
+ if (ua !== void 0)
380
+ return ua(n, t);
381
381
  try {
382
382
  const e = xn(!0);
383
383
  return Dn(e), e.loadImage(n, t);
@@ -386,7 +386,7 @@ const pt = (n, t, e) => {
386
386
  }
387
387
  };
388
388
  function Dn(n) {
389
- da = n?.createCanvas, Aa = n?.loadImage;
389
+ Aa = n?.createCanvas, ua = n?.loadImage;
390
390
  }
391
391
  function xn(n) {
392
392
  try {
@@ -408,7 +408,7 @@ function xn(n) {
408
408
  }
409
409
  }
410
410
  let He;
411
- function ba() {
411
+ function Ia() {
412
412
  return He === void 0 && (He = _r()), He;
413
413
  }
414
414
  let he = null;
@@ -3188,16 +3188,16 @@ function sd(n, t) {
3188
3188
  let $t = null;
3189
3189
  function fi(n) {
3190
3190
  if (n.startsWith("#"))
3191
- return qa(n);
3191
+ return Ha(n);
3192
3192
  if (!document)
3193
3193
  throw new Error("browserColorToHex is only supported on browsers");
3194
3194
  if ($t || ($t = document.createElement("canvas").getContext("2d")), !$t)
3195
3195
  throw new Error("Failed to create canvas context required to convert colors");
3196
3196
  $t.fillStyle = n;
3197
- const t = qa($t.fillStyle);
3197
+ const t = Ha($t.fillStyle);
3198
3198
  return t || console.error(`Unknown browser color ${n}`), t;
3199
3199
  }
3200
- function qa(n) {
3200
+ function Ha(n) {
3201
3201
  const t = n.substring(1).toUpperCase();
3202
3202
  return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
3203
3203
  }
@@ -3212,7 +3212,7 @@ const me = (n) => {
3212
3212
  return `icc-named-color(${t.slice(e + 1).slice(0, -4)}, ${n.namedColor})`;
3213
3213
  }
3214
3214
  return `icc-named-color(${n.profileName}, ${n.namedColor})`;
3215
- }, Ha = (n) => {
3215
+ }, ja = (n) => {
3216
3216
  const t = n.split(/[ ](?=[^)]*?(?:\(|$))/);
3217
3217
  if (t.length === 0)
3218
3218
  return { browserValue: "#000000" };
@@ -3234,7 +3234,7 @@ const me = (n) => {
3234
3234
  } catch {
3235
3235
  return n.classList.contains(t.substring(1));
3236
3236
  }
3237
- }, Ia = (n, t = !1) => {
3237
+ }, Ba = (n, t = !1) => {
3238
3238
  !t && n.setAttribute("preserveAspectRatio", "none");
3239
3239
  const e = [];
3240
3240
  kt(n, (a) => {
@@ -3317,12 +3317,12 @@ const me = (n) => {
3317
3317
  }
3318
3318
  });
3319
3319
  });
3320
- }, Nn = (n) => Bt().serializeToString(n), Ba = (n, t, e, a, r) => {
3320
+ }, Nn = (n) => Bt().serializeToString(n), Pa = (n, t, e, a, r) => {
3321
3321
  const i = Mn(n);
3322
3322
  if (!i)
3323
3323
  throw new Error("Failed to read SVG.");
3324
3324
  return Si(i, t, e), Tn(i, a, r), Nn(i);
3325
- }, Pa = (n, t, e) => {
3325
+ }, Fa = (n, t, e) => {
3326
3326
  const a = Mn(n);
3327
3327
  if (!a)
3328
3328
  throw new Error("Failed to read SVG.");
@@ -3334,17 +3334,17 @@ const me = (n) => {
3334
3334
  const e = vi(n).firstElementChild;
3335
3335
  if (!e)
3336
3336
  throw new Error("Failed to read SVG.");
3337
- Ia(e);
3337
+ Ba(e);
3338
3338
  const a = {};
3339
3339
  kt(e, (o) => {
3340
3340
  const s = o.attributes.getNamedItem("fill");
3341
3341
  if (s && s.value !== "none" && !s.value.startsWith("url(")) {
3342
- const c = Ha(s.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
3342
+ const c = ja(s.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
3343
3343
  o.setAttribute("fill", c.browserValue), o.classList.add(A), a[d] = c;
3344
3344
  }
3345
3345
  const l = o.attributes.getNamedItem("stroke");
3346
3346
  if (l && l.value !== "none" && !l.value.startsWith("url(")) {
3347
- const c = Ha(l.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-stroke-${d}`;
3347
+ const c = ja(l.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-stroke-${d}`;
3348
3348
  o.classList.add(A), o.setAttribute("stroke", c.browserValue), a[d] = c;
3349
3349
  }
3350
3350
  });
@@ -3410,7 +3410,7 @@ const me = (n) => {
3410
3410
  ...AssetFields
3411
3411
  }
3412
3412
  }
3413
- `, Fa = C`
3413
+ `, Da = C`
3414
3414
  fragment MaterialFields on Material {
3415
3415
  id
3416
3416
  name
@@ -3458,7 +3458,7 @@ const me = (n) => {
3458
3458
  }
3459
3459
  }
3460
3460
  `, Ii = C`
3461
- ${Fa}
3461
+ ${Da}
3462
3462
  query GetMaterials($ids: [String]) {
3463
3463
  materials(id: $ids) {
3464
3464
  ...MaterialFields
@@ -3736,7 +3736,7 @@ const Ut = "persistentAssets", lt = class lt {
3736
3736
  };
3737
3737
  lt.callbacks = [];
3738
3738
  let At = lt;
3739
- const ja = "bgrmPersistentAssets";
3739
+ const Ya = "bgrmPersistentAssets";
3740
3740
  class K {
3741
3741
  static has(t) {
3742
3742
  return K.getMap().has(t);
@@ -3763,10 +3763,10 @@ class K {
3763
3763
  a && (e.delete(a), K.setMap(e));
3764
3764
  }
3765
3765
  static getMap() {
3766
- return M.getMap(ja) || /* @__PURE__ */ new Map();
3766
+ return M.getMap(Ya) || /* @__PURE__ */ new Map();
3767
3767
  }
3768
3768
  static setMap(t) {
3769
- M.setMap(ja, t);
3769
+ M.setMap(Ya, t);
3770
3770
  }
3771
3771
  }
3772
3772
  const L = new xi();
@@ -3842,7 +3842,7 @@ const te = new ki(), Qn = C`
3842
3842
  }
3843
3843
  `, Mi = C`
3844
3844
  ${oe(!1)}
3845
- ${Fa}
3845
+ ${Da}
3846
3846
  ${Qn}
3847
3847
  query GetOptions($ids: [String]!) {
3848
3848
  options(ids: $ids) {
@@ -4586,7 +4586,7 @@ const j = new Ri(), Rn = C`
4586
4586
  }
4587
4587
  `, to = (n) => C`
4588
4588
  ${oe(n)}
4589
- ${Fa}
4589
+ ${Da}
4590
4590
  ${Qn}
4591
4591
  ${Ki}
4592
4592
  ${_i}
@@ -5339,7 +5339,7 @@ const N = () => {
5339
5339
  ...E,
5340
5340
  _renderingConfiguration: a,
5341
5341
  mask: l ? `url(#viewmask-${f})` : void 0
5342
- })), b = xa(B);
5342
+ })), b = ka(B);
5343
5343
  return /* @__PURE__ */ ct(
5344
5344
  "svg",
5345
5345
  {
@@ -5518,7 +5518,7 @@ const N = () => {
5518
5518
  }
5519
5519
  ) });
5520
5520
  }, qn = (n) => {
5521
- const t = `spiff-group-clip-${n.id}`, e = n.rotation || 0, a = ft(e), r = Math.cos(a), i = -Math.sin(a), o = xa(n.children);
5521
+ const t = `spiff-group-clip-${n.id}`, e = n.rotation || 0, a = ft(e), r = Math.cos(a), i = -Math.sin(a), o = ka(n.children);
5522
5522
  return /* @__PURE__ */ ct(Ht, { children: [
5523
5523
  /* @__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 }) }) }),
5524
5524
  /* @__PURE__ */ ct(
@@ -5553,8 +5553,8 @@ const N = () => {
5553
5553
  if (!n.pattern)
5554
5554
  return "";
5555
5555
  if (n.pattern.svg) {
5556
- const A = Pa(n.pattern.svg, n.pattern.colors || {}, !1);
5557
- return va(A);
5556
+ const A = Fa(n.pattern.svg, n.pattern.colors || {}, !1);
5557
+ return Ea(A);
5558
5558
  }
5559
5559
  return n.pattern.src;
5560
5560
  };
@@ -5697,24 +5697,24 @@ const fo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ye = /* @_
5697
5697
  return Ct(n).getFont();
5698
5698
  } catch {
5699
5699
  if (fo(n)) {
5700
- const a = Pn(n), r = oa(a);
5701
- return ua(n, r), r;
5700
+ const a = Pn(n), r = sa(a);
5701
+ return ha(n, r), r;
5702
5702
  } else {
5703
- const a = await Ue(n, !0), r = oa(a);
5704
- return ua(n, r), await Xr(r, n), r;
5703
+ const a = await Ue(n, !0), r = sa(a);
5704
+ return ha(n, r), await Xr(r, n), r;
5705
5705
  }
5706
5706
  }
5707
5707
  })();
5708
5708
  return Ye.set(n, e), e;
5709
5709
  }, Co = (n) => {
5710
- const t = Pn(n), e = oa(t);
5711
- return ua(n, e), e;
5710
+ const t = Pn(n), e = sa(t);
5711
+ return ha(n, e), e;
5712
5712
  }, Ct = (n) => {
5713
5713
  const t = Hn.get(n);
5714
5714
  if (t)
5715
5715
  return t;
5716
5716
  throw new Error("Font metrics unavailable for font");
5717
- }, ua = (n, t) => {
5717
+ }, ha = (n, t) => {
5718
5718
  const e = new po(t);
5719
5719
  return Hn.set(n, e), e;
5720
5720
  }, yd = async (n) => {
@@ -5752,7 +5752,7 @@ const fo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ye = /* @_
5752
5752
  }
5753
5753
  return e.querySelectorAll("text").forEach((d) => d.remove()), Bt().serializeToString(a);
5754
5754
  }, Me = (n, t, e, a) => Math.max(vo(n.join(`
5755
- `), e, a), t), Ya = (n, t, e, a, r, i) => {
5755
+ `), e, a), t), Ja = (n, t, e, a, r, i) => {
5756
5756
  const o = (i || Jn) * r.getApproximateHeight(), s = t.split(`
5757
5757
  `);
5758
5758
  try {
@@ -5809,7 +5809,7 @@ const fo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ye = /* @_
5809
5809
  }, yo = (n, t, e, a) => {
5810
5810
  const r = Ct(t.fontData.assetUrl), i = r.getFont(), o = t.fontSize / i.unitsPerEm;
5811
5811
  if (!e)
5812
- return Ya(t, n, t.fontSize, o, r, a);
5812
+ return Ja(t, n, t.fontSize, o, r, a);
5813
5813
  let s;
5814
5814
  if (t.text ? s = t.text.split(`
5815
5815
  `) : s = t.input?.split(`
@@ -5826,7 +5826,7 @@ const fo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ye = /* @_
5826
5826
  requiredHeight: t.height,
5827
5827
  requiredWidth: Me(s, t.width, o, r),
5828
5828
  fontSize: wo(s, r, i, t.width, t.height, a)
5829
- } : Ya(t, n, t.fontSize, o, r, a);
5829
+ } : Ja(t, n, t.fontSize, o, r, a);
5830
5830
  }, So = (n, t, e, a, r) => {
5831
5831
  const o = Ct(t.assetUrl).getFont();
5832
5832
  let s = { ...n };
@@ -5855,12 +5855,12 @@ const fo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ye = /* @_
5855
5855
  return n.forEach((r) => {
5856
5856
  a = Math.max(a, mt(r, t, e));
5857
5857
  }), a;
5858
- }, Ja = {
5858
+ }, Ka = {
5859
5859
  stripControlCharacters: !0,
5860
5860
  vertical: !1,
5861
5861
  uppercase: !1
5862
- }, Te = (n, t = Ja) => {
5863
- const e = { ...Ja, ...t };
5862
+ }, Te = (n, t = Ka) => {
5863
+ const e = { ...Ka, ...t };
5864
5864
  let a = n || "";
5865
5865
  return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
5866
5866
  `)), a;
@@ -6036,7 +6036,7 @@ const Io = (n) => {
6036
6036
  {
6037
6037
  transform: i,
6038
6038
  dangerouslySetInnerHTML: {
6039
- __html: Ba(
6039
+ __html: Pa(
6040
6040
  n.svg,
6041
6041
  n.width,
6042
6042
  n.height,
@@ -6112,7 +6112,7 @@ class Do {
6112
6112
  layout: t,
6113
6113
  elements: e
6114
6114
  },
6115
- getComponentWithProps: (a) => Da(t, e, a)
6115
+ getComponentWithProps: (a) => xa(t, e, a)
6116
6116
  };
6117
6117
  }
6118
6118
  initialize(t, e) {
@@ -6137,7 +6137,7 @@ class Do {
6137
6137
  return { ...t, transaction: e.apply(a) };
6138
6138
  }
6139
6139
  }
6140
- const _n = (n) => n.type === x.Image ? /* @__PURE__ */ P(Wn, { ...n }, n.id) : n.type === x.Frame ? /* @__PURE__ */ P(go, { ...n }, n.id) : n.type === x.Illustration ? /* @__PURE__ */ P(Fo, { ...n }, n.id) : n.type === x.Textbox ? /* @__PURE__ */ P(Io, { ...n }, n.id) : n.type === x.Group ? /* @__PURE__ */ P(qn, { ...n }, n.id) : null, Da = (n, t, e) => {
6140
+ const _n = (n) => n.type === x.Image ? /* @__PURE__ */ P(Wn, { ...n }, n.id) : n.type === x.Frame ? /* @__PURE__ */ P(go, { ...n }, n.id) : n.type === x.Illustration ? /* @__PURE__ */ P(Fo, { ...n }, n.id) : n.type === x.Textbox ? /* @__PURE__ */ P(Io, { ...n }, n.id) : n.type === x.Group ? /* @__PURE__ */ P(qn, { ...n }, n.id) : null, xa = (n, t, e) => {
6141
6141
  const a = e.renderingConfiguration, r = a?.removeExcludedElements ? t.filter((i) => !i.excludeFromExport) : t;
6142
6142
  return /* @__PURE__ */ P(
6143
6143
  mo,
@@ -6168,7 +6168,7 @@ const _n = (n) => n.type === x.Image ? /* @__PURE__ */ P(Wn, { ...n }, n.id) : n
6168
6168
  }
6169
6169
  );
6170
6170
  };
6171
- function xa(n) {
6171
+ function ka(n) {
6172
6172
  return n.sort((t, e) => {
6173
6173
  const a = t.layer || 0, r = e.layer || 0;
6174
6174
  if (a < r) return -1;
@@ -6188,10 +6188,10 @@ const le = (n) => {
6188
6188
  }, ut = /* @__PURE__ */ new Map(), Wt = /* @__PURE__ */ new Map(), Ke = /* @__PURE__ */ new Map(), Xn = async (n, t) => {
6189
6189
  if (!t) {
6190
6190
  if (!n) throw new Error("No region or src supplied. Cannot construct frame!");
6191
- return ha(n);
6191
+ return ma(n);
6192
6192
  }
6193
6193
  return at(t);
6194
- }, ha = (n) => {
6194
+ }, ma = (n) => {
6195
6195
  const t = n.width, e = n.height;
6196
6196
  return `<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 ${t} ${e}'>
6197
6197
  <path id="target-path" d='M0 0 h ${t} v ${e} h ${-t} Z' />
@@ -6245,7 +6245,7 @@ const le = (n) => {
6245
6245
  throw new Error("Malformed frame SVG");
6246
6246
  })();
6247
6247
  return Ke.set(n, e), e;
6248
- }, ka = (n, t, e, a) => {
6248
+ }, Ma = (n, t, e, a) => {
6249
6249
  const r = t.width / t.height, i = n.width / n.height;
6250
6250
  let o;
6251
6251
  a ? i > r ? o = t.height / n.height : o = t.width / n.width : i > r ? o = t.width / n.width : o = t.height / n.height, e?.scale !== void 0 && (o *= e?.scale);
@@ -6255,7 +6255,7 @@ const le = (n) => {
6255
6255
  y: u,
6256
6256
  zoom: o
6257
6257
  };
6258
- }, ma = async (n) => {
6258
+ }, ga = async (n) => {
6259
6259
  if (ut.has(n))
6260
6260
  return ut.get(n);
6261
6261
  if (n.startsWith("data:image/svg+xml")) {
@@ -6268,7 +6268,7 @@ const le = (n) => {
6268
6268
  return ut.set(n, i), i;
6269
6269
  }
6270
6270
  if ((n.split(".").pop()?.toLowerCase() ?? "") === "svg") {
6271
- const e = await Ma(n), a = e.width, r = e.height, i = {
6271
+ const e = await Ta(n), a = e.width, r = e.height, i = {
6272
6272
  src: n,
6273
6273
  width: a,
6274
6274
  height: r,
@@ -6284,14 +6284,14 @@ const le = (n) => {
6284
6284
  };
6285
6285
  return ut.set(n, r), r;
6286
6286
  }
6287
- }, Ma = async (n) => {
6287
+ }, Ta = async (n) => {
6288
6288
  const t = await at(n);
6289
6289
  return Zn(t);
6290
- }, Ka = (n) => n.endsWith("mm") ? Number(n.replace("mm", "")) * 3.7795275591 : n.endsWith("px") ? Number(n.replace("px", "")) : Number(n), Zn = (n) => {
6290
+ }, _a = (n) => n.endsWith("mm") ? Number(n.replace("mm", "")) * 3.7795275591 : n.endsWith("px") ? Number(n.replace("px", "")) : Number(n), Zn = (n) => {
6291
6291
  const a = dt().parseFromString(n, "image/svg+xml").querySelector("svg");
6292
6292
  if (!a)
6293
6293
  throw new Error("No svg tag found, this svg must be malformed!");
6294
- const r = a.getAttribute("viewBox"), i = a.getAttribute("width"), o = a.getAttribute("height"), s = o && i ? [0, 0, Ka(i), Ka(o)] : r?.split(" ").map((l) => Number(l));
6294
+ const r = a.getAttribute("viewBox"), i = a.getAttribute("width"), o = a.getAttribute("height"), s = o && i ? [0, 0, _a(i), _a(o)] : r?.split(" ").map((l) => Number(l));
6295
6295
  if (!s)
6296
6296
  throw new Error("No viewbox or width/height values detected on SVG file!");
6297
6297
  return {
@@ -6323,12 +6323,12 @@ const le = (n) => {
6323
6323
  const o = dt().parseFromString(n, "image/svg+xml").firstElementChild;
6324
6324
  if (!o)
6325
6325
  throw new Error("Failed to read SVG");
6326
- const l = Bt().serializeToString(o), c = pt(), d = c.getContext("2d"), A = await ya.from(d, l, {
6326
+ const l = Bt().serializeToString(o), c = pt(), d = c.getContext("2d"), A = await Sa.from(d, l, {
6327
6327
  anonymousCrossOrigin: !0,
6328
6328
  ignoreDimensions: !1,
6329
6329
  createCanvas: pt,
6330
6330
  createImage: ie,
6331
- DOMParser: ba(),
6331
+ DOMParser: Ia(),
6332
6332
  fetch: nt
6333
6333
  }), u = o.getAttribute("width"), h = o.getAttribute("height"), m = 2048;
6334
6334
  if (h && u) {
@@ -6536,13 +6536,13 @@ const V = (n, t) => X(n, t).elements.find((r) => r.id === n), X = (n, t) => {
6536
6536
  throw new G();
6537
6537
  return e;
6538
6538
  }, Z = (n, t) => {
6539
- const e = [...t.elements.filter((r) => r.id !== n.id), n], a = xa(e);
6539
+ const e = [...t.elements.filter((r) => r.id !== n.id), n], a = ka(e);
6540
6540
  return {
6541
6541
  layout: t.layout,
6542
6542
  elements: a,
6543
6543
  modificationID: N()
6544
6544
  };
6545
- }, _a = async (n) => {
6545
+ }, Xa = async (n) => {
6546
6546
  const t = [...Object.keys(n.layouts)], e = [...new Set(t)];
6547
6547
  for (let a = 0; a < e.length; a++) {
6548
6548
  const r = e[a], i = n.layouts[r];
@@ -6552,7 +6552,7 @@ const V = (n, t) => X(n, t).elements.find((r) => r.id === n), X = (n, t) => {
6552
6552
  const s = o;
6553
6553
  if (s.src && !s.svg) {
6554
6554
  const l = await at(s.src), c = await ot(l);
6555
- s.svg = Ba(
6555
+ s.svg = Pa(
6556
6556
  c.svg,
6557
6557
  s.width,
6558
6558
  s.height,
@@ -6602,7 +6602,7 @@ class O {
6602
6602
  this.oldState = t;
6603
6603
  }
6604
6604
  }
6605
- class Xa extends O {
6605
+ class Za extends O {
6606
6606
  constructor(t) {
6607
6607
  super(), this.serializableWorkflow = t;
6608
6608
  }
@@ -6864,7 +6864,7 @@ class Mo extends O {
6864
6864
  };
6865
6865
  }
6866
6866
  }
6867
- class Za extends O {
6867
+ class tn extends O {
6868
6868
  constructor(t, e) {
6869
6869
  super(), this.id = t, this.fontData = e;
6870
6870
  }
@@ -7033,7 +7033,7 @@ class Ze extends O {
7033
7033
  };
7034
7034
  }
7035
7035
  }
7036
- class ga extends O {
7036
+ class pa extends O {
7037
7037
  constructor(t, e, a) {
7038
7038
  super(), this.id = t, this.className = e, this.fill = a;
7039
7039
  }
@@ -7202,7 +7202,7 @@ class Dd extends O {
7202
7202
  };
7203
7203
  }
7204
7204
  }
7205
- class tn {
7205
+ class en {
7206
7206
  constructor(t, e, a) {
7207
7207
  this.processRegion = async (r) => {
7208
7208
  const i = this.layouts.find((l) => l.panelId === r.panelId);
@@ -7432,7 +7432,7 @@ class Ne {
7432
7432
  constructor() {
7433
7433
  this.frameSourceSvg = async (t, e) => {
7434
7434
  if (!t)
7435
- return ha(e);
7435
+ return ma(e);
7436
7436
  const a = t.asset;
7437
7437
  if (!a)
7438
7438
  throw new It(t);
@@ -7481,7 +7481,7 @@ class Ne {
7481
7481
  a.serializableWorkflow.steps
7482
7482
  ), l = Object.values(a.layouts).map((c) => c.elements).flat().filter((c) => c.stepName === t.stepName).map((c) => ({ id: c.id, region: c.stepRegion }));
7483
7483
  if (!t.option || (t.option.variants || []).length === 0) {
7484
- const c = t.data.regions.map((d) => ha(d));
7484
+ const c = t.data.regions.map((d) => ma(d));
7485
7485
  e.updateStorage(t.stepName, {
7486
7486
  currentFrameSources: c
7487
7487
  });
@@ -7599,7 +7599,7 @@ class Ne {
7599
7599
  }
7600
7600
  async loadPatternFromString(t, e, a = !0, r = void 0, i) {
7601
7601
  if (t.endsWith("svg")) {
7602
- const o = await Ma(t), s = o.width, l = o.height, c = await at(t);
7602
+ const o = await Ta(t), s = o.width, l = o.height, c = await at(t);
7603
7603
  if (i) {
7604
7604
  const u = c.match(/<(image|linearGradient|radialGradient)(\s|>|\/>)/gim);
7605
7605
  if (u && u.length > 0)
@@ -7702,7 +7702,7 @@ class Ne {
7702
7702
  i && i(!0);
7703
7703
  const c = t.data.initialZoomLevel, d = await Promise.all(
7704
7704
  t.data.regions.map(async (h, m) => {
7705
- const p = await Ge(l[m]), g = s.getImageData(), f = a.map((F) => new Ot(F.id)), w = g ? ka(
7705
+ const p = await Ge(l[m]), g = s.getImageData(), f = a.map((F) => new Ot(F.id)), w = g ? Ma(
7706
7706
  g,
7707
7707
  p,
7708
7708
  c && !t.data.forceImageCover ? { scale: c } : void 0,
@@ -7898,10 +7898,10 @@ class Lo {
7898
7898
  spotColor: A.spotColor,
7899
7899
  pmsValue: A.pmsValue
7900
7900
  };
7901
- const s = Ba(t, e, a, o), l = await ee(s), c = [];
7901
+ const s = Pa(t, e, a, o), l = await ee(s), c = [];
7902
7902
  for (const d of r) {
7903
7903
  for (const [A, u] of i.entries())
7904
- c.push(new ga(d, A, u));
7904
+ c.push(new pa(d, A, u));
7905
7905
  c.push(new Oo(d, s, l));
7906
7906
  }
7907
7907
  return new U(c);
@@ -8284,7 +8284,7 @@ class Go {
8284
8284
  }
8285
8285
  if (!/^$|^[a-zA-Z0-9 ]+$/.test(e))
8286
8286
  return r("Unsupported characters."), { input: e, helperData: {}, errorData: { unsupportedCharacters: !0 } };
8287
- const i = sa(e.toLowerCase());
8287
+ const i = la(e.toLowerCase());
8288
8288
  for (const o of i)
8289
8289
  for (const s in a) {
8290
8290
  const l = a[s].toLowerCase().replace(/\s/g, "");
@@ -8458,7 +8458,7 @@ class Ho {
8458
8458
  const r = a.getLayouts(), o = (a.getRegionElements(e.stepName) || []).map((s) => {
8459
8459
  const l = s.region;
8460
8460
  if (!r.find((d) => d.panelId === l?.panelId)) throw new Y(l);
8461
- return new ga(s.id, this.shapeFillId, t);
8461
+ return new pa(s.id, this.shapeFillId, t);
8462
8462
  }).filter((s) => !!s);
8463
8463
  a.getCommandDispatcher()(new U(o)), a.updateStorage(e.stepName, { colour: t });
8464
8464
  }
@@ -8524,7 +8524,7 @@ class Ho {
8524
8524
  if (!i.find((m) => m.panelId === A?.panelId))
8525
8525
  throw new Y(A);
8526
8526
  const h = s();
8527
- return new ga(d.id, this.shapeFillId, h);
8527
+ return new pa(d.id, this.shapeFillId, h);
8528
8528
  }, c = a.map(l).filter((d) => !!d);
8529
8529
  return {
8530
8530
  command: new U(c),
@@ -8707,7 +8707,7 @@ class Ko {
8707
8707
  }, this.textAlign = (t) => t.vertical ? "center" : t.textAlign || "center", this.getErrorsForText = (t, e, a, r) => {
8708
8708
  let i;
8709
8709
  a.data && a.data.maxLength && e.length > a.data.maxLength && (i || (i = {}), i.hitCharacterLimit = !0);
8710
- const o = r.getWorkflowExperience().getProfanityList(), s = sa(t.toLowerCase());
8710
+ const o = r.getWorkflowExperience().getProfanityList(), s = la(t.toLowerCase());
8711
8711
  for (const c of s)
8712
8712
  for (const d in o) {
8713
8713
  const A = o[d].toLowerCase().replace(/\s/g, "");
@@ -8727,7 +8727,7 @@ class Ko {
8727
8727
  if (a)
8728
8728
  await this.reload(t, e, a);
8729
8729
  else {
8730
- const i = this.getDefaultImageFillVariant(t.data), o = i?.asset?.fileLink, s = o ? await ma(o) : void 0, l = s ? {
8730
+ const i = this.getDefaultImageFillVariant(t.data), o = i?.asset?.fileLink, s = o ? await ga(o) : void 0, l = s ? {
8731
8731
  src: s.src,
8732
8732
  height: s.height,
8733
8733
  width: s.width,
@@ -8834,7 +8834,7 @@ class Ko {
8834
8834
  const a = e.variants?.map((r) => r.asset?.fileLink)?.filter((r) => !!r) || [];
8835
8835
  return Promise.all(
8836
8836
  a.map(async (r) => {
8837
- const i = await ma(r);
8837
+ const i = await ga(r);
8838
8838
  return {
8839
8839
  src: r,
8840
8840
  width: i.width,
@@ -8981,7 +8981,7 @@ class Ko {
8981
8981
  u,
8982
8982
  async () => {
8983
8983
  e.updateMetadata(t.stepName, { color: h, text: m }), e.updateStorage(t.stepName, { text: m, inputText: m });
8984
- const g = s.map((w) => new Za(w.id, A)), f = new U(g);
8984
+ const g = s.map((w) => new tn(w.id, A)), f = new U(g);
8985
8985
  e.getCommandDispatcher()(f);
8986
8986
  }
8987
8987
  ), s.length === 0 && l) {
@@ -9084,7 +9084,7 @@ class Ko {
9084
9084
  async selectVariantCommand(t, e, a, r, i, o, s, l, c) {
9085
9085
  const d = i.markUpdatePending(), A = await this.fontDataFromVariant(e);
9086
9086
  if (r.length > 0) {
9087
- const u = r.map((p) => new Za(p.id, A));
9087
+ const u = r.map((p) => new tn(p.id, A));
9088
9088
  if (l) {
9089
9089
  const p = r.map((g) => new Xe(g.id, l));
9090
9090
  u.push(...p);
@@ -9274,7 +9274,7 @@ class Ko {
9274
9274
  const w = (() => {
9275
9275
  if (t.data && t.data.maxLength && h.length > t.data.maxLength)
9276
9276
  return d && d(!0), { info: "0" };
9277
- const b = o.getWorkflowExperience().getProfanityList(), E = sa(h.toLowerCase());
9277
+ const b = o.getWorkflowExperience().getProfanityList(), E = la(h.toLowerCase());
9278
9278
  for (const F of E)
9279
9279
  for (const D in b) {
9280
9280
  const v = b[D].toLowerCase().replace(/\s/g, "");
@@ -9344,7 +9344,7 @@ function ns(n, t, e, a) {
9344
9344
  const r = e / n, i = a / t;
9345
9345
  return r > 1 && i > 1 ? Math.min(r, i) : r > 1 && i < 1 ? i : r < 1 && i > 1 ? r : Math.min(r, i);
9346
9346
  }
9347
- const en = {
9347
+ const an = {
9348
9348
  m: ["x", "y"],
9349
9349
  z: [],
9350
9350
  l: ["x", "y"],
@@ -9374,7 +9374,7 @@ class rs {
9374
9374
  const r = (i) => {
9375
9375
  const o = [], s = i.relative ? i.type : i.type.toUpperCase();
9376
9376
  let l = e !== s;
9377
- const c = en[i.type];
9377
+ const c = an[i.type];
9378
9378
  l && (o.push(s), e = s);
9379
9379
  for (const d of c) {
9380
9380
  const A = i[d];
@@ -9399,7 +9399,7 @@ class rs {
9399
9399
  const e = /([mzlhvcsqta])([^mzlhvcsqta]*)/gi, a = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, r = [];
9400
9400
  let i;
9401
9401
  for (e.lastIndex = 0; i = e.exec(t); ) {
9402
- const o = i[1].toLowerCase(), s = (i[2].match(a) || []).map(parseFloat), l = o === i[1], c = en[o];
9402
+ const o = i[1].toLowerCase(), s = (i[2].match(a) || []).map(parseFloat), l = o === i[1], c = an[o];
9403
9403
  if (s.length < c.length)
9404
9404
  throw new Ft(
9405
9405
  `Path type "${o}" given ${s.length} arguments, expected ${c.length}.`
@@ -9515,8 +9515,8 @@ const os = [
9515
9515
  "tspan"
9516
9516
  ], ss = async (n, t, e) => {
9517
9517
  const a = t.data, r = e.data.baseUrl, i = a.assetUrl.replace("localhost", "localstack"), o = r.slice(0, 4) === "http" ? "" : "https://", s = new URL(o + r);
9518
- s.searchParams.append("video", Wa(JSON.stringify([{ href: i }]))), s.pathname = s.pathname + (s.pathname.slice(-1) === "/" ? "" : "/");
9519
- const l = s.toString(), d = `data:image/svg+xml;base64,${Wa(await wn(l, { type: "svg" }))}`, A = (h) => {
9518
+ s.searchParams.append("video", qa(JSON.stringify([{ href: i }]))), s.pathname = s.pathname + (s.pathname.slice(-1) === "/" ? "" : "/");
9519
+ const l = s.toString(), d = `data:image/svg+xml;base64,${qa(await wn(l, { type: "svg" }))}`, A = (h) => {
9520
9520
  const m = n.find((g) => g.panelId === h.panelId);
9521
9521
  if (!m)
9522
9522
  throw new Y(h);
@@ -9541,7 +9541,7 @@ const os = [
9541
9541
  return console.error(h), [];
9542
9542
  }
9543
9543
  }, ls = async (n, t, e, a) => {
9544
- const r = e.data, i = r.assetUrl, o = await ma(i);
9544
+ const r = e.data, i = r.assetUrl, o = await ga(i);
9545
9545
  try {
9546
9546
  const s = xo(r, a.option);
9547
9547
  s && (t[a.stepName] = { selectedVariants: [s] });
@@ -9549,7 +9549,7 @@ const os = [
9549
9549
  const d = await Xn(c, s?.asset?.fileLink), A = await Ge(d), u = N(), h = n.find((p) => p.panelId === c.panelId);
9550
9550
  if (!h)
9551
9551
  throw new Y(c);
9552
- const m = ka(
9552
+ const m = Ma(
9553
9553
  o,
9554
9554
  A,
9555
9555
  {
@@ -9613,7 +9613,7 @@ const os = [
9613
9613
  const l = await at(s, !0), c = /<svg.*?<\/svg>/s, d = l.match(c) || [], A = d?.length > 0 ? d[0] : "", m = dt().parseFromString(A, "image/svg+xml").firstElementChild;
9614
9614
  if (!m)
9615
9615
  return console.error("Failed to read SVG."), [];
9616
- Ia(m);
9616
+ Ba(m);
9617
9617
  const p = {};
9618
9618
  kt(m, (b) => {
9619
9619
  os.includes(b.tagName) && !b.attributes.getNamedItem("fill") && b.setAttribute("fill", "#000000");
@@ -9827,7 +9827,7 @@ const os = [
9827
9827
  const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = h?.length > 0 ? h[0] : "", f = dt().parseFromString(m, "image/svg+xml").firstElementChild;
9828
9828
  if (!f)
9829
9829
  throw new Ft("Failed to read SVG.");
9830
- return Ia(f), Bt().serializeToString(f);
9830
+ return Ba(f), Bt().serializeToString(f);
9831
9831
  };
9832
9832
  l.forEach((A) => {
9833
9833
  const u = n.find((m) => m.panelId === A.panelId);
@@ -10163,12 +10163,12 @@ class Ss extends zn {
10163
10163
  l = g.width, c = g.height;
10164
10164
  } else
10165
10165
  l = i.width, c = i.height;
10166
- const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = Da(t.layoutState.layout, e, {
10166
+ const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = xa(t.layoutState.layout, e, {
10167
10167
  renderingConfiguration: {
10168
10168
  purpose: _t.ThreeD,
10169
10169
  templatingContext: d
10170
10170
  }
10171
- }), u = Bn(A), h = await ya.from(this.ctx, u, {
10171
+ }), u = Bn(A), h = await Sa.from(this.ctx, u, {
10172
10172
  anonymousCrossOrigin: !0,
10173
10173
  ignoreDimensions: !this.nonPOTSupport,
10174
10174
  ignoreAnimation: !0,
@@ -10177,7 +10177,7 @@ class Ss extends zn {
10177
10177
  enableRedraw: !1,
10178
10178
  createCanvas: pt,
10179
10179
  createImage: ie,
10180
- DOMParser: ba(),
10180
+ DOMParser: Ia(),
10181
10181
  fetch
10182
10182
  });
10183
10183
  h.resize(l, c), await h.render(), this.onRender();
@@ -10306,7 +10306,7 @@ const xd = (n, t) => {
10306
10306
  name
10307
10307
  }
10308
10308
  }
10309
- `, Ta = (n) => C`
10309
+ `, Na = (n) => C`
10310
10310
  ${Is(n)}
10311
10311
  fragment ProductCollectionProductFields on ProductCollectionProduct {
10312
10312
  id
@@ -10317,7 +10317,7 @@ const xd = (n, t) => {
10317
10317
  }
10318
10318
  }
10319
10319
  `, de = (n, t = !1) => C`
10320
- ${n ? Ta(t) : ""}
10320
+ ${n ? Na(t) : ""}
10321
10321
  fragment ProductCollectionFields on ProductCollection {
10322
10322
  id
10323
10323
  name
@@ -10443,7 +10443,7 @@ const xd = (n, t) => {
10443
10443
  }
10444
10444
  }
10445
10445
  }
10446
- `, an = C`
10446
+ `, nn = C`
10447
10447
  query GetBundleStakeholders($id: String!) {
10448
10448
  bundles(ids: [$id]) {
10449
10449
  id
@@ -10518,7 +10518,7 @@ const xd = (n, t) => {
10518
10518
  }
10519
10519
  }
10520
10520
  `, Fs = C`
10521
- ${Ta(!1)}
10521
+ ${Na(!1)}
10522
10522
  query GetProductCollectionProducts($id: String!, $productIds: [String!]) {
10523
10523
  productCollections(ids: [$id], productIds: $productIds) {
10524
10524
  id
@@ -10551,7 +10551,7 @@ const xd = (n, t) => {
10551
10551
  }
10552
10552
  }
10553
10553
  `, xs = C`
10554
- ${Ta(!0)}
10554
+ ${Na(!0)}
10555
10555
  query GetProductCollectionForProductsFeed(
10556
10556
  $id: String!
10557
10557
  $limit: Int
@@ -10654,7 +10654,7 @@ const xd = (n, t) => {
10654
10654
  }
10655
10655
  }
10656
10656
  }
10657
- `, nn = C`
10657
+ `, aa = C`
10658
10658
  mutation UpdateBundle(
10659
10659
  $id: String!
10660
10660
  $name: String
@@ -11013,7 +11013,7 @@ const tl = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11013
11013
  customField4: p ?? w.recipient.customField4,
11014
11014
  customField5: g ?? w.recipient.customField5,
11015
11015
  conversionConfigurationId: f || w.recipient.conversionConfigurationId
11016
- }, this.experience.callEvent(fa.RecipientChanged), await this.graphQlClient().mutate({
11016
+ }, this.experience.callEvent(Ca.RecipientChanged), await this.graphQlClient().mutate({
11017
11017
  mutation: Ks,
11018
11018
  errorPolicy: "all",
11019
11019
  fetchPolicy: "no-cache",
@@ -11082,7 +11082,7 @@ const tl = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11082
11082
  customField4: p,
11083
11083
  customField5: g,
11084
11084
  conversionConfigurationId: f
11085
- }, this.experience.callEvent(fa.RecipientChanged), await this.graphQlClient().mutate({
11085
+ }, this.experience.callEvent(Ca.RecipientChanged), await this.graphQlClient().mutate({
11086
11086
  mutation: _s,
11087
11087
  errorPolicy: "all",
11088
11088
  fetchPolicy: "no-cache",
@@ -11376,7 +11376,7 @@ const tl = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11376
11376
  };
11377
11377
  if (!Kt(a, this.storage)) {
11378
11378
  this.storage = a;
11379
- const r = new Xa(this.constructSerializableWorkflow());
11379
+ const r = new Za(this.constructSerializableWorkflow());
11380
11380
  this.commandContext.apply(r, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
11381
11381
  }
11382
11382
  }
@@ -11474,10 +11474,10 @@ const tl = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11474
11474
  return Promise.resolve({ stepElements: {}, commands: [] });
11475
11475
  const r = async (c, d, A) => {
11476
11476
  if (c.type === S.SilentIllustration) {
11477
- const u = await new tn(c, d).trigger();
11477
+ const u = await new en(c, d).trigger();
11478
11478
  return { step: c, results: u };
11479
11479
  } else if (c.type === S.ProductOverlay) {
11480
- const u = await new tn(
11480
+ const u = await new en(
11481
11481
  c,
11482
11482
  d,
11483
11483
  A
@@ -11580,7 +11580,7 @@ const tl = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11580
11580
  }, this.removeElements(h);
11581
11581
  const g = i.steps.find((E) => E.stepName === t);
11582
11582
  g?.type === S.Frame && this.getWorkflowExperience().getStepById(g.stepName)?.frameService?.setTargetElements(a.map((F) => F.id));
11583
- const f = h.map((E) => new Ot(E.id)), w = new Xa(this.constructSerializableWorkflow()), I = [...p, ...f, w];
11583
+ const f = h.map((E) => new Ot(E.id)), w = new Za(this.constructSerializableWorkflow()), I = [...p, ...f, w];
11584
11584
  I.length > 0 && this.commandContext.apply(new U(I), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
11585
11585
  const B = this.getInvalidModelVariants(), b = this.modelContainer;
11586
11586
  if (b) {
@@ -11711,7 +11711,7 @@ const tl = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11711
11711
  }
11712
11712
  };
11713
11713
  Yt.configurationPromiseMap = /* @__PURE__ */ new Map();
11714
- let pa = Yt;
11714
+ let fa = Yt;
11715
11715
  class rt {
11716
11716
  constructor(t) {
11717
11717
  this.variantData = t;
@@ -12871,7 +12871,7 @@ class wl {
12871
12871
  throw new R("Unexpected storage method requested");
12872
12872
  }
12873
12873
  }
12874
- const aa = new wl(), yl = C`
12874
+ const na = new wl(), yl = C`
12875
12875
  mutation AddTransactionStakeholder($id: String!, $type: String!, $details: CustomerDetailsInput!) {
12876
12876
  transactionAddStakeholder(id: $id, details: $details, type: $type) {
12877
12877
  id
@@ -13002,11 +13002,11 @@ const aa = new wl(), yl = C`
13002
13002
  }
13003
13003
  }
13004
13004
  `;
13005
- var fa = /* @__PURE__ */ ((n) => (n.PriceBreakChanged = "PriceBreakChanged", n.ProductChanged = "ProductChanged", n.QuantityChanged = "QuantityChanged", n.RecipientChanged = "RecipientChanged", n.SelectionChanged = "SelectionChanged", n))(fa || {});
13005
+ var Ca = /* @__PURE__ */ ((n) => (n.PriceBreakChanged = "PriceBreakChanged", n.ProductChanged = "ProductChanged", n.QuantityChanged = "QuantityChanged", n.RecipientChanged = "RecipientChanged", n.SelectionChanged = "SelectionChanged", n))(Ca || {});
13006
13006
  class El {
13007
13007
  constructor(t, e) {
13008
13008
  this.cachedStepHandles = /* @__PURE__ */ new Map(), this.profanityList = [], this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = yn(async () => {
13009
- await aa.getSavedDesignByTransaction(this.getTransaction().id) && this.save();
13009
+ await na.getSavedDesignByTransaction(this.getTransaction().id) && this.save();
13010
13010
  }, 2500), this.getCanvasObjectURLAsync = async (a) => new Promise((r, i) => {
13011
13011
  try {
13012
13012
  a.toBlob((o) => {
@@ -13018,7 +13018,7 @@ class El {
13018
13018
  } catch (o) {
13019
13019
  i(o);
13020
13020
  }
13021
- }), 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 pa(
13021
+ }), 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 fa(
13022
13022
  this,
13023
13023
  t,
13024
13024
  (a) => {
@@ -13187,19 +13187,19 @@ class El {
13187
13187
  }, u = this.workflowManager.getCommandContext().getLayoutById(d.layoutState.layout.id), h = o.getContext("2d");
13188
13188
  if (!h)
13189
13189
  throw new $e("Failed to obtain 2D context for preview image creation");
13190
- const m = this.workflowManager.getTemplatingContext(), p = Da(u.layoutState.layout, u.layoutState.elements, {
13190
+ const m = this.workflowManager.getTemplatingContext(), p = xa(u.layoutState.layout, u.layoutState.elements, {
13191
13191
  renderingConfiguration: {
13192
13192
  purpose: _t.Print,
13193
13193
  region: { left: A.x, top: A.y, width: A.width, height: A.height },
13194
13194
  templatingContext: m
13195
13195
  }
13196
13196
  }), g = Bn(p);
13197
- await (await ya.from(h, g, {
13197
+ await (await Sa.from(h, g, {
13198
13198
  anonymousCrossOrigin: !0,
13199
13199
  ignoreDimensions: !1,
13200
13200
  createCanvas: pt,
13201
13201
  createImage: ie,
13202
- DOMParser: ba(),
13202
+ DOMParser: Ia(),
13203
13203
  fetch
13204
13204
  })).render();
13205
13205
  const w = await this.getCanvasObjectURLAsync(o);
@@ -13354,7 +13354,7 @@ class El {
13354
13354
  const o = {
13355
13355
  title: await (async () => {
13356
13356
  if (t) return t;
13357
- const s = this.getTransaction().id, c = (await aa.getSavedDesigns()).find((d) => d.transactionId === s)?.title;
13357
+ const s = this.getTransaction().id, c = (await na.getSavedDesigns()).find((d) => d.transactionId === s)?.title;
13358
13358
  return c || "My design";
13359
13359
  })(),
13360
13360
  thumbnail: await this.createPreviewImage(!1, 256),
@@ -13365,7 +13365,7 @@ class El {
13365
13365
  workflowId: a.id,
13366
13366
  lastEdited: /* @__PURE__ */ new Date()
13367
13367
  };
13368
- return await aa.addDesign(o), o;
13368
+ return await na.addDesign(o), o;
13369
13369
  }
13370
13370
  async copy() {
13371
13371
  const t = bt(this.getCommandContext().getState());
@@ -13608,7 +13608,7 @@ class Bl {
13608
13608
  }
13609
13609
  }
13610
13610
  }
13611
- class Na {
13611
+ class Qa {
13612
13612
  constructor(t, e) {
13613
13613
  this.bundle = t, this.property = e;
13614
13614
  }
@@ -13669,7 +13669,7 @@ class Na {
13669
13669
  return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);
13670
13670
  }
13671
13671
  }
13672
- class Pl extends Na {
13672
+ class Pl extends Qa {
13673
13673
  constructor(t, e) {
13674
13674
  super(t, e);
13675
13675
  }
@@ -13680,7 +13680,7 @@ class Pl extends Na {
13680
13680
  const t = await this.getImage();
13681
13681
  if (t?.fileLink)
13682
13682
  if (t?.fileLink.endsWith(".svg")) {
13683
- const e = await at(t?.fileLink), a = await Ma(t?.fileLink), r = a.width, i = a.height, o = await ot(e);
13683
+ const e = await at(t?.fileLink), a = await Ta(t?.fileLink), r = a.width, i = a.height, o = await ot(e);
13684
13684
  this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.colors?.forEach((c) => {
13685
13685
  o.colors[c.key] = {
13686
13686
  browserValue: c.browserValue,
@@ -13723,7 +13723,7 @@ class Pl extends Na {
13723
13723
  ]);
13724
13724
  }
13725
13725
  async canUseBackgroundRemover() {
13726
- return this.bundle.getClient().canUseAddon(Sa.BackgroundRemover);
13726
+ return this.bundle.getClient().canUseAddon(va.BackgroundRemover);
13727
13727
  }
13728
13728
  /**
13729
13729
  * Removes the background from an image, stores it in the state, and returns the new asset.
@@ -13761,7 +13761,7 @@ class Pl extends Na {
13761
13761
  return L.getLocalOrFromServer(t);
13762
13762
  }
13763
13763
  async getImageWithColors() {
13764
- return await this.loadImageData(), this.imageData?.svg ? va(Pa(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
13764
+ return await this.loadImageData(), this.imageData?.svg ? Ea(Fa(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
13765
13765
  }
13766
13766
  /**
13767
13767
  * Retrieves the original, unmodified image selection, if one exists.
@@ -13895,7 +13895,7 @@ class Pl extends Na {
13895
13895
  );
13896
13896
  }
13897
13897
  }
13898
- class Fl extends Na {
13898
+ class Fl extends Qa {
13899
13899
  constructor(t, e) {
13900
13900
  super(t, e);
13901
13901
  }
@@ -13934,7 +13934,7 @@ class Fl extends Na {
13934
13934
  await Promise.all(r);
13935
13935
  }
13936
13936
  }
13937
- class mr extends Na {
13937
+ class mr extends Qa {
13938
13938
  constructor(t, e, a) {
13939
13939
  super(t, e), this.optionResource = a;
13940
13940
  }
@@ -14058,15 +14058,15 @@ const Dl = (n, t, e, a) => n.flatMap((r) => r.getSteps()).filter((r) => r.getGlo
14058
14058
  });
14059
14059
  return Math.max(...r);
14060
14060
  };
14061
- function Ca(n, t) {
14061
+ function wa(n, t) {
14062
14062
  function e(a) {
14063
14063
  if (typeof a > "u" || !Array.isArray(a) && !Ml(a))
14064
14064
  return a;
14065
14065
  if (Array.isArray(a))
14066
- return Ca(a, t);
14066
+ return wa(a, t);
14067
14067
  let r = {};
14068
14068
  for (const [i, o] of Object.entries(a))
14069
- r[i] = kl(o) ? o : Ca(o, t);
14069
+ r[i] = kl(o) ? o : wa(o, t);
14070
14070
  return Ur(r, t);
14071
14071
  }
14072
14072
  return Array.isArray(n) ? n.map(e) : e(n);
@@ -14084,7 +14084,7 @@ function gr(n) {
14084
14084
  }), t;
14085
14085
  }
14086
14086
  function fe(n) {
14087
- return Ca(n, ["__typename"]);
14087
+ return wa(n, ["__typename"]);
14088
14088
  }
14089
14089
  class Tl {
14090
14090
  constructor(t, e, a, r, i) {
@@ -14890,7 +14890,7 @@ const Gl = C`
14890
14890
  }
14891
14891
  }
14892
14892
  `;
14893
- class na {
14893
+ class ra {
14894
14894
  constructor(t, e, a, r, i, o) {
14895
14895
  this.workflowExperiences = [], this.eventEmitter = new zl(), this.updatesLocked = !1, this.client = t, this.id = e.id, this.name = e.name || "", this.dispatchDate = e.dispatchDate, this.template = e.template || !1, this.quoteId = e.quoteId, this.shareActions = e.bundleShareActions, this.workflowViewerLink = e.workflowViewerLink, this.workflowViewerAmendLink = e.workflowViewerAmendLink, this.ownerId = i, this.metadata = new Map(e.metadata?.map((c) => [c.key, c.value]) || []), this.completed = e.completed ?? !1, this.productCollection = e.productCollection, this.bundleStateManager = new Nl(e.bundleStateData);
14896
14896
  const s = this.productCollection?.globalPropertyConfiguration;
@@ -14950,7 +14950,27 @@ class na {
14950
14950
  this.bundleStateManager.setState(a), this.fireEvent("bundle-integration-products-added", {
14951
14951
  integrationProductIds: e.integrationProductIds
14952
14952
  }), await y.getShadowGraphqlClient().mutate({
14953
- mutation: nn,
14953
+ mutation: aa,
14954
+ variables: {
14955
+ id: this.id,
14956
+ bundleStateData: a
14957
+ },
14958
+ context: {
14959
+ bundleOwnerId: this.ownerId
14960
+ }
14961
+ });
14962
+ }
14963
+ }
14964
+ async clearIntegrationProductIds() {
14965
+ const t = this.bundleStateManager.getState();
14966
+ if (t) {
14967
+ const e = [...t.integrationProductIds ?? []];
14968
+ t.integrationProductIds = [];
14969
+ const a = JSON.stringify(t);
14970
+ this.bundleStateManager.setState(a), this.fireEvent("bundle-integration-products-removed", {
14971
+ integrationProductIds: e
14972
+ }), await y.getShadowGraphqlClient().mutate({
14973
+ mutation: aa,
14954
14974
  variables: {
14955
14975
  id: this.id,
14956
14976
  bundleStateData: a
@@ -15368,7 +15388,7 @@ class na {
15368
15388
  }
15369
15389
  async getAllStakeholders() {
15370
15390
  const t = await y.getShadowGraphqlClient().query({
15371
- query: an,
15391
+ query: nn,
15372
15392
  errorPolicy: "all",
15373
15393
  fetchPolicy: "no-cache",
15374
15394
  variables: {
@@ -15384,7 +15404,7 @@ class na {
15384
15404
  }
15385
15405
  async getCurrentStakeholder() {
15386
15406
  const t = await y.getShadowGraphqlClient().query({
15387
- query: an,
15407
+ query: nn,
15388
15408
  errorPolicy: "all",
15389
15409
  fetchPolicy: "no-cache",
15390
15410
  variables: {
@@ -15539,7 +15559,7 @@ class na {
15539
15559
  }
15540
15560
  async updateBundle() {
15541
15561
  if (!(await y.getShadowGraphqlClient().mutate({
15542
- mutation: nn,
15562
+ mutation: aa,
15543
15563
  variables: {
15544
15564
  id: this.id,
15545
15565
  name: this.name,
@@ -15797,7 +15817,7 @@ class we {
15797
15817
  return this.getArtifacts().get(t);
15798
15818
  }
15799
15819
  }
15800
- class Qa {
15820
+ class Ra {
15801
15821
  constructor(t) {
15802
15822
  this.value = t;
15803
15823
  }
@@ -15810,12 +15830,12 @@ class Qa {
15810
15830
  }
15811
15831
  }
15812
15832
  var Jl = /* @__PURE__ */ ((n) => (n.Transaction = "Transaction", n.Bundle = "Bundle", n.Product = "Product", n.Variant = "Variant", n.Option = "Option", n.LineItem = "LineItem", n.Asset = "Asset", n))(Jl || {});
15813
- class Nd extends Qa {
15833
+ class Nd extends Ra {
15814
15834
  constructor(t) {
15815
15835
  super(`"${t}"`);
15816
15836
  }
15817
15837
  }
15818
- class fr extends Qa {
15838
+ class fr extends Ra {
15819
15839
  constructor(t, e) {
15820
15840
  if (e !== "Asset" && !fr.validUUID(t))
15821
15841
  throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");
@@ -15825,7 +15845,7 @@ class fr extends Qa {
15825
15845
  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);
15826
15846
  }
15827
15847
  }
15828
- class Qd extends Qa {
15848
+ class Qd extends Ra {
15829
15849
  constructor(t) {
15830
15850
  super(`[${t.map((e) => e.getRaw()).join(",")}]`);
15831
15851
  }
@@ -16018,7 +16038,7 @@ class tc {
16018
16038
  }
16019
16039
  async generateCode(t) {
16020
16040
  const e = await this.cognitoClient?.send(
16021
- new Ua({
16041
+ new La({
16022
16042
  AuthFlow: "CUSTOM_AUTH",
16023
16043
  ClientId: this.userPoolClientId,
16024
16044
  AuthParameters: {
@@ -16052,7 +16072,7 @@ class tc {
16052
16072
  throw new Error("Failed to find existing tokens.");
16053
16073
  const e = JSON.parse(t);
16054
16074
  return await this.cognitoClient?.send(
16055
- new Ua({
16075
+ new La({
16056
16076
  AuthFlow: "REFRESH_TOKEN_AUTH",
16057
16077
  ClientId: this.userPoolClientId,
16058
16078
  AuthParameters: {
@@ -16082,7 +16102,7 @@ class ec {
16082
16102
  * @param currency The currency to determine precision for.
16083
16103
  */
16084
16104
  getPrecisionForCurrency(t) {
16085
- const e = t, a = La.code(e);
16105
+ const e = t, a = Va.code(e);
16086
16106
  return a ? a.digits : 2;
16087
16107
  }
16088
16108
  /**
@@ -16093,7 +16113,7 @@ class ec {
16093
16113
  */
16094
16114
  getSpecialFormat(t) {
16095
16115
  const e = t;
16096
- if (La.code(e)?.code === "CLP")
16116
+ if (Va.code(e)?.code === "CLP")
16097
16117
  return "USD0,0";
16098
16118
  }
16099
16119
  }
@@ -16195,7 +16215,7 @@ class Rd {
16195
16215
  } catch (a) {
16196
16216
  throw console.error(a), new ht("Critical - Unable to synchronize workflow state with server.");
16197
16217
  }
16198
- }, this.options = t, this.options.applicationKey && ni(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.8.5-beta.5ce171fc-9ad0-553e-b8e4-b0853e1a01a4"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16218
+ }, this.options = t, this.options.applicationKey && ni(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.9.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16199
16219
  }
16200
16220
  configure(t) {
16201
16221
  gt.setHubUrl(t.hubUrl), gt.setServerUrl(t.serverUrl), gt.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 && ii(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Gt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
@@ -16495,7 +16515,7 @@ class Rd {
16495
16515
  o.set(i.id, i.partner.id), M.setMap("bundlePartnerIds", o);
16496
16516
  const s = M.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16497
16517
  s.set(i.id, i.bundleOwnerId), M.setMap("bundleOwnerIds", s);
16498
- const l = new na(this, i, void 0, void 0, i.bundleOwnerId, {
16518
+ const l = new ra(this, i, void 0, void 0, i.bundleOwnerId, {
16499
16519
  eagerFetchProducts: a?.graphql?.productCollection?.eagerFetchProducts
16500
16520
  });
16501
16521
  return await l.getInitializationPromise(), l;
@@ -16535,7 +16555,7 @@ class Rd {
16535
16555
  throw new Error(`Unable to find bundle: ${t}`);
16536
16556
  const d = c.data?.bundles[0], A = M.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16537
16557
  A.set(d.id, d.partner.id), M.setMap("bundlePartnerIds", A);
16538
- const u = new na(this, d, e, a, o, {
16558
+ const u = new ra(this, d, e, a, o, {
16539
16559
  additionalHeaders: r?.graphql?.additionalHeaders,
16540
16560
  eagerFetchProducts: r?.graphql?.productCollection?.eagerFetchProducts,
16541
16561
  existingGlobalPropertyState: c.data.globalPropertyState,
@@ -16573,7 +16593,7 @@ class Rd {
16573
16593
  c.set(l.id, l.partner.id), M.setMap("bundlePartnerIds", c);
16574
16594
  const d = M.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16575
16595
  return d.set(l.id, l.bundleOwnerId), M.setMap("bundleOwnerIds", d), async () => {
16576
- const A = new na(this, l, void 0, void 0, l.bundleOwnerId, {
16596
+ const A = new ra(this, l, void 0, void 0, l.bundleOwnerId, {
16577
16597
  eagerFetchProducts: r?.graphql?.productCollection?.eagerFetchProducts,
16578
16598
  existingGlobalPropertyState: l.globalPropertyState
16579
16599
  });
@@ -16700,7 +16720,7 @@ class Rd {
16700
16720
  }));
16701
16721
  }, s = t.map((v, k) => ({ option: v, index: k })), l = s.filter((v) => v.option.type === "transaction"), c = s.filter(
16702
16722
  (v) => v.option.type === "integration" || v.option.type === "external" || v.option.type === "blank"
16703
- ), d = 50, A = $a(l, d), u = $a(c, d), h = (await Promise.all([
16723
+ ), d = 50, A = Ua(l, d), u = Ua(c, d), h = (await Promise.all([
16704
16724
  ...A.map(i),
16705
16725
  ...u.map(o)
16706
16726
  ])).flat(), m = [...new Set(h.map((v) => v.transaction.productId))].filter(
@@ -16732,10 +16752,10 @@ class Rd {
16732
16752
  };
16733
16753
  if (J.type === "transaction" && k.workflowState) {
16734
16754
  const yt = JSON.parse(k.workflowState);
16735
- await _a(yt), Ae.reloadedState = yt;
16755
+ await Xa(yt), Ae.reloadedState = yt;
16736
16756
  } else if (!T && J.workflowState) {
16737
16757
  const yt = JSON.parse(J.workflowState);
16738
- await _a(yt), Ae.reloadedState = yt;
16758
+ await Xa(yt), Ae.reloadedState = yt;
16739
16759
  }
16740
16760
  return Ae.delayWorkflowStateSync = !0, { experienceOptions: Ae, index: $, options: J };
16741
16761
  }), E = await Promise.all(b);
@@ -16976,8 +16996,8 @@ class cc {
16976
16996
  getImageSrc() {
16977
16997
  if (this.imageData) {
16978
16998
  if (this.imageData.svg) {
16979
- const t = Pa(this.imageData.svg, this.imageData.colors || {}, !1);
16980
- return va(t);
16999
+ const t = Fa(this.imageData.svg, this.imageData.colors || {}, !1);
17000
+ return Ea(t);
16981
17001
  }
16982
17002
  return this.imageData.src;
16983
17003
  }
@@ -17113,7 +17133,7 @@ class cc {
17113
17133
  }
17114
17134
  recalculateOffsets(t) {
17115
17135
  this.frameData && ((!this.offsets || this.offsets.length !== this.frameData.length) && (this.offsets = new Array(this.frameData.length)), this.frameData.forEach((e, a) => {
17116
- this.offsets[a] = ka(
17136
+ this.offsets[a] = Ma(
17117
17137
  t,
17118
17138
  e,
17119
17139
  this.initialZoom && !this.forceImageCover ? { scale: this.initialZoom } : void 0,
@@ -17329,7 +17349,7 @@ class Ac extends tt {
17329
17349
  * Returns `true` if the Background Remover is available for the current session.
17330
17350
  */
17331
17351
  async canUseBackgroundRemover() {
17332
- return this.manager.getClient().canUseAddon(Sa.BackgroundRemover);
17352
+ return this.manager.getClient().canUseAddon(va.BackgroundRemover);
17333
17353
  }
17334
17354
  /**
17335
17355
  * Returns `true` if the Background Remover is available for the current session and if the associated frame has a user-supplied raster image.
@@ -17455,7 +17475,7 @@ const uc = C`
17455
17475
  id
17456
17476
  }
17457
17477
  }
17458
- `, Ra = C`
17478
+ `, Oa = C`
17459
17479
  query GetCustomerTransactions(
17460
17480
  $id: String!
17461
17481
  $limit: Int!
@@ -17622,7 +17642,7 @@ const uc = C`
17622
17642
  },
17623
17643
  context: t
17624
17644
  }), Kd = async (n, t, e) => (await y.getShadowGraphqlClient().query({
17625
- query: Ra,
17645
+ query: Oa,
17626
17646
  errorPolicy: "all",
17627
17647
  fetchPolicy: "no-cache",
17628
17648
  variables: {
@@ -17642,7 +17662,7 @@ const uc = C`
17642
17662
  limit: t
17643
17663
  }
17644
17664
  }))?.data.customerTransactionsFeed?.items || [], _d = async (n, t, e) => (await y.getShadowGraphqlClient().query({
17645
- query: Ra,
17665
+ query: Oa,
17646
17666
  errorPolicy: "all",
17647
17667
  fetchPolicy: "no-cache",
17648
17668
  variables: {
@@ -17662,7 +17682,7 @@ const uc = C`
17662
17682
  limit: t
17663
17683
  }
17664
17684
  }))?.data.customerTransactionsFeed?.items || [], Xd = async (n, t, e) => (await y.getShadowGraphqlClient().query({
17665
- query: Ra,
17685
+ query: Oa,
17666
17686
  errorPolicy: "all",
17667
17687
  fetchPolicy: "no-cache",
17668
17688
  variables: {
@@ -17709,12 +17729,12 @@ _ = { __e: function(n, t, e, a) {
17709
17729
  }
17710
17730
  throw n;
17711
17731
  } }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
17712
- var it, ra, An, yr = [], ia = [], un = _.__b, hn = _.__r, mn = _.diffed, gn = _.__c, pn = _.unmount;
17732
+ var it, ia, An, yr = [], oa = [], un = _.__b, hn = _.__r, mn = _.diffed, gn = _.__c, pn = _.unmount;
17713
17733
  function Sc() {
17714
17734
  for (var n; n = yr.shift(); )
17715
17735
  if (n.__P && n.__H)
17716
17736
  try {
17717
- n.__H.__h.forEach(Be), n.__H.__h.forEach(wa), n.__H.__h = [];
17737
+ n.__H.__h.forEach(Be), n.__H.__h.forEach(ya), n.__H.__h = [];
17718
17738
  } catch (t) {
17719
17739
  n.__H.__h = [], _.__e(t, n.__v);
17720
17740
  }
@@ -17724,20 +17744,20 @@ _.__b = function(n) {
17724
17744
  }, _.__r = function(n) {
17725
17745
  hn && hn(n);
17726
17746
  var t = (it = n.__c).__H;
17727
- t && (ra === it ? (t.__h = [], it.__h = [], t.__.forEach(function(e) {
17728
- e.__N && (e.__ = e.__N), e.__V = ia, e.__N = e.i = void 0;
17729
- })) : (t.__h.forEach(Be), t.__h.forEach(wa), t.__h = [])), ra = it;
17747
+ t && (ia === it ? (t.__h = [], it.__h = [], t.__.forEach(function(e) {
17748
+ e.__N && (e.__ = e.__N), e.__V = oa, e.__N = e.i = void 0;
17749
+ })) : (t.__h.forEach(Be), t.__h.forEach(ya), t.__h = [])), ia = it;
17730
17750
  }, _.diffed = function(n) {
17731
17751
  mn && mn(n);
17732
17752
  var t = n.__c;
17733
17753
  t && t.__H && (t.__H.__h.length && (yr.push(t) !== 1 && An === _.requestAnimationFrame || ((An = _.requestAnimationFrame) || vc)(Sc)), t.__H.__.forEach(function(e) {
17734
- e.i && (e.__H = e.i), e.__V !== ia && (e.__ = e.__V), e.i = void 0, e.__V = ia;
17735
- })), ra = it = null;
17754
+ e.i && (e.__H = e.i), e.__V !== oa && (e.__ = e.__V), e.i = void 0, e.__V = oa;
17755
+ })), ia = it = null;
17736
17756
  }, _.__c = function(n, t) {
17737
17757
  t.some(function(e) {
17738
17758
  try {
17739
17759
  e.__h.forEach(Be), e.__h = e.__h.filter(function(a) {
17740
- return !a.__ || wa(a);
17760
+ return !a.__ || ya(a);
17741
17761
  });
17742
17762
  } catch (a) {
17743
17763
  t.some(function(r) {
@@ -17767,7 +17787,7 @@ function Be(n) {
17767
17787
  var t = it, e = n.__c;
17768
17788
  typeof e == "function" && (n.__c = void 0, e()), it = t;
17769
17789
  }
17770
- function wa(n) {
17790
+ function ya(n) {
17771
17791
  var t = it;
17772
17792
  n.__c = n.__(), it = t;
17773
17793
  }
@@ -17793,7 +17813,7 @@ const Sr = C`
17793
17813
  }
17794
17814
  missingComponentTypes
17795
17815
  }
17796
- `, Oa = C`
17816
+ `, $a = C`
17797
17817
  ${Sr}
17798
17818
  fragment AddressValidationJobFields on AddressValidationJob {
17799
17819
  id
@@ -17806,14 +17826,14 @@ const Sr = C`
17806
17826
  }
17807
17827
  }
17808
17828
  `, Ec = C`
17809
- ${Oa}
17829
+ ${$a}
17810
17830
  query GetAddressValidationJobs($ids: [String!]!) {
17811
17831
  addressValidationJobs(ids: $ids) {
17812
17832
  ...AddressValidationJobFields
17813
17833
  }
17814
17834
  }
17815
17835
  `, bc = C`
17816
- ${Oa}
17836
+ ${$a}
17817
17837
  query GetRecipientsWithAddressValidationJobs($ids: [String!]!) {
17818
17838
  recipients(ids: $ids) {
17819
17839
  id
@@ -17830,7 +17850,7 @@ const Sr = C`
17830
17850
  }
17831
17851
  }
17832
17852
  `, Bc = C`
17833
- ${Oa}
17853
+ ${$a}
17834
17854
  mutation BatchValidateRecipientAddress($ids: [String!]!) {
17835
17855
  recipientValidateBatch(ids: $ids) {
17836
17856
  ...AddressValidationJobFields
@@ -17915,7 +17935,7 @@ const tA = async (n) => {
17915
17935
  }
17916
17936
  })).data.integrationProducts;
17917
17937
  export {
17918
- Sa as AddonHandle,
17938
+ va as AddonHandle,
17919
17939
  Dc as AddressValidationJobStatus,
17920
17940
  Fc as AddressValidationResultConfirmationLevel,
17921
17941
  vn as AddressValidationStatus,
@@ -17946,11 +17966,11 @@ export {
17946
17966
  To as FontAlignmentCommand,
17947
17967
  ko as FontColorCommand,
17948
17968
  Mo as FontSizeCommand,
17949
- Za as FontSourceCommand,
17969
+ tn as FontSourceCommand,
17950
17970
  cc as FrameService,
17951
17971
  dc as FrameStep,
17952
17972
  Ac as FrameStepHandle,
17953
- Na as GlobalPropertyHandle,
17973
+ Qa as GlobalPropertyHandle,
17954
17974
  U as GroupCommand,
17955
17975
  al as IllustrationStepHandle,
17956
17976
  We as InformationMessageType,
@@ -18004,7 +18024,7 @@ export {
18004
18024
  qr as UnitOfMeasurement,
18005
18025
  Id as UpdateImageSourceCommand,
18006
18026
  rt as Variant,
18007
- fa as WorkflowExperienceEventType,
18027
+ Ca as WorkflowExperienceEventType,
18008
18028
  El as WorkflowExperienceImpl,
18009
18029
  L as assetService,
18010
18030
  fi as browserColorToHex,
@@ -18013,7 +18033,7 @@ export {
18013
18033
  pd as currentDirection,
18014
18034
  rd as dataUrlFromExternalUrl,
18015
18035
  Vd as deleteBundle,
18016
- aa as designService,
18036
+ na as designService,
18017
18037
  be as determineCorrectFontSizeAndLines,
18018
18038
  nr as digitalContentStepService,
18019
18039
  dt as domParser,
@@ -18048,7 +18068,7 @@ export {
18048
18068
  ud as getPointOfRotation,
18049
18069
  Td as getProductCollections,
18050
18070
  gd as getSEPoint,
18051
- Da as getSvgElement,
18071
+ xa as getSvgElement,
18052
18072
  Zd as getTemplateBundles,
18053
18073
  Xd as getTemplateTransactions,
18054
18074
  Od as getTransaction,
@@ -18068,7 +18088,7 @@ export {
18068
18088
  Ol as metafieldManager,
18069
18089
  Cd as mmPerPixel,
18070
18090
  ir as modelStepService,
18071
- Pa as modifySVGColors,
18091
+ Fa as modifySVGColors,
18072
18092
  or as moduleStepService,
18073
18093
  Gd as nameBundle,
18074
18094
  Wd as nameTransaction,
@@ -18082,19 +18102,19 @@ export {
18082
18102
  lr as questionStepService,
18083
18103
  nd as registerFetchImplementation,
18084
18104
  ad as registerWindowImplementation,
18085
- _a as rehydrateSerializedLayout,
18105
+ Xa as rehydrateSerializedLayout,
18086
18106
  mi as rgbToPms,
18087
18107
  ge as rotateAroundPoint,
18088
- Ia as sanitizeSvgTree,
18108
+ Ba as sanitizeSvgTree,
18089
18109
  ii as setBearerAuthenticationToken,
18090
18110
  Dn as setCanvasModule,
18091
18111
  qt as shapeStepService,
18092
18112
  $o as shortenUrl,
18093
18113
  gt as spiffCoreConfiguration,
18094
18114
  xd as stepAspectValuesToDesignInputSteps,
18095
- Ha as svgColorValueToDefinition,
18115
+ ja as svgColorValueToDefinition,
18096
18116
  Zn as svgStringDimensions,
18097
- va as svgToDataUrl,
18117
+ Ea as svgToDataUrl,
18098
18118
  q as textStepService,
18099
18119
  Yo as toast,
18100
18120
  aA as validateWorkflowExperienceRecipient,