@spiffcommerce/core 32.4.0-beta.d49482af-c4b5-57e7-b3e1-1af196d81c48 → 32.4.0-beta.d789f554-06c2-5af0-8f5c-958fce7415c4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +36 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +169 -167
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -18,44 +18,44 @@ import Ma from "lodash.chunk";
|
|
18
18
|
import { CognitoIdentityProviderClient as Er, InitiateAuthCommand as Ta, RespondToAuthChallengeCommand as br } from "@aws-sdk/client-cognito-identity-provider";
|
19
19
|
import Br from "dinero.js";
|
20
20
|
import * as Na from "currency-codes";
|
21
|
-
import
|
21
|
+
import jt from "lodash.isequal";
|
22
22
|
import { split as na } from "unicode-default-word-boundary";
|
23
23
|
import un from "lodash.debounce";
|
24
24
|
import "fs";
|
25
25
|
import "path";
|
26
26
|
import Ir from "lodash.omit";
|
27
|
-
var ve = /* @__PURE__ */ ((n) => (n.Data = "Data", n.Font = "Font", n.Frame = "Frame", n.Illustration = "Illustration", n.Image = "Image", n.Model = "Model", n.Material = "Material", n.Color = "Color", n.QuestionnaireCollateral = "QuestionnaireCollateral", n.RequestCollateral = "RequestCollateral", n.SignupCollateral = "SignupCollateral", n.Video = "Video", n.ColorProfile = "ColorProfile", n.Environment = "Environment", n))(ve || {}), U = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(U || {}), v = /* @__PURE__ */ ((n) => (n.Information = "Information", n.Bulk = "Bulk", n.DigitalContent = "DigitalContent", n.Finish = "Finish", n.Frame = "Frame", n.Illustration = "Illustration", n.Introduction = "Introduction", n.Material = "Material", n.Model = "Model", n.Module = "Module", n.Picture = "Picture", n.Photo = "Photo", n.ProductOverlay = "ProductOverlay", n.Question = "Question", n.Shape = "Shape", n.SilentIllustration = "SilentIllustration", n.Text = "Text", n))(v || {}), Pr = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Pr || {}),
|
27
|
+
var ve = /* @__PURE__ */ ((n) => (n.Data = "Data", n.Font = "Font", n.Frame = "Frame", n.Illustration = "Illustration", n.Image = "Image", n.Model = "Model", n.Material = "Material", n.Color = "Color", n.QuestionnaireCollateral = "QuestionnaireCollateral", n.RequestCollateral = "RequestCollateral", n.SignupCollateral = "SignupCollateral", n.Video = "Video", n.ColorProfile = "ColorProfile", n.Environment = "Environment", n))(ve || {}), U = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(U || {}), v = /* @__PURE__ */ ((n) => (n.Information = "Information", n.Bulk = "Bulk", n.DigitalContent = "DigitalContent", n.Finish = "Finish", n.Frame = "Frame", n.Illustration = "Illustration", n.Introduction = "Introduction", n.Material = "Material", n.Model = "Model", n.Module = "Module", n.Picture = "Picture", n.Photo = "Photo", n.ProductOverlay = "ProductOverlay", n.Question = "Question", n.Shape = "Shape", n.SilentIllustration = "SilentIllustration", n.Text = "Text", n))(v || {}), Pr = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Pr || {}), Yt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Yt || {}), x = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(x || {}), Dr = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Dr || {}), hn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(hn || {}), Fr = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(Fr || {}), xr = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(xr || {}), ga = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(ga || {}), kr = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(kr || {}), Ee = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(Ee || {}), Mt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(Mt || {}), H = /* @__PURE__ */ ((n) => (n[n.North = 0] = "North", n[n.Northeast = 1] = "Northeast", n[n.East = 2] = "East", n[n.Southeast = 3] = "Southeast", n[n.South = 4] = "South", n[n.Southwest = 5] = "Southwest", n[n.West = 6] = "West", n[n.Northwest = 7] = "Northwest", n))(H || {}), Mr = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(Mr || {});
|
28
28
|
class mn extends Error {
|
29
29
|
constructor(t) {
|
30
30
|
super(t), this.name = this.constructor.name;
|
31
31
|
}
|
32
32
|
}
|
33
|
-
class
|
33
|
+
class Zt extends mn {
|
34
34
|
constructor(t) {
|
35
35
|
super(`ConfigurationError - ${t}`);
|
36
36
|
}
|
37
37
|
}
|
38
|
-
class be extends
|
38
|
+
class be extends Zt {
|
39
39
|
constructor(t) {
|
40
40
|
super(`Option not Configured: ${t.stepTitle}`), this.optionId = t?.optionId || "N/A";
|
41
41
|
}
|
42
42
|
}
|
43
|
-
class Y extends
|
43
|
+
class Y extends Zt {
|
44
44
|
constructor(t) {
|
45
45
|
super(`Panel not Found: ${t.panelId}`), this.panelId = t?.panelId || "N/A";
|
46
46
|
}
|
47
47
|
}
|
48
|
-
class bt extends
|
48
|
+
class bt extends Zt {
|
49
49
|
constructor(t) {
|
50
50
|
super(`Asset not found for variant: ${t.name}`), this.variant = t;
|
51
51
|
}
|
52
52
|
}
|
53
|
-
class
|
53
|
+
class Jt extends Zt {
|
54
54
|
constructor(t) {
|
55
55
|
super(`Resource not found for asset: ${t.name}`), this.asset = t;
|
56
56
|
}
|
57
57
|
}
|
58
|
-
class Be extends
|
58
|
+
class Be extends Zt {
|
59
59
|
constructor(t, e) {
|
60
60
|
super(`Workflow Misconfiguration: ${t.stepName} - ${e}`), this.step = t;
|
61
61
|
}
|
@@ -169,7 +169,7 @@ function zc(n) {
|
|
169
169
|
function Gc(n) {
|
170
170
|
ia = n;
|
171
171
|
}
|
172
|
-
function
|
172
|
+
function te() {
|
173
173
|
return ra ? new ra().window : (console.log(
|
174
174
|
"DOM constructor is not registered. Assuming browser environment. If not, please register DOM constructor before calling this function."
|
175
175
|
), window);
|
@@ -197,17 +197,17 @@ const gn = /* @__PURE__ */ new Map(), Ra = /* @__PURE__ */ new Map(), Oa = /* @_
|
|
197
197
|
if (t) return t;
|
198
198
|
const a = (async () => await (await rt(n)).text())();
|
199
199
|
return Oa.set(n, a), a;
|
200
|
-
}, Tt = (n) => n.every((t) => t !== "undefined"),
|
200
|
+
}, Tt = (n) => n.every((t) => t !== "undefined"), oe = (n) => Tt([typeof document]) ? document.createElement(n) : te().document.createElement(n), Or = (n, t) => {
|
201
201
|
if (Tt([typeof document]))
|
202
202
|
return document.createElementNS(n, t);
|
203
|
-
const a =
|
203
|
+
const a = te().document.createElement(t);
|
204
204
|
return a.setAttribute("xmlns", n), a;
|
205
205
|
}, dt = () => {
|
206
206
|
if (Tt([typeof DOMParser]))
|
207
207
|
return new DOMParser();
|
208
|
-
const n =
|
208
|
+
const n = te();
|
209
209
|
return new n.DOMParser();
|
210
|
-
}, $r = () => Tt([typeof DOMParser]) ? DOMParser :
|
210
|
+
}, $r = () => Tt([typeof DOMParser]) ? DOMParser : te().DOMParser, Ne = (n, t) => new Promise((e, a) => {
|
211
211
|
t ? pn(n).then(e).catch(a) : rt(n).then((r) => {
|
212
212
|
r.arrayBuffer().then(e).catch(a);
|
213
213
|
}).catch((r) => {
|
@@ -229,7 +229,7 @@ const gn = /* @__PURE__ */ new Map(), Ra = /* @__PURE__ */ new Map(), Oa = /* @_
|
|
229
229
|
}, It = () => {
|
230
230
|
if (Tt([typeof XMLSerializer]))
|
231
231
|
return new XMLSerializer();
|
232
|
-
const n =
|
232
|
+
const n = te();
|
233
233
|
return new n.XMLSerializer();
|
234
234
|
}, $a = (n) => btoa(n), Qe = (n) => {
|
235
235
|
function t() {
|
@@ -375,7 +375,7 @@ const pt = (n, t, e) => {
|
|
375
375
|
} catch {
|
376
376
|
throw new Error("Canvas module not set");
|
377
377
|
}
|
378
|
-
},
|
378
|
+
}, ee = (n, t) => {
|
379
379
|
if (oa !== void 0)
|
380
380
|
return oa(n, t);
|
381
381
|
try {
|
@@ -411,21 +411,21 @@ let ze;
|
|
411
411
|
function Ca() {
|
412
412
|
return ze === void 0 && (ze = $r()), ze;
|
413
413
|
}
|
414
|
-
let
|
414
|
+
let le = null;
|
415
415
|
const _r = (n) => new Promise((t) => {
|
416
416
|
if (Qe(n) !== "image/jpeg")
|
417
417
|
return t(1);
|
418
418
|
Cr(n).then((a) => t(a || 1)).catch(() => t(1));
|
419
419
|
}), Xr = async () => {
|
420
|
-
if (
|
421
|
-
return !
|
422
|
-
const t = await
|
423
|
-
return
|
420
|
+
if (le !== null)
|
421
|
+
return !le;
|
422
|
+
const t = await ee("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k=");
|
423
|
+
return le = t.width === 2 && t.height === 3, !le;
|
424
424
|
}, Zr = (n) => {
|
425
425
|
const e = n.naturalWidth / n.naturalHeight;
|
426
426
|
return n.naturalHeight <= 8192 && n.naturalWidth <= 8192 ? [n.naturalWidth, n.naturalHeight] : n.naturalHeight > n.naturalWidth ? [e * 8192, 8192] : [8192, 8192 / e];
|
427
427
|
}, ti = async (n) => {
|
428
|
-
const t = await Vr(n), e = await
|
428
|
+
const t = await Vr(n), e = await ee(t), [a, r] = Zr(e);
|
429
429
|
if (!await Xr()) {
|
430
430
|
const A = pt(a, r);
|
431
431
|
return A.getContext("2d")?.drawImage(e, 0, 0, a, r), A;
|
@@ -466,7 +466,7 @@ const _r = (n) => new Promise((t) => {
|
|
466
466
|
height: t.height,
|
467
467
|
width: t.width
|
468
468
|
};
|
469
|
-
},
|
469
|
+
}, Kt = [
|
470
470
|
"Yellow C",
|
471
471
|
"Yellow 012 C",
|
472
472
|
"Orange 021 C",
|
@@ -3156,12 +3156,12 @@ const _r = (n) => new Promise((t) => {
|
|
3156
3156
|
parseInt(n.substring(4, 6), 16)
|
3157
3157
|
]);
|
3158
3158
|
function qc(n) {
|
3159
|
-
const t =
|
3159
|
+
const t = Kt.indexOf(n);
|
3160
3160
|
return t >= 0 ? xt[t] : "";
|
3161
3161
|
}
|
3162
3162
|
function ei(n) {
|
3163
3163
|
const t = xt.indexOf(n);
|
3164
|
-
return t >= 0 ?
|
3164
|
+
return t >= 0 ? Kt[t] : "";
|
3165
3165
|
}
|
3166
3166
|
function Hc(n, t = 64) {
|
3167
3167
|
const e = [], a = [], r = ei(n);
|
@@ -3178,10 +3178,10 @@ function Hc(n, t = 64) {
|
|
3178
3178
|
a.push(u);
|
3179
3179
|
}
|
3180
3180
|
for (let A = 0; A < a.length; A++)
|
3181
|
-
a[A] <= t && !e.some((u) => u.pms ===
|
3181
|
+
a[A] <= t && !e.some((u) => u.pms === Kt[A]) && e.push({ pms: Kt[A], hex: xt[A], distance: a[A] });
|
3182
3182
|
return e.sort((A, u) => A.distance - u.distance);
|
3183
3183
|
}
|
3184
|
-
const ai =
|
3184
|
+
const ai = Kt.map((n, t) => ({ pms: n, hex: xt[t] })), ni = new wr(ai, { keys: ["pms"] });
|
3185
3185
|
function jc(n, t) {
|
3186
3186
|
return ni.search(n, t ? { limit: t } : void 0);
|
3187
3187
|
}
|
@@ -3201,7 +3201,7 @@ function Ua(n) {
|
|
3201
3201
|
const t = n.substring(1).toUpperCase();
|
3202
3202
|
return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
|
3203
3203
|
}
|
3204
|
-
const
|
3204
|
+
const ce = (n) => {
|
3205
3205
|
const t = vn(n.spotColor);
|
3206
3206
|
return t ? `${n.browserValue} ${t}` : n.browserValue;
|
3207
3207
|
}, vn = (n) => {
|
@@ -3299,13 +3299,13 @@ const le = (n) => {
|
|
3299
3299
|
if (o)
|
3300
3300
|
a.setAttribute(
|
3301
3301
|
"fill",
|
3302
|
-
e ?
|
3302
|
+
e ? ce(o) : o.browserValue
|
3303
3303
|
);
|
3304
3304
|
else {
|
3305
3305
|
const l = t[s];
|
3306
3306
|
l && a.setAttribute(
|
3307
3307
|
"fill",
|
3308
|
-
e ?
|
3308
|
+
e ? ce(l) : l.browserValue
|
3309
3309
|
);
|
3310
3310
|
}
|
3311
3311
|
}
|
@@ -3317,13 +3317,13 @@ const le = (n) => {
|
|
3317
3317
|
if (o)
|
3318
3318
|
a.setAttribute(
|
3319
3319
|
"stroke",
|
3320
|
-
e ?
|
3320
|
+
e ? ce(o) : o.browserValue
|
3321
3321
|
);
|
3322
3322
|
else {
|
3323
3323
|
const l = t[s];
|
3324
3324
|
l && a.setAttribute(
|
3325
3325
|
"fill",
|
3326
|
-
e ?
|
3326
|
+
e ? ce(l) : l.browserValue
|
3327
3327
|
);
|
3328
3328
|
}
|
3329
3329
|
}
|
@@ -3373,7 +3373,7 @@ const le = (n) => {
|
|
3373
3373
|
value
|
3374
3374
|
}
|
3375
3375
|
}
|
3376
|
-
`,
|
3376
|
+
`, ae = (n) => w`
|
3377
3377
|
${n && Ai || ""}
|
3378
3378
|
fragment AssetFields on Asset {
|
3379
3379
|
name
|
@@ -3417,7 +3417,7 @@ const le = (n) => {
|
|
3417
3417
|
${n && "...AssetMetadataFields" || ""}
|
3418
3418
|
}
|
3419
3419
|
`, ui = w`
|
3420
|
-
${
|
3420
|
+
${ae(!1)}
|
3421
3421
|
query GetAssets($keys: [String]!) {
|
3422
3422
|
assets(keys: $keys) {
|
3423
3423
|
...AssetFields
|
@@ -3492,7 +3492,7 @@ const le = (n) => {
|
|
3492
3492
|
}
|
3493
3493
|
}
|
3494
3494
|
`, gi = w`
|
3495
|
-
${
|
3495
|
+
${ae(!1)}
|
3496
3496
|
mutation RemoveBackgroundFromAsset($key: String!) {
|
3497
3497
|
assetRemoveBackground(key: $key) {
|
3498
3498
|
...AssetFields
|
@@ -3812,7 +3812,7 @@ class wi {
|
|
3812
3812
|
this.disabled = t;
|
3813
3813
|
}
|
3814
3814
|
}
|
3815
|
-
const
|
3815
|
+
const _t = new wi(), In = w`
|
3816
3816
|
fragment OptionFields on Option {
|
3817
3817
|
id
|
3818
3818
|
name
|
@@ -3850,7 +3850,7 @@ const Kt = new wi(), In = w`
|
|
3850
3850
|
}
|
3851
3851
|
}
|
3852
3852
|
`, yi = w`
|
3853
|
-
${
|
3853
|
+
${ae(!1)}
|
3854
3854
|
${va}
|
3855
3855
|
${In}
|
3856
3856
|
query GetOptions($ids: [String]!) {
|
@@ -3872,11 +3872,11 @@ const Kt = new wi(), In = w`
|
|
3872
3872
|
});
|
3873
3873
|
}), t.data.options;
|
3874
3874
|
}, vi = async (n, t) => (await t).find((a) => a.id === n), Ei = async (n) => {
|
3875
|
-
const t = n.map((s) =>
|
3875
|
+
const t = n.map((s) => _t.get({ id: s })), e = n.filter((s, o) => t[o] === void 0);
|
3876
3876
|
if (e.length === 0)
|
3877
3877
|
return Promise.all(t);
|
3878
3878
|
const a = Si(e), r = e.map(
|
3879
|
-
(s) =>
|
3879
|
+
(s) => _t.set({ id: s }, vi(s, a))
|
3880
3880
|
), i = t.filter((s) => s !== void 0);
|
3881
3881
|
return await Promise.all(i.concat(r));
|
3882
3882
|
};
|
@@ -4588,7 +4588,7 @@ const j = new bi(), Pn = w`
|
|
4588
4588
|
name
|
4589
4589
|
}
|
4590
4590
|
`, Li = (n) => w`
|
4591
|
-
${
|
4591
|
+
${ae(n)}
|
4592
4592
|
${va}
|
4593
4593
|
${In}
|
4594
4594
|
${Ri}
|
@@ -5008,7 +5008,7 @@ const j = new bi(), Pn = w`
|
|
5008
5008
|
}
|
5009
5009
|
}
|
5010
5010
|
`, zi = w`
|
5011
|
-
${
|
5011
|
+
${ae(!1)}
|
5012
5012
|
query GetWorkflowForTheme($id: String!) {
|
5013
5013
|
workflow(id: $id) {
|
5014
5014
|
id
|
@@ -5342,7 +5342,7 @@ const M = () => {
|
|
5342
5342
|
viewBox: A,
|
5343
5343
|
width: u
|
5344
5344
|
}) => {
|
5345
|
-
const h = e || 0, m = 2 * (l?.scale || 1), p = A || { x: 0, y: 0, width: u, height: i }, g = `${p.x} ${p.y} ${p.width} ${p.height}`, f = M(), S = a.purpose ===
|
5345
|
+
const h = e || 0, m = 2 * (l?.scale || 1), p = A || { x: 0, y: 0, width: u, height: i }, g = `${p.x} ${p.y} ${p.width} ${p.height}`, f = M(), S = a.purpose === Yt.FreeDesign && /* @__PURE__ */ D("defs", { children: /* @__PURE__ */ D("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ D("rect", { width: p.width, height: p.height, rx: h }) }) }), B = a.colorProfiles?.map((E, P) => (
|
5346
5346
|
/* @ts-ignore */
|
5347
5347
|
/* @__PURE__ */ D("color-profile", { name: E.name, xlinkHref: E.key, children: " " }, P)
|
5348
5348
|
)), I = r.map((E) => ({
|
@@ -5385,7 +5385,7 @@ const M = () => {
|
|
5385
5385
|
"g",
|
5386
5386
|
{
|
5387
5387
|
id: "element-group",
|
5388
|
-
clipPath: a.purpose ===
|
5388
|
+
clipPath: a.purpose === Yt.FreeDesign ? "url(#viewboxClip)" : void 0,
|
5389
5389
|
children: C.map((E) => Vn(E)).filter((E) => !!E)
|
5390
5390
|
}
|
5391
5391
|
),
|
@@ -5493,13 +5493,13 @@ const M = () => {
|
|
5493
5493
|
y: o.y - n.height * e.y / 2
|
5494
5494
|
};
|
5495
5495
|
return {
|
5496
|
-
a:
|
5497
|
-
b:
|
5498
|
-
c:
|
5499
|
-
d:
|
5496
|
+
a: de(r, l, a),
|
5497
|
+
b: de(i, l, a),
|
5498
|
+
c: de(s, l, a),
|
5499
|
+
d: de(o, l, a),
|
5500
5500
|
center: l
|
5501
5501
|
};
|
5502
|
-
},
|
5502
|
+
}, de = (n, t, e) => {
|
5503
5503
|
const a = Math.sin(e), r = Math.cos(e);
|
5504
5504
|
return {
|
5505
5505
|
x: (n.x - t.x) * r - (n.y - t.y) * a + t.x,
|
@@ -5766,7 +5766,7 @@ const as = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", We = /* @_
|
|
5766
5766
|
const s = (i || Un) * r.getApproximateHeight(), o = t.split(`
|
5767
5767
|
`);
|
5768
5768
|
try {
|
5769
|
-
const l = o.flatMap((d) =>
|
5769
|
+
const l = o.flatMap((d) => fe(d, n.width, a, r)), c = l.flatMap((d) => d.lines);
|
5770
5770
|
return {
|
5771
5771
|
lines: c,
|
5772
5772
|
requiredHeight: l.flatMap((d) => d.lines).length * (a * s),
|
@@ -5782,14 +5782,14 @@ const as = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", We = /* @_
|
|
5782
5782
|
requiredWidth: Pe(c, n.width, a, r)
|
5783
5783
|
};
|
5784
5784
|
}
|
5785
|
-
},
|
5785
|
+
}, fe = (n, t, e, a) => {
|
5786
5786
|
const r = mt(n, e, a);
|
5787
5787
|
if (r <= t)
|
5788
5788
|
return { lines: [n], width: r };
|
5789
5789
|
if (!(n.indexOf(" ") > -1)) {
|
5790
5790
|
if (n.length <= 1)
|
5791
5791
|
throw new Error(`Character ${n} is wider than region`);
|
5792
|
-
const d = Math.floor(n.length / 2), A =
|
5792
|
+
const d = Math.floor(n.length / 2), A = fe(n.slice(0, d), t, e, a), u = fe(n.slice(d), t, e, a);
|
5793
5793
|
return { lines: [...A.lines, ...u.lines], width: Math.max(A.width, u.width) };
|
5794
5794
|
}
|
5795
5795
|
const s = n.split(" "), o = [];
|
@@ -5797,7 +5797,7 @@ const as = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", We = /* @_
|
|
5797
5797
|
for (; c < s.length; ) {
|
5798
5798
|
const d = s[c];
|
5799
5799
|
if (mt(d, e, a) > t) {
|
5800
|
-
const A =
|
5800
|
+
const A = fe(d, t, e, a);
|
5801
5801
|
o.push(...A.lines), l = Math.max(l, A.width), c++;
|
5802
5802
|
} else {
|
5803
5803
|
const A = [d];
|
@@ -5874,7 +5874,7 @@ const as = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", We = /* @_
|
|
5874
5874
|
let a = n || "";
|
5875
5875
|
return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
|
5876
5876
|
`)), a;
|
5877
|
-
}, ls = (n, t) => n.map((e, a) => [e, t[a]]), cs = (n = "center", t = !1) => t ? "center" : n, $n = (n) => n === "left" ? "start" : n === "right" ? "end" : "middle",
|
5877
|
+
}, ls = (n, t) => n.map((e, a) => [e, t[a]]), cs = (n = "center", t = !1) => t ? "center" : n, $n = (n) => n === "left" ? "start" : n === "right" ? "end" : "middle", ne = (n, t, e) => n.fontData ? {
|
5878
5878
|
...n,
|
5879
5879
|
...(() => {
|
5880
5880
|
if (n.algorithm === Mt.Traditional) {
|
@@ -6187,7 +6187,7 @@ function ba(n) {
|
|
6187
6187
|
return i < s ? -1 : i > s ? 1 : 0;
|
6188
6188
|
});
|
6189
6189
|
}
|
6190
|
-
const
|
6190
|
+
const re = (n) => {
|
6191
6191
|
const t = n.variants;
|
6192
6192
|
if (t) {
|
6193
6193
|
if (t.length === 1)
|
@@ -6210,7 +6210,7 @@ const ne = (n) => {
|
|
6210
6210
|
}, gs = (n, t) => {
|
6211
6211
|
if (!t)
|
6212
6212
|
return;
|
6213
|
-
const e = t.variants?.find((a) => a.id === n.frameVariantId) ||
|
6213
|
+
const e = t.variants?.find((a) => a.id === n.frameVariantId) || re(t);
|
6214
6214
|
if (!e)
|
6215
6215
|
throw new Error(`No variant with ID: ${n.frameVariantId}`);
|
6216
6216
|
if (!e.asset)
|
@@ -6315,7 +6315,7 @@ const ne = (n) => {
|
|
6315
6315
|
nt(n).then((e) => {
|
6316
6316
|
t(e);
|
6317
6317
|
}).catch((e) => console.error(e));
|
6318
|
-
}), je = /* @__PURE__ */ new Map(),
|
6318
|
+
}), je = /* @__PURE__ */ new Map(), Xt = async (n) => {
|
6319
6319
|
if (je.has(n))
|
6320
6320
|
return je.get(n);
|
6321
6321
|
const t = async (r) => new Promise((i, s) => {
|
@@ -6337,7 +6337,7 @@ const ne = (n) => {
|
|
6337
6337
|
anonymousCrossOrigin: !0,
|
6338
6338
|
ignoreDimensions: !1,
|
6339
6339
|
createCanvas: pt,
|
6340
|
-
createImage:
|
6340
|
+
createImage: ee,
|
6341
6341
|
DOMParser: Ca(),
|
6342
6342
|
fetch: rt
|
6343
6343
|
}), u = s.getAttribute("width"), h = s.getAttribute("height"), m = 2048;
|
@@ -6434,7 +6434,7 @@ class od {
|
|
6434
6434
|
}), A = e.region || await Ut(t, x.Textbox, r, {
|
6435
6435
|
text: d,
|
6436
6436
|
fontScale: a.size ? a.size / s.unitsPerEm : void 0
|
6437
|
-
}), u =
|
6437
|
+
}), u = ne(
|
6438
6438
|
{
|
6439
6439
|
id: M(),
|
6440
6440
|
type: x.Textbox,
|
@@ -6515,7 +6515,7 @@ class od {
|
|
6515
6515
|
};
|
6516
6516
|
}
|
6517
6517
|
static async getIllustration(t, e) {
|
6518
|
-
const a = e.region || await Ut(t, x.Illustration, e.src), r = await ot(await Wn(e.src)), i = await
|
6518
|
+
const a = e.region || await Ut(t, x.Illustration, e.src), r = await ot(await Wn(e.src)), i = await Xt(r.svg), s = M();
|
6519
6519
|
return {
|
6520
6520
|
cachedObjectURL: i,
|
6521
6521
|
stepRegion: e.region,
|
@@ -6588,7 +6588,7 @@ const $ = (n, t) => _(n, t).elements.find((r) => r.id === n), _ = (n, t) => {
|
|
6588
6588
|
const o = r[s];
|
6589
6589
|
if (o.src && o.svg)
|
6590
6590
|
try {
|
6591
|
-
o.cachedObjectURL = await
|
6591
|
+
o.cachedObjectURL = await Xt(o.svg);
|
6592
6592
|
} catch (l) {
|
6593
6593
|
console.log(l);
|
6594
6594
|
}
|
@@ -6687,7 +6687,7 @@ class dd extends N {
|
|
6687
6687
|
s.scaleX = s.scaleX * this.width / e.width, s.scaleY = s.scaleY * this.height / e.height;
|
6688
6688
|
} else if (e.type === "textbox") {
|
6689
6689
|
const s = a, o = (!s.algorithm || s.algorithm === Mt.Autosize ? s.text : s.input) ?? "";
|
6690
|
-
a =
|
6690
|
+
a = ne(s, o, e);
|
6691
6691
|
}
|
6692
6692
|
const r = _(e.id, Object.values(t.layouts)), i = X(a, r);
|
6693
6693
|
return {
|
@@ -6864,7 +6864,7 @@ class fs extends N {
|
|
6864
6864
|
const a = {
|
6865
6865
|
...e,
|
6866
6866
|
fontSize: this.size
|
6867
|
-
}, r = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === Mt.Autosize ? e.text : e.input) ?? "", s = X(
|
6867
|
+
}, r = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === Mt.Autosize ? e.text : e.input) ?? "", s = X(ne(a, i), r);
|
6868
6868
|
return {
|
6869
6869
|
...t,
|
6870
6870
|
layouts: {
|
@@ -6886,7 +6886,7 @@ class ja extends N {
|
|
6886
6886
|
const a = {
|
6887
6887
|
...e,
|
6888
6888
|
fontData: this.fontData
|
6889
|
-
}, r = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === Mt.Autosize ? e.text : e.input) ?? "", s = X(
|
6889
|
+
}, r = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === Mt.Autosize ? e.text : e.input) ?? "", s = X(ne(a, i), r);
|
6890
6890
|
return {
|
6891
6891
|
...t,
|
6892
6892
|
layouts: {
|
@@ -7010,7 +7010,7 @@ class Ss extends N {
|
|
7010
7010
|
const e = $(this.id, Object.values(t.layouts));
|
7011
7011
|
if (!e.id)
|
7012
7012
|
throw new L();
|
7013
|
-
const a = _(e.id, Object.values(t.layouts)), r = X(
|
7013
|
+
const a = _(e.id, Object.values(t.layouts)), r = X(ne(e, this.text, e), a);
|
7014
7014
|
return {
|
7015
7015
|
...t,
|
7016
7016
|
layouts: {
|
@@ -7265,7 +7265,7 @@ class Ya {
|
|
7265
7265
|
}))()), A = {
|
7266
7266
|
stepName: this.configuration.stepName,
|
7267
7267
|
id: M(),
|
7268
|
-
cachedObjectURL: await
|
7268
|
+
cachedObjectURL: await Xt(d.svg),
|
7269
7269
|
src: l,
|
7270
7270
|
svg: d.svg,
|
7271
7271
|
colors: d.colors,
|
@@ -7374,7 +7374,7 @@ class bs {
|
|
7374
7374
|
async () => {
|
7375
7375
|
const p = await i();
|
7376
7376
|
if (!p.link || !p.link)
|
7377
|
-
throw new
|
7377
|
+
throw new Jt(p.asset);
|
7378
7378
|
h({
|
7379
7379
|
rel: "mpeg4",
|
7380
7380
|
href: p.link
|
@@ -7449,7 +7449,7 @@ class Fe {
|
|
7449
7449
|
const r = a.fileLink;
|
7450
7450
|
if (r)
|
7451
7451
|
return nt(r, !0);
|
7452
|
-
throw new
|
7452
|
+
throw new Jt(a);
|
7453
7453
|
};
|
7454
7454
|
}
|
7455
7455
|
async init(t, e, a) {
|
@@ -7773,7 +7773,7 @@ class Fe {
|
|
7773
7773
|
const a = t.fileLink;
|
7774
7774
|
if (a)
|
7775
7775
|
return a;
|
7776
|
-
throw new
|
7776
|
+
throw new Jt(t);
|
7777
7777
|
}
|
7778
7778
|
async loadPatternFromAsset(t, e, a, r) {
|
7779
7779
|
const i = Fe.patternSource(t), s = a.markUpdatePending(), o = a.getWorkflowExperience().getStepById(e.stepName)?.frameService;
|
@@ -7908,7 +7908,7 @@ class Bs {
|
|
7908
7908
|
spotColor: A.spotColor,
|
7909
7909
|
pmsValue: A.pmsValue
|
7910
7910
|
};
|
7911
|
-
const o = ya(t, e, a, s), l = await
|
7911
|
+
const o = ya(t, e, a, s), l = await Xt(o), c = [];
|
7912
7912
|
for (const d of r) {
|
7913
7913
|
for (const [A, u] of i.entries())
|
7914
7914
|
c.push(new Aa(d, A, u));
|
@@ -7967,8 +7967,8 @@ class Bs {
|
|
7967
7967
|
throw new bt(e);
|
7968
7968
|
const l = o.fileLink;
|
7969
7969
|
if (!l)
|
7970
|
-
throw new
|
7971
|
-
const c = await ot(await this.getIllustrationBody(l)), d = await
|
7970
|
+
throw new Jt(o);
|
7971
|
+
const c = await ot(await this.getIllustrationBody(l)), d = await Xt(c.svg), A = (f) => {
|
7972
7972
|
const S = i.getLayouts().find((I) => I.panelId === f.panelId);
|
7973
7973
|
if (!S)
|
7974
7974
|
throw new Y(f);
|
@@ -8036,7 +8036,7 @@ class Bs {
|
|
8036
8036
|
};
|
8037
8037
|
}
|
8038
8038
|
}
|
8039
|
-
const
|
8039
|
+
const Ce = new Bs();
|
8040
8040
|
class Is {
|
8041
8041
|
async init(t, e, a) {
|
8042
8042
|
const r = t.option;
|
@@ -8668,7 +8668,7 @@ const Ts = new Ms(), Ke = (n, t, e, a, r) => {
|
|
8668
8668
|
m || (c = !1);
|
8669
8669
|
}
|
8670
8670
|
return [null, null];
|
8671
|
-
},
|
8671
|
+
}, we = (n, t, e, a, r) => {
|
8672
8672
|
let i, s;
|
8673
8673
|
const o = Ct(t.assetUrl), l = o.getFont();
|
8674
8674
|
if (r.size) {
|
@@ -8924,7 +8924,7 @@ class Qs {
|
|
8924
8924
|
const c = [], d = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map();
|
8925
8925
|
for (const u of e) {
|
8926
8926
|
if (!u.fontData) throw new V("Failed to resolve font data for text.");
|
8927
|
-
const [h, m] =
|
8927
|
+
const [h, m] = we(
|
8928
8928
|
u.fontSize,
|
8929
8929
|
u.fontData,
|
8930
8930
|
{ left: u.x, top: u.y, width: u.width, height: u.height, rotation: u.rotation },
|
@@ -9084,7 +9084,7 @@ class Qs {
|
|
9084
9084
|
throw new bt(t);
|
9085
9085
|
const a = e.fileLink;
|
9086
9086
|
if (!a)
|
9087
|
-
throw new
|
9087
|
+
throw new Jt(e);
|
9088
9088
|
const r = await Nt(a);
|
9089
9089
|
return {
|
9090
9090
|
assetUrl: a,
|
@@ -9211,7 +9211,7 @@ class Qs {
|
|
9211
9211
|
fillSpotColorDefinition: f
|
9212
9212
|
}, C = [], E = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
|
9213
9213
|
if (!I.fontData) throw new V("Failed to resolve font data for text.");
|
9214
|
-
const [b, F] =
|
9214
|
+
const [b, F] = we(
|
9215
9215
|
I.fontSize,
|
9216
9216
|
I.fontData,
|
9217
9217
|
{
|
@@ -9272,7 +9272,7 @@ class Qs {
|
|
9272
9272
|
const A = (r || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = Ft(A, s), h = this.getProcessedInput(u, t.data, o), m = s.getRegionElements(t.stepName), p = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
|
9273
9273
|
for (const C of m)
|
9274
9274
|
if (C.region) {
|
9275
|
-
const [E, P] =
|
9275
|
+
const [E, P] = we(
|
9276
9276
|
e,
|
9277
9277
|
a,
|
9278
9278
|
C.region,
|
@@ -9326,13 +9326,13 @@ const Os = "data:application/octet-stream;base64,AAEAAAAPAIAAAwBwRkZUTYdHeHoAAEl
|
|
9326
9326
|
const e = at("rect");
|
9327
9327
|
return e.setAttribute("height", `${n}`), e.setAttribute("width", `${t}`), e;
|
9328
9328
|
}, Us = (n, t, e, a) => {
|
9329
|
-
const r =
|
9329
|
+
const r = oe("filter");
|
9330
9330
|
r.setAttribute("id", a), r.setAttribute("height", "200%"), r.setAttribute("width", "200%"), r.setAttribute("x", "-50%"), r.setAttribute("y", "-50%");
|
9331
|
-
const i =
|
9331
|
+
const i = oe("feOffset");
|
9332
9332
|
r.appendChild(i), i.setAttribute("result", "offOut"), i.setAttribute("in", "SourceAlpha"), i.setAttribute("dx", `${n}`), i.setAttribute("dy", `${t}`);
|
9333
|
-
const s =
|
9333
|
+
const s = oe("feGaussianBlur");
|
9334
9334
|
r.appendChild(s), s.setAttribute("result", "blurOut"), s.setAttribute("in", "offOut"), s.setAttribute("stdDeviation", `${e}`);
|
9335
|
-
const o =
|
9335
|
+
const o = oe("feBlend");
|
9336
9336
|
return r.appendChild(o), o.setAttribute("in", "SourceGraphic"), o.setAttribute("in2", "blurOut"), o.setAttribute("mode", "normal"), r;
|
9337
9337
|
}, Ls = (n) => {
|
9338
9338
|
let t = n;
|
@@ -9511,7 +9511,7 @@ async function Zn(n) {
|
|
9511
9511
|
return new Ws();
|
9512
9512
|
throw new V(`Failed to resolve Module, Module ${n} not found`);
|
9513
9513
|
}
|
9514
|
-
const
|
9514
|
+
const ie = w`
|
9515
9515
|
fragment GlobalPropertyStateAspectFields on GlobalPropertyStateAspect {
|
9516
9516
|
name
|
9517
9517
|
value
|
@@ -9534,7 +9534,7 @@ const re = w`
|
|
9534
9534
|
}
|
9535
9535
|
}
|
9536
9536
|
`, qs = w`
|
9537
|
-
${
|
9537
|
+
${ie}
|
9538
9538
|
mutation CreateGlobalPropertyState($bundleId: String!) {
|
9539
9539
|
globalPropertyStateCreate(bundleId: $bundleId) {
|
9540
9540
|
id
|
@@ -9544,7 +9544,7 @@ const re = w`
|
|
9544
9544
|
}
|
9545
9545
|
}
|
9546
9546
|
`, Hs = w`
|
9547
|
-
${
|
9547
|
+
${ie}
|
9548
9548
|
mutation UpdateGlobalPropertyState($id: String!, $aspects: [GlobalPropertyStateAspectInput]!) {
|
9549
9549
|
globalPropertyStateUpdate(id: $id, aspects: $aspects) {
|
9550
9550
|
id
|
@@ -9554,7 +9554,7 @@ const re = w`
|
|
9554
9554
|
}
|
9555
9555
|
}
|
9556
9556
|
`, js = w`
|
9557
|
-
${
|
9557
|
+
${ie}
|
9558
9558
|
query GetGlobalPropertyState($bundleId: String!) {
|
9559
9559
|
globalPropertyState(bundleId: $bundleId) {
|
9560
9560
|
id
|
@@ -9625,7 +9625,7 @@ const re = w`
|
|
9625
9625
|
...ProductFields
|
9626
9626
|
}
|
9627
9627
|
}
|
9628
|
-
`,
|
9628
|
+
`, se = (n, t = !1) => w`
|
9629
9629
|
${n ? Pa(t) : ""}
|
9630
9630
|
fragment ProductCollectionFields on ProductCollection {
|
9631
9631
|
id
|
@@ -9696,8 +9696,8 @@ const re = w`
|
|
9696
9696
|
}
|
9697
9697
|
}
|
9698
9698
|
`, Js = (n) => w`
|
9699
|
-
${
|
9700
|
-
${
|
9699
|
+
${ie}
|
9700
|
+
${se(n)}
|
9701
9701
|
query GetBundle($id: String!) {
|
9702
9702
|
globalPropertyState(bundleId: $id) {
|
9703
9703
|
id
|
@@ -9879,7 +9879,7 @@ const re = w`
|
|
9879
9879
|
}
|
9880
9880
|
}
|
9881
9881
|
`, to = (n) => w`
|
9882
|
-
${
|
9882
|
+
${se(n)}
|
9883
9883
|
mutation CreateBundle(
|
9884
9884
|
$collectionId: String
|
9885
9885
|
$initialMetadata: [MetadataInput!]
|
@@ -9908,8 +9908,8 @@ const re = w`
|
|
9908
9908
|
}
|
9909
9909
|
}
|
9910
9910
|
`, eo = (n) => w`
|
9911
|
-
${
|
9912
|
-
${
|
9911
|
+
${ie}
|
9912
|
+
${se(n)}
|
9913
9913
|
mutation DuplicateBundle(
|
9914
9914
|
$id: String!
|
9915
9915
|
$template: Boolean
|
@@ -10064,7 +10064,7 @@ const re = w`
|
|
10064
10064
|
}
|
10065
10065
|
}
|
10066
10066
|
`, uo = (n) => w`
|
10067
|
-
${
|
10067
|
+
${se(n)}
|
10068
10068
|
mutation BundleAssignProductCollection($id: String!, $productCollectionId: String!) {
|
10069
10069
|
bundleAssignProductCollection(id: $id, collectionId: $productCollectionId) {
|
10070
10070
|
id
|
@@ -10270,7 +10270,7 @@ class Bo {
|
|
10270
10270
|
const t = this.transaction.recipient, e = { recipient: t };
|
10271
10271
|
return this.recipientConversionConfiguration?.requestedDataItems?.forEach((a) => {
|
10272
10272
|
const r = a.uniqueIdentifier ?? a.title ?? "";
|
10273
|
-
a.type ===
|
10273
|
+
a.type === ye.FirstName ? e[r] = t?.firstName : a.type === ye.LastName ? e[r] = t?.lastName : a.type === ye.Custom && (a.customFieldIndex === 1 ? e[r] = t?.customField1 : a.customFieldIndex === 2 ? e[r] = t?.customField2 : a.customFieldIndex === 3 ? e[r] = t?.customField3 : a.customFieldIndex === 4 ? e[r] = t?.customField4 : a.customFieldIndex === 5 && (e[r] = t?.customField5));
|
10274
10274
|
}), e;
|
10275
10275
|
}
|
10276
10276
|
async updateRecipient(t, e, a, r, i, s, o, l, c, d, A, u, h, m, p, g, f) {
|
@@ -10666,7 +10666,7 @@ class Bo {
|
|
10666
10666
|
...this.storage,
|
10667
10667
|
[t]: { ...this.storage[t], ...e }
|
10668
10668
|
};
|
10669
|
-
if (!
|
10669
|
+
if (!jt(a, this.storage)) {
|
10670
10670
|
this.storage = a;
|
10671
10671
|
const r = new Ha(this.constructSerializableWorkflow());
|
10672
10672
|
this.commandContext.apply(r, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
|
@@ -10910,7 +10910,7 @@ class Bo {
|
|
10910
10910
|
break;
|
10911
10911
|
case v.Illustration:
|
10912
10912
|
a.push(
|
10913
|
-
|
10913
|
+
Ce.init(l, this, this.reloadedState)
|
10914
10914
|
);
|
10915
10915
|
break;
|
10916
10916
|
case v.Material:
|
@@ -11223,7 +11223,7 @@ class Io extends Z {
|
|
11223
11223
|
*/
|
11224
11224
|
async selectVariant(t) {
|
11225
11225
|
if (!this.getUpdateState() && this.getCurrentVariant() !== t)
|
11226
|
-
return
|
11226
|
+
return Ce.selectVariant(
|
11227
11227
|
this.step,
|
11228
11228
|
t.getResource(),
|
11229
11229
|
this.manager.getRegionElements(this.step.stepName) || [],
|
@@ -11265,7 +11265,7 @@ class Io extends Z {
|
|
11265
11265
|
const c = l.id.replace(/\W/g, "");
|
11266
11266
|
a ? r.set(c, { browserValue: e, pmsValue: a }) : r.set(c, e);
|
11267
11267
|
}
|
11268
|
-
}) : a ? r.set(t, { browserValue: e, pmsValue: a }) : r.set(t, e),
|
11268
|
+
}) : a ? r.set(t, { browserValue: e, pmsValue: a }) : r.set(t, e), Ce.changeColors(
|
11269
11269
|
this.step,
|
11270
11270
|
this.manager.getRegionElements(this.step.stepName),
|
11271
11271
|
this.manager,
|
@@ -11277,7 +11277,7 @@ class Io extends Z {
|
|
11277
11277
|
return this.step.data.colorOption;
|
11278
11278
|
}
|
11279
11279
|
getAvailableColors() {
|
11280
|
-
return this.step.data.colorPickerEnabled ?
|
11280
|
+
return this.step.data.colorPickerEnabled ? Ce.availableColors(this.step, this.manager) : Promise.resolve([]);
|
11281
11281
|
}
|
11282
11282
|
isColorPickerEnabled() {
|
11283
11283
|
return this.step.data.colorPickerEnabled ?? !1;
|
@@ -11684,7 +11684,7 @@ class Qo extends Z {
|
|
11684
11684
|
});
|
11685
11685
|
}
|
11686
11686
|
}
|
11687
|
-
class
|
11687
|
+
class Ae {
|
11688
11688
|
static get(t, e) {
|
11689
11689
|
switch (e.type) {
|
11690
11690
|
case v.DigitalContent:
|
@@ -12330,7 +12330,7 @@ class Yo {
|
|
12330
12330
|
throw new Te("Failed to obtain 2D context for preview image creation");
|
12331
12331
|
const m = this.workflowManager.getTemplatingContext(), p = Ea(u.layoutState.layout, u.layoutState.elements, {
|
12332
12332
|
renderingConfiguration: {
|
12333
|
-
purpose:
|
12333
|
+
purpose: Yt.Print,
|
12334
12334
|
region: { left: A.x, top: A.y, width: A.width, height: A.height },
|
12335
12335
|
templatingContext: m
|
12336
12336
|
}
|
@@ -12339,7 +12339,7 @@ class Yo {
|
|
12339
12339
|
anonymousCrossOrigin: !0,
|
12340
12340
|
ignoreDimensions: !1,
|
12341
12341
|
createCanvas: pt,
|
12342
|
-
createImage:
|
12342
|
+
createImage: ee,
|
12343
12343
|
DOMParser: Ca(),
|
12344
12344
|
fetch
|
12345
12345
|
})).render();
|
@@ -12352,7 +12352,7 @@ class Yo {
|
|
12352
12352
|
const a = this.cachedStepHandles.get(e.stepName);
|
12353
12353
|
if (a)
|
12354
12354
|
return a;
|
12355
|
-
const r =
|
12355
|
+
const r = Ae.get(this.getWorkflowManager(), e);
|
12356
12356
|
return this.cachedStepHandles.set(e.stepName, r), r;
|
12357
12357
|
}
|
12358
12358
|
getSteps() {
|
@@ -12453,10 +12453,10 @@ class Yo {
|
|
12453
12453
|
getStepByName(t) {
|
12454
12454
|
const e = this.getWorkflowManager().getWorkflow().steps.find((a) => a.stepTitle === t);
|
12455
12455
|
if (!(!e || !this.stepHasHandle(e)))
|
12456
|
-
return
|
12456
|
+
return Ae.get(this.getWorkflowManager(), e);
|
12457
12457
|
}
|
12458
12458
|
getStepsByType(t) {
|
12459
|
-
return this.getWorkflowManager().getWorkflow().steps.filter((e) => e.type === t).map((e) =>
|
12459
|
+
return this.getWorkflowManager().getWorkflow().steps.filter((e) => e.type === t).map((e) => Ae.get(this.getWorkflowManager(), e));
|
12460
12460
|
}
|
12461
12461
|
getStepsByScene(t) {
|
12462
12462
|
if (!this.getWorkflowManager().getWorkflow().stepGroups.find((a) => a.name === t.name))
|
@@ -12465,7 +12465,7 @@ class Yo {
|
|
12465
12465
|
);
|
12466
12466
|
return t.stepIds.map(
|
12467
12467
|
(a) => this.getWorkflowManager().getWorkflow().steps.find((r) => r.stepName === a)
|
12468
|
-
).filter((a) => this.stepHasHandle(a)).map((a) =>
|
12468
|
+
).filter((a) => this.stepHasHandle(a)).map((a) => Ae.get(this.getWorkflowManager(), a));
|
12469
12469
|
}
|
12470
12470
|
async attachCustomerDetails(t) {
|
12471
12471
|
return this.assignCustomerDetails({ emailAddress: t.email });
|
@@ -12785,7 +12785,7 @@ const Jo = (n) => {
|
|
12785
12785
|
const r = e.data, i = a.option;
|
12786
12786
|
if (!i)
|
12787
12787
|
return console.error(`No option for step ${a.stepName}.`), [];
|
12788
|
-
const s = i.variants?.find((C) => C.id === r.illustrationVariantId) ||
|
12788
|
+
const s = i.variants?.find((C) => C.id === r.illustrationVariantId) || re(i);
|
12789
12789
|
if (!s)
|
12790
12790
|
return console.error(`No variant with ID: ${r.illustrationVariantId}`), [];
|
12791
12791
|
if (!s.asset)
|
@@ -12883,7 +12883,7 @@ const Jo = (n) => {
|
|
12883
12883
|
const r = e.data, i = a.option;
|
12884
12884
|
if (!i)
|
12885
12885
|
return console.error(`No option for step ${a.stepName}.`), [];
|
12886
|
-
const s = i.variants?.find((d) => d.id === r.pictureVariantId) ||
|
12886
|
+
const s = i.variants?.find((d) => d.id === r.pictureVariantId) || re(i);
|
12887
12887
|
if (!s)
|
12888
12888
|
return console.error(`No variant with ID: ${r.pictureVariantId}`), [];
|
12889
12889
|
if (!s.asset)
|
@@ -12924,7 +12924,7 @@ const Jo = (n) => {
|
|
12924
12924
|
const r = e.data, i = a.option;
|
12925
12925
|
if (!i)
|
12926
12926
|
return console.error(`No option for step ${a.stepName}.`), [];
|
12927
|
-
const s = i.variants?.find((c) => c.id === r.colorVariantId) ||
|
12927
|
+
const s = i.variants?.find((c) => c.id === r.colorVariantId) || re(i);
|
12928
12928
|
if (!s)
|
12929
12929
|
return console.error(`No variant with ID: ${r.colorVariantId}`), [];
|
12930
12930
|
t[a.stepName] = { selectedVariants: [s] };
|
@@ -13045,7 +13045,7 @@ const Jo = (n) => {
|
|
13045
13045
|
const g = a.option;
|
13046
13046
|
if (!g)
|
13047
13047
|
return;
|
13048
|
-
const f = g.variants?.find((B) => B.id === i.fontVariantId) ||
|
13048
|
+
const f = g.variants?.find((B) => B.id === i.fontVariantId) || re(g);
|
13049
13049
|
if (!f || !f.asset)
|
13050
13050
|
return;
|
13051
13051
|
t[a.stepName] = { selectedVariants: [f] };
|
@@ -13094,7 +13094,7 @@ const Jo = (n) => {
|
|
13094
13094
|
y: g.top
|
13095
13095
|
};
|
13096
13096
|
if (d) {
|
13097
|
-
const [B, I] =
|
13097
|
+
const [B, I] = we(
|
13098
13098
|
a.data.size || s,
|
13099
13099
|
d,
|
13100
13100
|
g,
|
@@ -13349,7 +13349,7 @@ class ul extends Mn {
|
|
13349
13349
|
l = i.width, c = i.height;
|
13350
13350
|
const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = Ea(t.layoutState.layout, e, {
|
13351
13351
|
renderingConfiguration: {
|
13352
|
-
purpose:
|
13352
|
+
purpose: Yt.ThreeD,
|
13353
13353
|
templatingContext: d
|
13354
13354
|
}
|
13355
13355
|
}), u = fn(A), h = await ma.from(this.ctx, u, {
|
@@ -13360,7 +13360,7 @@ class ul extends Mn {
|
|
13360
13360
|
ignoreMouse: !0,
|
13361
13361
|
enableRedraw: !1,
|
13362
13362
|
createCanvas: pt,
|
13363
|
-
createImage:
|
13363
|
+
createImage: ee,
|
13364
13364
|
DOMParser: Ca(),
|
13365
13365
|
fetch
|
13366
13366
|
});
|
@@ -13922,7 +13922,7 @@ function rr(n) {
|
|
13922
13922
|
e.value !== "" && t.set(e.name, !0);
|
13923
13923
|
}), t;
|
13924
13924
|
}
|
13925
|
-
function
|
13925
|
+
function ue(n) {
|
13926
13926
|
return ua(n, ["__typename"]);
|
13927
13927
|
}
|
13928
13928
|
class yl {
|
@@ -13930,9 +13930,9 @@ class yl {
|
|
13930
13930
|
this.mandatoryFulfilledAspects = /* @__PURE__ */ new Map(), this.bundleId = t, this.bundleOwnerId = e, this.configuration = a, this.bundleOptions = i;
|
13931
13931
|
const s = i?.existingGlobalPropertyState;
|
13932
13932
|
this.initPromise = s ? Promise.resolve(s).then(() => {
|
13933
|
-
console.log("Setting global property state to existing state."), this.globalPropertyState =
|
13933
|
+
console.log("Setting global property state to existing state."), this.globalPropertyState = ue(s), this.recalculateMandatoryStates();
|
13934
13934
|
}) : this.createGlobalPropertyState().then((o) => {
|
13935
|
-
console.log("Setting global property state to new state."), this.globalPropertyState =
|
13935
|
+
console.log("Setting global property state to new state."), this.globalPropertyState = ue(o), this.recalculateMandatoryStates();
|
13936
13936
|
}), this.onGlobalPropertyStateChange = r;
|
13937
13937
|
}
|
13938
13938
|
async clearAspects(t) {
|
@@ -13962,7 +13962,7 @@ class yl {
|
|
13962
13962
|
async setGlobalPropertyState(t) {
|
13963
13963
|
this.globalPropertyState || await this.initPromise;
|
13964
13964
|
const e = Et(this.globalPropertyState);
|
13965
|
-
this.globalPropertyState = { ...
|
13965
|
+
this.globalPropertyState = { ...ue(t), id: e.id }, this.recalculateMandatoryStates(), await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(e, this.globalPropertyState);
|
13966
13966
|
}
|
13967
13967
|
getAspectMandatoryFulfilled(t) {
|
13968
13968
|
return this.mandatoryFulfilledAspects.get(t);
|
@@ -13987,7 +13987,7 @@ class yl {
|
|
13987
13987
|
const i = this.configuration.aspects.find((l) => l.name === t);
|
13988
13988
|
if (!i)
|
13989
13989
|
throw new Error(`Failed to find configuration aspect with name: ${t}`);
|
13990
|
-
this.mandatoryFulfilledAspects.set(t, e !== "");
|
13990
|
+
this.mandatoryFulfilledAspects.set(t, e !== ""), console.log(`LOG: setting aspects, currently ${this.globalPropertyState.aspects.length}`);
|
13991
13991
|
const s = Et(this.globalPropertyState), o = this.globalPropertyState.aspects.filter((l) => l.name === t);
|
13992
13992
|
if (o.length > 0)
|
13993
13993
|
if (r) {
|
@@ -14021,7 +14021,7 @@ class yl {
|
|
14021
14021
|
storage: a !== null ? a : void 0,
|
14022
14022
|
channel: r
|
14023
14023
|
});
|
14024
|
-
|
14024
|
+
jt(s, this.globalPropertyState) || (console.log(`LOG: end of setting aspects, currently ${this.globalPropertyState.aspects.length}, if it changed we pushed aspect ${t} / ${e}`), await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(s, this.globalPropertyState));
|
14025
14025
|
}
|
14026
14026
|
async setAspectStorage(t, e, a) {
|
14027
14027
|
if (!this.globalPropertyState)
|
@@ -14048,7 +14048,7 @@ class yl {
|
|
14048
14048
|
storage: e !== null ? e : void 0,
|
14049
14049
|
channel: a
|
14050
14050
|
});
|
14051
|
-
|
14051
|
+
jt(i, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(i, this.globalPropertyState));
|
14052
14052
|
}
|
14053
14053
|
async updateGlobalPropertyState() {
|
14054
14054
|
if (!this.globalPropertyState)
|
@@ -14092,7 +14092,7 @@ class yl {
|
|
14092
14092
|
}
|
14093
14093
|
});
|
14094
14094
|
if (t.data?.globalPropertyStateUpdate)
|
14095
|
-
this.globalPropertyState =
|
14095
|
+
this.globalPropertyState = ue(t.data.globalPropertyStateUpdate);
|
14096
14096
|
else
|
14097
14097
|
throw new Error("Unable to update global property state");
|
14098
14098
|
}
|
@@ -14328,14 +14328,14 @@ class ir {
|
|
14328
14328
|
getProducts() {
|
14329
14329
|
if (!this.collection.productCollectionProducts)
|
14330
14330
|
throw new Error("Failed to find products on collection. Ensure you fetch them first!");
|
14331
|
-
return this.collection.productCollectionProducts.filter((t) => !!t.product).map((t) => new
|
14331
|
+
return this.collection.productCollectionProducts.filter((t) => !!t.product).map((t) => new he(t));
|
14332
14332
|
}
|
14333
14333
|
/**
|
14334
14334
|
* A list of products in this collections with useful helpers for interacting with them.
|
14335
14335
|
*/
|
14336
14336
|
async fetchProducts(t) {
|
14337
14337
|
if (this.fullFetched)
|
14338
|
-
return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new
|
14338
|
+
return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new he(a));
|
14339
14339
|
const e = await y.getShadowGraphqlClient().query({
|
14340
14340
|
query: _s,
|
14341
14341
|
variables: {
|
@@ -14344,7 +14344,7 @@ class ir {
|
|
14344
14344
|
},
|
14345
14345
|
errorPolicy: "all"
|
14346
14346
|
});
|
14347
|
-
return t || (this.fullFetched = !0), this.collection.productCollectionProducts = e.data.productCollections[0].productCollectionProducts || [], this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new
|
14347
|
+
return t || (this.fullFetched = !0), this.collection.productCollectionProducts = e.data.productCollections[0].productCollectionProducts || [], this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new he(a));
|
14348
14348
|
}
|
14349
14349
|
/**
|
14350
14350
|
* Returns a list of collections products matching the associated metafield/tag filters.
|
@@ -14434,7 +14434,7 @@ class ir {
|
|
14434
14434
|
if (h || p.partial && (!p.data.productCollections || p.data.productCollections.length === 0 || !p.data.productCollections[0].productCollectionProductsFeed?.items || p.data.productCollections[0].productCollectionProductsFeed?.items.length === 0))
|
14435
14435
|
return;
|
14436
14436
|
c.abort(), h = !0, m.unsubscribe();
|
14437
|
-
const g = p.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((f) => !!f.product).map((f) => new
|
14437
|
+
const g = p.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((f) => !!f.product).map((f) => new he(Et(f))) || [];
|
14438
14438
|
u({
|
14439
14439
|
items: g,
|
14440
14440
|
// Clone items because it could be cached data (immutable)
|
@@ -14458,7 +14458,7 @@ class ir {
|
|
14458
14458
|
return this.collection;
|
14459
14459
|
}
|
14460
14460
|
}
|
14461
|
-
class
|
14461
|
+
class he {
|
14462
14462
|
constructor(t) {
|
14463
14463
|
this.product = t.product, this.productResource = t;
|
14464
14464
|
}
|
@@ -14653,7 +14653,7 @@ class Pl {
|
|
14653
14653
|
}
|
14654
14654
|
}
|
14655
14655
|
const Dl = w`
|
14656
|
-
${
|
14656
|
+
${se(!1)}
|
14657
14657
|
query GetProductCollections($ids: [String!]!) {
|
14658
14658
|
productCollections(ids: $ids) {
|
14659
14659
|
...ProductCollectionFields
|
@@ -15380,20 +15380,22 @@ class Ze {
|
|
15380
15380
|
if (this.updatesLocked)
|
15381
15381
|
return;
|
15382
15382
|
const a = await this.globalPropertyHandleService.getHandles(), r = this.globalPropertyHandleService.applyConditionsFromState(a, t), i = this.globalPropertyHandleService.applyConditionsFromState(a, e);
|
15383
|
-
this.checkConditionalHandlesChanged(r, i), this.checkMandatoryHandlesChanged(t, i);
|
15383
|
+
console.log(`LOG: h: ${a.map((d) => d.getName())} | nh: ${i.map((d) => d.getName())}`), this.checkConditionalHandlesChanged(r, i), this.checkMandatoryHandlesChanged(t, i);
|
15384
15384
|
const s = this.getGlobalPropertyStateManager();
|
15385
15385
|
let o = [];
|
15386
|
-
for (const
|
15387
|
-
i.find((
|
15386
|
+
for (const d of a)
|
15387
|
+
i.find((A) => A.getName() == d.getName()) || (o = [...o, d.getName()]);
|
15388
15388
|
await s.clearAspects(o);
|
15389
|
-
const l = i.map((
|
15390
|
-
if (
|
15391
|
-
const
|
15392
|
-
if (!e.aspects.find((
|
15393
|
-
return
|
15389
|
+
const l = i.map((d) => {
|
15390
|
+
if (d.getType() === U.ColorOption || d.getType() === U.Option) {
|
15391
|
+
const A = d;
|
15392
|
+
if (!e.aspects.find((h) => h.name === A.getName()))
|
15393
|
+
return A.initDefaultVariant();
|
15394
15394
|
}
|
15395
15395
|
});
|
15396
|
-
await Promise.all(l), await Promise.all(i.map((
|
15396
|
+
await Promise.all(l), await Promise.all(i.map((d) => d.applyGlobalState()));
|
15397
|
+
const c = this.globalPropertyStateManager.getGlobalPropertyState();
|
15398
|
+
jt(e.aspects.sort(), c.aspects.sort()) || (console.log("LOG: recurse onChange"), this.onGlobalPropertiesChanged(e, c));
|
15397
15399
|
}
|
15398
15400
|
checkConditionalHandlesChanged(t, e) {
|
15399
15401
|
(() => {
|
@@ -15547,14 +15549,14 @@ class Ql {
|
|
15547
15549
|
* @returns The nodes contained within the execution.
|
15548
15550
|
*/
|
15549
15551
|
getNodes() {
|
15550
|
-
return this.execution.nodes.map((t) => new
|
15552
|
+
return this.execution.nodes.map((t) => new me(t));
|
15551
15553
|
}
|
15552
15554
|
/**
|
15553
15555
|
* @param type The type of node to return.
|
15554
15556
|
* @returns A list of nodes matching the requested type.
|
15555
15557
|
*/
|
15556
15558
|
getNodesByType(t) {
|
15557
|
-
return this.execution.nodes.filter((e) => e.type === t).map((e) => new
|
15559
|
+
return this.execution.nodes.filter((e) => e.type === t).map((e) => new me(e));
|
15558
15560
|
}
|
15559
15561
|
/**
|
15560
15562
|
* @returns A list of input nodes that exist in this execution.
|
@@ -15563,7 +15565,7 @@ class Ql {
|
|
15563
15565
|
return this.execution.nodes.filter(
|
15564
15566
|
(t) => t.type === "StartTerminal"
|
15565
15567
|
/* StartTerminal */
|
15566
|
-
).map((t) => new
|
15568
|
+
).map((t) => new me(t));
|
15567
15569
|
}
|
15568
15570
|
/**
|
15569
15571
|
* @returns A list of out put nodes that exist in this execution.
|
@@ -15572,7 +15574,7 @@ class Ql {
|
|
15572
15574
|
return this.execution.nodes.filter(
|
15573
15575
|
(t) => t.type === "EndTerminal"
|
15574
15576
|
/* EndTerminal */
|
15575
|
-
).map((t) => new
|
15577
|
+
).map((t) => new me(t));
|
15576
15578
|
}
|
15577
15579
|
/**
|
15578
15580
|
* @returns A date object representing the point in time this execution completed.
|
@@ -15589,7 +15591,7 @@ class Ql {
|
|
15589
15591
|
return new Date(this.execution.failedAt);
|
15590
15592
|
}
|
15591
15593
|
}
|
15592
|
-
class
|
15594
|
+
class me {
|
15593
15595
|
constructor(t) {
|
15594
15596
|
this.node = t;
|
15595
15597
|
}
|
@@ -15679,7 +15681,7 @@ class tn {
|
|
15679
15681
|
return t.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new qt(e));
|
15680
15682
|
}
|
15681
15683
|
}
|
15682
|
-
const
|
15684
|
+
const ge = w`
|
15683
15685
|
query GetCustomer($emailAddress: String!) {
|
15684
15686
|
customer(emailAddress: $emailAddress) {
|
15685
15687
|
id
|
@@ -15966,7 +15968,7 @@ const Wl = async (n, t) => {
|
|
15966
15968
|
r.steps.forEach((i) => {
|
15967
15969
|
delete i.data.__typename, i.option?.id && (i.option.defaultVariant?.asset && O.cacheAsset(i.option.defaultVariant.asset), i.option.colorProfile && O.cacheAsset(i.option.colorProfile), i.option.variants?.forEach((s) => {
|
15968
15970
|
s.asset && O.cacheAsset(s.asset), s.thumbnail && O.cacheAsset(s.thumbnail), s.material && O.cacheMaterial(s.material);
|
15969
|
-
}),
|
15971
|
+
}), _t.set({ id: i.option.id }, Promise.resolve(i.option)));
|
15970
15972
|
}), r.finalizeStepConfig || (r.finalizeStepConfig = {}), r.finalizeStepConfig.termsMarkdown = r.finalizeStepConfig.termsMarkdown || r.partner.termsMarkdown;
|
15971
15973
|
}), a;
|
15972
15974
|
}, ql = async (n, t) => {
|
@@ -15975,11 +15977,11 @@ const Wl = async (n, t) => {
|
|
15975
15977
|
throw new Error(`Workflow not found: ${n}`);
|
15976
15978
|
return a;
|
15977
15979
|
}, or = async (n, t) => {
|
15978
|
-
const e = n.map((o) =>
|
15980
|
+
const e = n.map((o) => _t.get({ id: o, options: t })), a = n.filter((o, l) => e[l] === void 0);
|
15979
15981
|
if (a.length === 0)
|
15980
15982
|
return Promise.all(e);
|
15981
15983
|
const r = Wl(a, t), i = a.map(
|
15982
|
-
(o) =>
|
15984
|
+
(o) => _t.set({ id: o, options: t }, ql(o, r))
|
15983
15985
|
), s = e.filter((o) => o !== void 0);
|
15984
15986
|
return await Promise.all(s.concat(i));
|
15985
15987
|
}, vd = async (n, t) => (await or([n], t))[0], Hl = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
@@ -16011,7 +16013,7 @@ class Ed {
|
|
16011
16013
|
} catch (a) {
|
16012
16014
|
throw console.error(a), new ht("Critical - Unable to synchronize workflow state with server.");
|
16013
16015
|
}
|
16014
|
-
}, this.options = t, this.options.applicationKey && Wr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 32.4.0-beta.
|
16016
|
+
}, this.options = t, this.options.applicationKey && Wr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 32.4.0-beta.9d78a1c9-ae55-5d81-b514-8510f08c067b"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
16015
16017
|
}
|
16016
16018
|
configure(t) {
|
16017
16019
|
gt.setHubUrl(t.hubUrl), gt.setServerUrl(t.serverUrl), gt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && Hr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|
@@ -16143,7 +16145,7 @@ class Ed {
|
|
16143
16145
|
}
|
16144
16146
|
async customerHasBundleTemplates(t) {
|
16145
16147
|
const r = (await y.getShadowGraphqlClient().query({
|
16146
|
-
query:
|
16148
|
+
query: ge,
|
16147
16149
|
errorPolicy: "all",
|
16148
16150
|
fetchPolicy: "no-cache",
|
16149
16151
|
variables: {
|
@@ -16162,7 +16164,7 @@ class Ed {
|
|
16162
16164
|
async getOrCreateCustomer(t) {
|
16163
16165
|
this.customer = void 0;
|
16164
16166
|
const e = y.getShadowGraphqlClient(), r = (await e.query({
|
16165
|
-
query:
|
16167
|
+
query: ge,
|
16166
16168
|
errorPolicy: "all",
|
16167
16169
|
fetchPolicy: "no-cache",
|
16168
16170
|
variables: {
|
@@ -16215,7 +16217,7 @@ class Ed {
|
|
16215
16217
|
return this.logOut(), console.error("Failed to refresh tokens."), !1;
|
16216
16218
|
}
|
16217
16219
|
const o = (await y.getShadowGraphqlClient().query({
|
16218
|
-
query:
|
16220
|
+
query: ge,
|
16219
16221
|
errorPolicy: "all",
|
16220
16222
|
fetchPolicy: "no-cache",
|
16221
16223
|
variables: {
|
@@ -16244,7 +16246,7 @@ class Ed {
|
|
16244
16246
|
if (r?.AuthenticationResult) {
|
16245
16247
|
localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`), localStorage.setItem("cognito-tokens", JSON.stringify(r.AuthenticationResult)), localStorage.setItem("cognito-email", t);
|
16246
16248
|
const s = (await y.getShadowGraphqlClient().query({
|
16247
|
-
query:
|
16249
|
+
query: ge,
|
16248
16250
|
errorPolicy: "all",
|
16249
16251
|
fetchPolicy: "no-cache",
|
16250
16252
|
variables: {
|
@@ -16701,12 +16703,12 @@ function Jl(n, t, e, a) {
|
|
16701
16703
|
const o = n, l = Math.max(t.width / e.width, t.height / e.height);
|
16702
16704
|
o.zoom = Math.max(l, n.zoom);
|
16703
16705
|
const c = e.width * o.zoom, d = e.height * o.zoom;
|
16704
|
-
return o.x =
|
16706
|
+
return o.x = pe(n.x, t.width - c, 0), o.y = pe(n.y, t.height - d, 0), o;
|
16705
16707
|
}
|
16706
16708
|
const s = n;
|
16707
|
-
return s.x =
|
16709
|
+
return s.x = pe(s.x, -r, t.width), s.y = pe(s.y, -i, t.height), s;
|
16708
16710
|
}
|
16709
|
-
function
|
16711
|
+
function pe(n, t, e) {
|
16710
16712
|
return Math.min(Math.max(n, t), e);
|
16711
16713
|
}
|
16712
16714
|
class Kl {
|
@@ -16732,7 +16734,7 @@ class Kl {
|
|
16732
16734
|
let i = !1;
|
16733
16735
|
for (let s = 0; s < r.currentFrameSources.length; s++) {
|
16734
16736
|
const o = r.currentFrameSources[s], l = await Ue(o), c = this.frameData ? this.frameData[s] : void 0;
|
16735
|
-
|
16737
|
+
jt(l, c) || (this.frameData || (this.frameData = new Array(r.currentFrameSources.length)), this.frameData[s] = l, i = !0);
|
16736
16738
|
}
|
16737
16739
|
i && (this.onFrameDataChangeListeners.forEach(
|
16738
16740
|
(s) => s(this.frameData)
|
@@ -17508,7 +17510,7 @@ const Zl = w`
|
|
17508
17510
|
console.error("vite-plugin-css-injected-by-js", t);
|
17509
17511
|
}
|
17510
17512
|
})();
|
17511
|
-
var oc = /* @__PURE__ */ ((n) => (n.Manual = "Manual", n.OnStart = "OnStart", n.OnQuit = "OnQuit", n.OnEnd = "OnEnd", n))(oc || {}),
|
17513
|
+
var oc = /* @__PURE__ */ ((n) => (n.Manual = "Manual", n.OnStart = "OnStart", n.OnQuit = "OnQuit", n.OnEnd = "OnEnd", n))(oc || {}), ye = /* @__PURE__ */ ((n) => (n.Email = "Email", n.FirstName = "FirstName", n.LastName = "LastName", n.Phone = "Phone", n.Apartment = "Apartment", n.City = "City", n.Country = "Country", n.OrganizationName = "OrganizationName", n.PostCode = "PostCode", n.State = "State", n.StreetAddress = "StreetAddress", n.Custom = "Custom", n))(ye || {}), K;
|
17512
17514
|
K = { __e: function(n, t, e, a) {
|
17513
17515
|
for (var r, i, s; t = t.__; )
|
17514
17516
|
if ((r = t.__c) && !r.__)
|
@@ -17525,7 +17527,7 @@ function lc() {
|
|
17525
17527
|
for (var n; n = lr.shift(); )
|
17526
17528
|
if (n.__P && n.__H)
|
17527
17529
|
try {
|
17528
|
-
n.__H.__h.forEach(
|
17530
|
+
n.__H.__h.forEach(Se), n.__H.__h.forEach(ha), n.__H.__h = [];
|
17529
17531
|
} catch (t) {
|
17530
17532
|
n.__H.__h = [], K.__e(t, n.__v);
|
17531
17533
|
}
|
@@ -17537,7 +17539,7 @@ K.__b = function(n) {
|
|
17537
17539
|
var t = (st = n.__c).__H;
|
17538
17540
|
t && (ta === st ? (t.__h = [], st.__h = [], t.__.forEach(function(e) {
|
17539
17541
|
e.__N && (e.__ = e.__N), e.__V = ea, e.__N = e.i = void 0;
|
17540
|
-
})) : (t.__h.forEach(
|
17542
|
+
})) : (t.__h.forEach(Se), t.__h.forEach(ha), t.__h = [])), ta = st;
|
17541
17543
|
}, K.diffed = function(n) {
|
17542
17544
|
sn && sn(n);
|
17543
17545
|
var t = n.__c;
|
@@ -17547,7 +17549,7 @@ K.__b = function(n) {
|
|
17547
17549
|
}, K.__c = function(n, t) {
|
17548
17550
|
t.some(function(e) {
|
17549
17551
|
try {
|
17550
|
-
e.__h.forEach(
|
17552
|
+
e.__h.forEach(Se), e.__h = e.__h.filter(function(a) {
|
17551
17553
|
return !a.__ || ha(a);
|
17552
17554
|
});
|
17553
17555
|
} catch (a) {
|
@@ -17561,7 +17563,7 @@ K.__b = function(n) {
|
|
17561
17563
|
var t, e = n.__c;
|
17562
17564
|
e && e.__H && (e.__H.__.forEach(function(a) {
|
17563
17565
|
try {
|
17564
|
-
|
17566
|
+
Se(a);
|
17565
17567
|
} catch (r) {
|
17566
17568
|
t = r;
|
17567
17569
|
}
|
@@ -17574,7 +17576,7 @@ function cc(n) {
|
|
17574
17576
|
}, a = setTimeout(e, 100);
|
17575
17577
|
cn && (t = requestAnimationFrame(e));
|
17576
17578
|
}
|
17577
|
-
function
|
17579
|
+
function Se(n) {
|
17578
17580
|
var t = st, e = n.__c;
|
17579
17581
|
typeof e == "function" && (n.__c = void 0, e()), st = t;
|
17580
17582
|
}
|
@@ -17724,10 +17726,10 @@ export {
|
|
17724
17726
|
ud as BringToFrontCommand,
|
17725
17727
|
Dr as BundleDesignCreationCartAddMode,
|
17726
17728
|
N as CanvasCommand,
|
17727
|
-
|
17729
|
+
he as CollectionProduct,
|
17728
17730
|
Za as ColorOptionGlobalPropertyHandle,
|
17729
17731
|
ms as CommandContext,
|
17730
|
-
|
17732
|
+
ye as ConversionDataType,
|
17731
17733
|
oc as ConversionLocation,
|
17732
17734
|
z as CreateElementCommand,
|
17733
17735
|
qn as CreateLayoutCommand,
|
@@ -17736,7 +17738,7 @@ export {
|
|
17736
17738
|
Bt as DeleteElementCommand,
|
17737
17739
|
No as DigitalContentStepHandle,
|
17738
17740
|
ml as FileUploadGlobalPropertyHandle,
|
17739
|
-
|
17741
|
+
me as FlowExecutionNodeResult,
|
17740
17742
|
Ql as FlowExecutionResult,
|
17741
17743
|
Nl as FlowService,
|
17742
17744
|
Cs as FontAlignmentCommand,
|
@@ -17756,7 +17758,7 @@ export {
|
|
17756
17758
|
od as LayoutElementFactory,
|
17757
17759
|
x as LayoutElementType,
|
17758
17760
|
Y as LayoutNotFoundError,
|
17759
|
-
|
17761
|
+
Yt as LayoutRenderingPurpose,
|
17760
17762
|
Po as MaterialStepHandle,
|
17761
17763
|
Be as MisconfigurationError,
|
17762
17764
|
Fd as MockWorkflowManager,
|
@@ -17773,12 +17775,12 @@ export {
|
|
17773
17775
|
ir as ProductCollection,
|
17774
17776
|
Bl as ProductCollectionProductSortKey,
|
17775
17777
|
qt as ProductWorkflow,
|
17776
|
-
|
17778
|
+
_t as PromiseCache,
|
17777
17779
|
Tn as PromiseQueue,
|
17778
17780
|
xo as QuestionStepHandle,
|
17779
17781
|
Mn as QueueablePromise,
|
17780
17782
|
dd as ResizeCommand,
|
17781
|
-
|
17783
|
+
Jt as ResourceNotFoundError,
|
17782
17784
|
cd as RotateCommand,
|
17783
17785
|
H as ScaleAxis,
|
17784
17786
|
gd as SendBackwardsCommand,
|
@@ -17810,7 +17812,7 @@ export {
|
|
17810
17812
|
Wc as dataUrlFromExternalUrl,
|
17811
17813
|
Dd as deleteBundle,
|
17812
17814
|
Xe as designService,
|
17813
|
-
|
17815
|
+
we as determineCorrectFontSizeAndLines,
|
17814
17816
|
jn as digitalContentStepService,
|
17815
17817
|
dt as domParser,
|
17816
17818
|
Md as duplicateBundle,
|
@@ -17855,7 +17857,7 @@ export {
|
|
17855
17857
|
vd as getWorkflow,
|
17856
17858
|
or as getWorkflows,
|
17857
17859
|
y as graphQlManager,
|
17858
|
-
|
17860
|
+
Ce as illustrationStepService,
|
17859
17861
|
Kc as isCloseToValue,
|
17860
17862
|
Nt as loadFont,
|
17861
17863
|
Hc as matchHexToPms,
|
@@ -17879,7 +17881,7 @@ export {
|
|
17879
17881
|
zc as registerWindowImplementation,
|
17880
17882
|
qa as rehydrateSerializedLayout,
|
17881
17883
|
ei as rgbToPms,
|
17882
|
-
|
17884
|
+
de as rotateAroundPoint,
|
17883
17885
|
wa as sanitizeSvgTree,
|
17884
17886
|
Hr as setBearerAuthenticationToken,
|
17885
17887
|
yn as setCanvasModule,
|