@spiffcommerce/core 34.0.1 → 34.0.2-beta.20039070-24d6-5031-8e0d-26fce12e3e2a
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 +48 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +852 -848
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6,17 +6,17 @@ import { removeTypenameFromVariables as Di } from "@apollo/client/link/remove-ty
|
|
|
6
6
|
import { orientation as ki } from "exifr/dist/mini.umd.cjs";
|
|
7
7
|
import { parse as yn } from "css";
|
|
8
8
|
import Mi from "fuse.js";
|
|
9
|
-
import { Pith as
|
|
9
|
+
import { Pith as Ea } from "pith";
|
|
10
10
|
import Et from "lodash.clonedeep";
|
|
11
11
|
import jt from "lodash.isequal";
|
|
12
|
-
import { jsx as
|
|
12
|
+
import { jsx as x, jsxs as ct, Fragment as Gt } from "preact/jsx-runtime";
|
|
13
13
|
import { parse as la } from "opentype.js";
|
|
14
14
|
import Ti from "handlebars";
|
|
15
15
|
import { dataUriToBuffer as Ni } from "data-uri-to-buffer";
|
|
16
16
|
import { toString as Sn } from "qrcode";
|
|
17
17
|
import { split as ca } from "unicode-default-word-boundary";
|
|
18
18
|
import Qi from "svg-path-bbox";
|
|
19
|
-
import
|
|
19
|
+
import da from "lodash.chunk";
|
|
20
20
|
import { CognitoIdentityProviderClient as Ri, InitiateAuthCommand as Va, RespondToAuthChallengeCommand as Oi } from "@aws-sdk/client-cognito-identity-provider";
|
|
21
21
|
import $i from "dinero.js";
|
|
22
22
|
import * as za from "currency-codes";
|
|
@@ -24,7 +24,7 @@ import vn from "lodash.debounce";
|
|
|
24
24
|
import "fs";
|
|
25
25
|
import "path";
|
|
26
26
|
import Ui from "lodash.omit";
|
|
27
|
-
var Ee = /* @__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))(Ee || {}), En = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(En || {}),
|
|
27
|
+
var Ee = /* @__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))(Ee || {}), En = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(En || {}), V = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(V || {}), E = /* @__PURE__ */ ((n) => (n.Information = "Information", n.Bulk = "Bulk", n.DigitalContent = "DigitalContent", n.Finish = "Finish", n.Frame = "Frame", n.Illustration = "Illustration", n.Introduction = "Introduction", n.Material = "Material", n.Model = "Model", n.Module = "Module", n.Picture = "Picture", n.Photo = "Photo", n.ProductOverlay = "ProductOverlay", n.Question = "Question", n.Shape = "Shape", n.SilentIllustration = "SilentIllustration", n.Text = "Text", n))(E || {}), Li = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Li || {}), Yt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Yt || {}), F = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(F || {}), Vi = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Vi || {}), bn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(bn || {}), zi = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(zi || {}), Gi = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(Gi || {}), ba = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(ba || {}), Wi = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Wi || {}), be = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(be || {}), kt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(kt || {}), 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 || {}), qi = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(qi || {});
|
|
28
28
|
class In extends Error {
|
|
29
29
|
constructor(t) {
|
|
30
30
|
super(t), this.name = this.constructor.name;
|
|
@@ -40,7 +40,7 @@ class Ie extends Zt {
|
|
|
40
40
|
super(`Option not Configured: ${t.stepTitle}`), this.optionId = t?.optionId || "N/A";
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
class
|
|
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
|
}
|
|
@@ -134,7 +134,7 @@ const ji = () => {
|
|
|
134
134
|
} catch {
|
|
135
135
|
return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new Ga();
|
|
136
136
|
}
|
|
137
|
-
},
|
|
137
|
+
}, D = ji();
|
|
138
138
|
class Yi {
|
|
139
139
|
constructor() {
|
|
140
140
|
this.defaultServerUrl = "https://api.au.spiffcommerce.com", this.defaultServicesApiUrl = "https://services.au.spiffcommerce.com", this.defaultHubUrl = "https://hub.au.spiffcommerce.com", this.serverUrl = this.defaultServerUrl, this.servicesApiUrl = this.defaultServicesApiUrl, this.hubUrl = this.defaultHubUrl, this.serverUrlCallbacks = [];
|
|
@@ -162,27 +162,27 @@ class Yi {
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
const pt = new Yi();
|
|
165
|
-
let
|
|
165
|
+
let Aa, ua;
|
|
166
166
|
function nd(n) {
|
|
167
|
-
|
|
167
|
+
Aa = n;
|
|
168
168
|
}
|
|
169
169
|
function id(n) {
|
|
170
|
-
|
|
170
|
+
ua = n;
|
|
171
171
|
}
|
|
172
172
|
function te() {
|
|
173
|
-
return
|
|
173
|
+
return Aa ? new Aa().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);
|
|
176
176
|
}
|
|
177
177
|
function nt(n, t) {
|
|
178
|
-
if (!
|
|
178
|
+
if (!ua) {
|
|
179
179
|
if (typeof window < "u" && window.fetch)
|
|
180
180
|
return window.fetch(n, t);
|
|
181
181
|
if (typeof global < "u" && global.fetch)
|
|
182
182
|
return global.fetch(n, t);
|
|
183
183
|
throw new Error("Fetch implementation is not registered. Please register it before calling this function.");
|
|
184
184
|
}
|
|
185
|
-
return
|
|
185
|
+
return ua(n, t);
|
|
186
186
|
}
|
|
187
187
|
const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @__PURE__ */ new Map(), Pn = async (n) => {
|
|
188
188
|
const t = Wa.get(n);
|
|
@@ -269,7 +269,7 @@ const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @_
|
|
|
269
269
|
}, tr = async (n) => {
|
|
270
270
|
const t = Oe(n), e = new Uint8Array(n), a = Zi(e), i = btoa(a);
|
|
271
271
|
return `data:${t};base64,${i}`;
|
|
272
|
-
},
|
|
272
|
+
}, Ia = (n) => `data:image/svg+xml;base64,${btoa(n)}`, Fn = (n) => {
|
|
273
273
|
const t = n.replace(/\r?\n/g, ""), e = t.indexOf(",");
|
|
274
274
|
if (e === -1 || e <= 4)
|
|
275
275
|
throw new TypeError("malformed data: URI");
|
|
@@ -288,10 +288,10 @@ const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @_
|
|
|
288
288
|
!r || !r.result ? e() : t(r.result.toString());
|
|
289
289
|
}, a.readAsDataURL(n);
|
|
290
290
|
});
|
|
291
|
-
let ar,
|
|
291
|
+
let ar, Ba;
|
|
292
292
|
const nr = (n) => {
|
|
293
|
-
|
|
294
|
-
}, ir = () =>
|
|
293
|
+
Ba = n;
|
|
294
|
+
}, ir = () => Ba;
|
|
295
295
|
let Dn;
|
|
296
296
|
const rr = (n) => {
|
|
297
297
|
Dn = n;
|
|
@@ -302,7 +302,7 @@ const rr = (n) => {
|
|
|
302
302
|
window.parent !== window && (window.addEventListener("message", e, !1), window.parent.postMessage("ready", t));
|
|
303
303
|
}), sr = async () => {
|
|
304
304
|
const n = {
|
|
305
|
-
applicationKey:
|
|
305
|
+
applicationKey: Ba,
|
|
306
306
|
customerToken: ar,
|
|
307
307
|
bearer: Dn
|
|
308
308
|
};
|
|
@@ -342,9 +342,9 @@ class cr {
|
|
|
342
342
|
if (window && window.__SENTRY__) {
|
|
343
343
|
const f = window.__SENTRY__.hub;
|
|
344
344
|
if (f) {
|
|
345
|
-
const
|
|
346
|
-
Object.entries(
|
|
347
|
-
l[w] =
|
|
345
|
+
const v = f.traceHeaders();
|
|
346
|
+
Object.entries(v).forEach(([w, I]) => {
|
|
347
|
+
l[w] = I;
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
350
|
}
|
|
@@ -364,11 +364,11 @@ class cr {
|
|
|
364
364
|
});
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
const
|
|
368
|
-
let
|
|
367
|
+
const S = new cr();
|
|
368
|
+
let ha, ga;
|
|
369
369
|
const ft = (n, t, e) => {
|
|
370
|
-
if (
|
|
371
|
-
return
|
|
370
|
+
if (ha !== void 0)
|
|
371
|
+
return ha(n, t, e);
|
|
372
372
|
try {
|
|
373
373
|
const a = Mn(!0);
|
|
374
374
|
return kn(a), a.createCanvas(n, t, e);
|
|
@@ -376,8 +376,8 @@ const ft = (n, t, e) => {
|
|
|
376
376
|
throw new Error("Canvas module not set");
|
|
377
377
|
}
|
|
378
378
|
}, ee = (n, t) => {
|
|
379
|
-
if (
|
|
380
|
-
return
|
|
379
|
+
if (ga !== void 0)
|
|
380
|
+
return ga(n, t);
|
|
381
381
|
try {
|
|
382
382
|
const e = Mn(!0);
|
|
383
383
|
return kn(e), e.loadImage(n, t);
|
|
@@ -386,7 +386,7 @@ const ft = (n, t, e) => {
|
|
|
386
386
|
}
|
|
387
387
|
};
|
|
388
388
|
function kn(n) {
|
|
389
|
-
|
|
389
|
+
ha = n?.createCanvas, ga = n?.loadImage;
|
|
390
390
|
}
|
|
391
391
|
function Mn(n) {
|
|
392
392
|
try {
|
|
@@ -408,7 +408,7 @@ function Mn(n) {
|
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
let Ye;
|
|
411
|
-
function
|
|
411
|
+
function Pa() {
|
|
412
412
|
return Ye === void 0 && (Ye = _i()), Ye;
|
|
413
413
|
}
|
|
414
414
|
let ce = null;
|
|
@@ -3253,7 +3253,7 @@ const de = (n) => {
|
|
|
3253
3253
|
} catch {
|
|
3254
3254
|
return n.classList.contains(t.substring(1));
|
|
3255
3255
|
}
|
|
3256
|
-
},
|
|
3256
|
+
}, xa = (n, t = !1) => {
|
|
3257
3257
|
!t && n.setAttribute("preserveAspectRatio", "none");
|
|
3258
3258
|
const e = [];
|
|
3259
3259
|
Dt(n, (a) => {
|
|
@@ -3336,12 +3336,12 @@ const de = (n) => {
|
|
|
3336
3336
|
}
|
|
3337
3337
|
});
|
|
3338
3338
|
});
|
|
3339
|
-
}, On = (n) => It().serializeToString(n),
|
|
3339
|
+
}, On = (n) => It().serializeToString(n), Fa = (n, t, e, a, i) => {
|
|
3340
3340
|
const r = Qn(n);
|
|
3341
3341
|
if (!r)
|
|
3342
3342
|
throw new Error("Failed to read SVG.");
|
|
3343
3343
|
return vr(r, t, e), Rn(r, a, i), On(r);
|
|
3344
|
-
},
|
|
3344
|
+
}, Da = (n, t, e) => {
|
|
3345
3345
|
const a = Qn(n);
|
|
3346
3346
|
if (!a)
|
|
3347
3347
|
throw new Error("Failed to read SVG.");
|
|
@@ -3353,7 +3353,7 @@ const de = (n) => {
|
|
|
3353
3353
|
const e = Er(n).firstElementChild;
|
|
3354
3354
|
if (!e)
|
|
3355
3355
|
throw new Error("Failed to read SVG.");
|
|
3356
|
-
|
|
3356
|
+
xa(e);
|
|
3357
3357
|
const a = {};
|
|
3358
3358
|
Dt(e, (o) => {
|
|
3359
3359
|
if (Cr.includes(o.tagName) && !o.attributes.getNamedItem("fill")) {
|
|
@@ -3445,7 +3445,7 @@ const de = (n) => {
|
|
|
3445
3445
|
...AssetFields
|
|
3446
3446
|
}
|
|
3447
3447
|
}
|
|
3448
|
-
`,
|
|
3448
|
+
`, ka = C`
|
|
3449
3449
|
fragment MaterialFields on Material {
|
|
3450
3450
|
id
|
|
3451
3451
|
name
|
|
@@ -3493,7 +3493,7 @@ const de = (n) => {
|
|
|
3493
3493
|
}
|
|
3494
3494
|
}
|
|
3495
3495
|
`, Br = C`
|
|
3496
|
-
${
|
|
3496
|
+
${ka}
|
|
3497
3497
|
query GetMaterials($ids: [String]) {
|
|
3498
3498
|
materials(id: $ids) {
|
|
3499
3499
|
...MaterialFields
|
|
@@ -3520,20 +3520,20 @@ const de = (n) => {
|
|
|
3520
3520
|
...AssetFields
|
|
3521
3521
|
}
|
|
3522
3522
|
}
|
|
3523
|
-
`, Pe = async (n) => (await
|
|
3523
|
+
`, Pe = async (n) => (await S.getShadowGraphqlClient().query({
|
|
3524
3524
|
query: Ir,
|
|
3525
3525
|
errorPolicy: "all",
|
|
3526
3526
|
fetchPolicy: "no-cache",
|
|
3527
3527
|
variables: {
|
|
3528
3528
|
keys: n
|
|
3529
3529
|
}
|
|
3530
|
-
})).data.assets, Fr = async (n) => (await
|
|
3530
|
+
})).data.assets, Fr = async (n) => (await S.getShadowGraphqlClient().query({
|
|
3531
3531
|
query: Br,
|
|
3532
3532
|
errorPolicy: "all",
|
|
3533
3533
|
variables: {
|
|
3534
3534
|
ids: n
|
|
3535
3535
|
}
|
|
3536
|
-
})).data.materials, Dr = async (n, t, e, a, i) => (await
|
|
3536
|
+
})).data.materials, Dr = async (n, t, e, a, i) => (await S.getShadowGraphqlClient().mutate({
|
|
3537
3537
|
mutation: Pr,
|
|
3538
3538
|
errorPolicy: "all",
|
|
3539
3539
|
fetchPolicy: "no-cache",
|
|
@@ -3642,12 +3642,12 @@ class kr {
|
|
|
3642
3642
|
const e = t.key;
|
|
3643
3643
|
if (this.bgrmProcessCache.has(e))
|
|
3644
3644
|
return this.bgrmProcessCache.get(e);
|
|
3645
|
-
if (
|
|
3646
|
-
const r = this.getLocalOrFromServer(
|
|
3645
|
+
if (J.has(e)) {
|
|
3646
|
+
const r = this.getLocalOrFromServer(J.get(e));
|
|
3647
3647
|
return this.bgrmProcessCache.set(e, r), r;
|
|
3648
3648
|
}
|
|
3649
3649
|
const i = (async () => {
|
|
3650
|
-
const r = await
|
|
3650
|
+
const r = await S.getShadowGraphqlClient().mutate({
|
|
3651
3651
|
mutation: xr,
|
|
3652
3652
|
fetchPolicy: "no-cache",
|
|
3653
3653
|
errorPolicy: "all",
|
|
@@ -3657,7 +3657,7 @@ class kr {
|
|
|
3657
3657
|
});
|
|
3658
3658
|
if (this.bgrmProcessCache.delete(e), !r.data?.assetRemoveBackground?.key)
|
|
3659
3659
|
throw new Error("Failed to remove background from image");
|
|
3660
|
-
return ut.add(r.data.assetRemoveBackground),
|
|
3660
|
+
return ut.add(r.data.assetRemoveBackground), J.add(e, r.data.assetRemoveBackground.key), this.cache.set(
|
|
3661
3661
|
r.data.assetRemoveBackground.key,
|
|
3662
3662
|
Promise.resolve(r.data.assetRemoveBackground)
|
|
3663
3663
|
), r.data.assetRemoveBackground;
|
|
@@ -3665,7 +3665,7 @@ class kr {
|
|
|
3665
3665
|
return this.bgrmProcessCache.set(e, i), i;
|
|
3666
3666
|
}
|
|
3667
3667
|
removePersistedAsset(t) {
|
|
3668
|
-
ut.remove(t),
|
|
3668
|
+
ut.remove(t), J.delete(t), J.deleteForBgRemovedKey(t);
|
|
3669
3669
|
}
|
|
3670
3670
|
getPersistedAssets() {
|
|
3671
3671
|
return ut.list();
|
|
@@ -3731,26 +3731,26 @@ const Rt = "persistentAssets", lt = class lt {
|
|
|
3731
3731
|
}
|
|
3732
3732
|
const e = /* @__PURE__ */ new Map();
|
|
3733
3733
|
e.set(t.key || "", t.fileLink);
|
|
3734
|
-
const a =
|
|
3734
|
+
const a = D.getMap(Rt);
|
|
3735
3735
|
a && a.forEach((i, r) => {
|
|
3736
3736
|
e.set(r, i);
|
|
3737
|
-
}),
|
|
3737
|
+
}), D.setMap(Rt, e), lt.executeCallbacks();
|
|
3738
3738
|
}
|
|
3739
3739
|
/**
|
|
3740
3740
|
* Remove an existing asset from persistence. Noop if the asset doesn't exist.
|
|
3741
3741
|
* @param assetKey The key to remove.
|
|
3742
3742
|
*/
|
|
3743
3743
|
static remove(t) {
|
|
3744
|
-
const e =
|
|
3744
|
+
const e = D.getMap(Rt);
|
|
3745
3745
|
if (!e) return;
|
|
3746
3746
|
const a = Array.from(e.entries()).find((i) => i[0] === t);
|
|
3747
|
-
a && (e.delete(a[0]),
|
|
3747
|
+
a && (e.delete(a[0]), D.setMap(Rt, e), lt.executeCallbacks());
|
|
3748
3748
|
}
|
|
3749
3749
|
/**
|
|
3750
3750
|
* Get a list of all persisted assets.
|
|
3751
3751
|
*/
|
|
3752
3752
|
static list() {
|
|
3753
|
-
const t =
|
|
3753
|
+
const t = D.getMap(Rt);
|
|
3754
3754
|
return t ? Array.from(t.entries()).map((e) => ({ assetKey: e[0], src: e[1] })) : [];
|
|
3755
3755
|
}
|
|
3756
3756
|
/**
|
|
@@ -3772,36 +3772,36 @@ const Rt = "persistentAssets", lt = class lt {
|
|
|
3772
3772
|
lt.callbacks = [];
|
|
3773
3773
|
let ut = lt;
|
|
3774
3774
|
const Ja = "bgrmPersistentAssets";
|
|
3775
|
-
class
|
|
3775
|
+
class J {
|
|
3776
3776
|
static has(t) {
|
|
3777
|
-
return
|
|
3777
|
+
return J.getMap().has(t);
|
|
3778
3778
|
}
|
|
3779
3779
|
static get(t) {
|
|
3780
|
-
return
|
|
3780
|
+
return J.getMap().get(t);
|
|
3781
3781
|
}
|
|
3782
3782
|
static keys() {
|
|
3783
|
-
return
|
|
3783
|
+
return J.getMap().keys();
|
|
3784
3784
|
}
|
|
3785
3785
|
static values() {
|
|
3786
|
-
return
|
|
3786
|
+
return J.getMap().values();
|
|
3787
3787
|
}
|
|
3788
3788
|
static add(t, e) {
|
|
3789
|
-
const a =
|
|
3790
|
-
a.set(t, e),
|
|
3789
|
+
const a = J.getMap();
|
|
3790
|
+
a.set(t, e), J.setMap(a);
|
|
3791
3791
|
}
|
|
3792
3792
|
static delete(t) {
|
|
3793
|
-
const e =
|
|
3794
|
-
e.delete(t),
|
|
3793
|
+
const e = J.getMap();
|
|
3794
|
+
e.delete(t), J.setMap(e);
|
|
3795
3795
|
}
|
|
3796
3796
|
static deleteForBgRemovedKey(t) {
|
|
3797
|
-
const e =
|
|
3798
|
-
a && (e.delete(a),
|
|
3797
|
+
const e = J.getMap(), a = Array.from(e.keys()).find((i) => e.get(i) === t);
|
|
3798
|
+
a && (e.delete(a), J.setMap(e));
|
|
3799
3799
|
}
|
|
3800
3800
|
static getMap() {
|
|
3801
|
-
return
|
|
3801
|
+
return D.getMap(Ja) || /* @__PURE__ */ new Map();
|
|
3802
3802
|
}
|
|
3803
3803
|
static setMap(t) {
|
|
3804
|
-
|
|
3804
|
+
D.setMap(Ja, t);
|
|
3805
3805
|
}
|
|
3806
3806
|
}
|
|
3807
3807
|
const U = new kr();
|
|
@@ -3877,7 +3877,7 @@ const _t = new Mr(), $n = C`
|
|
|
3877
3877
|
}
|
|
3878
3878
|
`, Tr = C`
|
|
3879
3879
|
${ae(!1)}
|
|
3880
|
-
${
|
|
3880
|
+
${ka}
|
|
3881
3881
|
${$n}
|
|
3882
3882
|
query GetOptions($ids: [String]!) {
|
|
3883
3883
|
options(ids: $ids) {
|
|
@@ -3885,7 +3885,7 @@ const _t = new Mr(), $n = C`
|
|
|
3885
3885
|
}
|
|
3886
3886
|
}
|
|
3887
3887
|
`, Nr = async (n) => {
|
|
3888
|
-
const t = await
|
|
3888
|
+
const t = await S.getShadowGraphqlClient().query({
|
|
3889
3889
|
query: Tr,
|
|
3890
3890
|
errorPolicy: "all",
|
|
3891
3891
|
variables: {
|
|
@@ -3947,7 +3947,7 @@ class Or {
|
|
|
3947
3947
|
}
|
|
3948
3948
|
}
|
|
3949
3949
|
}
|
|
3950
|
-
const
|
|
3950
|
+
const j = new Or(), Un = C`
|
|
3951
3951
|
fragment ActiveIntegrationFields on Integration {
|
|
3952
3952
|
id
|
|
3953
3953
|
logo
|
|
@@ -4561,7 +4561,7 @@ const Y = new Or(), Un = C`
|
|
|
4561
4561
|
}
|
|
4562
4562
|
`, ao = (n) => C`
|
|
4563
4563
|
${ae(n)}
|
|
4564
|
-
${
|
|
4564
|
+
${ka}
|
|
4565
4565
|
${$n}
|
|
4566
4566
|
${Xr}
|
|
4567
4567
|
${Zr}
|
|
@@ -5126,14 +5126,14 @@ const Y = new Or(), Un = C`
|
|
|
5126
5126
|
timestamp
|
|
5127
5127
|
}
|
|
5128
5128
|
}
|
|
5129
|
-
`, Ot = [
|
|
5129
|
+
`, Ot = [E.SilentIllustration, E.ProductOverlay], uo = async (n) => {
|
|
5130
5130
|
const t = [];
|
|
5131
5131
|
n.introduction && t.push({
|
|
5132
5132
|
name: "Introduction",
|
|
5133
5133
|
title: n.name,
|
|
5134
5134
|
renderableSteps: [
|
|
5135
5135
|
{
|
|
5136
|
-
type:
|
|
5136
|
+
type: E.Introduction,
|
|
5137
5137
|
stepName: "Introduction",
|
|
5138
5138
|
stepTitle: n.name,
|
|
5139
5139
|
helpText: n.introduction,
|
|
@@ -5168,7 +5168,7 @@ const Y = new Or(), Un = C`
|
|
|
5168
5168
|
title: e,
|
|
5169
5169
|
renderableSteps: [
|
|
5170
5170
|
{
|
|
5171
|
-
type:
|
|
5171
|
+
type: E.Finish,
|
|
5172
5172
|
stepName: "Finish",
|
|
5173
5173
|
stepTitle: e,
|
|
5174
5174
|
helpText: "",
|
|
@@ -5203,7 +5203,7 @@ const Y = new Or(), Un = C`
|
|
|
5203
5203
|
for (const o of a)
|
|
5204
5204
|
for (const s of o.renderableSteps) {
|
|
5205
5205
|
const l = (s.option?.variants || []).length;
|
|
5206
|
-
s.silent || (s.type ===
|
|
5206
|
+
s.silent || (s.type === E.Model || s.type === E.Material || s.type === E.Picture || s.type === E.Shape ? (l > 1 || e) && i.push(s.stepName) : i.push(s.stepName));
|
|
5207
5207
|
}
|
|
5208
5208
|
const r = a.filter((o) => o.renderableSteps.filter(
|
|
5209
5209
|
(l) => i.includes(l.stepName)
|
|
@@ -5289,7 +5289,7 @@ class qn {
|
|
|
5289
5289
|
}
|
|
5290
5290
|
}
|
|
5291
5291
|
}
|
|
5292
|
-
const
|
|
5292
|
+
const k = () => {
|
|
5293
5293
|
const n = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
|
|
5294
5294
|
return n() + n() + "-" + n() + "-" + n() + "-" + n() + "-" + n() + n() + n();
|
|
5295
5295
|
}, po = ({
|
|
@@ -5307,14 +5307,14 @@ const M = () => {
|
|
|
5307
5307
|
viewBox: A,
|
|
5308
5308
|
width: u
|
|
5309
5309
|
}) => {
|
|
5310
|
-
const h = e || 0, g = 2 * (l?.scale || 1), m = A || { x: 0, y: 0, width: u, height: r }, p = `${m.x} ${m.y} ${m.width} ${m.height}`, f =
|
|
5310
|
+
const h = e || 0, g = 2 * (l?.scale || 1), m = A || { x: 0, y: 0, width: u, height: r }, p = `${m.x} ${m.y} ${m.width} ${m.height}`, f = k(), v = a.purpose === Yt.FreeDesign && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ x("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ x("rect", { width: m.width, height: m.height, rx: h }) }) }), w = a.colorProfiles?.map((b, P) => (
|
|
5311
5311
|
/* @ts-ignore */
|
|
5312
|
-
/* @__PURE__ */
|
|
5313
|
-
)),
|
|
5314
|
-
...
|
|
5312
|
+
/* @__PURE__ */ x("color-profile", { name: b.name, xlinkHref: b.key, children: " " }, P)
|
|
5313
|
+
)), I = i.map((b) => ({
|
|
5314
|
+
...b,
|
|
5315
5315
|
_renderingConfiguration: a,
|
|
5316
5316
|
mask: l ? `url(#viewmask-${f})` : void 0
|
|
5317
|
-
})),
|
|
5317
|
+
})), y = Ta(I);
|
|
5318
5318
|
return /* @__PURE__ */ ct(
|
|
5319
5319
|
"svg",
|
|
5320
5320
|
{
|
|
@@ -5335,8 +5335,8 @@ const M = () => {
|
|
|
5335
5335
|
viewBox: p,
|
|
5336
5336
|
children: [
|
|
5337
5337
|
w,
|
|
5338
|
-
|
|
5339
|
-
!!n && /* @__PURE__ */
|
|
5338
|
+
v,
|
|
5339
|
+
!!n && /* @__PURE__ */ x(
|
|
5340
5340
|
"rect",
|
|
5341
5341
|
{
|
|
5342
5342
|
id: "layout-background",
|
|
@@ -5346,15 +5346,15 @@ const M = () => {
|
|
|
5346
5346
|
rx: h
|
|
5347
5347
|
}
|
|
5348
5348
|
),
|
|
5349
|
-
/* @__PURE__ */
|
|
5349
|
+
/* @__PURE__ */ x(
|
|
5350
5350
|
"g",
|
|
5351
5351
|
{
|
|
5352
5352
|
id: "element-group",
|
|
5353
5353
|
clipPath: a.purpose === Yt.FreeDesign ? "url(#viewboxClip)" : void 0,
|
|
5354
|
-
children:
|
|
5354
|
+
children: y.map((b) => Zn(b)).filter((b) => !!b)
|
|
5355
5355
|
}
|
|
5356
5356
|
),
|
|
5357
|
-
l && /* @__PURE__ */
|
|
5357
|
+
l && /* @__PURE__ */ x(
|
|
5358
5358
|
"rect",
|
|
5359
5359
|
{
|
|
5360
5360
|
x: l.x,
|
|
@@ -5368,7 +5368,7 @@ const M = () => {
|
|
|
5368
5368
|
}
|
|
5369
5369
|
),
|
|
5370
5370
|
l && /* @__PURE__ */ ct("mask", { id: `viewmask-${f}`, children: [
|
|
5371
|
-
/* @__PURE__ */
|
|
5371
|
+
/* @__PURE__ */ x(
|
|
5372
5372
|
"rect",
|
|
5373
5373
|
{
|
|
5374
5374
|
x: m.x,
|
|
@@ -5378,7 +5378,7 @@ const M = () => {
|
|
|
5378
5378
|
fill: "black"
|
|
5379
5379
|
}
|
|
5380
5380
|
),
|
|
5381
|
-
/* @__PURE__ */
|
|
5381
|
+
/* @__PURE__ */ x(
|
|
5382
5382
|
"rect",
|
|
5383
5383
|
{
|
|
5384
5384
|
x: l.x,
|
|
@@ -5393,12 +5393,12 @@ const M = () => {
|
|
|
5393
5393
|
}
|
|
5394
5394
|
);
|
|
5395
5395
|
}, cd = (n, t, e, a, i) => {
|
|
5396
|
-
const r = Ct(i), o = e / 2, s = a / 2, l = n + o, c = t + s, d = Math.sin(r), A = Math.cos(r), u = o, h = o, g = -s, m = s, p = u * A - g * d, f = h * A - m * d,
|
|
5396
|
+
const r = Ct(i), o = e / 2, s = a / 2, l = n + o, c = t + s, d = Math.sin(r), A = Math.cos(r), u = o, h = o, g = -s, m = s, p = u * A - g * d, f = h * A - m * d, v = u * d + g * A, w = h * d + m * A, I = Math.max(Math.abs(p), Math.abs(f)), y = Math.max(Math.abs(v), Math.abs(w));
|
|
5397
5397
|
return {
|
|
5398
|
-
minX: l -
|
|
5399
|
-
maxX: l +
|
|
5400
|
-
minY: c -
|
|
5401
|
-
maxY: c +
|
|
5398
|
+
minX: l - I,
|
|
5399
|
+
maxX: l + I,
|
|
5400
|
+
minY: c - y,
|
|
5401
|
+
maxY: c + y
|
|
5402
5402
|
};
|
|
5403
5403
|
}, dd = (n, t, e) => {
|
|
5404
5404
|
const a = Math.sqrt(Math.pow(t.x - n.x, 2) + Math.pow(t.y - n.y, 2)), i = Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2)), r = Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2));
|
|
@@ -5423,22 +5423,22 @@ const M = () => {
|
|
|
5423
5423
|
y: n.y + (t?.y + t?.height) * a
|
|
5424
5424
|
}), Bt = (n) => {
|
|
5425
5425
|
switch (n) {
|
|
5426
|
-
case
|
|
5427
|
-
return
|
|
5428
|
-
case
|
|
5429
|
-
return
|
|
5430
|
-
case
|
|
5431
|
-
return
|
|
5432
|
-
case
|
|
5433
|
-
return
|
|
5434
|
-
case
|
|
5435
|
-
return
|
|
5436
|
-
case
|
|
5437
|
-
return
|
|
5438
|
-
case
|
|
5439
|
-
return
|
|
5440
|
-
case
|
|
5441
|
-
return
|
|
5426
|
+
case H.North:
|
|
5427
|
+
return H.East;
|
|
5428
|
+
case H.East:
|
|
5429
|
+
return H.South;
|
|
5430
|
+
case H.South:
|
|
5431
|
+
return H.West;
|
|
5432
|
+
case H.West:
|
|
5433
|
+
return H.North;
|
|
5434
|
+
case H.Northwest:
|
|
5435
|
+
return H.Northeast;
|
|
5436
|
+
case H.Northeast:
|
|
5437
|
+
return H.Southeast;
|
|
5438
|
+
case H.Southeast:
|
|
5439
|
+
return H.Southwest;
|
|
5440
|
+
case H.Southwest:
|
|
5441
|
+
return H.Northwest;
|
|
5442
5442
|
}
|
|
5443
5443
|
}, fd = (n, t) => t > 45 && t <= 135 ? Bt(n) : t > 135 && t <= 225 ? Bt(Bt(n)) : t > 225 && t <= 315 ? Bt(Bt(Bt(n))) : n, Cd = (n, t = { x: 0, y: 0 }, e = { x: 1, y: 1 }) => {
|
|
5444
5444
|
const a = Ct(n.rotation), i = {
|
|
@@ -5472,7 +5472,7 @@ const M = () => {
|
|
|
5472
5472
|
};
|
|
5473
5473
|
}, wd = 0.352778, yd = 0.035277, Hn = (n) => {
|
|
5474
5474
|
const t = n.rotation || 0, e = Ct(t), a = Math.cos(e), i = -Math.sin(e);
|
|
5475
|
-
return /* @__PURE__ */
|
|
5475
|
+
return /* @__PURE__ */ x("g", { mask: n.stepName || n.productOverlay ? void 0 : n.mask, children: /* @__PURE__ */ x(
|
|
5476
5476
|
"g",
|
|
5477
5477
|
{
|
|
5478
5478
|
transform: `
|
|
@@ -5481,7 +5481,7 @@ const M = () => {
|
|
|
5481
5481
|
matrix(${a}, ${-i}, ${i}, ${a}, 0, 0)
|
|
5482
5482
|
matrix(1, 0, 0, 1, ${-n.width / 2}, ${-n.height / 2})
|
|
5483
5483
|
`,
|
|
5484
|
-
children: /* @__PURE__ */
|
|
5484
|
+
children: /* @__PURE__ */ x(
|
|
5485
5485
|
"image",
|
|
5486
5486
|
{
|
|
5487
5487
|
xlinkHref: n.src,
|
|
@@ -5493,9 +5493,9 @@ const M = () => {
|
|
|
5493
5493
|
}
|
|
5494
5494
|
) });
|
|
5495
5495
|
}, jn = (n) => {
|
|
5496
|
-
const t = `spiff-group-clip-${n.id}`, e = n.rotation || 0, a = Ct(e), i = Math.cos(a), r = -Math.sin(a), o =
|
|
5496
|
+
const t = `spiff-group-clip-${n.id}`, e = n.rotation || 0, a = Ct(e), i = Math.cos(a), r = -Math.sin(a), o = Ta(n.children);
|
|
5497
5497
|
return /* @__PURE__ */ ct(Gt, { children: [
|
|
5498
|
-
/* @__PURE__ */
|
|
5498
|
+
/* @__PURE__ */ x("defs", { children: /* @__PURE__ */ x("clipPath", { id: t, preserveAspectRatio: "none", children: n.clipPath ? /* @__PURE__ */ x("path", { d: n.clipPath }) : /* @__PURE__ */ x("rect", { x: 0, y: 0, width: n.width, height: n.height }) }) }),
|
|
5499
5499
|
/* @__PURE__ */ ct(
|
|
5500
5500
|
"g",
|
|
5501
5501
|
{
|
|
@@ -5506,7 +5506,7 @@ const M = () => {
|
|
|
5506
5506
|
matrix(1, 0, 0, 1, ${-n.width / 2}, ${-n.height / 2})
|
|
5507
5507
|
`,
|
|
5508
5508
|
children: [
|
|
5509
|
-
n._renderingConfiguration?.debug ? /* @__PURE__ */
|
|
5509
|
+
n._renderingConfiguration?.debug ? /* @__PURE__ */ x(
|
|
5510
5510
|
"rect",
|
|
5511
5511
|
{
|
|
5512
5512
|
stroke: "red",
|
|
@@ -5518,7 +5518,7 @@ const M = () => {
|
|
|
5518
5518
|
height: n.height
|
|
5519
5519
|
}
|
|
5520
5520
|
) : void 0,
|
|
5521
|
-
o.map((l) => Zn(l)).filter((l) => !!l).map((l) => /* @__PURE__ */
|
|
5521
|
+
o.map((l) => Zn(l)).filter((l) => !!l).map((l) => /* @__PURE__ */ x("g", { clipPath: `url(#${t})`, children: l }))
|
|
5522
5522
|
]
|
|
5523
5523
|
}
|
|
5524
5524
|
)
|
|
@@ -5528,15 +5528,15 @@ const M = () => {
|
|
|
5528
5528
|
if (!n.pattern)
|
|
5529
5529
|
return "";
|
|
5530
5530
|
if (n.pattern.svg) {
|
|
5531
|
-
const A =
|
|
5532
|
-
return
|
|
5531
|
+
const A = Da(n.pattern.svg, n.pattern.colors || {}, !1);
|
|
5532
|
+
return Ia(A);
|
|
5533
5533
|
}
|
|
5534
5534
|
return n.pattern.src;
|
|
5535
5535
|
};
|
|
5536
5536
|
if (!a())
|
|
5537
|
-
return /* @__PURE__ */
|
|
5538
|
-
const i = () => n.threshold ? n.invertThreshold ? "1 ".repeat(n.threshold) + "0 ".repeat(256 - n.threshold) : "0 ".repeat(n.threshold) + "1 ".repeat(256 - n.threshold) : "", r = () => /* @__PURE__ */
|
|
5539
|
-
/* @__PURE__ */
|
|
5537
|
+
return /* @__PURE__ */ x(Gt, {});
|
|
5538
|
+
const i = () => n.threshold ? n.invertThreshold ? "1 ".repeat(n.threshold) + "0 ".repeat(256 - n.threshold) : "0 ".repeat(n.threshold) + "1 ".repeat(256 - n.threshold) : "", r = () => /* @__PURE__ */ x(Gt, { children: n.useThreshold && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ ct("filter", { id: e, "color-interpolation-filters": "sRGB", children: [
|
|
5539
|
+
/* @__PURE__ */ x(
|
|
5540
5540
|
"feColorMatrix",
|
|
5541
5541
|
{
|
|
5542
5542
|
type: "matrix",
|
|
@@ -5550,9 +5550,9 @@ const M = () => {
|
|
|
5550
5550
|
}
|
|
5551
5551
|
),
|
|
5552
5552
|
/* @__PURE__ */ ct("feComponentTransfer", { in: "greyscale", children: [
|
|
5553
|
-
/* @__PURE__ */
|
|
5554
|
-
/* @__PURE__ */
|
|
5555
|
-
/* @__PURE__ */
|
|
5553
|
+
/* @__PURE__ */ x("feFuncR", { type: "discrete", tableValues: i() }),
|
|
5554
|
+
/* @__PURE__ */ x("feFuncG", { type: "discrete", tableValues: i() }),
|
|
5555
|
+
/* @__PURE__ */ x("feFuncB", { type: "discrete", tableValues: i() })
|
|
5556
5556
|
] })
|
|
5557
5557
|
] }) }) }), o = n.rotation || 0, s = Ct(o), l = Math.cos(s), c = -Math.sin(s), d = () => {
|
|
5558
5558
|
const A = n.pattern?.x || 0, u = n.pattern?.y || 0, h = n.pattern?.width || 0, g = n.pattern?.height || 0, m = n.pattern?.scaleX || 1, p = n.pattern?.scaleY || 1, f = n.pattern?.rotation || 0;
|
|
@@ -5580,13 +5580,13 @@ const M = () => {
|
|
|
5580
5580
|
};
|
|
5581
5581
|
return /* @__PURE__ */ ct(Gt, { children: [
|
|
5582
5582
|
r(),
|
|
5583
|
-
/* @__PURE__ */
|
|
5583
|
+
/* @__PURE__ */ x(
|
|
5584
5584
|
"g",
|
|
5585
5585
|
{
|
|
5586
5586
|
opacity: n.opacity,
|
|
5587
5587
|
mask: n.stepName ? void 0 : n.mask,
|
|
5588
5588
|
filter: n.useThreshold ? `url(#${e})` : void 0,
|
|
5589
|
-
children: /* @__PURE__ */
|
|
5589
|
+
children: /* @__PURE__ */ x(
|
|
5590
5590
|
"g",
|
|
5591
5591
|
{
|
|
5592
5592
|
transform: `
|
|
@@ -5596,7 +5596,7 @@ const M = () => {
|
|
|
5596
5596
|
matrix(1, 0, 0, 1, ${-n.width / 2}, ${-n.height / 2})
|
|
5597
5597
|
matrix(${n.scaleX}, 0, 0, ${n.scaleY}, 0, 0)
|
|
5598
5598
|
`,
|
|
5599
|
-
children: /* @__PURE__ */
|
|
5599
|
+
children: /* @__PURE__ */ x(
|
|
5600
5600
|
jn,
|
|
5601
5601
|
{
|
|
5602
5602
|
id: t,
|
|
@@ -5673,23 +5673,23 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
|
|
|
5673
5673
|
} catch {
|
|
5674
5674
|
if (wo(n)) {
|
|
5675
5675
|
const a = Fn(n), i = la(a);
|
|
5676
|
-
return
|
|
5676
|
+
return ma(n, i), i;
|
|
5677
5677
|
} else {
|
|
5678
5678
|
const a = await Re(n, !0), i = la(a);
|
|
5679
|
-
return
|
|
5679
|
+
return ma(n, i), await Xi(i, n), i;
|
|
5680
5680
|
}
|
|
5681
5681
|
}
|
|
5682
5682
|
})();
|
|
5683
5683
|
return Ke.set(n, e), e;
|
|
5684
5684
|
}, yo = (n) => {
|
|
5685
5685
|
const t = Fn(n), e = la(t);
|
|
5686
|
-
return
|
|
5686
|
+
return ma(n, e), e;
|
|
5687
5687
|
}, wt = (n) => {
|
|
5688
5688
|
const t = Yn.get(n);
|
|
5689
5689
|
if (t)
|
|
5690
5690
|
return t;
|
|
5691
5691
|
throw new Error("Font metrics unavailable for font");
|
|
5692
|
-
},
|
|
5692
|
+
}, ma = (n, t) => {
|
|
5693
5693
|
const e = new Co(t);
|
|
5694
5694
|
return Yn.set(n, e), e;
|
|
5695
5695
|
}, Sd = async (n) => {
|
|
@@ -5706,23 +5706,23 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
|
|
|
5706
5706
|
});
|
|
5707
5707
|
const o = e.querySelectorAll("tspan");
|
|
5708
5708
|
for (let d = 0; d < o.length; d++) {
|
|
5709
|
-
const A = o.item(d), u = A.closest("text"), h = A.closest("g"), g = u.getAttribute("font-family"), m = await Tt(i.get(g)), p = u.getAttribute("fill"), f = u.getAttribute("stroke"),
|
|
5709
|
+
const A = o.item(d), u = A.closest("text"), h = A.closest("g"), g = u.getAttribute("font-family"), m = await Tt(i.get(g)), p = u.getAttribute("fill"), f = u.getAttribute("stroke"), v = u.getAttribute("stroke-width"), w = m.getPath(
|
|
5710
5710
|
A.innerHTML,
|
|
5711
5711
|
0,
|
|
5712
5712
|
0,
|
|
5713
5713
|
parseInt(u.getAttribute("font-size") ?? "72")
|
|
5714
|
-
),
|
|
5715
|
-
let
|
|
5716
|
-
const
|
|
5717
|
-
|
|
5718
|
-
const
|
|
5714
|
+
), I = w.getBoundingBox().x2 - w.getBoundingBox().x1;
|
|
5715
|
+
let y = 0;
|
|
5716
|
+
const b = A.getAttribute("text-anchor");
|
|
5717
|
+
b === "middle" ? y = I / 2 : b === "end" && (y = I);
|
|
5718
|
+
const P = m.getPath(
|
|
5719
5719
|
A.innerHTML,
|
|
5720
|
-
parseFloat(A.getAttribute("x") ?? "0") -
|
|
5720
|
+
parseFloat(A.getAttribute("x") ?? "0") - y,
|
|
5721
5721
|
parseFloat(A.getAttribute("y") ?? "0"),
|
|
5722
5722
|
parseInt(u.getAttribute("font-size") ?? "72")
|
|
5723
5723
|
);
|
|
5724
|
-
|
|
5725
|
-
const N =
|
|
5724
|
+
P.fill = p, P.stroke = f, P.strokeWidth = parseFloat(v ?? "0");
|
|
5725
|
+
const N = P.toSVG(2), B = t.parseFromString(N, "image/svg+xml").firstElementChild;
|
|
5726
5726
|
h.appendChild(B);
|
|
5727
5727
|
}
|
|
5728
5728
|
return e.querySelectorAll("text").forEach((d) => d.remove()), It().serializeToString(a);
|
|
@@ -5877,7 +5877,7 @@ const Po = (n) => {
|
|
|
5877
5877
|
const h = () => n.textFillImage ? `url("#${o}")` : n._renderingConfiguration?.spotColors && n.fillSpotColorDefinition ? `${n.fill} ${Tn(n.fillSpotColorDefinition)}` : n.fill;
|
|
5878
5878
|
return /* @__PURE__ */ ct(Gt, { children: [
|
|
5879
5879
|
/* @__PURE__ */ ct("defs", { children: [
|
|
5880
|
-
n.textFillImage && /* @__PURE__ */
|
|
5880
|
+
n.textFillImage && /* @__PURE__ */ x(
|
|
5881
5881
|
"pattern",
|
|
5882
5882
|
{
|
|
5883
5883
|
id: o,
|
|
@@ -5886,7 +5886,7 @@ const Po = (n) => {
|
|
|
5886
5886
|
height: n.textFillImage.scale * n.textFillImage.height,
|
|
5887
5887
|
x: 0,
|
|
5888
5888
|
y: 0,
|
|
5889
|
-
children: /* @__PURE__ */
|
|
5889
|
+
children: /* @__PURE__ */ x(
|
|
5890
5890
|
"image",
|
|
5891
5891
|
{
|
|
5892
5892
|
href: n.textFillImage.src,
|
|
@@ -5897,7 +5897,7 @@ const Po = (n) => {
|
|
|
5897
5897
|
)
|
|
5898
5898
|
}
|
|
5899
5899
|
),
|
|
5900
|
-
/* @__PURE__ */
|
|
5900
|
+
/* @__PURE__ */ x(
|
|
5901
5901
|
"style",
|
|
5902
5902
|
{
|
|
5903
5903
|
type: "text/css",
|
|
@@ -5911,10 +5911,10 @@ const Po = (n) => {
|
|
|
5911
5911
|
}
|
|
5912
5912
|
}
|
|
5913
5913
|
),
|
|
5914
|
-
n.curved && n.paths ? /* @__PURE__ */
|
|
5914
|
+
n.curved && n.paths ? /* @__PURE__ */ x("path", { id: r, d: n.paths[0] }) : void 0
|
|
5915
5915
|
] }),
|
|
5916
|
-
n._renderingConfiguration?.debug ? /* @__PURE__ */
|
|
5917
|
-
/* @__PURE__ */
|
|
5916
|
+
n._renderingConfiguration?.debug ? /* @__PURE__ */ x("rect", { stroke: "blue", fill: "none", x: n.x, y: n.y, width: n.width, height: n.height }) : void 0,
|
|
5917
|
+
/* @__PURE__ */ x("g", { mask: n.stepName ? void 0 : n.mask, children: /* @__PURE__ */ x("g", { transform: `matrix(${a}, ${-i}, ${i}, ${a}, ${s}, ${l})`, children: /* @__PURE__ */ x(
|
|
5918
5918
|
"text",
|
|
5919
5919
|
{
|
|
5920
5920
|
xmlSpace: "preserve",
|
|
@@ -5929,7 +5929,7 @@ const Po = (n) => {
|
|
|
5929
5929
|
},
|
|
5930
5930
|
stroke: A,
|
|
5931
5931
|
strokeWidth: u,
|
|
5932
|
-
children: n.curved ? /* @__PURE__ */
|
|
5932
|
+
children: n.curved ? /* @__PURE__ */ x(Fo, { text: c, curvedPathId: r, align: n.align }) : d.map((g, m) => /* @__PURE__ */ x(
|
|
5933
5933
|
xo,
|
|
5934
5934
|
{
|
|
5935
5935
|
align: n.vertical ? "center" : n.align,
|
|
@@ -5966,10 +5966,10 @@ const Po = (n) => {
|
|
|
5966
5966
|
const o = (n.amountLines - 1) / 2;
|
|
5967
5967
|
return (n.thisLineIdx - o) * i + n.fontSize / 4;
|
|
5968
5968
|
};
|
|
5969
|
-
return /* @__PURE__ */
|
|
5969
|
+
return /* @__PURE__ */ x("tspan", { textAnchor: Kn(n.align), x: e(), y: `${a()}px`, children: n.text });
|
|
5970
5970
|
}, Fo = (n) => {
|
|
5971
5971
|
const t = `#${n.curvedPathId}`;
|
|
5972
|
-
return /* @__PURE__ */
|
|
5972
|
+
return /* @__PURE__ */ x(
|
|
5973
5973
|
"textPath",
|
|
5974
5974
|
{
|
|
5975
5975
|
startOffset: n.align === "left" ? "0%" : n.align === "right" ? "100%" : "50%",
|
|
@@ -5981,7 +5981,7 @@ const Po = (n) => {
|
|
|
5981
5981
|
);
|
|
5982
5982
|
}, Do = (n) => {
|
|
5983
5983
|
if (n.cachedObjectURL && !n._renderingConfiguration?.omitCachedFields)
|
|
5984
|
-
return /* @__PURE__ */
|
|
5984
|
+
return /* @__PURE__ */ x(
|
|
5985
5985
|
Hn,
|
|
5986
5986
|
{
|
|
5987
5987
|
id: n.id,
|
|
@@ -6006,12 +6006,12 @@ const Po = (n) => {
|
|
|
6006
6006
|
throw new Error(
|
|
6007
6007
|
`Illustration element ${n.id} (stepName ${n.stepName}) lacked svg from src ${n.src} at render time.`
|
|
6008
6008
|
);
|
|
6009
|
-
return /* @__PURE__ */
|
|
6009
|
+
return /* @__PURE__ */ x("g", { mask: n.stepName ? void 0 : n.mask, children: /* @__PURE__ */ x(
|
|
6010
6010
|
"g",
|
|
6011
6011
|
{
|
|
6012
6012
|
transform: r,
|
|
6013
6013
|
dangerouslySetInnerHTML: {
|
|
6014
|
-
__html:
|
|
6014
|
+
__html: Fa(
|
|
6015
6015
|
n.svg,
|
|
6016
6016
|
n.width,
|
|
6017
6017
|
n.height,
|
|
@@ -6024,7 +6024,7 @@ const Po = (n) => {
|
|
|
6024
6024
|
};
|
|
6025
6025
|
class ko {
|
|
6026
6026
|
constructor() {
|
|
6027
|
-
this.id =
|
|
6027
|
+
this.id = k(), this.stateCallbacks = [], this.prevCommands = [], this.nextCommands = [];
|
|
6028
6028
|
}
|
|
6029
6029
|
registerStateCallback(t) {
|
|
6030
6030
|
this.stateCallbacks.push(t);
|
|
@@ -6087,7 +6087,7 @@ class ko {
|
|
|
6087
6087
|
layout: t,
|
|
6088
6088
|
elements: e
|
|
6089
6089
|
},
|
|
6090
|
-
getComponentWithProps: (a) =>
|
|
6090
|
+
getComponentWithProps: (a) => Ma(t, e, a)
|
|
6091
6091
|
};
|
|
6092
6092
|
}
|
|
6093
6093
|
initialize(t, e) {
|
|
@@ -6112,9 +6112,9 @@ class ko {
|
|
|
6112
6112
|
return { ...t, transaction: e.apply(a) };
|
|
6113
6113
|
}
|
|
6114
6114
|
}
|
|
6115
|
-
const Zn = (n) => n.type === F.Image ? /* @__PURE__ */
|
|
6115
|
+
const Zn = (n) => n.type === F.Image ? /* @__PURE__ */ x(Hn, { ...n }, n.id) : n.type === F.Frame ? /* @__PURE__ */ x(fo, { ...n }, n.id) : n.type === F.Illustration ? /* @__PURE__ */ x(Do, { ...n }, n.id) : n.type === F.Textbox ? /* @__PURE__ */ x(Po, { ...n }, n.id) : n.type === F.Group ? /* @__PURE__ */ x(jn, { ...n }, n.id) : null, Ma = (n, t, e) => {
|
|
6116
6116
|
const a = e.renderingConfiguration, i = a?.removeExcludedElements ? t.filter((r) => !r.excludeFromExport) : t;
|
|
6117
|
-
return /* @__PURE__ */
|
|
6117
|
+
return /* @__PURE__ */ x(
|
|
6118
6118
|
po,
|
|
6119
6119
|
{
|
|
6120
6120
|
preserveAspectRatio: void 0,
|
|
@@ -6143,7 +6143,7 @@ const Zn = (n) => n.type === F.Image ? /* @__PURE__ */ P(Hn, { ...n }, n.id) : n
|
|
|
6143
6143
|
}
|
|
6144
6144
|
);
|
|
6145
6145
|
};
|
|
6146
|
-
function
|
|
6146
|
+
function Ta(n) {
|
|
6147
6147
|
return n.sort((t, e) => {
|
|
6148
6148
|
const a = t.layer || 0, i = e.layer || 0;
|
|
6149
6149
|
if (a < i) return -1;
|
|
@@ -6163,10 +6163,10 @@ const re = (n) => {
|
|
|
6163
6163
|
}, ht = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), Xe = /* @__PURE__ */ new Map(), ti = async (n, t) => {
|
|
6164
6164
|
if (!t) {
|
|
6165
6165
|
if (!n) throw new Error("No region or src supplied. Cannot construct frame!");
|
|
6166
|
-
return
|
|
6166
|
+
return pa(n);
|
|
6167
6167
|
}
|
|
6168
6168
|
return at(t);
|
|
6169
|
-
},
|
|
6169
|
+
}, pa = (n) => {
|
|
6170
6170
|
const t = n.width, e = n.height;
|
|
6171
6171
|
return `<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 ${t} ${e}'>
|
|
6172
6172
|
<path id="target-path" d='M0 0 h ${t} v ${e} h ${-t} Z' />
|
|
@@ -6220,7 +6220,7 @@ const re = (n) => {
|
|
|
6220
6220
|
throw new Error("Malformed frame SVG");
|
|
6221
6221
|
})();
|
|
6222
6222
|
return Xe.set(n, e), e;
|
|
6223
|
-
},
|
|
6223
|
+
}, Na = (n, t, e, a) => {
|
|
6224
6224
|
const i = t.width / t.height, r = n.width / n.height;
|
|
6225
6225
|
let o;
|
|
6226
6226
|
a ? r > i ? o = t.height / n.height : o = t.width / n.width : r > i ? o = t.width / n.width : o = t.height / n.height, e?.scale !== void 0 && (o *= e?.scale);
|
|
@@ -6230,7 +6230,7 @@ const re = (n) => {
|
|
|
6230
6230
|
y: u,
|
|
6231
6231
|
zoom: o
|
|
6232
6232
|
};
|
|
6233
|
-
},
|
|
6233
|
+
}, fa = async (n) => {
|
|
6234
6234
|
if (ht.has(n))
|
|
6235
6235
|
return ht.get(n);
|
|
6236
6236
|
if (n.startsWith("data:image/svg+xml")) {
|
|
@@ -6243,7 +6243,7 @@ const re = (n) => {
|
|
|
6243
6243
|
return ht.set(n, r), r;
|
|
6244
6244
|
}
|
|
6245
6245
|
if ((n.split(".").pop()?.toLowerCase() ?? "") === "svg") {
|
|
6246
|
-
const e = await
|
|
6246
|
+
const e = await Qa(n), a = e.width, i = e.height, r = {
|
|
6247
6247
|
src: n,
|
|
6248
6248
|
width: a,
|
|
6249
6249
|
height: i,
|
|
@@ -6259,7 +6259,7 @@ const re = (n) => {
|
|
|
6259
6259
|
};
|
|
6260
6260
|
return ht.set(n, i), i;
|
|
6261
6261
|
}
|
|
6262
|
-
},
|
|
6262
|
+
}, Qa = async (n) => {
|
|
6263
6263
|
const t = await at(n);
|
|
6264
6264
|
return ei(t);
|
|
6265
6265
|
}, Xa = (n) => n.endsWith("mm") ? Number(n.replace("mm", "")) * 3.7795275591 : n.endsWith("px") ? Number(n.replace("px", "")) : Number(n), ei = (n) => {
|
|
@@ -6298,12 +6298,12 @@ const re = (n) => {
|
|
|
6298
6298
|
const o = dt().parseFromString(n, "image/svg+xml").firstElementChild;
|
|
6299
6299
|
if (!o)
|
|
6300
6300
|
throw new Error("Failed to read SVG");
|
|
6301
|
-
const l = It().serializeToString(o), c = ft(), d = c.getContext("2d"), A = await
|
|
6301
|
+
const l = It().serializeToString(o), c = ft(), d = c.getContext("2d"), A = await Ea.from(d, l, {
|
|
6302
6302
|
anonymousCrossOrigin: !0,
|
|
6303
6303
|
ignoreDimensions: !1,
|
|
6304
6304
|
createCanvas: ft,
|
|
6305
6305
|
createImage: ee,
|
|
6306
|
-
DOMParser:
|
|
6306
|
+
DOMParser: Pa(),
|
|
6307
6307
|
fetch: nt
|
|
6308
6308
|
}), u = o.getAttribute("width"), h = o.getAttribute("height"), g = 2048;
|
|
6309
6309
|
if (h && u) {
|
|
@@ -6349,7 +6349,7 @@ class vd {
|
|
|
6349
6349
|
static async getFrame(t, e) {
|
|
6350
6350
|
const a = await ti(e.region, e.src), i = await Ve(a), r = e.region || await Ut(t, F.Frame);
|
|
6351
6351
|
return {
|
|
6352
|
-
id:
|
|
6352
|
+
id: k(),
|
|
6353
6353
|
x: r.left,
|
|
6354
6354
|
y: r.top,
|
|
6355
6355
|
width: r.width,
|
|
@@ -6375,7 +6375,7 @@ class vd {
|
|
|
6375
6375
|
static async getImage(t, e) {
|
|
6376
6376
|
const a = e.region || await Ut(t, F.Image, e.src);
|
|
6377
6377
|
return {
|
|
6378
|
-
id:
|
|
6378
|
+
id: k(),
|
|
6379
6379
|
src: e.src,
|
|
6380
6380
|
type: F.Image,
|
|
6381
6381
|
y: a.top,
|
|
@@ -6401,7 +6401,7 @@ class vd {
|
|
|
6401
6401
|
fontScale: a.size ? a.size / o.unitsPerEm : void 0
|
|
6402
6402
|
}), u = ie(
|
|
6403
6403
|
{
|
|
6404
|
-
id:
|
|
6404
|
+
id: k(),
|
|
6405
6405
|
type: F.Textbox,
|
|
6406
6406
|
x: A.left,
|
|
6407
6407
|
y: A.top,
|
|
@@ -6462,7 +6462,7 @@ class vd {
|
|
|
6462
6462
|
</svg>
|
|
6463
6463
|
`, i = {};
|
|
6464
6464
|
i["spiff-fill-shape"] = { browserValue: e.color };
|
|
6465
|
-
const r = e.region?.item || await Ut(t, F.Illustration), o =
|
|
6465
|
+
const r = e.region?.item || await Ut(t, F.Illustration), o = k();
|
|
6466
6466
|
return {
|
|
6467
6467
|
stepRegion: e.region?.item,
|
|
6468
6468
|
stepRegionIndex: e.region?.index,
|
|
@@ -6481,7 +6481,7 @@ class vd {
|
|
|
6481
6481
|
};
|
|
6482
6482
|
}
|
|
6483
6483
|
static async getIllustration(t, e) {
|
|
6484
|
-
const a = e.region?.item || await Ut(t, F.Illustration, e.src), i = await st(await ai(e.src)), r = await Xt(i.svg), o =
|
|
6484
|
+
const a = e.region?.item || await Ut(t, F.Illustration, e.src), i = await st(await ai(e.src)), r = await Xt(i.svg), o = k();
|
|
6485
6485
|
return {
|
|
6486
6486
|
cachedObjectURL: r,
|
|
6487
6487
|
stepRegion: e.region?.item,
|
|
@@ -6502,22 +6502,22 @@ class vd {
|
|
|
6502
6502
|
};
|
|
6503
6503
|
}
|
|
6504
6504
|
}
|
|
6505
|
-
class
|
|
6505
|
+
class z extends Error {
|
|
6506
6506
|
constructor() {
|
|
6507
|
-
super("Element not found!"), Object.setPrototypeOf(this,
|
|
6507
|
+
super("Element not found!"), Object.setPrototypeOf(this, z.prototype);
|
|
6508
6508
|
}
|
|
6509
6509
|
}
|
|
6510
|
-
const
|
|
6510
|
+
const L = (n, t) => _(n, t).elements.find((i) => i.id === n), _ = (n, t) => {
|
|
6511
6511
|
const e = Object.values(t).find((a) => a.elements.some((i) => i.id === n));
|
|
6512
6512
|
if (!e)
|
|
6513
|
-
throw new
|
|
6513
|
+
throw new z();
|
|
6514
6514
|
return e;
|
|
6515
6515
|
}, Z = (n, t) => {
|
|
6516
|
-
const e = [...t.elements.filter((i) => i.id !== n.id), n], a =
|
|
6516
|
+
const e = [...t.elements.filter((i) => i.id !== n.id), n], a = Ta(e);
|
|
6517
6517
|
return {
|
|
6518
6518
|
layout: t.layout,
|
|
6519
6519
|
elements: a,
|
|
6520
|
-
modificationID:
|
|
6520
|
+
modificationID: k()
|
|
6521
6521
|
};
|
|
6522
6522
|
}, Za = async (n) => {
|
|
6523
6523
|
const t = [...Object.keys(n.layouts)], e = [...new Set(t)];
|
|
@@ -6529,7 +6529,7 @@ const V = (n, t) => X(n, t).elements.find((i) => i.id === n), X = (n, t) => {
|
|
|
6529
6529
|
const s = o;
|
|
6530
6530
|
if (s.src && !s.svg) {
|
|
6531
6531
|
const l = await at(s.src), c = await st(l);
|
|
6532
|
-
s.svg =
|
|
6532
|
+
s.svg = Fa(
|
|
6533
6533
|
c.svg,
|
|
6534
6534
|
s.width,
|
|
6535
6535
|
s.height,
|
|
@@ -6596,14 +6596,14 @@ class Ed extends O {
|
|
|
6596
6596
|
}
|
|
6597
6597
|
apply(t) {
|
|
6598
6598
|
this.oldState = t;
|
|
6599
|
-
const e =
|
|
6599
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6600
6600
|
if (!e.id)
|
|
6601
|
-
throw new
|
|
6601
|
+
throw new z();
|
|
6602
6602
|
const a = {
|
|
6603
6603
|
...e,
|
|
6604
6604
|
x: this.x,
|
|
6605
6605
|
y: this.y
|
|
6606
|
-
}, i =
|
|
6606
|
+
}, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6607
6607
|
return {
|
|
6608
6608
|
...t,
|
|
6609
6609
|
layouts: {
|
|
@@ -6619,13 +6619,13 @@ class bd extends O {
|
|
|
6619
6619
|
}
|
|
6620
6620
|
apply(t) {
|
|
6621
6621
|
this.oldState = t;
|
|
6622
|
-
const e =
|
|
6622
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6623
6623
|
if (!e.id)
|
|
6624
|
-
throw new
|
|
6624
|
+
throw new z();
|
|
6625
6625
|
const a = {
|
|
6626
6626
|
...e,
|
|
6627
6627
|
rotation: this.angle
|
|
6628
|
-
}, i =
|
|
6628
|
+
}, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6629
6629
|
return {
|
|
6630
6630
|
...t,
|
|
6631
6631
|
layouts: {
|
|
@@ -6641,9 +6641,9 @@ class Id extends O {
|
|
|
6641
6641
|
}
|
|
6642
6642
|
apply(t) {
|
|
6643
6643
|
this.oldState = t;
|
|
6644
|
-
const e =
|
|
6644
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6645
6645
|
if (!e.id)
|
|
6646
|
-
throw new
|
|
6646
|
+
throw new z();
|
|
6647
6647
|
let a = {
|
|
6648
6648
|
...e,
|
|
6649
6649
|
width: this.width,
|
|
@@ -6656,7 +6656,7 @@ class Id extends O {
|
|
|
6656
6656
|
const o = a, s = (!o.algorithm || o.algorithm === kt.Autosize ? o.text : o.input) ?? "";
|
|
6657
6657
|
a = ie(o, s, e);
|
|
6658
6658
|
}
|
|
6659
|
-
const i =
|
|
6659
|
+
const i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6660
6660
|
return {
|
|
6661
6661
|
...t,
|
|
6662
6662
|
layouts: {
|
|
@@ -6686,7 +6686,7 @@ class ni extends O {
|
|
|
6686
6686
|
[this.layout.id]: {
|
|
6687
6687
|
elements: [],
|
|
6688
6688
|
layout: { ...this.layout },
|
|
6689
|
-
modificationID:
|
|
6689
|
+
modificationID: k()
|
|
6690
6690
|
}
|
|
6691
6691
|
}
|
|
6692
6692
|
};
|
|
@@ -6717,7 +6717,7 @@ class W extends O {
|
|
|
6717
6717
|
[this.layout.id]: {
|
|
6718
6718
|
...t.layouts[this.layout.id],
|
|
6719
6719
|
elements: s,
|
|
6720
|
-
modificationID:
|
|
6720
|
+
modificationID: k()
|
|
6721
6721
|
}
|
|
6722
6722
|
}
|
|
6723
6723
|
};
|
|
@@ -6738,7 +6738,7 @@ class W extends O {
|
|
|
6738
6738
|
[this.layout.id]: {
|
|
6739
6739
|
...t.layouts[this.layout.id],
|
|
6740
6740
|
elements: o,
|
|
6741
|
-
modificationID:
|
|
6741
|
+
modificationID: k()
|
|
6742
6742
|
}
|
|
6743
6743
|
}
|
|
6744
6744
|
};
|
|
@@ -6761,7 +6761,7 @@ class Nt extends O {
|
|
|
6761
6761
|
const a = Object.values(t.layouts).map((r) => (r.elements.filter((s) => s.id !== this.id).length !== r.elements.length && (e = !0), {
|
|
6762
6762
|
...r,
|
|
6763
6763
|
elements: r.elements.filter((s) => s.id !== this.id),
|
|
6764
|
-
modificationID:
|
|
6764
|
+
modificationID: k()
|
|
6765
6765
|
}));
|
|
6766
6766
|
e || console.log(`Failed to delete element ${this.id}`);
|
|
6767
6767
|
const i = {};
|
|
@@ -6779,15 +6779,15 @@ class To extends O {
|
|
|
6779
6779
|
}
|
|
6780
6780
|
apply(t) {
|
|
6781
6781
|
this.oldState = t;
|
|
6782
|
-
const e =
|
|
6782
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6783
6783
|
if (!e.id)
|
|
6784
|
-
throw new
|
|
6784
|
+
throw new z();
|
|
6785
6785
|
const a = {
|
|
6786
6786
|
...e,
|
|
6787
6787
|
fill: this.color,
|
|
6788
6788
|
fillSpotColorDefinition: this.textFillSpotColor,
|
|
6789
6789
|
textFillImage: void 0
|
|
6790
|
-
}, i =
|
|
6790
|
+
}, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6791
6791
|
return {
|
|
6792
6792
|
...t,
|
|
6793
6793
|
layouts: {
|
|
@@ -6803,13 +6803,13 @@ class ta extends O {
|
|
|
6803
6803
|
}
|
|
6804
6804
|
apply(t) {
|
|
6805
6805
|
this.oldState = t;
|
|
6806
|
-
const e =
|
|
6806
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6807
6807
|
if (!e.id)
|
|
6808
|
-
throw new
|
|
6808
|
+
throw new z();
|
|
6809
6809
|
const a = {
|
|
6810
6810
|
...e,
|
|
6811
6811
|
textFillImage: this.imageFill
|
|
6812
|
-
}, i =
|
|
6812
|
+
}, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6813
6813
|
return {
|
|
6814
6814
|
...t,
|
|
6815
6815
|
layouts: {
|
|
@@ -6825,13 +6825,13 @@ class No extends O {
|
|
|
6825
6825
|
}
|
|
6826
6826
|
apply(t) {
|
|
6827
6827
|
this.oldState = t;
|
|
6828
|
-
const e =
|
|
6828
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6829
6829
|
if (!e.id)
|
|
6830
|
-
throw new
|
|
6830
|
+
throw new z();
|
|
6831
6831
|
const a = {
|
|
6832
6832
|
...e,
|
|
6833
6833
|
fontSize: this.size
|
|
6834
|
-
}, i =
|
|
6834
|
+
}, i = _(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = Z(ie(a, r), i);
|
|
6835
6835
|
return {
|
|
6836
6836
|
...t,
|
|
6837
6837
|
layouts: {
|
|
@@ -6847,13 +6847,13 @@ class en extends O {
|
|
|
6847
6847
|
}
|
|
6848
6848
|
apply(t) {
|
|
6849
6849
|
this.oldState = t;
|
|
6850
|
-
const e =
|
|
6850
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6851
6851
|
if (!e.id)
|
|
6852
|
-
throw new
|
|
6852
|
+
throw new z();
|
|
6853
6853
|
const a = {
|
|
6854
6854
|
...e,
|
|
6855
6855
|
fontData: this.fontData
|
|
6856
|
-
}, i =
|
|
6856
|
+
}, i = _(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = Z(ie(a, r), i);
|
|
6857
6857
|
return {
|
|
6858
6858
|
...t,
|
|
6859
6859
|
layouts: {
|
|
@@ -6869,13 +6869,13 @@ class Qo extends O {
|
|
|
6869
6869
|
}
|
|
6870
6870
|
apply(t) {
|
|
6871
6871
|
this.oldState = t;
|
|
6872
|
-
const e =
|
|
6872
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6873
6873
|
if (!e.id)
|
|
6874
|
-
throw new
|
|
6874
|
+
throw new z();
|
|
6875
6875
|
const a = {
|
|
6876
6876
|
...e,
|
|
6877
6877
|
align: this.align
|
|
6878
|
-
}, i =
|
|
6878
|
+
}, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6879
6879
|
return {
|
|
6880
6880
|
...t,
|
|
6881
6881
|
layouts: {
|
|
@@ -6891,7 +6891,7 @@ class Ro extends O {
|
|
|
6891
6891
|
}
|
|
6892
6892
|
apply(t) {
|
|
6893
6893
|
this.oldState = t;
|
|
6894
|
-
const e =
|
|
6894
|
+
const e = _(this.id, Object.values(t.layouts)), a = e.elements.findIndex((s) => s.id === this.id), i = e.elements[a].pattern, r = [...e.elements];
|
|
6895
6895
|
r.splice(a, 1, {
|
|
6896
6896
|
...e.elements[a],
|
|
6897
6897
|
pattern: {
|
|
@@ -6910,7 +6910,7 @@ class Ro extends O {
|
|
|
6910
6910
|
const o = {
|
|
6911
6911
|
...e,
|
|
6912
6912
|
elements: r,
|
|
6913
|
-
modificationID:
|
|
6913
|
+
modificationID: k()
|
|
6914
6914
|
};
|
|
6915
6915
|
return {
|
|
6916
6916
|
...t,
|
|
@@ -6927,16 +6927,16 @@ class Oo extends O {
|
|
|
6927
6927
|
}
|
|
6928
6928
|
apply(t) {
|
|
6929
6929
|
this.oldState = t;
|
|
6930
|
-
const e =
|
|
6930
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6931
6931
|
if (!e.id)
|
|
6932
|
-
throw new
|
|
6932
|
+
throw new z();
|
|
6933
6933
|
const a = {
|
|
6934
6934
|
...e,
|
|
6935
6935
|
useThreshold: this.useThreshold,
|
|
6936
6936
|
invertThreshold: this.invertThreshold,
|
|
6937
6937
|
threshold: this.threshold,
|
|
6938
6938
|
thresholdSaturation: this.thresholdSaturation
|
|
6939
|
-
}, i =
|
|
6939
|
+
}, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6940
6940
|
return {
|
|
6941
6941
|
...t,
|
|
6942
6942
|
layouts: {
|
|
@@ -6952,13 +6952,13 @@ class Bd extends O {
|
|
|
6952
6952
|
}
|
|
6953
6953
|
apply(t) {
|
|
6954
6954
|
this.oldState = t;
|
|
6955
|
-
const e =
|
|
6955
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6956
6956
|
if (!e.id)
|
|
6957
|
-
throw new
|
|
6957
|
+
throw new z();
|
|
6958
6958
|
const a = {
|
|
6959
6959
|
...e,
|
|
6960
6960
|
src: this.src
|
|
6961
|
-
}, i =
|
|
6961
|
+
}, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6962
6962
|
return {
|
|
6963
6963
|
...t,
|
|
6964
6964
|
layouts: {
|
|
@@ -6974,10 +6974,10 @@ class $o extends O {
|
|
|
6974
6974
|
}
|
|
6975
6975
|
apply(t) {
|
|
6976
6976
|
this.oldState = t;
|
|
6977
|
-
const e =
|
|
6977
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6978
6978
|
if (!e.id)
|
|
6979
|
-
throw new
|
|
6980
|
-
const a =
|
|
6979
|
+
throw new z();
|
|
6980
|
+
const a = _(e.id, Object.values(t.layouts)), i = Z(ie(e, this.text, e), a);
|
|
6981
6981
|
return {
|
|
6982
6982
|
...t,
|
|
6983
6983
|
layouts: {
|
|
@@ -6993,14 +6993,14 @@ class ea extends O {
|
|
|
6993
6993
|
}
|
|
6994
6994
|
apply(t) {
|
|
6995
6995
|
this.oldState = t;
|
|
6996
|
-
const e =
|
|
6996
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6997
6997
|
if (!e.id)
|
|
6998
|
-
throw new
|
|
6998
|
+
throw new z();
|
|
6999
6999
|
const a = {
|
|
7000
7000
|
...e,
|
|
7001
7001
|
strokeColor: this.strokeColor,
|
|
7002
7002
|
strokeThickness: this.strokeThickness
|
|
7003
|
-
}, i =
|
|
7003
|
+
}, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
7004
7004
|
return {
|
|
7005
7005
|
...t,
|
|
7006
7006
|
layouts: {
|
|
@@ -7010,15 +7010,15 @@ class ea extends O {
|
|
|
7010
7010
|
};
|
|
7011
7011
|
}
|
|
7012
7012
|
}
|
|
7013
|
-
class
|
|
7013
|
+
class Ca extends O {
|
|
7014
7014
|
constructor(t, e, a) {
|
|
7015
7015
|
super(), this.id = t, this.className = e, this.fill = a;
|
|
7016
7016
|
}
|
|
7017
7017
|
apply(t) {
|
|
7018
7018
|
this.oldState = t;
|
|
7019
|
-
const e =
|
|
7019
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
7020
7020
|
if (!e.id)
|
|
7021
|
-
throw new
|
|
7021
|
+
throw new z();
|
|
7022
7022
|
const a = e.colors || {}, i = a[this.className];
|
|
7023
7023
|
typeof this.fill == "string" ? a[this.className] = {
|
|
7024
7024
|
browserValue: this.fill,
|
|
@@ -7032,7 +7032,7 @@ class fa extends O {
|
|
|
7032
7032
|
const r = {
|
|
7033
7033
|
...e,
|
|
7034
7034
|
colors: a
|
|
7035
|
-
}, o =
|
|
7035
|
+
}, o = _(e.id, Object.values(t.layouts)), s = Z(r, o);
|
|
7036
7036
|
return {
|
|
7037
7037
|
...t,
|
|
7038
7038
|
layouts: {
|
|
@@ -7048,14 +7048,14 @@ class Uo extends O {
|
|
|
7048
7048
|
}
|
|
7049
7049
|
apply(t) {
|
|
7050
7050
|
this.oldState = t;
|
|
7051
|
-
const e =
|
|
7051
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
7052
7052
|
if (!e.id)
|
|
7053
|
-
throw new
|
|
7053
|
+
throw new z();
|
|
7054
7054
|
const a = {
|
|
7055
7055
|
...e,
|
|
7056
7056
|
svg: this.svgBody,
|
|
7057
7057
|
cachedObjectURL: this.objectURL
|
|
7058
|
-
}, i =
|
|
7058
|
+
}, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
7059
7059
|
return {
|
|
7060
7060
|
...t,
|
|
7061
7061
|
layouts: {
|
|
@@ -7073,8 +7073,8 @@ class Pd extends O {
|
|
|
7073
7073
|
super(), this.id = t;
|
|
7074
7074
|
}
|
|
7075
7075
|
apply(t) {
|
|
7076
|
-
if (this.oldState = t, !
|
|
7077
|
-
throw new
|
|
7076
|
+
if (this.oldState = t, !L(this.id, Object.values(t.layouts)).id)
|
|
7077
|
+
throw new z();
|
|
7078
7078
|
const a = Object.values(t.layouts).find((o) => o.elements.find((s) => s.id === this.id));
|
|
7079
7079
|
if (!a)
|
|
7080
7080
|
throw new Error("Layout missing from state!");
|
|
@@ -7088,7 +7088,7 @@ class Pd extends O {
|
|
|
7088
7088
|
[a.layout.id]: {
|
|
7089
7089
|
...t.layouts[a.layout.id],
|
|
7090
7090
|
elements: r,
|
|
7091
|
-
modificationID:
|
|
7091
|
+
modificationID: k()
|
|
7092
7092
|
}
|
|
7093
7093
|
}
|
|
7094
7094
|
};
|
|
@@ -7103,9 +7103,9 @@ class xd extends O {
|
|
|
7103
7103
|
}
|
|
7104
7104
|
apply(t) {
|
|
7105
7105
|
this.oldState = t;
|
|
7106
|
-
const e =
|
|
7106
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
7107
7107
|
if (!e.id)
|
|
7108
|
-
throw new
|
|
7108
|
+
throw new z();
|
|
7109
7109
|
const a = Object.values(t.layouts).find((s) => s.elements.find((l) => l.id === this.id));
|
|
7110
7110
|
if (!a)
|
|
7111
7111
|
throw new Error("Layout missing from state!");
|
|
@@ -7119,7 +7119,7 @@ class xd extends O {
|
|
|
7119
7119
|
[a.layout.id]: {
|
|
7120
7120
|
...t.layouts[a.layout.id],
|
|
7121
7121
|
elements: r,
|
|
7122
|
-
modificationID:
|
|
7122
|
+
modificationID: k()
|
|
7123
7123
|
}
|
|
7124
7124
|
}
|
|
7125
7125
|
};
|
|
@@ -7133,8 +7133,8 @@ class Fd extends O {
|
|
|
7133
7133
|
super(), this.id = t;
|
|
7134
7134
|
}
|
|
7135
7135
|
apply(t) {
|
|
7136
|
-
if (this.oldState = t, !
|
|
7137
|
-
throw new
|
|
7136
|
+
if (this.oldState = t, !L(this.id, Object.values(t.layouts)).id)
|
|
7137
|
+
throw new z();
|
|
7138
7138
|
const a = Object.values(t.layouts).find((l) => l.elements.find((c) => c.id === this.id));
|
|
7139
7139
|
if (!a)
|
|
7140
7140
|
throw new Error("Layout missing from state!");
|
|
@@ -7146,7 +7146,7 @@ class Fd extends O {
|
|
|
7146
7146
|
[a.layout.id]: {
|
|
7147
7147
|
...t.layouts[a.layout.id],
|
|
7148
7148
|
elements: o,
|
|
7149
|
-
modificationID:
|
|
7149
|
+
modificationID: k()
|
|
7150
7150
|
}
|
|
7151
7151
|
}
|
|
7152
7152
|
};
|
|
@@ -7160,8 +7160,8 @@ class Dd extends O {
|
|
|
7160
7160
|
super(), this.id = t;
|
|
7161
7161
|
}
|
|
7162
7162
|
apply(t) {
|
|
7163
|
-
if (this.oldState = t, !
|
|
7164
|
-
throw new
|
|
7163
|
+
if (this.oldState = t, !L(this.id, Object.values(t.layouts)).id)
|
|
7164
|
+
throw new z();
|
|
7165
7165
|
const a = Object.values(t.layouts).find((l) => l.elements.find((c) => c.id === this.id));
|
|
7166
7166
|
if (!a)
|
|
7167
7167
|
throw new Error("Layout missing from state!");
|
|
@@ -7173,7 +7173,7 @@ class Dd extends O {
|
|
|
7173
7173
|
[a.layout.id]: {
|
|
7174
7174
|
...t.layouts[a.layout.id],
|
|
7175
7175
|
elements: o,
|
|
7176
|
-
modificationID:
|
|
7176
|
+
modificationID: k()
|
|
7177
7177
|
}
|
|
7178
7178
|
}
|
|
7179
7179
|
};
|
|
@@ -7184,21 +7184,21 @@ class an {
|
|
|
7184
7184
|
this.processRegion = async (i) => {
|
|
7185
7185
|
const r = this.layouts.find((l) => l.panelId === i.panelId);
|
|
7186
7186
|
if (!r)
|
|
7187
|
-
throw new
|
|
7187
|
+
throw new Y(i);
|
|
7188
7188
|
let o = "";
|
|
7189
|
-
if (this.configuration.type ===
|
|
7189
|
+
if (this.configuration.type === E.ProductOverlay) {
|
|
7190
7190
|
let l = "";
|
|
7191
7191
|
if (this.product?.overlayImageUrl && (l = this.product.overlayImageUrl), o = l, !l)
|
|
7192
7192
|
throw new Be(this.configuration, "Couldn't find an asset for product overlay step");
|
|
7193
7193
|
}
|
|
7194
7194
|
const s = this.evaluateAssetType();
|
|
7195
7195
|
if (s === F.Image) {
|
|
7196
|
-
const l = this.configuration.type ===
|
|
7196
|
+
const l = this.configuration.type === E.SilentIllustration ? this.configuration.data.asset?.fileLink : this.product?.overlayImageUrl;
|
|
7197
7197
|
if (!l)
|
|
7198
7198
|
throw new Error("Undefined raster silent step source");
|
|
7199
7199
|
const c = {
|
|
7200
7200
|
stepName: this.configuration.stepName,
|
|
7201
|
-
id:
|
|
7201
|
+
id: k(),
|
|
7202
7202
|
src: l,
|
|
7203
7203
|
type: s,
|
|
7204
7204
|
y: i.top,
|
|
@@ -7208,7 +7208,7 @@ class an {
|
|
|
7208
7208
|
layer: i.layer,
|
|
7209
7209
|
layerIndex: i.layerIndex,
|
|
7210
7210
|
immutable: i.immutable,
|
|
7211
|
-
productOverlay: this.configuration.type ===
|
|
7211
|
+
productOverlay: this.configuration.type === E.ProductOverlay ? !0 : void 0,
|
|
7212
7212
|
rotation: i.rotation,
|
|
7213
7213
|
excludeFromExport: this.configuration.data.excludeFromPrint,
|
|
7214
7214
|
preserveAspectRatio: "none"
|
|
@@ -7221,7 +7221,7 @@ class an {
|
|
|
7221
7221
|
command: new W(c, r)
|
|
7222
7222
|
};
|
|
7223
7223
|
} else {
|
|
7224
|
-
const l = this.configuration.type ===
|
|
7224
|
+
const l = this.configuration.type === E.SilentIllustration ? this.configuration.data.asset?.fileLink : o, d = await st(await (async () => new Promise((u, h) => {
|
|
7225
7225
|
if (!l) {
|
|
7226
7226
|
h("Undefined vector silent step source");
|
|
7227
7227
|
return;
|
|
@@ -7231,7 +7231,7 @@ class an {
|
|
|
7231
7231
|
}).catch((g) => console.error(g));
|
|
7232
7232
|
}))()), A = {
|
|
7233
7233
|
stepName: this.configuration.stepName,
|
|
7234
|
-
id:
|
|
7234
|
+
id: k(),
|
|
7235
7235
|
cachedObjectURL: await Xt(d.svg),
|
|
7236
7236
|
src: l,
|
|
7237
7237
|
svg: d.svg,
|
|
@@ -7245,7 +7245,7 @@ class an {
|
|
|
7245
7245
|
layerIndex: i.layerIndex,
|
|
7246
7246
|
rotation: i.rotation,
|
|
7247
7247
|
immutable: i.immutable,
|
|
7248
|
-
productOverlay: this.configuration.type ===
|
|
7248
|
+
productOverlay: this.configuration.type === E.ProductOverlay ? !0 : void 0,
|
|
7249
7249
|
excludeFromExport: this.configuration.data.excludeFromPrint
|
|
7250
7250
|
};
|
|
7251
7251
|
return {
|
|
@@ -7261,19 +7261,19 @@ class an {
|
|
|
7261
7261
|
async trigger() {
|
|
7262
7262
|
if (!this.configuration.data.regions)
|
|
7263
7263
|
throw new Be(this.configuration, "Missing regions.");
|
|
7264
|
-
if (this.configuration.type ===
|
|
7264
|
+
if (this.configuration.type === E.SilentIllustration) {
|
|
7265
7265
|
const t = this.configuration.data.regions.map(this.processRegion);
|
|
7266
7266
|
return Promise.all(t);
|
|
7267
|
-
} else return this.configuration.type ===
|
|
7267
|
+
} else return this.configuration.type === E.ProductOverlay ? Promise.all(
|
|
7268
7268
|
this.configuration.data.regions.map((t) => {
|
|
7269
7269
|
if (!this.layouts.find((a) => t.panelId === a.panelId))
|
|
7270
|
-
throw new
|
|
7270
|
+
throw new Y(t);
|
|
7271
7271
|
return this.processRegion(t);
|
|
7272
7272
|
})
|
|
7273
7273
|
) : Promise.reject("Unknown silent step. This is a bug");
|
|
7274
7274
|
}
|
|
7275
7275
|
evaluateAssetType() {
|
|
7276
|
-
const t = this.configuration.type ===
|
|
7276
|
+
const t = this.configuration.type === E.ProductOverlay && this.product?.overlayImageUrl ? this.product.overlayImageUrl.toLowerCase() : this.configuration.data.asset?.fileLink?.toLowerCase().split("?")[0];
|
|
7277
7277
|
return t?.startsWith("data:image/png") || t?.endsWith(".jpeg") || t?.endsWith(".jpg") || t?.endsWith(".png") ? F.Image : (t?.endsWith(".svg") || t?.startsWith("image/svg+xml"), F.Illustration);
|
|
7278
7278
|
}
|
|
7279
7279
|
}
|
|
@@ -7376,14 +7376,14 @@ class Vo {
|
|
|
7376
7376
|
}), d;
|
|
7377
7377
|
}
|
|
7378
7378
|
async regionElements(t) {
|
|
7379
|
-
const e = (a, i) => ({ id:
|
|
7379
|
+
const e = (a, i) => ({ id: k(), region: a, regionIndex: i });
|
|
7380
7380
|
return t.data.regions.map(e);
|
|
7381
7381
|
}
|
|
7382
7382
|
async command(t, e, a, i) {
|
|
7383
7383
|
const r = a.getLayouts(), s = `data:image/svg+xml;base64,${btoa(await Sn(t, { type: "svg" }))}`, l = e.map((c) => {
|
|
7384
7384
|
const d = c.region, A = r.find((u) => u.panelId === d?.panelId);
|
|
7385
7385
|
if (!A && d)
|
|
7386
|
-
throw new
|
|
7386
|
+
throw new Y(d);
|
|
7387
7387
|
if (A && !d)
|
|
7388
7388
|
throw new Error("Region not found");
|
|
7389
7389
|
if (!A || !d)
|
|
@@ -7414,7 +7414,7 @@ class De {
|
|
|
7414
7414
|
constructor() {
|
|
7415
7415
|
this.frameSourceSvg = async (t, e) => {
|
|
7416
7416
|
if (!t)
|
|
7417
|
-
return
|
|
7417
|
+
return pa(e);
|
|
7418
7418
|
const a = t.asset;
|
|
7419
7419
|
if (!a)
|
|
7420
7420
|
throw new bt(t);
|
|
@@ -7438,7 +7438,7 @@ class De {
|
|
|
7438
7438
|
c && c.originalAssetKey && (r = (await U.getLocalOrFromServer(c.originalAssetKey)).fileLink);
|
|
7439
7439
|
}
|
|
7440
7440
|
if (t.option && t.option.variants && t.option.variants.length > 0) {
|
|
7441
|
-
const s = t.option, l =
|
|
7441
|
+
const s = t.option, l = j.getDefaultVariant(s);
|
|
7442
7442
|
return l ? this.selectVariantCommand(
|
|
7443
7443
|
t,
|
|
7444
7444
|
l,
|
|
@@ -7467,7 +7467,7 @@ class De {
|
|
|
7467
7467
|
regionIndex: c.stepRegionIndex
|
|
7468
7468
|
}));
|
|
7469
7469
|
if (!t.option || (t.option.variants || []).length === 0) {
|
|
7470
|
-
const c = t.data.regions.map((d) =>
|
|
7470
|
+
const c = t.data.regions.map((d) => pa(d));
|
|
7471
7471
|
e.updateStorage(t.stepName, {
|
|
7472
7472
|
currentFrameSources: c
|
|
7473
7473
|
});
|
|
@@ -7586,7 +7586,7 @@ class De {
|
|
|
7586
7586
|
}
|
|
7587
7587
|
async loadPatternFromString(t, e, a = !0, i = void 0, r) {
|
|
7588
7588
|
if (t.endsWith("svg")) {
|
|
7589
|
-
const o = await
|
|
7589
|
+
const o = await Qa(t), s = o.width, l = o.height, c = await at(t);
|
|
7590
7590
|
if (r) {
|
|
7591
7591
|
const u = c.match(/<(image|linearGradient|radialGradient)(\s|>|\/>)/gim);
|
|
7592
7592
|
if (u && u.length > 0)
|
|
@@ -7689,33 +7689,33 @@ class De {
|
|
|
7689
7689
|
r && r(!0);
|
|
7690
7690
|
const c = t.data.initialZoomLevel, d = await Promise.all(
|
|
7691
7691
|
t.data.regions.map(async (h, g) => {
|
|
7692
|
-
const m = await Ve(l[g]), p = s.getImageData(), f = a.map((
|
|
7692
|
+
const m = await Ve(l[g]), p = s.getImageData(), f = a.map((P) => new Nt(P.id)), v = p ? Na(
|
|
7693
7693
|
p,
|
|
7694
7694
|
m,
|
|
7695
7695
|
c && !t.data.forceImageCover ? { scale: c } : void 0,
|
|
7696
7696
|
t.data.forceImageCover
|
|
7697
7697
|
) : void 0, w = p ? {
|
|
7698
|
-
id:
|
|
7698
|
+
id: k(),
|
|
7699
7699
|
src: p.src,
|
|
7700
|
-
x:
|
|
7701
|
-
y:
|
|
7700
|
+
x: v?.x || 0,
|
|
7701
|
+
y: v?.y || 0,
|
|
7702
7702
|
width: p.width,
|
|
7703
7703
|
height: p.height,
|
|
7704
|
-
scaleX:
|
|
7705
|
-
scaleY:
|
|
7704
|
+
scaleX: v?.zoom || 1,
|
|
7705
|
+
scaleY: v?.zoom || 1,
|
|
7706
7706
|
rotation: 0
|
|
7707
|
-
} : void 0,
|
|
7708
|
-
if (!
|
|
7709
|
-
throw new
|
|
7707
|
+
} : void 0, I = k(), b = i.getLayouts().find((P) => P.panelId === h.panelId);
|
|
7708
|
+
if (!b)
|
|
7709
|
+
throw new Y(h);
|
|
7710
7710
|
return {
|
|
7711
|
-
command: this.getCreateElementCommand(
|
|
7711
|
+
command: this.getCreateElementCommand(I, h, g, b, {
|
|
7712
7712
|
frameData: m,
|
|
7713
7713
|
pattern: w,
|
|
7714
7714
|
disablePlaceholder: t.data.disablePlaceholder,
|
|
7715
7715
|
stepName: t.stepName
|
|
7716
7716
|
}),
|
|
7717
7717
|
regionEl: {
|
|
7718
|
-
id:
|
|
7718
|
+
id: I,
|
|
7719
7719
|
region: h,
|
|
7720
7720
|
regionIndex: g
|
|
7721
7721
|
},
|
|
@@ -7818,7 +7818,7 @@ class zo {
|
|
|
7818
7818
|
const a = e.getRegionElements(t.stepName) || [];
|
|
7819
7819
|
if (a.length === 0) return [];
|
|
7820
7820
|
try {
|
|
7821
|
-
return
|
|
7821
|
+
return L(
|
|
7822
7822
|
a[0].id,
|
|
7823
7823
|
e.getAllLayoutData()
|
|
7824
7824
|
).colors;
|
|
@@ -7833,7 +7833,7 @@ class zo {
|
|
|
7833
7833
|
if (a)
|
|
7834
7834
|
return this.reload(t, e, a);
|
|
7835
7835
|
{
|
|
7836
|
-
const r =
|
|
7836
|
+
const r = j.getDefaultVariant(i);
|
|
7837
7837
|
if (r)
|
|
7838
7838
|
return await this.selectVariantCommand(t, r, [], () => {
|
|
7839
7839
|
}, e);
|
|
@@ -7891,10 +7891,10 @@ class zo {
|
|
|
7891
7891
|
spotColor: A.spotColor,
|
|
7892
7892
|
pmsValue: A.pmsValue
|
|
7893
7893
|
};
|
|
7894
|
-
const s =
|
|
7894
|
+
const s = Fa(t, e, a, o), l = await Xt(s), c = [];
|
|
7895
7895
|
for (const d of i) {
|
|
7896
7896
|
for (const [A, u] of r.entries())
|
|
7897
|
-
c.push(new
|
|
7897
|
+
c.push(new Ca(d, A, u));
|
|
7898
7898
|
c.push(new Uo(d, s, l));
|
|
7899
7899
|
}
|
|
7900
7900
|
return new $(c);
|
|
@@ -7902,7 +7902,7 @@ class zo {
|
|
|
7902
7902
|
async changeColors(t, e, a, i, r) {
|
|
7903
7903
|
if (e.length === 0)
|
|
7904
7904
|
return;
|
|
7905
|
-
const o =
|
|
7905
|
+
const o = L(
|
|
7906
7906
|
e[0].id,
|
|
7907
7907
|
i().map((h) => h.layoutState)
|
|
7908
7908
|
), s = { ...o.colors }, l = {};
|
|
@@ -7951,14 +7951,14 @@ class zo {
|
|
|
7951
7951
|
const l = s.fileLink;
|
|
7952
7952
|
if (!l)
|
|
7953
7953
|
throw new Jt(s);
|
|
7954
|
-
const c = await st(await this.getIllustrationBody(l)), d = await Xt(c.svg), A = (f,
|
|
7955
|
-
const w = r.getLayouts().find((
|
|
7954
|
+
const c = await st(await this.getIllustrationBody(l)), d = await Xt(c.svg), A = (f, v) => {
|
|
7955
|
+
const w = r.getLayouts().find((y) => y.panelId === f.panelId);
|
|
7956
7956
|
if (!w)
|
|
7957
|
-
throw new
|
|
7958
|
-
const
|
|
7957
|
+
throw new Y(f);
|
|
7958
|
+
const I = k();
|
|
7959
7959
|
return {
|
|
7960
|
-
regionElement: { id:
|
|
7961
|
-
command: this.getCreateElementCommand(
|
|
7960
|
+
regionElement: { id: I, region: f, regionIndex: v },
|
|
7961
|
+
command: this.getCreateElementCommand(I, f, v, w, {
|
|
7962
7962
|
stepName: t.stepName,
|
|
7963
7963
|
src: l,
|
|
7964
7964
|
objectURL: d,
|
|
@@ -7969,47 +7969,47 @@ class zo {
|
|
|
7969
7969
|
let m = Array.from(Object.values(c.colors)).map((f) => f.browserValue);
|
|
7970
7970
|
const p = t.data.colorOption;
|
|
7971
7971
|
return p && p.variants?.forEach((f) => {
|
|
7972
|
-
m = m.map((
|
|
7972
|
+
m = m.map((v) => v.toLowerCase() === f.color?.toLowerCase() ? f.name : v);
|
|
7973
7973
|
}), r.updateMetadata(t.stepName, { colors: m }), {
|
|
7974
7974
|
command: new $(g),
|
|
7975
7975
|
followup: async () => {
|
|
7976
7976
|
await r.setSelectionsAndElements(
|
|
7977
7977
|
t.stepName,
|
|
7978
7978
|
[e],
|
|
7979
|
-
u.map((
|
|
7979
|
+
u.map((v) => v.regionElement),
|
|
7980
7980
|
async () => {
|
|
7981
7981
|
r.setMandatoryFulfilled(t.stepName, !0), i(!1);
|
|
7982
7982
|
}
|
|
7983
7983
|
);
|
|
7984
7984
|
const f = s.assetConfiguration?.defaultColorVariants || [];
|
|
7985
7985
|
if (f.length !== 0) {
|
|
7986
|
-
const
|
|
7987
|
-
(s.assetConfiguration?.channelNumbers || []).forEach((
|
|
7988
|
-
const
|
|
7989
|
-
|
|
7986
|
+
const v = {};
|
|
7987
|
+
(s.assetConfiguration?.channelNumbers || []).forEach((I) => {
|
|
7988
|
+
const y = f.find((b) => b.channelNumber === I.number);
|
|
7989
|
+
y && (v[`${I.id.replace(/\W/g, "")}`] = { browserValue: y?.variant?.color || "" });
|
|
7990
7990
|
}), await this.changeColors(
|
|
7991
7991
|
t,
|
|
7992
|
-
u.map((
|
|
7992
|
+
u.map((I) => I.regionElement),
|
|
7993
7993
|
r,
|
|
7994
7994
|
() => r.getCommandContext().getAllLayouts(),
|
|
7995
|
-
new Map(Object.entries(
|
|
7995
|
+
new Map(Object.entries(v))
|
|
7996
7996
|
);
|
|
7997
7997
|
}
|
|
7998
7998
|
if (t.data.colorPickerEnabled) {
|
|
7999
|
-
const
|
|
8000
|
-
if (
|
|
8001
|
-
const
|
|
7999
|
+
const v = await this.availableColors(t, r) || [], w = Object.keys(c.colors), I = v.length === 1 && w.length === 1;
|
|
8000
|
+
if (I) {
|
|
8001
|
+
const y = v[0], b = w[0];
|
|
8002
8002
|
await this.changeColors(
|
|
8003
8003
|
t,
|
|
8004
|
-
u.map((
|
|
8004
|
+
u.map((P) => P.regionElement),
|
|
8005
8005
|
r,
|
|
8006
8006
|
() => r.getCommandContext().getAllLayouts(),
|
|
8007
|
-
/* @__PURE__ */ new Map([[
|
|
8007
|
+
/* @__PURE__ */ new Map([[b, y.variant.color]])
|
|
8008
8008
|
);
|
|
8009
8009
|
}
|
|
8010
|
-
!
|
|
8010
|
+
!I && f.length === 0 && await this.changeColors(
|
|
8011
8011
|
t,
|
|
8012
|
-
u.map((
|
|
8012
|
+
u.map((y) => y.regionElement),
|
|
8013
8013
|
r,
|
|
8014
8014
|
() => r.getCommandContext().getAllLayouts(),
|
|
8015
8015
|
/* @__PURE__ */ new Map()
|
|
@@ -8028,7 +8028,7 @@ class Go {
|
|
|
8028
8028
|
if (a)
|
|
8029
8029
|
await this.reload(t, e, a);
|
|
8030
8030
|
else {
|
|
8031
|
-
const r =
|
|
8031
|
+
const r = j.getDefaultVariant(i);
|
|
8032
8032
|
if (r)
|
|
8033
8033
|
return await this.selectVariantLambda(t, r, e, () => {
|
|
8034
8034
|
});
|
|
@@ -8107,7 +8107,7 @@ class Wo {
|
|
|
8107
8107
|
if (a)
|
|
8108
8108
|
await this.reload(t, e, a);
|
|
8109
8109
|
else {
|
|
8110
|
-
const r =
|
|
8110
|
+
const r = j.getDefaultVariant(i);
|
|
8111
8111
|
if (r)
|
|
8112
8112
|
return await this.selectVariantLambda(t, r, e, () => {
|
|
8113
8113
|
});
|
|
@@ -8222,7 +8222,7 @@ class qo {
|
|
|
8222
8222
|
return console.error("Missing configuration."), null;
|
|
8223
8223
|
a.updateStorage(t.stepName, { text: e }), a.updateMetadata(t.stepName, { text: e });
|
|
8224
8224
|
const c = (d, A, u, h) => {
|
|
8225
|
-
const g = h ||
|
|
8225
|
+
const g = h || k(), p = a.getLayouts().find((v) => v.panelId === A.panelId);
|
|
8226
8226
|
if (!p)
|
|
8227
8227
|
return console.error(`Can not find layout for region: ${A.panelId}`), null;
|
|
8228
8228
|
const f = [];
|
|
@@ -8360,8 +8360,8 @@ class Ho {
|
|
|
8360
8360
|
const l = a.getRegionElements(t.stepName).map((A) => new Nt(A.id)), c = (A, u) => {
|
|
8361
8361
|
const g = a.getLayouts().find((p) => p.panelId === A.panelId);
|
|
8362
8362
|
if (!g)
|
|
8363
|
-
throw new
|
|
8364
|
-
const m =
|
|
8363
|
+
throw new Y(A);
|
|
8364
|
+
const m = k();
|
|
8365
8365
|
return {
|
|
8366
8366
|
regionElement: { id: m, region: A, regionIndex: u },
|
|
8367
8367
|
command: new W(
|
|
@@ -8411,7 +8411,7 @@ class jo {
|
|
|
8411
8411
|
await this.reload(t, e, a);
|
|
8412
8412
|
else {
|
|
8413
8413
|
const r = i.variants;
|
|
8414
|
-
if (
|
|
8414
|
+
if (j.getDefaultVariant(i)) {
|
|
8415
8415
|
const s = r?.find((l) => l.id === i.defaultVariant?.id);
|
|
8416
8416
|
return this.selectVariantLambda(t, s?.id || "", e);
|
|
8417
8417
|
}
|
|
@@ -8473,8 +8473,8 @@ class Yo {
|
|
|
8473
8473
|
setCustomColor(t, e, a) {
|
|
8474
8474
|
const i = a.getLayouts(), o = (a.getRegionElements(e.stepName) || []).map((s) => {
|
|
8475
8475
|
const l = s.region;
|
|
8476
|
-
if (!i.find((d) => d.panelId === l?.panelId)) throw new
|
|
8477
|
-
return new
|
|
8476
|
+
if (!i.find((d) => d.panelId === l?.panelId)) throw new Y(l);
|
|
8477
|
+
return new Ca(s.id, this.shapeFillId, t);
|
|
8478
8478
|
}).filter((s) => !!s);
|
|
8479
8479
|
a.getCommandDispatcher()(new $(o)), a.updateStorage(e.stepName, { colour: t });
|
|
8480
8480
|
}
|
|
@@ -8485,7 +8485,7 @@ class Yo {
|
|
|
8485
8485
|
if (a)
|
|
8486
8486
|
await this.reload(t, e, a);
|
|
8487
8487
|
else {
|
|
8488
|
-
const r =
|
|
8488
|
+
const r = j.getDefaultVariant(i);
|
|
8489
8489
|
return r ? this.selectVariantCommand(
|
|
8490
8490
|
t,
|
|
8491
8491
|
{
|
|
@@ -8542,9 +8542,9 @@ class Yo {
|
|
|
8542
8542
|
const l = (d) => {
|
|
8543
8543
|
const A = d.region;
|
|
8544
8544
|
if (!r.find((g) => g.panelId === A?.panelId))
|
|
8545
|
-
throw new
|
|
8545
|
+
throw new Y(A);
|
|
8546
8546
|
const h = s();
|
|
8547
|
-
return new
|
|
8547
|
+
return new Ca(d.id, this.shapeFillId, h);
|
|
8548
8548
|
}, c = a.map(l).filter((d) => !!d);
|
|
8549
8549
|
return {
|
|
8550
8550
|
command: new $(c),
|
|
@@ -8560,7 +8560,7 @@ class Yo {
|
|
|
8560
8560
|
const l = (u, h) => {
|
|
8561
8561
|
const g = r.find((w) => w.panelId === u.panelId);
|
|
8562
8562
|
if (!g)
|
|
8563
|
-
throw new
|
|
8563
|
+
throw new Y(u);
|
|
8564
8564
|
const m = s(), p = `
|
|
8565
8565
|
<svg
|
|
8566
8566
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -8583,9 +8583,9 @@ class Yo {
|
|
|
8583
8583
|
</svg>
|
|
8584
8584
|
`, f = {};
|
|
8585
8585
|
f[this.shapeFillId] = { browserValue: m };
|
|
8586
|
-
const
|
|
8586
|
+
const v = k();
|
|
8587
8587
|
return {
|
|
8588
|
-
id:
|
|
8588
|
+
id: v,
|
|
8589
8589
|
region: u,
|
|
8590
8590
|
command: new W(
|
|
8591
8591
|
{
|
|
@@ -8593,7 +8593,7 @@ class Yo {
|
|
|
8593
8593
|
stepRegionIndex: h,
|
|
8594
8594
|
stepName: t.stepName,
|
|
8595
8595
|
colors: f,
|
|
8596
|
-
id:
|
|
8596
|
+
id: v,
|
|
8597
8597
|
svg: p,
|
|
8598
8598
|
type: F.Illustration,
|
|
8599
8599
|
y: u.top,
|
|
@@ -8665,7 +8665,7 @@ const Ko = new Jo(), aa = (n, t, e, a, i) => {
|
|
|
8665
8665
|
const A = Math.max(...s);
|
|
8666
8666
|
if (A <= n.width)
|
|
8667
8667
|
return [r, A];
|
|
8668
|
-
const u = s.reduce((p, f,
|
|
8668
|
+
const u = s.reduce((p, f, v, w) => f > w[p] ? v : p, 0), h = r[u];
|
|
8669
8669
|
let g = !1, m = h.length;
|
|
8670
8670
|
for (; !g && m > -1; ) {
|
|
8671
8671
|
m = h.lastIndexOf(" ", m - 1);
|
|
@@ -8748,7 +8748,7 @@ class Xo {
|
|
|
8748
8748
|
if (a)
|
|
8749
8749
|
await this.reload(t, e, a);
|
|
8750
8750
|
else {
|
|
8751
|
-
const r = this.getDefaultImageFillVariant(t.data), o = r?.asset?.fileLink, s = o ? await
|
|
8751
|
+
const r = this.getDefaultImageFillVariant(t.data), o = r?.asset?.fileLink, s = o ? await fa(o) : void 0, l = s ? {
|
|
8752
8752
|
src: s.src,
|
|
8753
8753
|
height: s.height,
|
|
8754
8754
|
width: s.width,
|
|
@@ -8761,7 +8761,7 @@ class Xo {
|
|
|
8761
8761
|
const u = e.getWorkflowExperience().getBundle();
|
|
8762
8762
|
if (u && t.globalPropertyAspectConfigurations) {
|
|
8763
8763
|
const m = u.getGlobalPropertyConfiguration()?.aspects?.find(
|
|
8764
|
-
(p) => p.type ===
|
|
8764
|
+
(p) => p.type === V.Text && t.globalPropertyAspectConfigurations?.map((f) => f.aspectName).includes(p.name)
|
|
8765
8765
|
);
|
|
8766
8766
|
if (m) {
|
|
8767
8767
|
const f = u.getGlobalPropertyStateManager().getAspect(m.name);
|
|
@@ -8780,7 +8780,7 @@ class Xo {
|
|
|
8780
8780
|
fillImage: r?.name,
|
|
8781
8781
|
strokeColor: t.data.strokeEnabled ? c?.color : void 0
|
|
8782
8782
|
});
|
|
8783
|
-
const h =
|
|
8783
|
+
const h = j.getDefaultVariant(i);
|
|
8784
8784
|
if (h)
|
|
8785
8785
|
return this.selectVariantCommand(
|
|
8786
8786
|
t,
|
|
@@ -8799,7 +8799,7 @@ class Xo {
|
|
|
8799
8799
|
return null;
|
|
8800
8800
|
}
|
|
8801
8801
|
findLayoutElements(t, e) {
|
|
8802
|
-
return t.getRegionElements(e.stepName).map((r) =>
|
|
8802
|
+
return t.getRegionElements(e.stepName).map((r) => L(r.id, t.getAllLayoutData()));
|
|
8803
8803
|
}
|
|
8804
8804
|
/**
|
|
8805
8805
|
* Get the colors that can be used for a given text step.
|
|
@@ -8855,7 +8855,7 @@ class Xo {
|
|
|
8855
8855
|
const a = e.variants?.map((i) => i.asset?.fileLink)?.filter((i) => !!i) || [];
|
|
8856
8856
|
return Promise.all(
|
|
8857
8857
|
a.map(async (i) => {
|
|
8858
|
-
const r = await
|
|
8858
|
+
const r = await fa(i);
|
|
8859
8859
|
return {
|
|
8860
8860
|
src: i,
|
|
8861
8861
|
width: r.width,
|
|
@@ -8993,7 +8993,7 @@ class Xo {
|
|
|
8993
8993
|
const m = e.getWorkflowExperience().getBundle();
|
|
8994
8994
|
if (m && t.globalPropertyAspectConfigurations) {
|
|
8995
8995
|
const f = m.getGlobalPropertyConfiguration()?.aspects?.find(
|
|
8996
|
-
(
|
|
8996
|
+
(v) => v.type === V.Text && t.globalPropertyAspectConfigurations?.map((w) => w.aspectName).includes(v.name)
|
|
8997
8997
|
);
|
|
8998
8998
|
if (f) {
|
|
8999
8999
|
const w = m.getGlobalPropertyStateManager().getAspect(f.name);
|
|
@@ -9006,11 +9006,11 @@ class Xo {
|
|
|
9006
9006
|
u,
|
|
9007
9007
|
async () => {
|
|
9008
9008
|
e.updateMetadata(t.stepName, { color: h, text: g }), e.updateStorage(t.stepName, { text: g, inputText: g });
|
|
9009
|
-
const p = s.map((
|
|
9009
|
+
const p = s.map((v) => new en(v.id, A)), f = new $(p);
|
|
9010
9010
|
e.getCommandDispatcher()(f);
|
|
9011
9011
|
}
|
|
9012
9012
|
), s.length === 0 && l) {
|
|
9013
|
-
const p =
|
|
9013
|
+
const p = j.getDefaultVariant(l);
|
|
9014
9014
|
if (p) {
|
|
9015
9015
|
const f = await this.selectVariantCommand(
|
|
9016
9016
|
t,
|
|
@@ -9026,7 +9026,7 @@ class Xo {
|
|
|
9026
9026
|
e.getCommandDispatcher()(f.command);
|
|
9027
9027
|
}
|
|
9028
9028
|
} else {
|
|
9029
|
-
const { command: p } =
|
|
9029
|
+
const { command: p } = q.updateInputText(
|
|
9030
9030
|
g || "",
|
|
9031
9031
|
s,
|
|
9032
9032
|
t,
|
|
@@ -9040,13 +9040,13 @@ class Xo {
|
|
|
9040
9040
|
const c = e.getWorkflowExperience().getBundle();
|
|
9041
9041
|
if (c && t.globalPropertyAspectConfigurations) {
|
|
9042
9042
|
const A = c.getGlobalPropertyConfiguration()?.aspects?.find(
|
|
9043
|
-
(u) => u.type ===
|
|
9043
|
+
(u) => u.type === V.Text && t.globalPropertyAspectConfigurations?.map((h) => h.aspectName).includes(u.name)
|
|
9044
9044
|
);
|
|
9045
9045
|
if (A) {
|
|
9046
9046
|
const h = c.getGlobalPropertyStateManager().getAspect(A.name);
|
|
9047
9047
|
if (h)
|
|
9048
9048
|
if (s.length === 0 && l) {
|
|
9049
|
-
const g =
|
|
9049
|
+
const g = j.getDefaultVariant(l);
|
|
9050
9050
|
if (g) {
|
|
9051
9051
|
const m = await this.selectVariantCommand(
|
|
9052
9052
|
t,
|
|
@@ -9062,7 +9062,7 @@ class Xo {
|
|
|
9062
9062
|
e.getCommandDispatcher()(m.command);
|
|
9063
9063
|
}
|
|
9064
9064
|
} else {
|
|
9065
|
-
const { command: g } =
|
|
9065
|
+
const { command: g } = q.updateInputText(
|
|
9066
9066
|
h,
|
|
9067
9067
|
s,
|
|
9068
9068
|
t,
|
|
@@ -9077,21 +9077,21 @@ class Xo {
|
|
|
9077
9077
|
getDefaultColorVariant(t) {
|
|
9078
9078
|
const e = t.colorOption;
|
|
9079
9079
|
if (e)
|
|
9080
|
-
return
|
|
9080
|
+
return j.getDefaultVariant(e);
|
|
9081
9081
|
}
|
|
9082
9082
|
getDefaultColor(t) {
|
|
9083
9083
|
const e = t.colorOption;
|
|
9084
|
-
return e ?
|
|
9084
|
+
return e ? j.getDefaultVariant(e)?.color : void 0;
|
|
9085
9085
|
}
|
|
9086
9086
|
getDefaultImageFillVariant(t) {
|
|
9087
9087
|
const e = t.imageFillOption;
|
|
9088
9088
|
if (e)
|
|
9089
|
-
return
|
|
9089
|
+
return j.getDefaultVariant(e);
|
|
9090
9090
|
}
|
|
9091
9091
|
getDefaultStrokeColorVariant(t) {
|
|
9092
9092
|
const e = t.strokeOption;
|
|
9093
9093
|
if (e)
|
|
9094
|
-
return
|
|
9094
|
+
return j.getDefaultVariant(e);
|
|
9095
9095
|
}
|
|
9096
9096
|
async fontDataFromVariant(t) {
|
|
9097
9097
|
const e = t.asset;
|
|
@@ -9188,24 +9188,24 @@ class Xo {
|
|
|
9188
9188
|
if (!a || !a.regions)
|
|
9189
9189
|
throw new Error("Step data not supplied");
|
|
9190
9190
|
const s = r.text || a.defaultText || "", l = xt(s, o), c = this.getProcessedInput(l, a, !1), d = async (u, h) => {
|
|
9191
|
-
const m = o.getLayouts().find((f) => f.panelId === u.panelId), p =
|
|
9191
|
+
const m = o.getLayouts().find((f) => f.panelId === u.panelId), p = k();
|
|
9192
9192
|
try {
|
|
9193
9193
|
if (!m)
|
|
9194
9194
|
throw new Me("Failed to find layout for region: " + u.panelId);
|
|
9195
9195
|
const f = a.colorOption;
|
|
9196
|
-
let
|
|
9196
|
+
let v;
|
|
9197
9197
|
if (f && f.variants) {
|
|
9198
|
-
const
|
|
9199
|
-
|
|
9198
|
+
const T = f.variants.find((X) => X.id === f.defaultVariant?.id) || f.variants[0];
|
|
9199
|
+
v = this.createTextFillSpotColor(f, T), o.updateStorage(t, {
|
|
9200
9200
|
colorProfileAssetKey: f.colorProfile?.key
|
|
9201
9201
|
});
|
|
9202
9202
|
}
|
|
9203
|
-
const w = await this.getDefaultColor(a),
|
|
9203
|
+
const w = await this.getDefaultColor(a), I = w || "#000000", y = {
|
|
9204
9204
|
stepRegion: u,
|
|
9205
9205
|
stepRegionIndex: h,
|
|
9206
9206
|
stepName: t,
|
|
9207
9207
|
align: this.textAlign(a),
|
|
9208
|
-
fill: r.color ? r.color :
|
|
9208
|
+
fill: r.color ? r.color : I,
|
|
9209
9209
|
fontSize: a.size || na,
|
|
9210
9210
|
fontData: i,
|
|
9211
9211
|
id: p,
|
|
@@ -9224,34 +9224,34 @@ class Xo {
|
|
|
9224
9224
|
verticalAlign: a.verticalAlign || "middle",
|
|
9225
9225
|
curved: a.curved,
|
|
9226
9226
|
paths: a.paths,
|
|
9227
|
-
fillSpotColorDefinition:
|
|
9228
|
-
},
|
|
9229
|
-
if (!
|
|
9227
|
+
fillSpotColorDefinition: v
|
|
9228
|
+
}, b = [], P = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map();
|
|
9229
|
+
if (!y.fontData) throw new Q("Failed to resolve font data for text.");
|
|
9230
9230
|
const [R, B] = ye(
|
|
9231
|
-
|
|
9232
|
-
|
|
9231
|
+
y.fontSize,
|
|
9232
|
+
y.fontData,
|
|
9233
9233
|
{
|
|
9234
|
-
left:
|
|
9235
|
-
top:
|
|
9236
|
-
width:
|
|
9237
|
-
height:
|
|
9238
|
-
rotation:
|
|
9234
|
+
left: y.x,
|
|
9235
|
+
top: y.y,
|
|
9236
|
+
width: y.width,
|
|
9237
|
+
height: y.height,
|
|
9238
|
+
rotation: y.rotation,
|
|
9239
9239
|
panelId: ""
|
|
9240
9240
|
},
|
|
9241
9241
|
[c],
|
|
9242
9242
|
{ size: a.size, minSize: a.minSize, maxSize: a.maxSize }
|
|
9243
9243
|
);
|
|
9244
|
-
|
|
9245
|
-
const
|
|
9244
|
+
P.set(y.id, R), N.set(y.id, B);
|
|
9245
|
+
const M = a.curved || a.vertical ? c : (B || []).join(`
|
|
9246
9246
|
`);
|
|
9247
|
-
|
|
9248
|
-
this.generateTextChangeCommandsForRegion(R, a,
|
|
9247
|
+
b.push(
|
|
9248
|
+
this.generateTextChangeCommandsForRegion(R, a, y.id, M)
|
|
9249
9249
|
);
|
|
9250
|
-
const
|
|
9250
|
+
const G = new W(y, m);
|
|
9251
9251
|
return {
|
|
9252
9252
|
regionElement: { id: p, region: u, regionIndex: h },
|
|
9253
|
-
commands: [
|
|
9254
|
-
newElement:
|
|
9253
|
+
commands: [G, ...b],
|
|
9254
|
+
newElement: y,
|
|
9255
9255
|
fontData: i
|
|
9256
9256
|
};
|
|
9257
9257
|
} catch (f) {
|
|
@@ -9286,56 +9286,56 @@ class Xo {
|
|
|
9286
9286
|
*/
|
|
9287
9287
|
async changeInputTextWithRegion(t, e, a, i, r, o, s, l, c, d) {
|
|
9288
9288
|
const A = (i || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = xt(A, o), h = this.getProcessedInput(u, t.data, s), g = o.getRegionElements(t.stepName), m = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
|
|
9289
|
-
for (const
|
|
9290
|
-
if (
|
|
9291
|
-
const [
|
|
9289
|
+
for (const y of g)
|
|
9290
|
+
if (y.region) {
|
|
9291
|
+
const [b, P] = ye(
|
|
9292
9292
|
e,
|
|
9293
9293
|
a,
|
|
9294
|
-
|
|
9294
|
+
y.region,
|
|
9295
9295
|
[h],
|
|
9296
9296
|
{ size: t.data.size, minSize: t.data.minSize, maxSize: t.data.maxSize }
|
|
9297
9297
|
);
|
|
9298
|
-
m.set(
|
|
9298
|
+
m.set(y.id, b), p.set(y.id, P);
|
|
9299
9299
|
}
|
|
9300
|
-
const
|
|
9300
|
+
const v = (() => {
|
|
9301
9301
|
if (t.data && t.data.maxLength && h.length > t.data.maxLength)
|
|
9302
9302
|
return d && d(!0), { info: "0" };
|
|
9303
|
-
const
|
|
9304
|
-
for (const
|
|
9305
|
-
for (const N in
|
|
9306
|
-
const R =
|
|
9307
|
-
if (
|
|
9303
|
+
const y = o.getWorkflowExperience().getProfanityList(), b = ca(h.toLowerCase());
|
|
9304
|
+
for (const P of b)
|
|
9305
|
+
for (const N in y) {
|
|
9306
|
+
const R = y[N].toLowerCase().replace(/\s/g, "");
|
|
9307
|
+
if (P === R)
|
|
9308
9308
|
return l(!0), { error: "Blocked profanity." };
|
|
9309
9309
|
}
|
|
9310
9310
|
return !t.data.vertical && !t.data.allowNewlines && (h.includes(`
|
|
9311
9311
|
`) || h.includes("\r")) ? (l(!0), { error: "Cannot span multiple lines." }) : !t.data.curved && !Array.from(p.values()).every((N) => N) ? (l(!0), { error: "Does not fit." }) : (l(!1), { info: (t.data.maxLength - h.length).toString() });
|
|
9312
9312
|
})();
|
|
9313
|
-
if (
|
|
9314
|
-
c(
|
|
9313
|
+
if (v.error) {
|
|
9314
|
+
c(v.error);
|
|
9315
9315
|
return;
|
|
9316
9316
|
}
|
|
9317
|
-
if (c(`${
|
|
9317
|
+
if (c(`${v.info} characters remaining` || ""), d)
|
|
9318
9318
|
return;
|
|
9319
9319
|
o.updateStorage(t.stepName, { text: A }), o.updateMetadata(t.stepName, {
|
|
9320
9320
|
text: this.injectReplaceableText(A, t.data)
|
|
9321
9321
|
}), (r.defaultCleared || !t.data.deleteDefaultOnFocus) && A.trim() !== "" && o.setMandatoryFulfilled(t.stepName, !0);
|
|
9322
9322
|
const w = [];
|
|
9323
|
-
for (const
|
|
9324
|
-
const
|
|
9323
|
+
for (const y of g) {
|
|
9324
|
+
const b = t.data.curved ? h : (p.get(y.id) || []).join(`
|
|
9325
9325
|
`);
|
|
9326
9326
|
w.push(
|
|
9327
9327
|
this.generateTextChangeCommandsForRegion(
|
|
9328
|
-
m.get(
|
|
9328
|
+
m.get(y.id) || 1,
|
|
9329
9329
|
t.data,
|
|
9330
|
-
|
|
9331
|
-
|
|
9330
|
+
y.id,
|
|
9331
|
+
b
|
|
9332
9332
|
)
|
|
9333
9333
|
);
|
|
9334
9334
|
}
|
|
9335
9335
|
return new $(w);
|
|
9336
9336
|
}
|
|
9337
9337
|
}
|
|
9338
|
-
const
|
|
9338
|
+
const q = new Xo();
|
|
9339
9339
|
class Zo {
|
|
9340
9340
|
}
|
|
9341
9341
|
const ts = "data:application/octet-stream;base64,AAEAAAAPAIAAAwBwRkZUTYdHeHoAAElcAAAAH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ABH/8AAS//EAE//2ABT/5wAV/9gAFv/sADH/vwAy/9UAM//eADT/3wA1//EANv/xADf/9gA4/+IAOf/xADr/9gA7/+wAPP/xAD3/9gA+//EAP//2AED/2ABB//EAQv/nAEP/9gBE/+cARf/TAEb/8QBH/9gASP/YAEn/xgBK/78AS//xACsABv/7AAf/9gAI/+wACf/TAAr/5wAL/90ADP/lAA3/zgAO/90AD//dABD/7AAR/+IAEv/iABP/2AAU/+IAFf/JABb/5wAx/90AMv/EADP/6wA0/+EANf/wADb/8AA4/9wAOf/dADr/7AA7/9gAPP/sAD3/5wA+/+wAP//iAED/0wBB/+IAQv/YAEP/4gBE/84ARf/JAEb/4gBH/8kASP/OAEn/vwBK/8kAS//TACwABv/7AAf/3wAI/+cACf+wAAr/4wAL/8kADP/dAA3/xwAO/+cAD//dABD/7AAR/+cAEv/iABP/yQAU/9cAFf+/ABb/4gAa/+kAMf/YADL/uwAz/+EANP/dADb/6wA3//MAOP/lADn/8QA6//IAO//eADz/5wA9/+4APv/zAD//8ABA/+IAQf/2AEL/6gBD//YARP/kAEX/zABG/+8AR/+0AEj/uwBJ/64ASv+vAEv/5QAsAAb/+wAH/90ACP/nAAn/4gAK/9MAC//nAAz/3QAN//YADv/eAA//3QAQ/7AAEf/OABL/sAAT//sAFP/dABX/0wAW/9MAMf/iADL/iAAz//YANP/OADX/9gA2//EAN//xADj/0wA5//YAOv/zADv/gAA8//EAPf/7AD7/+wA///YAQP/OAEH/7gBC/84AQ//2AET/2ABF//sARv/2AEf/5wBI/+cASf/TAEr/4gBL/+wALAAG//sAB//2AAj/8QAJ/9gACv/nAAv/3QAM/+IADf/dAA7/4gAP/+IAEP/nABH/5wAS/9gAE//YABT/3QAV/84AFv/sADH/5wAy/78AM//nADT/2AA1/+cANv/nADf/7AA4/90AOf/sADr/7AA7/+cAPP/sAD3/8QA+/+wAP//xAED/4gBB//EAQv/dAEP/5wBE/+IARf/YAEb/5wBH/78ASP/HAEn/sABK/7UAS//dACsABv/xAA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5AED/1ABB//sAQv/cAEP/9wBE/+8ARf/JAEb/6wBH/8QASP++AEn/5wBK/8EAS//+ABwAF//7ADH/7AAy/+QAM//+ADT/7gA1//4ANgAAADf//QA4//cAOf/7ADr//gA7/+4APP/+AD3//gA+//0AP//7AED/7wBB//4AQv/uAEP//gBE//cARf/7AEb/+QBH/+gASP/vAEn/6wBK/+gAS//+AB4ABv/7ABf/8wAa//4AHf/3ACX/9wAq//4AMf/2ADL/5AAz//0ANP/zADX/+wA2//4AN//+ADj/+QA7/+4APf/+AD7/+wA///4AQP/2AEH/+gBC/+4AQ//7AET/+QBF//sARv/+AEf/8wBI/+8ASf/zAEr/6wBL//4AHQAG//EAJP/3ADH/7AAy/7sAM//sADT/4wA1/+8ANv/vADf/9wA4/+QAOf/qADr/9wA7/98APP/vAD3/9wA+/+sAP//uAED/4wBB/+4AQv/mAEP/7wBE/+IARf/VAEb/7gBH/8MASP/GAEn/uwBK/7oAS//fABwABv/sACT//gAy/54AM//rADT/6gA1//EANv/rADf/9wA4/+MAOf/oADr/9wA7/64APP/sAD3/8QA+/+wAP//sAED/4QBB//MAQv/oAEP/5ABE/9gARf/kAEb/7gBH/9EASP/QAEn/uwBK/8QAS//zADAAF//3ABj//wAZ/+kAGv//ABv//QAc//4AHf/pAB7/+wAf//8AIP/iACH//gAi//8AI//+ACT//wAl/+IAJ//uACj//gAp/+cAKv/hACv/+QAs/8MALf/QAC7/5AAv/8wAMP//ADL/4QAz//4ANP/jADX/9wA3//kAOP/fADn/9wA7/+IAPP/5AD3/+gA+//EAP//6AED/2gBB/+8AQv/aAET/7wBF/9cARv/qAEf/xgBI/7sASf/qAEr/tABL//sAHQAG/+cAF//oACT/+gAy/+IAM//xADT/zAA1/+8ANv/sADf/+gA4/8wAOf/3ADr/8wA7/8kAPP/uAD3/7wA+/+wAP//rAED/yQBB//cAQv/MAEP/+ABE/9QARf/KAEb/2gBH/8EASP/EAEn/4gBK/7cAS//vAB0ABv/xABv/+QAl/+4AMv+8AD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/+QAQ//3AET/5gBF/9AARv/zAEf/xgBI/80ASf++AEr/twBL/+gAKgAH//EACP/xAAn/0wAK/+YAC//YAAz/5wAN/9gADv/oAA//5wAQ/+IAEf/iABP/2AAU/90AFf/dACT/+wAx/+wAMv+7ADP/9wA0/+QANf/rADb/5wA3//EAOP/kADn/+QA6//YAO//aADz/9wA9//4APv/uAD//8QBA/+cAQf/vAEL/4wBD/+sARP/cAEX/0ABG/+sAR//CAEj/xABJ/7QASv+6AEv/6AAmAAf/9gAI//EACf/sAAr/9gAM/+cADv/6AA//8QAQ//EAEf/vABL/4QAT//EAFP/iABX/5wAy/+kAM//9ADT/5wA1//sANv/9ADf//gA4/+sAOf/+ADoAAQA7/+gAPP/9AD3/9wA+//0AP//9AED/6wBBAAEAQv/pAEP/+QBE/+wARgACAEf/6QBI/+8ASf/nAEr/6wBL//sAKQAH//sACP/xAAn/5wAK/+4AC//2AAz/4gAN//sADv/1AA//8QAQ/90AEf/kABL/4gAT/+wAFP/YABX/3QAx//YAMv+5ADP/+AA0/+MANf/3ADb/+AA3//kAOP/iADn/+gA6//0AO//OADz//QA9//4APv/5AD///ABA/+YAQv/jAEP/9wBE/+YARf/vAEb//gBH/+cASP/vAEn/0QBK/+YAS//9ACgAB//2AAj/4gAJ/90ACv/sAAv/4gAM/+gADf/iAA7/9QAP/+gAEP/dABH/4AAS/+YAE//OABT/4gAV/90AJP/7ADH/9gAy/8EAM//vADT/3wA2//QAN//4ADj/4wA5/+kAOv/6ADv/0QA8/+YAPf/zAD7/6QA///EAQP/qAEL/3ABD/+gARP/fAEb/+ABH/7sASP+7AEn/rwBK/68AS//jACcACP/xAAn/7AAK//gADP/2AA7/9wAP//YAEP/xABH/5wAS/+cAE//xABT/7AAV/+UAMf/2ADL/6AAz//kANP/qADX/+wA2//oAN//7ADj/6wA5//cAOv//ADv/4wA8//sAPf/+AD7/+wA///oAQP/sAEH/+gBC/+MAQ//5AET/7wBF/+oARv/7AEf/4wBI/+wASf/jAEr/6gBL//4AJgAH//sACP/7AAn/5wAK//oADP/2AA7/9gAP//YAEP/xABH/8QAS//IAE//xABT/5wAV//EAMv/nADP/+wA0//EANf/9ADb//gA3//4AOP/uADn/+wA6//4AO//oAD0AAAA+//sAP//+AED/7wBB//4AQv/qAEP//wBE//EARf/3AEb/+wBH/+YASP/3AEn/2gBK/+QAS//7ACkAB//2AAj/9gAJ/90ACv/yAAz/8QAO//EAD//wABD/6gAR/+wAEv/mABP/9AAU/+wAFf/rABf/zgAx//YAMv/OADP/7wA0/+oANf/5ADb//gA3//0AOP/oADn/+QA6//0AO//YADz//gA9//8APv/6AD//+QBA/+4AQf/5AEL/4wBD//gARP/qAEX/+QBG//oAR//pAEj/6QBJ/9UASv/rAEv/+gAqAAf/sgAI/8kACf+wAAr/ugAL/7UADP+1AA3/3QAO/+QAD/+6ABD/sgAR/7UAEv+xABP/4gAU/6sAFf+mADH/lwAy/9oAM//jADT/qwA1/+IANv/iADf/4wA4/5oAOf/XADr/7gA7/7QAPP/kAD3/6wA+/+4AP//mAED/rQBB/+8AQv+qAEP/6gBE/74ARf/XAEb/2gBH/9AASP/SAEn/1QBK/80AS//qACsAB//nAAj/8QAJ/6YACv/sAAv/nAAM/90ADf+6AA7/9gAP/+IAEP/sABH/3QAS/9oAE//sABT/3QAV/8QAJP/+ADH/pgAy/+sAM//vADT/ygA1//0ANv/zADf/+wA4/9MAOf/vADr/+wA7/9gAPP/3AD3/9wA+//EAP//7AED/1QBB//cAQv/PAEP/8wBE/+YARf+7AEb/5wBH/7UASP/JAEn/2gBK/6UAS//zACkAB//2AAn/7AAK//kAC//sAAz/9gAO//oAD//2ABD/7AAR/+cAEv/vABP/9gAU//EAFf/sABcAAQAx/+YAMv/pADP/+QA0/+oANf/zADb/+wA3//oAOP/nADn/9wA6//4AO//uADz/+QA9//oAPv/7AD//+QBA/+8AQf/3AEL/6QBD//oARP/sAEX/8wBG//gAR//pAEj/6QBJ/+MASv/nAEv//QAqAAf/9gAI//sACf/sAAr/9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v/uAEf/6QBI/+QASf/aAEr/5gBL//cAKgAH/8QACP/OAAn/pgAL/7oADP+rAA3/3QAO/+cAD/+5ABD/twAR/8QAEv+zABP/0wAU/7AAFf+cACT/+wAx/6EAMv/aADP/4wA0/7cANf/4ADb/4wA3//0AOP+3ADn/7gA6/+8AO/+7ADz/7gA9//EAPv/jAD//6ABA/7oAQf/zAEL/uQBD/+sARP/OAEX/3wBG/+EAR//aAEj/2ABJ/9gASv/MAEv/7gAsAAf/yQAI/84ACf/JAAr/wgAL/8kADP/JAA3//gAO/8kAD/+6ABD/jQAR/7oAEv+gABP/4gAU/7UAFf+6AB7/8QAk//sAMf+1ADL/lwAz/+8ANP+7ADX/5gA2/+4AN//uADj/uQA5/+gAOv/3ADv/hAA8/+8APf/sAD7/7AA//+oAQP+6AEH/7ABC/7kAQ//pAET/ygBF/+8ARv/vAEf/6ABI/+kASf/fAEr/5ABL//EAJgAH//YACf/iAAr/7AAL/+cADP/iAA3//wAO//UAD//nABD/7AAR/+IAEv/gABP/7AAU/90AFf/TADH/4gAy/+sAM//+ADT/6AA1//4ANgAEADf//wA4/9wAOf/6ADv/5gA8//8APf//AD///QBA/+MAQf//AEMAAABE/+8ARf/4AEb/+wBH//cASP/rAEn/6QBK/+kAS//9AAIAAQAGAEsAAAAAAAAAAQAAAADUGBYRAAAAANmXsTQAAAAA2ZexNA==", et = (n) => Ki("http://www.w3.org/2000/svg", n), es = (n, t) => {
|
|
@@ -9494,18 +9494,18 @@ class ss extends Zo {
|
|
|
9494
9494
|
const a = yo(ts), r = t !== "" ? ((w) => w.charAt(0).toUpperCase() + w.substr(1).toLowerCase())(t) : "", o = a.getPath(r, 0, 72, 72), s = o.toSVG(2), l = o.getBoundingBox(), c = l.x2 - l.x1, d = o.toPathData(3), A = () => {
|
|
9495
9495
|
const w = et("g");
|
|
9496
9496
|
w.classList.add("module-text-group");
|
|
9497
|
-
const
|
|
9498
|
-
w.appendChild(
|
|
9499
|
-
const
|
|
9500
|
-
|
|
9501
|
-
const
|
|
9502
|
-
|
|
9503
|
-
const
|
|
9504
|
-
|
|
9497
|
+
const I = et("defs");
|
|
9498
|
+
w.appendChild(I), I.appendChild(as(0, 2, 2, "shadow"));
|
|
9499
|
+
const y = et("path");
|
|
9500
|
+
y.setAttribute("d", d), y.setAttribute("stroke", "black"), y.setAttribute("stroke-width", "3"), I.appendChild(y);
|
|
9501
|
+
const b = et("g");
|
|
9502
|
+
b.classList.add("module-layer0"), w.appendChild(b), b.setAttribute("filter", "url(#shadow)"), b.innerHTML = y.outerHTML;
|
|
9503
|
+
const P = et("g");
|
|
9504
|
+
P.classList.add("module-layer1"), w.appendChild(P), P.setAttribute("stroke-width", "3"), P.setAttribute("stroke", "rgb(45,41,38)"), P.setAttribute("fill", "rgb(45,41,38)"), P.setAttribute("transform", "translate(0.5,0)"), P.innerHTML = s;
|
|
9505
9505
|
const N = et("g");
|
|
9506
9506
|
N.classList.add("module-layer2"), w.appendChild(N), N.setAttribute("fill", "rgb(255,209,0)"), N.setAttribute("transform", "translate(1,-0.1)"), N.innerHTML = s;
|
|
9507
9507
|
const R = et("g");
|
|
9508
|
-
return R.classList.add("module-layer3"), w.appendChild(R), R.setAttribute("fill", "white"), R.innerHTML = s, new os(w).transform(([
|
|
9508
|
+
return R.classList.add("module-layer3"), w.appendChild(R), R.setAttribute("fill", "white"), R.innerHTML = s, new os(w).transform(([M, G]) => [M, G + (c / 2 - M) ** 2 / (c * 6)]), w;
|
|
9509
9509
|
}, u = et("g");
|
|
9510
9510
|
u.classList.add("module-root");
|
|
9511
9511
|
const h = et("defs");
|
|
@@ -9518,8 +9518,8 @@ class ss extends Zo {
|
|
|
9518
9518
|
p.classList.add("module-text-enclosure"), u.appendChild(p);
|
|
9519
9519
|
const f = A();
|
|
9520
9520
|
p.appendChild(f);
|
|
9521
|
-
const
|
|
9522
|
-
return is(p,
|
|
9521
|
+
const v = Qi(d);
|
|
9522
|
+
return is(p, v, e.height, e.width, 0.35, 0.65), ns(u.outerHTML);
|
|
9523
9523
|
}
|
|
9524
9524
|
}
|
|
9525
9525
|
async function Ai(n) {
|
|
@@ -9545,8 +9545,8 @@ const ls = [
|
|
|
9545
9545
|
const l = s.toString(), d = `data:image/svg+xml;base64,${Ha(await Sn(l, { type: "svg" }))}`, A = (h) => {
|
|
9546
9546
|
const g = n.find((p) => p.panelId === h.panelId);
|
|
9547
9547
|
if (!g)
|
|
9548
|
-
throw new
|
|
9549
|
-
const m =
|
|
9548
|
+
throw new Y(h);
|
|
9549
|
+
const m = k();
|
|
9550
9550
|
return new W(
|
|
9551
9551
|
{
|
|
9552
9552
|
id: m,
|
|
@@ -9567,15 +9567,15 @@ const ls = [
|
|
|
9567
9567
|
return console.error(h), [];
|
|
9568
9568
|
}
|
|
9569
9569
|
}, ds = async (n, t, e, a) => {
|
|
9570
|
-
const i = e.data, r = i.assetUrl, o = await
|
|
9570
|
+
const i = e.data, r = i.assetUrl, o = await fa(r);
|
|
9571
9571
|
try {
|
|
9572
9572
|
const s = Mo(i, a.option);
|
|
9573
9573
|
s && (t[a.stepName] = { selectedVariants: [s] });
|
|
9574
9574
|
const l = async (c) => {
|
|
9575
|
-
const d = await ti(c, s?.asset?.fileLink), A = await Ve(d), u =
|
|
9575
|
+
const d = await ti(c, s?.asset?.fileLink), A = await Ve(d), u = k(), h = n.find((m) => m.panelId === c.panelId);
|
|
9576
9576
|
if (!h)
|
|
9577
|
-
throw new
|
|
9578
|
-
const g =
|
|
9577
|
+
throw new Y(c);
|
|
9578
|
+
const g = Na(
|
|
9579
9579
|
o,
|
|
9580
9580
|
A,
|
|
9581
9581
|
{
|
|
@@ -9627,7 +9627,7 @@ const ls = [
|
|
|
9627
9627
|
const i = e.data, r = a.option;
|
|
9628
9628
|
if (!r)
|
|
9629
9629
|
return console.error(`No option for step ${a.stepName}.`), [];
|
|
9630
|
-
const o = r.variants?.find((
|
|
9630
|
+
const o = r.variants?.find((y) => y.id === i.illustrationVariantId) || re(r);
|
|
9631
9631
|
if (!o)
|
|
9632
9632
|
return console.error(`No variant with ID: ${i.illustrationVariantId}`), [];
|
|
9633
9633
|
if (!o.asset)
|
|
@@ -9639,64 +9639,64 @@ const ls = [
|
|
|
9639
9639
|
const l = await at(s, !0), c = /<svg.*?<\/svg>/s, d = l.match(c) || [], A = d?.length > 0 ? d[0] : "", g = dt().parseFromString(A, "image/svg+xml").firstElementChild;
|
|
9640
9640
|
if (!g)
|
|
9641
9641
|
return console.error("Failed to read SVG."), [];
|
|
9642
|
-
|
|
9642
|
+
xa(g);
|
|
9643
9643
|
const m = {};
|
|
9644
|
-
Dt(g, (
|
|
9645
|
-
ls.includes(
|
|
9646
|
-
const
|
|
9647
|
-
if (
|
|
9648
|
-
const N =
|
|
9649
|
-
|
|
9650
|
-
}
|
|
9651
|
-
const
|
|
9652
|
-
if (
|
|
9653
|
-
const N =
|
|
9654
|
-
|
|
9644
|
+
Dt(g, (y) => {
|
|
9645
|
+
ls.includes(y.tagName) && !y.attributes.getNamedItem("fill") && y.setAttribute("fill", "#000000");
|
|
9646
|
+
const b = y.attributes.getNamedItem("fill");
|
|
9647
|
+
if (b && b.value !== "none") {
|
|
9648
|
+
const N = b.value, B = `spiff-fill-${N.replace(/\W/g, "")}`;
|
|
9649
|
+
y.classList.add(B), m[B] = { browserValue: N };
|
|
9650
|
+
}
|
|
9651
|
+
const P = y.attributes.getNamedItem("stroke");
|
|
9652
|
+
if (P && P.value !== "none") {
|
|
9653
|
+
const N = P.value, B = `spiff-stroke-${N.replace(/\W/g, "")}`;
|
|
9654
|
+
y.classList.add(B), m[B] = { browserValue: N };
|
|
9655
9655
|
}
|
|
9656
9656
|
});
|
|
9657
|
-
const f = It().serializeToString(g),
|
|
9658
|
-
if (
|
|
9659
|
-
for (const [
|
|
9660
|
-
for (const
|
|
9661
|
-
if (
|
|
9662
|
-
m[
|
|
9657
|
+
const f = It().serializeToString(g), v = i.colors;
|
|
9658
|
+
if (v) {
|
|
9659
|
+
for (const [y, b] of Object.entries(m))
|
|
9660
|
+
for (const P of Object.keys(v))
|
|
9661
|
+
if (b.browserValue === P) {
|
|
9662
|
+
m[y] = { browserValue: v[P] };
|
|
9663
9663
|
break;
|
|
9664
9664
|
}
|
|
9665
9665
|
}
|
|
9666
|
-
const w = (
|
|
9667
|
-
const
|
|
9668
|
-
if (!
|
|
9669
|
-
throw new
|
|
9670
|
-
const
|
|
9666
|
+
const w = (y) => {
|
|
9667
|
+
const b = n.find((N) => N.panelId === y.panelId);
|
|
9668
|
+
if (!b)
|
|
9669
|
+
throw new Y(y);
|
|
9670
|
+
const P = k();
|
|
9671
9671
|
return new W(
|
|
9672
9672
|
{
|
|
9673
9673
|
colors: m,
|
|
9674
|
-
id:
|
|
9674
|
+
id: P,
|
|
9675
9675
|
svg: f,
|
|
9676
9676
|
type: F.Illustration,
|
|
9677
|
-
y:
|
|
9678
|
-
x:
|
|
9679
|
-
rotation:
|
|
9680
|
-
width:
|
|
9681
|
-
height:
|
|
9682
|
-
layer:
|
|
9683
|
-
layerIndex:
|
|
9684
|
-
immutable:
|
|
9677
|
+
y: y.top,
|
|
9678
|
+
x: y.left,
|
|
9679
|
+
rotation: y.rotation,
|
|
9680
|
+
width: y.width,
|
|
9681
|
+
height: y.height,
|
|
9682
|
+
layer: y.layer,
|
|
9683
|
+
layerIndex: y.layerIndex,
|
|
9684
|
+
immutable: y.immutable
|
|
9685
9685
|
},
|
|
9686
|
-
|
|
9686
|
+
b
|
|
9687
9687
|
);
|
|
9688
|
-
},
|
|
9688
|
+
}, I = a.data.regions;
|
|
9689
9689
|
try {
|
|
9690
|
-
return
|
|
9691
|
-
} catch (
|
|
9692
|
-
return console.error(
|
|
9690
|
+
return I.map(w);
|
|
9691
|
+
} catch (y) {
|
|
9692
|
+
return console.error(y), [];
|
|
9693
9693
|
}
|
|
9694
9694
|
}, us = async (n, t, e) => {
|
|
9695
9695
|
const a = await Ai(e.data.module), i = t.data, r = (s, l) => {
|
|
9696
9696
|
const c = n.find((A) => A.panelId === l.panelId);
|
|
9697
9697
|
if (!c)
|
|
9698
|
-
throw new
|
|
9699
|
-
const d =
|
|
9698
|
+
throw new Y(l);
|
|
9699
|
+
const d = k();
|
|
9700
9700
|
return new W(
|
|
9701
9701
|
{
|
|
9702
9702
|
colors: {},
|
|
@@ -9737,8 +9737,8 @@ const ls = [
|
|
|
9737
9737
|
const l = (d) => {
|
|
9738
9738
|
const A = n.find((h) => h.panelId === d.panelId);
|
|
9739
9739
|
if (!A)
|
|
9740
|
-
throw new
|
|
9741
|
-
const u =
|
|
9740
|
+
throw new Y(d);
|
|
9741
|
+
const u = k();
|
|
9742
9742
|
return new W(
|
|
9743
9743
|
{
|
|
9744
9744
|
id: u,
|
|
@@ -9773,7 +9773,7 @@ const ls = [
|
|
|
9773
9773
|
const s = (c) => {
|
|
9774
9774
|
const d = n.find((m) => m.panelId === c.panelId);
|
|
9775
9775
|
if (!d)
|
|
9776
|
-
throw new
|
|
9776
|
+
throw new Y(c);
|
|
9777
9777
|
const A = `
|
|
9778
9778
|
<svg
|
|
9779
9779
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -9794,7 +9794,7 @@ const ls = [
|
|
|
9794
9794
|
fill="${o?.color}"
|
|
9795
9795
|
/>
|
|
9796
9796
|
</svg>
|
|
9797
|
-
`, h = { "spiff-fill-shape": { browserValue: o.color || "#000000" } }, g =
|
|
9797
|
+
`, h = { "spiff-fill-shape": { browserValue: o.color || "#000000" } }, g = k();
|
|
9798
9798
|
return new W(
|
|
9799
9799
|
{
|
|
9800
9800
|
colors: h,
|
|
@@ -9819,15 +9819,15 @@ const ls = [
|
|
|
9819
9819
|
return console.error(c), [];
|
|
9820
9820
|
}
|
|
9821
9821
|
}, ms = async (n, t, e) => {
|
|
9822
|
-
const a = [], r = t.type ===
|
|
9822
|
+
const a = [], r = t.type === E.ProductOverlay ? e || t.data.asset?.fileLink || "" : t.data.asset?.fileLink || "", s = r.endsWith(".jpeg") || r.endsWith(".jpg") || r.endsWith(".png") ? F.Image : (r.endsWith(".svg"), F.Illustration), l = t.data.regions;
|
|
9823
9823
|
if (s === "image")
|
|
9824
9824
|
try {
|
|
9825
9825
|
l.forEach((c) => {
|
|
9826
9826
|
const d = n.find((u) => u.panelId === c.panelId);
|
|
9827
9827
|
if (!d)
|
|
9828
|
-
throw new
|
|
9828
|
+
throw new Y(c);
|
|
9829
9829
|
const A = {
|
|
9830
|
-
id:
|
|
9830
|
+
id: k(),
|
|
9831
9831
|
src: r,
|
|
9832
9832
|
type: s,
|
|
9833
9833
|
y: c.top,
|
|
@@ -9836,7 +9836,7 @@ const ls = [
|
|
|
9836
9836
|
height: c.height,
|
|
9837
9837
|
layer: c.layer,
|
|
9838
9838
|
layerIndex: c.layerIndex,
|
|
9839
|
-
productOverlay: t.type ===
|
|
9839
|
+
productOverlay: t.type === E.ProductOverlay ? !0 : void 0,
|
|
9840
9840
|
scaleX: 1,
|
|
9841
9841
|
scaleY: 1,
|
|
9842
9842
|
rotation: c.rotation,
|
|
@@ -9853,14 +9853,14 @@ const ls = [
|
|
|
9853
9853
|
const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], g = h?.length > 0 ? h[0] : "", f = dt().parseFromString(g, "image/svg+xml").firstElementChild;
|
|
9854
9854
|
if (!f)
|
|
9855
9855
|
throw new Pt("Failed to read SVG.");
|
|
9856
|
-
return
|
|
9856
|
+
return xa(f), It().serializeToString(f);
|
|
9857
9857
|
};
|
|
9858
9858
|
l.forEach((A) => {
|
|
9859
9859
|
const u = n.find((g) => g.panelId === A.panelId);
|
|
9860
9860
|
if (!u)
|
|
9861
|
-
throw new
|
|
9861
|
+
throw new Y(A);
|
|
9862
9862
|
const h = {
|
|
9863
|
-
id:
|
|
9863
|
+
id: k(),
|
|
9864
9864
|
src: r,
|
|
9865
9865
|
asset_key: r,
|
|
9866
9866
|
svg: d(c),
|
|
@@ -9875,7 +9875,7 @@ const ls = [
|
|
|
9875
9875
|
scaleX: 1,
|
|
9876
9876
|
scaleY: 1,
|
|
9877
9877
|
rotation: A.rotation,
|
|
9878
|
-
productOverlay: t.type ===
|
|
9878
|
+
productOverlay: t.type === E.ProductOverlay ? !0 : void 0,
|
|
9879
9879
|
excludeFromExport: t.data.excludeFromPrint
|
|
9880
9880
|
};
|
|
9881
9881
|
a.push(new W(h, u));
|
|
@@ -9891,9 +9891,9 @@ const ls = [
|
|
|
9891
9891
|
if (!f || !f.asset)
|
|
9892
9892
|
return;
|
|
9893
9893
|
t[a.stepName] = { selectedVariants: [f] };
|
|
9894
|
-
const
|
|
9895
|
-
if (
|
|
9896
|
-
return
|
|
9894
|
+
const v = f.asset.fileLink;
|
|
9895
|
+
if (v)
|
|
9896
|
+
return v;
|
|
9897
9897
|
}, d = await (async () => {
|
|
9898
9898
|
const p = l();
|
|
9899
9899
|
if (!p)
|
|
@@ -9908,15 +9908,15 @@ const ls = [
|
|
|
9908
9908
|
uppercase: a.data.uppercase
|
|
9909
9909
|
}), h = async (p) => {
|
|
9910
9910
|
const f = p.colorOption;
|
|
9911
|
-
return f ?
|
|
9911
|
+
return f ? j.getDefaultVariant(f)?.color : void 0;
|
|
9912
9912
|
}, g = r.color || await h(a.data), m = a.data.regions;
|
|
9913
9913
|
for (const p of m) {
|
|
9914
9914
|
const f = n.find((w) => w.panelId === p.panelId);
|
|
9915
9915
|
if (!f)
|
|
9916
9916
|
continue;
|
|
9917
|
-
const
|
|
9917
|
+
const v = {
|
|
9918
9918
|
stepName: e.name,
|
|
9919
|
-
id:
|
|
9919
|
+
id: k(),
|
|
9920
9920
|
align: s(a.data),
|
|
9921
9921
|
curved: a.data.curved,
|
|
9922
9922
|
fill: r.color || g || "#000000",
|
|
@@ -9936,7 +9936,7 @@ const ls = [
|
|
|
9936
9936
|
y: p.top
|
|
9937
9937
|
};
|
|
9938
9938
|
if (d) {
|
|
9939
|
-
const [w,
|
|
9939
|
+
const [w, I] = ye(
|
|
9940
9940
|
a.data.size || o,
|
|
9941
9941
|
d,
|
|
9942
9942
|
p,
|
|
@@ -9955,16 +9955,16 @@ const ls = [
|
|
|
9955
9955
|
i.push(
|
|
9956
9956
|
new W(
|
|
9957
9957
|
{
|
|
9958
|
-
...
|
|
9958
|
+
...v,
|
|
9959
9959
|
fontSize: w,
|
|
9960
|
-
text:
|
|
9960
|
+
text: v.curved ? v.text : (I || []).join(`
|
|
9961
9961
|
`)
|
|
9962
9962
|
},
|
|
9963
9963
|
f
|
|
9964
9964
|
)
|
|
9965
9965
|
);
|
|
9966
9966
|
} else
|
|
9967
|
-
i.push(new W(
|
|
9967
|
+
i.push(new W(v, f));
|
|
9968
9968
|
}
|
|
9969
9969
|
return i;
|
|
9970
9970
|
}, fs = (n, t) => n.conditions ? n.conditions.every((e) => {
|
|
@@ -9982,18 +9982,18 @@ const ls = [
|
|
|
9982
9982
|
const s = t.steps.find((l) => l.stepName === o.name);
|
|
9983
9983
|
if (s)
|
|
9984
9984
|
switch (s.type) {
|
|
9985
|
-
case
|
|
9985
|
+
case E.DigitalContent:
|
|
9986
9986
|
i.push(
|
|
9987
9987
|
...await cs(e, o, s)
|
|
9988
9988
|
);
|
|
9989
9989
|
break;
|
|
9990
|
-
case
|
|
9991
|
-
case
|
|
9990
|
+
case E.Frame:
|
|
9991
|
+
case E.Photo:
|
|
9992
9992
|
i.push(
|
|
9993
9993
|
...await ds(e, r, o, s)
|
|
9994
9994
|
);
|
|
9995
9995
|
break;
|
|
9996
|
-
case
|
|
9996
|
+
case E.Illustration:
|
|
9997
9997
|
i.push(
|
|
9998
9998
|
...await As(
|
|
9999
9999
|
e,
|
|
@@ -10003,20 +10003,20 @@ const ls = [
|
|
|
10003
10003
|
)
|
|
10004
10004
|
);
|
|
10005
10005
|
break;
|
|
10006
|
-
case
|
|
10006
|
+
case E.Module:
|
|
10007
10007
|
i.push(...await us(e, o, s));
|
|
10008
10008
|
break;
|
|
10009
|
-
case
|
|
10009
|
+
case E.Picture:
|
|
10010
10010
|
i.push(
|
|
10011
10011
|
...await hs(e, r, o, s)
|
|
10012
10012
|
);
|
|
10013
10013
|
break;
|
|
10014
|
-
case
|
|
10014
|
+
case E.Shape:
|
|
10015
10015
|
i.push(
|
|
10016
10016
|
...await gs(e, r, o, s)
|
|
10017
10017
|
);
|
|
10018
10018
|
break;
|
|
10019
|
-
case
|
|
10019
|
+
case E.Text:
|
|
10020
10020
|
i.push(
|
|
10021
10021
|
...await ps(e, r, o, s)
|
|
10022
10022
|
);
|
|
@@ -10024,7 +10024,7 @@ const ls = [
|
|
|
10024
10024
|
}
|
|
10025
10025
|
}
|
|
10026
10026
|
for (const o of t.steps)
|
|
10027
|
-
o.type !==
|
|
10027
|
+
o.type !== E.SilentIllustration && o.type !== E.ProductOverlay || fs(o, r) && i.push(
|
|
10028
10028
|
...await ms(e, o, a)
|
|
10029
10029
|
);
|
|
10030
10030
|
return i;
|
|
@@ -10189,12 +10189,12 @@ class Es extends Wn {
|
|
|
10189
10189
|
l = p.width, c = p.height;
|
|
10190
10190
|
} else
|
|
10191
10191
|
l = r.width, c = r.height;
|
|
10192
|
-
const d = this.getWorkflowManager?.()?.getTemplatingContext(), A =
|
|
10192
|
+
const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = Ma(t.layoutState.layout, e, {
|
|
10193
10193
|
renderingConfiguration: {
|
|
10194
10194
|
purpose: Yt.ThreeD,
|
|
10195
10195
|
templatingContext: d
|
|
10196
10196
|
}
|
|
10197
|
-
}), u = xn(A), h = await
|
|
10197
|
+
}), u = xn(A), h = await Ea.from(this.ctx, u, {
|
|
10198
10198
|
anonymousCrossOrigin: !0,
|
|
10199
10199
|
ignoreDimensions: !this.nonPOTSupport,
|
|
10200
10200
|
ignoreAnimation: !0,
|
|
@@ -10203,7 +10203,7 @@ class Es extends Wn {
|
|
|
10203
10203
|
enableRedraw: !1,
|
|
10204
10204
|
createCanvas: ft,
|
|
10205
10205
|
createImage: ee,
|
|
10206
|
-
DOMParser:
|
|
10206
|
+
DOMParser: Pa(),
|
|
10207
10207
|
fetch
|
|
10208
10208
|
});
|
|
10209
10209
|
h.resize(l, c), await h.render(), this.onRender();
|
|
@@ -10213,7 +10213,7 @@ const kd = (n, t) => {
|
|
|
10213
10213
|
const e = [];
|
|
10214
10214
|
return n.forEach((a) => {
|
|
10215
10215
|
const i = t.steps.find((r) => r.stepName === a.stepName);
|
|
10216
|
-
i?.type ===
|
|
10216
|
+
i?.type === E.Text && a.stepAspectType === "Text" && e.push({
|
|
10217
10217
|
name: i.stepName,
|
|
10218
10218
|
data: {
|
|
10219
10219
|
text: a.value
|
|
@@ -10280,7 +10280,7 @@ const kd = (n, t) => {
|
|
|
10280
10280
|
}
|
|
10281
10281
|
}
|
|
10282
10282
|
}
|
|
10283
|
-
`, Td = async (n) => (await
|
|
10283
|
+
`, Td = async (n) => (await S.getShadowGraphqlClient().query({
|
|
10284
10284
|
query: Bs,
|
|
10285
10285
|
fetchPolicy: "cache-first",
|
|
10286
10286
|
errorPolicy: "all",
|
|
@@ -10332,7 +10332,7 @@ const kd = (n, t) => {
|
|
|
10332
10332
|
name
|
|
10333
10333
|
}
|
|
10334
10334
|
}
|
|
10335
|
-
`,
|
|
10335
|
+
`, Ra = (n) => C`
|
|
10336
10336
|
${Ps(n)}
|
|
10337
10337
|
fragment ProductCollectionProductFields on ProductCollectionProduct {
|
|
10338
10338
|
id
|
|
@@ -10343,7 +10343,7 @@ const kd = (n, t) => {
|
|
|
10343
10343
|
}
|
|
10344
10344
|
}
|
|
10345
10345
|
`, Ge = (n, t = !1) => C`
|
|
10346
|
-
${n ?
|
|
10346
|
+
${n ? Ra(t) : ""}
|
|
10347
10347
|
fragment ProductCollectionFields on ProductCollection {
|
|
10348
10348
|
id
|
|
10349
10349
|
name
|
|
@@ -10544,7 +10544,7 @@ const kd = (n, t) => {
|
|
|
10544
10544
|
}
|
|
10545
10545
|
}
|
|
10546
10546
|
`, Ds = C`
|
|
10547
|
-
${
|
|
10547
|
+
${Ra(!1)}
|
|
10548
10548
|
query GetProductCollectionProducts($id: String!, $productIds: [String!]) {
|
|
10549
10549
|
productCollections(ids: [$id], productIds: $productIds) {
|
|
10550
10550
|
id
|
|
@@ -10577,7 +10577,7 @@ const kd = (n, t) => {
|
|
|
10577
10577
|
}
|
|
10578
10578
|
}
|
|
10579
10579
|
`, Ms = C`
|
|
10580
|
-
${
|
|
10580
|
+
${Ra(!0)}
|
|
10581
10581
|
query GetProductCollectionForProductsFeed(
|
|
10582
10582
|
$id: String!
|
|
10583
10583
|
$limit: Int
|
|
@@ -10949,7 +10949,7 @@ class on extends Wn {
|
|
|
10949
10949
|
}
|
|
10950
10950
|
}
|
|
10951
10951
|
const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
10952
|
-
id:
|
|
10952
|
+
id: k(),
|
|
10953
10953
|
panelId: t.name,
|
|
10954
10954
|
name: t.name,
|
|
10955
10955
|
title: t.title,
|
|
@@ -10998,7 +10998,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
10998
10998
|
a.type === Se.FirstName ? e[i] = t?.firstName : a.type === Se.LastName ? e[i] = t?.lastName : a.type === Se.Custom && (a.customFieldIndex === 1 ? e[i] = t?.customField1 : a.customFieldIndex === 2 ? e[i] = t?.customField2 : a.customFieldIndex === 3 ? e[i] = t?.customField3 : a.customFieldIndex === 4 ? e[i] = t?.customField4 : a.customFieldIndex === 5 && (e[i] = t?.customField5), a.option && (e[i] = a.option.variants?.find((r) => r.id === e[i])?.name));
|
|
10999
10999
|
}), e;
|
|
11000
11000
|
}
|
|
11001
|
-
async updateRecipient(t, e, a, i, r, o, s, l, c, d, A, u, h, g, m, p, f,
|
|
11001
|
+
async updateRecipient(t, e, a, i, r, o, s, l, c, d, A, u, h, g, m, p, f, v) {
|
|
11002
11002
|
const w = this.experience.getTransaction();
|
|
11003
11003
|
if (w.recipient?.id)
|
|
11004
11004
|
this.experience.getTransaction().recipient = {
|
|
@@ -11020,7 +11020,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11020
11020
|
customField4: m ?? w.recipient.customField4,
|
|
11021
11021
|
customField5: p ?? w.recipient.customField5,
|
|
11022
11022
|
conversionConfigurationId: f || w.recipient.conversionConfigurationId
|
|
11023
|
-
}, this.experience.callEvent(
|
|
11023
|
+
}, this.experience.callEvent(ya.RecipientChanged), await this.graphQlClient().mutate({
|
|
11024
11024
|
mutation: Xs,
|
|
11025
11025
|
errorPolicy: "all",
|
|
11026
11026
|
fetchPolicy: "no-cache",
|
|
@@ -11043,11 +11043,11 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11043
11043
|
customField4: m || w.recipient.customField4,
|
|
11044
11044
|
customField5: p || w.recipient.customField5,
|
|
11045
11045
|
conversionConfigurationId: f || w.recipient.conversionConfigurationId,
|
|
11046
|
-
prevalidated:
|
|
11046
|
+
prevalidated: v
|
|
11047
11047
|
}
|
|
11048
11048
|
});
|
|
11049
11049
|
else {
|
|
11050
|
-
const
|
|
11050
|
+
const I = await this.graphQlClient().mutate({
|
|
11051
11051
|
mutation: _s,
|
|
11052
11052
|
errorPolicy: "all",
|
|
11053
11053
|
fetchPolicy: "no-cache",
|
|
@@ -11072,7 +11072,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11072
11072
|
}
|
|
11073
11073
|
});
|
|
11074
11074
|
w.recipient = {
|
|
11075
|
-
id:
|
|
11075
|
+
id: I?.data?.recipientCreate?.id,
|
|
11076
11076
|
firstName: t,
|
|
11077
11077
|
lastName: e,
|
|
11078
11078
|
address: a,
|
|
@@ -11090,20 +11090,20 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11090
11090
|
customField4: m,
|
|
11091
11091
|
customField5: p,
|
|
11092
11092
|
conversionConfigurationId: f
|
|
11093
|
-
}, this.experience.callEvent(
|
|
11093
|
+
}, this.experience.callEvent(ya.RecipientChanged), await this.graphQlClient().mutate({
|
|
11094
11094
|
mutation: Zs,
|
|
11095
11095
|
errorPolicy: "all",
|
|
11096
11096
|
fetchPolicy: "no-cache",
|
|
11097
11097
|
variables: {
|
|
11098
11098
|
id: this.experience.getTransaction().id,
|
|
11099
|
-
recipientId:
|
|
11099
|
+
recipientId: I.data?.recipientCreate?.id
|
|
11100
11100
|
},
|
|
11101
11101
|
context: {
|
|
11102
11102
|
transactionOwnerId: this.experience.getTransaction().transactionOwnerId
|
|
11103
11103
|
}
|
|
11104
11104
|
});
|
|
11105
11105
|
}
|
|
11106
|
-
await this.fetchConversionConfiguration(), this.recipientCallbacks.forEach((
|
|
11106
|
+
await this.fetchConversionConfiguration(), this.recipientCallbacks.forEach((I) => I(this.experience.getTransaction().recipient));
|
|
11107
11107
|
}
|
|
11108
11108
|
async fetchConversionConfiguration() {
|
|
11109
11109
|
const t = this.experience.getTransaction().recipient;
|
|
@@ -11273,7 +11273,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11273
11273
|
this.pendingUpdates = this.pendingUpdates.filter((e) => e !== t);
|
|
11274
11274
|
}
|
|
11275
11275
|
markUpdatePending() {
|
|
11276
|
-
const t =
|
|
11276
|
+
const t = k();
|
|
11277
11277
|
return this.pendingUpdates = [...this.pendingUpdates, t], t;
|
|
11278
11278
|
}
|
|
11279
11279
|
setEditedStatus(t, e) {
|
|
@@ -11326,7 +11326,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11326
11326
|
},
|
|
11327
11327
|
{ refocusCamera: e }
|
|
11328
11328
|
);
|
|
11329
|
-
this.setModelContainer(i), yt(this.allScenes, this.stepSelections).filter((s) => s).map((s) => s.renderableSteps).flat().filter((s) => s.type ===
|
|
11329
|
+
this.setModelContainer(i), yt(this.allScenes, this.stepSelections).filter((s) => s).map((s) => s.renderableSteps).flat().filter((s) => s.type === E.Model || s.type === E.Material).forEach((s) => {
|
|
11330
11330
|
if (!s.option?.id) {
|
|
11331
11331
|
console.error(`Failed to read option id from step: ${s.stepName}`);
|
|
11332
11332
|
return;
|
|
@@ -11334,7 +11334,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11334
11334
|
const l = this.stepSelections[s.stepName]?.selectedVariants || [];
|
|
11335
11335
|
if (l.length === 0) return;
|
|
11336
11336
|
const c = l[0];
|
|
11337
|
-
if (s.type ===
|
|
11337
|
+
if (s.type === E.Model) {
|
|
11338
11338
|
if (!this.modelContainer)
|
|
11339
11339
|
throw new Q(
|
|
11340
11340
|
"We should always have a model container when injecting a preview!"
|
|
@@ -11486,17 +11486,17 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11486
11486
|
), t), []) || [];
|
|
11487
11487
|
}
|
|
11488
11488
|
getInvalidModelVariants() {
|
|
11489
|
-
return this.experience.getWorkflow()?.steps.reduce((t, e) => (e.type ===
|
|
11489
|
+
return this.experience.getWorkflow()?.steps.reduce((t, e) => (e.type === E.Model && !vt(e, this.stepSelections) && t.push(e.stepName), t), []) || [];
|
|
11490
11490
|
}
|
|
11491
11491
|
async stepElementsForIntroducedSilentSteps(t, e) {
|
|
11492
11492
|
const a = this.experience.getProduct();
|
|
11493
11493
|
if (!a)
|
|
11494
11494
|
return Promise.resolve({ stepElements: {}, commands: [] });
|
|
11495
11495
|
const i = async (c, d, A) => {
|
|
11496
|
-
if (c.type ===
|
|
11496
|
+
if (c.type === E.SilentIllustration) {
|
|
11497
11497
|
const u = await new an(c, d).trigger();
|
|
11498
11498
|
return { step: c, results: u };
|
|
11499
|
-
} else if (c.type ===
|
|
11499
|
+
} else if (c.type === E.ProductOverlay) {
|
|
11500
11500
|
const u = await new an(
|
|
11501
11501
|
c,
|
|
11502
11502
|
d,
|
|
@@ -11541,7 +11541,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11541
11541
|
this.experience.getTransaction().transactionShareActions = t;
|
|
11542
11542
|
}
|
|
11543
11543
|
async updateTransactionStakeholders() {
|
|
11544
|
-
const t = await
|
|
11544
|
+
const t = await S.getShadowGraphqlClient().query({
|
|
11545
11545
|
query: Kr,
|
|
11546
11546
|
errorPolicy: "all",
|
|
11547
11547
|
fetchPolicy: "no-cache",
|
|
@@ -11552,7 +11552,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11552
11552
|
!t?.data?.transactions || t.data.transactions.length !== 1 ? (this.experience.getTransaction().currentStakeholder = void 0, this.experience.getTransaction().stakeholders = void 0) : (this.experience.getTransaction().stakeholders = t.data.transactions[0].stakeholders, this.experience.getTransaction().currentStakeholder = t.data.transactions[0].currentStakeholder);
|
|
11553
11553
|
}
|
|
11554
11554
|
async approveTransaction(t) {
|
|
11555
|
-
await
|
|
11555
|
+
await S.getShadowGraphqlClient().mutate({
|
|
11556
11556
|
mutation: Js,
|
|
11557
11557
|
errorPolicy: "all",
|
|
11558
11558
|
fetchPolicy: "no-cache",
|
|
@@ -11563,7 +11563,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11563
11563
|
});
|
|
11564
11564
|
}
|
|
11565
11565
|
async rejectTransaction(t) {
|
|
11566
|
-
await
|
|
11566
|
+
await S.getShadowGraphqlClient().mutate({
|
|
11567
11567
|
mutation: Ks,
|
|
11568
11568
|
errorPolicy: "all",
|
|
11569
11569
|
fetchPolicy: "no-cache",
|
|
@@ -11583,14 +11583,14 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11583
11583
|
this.stepSelections = {
|
|
11584
11584
|
...this.stepSelections,
|
|
11585
11585
|
[t]: { selectedVariants: e }
|
|
11586
|
-
}, this.selectionCost = Object.values(this.stepSelections).reduce((
|
|
11587
|
-
vt(
|
|
11586
|
+
}, this.selectionCost = Object.values(this.stepSelections).reduce((b, P) => b + P.selectedVariants.map((N) => N.priceModifier || 0).reduce((N, R) => N + R, 0), 0), r.steps.forEach((b) => {
|
|
11587
|
+
vt(b, this.stepSelections) || (this.stepInitialised[b.stepName] = !1, delete this.stepMetadata[b.stepName], delete this.stepSelections[b.stepName], delete this.storage[b.stepName]);
|
|
11588
11588
|
});
|
|
11589
|
-
const s = this.allScenes, l = yt(s, o), c = yt(s, this.stepSelections), d = l.map((
|
|
11590
|
-
(
|
|
11589
|
+
const s = this.allScenes, l = yt(s, o), c = yt(s, this.stepSelections), d = l.map((b) => b.silentSteps).flat(), u = c.map((b) => b.silentSteps).flat().filter(
|
|
11590
|
+
(b) => !d.some((P) => P.stepName === b.stepName)
|
|
11591
11591
|
);
|
|
11592
|
-
d.forEach((
|
|
11593
|
-
vt(
|
|
11592
|
+
d.forEach((b) => {
|
|
11593
|
+
vt(b, this.stepSelections) || (this.stepInitialised[b.stepName] = !1);
|
|
11594
11594
|
});
|
|
11595
11595
|
const h = this.getInvalidCanvasRegions(), { stepElements: g, commands: m } = await this.stepElementsForIntroducedSilentSteps(u, !1);
|
|
11596
11596
|
this.stepElements = {
|
|
@@ -11598,22 +11598,22 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11598
11598
|
...g,
|
|
11599
11599
|
[t]: a
|
|
11600
11600
|
}, this.removeElements(h);
|
|
11601
|
-
const p = r.steps.find((
|
|
11602
|
-
p?.type ===
|
|
11603
|
-
const f = h.map((
|
|
11601
|
+
const p = r.steps.find((b) => b.stepName === t);
|
|
11602
|
+
p?.type === E.Frame && this.getWorkflowExperience().getStepById(p.stepName)?.frameService?.setTargetElements(a.map((P) => P.id));
|
|
11603
|
+
const f = h.map((b) => new Nt(b.id)), v = new tn(this.constructSerializableWorkflow()), w = [...m, ...f, v];
|
|
11604
11604
|
w.length > 0 && this.commandContext.apply(new $(w), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
|
|
11605
|
-
const
|
|
11606
|
-
if (
|
|
11607
|
-
const
|
|
11608
|
-
(
|
|
11609
|
-
|
|
11605
|
+
const I = this.getInvalidModelVariants(), y = this.modelContainer;
|
|
11606
|
+
if (y) {
|
|
11607
|
+
const b = I.map(
|
|
11608
|
+
(P) => y.applyModelVariant(
|
|
11609
|
+
P,
|
|
11610
11610
|
{
|
|
11611
11611
|
contextService: this.getLayoutPreviewService()
|
|
11612
11612
|
},
|
|
11613
11613
|
!1
|
|
11614
11614
|
)
|
|
11615
11615
|
);
|
|
11616
|
-
await Promise.all(
|
|
11616
|
+
await Promise.all(b);
|
|
11617
11617
|
}
|
|
11618
11618
|
await this.onSelectionChange(), i && await i();
|
|
11619
11619
|
}
|
|
@@ -11622,7 +11622,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11622
11622
|
for (const l of i)
|
|
11623
11623
|
if (!this.stepInitialised[l.stepName])
|
|
11624
11624
|
switch (this.stepInitialised[l.stepName] = !0, l.type) {
|
|
11625
|
-
case
|
|
11625
|
+
case E.DigitalContent:
|
|
11626
11626
|
a.push(
|
|
11627
11627
|
ri.init(
|
|
11628
11628
|
l,
|
|
@@ -11631,44 +11631,44 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11631
11631
|
)
|
|
11632
11632
|
);
|
|
11633
11633
|
break;
|
|
11634
|
-
case
|
|
11634
|
+
case E.Frame:
|
|
11635
11635
|
a.push(St.init(l, this, this.reloadedState));
|
|
11636
11636
|
break;
|
|
11637
|
-
case
|
|
11637
|
+
case E.Illustration:
|
|
11638
11638
|
a.push(
|
|
11639
11639
|
we.init(l, this, this.reloadedState)
|
|
11640
11640
|
);
|
|
11641
11641
|
break;
|
|
11642
|
-
case
|
|
11642
|
+
case E.Material:
|
|
11643
11643
|
a.push(
|
|
11644
11644
|
oi.init(l, this, this.reloadedState)
|
|
11645
11645
|
);
|
|
11646
11646
|
break;
|
|
11647
|
-
case
|
|
11647
|
+
case E.Model:
|
|
11648
11648
|
a.push(si.init(l, this, this.reloadedState));
|
|
11649
11649
|
break;
|
|
11650
|
-
case
|
|
11650
|
+
case E.Module:
|
|
11651
11651
|
this.stepSpecificServices[l.stepName] = {
|
|
11652
11652
|
module: await Ai(l.data.module)
|
|
11653
11653
|
}, a.push(
|
|
11654
11654
|
li.init(l, this, this.reloadedState)
|
|
11655
11655
|
);
|
|
11656
11656
|
break;
|
|
11657
|
-
case
|
|
11657
|
+
case E.Picture:
|
|
11658
11658
|
a.push(
|
|
11659
11659
|
ci.init(l, this, this.reloadedState)
|
|
11660
11660
|
);
|
|
11661
11661
|
break;
|
|
11662
|
-
case
|
|
11662
|
+
case E.Question:
|
|
11663
11663
|
a.push(
|
|
11664
11664
|
di.init(l, this, this.reloadedState)
|
|
11665
11665
|
);
|
|
11666
11666
|
break;
|
|
11667
|
-
case
|
|
11667
|
+
case E.Shape:
|
|
11668
11668
|
a.push(zt.init(l, this, this.reloadedState));
|
|
11669
11669
|
break;
|
|
11670
|
-
case
|
|
11671
|
-
a.push(
|
|
11670
|
+
case E.Text:
|
|
11671
|
+
a.push(q.init(l, this, this.reloadedState));
|
|
11672
11672
|
break;
|
|
11673
11673
|
}
|
|
11674
11674
|
const r = (await Promise.allSettled(a)).map((l) => {
|
|
@@ -11731,7 +11731,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11731
11731
|
}
|
|
11732
11732
|
};
|
|
11733
11733
|
qt.configurationPromiseMap = /* @__PURE__ */ new Map();
|
|
11734
|
-
let
|
|
11734
|
+
let wa = qt;
|
|
11735
11735
|
class rt {
|
|
11736
11736
|
constructor(t) {
|
|
11737
11737
|
this.variantData = t;
|
|
@@ -11971,7 +11971,7 @@ class il extends tt {
|
|
|
11971
11971
|
getColors() {
|
|
11972
11972
|
const t = this.manager.getRegionElements(this.step.stepName) || [];
|
|
11973
11973
|
if (t.length === 0) return;
|
|
11974
|
-
const a =
|
|
11974
|
+
const a = L(t[0].id, this.manager.getAllLayoutData()).colors, r = this.getCurrentVariant()?.getAssetResource()?.assetConfiguration, o = r?.defaultColorVariants || [];
|
|
11975
11975
|
if (o.length !== 0) {
|
|
11976
11976
|
const s = {};
|
|
11977
11977
|
return o.forEach((l) => {
|
|
@@ -12147,7 +12147,7 @@ class dl extends tt {
|
|
|
12147
12147
|
* @param variant The font variant to use.
|
|
12148
12148
|
*/
|
|
12149
12149
|
async selectVariant(t) {
|
|
12150
|
-
|
|
12150
|
+
q.selectVariant(
|
|
12151
12151
|
this.step,
|
|
12152
12152
|
t.getResource(),
|
|
12153
12153
|
this.manager,
|
|
@@ -12174,7 +12174,7 @@ class dl extends tt {
|
|
|
12174
12174
|
* @returns A list of colors that can be used to fill the text.
|
|
12175
12175
|
*/
|
|
12176
12176
|
getAvailableFillColors() {
|
|
12177
|
-
return this.step.data.colorPickerEnabled ?
|
|
12177
|
+
return this.step.data.colorPickerEnabled ? q.availableFillColors(this.step) : [];
|
|
12178
12178
|
}
|
|
12179
12179
|
/**
|
|
12180
12180
|
* Changes the fill of text related to this step to the new fill value.
|
|
@@ -12182,7 +12182,7 @@ class dl extends tt {
|
|
|
12182
12182
|
*/
|
|
12183
12183
|
async setFillColor(t) {
|
|
12184
12184
|
const e = this.manager.getRegionElements(this.step.stepName);
|
|
12185
|
-
await
|
|
12185
|
+
await q.changeFillColor(this.step, t, e, this.manager);
|
|
12186
12186
|
}
|
|
12187
12187
|
/**
|
|
12188
12188
|
* Gets the color currently applied to the element.
|
|
@@ -12191,21 +12191,21 @@ class dl extends tt {
|
|
|
12191
12191
|
return this.manager.getStepStorage(this.step.stepName)?.color || "#000000";
|
|
12192
12192
|
}
|
|
12193
12193
|
getAvailableFillImages() {
|
|
12194
|
-
return
|
|
12194
|
+
return q.availableFillImages(this.step);
|
|
12195
12195
|
}
|
|
12196
12196
|
async setFillImage(t) {
|
|
12197
12197
|
const e = this.manager.getRegionElements(this.step.stepName);
|
|
12198
|
-
await
|
|
12198
|
+
await q.changeFillImage(this.step, t, e, this.manager);
|
|
12199
12199
|
}
|
|
12200
12200
|
getFillImage() {
|
|
12201
12201
|
return this.manager.getStepStorage(this.step.stepName)?.fillImage;
|
|
12202
12202
|
}
|
|
12203
12203
|
getAlignment() {
|
|
12204
|
-
return
|
|
12204
|
+
return q.findLayoutElements(this.manager, this.step)?.[0].align;
|
|
12205
12205
|
}
|
|
12206
12206
|
setAlignment(t) {
|
|
12207
12207
|
const e = this.manager.getRegionElements(this.step.stepName);
|
|
12208
|
-
|
|
12208
|
+
q.changeAlignment(this.step, t, e, this.manager);
|
|
12209
12209
|
}
|
|
12210
12210
|
/**
|
|
12211
12211
|
* When true & the step has replaceable text configured the user will be
|
|
@@ -12228,11 +12228,11 @@ class dl extends tt {
|
|
|
12228
12228
|
const e = {
|
|
12229
12229
|
input: t,
|
|
12230
12230
|
helperData: {}
|
|
12231
|
-
}, a =
|
|
12231
|
+
}, a = q.findLayoutElements(this.manager, this.step), i = q.filterUnsupportedCharacters(t, a[0]?.fontData), r = xt(i, this.manager).length, o = !!this.step.data && !!this.step.data.maxLength && r > this.step.data.maxLength;
|
|
12232
12232
|
o || (e.input = i);
|
|
12233
12233
|
const s = a.length <= 0, l = s ? { inputText: i, text: i } : { inputText: i };
|
|
12234
12234
|
this.manager.updateStorage(this.step.stepName, l);
|
|
12235
|
-
const c = this.manager.getStepStorage(this.step.stepName), d =
|
|
12235
|
+
const c = this.manager.getStepStorage(this.step.stepName), d = q.getProcessedInput(
|
|
12236
12236
|
i,
|
|
12237
12237
|
this.step.data,
|
|
12238
12238
|
c?.customiseAllText ?? !1
|
|
@@ -12242,7 +12242,7 @@ class dl extends tt {
|
|
|
12242
12242
|
text: d
|
|
12243
12243
|
});
|
|
12244
12244
|
else {
|
|
12245
|
-
const { command: A, errorData: u, helperData: h } =
|
|
12245
|
+
const { command: A, errorData: u, helperData: h } = q.updateInputText(
|
|
12246
12246
|
i,
|
|
12247
12247
|
a,
|
|
12248
12248
|
this.step,
|
|
@@ -12279,8 +12279,8 @@ class dl extends tt {
|
|
|
12279
12279
|
if (!this.manager.getStepStorage(this.step.stepName)?.defaultCleared && this.step.data.deleteDefaultOnFocus) {
|
|
12280
12280
|
const e = this.setText("");
|
|
12281
12281
|
this.manager.updateStorage(this.step.stepName, { defaultCleared: !0, inputText: "" });
|
|
12282
|
-
const a =
|
|
12283
|
-
return
|
|
12282
|
+
const a = q.findLayoutElements(this.manager, this.step);
|
|
12283
|
+
return q.updateInputText("", a, this.step, this.manager), e;
|
|
12284
12284
|
}
|
|
12285
12285
|
}
|
|
12286
12286
|
hasColorPicker() {
|
|
@@ -12317,7 +12317,7 @@ class dl extends tt {
|
|
|
12317
12317
|
* @returns A list of colors that can be used for the text's outline.
|
|
12318
12318
|
*/
|
|
12319
12319
|
getAvailableStrokeColors() {
|
|
12320
|
-
return this.step.data.strokeEnabled ?
|
|
12320
|
+
return this.step.data.strokeEnabled ? q.availableStrokeColors(this.step) : [];
|
|
12321
12321
|
}
|
|
12322
12322
|
getStrokeColor() {
|
|
12323
12323
|
return this.manager.getStepStorage(this.step.stepName)?.strokeColor?.browserValue || "#000000";
|
|
@@ -12328,7 +12328,7 @@ class dl extends tt {
|
|
|
12328
12328
|
*/
|
|
12329
12329
|
async setStrokeColor(t) {
|
|
12330
12330
|
const e = this.manager.getRegionElements(this.step.stepName);
|
|
12331
|
-
await
|
|
12331
|
+
await q.changeStrokeColor(this.step, t, e, this.manager);
|
|
12332
12332
|
}
|
|
12333
12333
|
}
|
|
12334
12334
|
class Al extends tt {
|
|
@@ -12420,27 +12420,27 @@ class hl extends tt {
|
|
|
12420
12420
|
class ue {
|
|
12421
12421
|
static get(t, e) {
|
|
12422
12422
|
switch (e.type) {
|
|
12423
|
-
case
|
|
12423
|
+
case E.DigitalContent:
|
|
12424
12424
|
return new ul(t, e, t.getStepTags(e.stepName));
|
|
12425
|
-
case
|
|
12425
|
+
case E.Information:
|
|
12426
12426
|
return new Al(t, e, t.getStepTags(e.stepName));
|
|
12427
|
-
case
|
|
12427
|
+
case E.Question:
|
|
12428
12428
|
return new ll(t, e, t.getStepTags(e.stepName));
|
|
12429
|
-
case
|
|
12429
|
+
case E.Text:
|
|
12430
12430
|
return new dl(t, e, t.getStepTags(e.stepName));
|
|
12431
|
-
case
|
|
12431
|
+
case E.Illustration:
|
|
12432
12432
|
return new il(t, e, t.getStepTags(e.stepName));
|
|
12433
|
-
case
|
|
12433
|
+
case E.Picture:
|
|
12434
12434
|
return new sl(t, e, t.getStepTags(e.stepName));
|
|
12435
|
-
case
|
|
12435
|
+
case E.Shape:
|
|
12436
12436
|
return new cl(t, e, t.getStepTags(e.stepName));
|
|
12437
|
-
case
|
|
12437
|
+
case E.Material:
|
|
12438
12438
|
return new rl(t, e, t.getStepTags(e.stepName));
|
|
12439
|
-
case
|
|
12439
|
+
case E.Model:
|
|
12440
12440
|
return new ol(t, e, t.getStepTags(e.stepName));
|
|
12441
|
-
case
|
|
12441
|
+
case E.Frame:
|
|
12442
12442
|
return new uc(t, e, t.getStepTags(e.stepName));
|
|
12443
|
-
case
|
|
12443
|
+
case E.Module:
|
|
12444
12444
|
return new hl(t, e, t.getStepTags(e.stepName));
|
|
12445
12445
|
default:
|
|
12446
12446
|
throw new Q(`Step type ${e.type} not yet supported in Core SDK`);
|
|
@@ -12499,7 +12499,7 @@ const pl = async (n, t) => {
|
|
|
12499
12499
|
const o = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))?.[0] || "", s = localStorage.getItem(o);
|
|
12500
12500
|
s && !Te(s) && (e.Authorization = `Bearer ${s}`);
|
|
12501
12501
|
}
|
|
12502
|
-
return (await
|
|
12502
|
+
return (await S.getShadowGraphqlClient().mutate({
|
|
12503
12503
|
mutation: ml,
|
|
12504
12504
|
errorPolicy: "all",
|
|
12505
12505
|
fetchPolicy: "no-cache",
|
|
@@ -12576,7 +12576,7 @@ const pl = async (n, t) => {
|
|
|
12576
12576
|
}
|
|
12577
12577
|
return i;
|
|
12578
12578
|
}, Cl = (n, t, e, a, i, r, o, s) => {
|
|
12579
|
-
const l = t.basePrice || 0, c = n.priceModifierTotal || 0, d = fl(a, e, void 0, r), u = (
|
|
12579
|
+
const l = t.basePrice || 0, c = n.priceModifierTotal || 0, d = fl(a, e, void 0, r), u = (D.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), h = {
|
|
12580
12580
|
additionalExternalProductId: n.integrationProduct?.additionalExternalProductId,
|
|
12581
12581
|
additionalExternalVariantId: n.integrationProduct?.additionalExternalVariantId,
|
|
12582
12582
|
baseCost: l,
|
|
@@ -12600,45 +12600,48 @@ const pl = async (n, t) => {
|
|
|
12600
12600
|
return r && (h.metadata = r), a && (h.selectedVariants = a), i && (h.sku = i), h;
|
|
12601
12601
|
}, wl = async (n, t, e, a, i, r, o, s, l, c) => {
|
|
12602
12602
|
c && (console.warn("State mismatch detected. Uploading known state explicitly"), console.warn("State Object:", JSON.stringify(a())), await n.updateStateWithServerImmediate(a), console.log("Server state is undefined @ Workflow completion"));
|
|
12603
|
-
const d = n.getPreviewService(), A = t?.finalizeStepConfig?.lookAtAnimation, u = d && t.showModelOnFinishStep && !!A, h = l && sn(l, t, !0), g = l && sn(l, t, !1), m = async (
|
|
12604
|
-
const
|
|
12605
|
-
let
|
|
12603
|
+
const d = n.getPreviewService(), A = t?.finalizeStepConfig?.lookAtAnimation, u = d && t.showModelOnFinishStep && !!A, h = l && sn(l, t, !0), g = l && sn(l, t, !1), m = async (I) => {
|
|
12604
|
+
const y = {};
|
|
12605
|
+
let b = 0;
|
|
12606
12606
|
if (Object.keys(r).length > 0)
|
|
12607
|
-
for (const
|
|
12608
|
-
const
|
|
12609
|
-
for (let
|
|
12610
|
-
const
|
|
12611
|
-
if (
|
|
12612
|
-
const
|
|
12613
|
-
|
|
12614
|
-
id:
|
|
12615
|
-
name:
|
|
12616
|
-
priceModifier:
|
|
12617
|
-
}) :
|
|
12607
|
+
for (const P of Object.keys(r)) {
|
|
12608
|
+
const N = r[P], R = t.steps.find((B) => B.stepName === P);
|
|
12609
|
+
for (let B = 0; B < N.selections.length; ++B) {
|
|
12610
|
+
const M = N.selections[B];
|
|
12611
|
+
if (R && (!I || R.option && (R.option.variants || []).length > 1 && !R.data.hideSelectionInCart && !R.data.hideSelectionsInCart)) {
|
|
12612
|
+
const G = R.stepTitle;
|
|
12613
|
+
y[G] ? y[G].push({
|
|
12614
|
+
id: M.id || "",
|
|
12615
|
+
name: M.name,
|
|
12616
|
+
priceModifier: M.priceModifier
|
|
12617
|
+
}) : y[G] = [
|
|
12618
12618
|
{
|
|
12619
|
-
id:
|
|
12620
|
-
name:
|
|
12621
|
-
priceModifier:
|
|
12619
|
+
id: M.id || "",
|
|
12620
|
+
name: M.name,
|
|
12621
|
+
priceModifier: M.priceModifier
|
|
12622
12622
|
}
|
|
12623
12623
|
];
|
|
12624
12624
|
}
|
|
12625
|
-
|
|
12625
|
+
b += M.priceModifier;
|
|
12626
12626
|
}
|
|
12627
12627
|
}
|
|
12628
|
-
return [
|
|
12629
|
-
}, [p] = await m(!0)
|
|
12630
|
-
|
|
12631
|
-
|
|
12632
|
-
|
|
12633
|
-
|
|
12634
|
-
|
|
12628
|
+
return [y, b];
|
|
12629
|
+
}, [p] = await m(!0);
|
|
12630
|
+
Object.fromEntries(
|
|
12631
|
+
Object.keys(p).map((I) => [I, p[I].map((y) => y.id)])
|
|
12632
|
+
);
|
|
12633
|
+
const [f] = await m(!1);
|
|
12634
|
+
Object.fromEntries(
|
|
12635
|
+
Object.keys(f).map((I) => [
|
|
12636
|
+
I,
|
|
12637
|
+
f[I].map((y) => y.id)
|
|
12635
12638
|
])
|
|
12636
12639
|
);
|
|
12637
|
-
let
|
|
12638
|
-
if (
|
|
12639
|
-
const
|
|
12640
|
-
|
|
12641
|
-
{ name: `${i.id}-preview-image.png`, blob:
|
|
12640
|
+
let v = await s(u, i.id);
|
|
12641
|
+
if (v) {
|
|
12642
|
+
const I = await (await nt(v)).blob();
|
|
12643
|
+
v = (await U.uploadAsset(
|
|
12644
|
+
{ name: `${i.id}-preview-image.png`, blob: I },
|
|
12642
12645
|
Ee.Image,
|
|
12643
12646
|
!0,
|
|
12644
12647
|
!1
|
|
@@ -12646,30 +12649,27 @@ const pl = async (n, t) => {
|
|
|
12646
12649
|
}
|
|
12647
12650
|
return {
|
|
12648
12651
|
designDetails: (() => {
|
|
12649
|
-
const
|
|
12652
|
+
const I = {
|
|
12650
12653
|
name: o,
|
|
12651
|
-
layouts:
|
|
12652
|
-
|
|
12653
|
-
|
|
12654
|
-
|
|
12654
|
+
// layouts: layouts.map((layout) => {
|
|
12655
|
+
// return {
|
|
12656
|
+
// index: layout.index,
|
|
12657
|
+
// panelId: layout.panelId,
|
|
12658
|
+
// };
|
|
12659
|
+
// }),
|
|
12660
|
+
layouts: [],
|
|
12655
12661
|
workflowId: t.id,
|
|
12656
12662
|
transactionId: i.id,
|
|
12657
12663
|
useThreeDimPreview: !!u,
|
|
12658
|
-
previewImage:
|
|
12664
|
+
previewImage: v
|
|
12659
12665
|
};
|
|
12660
12666
|
if (g) {
|
|
12661
|
-
const
|
|
12662
|
-
for (const [
|
|
12663
|
-
|
|
12664
|
-
|
|
12665
|
-
}
|
|
12666
|
-
if (f) {
|
|
12667
|
-
const I = [];
|
|
12668
|
-
for (const [N, R] of Object.entries(w))
|
|
12669
|
-
I.push({ key: N, ids: R });
|
|
12670
|
-
E.selectedVariants = I;
|
|
12667
|
+
const y = [];
|
|
12668
|
+
for (const [b, P] of Object.entries(g))
|
|
12669
|
+
y.push({ key: b, value: P });
|
|
12670
|
+
I.metadata = y;
|
|
12671
12671
|
}
|
|
12672
|
-
return
|
|
12672
|
+
return I;
|
|
12673
12673
|
})(),
|
|
12674
12674
|
cartSelectionsWithPrices: p,
|
|
12675
12675
|
cartMetadata: h
|
|
@@ -12681,20 +12681,24 @@ const pl = async (n, t) => {
|
|
|
12681
12681
|
})
|
|
12682
12682
|
);
|
|
12683
12683
|
const a = await (async () => {
|
|
12684
|
-
const o =
|
|
12685
|
-
n.map(async (
|
|
12686
|
-
id:
|
|
12687
|
-
hash: await
|
|
12684
|
+
const o = S.getShadowGraphqlClient(), s = await Promise.all(
|
|
12685
|
+
n.map(async (A) => ({
|
|
12686
|
+
id: A.transaction.id,
|
|
12687
|
+
hash: await A.workflowManager.getStateHash()
|
|
12688
12688
|
}))
|
|
12689
|
-
),
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12689
|
+
), c = da(s, 100), d = [];
|
|
12690
|
+
for (let A = 0; A < c.length; ++A) {
|
|
12691
|
+
const u = c[A], h = await o.query({
|
|
12692
|
+
query: jr,
|
|
12693
|
+
variables: {
|
|
12694
|
+
transactions: u
|
|
12695
|
+
},
|
|
12696
|
+
fetchPolicy: "no-cache",
|
|
12697
|
+
errorPolicy: "all"
|
|
12698
|
+
});
|
|
12699
|
+
h.errors && h.errors.length > 0 ? d.push(...s.map((g) => g.id)) : d.push(...h.data?.transactionConfirmWorkflowStates ?? []), A < c.length - 2 && await new Promise((g) => setTimeout(g, 500));
|
|
12700
|
+
}
|
|
12701
|
+
return d;
|
|
12698
12702
|
})(), i = await Promise.all(
|
|
12699
12703
|
n.map(async (o) => await wl(
|
|
12700
12704
|
o.workflowManager,
|
|
@@ -12746,7 +12750,7 @@ class yl {
|
|
|
12746
12750
|
*/
|
|
12747
12751
|
async getSavedDesigns() {
|
|
12748
12752
|
if (this.storageMethod === "Local") {
|
|
12749
|
-
const t =
|
|
12753
|
+
const t = D.get(this.localPersistenceKey);
|
|
12750
12754
|
return t ? JSON.parse(t) : [];
|
|
12751
12755
|
}
|
|
12752
12756
|
throw new Q("Unexpected storage method requested");
|
|
@@ -12786,7 +12790,7 @@ class yl {
|
|
|
12786
12790
|
}
|
|
12787
12791
|
async setDesigns(t) {
|
|
12788
12792
|
if (this.storageMethod === "Local") {
|
|
12789
|
-
|
|
12793
|
+
D.set(this.localPersistenceKey, JSON.stringify(t));
|
|
12790
12794
|
return;
|
|
12791
12795
|
}
|
|
12792
12796
|
throw new Q("Unexpected storage method requested");
|
|
@@ -12923,7 +12927,7 @@ const ra = new yl(), Sl = C`
|
|
|
12923
12927
|
}
|
|
12924
12928
|
}
|
|
12925
12929
|
`;
|
|
12926
|
-
var
|
|
12930
|
+
var ya = /* @__PURE__ */ ((n) => (n.PriceBreakChanged = "PriceBreakChanged", n.ProductChanged = "ProductChanged", n.QuantityChanged = "QuantityChanged", n.RecipientChanged = "RecipientChanged", n.SelectionChanged = "SelectionChanged", n))(ya || {});
|
|
12927
12931
|
class bl {
|
|
12928
12932
|
constructor(t, e) {
|
|
12929
12933
|
this.cachedStepHandles = /* @__PURE__ */ new Map(), this.profanityList = [], this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = vn(async () => {
|
|
@@ -12939,7 +12943,7 @@ class bl {
|
|
|
12939
12943
|
} catch (o) {
|
|
12940
12944
|
r(o);
|
|
12941
12945
|
}
|
|
12942
|
-
}), this.client = t, this.transaction = e.transaction, this.workflow = e.workflow, this.profanityList = this.transaction.product?.profanities?.map((a) => a.word) || [], this.isReadOnly = e.transaction.isOrdered || !!e.readOnly, this.graphQlClient = e.graphQlClient, this.workflowManager = new
|
|
12946
|
+
}), this.client = t, this.transaction = e.transaction, this.workflow = e.workflow, this.profanityList = this.transaction.product?.profanities?.map((a) => a.word) || [], this.isReadOnly = e.transaction.isOrdered || !!e.readOnly, this.graphQlClient = e.graphQlClient, this.workflowManager = new wa(
|
|
12943
12947
|
this,
|
|
12944
12948
|
t,
|
|
12945
12949
|
(a) => {
|
|
@@ -13108,23 +13112,23 @@ class bl {
|
|
|
13108
13112
|
}, u = this.workflowManager.getCommandContext().getLayoutById(d.layoutState.layout.id), h = o.getContext("2d");
|
|
13109
13113
|
if (!h)
|
|
13110
13114
|
throw new Qe("Failed to obtain 2D context for preview image creation");
|
|
13111
|
-
const g = this.workflowManager.getTemplatingContext(), m =
|
|
13115
|
+
const g = this.workflowManager.getTemplatingContext(), m = Ma(u.layoutState.layout, u.layoutState.elements, {
|
|
13112
13116
|
renderingConfiguration: {
|
|
13113
13117
|
purpose: Yt.Print,
|
|
13114
13118
|
region: { left: A.x, top: A.y, width: A.width, height: A.height },
|
|
13115
13119
|
templatingContext: g
|
|
13116
13120
|
}
|
|
13117
13121
|
}), p = xn(m);
|
|
13118
|
-
await (await
|
|
13122
|
+
await (await Ea.from(h, p, {
|
|
13119
13123
|
anonymousCrossOrigin: !0,
|
|
13120
13124
|
ignoreDimensions: !1,
|
|
13121
13125
|
createCanvas: ft,
|
|
13122
13126
|
createImage: ee,
|
|
13123
|
-
DOMParser:
|
|
13127
|
+
DOMParser: Pa(),
|
|
13124
13128
|
fetch
|
|
13125
13129
|
})).render();
|
|
13126
|
-
const
|
|
13127
|
-
return o.toDataURL(
|
|
13130
|
+
const v = await this.getCanvasObjectURLAsync(o);
|
|
13131
|
+
return o.toDataURL(v);
|
|
13128
13132
|
}
|
|
13129
13133
|
getStepById(t) {
|
|
13130
13134
|
const e = this.getWorkflow()?.steps.find((r) => r.stepName === t);
|
|
@@ -13257,8 +13261,8 @@ class bl {
|
|
|
13257
13261
|
);
|
|
13258
13262
|
if (a?.customer) {
|
|
13259
13263
|
this.getWorkflowManager().setTransactionCustomer(a.customer);
|
|
13260
|
-
const i =
|
|
13261
|
-
i.set(this.getTransaction().id, a.customer.id),
|
|
13264
|
+
const i = D.getMap("transactionCustomerIds") || /* @__PURE__ */ new Map();
|
|
13265
|
+
i.set(this.getTransaction().id, a.customer.id), D.setMap("transactionCustomerIds", i);
|
|
13262
13266
|
}
|
|
13263
13267
|
}
|
|
13264
13268
|
attachRenderableSceneListener(t) {
|
|
@@ -13344,7 +13348,7 @@ class bl {
|
|
|
13344
13348
|
* @returns Returns true when a valid handle is implemented for a given step type. Certain steps don't support handles, such as silent illustrations.
|
|
13345
13349
|
*/
|
|
13346
13350
|
stepHasHandle(t) {
|
|
13347
|
-
return t.type !==
|
|
13351
|
+
return t.type !== E.SilentIllustration && t.type !== E.ProductOverlay;
|
|
13348
13352
|
}
|
|
13349
13353
|
getExportedStepData() {
|
|
13350
13354
|
const t = this.getWorkflow(), e = this.getWorkflowManager().getWorkflowMetadata(), a = this.getWorkflowManager().getWorkflowSelections(), i = [];
|
|
@@ -13363,7 +13367,7 @@ class bl {
|
|
|
13363
13367
|
return;
|
|
13364
13368
|
}
|
|
13365
13369
|
switch (r.type) {
|
|
13366
|
-
case
|
|
13370
|
+
case E.Frame:
|
|
13367
13371
|
{
|
|
13368
13372
|
const d = r.data, A = s;
|
|
13369
13373
|
A.image && d.displayImageOnFinishStep && c.properties.push({
|
|
@@ -13373,7 +13377,7 @@ class bl {
|
|
|
13373
13377
|
});
|
|
13374
13378
|
}
|
|
13375
13379
|
break;
|
|
13376
|
-
case
|
|
13380
|
+
case E.Illustration:
|
|
13377
13381
|
{
|
|
13378
13382
|
const d = r.data, A = s;
|
|
13379
13383
|
if (A && A.colors && A.colors.length > 0 && d.displayColorsOnFinishStep) {
|
|
@@ -13386,7 +13390,7 @@ class bl {
|
|
|
13386
13390
|
}
|
|
13387
13391
|
}
|
|
13388
13392
|
break;
|
|
13389
|
-
case
|
|
13393
|
+
case E.Module:
|
|
13390
13394
|
{
|
|
13391
13395
|
const d = r.data, A = s;
|
|
13392
13396
|
A && A.text && d.displayTextOnFinishStep && c.properties.push({
|
|
@@ -13396,7 +13400,7 @@ class bl {
|
|
|
13396
13400
|
});
|
|
13397
13401
|
}
|
|
13398
13402
|
break;
|
|
13399
|
-
case
|
|
13403
|
+
case E.Text: {
|
|
13400
13404
|
const d = r.data, A = s;
|
|
13401
13405
|
A && A.text && d.displayTextOnFinishStep && c.properties.push({
|
|
13402
13406
|
type: "text",
|
|
@@ -13450,14 +13454,14 @@ class bl {
|
|
|
13450
13454
|
}
|
|
13451
13455
|
const Il = (n) => {
|
|
13452
13456
|
if ([
|
|
13453
|
-
|
|
13454
|
-
|
|
13455
|
-
|
|
13456
|
-
|
|
13457
|
-
|
|
13458
|
-
|
|
13459
|
-
|
|
13460
|
-
|
|
13457
|
+
E.Question,
|
|
13458
|
+
E.Frame,
|
|
13459
|
+
E.Illustration,
|
|
13460
|
+
E.Material,
|
|
13461
|
+
E.Model,
|
|
13462
|
+
E.Picture,
|
|
13463
|
+
E.Shape,
|
|
13464
|
+
E.Text
|
|
13461
13465
|
].includes(n.type)) {
|
|
13462
13466
|
const e = n.data;
|
|
13463
13467
|
return !!e.displaySelectionOnFinishStep || !!e.displaySelectionsOnFinishStep;
|
|
@@ -13512,26 +13516,26 @@ class Pl {
|
|
|
13512
13516
|
}
|
|
13513
13517
|
async createHandle(t) {
|
|
13514
13518
|
switch (t.type) {
|
|
13515
|
-
case
|
|
13519
|
+
case V.FileUpload:
|
|
13516
13520
|
return new xl(this.bundle, t).initialize();
|
|
13517
|
-
case
|
|
13521
|
+
case V.ColorOption:
|
|
13518
13522
|
return new cn(
|
|
13519
13523
|
this.bundle,
|
|
13520
13524
|
t,
|
|
13521
|
-
t.entityId ? await
|
|
13525
|
+
t.entityId ? await j.getOption(t.entityId) : void 0
|
|
13522
13526
|
);
|
|
13523
|
-
case
|
|
13524
|
-
const e = t.entityId ? await
|
|
13527
|
+
case V.Option: {
|
|
13528
|
+
const e = t.entityId ? await j.getOption(t.entityId) : void 0;
|
|
13525
13529
|
return e?.type === "Color" ? new cn(this.bundle, t, e) : new gi(this.bundle, t, e);
|
|
13526
13530
|
}
|
|
13527
|
-
case
|
|
13531
|
+
case V.Text:
|
|
13528
13532
|
return new Fl(this.bundle, t);
|
|
13529
13533
|
default:
|
|
13530
13534
|
throw new Error("Unhandled Global Property Aspect Type");
|
|
13531
13535
|
}
|
|
13532
13536
|
}
|
|
13533
13537
|
}
|
|
13534
|
-
class
|
|
13538
|
+
class Oa {
|
|
13535
13539
|
constructor(t, e) {
|
|
13536
13540
|
this.bundle = t, this.property = e;
|
|
13537
13541
|
}
|
|
@@ -13592,18 +13596,18 @@ class Ra {
|
|
|
13592
13596
|
return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);
|
|
13593
13597
|
}
|
|
13594
13598
|
}
|
|
13595
|
-
class xl extends
|
|
13599
|
+
class xl extends Oa {
|
|
13596
13600
|
constructor(t, e) {
|
|
13597
13601
|
super(t, e);
|
|
13598
13602
|
}
|
|
13599
13603
|
async initialize() {
|
|
13600
|
-
return this.property.data?.fileUpload?.colorOptionId && (this.colorOption = await
|
|
13604
|
+
return this.property.data?.fileUpload?.colorOptionId && (this.colorOption = await j.getOption(this.property.data?.fileUpload?.colorOptionId)), await this.loadImageData(), this;
|
|
13601
13605
|
}
|
|
13602
13606
|
async loadImageData() {
|
|
13603
13607
|
const t = await this.getImage();
|
|
13604
13608
|
if (t?.fileLink)
|
|
13605
13609
|
if (t?.fileLink.endsWith(".svg")) {
|
|
13606
|
-
const e = await at(t?.fileLink), a = await
|
|
13610
|
+
const e = await at(t?.fileLink), a = await Qa(t?.fileLink), i = a.width, r = a.height, o = await st(e);
|
|
13607
13611
|
this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.colors?.forEach((c) => {
|
|
13608
13612
|
o.colors[c.key] = {
|
|
13609
13613
|
browserValue: c.browserValue,
|
|
@@ -13646,7 +13650,7 @@ class xl extends Ra {
|
|
|
13646
13650
|
]);
|
|
13647
13651
|
}
|
|
13648
13652
|
async canUseBackgroundRemover() {
|
|
13649
|
-
return this.bundle.getClient().canUseAddon(
|
|
13653
|
+
return this.bundle.getClient().canUseAddon(ba.BackgroundRemover);
|
|
13650
13654
|
}
|
|
13651
13655
|
/**
|
|
13652
13656
|
* Removes the background from an image, stores it in the state, and returns the new asset.
|
|
@@ -13684,7 +13688,7 @@ class xl extends Ra {
|
|
|
13684
13688
|
return U.getLocalOrFromServer(t);
|
|
13685
13689
|
}
|
|
13686
13690
|
async getImageWithColors() {
|
|
13687
|
-
return await this.loadImageData(), this.imageData?.svg ?
|
|
13691
|
+
return await this.loadImageData(), this.imageData?.svg ? Ia(Da(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
|
|
13688
13692
|
}
|
|
13689
13693
|
/**
|
|
13690
13694
|
* Retrieves the original, unmodified image selection, if one exists.
|
|
@@ -13818,7 +13822,7 @@ class xl extends Ra {
|
|
|
13818
13822
|
);
|
|
13819
13823
|
}
|
|
13820
13824
|
}
|
|
13821
|
-
class Fl extends
|
|
13825
|
+
class Fl extends Oa {
|
|
13822
13826
|
constructor(t, e) {
|
|
13823
13827
|
super(t, e);
|
|
13824
13828
|
}
|
|
@@ -13857,7 +13861,7 @@ class Fl extends Ra {
|
|
|
13857
13861
|
await Promise.all(i);
|
|
13858
13862
|
}
|
|
13859
13863
|
}
|
|
13860
|
-
class gi extends
|
|
13864
|
+
class gi extends Oa {
|
|
13861
13865
|
constructor(t, e, a) {
|
|
13862
13866
|
super(t, e), this.optionResource = a;
|
|
13863
13867
|
}
|
|
@@ -13942,15 +13946,15 @@ class cn extends gi {
|
|
|
13942
13946
|
async applyColorVariant(t, e, a) {
|
|
13943
13947
|
const r = this.getSharedSteps(e).map((o) => {
|
|
13944
13948
|
switch (o.getType()) {
|
|
13945
|
-
case
|
|
13949
|
+
case E.Shape:
|
|
13946
13950
|
return o.selectVariant(t);
|
|
13947
|
-
case
|
|
13951
|
+
case E.Text:
|
|
13948
13952
|
return o.setFillColor({
|
|
13949
13953
|
fill: t.getColor(),
|
|
13950
13954
|
stroke: t.getColor(),
|
|
13951
13955
|
variant: t.getResource()
|
|
13952
13956
|
});
|
|
13953
|
-
case
|
|
13957
|
+
case E.Illustration:
|
|
13954
13958
|
return o.setColor(a?.toString() || "", t.getColor() || "");
|
|
13955
13959
|
}
|
|
13956
13960
|
});
|
|
@@ -13974,22 +13978,22 @@ const Dl = (n, t, e, a) => n.flatMap((i) => i.getSteps()).filter((i) => i.getGlo
|
|
|
13974
13978
|
n,
|
|
13975
13979
|
t,
|
|
13976
13980
|
e,
|
|
13977
|
-
|
|
13981
|
+
E.Illustration
|
|
13978
13982
|
).map((r) => {
|
|
13979
13983
|
const o = r.getCurrentVariant()?.getAssetResource(), s = r.getColors();
|
|
13980
13984
|
return !o?.assetConfiguration || !s ? 0 : Object.getOwnPropertyNames(s).length;
|
|
13981
13985
|
});
|
|
13982
13986
|
return Math.max(...i);
|
|
13983
13987
|
};
|
|
13984
|
-
function
|
|
13988
|
+
function Sa(n, t) {
|
|
13985
13989
|
function e(a) {
|
|
13986
13990
|
if (typeof a > "u" || !Array.isArray(a) && !Tl(a))
|
|
13987
13991
|
return a;
|
|
13988
13992
|
if (Array.isArray(a))
|
|
13989
|
-
return
|
|
13993
|
+
return Sa(a, t);
|
|
13990
13994
|
let i = {};
|
|
13991
13995
|
for (const [r, o] of Object.entries(a))
|
|
13992
|
-
i[r] = Ml(o) ? o :
|
|
13996
|
+
i[r] = Ml(o) ? o : Sa(o, t);
|
|
13993
13997
|
return Ui(i, t);
|
|
13994
13998
|
}
|
|
13995
13999
|
return Array.isArray(n) ? n.map(e) : e(n);
|
|
@@ -14007,7 +14011,7 @@ function mi(n) {
|
|
|
14007
14011
|
}), t;
|
|
14008
14012
|
}
|
|
14009
14013
|
function he(n) {
|
|
14010
|
-
return
|
|
14014
|
+
return Sa(n, ["__typename"]);
|
|
14011
14015
|
}
|
|
14012
14016
|
class Nl {
|
|
14013
14017
|
constructor(t, e, a, i, r) {
|
|
@@ -14137,7 +14141,7 @@ class Nl {
|
|
|
14137
14141
|
async updateGlobalPropertyState() {
|
|
14138
14142
|
if (!this.globalPropertyState)
|
|
14139
14143
|
throw new Error("Global property state not initialized");
|
|
14140
|
-
const t = await
|
|
14144
|
+
const t = await S.getShadowGraphqlClient().mutate({
|
|
14141
14145
|
mutation: Is,
|
|
14142
14146
|
variables: {
|
|
14143
14147
|
id: this.globalPropertyState.id,
|
|
@@ -14145,15 +14149,15 @@ class Nl {
|
|
|
14145
14149
|
let a = e.type && e.storage ? {} : void 0;
|
|
14146
14150
|
if (a)
|
|
14147
14151
|
switch (e.type) {
|
|
14148
|
-
case
|
|
14152
|
+
case V.FileUpload: {
|
|
14149
14153
|
a.fileUpload = e.storage;
|
|
14150
14154
|
break;
|
|
14151
14155
|
}
|
|
14152
|
-
case
|
|
14156
|
+
case V.Option: {
|
|
14153
14157
|
a.option = e.storage;
|
|
14154
14158
|
break;
|
|
14155
14159
|
}
|
|
14156
|
-
case
|
|
14160
|
+
case V.ColorOption: {
|
|
14157
14161
|
a = e.storage;
|
|
14158
14162
|
break;
|
|
14159
14163
|
}
|
|
@@ -14180,7 +14184,7 @@ class Nl {
|
|
|
14180
14184
|
throw new Error("Unable to update global property state");
|
|
14181
14185
|
}
|
|
14182
14186
|
async createGlobalPropertyState() {
|
|
14183
|
-
const t = await
|
|
14187
|
+
const t = await S.getShadowGraphqlClient().mutate({
|
|
14184
14188
|
mutation: bs,
|
|
14185
14189
|
variables: {
|
|
14186
14190
|
bundleId: this.bundleId
|
|
@@ -14318,7 +14322,7 @@ class Ol {
|
|
|
14318
14322
|
}
|
|
14319
14323
|
async ensureIdsArePresent(t) {
|
|
14320
14324
|
if (t.every((a) => this.internalMap.has(a))) return;
|
|
14321
|
-
const e = await
|
|
14325
|
+
const e = await S.getShadowGraphqlClient().query({
|
|
14322
14326
|
query: Rl,
|
|
14323
14327
|
errorPolicy: "all",
|
|
14324
14328
|
variables: {
|
|
@@ -14422,7 +14426,7 @@ class pi {
|
|
|
14422
14426
|
async fetchProducts(t) {
|
|
14423
14427
|
if (this.fullFetched)
|
|
14424
14428
|
return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new ge(a));
|
|
14425
|
-
const e = await
|
|
14429
|
+
const e = await S.getShadowGraphqlClient().query({
|
|
14426
14430
|
query: Ds,
|
|
14427
14431
|
variables: {
|
|
14428
14432
|
id: this.getId(),
|
|
@@ -14438,7 +14442,7 @@ class pi {
|
|
|
14438
14442
|
* @param tags An object of tag filters to apply.
|
|
14439
14443
|
*/
|
|
14440
14444
|
async filterProducts(t, e, a, i) {
|
|
14441
|
-
const r = await
|
|
14445
|
+
const r = await S.getShadowGraphqlClient().query({
|
|
14442
14446
|
query: ks,
|
|
14443
14447
|
errorPolicy: "all",
|
|
14444
14448
|
variables: {
|
|
@@ -14482,7 +14486,7 @@ class pi {
|
|
|
14482
14486
|
items: u.slice(t, t + e)
|
|
14483
14487
|
};
|
|
14484
14488
|
}
|
|
14485
|
-
const c = new AbortController(), { signal: d } = c, A =
|
|
14489
|
+
const c = new AbortController(), { signal: d } = c, A = S.getShadowGraphqlClient().watchQuery({
|
|
14486
14490
|
query: Ms,
|
|
14487
14491
|
variables: {
|
|
14488
14492
|
id: this.getId(),
|
|
@@ -14743,7 +14747,7 @@ const zl = C`
|
|
|
14743
14747
|
...ProductCollectionFields
|
|
14744
14748
|
}
|
|
14745
14749
|
}
|
|
14746
|
-
`, Nd = async (n) => (await
|
|
14750
|
+
`, Nd = async (n) => (await S.getShadowGraphqlClient().query({
|
|
14747
14751
|
query: zl,
|
|
14748
14752
|
errorPolicy: "all",
|
|
14749
14753
|
variables: {
|
|
@@ -14833,9 +14837,9 @@ class dn {
|
|
|
14833
14837
|
const u = this.globalPropertyStateManager.getGlobalPropertyState();
|
|
14834
14838
|
u ? this.globalPropertyHandleService.getHandles().then((h) => {
|
|
14835
14839
|
const g = h.map((m) => {
|
|
14836
|
-
if (m.getType() ===
|
|
14840
|
+
if (m.getType() === V.ColorOption || m.getType() === V.Option) {
|
|
14837
14841
|
const p = m;
|
|
14838
|
-
if (!u.aspects.find((
|
|
14842
|
+
if (!u.aspects.find((v) => v.name === p.getName()))
|
|
14839
14843
|
return p.initDefaultVariant();
|
|
14840
14844
|
}
|
|
14841
14845
|
});
|
|
@@ -14876,7 +14880,7 @@ class dn {
|
|
|
14876
14880
|
const a = JSON.stringify(e);
|
|
14877
14881
|
this.bundleStateManager.setState(a), this.fireEvent("bundle-integration-products-added", {
|
|
14878
14882
|
integrationProductIds: e.integrationProductIds
|
|
14879
|
-
}), await
|
|
14883
|
+
}), await S.getShadowGraphqlClient().mutate({
|
|
14880
14884
|
mutation: ia,
|
|
14881
14885
|
variables: {
|
|
14882
14886
|
id: this.id,
|
|
@@ -14898,7 +14902,7 @@ class dn {
|
|
|
14898
14902
|
const i = JSON.stringify(e);
|
|
14899
14903
|
this.bundleStateManager.setState(i), this.fireEvent("bundle-integration-products-removed", {
|
|
14900
14904
|
integrationProductIds: a
|
|
14901
|
-
}), await
|
|
14905
|
+
}), await S.getShadowGraphqlClient().mutate({
|
|
14902
14906
|
mutation: ia,
|
|
14903
14907
|
variables: {
|
|
14904
14908
|
id: this.id,
|
|
@@ -14914,7 +14918,7 @@ class dn {
|
|
|
14914
14918
|
return this.template;
|
|
14915
14919
|
}
|
|
14916
14920
|
async generateQuoteId() {
|
|
14917
|
-
const e = (await
|
|
14921
|
+
const e = (await S.getShadowGraphqlClient().mutate({
|
|
14918
14922
|
mutation: Hl,
|
|
14919
14923
|
variables: {
|
|
14920
14924
|
id: this.id
|
|
@@ -14926,7 +14930,7 @@ class dn {
|
|
|
14926
14930
|
return this.quoteId = e, e || "";
|
|
14927
14931
|
}
|
|
14928
14932
|
async attachAddress(t, e, a, i, r, o) {
|
|
14929
|
-
await
|
|
14933
|
+
await S.getShadowGraphqlClient().mutate({
|
|
14930
14934
|
mutation: Wl,
|
|
14931
14935
|
variables: {
|
|
14932
14936
|
bundleId: this.id,
|
|
@@ -14943,7 +14947,7 @@ class dn {
|
|
|
14943
14947
|
});
|
|
14944
14948
|
}
|
|
14945
14949
|
async attachOrganization(t) {
|
|
14946
|
-
await
|
|
14950
|
+
await S.getShadowGraphqlClient().mutate({
|
|
14947
14951
|
mutation: ql,
|
|
14948
14952
|
variables: {
|
|
14949
14953
|
bundleId: this.id,
|
|
@@ -15026,7 +15030,7 @@ class dn {
|
|
|
15026
15030
|
const i = a?.name, r = e.find((o) => o.getName() === i);
|
|
15027
15031
|
if (r)
|
|
15028
15032
|
switch (a.type) {
|
|
15029
|
-
case
|
|
15033
|
+
case V.FileUpload: {
|
|
15030
15034
|
const o = r, s = await Pe([a.value]);
|
|
15031
15035
|
s.length > 0 && await o.selectImage(s[0]);
|
|
15032
15036
|
const l = a.storage?.colors;
|
|
@@ -15041,17 +15045,17 @@ class dn {
|
|
|
15041
15045
|
}
|
|
15042
15046
|
break;
|
|
15043
15047
|
}
|
|
15044
|
-
case
|
|
15048
|
+
case V.ColorOption: {
|
|
15045
15049
|
const o = r, l = o.getAllVariants().find((d) => d.getId() === a.value), c = a.storage ? a.storage : void 0;
|
|
15046
15050
|
l && await o.selectVariant(l), c?.customColor && o.setCustomColor(c.customColor);
|
|
15047
15051
|
break;
|
|
15048
15052
|
}
|
|
15049
|
-
case
|
|
15053
|
+
case V.Option: {
|
|
15050
15054
|
const o = r, l = o.getAllVariants().find((c) => c.getId() === a.value);
|
|
15051
15055
|
l && await o.selectVariant(l);
|
|
15052
15056
|
break;
|
|
15053
15057
|
}
|
|
15054
|
-
case
|
|
15058
|
+
case V.Text: {
|
|
15055
15059
|
await r.setText(a.value);
|
|
15056
15060
|
break;
|
|
15057
15061
|
}
|
|
@@ -15065,7 +15069,7 @@ class dn {
|
|
|
15065
15069
|
return this.globalPropertyStateManager;
|
|
15066
15070
|
}
|
|
15067
15071
|
async getGlobalPropertyTotalSubunits() {
|
|
15068
|
-
return (await this.globalPropertyHandleService.getHandles()).filter((a) => a.getType() ===
|
|
15072
|
+
return (await this.globalPropertyHandleService.getHandles()).filter((a) => a.getType() === V.Option).map((a) => a.getCurrentVariant()?.getPrice() || 0).reduce((a, i) => a + i, 0);
|
|
15069
15073
|
}
|
|
15070
15074
|
getTotalSubunits() {
|
|
15071
15075
|
return this.workflowExperiences.map((t) => t.getTotalPriceSubunits()).reduce((t, e) => t + e, 0);
|
|
@@ -15074,13 +15078,13 @@ class dn {
|
|
|
15074
15078
|
return this.productCollection ? new pi(this.productCollection) : void 0;
|
|
15075
15079
|
}
|
|
15076
15080
|
async initializeAdditionalRequiredColorChannels(t) {
|
|
15077
|
-
for (const e of t.getStepsByType(
|
|
15081
|
+
for (const e of t.getStepsByType(E.Illustration)) {
|
|
15078
15082
|
const a = e.getGlobalPropertyAspects(this.globalConfigurationPropertyId || "");
|
|
15079
15083
|
for (const i of a) {
|
|
15080
15084
|
const r = this.getGlobalPropertyConfiguration()?.aspects.find(
|
|
15081
15085
|
(o) => o.name === i
|
|
15082
15086
|
);
|
|
15083
|
-
if (r && r.type ===
|
|
15087
|
+
if (r && r.type === V.ColorOption) {
|
|
15084
15088
|
const o = e.getCurrentVariant()?.getAssetResource(), s = o?.assetConfiguration?.channelNumbers || [], l = o?.assetConfiguration?.defaultColorVariants || [], c = kl(
|
|
15085
15089
|
this.getWorkflowExperiences(),
|
|
15086
15090
|
this.globalConfigurationPropertyId || "",
|
|
@@ -15114,8 +15118,8 @@ class dn {
|
|
|
15114
15118
|
throw new Error(
|
|
15115
15119
|
"Unable to add transaction to bundle - Already Exists: " + a.filter((s) => !!s).map((s) => s?.getTransaction().id).join(", ")
|
|
15116
15120
|
);
|
|
15117
|
-
const i =
|
|
15118
|
-
await
|
|
15121
|
+
const i = D.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), r = e.map((s) => i.get(s));
|
|
15122
|
+
await S.getShadowGraphqlClient().mutate({
|
|
15119
15123
|
mutation: Rs,
|
|
15120
15124
|
variables: {
|
|
15121
15125
|
id: this.id,
|
|
@@ -15143,8 +15147,8 @@ class dn {
|
|
|
15143
15147
|
async appendWorkflowExperience(t, e = !0) {
|
|
15144
15148
|
const a = t.getTransaction().id;
|
|
15145
15149
|
if (this.workflowExperiences.find((s) => s.getTransaction().id === a)) throw new Error("Unable to add transaction to bundle - Already Exists!");
|
|
15146
|
-
const o = (
|
|
15147
|
-
await
|
|
15150
|
+
const o = (D.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(a);
|
|
15151
|
+
await S.getShadowGraphqlClient().mutate({
|
|
15148
15152
|
mutation: Qs,
|
|
15149
15153
|
variables: {
|
|
15150
15154
|
id: this.id,
|
|
@@ -15175,7 +15179,7 @@ class dn {
|
|
|
15175
15179
|
async removeTransaction(t, e, a = !0) {
|
|
15176
15180
|
if (t > -1) {
|
|
15177
15181
|
const i = this.workflowExperiences.find((r) => r.getTransaction().id === e.id);
|
|
15178
|
-
if (i.setBundle(void 0), this.previewService && i.getWorkflowManager().ejectFromPreviewService(), this.bundleStateManager.removeStateForTransaction(e.id), await
|
|
15182
|
+
if (i.setBundle(void 0), this.previewService && i.getWorkflowManager().ejectFromPreviewService(), this.bundleStateManager.removeStateForTransaction(e.id), await S.getShadowGraphqlClient().mutate({
|
|
15179
15183
|
mutation: Os,
|
|
15180
15184
|
variables: {
|
|
15181
15185
|
id: this.id,
|
|
@@ -15212,7 +15216,7 @@ class dn {
|
|
|
15212
15216
|
);
|
|
15213
15217
|
a.forEach((i) => i.setBundle(void 0)), [...this.workflowExperiences, ...a].forEach(
|
|
15214
15218
|
(i) => i.checkForPriceBreakChanges()
|
|
15215
|
-
), this.previewService && a.forEach((i) => i.getWorkflowManager().ejectFromPreviewService()), t.forEach((i) => this.bundleStateManager.removeStateForTransaction(i.id)), await
|
|
15219
|
+
), this.previewService && a.forEach((i) => i.getWorkflowManager().ejectFromPreviewService()), t.forEach((i) => this.bundleStateManager.removeStateForTransaction(i.id)), await S.getShadowGraphqlClient().mutate({
|
|
15216
15220
|
mutation: $s,
|
|
15217
15221
|
variables: {
|
|
15218
15222
|
id: this.id,
|
|
@@ -15273,7 +15277,7 @@ class dn {
|
|
|
15273
15277
|
return this.workflowExperiences.length;
|
|
15274
15278
|
}
|
|
15275
15279
|
async addStakeholder(t, e) {
|
|
15276
|
-
const a = await
|
|
15280
|
+
const a = await S.getShadowGraphqlClient().mutate({
|
|
15277
15281
|
mutation: Us,
|
|
15278
15282
|
variables: {
|
|
15279
15283
|
id: this.id,
|
|
@@ -15289,7 +15293,7 @@ class dn {
|
|
|
15289
15293
|
this.storeStakeholderCustomers(i);
|
|
15290
15294
|
}
|
|
15291
15295
|
async removeStakeholder(t) {
|
|
15292
|
-
if (!(await
|
|
15296
|
+
if (!(await S.getShadowGraphqlClient().mutate({
|
|
15293
15297
|
mutation: Ls,
|
|
15294
15298
|
variables: {
|
|
15295
15299
|
id: this.id,
|
|
@@ -15301,7 +15305,7 @@ class dn {
|
|
|
15301
15305
|
})).data?.bundleRemoveStakeholder) throw new Error("Bundle not found!");
|
|
15302
15306
|
}
|
|
15303
15307
|
async updateStakeholders(t) {
|
|
15304
|
-
const e = await
|
|
15308
|
+
const e = await S.getShadowGraphqlClient().mutate({
|
|
15305
15309
|
mutation: Vs,
|
|
15306
15310
|
variables: {
|
|
15307
15311
|
id: this.id,
|
|
@@ -15316,7 +15320,7 @@ class dn {
|
|
|
15316
15320
|
this.storeStakeholderCustomers(a);
|
|
15317
15321
|
}
|
|
15318
15322
|
async getAllStakeholders() {
|
|
15319
|
-
const t = await
|
|
15323
|
+
const t = await S.getShadowGraphqlClient().query({
|
|
15320
15324
|
query: rn,
|
|
15321
15325
|
errorPolicy: "all",
|
|
15322
15326
|
fetchPolicy: "no-cache",
|
|
@@ -15332,7 +15336,7 @@ class dn {
|
|
|
15332
15336
|
return this.storeStakeholderCustomers(e), e;
|
|
15333
15337
|
}
|
|
15334
15338
|
async getCurrentStakeholder() {
|
|
15335
|
-
const t = await
|
|
15339
|
+
const t = await S.getShadowGraphqlClient().query({
|
|
15336
15340
|
query: rn,
|
|
15337
15341
|
errorPolicy: "all",
|
|
15338
15342
|
fetchPolicy: "no-cache",
|
|
@@ -15352,7 +15356,7 @@ class dn {
|
|
|
15352
15356
|
});
|
|
15353
15357
|
}
|
|
15354
15358
|
async finish(t, e) {
|
|
15355
|
-
this.completed && await
|
|
15359
|
+
this.completed && await S.getShadowGraphqlClient().mutate({
|
|
15356
15360
|
mutation: Hs,
|
|
15357
15361
|
variables: {
|
|
15358
15362
|
bundleId: this.id
|
|
@@ -15419,7 +15423,7 @@ class dn {
|
|
|
15419
15423
|
return this.bundleStateManager.activateWorkflowExperienceTransform(t, e), this.updateBundle();
|
|
15420
15424
|
}
|
|
15421
15425
|
async assignGlobalPropertyConfiguration(t) {
|
|
15422
|
-
await
|
|
15426
|
+
await S.getShadowGraphqlClient().mutate({
|
|
15423
15427
|
mutation: Ws,
|
|
15424
15428
|
variables: {
|
|
15425
15429
|
bundleId: this.id,
|
|
@@ -15431,7 +15435,7 @@ class dn {
|
|
|
15431
15435
|
}), this.globalConfigurationPropertyId = t;
|
|
15432
15436
|
}
|
|
15433
15437
|
async assignProductCollection(t) {
|
|
15434
|
-
const e = await
|
|
15438
|
+
const e = await S.getShadowGraphqlClient().mutate({
|
|
15435
15439
|
mutation: Gs(
|
|
15436
15440
|
this.globalPropertyStateManager.getBundleOptions()?.eagerFetchProducts ?? !1
|
|
15437
15441
|
),
|
|
@@ -15487,7 +15491,7 @@ class dn {
|
|
|
15487
15491
|
await this.injectExperienceIntoPreviewService(r);
|
|
15488
15492
|
}
|
|
15489
15493
|
async updateBundle() {
|
|
15490
|
-
if (!(await
|
|
15494
|
+
if (!(await S.getShadowGraphqlClient().mutate({
|
|
15491
15495
|
mutation: ia,
|
|
15492
15496
|
variables: {
|
|
15493
15497
|
id: this.id,
|
|
@@ -15503,7 +15507,7 @@ class dn {
|
|
|
15503
15507
|
})).data?.bundleUpdate) throw new Error("Bundle not found!");
|
|
15504
15508
|
}
|
|
15505
15509
|
async updateTransactionOrder() {
|
|
15506
|
-
await
|
|
15510
|
+
await S.getShadowGraphqlClient().mutate({
|
|
15507
15511
|
mutation: zs,
|
|
15508
15512
|
variables: {
|
|
15509
15513
|
id: this.id,
|
|
@@ -15525,7 +15529,7 @@ class dn {
|
|
|
15525
15529
|
r.find((u) => u.getName() == A.getName()) || (s = [...s, A.getName()]);
|
|
15526
15530
|
await o.clearAspects(s);
|
|
15527
15531
|
const l = r.map((A) => {
|
|
15528
|
-
if (A.getType() ===
|
|
15532
|
+
if (A.getType() === V.ColorOption || A.getType() === V.Option) {
|
|
15529
15533
|
const u = A;
|
|
15530
15534
|
if (!e.aspects.find((g) => g.name === u.getName()))
|
|
15531
15535
|
return u.initDefaultVariant();
|
|
@@ -15573,7 +15577,7 @@ class dn {
|
|
|
15573
15577
|
return this.workflowViewerAmendLink;
|
|
15574
15578
|
}
|
|
15575
15579
|
async approve(t, e) {
|
|
15576
|
-
await
|
|
15580
|
+
await S.getShadowGraphqlClient().mutate({
|
|
15577
15581
|
mutation: js,
|
|
15578
15582
|
errorPolicy: "all",
|
|
15579
15583
|
fetchPolicy: "no-cache",
|
|
@@ -15585,7 +15589,7 @@ class dn {
|
|
|
15585
15589
|
});
|
|
15586
15590
|
}
|
|
15587
15591
|
async reject(t, e) {
|
|
15588
|
-
await
|
|
15592
|
+
await S.getShadowGraphqlClient().mutate({
|
|
15589
15593
|
mutation: Ys,
|
|
15590
15594
|
errorPolicy: "all",
|
|
15591
15595
|
fetchPolicy: "no-cache",
|
|
@@ -15620,7 +15624,7 @@ class Yl {
|
|
|
15620
15624
|
* @returns
|
|
15621
15625
|
*/
|
|
15622
15626
|
async execute(t, e, a) {
|
|
15623
|
-
const r = (await
|
|
15627
|
+
const r = (await S.getShadowGraphqlClient().mutate({
|
|
15624
15628
|
mutation: jl,
|
|
15625
15629
|
variables: {
|
|
15626
15630
|
processFlowId: t,
|
|
@@ -15635,7 +15639,7 @@ class Yl {
|
|
|
15635
15639
|
}
|
|
15636
15640
|
let s = !1, l = 0, c, d;
|
|
15637
15641
|
for (; !s; ) {
|
|
15638
|
-
c = await
|
|
15642
|
+
c = await S.getShadowGraphqlClient().query({
|
|
15639
15643
|
query: C`
|
|
15640
15644
|
query getProcessFlowExecution($ids: [String]!) {
|
|
15641
15645
|
processExecutions(ids: $ids) {
|
|
@@ -15746,7 +15750,7 @@ class me {
|
|
|
15746
15750
|
return this.getArtifacts().get(t);
|
|
15747
15751
|
}
|
|
15748
15752
|
}
|
|
15749
|
-
class
|
|
15753
|
+
class $a {
|
|
15750
15754
|
constructor(t) {
|
|
15751
15755
|
this.value = t;
|
|
15752
15756
|
}
|
|
@@ -15759,12 +15763,12 @@ class Oa {
|
|
|
15759
15763
|
}
|
|
15760
15764
|
}
|
|
15761
15765
|
var Kl = /* @__PURE__ */ ((n) => (n.Transaction = "Transaction", n.Bundle = "Bundle", n.Product = "Product", n.Variant = "Variant", n.Option = "Option", n.LineItem = "LineItem", n.Asset = "Asset", n))(Kl || {});
|
|
15762
|
-
class Qd extends
|
|
15766
|
+
class Qd extends $a {
|
|
15763
15767
|
constructor(t) {
|
|
15764
15768
|
super(`"${t}"`);
|
|
15765
15769
|
}
|
|
15766
15770
|
}
|
|
15767
|
-
class fi extends
|
|
15771
|
+
class fi extends $a {
|
|
15768
15772
|
constructor(t, e) {
|
|
15769
15773
|
if (e !== "Asset" && !fi.validUUID(t))
|
|
15770
15774
|
throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");
|
|
@@ -15774,7 +15778,7 @@ class fi extends Oa {
|
|
|
15774
15778
|
return t.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
|
|
15775
15779
|
}
|
|
15776
15780
|
}
|
|
15777
|
-
class Rd extends
|
|
15781
|
+
class Rd extends $a {
|
|
15778
15782
|
constructor(t) {
|
|
15779
15783
|
super(`[${t.map((e) => e.getRaw()).join(",")}]`);
|
|
15780
15784
|
}
|
|
@@ -15935,7 +15939,7 @@ const Zl = C`
|
|
|
15935
15939
|
}
|
|
15936
15940
|
`;
|
|
15937
15941
|
class tc {
|
|
15938
|
-
constructor(t, e =
|
|
15942
|
+
constructor(t, e = S.getShadowGraphqlClient.bind(S)) {
|
|
15939
15943
|
this.options = t, this.client = e;
|
|
15940
15944
|
}
|
|
15941
15945
|
query(t) {
|
|
@@ -16088,7 +16092,7 @@ class nc {
|
|
|
16088
16092
|
}
|
|
16089
16093
|
}
|
|
16090
16094
|
const ic = async (n, t) => {
|
|
16091
|
-
const e = await
|
|
16095
|
+
const e = await S.getShadowGraphqlClient().query({
|
|
16092
16096
|
query: ao(t?.assets?.metadata || !1),
|
|
16093
16097
|
errorPolicy: "all",
|
|
16094
16098
|
variables: {
|
|
@@ -16123,7 +16127,7 @@ const ic = async (n, t) => {
|
|
|
16123
16127
|
), o = e.filter((s) => s !== void 0);
|
|
16124
16128
|
return await Promise.all(o.concat(r));
|
|
16125
16129
|
}, oc = async (n, t) => (await Ci([n], t))[0], sc = async (n) => {
|
|
16126
|
-
const t = await
|
|
16130
|
+
const t = await S.getShadowGraphqlClient().query({
|
|
16127
16131
|
query: Ur,
|
|
16128
16132
|
variables: {
|
|
16129
16133
|
ids: n
|
|
@@ -16137,14 +16141,14 @@ class Od {
|
|
|
16137
16141
|
constructor(t) {
|
|
16138
16142
|
this.activeIntegration = void 0, this.updateTransactionState = async (e) => {
|
|
16139
16143
|
try {
|
|
16140
|
-
return
|
|
16144
|
+
return S.getShadowGraphqlClient().mutate({
|
|
16141
16145
|
...e,
|
|
16142
16146
|
mutation: Vr
|
|
16143
16147
|
});
|
|
16144
16148
|
} catch (a) {
|
|
16145
16149
|
throw console.error(a), new gt("Critical - Unable to synchronize workflow state with server.");
|
|
16146
16150
|
}
|
|
16147
|
-
}, this.options = t, this.options.applicationKey && nr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.0.
|
|
16151
|
+
}, this.options = t, this.options.applicationKey && nr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.0.2"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
16148
16152
|
}
|
|
16149
16153
|
configure(t) {
|
|
16150
16154
|
pt.setHubUrl(t.hubUrl), pt.setServerUrl(t.serverUrl), pt.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 && rr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|
|
@@ -16161,7 +16165,7 @@ class Od {
|
|
|
16161
16165
|
return new Yl();
|
|
16162
16166
|
}
|
|
16163
16167
|
async getCurrencyContext(t) {
|
|
16164
|
-
const a = (await this.getIntegration()).partner.currencyCode, r = await
|
|
16168
|
+
const a = (await this.getIntegration()).partner.currencyCode, r = await S.getShadowGraphqlClient().query({
|
|
16165
16169
|
query: Ao,
|
|
16166
16170
|
errorPolicy: "all",
|
|
16167
16171
|
fetchPolicy: "cache-first",
|
|
@@ -16193,12 +16197,12 @@ class Od {
|
|
|
16193
16197
|
* @returns An object containing the success status of the authentication attempt, and the type of stakeholder when successful.
|
|
16194
16198
|
*/
|
|
16195
16199
|
async authenticateBundleFromLocalStorage(t) {
|
|
16196
|
-
if (
|
|
16200
|
+
if (D.getMap("bundleOwnerIds")?.has(t))
|
|
16197
16201
|
return Promise.resolve({ success: !0, stakeholderType: be.Owner });
|
|
16198
|
-
const a =
|
|
16202
|
+
const a = D.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
16199
16203
|
if (a.has(t)) {
|
|
16200
16204
|
const i = a.get(t);
|
|
16201
|
-
if ((
|
|
16205
|
+
if ((D.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map()).get(i) && await this.reloadLoggedInCustomer()) {
|
|
16202
16206
|
const l = this.customer?.bundleStakeholders?.find(
|
|
16203
16207
|
(c) => c.bundle?.id === t
|
|
16204
16208
|
);
|
|
@@ -16222,7 +16226,7 @@ class Od {
|
|
|
16222
16226
|
* @throws An error if the transaction is not found.
|
|
16223
16227
|
*/
|
|
16224
16228
|
async authenticateTransactionFromLocalStorage(t) {
|
|
16225
|
-
const e =
|
|
16229
|
+
const e = S.getShadowGraphqlClient(), a = await e.query({
|
|
16226
16230
|
query: no,
|
|
16227
16231
|
errorPolicy: "all",
|
|
16228
16232
|
fetchPolicy: "no-cache",
|
|
@@ -16237,9 +16241,9 @@ class Od {
|
|
|
16237
16241
|
throw new Error(`Unable to read transaction: ${t}`);
|
|
16238
16242
|
if (i.isOrdered)
|
|
16239
16243
|
return Promise.resolve({ success: !1, transactionReadOnly: !0 });
|
|
16240
|
-
if (
|
|
16244
|
+
if (D.getMap("transactionOwnerIds")?.has(t))
|
|
16241
16245
|
return Promise.resolve({ success: !0, stakeholderType: be.Owner });
|
|
16242
|
-
const s =
|
|
16246
|
+
const s = D.getMap("transactionCustomerIds");
|
|
16243
16247
|
if (s?.has(t) && s.get(t) && await this.reloadLoggedInCustomer()) {
|
|
16244
16248
|
const u = this.customer?.bundleStakeholders?.find(
|
|
16245
16249
|
(h) => h.bundle?.transactions?.some((g) => g.id === t)
|
|
@@ -16271,11 +16275,11 @@ class Od {
|
|
|
16271
16275
|
this.customer = void 0;
|
|
16272
16276
|
}
|
|
16273
16277
|
clearCustomerForTransaction(t) {
|
|
16274
|
-
const e =
|
|
16275
|
-
e?.has(t) && (e.delete(t),
|
|
16278
|
+
const e = D.getMap("transactionCustomerIds");
|
|
16279
|
+
e?.has(t) && (e.delete(t), D.setMap("transactionCustomerIds", e));
|
|
16276
16280
|
}
|
|
16277
16281
|
async customerHasBundleTemplates(t) {
|
|
16278
|
-
const i = (await
|
|
16282
|
+
const i = (await S.getShadowGraphqlClient().query({
|
|
16279
16283
|
query: pe,
|
|
16280
16284
|
errorPolicy: "all",
|
|
16281
16285
|
fetchPolicy: "no-cache",
|
|
@@ -16294,7 +16298,7 @@ class Od {
|
|
|
16294
16298
|
}
|
|
16295
16299
|
async getOrCreateCustomer(t) {
|
|
16296
16300
|
this.customer = void 0;
|
|
16297
|
-
const e =
|
|
16301
|
+
const e = S.getShadowGraphqlClient(), i = (await e.query({
|
|
16298
16302
|
query: pe,
|
|
16299
16303
|
errorPolicy: "all",
|
|
16300
16304
|
fetchPolicy: "no-cache",
|
|
@@ -16347,7 +16351,7 @@ class Od {
|
|
|
16347
16351
|
else
|
|
16348
16352
|
return this.logOut(), console.error("Failed to refresh tokens."), !1;
|
|
16349
16353
|
}
|
|
16350
|
-
const s = (await
|
|
16354
|
+
const s = (await S.getShadowGraphqlClient().query({
|
|
16351
16355
|
query: pe,
|
|
16352
16356
|
errorPolicy: "all",
|
|
16353
16357
|
fetchPolicy: "no-cache",
|
|
@@ -16361,7 +16365,7 @@ class Od {
|
|
|
16361
16365
|
* Generate an email code to allow logging in as a Spiff user.
|
|
16362
16366
|
*/
|
|
16363
16367
|
async generateVerificationCode(t) {
|
|
16364
|
-
await
|
|
16368
|
+
await S.getShadowGraphqlClient().mutate({
|
|
16365
16369
|
mutation: Xl,
|
|
16366
16370
|
variables: {
|
|
16367
16371
|
emailAddress: t
|
|
@@ -16376,7 +16380,7 @@ class Od {
|
|
|
16376
16380
|
const a = (await this.getIntegration()).partner.id || "", i = await Lt.verifyCode(t, e, a);
|
|
16377
16381
|
if (i?.AuthenticationResult) {
|
|
16378
16382
|
localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`), localStorage.setItem("cognito-tokens", JSON.stringify(i.AuthenticationResult)), localStorage.setItem("cognito-email", t);
|
|
16379
|
-
const o = (await
|
|
16383
|
+
const o = (await S.getShadowGraphqlClient().query({
|
|
16380
16384
|
query: pe,
|
|
16381
16385
|
errorPolicy: "all",
|
|
16382
16386
|
fetchPolicy: "no-cache",
|
|
@@ -16416,7 +16420,7 @@ class Od {
|
|
|
16416
16420
|
async getCustomerMetafields() {
|
|
16417
16421
|
if (!this.customer?.id)
|
|
16418
16422
|
throw new Error("Customer must be logged in before calling this function.");
|
|
16419
|
-
return (await
|
|
16423
|
+
return (await S.getShadowGraphqlClient().query({
|
|
16420
16424
|
query: Zl,
|
|
16421
16425
|
variables: {
|
|
16422
16426
|
id: this.customer.id
|
|
@@ -16428,7 +16432,7 @@ class Od {
|
|
|
16428
16432
|
* @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
|
|
16429
16433
|
*/
|
|
16430
16434
|
async getNewBundle(t, e, a) {
|
|
16431
|
-
const r = (await
|
|
16435
|
+
const r = (await S.getShadowGraphqlClient().mutate({
|
|
16432
16436
|
mutation: Ts(a?.graphql?.productCollection?.eagerFetchProducts || !1),
|
|
16433
16437
|
variables: {
|
|
16434
16438
|
collectionId: t,
|
|
@@ -16440,10 +16444,10 @@ class Od {
|
|
|
16440
16444
|
})).data?.bundleCreate;
|
|
16441
16445
|
if (!r?.id)
|
|
16442
16446
|
throw new Error("Unable to create bundle");
|
|
16443
|
-
const o =
|
|
16444
|
-
o.set(r.id, r.partner.id),
|
|
16445
|
-
const s =
|
|
16446
|
-
s.set(r.id, r.bundleOwnerId),
|
|
16447
|
+
const o = D.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
16448
|
+
o.set(r.id, r.partner.id), D.setMap("bundlePartnerIds", o);
|
|
16449
|
+
const s = D.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
|
|
16450
|
+
s.set(r.id, r.bundleOwnerId), D.setMap("bundleOwnerIds", s);
|
|
16447
16451
|
const l = new dn(this, r, void 0, void 0, r.bundleOwnerId, {
|
|
16448
16452
|
eagerFetchProducts: a?.graphql?.productCollection?.eagerFetchProducts
|
|
16449
16453
|
});
|
|
@@ -16458,19 +16462,19 @@ class Od {
|
|
|
16458
16462
|
* @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
|
|
16459
16463
|
*/
|
|
16460
16464
|
async getExistingBundle(t, e, a, i, r) {
|
|
16461
|
-
const s =
|
|
16465
|
+
const s = D.getMap("bundleOwnerIds")?.get(t), l = {};
|
|
16462
16466
|
try {
|
|
16463
16467
|
const g = await this.loggedInBearerToken();
|
|
16464
16468
|
l.Authorization = `Bearer ${g}`;
|
|
16465
16469
|
} catch {
|
|
16466
|
-
const p = Object.entries(localStorage).find(([
|
|
16470
|
+
const p = Object.entries(localStorage).find(([v, w]) => v.startsWith("CognitoIdentityServiceProvider") && v.endsWith("idToken"))?.[0] || "", f = localStorage.getItem(p);
|
|
16467
16471
|
f && !Te(f) && (l.Authorization = `Bearer ${f}`);
|
|
16468
16472
|
}
|
|
16469
16473
|
const c = {
|
|
16470
16474
|
bundleOwnerId: s,
|
|
16471
16475
|
...l,
|
|
16472
16476
|
...i?.graphql?.additionalHeaders
|
|
16473
|
-
}, d = await
|
|
16477
|
+
}, d = await S.getShadowGraphqlClient().query({
|
|
16474
16478
|
query: xs(i?.graphql?.productCollection?.eagerFetchProducts || !1),
|
|
16475
16479
|
variables: {
|
|
16476
16480
|
id: t
|
|
@@ -16482,8 +16486,8 @@ class Od {
|
|
|
16482
16486
|
});
|
|
16483
16487
|
if (!d.data?.bundles || d.data?.bundles.length === 0 || !d.data?.bundles[0])
|
|
16484
16488
|
throw new Error(`Unable to find bundle: ${t}`);
|
|
16485
|
-
const A = d.data?.bundles[0], u =
|
|
16486
|
-
u.set(A.id, A.partner.id),
|
|
16489
|
+
const A = d.data?.bundles[0], u = D.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
16490
|
+
u.set(A.id, A.partner.id), D.setMap("bundlePartnerIds", u);
|
|
16487
16491
|
const h = new dn(
|
|
16488
16492
|
this,
|
|
16489
16493
|
A,
|
|
@@ -16510,7 +16514,7 @@ class Od {
|
|
|
16510
16514
|
const o = {
|
|
16511
16515
|
...await wi(t),
|
|
16512
16516
|
...i?.graphql?.additionalHeaders
|
|
16513
|
-
}, l = (await
|
|
16517
|
+
}, l = (await S.getShadowGraphqlClient().mutate({
|
|
16514
16518
|
mutation: Ns(),
|
|
16515
16519
|
variables: {
|
|
16516
16520
|
id: t,
|
|
@@ -16526,10 +16530,10 @@ class Od {
|
|
|
16526
16530
|
})).data?.bundleDuplicate;
|
|
16527
16531
|
if (!l?.id)
|
|
16528
16532
|
throw new Error("Unable to duplicate bundle");
|
|
16529
|
-
const c =
|
|
16530
|
-
c.set(l.id, l.partner.id),
|
|
16531
|
-
const d =
|
|
16532
|
-
return d.set(l.id, l.bundleOwnerId),
|
|
16533
|
+
const c = D.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
16534
|
+
c.set(l.id, l.partner.id), D.setMap("bundlePartnerIds", c);
|
|
16535
|
+
const d = D.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
|
|
16536
|
+
return d.set(l.id, l.bundleOwnerId), D.setMap("bundleOwnerIds", d), async () => await this.getExistingBundle(l.id, void 0, void 0, {
|
|
16533
16537
|
graphql: {
|
|
16534
16538
|
productCollection: {
|
|
16535
16539
|
eagerFetchProducts: i?.graphql?.productCollection?.eagerFetchProducts || !1
|
|
@@ -16550,7 +16554,7 @@ class Od {
|
|
|
16550
16554
|
if (!this.customer?.id)
|
|
16551
16555
|
throw new Error("Customer not authenticated.");
|
|
16552
16556
|
const { includeMetadata: e, ...a } = t;
|
|
16553
|
-
return (await
|
|
16557
|
+
return (await S.getShadowGraphqlClient().query({
|
|
16554
16558
|
query: qs(e ?? !1),
|
|
16555
16559
|
variables: {
|
|
16556
16560
|
...a,
|
|
@@ -16566,7 +16570,7 @@ class Od {
|
|
|
16566
16570
|
async getBundleStakeholders() {
|
|
16567
16571
|
if (!this.customer)
|
|
16568
16572
|
throw new Error("Customer not authenticated.");
|
|
16569
|
-
const t = await
|
|
16573
|
+
const t = await S.getShadowGraphqlClient().query({
|
|
16570
16574
|
query: Fs,
|
|
16571
16575
|
variables: {
|
|
16572
16576
|
id: this.customer.id
|
|
@@ -16575,10 +16579,10 @@ class Od {
|
|
|
16575
16579
|
});
|
|
16576
16580
|
if (!t.data?.customers || t.data.customers.length === 0)
|
|
16577
16581
|
throw new Error("Unable to find customer.");
|
|
16578
|
-
const a = t.data.customers[0].bundleStakeholders || [], i =
|
|
16582
|
+
const a = t.data.customers[0].bundleStakeholders || [], i = D.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
16579
16583
|
return a.forEach((r) => {
|
|
16580
16584
|
r.bundle?.id && r.bundle.partner?.id && i.set(r.bundle.id, r.bundle.partner.id);
|
|
16581
|
-
}),
|
|
16585
|
+
}), D.setMap("bundlePartnerIds", i), a;
|
|
16582
16586
|
}
|
|
16583
16587
|
/**
|
|
16584
16588
|
* Creates a new instance of WorkflowExperience. A high level wrapper for workflows.
|
|
@@ -16602,62 +16606,62 @@ class Od {
|
|
|
16602
16606
|
async getWorkflowExperiences(t, e, a, i) {
|
|
16603
16607
|
if (t.length === 0)
|
|
16604
16608
|
throw new gt("No options provided!");
|
|
16605
|
-
const r = t.map((B,
|
|
16609
|
+
const r = t.map((B, M) => ({ option: B, index: M })), o = r.filter((B) => B.option.type === "transaction"), s = r.filter(
|
|
16606
16610
|
(B) => B.option.type === "integration" || B.option.type === "external" || B.option.type === "blank"
|
|
16607
|
-
), l = 50, c =
|
|
16611
|
+
), l = 50, c = da(o, l), d = da(s, l);
|
|
16608
16612
|
let A = 0;
|
|
16609
|
-
const u =
|
|
16613
|
+
const u = S.getShadowGraphqlClient(), h = async (B) => {
|
|
16610
16614
|
if (B.length === 0)
|
|
16611
16615
|
return [];
|
|
16612
|
-
const
|
|
16616
|
+
const M = B.map((X) => X.option.transactionId), G = await u.query({
|
|
16613
16617
|
query: Lr,
|
|
16614
16618
|
variables: {
|
|
16615
|
-
ids:
|
|
16619
|
+
ids: M
|
|
16616
16620
|
},
|
|
16617
16621
|
errorPolicy: "all",
|
|
16618
16622
|
fetchPolicy: "no-cache"
|
|
16619
|
-
}),
|
|
16620
|
-
if (A = A +
|
|
16621
|
-
const
|
|
16622
|
-
throw new gt(`Not all transactions were found: ${
|
|
16623
|
+
}), T = G.data.transactions;
|
|
16624
|
+
if (A = A + T.length, i && i(A, o.length), T.length !== B.length) {
|
|
16625
|
+
const X = G.errors?.[0]?.message || "Unknown error";
|
|
16626
|
+
throw new gt(`Not all transactions were found: ${X}`);
|
|
16623
16627
|
}
|
|
16624
|
-
return !this.activeIntegration &&
|
|
16625
|
-
transaction:
|
|
16626
|
-
workflowId:
|
|
16627
|
-
readOnly: B.find((At) => At.option.transactionId ===
|
|
16628
|
+
return !this.activeIntegration && T[0].integrationProduct?.integration && (this.activeIntegration = Promise.resolve(T[0].integrationProduct.integration)), T.map((X, qe) => ({
|
|
16629
|
+
transaction: X,
|
|
16630
|
+
workflowId: X.workflowId,
|
|
16631
|
+
readOnly: B.find((At) => At.option.transactionId === X.id)?.option.readOnly ?? !1,
|
|
16628
16632
|
index: B[qe].index
|
|
16629
16633
|
}));
|
|
16630
16634
|
}, g = async (B) => {
|
|
16631
16635
|
if (B.length === 0)
|
|
16632
16636
|
return [];
|
|
16633
|
-
const
|
|
16637
|
+
const M = await u.mutate({
|
|
16634
16638
|
mutation: $r,
|
|
16635
16639
|
variables: {
|
|
16636
|
-
inputs: B.map((
|
|
16637
|
-
integrationProductId:
|
|
16638
|
-
externalIntegrationId:
|
|
16639
|
-
externalProductId:
|
|
16640
|
-
workflowId:
|
|
16641
|
-
designName:
|
|
16640
|
+
inputs: B.map((T) => ({
|
|
16641
|
+
integrationProductId: T.option.type === "integration" ? T.option.integrationProductId : void 0,
|
|
16642
|
+
externalIntegrationId: T.option.type === "external" ? T.option.externalIntegrationId : void 0,
|
|
16643
|
+
externalProductId: T.option.type === "external" ? T.option.externalProductId : void 0,
|
|
16644
|
+
workflowId: T.option.workflowId,
|
|
16645
|
+
designName: T.option.designName,
|
|
16642
16646
|
claim: !0,
|
|
16643
|
-
quantity:
|
|
16644
|
-
recipient:
|
|
16647
|
+
quantity: T.option.quantity,
|
|
16648
|
+
recipient: T.option.recipient
|
|
16645
16649
|
})),
|
|
16646
16650
|
marketplaceThemeInstallId: this.marketplaceThemeInstallId,
|
|
16647
16651
|
marketplaceThemeInstallConfigurationId: this.marketplaceThemeInstallConfigurationId
|
|
16648
16652
|
},
|
|
16649
16653
|
errorPolicy: "all",
|
|
16650
16654
|
fetchPolicy: "no-cache"
|
|
16651
|
-
}),
|
|
16652
|
-
if (!
|
|
16653
|
-
const
|
|
16654
|
-
throw new gt(`Failed to create transactions: ${
|
|
16655
|
+
}), G = M.data?.transactionCreateMany;
|
|
16656
|
+
if (!G || G.length === 0) {
|
|
16657
|
+
const T = M.errors?.[0]?.message || "Unknown error";
|
|
16658
|
+
throw new gt(`Failed to create transactions: ${T}`);
|
|
16655
16659
|
}
|
|
16656
|
-
return A = A +
|
|
16657
|
-
transaction:
|
|
16658
|
-
workflowId:
|
|
16660
|
+
return A = A + G.length, i && i(A, o.length), G.map((T, X) => ({
|
|
16661
|
+
transaction: T,
|
|
16662
|
+
workflowId: T.workflowId,
|
|
16659
16663
|
readOnly: !1,
|
|
16660
|
-
index: B[
|
|
16664
|
+
index: B[X].index
|
|
16661
16665
|
}));
|
|
16662
16666
|
}, m = (await Promise.all([
|
|
16663
16667
|
...c.map(h),
|
|
@@ -16666,56 +16670,56 @@ class Od {
|
|
|
16666
16670
|
...new Set(m.map((B) => B.transaction.integrationProductId))
|
|
16667
16671
|
].filter((B) => B !== void 0), f = [...new Set(m.map((B) => B.workflowId))].filter(
|
|
16668
16672
|
(B) => B !== void 0
|
|
16669
|
-
), [
|
|
16673
|
+
), [v, w] = await Promise.all([
|
|
16670
16674
|
(async () => p.length > 0 ? await sc(p) : [])(),
|
|
16671
16675
|
(async () => f.length > 0 ? await Ci(f, e) : [])()
|
|
16672
|
-
]),
|
|
16673
|
-
const { transaction:
|
|
16674
|
-
if (
|
|
16675
|
-
const it =
|
|
16676
|
-
|
|
16676
|
+
]), I = new Map(v.map((B) => [B.id, B])), y = new Map(w.map((B) => [B.id, B])), b = m.map(async (B) => {
|
|
16677
|
+
const { transaction: M, workflowId: G, readOnly: T, index: X } = B, qe = G ? y.get(G) : void 0, At = t[X];
|
|
16678
|
+
if (M.integrationProductId) {
|
|
16679
|
+
const it = I.get(M.integrationProductId);
|
|
16680
|
+
M.integrationProduct = it, M.product = it?.product, M.integrationProduct || console.error("failed to find transaction's product");
|
|
16677
16681
|
}
|
|
16678
|
-
const oe =
|
|
16679
|
-
!oe.get(
|
|
16680
|
-
const He = oe.get(
|
|
16682
|
+
const oe = D.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map();
|
|
16683
|
+
!oe.get(M.id) && M.transactionOwnerId && (oe.set(M.id, M.transactionOwnerId), D.setMap("transactionOwnerIds", oe));
|
|
16684
|
+
const He = oe.get(M.id) || void 0, vi = new tc({
|
|
16681
16685
|
onMutate: () => ({ context: { transactionOwnerId: He, bundleOwnerId: e?.bundleOwnerId } }),
|
|
16682
16686
|
onQuery: () => ({ context: { transactionOwnerId: He, bundleOwnerId: e?.bundleOwnerId } })
|
|
16683
16687
|
}), se = {
|
|
16684
16688
|
workflow: qe,
|
|
16685
|
-
transaction:
|
|
16689
|
+
transaction: M,
|
|
16686
16690
|
singleVariantsRenderable: At?.workflowConfiguration?.singleVariantsRenderable,
|
|
16687
|
-
stateMutationFunc:
|
|
16691
|
+
stateMutationFunc: T ? async () => {
|
|
16688
16692
|
throw new Q("State mutation is forbidden in read only mode!");
|
|
16689
16693
|
} : async (it) => this.updateTransactionState({
|
|
16690
16694
|
...it,
|
|
16691
16695
|
context: { transactionOwnerId: He, bundleOwnerId: e?.bundleOwnerId }
|
|
16692
16696
|
}),
|
|
16693
16697
|
graphQlClient: () => vi,
|
|
16694
|
-
readOnly:
|
|
16698
|
+
readOnly: T,
|
|
16695
16699
|
isReloadedTransaction: At.type === "transaction"
|
|
16696
16700
|
};
|
|
16697
|
-
if (At.type === "transaction" &&
|
|
16698
|
-
const it = JSON.parse(
|
|
16701
|
+
if (At.type === "transaction" && M.workflowState) {
|
|
16702
|
+
const it = JSON.parse(M.workflowState);
|
|
16699
16703
|
await Za(it), se.reloadedState = it;
|
|
16700
|
-
} else if (!
|
|
16704
|
+
} else if (!T && At.workflowState) {
|
|
16701
16705
|
const it = JSON.parse(At.workflowState);
|
|
16702
16706
|
await Za(it), se.reloadedState = it;
|
|
16703
16707
|
}
|
|
16704
|
-
return se.delayWorkflowStateSync = !0, { experienceOptions: se, index:
|
|
16705
|
-
}), N = (await Promise.all(
|
|
16708
|
+
return se.delayWorkflowStateSync = !0, { experienceOptions: se, index: X, options: At };
|
|
16709
|
+
}), N = (await Promise.all(b)).sort((B, M) => B.index - M.index);
|
|
16706
16710
|
let R = [];
|
|
16707
16711
|
for (const B of N) {
|
|
16708
|
-
const { experienceOptions:
|
|
16709
|
-
await
|
|
16712
|
+
const { experienceOptions: M, options: G } = B, T = new bl(this, M);
|
|
16713
|
+
await T.getWorkflowManager().getInitializationPromise(), a && a(), G.type !== "transaction" && this.customer && await T.attachCustomerDetails({ email: this.customer.emailAddress }), R = [...R, T], T.getWorkflowManager().setWorkflowStateSyncEnabled(!0);
|
|
16710
16714
|
}
|
|
16711
16715
|
return R;
|
|
16712
16716
|
}
|
|
16713
16717
|
storeCustomer(t) {
|
|
16714
|
-
const e =
|
|
16715
|
-
e.set(t.partner.id, t.id),
|
|
16718
|
+
const e = D.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map();
|
|
16719
|
+
e.set(t.partner.id, t.id), D.setMap("partnerCustomerIds", e);
|
|
16716
16720
|
}
|
|
16717
16721
|
async getIntegrationProductById(t, e) {
|
|
16718
|
-
const r = (await
|
|
16722
|
+
const r = (await S.getShadowGraphqlClient().query({
|
|
16719
16723
|
query: Yr(e),
|
|
16720
16724
|
variables: {
|
|
16721
16725
|
ids: [t]
|
|
@@ -16728,7 +16732,7 @@ class Od {
|
|
|
16728
16732
|
return new An(r[0]);
|
|
16729
16733
|
}
|
|
16730
16734
|
async getIntegrationProductFromExternalIds(t, e, a) {
|
|
16731
|
-
const o = (await
|
|
16735
|
+
const o = (await S.getShadowGraphqlClient().query({
|
|
16732
16736
|
query: Jr(a),
|
|
16733
16737
|
variables: {
|
|
16734
16738
|
externalProductId: e,
|
|
@@ -16745,7 +16749,7 @@ class Od {
|
|
|
16745
16749
|
return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
|
|
16746
16750
|
}
|
|
16747
16751
|
async getShareActionsForTransaction(t) {
|
|
16748
|
-
const a = (
|
|
16752
|
+
const a = (D.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(t) || void 0, i = await S.getShadowGraphqlClient().query({
|
|
16749
16753
|
query: Hr,
|
|
16750
16754
|
errorPolicy: "all",
|
|
16751
16755
|
fetchPolicy: "no-cache",
|
|
@@ -16761,7 +16765,7 @@ class Od {
|
|
|
16761
16765
|
return i.data.transactions[0].transactionShareActions;
|
|
16762
16766
|
}
|
|
16763
16767
|
async placeOrder(t) {
|
|
16764
|
-
const e = await
|
|
16768
|
+
const e = await S.getShadowGraphqlClient().mutate({
|
|
16765
16769
|
mutation: co,
|
|
16766
16770
|
variables: {
|
|
16767
16771
|
orderItems: t
|
|
@@ -16777,7 +16781,7 @@ class Od {
|
|
|
16777
16781
|
};
|
|
16778
16782
|
}
|
|
16779
16783
|
}
|
|
16780
|
-
const lc = async (n, t) => (await
|
|
16784
|
+
const lc = async (n, t) => (await S.getShadowGraphqlClient().query({
|
|
16781
16785
|
query: oo,
|
|
16782
16786
|
errorPolicy: "all",
|
|
16783
16787
|
fetchPolicy: "no-cache",
|
|
@@ -16790,7 +16794,7 @@ const lc = async (n, t) => (await y.getShadowGraphqlClient().query({
|
|
|
16790
16794
|
themeConfigurationId: t
|
|
16791
16795
|
}
|
|
16792
16796
|
})).data.currentIntegration, $d = async (n) => {
|
|
16793
|
-
const e = await
|
|
16797
|
+
const e = await S.getShadowGraphqlClient().query({
|
|
16794
16798
|
query: qr,
|
|
16795
16799
|
errorPolicy: "all",
|
|
16796
16800
|
fetchPolicy: "network-only",
|
|
@@ -16800,20 +16804,20 @@ const lc = async (n, t) => (await y.getShadowGraphqlClient().query({
|
|
|
16800
16804
|
});
|
|
16801
16805
|
if (e.data.transactions.length !== 0)
|
|
16802
16806
|
return e.data.transactions[0];
|
|
16803
|
-
}, Ud = async (n, t) => (await
|
|
16807
|
+
}, Ud = async (n, t) => (await S.getShadowGraphqlClient().query({
|
|
16804
16808
|
query: ro,
|
|
16805
16809
|
errorPolicy: "all",
|
|
16806
16810
|
variables: {
|
|
16807
16811
|
themeConfigurationId: n,
|
|
16808
16812
|
themeInstallId: t
|
|
16809
16813
|
}
|
|
16810
|
-
})).data?.marketplaceThemeInstallConfiguration, Ld = async (n) => (await
|
|
16814
|
+
})).data?.marketplaceThemeInstallConfiguration, Ld = async (n) => (await S.getShadowGraphqlClient().query({
|
|
16811
16815
|
query: lo,
|
|
16812
16816
|
errorPolicy: "all",
|
|
16813
16817
|
variables: {
|
|
16814
16818
|
id: n
|
|
16815
16819
|
}
|
|
16816
|
-
})).data?.bundles?.[0]?.marketplaceThemeInstallConfiguration, Vd = async (n) => (await
|
|
16820
|
+
})).data?.bundles?.[0]?.marketplaceThemeInstallConfiguration, Vd = async (n) => (await S.getShadowGraphqlClient().query({
|
|
16817
16821
|
query: so,
|
|
16818
16822
|
errorPolicy: "all",
|
|
16819
16823
|
variables: {
|
|
@@ -16821,7 +16825,7 @@ const lc = async (n, t) => (await y.getShadowGraphqlClient().query({
|
|
|
16821
16825
|
}
|
|
16822
16826
|
})).data?.transactions?.[0]?.marketplaceThemeInstallConfiguration;
|
|
16823
16827
|
async function wi(n) {
|
|
16824
|
-
const e =
|
|
16828
|
+
const e = D.getMap("bundleOwnerIds")?.get(n), a = {};
|
|
16825
16829
|
try {
|
|
16826
16830
|
const i = await this.loggedInBearerToken();
|
|
16827
16831
|
a.Authorization = `Bearer ${i}`;
|
|
@@ -16835,7 +16839,7 @@ async function wi(n) {
|
|
|
16835
16839
|
};
|
|
16836
16840
|
}
|
|
16837
16841
|
const zd = async (n) => {
|
|
16838
|
-
const t = await wi(n), e = await
|
|
16842
|
+
const t = await wi(n), e = await S.getShadowGraphqlClient().mutate({
|
|
16839
16843
|
mutation: tl,
|
|
16840
16844
|
errorPolicy: "all",
|
|
16841
16845
|
fetchPolicy: "no-cache",
|
|
@@ -16938,8 +16942,8 @@ class dc {
|
|
|
16938
16942
|
getImageSrc() {
|
|
16939
16943
|
if (this.imageData) {
|
|
16940
16944
|
if (this.imageData.svg) {
|
|
16941
|
-
const t =
|
|
16942
|
-
return
|
|
16945
|
+
const t = Da(this.imageData.svg, this.imageData.colors || {}, !1);
|
|
16946
|
+
return Ia(t);
|
|
16943
16947
|
}
|
|
16944
16948
|
return this.imageData.src;
|
|
16945
16949
|
}
|
|
@@ -17076,7 +17080,7 @@ class dc {
|
|
|
17076
17080
|
}
|
|
17077
17081
|
recalculateOffsets(t) {
|
|
17078
17082
|
this.frameData && ((!this.offsets || this.offsets.length !== this.frameData.length) && (this.offsets = new Array(this.frameData.length)), this.frameData.forEach((e, a) => {
|
|
17079
|
-
this.offsets[a] =
|
|
17083
|
+
this.offsets[a] = Na(
|
|
17080
17084
|
t,
|
|
17081
17085
|
e,
|
|
17082
17086
|
this.initialZoom && !this.forceImageCover ? { scale: this.initialZoom } : void 0,
|
|
@@ -17292,7 +17296,7 @@ class uc extends tt {
|
|
|
17292
17296
|
* Returns `true` if the Background Remover is available for the current session.
|
|
17293
17297
|
*/
|
|
17294
17298
|
async canUseBackgroundRemover() {
|
|
17295
|
-
return this.manager.getClient().canUseAddon(
|
|
17299
|
+
return this.manager.getClient().canUseAddon(ba.BackgroundRemover);
|
|
17296
17300
|
}
|
|
17297
17301
|
/**
|
|
17298
17302
|
* Returns `true` if the Background Remover is available for the current session and if the associated frame has a user-supplied raster image.
|
|
@@ -17418,7 +17422,7 @@ const hc = C`
|
|
|
17418
17422
|
id
|
|
17419
17423
|
}
|
|
17420
17424
|
}
|
|
17421
|
-
`,
|
|
17425
|
+
`, Ua = C`
|
|
17422
17426
|
query GetCustomerTransactions(
|
|
17423
17427
|
$id: String!
|
|
17424
17428
|
$limit: Int!
|
|
@@ -17532,7 +17536,7 @@ const hc = C`
|
|
|
17532
17536
|
total
|
|
17533
17537
|
}
|
|
17534
17538
|
}
|
|
17535
|
-
`, Wd = async (n, t, e) => await
|
|
17539
|
+
`, Wd = async (n, t, e) => await S.getShadowGraphqlClient().mutate({
|
|
17536
17540
|
mutation: Cc,
|
|
17537
17541
|
errorPolicy: "all",
|
|
17538
17542
|
variables: {
|
|
@@ -17540,34 +17544,34 @@ const hc = C`
|
|
|
17540
17544
|
name: t
|
|
17541
17545
|
},
|
|
17542
17546
|
context: e
|
|
17543
|
-
}), qd = async (n, t) => await
|
|
17547
|
+
}), qd = async (n, t) => await S.getShadowGraphqlClient().mutate({
|
|
17544
17548
|
mutation: gc,
|
|
17545
17549
|
errorPolicy: "all",
|
|
17546
17550
|
variables: {
|
|
17547
17551
|
id: n,
|
|
17548
17552
|
name: t
|
|
17549
17553
|
}
|
|
17550
|
-
}), Hd = async (n, t) => await
|
|
17554
|
+
}), Hd = async (n, t) => await S.getShadowGraphqlClient().mutate({
|
|
17551
17555
|
mutation: wc,
|
|
17552
17556
|
errorPolicy: "all",
|
|
17553
17557
|
variables: {
|
|
17554
17558
|
id: n,
|
|
17555
17559
|
template: t
|
|
17556
17560
|
}
|
|
17557
|
-
}), jd = async (n, t) => await
|
|
17561
|
+
}), jd = async (n, t) => await S.getShadowGraphqlClient().mutate({
|
|
17558
17562
|
mutation: mc,
|
|
17559
17563
|
errorPolicy: "all",
|
|
17560
17564
|
variables: {
|
|
17561
17565
|
id: n,
|
|
17562
17566
|
template: t
|
|
17563
17567
|
}
|
|
17564
|
-
}), Yd = async (n) => (await
|
|
17568
|
+
}), Yd = async (n) => (await S.getShadowGraphqlClient().query({
|
|
17565
17569
|
query: hc,
|
|
17566
17570
|
errorPolicy: "all",
|
|
17567
17571
|
variables: {
|
|
17568
17572
|
email: n
|
|
17569
17573
|
}
|
|
17570
|
-
})).data.customer, Jd = async (n, t, e) => await
|
|
17574
|
+
})).data.customer, Jd = async (n, t, e) => await S.getShadowGraphqlClient().query({
|
|
17571
17575
|
query: pc,
|
|
17572
17576
|
errorPolicy: "all",
|
|
17573
17577
|
fetchPolicy: "no-cache",
|
|
@@ -17576,7 +17580,7 @@ const hc = C`
|
|
|
17576
17580
|
offset: e,
|
|
17577
17581
|
limit: t
|
|
17578
17582
|
}
|
|
17579
|
-
}), Kd = async (n, t) => await
|
|
17583
|
+
}), Kd = async (n, t) => await S.getShadowGraphqlClient().query({
|
|
17580
17584
|
query: fc,
|
|
17581
17585
|
errorPolicy: "all",
|
|
17582
17586
|
fetchPolicy: "no-cache",
|
|
@@ -17584,8 +17588,8 @@ const hc = C`
|
|
|
17584
17588
|
id: n
|
|
17585
17589
|
},
|
|
17586
17590
|
context: t
|
|
17587
|
-
}), _d = async (n, t, e) => (await
|
|
17588
|
-
query:
|
|
17591
|
+
}), _d = async (n, t, e) => (await S.getShadowGraphqlClient().query({
|
|
17592
|
+
query: Ua,
|
|
17589
17593
|
errorPolicy: "all",
|
|
17590
17594
|
fetchPolicy: "no-cache",
|
|
17591
17595
|
variables: {
|
|
@@ -17604,8 +17608,8 @@ const hc = C`
|
|
|
17604
17608
|
offset: e,
|
|
17605
17609
|
limit: t
|
|
17606
17610
|
}
|
|
17607
|
-
}))?.data.customerTransactionsFeed?.items || [], Xd = async (n, t, e) => (await
|
|
17608
|
-
query:
|
|
17611
|
+
}))?.data.customerTransactionsFeed?.items || [], Xd = async (n, t, e) => (await S.getShadowGraphqlClient().query({
|
|
17612
|
+
query: Ua,
|
|
17609
17613
|
errorPolicy: "all",
|
|
17610
17614
|
fetchPolicy: "no-cache",
|
|
17611
17615
|
variables: {
|
|
@@ -17624,8 +17628,8 @@ const hc = C`
|
|
|
17624
17628
|
offset: e,
|
|
17625
17629
|
limit: t
|
|
17626
17630
|
}
|
|
17627
|
-
}))?.data.customerTransactionsFeed?.items || [], Zd = async (n, t, e) => (await
|
|
17628
|
-
query:
|
|
17631
|
+
}))?.data.customerTransactionsFeed?.items || [], Zd = async (n, t, e) => (await S.getShadowGraphqlClient().query({
|
|
17632
|
+
query: Ua,
|
|
17629
17633
|
errorPolicy: "all",
|
|
17630
17634
|
fetchPolicy: "no-cache",
|
|
17631
17635
|
variables: {
|
|
@@ -17640,7 +17644,7 @@ const hc = C`
|
|
|
17640
17644
|
offset: e,
|
|
17641
17645
|
limit: t
|
|
17642
17646
|
}
|
|
17643
|
-
}))?.data.customerTransactionsFeed?.items || [], tA = async (n, t, e) => (await
|
|
17647
|
+
}))?.data.customerTransactionsFeed?.items || [], tA = async (n, t, e) => (await S.getShadowGraphqlClient().query({
|
|
17644
17648
|
query: yc,
|
|
17645
17649
|
errorPolicy: "all",
|
|
17646
17650
|
fetchPolicy: "no-cache",
|
|
@@ -17660,8 +17664,8 @@ const hc = C`
|
|
|
17660
17664
|
console.error("vite-plugin-css-injected-by-js", t);
|
|
17661
17665
|
}
|
|
17662
17666
|
})();
|
|
17663
|
-
var Sc = /* @__PURE__ */ ((n) => (n.Manual = "Manual", n.OnStart = "OnStart", n.OnQuit = "OnQuit", n.OnEnd = "OnEnd", n))(Sc || {}), Se = /* @__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))(Se || {}),
|
|
17664
|
-
|
|
17667
|
+
var Sc = /* @__PURE__ */ ((n) => (n.Manual = "Manual", n.OnStart = "OnStart", n.OnQuit = "OnQuit", n.OnEnd = "OnEnd", n))(Sc || {}), Se = /* @__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))(Se || {}), K;
|
|
17668
|
+
K = { __e: function(n, t, e, a) {
|
|
17665
17669
|
for (var i, r, o; t = t.__; )
|
|
17666
17670
|
if ((i = t.__c) && !i.__)
|
|
17667
17671
|
try {
|
|
@@ -17672,43 +17676,43 @@ _ = { __e: function(n, t, e, a) {
|
|
|
17672
17676
|
}
|
|
17673
17677
|
throw n;
|
|
17674
17678
|
} }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
|
|
17675
|
-
var ot, oa, hn, yi = [], sa = [], gn =
|
|
17679
|
+
var ot, oa, hn, yi = [], sa = [], gn = K.__b, mn = K.__r, pn = K.diffed, fn = K.__c, Cn = K.unmount;
|
|
17676
17680
|
function vc() {
|
|
17677
17681
|
for (var n; n = yi.shift(); )
|
|
17678
17682
|
if (n.__P && n.__H)
|
|
17679
17683
|
try {
|
|
17680
|
-
n.__H.__h.forEach(ve), n.__H.__h.forEach(
|
|
17684
|
+
n.__H.__h.forEach(ve), n.__H.__h.forEach(va), n.__H.__h = [];
|
|
17681
17685
|
} catch (t) {
|
|
17682
|
-
n.__H.__h = [],
|
|
17686
|
+
n.__H.__h = [], K.__e(t, n.__v);
|
|
17683
17687
|
}
|
|
17684
17688
|
}
|
|
17685
|
-
|
|
17689
|
+
K.__b = function(n) {
|
|
17686
17690
|
ot = null, gn && gn(n);
|
|
17687
|
-
},
|
|
17691
|
+
}, K.__r = function(n) {
|
|
17688
17692
|
mn && mn(n);
|
|
17689
17693
|
var t = (ot = n.__c).__H;
|
|
17690
17694
|
t && (oa === ot ? (t.__h = [], ot.__h = [], t.__.forEach(function(e) {
|
|
17691
17695
|
e.__N && (e.__ = e.__N), e.__V = sa, e.__N = e.i = void 0;
|
|
17692
|
-
})) : (t.__h.forEach(ve), t.__h.forEach(
|
|
17693
|
-
},
|
|
17696
|
+
})) : (t.__h.forEach(ve), t.__h.forEach(va), t.__h = [])), oa = ot;
|
|
17697
|
+
}, K.diffed = function(n) {
|
|
17694
17698
|
pn && pn(n);
|
|
17695
17699
|
var t = n.__c;
|
|
17696
|
-
t && t.__H && (t.__H.__h.length && (yi.push(t) !== 1 && hn ===
|
|
17700
|
+
t && t.__H && (t.__H.__h.length && (yi.push(t) !== 1 && hn === K.requestAnimationFrame || ((hn = K.requestAnimationFrame) || Ec)(vc)), t.__H.__.forEach(function(e) {
|
|
17697
17701
|
e.i && (e.__H = e.i), e.__V !== sa && (e.__ = e.__V), e.i = void 0, e.__V = sa;
|
|
17698
17702
|
})), oa = ot = null;
|
|
17699
|
-
},
|
|
17703
|
+
}, K.__c = function(n, t) {
|
|
17700
17704
|
t.some(function(e) {
|
|
17701
17705
|
try {
|
|
17702
17706
|
e.__h.forEach(ve), e.__h = e.__h.filter(function(a) {
|
|
17703
|
-
return !a.__ ||
|
|
17707
|
+
return !a.__ || va(a);
|
|
17704
17708
|
});
|
|
17705
17709
|
} catch (a) {
|
|
17706
17710
|
t.some(function(i) {
|
|
17707
17711
|
i.__h && (i.__h = []);
|
|
17708
|
-
}), t = [],
|
|
17712
|
+
}), t = [], K.__e(a, e.__v);
|
|
17709
17713
|
}
|
|
17710
17714
|
}), fn && fn(n, t);
|
|
17711
|
-
},
|
|
17715
|
+
}, K.unmount = function(n) {
|
|
17712
17716
|
Cn && Cn(n);
|
|
17713
17717
|
var t, e = n.__c;
|
|
17714
17718
|
e && e.__H && (e.__H.__.forEach(function(a) {
|
|
@@ -17717,7 +17721,7 @@ _.__b = function(n) {
|
|
|
17717
17721
|
} catch (i) {
|
|
17718
17722
|
t = i;
|
|
17719
17723
|
}
|
|
17720
|
-
}), e.__H = void 0, t &&
|
|
17724
|
+
}), e.__H = void 0, t && K.__e(t, e.__v));
|
|
17721
17725
|
};
|
|
17722
17726
|
var wn = typeof requestAnimationFrame == "function";
|
|
17723
17727
|
function Ec(n) {
|
|
@@ -17730,7 +17734,7 @@ function ve(n) {
|
|
|
17730
17734
|
var t = ot, e = n.__c;
|
|
17731
17735
|
typeof e == "function" && (n.__c = void 0, e()), ot = t;
|
|
17732
17736
|
}
|
|
17733
|
-
function
|
|
17737
|
+
function va(n) {
|
|
17734
17738
|
var t = ot;
|
|
17735
17739
|
n.__c = n.__(), ot = t;
|
|
17736
17740
|
}
|
|
@@ -17756,7 +17760,7 @@ const Si = C`
|
|
|
17756
17760
|
}
|
|
17757
17761
|
missingComponentTypes
|
|
17758
17762
|
}
|
|
17759
|
-
`,
|
|
17763
|
+
`, La = C`
|
|
17760
17764
|
${Si}
|
|
17761
17765
|
fragment AddressValidationJobFields on AddressValidationJob {
|
|
17762
17766
|
id
|
|
@@ -17769,14 +17773,14 @@ const Si = C`
|
|
|
17769
17773
|
}
|
|
17770
17774
|
}
|
|
17771
17775
|
`, bc = C`
|
|
17772
|
-
${
|
|
17776
|
+
${La}
|
|
17773
17777
|
query GetAddressValidationJobs($ids: [String!]!) {
|
|
17774
17778
|
addressValidationJobs(ids: $ids) {
|
|
17775
17779
|
...AddressValidationJobFields
|
|
17776
17780
|
}
|
|
17777
17781
|
}
|
|
17778
17782
|
`, Ic = C`
|
|
17779
|
-
${
|
|
17783
|
+
${La}
|
|
17780
17784
|
query GetRecipientsWithAddressValidationJobs($ids: [String!]!) {
|
|
17781
17785
|
recipients(ids: $ids) {
|
|
17782
17786
|
id
|
|
@@ -17793,7 +17797,7 @@ const Si = C`
|
|
|
17793
17797
|
}
|
|
17794
17798
|
}
|
|
17795
17799
|
`, Pc = C`
|
|
17796
|
-
${
|
|
17800
|
+
${La}
|
|
17797
17801
|
mutation BatchValidateRecipientAddress($ids: [String!]!) {
|
|
17798
17802
|
recipientValidateBatch(ids: $ids) {
|
|
17799
17803
|
...AddressValidationJobFields
|
|
@@ -17808,7 +17812,7 @@ const Si = C`
|
|
|
17808
17812
|
`;
|
|
17809
17813
|
var Fc = /* @__PURE__ */ ((n) => (n.Confirmed = "Confirmed", n.Plausible = "Plausible", n.Unlikely = "Unlikely", n))(Fc || {}), Dc = /* @__PURE__ */ ((n) => (n.Created = "Created", n.Processing = "Processing", n.Completed = "Completed", n.Failed = "Failed", n.Cancelled = "Cancelled", n))(Dc || {});
|
|
17810
17814
|
const eA = async (n) => {
|
|
17811
|
-
const t = n.map((a) => a.getTransaction().recipient?.id).filter((a) => !!a), e = await
|
|
17815
|
+
const t = n.map((a) => a.getTransaction().recipient?.id).filter((a) => !!a), e = await S.getShadowGraphqlClient().query({
|
|
17812
17816
|
query: Ic,
|
|
17813
17817
|
errorPolicy: "all",
|
|
17814
17818
|
fetchPolicy: "network-only",
|
|
@@ -17821,14 +17825,14 @@ const eA = async (n) => {
|
|
|
17821
17825
|
if (i)
|
|
17822
17826
|
return e.data?.recipients?.find((r) => r.id === i)?.addressValidationJob;
|
|
17823
17827
|
});
|
|
17824
|
-
}, aA = async (n) => (await
|
|
17828
|
+
}, aA = async (n) => (await S.getShadowGraphqlClient().query({
|
|
17825
17829
|
query: bc,
|
|
17826
17830
|
errorPolicy: "all",
|
|
17827
17831
|
fetchPolicy: "network-only",
|
|
17828
17832
|
variables: {
|
|
17829
17833
|
ids: n
|
|
17830
17834
|
}
|
|
17831
|
-
})).data?.addressValidationJobs, nA = async (n) => n.getTransaction().recipient?.id ? (await
|
|
17835
|
+
})).data?.addressValidationJobs, nA = async (n) => n.getTransaction().recipient?.id ? (await S.getShadowGraphqlClient().mutate({
|
|
17832
17836
|
mutation: Bc,
|
|
17833
17837
|
errorPolicy: "all",
|
|
17834
17838
|
fetchPolicy: "network-only",
|
|
@@ -17836,7 +17840,7 @@ const eA = async (n) => {
|
|
|
17836
17840
|
id: n.getTransaction().recipient.id
|
|
17837
17841
|
}
|
|
17838
17842
|
})).data?.recipientValidate : void 0, iA = async (n) => {
|
|
17839
|
-
const t = n.map((a) => a.getTransaction().recipient?.id).filter((a) => !!a), e = await
|
|
17843
|
+
const t = n.map((a) => a.getTransaction().recipient?.id).filter((a) => !!a), e = await S.getShadowGraphqlClient().mutate({
|
|
17840
17844
|
mutation: Pc,
|
|
17841
17845
|
errorPolicy: "all",
|
|
17842
17846
|
fetchPolicy: "network-only",
|
|
@@ -17853,7 +17857,7 @@ const eA = async (n) => {
|
|
|
17853
17857
|
const t = n.getTransaction().recipient?.id;
|
|
17854
17858
|
if (!t)
|
|
17855
17859
|
return;
|
|
17856
|
-
(await
|
|
17860
|
+
(await S.getShadowGraphqlClient().mutate({
|
|
17857
17861
|
mutation: xc,
|
|
17858
17862
|
errorPolicy: "all",
|
|
17859
17863
|
fetchPolicy: "network-only",
|
|
@@ -17871,19 +17875,19 @@ const eA = async (n) => {
|
|
|
17871
17875
|
}
|
|
17872
17876
|
}
|
|
17873
17877
|
}
|
|
17874
|
-
`, oA = async (n) => (await
|
|
17878
|
+
`, oA = async (n) => (await S.getShadowGraphqlClient().query({
|
|
17875
17879
|
query: kc,
|
|
17876
17880
|
variables: {
|
|
17877
17881
|
ids: n
|
|
17878
17882
|
}
|
|
17879
17883
|
})).data.integrationProducts;
|
|
17880
17884
|
export {
|
|
17881
|
-
|
|
17885
|
+
ba as AddonHandle,
|
|
17882
17886
|
Dc as AddressValidationJobStatus,
|
|
17883
17887
|
Fc as AddressValidationResultConfirmationLevel,
|
|
17884
17888
|
bn as AddressValidationStatus,
|
|
17885
17889
|
Rd as ArrayInput,
|
|
17886
|
-
|
|
17890
|
+
V as AspectType,
|
|
17887
17891
|
bt as AssetNotFoundError,
|
|
17888
17892
|
Ee as AssetType,
|
|
17889
17893
|
Fd as BringForwardCommand,
|
|
@@ -17913,7 +17917,7 @@ export {
|
|
|
17913
17917
|
dc as FrameService,
|
|
17914
17918
|
Ac as FrameStep,
|
|
17915
17919
|
uc as FrameStepHandle,
|
|
17916
|
-
|
|
17920
|
+
Oa as GlobalPropertyHandle,
|
|
17917
17921
|
$ as GroupCommand,
|
|
17918
17922
|
il as IllustrationStepHandle,
|
|
17919
17923
|
We as InformationMessageType,
|
|
@@ -17922,7 +17926,7 @@ export {
|
|
|
17922
17926
|
Gi as IntegrationType,
|
|
17923
17927
|
vd as LayoutElementFactory,
|
|
17924
17928
|
F as LayoutElementType,
|
|
17925
|
-
|
|
17929
|
+
Y as LayoutNotFoundError,
|
|
17926
17930
|
Yt as LayoutRenderingPurpose,
|
|
17927
17931
|
rl as MaterialStepHandle,
|
|
17928
17932
|
Be as MisconfigurationError,
|
|
@@ -17947,7 +17951,7 @@ export {
|
|
|
17947
17951
|
Id as ResizeCommand,
|
|
17948
17952
|
Jt as ResourceNotFoundError,
|
|
17949
17953
|
bd as RotateCommand,
|
|
17950
|
-
|
|
17954
|
+
H as ScaleAxis,
|
|
17951
17955
|
Dd as SendBackwardsCommand,
|
|
17952
17956
|
cl as ShapeStepHandle,
|
|
17953
17957
|
zi as ShareActionType,
|
|
@@ -17955,7 +17959,7 @@ export {
|
|
|
17955
17959
|
be as StakeholderType,
|
|
17956
17960
|
Li as StepAspectType,
|
|
17957
17961
|
tt as StepHandle,
|
|
17958
|
-
|
|
17962
|
+
E as StepType,
|
|
17959
17963
|
kt as TextAlgorithm,
|
|
17960
17964
|
$o as TextChangeCommand,
|
|
17961
17965
|
Fl as TextGlobalPropertyHandle,
|
|
@@ -17967,7 +17971,7 @@ export {
|
|
|
17967
17971
|
qi as UnitOfMeasurement,
|
|
17968
17972
|
Bd as UpdateImageSourceCommand,
|
|
17969
17973
|
rt as Variant,
|
|
17970
|
-
|
|
17974
|
+
ya as WorkflowExperienceEventType,
|
|
17971
17975
|
bl as WorkflowExperienceImpl,
|
|
17972
17976
|
U as assetService,
|
|
17973
17977
|
fr as browserColorToHex,
|
|
@@ -17983,11 +17987,11 @@ export {
|
|
|
17983
17987
|
jd as duplicateTransaction,
|
|
17984
17988
|
at as fetchAsString,
|
|
17985
17989
|
dd as findAngle,
|
|
17986
|
-
|
|
17990
|
+
L as findElement,
|
|
17987
17991
|
ld as findPmsColors,
|
|
17988
17992
|
Vt as frameDataCache,
|
|
17989
17993
|
St as frameStepService,
|
|
17990
|
-
|
|
17994
|
+
k as generate,
|
|
17991
17995
|
Cs as generateCommands,
|
|
17992
17996
|
st as generateSVGWithUnknownColors,
|
|
17993
17997
|
Md as generateStateFromDesignInputSteps,
|
|
@@ -18010,7 +18014,7 @@ export {
|
|
|
18010
18014
|
hd as getPointOfRotation,
|
|
18011
18015
|
Nd as getProductCollections,
|
|
18012
18016
|
pd as getSEPoint,
|
|
18013
|
-
|
|
18017
|
+
Ma as getSvgElement,
|
|
18014
18018
|
tA as getTemplateBundles,
|
|
18015
18019
|
Zd as getTemplateTransactions,
|
|
18016
18020
|
$d as getTransaction,
|
|
@@ -18021,7 +18025,7 @@ export {
|
|
|
18021
18025
|
eA as getValidationJobsForWorkflowExperiences,
|
|
18022
18026
|
oc as getWorkflow,
|
|
18023
18027
|
Ci as getWorkflows,
|
|
18024
|
-
|
|
18028
|
+
S as graphQlManager,
|
|
18025
18029
|
we as illustrationStepService,
|
|
18026
18030
|
Ad as isCloseToValue,
|
|
18027
18031
|
Tt as loadFont,
|
|
@@ -18030,15 +18034,15 @@ export {
|
|
|
18030
18034
|
$l as metafieldManager,
|
|
18031
18035
|
wd as mmPerPixel,
|
|
18032
18036
|
si as modelStepService,
|
|
18033
|
-
|
|
18037
|
+
Da as modifySVGColors,
|
|
18034
18038
|
li as moduleStepService,
|
|
18035
18039
|
Wd as nameBundle,
|
|
18036
18040
|
qd as nameTransaction,
|
|
18037
|
-
|
|
18041
|
+
j as optionService,
|
|
18038
18042
|
Sd as outlineFontsInSvg,
|
|
18039
18043
|
rA as overrideWorkflowExperienceRecipientAddress,
|
|
18040
18044
|
ht as patternImageDataCache,
|
|
18041
|
-
|
|
18045
|
+
D as persistenceService,
|
|
18042
18046
|
ci as pictureStepService,
|
|
18043
18047
|
od as pmsToRgb,
|
|
18044
18048
|
di as questionStepService,
|
|
@@ -18047,7 +18051,7 @@ export {
|
|
|
18047
18051
|
Za as rehydrateSerializedLayout,
|
|
18048
18052
|
gr as rgbToPms,
|
|
18049
18053
|
Ae as rotateAroundPoint,
|
|
18050
|
-
|
|
18054
|
+
xa as sanitizeSvgTree,
|
|
18051
18055
|
rr as setBearerAuthenticationToken,
|
|
18052
18056
|
kn as setCanvasModule,
|
|
18053
18057
|
zt as shapeStepService,
|
|
@@ -18056,8 +18060,8 @@ export {
|
|
|
18056
18060
|
kd as stepAspectValuesToDesignInputSteps,
|
|
18057
18061
|
Ya as svgColorValueToDefinition,
|
|
18058
18062
|
ei as svgStringDimensions,
|
|
18059
|
-
|
|
18060
|
-
|
|
18063
|
+
Ia as svgToDataUrl,
|
|
18064
|
+
q as textStepService,
|
|
18061
18065
|
Ko as toast,
|
|
18062
18066
|
nA as validateWorkflowExperienceRecipient,
|
|
18063
18067
|
iA as validateWorkflowExperienceRecipients,
|