@spiffcommerce/core 37.0.1 → 37.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +149 -146
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createHttpLink as Fi, ApolloClient as
|
|
1
|
+
import { createHttpLink as Fi, ApolloClient as Di, InMemoryCache as xi, from as ki, gql as C } from "@apollo/client/core";
|
|
2
2
|
import { setContext as Mi } from "@apollo/client/link/context";
|
|
3
3
|
import { onError as Ti } from "@apollo/client/link/error";
|
|
4
4
|
import { renderToStaticMarkup as Ni } from "preact-render-to-string";
|
|
@@ -25,7 +25,7 @@ import qi from "svg-path-bbox";
|
|
|
25
25
|
import "fs";
|
|
26
26
|
import "path";
|
|
27
27
|
import Wi from "lodash.omit";
|
|
28
|
-
var ve = /* @__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))(ve || {}), bn = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(bn || {}), z = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(z || {}), E = /* @__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))(E || {}), Hi = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Hi || {}), Jt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Jt || {}),
|
|
28
|
+
var ve = /* @__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))(ve || {}), bn = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(bn || {}), z = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(z || {}), E = /* @__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))(E || {}), Hi = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Hi || {}), Jt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Jt || {}), x = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(x || {}), ji = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(ji || {}), In = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(In || {}), Yi = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(Yi || {}), Ji = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(Ji || {}), Ea = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(Ea || {}), Ki = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Ki || {}), Bn = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(Bn || {}), Tt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(Tt || {}), 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 || {}), _i = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(_i || {});
|
|
29
29
|
class Pn extends Error {
|
|
30
30
|
constructor(t) {
|
|
31
31
|
super(t), this.name = this.constructor.name;
|
|
@@ -71,7 +71,7 @@ class O extends Me {
|
|
|
71
71
|
super(`Unhandled Behavior Encountered: ${t}`);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
class
|
|
74
|
+
class Dt extends Me {
|
|
75
75
|
constructor(t) {
|
|
76
76
|
super(`Parsing Error: ${t}`);
|
|
77
77
|
}
|
|
@@ -185,7 +185,7 @@ function nt(n, t) {
|
|
|
185
185
|
}
|
|
186
186
|
return Aa(n, t);
|
|
187
187
|
}
|
|
188
|
-
const Fn = /* @__PURE__ */ new Map(), za = /* @__PURE__ */ new Map(), Ga = /* @__PURE__ */ new Map(),
|
|
188
|
+
const Fn = /* @__PURE__ */ new Map(), za = /* @__PURE__ */ new Map(), Ga = /* @__PURE__ */ new Map(), Dn = async (n) => {
|
|
189
189
|
const t = za.get(n);
|
|
190
190
|
if (t) return t;
|
|
191
191
|
const a = (async () => {
|
|
@@ -209,7 +209,7 @@ const Fn = /* @__PURE__ */ new Map(), za = /* @__PURE__ */ new Map(), Ga = /* @_
|
|
|
209
209
|
const n = te();
|
|
210
210
|
return new n.DOMParser();
|
|
211
211
|
}, nr = () => Nt([typeof DOMParser]) ? DOMParser : te().DOMParser, Ne = (n, t) => new Promise((e, a) => {
|
|
212
|
-
t ?
|
|
212
|
+
t ? Dn(n).then(e).catch(a) : nt(n).then((i) => {
|
|
213
213
|
i.arrayBuffer().then(e).catch(a);
|
|
214
214
|
}).catch((i) => {
|
|
215
215
|
a(i);
|
|
@@ -218,7 +218,7 @@ const Fn = /* @__PURE__ */ new Map(), za = /* @__PURE__ */ new Map(), Ga = /* @_
|
|
|
218
218
|
t ? er(n).then(e).catch(a) : nt(n).then((i) => {
|
|
219
219
|
i.text().then(e).catch(a);
|
|
220
220
|
}).catch(a);
|
|
221
|
-
}),
|
|
221
|
+
}), xn = (n) => Ni(n), We = /* @__PURE__ */ new Map(), ir = async (n, t) => {
|
|
222
222
|
if (Nt([typeof FontFace])) {
|
|
223
223
|
if (We.has(t))
|
|
224
224
|
return We.get(t);
|
|
@@ -259,7 +259,7 @@ const Fn = /* @__PURE__ */ new Map(), za = /* @__PURE__ */ new Map(), Ga = /* @_
|
|
|
259
259
|
const e = t();
|
|
260
260
|
return e || "image/svg+xml";
|
|
261
261
|
}, ud = async (n) => {
|
|
262
|
-
const t = await
|
|
262
|
+
const t = await Dn(n), e = Fn.get(n) || Qe(t);
|
|
263
263
|
return await sr(new Blob([t], { type: e }));
|
|
264
264
|
}, rr = (n) => {
|
|
265
265
|
let t = "";
|
|
@@ -349,8 +349,8 @@ class mr {
|
|
|
349
349
|
const y = window.__SENTRY__.hub;
|
|
350
350
|
if (y) {
|
|
351
351
|
const w = y.traceHeaders();
|
|
352
|
-
Object.entries(w).forEach(([
|
|
353
|
-
l[
|
|
352
|
+
Object.entries(w).forEach(([D, b]) => {
|
|
353
|
+
l[D] = b;
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
356
|
}
|
|
@@ -363,9 +363,9 @@ class mr {
|
|
|
363
363
|
const l = o || [], c = r.getContext();
|
|
364
364
|
s && !c?.fetchOptions?.signal?.aborted && console.log("GraphQL Network error"), l.forEach(() => console.log("GraphQL Error: " + r.operationName));
|
|
365
365
|
}), i = Qi();
|
|
366
|
-
return new
|
|
366
|
+
return new Di({
|
|
367
367
|
link: ki([i, a, e, t]),
|
|
368
|
-
cache: new
|
|
368
|
+
cache: new xi(),
|
|
369
369
|
name: "Core"
|
|
370
370
|
});
|
|
371
371
|
}
|
|
@@ -3348,16 +3348,16 @@ const le = (n) => {
|
|
|
3348
3348
|
if (!r)
|
|
3349
3349
|
throw new Error("Failed to read SVG.");
|
|
3350
3350
|
return Fr(r, t, e), $n(r, a, i), Un(r);
|
|
3351
|
-
},
|
|
3351
|
+
}, Da = (n, t, e) => {
|
|
3352
3352
|
const a = Rn(n);
|
|
3353
3353
|
if (!a)
|
|
3354
3354
|
throw new Error("Failed to read SVG.");
|
|
3355
3355
|
return $n(a, t, e), Un(a);
|
|
3356
|
-
},
|
|
3356
|
+
}, Dr = (n) => {
|
|
3357
3357
|
const t = /<svg.*<\/svg>/s, e = n.match(t) || [], a = e?.length > 0 ? e[0] : "";
|
|
3358
3358
|
return ut().parseFromString(a, "image/svg+xml");
|
|
3359
3359
|
}, st = async (n) => {
|
|
3360
|
-
const e =
|
|
3360
|
+
const e = Dr(n).firstElementChild;
|
|
3361
3361
|
if (!e)
|
|
3362
3362
|
throw new Error("Failed to read SVG.");
|
|
3363
3363
|
Pa(e);
|
|
@@ -3395,7 +3395,7 @@ const le = (n) => {
|
|
|
3395
3395
|
colors: a,
|
|
3396
3396
|
svg: r
|
|
3397
3397
|
};
|
|
3398
|
-
},
|
|
3398
|
+
}, xr = C`
|
|
3399
3399
|
fragment AssetMetadataFields on Asset {
|
|
3400
3400
|
metadata {
|
|
3401
3401
|
key
|
|
@@ -3403,7 +3403,7 @@ const le = (n) => {
|
|
|
3403
3403
|
}
|
|
3404
3404
|
}
|
|
3405
3405
|
`, Re = (n) => C`
|
|
3406
|
-
${n &&
|
|
3406
|
+
${n && xr || ""}
|
|
3407
3407
|
fragment AssetFields on Asset {
|
|
3408
3408
|
name
|
|
3409
3409
|
key
|
|
@@ -3689,7 +3689,7 @@ class Rr {
|
|
|
3689
3689
|
async postProcessFileUpload(t, e) {
|
|
3690
3690
|
if (e === "image/svg+xml") {
|
|
3691
3691
|
const a = await t.blob.text(), o = new window.DOMParser().parseFromString(a, "image/svg+xml").documentElement;
|
|
3692
|
-
if (!o) throw new
|
|
3692
|
+
if (!o) throw new Dt("Failed to read SVG.");
|
|
3693
3693
|
Pr(o);
|
|
3694
3694
|
const l = Pt().serializeToString(o);
|
|
3695
3695
|
return {
|
|
@@ -5284,11 +5284,11 @@ const N = () => {
|
|
|
5284
5284
|
const h = e || 0, g = 2 * (l?.scale || 1), p = A || { x: 0, y: 0, width: u, height: r }, m = `${p.x} ${p.y} ${p.width} ${p.height}`, f = N(), y = a.purpose === Jt.FreeDesign && /* @__PURE__ */ F("defs", { children: /* @__PURE__ */ F("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ F("rect", { width: p.width, height: p.height, rx: h }) }) }), w = a.colorProfiles?.map((v, I) => (
|
|
5285
5285
|
/* @ts-ignore */
|
|
5286
5286
|
/* @__PURE__ */ F("color-profile", { name: v.name, xlinkHref: v.key, children: " " }, I)
|
|
5287
|
-
)),
|
|
5287
|
+
)), D = i.map((v) => ({
|
|
5288
5288
|
...v,
|
|
5289
5289
|
_renderingConfiguration: a,
|
|
5290
5290
|
mask: l ? `url(#viewmask-${f})` : void 0
|
|
5291
|
-
})), b = ka(
|
|
5291
|
+
})), b = ka(D);
|
|
5292
5292
|
return /* @__PURE__ */ dt(
|
|
5293
5293
|
"svg",
|
|
5294
5294
|
{
|
|
@@ -5367,10 +5367,10 @@ const N = () => {
|
|
|
5367
5367
|
}
|
|
5368
5368
|
);
|
|
5369
5369
|
}, pd = (n, t, e, a, i) => {
|
|
5370
|
-
const r = yt(i), o = e / 2, s = a / 2, l = n + o, c = t + s, d = Math.sin(r), A = Math.cos(r), u = o, h = o, g = -s, p = s, m = u * A - g * d, f = h * A - p * d, y = u * d + g * A, w = h * d + p * A,
|
|
5370
|
+
const r = yt(i), o = e / 2, s = a / 2, l = n + o, c = t + s, d = Math.sin(r), A = Math.cos(r), u = o, h = o, g = -s, p = s, m = u * A - g * d, f = h * A - p * d, y = u * d + g * A, w = h * d + p * A, D = Math.max(Math.abs(m), Math.abs(f)), b = Math.max(Math.abs(y), Math.abs(w));
|
|
5371
5371
|
return {
|
|
5372
|
-
minX: l -
|
|
5373
|
-
maxX: l +
|
|
5372
|
+
minX: l - D,
|
|
5373
|
+
maxX: l + D,
|
|
5374
5374
|
minY: c - b,
|
|
5375
5375
|
maxY: c + b
|
|
5376
5376
|
};
|
|
@@ -5502,7 +5502,7 @@ const N = () => {
|
|
|
5502
5502
|
if (!n.pattern)
|
|
5503
5503
|
return "";
|
|
5504
5504
|
if (n.pattern.svg) {
|
|
5505
|
-
const A =
|
|
5505
|
+
const A = Da(n.pattern.svg, n.pattern.colors || {}, !1);
|
|
5506
5506
|
return ba(A);
|
|
5507
5507
|
}
|
|
5508
5508
|
return n.pattern.src;
|
|
@@ -5532,7 +5532,7 @@ const N = () => {
|
|
|
5532
5532
|
const A = n.pattern?.x || 0, u = n.pattern?.y || 0, h = n.pattern?.width || 0, g = n.pattern?.height || 0, p = n.pattern?.scaleX || 1, m = n.pattern?.scaleY || 1, f = n.pattern?.rotation || 0;
|
|
5533
5533
|
return [n.pattern?.svg ? {
|
|
5534
5534
|
id: `${t}-contents`,
|
|
5535
|
-
type:
|
|
5535
|
+
type: x.Illustration,
|
|
5536
5536
|
x: A,
|
|
5537
5537
|
y: u,
|
|
5538
5538
|
rotation: f,
|
|
@@ -5543,7 +5543,7 @@ const N = () => {
|
|
|
5543
5543
|
colors: n.pattern?.colors
|
|
5544
5544
|
} : {
|
|
5545
5545
|
id: `${t}-contents`,
|
|
5546
|
-
type:
|
|
5546
|
+
type: x.Image,
|
|
5547
5547
|
x: A,
|
|
5548
5548
|
y: u,
|
|
5549
5549
|
rotation: f,
|
|
@@ -5680,12 +5680,12 @@ const Eo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
|
|
|
5680
5680
|
});
|
|
5681
5681
|
const o = e.querySelectorAll("tspan");
|
|
5682
5682
|
for (let d = 0; d < o.length; d++) {
|
|
5683
|
-
const A = o.item(d), u = A.closest("text"), h = A.closest("g"), g = u.getAttribute("font-family"), p = await Qt(i.get(g)), m = $i(A.innerHTML), f = u.getAttribute("fill"), y = u.getAttribute("stroke"), w = u.getAttribute("stroke-width"),
|
|
5683
|
+
const A = o.item(d), u = A.closest("text"), h = A.closest("g"), g = u.getAttribute("font-family"), p = await Qt(i.get(g)), m = $i(A.innerHTML), f = u.getAttribute("fill"), y = u.getAttribute("stroke"), w = u.getAttribute("stroke-width"), D = p.getPath(
|
|
5684
5684
|
m,
|
|
5685
5685
|
0,
|
|
5686
5686
|
0,
|
|
5687
5687
|
parseInt(u.getAttribute("font-size") ?? "72")
|
|
5688
|
-
), b =
|
|
5688
|
+
), b = D.getBoundingBox().x2 - D.getBoundingBox().x1;
|
|
5689
5689
|
let v = 0;
|
|
5690
5690
|
const I = A.getAttribute("text-anchor");
|
|
5691
5691
|
I === "middle" ? v = b / 2 : I === "end" && (v = b);
|
|
@@ -5780,7 +5780,7 @@ const Eo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
|
|
|
5780
5780
|
const o = St(t.assetUrl).getFont();
|
|
5781
5781
|
let s = { ...n };
|
|
5782
5782
|
const l = { ...n }, c = Xn(a, e / o.unitsPerEm, St(t.assetUrl));
|
|
5783
|
-
return c && c < s.width && (l.width = c, i === "left" ? (l.left += Math.sin(s.rotation * Math.PI / 360) * (s.width - c), l.top += Math.sin(s.rotation * Math.PI / 180) * (c - s.width) / 2) : i === "right" ? l.left += s.width - c : l.left += (s.width - c) / 2, a &&
|
|
5783
|
+
return c && c < s.width && (l.width = c, i === "left" ? (l.left += Math.sin(s.rotation * Math.PI / 360) * (s.width - c), l.top += Math.sin(s.rotation * Math.PI / 180) * (c - s.width) / 2) : i === "right" ? l.left += s.width - c : l.left += (s.width - c) / 2, a && Do(a, a).every(([d, A]) => d === A) && (s = l)), s;
|
|
5784
5784
|
}, _e = 1, ft = (n, t, e) => {
|
|
5785
5785
|
let a = 0;
|
|
5786
5786
|
const i = e.getGlyphs(n);
|
|
@@ -5813,7 +5813,7 @@ const Eo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
|
|
|
5813
5813
|
let a = n || "";
|
|
5814
5814
|
return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
|
|
5815
5815
|
`)), a;
|
|
5816
|
-
},
|
|
5816
|
+
}, Do = (n, t) => n.map((e, a) => [e, t[a]]), xo = (n = "center", t = !1) => t ? "center" : n, Zn = (n) => n === "left" ? "start" : n === "right" ? "end" : "middle", ne = (n, t, e) => n.fontData ? {
|
|
5817
5817
|
...n,
|
|
5818
5818
|
...(() => {
|
|
5819
5819
|
if (n.algorithm === Tt.Traditional) {
|
|
@@ -5832,7 +5832,7 @@ const Eo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
|
|
|
5832
5832
|
};
|
|
5833
5833
|
})()
|
|
5834
5834
|
} : n, ti = 1.1;
|
|
5835
|
-
function
|
|
5835
|
+
function xt(n, t) {
|
|
5836
5836
|
return ei(n, t.getTemplatingContext());
|
|
5837
5837
|
}
|
|
5838
5838
|
function ei(n, t) {
|
|
@@ -6061,7 +6061,7 @@ class Qo {
|
|
|
6061
6061
|
layout: t,
|
|
6062
6062
|
elements: e
|
|
6063
6063
|
},
|
|
6064
|
-
getComponentWithProps: (a) =>
|
|
6064
|
+
getComponentWithProps: (a) => xa(t, e, a)
|
|
6065
6065
|
};
|
|
6066
6066
|
}
|
|
6067
6067
|
initialize(t, e) {
|
|
@@ -6086,7 +6086,7 @@ class Qo {
|
|
|
6086
6086
|
return { ...t, transaction: e.apply(a) };
|
|
6087
6087
|
}
|
|
6088
6088
|
}
|
|
6089
|
-
const ai = (n) => n.type ===
|
|
6089
|
+
const ai = (n) => n.type === x.Image ? /* @__PURE__ */ F(Jn, { ...n }, n.id) : n.type === x.Frame ? /* @__PURE__ */ F(So, { ...n }, n.id) : n.type === x.Illustration ? /* @__PURE__ */ F(No, { ...n }, n.id) : n.type === x.Textbox ? /* @__PURE__ */ F(ko, { ...n }, n.id) : n.type === x.Group ? /* @__PURE__ */ F(Kn, { ...n }, n.id) : null, xa = (n, t, e) => {
|
|
6090
6090
|
const a = e.renderingConfiguration, i = a?.removeExcludedElements ? t.filter((r) => !r.excludeFromExport) : t;
|
|
6091
6091
|
return /* @__PURE__ */ F(
|
|
6092
6092
|
yo,
|
|
@@ -6294,26 +6294,26 @@ const mt = /* @__PURE__ */ new Map(), zt = /* @__PURE__ */ new Map(), Xe = /* @_
|
|
|
6294
6294
|
rotation: 0,
|
|
6295
6295
|
panelId: n.layoutState.layout.panelId
|
|
6296
6296
|
};
|
|
6297
|
-
if (e && t ===
|
|
6297
|
+
if (e && t === x.Illustration) {
|
|
6298
6298
|
const l = await st(await ri(e)), u = ut().parseFromString(l.svg, "image/svg+xml").firstElementChild.getAttribute("viewBox");
|
|
6299
6299
|
if (!u) throw new Error("SVG missing viewBox.");
|
|
6300
6300
|
const h = s.height, g = u.split(" "), p = parseFloat(g[2]) || 1, m = parseFloat(g[3]) || 1, f = p / m;
|
|
6301
6301
|
s.height = s.width / f, s.top += (h - s.height) / 2;
|
|
6302
6302
|
}
|
|
6303
|
-
if (e && t ===
|
|
6303
|
+
if (e && t === x.Image) {
|
|
6304
6304
|
const l = s.height, c = await Ne(e), d = await Oe(c), A = d.width / d.height;
|
|
6305
6305
|
s.height = s.width / A, s.top += (l - s.height) / 2;
|
|
6306
6306
|
}
|
|
6307
|
-
if (e && t ===
|
|
6307
|
+
if (e && t === x.Textbox && a?.text && a?.fontScale) {
|
|
6308
6308
|
await Qt(e);
|
|
6309
6309
|
const l = St(e), c = ft(a.text, a?.fontScale, l);
|
|
6310
6310
|
s.width = Math.min(c, i.width * 0.85), s.left = i.x + i.width / 2 - s.width / 2;
|
|
6311
6311
|
}
|
|
6312
6312
|
return s;
|
|
6313
6313
|
};
|
|
6314
|
-
class
|
|
6314
|
+
class Dd {
|
|
6315
6315
|
static async getFrame(t, e) {
|
|
6316
|
-
const a = await ni(e.region, e.src), i = await Ve(a), r = e.region || await Vt(t,
|
|
6316
|
+
const a = await ni(e.region, e.src), i = await Ve(a), r = e.region || await Vt(t, x.Frame);
|
|
6317
6317
|
return {
|
|
6318
6318
|
id: N(),
|
|
6319
6319
|
x: r.left,
|
|
@@ -6328,7 +6328,7 @@ class xd {
|
|
|
6328
6328
|
path: i.path,
|
|
6329
6329
|
dataWidth: i.width,
|
|
6330
6330
|
dataHeight: i.height,
|
|
6331
|
-
type:
|
|
6331
|
+
type: x.Frame,
|
|
6332
6332
|
disablePlaceholder: e.configuration.disablePlaceholder,
|
|
6333
6333
|
focalBlur: e.configuration.focalBlur,
|
|
6334
6334
|
focalBlurStrength: e.configuration.focalBlurStrength,
|
|
@@ -6339,11 +6339,11 @@ class xd {
|
|
|
6339
6339
|
};
|
|
6340
6340
|
}
|
|
6341
6341
|
static async getImage(t, e) {
|
|
6342
|
-
const a = e.region || await Vt(t,
|
|
6342
|
+
const a = e.region || await Vt(t, x.Image, e.src);
|
|
6343
6343
|
return {
|
|
6344
6344
|
id: N(),
|
|
6345
6345
|
src: e.src,
|
|
6346
|
-
type:
|
|
6346
|
+
type: x.Image,
|
|
6347
6347
|
y: a.top,
|
|
6348
6348
|
x: a.left,
|
|
6349
6349
|
rotation: a.rotation,
|
|
@@ -6362,18 +6362,18 @@ class xd {
|
|
|
6362
6362
|
}, l = r?.text || a.defaultText || "", c = a.replaceableText ? a.replaceableText.replace("{{}}", l) : l, d = Pe(c, {
|
|
6363
6363
|
vertical: a.vertical,
|
|
6364
6364
|
uppercase: a.uppercase
|
|
6365
|
-
}), A = e.region || await Vt(t,
|
|
6365
|
+
}), A = e.region || await Vt(t, x.Textbox, i, {
|
|
6366
6366
|
text: d,
|
|
6367
6367
|
fontScale: a.size ? a.size / o.unitsPerEm : void 0
|
|
6368
6368
|
}), u = ne(
|
|
6369
6369
|
{
|
|
6370
6370
|
id: N(),
|
|
6371
|
-
type:
|
|
6371
|
+
type: x.Textbox,
|
|
6372
6372
|
x: A.left,
|
|
6373
6373
|
y: A.top,
|
|
6374
6374
|
width: A.width,
|
|
6375
6375
|
height: A.height,
|
|
6376
|
-
align:
|
|
6376
|
+
align: xo(a.textAlign, a.vertical),
|
|
6377
6377
|
curved: a.curved,
|
|
6378
6378
|
fill: r?.color || a.colour || "#000000",
|
|
6379
6379
|
fontData: s,
|
|
@@ -6428,14 +6428,14 @@ class xd {
|
|
|
6428
6428
|
</svg>
|
|
6429
6429
|
`, i = {};
|
|
6430
6430
|
i["spiff-fill-shape"] = { browserValue: e.color };
|
|
6431
|
-
const r = e.region?.item || await Vt(t,
|
|
6431
|
+
const r = e.region?.item || await Vt(t, x.Illustration), o = N();
|
|
6432
6432
|
return {
|
|
6433
6433
|
stepRegion: e.region?.item,
|
|
6434
6434
|
stepRegionIndex: e.region?.index,
|
|
6435
6435
|
colors: i,
|
|
6436
6436
|
id: o,
|
|
6437
6437
|
svg: a,
|
|
6438
|
-
type:
|
|
6438
|
+
type: x.Illustration,
|
|
6439
6439
|
y: r.top,
|
|
6440
6440
|
x: r.left,
|
|
6441
6441
|
rotation: r.rotation,
|
|
@@ -6447,7 +6447,7 @@ class xd {
|
|
|
6447
6447
|
};
|
|
6448
6448
|
}
|
|
6449
6449
|
static async getIllustration(t, e) {
|
|
6450
|
-
const a = e.region?.item || await Vt(t,
|
|
6450
|
+
const a = e.region?.item || await Vt(t, x.Illustration, e.src), i = await st(await ri(e.src)), r = await Xt(i.svg), o = N();
|
|
6451
6451
|
return {
|
|
6452
6452
|
cachedObjectURL: r,
|
|
6453
6453
|
stepRegion: e.region?.item,
|
|
@@ -6456,7 +6456,7 @@ class xd {
|
|
|
6456
6456
|
id: o,
|
|
6457
6457
|
src: e.src,
|
|
6458
6458
|
svg: i.svg,
|
|
6459
|
-
type:
|
|
6459
|
+
type: x.Illustration,
|
|
6460
6460
|
y: a.top,
|
|
6461
6461
|
x: a.left,
|
|
6462
6462
|
rotation: a.rotation,
|
|
@@ -6515,7 +6515,7 @@ const L = (n, t) => _(n, t).elements.find((i) => i.id === n), _ = (n, t) => {
|
|
|
6515
6515
|
}
|
|
6516
6516
|
for (const a in n.layouts) {
|
|
6517
6517
|
const i = n.layouts[a].elements.filter(
|
|
6518
|
-
(o) => o.type ===
|
|
6518
|
+
(o) => o.type === x.Illustration
|
|
6519
6519
|
);
|
|
6520
6520
|
for (let o = 0; o < i.length; ++o) {
|
|
6521
6521
|
const s = i[o];
|
|
@@ -6527,7 +6527,7 @@ const L = (n, t) => _(n, t).elements.find((i) => i.id === n), _ = (n, t) => {
|
|
|
6527
6527
|
}
|
|
6528
6528
|
}
|
|
6529
6529
|
const r = n.layouts[a].elements.filter(
|
|
6530
|
-
(o) => o.type ===
|
|
6530
|
+
(o) => o.type === x.Textbox
|
|
6531
6531
|
);
|
|
6532
6532
|
for (let o = 0; o < r.length; ++o) {
|
|
6533
6533
|
const s = r[o];
|
|
@@ -6556,7 +6556,7 @@ class en extends $ {
|
|
|
6556
6556
|
};
|
|
6557
6557
|
}
|
|
6558
6558
|
}
|
|
6559
|
-
class
|
|
6559
|
+
class xd extends $ {
|
|
6560
6560
|
constructor(t, e, a) {
|
|
6561
6561
|
super(), this.id = t, this.x = e, this.y = a;
|
|
6562
6562
|
}
|
|
@@ -7158,7 +7158,7 @@ class nn {
|
|
|
7158
7158
|
throw new At(this.configuration, "Couldn't find an asset for product overlay step");
|
|
7159
7159
|
}
|
|
7160
7160
|
const s = this.evaluateAssetType();
|
|
7161
|
-
if (s ===
|
|
7161
|
+
if (s === x.Image) {
|
|
7162
7162
|
const l = this.configuration.type === E.SilentIllustration ? this.configuration.data.asset?.fileLink : this.product?.overlayImageUrl;
|
|
7163
7163
|
if (!l)
|
|
7164
7164
|
throw new Error("Undefined raster silent step source");
|
|
@@ -7240,7 +7240,7 @@ class nn {
|
|
|
7240
7240
|
}
|
|
7241
7241
|
evaluateAssetType() {
|
|
7242
7242
|
const t = this.configuration.type === E.ProductOverlay && this.product?.overlayImageUrl ? this.product.overlayImageUrl.toLowerCase() : this.configuration.data.asset?.fileLink?.toLowerCase().split("?")[0];
|
|
7243
|
-
return t?.startsWith("data:image/png") || t?.endsWith(".jpeg") || t?.endsWith(".jpg") || t?.endsWith(".png") ?
|
|
7243
|
+
return t?.startsWith("data:image/png") || t?.endsWith(".jpeg") || t?.endsWith(".jpg") || t?.endsWith(".png") ? x.Image : (t?.endsWith(".svg") || t?.startsWith("image/svg+xml"), x.Illustration);
|
|
7244
7244
|
}
|
|
7245
7245
|
}
|
|
7246
7246
|
const qo = async (n) => {
|
|
@@ -7361,7 +7361,7 @@ class Wo {
|
|
|
7361
7361
|
stepName: i,
|
|
7362
7362
|
id: c.id,
|
|
7363
7363
|
src: s,
|
|
7364
|
-
type:
|
|
7364
|
+
type: x.Image,
|
|
7365
7365
|
y: d.top,
|
|
7366
7366
|
x: d.left,
|
|
7367
7367
|
width: d.width,
|
|
@@ -7403,11 +7403,14 @@ class Fe {
|
|
|
7403
7403
|
const s = o.getGlobalPropertyStateManager(), l = t.globalPropertyAspectConfigurations[0], c = s.getAspectStorage(l.aspectName);
|
|
7404
7404
|
c && c.originalAssetKey && (r = (await j.getLocalOrFromServer(c.originalAssetKey)).fileLink);
|
|
7405
7405
|
}
|
|
7406
|
-
if (t.option
|
|
7407
|
-
const s =
|
|
7408
|
-
|
|
7406
|
+
if (t.option) {
|
|
7407
|
+
const s = await B.getDefaultVariant(
|
|
7408
|
+
t.option,
|
|
7409
|
+
t.overrideDefaultVariantId
|
|
7410
|
+
);
|
|
7411
|
+
return s ? this.selectVariantCommand(
|
|
7409
7412
|
t,
|
|
7410
|
-
|
|
7413
|
+
s,
|
|
7411
7414
|
[],
|
|
7412
7415
|
e,
|
|
7413
7416
|
void 0,
|
|
@@ -7527,7 +7530,7 @@ class Fe {
|
|
|
7527
7530
|
return new q(
|
|
7528
7531
|
{
|
|
7529
7532
|
id: t,
|
|
7530
|
-
type:
|
|
7533
|
+
type: x.Frame,
|
|
7531
7534
|
x: e.left,
|
|
7532
7535
|
y: e.top,
|
|
7533
7536
|
width: e.width,
|
|
@@ -7670,18 +7673,18 @@ class Fe {
|
|
|
7670
7673
|
scaleX: y?.zoom || 1,
|
|
7671
7674
|
scaleY: y?.zoom || 1,
|
|
7672
7675
|
rotation: 0
|
|
7673
|
-
} : void 0,
|
|
7676
|
+
} : void 0, D = N(), v = i.getLayouts().find((I) => I.panelId === h.panelId);
|
|
7674
7677
|
if (!v)
|
|
7675
7678
|
throw new Y(h);
|
|
7676
7679
|
return {
|
|
7677
|
-
command: this.getCreateElementCommand(
|
|
7680
|
+
command: this.getCreateElementCommand(D, h, g, v, {
|
|
7678
7681
|
frameData: p,
|
|
7679
7682
|
pattern: w,
|
|
7680
7683
|
disablePlaceholder: t.data.disablePlaceholder,
|
|
7681
7684
|
stepName: t.stepName
|
|
7682
7685
|
}),
|
|
7683
7686
|
regionEl: {
|
|
7684
|
-
id:
|
|
7687
|
+
id: D,
|
|
7685
7688
|
region: h,
|
|
7686
7689
|
regionIndex: g
|
|
7687
7690
|
},
|
|
@@ -7767,7 +7770,7 @@ class Ho {
|
|
|
7767
7770
|
src: r.src,
|
|
7768
7771
|
svg: r.svg.svg,
|
|
7769
7772
|
cachedObjectURL: r.objectURL,
|
|
7770
|
-
type:
|
|
7773
|
+
type: x.Illustration,
|
|
7771
7774
|
y: e.top,
|
|
7772
7775
|
x: e.left,
|
|
7773
7776
|
rotation: e.rotation,
|
|
@@ -7922,7 +7925,7 @@ class Ho {
|
|
|
7922
7925
|
throw new Kt(r);
|
|
7923
7926
|
t.mandatory && i.setMandatoryFulfilled(t.stepName, !1);
|
|
7924
7927
|
const s = a.map((m) => new Ot(m.id)), l = await st(await this.getIllustrationBody(o)), c = await Xt(l.svg), d = (m, f) => {
|
|
7925
|
-
const y = i.getLayouts().find((
|
|
7928
|
+
const y = i.getLayouts().find((D) => D.panelId === m.panelId);
|
|
7926
7929
|
if (!y)
|
|
7927
7930
|
throw new Y(m);
|
|
7928
7931
|
const w = N();
|
|
@@ -7948,9 +7951,9 @@ class Ho {
|
|
|
7948
7951
|
const f = r.assetConfiguration?.defaultColorVariants || [];
|
|
7949
7952
|
if (f.length !== 0) {
|
|
7950
7953
|
const y = {};
|
|
7951
|
-
(r.assetConfiguration?.channelNumbers || []).forEach((
|
|
7952
|
-
const b = f.find((v) => v.channelNumber ===
|
|
7953
|
-
b && (y[`${
|
|
7954
|
+
(r.assetConfiguration?.channelNumbers || []).forEach((D) => {
|
|
7955
|
+
const b = f.find((v) => v.channelNumber === D.number);
|
|
7956
|
+
b && (y[`${D.id.replace(/\W/g, "")}`] = { browserValue: b?.variant?.color || "" });
|
|
7954
7957
|
}), await this.changeColors(
|
|
7955
7958
|
t,
|
|
7956
7959
|
m,
|
|
@@ -7959,8 +7962,8 @@ class Ho {
|
|
|
7959
7962
|
);
|
|
7960
7963
|
}
|
|
7961
7964
|
if (t.data.colorPickerEnabled) {
|
|
7962
|
-
const y = await this.availableColors(t, i) || [], w = Object.keys(l.colors),
|
|
7963
|
-
if (
|
|
7965
|
+
const y = await this.availableColors(t, i) || [], w = Object.keys(l.colors), D = y.length === 1 && w.length === 1;
|
|
7966
|
+
if (D) {
|
|
7964
7967
|
const b = y[0], v = w[0];
|
|
7965
7968
|
await this.changeColors(
|
|
7966
7969
|
t,
|
|
@@ -7969,7 +7972,7 @@ class Ho {
|
|
|
7969
7972
|
/* @__PURE__ */ new Map([[v, b.variant.color]])
|
|
7970
7973
|
);
|
|
7971
7974
|
}
|
|
7972
|
-
!
|
|
7975
|
+
!D && f.length === 0 && await this.changeColors(t, m, i, /* @__PURE__ */ new Map());
|
|
7973
7976
|
}
|
|
7974
7977
|
}
|
|
7975
7978
|
};
|
|
@@ -8189,7 +8192,7 @@ class Jo {
|
|
|
8189
8192
|
colors: {},
|
|
8190
8193
|
id: g,
|
|
8191
8194
|
svg: d,
|
|
8192
|
-
type:
|
|
8195
|
+
type: x.Illustration,
|
|
8193
8196
|
y: A.top,
|
|
8194
8197
|
x: A.left,
|
|
8195
8198
|
rotation: A.rotation,
|
|
@@ -8321,7 +8324,7 @@ class Ko {
|
|
|
8321
8324
|
stepRegionIndex: u,
|
|
8322
8325
|
id: p,
|
|
8323
8326
|
src: o,
|
|
8324
|
-
type:
|
|
8327
|
+
type: x.Image,
|
|
8325
8328
|
y: A.top,
|
|
8326
8329
|
x: A.left,
|
|
8327
8330
|
rotation: A.rotation,
|
|
@@ -8542,7 +8545,7 @@ class Xo {
|
|
|
8542
8545
|
colors: f,
|
|
8543
8546
|
id: y,
|
|
8544
8547
|
svg: m,
|
|
8545
|
-
type:
|
|
8548
|
+
type: x.Illustration,
|
|
8546
8549
|
y: u.top,
|
|
8547
8550
|
x: u.left,
|
|
8548
8551
|
rotation: u.rotation,
|
|
@@ -8644,16 +8647,16 @@ const ts = new Zo(), aa = (n, t, e, a, i) => {
|
|
|
8644
8647
|
const A = d / l.unitsPerEm;
|
|
8645
8648
|
return [r, o] = aa(e, a, d, A, s), [d, r, o];
|
|
8646
8649
|
}, na = 30;
|
|
8647
|
-
class
|
|
8650
|
+
class De extends Error {
|
|
8648
8651
|
constructor(t) {
|
|
8649
|
-
super(t), Object.setPrototypeOf(this, new.target.prototype), this.name =
|
|
8652
|
+
super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = De.name;
|
|
8650
8653
|
}
|
|
8651
8654
|
}
|
|
8652
8655
|
const es = ["‘", "’", "“", "”", `
|
|
8653
8656
|
`];
|
|
8654
|
-
class
|
|
8657
|
+
class xe extends Error {
|
|
8655
8658
|
constructor(t) {
|
|
8656
|
-
super(t), Object.setPrototypeOf(this, new.target.prototype), this.name =
|
|
8659
|
+
super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = xe.name;
|
|
8657
8660
|
}
|
|
8658
8661
|
}
|
|
8659
8662
|
class as {
|
|
@@ -8871,7 +8874,7 @@ class as {
|
|
|
8871
8874
|
});
|
|
8872
8875
|
}
|
|
8873
8876
|
updateInputText(t, e, a, i) {
|
|
8874
|
-
const r = i.getStepStorage(a.stepName), o =
|
|
8877
|
+
const r = i.getStepStorage(a.stepName), o = xt(t, i), s = this.getProcessedInput(o, a.data, r?.customiseAllText ?? !1), l = {
|
|
8875
8878
|
command: void 0,
|
|
8876
8879
|
helperData: {},
|
|
8877
8880
|
errorData: this.getErrorsForText(t, s, a, i)
|
|
@@ -9146,11 +9149,11 @@ class as {
|
|
|
9146
9149
|
async createTextboxRegions(t, e, a, i, r, o) {
|
|
9147
9150
|
if (!a || !a.regions)
|
|
9148
9151
|
throw new Error("Step data not supplied");
|
|
9149
|
-
const s = r.text || a.defaultText || "", l =
|
|
9152
|
+
const s = r.text || a.defaultText || "", l = xt(s, o), c = this.getProcessedInput(l, a, !1), d = async (u, h) => {
|
|
9150
9153
|
const p = o.getLayouts().find((f) => f.panelId === u.panelId), m = N();
|
|
9151
9154
|
try {
|
|
9152
9155
|
if (!p)
|
|
9153
|
-
throw new
|
|
9156
|
+
throw new xe("Failed to find layout for region: " + u.panelId);
|
|
9154
9157
|
const f = await B.ensureFullOption(a.colorOption);
|
|
9155
9158
|
let y;
|
|
9156
9159
|
if (f && f.variants) {
|
|
@@ -9159,12 +9162,12 @@ class as {
|
|
|
9159
9162
|
colorProfileAssetKey: f.colorProfile?.key
|
|
9160
9163
|
}));
|
|
9161
9164
|
}
|
|
9162
|
-
const w = await this.getDefaultColor(a),
|
|
9165
|
+
const w = await this.getDefaultColor(a), D = w || "#000000", b = {
|
|
9163
9166
|
stepRegion: u,
|
|
9164
9167
|
stepRegionIndex: h,
|
|
9165
9168
|
stepName: t,
|
|
9166
9169
|
align: this.textAlign(a),
|
|
9167
|
-
fill: r.color ? r.color :
|
|
9170
|
+
fill: r.color ? r.color : D,
|
|
9168
9171
|
fontSize: a.size || na,
|
|
9169
9172
|
fontData: i,
|
|
9170
9173
|
id: m,
|
|
@@ -9173,7 +9176,7 @@ class as {
|
|
|
9173
9176
|
rotation: u.rotation,
|
|
9174
9177
|
text: c,
|
|
9175
9178
|
input: s,
|
|
9176
|
-
type:
|
|
9179
|
+
type: x.Textbox,
|
|
9177
9180
|
vertical: a.vertical,
|
|
9178
9181
|
x: u.left,
|
|
9179
9182
|
y: u.top,
|
|
@@ -9214,10 +9217,10 @@ class as {
|
|
|
9214
9217
|
fontData: i
|
|
9215
9218
|
};
|
|
9216
9219
|
} catch (f) {
|
|
9217
|
-
throw console.log(f), new
|
|
9220
|
+
throw console.log(f), new De("Error adding font to region");
|
|
9218
9221
|
}
|
|
9219
9222
|
}, A = await Promise.all(a.regions.map(d)).catch((u) => {
|
|
9220
|
-
throw u instanceof
|
|
9223
|
+
throw u instanceof De ? (ts.setLatestToast("Failed to load font.", Ge.Error), u) : u instanceof xe ? u : new Error(u);
|
|
9221
9224
|
});
|
|
9222
9225
|
return await o.setSelectionsAndElements(
|
|
9223
9226
|
t,
|
|
@@ -9244,7 +9247,7 @@ class as {
|
|
|
9244
9247
|
* @deprecated
|
|
9245
9248
|
*/
|
|
9246
9249
|
async changeInputTextWithRegion(t, e, a, i, r, o, s, l, c, d) {
|
|
9247
|
-
const A = (i || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u =
|
|
9250
|
+
const A = (i || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = xt(A, o), h = this.getProcessedInput(u, t.data, s), g = o.getRegionElements(t.stepName), p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
|
|
9248
9251
|
for (const b of g)
|
|
9249
9252
|
if (b.region) {
|
|
9250
9253
|
const [v, I] = we(
|
|
@@ -9382,7 +9385,7 @@ class ds {
|
|
|
9382
9385
|
u = (A * 100 | 0) / 100;
|
|
9383
9386
|
break;
|
|
9384
9387
|
default:
|
|
9385
|
-
throw new
|
|
9388
|
+
throw new Dt("Failed to encode path.");
|
|
9386
9389
|
}
|
|
9387
9390
|
l || o.push(" "), o.push(u), l = !1;
|
|
9388
9391
|
}
|
|
@@ -9396,12 +9399,12 @@ class ds {
|
|
|
9396
9399
|
for (e.lastIndex = 0; r = e.exec(t); ) {
|
|
9397
9400
|
const o = r[1].toLowerCase(), s = (r[2].match(a) || []).map(parseFloat), l = o === r[1], c = rn[o];
|
|
9398
9401
|
if (s.length < c.length)
|
|
9399
|
-
throw new
|
|
9402
|
+
throw new Dt(
|
|
9400
9403
|
`Path type "${o}" given ${s.length} arguments, expected ${c.length}.`
|
|
9401
9404
|
);
|
|
9402
9405
|
if (c.length > 0) {
|
|
9403
9406
|
if (s.length % c.length !== 0)
|
|
9404
|
-
throw new
|
|
9407
|
+
throw new Dt(
|
|
9405
9408
|
`Path type "${o}" given ${s.length} arguments, not divisible by ${c.length}`
|
|
9406
9409
|
);
|
|
9407
9410
|
for (let d = 0; d < s.length / c.length; d++) {
|
|
@@ -9426,7 +9429,7 @@ class ds {
|
|
|
9426
9429
|
if (s in r && l in r) {
|
|
9427
9430
|
const c = [r[s], r[l]], d = e(c);
|
|
9428
9431
|
if (d.length < 2)
|
|
9429
|
-
throw new
|
|
9432
|
+
throw new Dt("Transformer must return at least 2 points.");
|
|
9430
9433
|
r[s] = d[0], r[l] = d[1];
|
|
9431
9434
|
}
|
|
9432
9435
|
}
|
|
@@ -9463,10 +9466,10 @@ class As extends ns {
|
|
|
9463
9466
|
const a = bo(is), r = t !== "" ? ((w) => w.charAt(0).toUpperCase() + w.substr(1).toLowerCase())(t) : "", o = a.getPath(r, 0, 72, 72), s = o.toSVG(2), l = o.getBoundingBox(), c = l.x2 - l.x1, d = o.toPathData(3), A = () => {
|
|
9464
9467
|
const w = et("g");
|
|
9465
9468
|
w.classList.add("module-text-group");
|
|
9466
|
-
const
|
|
9467
|
-
w.appendChild(
|
|
9469
|
+
const D = et("defs");
|
|
9470
|
+
w.appendChild(D), D.appendChild(os(0, 2, 2, "shadow"));
|
|
9468
9471
|
const b = et("path");
|
|
9469
|
-
b.setAttribute("d", d), b.setAttribute("stroke", "black"), b.setAttribute("stroke-width", "3"),
|
|
9472
|
+
b.setAttribute("d", d), b.setAttribute("stroke", "black"), b.setAttribute("stroke-width", "3"), D.appendChild(b);
|
|
9470
9473
|
const v = et("g");
|
|
9471
9474
|
v.classList.add("module-layer0"), w.appendChild(v), v.setAttribute("filter", "url(#shadow)"), v.innerHTML = b.outerHTML;
|
|
9472
9475
|
const I = et("g");
|
|
@@ -9520,7 +9523,7 @@ const us = [
|
|
|
9520
9523
|
{
|
|
9521
9524
|
id: p,
|
|
9522
9525
|
src: d,
|
|
9523
|
-
type:
|
|
9526
|
+
type: x.Image,
|
|
9524
9527
|
y: h.top,
|
|
9525
9528
|
x: h.left,
|
|
9526
9529
|
width: h.width,
|
|
@@ -9559,7 +9562,7 @@ const us = [
|
|
|
9559
9562
|
{
|
|
9560
9563
|
id: u,
|
|
9561
9564
|
path: A.path,
|
|
9562
|
-
type:
|
|
9565
|
+
type: x.Frame,
|
|
9563
9566
|
forceImageCover: a.data.forceImageCover,
|
|
9564
9567
|
x: c.left,
|
|
9565
9568
|
y: c.top,
|
|
@@ -9642,7 +9645,7 @@ const us = [
|
|
|
9642
9645
|
colors: p,
|
|
9643
9646
|
id: I,
|
|
9644
9647
|
svg: f,
|
|
9645
|
-
type:
|
|
9648
|
+
type: x.Illustration,
|
|
9646
9649
|
y: b.top,
|
|
9647
9650
|
x: b.left,
|
|
9648
9651
|
rotation: b.rotation,
|
|
@@ -9654,9 +9657,9 @@ const us = [
|
|
|
9654
9657
|
},
|
|
9655
9658
|
v
|
|
9656
9659
|
);
|
|
9657
|
-
},
|
|
9660
|
+
}, D = a.data.regions;
|
|
9658
9661
|
try {
|
|
9659
|
-
return
|
|
9662
|
+
return D.map(w);
|
|
9660
9663
|
} catch (b) {
|
|
9661
9664
|
return console.error(b), [];
|
|
9662
9665
|
}
|
|
@@ -9671,7 +9674,7 @@ const us = [
|
|
|
9671
9674
|
colors: {},
|
|
9672
9675
|
id: d,
|
|
9673
9676
|
svg: s,
|
|
9674
|
-
type:
|
|
9677
|
+
type: x.Illustration,
|
|
9675
9678
|
y: l.top,
|
|
9676
9679
|
x: l.left,
|
|
9677
9680
|
rotation: l.rotation,
|
|
@@ -9712,7 +9715,7 @@ const us = [
|
|
|
9712
9715
|
{
|
|
9713
9716
|
id: u,
|
|
9714
9717
|
src: s,
|
|
9715
|
-
type:
|
|
9718
|
+
type: x.Image,
|
|
9716
9719
|
y: d.top,
|
|
9717
9720
|
x: d.left,
|
|
9718
9721
|
rotation: d.rotation,
|
|
@@ -9769,7 +9772,7 @@ const us = [
|
|
|
9769
9772
|
colors: h,
|
|
9770
9773
|
id: g,
|
|
9771
9774
|
svg: A,
|
|
9772
|
-
type:
|
|
9775
|
+
type: x.Illustration,
|
|
9773
9776
|
y: c.top,
|
|
9774
9777
|
x: c.left,
|
|
9775
9778
|
rotation: c.rotation,
|
|
@@ -9788,7 +9791,7 @@ const us = [
|
|
|
9788
9791
|
return console.error(c), [];
|
|
9789
9792
|
}
|
|
9790
9793
|
}, ws = async (n, t, e) => {
|
|
9791
|
-
const a = [], r = t.type === E.ProductOverlay ? e || t.data.asset?.fileLink || "" : t.data.asset?.fileLink || "", s = r.endsWith(".jpeg") || r.endsWith(".jpg") || r.endsWith(".png") ?
|
|
9794
|
+
const a = [], r = t.type === E.ProductOverlay ? e || t.data.asset?.fileLink || "" : t.data.asset?.fileLink || "", s = r.endsWith(".jpeg") || r.endsWith(".jpg") || r.endsWith(".png") ? x.Image : (r.endsWith(".svg"), x.Illustration), l = t.data.regions;
|
|
9792
9795
|
if (s === "image")
|
|
9793
9796
|
try {
|
|
9794
9797
|
l.forEach((c) => {
|
|
@@ -9821,7 +9824,7 @@ const us = [
|
|
|
9821
9824
|
const c = await at(r, !0), d = (A) => {
|
|
9822
9825
|
const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], g = h?.length > 0 ? h[0] : "", f = ut().parseFromString(g, "image/svg+xml").firstElementChild;
|
|
9823
9826
|
if (!f)
|
|
9824
|
-
throw new
|
|
9827
|
+
throw new Dt("Failed to read SVG.");
|
|
9825
9828
|
return Pa(f), Pt().serializeToString(f);
|
|
9826
9829
|
};
|
|
9827
9830
|
l.forEach((A) => {
|
|
@@ -9897,7 +9900,7 @@ const us = [
|
|
|
9897
9900
|
paths: a.data.paths,
|
|
9898
9901
|
rotation: m.rotation,
|
|
9899
9902
|
text: u,
|
|
9900
|
-
type:
|
|
9903
|
+
type: x.Textbox,
|
|
9901
9904
|
vertical: a.data.vertical,
|
|
9902
9905
|
verticalAlign: a.data.verticalAlign || "middle",
|
|
9903
9906
|
width: m.width,
|
|
@@ -9905,7 +9908,7 @@ const us = [
|
|
|
9905
9908
|
y: m.top
|
|
9906
9909
|
};
|
|
9907
9910
|
if (d) {
|
|
9908
|
-
const [w,
|
|
9911
|
+
const [w, D] = we(
|
|
9909
9912
|
a.data.size || o,
|
|
9910
9913
|
d,
|
|
9911
9914
|
m,
|
|
@@ -9926,7 +9929,7 @@ const us = [
|
|
|
9926
9929
|
{
|
|
9927
9930
|
...y,
|
|
9928
9931
|
fontSize: w,
|
|
9929
|
-
text: y.curved ? y.text : (
|
|
9932
|
+
text: y.curved ? y.text : (D || []).join(`
|
|
9930
9933
|
`)
|
|
9931
9934
|
},
|
|
9932
9935
|
f
|
|
@@ -10158,12 +10161,12 @@ class Ps extends jn {
|
|
|
10158
10161
|
l = m.width, c = m.height;
|
|
10159
10162
|
} else
|
|
10160
10163
|
l = r.width, c = r.height;
|
|
10161
|
-
const d = this.getWorkflowManager?.()?.getTemplatingContext(), A =
|
|
10164
|
+
const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = xa(t.layoutState.layout, e, {
|
|
10162
10165
|
renderingConfiguration: {
|
|
10163
10166
|
purpose: Jt.ThreeD,
|
|
10164
10167
|
templatingContext: d
|
|
10165
10168
|
}
|
|
10166
|
-
}), u =
|
|
10169
|
+
}), u = xn(A), h = await va.from(this.ctx, u, {
|
|
10167
10170
|
anonymousCrossOrigin: !0,
|
|
10168
10171
|
ignoreDimensions: !this.nonPOTSupport,
|
|
10169
10172
|
ignoreAnimation: !0,
|
|
@@ -10229,7 +10232,7 @@ const $d = (n, t) => {
|
|
|
10229
10232
|
}
|
|
10230
10233
|
}
|
|
10231
10234
|
}
|
|
10232
|
-
`,
|
|
10235
|
+
`, Ds = C`
|
|
10233
10236
|
${Le}
|
|
10234
10237
|
mutation UpdateGlobalPropertyState($id: String!, $aspects: [GlobalPropertyStateAspectInput]!) {
|
|
10235
10238
|
globalPropertyStateUpdate(id: $id, aspects: $aspects) {
|
|
@@ -10239,7 +10242,7 @@ const $d = (n, t) => {
|
|
|
10239
10242
|
}
|
|
10240
10243
|
}
|
|
10241
10244
|
}
|
|
10242
|
-
`,
|
|
10245
|
+
`, xs = C`
|
|
10243
10246
|
${Le}
|
|
10244
10247
|
query GetGlobalPropertyState($bundleId: String!) {
|
|
10245
10248
|
globalPropertyState(bundleId: $bundleId) {
|
|
@@ -10250,7 +10253,7 @@ const $d = (n, t) => {
|
|
|
10250
10253
|
}
|
|
10251
10254
|
}
|
|
10252
10255
|
`, Vd = async (n) => (await S.getShadowGraphqlClient().query({
|
|
10253
|
-
query:
|
|
10256
|
+
query: xs,
|
|
10254
10257
|
fetchPolicy: "cache-first",
|
|
10255
10258
|
errorPolicy: "all",
|
|
10256
10259
|
variables: {
|
|
@@ -11011,7 +11014,7 @@ const cl = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11011
11014
|
}
|
|
11012
11015
|
});
|
|
11013
11016
|
else {
|
|
11014
|
-
const
|
|
11017
|
+
const D = await this.graphQlClient().mutate({
|
|
11015
11018
|
mutation: el,
|
|
11016
11019
|
errorPolicy: "all",
|
|
11017
11020
|
fetchPolicy: "no-cache",
|
|
@@ -11036,7 +11039,7 @@ const cl = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11036
11039
|
}
|
|
11037
11040
|
});
|
|
11038
11041
|
w.recipient = {
|
|
11039
|
-
id:
|
|
11042
|
+
id: D?.data?.recipientCreate?.id,
|
|
11040
11043
|
firstName: t,
|
|
11041
11044
|
lastName: e,
|
|
11042
11045
|
address: a,
|
|
@@ -11060,14 +11063,14 @@ const cl = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11060
11063
|
fetchPolicy: "no-cache",
|
|
11061
11064
|
variables: {
|
|
11062
11065
|
id: this.experience.getTransaction().id,
|
|
11063
|
-
recipientId:
|
|
11066
|
+
recipientId: D.data?.recipientCreate?.id
|
|
11064
11067
|
},
|
|
11065
11068
|
context: {
|
|
11066
11069
|
transactionOwnerId: this.experience.getTransaction().transactionOwnerId
|
|
11067
11070
|
}
|
|
11068
11071
|
});
|
|
11069
11072
|
}
|
|
11070
|
-
await this.fetchConversionConfiguration(), this.recipientCallbacks.forEach((
|
|
11073
|
+
await this.fetchConversionConfiguration(), this.recipientCallbacks.forEach((D) => D(this.experience.getTransaction().recipient));
|
|
11071
11074
|
}
|
|
11072
11075
|
async fetchConversionConfiguration() {
|
|
11073
11076
|
const t = this.experience.getTransaction().recipient;
|
|
@@ -11586,9 +11589,9 @@ const cl = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11586
11589
|
m?.type === E.Frame && this.getWorkflowExperience().getStepById(m.stepName)?.frameService?.setTargetElements(a.map((I) => I.id));
|
|
11587
11590
|
const f = h.map((v) => new Ot(v.id)), y = new en(this.constructSerializableWorkflow()), w = [...p, ...f, y];
|
|
11588
11591
|
w.length > 0 && this.commandContext.apply(new U(w), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
|
|
11589
|
-
const
|
|
11592
|
+
const D = this.getInvalidModelVariants(), b = this.modelContainer;
|
|
11590
11593
|
if (b) {
|
|
11591
|
-
const v =
|
|
11594
|
+
const v = D.map(
|
|
11592
11595
|
(I) => b.applyModelVariant(
|
|
11593
11596
|
I,
|
|
11594
11597
|
{
|
|
@@ -12235,7 +12238,7 @@ class fl extends tt {
|
|
|
12235
12238
|
const e = {
|
|
12236
12239
|
input: t,
|
|
12237
12240
|
helperData: {}
|
|
12238
|
-
}, a = W.findLayoutElements(this.manager, this.step), i = W.filterUnsupportedCharacters(t, a[0]?.fontData), r =
|
|
12241
|
+
}, a = W.findLayoutElements(this.manager, this.step), i = W.filterUnsupportedCharacters(t, a[0]?.fontData), r = xt(i, this.manager).length, o = !!this.step.data && !!this.step.data.maxLength && r > this.step.data.maxLength;
|
|
12239
12242
|
o || (e.input = i);
|
|
12240
12243
|
const s = a.length <= 0, l = s ? { inputText: i, text: i } : { inputText: i };
|
|
12241
12244
|
this.manager.updateStorage(this.step.stepName, l);
|
|
@@ -12311,7 +12314,7 @@ class fl extends tt {
|
|
|
12311
12314
|
const t = this.step.data.maxLength;
|
|
12312
12315
|
if (t === void 0)
|
|
12313
12316
|
return;
|
|
12314
|
-
const e =
|
|
12317
|
+
const e = xt(this.getText(), this.manager);
|
|
12315
12318
|
return t - e.length;
|
|
12316
12319
|
}
|
|
12317
12320
|
setCustomColor(t) {
|
|
@@ -12392,7 +12395,7 @@ class yl extends tt {
|
|
|
12392
12395
|
const t = this.step.data.maxLength;
|
|
12393
12396
|
if (t === void 0)
|
|
12394
12397
|
return;
|
|
12395
|
-
const e =
|
|
12398
|
+
const e = xt(this.getText(), this.manager);
|
|
12396
12399
|
return t - e.length;
|
|
12397
12400
|
}
|
|
12398
12401
|
/**
|
|
@@ -12648,10 +12651,10 @@ const El = async (n, t) => {
|
|
|
12648
12651
|
y[v].map((I) => I.id)
|
|
12649
12652
|
])
|
|
12650
12653
|
);
|
|
12651
|
-
let
|
|
12652
|
-
if (
|
|
12653
|
-
const v = await (await nt(
|
|
12654
|
-
|
|
12654
|
+
let D = await s(u, i.id);
|
|
12655
|
+
if (D) {
|
|
12656
|
+
const v = await (await nt(D)).blob();
|
|
12657
|
+
D = (await j.uploadAsset(
|
|
12655
12658
|
{ name: `${i.id}-preview-image.png`, blob: v },
|
|
12656
12659
|
ve.Image,
|
|
12657
12660
|
!0,
|
|
@@ -12669,7 +12672,7 @@ const El = async (n, t) => {
|
|
|
12669
12672
|
workflowId: t.id,
|
|
12670
12673
|
transactionId: i.id,
|
|
12671
12674
|
useThreeDimPreview: !!u,
|
|
12672
|
-
previewImage:
|
|
12675
|
+
previewImage: D
|
|
12673
12676
|
};
|
|
12674
12677
|
if (g) {
|
|
12675
12678
|
const I = [];
|
|
@@ -12829,7 +12832,7 @@ const ia = new Pl(), Fl = C`
|
|
|
12829
12832
|
}
|
|
12830
12833
|
}
|
|
12831
12834
|
}
|
|
12832
|
-
`,
|
|
12835
|
+
`, Dl = C`
|
|
12833
12836
|
mutation AddAddressToTransaction(
|
|
12834
12837
|
$transactionId: String!
|
|
12835
12838
|
$streetAddress: String
|
|
@@ -12851,7 +12854,7 @@ const ia = new Pl(), Fl = C`
|
|
|
12851
12854
|
id
|
|
12852
12855
|
}
|
|
12853
12856
|
}
|
|
12854
|
-
`,
|
|
12857
|
+
`, xl = C`
|
|
12855
12858
|
mutation AddOrganizationToTransaction($transactionId: String!, $organizationName: String!) {
|
|
12856
12859
|
organizationAttachToTransaction(transactionId: $transactionId, organizationName: $organizationName) {
|
|
12857
12860
|
id
|
|
@@ -13068,7 +13071,7 @@ class kl {
|
|
|
13068
13071
|
}
|
|
13069
13072
|
async attachAddress(t, e, a, i, r, o) {
|
|
13070
13073
|
await this.graphQlClient().mutate({
|
|
13071
|
-
mutation:
|
|
13074
|
+
mutation: Dl,
|
|
13072
13075
|
variables: {
|
|
13073
13076
|
transactionId: this.getTransaction().id,
|
|
13074
13077
|
streetAddress: t || void 0,
|
|
@@ -13082,7 +13085,7 @@ class kl {
|
|
|
13082
13085
|
}
|
|
13083
13086
|
async attachOrganization(t) {
|
|
13084
13087
|
await this.graphQlClient().mutate({
|
|
13085
|
-
mutation:
|
|
13088
|
+
mutation: xl,
|
|
13086
13089
|
variables: {
|
|
13087
13090
|
transactionId: this.getTransaction().id,
|
|
13088
13091
|
organizationName: t
|
|
@@ -13131,13 +13134,13 @@ class kl {
|
|
|
13131
13134
|
}, u = this.workflowManager.getCommandContext().getLayoutById(d.layoutState.layout.id), h = o.getContext("2d");
|
|
13132
13135
|
if (!h)
|
|
13133
13136
|
throw new Te("Failed to obtain 2D context for preview image creation");
|
|
13134
|
-
const g = this.workflowManager.getTemplatingContext(), p =
|
|
13137
|
+
const g = this.workflowManager.getTemplatingContext(), p = xa(u.layoutState.layout, u.layoutState.elements, {
|
|
13135
13138
|
renderingConfiguration: {
|
|
13136
13139
|
purpose: Jt.Print,
|
|
13137
13140
|
region: { left: A.x, top: A.y, width: A.width, height: A.height },
|
|
13138
13141
|
templatingContext: g
|
|
13139
13142
|
}
|
|
13140
|
-
}), m =
|
|
13143
|
+
}), m = xn(p);
|
|
13141
13144
|
await (await va.from(h, m, {
|
|
13142
13145
|
anonymousCrossOrigin: !0,
|
|
13143
13146
|
ignoreDimensions: !1,
|
|
@@ -13713,7 +13716,7 @@ class Ql extends Qa {
|
|
|
13713
13716
|
return j.getLocalOrFromServer(t);
|
|
13714
13717
|
}
|
|
13715
13718
|
async getImageWithColors() {
|
|
13716
|
-
return await this.loadImageData(), this.imageData?.svg ? ba(
|
|
13719
|
+
return await this.loadImageData(), this.imageData?.svg ? ba(Da(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
|
|
13717
13720
|
}
|
|
13718
13721
|
/**
|
|
13719
13722
|
* Retrieves the original, unmodified image selection, if one exists.
|
|
@@ -14186,7 +14189,7 @@ class Ll {
|
|
|
14186
14189
|
if (!this.globalPropertyState)
|
|
14187
14190
|
throw new Error("Global property state not initialized");
|
|
14188
14191
|
const t = await S.getShadowGraphqlClient().mutate({
|
|
14189
|
-
mutation:
|
|
14192
|
+
mutation: Ds,
|
|
14190
14193
|
variables: {
|
|
14191
14194
|
id: this.globalPropertyState.id,
|
|
14192
14195
|
aspects: this.globalPropertyState.aspects.map((e) => {
|
|
@@ -16111,7 +16114,7 @@ class qd {
|
|
|
16111
16114
|
} catch (a) {
|
|
16112
16115
|
throw console.error(a), new pt("Critical - Unable to synchronize workflow state with server.");
|
|
16113
16116
|
}
|
|
16114
|
-
}, this.options = t, this.options.applicationKey && cr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 37.0.
|
|
16117
|
+
}, this.options = t, this.options.applicationKey && cr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 37.0.2"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
16115
16118
|
}
|
|
16116
16119
|
configure(t) {
|
|
16117
16120
|
Ct.setHubUrl(t.hubUrl), Ct.setServerUrl(t.serverUrl), Ct.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 && Ar(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|
|
@@ -16561,10 +16564,10 @@ class qd {
|
|
|
16561
16564
|
), [y, w] = await Promise.all([
|
|
16562
16565
|
(async () => m.length > 0 ? await uc(m) : [])(),
|
|
16563
16566
|
(async () => f.length > 0 ? await vi(f, e) : [])()
|
|
16564
|
-
]),
|
|
16567
|
+
]), D = new Map(y.map((P) => [P.id, P])), b = new Map(w.map((P) => [P.id, P])), v = p.map(async (P) => {
|
|
16565
16568
|
const { transaction: T, workflowId: V, readOnly: k, index: X } = P, vt = V ? b.get(V) : void 0, ht = t[X];
|
|
16566
16569
|
if (T.integrationProductId) {
|
|
16567
|
-
const it =
|
|
16570
|
+
const it = D.get(T.integrationProductId);
|
|
16568
16571
|
T.integrationProduct = it, T.product = it?.product, T.integrationProduct || console.error("failed to find transaction's product");
|
|
16569
16572
|
}
|
|
16570
16573
|
const ie = Q.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map();
|
|
@@ -16857,7 +16860,7 @@ class pc {
|
|
|
16857
16860
|
getImageSrc() {
|
|
16858
16861
|
if (this.imageData) {
|
|
16859
16862
|
if (this.imageData.svg) {
|
|
16860
|
-
const t =
|
|
16863
|
+
const t = Da(this.imageData.svg, this.imageData.colors || {}, !1);
|
|
16861
16864
|
return ba(t);
|
|
16862
16865
|
}
|
|
16863
16866
|
return this.imageData.src;
|
|
@@ -17615,7 +17618,7 @@ K.__b = function(n) {
|
|
|
17615
17618
|
}, K.diffed = function(n) {
|
|
17616
17619
|
fn && fn(n);
|
|
17617
17620
|
var t = n.__c;
|
|
17618
|
-
t && t.__H && (t.__H.__h.length && (Ii.push(t) !== 1 && gn === K.requestAnimationFrame || ((gn = K.requestAnimationFrame) ||
|
|
17621
|
+
t && t.__H && (t.__H.__h.length && (Ii.push(t) !== 1 && gn === K.requestAnimationFrame || ((gn = K.requestAnimationFrame) || Dc)(Fc)), t.__H.__.forEach(function(e) {
|
|
17619
17622
|
e.i && (e.__H = e.i), e.__V !== oa && (e.__ = e.__V), e.i = void 0, e.__V = oa;
|
|
17620
17623
|
})), ra = ot = null;
|
|
17621
17624
|
}, K.__c = function(n, t) {
|
|
@@ -17642,7 +17645,7 @@ K.__b = function(n) {
|
|
|
17642
17645
|
}), e.__H = void 0, t && K.__e(t, e.__v));
|
|
17643
17646
|
};
|
|
17644
17647
|
var yn = typeof requestAnimationFrame == "function";
|
|
17645
|
-
function
|
|
17648
|
+
function Dc(n) {
|
|
17646
17649
|
var t, e = function() {
|
|
17647
17650
|
clearTimeout(a), yn && cancelAnimationFrame(t), setTimeout(n);
|
|
17648
17651
|
}, a = setTimeout(e, 100);
|
|
@@ -17690,7 +17693,7 @@ const Bi = C`
|
|
|
17690
17693
|
...AddressValidationResultFields
|
|
17691
17694
|
}
|
|
17692
17695
|
}
|
|
17693
|
-
`,
|
|
17696
|
+
`, xc = C`
|
|
17694
17697
|
${$a}
|
|
17695
17698
|
query GetAddressValidationJobs($ids: [String!]!) {
|
|
17696
17699
|
addressValidationJobs(ids: $ids) {
|
|
@@ -17744,7 +17747,7 @@ const cA = async (n) => {
|
|
|
17744
17747
|
return e.data?.recipients?.find((r) => r.id === i)?.addressValidationJob;
|
|
17745
17748
|
});
|
|
17746
17749
|
}, dA = async (n) => (await S.getShadowGraphqlClient().query({
|
|
17747
|
-
query:
|
|
17750
|
+
query: xc,
|
|
17748
17751
|
errorPolicy: "all",
|
|
17749
17752
|
fetchPolicy: "network-only",
|
|
17750
17753
|
variables: {
|
|
@@ -17842,8 +17845,8 @@ export {
|
|
|
17842
17845
|
Cl as InformationStepHandle,
|
|
17843
17846
|
un as IntegrationProduct,
|
|
17844
17847
|
Ji as IntegrationType,
|
|
17845
|
-
|
|
17846
|
-
|
|
17848
|
+
Dd as LayoutElementFactory,
|
|
17849
|
+
x as LayoutElementType,
|
|
17847
17850
|
Y as LayoutNotFoundError,
|
|
17848
17851
|
Jt as LayoutRenderingPurpose,
|
|
17849
17852
|
ul as MaterialStepHandle,
|
|
@@ -17851,12 +17854,12 @@ export {
|
|
|
17851
17854
|
_d as MockWorkflowManager,
|
|
17852
17855
|
hl as ModelStepHandle,
|
|
17853
17856
|
yl as ModuleStepHandle,
|
|
17854
|
-
|
|
17857
|
+
xd as MoveCommand,
|
|
17855
17858
|
Si as ObjectInput,
|
|
17856
17859
|
ec as ObjectInputType,
|
|
17857
17860
|
Ci as OptionGlobalPropertyHandle,
|
|
17858
17861
|
Ee as OptionNotFoundError,
|
|
17859
|
-
|
|
17862
|
+
Dt as ParseError,
|
|
17860
17863
|
gl as PictureStepHandle,
|
|
17861
17864
|
Ki as ProductCameraRig,
|
|
17862
17865
|
yi as ProductCollection,
|
|
@@ -17932,7 +17935,7 @@ export {
|
|
|
17932
17935
|
yd as getPointOfRotation,
|
|
17933
17936
|
Ld as getProductCollections,
|
|
17934
17937
|
Ed as getSEPoint,
|
|
17935
|
-
|
|
17938
|
+
xa as getSvgElement,
|
|
17936
17939
|
lA as getTemplateBundles,
|
|
17937
17940
|
sA as getTemplateTransactions,
|
|
17938
17941
|
Wd as getTransaction,
|
|
@@ -17952,7 +17955,7 @@ export {
|
|
|
17952
17955
|
Wl as metafieldManager,
|
|
17953
17956
|
Bd as mmPerPixel,
|
|
17954
17957
|
di as modelStepService,
|
|
17955
|
-
|
|
17958
|
+
Da as modifySVGColors,
|
|
17956
17959
|
Ai as moduleStepService,
|
|
17957
17960
|
Xd as nameBundle,
|
|
17958
17961
|
Zd as nameTransaction,
|