@spiffcommerce/core 26.36.0 → 26.37.0-beta.3291c9ea-5d65-502b-bbaa-23048d45de85
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/CHANGELOG.md +8 -2
- package/dist/index.d.ts +6 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +264 -256
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import { split as Ke } from "unicode-default-word-boundary";
|
|
|
19
19
|
import on from "lodash.debounce";
|
|
20
20
|
import "fs";
|
|
21
21
|
import "path";
|
|
22
|
-
var ge = /* @__PURE__ */ ((r) => (r.Data = "Data", r.Font = "Font", r.Frame = "Frame", r.Illustration = "Illustration", r.Image = "Image", r.Model = "Model", r.Material = "Material", r.Color = "Color", r.QuestionnaireCollateral = "QuestionnaireCollateral", r.RequestCollateral = "RequestCollateral", r.SignupCollateral = "SignupCollateral", r.Video = "Video", r.ColorProfile = "ColorProfile", r.Environment = "Environment", r))(ge || {}), et = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(et || {}), D = /* @__PURE__ */ ((r) => (r.Information = "Information", r.Bulk = "Bulk", r.DigitalContent = "DigitalContent", r.Finish = "Finish", r.Frame = "Frame", r.Illustration = "Illustration", r.Introduction = "Introduction", r.Material = "Material", r.Model = "Model", r.Module = "Module", r.Picture = "Picture", r.Photo = "Photo", r.ProductOverlay = "ProductOverlay", r.Question = "Question", r.Shape = "Shape", r.SilentIllustration = "SilentIllustration", r.Text = "Text", r))(D || {}),
|
|
22
|
+
var ge = /* @__PURE__ */ ((r) => (r.Data = "Data", r.Font = "Font", r.Frame = "Frame", r.Illustration = "Illustration", r.Image = "Image", r.Model = "Model", r.Material = "Material", r.Color = "Color", r.QuestionnaireCollateral = "QuestionnaireCollateral", r.RequestCollateral = "RequestCollateral", r.SignupCollateral = "SignupCollateral", r.Video = "Video", r.ColorProfile = "ColorProfile", r.Environment = "Environment", r))(ge || {}), et = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(et || {}), D = /* @__PURE__ */ ((r) => (r.Information = "Information", r.Bulk = "Bulk", r.DigitalContent = "DigitalContent", r.Finish = "Finish", r.Frame = "Frame", r.Illustration = "Illustration", r.Introduction = "Introduction", r.Material = "Material", r.Model = "Model", r.Module = "Module", r.Picture = "Picture", r.Photo = "Photo", r.ProductOverlay = "ProductOverlay", r.Question = "Question", r.Shape = "Shape", r.SilentIllustration = "SilentIllustration", r.Text = "Text", r))(D || {}), pr = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(pr || {}), Wt = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Wt || {}), T = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(T || {}), fr = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(fr || {}), Cr = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(Cr || {}), wr = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(wr || {}), da = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(da || {}), yr = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(yr || {}), pe = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(pe || {}), Mt = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(Mt || {}), j = /* @__PURE__ */ ((r) => (r[r.North = 0] = "North", r[r.Northeast = 1] = "Northeast", r[r.East = 2] = "East", r[r.Southeast = 3] = "Southeast", r[r.South = 4] = "South", r[r.Southwest = 5] = "Southwest", r[r.West = 6] = "West", r[r.Northwest = 7] = "Northwest", r))(j || {}), Sr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Sr || {});
|
|
23
23
|
class ln extends Error {
|
|
24
24
|
constructor(t) {
|
|
25
25
|
super(t), this.name = this.constructor.name;
|
|
@@ -30,7 +30,7 @@ class Jt extends ln {
|
|
|
30
30
|
super(`ConfigurationError - ${t}`);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
class
|
|
33
|
+
class fe extends Jt {
|
|
34
34
|
constructor(t) {
|
|
35
35
|
super(`Option not Configured: ${t.stepTitle}`), this.optionId = (t == null ? void 0 : t.optionId) || "N/A";
|
|
36
36
|
}
|
|
@@ -158,7 +158,7 @@ class Br {
|
|
|
158
158
|
}
|
|
159
159
|
const mt = new Br();
|
|
160
160
|
let _e, Xe;
|
|
161
|
-
function
|
|
161
|
+
function fc(r) {
|
|
162
162
|
_e = r;
|
|
163
163
|
}
|
|
164
164
|
function Cc(r) {
|
|
@@ -330,12 +330,12 @@ class $r {
|
|
|
330
330
|
uri: `${mt.getServerUrl()}/graphql`,
|
|
331
331
|
fetch: Or
|
|
332
332
|
}), e = lr(async (i, s) => {
|
|
333
|
-
const { headers: o } = s, l = o || {}, c = await Rr(), d = s.bearer ?? c.bearer, A = s.partnerId ?? c.partnerId, u = s.activeIntegration ?? c.activeIntegration, h = s.transactionOwnerId, m = s.customerToken ?? c.customerToken, g = s.applicationKey ?? c.applicationKey,
|
|
333
|
+
const { headers: o } = s, l = o || {}, c = await Rr(), d = s.bearer ?? c.bearer, A = s.partnerId ?? c.partnerId, u = s.activeIntegration ?? c.activeIntegration, h = s.transactionOwnerId, m = s.customerToken ?? c.customerToken, g = s.applicationKey ?? c.applicationKey, p = s.bundleOwnerId;
|
|
334
334
|
try {
|
|
335
335
|
if (window && window.__SENTRY__) {
|
|
336
|
-
const
|
|
337
|
-
if (
|
|
338
|
-
const C =
|
|
336
|
+
const f = window.__SENTRY__.hub;
|
|
337
|
+
if (f) {
|
|
338
|
+
const C = f.traceHeaders();
|
|
339
339
|
Object.entries(C).forEach(([w, v]) => {
|
|
340
340
|
l[w] = v;
|
|
341
341
|
});
|
|
@@ -343,7 +343,7 @@ class $r {
|
|
|
343
343
|
}
|
|
344
344
|
} catch {
|
|
345
345
|
}
|
|
346
|
-
return d && (l.Authorization = `Bearer ${d}`), A && (l.partnerId = A), u && (l.activeIntegration = u), h && (l.transactionOwnerId = h), m && (l.customerToken = m), g && (l["X-Application-Key"] = g),
|
|
346
|
+
return d && (l.Authorization = `Bearer ${d}`), A && (l.partnerId = A), u && (l.activeIntegration = u), h && (l.transactionOwnerId = h), m && (l.customerToken = m), g && (l["X-Application-Key"] = g), p && (l.bundleOwnerId = p), l["Allow-Moonlight-Redirect"] = "true", {
|
|
347
347
|
headers: l
|
|
348
348
|
};
|
|
349
349
|
}), a = cr(({ operation: i, graphQLErrors: s, networkError: o }) => {
|
|
@@ -363,7 +363,7 @@ const gt = (r, t, e) => {
|
|
|
363
363
|
if (Ze !== void 0)
|
|
364
364
|
return Ze(r, t, e);
|
|
365
365
|
try {
|
|
366
|
-
const a =
|
|
366
|
+
const a = pn(!0);
|
|
367
367
|
return gn(a), a.createCanvas(r, t, e);
|
|
368
368
|
} catch {
|
|
369
369
|
throw new Error("Canvas module not set");
|
|
@@ -372,7 +372,7 @@ const gt = (r, t, e) => {
|
|
|
372
372
|
if (ta !== void 0)
|
|
373
373
|
return ta(r, t);
|
|
374
374
|
try {
|
|
375
|
-
const e =
|
|
375
|
+
const e = pn(!0);
|
|
376
376
|
return gn(e), e.loadImage(r, t);
|
|
377
377
|
} catch {
|
|
378
378
|
throw new Error("Canvas module not set");
|
|
@@ -381,7 +381,7 @@ const gt = (r, t, e) => {
|
|
|
381
381
|
function gn(r) {
|
|
382
382
|
Ze = r == null ? void 0 : r.createCanvas, ta = r == null ? void 0 : r.loadImage;
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function pn(r) {
|
|
385
385
|
try {
|
|
386
386
|
if (document.createElement("canvas").getContext("2d"))
|
|
387
387
|
return {
|
|
@@ -3197,9 +3197,9 @@ function Qa(r) {
|
|
|
3197
3197
|
return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
|
|
3198
3198
|
}
|
|
3199
3199
|
const ie = (r) => {
|
|
3200
|
-
const t =
|
|
3200
|
+
const t = fn(r.spotColor);
|
|
3201
3201
|
return t ? `${r.browserValue} ${t}` : r.browserValue;
|
|
3202
|
-
},
|
|
3202
|
+
}, fn = (r) => {
|
|
3203
3203
|
if (!r)
|
|
3204
3204
|
return "";
|
|
3205
3205
|
if (r.profileName.includes("/") && r.profileName.includes(".icc")) {
|
|
@@ -3333,7 +3333,7 @@ const ie = (r) => {
|
|
|
3333
3333
|
if (!i)
|
|
3334
3334
|
throw new Error("Failed to read SVG.");
|
|
3335
3335
|
return _r(i, t, e), wn(i, a, n), yn(i);
|
|
3336
|
-
},
|
|
3336
|
+
}, pa = (r, t, e) => {
|
|
3337
3337
|
const a = Cn(r);
|
|
3338
3338
|
if (!a)
|
|
3339
3339
|
throw new Error("Failed to read SVG.");
|
|
@@ -3422,7 +3422,7 @@ const ie = (r) => {
|
|
|
3422
3422
|
...AssetFields
|
|
3423
3423
|
}
|
|
3424
3424
|
}
|
|
3425
|
-
`,
|
|
3425
|
+
`, fa = y`
|
|
3426
3426
|
fragment MaterialFields on Material {
|
|
3427
3427
|
id
|
|
3428
3428
|
name
|
|
@@ -3470,7 +3470,7 @@ const ie = (r) => {
|
|
|
3470
3470
|
}
|
|
3471
3471
|
}
|
|
3472
3472
|
`, ei = y`
|
|
3473
|
-
${
|
|
3473
|
+
${fa}
|
|
3474
3474
|
query GetMaterials($ids: [String]) {
|
|
3475
3475
|
materials(id: $ids) {
|
|
3476
3476
|
...MaterialFields
|
|
@@ -3861,7 +3861,7 @@ const qt = new oi(), vn = y`
|
|
|
3861
3861
|
}
|
|
3862
3862
|
`, li = y`
|
|
3863
3863
|
${Xt(!1)}
|
|
3864
|
-
${
|
|
3864
|
+
${fa}
|
|
3865
3865
|
${vn}
|
|
3866
3866
|
query GetOptions($ids: [String]!) {
|
|
3867
3867
|
options(ids: $ids) {
|
|
@@ -4238,13 +4238,13 @@ const _ = new ui(), En = y`
|
|
|
4238
4238
|
id
|
|
4239
4239
|
}
|
|
4240
4240
|
}
|
|
4241
|
-
`,
|
|
4241
|
+
`, pi = y`
|
|
4242
4242
|
mutation UpdateTransactionQuantity($id: String!, $quantity: Int) {
|
|
4243
4243
|
transactionUpdate(id: $id, quantity: $quantity) {
|
|
4244
4244
|
id
|
|
4245
4245
|
}
|
|
4246
4246
|
}
|
|
4247
|
-
`,
|
|
4247
|
+
`, fi = y`
|
|
4248
4248
|
query ReadTransactionForDesignCreation($id: String!) {
|
|
4249
4249
|
transactions(ids: [$id]) {
|
|
4250
4250
|
id
|
|
@@ -4566,7 +4566,7 @@ const _ = new ui(), En = y`
|
|
|
4566
4566
|
}
|
|
4567
4567
|
`, Di = (r) => y`
|
|
4568
4568
|
${Xt(r)}
|
|
4569
|
-
${
|
|
4569
|
+
${fa}
|
|
4570
4570
|
${vn}
|
|
4571
4571
|
${Ei}
|
|
4572
4572
|
${Bi}
|
|
@@ -5308,13 +5308,13 @@ const N = () => {
|
|
|
5308
5308
|
width: u
|
|
5309
5309
|
}) => {
|
|
5310
5310
|
var E;
|
|
5311
|
-
const h = e || 0, m = 2 * ((l == null ? void 0 : l.scale) || 1), g = A || { x: 0, y: 0, width: u, height: i },
|
|
5311
|
+
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 = N(), C = a.purpose === Wt.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, I) => (
|
|
5312
5312
|
/* @ts-ignore */
|
|
5313
5313
|
/* @__PURE__ */ x("color-profile", { name: B.name, xlinkHref: B.key, children: " " }, I)
|
|
5314
5314
|
)), v = n.map((B) => ({
|
|
5315
5315
|
...B,
|
|
5316
5316
|
_renderingConfiguration: a,
|
|
5317
|
-
mask: l ? `url(#viewmask-${
|
|
5317
|
+
mask: l ? `url(#viewmask-${f})` : void 0
|
|
5318
5318
|
})), S = ya(v);
|
|
5319
5319
|
return /* @__PURE__ */ ct(
|
|
5320
5320
|
"svg",
|
|
@@ -5333,7 +5333,7 @@ const N = () => {
|
|
|
5333
5333
|
maxHeight: s,
|
|
5334
5334
|
position: c
|
|
5335
5335
|
},
|
|
5336
|
-
viewBox:
|
|
5336
|
+
viewBox: p,
|
|
5337
5337
|
children: [
|
|
5338
5338
|
w,
|
|
5339
5339
|
C,
|
|
@@ -5368,7 +5368,7 @@ const N = () => {
|
|
|
5368
5368
|
strokeDasharray: `${m * 2} ${m}`
|
|
5369
5369
|
}
|
|
5370
5370
|
),
|
|
5371
|
-
l && /* @__PURE__ */ ct("mask", { id: `viewmask-${
|
|
5371
|
+
l && /* @__PURE__ */ ct("mask", { id: `viewmask-${f}`, children: [
|
|
5372
5372
|
/* @__PURE__ */ x(
|
|
5373
5373
|
"rect",
|
|
5374
5374
|
{
|
|
@@ -5394,7 +5394,7 @@ const N = () => {
|
|
|
5394
5394
|
}
|
|
5395
5395
|
);
|
|
5396
5396
|
}, Ec = (r, t, e, a, n) => {
|
|
5397
|
-
const i =
|
|
5397
|
+
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, v = Math.max(Math.abs(p), Math.abs(f)), S = Math.max(Math.abs(C), Math.abs(w));
|
|
5398
5398
|
return {
|
|
5399
5399
|
minX: l - v,
|
|
5400
5400
|
maxX: l + v,
|
|
@@ -5404,8 +5404,8 @@ const N = () => {
|
|
|
5404
5404
|
}, Bc = (r, t, e) => {
|
|
5405
5405
|
const a = Math.sqrt(Math.pow(t.x - r.x, 2) + Math.pow(t.y - r.y, 2)), n = Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2)), i = Math.sqrt(Math.pow(e.x - r.x, 2) + Math.pow(e.y - r.y, 2));
|
|
5406
5406
|
return Math.acos((n * n + a * a - i * i) / (2 * n * a)) * (180 / Math.PI);
|
|
5407
|
-
},
|
|
5408
|
-
const a = Math.sin(
|
|
5407
|
+
}, pt = (r) => r * (Math.PI / 180), bc = (r, t, e) => Math.abs(r - t) < e, Ic = (r, t, e) => {
|
|
5408
|
+
const a = Math.sin(pt(e)), n = Math.cos(pt(e));
|
|
5409
5409
|
return {
|
|
5410
5410
|
x: (r.x - t.x) * n - (r.y - t.y) * a + t.x,
|
|
5411
5411
|
y: (r.x - t.x) * a + (r.y - t.y) * n + t.y
|
|
@@ -5442,7 +5442,7 @@ const N = () => {
|
|
|
5442
5442
|
return j.Northwest;
|
|
5443
5443
|
}
|
|
5444
5444
|
}, kc = (r, t) => t > 45 && t <= 135 ? It(r) : t > 135 && t <= 225 ? It(It(r)) : t > 225 && t <= 315 ? It(It(It(r))) : r, Mc = (r, t = { x: 0, y: 0 }, e = { x: 1, y: 1 }) => {
|
|
5445
|
-
const a =
|
|
5445
|
+
const a = pt(r.rotation), n = {
|
|
5446
5446
|
x: t.x + r.x * e.x,
|
|
5447
5447
|
y: t.x + r.y * e.y
|
|
5448
5448
|
}, i = {
|
|
@@ -5472,7 +5472,7 @@ const N = () => {
|
|
|
5472
5472
|
y: (r.x - t.x) * a + (r.y - t.y) * n + t.y
|
|
5473
5473
|
};
|
|
5474
5474
|
}, Tc = 0.352778, Qc = 0.035277, xn = (r) => {
|
|
5475
|
-
const t = r.rotation || 0, e =
|
|
5475
|
+
const t = r.rotation || 0, e = pt(t), a = Math.cos(e), n = -Math.sin(e);
|
|
5476
5476
|
return /* @__PURE__ */ x("g", { mask: r.stepName || r.productOverlay ? void 0 : r.mask, children: /* @__PURE__ */ x(
|
|
5477
5477
|
"g",
|
|
5478
5478
|
{
|
|
@@ -5495,7 +5495,7 @@ const N = () => {
|
|
|
5495
5495
|
) });
|
|
5496
5496
|
}, kn = (r) => {
|
|
5497
5497
|
var l;
|
|
5498
|
-
const t = `spiff-group-clip-${r.id}`, e = r.rotation || 0, a =
|
|
5498
|
+
const t = `spiff-group-clip-${r.id}`, e = r.rotation || 0, a = pt(e), n = Math.cos(a), i = -Math.sin(a), s = ya(r.children);
|
|
5499
5499
|
return /* @__PURE__ */ ct(zt, { children: [
|
|
5500
5500
|
/* @__PURE__ */ x("defs", { children: (() => /* @__PURE__ */ x("clipPath", { id: t, preserveAspectRatio: "none", children: r.clipPath ? /* @__PURE__ */ x("path", { d: r.clipPath }) : /* @__PURE__ */ x("rect", { x: 0, y: 0, width: r.width, height: r.height }) }))() }),
|
|
5501
5501
|
/* @__PURE__ */ ct(
|
|
@@ -5530,7 +5530,7 @@ const N = () => {
|
|
|
5530
5530
|
if (!r.pattern)
|
|
5531
5531
|
return "";
|
|
5532
5532
|
if (r.pattern.svg) {
|
|
5533
|
-
const A =
|
|
5533
|
+
const A = pa(r.pattern.svg, r.pattern.colors || {}, !1);
|
|
5534
5534
|
return Aa(A);
|
|
5535
5535
|
}
|
|
5536
5536
|
return r.pattern.src;
|
|
@@ -5556,17 +5556,17 @@ const N = () => {
|
|
|
5556
5556
|
/* @__PURE__ */ x("feFuncG", { type: "discrete", tableValues: n() }),
|
|
5557
5557
|
/* @__PURE__ */ x("feFuncB", { type: "discrete", tableValues: n() })
|
|
5558
5558
|
] })
|
|
5559
|
-
] }) }) }), s = r.rotation || 0, o =
|
|
5559
|
+
] }) }) }), s = r.rotation || 0, o = pt(s), l = Math.cos(o), c = -Math.sin(o), d = () => {
|
|
5560
5560
|
var w, v, S, E, B, I, P, F, k, Q;
|
|
5561
|
-
const A = ((w = r.pattern) == null ? void 0 : w.x) || 0, u = ((v = r.pattern) == null ? void 0 : v.y) || 0, h = ((S = r.pattern) == null ? void 0 : S.width) || 0, m = ((E = r.pattern) == null ? void 0 : E.height) || 0, g = ((B = r.pattern) == null ? void 0 : B.scaleX) || 1,
|
|
5561
|
+
const A = ((w = r.pattern) == null ? void 0 : w.x) || 0, u = ((v = r.pattern) == null ? void 0 : v.y) || 0, h = ((S = r.pattern) == null ? void 0 : S.width) || 0, m = ((E = r.pattern) == null ? void 0 : E.height) || 0, g = ((B = r.pattern) == null ? void 0 : B.scaleX) || 1, p = ((I = r.pattern) == null ? void 0 : I.scaleY) || 1, f = ((P = r.pattern) == null ? void 0 : P.rotation) || 0;
|
|
5562
5562
|
return [(F = r.pattern) != null && F.svg ? {
|
|
5563
5563
|
id: `${t}-contents`,
|
|
5564
5564
|
type: T.Illustration,
|
|
5565
5565
|
x: A,
|
|
5566
5566
|
y: u,
|
|
5567
|
-
rotation:
|
|
5567
|
+
rotation: f,
|
|
5568
5568
|
width: h * g,
|
|
5569
|
-
height: m *
|
|
5569
|
+
height: m * p,
|
|
5570
5570
|
src: a(),
|
|
5571
5571
|
svg: (k = r.pattern) == null ? void 0 : k.svg,
|
|
5572
5572
|
colors: (Q = r.pattern) == null ? void 0 : Q.colors
|
|
@@ -5575,9 +5575,9 @@ const N = () => {
|
|
|
5575
5575
|
type: T.Image,
|
|
5576
5576
|
x: A,
|
|
5577
5577
|
y: u,
|
|
5578
|
-
rotation:
|
|
5578
|
+
rotation: f,
|
|
5579
5579
|
width: h * g,
|
|
5580
|
-
height: m *
|
|
5580
|
+
height: m * p,
|
|
5581
5581
|
src: a()
|
|
5582
5582
|
}];
|
|
5583
5583
|
};
|
|
@@ -5701,18 +5701,18 @@ const zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5701
5701
|
a.querySelectorAll("style").forEach((d) => {
|
|
5702
5702
|
var u;
|
|
5703
5703
|
(u = nn(d.innerHTML).stylesheet) == null || u.rules.forEach((h) => {
|
|
5704
|
-
var m, g,
|
|
5704
|
+
var m, g, p;
|
|
5705
5705
|
if (h.type === "font-face" && h.declarations) {
|
|
5706
|
-
const
|
|
5706
|
+
const f = (m = h.declarations.find(
|
|
5707
5707
|
(v) => v.property === "font-family"
|
|
5708
|
-
)) == null ? void 0 : m.value, C = (g = h.declarations.find((v) => v.property === "src")) == null ? void 0 : g.value, w = (
|
|
5709
|
-
|
|
5708
|
+
)) == null ? void 0 : m.value, C = (g = h.declarations.find((v) => v.property === "src")) == null ? void 0 : g.value, w = (p = C == null ? void 0 : C.match(/'(https.*?)'/)) == null ? void 0 : p[1];
|
|
5709
|
+
f && w && n.set(f, w);
|
|
5710
5710
|
}
|
|
5711
5711
|
});
|
|
5712
5712
|
});
|
|
5713
5713
|
const s = e.querySelectorAll("tspan");
|
|
5714
5714
|
for (let d = 0; d < s.length; d++) {
|
|
5715
|
-
const A = s.item(d), u = A.closest("text"), h = A.closest("g"), m = u.getAttribute("font-family"), g = await Qt(n.get(m)),
|
|
5715
|
+
const A = s.item(d), u = A.closest("text"), h = A.closest("g"), m = u.getAttribute("font-family"), g = await Qt(n.get(m)), p = u.getAttribute("fill"), f = u.getAttribute("stroke"), C = u.getAttribute("stroke-width"), w = g.getPath(
|
|
5716
5716
|
A.innerHTML,
|
|
5717
5717
|
0,
|
|
5718
5718
|
0,
|
|
@@ -5727,7 +5727,7 @@ const zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5727
5727
|
parseFloat(A.getAttribute("y") ?? "0"),
|
|
5728
5728
|
parseInt(u.getAttribute("font-size") ?? "72")
|
|
5729
5729
|
);
|
|
5730
|
-
B.fill =
|
|
5730
|
+
B.fill = p, B.stroke = f, B.strokeWidth = parseFloat(C ?? "0");
|
|
5731
5731
|
const I = B.toSVG(2), F = t.parseFromString(I, "image/svg+xml").firstElementChild;
|
|
5732
5732
|
h.appendChild(F);
|
|
5733
5733
|
}
|
|
@@ -5865,14 +5865,14 @@ const zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5865
5865
|
};
|
|
5866
5866
|
})()
|
|
5867
5867
|
} : r, Ca = 1.1, Ki = (r) => {
|
|
5868
|
-
var h, m, g,
|
|
5868
|
+
var h, m, g, p;
|
|
5869
5869
|
const e = (r.rotation || 0) * Math.PI / 180, a = Math.cos(e), n = -Math.sin(e), i = `text-path-${r.id}`, s = `text-fill-${r.id}`, o = r.x + (r.curved ? 0 : r.width / 2), l = r.y + (r.curved ? 0 : r.height / 2), c = (r.text || "").split(`
|
|
5870
5870
|
`), d = (h = r.strokeColor) != null && h.browserValue && r.strokeThickness ? (m = r.strokeColor) == null ? void 0 : m.browserValue : void 0, A = (g = r.strokeColor) != null && g.browserValue && r.strokeThickness ? r.strokeThickness : void 0;
|
|
5871
5871
|
if (r.curved && !r.paths || !r.fontData)
|
|
5872
5872
|
return null;
|
|
5873
5873
|
const u = () => {
|
|
5874
|
-
var
|
|
5875
|
-
return r.textFillImage ? `url("#${s}")` : (
|
|
5874
|
+
var f;
|
|
5875
|
+
return r.textFillImage ? `url("#${s}")` : (f = r._renderingConfiguration) != null && f.spotColors && r.fillSpotColorDefinition ? `${r.fill} ${fn(r.fillSpotColorDefinition)}` : r.fill;
|
|
5876
5876
|
};
|
|
5877
5877
|
return /* @__PURE__ */ ct(zt, { children: [
|
|
5878
5878
|
/* @__PURE__ */ ct("defs", { children: [
|
|
@@ -5912,7 +5912,7 @@ const zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5912
5912
|
),
|
|
5913
5913
|
r.curved && r.paths ? /* @__PURE__ */ x("path", { id: i, d: r.paths[0] }) : void 0
|
|
5914
5914
|
] }),
|
|
5915
|
-
(
|
|
5915
|
+
(p = r._renderingConfiguration) != null && p.debug ? /* @__PURE__ */ x("rect", { stroke: "blue", fill: "none", x: r.x, y: r.y, width: r.width, height: r.height }) : void 0,
|
|
5916
5916
|
/* @__PURE__ */ x("g", { mask: r.stepName ? void 0 : r.mask, children: /* @__PURE__ */ x("g", { transform: `matrix(${a}, ${-n}, ${n}, ${a}, ${o}, ${l})`, children: /* @__PURE__ */ x(
|
|
5917
5917
|
"text",
|
|
5918
5918
|
{
|
|
@@ -5928,14 +5928,14 @@ const zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5928
5928
|
},
|
|
5929
5929
|
stroke: d,
|
|
5930
5930
|
strokeWidth: A,
|
|
5931
|
-
children: r.curved ? /* @__PURE__ */ x(Xi, { text: r.text || "", curvedPathId: i, align: r.align }) : c.map((
|
|
5931
|
+
children: r.curved ? /* @__PURE__ */ x(Xi, { text: r.text || "", curvedPathId: i, align: r.align }) : c.map((f, C) => /* @__PURE__ */ x(
|
|
5932
5932
|
_i,
|
|
5933
5933
|
{
|
|
5934
5934
|
align: r.vertical ? "center" : r.align,
|
|
5935
5935
|
fontSize: r.fontSize,
|
|
5936
5936
|
thisLineIdx: C,
|
|
5937
5937
|
amountLines: c.length,
|
|
5938
|
-
text:
|
|
5938
|
+
text: f,
|
|
5939
5939
|
textboxHeight: r.height,
|
|
5940
5940
|
textboxWidth: r.width,
|
|
5941
5941
|
lineHeight: r.lineHeight,
|
|
@@ -5990,7 +5990,7 @@ const zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5990
5990
|
mask: r.stepName ? void 0 : r.mask
|
|
5991
5991
|
}
|
|
5992
5992
|
);
|
|
5993
|
-
const t = r.rotation || 0, e =
|
|
5993
|
+
const t = r.rotation || 0, e = pt(t), a = Math.cos(e), n = -Math.sin(e), i = `
|
|
5994
5994
|
matrix(1, 0, 0, 1, ${r.x}, ${r.y})
|
|
5995
5995
|
matrix(1, 0, 0, 1, ${r.width / 2}, ${r.height / 2})
|
|
5996
5996
|
matrix(${a}, ${-n}, ${n}, ${a}, 0, 0)
|
|
@@ -6309,8 +6309,8 @@ const te = (r) => {
|
|
|
6309
6309
|
fetch: nt
|
|
6310
6310
|
}), u = s.getAttribute("width"), h = s.getAttribute("height"), m = 2048;
|
|
6311
6311
|
if (h && u) {
|
|
6312
|
-
const g = parseFloat(h),
|
|
6313
|
-
|
|
6312
|
+
const g = parseFloat(h), f = parseFloat(u) / g;
|
|
6313
|
+
f > 1 ? A.resize(m, m / f) : A.resize(m * f, m);
|
|
6314
6314
|
} else
|
|
6315
6315
|
A.resize(m, m);
|
|
6316
6316
|
return await A.render(), await t(c);
|
|
@@ -6334,8 +6334,8 @@ const te = (r) => {
|
|
|
6334
6334
|
const l = await lt(await $n(e)), u = dt().parseFromString(l.svg, "image/svg+xml").firstElementChild.getAttribute("viewBox");
|
|
6335
6335
|
if (!u)
|
|
6336
6336
|
throw new Error("SVG missing viewBox.");
|
|
6337
|
-
const h = o.height, m = u.split(" "), g = parseFloat(m[2]) || 1,
|
|
6338
|
-
o.height = o.width /
|
|
6337
|
+
const h = o.height, m = u.split(" "), g = parseFloat(m[2]) || 1, p = parseFloat(m[3]) || 1, f = g / p;
|
|
6338
|
+
o.height = o.width / f, o.top += (h - o.height) / 2;
|
|
6339
6339
|
}
|
|
6340
6340
|
if (e && t === T.Image) {
|
|
6341
6341
|
const l = o.height, c = await De(e), d = await Fe(c), A = d.width / d.height;
|
|
@@ -7227,13 +7227,13 @@ class Ga {
|
|
|
7227
7227
|
command: new G(h, i)
|
|
7228
7228
|
};
|
|
7229
7229
|
} else {
|
|
7230
|
-
const u = this.configuration.type === D.SilentIllustration ? (A = this.configuration.data.asset) == null ? void 0 : A.fileLink : s, m = await lt(await (async () => new Promise((
|
|
7230
|
+
const u = this.configuration.type === D.SilentIllustration ? (A = this.configuration.data.asset) == null ? void 0 : A.fileLink : s, m = await lt(await (async () => new Promise((p, f) => {
|
|
7231
7231
|
if (!u) {
|
|
7232
|
-
|
|
7232
|
+
f("Undefined vector silent step source");
|
|
7233
7233
|
return;
|
|
7234
7234
|
}
|
|
7235
7235
|
at(u, !0).then((C) => {
|
|
7236
|
-
|
|
7236
|
+
p(C);
|
|
7237
7237
|
}).catch((C) => console.error(C));
|
|
7238
7238
|
}))()), g = {
|
|
7239
7239
|
stepName: this.configuration.stepName,
|
|
@@ -7342,8 +7342,8 @@ class ds {
|
|
|
7342
7342
|
}
|
|
7343
7343
|
async regenerateQRCode(t, e, a, n) {
|
|
7344
7344
|
const i = async () => {
|
|
7345
|
-
var g,
|
|
7346
|
-
const h = (await ea([e]))[0], m = (
|
|
7345
|
+
var g, p;
|
|
7346
|
+
const h = (await ea([e]))[0], m = (p = (g = h == null ? void 0 : h.versions) == null ? void 0 : g.find((f) => f.name === "mpeg4")) == null ? void 0 : p.link;
|
|
7347
7347
|
return { asset: h, link: m };
|
|
7348
7348
|
}, s = await new Promise((h, m) => {
|
|
7349
7349
|
new Ln(
|
|
@@ -7476,13 +7476,13 @@ class Se {
|
|
|
7476
7476
|
}
|
|
7477
7477
|
if (n) {
|
|
7478
7478
|
const d = async () => {
|
|
7479
|
-
var m, g,
|
|
7480
|
-
const A = (m = n.storage) == null ? void 0 : m.colors, u = (g = n.storage) == null ? void 0 : g.framePatternSrc, h = (
|
|
7479
|
+
var m, g, p, f, C;
|
|
7480
|
+
const A = (m = n.storage) == null ? void 0 : m.colors, u = (g = n.storage) == null ? void 0 : g.framePatternSrc, h = (p = n.storage) == null ? void 0 : p.frameOffsetsList;
|
|
7481
7481
|
if (e.updateMetadata(t.stepName, {
|
|
7482
7482
|
frameOffsetsList: h,
|
|
7483
7483
|
framePatternSrc: u
|
|
7484
7484
|
}), u) {
|
|
7485
|
-
const w = (
|
|
7485
|
+
const w = (f = e.getWorkflowExperience().getStepById(t.stepName)) == null ? void 0 : f.frameService;
|
|
7486
7486
|
if (!w)
|
|
7487
7487
|
throw new Error("Frame service unavailable, cannot load pattern!");
|
|
7488
7488
|
await this.loadPatternFromString(u, w, !0, A), e.updateMetadata(t.stepName, { image: u }), e.updateStorage(t.stepName, {
|
|
@@ -7706,18 +7706,18 @@ class Se {
|
|
|
7706
7706
|
i && i(!0);
|
|
7707
7707
|
const c = t.data.initialZoomLevel, d = await Promise.all(
|
|
7708
7708
|
t.data.regions.map(async (m, g) => {
|
|
7709
|
-
const
|
|
7710
|
-
p,
|
|
7709
|
+
const p = await Me(l[g]), f = o.getImageData(), C = a.map((I) => new Et(I.id)), w = f ? Sa(
|
|
7711
7710
|
f,
|
|
7711
|
+
p,
|
|
7712
7712
|
c && !t.data.forceImageCover ? { scale: c } : void 0,
|
|
7713
7713
|
t.data.forceImageCover
|
|
7714
|
-
) : void 0, v =
|
|
7714
|
+
) : void 0, v = f ? {
|
|
7715
7715
|
id: N(),
|
|
7716
|
-
src:
|
|
7716
|
+
src: f.src,
|
|
7717
7717
|
x: (w == null ? void 0 : w.x) || 0,
|
|
7718
7718
|
y: (w == null ? void 0 : w.y) || 0,
|
|
7719
|
-
width:
|
|
7720
|
-
height:
|
|
7719
|
+
width: f.width,
|
|
7720
|
+
height: f.height,
|
|
7721
7721
|
scaleX: (w == null ? void 0 : w.zoom) || 1,
|
|
7722
7722
|
scaleY: (w == null ? void 0 : w.zoom) || 1,
|
|
7723
7723
|
rotation: 0
|
|
@@ -7726,7 +7726,7 @@ class Se {
|
|
|
7726
7726
|
throw new q(m);
|
|
7727
7727
|
return {
|
|
7728
7728
|
command: this.getCreateElementCommand(S, m, B, {
|
|
7729
|
-
frameData:
|
|
7729
|
+
frameData: p,
|
|
7730
7730
|
pattern: v,
|
|
7731
7731
|
disablePlaceholder: t.data.disablePlaceholder,
|
|
7732
7732
|
stepName: t.stepName
|
|
@@ -7927,25 +7927,25 @@ class As {
|
|
|
7927
7927
|
e[0].id,
|
|
7928
7928
|
n().map((g) => g.layoutState)
|
|
7929
7929
|
), o = { ...s.colors }, l = {};
|
|
7930
|
-
Object.entries(o).forEach(([g,
|
|
7931
|
-
const
|
|
7932
|
-
C && (
|
|
7930
|
+
Object.entries(o).forEach(([g, p]) => {
|
|
7931
|
+
const f = { browserValue: p.browserValue, pmsValue: p.pmsValue }, C = p.spotColor;
|
|
7932
|
+
C && (f.spotColor = { profileName: C.profileName, namedColor: C.namedColor }), l[g] = f;
|
|
7933
7933
|
});
|
|
7934
|
-
for (const [g,
|
|
7935
|
-
const
|
|
7936
|
-
o[g] = { browserValue:
|
|
7934
|
+
for (const [g, p] of i.entries()) {
|
|
7935
|
+
const f = typeof p == "string" ? p : p.browserValue, C = typeof p == "string" ? void 0 : p.pmsValue;
|
|
7936
|
+
o[g] = { browserValue: f, spotColor: (h = o[g]) == null ? void 0 : h.spotColor, pmsValue: C }, l[g] = { browserValue: f };
|
|
7937
7937
|
}
|
|
7938
7938
|
let c = Array.from(Object.values(o)).map((g) => g.browserValue);
|
|
7939
7939
|
const d = t.data.colorOption;
|
|
7940
7940
|
d && ((m = d.variants) == null || m.forEach((g) => {
|
|
7941
|
-
c = c.map((
|
|
7942
|
-
var
|
|
7943
|
-
return
|
|
7941
|
+
c = c.map((p) => {
|
|
7942
|
+
var f;
|
|
7943
|
+
return p.toLowerCase() === ((f = g.color) == null ? void 0 : f.toLowerCase()) ? g.name : p;
|
|
7944
7944
|
});
|
|
7945
7945
|
})), a.updateMetadata(t.stepName, { colors: c });
|
|
7946
7946
|
const A = /* @__PURE__ */ new Map();
|
|
7947
|
-
if (Object.entries(o).forEach(([g,
|
|
7948
|
-
A.set(g,
|
|
7947
|
+
if (Object.entries(o).forEach(([g, p]) => {
|
|
7948
|
+
A.set(g, p);
|
|
7949
7949
|
}), !s.svg)
|
|
7950
7950
|
throw new Error("Colors changed before SVG loaded. This should never happen!");
|
|
7951
7951
|
const u = await this.changeColorsCommand(
|
|
@@ -7964,7 +7964,7 @@ class As {
|
|
|
7964
7964
|
s && (s.command && i.getCommandDispatcher()(s.command), s.followup && await s.followup());
|
|
7965
7965
|
}
|
|
7966
7966
|
async selectVariantCommand(t, e, a, n, i) {
|
|
7967
|
-
var
|
|
7967
|
+
var f;
|
|
7968
7968
|
if (!t.data || !t.data.regions)
|
|
7969
7969
|
throw new Ce(t, "Missing regions.");
|
|
7970
7970
|
n(!0);
|
|
@@ -7992,8 +7992,8 @@ class As {
|
|
|
7992
7992
|
};
|
|
7993
7993
|
}, u = t.data.regions.map(A), m = [...u.map((C) => C.command), ...s];
|
|
7994
7994
|
let g = Array.from(Object.values(c.colors)).map((C) => C.browserValue);
|
|
7995
|
-
const
|
|
7996
|
-
return
|
|
7995
|
+
const p = t.data.colorOption;
|
|
7996
|
+
return p && ((f = p.variants) == null || f.forEach((C) => {
|
|
7997
7997
|
g = g.map((w) => {
|
|
7998
7998
|
var v;
|
|
7999
7999
|
return w.toLowerCase() === ((v = C.color) == null ? void 0 : v.toLowerCase()) ? C.name : w;
|
|
@@ -8054,7 +8054,7 @@ class us {
|
|
|
8054
8054
|
async init(t, e, a) {
|
|
8055
8055
|
const n = t.option;
|
|
8056
8056
|
if (!n)
|
|
8057
|
-
throw new
|
|
8057
|
+
throw new fe(t);
|
|
8058
8058
|
if (a)
|
|
8059
8059
|
await this.reload(t, e, a);
|
|
8060
8060
|
else {
|
|
@@ -8072,7 +8072,7 @@ class us {
|
|
|
8072
8072
|
a.serializableWorkflow.steps
|
|
8073
8073
|
), o = Object.values(a.layouts).map((d) => d.elements).flat().filter((d) => d.stepName === t.stepName), l = t.option;
|
|
8074
8074
|
if (!l)
|
|
8075
|
-
throw new
|
|
8075
|
+
throw new fe(t);
|
|
8076
8076
|
if (n != null && n.selectedVariants) {
|
|
8077
8077
|
const d = n.selectedVariants[0].id;
|
|
8078
8078
|
if (d) {
|
|
@@ -8086,8 +8086,8 @@ class us {
|
|
|
8086
8086
|
async () => {
|
|
8087
8087
|
const m = e.getModelContainer();
|
|
8088
8088
|
if (m) {
|
|
8089
|
-
const g = t.data.targetMaterials.map((
|
|
8090
|
-
|
|
8089
|
+
const g = t.data.targetMaterials.map((p) => m.applyMaterialVariant(
|
|
8090
|
+
p,
|
|
8091
8091
|
l.id || "",
|
|
8092
8092
|
u || {}
|
|
8093
8093
|
));
|
|
@@ -8132,7 +8132,7 @@ class hs {
|
|
|
8132
8132
|
async init(t, e, a) {
|
|
8133
8133
|
const n = t.option;
|
|
8134
8134
|
if (!n)
|
|
8135
|
-
throw new
|
|
8135
|
+
throw new fe(t);
|
|
8136
8136
|
if (a)
|
|
8137
8137
|
await this.reload(t, e, a);
|
|
8138
8138
|
else {
|
|
@@ -8249,11 +8249,11 @@ class ms {
|
|
|
8249
8249
|
return console.error("Missing configuration."), null;
|
|
8250
8250
|
a.updateStorage(t.stepName, { text: e }), a.updateMetadata(t.stepName, { text: e });
|
|
8251
8251
|
const c = (A, u, h) => {
|
|
8252
|
-
const m = h || N(),
|
|
8253
|
-
if (!
|
|
8252
|
+
const m = h || N(), p = a.getLayouts().find((C) => C.panelId === u.panelId);
|
|
8253
|
+
if (!p)
|
|
8254
8254
|
return console.error(`Can not find layout for region: ${u.panelId}`), null;
|
|
8255
|
-
const
|
|
8256
|
-
return h &&
|
|
8255
|
+
const f = [];
|
|
8256
|
+
return h && f.push(new Et(m)), f.push(
|
|
8257
8257
|
new G(
|
|
8258
8258
|
{
|
|
8259
8259
|
stepRegion: u,
|
|
@@ -8271,12 +8271,12 @@ class ms {
|
|
|
8271
8271
|
layerIndex: u.layerIndex,
|
|
8272
8272
|
immutable: u.immutable
|
|
8273
8273
|
},
|
|
8274
|
-
|
|
8274
|
+
p
|
|
8275
8275
|
)
|
|
8276
8276
|
), {
|
|
8277
8277
|
id: m,
|
|
8278
8278
|
region: u,
|
|
8279
|
-
command: new $(
|
|
8279
|
+
command: new $(f)
|
|
8280
8280
|
};
|
|
8281
8281
|
};
|
|
8282
8282
|
if (i.length > 0) {
|
|
@@ -8419,7 +8419,7 @@ class gs {
|
|
|
8419
8419
|
}
|
|
8420
8420
|
}
|
|
8421
8421
|
const jn = new gs();
|
|
8422
|
-
class
|
|
8422
|
+
class ps {
|
|
8423
8423
|
async init(t, e, a) {
|
|
8424
8424
|
const n = t.option;
|
|
8425
8425
|
if (!n)
|
|
@@ -8477,8 +8477,8 @@ class fs {
|
|
|
8477
8477
|
};
|
|
8478
8478
|
}
|
|
8479
8479
|
}
|
|
8480
|
-
const Hn = new
|
|
8481
|
-
class
|
|
8480
|
+
const Hn = new ps();
|
|
8481
|
+
class fs {
|
|
8482
8482
|
constructor() {
|
|
8483
8483
|
this.shapeFillId = "spiff-fill-shape";
|
|
8484
8484
|
}
|
|
@@ -8504,7 +8504,7 @@ class ps {
|
|
|
8504
8504
|
async init(t, e, a) {
|
|
8505
8505
|
const n = t.option;
|
|
8506
8506
|
if (!n)
|
|
8507
|
-
throw new
|
|
8507
|
+
throw new fe(t);
|
|
8508
8508
|
if (a)
|
|
8509
8509
|
await this.reload(t, e, a);
|
|
8510
8510
|
else {
|
|
@@ -8586,7 +8586,7 @@ class ps {
|
|
|
8586
8586
|
const m = i.find((w) => w.panelId === h.panelId);
|
|
8587
8587
|
if (!m)
|
|
8588
8588
|
throw new q(h);
|
|
8589
|
-
const g = o(),
|
|
8589
|
+
const g = o(), p = `
|
|
8590
8590
|
<svg
|
|
8591
8591
|
xmlns="http://www.w3.org/2000/svg"
|
|
8592
8592
|
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
@@ -8606,8 +8606,8 @@ class ps {
|
|
|
8606
8606
|
fill="${g}"
|
|
8607
8607
|
/>
|
|
8608
8608
|
</svg>
|
|
8609
|
-
`,
|
|
8610
|
-
|
|
8609
|
+
`, f = {};
|
|
8610
|
+
f[this.shapeFillId] = { browserValue: g };
|
|
8611
8611
|
const C = N();
|
|
8612
8612
|
return {
|
|
8613
8613
|
id: C,
|
|
@@ -8616,9 +8616,9 @@ class ps {
|
|
|
8616
8616
|
{
|
|
8617
8617
|
stepRegion: h,
|
|
8618
8618
|
stepName: t.stepName,
|
|
8619
|
-
colors:
|
|
8619
|
+
colors: f,
|
|
8620
8620
|
id: C,
|
|
8621
|
-
svg:
|
|
8621
|
+
svg: p,
|
|
8622
8622
|
type: T.Illustration,
|
|
8623
8623
|
y: h.top,
|
|
8624
8624
|
x: h.left,
|
|
@@ -8650,7 +8650,7 @@ class ps {
|
|
|
8650
8650
|
}
|
|
8651
8651
|
}
|
|
8652
8652
|
}
|
|
8653
|
-
const Vt = new
|
|
8653
|
+
const Vt = new fs();
|
|
8654
8654
|
class Cs {
|
|
8655
8655
|
constructor() {
|
|
8656
8656
|
this.latestToast = null, this.toastType = null, this.toastCallbacks = [];
|
|
@@ -8689,14 +8689,14 @@ const ws = new Cs(), Ge = (r, t, e, a, n) => {
|
|
|
8689
8689
|
const A = Math.max(...o);
|
|
8690
8690
|
if (A <= r.width)
|
|
8691
8691
|
return [i, A];
|
|
8692
|
-
const u = o.reduce((
|
|
8692
|
+
const u = o.reduce((p, f, C, w) => f > w[p] ? C : p, 0), h = i[u];
|
|
8693
8693
|
let m = !1, g = h.length;
|
|
8694
8694
|
for (; !m && g > -1; ) {
|
|
8695
8695
|
g = h.lastIndexOf(" ", g - 1);
|
|
8696
|
-
const
|
|
8697
|
-
|
|
8696
|
+
const p = [h.slice(0, g), h.slice(g + 1)], f = p.map((w) => ht(w, a, n));
|
|
8697
|
+
f[0] <= r.width && (i = [...i.slice(0, u), ...p, ...i.slice(u + 1)], o = [
|
|
8698
8698
|
...o.slice(0, u),
|
|
8699
|
-
...
|
|
8699
|
+
...f,
|
|
8700
8700
|
...o.slice(u + 1)
|
|
8701
8701
|
], s += 1, m = !0);
|
|
8702
8702
|
}
|
|
@@ -9013,19 +9013,19 @@ class Ss {
|
|
|
9013
9013
|
if (l && u) {
|
|
9014
9014
|
const h = (c = l.variants) == null ? void 0 : c.find((m) => m.id === u);
|
|
9015
9015
|
if (h) {
|
|
9016
|
-
const m = await this.fontDataFromVariant(h), g = o.map((w) => ({ id: w.id, region: w.stepRegion })),
|
|
9016
|
+
const m = await this.fontDataFromVariant(h), g = o.map((w) => ({ id: w.id, region: w.stepRegion })), p = (d = n.storage) == null ? void 0 : d.color, f = (A = n.storage) == null ? void 0 : A.text;
|
|
9017
9017
|
await e.setSelectionsAndElements(
|
|
9018
9018
|
t.stepName,
|
|
9019
9019
|
[h],
|
|
9020
9020
|
g,
|
|
9021
9021
|
async () => {
|
|
9022
|
-
e.updateMetadata(t.stepName, { color:
|
|
9022
|
+
e.updateMetadata(t.stepName, { color: p, text: f }), e.updateStorage(t.stepName, { text: f, inputText: f });
|
|
9023
9023
|
const w = o.map((S) => new za(S.id, m)), v = new $(w);
|
|
9024
9024
|
e.getCommandDispatcher()(v);
|
|
9025
9025
|
}
|
|
9026
9026
|
);
|
|
9027
9027
|
const { command: C } = H.updateInputText(
|
|
9028
|
-
|
|
9028
|
+
f || "",
|
|
9029
9029
|
o,
|
|
9030
9030
|
t,
|
|
9031
9031
|
e
|
|
@@ -9074,16 +9074,16 @@ class Ss {
|
|
|
9074
9074
|
var u;
|
|
9075
9075
|
const d = i.markUpdatePending(), A = await this.fontDataFromVariant(e);
|
|
9076
9076
|
if (n.length > 0) {
|
|
9077
|
-
const h = n.map((
|
|
9077
|
+
const h = n.map((p) => new za(p.id, A));
|
|
9078
9078
|
if (l) {
|
|
9079
|
-
const
|
|
9080
|
-
h.push(...
|
|
9079
|
+
const p = n.map((f) => new Ve(f.id, l));
|
|
9080
|
+
h.push(...p);
|
|
9081
9081
|
}
|
|
9082
9082
|
if (c) {
|
|
9083
|
-
const
|
|
9084
|
-
(
|
|
9083
|
+
const p = n.map(
|
|
9084
|
+
(f) => new ze(f.id, c, t.data.strokeThickness)
|
|
9085
9085
|
);
|
|
9086
|
-
h.push(...
|
|
9086
|
+
h.push(...p);
|
|
9087
9087
|
}
|
|
9088
9088
|
const m = await this.changeInputTextWithRegion(
|
|
9089
9089
|
t,
|
|
@@ -9120,18 +9120,18 @@ class Ss {
|
|
|
9120
9120
|
!!a.customiseAllText,
|
|
9121
9121
|
s,
|
|
9122
9122
|
o
|
|
9123
|
-
), g = h.flatMap((
|
|
9123
|
+
), g = h.flatMap((f) => f.commands);
|
|
9124
9124
|
if (l) {
|
|
9125
|
-
const
|
|
9125
|
+
const f = h.map(
|
|
9126
9126
|
(C) => new Ve(C.regionElement.id, l)
|
|
9127
9127
|
);
|
|
9128
|
-
g.push(...
|
|
9128
|
+
g.push(...f);
|
|
9129
9129
|
}
|
|
9130
9130
|
if (c) {
|
|
9131
|
-
const
|
|
9131
|
+
const f = n.map(
|
|
9132
9132
|
(C) => new ze(C.id, c, t.data.strokeThickness)
|
|
9133
9133
|
);
|
|
9134
|
-
g.push(...
|
|
9134
|
+
g.push(...f);
|
|
9135
9135
|
}
|
|
9136
9136
|
return m && g.push(m), {
|
|
9137
9137
|
command: new $(g),
|
|
@@ -9154,19 +9154,19 @@ class Ss {
|
|
|
9154
9154
|
throw new Error("Step data not supplied");
|
|
9155
9155
|
const o = i.text || a.defaultText || "", l = this.getProcessedInput(o, a, !1), c = async (A) => {
|
|
9156
9156
|
var g;
|
|
9157
|
-
const h = s.getLayouts().find((
|
|
9157
|
+
const h = s.getLayouts().find((p) => p.panelId === A.panelId), m = N();
|
|
9158
9158
|
try {
|
|
9159
9159
|
if (!h)
|
|
9160
9160
|
throw new Ee("Failed to find layout for region: " + A.panelId);
|
|
9161
|
-
const
|
|
9162
|
-
let
|
|
9163
|
-
if (
|
|
9164
|
-
const Q =
|
|
9161
|
+
const p = a.colorOption;
|
|
9162
|
+
let f;
|
|
9163
|
+
if (p && p.variants) {
|
|
9164
|
+
const Q = p.variants.find((it) => {
|
|
9165
9165
|
var R;
|
|
9166
|
-
return it.id === ((R =
|
|
9167
|
-
}) ||
|
|
9168
|
-
|
|
9169
|
-
colorProfileAssetKey: (g =
|
|
9166
|
+
return it.id === ((R = p.defaultVariant) == null ? void 0 : R.id);
|
|
9167
|
+
}) || p.variants[0];
|
|
9168
|
+
f = this.createTextFillSpotColor(p, Q), s.updateStorage(t, {
|
|
9169
|
+
colorProfileAssetKey: (g = p.colorProfile) == null ? void 0 : g.key
|
|
9170
9170
|
});
|
|
9171
9171
|
}
|
|
9172
9172
|
const C = await this.getDefaultColor(a), w = C || "#000000", v = {
|
|
@@ -9192,7 +9192,7 @@ class Ss {
|
|
|
9192
9192
|
verticalAlign: a.verticalAlign || "middle",
|
|
9193
9193
|
curved: a.curved,
|
|
9194
9194
|
paths: a.paths,
|
|
9195
|
-
fillSpotColorDefinition:
|
|
9195
|
+
fillSpotColorDefinition: f
|
|
9196
9196
|
}, S = [], E = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map();
|
|
9197
9197
|
if (!v.fontData)
|
|
9198
9198
|
throw new z("Failed to resolve font data for text.");
|
|
@@ -9223,8 +9223,8 @@ class Ss {
|
|
|
9223
9223
|
newElement: v,
|
|
9224
9224
|
fontData: n
|
|
9225
9225
|
};
|
|
9226
|
-
} catch (
|
|
9227
|
-
throw console.log(
|
|
9226
|
+
} catch (p) {
|
|
9227
|
+
throw console.log(p), new ve("Error adding font to region");
|
|
9228
9228
|
}
|
|
9229
9229
|
}, d = await Promise.all(a.regions.map(c)).catch((A) => {
|
|
9230
9230
|
throw A instanceof ve ? (ws.setLatestToast("Failed to load font.", Te.Error), A) : A instanceof Ee ? A : new Error(A);
|
|
@@ -9266,7 +9266,7 @@ class Ss {
|
|
|
9266
9266
|
);
|
|
9267
9267
|
m.set(v.id, S), g.set(v.id, E);
|
|
9268
9268
|
}
|
|
9269
|
-
const
|
|
9269
|
+
const f = (() => {
|
|
9270
9270
|
if (t.data && t.data.maxLength && u.length > t.data.maxLength)
|
|
9271
9271
|
return d && d(!0), { info: "0" };
|
|
9272
9272
|
const v = s.getProfanities(), S = Ke(u.toLowerCase());
|
|
@@ -9279,11 +9279,11 @@ class Ss {
|
|
|
9279
9279
|
return !t.data.vertical && !t.data.allowNewlines && (u.includes(`
|
|
9280
9280
|
`) || 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() });
|
|
9281
9281
|
})();
|
|
9282
|
-
if (
|
|
9283
|
-
c(
|
|
9282
|
+
if (f.error) {
|
|
9283
|
+
c(f.error);
|
|
9284
9284
|
return;
|
|
9285
9285
|
}
|
|
9286
|
-
if (c(`${
|
|
9286
|
+
if (c(`${f.info} characters remaining` || ""), d)
|
|
9287
9287
|
return;
|
|
9288
9288
|
s.updateStorage(t.stepName, { text: A }), s.updateMetadata(t.stepName, {
|
|
9289
9289
|
text: this.injectReplaceableText(A, t.data)
|
|
@@ -9483,12 +9483,12 @@ class xs extends vs {
|
|
|
9483
9483
|
m.classList.add("module-bounds"), u.appendChild(m);
|
|
9484
9484
|
const g = Bs(e.height, e.width);
|
|
9485
9485
|
g.setAttribute("opacity", "0"), m.appendChild(g);
|
|
9486
|
-
const
|
|
9487
|
-
|
|
9488
|
-
const
|
|
9489
|
-
|
|
9486
|
+
const p = tt("g");
|
|
9487
|
+
p.classList.add("module-text-enclosure"), u.appendChild(p);
|
|
9488
|
+
const f = A();
|
|
9489
|
+
p.appendChild(f);
|
|
9490
9490
|
const C = mr(d);
|
|
9491
|
-
return Ds(
|
|
9491
|
+
return Ds(p, C, e.height, e.width, 0.35, 0.65), Is(u.outerHTML);
|
|
9492
9492
|
}
|
|
9493
9493
|
}
|
|
9494
9494
|
async function qn(r) {
|
|
@@ -10032,6 +10032,7 @@ const Ts = y`
|
|
|
10032
10032
|
createdAt
|
|
10033
10033
|
transactionsCount
|
|
10034
10034
|
productsCount
|
|
10035
|
+
totalPriceSubunits
|
|
10035
10036
|
quoteId
|
|
10036
10037
|
orderId
|
|
10037
10038
|
productCollection {
|
|
@@ -10149,7 +10150,7 @@ class Ha extends Pn {
|
|
|
10149
10150
|
}
|
|
10150
10151
|
}
|
|
10151
10152
|
class lo {
|
|
10152
|
-
constructor(t, e, a, n, i, s, o, l, c, d, A, u, h, m = !1, g,
|
|
10153
|
+
constructor(t, e, a, n, i, s, o, l, c, d, A, u, h, m = !1, g, p = !1, f = !1, C = !1) {
|
|
10153
10154
|
this.workflowStatePromiseQueue = new Fn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
|
|
10154
10155
|
var S;
|
|
10155
10156
|
if (!this.previewService)
|
|
@@ -10158,7 +10159,7 @@ class lo {
|
|
|
10158
10159
|
if (v)
|
|
10159
10160
|
for (const [, E] of v)
|
|
10160
10161
|
E.render(w);
|
|
10161
|
-
}, 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 =
|
|
10162
|
+
}, 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, this.isReloadedTransaction = p, this.workflow.steps.forEach((w) => {
|
|
10162
10163
|
this.stepTags[w.stepName] = w.tags ?? [];
|
|
10163
10164
|
}), C && (this.workflowStatePromiseQueue.enabled = !1), this.initializationPromise = this.initializeDefaultWorkflowState(a), this.initializationPromise.then(() => {
|
|
10164
10165
|
this.initialized = !0;
|
|
@@ -10204,7 +10205,7 @@ class lo {
|
|
|
10204
10205
|
}
|
|
10205
10206
|
});
|
|
10206
10207
|
else {
|
|
10207
|
-
const
|
|
10208
|
+
const p = await this.graphQlClient().mutate({
|
|
10208
10209
|
mutation: ro,
|
|
10209
10210
|
errorPolicy: "all",
|
|
10210
10211
|
fetchPolicy: "no-cache",
|
|
@@ -10222,7 +10223,7 @@ class lo {
|
|
|
10222
10223
|
}
|
|
10223
10224
|
});
|
|
10224
10225
|
this.transaction.recipient = {
|
|
10225
|
-
id: (h = (u =
|
|
10226
|
+
id: (h = (u = p == null ? void 0 : p.data) == null ? void 0 : u.recipientCreate) == null ? void 0 : h.id,
|
|
10226
10227
|
firstName: t,
|
|
10227
10228
|
lastName: e,
|
|
10228
10229
|
address: a,
|
|
@@ -10239,13 +10240,14 @@ class lo {
|
|
|
10239
10240
|
fetchPolicy: "no-cache",
|
|
10240
10241
|
variables: {
|
|
10241
10242
|
id: this.transaction.id,
|
|
10242
|
-
recipientId: (g = (m =
|
|
10243
|
+
recipientId: (g = (m = p.data) == null ? void 0 : m.recipientCreate) == null ? void 0 : g.id
|
|
10243
10244
|
},
|
|
10244
10245
|
context: {
|
|
10245
10246
|
transactionOwnerId: this.transaction.transactionOwnerId
|
|
10246
10247
|
}
|
|
10247
10248
|
});
|
|
10248
10249
|
}
|
|
10250
|
+
this.recipientCallbacks.forEach((p) => p(this.transaction.recipient));
|
|
10249
10251
|
}
|
|
10250
10252
|
async initializeDefaultWorkflowState(t) {
|
|
10251
10253
|
const e = () => {
|
|
@@ -10326,6 +10328,12 @@ class lo {
|
|
|
10326
10328
|
addValidationCallback(t) {
|
|
10327
10329
|
this.validationCallbacks.push(t), t(this.validationErrors);
|
|
10328
10330
|
}
|
|
10331
|
+
addRecipientCallback(t) {
|
|
10332
|
+
this.recipientCallbacks.push(t), t(this.transaction.recipient);
|
|
10333
|
+
}
|
|
10334
|
+
removeRecipientCallback(t) {
|
|
10335
|
+
this.recipientCallbacks = this.recipientCallbacks.filter((e) => e !== t);
|
|
10336
|
+
}
|
|
10329
10337
|
getLayouts() {
|
|
10330
10338
|
return this.layouts;
|
|
10331
10339
|
}
|
|
@@ -10734,7 +10742,7 @@ class lo {
|
|
|
10734
10742
|
const E = (S = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : S.frameService;
|
|
10735
10743
|
E == null || E.setTargetElements(a.map((B) => B.id));
|
|
10736
10744
|
}
|
|
10737
|
-
const
|
|
10745
|
+
const p = u.map((E) => new Et(E.id)), f = new Va(this.constructSerializableWorkflow()), C = [...m, ...p, f];
|
|
10738
10746
|
C.length > 0 && this.commandContext.apply(new $(C), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
|
|
10739
10747
|
const w = this.getInvalidModelVariants(), v = this.modelContainer;
|
|
10740
10748
|
if (v) {
|
|
@@ -11275,7 +11283,7 @@ class go extends rt {
|
|
|
11275
11283
|
return t;
|
|
11276
11284
|
}
|
|
11277
11285
|
}
|
|
11278
|
-
class
|
|
11286
|
+
class po extends rt {
|
|
11279
11287
|
constructor(t, e, a) {
|
|
11280
11288
|
super(t, e, a);
|
|
11281
11289
|
}
|
|
@@ -11476,7 +11484,7 @@ class fo extends rt {
|
|
|
11476
11484
|
await H.changeStrokeColor(this.step, t, e, this.manager);
|
|
11477
11485
|
}
|
|
11478
11486
|
}
|
|
11479
|
-
class
|
|
11487
|
+
class fo extends rt {
|
|
11480
11488
|
constructor(t, e, a) {
|
|
11481
11489
|
super(t, e, a);
|
|
11482
11490
|
}
|
|
@@ -11570,11 +11578,11 @@ class oe {
|
|
|
11570
11578
|
case D.DigitalContent:
|
|
11571
11579
|
return new Co(t, e, t.getStepTags(e.stepName));
|
|
11572
11580
|
case D.Information:
|
|
11573
|
-
return new
|
|
11581
|
+
return new fo(t, e, t.getStepTags(e.stepName));
|
|
11574
11582
|
case D.Question:
|
|
11575
11583
|
return new mo(t, e, t.getStepTags(e.stepName));
|
|
11576
11584
|
case D.Text:
|
|
11577
|
-
return new
|
|
11585
|
+
return new po(t, e, t.getStepTags(e.stepName));
|
|
11578
11586
|
case D.Illustration:
|
|
11579
11587
|
return new co(t, e, t.getStepTags(e.stepName));
|
|
11580
11588
|
case D.Picture:
|
|
@@ -11814,7 +11822,7 @@ const vo = async (r) => {
|
|
|
11814
11822
|
Q.errors && console.log("Server Error:", Z.message);
|
|
11815
11823
|
}), null) : it ?? null;
|
|
11816
11824
|
})() || (console.warn("State mismatch detected. Uploading known state explicitly"), console.warn("State Object:", JSON.stringify(a())), await r.updateStateWithServerImmediate(a), console.log("Server state is undefined @ Workflow completion"));
|
|
11817
|
-
const u = r.getPreviewService(), h = (I = t == null ? void 0 : t.finalizeStepConfig) == null ? void 0 : I.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, g = l && oa(l, t, !0),
|
|
11825
|
+
const u = r.getPreviewService(), h = (I = t == null ? void 0 : t.finalizeStepConfig) == null ? void 0 : I.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, g = l && oa(l, t, !0), p = l && oa(l, t, !1), f = async (P) => {
|
|
11818
11826
|
const F = {};
|
|
11819
11827
|
let k = 0;
|
|
11820
11828
|
if (Object.keys(i).length > 0)
|
|
@@ -11823,12 +11831,12 @@ const vo = async (r) => {
|
|
|
11823
11831
|
for (let Z = 0; Z < it.selections.length; ++Z) {
|
|
11824
11832
|
const W = it.selections[Z];
|
|
11825
11833
|
if (R && (!P || R.option && (R.option.variants || []).length > 1 && !R.data.hideSelectionInCart && !R.data.hideSelectionsInCart)) {
|
|
11826
|
-
const
|
|
11827
|
-
F[
|
|
11834
|
+
const ft = R.stepTitle;
|
|
11835
|
+
F[ft] ? F[ft].push({
|
|
11828
11836
|
id: W.id || "",
|
|
11829
11837
|
name: W.name,
|
|
11830
11838
|
priceModifier: W.priceModifier
|
|
11831
|
-
}) : F[
|
|
11839
|
+
}) : F[ft] = [
|
|
11832
11840
|
{
|
|
11833
11841
|
id: W.id || "",
|
|
11834
11842
|
name: W.name,
|
|
@@ -11840,9 +11848,9 @@ const vo = async (r) => {
|
|
|
11840
11848
|
}
|
|
11841
11849
|
}
|
|
11842
11850
|
return [F, k];
|
|
11843
|
-
}, [C] = await
|
|
11851
|
+
}, [C] = await f(!0), w = Object.fromEntries(
|
|
11844
11852
|
Object.keys(C).map((P) => [P, C[P].map((F) => F.id)])
|
|
11845
|
-
), [v] = await
|
|
11853
|
+
), [v] = await f(!1), S = Object.fromEntries(
|
|
11846
11854
|
Object.keys(v).map((P) => [
|
|
11847
11855
|
P,
|
|
11848
11856
|
v[P].map((F) => F.id)
|
|
@@ -11871,9 +11879,9 @@ const vo = async (r) => {
|
|
|
11871
11879
|
useThreeDimPreview: !!m,
|
|
11872
11880
|
previewImage: E
|
|
11873
11881
|
};
|
|
11874
|
-
if (
|
|
11882
|
+
if (p) {
|
|
11875
11883
|
const F = [];
|
|
11876
|
-
for (const [k, Q] of Object.entries(
|
|
11884
|
+
for (const [k, Q] of Object.entries(p))
|
|
11877
11885
|
F.push({ key: k, value: Q });
|
|
11878
11886
|
P.metadata = F;
|
|
11879
11887
|
}
|
|
@@ -11889,7 +11897,7 @@ const vo = async (r) => {
|
|
|
11889
11897
|
cartMetadata: g
|
|
11890
11898
|
};
|
|
11891
11899
|
}, bo = async (r, t, e, a, n, i, s, o, l, c, d) => {
|
|
11892
|
-
var
|
|
11900
|
+
var f, C;
|
|
11893
11901
|
l("workflow.steps.finish.finalize.buildingLayouts");
|
|
11894
11902
|
const { designDetails: A, cartSelectionsWithPrices: u, cartMetadata: h } = await _n(
|
|
11895
11903
|
r,
|
|
@@ -11903,13 +11911,13 @@ const vo = async (r) => {
|
|
|
11903
11911
|
d
|
|
11904
11912
|
);
|
|
11905
11913
|
l("workflow.steps.finish.finalize.creatingDesign");
|
|
11906
|
-
const m = await vo(A), g = (
|
|
11914
|
+
const m = await vo(A), g = (f = m == null ? void 0 : m.transaction) == null ? void 0 : f.previewImageLink;
|
|
11907
11915
|
if (!(m != null && m.transaction))
|
|
11908
11916
|
throw new Error("Failed to create design");
|
|
11909
11917
|
l("workflow.steps.finish.finalize.updatingTransaction");
|
|
11910
|
-
const
|
|
11918
|
+
const p = m.transaction;
|
|
11911
11919
|
return Kn(
|
|
11912
|
-
|
|
11920
|
+
p,
|
|
11913
11921
|
n,
|
|
11914
11922
|
t,
|
|
11915
11923
|
u,
|
|
@@ -12221,8 +12229,8 @@ class Mo {
|
|
|
12221
12229
|
DOMParser: ha(),
|
|
12222
12230
|
fetch
|
|
12223
12231
|
})).render();
|
|
12224
|
-
const
|
|
12225
|
-
return s.toDataURL(
|
|
12232
|
+
const f = await this.getCanvasObjectURLAsync(s);
|
|
12233
|
+
return s.toDataURL(f);
|
|
12226
12234
|
}
|
|
12227
12235
|
getStepById(t) {
|
|
12228
12236
|
const e = this.getWorkflowManager().getWorkflow().steps.find((i) => i.stepName === t);
|
|
@@ -12318,15 +12326,15 @@ class Mo {
|
|
|
12318
12326
|
A !== void 0 && (A.forEach((u) => d.add(JSON.stringify(u))), o.forEach((u) => {
|
|
12319
12327
|
const h = u.getRaw().globalPropertyAspectConfigurations;
|
|
12320
12328
|
h !== void 0 && h.forEach((m) => {
|
|
12321
|
-
const g = l(m),
|
|
12322
|
-
if (
|
|
12323
|
-
const
|
|
12324
|
-
if (!
|
|
12329
|
+
const g = l(m), p = d.has(JSON.stringify(m));
|
|
12330
|
+
if (p && (g == null ? void 0 : g.getType()) === "Option") {
|
|
12331
|
+
const f = u.getCurrentVariant();
|
|
12332
|
+
if (!f)
|
|
12325
12333
|
return;
|
|
12326
|
-
c.selectVariant(
|
|
12327
|
-
} else if (
|
|
12328
|
-
const
|
|
12329
|
-
c.setText(
|
|
12334
|
+
c.selectVariant(f), d.delete(JSON.stringify(m));
|
|
12335
|
+
} else if (p && (g == null ? void 0 : g.getType()) === "Text") {
|
|
12336
|
+
const f = u.getText();
|
|
12337
|
+
c.setText(f), d.delete(JSON.stringify(m));
|
|
12330
12338
|
}
|
|
12331
12339
|
});
|
|
12332
12340
|
}));
|
|
@@ -12484,7 +12492,7 @@ class Mo {
|
|
|
12484
12492
|
), this.checkForPriceBreakChanges();
|
|
12485
12493
|
const e = this.getWorkflowManager().getTransaction();
|
|
12486
12494
|
await this.graphQlClient().mutate({
|
|
12487
|
-
mutation:
|
|
12495
|
+
mutation: pi,
|
|
12488
12496
|
variables: {
|
|
12489
12497
|
id: e.id,
|
|
12490
12498
|
quantity: t
|
|
@@ -12522,7 +12530,7 @@ const To = [
|
|
|
12522
12530
|
const a = t.data, n = e.data.baseUrl, i = a.assetUrl.replace("localhost", "localstack"), s = n.slice(0, 4) === "http" ? "" : "https://", o = new URL(s + n);
|
|
12523
12531
|
o.searchParams.append("video", Ma(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
|
|
12524
12532
|
const l = o.toString(), d = `data:image/svg+xml;base64,${Ma(await rn(l, { type: "svg" }))}`, A = (h) => {
|
|
12525
|
-
const m = r.find((
|
|
12533
|
+
const m = r.find((p) => p.panelId === h.panelId);
|
|
12526
12534
|
if (!m)
|
|
12527
12535
|
throw new q(h);
|
|
12528
12536
|
const g = N();
|
|
@@ -12552,7 +12560,7 @@ const To = [
|
|
|
12552
12560
|
o && (t[a.stepName] = { selectedVariants: [o] });
|
|
12553
12561
|
const l = async (c) => {
|
|
12554
12562
|
var g;
|
|
12555
|
-
const d = await Rn(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await Me(d), u = N(), h = r.find((
|
|
12563
|
+
const d = await Rn(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await Me(d), u = N(), h = r.find((p) => p.panelId === c.panelId);
|
|
12556
12564
|
if (!h)
|
|
12557
12565
|
throw new q(c);
|
|
12558
12566
|
const m = Sa(
|
|
@@ -12635,7 +12643,7 @@ const To = [
|
|
|
12635
12643
|
B.classList.add(Q), g[Q] = { browserValue: F };
|
|
12636
12644
|
}
|
|
12637
12645
|
});
|
|
12638
|
-
const
|
|
12646
|
+
const f = Bt().serializeToString(m), C = n.colors;
|
|
12639
12647
|
if (C) {
|
|
12640
12648
|
for (const [B, I] of Object.entries(g))
|
|
12641
12649
|
for (const P of Object.keys(C))
|
|
@@ -12653,7 +12661,7 @@ const To = [
|
|
|
12653
12661
|
{
|
|
12654
12662
|
colors: g,
|
|
12655
12663
|
id: P,
|
|
12656
|
-
svg:
|
|
12664
|
+
svg: f,
|
|
12657
12665
|
type: T.Illustration,
|
|
12658
12666
|
y: B.top,
|
|
12659
12667
|
x: B.left,
|
|
@@ -12754,7 +12762,7 @@ const To = [
|
|
|
12754
12762
|
return console.error(`No variant with ID: ${n.colorVariantId}`), [];
|
|
12755
12763
|
t[a.stepName] = { selectedVariants: [s] };
|
|
12756
12764
|
const o = (d) => {
|
|
12757
|
-
const A = r.find((
|
|
12765
|
+
const A = r.find((p) => p.panelId === d.panelId);
|
|
12758
12766
|
if (!A)
|
|
12759
12767
|
throw new q(d);
|
|
12760
12768
|
const u = `
|
|
@@ -12836,10 +12844,10 @@ const To = [
|
|
|
12836
12844
|
}
|
|
12837
12845
|
else {
|
|
12838
12846
|
const c = await at(i, !0), d = (A) => {
|
|
12839
|
-
const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = (h == null ? void 0 : h.length) > 0 ? h[0] : "",
|
|
12840
|
-
if (!
|
|
12847
|
+
const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = (h == null ? void 0 : h.length) > 0 ? h[0] : "", f = dt().parseFromString(m, "image/svg+xml").firstElementChild;
|
|
12848
|
+
if (!f)
|
|
12841
12849
|
throw new Pt("Failed to read SVG.");
|
|
12842
|
-
return ma(
|
|
12850
|
+
return ma(f), Bt().serializeToString(f);
|
|
12843
12851
|
};
|
|
12844
12852
|
l.forEach((A) => {
|
|
12845
12853
|
const u = r.find((m) => m.panelId === A.panelId);
|
|
@@ -12869,40 +12877,40 @@ const To = [
|
|
|
12869
12877
|
}
|
|
12870
12878
|
return a;
|
|
12871
12879
|
}, Vo = async (r, t, e, a) => {
|
|
12872
|
-
const n = [], i = e.data, s = 30, o = (
|
|
12880
|
+
const n = [], i = e.data, s = 30, o = (p) => p.vertical ? "center" : p.textAlign || "center", l = () => {
|
|
12873
12881
|
var w;
|
|
12874
|
-
const
|
|
12875
|
-
if (!
|
|
12882
|
+
const p = a.option;
|
|
12883
|
+
if (!p)
|
|
12876
12884
|
return;
|
|
12877
|
-
const
|
|
12878
|
-
if (!
|
|
12885
|
+
const f = ((w = p.variants) == null ? void 0 : w.find((v) => v.id === i.fontVariantId)) || te(p);
|
|
12886
|
+
if (!f || !f.asset)
|
|
12879
12887
|
return;
|
|
12880
|
-
t[a.stepName] = { selectedVariants: [
|
|
12881
|
-
const C =
|
|
12888
|
+
t[a.stepName] = { selectedVariants: [f] };
|
|
12889
|
+
const C = f.asset.fileLink;
|
|
12882
12890
|
if (C)
|
|
12883
12891
|
return C;
|
|
12884
12892
|
}, d = await (async () => {
|
|
12885
|
-
const
|
|
12886
|
-
if (!
|
|
12893
|
+
const p = l();
|
|
12894
|
+
if (!p)
|
|
12887
12895
|
return;
|
|
12888
|
-
const
|
|
12896
|
+
const f = await Qt(p);
|
|
12889
12897
|
return {
|
|
12890
|
-
assetUrl:
|
|
12891
|
-
name:
|
|
12898
|
+
assetUrl: p,
|
|
12899
|
+
name: f.names.fullName.en
|
|
12892
12900
|
};
|
|
12893
12901
|
})(), A = (a.data.replaceableText ? a.data.replaceableText.replace("{{}}", i.text) : i.text) || "", u = ye(A, {
|
|
12894
12902
|
vertical: a.data.vertical,
|
|
12895
12903
|
uppercase: a.data.uppercase
|
|
12896
|
-
}), h = async (
|
|
12897
|
-
const
|
|
12898
|
-
if (!
|
|
12904
|
+
}), h = async (p) => {
|
|
12905
|
+
const f = p.colorOption;
|
|
12906
|
+
if (!f)
|
|
12899
12907
|
return;
|
|
12900
|
-
const C = _.getDefaultVariant(
|
|
12908
|
+
const C = _.getDefaultVariant(f);
|
|
12901
12909
|
return C == null ? void 0 : C.color;
|
|
12902
12910
|
}, m = i.color || await h(a.data), g = a.data.regions;
|
|
12903
|
-
for (const
|
|
12904
|
-
const
|
|
12905
|
-
if (!
|
|
12911
|
+
for (const p of g) {
|
|
12912
|
+
const f = r.find((w) => w.panelId === p.panelId);
|
|
12913
|
+
if (!f)
|
|
12906
12914
|
continue;
|
|
12907
12915
|
const C = {
|
|
12908
12916
|
stepName: e.name,
|
|
@@ -12912,24 +12920,24 @@ const To = [
|
|
|
12912
12920
|
fill: i.color || m || "#000000",
|
|
12913
12921
|
fontData: d,
|
|
12914
12922
|
fontSize: a.data.size || s,
|
|
12915
|
-
height:
|
|
12916
|
-
layer:
|
|
12917
|
-
layerIndex:
|
|
12923
|
+
height: p.height,
|
|
12924
|
+
layer: p.layer,
|
|
12925
|
+
layerIndex: p.layerIndex,
|
|
12918
12926
|
paths: a.data.paths,
|
|
12919
|
-
rotation:
|
|
12927
|
+
rotation: p.rotation,
|
|
12920
12928
|
text: u,
|
|
12921
12929
|
type: T.Textbox,
|
|
12922
12930
|
vertical: a.data.vertical,
|
|
12923
12931
|
verticalAlign: a.data.verticalAlign || "middle",
|
|
12924
|
-
width:
|
|
12925
|
-
x:
|
|
12926
|
-
y:
|
|
12932
|
+
width: p.width,
|
|
12933
|
+
x: p.left,
|
|
12934
|
+
y: p.top
|
|
12927
12935
|
};
|
|
12928
12936
|
if (d) {
|
|
12929
12937
|
const [w, v] = he(
|
|
12930
12938
|
a.data.size || s,
|
|
12931
12939
|
d,
|
|
12932
|
-
|
|
12940
|
+
p,
|
|
12933
12941
|
[
|
|
12934
12942
|
ye(u, {
|
|
12935
12943
|
vertical: a.data.vertical,
|
|
@@ -12950,11 +12958,11 @@ const To = [
|
|
|
12950
12958
|
text: C.curved ? C.text : (v || []).join(`
|
|
12951
12959
|
`)
|
|
12952
12960
|
},
|
|
12953
|
-
|
|
12961
|
+
f
|
|
12954
12962
|
)
|
|
12955
12963
|
);
|
|
12956
12964
|
} else
|
|
12957
|
-
n.push(new G(C,
|
|
12965
|
+
n.push(new G(C, f));
|
|
12958
12966
|
}
|
|
12959
12967
|
return n;
|
|
12960
12968
|
}, zo = (r, t) => r.conditions ? r.conditions.every((e) => {
|
|
@@ -13412,7 +13420,7 @@ class Ko extends Ba {
|
|
|
13412
13420
|
}
|
|
13413
13421
|
async getImageWithColors() {
|
|
13414
13422
|
var t, e;
|
|
13415
|
-
return await this.loadImageData(), (t = this.imageData) != null && t.svg ? Aa(
|
|
13423
|
+
return await this.loadImageData(), (t = this.imageData) != null && t.svg ? Aa(pa(this.imageData.svg, this.imageData.colors ?? {}, !1)) : (e = this.imageData) == null ? void 0 : e.src;
|
|
13416
13424
|
}
|
|
13417
13425
|
/**
|
|
13418
13426
|
* Retrieves the original, unmodified image selection, if one exists.
|
|
@@ -14523,11 +14531,11 @@ class He {
|
|
|
14523
14531
|
return;
|
|
14524
14532
|
}
|
|
14525
14533
|
console.log("Setting default global variants."), this.globalPropertyHandleService.getHandles().then((m) => {
|
|
14526
|
-
const g = m.map((
|
|
14527
|
-
if (
|
|
14528
|
-
const
|
|
14534
|
+
const g = m.map((p) => {
|
|
14535
|
+
if (p.getType() === et.ColorOption || p.getType() === et.Option) {
|
|
14536
|
+
const f = p;
|
|
14529
14537
|
if (this.globalPropertyStateManager.getGlobalPropertyState())
|
|
14530
|
-
return
|
|
14538
|
+
return f.initDefaultVariant();
|
|
14531
14539
|
console.log("Attempted to set global default variant before state was initialized.");
|
|
14532
14540
|
}
|
|
14533
14541
|
});
|
|
@@ -14664,11 +14672,11 @@ class He {
|
|
|
14664
14672
|
this.getWorkflowExperiences(),
|
|
14665
14673
|
this.globalConfigurationPropertyId || "",
|
|
14666
14674
|
l
|
|
14667
|
-
), m = [...new Set(A.map((
|
|
14675
|
+
), m = [...new Set(A.map((p) => p.number))];
|
|
14668
14676
|
if (m.length > h)
|
|
14669
|
-
for (const
|
|
14670
|
-
const
|
|
14671
|
-
C && await
|
|
14677
|
+
for (const p of m) {
|
|
14678
|
+
const f = this.getGlobalPropertyStateManager(), C = u.find((w) => w.channelNumber === p);
|
|
14679
|
+
C && await f.setAspect(l, C.variant.id || "", void 0, C.channelNumber);
|
|
14672
14680
|
}
|
|
14673
14681
|
}
|
|
14674
14682
|
}
|
|
@@ -14866,7 +14874,7 @@ class He {
|
|
|
14866
14874
|
variables: {
|
|
14867
14875
|
id: this.id,
|
|
14868
14876
|
details: t,
|
|
14869
|
-
type: e ||
|
|
14877
|
+
type: e || pe.Owner
|
|
14870
14878
|
},
|
|
14871
14879
|
context: {
|
|
14872
14880
|
bundleOwnerId: this.ownerId
|
|
@@ -15327,7 +15335,7 @@ class ba {
|
|
|
15327
15335
|
return t.startsWith("[") ? JSON.stringify(JSON.parse(t)) : t;
|
|
15328
15336
|
}
|
|
15329
15337
|
}
|
|
15330
|
-
var
|
|
15338
|
+
var pl = /* @__PURE__ */ ((r) => (r.Transaction = "Transaction", r.Bundle = "Bundle", r.Product = "Product", r.Variant = "Variant", r.Option = "Option", r.LineItem = "LineItem", r.Asset = "Asset", r))(pl || {});
|
|
15331
15339
|
class Yc extends ba {
|
|
15332
15340
|
constructor(t) {
|
|
15333
15341
|
super(`"${t}"`);
|
|
@@ -15401,7 +15409,7 @@ const Ja = y`
|
|
|
15401
15409
|
}
|
|
15402
15410
|
}
|
|
15403
15411
|
}
|
|
15404
|
-
`,
|
|
15412
|
+
`, fl = y`
|
|
15405
15413
|
mutation CustomerCreate($details: CustomerDetailsInput!) {
|
|
15406
15414
|
customerCreate(details: $details) {
|
|
15407
15415
|
id
|
|
@@ -15590,7 +15598,7 @@ class _c {
|
|
|
15590
15598
|
} catch (a) {
|
|
15591
15599
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15592
15600
|
}
|
|
15593
|
-
}, this.options = t, this.options.applicationKey && Mr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.
|
|
15601
|
+
}, this.options = t, this.options.applicationKey && Mr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.37.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15594
15602
|
}
|
|
15595
15603
|
configure(t) {
|
|
15596
15604
|
mt.setHubUrl(t.hubUrl), mt.setServerUrl(t.serverUrl), mt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && Qr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
|
|
@@ -15637,7 +15645,7 @@ class _c {
|
|
|
15637
15645
|
var n, i;
|
|
15638
15646
|
const e = M.getMap("bundleOwnerIds");
|
|
15639
15647
|
if (e != null && e.has(t))
|
|
15640
|
-
return Promise.resolve({ success: !0, stakeholderType:
|
|
15648
|
+
return Promise.resolve({ success: !0, stakeholderType: pe.Owner });
|
|
15641
15649
|
const a = M.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
15642
15650
|
if (a.has(t)) {
|
|
15643
15651
|
const s = a.get(t), l = (M.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map()).get(s);
|
|
@@ -15686,11 +15694,11 @@ class _c {
|
|
|
15686
15694
|
return Promise.resolve({ success: !1, transactionReadOnly: !0 });
|
|
15687
15695
|
const s = M.getMap("transactionOwnerIds");
|
|
15688
15696
|
if (s != null && s.has(t))
|
|
15689
|
-
return Promise.resolve({ success: !0, stakeholderType:
|
|
15697
|
+
return Promise.resolve({ success: !0, stakeholderType: pe.Owner });
|
|
15690
15698
|
const o = M.getMap("transactionCustomerIds");
|
|
15691
15699
|
if (o != null && o.has(t)) {
|
|
15692
|
-
const
|
|
15693
|
-
if (
|
|
15700
|
+
const p = o.get(t);
|
|
15701
|
+
if (p && await this.authenticateCustomerId(p)) {
|
|
15694
15702
|
const C = ((h = (u = this.customer) == null ? void 0 : u.bundleStakeholders) == null ? void 0 : h.find(
|
|
15695
15703
|
(w) => {
|
|
15696
15704
|
var v, S;
|
|
@@ -15766,7 +15774,7 @@ class _c {
|
|
|
15766
15774
|
})).data.customer;
|
|
15767
15775
|
if (!n.id) {
|
|
15768
15776
|
const l = (s = (await e.mutate({
|
|
15769
|
-
mutation:
|
|
15777
|
+
mutation: fl,
|
|
15770
15778
|
errorPolicy: "all",
|
|
15771
15779
|
fetchPolicy: "no-cache",
|
|
15772
15780
|
variables: {
|
|
@@ -15897,13 +15905,13 @@ class _c {
|
|
|
15897
15905
|
* @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
|
|
15898
15906
|
*/
|
|
15899
15907
|
async getExistingBundle(t, e, a, n) {
|
|
15900
|
-
var
|
|
15901
|
-
const i = M.getMap("bundleOwnerIds"), s = i == null ? void 0 : i.get(t), l = ((
|
|
15908
|
+
var p, f, C, w, v, S, E, B, I, P, F;
|
|
15909
|
+
const i = M.getMap("bundleOwnerIds"), s = i == null ? void 0 : i.get(t), l = ((p = Object.entries(localStorage).find(([k, Q]) => k.startsWith("CognitoIdentityServiceProvider") && k.endsWith("idToken"))) == null ? void 0 : p[0]) || "", c = localStorage.getItem(l), d = {};
|
|
15902
15910
|
c && !Be(c) && (d.Authorization = `Bearer ${c}`);
|
|
15903
15911
|
const A = {
|
|
15904
15912
|
bundleOwnerId: s,
|
|
15905
15913
|
...d,
|
|
15906
|
-
...(
|
|
15914
|
+
...(f = n == null ? void 0 : n.graphql) == null ? void 0 : f.additionalHeaders
|
|
15907
15915
|
}, u = await b.getShadowGraphqlClient().query({
|
|
15908
15916
|
query: Qs(((w = (C = n == null ? void 0 : n.graphql) == null ? void 0 : C.productCollection) == null ? void 0 : w.eagerFetchProducts) || !1),
|
|
15909
15917
|
variables: {
|
|
@@ -15933,8 +15941,8 @@ class _c {
|
|
|
15933
15941
|
* @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
|
|
15934
15942
|
*/
|
|
15935
15943
|
async duplicateBundle(t, e, a, n) {
|
|
15936
|
-
var
|
|
15937
|
-
const i = (
|
|
15944
|
+
var p, f, C, w, v, S, E, B;
|
|
15945
|
+
const i = (p = M.getMap("bundleOwnerIds")) == null ? void 0 : p.get(t), o = ((f = Object.entries(localStorage).find(([I, P]) => I.startsWith("CognitoIdentityServiceProvider") && I.endsWith("idToken"))) == null ? void 0 : f[0]) || "", l = localStorage.getItem(o), c = {};
|
|
15938
15946
|
l && !Be(l) && (c.Authorization = `Bearer ${l}`);
|
|
15939
15947
|
const d = {
|
|
15940
15948
|
bundleOwnerId: i,
|
|
@@ -16095,7 +16103,7 @@ class _c {
|
|
|
16095
16103
|
), c = Pa(o, 10), d = Pa(l, 10), A = (await Promise.all([
|
|
16096
16104
|
...c.map(n),
|
|
16097
16105
|
...d.map(i)
|
|
16098
|
-
])).flat(), u = [...new Set(A.map((S) => S.workflowId))], h = await er(u, e), m = new Map(h.map((S) => [S.id, S])), g = M.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(),
|
|
16106
|
+
])).flat(), u = [...new Set(A.map((S) => S.workflowId))], h = await er(u, e), m = new Map(h.map((S) => [S.id, S])), g = M.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), p = A.map(async (S) => {
|
|
16099
16107
|
var Z;
|
|
16100
16108
|
const { transaction: E, workflowId: B, readOnly: I, index: P } = S, F = m.get(B), k = t[P];
|
|
16101
16109
|
!g.get(E.id) && E.transactionOwnerId && g.set(E.id, E.transactionOwnerId);
|
|
@@ -16120,10 +16128,10 @@ class _c {
|
|
|
16120
16128
|
};
|
|
16121
16129
|
if (k.type === "transaction" && E.workflowState) {
|
|
16122
16130
|
const W = JSON.parse(E.workflowState);
|
|
16123
|
-
R.layouts = Object.values(W.layouts || {}).map((
|
|
16131
|
+
R.layouts = Object.values(W.layouts || {}).map((ft) => ft.layout), await La(W), R.reloadedState = W;
|
|
16124
16132
|
} else if (!I && k.workflowState) {
|
|
16125
16133
|
const W = JSON.parse(k.workflowState);
|
|
16126
|
-
R.layouts = Object.values(W.layouts || {}).map((
|
|
16134
|
+
R.layouts = Object.values(W.layouts || {}).map((ft) => ft.layout), await La(W), R.reloadedState = W;
|
|
16127
16135
|
} else
|
|
16128
16136
|
R.layouts = Il(
|
|
16129
16137
|
R.transaction,
|
|
@@ -16132,9 +16140,9 @@ class _c {
|
|
|
16132
16140
|
return R.renderableContextService = new Wo(
|
|
16133
16141
|
R.layouts
|
|
16134
16142
|
), R.delayWorkflowStateSync = !0, { experienceOptions: R, index: P, options: k };
|
|
16135
|
-
}),
|
|
16143
|
+
}), f = await Promise.all(p);
|
|
16136
16144
|
M.setMap("transactionOwnerIds", g);
|
|
16137
|
-
const w =
|
|
16145
|
+
const w = f.sort((S, E) => S.index - E.index).map(async (S) => {
|
|
16138
16146
|
const { experienceOptions: E, options: B } = S, I = new Mo(this, E);
|
|
16139
16147
|
return await I.getWorkflowManager().getInitializationPromise(), B.type !== "transaction" && this.customer && await I.attachCustomerDetails({ email: this.customer.emailAddress }), I;
|
|
16140
16148
|
}), v = await Promise.all(w);
|
|
@@ -16223,7 +16231,7 @@ const Dl = async (r, t) => (await b.getShadowGraphqlClient().query({
|
|
|
16223
16231
|
}
|
|
16224
16232
|
})).data.currentIntegration, Xc = async (r) => {
|
|
16225
16233
|
const e = await b.getShadowGraphqlClient().query({
|
|
16226
|
-
query:
|
|
16234
|
+
query: fi,
|
|
16227
16235
|
errorPolicy: "all",
|
|
16228
16236
|
fetchPolicy: "network-only",
|
|
16229
16237
|
variables: {
|
|
@@ -16350,7 +16358,7 @@ class Fl {
|
|
|
16350
16358
|
getImageSrc() {
|
|
16351
16359
|
if (this.imageData) {
|
|
16352
16360
|
if (this.imageData.svg) {
|
|
16353
|
-
const t =
|
|
16361
|
+
const t = pa(this.imageData.svg, this.imageData.colors || {}, !1);
|
|
16354
16362
|
return Aa(t);
|
|
16355
16363
|
}
|
|
16356
16364
|
return this.imageData.src;
|
|
@@ -17264,7 +17272,7 @@ const md = async (r) => {
|
|
|
17264
17272
|
ids: r
|
|
17265
17273
|
}
|
|
17266
17274
|
})).data) == null ? void 0 : e.addressValidationJobs;
|
|
17267
|
-
},
|
|
17275
|
+
}, pd = async (r) => {
|
|
17268
17276
|
var e, a;
|
|
17269
17277
|
return (e = r.getWorkflowManager().getTransaction().recipient) != null && e.id ? (a = (await b.getShadowGraphqlClient().mutate({
|
|
17270
17278
|
mutation: Hl,
|
|
@@ -17274,7 +17282,7 @@ const md = async (r) => {
|
|
|
17274
17282
|
id: r.getWorkflowManager().getTransaction().recipient.id
|
|
17275
17283
|
}
|
|
17276
17284
|
})).data) == null ? void 0 : a.recipientValidate : void 0;
|
|
17277
|
-
},
|
|
17285
|
+
}, fd = async (r) => {
|
|
17278
17286
|
const t = r.map((a) => {
|
|
17279
17287
|
var n;
|
|
17280
17288
|
return (n = a.getWorkflowManager().getTransaction().recipient) == null ? void 0 : n.id;
|
|
@@ -17304,7 +17312,7 @@ export {
|
|
|
17304
17312
|
Gc as BringForwardCommand,
|
|
17305
17313
|
zc as BringToBackCommand,
|
|
17306
17314
|
Vc as BringToFrontCommand,
|
|
17307
|
-
|
|
17315
|
+
fr as BundleDesignCreationCartAddMode,
|
|
17308
17316
|
O as CanvasCommand,
|
|
17309
17317
|
le as CollectionProduct,
|
|
17310
17318
|
qa as ColorOptionGlobalPropertyHandle,
|
|
@@ -17330,7 +17338,7 @@ export {
|
|
|
17330
17338
|
$ as GroupCommand,
|
|
17331
17339
|
co as IllustrationStepHandle,
|
|
17332
17340
|
Te as InformationMessageType,
|
|
17333
|
-
|
|
17341
|
+
fo as InformationStepHandle,
|
|
17334
17342
|
Ya as IntegrationProduct,
|
|
17335
17343
|
wr as IntegrationType,
|
|
17336
17344
|
Rc as LayoutElementFactory,
|
|
@@ -17344,9 +17352,9 @@ export {
|
|
|
17344
17352
|
wo as ModuleStepHandle,
|
|
17345
17353
|
Oc as MoveCommand,
|
|
17346
17354
|
tr as ObjectInput,
|
|
17347
|
-
|
|
17355
|
+
pl as ObjectInputType,
|
|
17348
17356
|
Xn as OptionGlobalPropertyHandle,
|
|
17349
|
-
|
|
17357
|
+
fe as OptionNotFoundError,
|
|
17350
17358
|
Pt as ParseError,
|
|
17351
17359
|
ho as PictureStepHandle,
|
|
17352
17360
|
yr as ProductCameraRig,
|
|
@@ -17365,15 +17373,15 @@ export {
|
|
|
17365
17373
|
go as ShapeStepHandle,
|
|
17366
17374
|
Cr as ShareActionType,
|
|
17367
17375
|
_c as SpiffCommerceClient,
|
|
17368
|
-
|
|
17369
|
-
|
|
17376
|
+
pe as StakeholderType,
|
|
17377
|
+
pr as StepAspectType,
|
|
17370
17378
|
rt as StepHandle,
|
|
17371
17379
|
D as StepType,
|
|
17372
17380
|
Mt as TextAlgorithm,
|
|
17373
17381
|
os as TextChangeCommand,
|
|
17374
17382
|
_o as TextGlobalPropertyHandle,
|
|
17375
17383
|
Yc as TextInput,
|
|
17376
|
-
|
|
17384
|
+
po as TextStepHandle,
|
|
17377
17385
|
ol as Transform,
|
|
17378
17386
|
sl as TransformCollection,
|
|
17379
17387
|
z as UnhandledBehaviorError,
|
|
@@ -17441,7 +17449,7 @@ export {
|
|
|
17441
17449
|
rl as metafieldManager,
|
|
17442
17450
|
Tc as mmPerPixel,
|
|
17443
17451
|
Gn as modelStepService,
|
|
17444
|
-
|
|
17452
|
+
pa as modifySVGColors,
|
|
17445
17453
|
Wn as moduleStepService,
|
|
17446
17454
|
nd as nameBundle,
|
|
17447
17455
|
rd as nameTransaction,
|
|
@@ -17453,7 +17461,7 @@ export {
|
|
|
17453
17461
|
yc as pmsToRgb,
|
|
17454
17462
|
Hn as questionStepService,
|
|
17455
17463
|
Cc as registerFetchImplementation,
|
|
17456
|
-
|
|
17464
|
+
fc as registerWindowImplementation,
|
|
17457
17465
|
La as rehydrateSerializedLayout,
|
|
17458
17466
|
Gr as rgbToPms,
|
|
17459
17467
|
se as rotateAroundPoint,
|
|
@@ -17469,8 +17477,8 @@ export {
|
|
|
17469
17477
|
Aa as svgToDataUrl,
|
|
17470
17478
|
H as textStepService,
|
|
17471
17479
|
ws as toast,
|
|
17472
|
-
|
|
17473
|
-
|
|
17480
|
+
pd as validateWorkflowExperienceRecipient,
|
|
17481
|
+
fd as validateWorkflowExperienceRecipients,
|
|
17474
17482
|
Bt as xmlSerializer
|
|
17475
17483
|
};
|
|
17476
17484
|
//# sourceMappingURL=index.mjs.map
|