@spiffcommerce/core 26.36.0-beta.80b69a2a-ce5c-5801-b81c-abd5789da0dc → 26.36.0-beta.9b9f56a8-75f7-506d-92ac-4ac8f37f9b93
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 +3 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +259 -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,7 +10032,6 @@ const Ts = y`
|
|
|
10032
10032
|
createdAt
|
|
10033
10033
|
transactionsCount
|
|
10034
10034
|
productsCount
|
|
10035
|
-
totalPriceSubunits
|
|
10036
10035
|
quoteId
|
|
10037
10036
|
orderId
|
|
10038
10037
|
productCollection {
|
|
@@ -10150,7 +10149,7 @@ class Ha extends Pn {
|
|
|
10150
10149
|
}
|
|
10151
10150
|
}
|
|
10152
10151
|
class lo {
|
|
10153
|
-
constructor(t, e, a, n, i, s, o, l, c, d, A, u, h, m = !1, g,
|
|
10152
|
+
constructor(t, e, a, n, i, s, o, l, c, d, A, u, h, m = !1, g, p = !1, f = !1, C = !1) {
|
|
10154
10153
|
this.workflowStatePromiseQueue = new Fn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
|
|
10155
10154
|
var S;
|
|
10156
10155
|
if (!this.previewService)
|
|
@@ -10159,7 +10158,7 @@ class lo {
|
|
|
10159
10158
|
if (v)
|
|
10160
10159
|
for (const [, E] of v)
|
|
10161
10160
|
E.render(w);
|
|
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 =
|
|
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 = 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) => {
|
|
10163
10162
|
this.stepTags[w.stepName] = w.tags ?? [];
|
|
10164
10163
|
}), C && (this.workflowStatePromiseQueue.enabled = !1), this.initializationPromise = this.initializeDefaultWorkflowState(a), this.initializationPromise.then(() => {
|
|
10165
10164
|
this.initialized = !0;
|
|
@@ -10205,7 +10204,7 @@ class lo {
|
|
|
10205
10204
|
}
|
|
10206
10205
|
});
|
|
10207
10206
|
else {
|
|
10208
|
-
const
|
|
10207
|
+
const p = await this.graphQlClient().mutate({
|
|
10209
10208
|
mutation: ro,
|
|
10210
10209
|
errorPolicy: "all",
|
|
10211
10210
|
fetchPolicy: "no-cache",
|
|
@@ -10223,7 +10222,7 @@ class lo {
|
|
|
10223
10222
|
}
|
|
10224
10223
|
});
|
|
10225
10224
|
this.transaction.recipient = {
|
|
10226
|
-
id: (h = (u =
|
|
10225
|
+
id: (h = (u = p == null ? void 0 : p.data) == null ? void 0 : u.recipientCreate) == null ? void 0 : h.id,
|
|
10227
10226
|
firstName: t,
|
|
10228
10227
|
lastName: e,
|
|
10229
10228
|
address: a,
|
|
@@ -10240,13 +10239,14 @@ class lo {
|
|
|
10240
10239
|
fetchPolicy: "no-cache",
|
|
10241
10240
|
variables: {
|
|
10242
10241
|
id: this.transaction.id,
|
|
10243
|
-
recipientId: (g = (m =
|
|
10242
|
+
recipientId: (g = (m = p.data) == null ? void 0 : m.recipientCreate) == null ? void 0 : g.id
|
|
10244
10243
|
},
|
|
10245
10244
|
context: {
|
|
10246
10245
|
transactionOwnerId: this.transaction.transactionOwnerId
|
|
10247
10246
|
}
|
|
10248
10247
|
});
|
|
10249
10248
|
}
|
|
10249
|
+
this.recipientCallbacks.forEach((p) => p(this.transaction.recipient));
|
|
10250
10250
|
}
|
|
10251
10251
|
async initializeDefaultWorkflowState(t) {
|
|
10252
10252
|
const e = () => {
|
|
@@ -10327,6 +10327,9 @@ class lo {
|
|
|
10327
10327
|
addValidationCallback(t) {
|
|
10328
10328
|
this.validationCallbacks.push(t), t(this.validationErrors);
|
|
10329
10329
|
}
|
|
10330
|
+
addRecipientCallback(t) {
|
|
10331
|
+
this.recipientCallbacks.push(t), t(this.transaction.recipient);
|
|
10332
|
+
}
|
|
10330
10333
|
getLayouts() {
|
|
10331
10334
|
return this.layouts;
|
|
10332
10335
|
}
|
|
@@ -10735,7 +10738,7 @@ class lo {
|
|
|
10735
10738
|
const E = (S = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : S.frameService;
|
|
10736
10739
|
E == null || E.setTargetElements(a.map((B) => B.id));
|
|
10737
10740
|
}
|
|
10738
|
-
const
|
|
10741
|
+
const p = u.map((E) => new Et(E.id)), f = new Va(this.constructSerializableWorkflow()), C = [...m, ...p, f];
|
|
10739
10742
|
C.length > 0 && this.commandContext.apply(new $(C), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
|
|
10740
10743
|
const w = this.getInvalidModelVariants(), v = this.modelContainer;
|
|
10741
10744
|
if (v) {
|
|
@@ -11276,7 +11279,7 @@ class go extends rt {
|
|
|
11276
11279
|
return t;
|
|
11277
11280
|
}
|
|
11278
11281
|
}
|
|
11279
|
-
class
|
|
11282
|
+
class po extends rt {
|
|
11280
11283
|
constructor(t, e, a) {
|
|
11281
11284
|
super(t, e, a);
|
|
11282
11285
|
}
|
|
@@ -11477,7 +11480,7 @@ class fo extends rt {
|
|
|
11477
11480
|
await H.changeStrokeColor(this.step, t, e, this.manager);
|
|
11478
11481
|
}
|
|
11479
11482
|
}
|
|
11480
|
-
class
|
|
11483
|
+
class fo extends rt {
|
|
11481
11484
|
constructor(t, e, a) {
|
|
11482
11485
|
super(t, e, a);
|
|
11483
11486
|
}
|
|
@@ -11571,11 +11574,11 @@ class oe {
|
|
|
11571
11574
|
case D.DigitalContent:
|
|
11572
11575
|
return new Co(t, e, t.getStepTags(e.stepName));
|
|
11573
11576
|
case D.Information:
|
|
11574
|
-
return new
|
|
11577
|
+
return new fo(t, e, t.getStepTags(e.stepName));
|
|
11575
11578
|
case D.Question:
|
|
11576
11579
|
return new mo(t, e, t.getStepTags(e.stepName));
|
|
11577
11580
|
case D.Text:
|
|
11578
|
-
return new
|
|
11581
|
+
return new po(t, e, t.getStepTags(e.stepName));
|
|
11579
11582
|
case D.Illustration:
|
|
11580
11583
|
return new co(t, e, t.getStepTags(e.stepName));
|
|
11581
11584
|
case D.Picture:
|
|
@@ -11815,7 +11818,7 @@ const vo = async (r) => {
|
|
|
11815
11818
|
Q.errors && console.log("Server Error:", Z.message);
|
|
11816
11819
|
}), null) : it ?? null;
|
|
11817
11820
|
})() || (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"));
|
|
11818
|
-
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),
|
|
11821
|
+
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) => {
|
|
11819
11822
|
const F = {};
|
|
11820
11823
|
let k = 0;
|
|
11821
11824
|
if (Object.keys(i).length > 0)
|
|
@@ -11824,12 +11827,12 @@ const vo = async (r) => {
|
|
|
11824
11827
|
for (let Z = 0; Z < it.selections.length; ++Z) {
|
|
11825
11828
|
const W = it.selections[Z];
|
|
11826
11829
|
if (R && (!P || R.option && (R.option.variants || []).length > 1 && !R.data.hideSelectionInCart && !R.data.hideSelectionsInCart)) {
|
|
11827
|
-
const
|
|
11828
|
-
F[
|
|
11830
|
+
const ft = R.stepTitle;
|
|
11831
|
+
F[ft] ? F[ft].push({
|
|
11829
11832
|
id: W.id || "",
|
|
11830
11833
|
name: W.name,
|
|
11831
11834
|
priceModifier: W.priceModifier
|
|
11832
|
-
}) : F[
|
|
11835
|
+
}) : F[ft] = [
|
|
11833
11836
|
{
|
|
11834
11837
|
id: W.id || "",
|
|
11835
11838
|
name: W.name,
|
|
@@ -11841,9 +11844,9 @@ const vo = async (r) => {
|
|
|
11841
11844
|
}
|
|
11842
11845
|
}
|
|
11843
11846
|
return [F, k];
|
|
11844
|
-
}, [C] = await
|
|
11847
|
+
}, [C] = await f(!0), w = Object.fromEntries(
|
|
11845
11848
|
Object.keys(C).map((P) => [P, C[P].map((F) => F.id)])
|
|
11846
|
-
), [v] = await
|
|
11849
|
+
), [v] = await f(!1), S = Object.fromEntries(
|
|
11847
11850
|
Object.keys(v).map((P) => [
|
|
11848
11851
|
P,
|
|
11849
11852
|
v[P].map((F) => F.id)
|
|
@@ -11872,9 +11875,9 @@ const vo = async (r) => {
|
|
|
11872
11875
|
useThreeDimPreview: !!m,
|
|
11873
11876
|
previewImage: E
|
|
11874
11877
|
};
|
|
11875
|
-
if (
|
|
11878
|
+
if (p) {
|
|
11876
11879
|
const F = [];
|
|
11877
|
-
for (const [k, Q] of Object.entries(
|
|
11880
|
+
for (const [k, Q] of Object.entries(p))
|
|
11878
11881
|
F.push({ key: k, value: Q });
|
|
11879
11882
|
P.metadata = F;
|
|
11880
11883
|
}
|
|
@@ -11890,7 +11893,7 @@ const vo = async (r) => {
|
|
|
11890
11893
|
cartMetadata: g
|
|
11891
11894
|
};
|
|
11892
11895
|
}, bo = async (r, t, e, a, n, i, s, o, l, c, d) => {
|
|
11893
|
-
var
|
|
11896
|
+
var f, C;
|
|
11894
11897
|
l("workflow.steps.finish.finalize.buildingLayouts");
|
|
11895
11898
|
const { designDetails: A, cartSelectionsWithPrices: u, cartMetadata: h } = await _n(
|
|
11896
11899
|
r,
|
|
@@ -11904,13 +11907,13 @@ const vo = async (r) => {
|
|
|
11904
11907
|
d
|
|
11905
11908
|
);
|
|
11906
11909
|
l("workflow.steps.finish.finalize.creatingDesign");
|
|
11907
|
-
const m = await vo(A), g = (
|
|
11910
|
+
const m = await vo(A), g = (f = m == null ? void 0 : m.transaction) == null ? void 0 : f.previewImageLink;
|
|
11908
11911
|
if (!(m != null && m.transaction))
|
|
11909
11912
|
throw new Error("Failed to create design");
|
|
11910
11913
|
l("workflow.steps.finish.finalize.updatingTransaction");
|
|
11911
|
-
const
|
|
11914
|
+
const p = m.transaction;
|
|
11912
11915
|
return Kn(
|
|
11913
|
-
|
|
11916
|
+
p,
|
|
11914
11917
|
n,
|
|
11915
11918
|
t,
|
|
11916
11919
|
u,
|
|
@@ -12222,8 +12225,8 @@ class Mo {
|
|
|
12222
12225
|
DOMParser: ha(),
|
|
12223
12226
|
fetch
|
|
12224
12227
|
})).render();
|
|
12225
|
-
const
|
|
12226
|
-
return s.toDataURL(
|
|
12228
|
+
const f = await this.getCanvasObjectURLAsync(s);
|
|
12229
|
+
return s.toDataURL(f);
|
|
12227
12230
|
}
|
|
12228
12231
|
getStepById(t) {
|
|
12229
12232
|
const e = this.getWorkflowManager().getWorkflow().steps.find((i) => i.stepName === t);
|
|
@@ -12319,15 +12322,15 @@ class Mo {
|
|
|
12319
12322
|
A !== void 0 && (A.forEach((u) => d.add(JSON.stringify(u))), o.forEach((u) => {
|
|
12320
12323
|
const h = u.getRaw().globalPropertyAspectConfigurations;
|
|
12321
12324
|
h !== void 0 && h.forEach((m) => {
|
|
12322
|
-
const g = l(m),
|
|
12323
|
-
if (
|
|
12324
|
-
const
|
|
12325
|
-
if (!
|
|
12325
|
+
const g = l(m), p = d.has(JSON.stringify(m));
|
|
12326
|
+
if (p && (g == null ? void 0 : g.getType()) === "Option") {
|
|
12327
|
+
const f = u.getCurrentVariant();
|
|
12328
|
+
if (!f)
|
|
12326
12329
|
return;
|
|
12327
|
-
c.selectVariant(
|
|
12328
|
-
} else if (
|
|
12329
|
-
const
|
|
12330
|
-
c.setText(
|
|
12330
|
+
c.selectVariant(f), d.delete(JSON.stringify(m));
|
|
12331
|
+
} else if (p && (g == null ? void 0 : g.getType()) === "Text") {
|
|
12332
|
+
const f = u.getText();
|
|
12333
|
+
c.setText(f), d.delete(JSON.stringify(m));
|
|
12331
12334
|
}
|
|
12332
12335
|
});
|
|
12333
12336
|
}));
|
|
@@ -12485,7 +12488,7 @@ class Mo {
|
|
|
12485
12488
|
), this.checkForPriceBreakChanges();
|
|
12486
12489
|
const e = this.getWorkflowManager().getTransaction();
|
|
12487
12490
|
await this.graphQlClient().mutate({
|
|
12488
|
-
mutation:
|
|
12491
|
+
mutation: pi,
|
|
12489
12492
|
variables: {
|
|
12490
12493
|
id: e.id,
|
|
12491
12494
|
quantity: t
|
|
@@ -12523,7 +12526,7 @@ const To = [
|
|
|
12523
12526
|
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);
|
|
12524
12527
|
o.searchParams.append("video", Ma(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
|
|
12525
12528
|
const l = o.toString(), d = `data:image/svg+xml;base64,${Ma(await rn(l, { type: "svg" }))}`, A = (h) => {
|
|
12526
|
-
const m = r.find((
|
|
12529
|
+
const m = r.find((p) => p.panelId === h.panelId);
|
|
12527
12530
|
if (!m)
|
|
12528
12531
|
throw new q(h);
|
|
12529
12532
|
const g = N();
|
|
@@ -12553,7 +12556,7 @@ const To = [
|
|
|
12553
12556
|
o && (t[a.stepName] = { selectedVariants: [o] });
|
|
12554
12557
|
const l = async (c) => {
|
|
12555
12558
|
var g;
|
|
12556
|
-
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((
|
|
12559
|
+
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);
|
|
12557
12560
|
if (!h)
|
|
12558
12561
|
throw new q(c);
|
|
12559
12562
|
const m = Sa(
|
|
@@ -12636,7 +12639,7 @@ const To = [
|
|
|
12636
12639
|
B.classList.add(Q), g[Q] = { browserValue: F };
|
|
12637
12640
|
}
|
|
12638
12641
|
});
|
|
12639
|
-
const
|
|
12642
|
+
const f = Bt().serializeToString(m), C = n.colors;
|
|
12640
12643
|
if (C) {
|
|
12641
12644
|
for (const [B, I] of Object.entries(g))
|
|
12642
12645
|
for (const P of Object.keys(C))
|
|
@@ -12654,7 +12657,7 @@ const To = [
|
|
|
12654
12657
|
{
|
|
12655
12658
|
colors: g,
|
|
12656
12659
|
id: P,
|
|
12657
|
-
svg:
|
|
12660
|
+
svg: f,
|
|
12658
12661
|
type: T.Illustration,
|
|
12659
12662
|
y: B.top,
|
|
12660
12663
|
x: B.left,
|
|
@@ -12755,7 +12758,7 @@ const To = [
|
|
|
12755
12758
|
return console.error(`No variant with ID: ${n.colorVariantId}`), [];
|
|
12756
12759
|
t[a.stepName] = { selectedVariants: [s] };
|
|
12757
12760
|
const o = (d) => {
|
|
12758
|
-
const A = r.find((
|
|
12761
|
+
const A = r.find((p) => p.panelId === d.panelId);
|
|
12759
12762
|
if (!A)
|
|
12760
12763
|
throw new q(d);
|
|
12761
12764
|
const u = `
|
|
@@ -12837,10 +12840,10 @@ const To = [
|
|
|
12837
12840
|
}
|
|
12838
12841
|
else {
|
|
12839
12842
|
const c = await at(i, !0), d = (A) => {
|
|
12840
|
-
const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = (h == null ? void 0 : h.length) > 0 ? h[0] : "",
|
|
12841
|
-
if (!
|
|
12843
|
+
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;
|
|
12844
|
+
if (!f)
|
|
12842
12845
|
throw new Pt("Failed to read SVG.");
|
|
12843
|
-
return ma(
|
|
12846
|
+
return ma(f), Bt().serializeToString(f);
|
|
12844
12847
|
};
|
|
12845
12848
|
l.forEach((A) => {
|
|
12846
12849
|
const u = r.find((m) => m.panelId === A.panelId);
|
|
@@ -12870,40 +12873,40 @@ const To = [
|
|
|
12870
12873
|
}
|
|
12871
12874
|
return a;
|
|
12872
12875
|
}, Vo = async (r, t, e, a) => {
|
|
12873
|
-
const n = [], i = e.data, s = 30, o = (
|
|
12876
|
+
const n = [], i = e.data, s = 30, o = (p) => p.vertical ? "center" : p.textAlign || "center", l = () => {
|
|
12874
12877
|
var w;
|
|
12875
|
-
const
|
|
12876
|
-
if (!
|
|
12878
|
+
const p = a.option;
|
|
12879
|
+
if (!p)
|
|
12877
12880
|
return;
|
|
12878
|
-
const
|
|
12879
|
-
if (!
|
|
12881
|
+
const f = ((w = p.variants) == null ? void 0 : w.find((v) => v.id === i.fontVariantId)) || te(p);
|
|
12882
|
+
if (!f || !f.asset)
|
|
12880
12883
|
return;
|
|
12881
|
-
t[a.stepName] = { selectedVariants: [
|
|
12882
|
-
const C =
|
|
12884
|
+
t[a.stepName] = { selectedVariants: [f] };
|
|
12885
|
+
const C = f.asset.fileLink;
|
|
12883
12886
|
if (C)
|
|
12884
12887
|
return C;
|
|
12885
12888
|
}, d = await (async () => {
|
|
12886
|
-
const
|
|
12887
|
-
if (!
|
|
12889
|
+
const p = l();
|
|
12890
|
+
if (!p)
|
|
12888
12891
|
return;
|
|
12889
|
-
const
|
|
12892
|
+
const f = await Qt(p);
|
|
12890
12893
|
return {
|
|
12891
|
-
assetUrl:
|
|
12892
|
-
name:
|
|
12894
|
+
assetUrl: p,
|
|
12895
|
+
name: f.names.fullName.en
|
|
12893
12896
|
};
|
|
12894
12897
|
})(), A = (a.data.replaceableText ? a.data.replaceableText.replace("{{}}", i.text) : i.text) || "", u = ye(A, {
|
|
12895
12898
|
vertical: a.data.vertical,
|
|
12896
12899
|
uppercase: a.data.uppercase
|
|
12897
|
-
}), h = async (
|
|
12898
|
-
const
|
|
12899
|
-
if (!
|
|
12900
|
+
}), h = async (p) => {
|
|
12901
|
+
const f = p.colorOption;
|
|
12902
|
+
if (!f)
|
|
12900
12903
|
return;
|
|
12901
|
-
const C = _.getDefaultVariant(
|
|
12904
|
+
const C = _.getDefaultVariant(f);
|
|
12902
12905
|
return C == null ? void 0 : C.color;
|
|
12903
12906
|
}, m = i.color || await h(a.data), g = a.data.regions;
|
|
12904
|
-
for (const
|
|
12905
|
-
const
|
|
12906
|
-
if (!
|
|
12907
|
+
for (const p of g) {
|
|
12908
|
+
const f = r.find((w) => w.panelId === p.panelId);
|
|
12909
|
+
if (!f)
|
|
12907
12910
|
continue;
|
|
12908
12911
|
const C = {
|
|
12909
12912
|
stepName: e.name,
|
|
@@ -12913,24 +12916,24 @@ const To = [
|
|
|
12913
12916
|
fill: i.color || m || "#000000",
|
|
12914
12917
|
fontData: d,
|
|
12915
12918
|
fontSize: a.data.size || s,
|
|
12916
|
-
height:
|
|
12917
|
-
layer:
|
|
12918
|
-
layerIndex:
|
|
12919
|
+
height: p.height,
|
|
12920
|
+
layer: p.layer,
|
|
12921
|
+
layerIndex: p.layerIndex,
|
|
12919
12922
|
paths: a.data.paths,
|
|
12920
|
-
rotation:
|
|
12923
|
+
rotation: p.rotation,
|
|
12921
12924
|
text: u,
|
|
12922
12925
|
type: T.Textbox,
|
|
12923
12926
|
vertical: a.data.vertical,
|
|
12924
12927
|
verticalAlign: a.data.verticalAlign || "middle",
|
|
12925
|
-
width:
|
|
12926
|
-
x:
|
|
12927
|
-
y:
|
|
12928
|
+
width: p.width,
|
|
12929
|
+
x: p.left,
|
|
12930
|
+
y: p.top
|
|
12928
12931
|
};
|
|
12929
12932
|
if (d) {
|
|
12930
12933
|
const [w, v] = he(
|
|
12931
12934
|
a.data.size || s,
|
|
12932
12935
|
d,
|
|
12933
|
-
|
|
12936
|
+
p,
|
|
12934
12937
|
[
|
|
12935
12938
|
ye(u, {
|
|
12936
12939
|
vertical: a.data.vertical,
|
|
@@ -12951,11 +12954,11 @@ const To = [
|
|
|
12951
12954
|
text: C.curved ? C.text : (v || []).join(`
|
|
12952
12955
|
`)
|
|
12953
12956
|
},
|
|
12954
|
-
|
|
12957
|
+
f
|
|
12955
12958
|
)
|
|
12956
12959
|
);
|
|
12957
12960
|
} else
|
|
12958
|
-
n.push(new G(C,
|
|
12961
|
+
n.push(new G(C, f));
|
|
12959
12962
|
}
|
|
12960
12963
|
return n;
|
|
12961
12964
|
}, zo = (r, t) => r.conditions ? r.conditions.every((e) => {
|
|
@@ -13413,7 +13416,7 @@ class Ko extends Ba {
|
|
|
13413
13416
|
}
|
|
13414
13417
|
async getImageWithColors() {
|
|
13415
13418
|
var t, e;
|
|
13416
|
-
return await this.loadImageData(), (t = this.imageData) != null && t.svg ? Aa(
|
|
13419
|
+
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;
|
|
13417
13420
|
}
|
|
13418
13421
|
/**
|
|
13419
13422
|
* Retrieves the original, unmodified image selection, if one exists.
|
|
@@ -14524,11 +14527,11 @@ class He {
|
|
|
14524
14527
|
return;
|
|
14525
14528
|
}
|
|
14526
14529
|
console.log("Setting default global variants."), this.globalPropertyHandleService.getHandles().then((m) => {
|
|
14527
|
-
const g = m.map((
|
|
14528
|
-
if (
|
|
14529
|
-
const
|
|
14530
|
+
const g = m.map((p) => {
|
|
14531
|
+
if (p.getType() === et.ColorOption || p.getType() === et.Option) {
|
|
14532
|
+
const f = p;
|
|
14530
14533
|
if (this.globalPropertyStateManager.getGlobalPropertyState())
|
|
14531
|
-
return
|
|
14534
|
+
return f.initDefaultVariant();
|
|
14532
14535
|
console.log("Attempted to set global default variant before state was initialized.");
|
|
14533
14536
|
}
|
|
14534
14537
|
});
|
|
@@ -14665,11 +14668,11 @@ class He {
|
|
|
14665
14668
|
this.getWorkflowExperiences(),
|
|
14666
14669
|
this.globalConfigurationPropertyId || "",
|
|
14667
14670
|
l
|
|
14668
|
-
), m = [...new Set(A.map((
|
|
14671
|
+
), m = [...new Set(A.map((p) => p.number))];
|
|
14669
14672
|
if (m.length > h)
|
|
14670
|
-
for (const
|
|
14671
|
-
const
|
|
14672
|
-
C && await
|
|
14673
|
+
for (const p of m) {
|
|
14674
|
+
const f = this.getGlobalPropertyStateManager(), C = u.find((w) => w.channelNumber === p);
|
|
14675
|
+
C && await f.setAspect(l, C.variant.id || "", void 0, C.channelNumber);
|
|
14673
14676
|
}
|
|
14674
14677
|
}
|
|
14675
14678
|
}
|
|
@@ -14867,7 +14870,7 @@ class He {
|
|
|
14867
14870
|
variables: {
|
|
14868
14871
|
id: this.id,
|
|
14869
14872
|
details: t,
|
|
14870
|
-
type: e ||
|
|
14873
|
+
type: e || pe.Owner
|
|
14871
14874
|
},
|
|
14872
14875
|
context: {
|
|
14873
14876
|
bundleOwnerId: this.ownerId
|
|
@@ -15328,7 +15331,7 @@ class ba {
|
|
|
15328
15331
|
return t.startsWith("[") ? JSON.stringify(JSON.parse(t)) : t;
|
|
15329
15332
|
}
|
|
15330
15333
|
}
|
|
15331
|
-
var
|
|
15334
|
+
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 || {});
|
|
15332
15335
|
class Yc extends ba {
|
|
15333
15336
|
constructor(t) {
|
|
15334
15337
|
super(`"${t}"`);
|
|
@@ -15402,7 +15405,7 @@ const Ja = y`
|
|
|
15402
15405
|
}
|
|
15403
15406
|
}
|
|
15404
15407
|
}
|
|
15405
|
-
`,
|
|
15408
|
+
`, fl = y`
|
|
15406
15409
|
mutation CustomerCreate($details: CustomerDetailsInput!) {
|
|
15407
15410
|
customerCreate(details: $details) {
|
|
15408
15411
|
id
|
|
@@ -15638,7 +15641,7 @@ class _c {
|
|
|
15638
15641
|
var n, i;
|
|
15639
15642
|
const e = M.getMap("bundleOwnerIds");
|
|
15640
15643
|
if (e != null && e.has(t))
|
|
15641
|
-
return Promise.resolve({ success: !0, stakeholderType:
|
|
15644
|
+
return Promise.resolve({ success: !0, stakeholderType: pe.Owner });
|
|
15642
15645
|
const a = M.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
15643
15646
|
if (a.has(t)) {
|
|
15644
15647
|
const s = a.get(t), l = (M.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map()).get(s);
|
|
@@ -15687,11 +15690,11 @@ class _c {
|
|
|
15687
15690
|
return Promise.resolve({ success: !1, transactionReadOnly: !0 });
|
|
15688
15691
|
const s = M.getMap("transactionOwnerIds");
|
|
15689
15692
|
if (s != null && s.has(t))
|
|
15690
|
-
return Promise.resolve({ success: !0, stakeholderType:
|
|
15693
|
+
return Promise.resolve({ success: !0, stakeholderType: pe.Owner });
|
|
15691
15694
|
const o = M.getMap("transactionCustomerIds");
|
|
15692
15695
|
if (o != null && o.has(t)) {
|
|
15693
|
-
const
|
|
15694
|
-
if (
|
|
15696
|
+
const p = o.get(t);
|
|
15697
|
+
if (p && await this.authenticateCustomerId(p)) {
|
|
15695
15698
|
const C = ((h = (u = this.customer) == null ? void 0 : u.bundleStakeholders) == null ? void 0 : h.find(
|
|
15696
15699
|
(w) => {
|
|
15697
15700
|
var v, S;
|
|
@@ -15767,7 +15770,7 @@ class _c {
|
|
|
15767
15770
|
})).data.customer;
|
|
15768
15771
|
if (!n.id) {
|
|
15769
15772
|
const l = (s = (await e.mutate({
|
|
15770
|
-
mutation:
|
|
15773
|
+
mutation: fl,
|
|
15771
15774
|
errorPolicy: "all",
|
|
15772
15775
|
fetchPolicy: "no-cache",
|
|
15773
15776
|
variables: {
|
|
@@ -15898,13 +15901,13 @@ class _c {
|
|
|
15898
15901
|
* @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
|
|
15899
15902
|
*/
|
|
15900
15903
|
async getExistingBundle(t, e, a, n) {
|
|
15901
|
-
var
|
|
15902
|
-
const i = M.getMap("bundleOwnerIds"), s = i == null ? void 0 : i.get(t), l = ((
|
|
15904
|
+
var p, f, C, w, v, S, E, B, I, P, F;
|
|
15905
|
+
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 = {};
|
|
15903
15906
|
c && !Be(c) && (d.Authorization = `Bearer ${c}`);
|
|
15904
15907
|
const A = {
|
|
15905
15908
|
bundleOwnerId: s,
|
|
15906
15909
|
...d,
|
|
15907
|
-
...(
|
|
15910
|
+
...(f = n == null ? void 0 : n.graphql) == null ? void 0 : f.additionalHeaders
|
|
15908
15911
|
}, u = await b.getShadowGraphqlClient().query({
|
|
15909
15912
|
query: Qs(((w = (C = n == null ? void 0 : n.graphql) == null ? void 0 : C.productCollection) == null ? void 0 : w.eagerFetchProducts) || !1),
|
|
15910
15913
|
variables: {
|
|
@@ -15934,8 +15937,8 @@ class _c {
|
|
|
15934
15937
|
* @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
|
|
15935
15938
|
*/
|
|
15936
15939
|
async duplicateBundle(t, e, a, n) {
|
|
15937
|
-
var
|
|
15938
|
-
const i = (
|
|
15940
|
+
var p, f, C, w, v, S, E, B;
|
|
15941
|
+
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 = {};
|
|
15939
15942
|
l && !Be(l) && (c.Authorization = `Bearer ${l}`);
|
|
15940
15943
|
const d = {
|
|
15941
15944
|
bundleOwnerId: i,
|
|
@@ -16096,7 +16099,7 @@ class _c {
|
|
|
16096
16099
|
), c = Pa(o, 10), d = Pa(l, 10), A = (await Promise.all([
|
|
16097
16100
|
...c.map(n),
|
|
16098
16101
|
...d.map(i)
|
|
16099
|
-
])).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(),
|
|
16102
|
+
])).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) => {
|
|
16100
16103
|
var Z;
|
|
16101
16104
|
const { transaction: E, workflowId: B, readOnly: I, index: P } = S, F = m.get(B), k = t[P];
|
|
16102
16105
|
!g.get(E.id) && E.transactionOwnerId && g.set(E.id, E.transactionOwnerId);
|
|
@@ -16121,10 +16124,10 @@ class _c {
|
|
|
16121
16124
|
};
|
|
16122
16125
|
if (k.type === "transaction" && E.workflowState) {
|
|
16123
16126
|
const W = JSON.parse(E.workflowState);
|
|
16124
|
-
R.layouts = Object.values(W.layouts || {}).map((
|
|
16127
|
+
R.layouts = Object.values(W.layouts || {}).map((ft) => ft.layout), await La(W), R.reloadedState = W;
|
|
16125
16128
|
} else if (!I && k.workflowState) {
|
|
16126
16129
|
const W = JSON.parse(k.workflowState);
|
|
16127
|
-
R.layouts = Object.values(W.layouts || {}).map((
|
|
16130
|
+
R.layouts = Object.values(W.layouts || {}).map((ft) => ft.layout), await La(W), R.reloadedState = W;
|
|
16128
16131
|
} else
|
|
16129
16132
|
R.layouts = Il(
|
|
16130
16133
|
R.transaction,
|
|
@@ -16133,9 +16136,9 @@ class _c {
|
|
|
16133
16136
|
return R.renderableContextService = new Wo(
|
|
16134
16137
|
R.layouts
|
|
16135
16138
|
), R.delayWorkflowStateSync = !0, { experienceOptions: R, index: P, options: k };
|
|
16136
|
-
}),
|
|
16139
|
+
}), f = await Promise.all(p);
|
|
16137
16140
|
M.setMap("transactionOwnerIds", g);
|
|
16138
|
-
const w =
|
|
16141
|
+
const w = f.sort((S, E) => S.index - E.index).map(async (S) => {
|
|
16139
16142
|
const { experienceOptions: E, options: B } = S, I = new Mo(this, E);
|
|
16140
16143
|
return await I.getWorkflowManager().getInitializationPromise(), B.type !== "transaction" && this.customer && await I.attachCustomerDetails({ email: this.customer.emailAddress }), I;
|
|
16141
16144
|
}), v = await Promise.all(w);
|
|
@@ -16224,7 +16227,7 @@ const Dl = async (r, t) => (await b.getShadowGraphqlClient().query({
|
|
|
16224
16227
|
}
|
|
16225
16228
|
})).data.currentIntegration, Xc = async (r) => {
|
|
16226
16229
|
const e = await b.getShadowGraphqlClient().query({
|
|
16227
|
-
query:
|
|
16230
|
+
query: fi,
|
|
16228
16231
|
errorPolicy: "all",
|
|
16229
16232
|
fetchPolicy: "network-only",
|
|
16230
16233
|
variables: {
|
|
@@ -16351,7 +16354,7 @@ class Fl {
|
|
|
16351
16354
|
getImageSrc() {
|
|
16352
16355
|
if (this.imageData) {
|
|
16353
16356
|
if (this.imageData.svg) {
|
|
16354
|
-
const t =
|
|
16357
|
+
const t = pa(this.imageData.svg, this.imageData.colors || {}, !1);
|
|
16355
16358
|
return Aa(t);
|
|
16356
16359
|
}
|
|
16357
16360
|
return this.imageData.src;
|
|
@@ -17265,7 +17268,7 @@ const md = async (r) => {
|
|
|
17265
17268
|
ids: r
|
|
17266
17269
|
}
|
|
17267
17270
|
})).data) == null ? void 0 : e.addressValidationJobs;
|
|
17268
|
-
},
|
|
17271
|
+
}, pd = async (r) => {
|
|
17269
17272
|
var e, a;
|
|
17270
17273
|
return (e = r.getWorkflowManager().getTransaction().recipient) != null && e.id ? (a = (await b.getShadowGraphqlClient().mutate({
|
|
17271
17274
|
mutation: Hl,
|
|
@@ -17275,7 +17278,7 @@ const md = async (r) => {
|
|
|
17275
17278
|
id: r.getWorkflowManager().getTransaction().recipient.id
|
|
17276
17279
|
}
|
|
17277
17280
|
})).data) == null ? void 0 : a.recipientValidate : void 0;
|
|
17278
|
-
},
|
|
17281
|
+
}, fd = async (r) => {
|
|
17279
17282
|
const t = r.map((a) => {
|
|
17280
17283
|
var n;
|
|
17281
17284
|
return (n = a.getWorkflowManager().getTransaction().recipient) == null ? void 0 : n.id;
|
|
@@ -17305,7 +17308,7 @@ export {
|
|
|
17305
17308
|
Gc as BringForwardCommand,
|
|
17306
17309
|
zc as BringToBackCommand,
|
|
17307
17310
|
Vc as BringToFrontCommand,
|
|
17308
|
-
|
|
17311
|
+
fr as BundleDesignCreationCartAddMode,
|
|
17309
17312
|
O as CanvasCommand,
|
|
17310
17313
|
le as CollectionProduct,
|
|
17311
17314
|
qa as ColorOptionGlobalPropertyHandle,
|
|
@@ -17331,7 +17334,7 @@ export {
|
|
|
17331
17334
|
$ as GroupCommand,
|
|
17332
17335
|
co as IllustrationStepHandle,
|
|
17333
17336
|
Te as InformationMessageType,
|
|
17334
|
-
|
|
17337
|
+
fo as InformationStepHandle,
|
|
17335
17338
|
Ya as IntegrationProduct,
|
|
17336
17339
|
wr as IntegrationType,
|
|
17337
17340
|
Rc as LayoutElementFactory,
|
|
@@ -17345,9 +17348,9 @@ export {
|
|
|
17345
17348
|
wo as ModuleStepHandle,
|
|
17346
17349
|
Oc as MoveCommand,
|
|
17347
17350
|
tr as ObjectInput,
|
|
17348
|
-
|
|
17351
|
+
pl as ObjectInputType,
|
|
17349
17352
|
Xn as OptionGlobalPropertyHandle,
|
|
17350
|
-
|
|
17353
|
+
fe as OptionNotFoundError,
|
|
17351
17354
|
Pt as ParseError,
|
|
17352
17355
|
ho as PictureStepHandle,
|
|
17353
17356
|
yr as ProductCameraRig,
|
|
@@ -17366,15 +17369,15 @@ export {
|
|
|
17366
17369
|
go as ShapeStepHandle,
|
|
17367
17370
|
Cr as ShareActionType,
|
|
17368
17371
|
_c as SpiffCommerceClient,
|
|
17369
|
-
|
|
17370
|
-
|
|
17372
|
+
pe as StakeholderType,
|
|
17373
|
+
pr as StepAspectType,
|
|
17371
17374
|
rt as StepHandle,
|
|
17372
17375
|
D as StepType,
|
|
17373
17376
|
Mt as TextAlgorithm,
|
|
17374
17377
|
os as TextChangeCommand,
|
|
17375
17378
|
_o as TextGlobalPropertyHandle,
|
|
17376
17379
|
Yc as TextInput,
|
|
17377
|
-
|
|
17380
|
+
po as TextStepHandle,
|
|
17378
17381
|
ol as Transform,
|
|
17379
17382
|
sl as TransformCollection,
|
|
17380
17383
|
z as UnhandledBehaviorError,
|
|
@@ -17442,7 +17445,7 @@ export {
|
|
|
17442
17445
|
rl as metafieldManager,
|
|
17443
17446
|
Tc as mmPerPixel,
|
|
17444
17447
|
Gn as modelStepService,
|
|
17445
|
-
|
|
17448
|
+
pa as modifySVGColors,
|
|
17446
17449
|
Wn as moduleStepService,
|
|
17447
17450
|
nd as nameBundle,
|
|
17448
17451
|
rd as nameTransaction,
|
|
@@ -17454,7 +17457,7 @@ export {
|
|
|
17454
17457
|
yc as pmsToRgb,
|
|
17455
17458
|
Hn as questionStepService,
|
|
17456
17459
|
Cc as registerFetchImplementation,
|
|
17457
|
-
|
|
17460
|
+
fc as registerWindowImplementation,
|
|
17458
17461
|
La as rehydrateSerializedLayout,
|
|
17459
17462
|
Gr as rgbToPms,
|
|
17460
17463
|
se as rotateAroundPoint,
|
|
@@ -17470,8 +17473,8 @@ export {
|
|
|
17470
17473
|
Aa as svgToDataUrl,
|
|
17471
17474
|
H as textStepService,
|
|
17472
17475
|
ws as toast,
|
|
17473
|
-
|
|
17474
|
-
|
|
17476
|
+
pd as validateWorkflowExperienceRecipient,
|
|
17477
|
+
fd as validateWorkflowExperienceRecipients,
|
|
17475
17478
|
Bt as xmlSerializer
|
|
17476
17479
|
};
|
|
17477
17480
|
//# sourceMappingURL=index.mjs.map
|