@spiffcommerce/core 29.1.0-beta.5d6da371-2c8b-5fa7-b96d-4f71c0128832 → 29.1.0-beta.6360528b-2614-5af7-83f7-586006b13e07

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
@@ -219,14 +219,14 @@ const An = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @_
219
219
  t ? xr(r).then(e).catch(a) : rt(r).then((n) => {
220
220
  n.text().then(e).catch(a);
221
221
  }).catch(a);
222
- }), hn = (r) => Ar(r), Oe = /* @__PURE__ */ new Map(), Tr = async (r, t) => {
222
+ }), hn = (r) => Ar(r), $e = /* @__PURE__ */ new Map(), Tr = async (r, t) => {
223
223
  if (Mt([typeof FontFace])) {
224
- if (Oe.has(t))
225
- return Oe.get(t);
224
+ if ($e.has(t))
225
+ return $e.get(t);
226
226
  const e = r.names.fullName.en, a = new FontFace(e, `url(${t})`);
227
227
  document.fonts.add(a);
228
228
  const n = a.load();
229
- return Oe.set(t, n), n;
229
+ return $e.set(t, n), n;
230
230
  }
231
231
  }, bt = () => {
232
232
  if (Mt([typeof XMLSerializer]))
@@ -291,8 +291,8 @@ const An = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @_
291
291
  !i || !i.result ? e() : t(i.result.toString());
292
292
  }, a.readAsDataURL(r);
293
293
  });
294
- let Or, ma;
295
- const $r = (r) => {
294
+ let $r, ma;
295
+ const Or = (r) => {
296
296
  ma = r;
297
297
  }, Ur = () => ma;
298
298
  let gn;
@@ -306,7 +306,7 @@ const Lr = (r) => {
306
306
  }), zr = async () => {
307
307
  const r = {
308
308
  applicationKey: ma,
309
- customerToken: Or,
309
+ customerToken: $r,
310
310
  bearer: gn
311
311
  };
312
312
  return typeof window < "u" && (window.location.href.includes("/workflows/product/") || window.location.href.includes("hub=true")) ? { ...await Vr(), ...r } : r;
@@ -412,9 +412,9 @@ function fn(r) {
412
412
  throw t;
413
413
  }
414
414
  }
415
- let $e;
415
+ let Oe;
416
416
  function ga() {
417
- return $e === void 0 && ($e = Mr()), $e;
417
+ return Oe === void 0 && (Oe = Mr()), Oe;
418
418
  }
419
419
  let se = null;
420
420
  const qr = (r) => new Promise((t) => {
@@ -3188,22 +3188,22 @@ function Rc(r, t = 64) {
3188
3188
  return e.sort((A, u) => A.distance - u.distance);
3189
3189
  }
3190
3190
  const Kr = Yt.map((r, t) => ({ pms: r, hex: Ft[t] })), _r = new mr(Kr, { keys: ["pms"] });
3191
- function Oc(r, t) {
3191
+ function $c(r, t) {
3192
3192
  return _r.search(r, t ? { limit: t } : void 0);
3193
3193
  }
3194
3194
  let Qt = null;
3195
3195
  function Xr(r) {
3196
3196
  if (r.startsWith("#"))
3197
- return Oa(r);
3197
+ return $a(r);
3198
3198
  if (!document)
3199
3199
  throw new Error("browserColorToHex is only supported on browsers");
3200
3200
  if (Qt || (Qt = document.createElement("canvas").getContext("2d")), !Qt)
3201
3201
  throw new Error("Failed to create canvas context required to convert colors");
3202
3202
  Qt.fillStyle = r;
3203
- const t = Oa(Qt.fillStyle);
3203
+ const t = $a(Qt.fillStyle);
3204
3204
  return t || console.error(`Unknown browser color ${r}`), t;
3205
3205
  }
3206
- function Oa(r) {
3206
+ function $a(r) {
3207
3207
  const t = r.substring(1).toUpperCase();
3208
3208
  return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
3209
3209
  }
@@ -3218,7 +3218,7 @@ const oe = (r) => {
3218
3218
  return `icc-named-color(${t.slice(e + 1).slice(0, -4)}, ${r.namedColor})`;
3219
3219
  }
3220
3220
  return `icc-named-color(${r.profileName}, ${r.namedColor})`;
3221
- }, $a = (r) => {
3221
+ }, Oa = (r) => {
3222
3222
  const t = r.split(/[ ](?=[^)]*?(?:\(|$))/);
3223
3223
  if (t.length === 0)
3224
3224
  return { browserValue: "#000000" };
@@ -3362,12 +3362,12 @@ const oe = (r) => {
3362
3362
  Zr.includes(s.tagName) && !s.attributes.getNamedItem("fill") && s.setAttribute("fill", "black");
3363
3363
  const o = s.attributes.getNamedItem("fill");
3364
3364
  if (o && o.value !== "none" && !o.value.startsWith("url(")) {
3365
- const c = $a(o.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
3365
+ const c = Oa(o.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
3366
3366
  s.setAttribute("fill", c.browserValue), s.classList.add(A), a[d] = c;
3367
3367
  }
3368
3368
  const l = s.attributes.getNamedItem("stroke");
3369
3369
  if (l && l.value !== "none" && !l.value.startsWith("url(")) {
3370
- const c = $a(l.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-stroke-${d}`;
3370
+ const c = Oa(l.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-stroke-${d}`;
3371
3371
  s.classList.add(A), s.setAttribute("stroke", c.browserValue), a[d] = c;
3372
3372
  }
3373
3373
  });
@@ -4050,6 +4050,7 @@ const j = new Ci(), bn = v`
4050
4050
  mandatory
4051
4051
  title
4052
4052
  uniqueIdentifier
4053
+ customFieldIndex
4053
4054
  }
4054
4055
  mandatory
4055
4056
  }
@@ -4150,6 +4151,12 @@ const j = new Ci(), bn = v`
4150
4151
  country
4151
4152
  mobile
4152
4153
  company
4154
+ apartment
4155
+ customField1
4156
+ customField2
4157
+ customField3
4158
+ customField4
4159
+ customField5
4153
4160
  }
4154
4161
  product {
4155
4162
  id
@@ -4222,6 +4229,7 @@ const j = new Ci(), bn = v`
4222
4229
  mandatory
4223
4230
  title
4224
4231
  uniqueIdentifier
4232
+ customFieldIndex
4225
4233
  }
4226
4234
  mandatory
4227
4235
  }
@@ -4291,6 +4299,7 @@ const j = new Ci(), bn = v`
4291
4299
  mandatory
4292
4300
  title
4293
4301
  uniqueIdentifier
4302
+ customFieldIndex
4294
4303
  }
4295
4304
  mandatory
4296
4305
  }
@@ -5052,6 +5061,7 @@ const j = new Ci(), bn = v`
5052
5061
  mandatory
5053
5062
  title
5054
5063
  uniqueIdentifier
5064
+ customFieldIndex
5055
5065
  }
5056
5066
  mandatory
5057
5067
  }
@@ -5111,7 +5121,7 @@ const j = new Ci(), bn = v`
5111
5121
  ...MarketplaceThemeInstallConfigurationFields
5112
5122
  }
5113
5123
  }
5114
- `, Oi = v`
5124
+ `, $i = v`
5115
5125
  ${bn}
5116
5126
  ${Ne}
5117
5127
  query GetCurrentIntegration($themeConfigurationId: String) {
@@ -5124,7 +5134,7 @@ const j = new Ci(), bn = v`
5124
5134
  ...ActiveIntegrationFields
5125
5135
  }
5126
5136
  }
5127
- `, $i = v`
5137
+ `, Oi = v`
5128
5138
  ${Ne}
5129
5139
  query ReadTransactionForMarketplaceTheme($id: String!) {
5130
5140
  transactions(ids: [$id]) {
@@ -5157,7 +5167,7 @@ const j = new Ci(), bn = v`
5157
5167
  timestamp
5158
5168
  }
5159
5169
  }
5160
- `, Ot = [I.SilentIllustration, I.ProductOverlay], zi = async (r) => {
5170
+ `, $t = [I.SilentIllustration, I.ProductOverlay], zi = async (r) => {
5161
5171
  const t = [];
5162
5172
  r.introduction && t.push({
5163
5173
  name: "Introduction",
@@ -5180,16 +5190,16 @@ const j = new Ci(), bn = v`
5180
5190
  t.push({
5181
5191
  name: a.stepName,
5182
5192
  title: a.stepTitle,
5183
- renderableSteps: Ot.includes(a.type) ? [] : [a],
5184
- silentSteps: Ot.includes(a.type) ? [a] : []
5193
+ renderableSteps: $t.includes(a.type) ? [] : [a],
5194
+ silentSteps: $t.includes(a.type) ? [a] : []
5185
5195
  });
5186
5196
  else {
5187
5197
  const i = t.find((s) => s.name === n.name);
5188
- i ? Ot.includes(a.type) ? i.silentSteps.push(a) : i.renderableSteps.push(a) : t.push({
5198
+ i ? $t.includes(a.type) ? i.silentSteps.push(a) : i.renderableSteps.push(a) : t.push({
5189
5199
  name: n.name,
5190
5200
  title: n.name,
5191
- renderableSteps: Ot.includes(a.type) ? [] : [a],
5192
- silentSteps: Ot.includes(a.type) ? [a] : []
5201
+ renderableSteps: $t.includes(a.type) ? [] : [a],
5202
+ silentSteps: $t.includes(a.type) ? [a] : []
5193
5203
  });
5194
5204
  }
5195
5205
  }
@@ -5339,12 +5349,12 @@ const Q = () => {
5339
5349
  viewBox: A,
5340
5350
  width: u
5341
5351
  }) => {
5342
- var E;
5343
- const h = e || 0, m = 2 * ((l == null ? void 0 : l.scale) || 1), g = A || { x: 0, y: 0, width: u, height: i }, p = `${g.x} ${g.y} ${g.width} ${g.height}`, f = Q(), C = a.purpose === Ht.FreeDesign && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ x("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ x("rect", { width: g.width, height: g.height, rx: h }) }) }), w = (E = a.colorProfiles) == null ? void 0 : E.map((b, P) => (
5352
+ var b;
5353
+ const h = e || 0, m = 2 * ((l == null ? void 0 : l.scale) || 1), g = A || { x: 0, y: 0, width: u, height: i }, p = `${g.x} ${g.y} ${g.width} ${g.height}`, f = Q(), C = a.purpose === Ht.FreeDesign && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ x("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ x("rect", { width: g.width, height: g.height, rx: h }) }) }), w = (b = a.colorProfiles) == null ? void 0 : b.map((E, P) => (
5344
5354
  /* @ts-ignore */
5345
- /* @__PURE__ */ x("color-profile", { name: b.name, xlinkHref: b.key, children: " " }, P)
5346
- )), S = n.map((b) => ({
5347
- ...b,
5355
+ /* @__PURE__ */ x("color-profile", { name: E.name, xlinkHref: E.key, children: " " }, P)
5356
+ )), S = n.map((E) => ({
5357
+ ...E,
5348
5358
  _renderingConfiguration: a,
5349
5359
  mask: l ? `url(#viewmask-${f})` : void 0
5350
5360
  })), y = va(S);
@@ -5384,7 +5394,7 @@ const Q = () => {
5384
5394
  {
5385
5395
  id: "element-group",
5386
5396
  clipPath: a.purpose === Ht.FreeDesign ? "url(#viewboxClip)" : void 0,
5387
- children: y.map((b) => Rn(b)).filter((b) => !!b)
5397
+ children: y.map((E) => Rn(E)).filter((E) => !!E)
5388
5398
  }
5389
5399
  ),
5390
5400
  l && /* @__PURE__ */ x(
@@ -5425,7 +5435,7 @@ const Q = () => {
5425
5435
  ]
5426
5436
  }
5427
5437
  );
5428
- }, $c = (r, t, e, a, n) => {
5438
+ }, Oc = (r, t, e, a, n) => {
5429
5439
  const i = pt(n), s = e / 2, o = a / 2, l = r + s, c = t + o, d = Math.sin(i), A = Math.cos(i), u = s, h = s, m = -o, g = o, p = u * A - m * d, f = h * A - g * d, C = u * d + m * A, w = h * d + g * A, S = Math.max(Math.abs(p), Math.abs(f)), y = Math.max(Math.abs(C), Math.abs(w));
5430
5440
  return {
5431
5441
  minX: l - S,
@@ -5589,8 +5599,8 @@ const Q = () => {
5589
5599
  /* @__PURE__ */ x("feFuncB", { type: "discrete", tableValues: n() })
5590
5600
  ] })
5591
5601
  ] }) }) }), s = r.rotation || 0, o = pt(s), l = Math.cos(o), c = -Math.sin(o), d = () => {
5592
- var w, S, y, E, b, P, D, F, k, T;
5593
- const A = ((w = r.pattern) == null ? void 0 : w.x) || 0, u = ((S = r.pattern) == null ? void 0 : S.y) || 0, h = ((y = r.pattern) == null ? void 0 : y.width) || 0, m = ((E = r.pattern) == null ? void 0 : E.height) || 0, g = ((b = r.pattern) == null ? void 0 : b.scaleX) || 1, p = ((P = r.pattern) == null ? void 0 : P.scaleY) || 1, f = ((D = r.pattern) == null ? void 0 : D.rotation) || 0;
5602
+ var w, S, y, b, E, P, D, F, k, T;
5603
+ const A = ((w = r.pattern) == null ? void 0 : w.x) || 0, u = ((S = r.pattern) == null ? void 0 : S.y) || 0, h = ((y = r.pattern) == null ? void 0 : y.width) || 0, m = ((b = r.pattern) == null ? void 0 : b.height) || 0, g = ((E = r.pattern) == null ? void 0 : E.scaleX) || 1, p = ((P = r.pattern) == null ? void 0 : P.scaleY) || 1, f = ((D = r.pattern) == null ? void 0 : D.rotation) || 0;
5594
5604
  return [(F = r.pattern) != null && F.svg ? {
5595
5605
  id: `${t}-contents`,
5596
5606
  type: M.Illustration,
@@ -5751,16 +5761,16 @@ const Ji = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Le = /* @_
5751
5761
  parseInt(u.getAttribute("font-size") ?? "72")
5752
5762
  ), S = w.getBoundingBox().x2 - w.getBoundingBox().x1;
5753
5763
  let y = 0;
5754
- const E = A.getAttribute("text-anchor");
5755
- E === "middle" ? y = S / 2 : E === "end" && (y = S);
5756
- const b = g.getPath(
5764
+ const b = A.getAttribute("text-anchor");
5765
+ b === "middle" ? y = S / 2 : b === "end" && (y = S);
5766
+ const E = g.getPath(
5757
5767
  A.innerHTML,
5758
5768
  parseFloat(A.getAttribute("x") ?? "0") - y,
5759
5769
  parseFloat(A.getAttribute("y") ?? "0"),
5760
5770
  parseInt(u.getAttribute("font-size") ?? "72")
5761
5771
  );
5762
- b.fill = p, b.stroke = f, b.strokeWidth = parseFloat(C ?? "0");
5763
- const P = b.toSVG(2), F = t.parseFromString(P, "image/svg+xml").firstElementChild;
5772
+ E.fill = p, E.stroke = f, E.strokeWidth = parseFloat(C ?? "0");
5773
+ const P = E.toSVG(2), F = t.parseFromString(P, "image/svg+xml").firstElementChild;
5764
5774
  h.appendChild(F);
5765
5775
  }
5766
5776
  return e.querySelectorAll("text").forEach((d) => d.remove()), bt().serializeToString(a);
@@ -6197,7 +6207,7 @@ const ae = (r) => {
6197
6207
  if (r.defaultVariant !== void 0)
6198
6208
  return t.find((e) => e.id === r.defaultVariant);
6199
6209
  }
6200
- }, At = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ new Map(), On = async (r, t) => {
6210
+ }, At = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ new Map(), $n = async (r, t) => {
6201
6211
  if (!t) {
6202
6212
  if (!r)
6203
6213
  throw new Error("No region or src supplied. Cannot construct frame!");
@@ -6274,7 +6284,7 @@ const ae = (r) => {
6274
6284
  if (At.has(r))
6275
6285
  return At.get(r);
6276
6286
  if (r.startsWith("data:image/svg+xml")) {
6277
- const a = fr(r), n = new TextDecoder().decode(a.buffer), i = $n(n), s = {
6287
+ const a = fr(r), n = new TextDecoder().decode(a.buffer), i = On(n), s = {
6278
6288
  src: r,
6279
6289
  width: i.width,
6280
6290
  height: i.height,
@@ -6301,8 +6311,8 @@ const ae = (r) => {
6301
6311
  }
6302
6312
  }, ba = async (r) => {
6303
6313
  const t = await nt(r);
6304
- return $n(t);
6305
- }, za = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r), $n = (r) => {
6314
+ return On(t);
6315
+ }, za = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r), On = (r) => {
6306
6316
  const a = dt().parseFromString(r, "image/svg+xml").querySelector("svg");
6307
6317
  if (!a)
6308
6318
  throw new Error("No svg tag found, this svg must be malformed!");
@@ -6313,7 +6323,7 @@ const ae = (r) => {
6313
6323
  width: o[2],
6314
6324
  height: o[3]
6315
6325
  };
6316
- }, $t = (r, t) => {
6326
+ }, Ot = (r, t) => {
6317
6327
  const e = r.layoutState.elements.filter((n) => n.layer === t), a = Math.max(...e.map((n) => n.layerIndex).filter((n) => n !== void 0));
6318
6328
  return Math.max(a, 0) + 1;
6319
6329
  }, Un = async (r) => new Promise((t) => {
@@ -6389,7 +6399,7 @@ const ae = (r) => {
6389
6399
  };
6390
6400
  class _c {
6391
6401
  static async getFrame(t, e) {
6392
- const a = await On(e.region, e.src), n = await Qe(a), i = e.region || await Ut(t, M.Frame);
6402
+ const a = await $n(e.region, e.src), n = await Qe(a), i = e.region || await Ut(t, M.Frame);
6393
6403
  return {
6394
6404
  id: Q(),
6395
6405
  x: i.left,
@@ -6397,7 +6407,7 @@ class _c {
6397
6407
  width: i.width,
6398
6408
  height: i.height,
6399
6409
  layer: i.layer || 0,
6400
- layerIndex: i.layerIndex || $t(t, i.layer || 0),
6410
+ layerIndex: i.layerIndex || Ot(t, i.layer || 0),
6401
6411
  rotation: i.rotation,
6402
6412
  scaleX: i.width / n.width,
6403
6413
  scaleY: i.height / n.height,
@@ -6426,7 +6436,7 @@ class _c {
6426
6436
  width: a.width,
6427
6437
  height: a.height,
6428
6438
  layer: a.layer || 0,
6429
- layerIndex: a.layerIndex || $t(t, a.layer || 0),
6439
+ layerIndex: a.layerIndex || Ot(t, a.layer || 0),
6430
6440
  immutable: a.immutable,
6431
6441
  preserveAspectRatio: "none"
6432
6442
  };
@@ -6455,7 +6465,7 @@ class _c {
6455
6465
  fill: (i == null ? void 0 : i.color) || a.colour || "#000000",
6456
6466
  fontData: o,
6457
6467
  layer: A.layer || 0,
6458
- layerIndex: A.layerIndex || $t(t, A.layer || 0),
6468
+ layerIndex: A.layerIndex || Ot(t, A.layer || 0),
6459
6469
  paths: a.paths,
6460
6470
  rotation: A.rotation,
6461
6471
  vertical: a.vertical,
@@ -6518,7 +6528,7 @@ class _c {
6518
6528
  width: i.width,
6519
6529
  height: i.height,
6520
6530
  layer: i.layer || 0,
6521
- layerIndex: i.layerIndex || $t(t, i.layer || 0),
6531
+ layerIndex: i.layerIndex || Ot(t, i.layer || 0),
6522
6532
  immutable: i.immutable
6523
6533
  };
6524
6534
  }
@@ -6538,7 +6548,7 @@ class _c {
6538
6548
  width: a.width,
6539
6549
  height: a.height,
6540
6550
  layer: a.layer || 0,
6541
- layerIndex: a.layerIndex || $t(t, a.layer || 0),
6551
+ layerIndex: a.layerIndex || Ot(t, a.layer || 0),
6542
6552
  immutable: a.immutable
6543
6553
  };
6544
6554
  }
@@ -6612,7 +6622,7 @@ const L = (r, t) => _(r, t).elements.find((n) => n.id === r), _ = (r, t) => {
6612
6622
  }
6613
6623
  }
6614
6624
  };
6615
- class O {
6625
+ class $ {
6616
6626
  undo() {
6617
6627
  if (!this.oldState)
6618
6628
  throw new Error("Cannot undo.");
@@ -6622,7 +6632,7 @@ class O {
6622
6632
  this.oldState = t;
6623
6633
  }
6624
6634
  }
6625
- class Ga extends O {
6635
+ class Ga extends $ {
6626
6636
  constructor(t) {
6627
6637
  super(), this.serializableWorkflow = t;
6628
6638
  }
@@ -6633,7 +6643,7 @@ class Ga extends O {
6633
6643
  };
6634
6644
  }
6635
6645
  }
6636
- class Xc extends O {
6646
+ class Xc extends $ {
6637
6647
  constructor(t, e, a) {
6638
6648
  super(), this.id = t, this.x = e, this.y = a;
6639
6649
  }
@@ -6656,7 +6666,7 @@ class Xc extends O {
6656
6666
  };
6657
6667
  }
6658
6668
  }
6659
- class Zc extends O {
6669
+ class Zc extends $ {
6660
6670
  constructor(t, e) {
6661
6671
  super(), this.id = t, this.angle = e;
6662
6672
  }
@@ -6678,7 +6688,7 @@ class Zc extends O {
6678
6688
  };
6679
6689
  }
6680
6690
  }
6681
- class td extends O {
6691
+ class td extends $ {
6682
6692
  constructor(t, e, a) {
6683
6693
  super(), this.id = t, this.width = Math.abs(e), this.height = Math.abs(a);
6684
6694
  }
@@ -6709,7 +6719,7 @@ class td extends O {
6709
6719
  };
6710
6720
  }
6711
6721
  }
6712
- class $ extends O {
6722
+ class O extends $ {
6713
6723
  constructor(t) {
6714
6724
  super(), this.commands = t;
6715
6725
  }
@@ -6717,7 +6727,7 @@ class $ extends O {
6717
6727
  return this.oldState = t, this.commands.reduce((e, a) => a.apply(e), t);
6718
6728
  }
6719
6729
  }
6720
- class Ln extends O {
6730
+ class Ln extends $ {
6721
6731
  constructor(t) {
6722
6732
  super(), this.layout = t;
6723
6733
  }
@@ -6735,7 +6745,7 @@ class Ln extends O {
6735
6745
  };
6736
6746
  }
6737
6747
  }
6738
- class W extends O {
6748
+ class W extends $ {
6739
6749
  /**
6740
6750
  * @param initialParams The initial parameters to be set on this new object
6741
6751
  * @param callback An optional callback function to be notified when the object has been instantiated
@@ -6795,7 +6805,7 @@ class W extends O {
6795
6805
  return a !== void 0 ? a + 1 : 0;
6796
6806
  }
6797
6807
  }
6798
- class Et extends O {
6808
+ class Et extends $ {
6799
6809
  constructor(t) {
6800
6810
  super(), this.id = t;
6801
6811
  }
@@ -6817,7 +6827,7 @@ class Et extends O {
6817
6827
  };
6818
6828
  }
6819
6829
  }
6820
- class ds extends O {
6830
+ class ds extends $ {
6821
6831
  constructor(t, e, a) {
6822
6832
  super(), this.id = t, this.color = e, this.textFillSpotColor = a;
6823
6833
  }
@@ -6841,7 +6851,7 @@ class ds extends O {
6841
6851
  };
6842
6852
  }
6843
6853
  }
6844
- class We extends O {
6854
+ class We extends $ {
6845
6855
  constructor(t, e) {
6846
6856
  super(), this.id = t, this.imageFill = e;
6847
6857
  }
@@ -6863,7 +6873,7 @@ class We extends O {
6863
6873
  };
6864
6874
  }
6865
6875
  }
6866
- class As extends O {
6876
+ class As extends $ {
6867
6877
  constructor(t, e) {
6868
6878
  super(), this.id = t, this.size = e;
6869
6879
  }
@@ -6885,7 +6895,7 @@ class As extends O {
6885
6895
  };
6886
6896
  }
6887
6897
  }
6888
- class Wa extends O {
6898
+ class Wa extends $ {
6889
6899
  constructor(t, e) {
6890
6900
  super(), this.id = t, this.fontData = e;
6891
6901
  }
@@ -6907,7 +6917,7 @@ class Wa extends O {
6907
6917
  };
6908
6918
  }
6909
6919
  }
6910
- class us extends O {
6920
+ class us extends $ {
6911
6921
  constructor(t, e) {
6912
6922
  super(), this.id = t, this.align = e;
6913
6923
  }
@@ -6929,7 +6939,7 @@ class us extends O {
6929
6939
  };
6930
6940
  }
6931
6941
  }
6932
- class hs extends O {
6942
+ class hs extends $ {
6933
6943
  constructor(t, e, a) {
6934
6944
  super(), this.id = t, this.imageData = e, this.offsets = a;
6935
6945
  }
@@ -6965,7 +6975,7 @@ class hs extends O {
6965
6975
  };
6966
6976
  }
6967
6977
  }
6968
- class ms extends O {
6978
+ class ms extends $ {
6969
6979
  constructor(t, e, a, n, i) {
6970
6980
  super(), this.id = t, this.useThreshold = e, this.invertThreshold = a, this.threshold = n, this.thresholdSaturation = i;
6971
6981
  }
@@ -6990,7 +7000,7 @@ class ms extends O {
6990
7000
  };
6991
7001
  }
6992
7002
  }
6993
- class ed extends O {
7003
+ class ed extends $ {
6994
7004
  constructor(t, e) {
6995
7005
  super(), this.id = t, this.src = e;
6996
7006
  }
@@ -7012,7 +7022,7 @@ class ed extends O {
7012
7022
  };
7013
7023
  }
7014
7024
  }
7015
- class gs extends O {
7025
+ class gs extends $ {
7016
7026
  constructor(t, e) {
7017
7027
  super(), this.id = t, this.text = e;
7018
7028
  }
@@ -7031,7 +7041,7 @@ class gs extends O {
7031
7041
  };
7032
7042
  }
7033
7043
  }
7034
- class qe extends O {
7044
+ class qe extends $ {
7035
7045
  constructor(t, e, a) {
7036
7046
  super(), this.id = t, this.strokeColor = e, this.strokeThickness = a;
7037
7047
  }
@@ -7054,7 +7064,7 @@ class qe extends O {
7054
7064
  };
7055
7065
  }
7056
7066
  }
7057
- class oa extends O {
7067
+ class oa extends $ {
7058
7068
  constructor(t, e, a) {
7059
7069
  super(), this.id = t, this.className = e, this.fill = a;
7060
7070
  }
@@ -7086,7 +7096,7 @@ class oa extends O {
7086
7096
  };
7087
7097
  }
7088
7098
  }
7089
- class ps extends O {
7099
+ class ps extends $ {
7090
7100
  constructor(t, e, a) {
7091
7101
  super(), this.id = t, this.svgBody = e, this.objectURL = a;
7092
7102
  }
@@ -7109,7 +7119,7 @@ class ps extends O {
7109
7119
  };
7110
7120
  }
7111
7121
  }
7112
- class ad extends O {
7122
+ class ad extends $ {
7113
7123
  /**
7114
7124
  * @param id The targeted element to bring to the front.
7115
7125
  */
@@ -7138,7 +7148,7 @@ class ad extends O {
7138
7148
  };
7139
7149
  }
7140
7150
  }
7141
- class nd extends O {
7151
+ class nd extends $ {
7142
7152
  /**
7143
7153
  * @param id The targeted element to bring to the back.
7144
7154
  */
@@ -7169,7 +7179,7 @@ class nd extends O {
7169
7179
  };
7170
7180
  }
7171
7181
  }
7172
- class rd extends O {
7182
+ class rd extends $ {
7173
7183
  /**
7174
7184
  * @param id The targeted element to bring to the front.
7175
7185
  */
@@ -7196,7 +7206,7 @@ class rd extends O {
7196
7206
  };
7197
7207
  }
7198
7208
  }
7199
- class id extends O {
7209
+ class id extends $ {
7200
7210
  /**
7201
7211
  * @param id The targeted element to bring to the front.
7202
7212
  */
@@ -7449,7 +7459,7 @@ class Cs {
7449
7459
  A
7450
7460
  );
7451
7461
  });
7452
- return { command: new $(l), followup: async () => {
7462
+ return { command: new O(l), followup: async () => {
7453
7463
  } };
7454
7464
  }
7455
7465
  }
@@ -7760,11 +7770,11 @@ class Be {
7760
7770
  scaleX: (w == null ? void 0 : w.zoom) || 1,
7761
7771
  scaleY: (w == null ? void 0 : w.zoom) || 1,
7762
7772
  rotation: 0
7763
- } : void 0, y = Q(), b = n.getLayouts().find((P) => P.panelId === m.panelId);
7764
- if (!b)
7773
+ } : void 0, y = Q(), E = n.getLayouts().find((P) => P.panelId === m.panelId);
7774
+ if (!E)
7765
7775
  throw new Y(m);
7766
7776
  return {
7767
- command: this.getCreateElementCommand(y, m, b, {
7777
+ command: this.getCreateElementCommand(y, m, E, {
7768
7778
  frameData: p,
7769
7779
  pattern: S,
7770
7780
  disablePlaceholder: t.data.disablePlaceholder,
@@ -7779,7 +7789,7 @@ class Be {
7779
7789
  })
7780
7790
  ), A = d.map((m) => m.command), u = d.map((m) => m.removeExistingCommands).flat();
7781
7791
  return {
7782
- command: new $([...A, ...u]),
7792
+ command: new O([...A, ...u]),
7783
7793
  followup: async () => {
7784
7794
  i && i(!1), await n.setSelectionsAndElements(
7785
7795
  t.stepName,
@@ -7956,7 +7966,7 @@ class ws {
7956
7966
  c.push(new oa(d, A, u));
7957
7967
  c.push(new ps(d, o, l));
7958
7968
  }
7959
- return new $(c);
7969
+ return new O(c);
7960
7970
  }
7961
7971
  async changeColors(t, e, a, n, i) {
7962
7972
  var h, m;
@@ -8038,7 +8048,7 @@ class ws {
8038
8048
  return w.toLowerCase() === ((S = C.color) == null ? void 0 : S.toLowerCase()) ? C.name : w;
8039
8049
  });
8040
8050
  })), i.updateMetadata(t.stepName, { colors: g }), {
8041
- command: new $(m),
8051
+ command: new O(m),
8042
8052
  followup: async () => {
8043
8053
  var w, S;
8044
8054
  await i.setSelectionsAndElements(
@@ -8052,22 +8062,22 @@ class ws {
8052
8062
  const C = ((w = o.assetConfiguration) == null ? void 0 : w.defaultColorVariants) || [];
8053
8063
  if (C.length !== 0) {
8054
8064
  const y = {};
8055
- (((S = o.assetConfiguration) == null ? void 0 : S.channelNumbers) || []).forEach((b) => {
8065
+ (((S = o.assetConfiguration) == null ? void 0 : S.channelNumbers) || []).forEach((E) => {
8056
8066
  var D;
8057
- const P = C.find((F) => F.channelNumber === b.number);
8058
- P && (y[`${b.id.replace(/\W/g, "")}`] = { browserValue: ((D = P == null ? void 0 : P.variant) == null ? void 0 : D.color) || "" });
8067
+ const P = C.find((F) => F.channelNumber === E.number);
8068
+ P && (y[`${E.id.replace(/\W/g, "")}`] = { browserValue: ((D = P == null ? void 0 : P.variant) == null ? void 0 : D.color) || "" });
8059
8069
  }), await this.changeColors(
8060
8070
  t,
8061
- u.map((b) => b.regionElement),
8071
+ u.map((E) => E.regionElement),
8062
8072
  i,
8063
8073
  () => i.getCommandContext().getAllLayouts(),
8064
8074
  new Map(Object.entries(y))
8065
8075
  );
8066
8076
  }
8067
8077
  if (t.data.colorPickerEnabled) {
8068
- const y = await this.availableColors(t, i) || [], E = Object.keys(c.colors), b = y.length === 1 && E.length === 1;
8069
- if (b) {
8070
- const P = y[0], D = E[0];
8078
+ const y = await this.availableColors(t, i) || [], b = Object.keys(c.colors), E = y.length === 1 && b.length === 1;
8079
+ if (E) {
8080
+ const P = y[0], D = b[0];
8071
8081
  await this.changeColors(
8072
8082
  t,
8073
8083
  u.map((F) => F.regionElement),
@@ -8076,7 +8086,7 @@ class ws {
8076
8086
  /* @__PURE__ */ new Map([[D, P.variant.color]])
8077
8087
  );
8078
8088
  }
8079
- !b && C.length === 0 && await this.changeColors(
8089
+ !E && C.length === 0 && await this.changeColors(
8080
8090
  t,
8081
8091
  u.map((P) => P.regionElement),
8082
8092
  i,
@@ -8315,7 +8325,7 @@ class vs {
8315
8325
  ), {
8316
8326
  id: m,
8317
8327
  region: u,
8318
- command: new $(f)
8328
+ command: new O(f)
8319
8329
  };
8320
8330
  };
8321
8331
  if (i.length > 0) {
@@ -8326,7 +8336,7 @@ class vs {
8326
8336
  return c(m, h.region, h.id);
8327
8337
  }).filter((h) => !!h).filter((h) => !!h).map((h) => h && h.command);
8328
8338
  return {
8329
- command: new $(u),
8339
+ command: new O(u),
8330
8340
  followup: async () => {
8331
8341
  }
8332
8342
  };
@@ -8335,7 +8345,7 @@ class vs {
8335
8345
  (h) => c(s.svgPrint(e, h), h)
8336
8346
  ), u = A.filter((h) => !!h).map((h) => h && h.command);
8337
8347
  return {
8338
- command: new $(u),
8348
+ command: new O(u),
8339
8349
  followup: async () => {
8340
8350
  const h = A.filter((m) => m).map((m) => m && { id: m.id, region: m.region });
8341
8351
  await a.setSelectionsAndElements(
@@ -8443,7 +8453,7 @@ class Es {
8443
8453
  };
8444
8454
  }, d = t.data.regions.map(c);
8445
8455
  return {
8446
- command: new $([...l, ...d.map((A) => A.command)]),
8456
+ command: new O([...l, ...d.map((A) => A.command)]),
8447
8457
  followup: async () => {
8448
8458
  await a.setSelectionsAndElements(
8449
8459
  t.stepName,
@@ -8538,7 +8548,7 @@ class Bs {
8538
8548
  throw new Y(l);
8539
8549
  return new oa(o.id, this.shapeFillId, t);
8540
8550
  }).filter((o) => !!o);
8541
- a.getCommandDispatcher()(new $(s)), a.updateStorage(e.stepName, { colour: t });
8551
+ a.getCommandDispatcher()(new O(s)), a.updateStorage(e.stepName, { colour: t });
8542
8552
  }
8543
8553
  async init(t, e, a) {
8544
8554
  const n = t.option;
@@ -8611,7 +8621,7 @@ class Bs {
8611
8621
  return new oa(A.id, this.shapeFillId, m);
8612
8622
  }, d = a.map(c).filter((A) => !!A);
8613
8623
  return {
8614
- command: new $(d),
8624
+ command: new O(d),
8615
8625
  followup: async () => {
8616
8626
  await n.setSelectionsAndElements(
8617
8627
  t.stepName,
@@ -8674,7 +8684,7 @@ class Bs {
8674
8684
  };
8675
8685
  }, d = t.data.regions.map(c), A = d.filter((h) => !!h).map((h) => h == null ? void 0 : h.command), u = d.filter((h) => !!h).map((h) => ({ id: h.id, region: h.region }));
8676
8686
  return {
8677
- command: new $(A),
8687
+ command: new O(A),
8678
8688
  followup: async () => {
8679
8689
  await n.setSelectionsAndElements(
8680
8690
  t.stepName,
@@ -8826,7 +8836,7 @@ class Fs {
8826
8836
  if (p && t.globalPropertyAspectConfigurations) {
8827
8837
  const C = (s = p.getGlobalPropertyConfiguration()) == null ? void 0 : s.aspects, w = C == null ? void 0 : C.find((S) => {
8828
8838
  var y;
8829
- return S.type === z.Text && ((y = t.globalPropertyAspectConfigurations) == null ? void 0 : y.map((E) => E.aspectName).includes(S.name));
8839
+ return S.type === z.Text && ((y = t.globalPropertyAspectConfigurations) == null ? void 0 : y.map((b) => b.aspectName).includes(S.name));
8830
8840
  });
8831
8841
  if (w) {
8832
8842
  const y = p.getGlobalPropertyStateManager().getAspect(w.name);
@@ -9027,7 +9037,7 @@ class Fs {
9027
9037
  }
9028
9038
  return !a.data.curved && e.length > 0 && !Array.from(d.values()).every((u) => u) ? (o.errorData || (o.errorData = {}), o.errorData.doesNotFit = !0, o) : (n.updateStorage(a.stepName, { text: t }), n.updateMetadata(a.stepName, {
9029
9039
  text: s
9030
- }), (i != null && i.defaultCleared || !a.data.deleteDefaultOnFocus) && s.trim() !== "" && n.setMandatoryFulfilled(a.stepName, !0), o.command = new $(l), o);
9040
+ }), (i != null && i.defaultCleared || !a.data.deleteDefaultOnFocus) && s.trim() !== "" && n.setMandatoryFulfilled(a.stepName, !0), o.command = new O(l), o);
9031
9041
  }
9032
9042
  async selectVariant(t, e, a, n, i) {
9033
9043
  const s = await this.selectVariantCommand(
@@ -9068,12 +9078,12 @@ class Fs {
9068
9078
  let w = (A = n.storage) == null ? void 0 : A.text;
9069
9079
  const S = e.getWorkflowExperience().getBundle();
9070
9080
  if (S && t.globalPropertyAspectConfigurations) {
9071
- const y = (u = S.getGlobalPropertyConfiguration()) == null ? void 0 : u.aspects, E = y == null ? void 0 : y.find((b) => {
9081
+ const y = (u = S.getGlobalPropertyConfiguration()) == null ? void 0 : u.aspects, b = y == null ? void 0 : y.find((E) => {
9072
9082
  var P;
9073
- return b.type === z.Text && ((P = t.globalPropertyAspectConfigurations) == null ? void 0 : P.map((D) => D.aspectName).includes(b.name));
9083
+ return E.type === z.Text && ((P = t.globalPropertyAspectConfigurations) == null ? void 0 : P.map((D) => D.aspectName).includes(E.name));
9074
9084
  });
9075
- if (E) {
9076
- const P = S.getGlobalPropertyStateManager().getAspect(E.name);
9085
+ if (b) {
9086
+ const P = S.getGlobalPropertyStateManager().getAspect(b.name);
9077
9087
  P && (w = P);
9078
9088
  }
9079
9089
  }
@@ -9083,13 +9093,13 @@ class Fs {
9083
9093
  f,
9084
9094
  async () => {
9085
9095
  e.updateMetadata(t.stepName, { color: C, text: w }), e.updateStorage(t.stepName, { text: w, inputText: w });
9086
- const y = o.map((b) => new Wa(b.id, p)), E = new $(y);
9087
- e.getCommandDispatcher()(E);
9096
+ const y = o.map((E) => new Wa(E.id, p)), b = new O(y);
9097
+ e.getCommandDispatcher()(b);
9088
9098
  }
9089
9099
  ), o.length === 0 && l) {
9090
9100
  const y = j.getDefaultVariant(l);
9091
9101
  if (y) {
9092
- const E = await this.selectVariantCommand(
9102
+ const b = await this.selectVariantCommand(
9093
9103
  t,
9094
9104
  y,
9095
9105
  { text: w },
@@ -9100,7 +9110,7 @@ class Fs {
9100
9110
  () => {
9101
9111
  }
9102
9112
  );
9103
- e.getCommandDispatcher()(E.command);
9113
+ e.getCommandDispatcher()(b.command);
9104
9114
  }
9105
9115
  } else {
9106
9116
  const { command: y } = q.updateInputText(
@@ -9214,7 +9224,7 @@ class Fs {
9214
9224
  o
9215
9225
  );
9216
9226
  return m && h.push(m), {
9217
- command: new $(h),
9227
+ command: new O(h),
9218
9228
  followup: async () => {
9219
9229
  i.markUpdateCompleted(d), await i.setSelectionsAndElements(t.stepName, [e], n);
9220
9230
  }
@@ -9251,7 +9261,7 @@ class Fs {
9251
9261
  g.push(...f);
9252
9262
  }
9253
9263
  return m && g.push(m), {
9254
- command: new $(g),
9264
+ command: new O(g),
9255
9265
  followup: async () => {
9256
9266
  i.markUpdateCompleted(d);
9257
9267
  }
@@ -9310,7 +9320,7 @@ class Fs {
9310
9320
  curved: a.curved,
9311
9321
  paths: a.paths,
9312
9322
  fillSpotColorDefinition: f
9313
- }, y = [], E = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
9323
+ }, y = [], b = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
9314
9324
  if (!S.fontData)
9315
9325
  throw new G("Failed to resolve font data for text.");
9316
9326
  const [P, D] = pe(
@@ -9327,7 +9337,7 @@ class Fs {
9327
9337
  [l],
9328
9338
  { size: a.size, minSize: a.minSize, maxSize: a.maxSize }
9329
9339
  );
9330
- E.set(S.id, P), b.set(S.id, D);
9340
+ b.set(S.id, P), E.set(S.id, D);
9331
9341
  const F = a.curved || a.vertical ? l : (D || []).join(`
9332
9342
  `);
9333
9343
  y.push(
@@ -9365,7 +9375,7 @@ class Fs {
9365
9375
  const l = new As(a, t);
9366
9376
  i.push(l);
9367
9377
  }
9368
- return new $(i);
9378
+ return new O(i);
9369
9379
  }
9370
9380
  /**
9371
9381
  * @deprecated
@@ -9374,27 +9384,27 @@ class Fs {
9374
9384
  const A = (n || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = this.getProcessedInput(A, t.data, o), h = s.getRegionElements(t.stepName), m = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
9375
9385
  for (const S of h)
9376
9386
  if (S.region) {
9377
- const [y, E] = pe(
9387
+ const [y, b] = pe(
9378
9388
  e,
9379
9389
  a,
9380
9390
  S.region,
9381
9391
  [u],
9382
9392
  { size: t.data.size, minSize: t.data.minSize, maxSize: t.data.maxSize }
9383
9393
  );
9384
- m.set(S.id, y), g.set(S.id, E);
9394
+ m.set(S.id, y), g.set(S.id, b);
9385
9395
  }
9386
9396
  const f = (() => {
9387
9397
  if (t.data && t.data.maxLength && u.length > t.data.maxLength)
9388
9398
  return d && d(!0), { info: "0" };
9389
9399
  const S = s.getProfanities(), y = Ze(u.toLowerCase());
9390
- for (const E of y)
9391
- for (const b in S) {
9392
- const P = S[b].toLowerCase().replace(/\s/g, "");
9393
- if (E === P)
9400
+ for (const b of y)
9401
+ for (const E in S) {
9402
+ const P = S[E].toLowerCase().replace(/\s/g, "");
9403
+ if (b === P)
9394
9404
  return l(!0), { error: "Blocked profanity." };
9395
9405
  }
9396
9406
  return !t.data.vertical && !t.data.allowNewlines && (u.includes(`
9397
- `) || u.includes("\r")) ? (l(!0), { error: "Cannot span multiple lines." }) : !t.data.curved && !Array.from(g.values()).every((b) => b) ? (l(!0), { error: "Does not fit." }) : (l(!1), { info: (t.data.maxLength - u.length).toString() });
9407
+ `) || u.includes("\r")) ? (l(!0), { error: "Cannot span multiple lines." }) : !t.data.curved && !Array.from(g.values()).every((E) => E) ? (l(!0), { error: "Does not fit." }) : (l(!1), { info: (t.data.maxLength - u.length).toString() });
9398
9408
  })();
9399
9409
  if (f.error) {
9400
9410
  c(f.error);
@@ -9418,7 +9428,7 @@ class Fs {
9418
9428
  )
9419
9429
  );
9420
9430
  }
9421
- return new $(C);
9431
+ return new O(C);
9422
9432
  }
9423
9433
  }
9424
9434
  const q = new Fs();
@@ -9468,7 +9478,7 @@ const Ha = {
9468
9478
  t: ["x", "y"],
9469
9479
  a: ["rx", "ry", "xRotation", "largeArc", "sweep", "x", "y"]
9470
9480
  };
9471
- class Os {
9481
+ class $s {
9472
9482
  constructor(t) {
9473
9483
  const e = Array.from(t.querySelectorAll("path"));
9474
9484
  this.paths = e.map((a) => {
@@ -9566,7 +9576,7 @@ class Os {
9566
9576
  }
9567
9577
  }
9568
9578
  }
9569
- class $s extends xs {
9579
+ class Os extends xs {
9570
9580
  constructor() {
9571
9581
  super(...arguments), this.moduleName = "Vegemite";
9572
9582
  }
@@ -9584,14 +9594,14 @@ class $s extends xs {
9584
9594
  w.appendChild(S), S.appendChild(Ts(0, 2, 2, "shadow"));
9585
9595
  const y = at("path");
9586
9596
  y.setAttribute("d", d), y.setAttribute("stroke", "black"), y.setAttribute("stroke-width", "3"), S.appendChild(y);
9587
- const E = at("g");
9588
- E.classList.add("module-layer0"), w.appendChild(E), E.setAttribute("filter", "url(#shadow)"), E.innerHTML = y.outerHTML;
9589
9597
  const b = at("g");
9590
- b.classList.add("module-layer1"), w.appendChild(b), b.setAttribute("stroke-width", "3"), b.setAttribute("stroke", "rgb(45,41,38)"), b.setAttribute("fill", "rgb(45,41,38)"), b.setAttribute("transform", "translate(0.5,0)"), b.innerHTML = o;
9598
+ b.classList.add("module-layer0"), w.appendChild(b), b.setAttribute("filter", "url(#shadow)"), b.innerHTML = y.outerHTML;
9599
+ const E = at("g");
9600
+ E.classList.add("module-layer1"), w.appendChild(E), E.setAttribute("stroke-width", "3"), E.setAttribute("stroke", "rgb(45,41,38)"), E.setAttribute("fill", "rgb(45,41,38)"), E.setAttribute("transform", "translate(0.5,0)"), E.innerHTML = o;
9591
9601
  const P = at("g");
9592
9602
  P.classList.add("module-layer2"), w.appendChild(P), P.setAttribute("fill", "rgb(255,209,0)"), P.setAttribute("transform", "translate(1,-0.1)"), P.innerHTML = o;
9593
9603
  const D = at("g");
9594
- return D.classList.add("module-layer3"), w.appendChild(D), D.setAttribute("fill", "white"), D.innerHTML = o, new Os(w).transform(([k, T]) => [k, T + (c / 2 - k) ** 2 / (c * 6)]), w;
9604
+ return D.classList.add("module-layer3"), w.appendChild(D), D.setAttribute("fill", "white"), D.innerHTML = o, new $s(w).transform(([k, T]) => [k, T + (c / 2 - k) ** 2 / (c * 6)]), w;
9595
9605
  }, u = at("g");
9596
9606
  u.classList.add("module-root");
9597
9607
  const h = at("defs");
@@ -9610,7 +9620,7 @@ class $s extends xs {
9610
9620
  }
9611
9621
  async function Yn(r) {
9612
9622
  if (r === "Vegemite")
9613
- return new $s();
9623
+ return new Os();
9614
9624
  throw new G(`Failed to resolve Module, Module ${r} not found`);
9615
9625
  }
9616
9626
  const ne = v`
@@ -10235,6 +10245,13 @@ const ne = v`
10235
10245
  $country: String
10236
10246
  $mobile: String
10237
10247
  $company: String
10248
+ $apartment: String
10249
+ $customField1: String
10250
+ $customField2: String
10251
+ $customField3: String
10252
+ $customField4: String
10253
+ $customField5: String
10254
+ $conversionConfigurationId: String
10238
10255
  ) {
10239
10256
  recipientCreate(
10240
10257
  firstName: $firstName
@@ -10247,6 +10264,13 @@ const ne = v`
10247
10264
  country: $country
10248
10265
  mobile: $mobile
10249
10266
  company: $company
10267
+ apartment: $apartment
10268
+ customField1: $customField1
10269
+ customField2: $customField2
10270
+ customField3: $customField3
10271
+ customField4: $customField4
10272
+ customField5: $customField5
10273
+ conversionConfigurationId: $conversionConfigurationId
10250
10274
  ) {
10251
10275
  id
10252
10276
  }
@@ -10264,6 +10288,13 @@ const ne = v`
10264
10288
  $country: String
10265
10289
  $mobile: String
10266
10290
  $company: String
10291
+ $apartment: String
10292
+ $customField1: String
10293
+ $customField2: String
10294
+ $customField3: String
10295
+ $customField4: String
10296
+ $customField5: String
10297
+ $conversionConfigurationId: String
10267
10298
  ) {
10268
10299
  recipientUpdate(
10269
10300
  id: $id
@@ -10277,6 +10308,13 @@ const ne = v`
10277
10308
  country: $country
10278
10309
  mobile: $mobile
10279
10310
  company: $company
10311
+ apartment: $apartment
10312
+ customField1: $customField1
10313
+ customField2: $customField2
10314
+ customField3: $customField3
10315
+ customField4: $customField4
10316
+ customField5: $customField5
10317
+ conversionConfigurationId: $conversionConfigurationId
10280
10318
  ) {
10281
10319
  id
10282
10320
  }
@@ -10306,13 +10344,13 @@ class Co {
10306
10344
  constructor(t, e, a, n, i, s, o, l, c, d, A, u, h, m = !1, g, p = !1, f = !1, C = !1) {
10307
10345
  var w;
10308
10346
  this.workflowStatePromiseQueue = new xn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
10309
- var E;
10347
+ var b;
10310
10348
  if (!this.previewService)
10311
10349
  return;
10312
- const S = this.getCommandContext().getAllLayouts(), y = (E = this.getLayoutPreviewService()) == null ? void 0 : E.getAll();
10350
+ const S = this.getCommandContext().getAllLayouts(), y = (b = this.getLayoutPreviewService()) == null ? void 0 : b.getAll();
10313
10351
  if (y)
10314
- for (const [, b] of y)
10315
- b.render(S);
10352
+ for (const [, E] of y)
10353
+ E.render(S);
10316
10354
  }, this.experience = t, this.client = e, this.updateTransaction = o, this.graphQlClient = l, this.commandContext = s, this.reloadedState = h, this.transaction = c, this.readOnly = m, this.singleVariantsRenderable = f, this.confirmedDesign = !1, this.editedSteps = {}, this.informationResults = [], this.mandatorySteps = {}, this.pendingUpdates = [], this.selectionCost = 0, this.workflow = a, this.stepSpecificServices = {}, this.profanityFilter = n, this.pollers = [], this.allScenes = [], this.layouts = i, this.product = d, this.previewService = A, this.modelContainer = g, this.stepElements = {}, this.stepInitialised = {}, this.stepMetadata = {}, this.stepSelections = {}, this.storage = {}, this.validationErrors = { steps: /* @__PURE__ */ new Map() }, this.confirmCallbacks = [], this.editedCallbacks = [], this.elementsCallbacks = [], this.informationResultCallbacks = [], this.initCallbacks = [], this.mandatoryCallbacks = [], this.makingAdjustmentsCallback = [], this.metadataCallbacks = [], this.selectionCallbacks = [], this.stepSpecificStorageCallbacks = {}, this.storageCallbacks = [], this.validationCallbacks = [], this.recipientCallbacks = [], this.currentAdjustingStepId = "", this.renderableContextService = u, (w = this.renderableContextService) == null || w.setWorkflowManager(this), this.isReloadedTransaction = p, this.workflow.steps.forEach((S) => {
10317
10355
  this.stepTags[S.stepName] = S.tags ?? [];
10318
10356
  }), C && (this.workflowStatePromiseQueue.enabled = !1), this.initializationPromise = this.initializeDefaultWorkflowState(a), this.initializationPromise.then(() => {
@@ -10328,9 +10366,9 @@ class Co {
10328
10366
  getTemplatingContext() {
10329
10367
  return { recipient: this.transaction.recipient };
10330
10368
  }
10331
- async updateRecipient(t, e, a, n, i, s, o, l, c, d) {
10332
- var A, u, h, m, g;
10333
- if ((A = this.transaction.recipient) != null && A.id)
10369
+ async updateRecipient(t, e, a, n, i, s, o, l, c, d, A, u, h, m, g, p, f) {
10370
+ var C, w, S, y, b;
10371
+ if ((C = this.transaction.recipient) != null && C.id)
10334
10372
  this.transaction.recipient = {
10335
10373
  id: this.transaction.recipient.id,
10336
10374
  firstName: t || this.transaction.recipient.firstName,
@@ -10342,7 +10380,14 @@ class Co {
10342
10380
  postalCode: o || this.transaction.recipient.postalCode,
10343
10381
  country: l || this.transaction.recipient.country,
10344
10382
  mobile: c || this.transaction.recipient.mobile,
10345
- company: d || this.transaction.recipient.company
10383
+ company: d || this.transaction.recipient.company,
10384
+ apartment: A || this.transaction.recipient.apartment,
10385
+ customField1: u || this.transaction.recipient.customField1,
10386
+ customField2: h || this.transaction.recipient.customField2,
10387
+ customField3: m || this.transaction.recipient.customField3,
10388
+ customField4: g || this.transaction.recipient.customField4,
10389
+ customField5: p || this.transaction.recipient.customField5,
10390
+ conversionConfigurationId: f || this.transaction.recipient.conversionConfigurationId
10346
10391
  }, await this.graphQlClient().mutate({
10347
10392
  mutation: go,
10348
10393
  errorPolicy: "all",
@@ -10358,11 +10403,18 @@ class Co {
10358
10403
  postalCode: o || this.transaction.recipient.postalCode,
10359
10404
  country: l || this.transaction.recipient.country,
10360
10405
  mobile: c || this.transaction.recipient.mobile,
10361
- company: d || this.transaction.recipient.company
10406
+ company: d || this.transaction.recipient.company,
10407
+ apartment: A || this.transaction.recipient.apartment,
10408
+ customField1: u || this.transaction.recipient.customField1,
10409
+ customField2: h || this.transaction.recipient.customField2,
10410
+ customField3: m || this.transaction.recipient.customField3,
10411
+ customField4: g || this.transaction.recipient.customField4,
10412
+ customField5: p || this.transaction.recipient.customField5,
10413
+ conversionConfigurationId: f || this.transaction.recipient.conversionConfigurationId
10362
10414
  }
10363
10415
  });
10364
10416
  else {
10365
- const p = await this.graphQlClient().mutate({
10417
+ const E = await this.graphQlClient().mutate({
10366
10418
  mutation: mo,
10367
10419
  errorPolicy: "all",
10368
10420
  fetchPolicy: "no-cache",
@@ -10376,11 +10428,18 @@ class Co {
10376
10428
  postalCode: o,
10377
10429
  country: l,
10378
10430
  mobile: c,
10379
- company: d
10431
+ company: d,
10432
+ apartment: A,
10433
+ customField1: u,
10434
+ customField2: h,
10435
+ customField3: m,
10436
+ customField4: g,
10437
+ customField5: p,
10438
+ conversionConfigurationId: f
10380
10439
  }
10381
10440
  });
10382
10441
  this.transaction.recipient = {
10383
- id: (h = (u = p == null ? void 0 : p.data) == null ? void 0 : u.recipientCreate) == null ? void 0 : h.id,
10442
+ id: (S = (w = E == null ? void 0 : E.data) == null ? void 0 : w.recipientCreate) == null ? void 0 : S.id,
10384
10443
  firstName: t,
10385
10444
  lastName: e,
10386
10445
  address: a,
@@ -10390,21 +10449,28 @@ class Co {
10390
10449
  postalCode: o,
10391
10450
  country: l,
10392
10451
  mobile: c,
10393
- company: d
10452
+ company: d,
10453
+ apartment: A,
10454
+ customField1: u,
10455
+ customField2: h,
10456
+ customField3: m,
10457
+ customField4: g,
10458
+ customField5: p,
10459
+ conversionConfigurationId: f
10394
10460
  }, await this.graphQlClient().mutate({
10395
10461
  mutation: po,
10396
10462
  errorPolicy: "all",
10397
10463
  fetchPolicy: "no-cache",
10398
10464
  variables: {
10399
10465
  id: this.transaction.id,
10400
- recipientId: (g = (m = p.data) == null ? void 0 : m.recipientCreate) == null ? void 0 : g.id
10466
+ recipientId: (b = (y = E.data) == null ? void 0 : y.recipientCreate) == null ? void 0 : b.id
10401
10467
  },
10402
10468
  context: {
10403
10469
  transactionOwnerId: this.transaction.transactionOwnerId
10404
10470
  }
10405
10471
  });
10406
10472
  }
10407
- this.recipientCallbacks.forEach((p) => p(this.transaction.recipient));
10473
+ this.recipientCallbacks.forEach((E) => E(this.transaction.recipient));
10408
10474
  }
10409
10475
  async initializeDefaultWorkflowState(t) {
10410
10476
  const e = () => {
@@ -10419,7 +10485,7 @@ class Co {
10419
10485
  this.storage[o.stepName] = o.storage || {};
10420
10486
  }), this.allScenes = await zi(t);
10421
10487
  const n = Pt(this.allScenes, this.stepSelections).map((o) => o.silentSteps).flat(), { stepElements: i, commands: s } = await this.stepElementsForIntroducedSilentSteps(n, !!this.reloadedState);
10422
- this.commandContext.apply(new $(s), !0), this.stepElements = { ...this.stepElements, ...i }, await this.ensureStepsAreLoaded(), !this.isReloadedTransaction && this.updateStateWithServer(), this.renderLayouts(), this.reloadedState && e();
10488
+ this.commandContext.apply(new O(s), !0), this.stepElements = { ...this.stepElements, ...i }, await this.ensureStepsAreLoaded(), !this.isReloadedTransaction && this.updateStateWithServer(), this.renderLayouts(), this.reloadedState && e();
10423
10489
  }
10424
10490
  getWorkflowExperience() {
10425
10491
  return this.experience;
@@ -10879,14 +10945,14 @@ class Co {
10879
10945
  this.stepSelections = {
10880
10946
  ...this.stepSelections,
10881
10947
  [t]: { selectedVariants: e }
10882
- }, this.selectionCost = Object.values(this.stepSelections).reduce((E, b) => E + b.selectedVariants.map((P) => P.priceModifier || 0).reduce((P, D) => P + D, 0), 0), this.workflow.steps.forEach((E) => {
10883
- wt(E, this.stepSelections) || (this.stepInitialised[E.stepName] = !1, delete this.stepMetadata[E.stepName], delete this.stepSelections[E.stepName], delete this.storage[E.stepName]);
10948
+ }, this.selectionCost = Object.values(this.stepSelections).reduce((b, E) => b + E.selectedVariants.map((P) => P.priceModifier || 0).reduce((P, D) => P + D, 0), 0), this.workflow.steps.forEach((b) => {
10949
+ wt(b, this.stepSelections) || (this.stepInitialised[b.stepName] = !1, delete this.stepMetadata[b.stepName], delete this.stepSelections[b.stepName], delete this.storage[b.stepName]);
10884
10950
  });
10885
- const s = this.allScenes, o = Pt(s, i), l = Pt(s, this.stepSelections), c = o.map((E) => E.silentSteps).flat(), A = l.map((E) => E.silentSteps).flat().filter(
10886
- (E) => !c.some((b) => b.stepName === E.stepName)
10951
+ const s = this.allScenes, o = Pt(s, i), l = Pt(s, this.stepSelections), c = o.map((b) => b.silentSteps).flat(), A = l.map((b) => b.silentSteps).flat().filter(
10952
+ (b) => !c.some((E) => E.stepName === b.stepName)
10887
10953
  );
10888
- c.forEach((E) => {
10889
- wt(E, this.stepSelections) || (this.stepInitialised[E.stepName] = !1);
10954
+ c.forEach((b) => {
10955
+ wt(b, this.stepSelections) || (this.stepInitialised[b.stepName] = !1);
10890
10956
  });
10891
10957
  const u = this.getInvalidCanvasRegions(), { stepElements: h, commands: m } = await this.stepElementsForIntroducedSilentSteps(A, !1);
10892
10958
  this.stepElements = {
@@ -10894,25 +10960,25 @@ class Co {
10894
10960
  ...h,
10895
10961
  [t]: a
10896
10962
  }, this.removeElements(u);
10897
- const g = this.workflow.steps.find((E) => E.stepName === t);
10963
+ const g = this.workflow.steps.find((b) => b.stepName === t);
10898
10964
  if ((g == null ? void 0 : g.type) === I.Frame) {
10899
- const E = (y = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : y.frameService;
10900
- E == null || E.setTargetElements(a.map((b) => b.id));
10965
+ const b = (y = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : y.frameService;
10966
+ b == null || b.setTargetElements(a.map((E) => E.id));
10901
10967
  }
10902
- const p = u.map((E) => new Et(E.id)), f = new Ga(this.constructSerializableWorkflow()), C = [...m, ...p, f];
10903
- C.length > 0 && this.commandContext.apply(new $(C), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
10968
+ const p = u.map((b) => new Et(b.id)), f = new Ga(this.constructSerializableWorkflow()), C = [...m, ...p, f];
10969
+ C.length > 0 && this.commandContext.apply(new O(C), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
10904
10970
  const w = this.getInvalidModelVariants(), S = this.modelContainer;
10905
10971
  if (S) {
10906
- const E = w.map(
10907
- (b) => S.applyModelVariant(
10908
- b,
10972
+ const b = w.map(
10973
+ (E) => S.applyModelVariant(
10974
+ E,
10909
10975
  {
10910
10976
  contextService: this.getLayoutPreviewService()
10911
10977
  },
10912
10978
  !1
10913
10979
  )
10914
10980
  );
10915
- await Promise.all(E);
10981
+ await Promise.all(b);
10916
10982
  }
10917
10983
  await this.onSelectionChange(), n && await n();
10918
10984
  }
@@ -10975,7 +11041,7 @@ class Co {
10975
11041
  throw new Error(`Step initialization failed: ${l.reason}`);
10976
11042
  return l.value;
10977
11043
  }), s = i.filter((l) => !!l && !!l.command).map((l) => l.command), o = i.filter((l) => !!l && !!l.followup).map((l) => l.followup);
10978
- s && s.length > 0 && this.commandContext.apply(new $(s), !0);
11044
+ s && s.length > 0 && this.commandContext.apply(new O(s), !0);
10979
11045
  for (const l of o)
10980
11046
  await l();
10981
11047
  o.length > 0 && await this.ensureStepsAreLoaded(), this.onInitChange();
@@ -12033,10 +12099,10 @@ const ko = async (r, t) => {
12033
12099
  S[D].map((F) => F.id)
12034
12100
  ])
12035
12101
  );
12036
- let E = await o(m, n.id);
12037
- if (E) {
12038
- const D = await (await rt(E)).blob();
12039
- E = (await U.uploadAsset(
12102
+ let b = await o(m, n.id);
12103
+ if (b) {
12104
+ const D = await (await rt(b)).blob();
12105
+ b = (await U.uploadAsset(
12040
12106
  { name: `${n.id}-preview-image.png`, blob: D },
12041
12107
  Ce.Image,
12042
12108
  !0,
@@ -12054,7 +12120,7 @@ const ko = async (r, t) => {
12054
12120
  workflowId: t.id,
12055
12121
  transactionId: n.id,
12056
12122
  useThreeDimPreview: !!m,
12057
- previewImage: E
12123
+ previewImage: b
12058
12124
  };
12059
12125
  if (p) {
12060
12126
  const F = [];
@@ -12220,7 +12286,7 @@ class Ro {
12220
12286
  throw new G("Unexpected storage method requested");
12221
12287
  }
12222
12288
  }
12223
- const Ye = new Ro(), Oo = v`
12289
+ const Ye = new Ro(), $o = v`
12224
12290
  mutation AddTransactionStakeholder($id: String!, $type: String!, $details: CustomerDetailsInput!) {
12225
12291
  transactionAddStakeholder(id: $id, details: $details, type: $type) {
12226
12292
  id
@@ -12234,7 +12300,7 @@ const Ye = new Ro(), Oo = v`
12234
12300
  }
12235
12301
  }
12236
12302
  }
12237
- `, $o = v`
12303
+ `, Oo = v`
12238
12304
  mutation AddAddressToTransaction(
12239
12305
  $transactionId: String!
12240
12306
  $streetAddress: String
@@ -12327,7 +12393,7 @@ class Vo {
12327
12393
  }
12328
12394
  async attachAddress(t, e, a, n, i, s) {
12329
12395
  await this.graphQlClient().mutate({
12330
- mutation: $o,
12396
+ mutation: Oo,
12331
12397
  variables: {
12332
12398
  transactionId: this.getWorkflowManager().getTransaction().id,
12333
12399
  streetAddress: t || void 0,
@@ -12541,7 +12607,7 @@ class Vo {
12541
12607
  async assignCustomerDetails(t) {
12542
12608
  var n, i, s;
12543
12609
  const a = (s = (i = (n = (await this.graphQlClient().mutate({
12544
- mutation: Oo,
12610
+ mutation: $o,
12545
12611
  variables: {
12546
12612
  id: this.getWorkflowManager().getTransaction().id,
12547
12613
  details: t,
@@ -12811,7 +12877,7 @@ const zo = (r) => {
12811
12877
  o && (t[a.stepName] = { selectedVariants: [o] });
12812
12878
  const l = async (c) => {
12813
12879
  var g;
12814
- const d = await On(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await Qe(d), u = Q(), h = r.find((p) => p.panelId === c.panelId);
12880
+ const d = await $n(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await Qe(d), u = Q(), h = r.find((p) => p.panelId === c.panelId);
12815
12881
  if (!h)
12816
12882
  throw new Y(c);
12817
12883
  const m = Ea(
@@ -12863,17 +12929,17 @@ const zo = (r) => {
12863
12929
  return console.error(o), [];
12864
12930
  }
12865
12931
  }, jo = async (r, t, e, a) => {
12866
- var y, E;
12932
+ var y, b;
12867
12933
  const n = e.data, i = a.option;
12868
12934
  if (!i)
12869
12935
  return console.error(`No option for step ${a.stepName}.`), [];
12870
- const s = ((y = i.variants) == null ? void 0 : y.find((b) => b.id === n.illustrationVariantId)) || ae(i);
12936
+ const s = ((y = i.variants) == null ? void 0 : y.find((E) => E.id === n.illustrationVariantId)) || ae(i);
12871
12937
  if (!s)
12872
12938
  return console.error(`No variant with ID: ${n.illustrationVariantId}`), [];
12873
12939
  if (!s.asset)
12874
12940
  return console.error(`No asset for variant with ID: ${n.illustrationVariantId}`), [];
12875
12941
  t[a.stepName] = { selectedVariants: [s] };
12876
- const o = (E = s.asset) == null ? void 0 : E.fileLink;
12942
+ const o = (b = s.asset) == null ? void 0 : b.fileLink;
12877
12943
  if (!o)
12878
12944
  return console.error(`No asset link for variant with ID: ${n.illustrationVariantId}`), [];
12879
12945
  const l = await nt(o, !0), c = /<svg.*?<\/svg>/s, d = l.match(c) || [], A = (d == null ? void 0 : d.length) > 0 ? d[0] : "", m = dt().parseFromString(A, "image/svg+xml").firstElementChild;
@@ -12881,32 +12947,32 @@ const zo = (r) => {
12881
12947
  return console.error("Failed to read SVG."), [];
12882
12948
  pa(m);
12883
12949
  const g = {};
12884
- xt(m, (b) => {
12885
- Wo.includes(b.tagName) && !b.attributes.getNamedItem("fill") && b.setAttribute("fill", "#000000");
12886
- const P = b.attributes.getNamedItem("fill");
12950
+ xt(m, (E) => {
12951
+ Wo.includes(E.tagName) && !E.attributes.getNamedItem("fill") && E.setAttribute("fill", "#000000");
12952
+ const P = E.attributes.getNamedItem("fill");
12887
12953
  if (P && P.value !== "none") {
12888
12954
  const F = P.value, T = `spiff-fill-${F.replace(/\W/g, "")}`;
12889
- b.classList.add(T), g[T] = { browserValue: F };
12955
+ E.classList.add(T), g[T] = { browserValue: F };
12890
12956
  }
12891
- const D = b.attributes.getNamedItem("stroke");
12957
+ const D = E.attributes.getNamedItem("stroke");
12892
12958
  if (D && D.value !== "none") {
12893
12959
  const F = D.value, T = `spiff-stroke-${F.replace(/\W/g, "")}`;
12894
- b.classList.add(T), g[T] = { browserValue: F };
12960
+ E.classList.add(T), g[T] = { browserValue: F };
12895
12961
  }
12896
12962
  });
12897
12963
  const f = bt().serializeToString(m), C = n.colors;
12898
12964
  if (C) {
12899
- for (const [b, P] of Object.entries(g))
12965
+ for (const [E, P] of Object.entries(g))
12900
12966
  for (const D of Object.keys(C))
12901
12967
  if (P.browserValue === D) {
12902
- g[b] = { browserValue: C[D] };
12968
+ g[E] = { browserValue: C[D] };
12903
12969
  break;
12904
12970
  }
12905
12971
  }
12906
- const w = (b) => {
12907
- const P = r.find((F) => F.panelId === b.panelId);
12972
+ const w = (E) => {
12973
+ const P = r.find((F) => F.panelId === E.panelId);
12908
12974
  if (!P)
12909
- throw new Y(b);
12975
+ throw new Y(E);
12910
12976
  const D = Q();
12911
12977
  return new W(
12912
12978
  {
@@ -12914,22 +12980,22 @@ const zo = (r) => {
12914
12980
  id: D,
12915
12981
  svg: f,
12916
12982
  type: M.Illustration,
12917
- y: b.top,
12918
- x: b.left,
12919
- rotation: b.rotation,
12920
- width: b.width,
12921
- height: b.height,
12922
- layer: b.layer,
12923
- layerIndex: b.layerIndex,
12924
- immutable: b.immutable
12983
+ y: E.top,
12984
+ x: E.left,
12985
+ rotation: E.rotation,
12986
+ width: E.width,
12987
+ height: E.height,
12988
+ layer: E.layer,
12989
+ layerIndex: E.layerIndex,
12990
+ immutable: E.immutable
12925
12991
  },
12926
12992
  P
12927
12993
  );
12928
12994
  }, S = a.data.regions;
12929
12995
  try {
12930
12996
  return S.map(w);
12931
- } catch (b) {
12932
- return console.error(b), [];
12997
+ } catch (E) {
12998
+ return console.error(E), [];
12933
12999
  }
12934
13000
  }, Yo = async (r, t, e) => {
12935
13001
  const a = await Yn(e.data.module), n = t.data, i = (o, l) => {
@@ -13475,9 +13541,9 @@ const od = (r, t) => {
13475
13541
  serializableWorkflow: { steps: [] },
13476
13542
  layouts: {}
13477
13543
  };
13478
- n = new $(e.map((l) => new Ln(l))).apply(n);
13544
+ n = new O(e.map((l) => new Ln(l))).apply(n);
13479
13545
  const s = await tl(r, t, e, a);
13480
- return new $(s).apply(n);
13546
+ return new O(s).apply(n);
13481
13547
  };
13482
13548
  class sl {
13483
13549
  constructor(t) {
@@ -15924,8 +15990,8 @@ class Ml {
15924
15990
  (e == null ? void 0 : e.ChallengeName) === "CUSTOM_CHALLENGE" && (this.challengeSession = e.Session);
15925
15991
  }
15926
15992
  async verifyCode(t, e, a) {
15927
- var i;
15928
- const n = await ((i = this.cognitoClient) == null ? void 0 : i.send(
15993
+ var n;
15994
+ return await ((n = this.cognitoClient) == null ? void 0 : n.send(
15929
15995
  new wr({
15930
15996
  ClientId: this.userPoolClientId,
15931
15997
  ChallengeName: "CUSTOM_CHALLENGE",
@@ -15940,7 +16006,6 @@ class Ml {
15940
16006
  }
15941
16007
  })
15942
16008
  ));
15943
- return (n == null ? void 0 : n.ChallengeName) === "CUSTOM_CHALLENGE" && (this.challengeSession = n.Session), n;
15944
16009
  }
15945
16010
  async refreshTokens() {
15946
16011
  var a;
@@ -16072,7 +16137,7 @@ const Ql = async (r, t) => {
16072
16137
  (o) => Jt.set({ id: o, options: t }, Rl(o, n))
16073
16138
  ), s = e.filter((o) => o !== void 0);
16074
16139
  return await Promise.all(s.concat(i));
16075
- }, ud = async (r, t) => (await ar([r], t))[0], Ol = (r) => r.sort((t, e) => t.index - e.index).map((t) => ({
16140
+ }, ud = async (r, t) => (await ar([r], t))[0], $l = (r) => r.sort((t, e) => t.index - e.index).map((t) => ({
16076
16141
  id: Q(),
16077
16142
  panelId: t.name,
16078
16143
  name: t.name,
@@ -16086,9 +16151,9 @@ const Ql = async (r, t) => {
16086
16151
  previewRegion: t.previewRegion,
16087
16152
  useEditableArea: t.useEditableArea,
16088
16153
  editableArea: t.editableArea
16089
- })), $l = (r, t) => {
16154
+ })), Ol = (r, t) => {
16090
16155
  const e = r.workflowState, a = e ? JSON.parse(e) : void 0;
16091
- return a ? Object.values(a.layouts).map((n) => n.layout) : Ol(t.panels);
16156
+ return a ? Object.values(a.layouts).map((n) => n.layout) : $l(t.panels);
16092
16157
  };
16093
16158
  class hd {
16094
16159
  constructor(t) {
@@ -16101,7 +16166,7 @@ class hd {
16101
16166
  } catch (a) {
16102
16167
  throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
16103
16168
  }
16104
- }, this.options = t, this.options.applicationKey && $r(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 29.1.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16169
+ }, this.options = t, this.options.applicationKey && Or(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 29.1.0-beta.3610848a-e163-58bd-968d-57b57e0094f6"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16105
16170
  }
16106
16171
  configure(t) {
16107
16172
  mt.setHubUrl(t.hubUrl), mt.setServerUrl(t.serverUrl), mt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && Lr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
@@ -16210,7 +16275,7 @@ class hd {
16210
16275
  const C = ((h = (u = this.customer) == null ? void 0 : u.bundleStakeholders) == null ? void 0 : h.find(
16211
16276
  (w) => {
16212
16277
  var S, y;
16213
- return (y = (S = w.bundle) == null ? void 0 : S.transactions) == null ? void 0 : y.some((E) => E.id === t);
16278
+ return (y = (S = w.bundle) == null ? void 0 : S.transactions) == null ? void 0 : y.some((b) => b.id === t);
16214
16279
  }
16215
16280
  )) || ((g = (m = this.customer) == null ? void 0 : m.stakeholders) == null ? void 0 : g.find(
16216
16281
  (w) => {
@@ -16437,7 +16502,7 @@ class hd {
16437
16502
  * @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
16438
16503
  */
16439
16504
  async getExistingBundle(t, e, a, n) {
16440
- var m, g, p, f, C, w, S, y, E, b, P;
16505
+ var m, g, p, f, C, w, S, y, b, E, P;
16441
16506
  const i = N.getMap("bundleOwnerIds"), s = i == null ? void 0 : i.get(t), o = {};
16442
16507
  try {
16443
16508
  const D = await this.loggedInBearerToken();
@@ -16465,8 +16530,8 @@ class hd {
16465
16530
  const d = (y = c.data) == null ? void 0 : y.bundles[0], A = N.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16466
16531
  A.set(d.id, d.partner.id), N.setMap("bundlePartnerIds", A);
16467
16532
  const u = new Je(this, d, e, a, s, {
16468
- additionalHeaders: (E = n == null ? void 0 : n.graphql) == null ? void 0 : E.additionalHeaders,
16469
- eagerFetchProducts: (P = (b = n == null ? void 0 : n.graphql) == null ? void 0 : b.productCollection) == null ? void 0 : P.eagerFetchProducts,
16533
+ additionalHeaders: (b = n == null ? void 0 : n.graphql) == null ? void 0 : b.additionalHeaders,
16534
+ eagerFetchProducts: (P = (E = n == null ? void 0 : n.graphql) == null ? void 0 : E.productCollection) == null ? void 0 : P.eagerFetchProducts,
16470
16535
  existingGlobalPropertyState: c.data.globalPropertyState,
16471
16536
  readonly: n == null ? void 0 : n.readonly
16472
16537
  });
@@ -16487,7 +16552,7 @@ class hd {
16487
16552
  const C = await this.loggedInBearerToken();
16488
16553
  s.Authorization = `Bearer ${C}`;
16489
16554
  } catch {
16490
- const S = ((h = Object.entries(localStorage).find(([E, b]) => E.startsWith("CognitoIdentityServiceProvider") && E.endsWith("idToken"))) == null ? void 0 : h[0]) || "", y = localStorage.getItem(S);
16555
+ const S = ((h = Object.entries(localStorage).find(([b, E]) => b.startsWith("CognitoIdentityServiceProvider") && b.endsWith("idToken"))) == null ? void 0 : h[0]) || "", y = localStorage.getItem(S);
16491
16556
  y && !Wt(y) && (s.Authorization = `Bearer ${y}`);
16492
16557
  }
16493
16558
  const o = {
@@ -16594,16 +16659,16 @@ class hd {
16594
16659
  var D, F, k;
16595
16660
  if (y.length === 0)
16596
16661
  return [];
16597
- const E = y.map((T) => T.option.transactionId), b = await a.query({
16662
+ const b = y.map((T) => T.option.transactionId), E = await a.query({
16598
16663
  query: yi,
16599
16664
  variables: {
16600
- ids: E
16665
+ ids: b
16601
16666
  },
16602
16667
  errorPolicy: "all",
16603
16668
  fetchPolicy: "no-cache"
16604
- }), P = b.data.transactions;
16669
+ }), P = E.data.transactions;
16605
16670
  if (P.length !== y.length) {
16606
- const T = ((F = (D = b.errors) == null ? void 0 : D[0]) == null ? void 0 : F.message) || "Unknown error";
16671
+ const T = ((F = (D = E.errors) == null ? void 0 : D[0]) == null ? void 0 : F.message) || "Unknown error";
16607
16672
  throw new ut(`Not all transactions were found: ${T}`);
16608
16673
  }
16609
16674
  return !this.activeIntegration && ((k = P[0].integrationProduct) != null && k.integration) && (this.activeIntegration = Promise.resolve(P[0].integrationProduct.integration)), P.map((T, Z) => {
@@ -16619,7 +16684,7 @@ class hd {
16619
16684
  var P, D, F;
16620
16685
  if (y.length === 0)
16621
16686
  return [];
16622
- const E = await a.mutate({
16687
+ const b = await a.mutate({
16623
16688
  mutation: wi,
16624
16689
  variables: {
16625
16690
  inputs: y.map((k) => ({
@@ -16635,32 +16700,32 @@ class hd {
16635
16700
  },
16636
16701
  errorPolicy: "all",
16637
16702
  fetchPolicy: "no-cache"
16638
- }), b = (P = E.data) == null ? void 0 : P.transactionCreateMany;
16639
- if (!b || b.length === 0) {
16640
- const k = ((F = (D = E.errors) == null ? void 0 : D[0]) == null ? void 0 : F.message) || "Unknown error";
16703
+ }), E = (P = b.data) == null ? void 0 : P.transactionCreateMany;
16704
+ if (!E || E.length === 0) {
16705
+ const k = ((F = (D = b.errors) == null ? void 0 : D[0]) == null ? void 0 : F.message) || "Unknown error";
16641
16706
  throw new ut(`Failed to create transactions: ${k}`);
16642
16707
  }
16643
- return b.map((k, T) => ({
16708
+ return E.map((k, T) => ({
16644
16709
  transaction: k,
16645
16710
  workflowId: k.workflowId,
16646
16711
  readOnly: !1,
16647
16712
  index: y[T].index
16648
16713
  }));
16649
- }, s = t.map((y, E) => ({ option: y, index: E })), o = s.filter((y) => y.option.type === "transaction"), l = s.filter(
16714
+ }, s = t.map((y, b) => ({ option: y, index: b })), o = s.filter((y) => y.option.type === "transaction"), l = s.filter(
16650
16715
  (y) => y.option.type === "integration" || y.option.type === "external"
16651
16716
  ), c = xa(o, 10), d = xa(l, 10), A = (await Promise.all([
16652
16717
  ...c.map(n),
16653
16718
  ...d.map(i)
16654
16719
  ])).flat(), u = [...new Set(A.map((y) => y.workflowId))], h = await ar(u, e), m = new Map(h.map((y) => [y.id, y])), g = N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), p = A.map(async (y) => {
16655
16720
  var et;
16656
- const { transaction: E, workflowId: b, readOnly: P, index: D } = y, F = m.get(b), k = t[D];
16657
- !g.get(E.id) && E.transactionOwnerId && g.set(E.id, E.transactionOwnerId);
16658
- const T = g.get(E.id) || void 0, Z = new kl({
16721
+ const { transaction: b, workflowId: E, readOnly: P, index: D } = y, F = m.get(E), k = t[D];
16722
+ !g.get(b.id) && b.transactionOwnerId && g.set(b.id, b.transactionOwnerId);
16723
+ const T = g.get(b.id) || void 0, Z = new kl({
16659
16724
  onMutate: () => ({ context: { transactionOwnerId: T, bundleOwnerId: e == null ? void 0 : e.bundleOwnerId } }),
16660
16725
  onQuery: () => ({ context: { transactionOwnerId: T, bundleOwnerId: e == null ? void 0 : e.bundleOwnerId } })
16661
16726
  }), R = {
16662
- product: E.product,
16663
- transaction: E,
16727
+ product: b.product,
16728
+ transaction: b,
16664
16729
  layouts: [],
16665
16730
  singleVariantsRenderable: (et = k == null ? void 0 : k.workflowConfiguration) == null ? void 0 : et.singleVariantsRenderable,
16666
16731
  stateMutationFunc: P ? async () => {
@@ -16678,7 +16743,7 @@ class hd {
16678
16743
  const tt = JSON.parse(k.workflowState);
16679
16744
  R.layouts = Object.values(tt.layouts || {}).map((Nt) => Nt.layout), await cs(tt), R.reloadedState = tt;
16680
16745
  } else
16681
- R.layouts = $l(
16746
+ R.layouts = Ol(
16682
16747
  R.transaction,
16683
16748
  R.workflow
16684
16749
  );
@@ -16687,9 +16752,9 @@ class hd {
16687
16752
  ), R.delayWorkflowStateSync = !0, { experienceOptions: R, index: D, options: k };
16688
16753
  }), f = await Promise.all(p);
16689
16754
  N.setMap("transactionOwnerIds", g);
16690
- const w = f.sort((y, E) => y.index - E.index).map(async (y) => {
16691
- const { experienceOptions: E, options: b } = y, P = new Vo(this, E);
16692
- return await P.getWorkflowManager().getInitializationPromise(), b.type !== "transaction" && this.customer && await P.attachCustomerDetails({ email: this.customer.emailAddress }), P;
16755
+ const w = f.sort((y, b) => y.index - b.index).map(async (y) => {
16756
+ const { experienceOptions: b, options: E } = y, P = new Vo(this, b);
16757
+ return await P.getWorkflowManager().getInitializationPromise(), E.type !== "transaction" && this.customer && await P.attachCustomerDetails({ email: this.customer.emailAddress }), P;
16693
16758
  }), S = await Promise.all(w);
16694
16759
  return S.forEach((y) => y.getWorkflowManager().setWorkflowStateSyncEnabled(!0)), S;
16695
16760
  }
@@ -16763,7 +16828,7 @@ class hd {
16763
16828
  }
16764
16829
  }
16765
16830
  const Ul = async (r, t) => (await B.getShadowGraphqlClient().query({
16766
- query: Oi,
16831
+ query: $i,
16767
16832
  errorPolicy: "all",
16768
16833
  fetchPolicy: "no-cache",
16769
16834
  context: {
@@ -16807,7 +16872,7 @@ const Ul = async (r, t) => (await B.getShadowGraphqlClient().query({
16807
16872
  }, fd = async (r) => {
16808
16873
  var e, a, n;
16809
16874
  return (n = (a = (e = (await B.getShadowGraphqlClient().query({
16810
- query: $i,
16875
+ query: Oi,
16811
16876
  errorPolicy: "all",
16812
16877
  variables: {
16813
16878
  id: r
@@ -17013,7 +17078,7 @@ class Vl {
17013
17078
  const s = this.workflowManager.getCommandDispatcher();
17014
17079
  this.targetElements.forEach((o, l) => {
17015
17080
  s(
17016
- new $([
17081
+ new O([
17017
17082
  new hs(o, e, t[l]),
17018
17083
  new ms(
17019
17084
  o,
@@ -17051,7 +17116,7 @@ class Vl {
17051
17116
  }
17052
17117
  }
17053
17118
  class Cd {
17054
- updateRecipient(t, e, a, n, i, s, o, l, c, d) {
17119
+ updateRecipient(t, e, a, n, i, s, o, l, c, d, A, u, h, m, g, p, f) {
17055
17120
  throw new Error("Method not implemented.");
17056
17121
  }
17057
17122
  approveTransaction(t) {
@@ -17860,7 +17925,7 @@ export {
17860
17925
  nd as BringToBackCommand,
17861
17926
  ad as BringToFrontCommand,
17862
17927
  vr as BundleDesignCreationCartAddMode,
17863
- O as CanvasCommand,
17928
+ $ as CanvasCommand,
17864
17929
  de as CollectionProduct,
17865
17930
  Ja as ColorOptionGlobalPropertyHandle,
17866
17931
  os as CommandContext,
@@ -17884,7 +17949,7 @@ export {
17884
17949
  zl as FrameStep,
17885
17950
  Gl as FrameStepHandle,
17886
17951
  Ia as GlobalPropertyHandle,
17887
- $ as GroupCommand,
17952
+ O as GroupCommand,
17888
17953
  wo as IllustrationStepHandle,
17889
17954
  Re as InformationMessageType,
17890
17955
  Io as InformationStepHandle,
@@ -17954,7 +18019,7 @@ export {
17954
18019
  nt as fetchAsString,
17955
18020
  Uc as findAngle,
17956
18021
  L as findElement,
17957
- Oc as findPmsColors,
18022
+ $c as findPmsColors,
17958
18023
  Vt as frameDataCache,
17959
18024
  Ct as frameStepService,
17960
18025
  Q as generate,
@@ -17963,7 +18028,7 @@ export {
17963
18028
  ld as generateStateFromDesignInputSteps,
17964
18029
  kd as getAddressValidationJobs,
17965
18030
  Me as getAttributesFromArrayBuffer,
17966
- $c as getAxisAlignedBoundingBox,
18031
+ Oc as getAxisAlignedBoundingBox,
17967
18032
  Ll as getBoundedOffsets,
17968
18033
  pd as getBundleThemeConfiguration,
17969
18034
  Ed as getCustomer,
@@ -18022,8 +18087,8 @@ export {
18022
18087
  fs as shortenUrl,
18023
18088
  mt as spiffCoreConfiguration,
18024
18089
  od as stepAspectValuesToDesignInputSteps,
18025
- $a as svgColorValueToDefinition,
18026
- $n as svgStringDimensions,
18090
+ Oa as svgColorValueToDefinition,
18091
+ On as svgStringDimensions,
18027
18092
  ha as svgToDataUrl,
18028
18093
  q as textStepService,
18029
18094
  Ps as toast,