@spiffcommerce/core 33.13.3 → 33.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +39 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +812 -813
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7,9 +7,9 @@ import { orientation as Ti } from "exifr/dist/mini.umd.cjs";
|
|
|
7
7
|
import { parse as yn } from "css";
|
|
8
8
|
import Ni from "fuse.js";
|
|
9
9
|
import { Pith as va } from "pith";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { jsx as B, jsxs as
|
|
10
|
+
import bt from "lodash.clonedeep";
|
|
11
|
+
import Yt from "lodash.isequal";
|
|
12
|
+
import { jsx as B, jsxs as At, Fragment as Wt } from "preact/jsx-runtime";
|
|
13
13
|
import { parse as la } from "opentype.js";
|
|
14
14
|
import Qi from "handlebars";
|
|
15
15
|
import { dataUriToBuffer as Ri } from "data-uri-to-buffer";
|
|
@@ -24,38 +24,38 @@ import vn from "lodash.debounce";
|
|
|
24
24
|
import "fs";
|
|
25
25
|
import "path";
|
|
26
26
|
import Vi from "lodash.omit";
|
|
27
|
-
var Ie = /* @__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))(Ie || {}), En = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(En || {}),
|
|
27
|
+
var Ie = /* @__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))(Ie || {}), En = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(En || {}), z = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(z || {}), E = /* @__PURE__ */ ((n) => (n.Information = "Information", n.Bulk = "Bulk", n.DigitalContent = "DigitalContent", n.Finish = "Finish", n.Frame = "Frame", n.Illustration = "Illustration", n.Introduction = "Introduction", n.Material = "Material", n.Model = "Model", n.Module = "Module", n.Picture = "Picture", n.Photo = "Photo", n.ProductOverlay = "ProductOverlay", n.Question = "Question", n.Shape = "Shape", n.SilentIllustration = "SilentIllustration", n.Text = "Text", n))(E || {}), zi = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(zi || {}), Jt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Jt || {}), D = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(D || {}), Gi = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Gi || {}), bn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(bn || {}), Wi = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(Wi || {}), qi = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(qi || {}), Ea = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(Ea || {}), Hi = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Hi || {}), Be = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(Be || {}), Mt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(Mt || {}), j = /* @__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))(j || {}), ji = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(ji || {});
|
|
28
28
|
class In extends Error {
|
|
29
29
|
constructor(t) {
|
|
30
30
|
super(t), this.name = this.constructor.name;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
class
|
|
33
|
+
class ee extends In {
|
|
34
34
|
constructor(t) {
|
|
35
35
|
super(`ConfigurationError - ${t}`);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
class Pe extends
|
|
38
|
+
class Pe extends ee {
|
|
39
39
|
constructor(t) {
|
|
40
40
|
super(`Option not Configured: ${t.stepTitle}`), this.optionId = t?.optionId || "N/A";
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
class
|
|
43
|
+
class J extends ee {
|
|
44
44
|
constructor(t) {
|
|
45
45
|
super(`Panel not Found: ${t.panelId}`), this.panelId = t?.panelId || "N/A";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
class
|
|
48
|
+
class It extends ee {
|
|
49
49
|
constructor(t) {
|
|
50
50
|
super(`Asset not found for variant: ${t.name}`), this.variant = t;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
class
|
|
53
|
+
class Kt extends ee {
|
|
54
54
|
constructor(t) {
|
|
55
55
|
super(`Resource not found for asset: ${t.name}`), this.asset = t;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
class xe extends
|
|
58
|
+
class xe extends ee {
|
|
59
59
|
constructor(t, e) {
|
|
60
60
|
super(`Workflow Misconfiguration: ${t.stepName} - ${e}`), this.step = t;
|
|
61
61
|
}
|
|
@@ -70,7 +70,7 @@ class R extends Qe {
|
|
|
70
70
|
super(`Unhandled Behavior Encountered: ${t}`);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
class
|
|
73
|
+
class xt extends Qe {
|
|
74
74
|
constructor(t) {
|
|
75
75
|
super(`Parsing Error: ${t}`);
|
|
76
76
|
}
|
|
@@ -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
|
+
}, T = Ji();
|
|
138
138
|
class Ki {
|
|
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 = [];
|
|
@@ -169,12 +169,12 @@ function id(n) {
|
|
|
169
169
|
function rd(n) {
|
|
170
170
|
Aa = n;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function ae() {
|
|
173
173
|
return da ? new da().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
|
-
function
|
|
177
|
+
function rt(n, t) {
|
|
178
178
|
if (!Aa) {
|
|
179
179
|
if (typeof window < "u" && window.fetch)
|
|
180
180
|
return window.fetch(n, t);
|
|
@@ -188,37 +188,37 @@ const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @_
|
|
|
188
188
|
const t = Wa.get(n);
|
|
189
189
|
if (t) return t;
|
|
190
190
|
const a = (async () => {
|
|
191
|
-
const i = await
|
|
191
|
+
const i = await rt(n);
|
|
192
192
|
return Bn.set(n, i.headers?.get("content-type") || ""), await i.arrayBuffer();
|
|
193
193
|
})();
|
|
194
194
|
return Wa.set(n, a), a;
|
|
195
195
|
}, _i = async (n) => {
|
|
196
196
|
const t = qa.get(n);
|
|
197
197
|
if (t) return t;
|
|
198
|
-
const a = (async () => await (await
|
|
198
|
+
const a = (async () => await (await rt(n)).text())();
|
|
199
199
|
return qa.set(n, a), a;
|
|
200
|
-
},
|
|
201
|
-
if (
|
|
200
|
+
}, Tt = (n) => n.every((t) => t !== "undefined"), de = (n) => Tt([typeof document]) ? document.createElement(n) : ae().document.createElement(n), Xi = (n, t) => {
|
|
201
|
+
if (Tt([typeof document]))
|
|
202
202
|
return document.createElementNS(n, t);
|
|
203
|
-
const a =
|
|
203
|
+
const a = ae().document.createElement(t);
|
|
204
204
|
return a.setAttribute("xmlns", n), a;
|
|
205
|
-
},
|
|
206
|
-
if (
|
|
205
|
+
}, ut = () => {
|
|
206
|
+
if (Tt([typeof DOMParser]))
|
|
207
207
|
return new DOMParser();
|
|
208
|
-
const n =
|
|
208
|
+
const n = ae();
|
|
209
209
|
return new n.DOMParser();
|
|
210
|
-
}, Zi = () =>
|
|
211
|
-
t ? Pn(n).then(e).catch(a) :
|
|
210
|
+
}, Zi = () => Tt([typeof DOMParser]) ? DOMParser : ae().DOMParser, Oe = (n, t) => new Promise((e, a) => {
|
|
211
|
+
t ? Pn(n).then(e).catch(a) : rt(n).then((i) => {
|
|
212
212
|
i.arrayBuffer().then(e).catch(a);
|
|
213
213
|
}).catch((i) => {
|
|
214
214
|
a(i);
|
|
215
215
|
});
|
|
216
216
|
}), nt = (n, t) => new Promise((e, a) => {
|
|
217
|
-
t ? _i(n).then(e).catch(a) :
|
|
217
|
+
t ? _i(n).then(e).catch(a) : rt(n).then((i) => {
|
|
218
218
|
i.text().then(e).catch(a);
|
|
219
219
|
}).catch(a);
|
|
220
220
|
}), xn = (n) => ki(n), je = /* @__PURE__ */ new Map(), tr = async (n, t) => {
|
|
221
|
-
if (
|
|
221
|
+
if (Tt([typeof FontFace])) {
|
|
222
222
|
if (je.has(t))
|
|
223
223
|
return je.get(t);
|
|
224
224
|
const e = n.names.fullName.en, a = new FontFace(e, `url(${t})`);
|
|
@@ -226,10 +226,10 @@ const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @_
|
|
|
226
226
|
const i = a.load();
|
|
227
227
|
return je.set(t, i), i;
|
|
228
228
|
}
|
|
229
|
-
},
|
|
230
|
-
if (
|
|
229
|
+
}, Bt = () => {
|
|
230
|
+
if (Tt([typeof XMLSerializer]))
|
|
231
231
|
return new XMLSerializer();
|
|
232
|
-
const n =
|
|
232
|
+
const n = ae();
|
|
233
233
|
return new n.XMLSerializer();
|
|
234
234
|
}, Ha = (n) => btoa(n), $e = (n) => {
|
|
235
235
|
function t() {
|
|
@@ -310,8 +310,8 @@ const sr = (n) => {
|
|
|
310
310
|
};
|
|
311
311
|
async function dr(n, t) {
|
|
312
312
|
const e = ft.getServerUrl(), a = e.includes(".aumelbdev.spiffcommerce.com") ? "https://moonlight.aumelbdev.spiffcommerce.com" : e.includes(".us.spiffcommerce.com") ? "https://moonlight.us.spiffcommerce.com" : "https://moonlight.au.spiffcommerce.com";
|
|
313
|
-
let i = await
|
|
314
|
-
return i.type === "opaqueredirect" && (typeof n != "string" && "url" in n ? i = await
|
|
313
|
+
let i = await rt(n, { ...t, redirect: "manual" });
|
|
314
|
+
return i.type === "opaqueredirect" && (typeof n != "string" && "url" in n ? i = await rt({ ...n, url: `${a}/graphql` }, t) : i = await rt(`${a}/graphql`, t)), i;
|
|
315
315
|
}
|
|
316
316
|
class Ar {
|
|
317
317
|
constructor() {
|
|
@@ -343,8 +343,8 @@ class Ar {
|
|
|
343
343
|
const f = window.__SENTRY__.hub;
|
|
344
344
|
if (f) {
|
|
345
345
|
const S = f.traceHeaders();
|
|
346
|
-
Object.entries(S).forEach(([w,
|
|
347
|
-
l[w] =
|
|
346
|
+
Object.entries(S).forEach(([w, P]) => {
|
|
347
|
+
l[w] = P;
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
350
|
}
|
|
@@ -375,7 +375,7 @@ const Ct = (n, t, e) => {
|
|
|
375
375
|
} catch {
|
|
376
376
|
throw new Error("Canvas module not set");
|
|
377
377
|
}
|
|
378
|
-
},
|
|
378
|
+
}, ne = (n, t) => {
|
|
379
379
|
if (ha !== void 0)
|
|
380
380
|
return ha(n, t);
|
|
381
381
|
try {
|
|
@@ -419,13 +419,13 @@ const ur = (n) => new Promise((t) => {
|
|
|
419
419
|
}), hr = async () => {
|
|
420
420
|
if (Ae !== null)
|
|
421
421
|
return !Ae;
|
|
422
|
-
const t = await
|
|
422
|
+
const t = await ne("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k=");
|
|
423
423
|
return Ae = t.width === 2 && t.height === 3, !Ae;
|
|
424
424
|
}, gr = (n) => {
|
|
425
425
|
const e = n.naturalWidth / n.naturalHeight;
|
|
426
426
|
return n.naturalHeight <= 8192 && n.naturalWidth <= 8192 ? [n.naturalWidth, n.naturalHeight] : n.naturalHeight > n.naturalWidth ? [e * 8192, 8192] : [8192, 8192 / e];
|
|
427
427
|
}, mr = async (n) => {
|
|
428
|
-
const t = await ar(n), e = await
|
|
428
|
+
const t = await ar(n), e = await ne(t), [a, i] = gr(e);
|
|
429
429
|
if (!await hr()) {
|
|
430
430
|
const A = Ct(a, i);
|
|
431
431
|
return A.getContext("2d")?.drawImage(e, 0, 0, a, i), A;
|
|
@@ -466,7 +466,7 @@ const ur = (n) => new Promise((t) => {
|
|
|
466
466
|
height: t.height,
|
|
467
467
|
width: t.width
|
|
468
468
|
};
|
|
469
|
-
},
|
|
469
|
+
}, _t = [
|
|
470
470
|
"Yellow C",
|
|
471
471
|
"Yellow 012 C",
|
|
472
472
|
"Orange 021 C",
|
|
@@ -1808,7 +1808,7 @@ const ur = (n) => new Promise((t) => {
|
|
|
1808
1808
|
"Black 5 C",
|
|
1809
1809
|
"Black 6 C",
|
|
1810
1810
|
"Black 7 C"
|
|
1811
|
-
],
|
|
1811
|
+
], Ft = [
|
|
1812
1812
|
"FEDD00",
|
|
1813
1813
|
"FFD700",
|
|
1814
1814
|
"FE5000",
|
|
@@ -3150,18 +3150,18 @@ const ur = (n) => new Promise((t) => {
|
|
|
3150
3150
|
"3E2B2E",
|
|
3151
3151
|
"101820",
|
|
3152
3152
|
"3D3935"
|
|
3153
|
-
], Je =
|
|
3153
|
+
], Je = Ft.map((n) => [
|
|
3154
3154
|
parseInt(n.substring(0, 2), 16),
|
|
3155
3155
|
parseInt(n.substring(2, 4), 16),
|
|
3156
3156
|
parseInt(n.substring(4, 6), 16)
|
|
3157
3157
|
]);
|
|
3158
3158
|
function sd(n) {
|
|
3159
|
-
const t =
|
|
3160
|
-
return t >= 0 ?
|
|
3159
|
+
const t = _t.indexOf(n);
|
|
3160
|
+
return t >= 0 ? Ft[t] : "";
|
|
3161
3161
|
}
|
|
3162
3162
|
function pr(n) {
|
|
3163
|
-
const t =
|
|
3164
|
-
return t >= 0 ?
|
|
3163
|
+
const t = Ft.indexOf(n);
|
|
3164
|
+
return t >= 0 ? _t[t] : "";
|
|
3165
3165
|
}
|
|
3166
3166
|
function ld(n, t = 64) {
|
|
3167
3167
|
const e = [], a = [], i = pr(n);
|
|
@@ -3172,29 +3172,29 @@ function ld(n, t = 64) {
|
|
|
3172
3172
|
});
|
|
3173
3173
|
const r = parseInt(n.substring(0, 2), 16), o = parseInt(n.substring(2, 4), 16), s = parseInt(n.substring(4, 6), 16);
|
|
3174
3174
|
let l, c, d;
|
|
3175
|
-
for (let A = 0; A <
|
|
3175
|
+
for (let A = 0; A < Ft.length; A++) {
|
|
3176
3176
|
l = Je[A][0], c = Je[A][1], d = Je[A][2];
|
|
3177
3177
|
const u = Math.sqrt(Math.pow(r - l, 2) + Math.pow(o - c, 2) + Math.pow(s - d, 2));
|
|
3178
3178
|
a.push(u);
|
|
3179
3179
|
}
|
|
3180
3180
|
for (let A = 0; A < a.length; A++)
|
|
3181
|
-
a[A] <= t && !e.some((u) => u.pms ===
|
|
3181
|
+
a[A] <= t && !e.some((u) => u.pms === _t[A]) && e.push({ pms: _t[A], hex: Ft[A], distance: a[A] });
|
|
3182
3182
|
return e.sort((A, u) => A.distance - u.distance);
|
|
3183
3183
|
}
|
|
3184
|
-
const fr =
|
|
3184
|
+
const fr = _t.map((n, t) => ({ pms: n, hex: Ft[t] })), Cr = new Ni(fr, { keys: ["pms"] });
|
|
3185
3185
|
function cd(n, t) {
|
|
3186
3186
|
return Cr.search(n, t ? { limit: t } : void 0);
|
|
3187
3187
|
}
|
|
3188
|
-
let
|
|
3188
|
+
let Rt = null;
|
|
3189
3189
|
function wr(n) {
|
|
3190
3190
|
if (n.startsWith("#"))
|
|
3191
3191
|
return ja(n);
|
|
3192
3192
|
if (!document)
|
|
3193
3193
|
throw new Error("browserColorToHex is only supported on browsers");
|
|
3194
|
-
if (
|
|
3194
|
+
if (Rt || (Rt = document.createElement("canvas").getContext("2d")), !Rt)
|
|
3195
3195
|
throw new Error("Failed to create canvas context required to convert colors");
|
|
3196
|
-
|
|
3197
|
-
const t = ja(
|
|
3196
|
+
Rt.fillStyle = n;
|
|
3197
|
+
const t = ja(Rt.fillStyle);
|
|
3198
3198
|
return t || console.error(`Unknown browser color ${n}`), t;
|
|
3199
3199
|
}
|
|
3200
3200
|
function ja(n) {
|
|
@@ -3226,8 +3226,8 @@ const ue = (n) => {
|
|
|
3226
3226
|
browserValue: t[0],
|
|
3227
3227
|
spotColor: { profileName: a[0], namedColor: a[1] }
|
|
3228
3228
|
};
|
|
3229
|
-
}, yr = ["fill", "stroke"],
|
|
3230
|
-
t(n), n.children.length > 0 && Array.from(n.children).forEach((e) =>
|
|
3229
|
+
}, yr = ["fill", "stroke"], kt = (n, t) => {
|
|
3230
|
+
t(n), n.children.length > 0 && Array.from(n.children).forEach((e) => kt(e, t));
|
|
3231
3231
|
}, Sr = (n, t) => {
|
|
3232
3232
|
try {
|
|
3233
3233
|
return n.matches(t);
|
|
@@ -3237,7 +3237,7 @@ const ue = (n) => {
|
|
|
3237
3237
|
}, Pa = (n, t = !1) => {
|
|
3238
3238
|
!t && n.setAttribute("preserveAspectRatio", "none");
|
|
3239
3239
|
const e = [];
|
|
3240
|
-
|
|
3240
|
+
kt(n, (a) => {
|
|
3241
3241
|
if (a.tagName === "script") {
|
|
3242
3242
|
a.remove();
|
|
3243
3243
|
return;
|
|
@@ -3263,7 +3263,7 @@ const ue = (n) => {
|
|
|
3263
3263
|
}
|
|
3264
3264
|
}), r.length > 0 ? a.setAttribute("style", r.join(";")) : a.removeAttribute("style");
|
|
3265
3265
|
}
|
|
3266
|
-
}),
|
|
3266
|
+
}), kt(n, (a) => {
|
|
3267
3267
|
e.forEach((i) => {
|
|
3268
3268
|
i.selectors?.forEach((r) => {
|
|
3269
3269
|
Sr(a, r) && i.declarations?.forEach((o) => {
|
|
@@ -3276,10 +3276,10 @@ const ue = (n) => {
|
|
|
3276
3276
|
const t = /pt|pc|mm|cm|in/gm, e = n.getAttribute("viewBox"), a = n.getAttribute("width"), i = n.getAttribute("height");
|
|
3277
3277
|
if (!e) throw new Error("viewBox not specified on SVG!");
|
|
3278
3278
|
a && n.setAttribute("width", a.replace(t, "")), i && n.setAttribute("height", i.replace(t, ""));
|
|
3279
|
-
}, Nn = (n) =>
|
|
3279
|
+
}, Nn = (n) => ut().parseFromString(n, "image/svg+xml").firstElementChild, Er = (n, t, e) => {
|
|
3280
3280
|
n.setAttribute("height", `${e}px`), n.setAttribute("width", `${t}px`);
|
|
3281
3281
|
}, Qn = (n, t, e) => {
|
|
3282
|
-
|
|
3282
|
+
kt(n, (a) => {
|
|
3283
3283
|
const i = a.attributes.getNamedItem("fill");
|
|
3284
3284
|
i && i.value !== "none" && a.classList.forEach((o) => {
|
|
3285
3285
|
if (o.startsWith("spiff-fill")) {
|
|
@@ -3317,7 +3317,7 @@ const ue = (n) => {
|
|
|
3317
3317
|
}
|
|
3318
3318
|
});
|
|
3319
3319
|
});
|
|
3320
|
-
}, Rn = (n) =>
|
|
3320
|
+
}, Rn = (n) => Bt().serializeToString(n), xa = (n, t, e, a, i) => {
|
|
3321
3321
|
const r = Nn(n);
|
|
3322
3322
|
if (!r)
|
|
3323
3323
|
throw new Error("Failed to read SVG.");
|
|
@@ -3329,14 +3329,14 @@ const ue = (n) => {
|
|
|
3329
3329
|
return Qn(a, t, e), Rn(a);
|
|
3330
3330
|
}, br = (n) => {
|
|
3331
3331
|
const t = /<svg.*<\/svg>/s, e = n.match(t) || [], a = e?.length > 0 ? e[0] : "";
|
|
3332
|
-
return
|
|
3333
|
-
},
|
|
3332
|
+
return ut().parseFromString(a, "image/svg+xml");
|
|
3333
|
+
}, ct = async (n) => {
|
|
3334
3334
|
const e = br(n).firstElementChild;
|
|
3335
3335
|
if (!e)
|
|
3336
3336
|
throw new Error("Failed to read SVG.");
|
|
3337
3337
|
Pa(e);
|
|
3338
3338
|
const a = {};
|
|
3339
|
-
|
|
3339
|
+
kt(e, (o) => {
|
|
3340
3340
|
const s = o.attributes.getNamedItem("fill");
|
|
3341
3341
|
if (s && s.value !== "none" && !s.value.startsWith("url(")) {
|
|
3342
3342
|
const c = Ya(s.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
|
|
@@ -3348,7 +3348,7 @@ const ue = (n) => {
|
|
|
3348
3348
|
o.classList.add(A), o.setAttribute("stroke", c.browserValue), a[d] = c;
|
|
3349
3349
|
}
|
|
3350
3350
|
});
|
|
3351
|
-
const r =
|
|
3351
|
+
const r = Bt().serializeToString(e);
|
|
3352
3352
|
return {
|
|
3353
3353
|
colors: a,
|
|
3354
3354
|
svg: r
|
|
@@ -3360,7 +3360,7 @@ const ue = (n) => {
|
|
|
3360
3360
|
value
|
|
3361
3361
|
}
|
|
3362
3362
|
}
|
|
3363
|
-
`,
|
|
3363
|
+
`, ie = (n) => C`
|
|
3364
3364
|
${n && Ir || ""}
|
|
3365
3365
|
fragment AssetFields on Asset {
|
|
3366
3366
|
name
|
|
@@ -3404,7 +3404,7 @@ const ue = (n) => {
|
|
|
3404
3404
|
${n && "...AssetMetadataFields" || ""}
|
|
3405
3405
|
}
|
|
3406
3406
|
`, Br = C`
|
|
3407
|
-
${
|
|
3407
|
+
${ie(!1)}
|
|
3408
3408
|
query GetAssets($keys: [String]!) {
|
|
3409
3409
|
assets(keys: $keys) {
|
|
3410
3410
|
...AssetFields
|
|
@@ -3479,7 +3479,7 @@ const ue = (n) => {
|
|
|
3479
3479
|
}
|
|
3480
3480
|
}
|
|
3481
3481
|
`, Dr = C`
|
|
3482
|
-
${
|
|
3482
|
+
${ie(!1)}
|
|
3483
3483
|
mutation RemoveBackgroundFromAsset($key: String!) {
|
|
3484
3484
|
assetRemoveBackground(key: $key) {
|
|
3485
3485
|
...AssetFields
|
|
@@ -3607,8 +3607,8 @@ class Mr {
|
|
|
3607
3607
|
const e = t.key;
|
|
3608
3608
|
if (this.bgrmProcessCache.has(e))
|
|
3609
3609
|
return this.bgrmProcessCache.get(e);
|
|
3610
|
-
if (
|
|
3611
|
-
const r = this.getLocalOrFromServer(
|
|
3610
|
+
if (K.has(e)) {
|
|
3611
|
+
const r = this.getLocalOrFromServer(K.get(e));
|
|
3612
3612
|
return this.bgrmProcessCache.set(e, r), r;
|
|
3613
3613
|
}
|
|
3614
3614
|
const i = (async () => {
|
|
@@ -3622,7 +3622,7 @@ class Mr {
|
|
|
3622
3622
|
});
|
|
3623
3623
|
if (this.bgrmProcessCache.delete(e), !r.data?.assetRemoveBackground?.key)
|
|
3624
3624
|
throw new Error("Failed to remove background from image");
|
|
3625
|
-
return ht.add(r.data.assetRemoveBackground),
|
|
3625
|
+
return ht.add(r.data.assetRemoveBackground), K.add(e, r.data.assetRemoveBackground.key), this.cache.set(
|
|
3626
3626
|
r.data.assetRemoveBackground.key,
|
|
3627
3627
|
Promise.resolve(r.data.assetRemoveBackground)
|
|
3628
3628
|
), r.data.assetRemoveBackground;
|
|
@@ -3630,7 +3630,7 @@ class Mr {
|
|
|
3630
3630
|
return this.bgrmProcessCache.set(e, i), i;
|
|
3631
3631
|
}
|
|
3632
3632
|
removePersistedAsset(t) {
|
|
3633
|
-
ht.remove(t),
|
|
3633
|
+
ht.remove(t), K.delete(t), K.deleteForBgRemovedKey(t);
|
|
3634
3634
|
}
|
|
3635
3635
|
getPersistedAssets() {
|
|
3636
3636
|
return ht.list();
|
|
@@ -3647,9 +3647,9 @@ class Mr {
|
|
|
3647
3647
|
async postProcessFileUpload(t, e) {
|
|
3648
3648
|
if (e === "image/svg+xml") {
|
|
3649
3649
|
const a = await t.blob.text(), o = new window.DOMParser().parseFromString(a, "image/svg+xml").documentElement;
|
|
3650
|
-
if (!o) throw new
|
|
3650
|
+
if (!o) throw new xt("Failed to read SVG.");
|
|
3651
3651
|
vr(o);
|
|
3652
|
-
const l =
|
|
3652
|
+
const l = Bt().serializeToString(o);
|
|
3653
3653
|
return {
|
|
3654
3654
|
name: t.name,
|
|
3655
3655
|
blob: new Blob([l], { type: "image/svg+xml" })
|
|
@@ -3684,7 +3684,7 @@ class Mr {
|
|
|
3684
3684
|
}
|
|
3685
3685
|
}
|
|
3686
3686
|
}
|
|
3687
|
-
const
|
|
3687
|
+
const Ot = "persistentAssets", dt = class dt {
|
|
3688
3688
|
/**
|
|
3689
3689
|
* Add a new asset to persistence
|
|
3690
3690
|
* @param asset The asset to add.
|
|
@@ -3696,80 +3696,80 @@ const $t = "persistentAssets", ct = class ct {
|
|
|
3696
3696
|
}
|
|
3697
3697
|
const e = /* @__PURE__ */ new Map();
|
|
3698
3698
|
e.set(t.key || "", t.fileLink);
|
|
3699
|
-
const a =
|
|
3699
|
+
const a = T.getMap(Ot);
|
|
3700
3700
|
a && a.forEach((i, r) => {
|
|
3701
3701
|
e.set(r, i);
|
|
3702
|
-
}),
|
|
3702
|
+
}), T.setMap(Ot, e), dt.executeCallbacks();
|
|
3703
3703
|
}
|
|
3704
3704
|
/**
|
|
3705
3705
|
* Remove an existing asset from persistence. Noop if the asset doesn't exist.
|
|
3706
3706
|
* @param assetKey The key to remove.
|
|
3707
3707
|
*/
|
|
3708
3708
|
static remove(t) {
|
|
3709
|
-
const e =
|
|
3709
|
+
const e = T.getMap(Ot);
|
|
3710
3710
|
if (!e) return;
|
|
3711
3711
|
const a = Array.from(e.entries()).find((i) => i[0] === t);
|
|
3712
|
-
a && (e.delete(a[0]),
|
|
3712
|
+
a && (e.delete(a[0]), T.setMap(Ot, e), dt.executeCallbacks());
|
|
3713
3713
|
}
|
|
3714
3714
|
/**
|
|
3715
3715
|
* Get a list of all persisted assets.
|
|
3716
3716
|
*/
|
|
3717
3717
|
static list() {
|
|
3718
|
-
const t =
|
|
3718
|
+
const t = T.getMap(Ot);
|
|
3719
3719
|
return t ? Array.from(t.entries()).map((e) => ({ assetKey: e[0], src: e[1] })) : [];
|
|
3720
3720
|
}
|
|
3721
3721
|
/**
|
|
3722
3722
|
* Adds a callback that will be called whenever assets are added/removed from persistence.
|
|
3723
3723
|
*/
|
|
3724
3724
|
static addCallback(t) {
|
|
3725
|
-
|
|
3725
|
+
dt.callbacks.push(t);
|
|
3726
3726
|
}
|
|
3727
3727
|
/**
|
|
3728
3728
|
* Removes an existing callback.
|
|
3729
3729
|
*/
|
|
3730
3730
|
static removeCallback(t) {
|
|
3731
|
-
|
|
3731
|
+
dt.callbacks = dt.callbacks.filter((e) => e !== t);
|
|
3732
3732
|
}
|
|
3733
3733
|
static executeCallbacks() {
|
|
3734
|
-
|
|
3734
|
+
dt.callbacks.forEach((t) => t());
|
|
3735
3735
|
}
|
|
3736
3736
|
};
|
|
3737
|
-
|
|
3738
|
-
let ht =
|
|
3737
|
+
dt.callbacks = [];
|
|
3738
|
+
let ht = dt;
|
|
3739
3739
|
const Ja = "bgrmPersistentAssets";
|
|
3740
|
-
class
|
|
3740
|
+
class K {
|
|
3741
3741
|
static has(t) {
|
|
3742
|
-
return
|
|
3742
|
+
return K.getMap().has(t);
|
|
3743
3743
|
}
|
|
3744
3744
|
static get(t) {
|
|
3745
|
-
return
|
|
3745
|
+
return K.getMap().get(t);
|
|
3746
3746
|
}
|
|
3747
3747
|
static keys() {
|
|
3748
|
-
return
|
|
3748
|
+
return K.getMap().keys();
|
|
3749
3749
|
}
|
|
3750
3750
|
static values() {
|
|
3751
|
-
return
|
|
3751
|
+
return K.getMap().values();
|
|
3752
3752
|
}
|
|
3753
3753
|
static add(t, e) {
|
|
3754
|
-
const a =
|
|
3755
|
-
a.set(t, e),
|
|
3754
|
+
const a = K.getMap();
|
|
3755
|
+
a.set(t, e), K.setMap(a);
|
|
3756
3756
|
}
|
|
3757
3757
|
static delete(t) {
|
|
3758
|
-
const e =
|
|
3759
|
-
e.delete(t),
|
|
3758
|
+
const e = K.getMap();
|
|
3759
|
+
e.delete(t), K.setMap(e);
|
|
3760
3760
|
}
|
|
3761
3761
|
static deleteForBgRemovedKey(t) {
|
|
3762
|
-
const e =
|
|
3763
|
-
a && (e.delete(a),
|
|
3762
|
+
const e = K.getMap(), a = Array.from(e.keys()).find((i) => e.get(i) === t);
|
|
3763
|
+
a && (e.delete(a), K.setMap(e));
|
|
3764
3764
|
}
|
|
3765
3765
|
static getMap() {
|
|
3766
|
-
return
|
|
3766
|
+
return T.getMap(Ja) || /* @__PURE__ */ new Map();
|
|
3767
3767
|
}
|
|
3768
3768
|
static setMap(t) {
|
|
3769
|
-
|
|
3769
|
+
T.setMap(Ja, t);
|
|
3770
3770
|
}
|
|
3771
3771
|
}
|
|
3772
|
-
const
|
|
3772
|
+
const U = new Mr();
|
|
3773
3773
|
class Tr {
|
|
3774
3774
|
constructor() {
|
|
3775
3775
|
this.cache = {}, this.disabled = !1;
|
|
@@ -3799,7 +3799,7 @@ class Tr {
|
|
|
3799
3799
|
this.disabled = t;
|
|
3800
3800
|
}
|
|
3801
3801
|
}
|
|
3802
|
-
const
|
|
3802
|
+
const Xt = new Tr(), On = C`
|
|
3803
3803
|
fragment OptionFields on Option {
|
|
3804
3804
|
id
|
|
3805
3805
|
name
|
|
@@ -3841,7 +3841,7 @@ const Zt = new Tr(), On = C`
|
|
|
3841
3841
|
}
|
|
3842
3842
|
}
|
|
3843
3843
|
`, Nr = C`
|
|
3844
|
-
${
|
|
3844
|
+
${ie(!1)}
|
|
3845
3845
|
${Fa}
|
|
3846
3846
|
${On}
|
|
3847
3847
|
query GetOptions($ids: [String]!) {
|
|
@@ -3858,16 +3858,16 @@ const Zt = new Tr(), On = C`
|
|
|
3858
3858
|
}
|
|
3859
3859
|
});
|
|
3860
3860
|
return t.data.options.forEach((e) => {
|
|
3861
|
-
e.defaultVariant?.asset &&
|
|
3862
|
-
a.asset &&
|
|
3861
|
+
e.defaultVariant?.asset && U.cacheAsset(e.defaultVariant.asset), e.colorProfile && U.cacheAsset(e.colorProfile), e.variants?.forEach((a) => {
|
|
3862
|
+
a.asset && U.cacheAsset(a.asset), a.thumbnail && U.cacheAsset(a.thumbnail), a.material && U.cacheMaterial(a.material);
|
|
3863
3863
|
});
|
|
3864
3864
|
}), t.data.options;
|
|
3865
3865
|
}, Rr = async (n, t) => (await t).find((a) => a.id === n), Or = async (n) => {
|
|
3866
|
-
const t = n.map((o) =>
|
|
3866
|
+
const t = n.map((o) => Xt.get({ id: o })), e = n.filter((o, s) => t[s] === void 0);
|
|
3867
3867
|
if (e.length === 0)
|
|
3868
3868
|
return Promise.all(t);
|
|
3869
3869
|
const a = Qr(e), i = e.map(
|
|
3870
|
-
(o) =>
|
|
3870
|
+
(o) => Xt.set({ id: o }, Rr(o, a))
|
|
3871
3871
|
), r = t.filter((o) => o !== void 0);
|
|
3872
3872
|
return await Promise.all(r.concat(i));
|
|
3873
3873
|
};
|
|
@@ -3912,7 +3912,7 @@ class $r {
|
|
|
3912
3912
|
}
|
|
3913
3913
|
}
|
|
3914
3914
|
}
|
|
3915
|
-
const
|
|
3915
|
+
const Y = new $r(), $n = C`
|
|
3916
3916
|
fragment ActiveIntegrationFields on Integration {
|
|
3917
3917
|
id
|
|
3918
3918
|
logo
|
|
@@ -3970,7 +3970,7 @@ const J = new $r(), $n = C`
|
|
|
3970
3970
|
customField5
|
|
3971
3971
|
conversionConfigurationId
|
|
3972
3972
|
}
|
|
3973
|
-
`,
|
|
3973
|
+
`, re = C`
|
|
3974
3974
|
fragment ConversionConfigurationFields on ConversionConfiguration {
|
|
3975
3975
|
id
|
|
3976
3976
|
partnerId
|
|
@@ -4047,7 +4047,7 @@ const J = new $r(), $n = C`
|
|
|
4047
4047
|
}
|
|
4048
4048
|
`, Lr = C`
|
|
4049
4049
|
${Le}
|
|
4050
|
-
${
|
|
4050
|
+
${re}
|
|
4051
4051
|
${$n}
|
|
4052
4052
|
query ReadIntegrationProducts($ids: [String!]!) {
|
|
4053
4053
|
integrationProducts(ids: $ids) {
|
|
@@ -4208,14 +4208,14 @@ const J = new $r(), $n = C`
|
|
|
4208
4208
|
}
|
|
4209
4209
|
}
|
|
4210
4210
|
`, qr = C`
|
|
4211
|
-
${
|
|
4211
|
+
${re}
|
|
4212
4212
|
query ReadConversionConfigurationQuery($id: String!) {
|
|
4213
4213
|
conversionConfiguration(id: $id) {
|
|
4214
4214
|
...ConversionConfigurationFields
|
|
4215
4215
|
}
|
|
4216
4216
|
}
|
|
4217
4217
|
`, Hr = C`
|
|
4218
|
-
${
|
|
4218
|
+
${re}
|
|
4219
4219
|
query ReadTransactionForDesignCreation($id: String!) {
|
|
4220
4220
|
transactions(ids: [$id]) {
|
|
4221
4221
|
id
|
|
@@ -4528,7 +4528,7 @@ const J = new $r(), $n = C`
|
|
|
4528
4528
|
name
|
|
4529
4529
|
}
|
|
4530
4530
|
`, ao = (n) => C`
|
|
4531
|
-
${
|
|
4531
|
+
${ie(n)}
|
|
4532
4532
|
${Fa}
|
|
4533
4533
|
${On}
|
|
4534
4534
|
${Xr}
|
|
@@ -4952,7 +4952,7 @@ const J = new $r(), $n = C`
|
|
|
4952
4952
|
}
|
|
4953
4953
|
}
|
|
4954
4954
|
`, io = C`
|
|
4955
|
-
${
|
|
4955
|
+
${ie(!1)}
|
|
4956
4956
|
query GetWorkflowForTheme($id: String!) {
|
|
4957
4957
|
workflow(id: $id) {
|
|
4958
4958
|
id
|
|
@@ -4974,7 +4974,7 @@ const J = new $r(), $n = C`
|
|
|
4974
4974
|
}
|
|
4975
4975
|
}
|
|
4976
4976
|
`, Ve = C`
|
|
4977
|
-
${
|
|
4977
|
+
${re}
|
|
4978
4978
|
fragment MarketplaceThemeInstallConfigurationFields on MarketplaceThemeInstallConfiguration {
|
|
4979
4979
|
id
|
|
4980
4980
|
themeInstallId
|
|
@@ -5094,7 +5094,7 @@ const J = new $r(), $n = C`
|
|
|
5094
5094
|
timestamp
|
|
5095
5095
|
}
|
|
5096
5096
|
}
|
|
5097
|
-
`,
|
|
5097
|
+
`, $t = [E.SilentIllustration, E.ProductOverlay], uo = async (n) => {
|
|
5098
5098
|
const t = [];
|
|
5099
5099
|
n.introduction && t.push({
|
|
5100
5100
|
name: "Introduction",
|
|
@@ -5117,16 +5117,16 @@ const J = new $r(), $n = C`
|
|
|
5117
5117
|
t.push({
|
|
5118
5118
|
name: a.stepName,
|
|
5119
5119
|
title: a.stepTitle,
|
|
5120
|
-
renderableSteps:
|
|
5121
|
-
silentSteps:
|
|
5120
|
+
renderableSteps: $t.includes(a.type) ? [] : [a],
|
|
5121
|
+
silentSteps: $t.includes(a.type) ? [a] : []
|
|
5122
5122
|
});
|
|
5123
5123
|
else {
|
|
5124
5124
|
const r = t.find((o) => o.name === i.name);
|
|
5125
|
-
r ?
|
|
5125
|
+
r ? $t.includes(a.type) ? r.silentSteps.push(a) : r.renderableSteps.push(a) : t.push({
|
|
5126
5126
|
name: i.name,
|
|
5127
5127
|
title: i.name,
|
|
5128
|
-
renderableSteps:
|
|
5129
|
-
silentSteps:
|
|
5128
|
+
renderableSteps: $t.includes(a.type) ? [] : [a],
|
|
5129
|
+
silentSteps: $t.includes(a.type) ? [a] : []
|
|
5130
5130
|
});
|
|
5131
5131
|
}
|
|
5132
5132
|
}
|
|
@@ -5149,7 +5149,7 @@ const J = new $r(), $n = C`
|
|
|
5149
5149
|
],
|
|
5150
5150
|
silentSteps: []
|
|
5151
5151
|
}), t;
|
|
5152
|
-
}, ho = (n, t) => t.find((e) => e.stepNames.includes(n)),
|
|
5152
|
+
}, ho = (n, t) => t.find((e) => e.stepNames.includes(n)), Et = (n, t) => (n.conditions || []).every((e) => {
|
|
5153
5153
|
const a = t[e.targetStepName];
|
|
5154
5154
|
if (a && a.selectedVariants) {
|
|
5155
5155
|
const i = a.selectedVariants;
|
|
@@ -5162,12 +5162,12 @@ const J = new $r(), $n = C`
|
|
|
5162
5162
|
const e = {
|
|
5163
5163
|
name: n.name,
|
|
5164
5164
|
title: n.title,
|
|
5165
|
-
renderableSteps: n.renderableSteps.filter((a) =>
|
|
5166
|
-
silentSteps: n.silentSteps.filter((a) =>
|
|
5165
|
+
renderableSteps: n.renderableSteps.filter((a) => Et(a, t)),
|
|
5166
|
+
silentSteps: n.silentSteps.filter((a) => Et(a, t))
|
|
5167
5167
|
};
|
|
5168
5168
|
return e.silentSteps.length === 0 && e.renderableSteps.length === 0 ? null : e;
|
|
5169
|
-
},
|
|
5170
|
-
const a =
|
|
5169
|
+
}, St = (n, t) => n.map((e) => go(e, t)).filter((e) => e !== null), mo = async (n, t, e = !1) => {
|
|
5170
|
+
const a = St(n, t), i = [];
|
|
5171
5171
|
for (const o of a)
|
|
5172
5172
|
for (const s of o.renderableSteps) {
|
|
5173
5173
|
const l = (s.option?.variants || []).length;
|
|
@@ -5257,7 +5257,7 @@ class qn {
|
|
|
5257
5257
|
}
|
|
5258
5258
|
}
|
|
5259
5259
|
}
|
|
5260
|
-
const
|
|
5260
|
+
const Q = () => {
|
|
5261
5261
|
const n = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
|
|
5262
5262
|
return n() + n() + "-" + n() + "-" + n() + "-" + n() + "-" + n() + n() + n();
|
|
5263
5263
|
}, po = ({
|
|
@@ -5275,15 +5275,15 @@ const T = () => {
|
|
|
5275
5275
|
viewBox: A,
|
|
5276
5276
|
width: u
|
|
5277
5277
|
}) => {
|
|
5278
|
-
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 =
|
|
5278
|
+
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 = Q(), S = a.purpose === Jt.FreeDesign && /* @__PURE__ */ B("defs", { children: /* @__PURE__ */ B("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ B("rect", { width: m.width, height: m.height, rx: h }) }) }), w = a.colorProfiles?.map((b, x) => (
|
|
5279
5279
|
/* @ts-ignore */
|
|
5280
|
-
/* @__PURE__ */ B("color-profile", { name: b.name, xlinkHref: b.key, children: " " },
|
|
5281
|
-
)),
|
|
5280
|
+
/* @__PURE__ */ B("color-profile", { name: b.name, xlinkHref: b.key, children: " " }, x)
|
|
5281
|
+
)), P = i.map((b) => ({
|
|
5282
5282
|
...b,
|
|
5283
5283
|
_renderingConfiguration: a,
|
|
5284
5284
|
mask: l ? `url(#viewmask-${f})` : void 0
|
|
5285
|
-
})), v = Ma(
|
|
5286
|
-
return /* @__PURE__ */
|
|
5285
|
+
})), v = Ma(P);
|
|
5286
|
+
return /* @__PURE__ */ At(
|
|
5287
5287
|
"svg",
|
|
5288
5288
|
{
|
|
5289
5289
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5318,7 +5318,7 @@ const T = () => {
|
|
|
5318
5318
|
"g",
|
|
5319
5319
|
{
|
|
5320
5320
|
id: "element-group",
|
|
5321
|
-
clipPath: a.purpose ===
|
|
5321
|
+
clipPath: a.purpose === Jt.FreeDesign ? "url(#viewboxClip)" : void 0,
|
|
5322
5322
|
children: v.map((b) => Zn(b)).filter((b) => !!b)
|
|
5323
5323
|
}
|
|
5324
5324
|
),
|
|
@@ -5335,7 +5335,7 @@ const T = () => {
|
|
|
5335
5335
|
strokeDasharray: `${g * 2} ${g}`
|
|
5336
5336
|
}
|
|
5337
5337
|
),
|
|
5338
|
-
l && /* @__PURE__ */
|
|
5338
|
+
l && /* @__PURE__ */ At("mask", { id: `viewmask-${f}`, children: [
|
|
5339
5339
|
/* @__PURE__ */ B(
|
|
5340
5340
|
"rect",
|
|
5341
5341
|
{
|
|
@@ -5361,10 +5361,10 @@ const T = () => {
|
|
|
5361
5361
|
}
|
|
5362
5362
|
);
|
|
5363
5363
|
}, dd = (n, t, e, a, i) => {
|
|
5364
|
-
const r = wt(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, S = u * d + g * A, w = h * d + m * A,
|
|
5364
|
+
const r = wt(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, S = u * d + g * A, w = h * d + m * A, P = Math.max(Math.abs(p), Math.abs(f)), v = Math.max(Math.abs(S), Math.abs(w));
|
|
5365
5365
|
return {
|
|
5366
|
-
minX: l -
|
|
5367
|
-
maxX: l +
|
|
5366
|
+
minX: l - P,
|
|
5367
|
+
maxX: l + P,
|
|
5368
5368
|
minY: c - v,
|
|
5369
5369
|
maxY: c + v
|
|
5370
5370
|
};
|
|
@@ -5389,26 +5389,26 @@ const T = () => {
|
|
|
5389
5389
|
}), fd = (n, t, e, a) => ({
|
|
5390
5390
|
x: n.x + (t?.x + t?.width) * e,
|
|
5391
5391
|
y: n.y + (t?.y + t?.height) * a
|
|
5392
|
-
}),
|
|
5392
|
+
}), Pt = (n) => {
|
|
5393
5393
|
switch (n) {
|
|
5394
|
-
case
|
|
5395
|
-
return
|
|
5396
|
-
case
|
|
5397
|
-
return
|
|
5398
|
-
case
|
|
5399
|
-
return
|
|
5400
|
-
case
|
|
5401
|
-
return
|
|
5402
|
-
case
|
|
5403
|
-
return
|
|
5404
|
-
case
|
|
5405
|
-
return
|
|
5406
|
-
case
|
|
5407
|
-
return
|
|
5408
|
-
case
|
|
5409
|
-
return
|
|
5410
|
-
}
|
|
5411
|
-
}, Cd = (n, t) => t > 45 && t <= 135 ?
|
|
5394
|
+
case j.North:
|
|
5395
|
+
return j.East;
|
|
5396
|
+
case j.East:
|
|
5397
|
+
return j.South;
|
|
5398
|
+
case j.South:
|
|
5399
|
+
return j.West;
|
|
5400
|
+
case j.West:
|
|
5401
|
+
return j.North;
|
|
5402
|
+
case j.Northwest:
|
|
5403
|
+
return j.Northeast;
|
|
5404
|
+
case j.Northeast:
|
|
5405
|
+
return j.Southeast;
|
|
5406
|
+
case j.Southeast:
|
|
5407
|
+
return j.Southwest;
|
|
5408
|
+
case j.Southwest:
|
|
5409
|
+
return j.Northwest;
|
|
5410
|
+
}
|
|
5411
|
+
}, Cd = (n, t) => t > 45 && t <= 135 ? Pt(n) : t > 135 && t <= 225 ? Pt(Pt(n)) : t > 225 && t <= 315 ? Pt(Pt(Pt(n))) : n, wd = (n, t = { x: 0, y: 0 }, e = { x: 1, y: 1 }) => {
|
|
5412
5412
|
const a = wt(n.rotation), i = {
|
|
5413
5413
|
x: t.x + n.x * e.x,
|
|
5414
5414
|
y: t.x + n.y * e.y
|
|
@@ -5462,9 +5462,9 @@ const T = () => {
|
|
|
5462
5462
|
) });
|
|
5463
5463
|
}, jn = (n) => {
|
|
5464
5464
|
const t = `spiff-group-clip-${n.id}`, e = n.rotation || 0, a = wt(e), i = Math.cos(a), r = -Math.sin(a), o = Ma(n.children);
|
|
5465
|
-
return /* @__PURE__ */
|
|
5465
|
+
return /* @__PURE__ */ At(Wt, { children: [
|
|
5466
5466
|
/* @__PURE__ */ B("defs", { children: /* @__PURE__ */ B("clipPath", { id: t, preserveAspectRatio: "none", children: n.clipPath ? /* @__PURE__ */ B("path", { d: n.clipPath }) : /* @__PURE__ */ B("rect", { x: 0, y: 0, width: n.width, height: n.height }) }) }),
|
|
5467
|
-
/* @__PURE__ */
|
|
5467
|
+
/* @__PURE__ */ At(
|
|
5468
5468
|
"g",
|
|
5469
5469
|
{
|
|
5470
5470
|
transform: `
|
|
@@ -5502,8 +5502,8 @@ const T = () => {
|
|
|
5502
5502
|
return n.pattern.src;
|
|
5503
5503
|
};
|
|
5504
5504
|
if (!a())
|
|
5505
|
-
return /* @__PURE__ */ B(
|
|
5506
|
-
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__ */ B(
|
|
5505
|
+
return /* @__PURE__ */ B(Wt, {});
|
|
5506
|
+
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__ */ B(Wt, { children: n.useThreshold && /* @__PURE__ */ B("defs", { children: /* @__PURE__ */ At("filter", { id: e, "color-interpolation-filters": "sRGB", children: [
|
|
5507
5507
|
/* @__PURE__ */ B(
|
|
5508
5508
|
"feColorMatrix",
|
|
5509
5509
|
{
|
|
@@ -5517,7 +5517,7 @@ const T = () => {
|
|
|
5517
5517
|
result: "greyscale"
|
|
5518
5518
|
}
|
|
5519
5519
|
),
|
|
5520
|
-
/* @__PURE__ */
|
|
5520
|
+
/* @__PURE__ */ At("feComponentTransfer", { in: "greyscale", children: [
|
|
5521
5521
|
/* @__PURE__ */ B("feFuncR", { type: "discrete", tableValues: i() }),
|
|
5522
5522
|
/* @__PURE__ */ B("feFuncG", { type: "discrete", tableValues: i() }),
|
|
5523
5523
|
/* @__PURE__ */ B("feFuncB", { type: "discrete", tableValues: i() })
|
|
@@ -5546,7 +5546,7 @@ const T = () => {
|
|
|
5546
5546
|
src: a()
|
|
5547
5547
|
}];
|
|
5548
5548
|
};
|
|
5549
|
-
return /* @__PURE__ */
|
|
5549
|
+
return /* @__PURE__ */ At(Wt, { children: [
|
|
5550
5550
|
r(),
|
|
5551
5551
|
/* @__PURE__ */ B(
|
|
5552
5552
|
"g",
|
|
@@ -5632,7 +5632,7 @@ class Co {
|
|
|
5632
5632
|
}), a - i;
|
|
5633
5633
|
}
|
|
5634
5634
|
}
|
|
5635
|
-
const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @__PURE__ */ new Map(),
|
|
5635
|
+
const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @__PURE__ */ new Map(), Nt = async (n) => {
|
|
5636
5636
|
if (Ke.has(n))
|
|
5637
5637
|
return Ke.get(n);
|
|
5638
5638
|
const e = (async () => {
|
|
@@ -5661,7 +5661,7 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
|
|
|
5661
5661
|
const e = new Co(t);
|
|
5662
5662
|
return Yn.set(n, e), e;
|
|
5663
5663
|
}, vd = async (n) => {
|
|
5664
|
-
const t =
|
|
5664
|
+
const t = ut(), e = t.parseFromString(n, "image/svg+xml"), a = e.firstElementChild, i = /* @__PURE__ */ new Map();
|
|
5665
5665
|
a.querySelectorAll("style").forEach((d) => {
|
|
5666
5666
|
yn(d.innerHTML).stylesheet?.rules.forEach((u) => {
|
|
5667
5667
|
if (u.type === "font-face" && u.declarations) {
|
|
@@ -5674,26 +5674,26 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
|
|
|
5674
5674
|
});
|
|
5675
5675
|
const o = e.querySelectorAll("tspan");
|
|
5676
5676
|
for (let d = 0; d < o.length; d++) {
|
|
5677
|
-
const A = o.item(d), u = A.closest("text"), h = A.closest("g"), g = u.getAttribute("font-family"), m = await
|
|
5677
|
+
const A = o.item(d), u = A.closest("text"), h = A.closest("g"), g = u.getAttribute("font-family"), m = await Nt(i.get(g)), p = u.getAttribute("fill"), f = u.getAttribute("stroke"), S = u.getAttribute("stroke-width"), w = m.getPath(
|
|
5678
5678
|
A.innerHTML,
|
|
5679
5679
|
0,
|
|
5680
5680
|
0,
|
|
5681
5681
|
parseInt(u.getAttribute("font-size") ?? "72")
|
|
5682
|
-
),
|
|
5682
|
+
), P = w.getBoundingBox().x2 - w.getBoundingBox().x1;
|
|
5683
5683
|
let v = 0;
|
|
5684
5684
|
const b = A.getAttribute("text-anchor");
|
|
5685
|
-
b === "middle" ? v =
|
|
5686
|
-
const
|
|
5685
|
+
b === "middle" ? v = P / 2 : b === "end" && (v = P);
|
|
5686
|
+
const x = m.getPath(
|
|
5687
5687
|
A.innerHTML,
|
|
5688
5688
|
parseFloat(A.getAttribute("x") ?? "0") - v,
|
|
5689
5689
|
parseFloat(A.getAttribute("y") ?? "0"),
|
|
5690
5690
|
parseInt(u.getAttribute("font-size") ?? "72")
|
|
5691
5691
|
);
|
|
5692
|
-
|
|
5693
|
-
const F =
|
|
5694
|
-
h.appendChild(
|
|
5692
|
+
x.fill = p, x.stroke = f, x.strokeWidth = parseFloat(S ?? "0");
|
|
5693
|
+
const F = x.toSVG(2), I = t.parseFromString(F, "image/svg+xml").firstElementChild;
|
|
5694
|
+
h.appendChild(I);
|
|
5695
5695
|
}
|
|
5696
|
-
return e.querySelectorAll("text").forEach((d) => d.remove()),
|
|
5696
|
+
return e.querySelectorAll("text").forEach((d) => d.remove()), Bt().serializeToString(a);
|
|
5697
5697
|
}, Fe = (n, t, e, a) => Math.max(bo(n.join(`
|
|
5698
5698
|
`), e, a), t), Ka = (n, t, e, a, i, r) => {
|
|
5699
5699
|
const o = (r || _n) * i.getApproximateHeight(), s = t.split(`
|
|
@@ -5807,10 +5807,10 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
|
|
|
5807
5807
|
let a = n || "";
|
|
5808
5808
|
return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
|
|
5809
5809
|
`)), a;
|
|
5810
|
-
}, Io = (n, t) => n.map((e, a) => [e, t[a]]), Bo = (n = "center", t = !1) => t ? "center" : n, Kn = (n) => n === "left" ? "start" : n === "right" ? "end" : "middle",
|
|
5810
|
+
}, Io = (n, t) => n.map((e, a) => [e, t[a]]), Bo = (n = "center", t = !1) => t ? "center" : n, Kn = (n) => n === "left" ? "start" : n === "right" ? "end" : "middle", oe = (n, t, e) => n.fontData ? {
|
|
5811
5811
|
...n,
|
|
5812
5812
|
...(() => {
|
|
5813
|
-
if (n.algorithm ===
|
|
5813
|
+
if (n.algorithm === Mt.Traditional) {
|
|
5814
5814
|
const i = vo(t, n, e, n.lineHeight);
|
|
5815
5815
|
return {
|
|
5816
5816
|
text: i.lines.join(`
|
|
@@ -5826,7 +5826,7 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
|
|
|
5826
5826
|
};
|
|
5827
5827
|
})()
|
|
5828
5828
|
} : n, _n = 1.1;
|
|
5829
|
-
function
|
|
5829
|
+
function Dt(n, t) {
|
|
5830
5830
|
return Xn(n, t.getTemplatingContext());
|
|
5831
5831
|
}
|
|
5832
5832
|
function Xn(n, t) {
|
|
@@ -5843,8 +5843,8 @@ const Po = (n) => {
|
|
|
5843
5843
|
if (n.curved && !n.paths || !n.fontData)
|
|
5844
5844
|
return null;
|
|
5845
5845
|
const h = () => n.textFillImage ? `url("#${o}")` : n._renderingConfiguration?.spotColors && n.fillSpotColorDefinition ? `${n.fill} ${Tn(n.fillSpotColorDefinition)}` : n.fill;
|
|
5846
|
-
return /* @__PURE__ */
|
|
5847
|
-
/* @__PURE__ */
|
|
5846
|
+
return /* @__PURE__ */ At(Wt, { children: [
|
|
5847
|
+
/* @__PURE__ */ At("defs", { children: [
|
|
5848
5848
|
n.textFillImage && /* @__PURE__ */ B(
|
|
5849
5849
|
"pattern",
|
|
5850
5850
|
{
|
|
@@ -5992,7 +5992,7 @@ const Po = (n) => {
|
|
|
5992
5992
|
};
|
|
5993
5993
|
class ko {
|
|
5994
5994
|
constructor() {
|
|
5995
|
-
this.id =
|
|
5995
|
+
this.id = Q(), this.stateCallbacks = [], this.prevCommands = [], this.nextCommands = [];
|
|
5996
5996
|
}
|
|
5997
5997
|
registerStateCallback(t) {
|
|
5998
5998
|
this.stateCallbacks.push(t);
|
|
@@ -6120,7 +6120,7 @@ function Ma(n) {
|
|
|
6120
6120
|
return r < o ? -1 : r > o ? 1 : 0;
|
|
6121
6121
|
});
|
|
6122
6122
|
}
|
|
6123
|
-
const
|
|
6123
|
+
const se = (n) => {
|
|
6124
6124
|
const t = n.variants;
|
|
6125
6125
|
if (t) {
|
|
6126
6126
|
if (t.length === 1)
|
|
@@ -6128,7 +6128,7 @@ const le = (n) => {
|
|
|
6128
6128
|
if (n.defaultVariant !== void 0)
|
|
6129
6129
|
return t.find((e) => e.id === n.defaultVariant);
|
|
6130
6130
|
}
|
|
6131
|
-
}, gt = /* @__PURE__ */ new Map(),
|
|
6131
|
+
}, gt = /* @__PURE__ */ new Map(), zt = /* @__PURE__ */ new Map(), Xe = /* @__PURE__ */ new Map(), ti = async (n, t) => {
|
|
6132
6132
|
if (!t) {
|
|
6133
6133
|
if (!n) throw new Error("No region or src supplied. Cannot construct frame!");
|
|
6134
6134
|
return ma(n);
|
|
@@ -6143,7 +6143,7 @@ const le = (n) => {
|
|
|
6143
6143
|
}, Mo = (n, t) => {
|
|
6144
6144
|
if (!t)
|
|
6145
6145
|
return;
|
|
6146
|
-
const e = t.variants?.find((a) => a.id === n.frameVariantId) ||
|
|
6146
|
+
const e = t.variants?.find((a) => a.id === n.frameVariantId) || se(t);
|
|
6147
6147
|
if (!e)
|
|
6148
6148
|
throw new Error(`No variant with ID: ${n.frameVariantId}`);
|
|
6149
6149
|
if (!e.asset)
|
|
@@ -6153,10 +6153,10 @@ const le = (n) => {
|
|
|
6153
6153
|
if (Xe.has(n))
|
|
6154
6154
|
return Xe.get(n);
|
|
6155
6155
|
const e = (async () => {
|
|
6156
|
-
if (
|
|
6157
|
-
return
|
|
6156
|
+
if (zt.has(n))
|
|
6157
|
+
return zt.get(n);
|
|
6158
6158
|
await new Promise((u) => setTimeout(u, 0));
|
|
6159
|
-
const i =
|
|
6159
|
+
const i = ut().parseFromString(n, "image/svg+xml"), r = i.querySelector("svg");
|
|
6160
6160
|
if (!r)
|
|
6161
6161
|
throw new Error("Malformed frame SVG: <svg> tag not found");
|
|
6162
6162
|
const o = r.getAttribute("viewBox");
|
|
@@ -6172,7 +6172,7 @@ const le = (n) => {
|
|
|
6172
6172
|
width: c,
|
|
6173
6173
|
height: l
|
|
6174
6174
|
};
|
|
6175
|
-
return
|
|
6175
|
+
return zt.set(u, h), h;
|
|
6176
6176
|
}
|
|
6177
6177
|
if (A) {
|
|
6178
6178
|
const u = A.getAttribute("d");
|
|
@@ -6183,7 +6183,7 @@ const le = (n) => {
|
|
|
6183
6183
|
width: c,
|
|
6184
6184
|
height: l
|
|
6185
6185
|
};
|
|
6186
|
-
return
|
|
6186
|
+
return zt.set(u, h), h;
|
|
6187
6187
|
}
|
|
6188
6188
|
throw new Error("Malformed frame SVG");
|
|
6189
6189
|
})();
|
|
@@ -6231,7 +6231,7 @@ const le = (n) => {
|
|
|
6231
6231
|
const t = await nt(n);
|
|
6232
6232
|
return ei(t);
|
|
6233
6233
|
}, Xa = (n) => n.endsWith("mm") ? Number(n.replace("mm", "")) * 3.7795275591 : n.endsWith("px") ? Number(n.replace("px", "")) : Number(n), ei = (n) => {
|
|
6234
|
-
const a =
|
|
6234
|
+
const a = ut().parseFromString(n, "image/svg+xml").querySelector("svg");
|
|
6235
6235
|
if (!a)
|
|
6236
6236
|
throw new Error("No svg tag found, this svg must be malformed!");
|
|
6237
6237
|
const i = a.getAttribute("viewBox"), r = a.getAttribute("width"), o = a.getAttribute("height"), s = o && r ? [0, 0, Xa(r), Xa(o)] : i?.split(" ").map((l) => Number(l));
|
|
@@ -6241,14 +6241,14 @@ const le = (n) => {
|
|
|
6241
6241
|
width: s[2],
|
|
6242
6242
|
height: s[3]
|
|
6243
6243
|
};
|
|
6244
|
-
},
|
|
6244
|
+
}, Ut = (n, t) => {
|
|
6245
6245
|
const e = n.layoutState.elements.filter((i) => i.layer === t), a = Math.max(...e.map((i) => i.layerIndex).filter((i) => i !== void 0));
|
|
6246
6246
|
return Math.max(a, 0) + 1;
|
|
6247
6247
|
}, ai = async (n) => new Promise((t) => {
|
|
6248
6248
|
nt(n).then((e) => {
|
|
6249
6249
|
t(e);
|
|
6250
6250
|
}).catch((e) => console.error(e));
|
|
6251
|
-
}), Ze = /* @__PURE__ */ new Map(),
|
|
6251
|
+
}), Ze = /* @__PURE__ */ new Map(), Zt = async (n) => {
|
|
6252
6252
|
if (Ze.has(n))
|
|
6253
6253
|
return Ze.get(n);
|
|
6254
6254
|
const t = async (i) => new Promise((r, o) => {
|
|
@@ -6263,16 +6263,16 @@ const le = (n) => {
|
|
|
6263
6263
|
o(s);
|
|
6264
6264
|
}
|
|
6265
6265
|
}), a = (async () => {
|
|
6266
|
-
const o =
|
|
6266
|
+
const o = ut().parseFromString(n, "image/svg+xml").firstElementChild;
|
|
6267
6267
|
if (!o)
|
|
6268
6268
|
throw new Error("Failed to read SVG");
|
|
6269
|
-
const l =
|
|
6269
|
+
const l = Bt().serializeToString(o), c = Ct(), d = c.getContext("2d"), A = await va.from(d, l, {
|
|
6270
6270
|
anonymousCrossOrigin: !0,
|
|
6271
6271
|
ignoreDimensions: !1,
|
|
6272
6272
|
createCanvas: Ct,
|
|
6273
|
-
createImage:
|
|
6273
|
+
createImage: ne,
|
|
6274
6274
|
DOMParser: Ba(),
|
|
6275
|
-
fetch:
|
|
6275
|
+
fetch: rt
|
|
6276
6276
|
}), u = o.getAttribute("width"), h = o.getAttribute("height"), g = 2048;
|
|
6277
6277
|
if (h && u) {
|
|
6278
6278
|
const m = parseFloat(h), f = parseFloat(u) / m;
|
|
@@ -6282,7 +6282,7 @@ const le = (n) => {
|
|
|
6282
6282
|
return await A.render(), await t(c);
|
|
6283
6283
|
})();
|
|
6284
6284
|
return Ze.set(n, a), a;
|
|
6285
|
-
},
|
|
6285
|
+
}, Lt = async (n, t, e, a) => {
|
|
6286
6286
|
const i = n.layoutState.layout.useEditableArea && n.layoutState.layout.editableArea || {
|
|
6287
6287
|
width: n.layoutState.layout.width,
|
|
6288
6288
|
height: n.layoutState.layout.height,
|
|
@@ -6297,7 +6297,7 @@ const le = (n) => {
|
|
|
6297
6297
|
panelId: n.layoutState.layout.panelId
|
|
6298
6298
|
};
|
|
6299
6299
|
if (e && t === D.Illustration) {
|
|
6300
|
-
const l = await
|
|
6300
|
+
const l = await ct(await ai(e)), u = ut().parseFromString(l.svg, "image/svg+xml").firstElementChild.getAttribute("viewBox");
|
|
6301
6301
|
if (!u) throw new Error("SVG missing viewBox.");
|
|
6302
6302
|
const h = s.height, g = u.split(" "), m = parseFloat(g[2]) || 1, p = parseFloat(g[3]) || 1, f = m / p;
|
|
6303
6303
|
s.height = s.width / f, s.top += (h - s.height) / 2;
|
|
@@ -6307,7 +6307,7 @@ const le = (n) => {
|
|
|
6307
6307
|
s.height = s.width / A, s.top += (l - s.height) / 2;
|
|
6308
6308
|
}
|
|
6309
6309
|
if (e && t === D.Textbox && a?.text && a?.fontScale) {
|
|
6310
|
-
await
|
|
6310
|
+
await Nt(e);
|
|
6311
6311
|
const l = yt(e), c = pt(a.text, a?.fontScale, l);
|
|
6312
6312
|
s.width = Math.min(c, i.width * 0.85), s.left = i.x + i.width / 2 - s.width / 2;
|
|
6313
6313
|
}
|
|
@@ -6315,15 +6315,15 @@ const le = (n) => {
|
|
|
6315
6315
|
};
|
|
6316
6316
|
class Ed {
|
|
6317
6317
|
static async getFrame(t, e) {
|
|
6318
|
-
const a = await ti(e.region, e.src), i = await ze(a), r = e.region || await
|
|
6318
|
+
const a = await ti(e.region, e.src), i = await ze(a), r = e.region || await Lt(t, D.Frame);
|
|
6319
6319
|
return {
|
|
6320
|
-
id:
|
|
6320
|
+
id: Q(),
|
|
6321
6321
|
x: r.left,
|
|
6322
6322
|
y: r.top,
|
|
6323
6323
|
width: r.width,
|
|
6324
6324
|
height: r.height,
|
|
6325
6325
|
layer: r.layer || 0,
|
|
6326
|
-
layerIndex: r.layerIndex ||
|
|
6326
|
+
layerIndex: r.layerIndex || Ut(t, r.layer || 0),
|
|
6327
6327
|
rotation: r.rotation,
|
|
6328
6328
|
scaleX: r.width / i.width,
|
|
6329
6329
|
scaleY: r.height / i.height,
|
|
@@ -6341,9 +6341,9 @@ class Ed {
|
|
|
6341
6341
|
};
|
|
6342
6342
|
}
|
|
6343
6343
|
static async getImage(t, e) {
|
|
6344
|
-
const a = e.region || await
|
|
6344
|
+
const a = e.region || await Lt(t, D.Image, e.src);
|
|
6345
6345
|
return {
|
|
6346
|
-
id:
|
|
6346
|
+
id: Q(),
|
|
6347
6347
|
src: e.src,
|
|
6348
6348
|
type: D.Image,
|
|
6349
6349
|
y: a.top,
|
|
@@ -6352,24 +6352,24 @@ class Ed {
|
|
|
6352
6352
|
width: a.width,
|
|
6353
6353
|
height: a.height,
|
|
6354
6354
|
layer: a.layer || 0,
|
|
6355
|
-
layerIndex: a.layerIndex ||
|
|
6355
|
+
layerIndex: a.layerIndex || Ut(t, a.layer || 0),
|
|
6356
6356
|
immutable: a.immutable,
|
|
6357
6357
|
preserveAspectRatio: "none"
|
|
6358
6358
|
};
|
|
6359
6359
|
}
|
|
6360
6360
|
static async getTextbox(t, e) {
|
|
6361
|
-
const { configuration: a, fontSrc: i, designInputStep: r } = e, o = await
|
|
6361
|
+
const { configuration: a, fontSrc: i, designInputStep: r } = e, o = await Nt(i), s = {
|
|
6362
6362
|
assetUrl: i,
|
|
6363
6363
|
name: o.names.fullName.en
|
|
6364
6364
|
}, l = r?.text || a.defaultText || "", c = a.replaceableText ? a.replaceableText.replace("{{}}", l) : l, d = ke(c, {
|
|
6365
6365
|
vertical: a.vertical,
|
|
6366
6366
|
uppercase: a.uppercase
|
|
6367
|
-
}), A = e.region || await
|
|
6367
|
+
}), A = e.region || await Lt(t, D.Textbox, i, {
|
|
6368
6368
|
text: d,
|
|
6369
6369
|
fontScale: a.size ? a.size / o.unitsPerEm : void 0
|
|
6370
|
-
}), u =
|
|
6370
|
+
}), u = oe(
|
|
6371
6371
|
{
|
|
6372
|
-
id:
|
|
6372
|
+
id: Q(),
|
|
6373
6373
|
type: D.Textbox,
|
|
6374
6374
|
x: A.left,
|
|
6375
6375
|
y: A.top,
|
|
@@ -6380,12 +6380,12 @@ class Ed {
|
|
|
6380
6380
|
fill: r?.color || a.colour || "#000000",
|
|
6381
6381
|
fontData: s,
|
|
6382
6382
|
layer: A.layer || 0,
|
|
6383
|
-
layerIndex: A.layerIndex ||
|
|
6383
|
+
layerIndex: A.layerIndex || Ut(t, A.layer || 0),
|
|
6384
6384
|
paths: a.paths,
|
|
6385
6385
|
rotation: A.rotation,
|
|
6386
6386
|
vertical: a.vertical,
|
|
6387
6387
|
verticalAlign: a.verticalAlign || "middle",
|
|
6388
|
-
algorithm:
|
|
6388
|
+
algorithm: Mt.Traditional,
|
|
6389
6389
|
fontSize: a.size || Math.max(Math.round(A.height * 0.025), 1),
|
|
6390
6390
|
text: d,
|
|
6391
6391
|
input: l
|
|
@@ -6430,7 +6430,7 @@ class Ed {
|
|
|
6430
6430
|
</svg>
|
|
6431
6431
|
`, i = {};
|
|
6432
6432
|
i["spiff-fill-shape"] = { browserValue: e.color };
|
|
6433
|
-
const r = e.region?.item || await
|
|
6433
|
+
const r = e.region?.item || await Lt(t, D.Illustration), o = Q();
|
|
6434
6434
|
return {
|
|
6435
6435
|
stepRegion: e.region?.item,
|
|
6436
6436
|
stepRegionIndex: e.region?.index,
|
|
@@ -6444,12 +6444,12 @@ class Ed {
|
|
|
6444
6444
|
width: r.width,
|
|
6445
6445
|
height: r.height,
|
|
6446
6446
|
layer: r.layer || 0,
|
|
6447
|
-
layerIndex: r.layerIndex ||
|
|
6447
|
+
layerIndex: r.layerIndex || Ut(t, r.layer || 0),
|
|
6448
6448
|
immutable: r.immutable
|
|
6449
6449
|
};
|
|
6450
6450
|
}
|
|
6451
6451
|
static async getIllustration(t, e) {
|
|
6452
|
-
const a = e.region?.item || await
|
|
6452
|
+
const a = e.region?.item || await Lt(t, D.Illustration, e.src), i = await ct(await ai(e.src)), r = await Zt(i.svg), o = Q();
|
|
6453
6453
|
return {
|
|
6454
6454
|
cachedObjectURL: r,
|
|
6455
6455
|
stepRegion: e.region?.item,
|
|
@@ -6465,27 +6465,27 @@ class Ed {
|
|
|
6465
6465
|
width: a.width,
|
|
6466
6466
|
height: a.height,
|
|
6467
6467
|
layer: a.layer || 0,
|
|
6468
|
-
layerIndex: a.layerIndex ||
|
|
6468
|
+
layerIndex: a.layerIndex || Ut(t, a.layer || 0),
|
|
6469
6469
|
immutable: a.immutable
|
|
6470
6470
|
};
|
|
6471
6471
|
}
|
|
6472
6472
|
}
|
|
6473
|
-
class
|
|
6473
|
+
class G extends Error {
|
|
6474
6474
|
constructor() {
|
|
6475
|
-
super("Element not found!"), Object.setPrototypeOf(this,
|
|
6475
|
+
super("Element not found!"), Object.setPrototypeOf(this, G.prototype);
|
|
6476
6476
|
}
|
|
6477
6477
|
}
|
|
6478
|
-
const
|
|
6478
|
+
const L = (n, t) => X(n, t).elements.find((i) => i.id === n), X = (n, t) => {
|
|
6479
6479
|
const e = Object.values(t).find((a) => a.elements.some((i) => i.id === n));
|
|
6480
6480
|
if (!e)
|
|
6481
|
-
throw new
|
|
6481
|
+
throw new G();
|
|
6482
6482
|
return e;
|
|
6483
|
-
},
|
|
6483
|
+
}, Z = (n, t) => {
|
|
6484
6484
|
const e = [...t.elements.filter((i) => i.id !== n.id), n], a = Ma(e);
|
|
6485
6485
|
return {
|
|
6486
6486
|
layout: t.layout,
|
|
6487
6487
|
elements: a,
|
|
6488
|
-
modificationID:
|
|
6488
|
+
modificationID: Q()
|
|
6489
6489
|
};
|
|
6490
6490
|
}, Za = async (n) => {
|
|
6491
6491
|
const t = [...Object.keys(n.layouts)], e = [...new Set(t)];
|
|
@@ -6496,7 +6496,7 @@ const z = (n, t) => Z(n, t).elements.find((i) => i.id === n), Z = (n, t) => {
|
|
|
6496
6496
|
if (o.type === "illustration") {
|
|
6497
6497
|
const s = o;
|
|
6498
6498
|
if (s.src && !s.svg) {
|
|
6499
|
-
const l = await nt(s.src), c = await
|
|
6499
|
+
const l = await nt(s.src), c = await ct(l);
|
|
6500
6500
|
s.svg = xa(
|
|
6501
6501
|
c.svg,
|
|
6502
6502
|
s.width,
|
|
@@ -6507,7 +6507,7 @@ const z = (n, t) => Z(n, t).elements.find((i) => i.id === n), Z = (n, t) => {
|
|
|
6507
6507
|
} else if (o.type === "frame") {
|
|
6508
6508
|
const s = o;
|
|
6509
6509
|
if (s.pattern?.colors && s.pattern?.src) {
|
|
6510
|
-
const l = await nt(s.pattern?.src), c = await
|
|
6510
|
+
const l = await nt(s.pattern?.src), c = await ct(l);
|
|
6511
6511
|
s.pattern.svg = c.svg;
|
|
6512
6512
|
}
|
|
6513
6513
|
}
|
|
@@ -6523,7 +6523,7 @@ const z = (n, t) => Z(n, t).elements.find((i) => i.id === n), Z = (n, t) => {
|
|
|
6523
6523
|
const s = i[o];
|
|
6524
6524
|
if (s.src && s.svg)
|
|
6525
6525
|
try {
|
|
6526
|
-
s.cachedObjectURL = await
|
|
6526
|
+
s.cachedObjectURL = await Zt(s.svg);
|
|
6527
6527
|
} catch (l) {
|
|
6528
6528
|
console.log(l);
|
|
6529
6529
|
}
|
|
@@ -6533,11 +6533,11 @@ const z = (n, t) => Z(n, t).elements.find((i) => i.id === n), Z = (n, t) => {
|
|
|
6533
6533
|
);
|
|
6534
6534
|
for (let o = 0; o < r.length; ++o) {
|
|
6535
6535
|
const s = r[o];
|
|
6536
|
-
s.fontData?.assetUrl && await
|
|
6536
|
+
s.fontData?.assetUrl && await Nt(s.fontData.assetUrl);
|
|
6537
6537
|
}
|
|
6538
6538
|
}
|
|
6539
6539
|
};
|
|
6540
|
-
class
|
|
6540
|
+
class O {
|
|
6541
6541
|
undo() {
|
|
6542
6542
|
if (!this.oldState)
|
|
6543
6543
|
throw new Error("Cannot undo.");
|
|
@@ -6547,7 +6547,7 @@ class $ {
|
|
|
6547
6547
|
this.oldState = t;
|
|
6548
6548
|
}
|
|
6549
6549
|
}
|
|
6550
|
-
class tn extends
|
|
6550
|
+
class tn extends O {
|
|
6551
6551
|
constructor(t) {
|
|
6552
6552
|
super(), this.serializableWorkflow = t;
|
|
6553
6553
|
}
|
|
@@ -6558,20 +6558,20 @@ class tn extends $ {
|
|
|
6558
6558
|
};
|
|
6559
6559
|
}
|
|
6560
6560
|
}
|
|
6561
|
-
class bd extends
|
|
6561
|
+
class bd extends O {
|
|
6562
6562
|
constructor(t, e, a) {
|
|
6563
6563
|
super(), this.id = t, this.x = e, this.y = a;
|
|
6564
6564
|
}
|
|
6565
6565
|
apply(t) {
|
|
6566
6566
|
this.oldState = t;
|
|
6567
|
-
const e =
|
|
6567
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6568
6568
|
if (!e.id)
|
|
6569
|
-
throw new
|
|
6569
|
+
throw new G();
|
|
6570
6570
|
const a = {
|
|
6571
6571
|
...e,
|
|
6572
6572
|
x: this.x,
|
|
6573
6573
|
y: this.y
|
|
6574
|
-
}, i =
|
|
6574
|
+
}, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6575
6575
|
return {
|
|
6576
6576
|
...t,
|
|
6577
6577
|
layouts: {
|
|
@@ -6581,19 +6581,19 @@ class bd extends $ {
|
|
|
6581
6581
|
};
|
|
6582
6582
|
}
|
|
6583
6583
|
}
|
|
6584
|
-
class Id extends
|
|
6584
|
+
class Id extends O {
|
|
6585
6585
|
constructor(t, e) {
|
|
6586
6586
|
super(), this.id = t, this.angle = e;
|
|
6587
6587
|
}
|
|
6588
6588
|
apply(t) {
|
|
6589
6589
|
this.oldState = t;
|
|
6590
|
-
const e =
|
|
6590
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6591
6591
|
if (!e.id)
|
|
6592
|
-
throw new
|
|
6592
|
+
throw new G();
|
|
6593
6593
|
const a = {
|
|
6594
6594
|
...e,
|
|
6595
6595
|
rotation: this.angle
|
|
6596
|
-
}, i =
|
|
6596
|
+
}, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6597
6597
|
return {
|
|
6598
6598
|
...t,
|
|
6599
6599
|
layouts: {
|
|
@@ -6603,15 +6603,15 @@ class Id extends $ {
|
|
|
6603
6603
|
};
|
|
6604
6604
|
}
|
|
6605
6605
|
}
|
|
6606
|
-
class Bd extends
|
|
6606
|
+
class Bd extends O {
|
|
6607
6607
|
constructor(t, e, a) {
|
|
6608
6608
|
super(), this.id = t, this.width = Math.abs(e), this.height = Math.abs(a);
|
|
6609
6609
|
}
|
|
6610
6610
|
apply(t) {
|
|
6611
6611
|
this.oldState = t;
|
|
6612
|
-
const e =
|
|
6612
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6613
6613
|
if (!e.id)
|
|
6614
|
-
throw new
|
|
6614
|
+
throw new G();
|
|
6615
6615
|
let a = {
|
|
6616
6616
|
...e,
|
|
6617
6617
|
width: this.width,
|
|
@@ -6621,10 +6621,10 @@ class Bd extends $ {
|
|
|
6621
6621
|
const o = a;
|
|
6622
6622
|
o.scaleX = o.scaleX * this.width / e.width, o.scaleY = o.scaleY * this.height / e.height;
|
|
6623
6623
|
} else if (e.type === "textbox") {
|
|
6624
|
-
const o = a, s = (!o.algorithm || o.algorithm ===
|
|
6625
|
-
a =
|
|
6624
|
+
const o = a, s = (!o.algorithm || o.algorithm === Mt.Autosize ? o.text : o.input) ?? "";
|
|
6625
|
+
a = oe(o, s, e);
|
|
6626
6626
|
}
|
|
6627
|
-
const i =
|
|
6627
|
+
const i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6628
6628
|
return {
|
|
6629
6629
|
...t,
|
|
6630
6630
|
layouts: {
|
|
@@ -6634,7 +6634,7 @@ class Bd extends $ {
|
|
|
6634
6634
|
};
|
|
6635
6635
|
}
|
|
6636
6636
|
}
|
|
6637
|
-
class
|
|
6637
|
+
class $ extends O {
|
|
6638
6638
|
constructor(t) {
|
|
6639
6639
|
super(), this.commands = t;
|
|
6640
6640
|
}
|
|
@@ -6642,7 +6642,7 @@ class L extends $ {
|
|
|
6642
6642
|
return this.oldState = t, this.commands.reduce((e, a) => a.apply(e), t);
|
|
6643
6643
|
}
|
|
6644
6644
|
}
|
|
6645
|
-
class ni extends
|
|
6645
|
+
class ni extends O {
|
|
6646
6646
|
constructor(t) {
|
|
6647
6647
|
super(), this.layout = t;
|
|
6648
6648
|
}
|
|
@@ -6654,13 +6654,13 @@ class ni extends $ {
|
|
|
6654
6654
|
[this.layout.id]: {
|
|
6655
6655
|
elements: [],
|
|
6656
6656
|
layout: { ...this.layout },
|
|
6657
|
-
modificationID:
|
|
6657
|
+
modificationID: Q()
|
|
6658
6658
|
}
|
|
6659
6659
|
}
|
|
6660
6660
|
};
|
|
6661
6661
|
}
|
|
6662
6662
|
}
|
|
6663
|
-
class
|
|
6663
|
+
class q extends O {
|
|
6664
6664
|
/**
|
|
6665
6665
|
* @param initialParams The initial parameters to be set on this new object
|
|
6666
6666
|
* @param callback An optional callback function to be notified when the object has been instantiated
|
|
@@ -6685,7 +6685,7 @@ class H extends $ {
|
|
|
6685
6685
|
[this.layout.id]: {
|
|
6686
6686
|
...t.layouts[this.layout.id],
|
|
6687
6687
|
elements: s,
|
|
6688
|
-
modificationID:
|
|
6688
|
+
modificationID: Q()
|
|
6689
6689
|
}
|
|
6690
6690
|
}
|
|
6691
6691
|
};
|
|
@@ -6706,7 +6706,7 @@ class H extends $ {
|
|
|
6706
6706
|
[this.layout.id]: {
|
|
6707
6707
|
...t.layouts[this.layout.id],
|
|
6708
6708
|
elements: o,
|
|
6709
|
-
modificationID:
|
|
6709
|
+
modificationID: Q()
|
|
6710
6710
|
}
|
|
6711
6711
|
}
|
|
6712
6712
|
};
|
|
@@ -6719,7 +6719,7 @@ class H extends $ {
|
|
|
6719
6719
|
return a !== void 0 ? a + 1 : 0;
|
|
6720
6720
|
}
|
|
6721
6721
|
}
|
|
6722
|
-
class
|
|
6722
|
+
class Qt extends O {
|
|
6723
6723
|
constructor(t) {
|
|
6724
6724
|
super(), this.id = t;
|
|
6725
6725
|
}
|
|
@@ -6729,7 +6729,7 @@ class Rt extends $ {
|
|
|
6729
6729
|
const a = Object.values(t.layouts).map((r) => (r.elements.filter((s) => s.id !== this.id).length !== r.elements.length && (e = !0), {
|
|
6730
6730
|
...r,
|
|
6731
6731
|
elements: r.elements.filter((s) => s.id !== this.id),
|
|
6732
|
-
modificationID:
|
|
6732
|
+
modificationID: Q()
|
|
6733
6733
|
}));
|
|
6734
6734
|
e || console.log(`Failed to delete element ${this.id}`);
|
|
6735
6735
|
const i = {};
|
|
@@ -6741,21 +6741,21 @@ class Rt extends $ {
|
|
|
6741
6741
|
};
|
|
6742
6742
|
}
|
|
6743
6743
|
}
|
|
6744
|
-
class To extends
|
|
6744
|
+
class To extends O {
|
|
6745
6745
|
constructor(t, e, a) {
|
|
6746
6746
|
super(), this.id = t, this.color = e, this.textFillSpotColor = a;
|
|
6747
6747
|
}
|
|
6748
6748
|
apply(t) {
|
|
6749
6749
|
this.oldState = t;
|
|
6750
|
-
const e =
|
|
6750
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6751
6751
|
if (!e.id)
|
|
6752
|
-
throw new
|
|
6752
|
+
throw new G();
|
|
6753
6753
|
const a = {
|
|
6754
6754
|
...e,
|
|
6755
6755
|
fill: this.color,
|
|
6756
6756
|
fillSpotColorDefinition: this.textFillSpotColor,
|
|
6757
6757
|
textFillImage: void 0
|
|
6758
|
-
}, i =
|
|
6758
|
+
}, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6759
6759
|
return {
|
|
6760
6760
|
...t,
|
|
6761
6761
|
layouts: {
|
|
@@ -6765,19 +6765,19 @@ class To extends $ {
|
|
|
6765
6765
|
};
|
|
6766
6766
|
}
|
|
6767
6767
|
}
|
|
6768
|
-
class ta extends
|
|
6768
|
+
class ta extends O {
|
|
6769
6769
|
constructor(t, e) {
|
|
6770
6770
|
super(), this.id = t, this.imageFill = e;
|
|
6771
6771
|
}
|
|
6772
6772
|
apply(t) {
|
|
6773
6773
|
this.oldState = t;
|
|
6774
|
-
const e =
|
|
6774
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6775
6775
|
if (!e.id)
|
|
6776
|
-
throw new
|
|
6776
|
+
throw new G();
|
|
6777
6777
|
const a = {
|
|
6778
6778
|
...e,
|
|
6779
6779
|
textFillImage: this.imageFill
|
|
6780
|
-
}, i =
|
|
6780
|
+
}, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6781
6781
|
return {
|
|
6782
6782
|
...t,
|
|
6783
6783
|
layouts: {
|
|
@@ -6787,19 +6787,19 @@ class ta extends $ {
|
|
|
6787
6787
|
};
|
|
6788
6788
|
}
|
|
6789
6789
|
}
|
|
6790
|
-
class No extends
|
|
6790
|
+
class No extends O {
|
|
6791
6791
|
constructor(t, e) {
|
|
6792
6792
|
super(), this.id = t, this.size = e;
|
|
6793
6793
|
}
|
|
6794
6794
|
apply(t) {
|
|
6795
6795
|
this.oldState = t;
|
|
6796
|
-
const e =
|
|
6796
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6797
6797
|
if (!e.id)
|
|
6798
|
-
throw new
|
|
6798
|
+
throw new G();
|
|
6799
6799
|
const a = {
|
|
6800
6800
|
...e,
|
|
6801
6801
|
fontSize: this.size
|
|
6802
|
-
}, i =
|
|
6802
|
+
}, i = X(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === Mt.Autosize ? e.text : e.input) ?? "", o = Z(oe(a, r), i);
|
|
6803
6803
|
return {
|
|
6804
6804
|
...t,
|
|
6805
6805
|
layouts: {
|
|
@@ -6809,19 +6809,19 @@ class No extends $ {
|
|
|
6809
6809
|
};
|
|
6810
6810
|
}
|
|
6811
6811
|
}
|
|
6812
|
-
class en extends
|
|
6812
|
+
class en extends O {
|
|
6813
6813
|
constructor(t, e) {
|
|
6814
6814
|
super(), this.id = t, this.fontData = e;
|
|
6815
6815
|
}
|
|
6816
6816
|
apply(t) {
|
|
6817
6817
|
this.oldState = t;
|
|
6818
|
-
const e =
|
|
6818
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6819
6819
|
if (!e.id)
|
|
6820
|
-
throw new
|
|
6820
|
+
throw new G();
|
|
6821
6821
|
const a = {
|
|
6822
6822
|
...e,
|
|
6823
6823
|
fontData: this.fontData
|
|
6824
|
-
}, i =
|
|
6824
|
+
}, i = X(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === Mt.Autosize ? e.text : e.input) ?? "", o = Z(oe(a, r), i);
|
|
6825
6825
|
return {
|
|
6826
6826
|
...t,
|
|
6827
6827
|
layouts: {
|
|
@@ -6831,19 +6831,19 @@ class en extends $ {
|
|
|
6831
6831
|
};
|
|
6832
6832
|
}
|
|
6833
6833
|
}
|
|
6834
|
-
class Qo extends
|
|
6834
|
+
class Qo extends O {
|
|
6835
6835
|
constructor(t, e) {
|
|
6836
6836
|
super(), this.id = t, this.align = e;
|
|
6837
6837
|
}
|
|
6838
6838
|
apply(t) {
|
|
6839
6839
|
this.oldState = t;
|
|
6840
|
-
const e =
|
|
6840
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6841
6841
|
if (!e.id)
|
|
6842
|
-
throw new
|
|
6842
|
+
throw new G();
|
|
6843
6843
|
const a = {
|
|
6844
6844
|
...e,
|
|
6845
6845
|
align: this.align
|
|
6846
|
-
}, i =
|
|
6846
|
+
}, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6847
6847
|
return {
|
|
6848
6848
|
...t,
|
|
6849
6849
|
layouts: {
|
|
@@ -6853,13 +6853,13 @@ class Qo extends $ {
|
|
|
6853
6853
|
};
|
|
6854
6854
|
}
|
|
6855
6855
|
}
|
|
6856
|
-
class Ro extends
|
|
6856
|
+
class Ro extends O {
|
|
6857
6857
|
constructor(t, e, a) {
|
|
6858
6858
|
super(), this.id = t, this.imageData = e, this.offsets = a;
|
|
6859
6859
|
}
|
|
6860
6860
|
apply(t) {
|
|
6861
6861
|
this.oldState = t;
|
|
6862
|
-
const e =
|
|
6862
|
+
const e = X(this.id, Object.values(t.layouts)), a = e.elements.findIndex((s) => s.id === this.id), i = e.elements[a].pattern, r = [...e.elements];
|
|
6863
6863
|
r.splice(a, 1, {
|
|
6864
6864
|
...e.elements[a],
|
|
6865
6865
|
pattern: {
|
|
@@ -6878,7 +6878,7 @@ class Ro extends $ {
|
|
|
6878
6878
|
const o = {
|
|
6879
6879
|
...e,
|
|
6880
6880
|
elements: r,
|
|
6881
|
-
modificationID:
|
|
6881
|
+
modificationID: Q()
|
|
6882
6882
|
};
|
|
6883
6883
|
return {
|
|
6884
6884
|
...t,
|
|
@@ -6889,22 +6889,22 @@ class Ro extends $ {
|
|
|
6889
6889
|
};
|
|
6890
6890
|
}
|
|
6891
6891
|
}
|
|
6892
|
-
class Oo extends
|
|
6892
|
+
class Oo extends O {
|
|
6893
6893
|
constructor(t, e, a, i, r) {
|
|
6894
6894
|
super(), this.id = t, this.useThreshold = e, this.invertThreshold = a, this.threshold = i, this.thresholdSaturation = r;
|
|
6895
6895
|
}
|
|
6896
6896
|
apply(t) {
|
|
6897
6897
|
this.oldState = t;
|
|
6898
|
-
const e =
|
|
6898
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6899
6899
|
if (!e.id)
|
|
6900
|
-
throw new
|
|
6900
|
+
throw new G();
|
|
6901
6901
|
const a = {
|
|
6902
6902
|
...e,
|
|
6903
6903
|
useThreshold: this.useThreshold,
|
|
6904
6904
|
invertThreshold: this.invertThreshold,
|
|
6905
6905
|
threshold: this.threshold,
|
|
6906
6906
|
thresholdSaturation: this.thresholdSaturation
|
|
6907
|
-
}, i =
|
|
6907
|
+
}, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6908
6908
|
return {
|
|
6909
6909
|
...t,
|
|
6910
6910
|
layouts: {
|
|
@@ -6914,19 +6914,19 @@ class Oo extends $ {
|
|
|
6914
6914
|
};
|
|
6915
6915
|
}
|
|
6916
6916
|
}
|
|
6917
|
-
class Pd extends
|
|
6917
|
+
class Pd extends O {
|
|
6918
6918
|
constructor(t, e) {
|
|
6919
6919
|
super(), this.id = t, this.src = e;
|
|
6920
6920
|
}
|
|
6921
6921
|
apply(t) {
|
|
6922
6922
|
this.oldState = t;
|
|
6923
|
-
const e =
|
|
6923
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6924
6924
|
if (!e.id)
|
|
6925
|
-
throw new
|
|
6925
|
+
throw new G();
|
|
6926
6926
|
const a = {
|
|
6927
6927
|
...e,
|
|
6928
6928
|
src: this.src
|
|
6929
|
-
}, i =
|
|
6929
|
+
}, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6930
6930
|
return {
|
|
6931
6931
|
...t,
|
|
6932
6932
|
layouts: {
|
|
@@ -6936,16 +6936,16 @@ class Pd extends $ {
|
|
|
6936
6936
|
};
|
|
6937
6937
|
}
|
|
6938
6938
|
}
|
|
6939
|
-
class $o extends
|
|
6939
|
+
class $o extends O {
|
|
6940
6940
|
constructor(t, e) {
|
|
6941
6941
|
super(), this.id = t, this.text = e;
|
|
6942
6942
|
}
|
|
6943
6943
|
apply(t) {
|
|
6944
6944
|
this.oldState = t;
|
|
6945
|
-
const e =
|
|
6945
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6946
6946
|
if (!e.id)
|
|
6947
|
-
throw new
|
|
6948
|
-
const a =
|
|
6947
|
+
throw new G();
|
|
6948
|
+
const a = X(e.id, Object.values(t.layouts)), i = Z(oe(e, this.text, e), a);
|
|
6949
6949
|
return {
|
|
6950
6950
|
...t,
|
|
6951
6951
|
layouts: {
|
|
@@ -6955,20 +6955,20 @@ class $o extends $ {
|
|
|
6955
6955
|
};
|
|
6956
6956
|
}
|
|
6957
6957
|
}
|
|
6958
|
-
class ea extends
|
|
6958
|
+
class ea extends O {
|
|
6959
6959
|
constructor(t, e, a) {
|
|
6960
6960
|
super(), this.id = t, this.strokeColor = e, this.strokeThickness = a;
|
|
6961
6961
|
}
|
|
6962
6962
|
apply(t) {
|
|
6963
6963
|
this.oldState = t;
|
|
6964
|
-
const e =
|
|
6964
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6965
6965
|
if (!e.id)
|
|
6966
|
-
throw new
|
|
6966
|
+
throw new G();
|
|
6967
6967
|
const a = {
|
|
6968
6968
|
...e,
|
|
6969
6969
|
strokeColor: this.strokeColor,
|
|
6970
6970
|
strokeThickness: this.strokeThickness
|
|
6971
|
-
}, i =
|
|
6971
|
+
}, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6972
6972
|
return {
|
|
6973
6973
|
...t,
|
|
6974
6974
|
layouts: {
|
|
@@ -6978,15 +6978,15 @@ class ea extends $ {
|
|
|
6978
6978
|
};
|
|
6979
6979
|
}
|
|
6980
6980
|
}
|
|
6981
|
-
class fa extends
|
|
6981
|
+
class fa extends O {
|
|
6982
6982
|
constructor(t, e, a) {
|
|
6983
6983
|
super(), this.id = t, this.className = e, this.fill = a;
|
|
6984
6984
|
}
|
|
6985
6985
|
apply(t) {
|
|
6986
6986
|
this.oldState = t;
|
|
6987
|
-
const e =
|
|
6987
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
6988
6988
|
if (!e.id)
|
|
6989
|
-
throw new
|
|
6989
|
+
throw new G();
|
|
6990
6990
|
const a = e.colors || {}, i = a[this.className];
|
|
6991
6991
|
typeof this.fill == "string" ? a[this.className] = {
|
|
6992
6992
|
browserValue: this.fill,
|
|
@@ -7000,7 +7000,7 @@ class fa extends $ {
|
|
|
7000
7000
|
const r = {
|
|
7001
7001
|
...e,
|
|
7002
7002
|
colors: a
|
|
7003
|
-
}, o =
|
|
7003
|
+
}, o = X(e.id, Object.values(t.layouts)), s = Z(r, o);
|
|
7004
7004
|
return {
|
|
7005
7005
|
...t,
|
|
7006
7006
|
layouts: {
|
|
@@ -7010,20 +7010,20 @@ class fa extends $ {
|
|
|
7010
7010
|
};
|
|
7011
7011
|
}
|
|
7012
7012
|
}
|
|
7013
|
-
class Uo extends
|
|
7013
|
+
class Uo extends O {
|
|
7014
7014
|
constructor(t, e, a) {
|
|
7015
7015
|
super(), this.id = t, this.svgBody = e, this.objectURL = 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 G();
|
|
7022
7022
|
const a = {
|
|
7023
7023
|
...e,
|
|
7024
7024
|
svg: this.svgBody,
|
|
7025
7025
|
cachedObjectURL: this.objectURL
|
|
7026
|
-
}, i =
|
|
7026
|
+
}, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
7027
7027
|
return {
|
|
7028
7028
|
...t,
|
|
7029
7029
|
layouts: {
|
|
@@ -7033,7 +7033,7 @@ class Uo extends $ {
|
|
|
7033
7033
|
};
|
|
7034
7034
|
}
|
|
7035
7035
|
}
|
|
7036
|
-
class xd extends
|
|
7036
|
+
class xd extends O {
|
|
7037
7037
|
/**
|
|
7038
7038
|
* @param id The targeted element to bring to the front.
|
|
7039
7039
|
*/
|
|
@@ -7041,8 +7041,8 @@ class xd extends $ {
|
|
|
7041
7041
|
super(), this.id = t;
|
|
7042
7042
|
}
|
|
7043
7043
|
apply(t) {
|
|
7044
|
-
if (this.oldState = t, !
|
|
7045
|
-
throw new
|
|
7044
|
+
if (this.oldState = t, !L(this.id, Object.values(t.layouts)).id)
|
|
7045
|
+
throw new G();
|
|
7046
7046
|
const a = Object.values(t.layouts).find((o) => o.elements.find((s) => s.id === this.id));
|
|
7047
7047
|
if (!a)
|
|
7048
7048
|
throw new Error("Layout missing from state!");
|
|
@@ -7056,13 +7056,13 @@ class xd extends $ {
|
|
|
7056
7056
|
[a.layout.id]: {
|
|
7057
7057
|
...t.layouts[a.layout.id],
|
|
7058
7058
|
elements: r,
|
|
7059
|
-
modificationID:
|
|
7059
|
+
modificationID: Q()
|
|
7060
7060
|
}
|
|
7061
7061
|
}
|
|
7062
7062
|
};
|
|
7063
7063
|
}
|
|
7064
7064
|
}
|
|
7065
|
-
class Dd extends
|
|
7065
|
+
class Dd extends O {
|
|
7066
7066
|
/**
|
|
7067
7067
|
* @param id The targeted element to bring to the back.
|
|
7068
7068
|
*/
|
|
@@ -7071,9 +7071,9 @@ class Dd extends $ {
|
|
|
7071
7071
|
}
|
|
7072
7072
|
apply(t) {
|
|
7073
7073
|
this.oldState = t;
|
|
7074
|
-
const e =
|
|
7074
|
+
const e = L(this.id, Object.values(t.layouts));
|
|
7075
7075
|
if (!e.id)
|
|
7076
|
-
throw new
|
|
7076
|
+
throw new G();
|
|
7077
7077
|
const a = Object.values(t.layouts).find((s) => s.elements.find((l) => l.id === this.id));
|
|
7078
7078
|
if (!a)
|
|
7079
7079
|
throw new Error("Layout missing from state!");
|
|
@@ -7087,13 +7087,13 @@ class Dd extends $ {
|
|
|
7087
7087
|
[a.layout.id]: {
|
|
7088
7088
|
...t.layouts[a.layout.id],
|
|
7089
7089
|
elements: r,
|
|
7090
|
-
modificationID:
|
|
7090
|
+
modificationID: Q()
|
|
7091
7091
|
}
|
|
7092
7092
|
}
|
|
7093
7093
|
};
|
|
7094
7094
|
}
|
|
7095
7095
|
}
|
|
7096
|
-
class Fd extends
|
|
7096
|
+
class Fd extends O {
|
|
7097
7097
|
/**
|
|
7098
7098
|
* @param id The targeted element to bring to the front.
|
|
7099
7099
|
*/
|
|
@@ -7101,8 +7101,8 @@ class Fd extends $ {
|
|
|
7101
7101
|
super(), this.id = t;
|
|
7102
7102
|
}
|
|
7103
7103
|
apply(t) {
|
|
7104
|
-
if (this.oldState = t, !
|
|
7105
|
-
throw new
|
|
7104
|
+
if (this.oldState = t, !L(this.id, Object.values(t.layouts)).id)
|
|
7105
|
+
throw new G();
|
|
7106
7106
|
const a = Object.values(t.layouts).find((l) => l.elements.find((c) => c.id === this.id));
|
|
7107
7107
|
if (!a)
|
|
7108
7108
|
throw new Error("Layout missing from state!");
|
|
@@ -7114,13 +7114,13 @@ class Fd extends $ {
|
|
|
7114
7114
|
[a.layout.id]: {
|
|
7115
7115
|
...t.layouts[a.layout.id],
|
|
7116
7116
|
elements: o,
|
|
7117
|
-
modificationID:
|
|
7117
|
+
modificationID: Q()
|
|
7118
7118
|
}
|
|
7119
7119
|
}
|
|
7120
7120
|
};
|
|
7121
7121
|
}
|
|
7122
7122
|
}
|
|
7123
|
-
class kd extends
|
|
7123
|
+
class kd extends O {
|
|
7124
7124
|
/**
|
|
7125
7125
|
* @param id The targeted element to bring to the front.
|
|
7126
7126
|
*/
|
|
@@ -7128,8 +7128,8 @@ class kd extends $ {
|
|
|
7128
7128
|
super(), this.id = t;
|
|
7129
7129
|
}
|
|
7130
7130
|
apply(t) {
|
|
7131
|
-
if (this.oldState = t, !
|
|
7132
|
-
throw new
|
|
7131
|
+
if (this.oldState = t, !L(this.id, Object.values(t.layouts)).id)
|
|
7132
|
+
throw new G();
|
|
7133
7133
|
const a = Object.values(t.layouts).find((l) => l.elements.find((c) => c.id === this.id));
|
|
7134
7134
|
if (!a)
|
|
7135
7135
|
throw new Error("Layout missing from state!");
|
|
@@ -7141,7 +7141,7 @@ class kd extends $ {
|
|
|
7141
7141
|
[a.layout.id]: {
|
|
7142
7142
|
...t.layouts[a.layout.id],
|
|
7143
7143
|
elements: o,
|
|
7144
|
-
modificationID:
|
|
7144
|
+
modificationID: Q()
|
|
7145
7145
|
}
|
|
7146
7146
|
}
|
|
7147
7147
|
};
|
|
@@ -7152,7 +7152,7 @@ class an {
|
|
|
7152
7152
|
this.processRegion = async (i) => {
|
|
7153
7153
|
const r = this.layouts.find((l) => l.panelId === i.panelId);
|
|
7154
7154
|
if (!r)
|
|
7155
|
-
throw new
|
|
7155
|
+
throw new J(i);
|
|
7156
7156
|
let o = "";
|
|
7157
7157
|
if (this.configuration.type === E.ProductOverlay) {
|
|
7158
7158
|
let l = "";
|
|
@@ -7166,7 +7166,7 @@ class an {
|
|
|
7166
7166
|
throw new Error("Undefined raster silent step source");
|
|
7167
7167
|
const c = {
|
|
7168
7168
|
stepName: this.configuration.stepName,
|
|
7169
|
-
id:
|
|
7169
|
+
id: Q(),
|
|
7170
7170
|
src: l,
|
|
7171
7171
|
type: s,
|
|
7172
7172
|
y: i.top,
|
|
@@ -7186,10 +7186,10 @@ class an {
|
|
|
7186
7186
|
id: c.id,
|
|
7187
7187
|
region: i
|
|
7188
7188
|
},
|
|
7189
|
-
command: new
|
|
7189
|
+
command: new q(c, r)
|
|
7190
7190
|
};
|
|
7191
7191
|
} else {
|
|
7192
|
-
const l = this.configuration.type === E.SilentIllustration ? this.configuration.data.asset?.fileLink : o, d = await
|
|
7192
|
+
const l = this.configuration.type === E.SilentIllustration ? this.configuration.data.asset?.fileLink : o, d = await ct(await (async () => new Promise((u, h) => {
|
|
7193
7193
|
if (!l) {
|
|
7194
7194
|
h("Undefined vector silent step source");
|
|
7195
7195
|
return;
|
|
@@ -7199,8 +7199,8 @@ class an {
|
|
|
7199
7199
|
}).catch((g) => console.error(g));
|
|
7200
7200
|
}))()), A = {
|
|
7201
7201
|
stepName: this.configuration.stepName,
|
|
7202
|
-
id:
|
|
7203
|
-
cachedObjectURL: await
|
|
7202
|
+
id: Q(),
|
|
7203
|
+
cachedObjectURL: await Zt(d.svg),
|
|
7204
7204
|
src: l,
|
|
7205
7205
|
svg: d.svg,
|
|
7206
7206
|
colors: d.colors,
|
|
@@ -7221,7 +7221,7 @@ class an {
|
|
|
7221
7221
|
id: A.id,
|
|
7222
7222
|
region: i
|
|
7223
7223
|
},
|
|
7224
|
-
command: new
|
|
7224
|
+
command: new q(A, r)
|
|
7225
7225
|
};
|
|
7226
7226
|
}
|
|
7227
7227
|
}, this.configuration = t, this.layouts = e, this.product = a || void 0;
|
|
@@ -7235,7 +7235,7 @@ class an {
|
|
|
7235
7235
|
} else return this.configuration.type === E.ProductOverlay ? Promise.all(
|
|
7236
7236
|
this.configuration.data.regions.map((t) => {
|
|
7237
7237
|
if (!this.layouts.find((a) => t.panelId === a.panelId))
|
|
7238
|
-
throw new
|
|
7238
|
+
throw new J(t);
|
|
7239
7239
|
return this.processRegion(t);
|
|
7240
7240
|
})
|
|
7241
7241
|
) : Promise.reject("Unknown silent step. This is a bug");
|
|
@@ -7248,7 +7248,7 @@ class an {
|
|
|
7248
7248
|
const Lo = async (n) => {
|
|
7249
7249
|
const t = `${ft.getServicesApiUrl()}/shortener`;
|
|
7250
7250
|
try {
|
|
7251
|
-
return (await (await
|
|
7251
|
+
return (await (await rt(t, {
|
|
7252
7252
|
method: "POST",
|
|
7253
7253
|
body: JSON.stringify({ longUrl: n }),
|
|
7254
7254
|
headers: {
|
|
@@ -7313,7 +7313,7 @@ class Vo {
|
|
|
7313
7313
|
async () => {
|
|
7314
7314
|
const m = await r();
|
|
7315
7315
|
if (!m.link || !m.link)
|
|
7316
|
-
throw new
|
|
7316
|
+
throw new Kt(m.asset);
|
|
7317
7317
|
h({
|
|
7318
7318
|
rel: "mpeg4",
|
|
7319
7319
|
href: m.link
|
|
@@ -7326,7 +7326,7 @@ class Vo {
|
|
|
7326
7326
|
40
|
|
7327
7327
|
);
|
|
7328
7328
|
});
|
|
7329
|
-
t.forEach((h) => a.getCommandDispatcher()(new
|
|
7329
|
+
t.forEach((h) => a.getCommandDispatcher()(new Qt(h.id)));
|
|
7330
7330
|
const s = i.data.baseUrl.slice(0, 4) === "http" ? "" : "https://", l = new URL(s + i.data.baseUrl);
|
|
7331
7331
|
l.searchParams.append("video", btoa(JSON.stringify([o]))), l.pathname = l.pathname + (l.pathname.slice(-1) === "/" ? "" : "/");
|
|
7332
7332
|
const c = l.toString();
|
|
@@ -7344,19 +7344,19 @@ class Vo {
|
|
|
7344
7344
|
}), d;
|
|
7345
7345
|
}
|
|
7346
7346
|
async regionElements(t) {
|
|
7347
|
-
const e = (a, i) => ({ id:
|
|
7347
|
+
const e = (a, i) => ({ id: Q(), region: a, regionIndex: i });
|
|
7348
7348
|
return t.data.regions.map(e);
|
|
7349
7349
|
}
|
|
7350
7350
|
async command(t, e, a, i) {
|
|
7351
7351
|
const r = a.getLayouts(), s = `data:image/svg+xml;base64,${btoa(await Sn(t, { type: "svg" }))}`, l = e.map((c) => {
|
|
7352
7352
|
const d = c.region, A = r.find((u) => u.panelId === d?.panelId);
|
|
7353
7353
|
if (!A && d)
|
|
7354
|
-
throw new
|
|
7354
|
+
throw new J(d);
|
|
7355
7355
|
if (A && !d)
|
|
7356
7356
|
throw new Error("Region not found");
|
|
7357
7357
|
if (!A || !d)
|
|
7358
7358
|
throw new Error("Neither a region or layout found!");
|
|
7359
|
-
return new
|
|
7359
|
+
return new q(
|
|
7360
7360
|
{
|
|
7361
7361
|
stepRegion: d,
|
|
7362
7362
|
stepRegionIndex: c.regionIndex,
|
|
@@ -7373,7 +7373,7 @@ class Vo {
|
|
|
7373
7373
|
A
|
|
7374
7374
|
);
|
|
7375
7375
|
});
|
|
7376
|
-
return { command: new
|
|
7376
|
+
return { command: new $(l), followup: async () => {
|
|
7377
7377
|
} };
|
|
7378
7378
|
}
|
|
7379
7379
|
}
|
|
@@ -7385,11 +7385,11 @@ class Me {
|
|
|
7385
7385
|
return ma(e);
|
|
7386
7386
|
const a = t.asset;
|
|
7387
7387
|
if (!a)
|
|
7388
|
-
throw new
|
|
7388
|
+
throw new It(t);
|
|
7389
7389
|
const i = a.fileLink;
|
|
7390
7390
|
if (i)
|
|
7391
7391
|
return nt(i, !0);
|
|
7392
|
-
throw new
|
|
7392
|
+
throw new Kt(a);
|
|
7393
7393
|
};
|
|
7394
7394
|
}
|
|
7395
7395
|
async init(t, e, a) {
|
|
@@ -7403,10 +7403,10 @@ class Me {
|
|
|
7403
7403
|
const o = e.getWorkflowExperience().getBundle();
|
|
7404
7404
|
if (o && t.globalPropertyAspectConfigurations) {
|
|
7405
7405
|
const s = o.getGlobalPropertyStateManager(), l = t.globalPropertyAspectConfigurations[0], c = s.getAspectStorage(l.aspectName);
|
|
7406
|
-
c && c.originalAssetKey && (r = (await
|
|
7406
|
+
c && c.originalAssetKey && (r = (await U.getLocalOrFromServer(c.originalAssetKey)).fileLink);
|
|
7407
7407
|
}
|
|
7408
7408
|
if (t.option && t.option.variants && t.option.variants.length > 0) {
|
|
7409
|
-
const s = t.option, l =
|
|
7409
|
+
const s = t.option, l = Y.getDefaultVariant(s);
|
|
7410
7410
|
return l ? this.selectVariantCommand(
|
|
7411
7411
|
t,
|
|
7412
7412
|
l,
|
|
@@ -7498,11 +7498,11 @@ class Me {
|
|
|
7498
7498
|
a.addPoller(
|
|
7499
7499
|
new ii(
|
|
7500
7500
|
async () => {
|
|
7501
|
-
const d = (await
|
|
7502
|
-
return d ? (await
|
|
7501
|
+
const d = (await U.getFromServer(e.key || "")).versions?.find((u) => u.name === "svg");
|
|
7502
|
+
return d ? (await rt(d.link)).status === 200 : !1;
|
|
7503
7503
|
},
|
|
7504
7504
|
() => {
|
|
7505
|
-
|
|
7505
|
+
U.getLocalOrFromServer(e.key || "").then((c) => {
|
|
7506
7506
|
this.loadPatternFromAsset(c, t, a, i).then(
|
|
7507
7507
|
l
|
|
7508
7508
|
);
|
|
@@ -7526,7 +7526,7 @@ class Me {
|
|
|
7526
7526
|
o && (o.command && i.getCommandDispatcher()(o.command), o.followup && await o.followup());
|
|
7527
7527
|
}
|
|
7528
7528
|
getCreateElementCommand(t, e, a, i, r) {
|
|
7529
|
-
return new
|
|
7529
|
+
return new q(
|
|
7530
7530
|
{
|
|
7531
7531
|
id: t,
|
|
7532
7532
|
type: D.Frame,
|
|
@@ -7562,7 +7562,7 @@ class Me {
|
|
|
7562
7562
|
"Vector files may not include images or gradients when a color limit is specified."
|
|
7563
7563
|
);
|
|
7564
7564
|
}
|
|
7565
|
-
const d = await
|
|
7565
|
+
const d = await ct(c), A = {
|
|
7566
7566
|
src: t,
|
|
7567
7567
|
width: s,
|
|
7568
7568
|
height: l,
|
|
@@ -7657,13 +7657,13 @@ class Me {
|
|
|
7657
7657
|
r && r(!0);
|
|
7658
7658
|
const c = t.data.initialZoomLevel, d = await Promise.all(
|
|
7659
7659
|
t.data.regions.map(async (h, g) => {
|
|
7660
|
-
const m = await ze(l[g]), p = s.getImageData(), f = a.map((
|
|
7660
|
+
const m = await ze(l[g]), p = s.getImageData(), f = a.map((x) => new Qt(x.id)), S = p ? Ta(
|
|
7661
7661
|
p,
|
|
7662
7662
|
m,
|
|
7663
7663
|
c && !t.data.forceImageCover ? { scale: c } : void 0,
|
|
7664
7664
|
t.data.forceImageCover
|
|
7665
7665
|
) : void 0, w = p ? {
|
|
7666
|
-
id:
|
|
7666
|
+
id: Q(),
|
|
7667
7667
|
src: p.src,
|
|
7668
7668
|
x: S?.x || 0,
|
|
7669
7669
|
y: S?.y || 0,
|
|
@@ -7672,18 +7672,18 @@ class Me {
|
|
|
7672
7672
|
scaleX: S?.zoom || 1,
|
|
7673
7673
|
scaleY: S?.zoom || 1,
|
|
7674
7674
|
rotation: 0
|
|
7675
|
-
} : void 0,
|
|
7675
|
+
} : void 0, P = Q(), b = i.getLayouts().find((x) => x.panelId === h.panelId);
|
|
7676
7676
|
if (!b)
|
|
7677
|
-
throw new
|
|
7677
|
+
throw new J(h);
|
|
7678
7678
|
return {
|
|
7679
|
-
command: this.getCreateElementCommand(
|
|
7679
|
+
command: this.getCreateElementCommand(P, h, g, b, {
|
|
7680
7680
|
frameData: m,
|
|
7681
7681
|
pattern: w,
|
|
7682
7682
|
disablePlaceholder: t.data.disablePlaceholder,
|
|
7683
7683
|
stepName: t.stepName
|
|
7684
7684
|
}),
|
|
7685
7685
|
regionEl: {
|
|
7686
|
-
id:
|
|
7686
|
+
id: P,
|
|
7687
7687
|
region: h,
|
|
7688
7688
|
regionIndex: g
|
|
7689
7689
|
},
|
|
@@ -7692,7 +7692,7 @@ class Me {
|
|
|
7692
7692
|
})
|
|
7693
7693
|
), A = d.map((h) => h.command), u = d.map((h) => h.removeExistingCommands).flat();
|
|
7694
7694
|
return {
|
|
7695
|
-
command: new
|
|
7695
|
+
command: new $([...A, ...u]),
|
|
7696
7696
|
followup: async () => {
|
|
7697
7697
|
r && r(!1), await i.setSelectionsAndElements(
|
|
7698
7698
|
t.stepName,
|
|
@@ -7719,7 +7719,7 @@ class Me {
|
|
|
7719
7719
|
const a = t.fileLink;
|
|
7720
7720
|
if (a)
|
|
7721
7721
|
return a;
|
|
7722
|
-
throw new
|
|
7722
|
+
throw new Kt(t);
|
|
7723
7723
|
}
|
|
7724
7724
|
async loadPatternFromAsset(t, e, a, i) {
|
|
7725
7725
|
const r = Me.patternSource(t), o = a.markUpdatePending(), s = a.getWorkflowExperience().getStepById(e.stepName)?.frameService;
|
|
@@ -7749,7 +7749,7 @@ class Me {
|
|
|
7749
7749
|
), this.validateColorCount(e, a);
|
|
7750
7750
|
}
|
|
7751
7751
|
}
|
|
7752
|
-
const
|
|
7752
|
+
const vt = new Me();
|
|
7753
7753
|
class zo {
|
|
7754
7754
|
async getIllustrationBody(t) {
|
|
7755
7755
|
return new Promise((e) => {
|
|
@@ -7759,7 +7759,7 @@ class zo {
|
|
|
7759
7759
|
});
|
|
7760
7760
|
}
|
|
7761
7761
|
getCreateElementCommand(t, e, a, i, r) {
|
|
7762
|
-
return new
|
|
7762
|
+
return new q(
|
|
7763
7763
|
{
|
|
7764
7764
|
stepRegion: e,
|
|
7765
7765
|
stepRegionIndex: a,
|
|
@@ -7786,7 +7786,7 @@ class zo {
|
|
|
7786
7786
|
const a = e.getRegionElements(t.stepName) || [];
|
|
7787
7787
|
if (a.length === 0) return [];
|
|
7788
7788
|
try {
|
|
7789
|
-
return
|
|
7789
|
+
return L(
|
|
7790
7790
|
a[0].id,
|
|
7791
7791
|
e.getAllLayoutData()
|
|
7792
7792
|
).colors;
|
|
@@ -7801,7 +7801,7 @@ class zo {
|
|
|
7801
7801
|
if (a)
|
|
7802
7802
|
return this.reload(t, e, a);
|
|
7803
7803
|
{
|
|
7804
|
-
const r =
|
|
7804
|
+
const r = Y.getDefaultVariant(i);
|
|
7805
7805
|
if (r)
|
|
7806
7806
|
return await this.selectVariantCommand(t, r, [], () => {
|
|
7807
7807
|
}, e);
|
|
@@ -7859,18 +7859,18 @@ class zo {
|
|
|
7859
7859
|
spotColor: A.spotColor,
|
|
7860
7860
|
pmsValue: A.pmsValue
|
|
7861
7861
|
};
|
|
7862
|
-
const s = xa(t, e, a, o), l = await
|
|
7862
|
+
const s = xa(t, e, a, o), l = await Zt(s), c = [];
|
|
7863
7863
|
for (const d of i) {
|
|
7864
7864
|
for (const [A, u] of r.entries())
|
|
7865
7865
|
c.push(new fa(d, A, u));
|
|
7866
7866
|
c.push(new Uo(d, s, l));
|
|
7867
7867
|
}
|
|
7868
|
-
return new
|
|
7868
|
+
return new $(c);
|
|
7869
7869
|
}
|
|
7870
7870
|
async changeColors(t, e, a, i, r) {
|
|
7871
7871
|
if (e.length === 0)
|
|
7872
7872
|
return;
|
|
7873
|
-
const o =
|
|
7873
|
+
const o = L(
|
|
7874
7874
|
e[0].id,
|
|
7875
7875
|
i().map((h) => h.layoutState)
|
|
7876
7876
|
), s = { ...o.colors }, l = {};
|
|
@@ -7911,22 +7911,22 @@ class zo {
|
|
|
7911
7911
|
if (!t.data || !t.data.regions)
|
|
7912
7912
|
throw new xe(t, "Missing regions.");
|
|
7913
7913
|
i(!0);
|
|
7914
|
-
const o = a.map((f) => new
|
|
7914
|
+
const o = a.map((f) => new Qt(f.id));
|
|
7915
7915
|
t.mandatory && r.setMandatoryFulfilled(t.stepName, !1);
|
|
7916
7916
|
const s = e.asset;
|
|
7917
7917
|
if (!s)
|
|
7918
|
-
throw new
|
|
7918
|
+
throw new It(e);
|
|
7919
7919
|
const l = s.fileLink;
|
|
7920
7920
|
if (!l)
|
|
7921
|
-
throw new
|
|
7922
|
-
const c = await
|
|
7921
|
+
throw new Kt(s);
|
|
7922
|
+
const c = await ct(await this.getIllustrationBody(l)), d = await Zt(c.svg), A = (f, S) => {
|
|
7923
7923
|
const w = r.getLayouts().find((v) => v.panelId === f.panelId);
|
|
7924
7924
|
if (!w)
|
|
7925
|
-
throw new
|
|
7926
|
-
const
|
|
7925
|
+
throw new J(f);
|
|
7926
|
+
const P = Q();
|
|
7927
7927
|
return {
|
|
7928
|
-
regionElement: { id:
|
|
7929
|
-
command: this.getCreateElementCommand(
|
|
7928
|
+
regionElement: { id: P, region: f, regionIndex: S },
|
|
7929
|
+
command: this.getCreateElementCommand(P, f, S, w, {
|
|
7930
7930
|
stepName: t.stepName,
|
|
7931
7931
|
src: l,
|
|
7932
7932
|
objectURL: d,
|
|
@@ -7939,7 +7939,7 @@ class zo {
|
|
|
7939
7939
|
return p && p.variants?.forEach((f) => {
|
|
7940
7940
|
m = m.map((S) => S.toLowerCase() === f.color?.toLowerCase() ? f.name : S);
|
|
7941
7941
|
}), r.updateMetadata(t.stepName, { colors: m }), {
|
|
7942
|
-
command: new
|
|
7942
|
+
command: new $(g),
|
|
7943
7943
|
followup: async () => {
|
|
7944
7944
|
await r.setSelectionsAndElements(
|
|
7945
7945
|
t.stepName,
|
|
@@ -7952,30 +7952,30 @@ class zo {
|
|
|
7952
7952
|
const f = s.assetConfiguration?.defaultColorVariants || [];
|
|
7953
7953
|
if (f.length !== 0) {
|
|
7954
7954
|
const S = {};
|
|
7955
|
-
(s.assetConfiguration?.channelNumbers || []).forEach((
|
|
7956
|
-
const v = f.find((b) => b.channelNumber ===
|
|
7957
|
-
v && (S[`${
|
|
7955
|
+
(s.assetConfiguration?.channelNumbers || []).forEach((P) => {
|
|
7956
|
+
const v = f.find((b) => b.channelNumber === P.number);
|
|
7957
|
+
v && (S[`${P.id.replace(/\W/g, "")}`] = { browserValue: v?.variant?.color || "" });
|
|
7958
7958
|
}), await this.changeColors(
|
|
7959
7959
|
t,
|
|
7960
|
-
u.map((
|
|
7960
|
+
u.map((P) => P.regionElement),
|
|
7961
7961
|
r,
|
|
7962
7962
|
() => r.getCommandContext().getAllLayouts(),
|
|
7963
7963
|
new Map(Object.entries(S))
|
|
7964
7964
|
);
|
|
7965
7965
|
}
|
|
7966
7966
|
if (t.data.colorPickerEnabled) {
|
|
7967
|
-
const S = await this.availableColors(t, r) || [], w = Object.keys(c.colors),
|
|
7968
|
-
if (
|
|
7967
|
+
const S = await this.availableColors(t, r) || [], w = Object.keys(c.colors), P = S.length === 1 && w.length === 1;
|
|
7968
|
+
if (P) {
|
|
7969
7969
|
const v = S[0], b = w[0];
|
|
7970
7970
|
await this.changeColors(
|
|
7971
7971
|
t,
|
|
7972
|
-
u.map((
|
|
7972
|
+
u.map((x) => x.regionElement),
|
|
7973
7973
|
r,
|
|
7974
7974
|
() => r.getCommandContext().getAllLayouts(),
|
|
7975
7975
|
/* @__PURE__ */ new Map([[b, v.variant.color]])
|
|
7976
7976
|
);
|
|
7977
7977
|
}
|
|
7978
|
-
!
|
|
7978
|
+
!P && f.length === 0 && await this.changeColors(
|
|
7979
7979
|
t,
|
|
7980
7980
|
u.map((v) => v.regionElement),
|
|
7981
7981
|
r,
|
|
@@ -7996,7 +7996,7 @@ class Go {
|
|
|
7996
7996
|
if (a)
|
|
7997
7997
|
await this.reload(t, e, a);
|
|
7998
7998
|
else {
|
|
7999
|
-
const r =
|
|
7999
|
+
const r = Y.getDefaultVariant(i);
|
|
8000
8000
|
if (r)
|
|
8001
8001
|
return await this.selectVariantLambda(t, r, e, () => {
|
|
8002
8002
|
});
|
|
@@ -8050,7 +8050,7 @@ class Go {
|
|
|
8050
8050
|
i(!0);
|
|
8051
8051
|
const o = e.material;
|
|
8052
8052
|
if (!o)
|
|
8053
|
-
throw i(!1), new
|
|
8053
|
+
throw i(!1), new It(e);
|
|
8054
8054
|
return {
|
|
8055
8055
|
command: void 0,
|
|
8056
8056
|
followup: async () => {
|
|
@@ -8075,7 +8075,7 @@ class Wo {
|
|
|
8075
8075
|
if (a)
|
|
8076
8076
|
await this.reload(t, e, a);
|
|
8077
8077
|
else {
|
|
8078
|
-
const r =
|
|
8078
|
+
const r = Y.getDefaultVariant(i);
|
|
8079
8079
|
if (r)
|
|
8080
8080
|
return await this.selectVariantLambda(t, r, e, () => {
|
|
8081
8081
|
});
|
|
@@ -8105,7 +8105,7 @@ class Wo {
|
|
|
8105
8105
|
const u = e.getModelContainer();
|
|
8106
8106
|
if (u && t.option) {
|
|
8107
8107
|
const h = d.asset?.fileLink;
|
|
8108
|
-
if (!h) throw new
|
|
8108
|
+
if (!h) throw new It(d);
|
|
8109
8109
|
await u.applyModelVariant(
|
|
8110
8110
|
t.stepName || "",
|
|
8111
8111
|
{
|
|
@@ -8129,7 +8129,7 @@ class Wo {
|
|
|
8129
8129
|
i(!0);
|
|
8130
8130
|
const r = e.asset?.fileLink;
|
|
8131
8131
|
if (!r)
|
|
8132
|
-
throw new
|
|
8132
|
+
throw new It(e);
|
|
8133
8133
|
return {
|
|
8134
8134
|
command: void 0,
|
|
8135
8135
|
followup: async () => {
|
|
@@ -8190,12 +8190,12 @@ class qo {
|
|
|
8190
8190
|
return console.error("Missing configuration."), null;
|
|
8191
8191
|
a.updateStorage(t.stepName, { text: e }), a.updateMetadata(t.stepName, { text: e });
|
|
8192
8192
|
const c = (d, A, u, h) => {
|
|
8193
|
-
const g = h ||
|
|
8193
|
+
const g = h || Q(), p = a.getLayouts().find((S) => S.panelId === A.panelId);
|
|
8194
8194
|
if (!p)
|
|
8195
8195
|
return console.error(`Can not find layout for region: ${A.panelId}`), null;
|
|
8196
8196
|
const f = [];
|
|
8197
|
-
return h && f.push(new
|
|
8198
|
-
new
|
|
8197
|
+
return h && f.push(new Qt(g)), f.push(
|
|
8198
|
+
new q(
|
|
8199
8199
|
{
|
|
8200
8200
|
stepRegion: A,
|
|
8201
8201
|
stepRegionIndex: u,
|
|
@@ -8218,7 +8218,7 @@ class qo {
|
|
|
8218
8218
|
), {
|
|
8219
8219
|
id: g,
|
|
8220
8220
|
region: A,
|
|
8221
|
-
command: new
|
|
8221
|
+
command: new $(f)
|
|
8222
8222
|
};
|
|
8223
8223
|
};
|
|
8224
8224
|
if (r.length > 0) {
|
|
@@ -8234,7 +8234,7 @@ class qo {
|
|
|
8234
8234
|
);
|
|
8235
8235
|
}).filter((u) => !!u).filter((u) => !!u).map((u) => u && u.command);
|
|
8236
8236
|
return {
|
|
8237
|
-
command: new
|
|
8237
|
+
command: new $(A),
|
|
8238
8238
|
followup: async () => {
|
|
8239
8239
|
}
|
|
8240
8240
|
};
|
|
@@ -8243,7 +8243,7 @@ class qo {
|
|
|
8243
8243
|
(u, h) => c(o.svgPrint(e, u), u, h)
|
|
8244
8244
|
), A = d.filter((u) => !!u).map((u) => u && u.command);
|
|
8245
8245
|
return {
|
|
8246
|
-
command: new
|
|
8246
|
+
command: new $(A),
|
|
8247
8247
|
followup: async () => {
|
|
8248
8248
|
const u = d.filter((h) => h).map((h) => h && { id: h.id, region: h.region });
|
|
8249
8249
|
await a.setSelectionsAndElements(
|
|
@@ -8320,19 +8320,19 @@ class Ho {
|
|
|
8320
8320
|
async selectVariantCommand(t, e, a, i) {
|
|
8321
8321
|
const r = e.asset;
|
|
8322
8322
|
if (!r)
|
|
8323
|
-
throw new
|
|
8323
|
+
throw new It(e);
|
|
8324
8324
|
const o = r?.fileLink;
|
|
8325
8325
|
if (!o)
|
|
8326
8326
|
return console.error("No URL for picture!"), null;
|
|
8327
8327
|
i(!0), t.mandatory && a.setMandatoryFulfilled(t.stepName, !1);
|
|
8328
|
-
const l = a.getRegionElements(t.stepName).map((A) => new
|
|
8328
|
+
const l = a.getRegionElements(t.stepName).map((A) => new Qt(A.id)), c = (A, u) => {
|
|
8329
8329
|
const g = a.getLayouts().find((p) => p.panelId === A.panelId);
|
|
8330
8330
|
if (!g)
|
|
8331
|
-
throw new
|
|
8332
|
-
const m =
|
|
8331
|
+
throw new J(A);
|
|
8332
|
+
const m = Q();
|
|
8333
8333
|
return {
|
|
8334
8334
|
regionElement: { id: m, region: A, regionIndex: u },
|
|
8335
|
-
command: new
|
|
8335
|
+
command: new q(
|
|
8336
8336
|
{
|
|
8337
8337
|
stepName: t.stepName,
|
|
8338
8338
|
stepRegion: A,
|
|
@@ -8355,7 +8355,7 @@ class Ho {
|
|
|
8355
8355
|
};
|
|
8356
8356
|
}, d = t.data.regions.map(c);
|
|
8357
8357
|
return {
|
|
8358
|
-
command: new
|
|
8358
|
+
command: new $([...l, ...d.map((A) => A.command)]),
|
|
8359
8359
|
followup: async () => {
|
|
8360
8360
|
await a.setSelectionsAndElements(
|
|
8361
8361
|
t.stepName,
|
|
@@ -8379,7 +8379,7 @@ class jo {
|
|
|
8379
8379
|
await this.reload(t, e, a);
|
|
8380
8380
|
else {
|
|
8381
8381
|
const r = i.variants;
|
|
8382
|
-
if (
|
|
8382
|
+
if (Y.getDefaultVariant(i)) {
|
|
8383
8383
|
const s = r?.find((l) => l.id === i.defaultVariant?.id);
|
|
8384
8384
|
return this.selectVariantLambda(t, s?.id || "", e);
|
|
8385
8385
|
}
|
|
@@ -8441,10 +8441,10 @@ class Yo {
|
|
|
8441
8441
|
setCustomColor(t, e, a) {
|
|
8442
8442
|
const i = a.getLayouts(), o = (a.getRegionElements(e.stepName) || []).map((s) => {
|
|
8443
8443
|
const l = s.region;
|
|
8444
|
-
if (!i.find((d) => d.panelId === l?.panelId)) throw new
|
|
8444
|
+
if (!i.find((d) => d.panelId === l?.panelId)) throw new J(l);
|
|
8445
8445
|
return new fa(s.id, this.shapeFillId, t);
|
|
8446
8446
|
}).filter((s) => !!s);
|
|
8447
|
-
a.getCommandDispatcher()(new
|
|
8447
|
+
a.getCommandDispatcher()(new $(o)), a.updateStorage(e.stepName, { colour: t });
|
|
8448
8448
|
}
|
|
8449
8449
|
async init(t, e, a) {
|
|
8450
8450
|
const i = t.option;
|
|
@@ -8453,7 +8453,7 @@ class Yo {
|
|
|
8453
8453
|
if (a)
|
|
8454
8454
|
await this.reload(t, e, a);
|
|
8455
8455
|
else {
|
|
8456
|
-
const r =
|
|
8456
|
+
const r = Y.getDefaultVariant(i);
|
|
8457
8457
|
return r ? this.selectVariantCommand(
|
|
8458
8458
|
t,
|
|
8459
8459
|
{
|
|
@@ -8510,12 +8510,12 @@ class Yo {
|
|
|
8510
8510
|
const l = (d) => {
|
|
8511
8511
|
const A = d.region;
|
|
8512
8512
|
if (!r.find((g) => g.panelId === A?.panelId))
|
|
8513
|
-
throw new
|
|
8513
|
+
throw new J(A);
|
|
8514
8514
|
const h = s();
|
|
8515
8515
|
return new fa(d.id, this.shapeFillId, h);
|
|
8516
8516
|
}, c = a.map(l).filter((d) => !!d);
|
|
8517
8517
|
return {
|
|
8518
|
-
command: new
|
|
8518
|
+
command: new $(c),
|
|
8519
8519
|
followup: async () => {
|
|
8520
8520
|
await i.setSelectionsAndElements(
|
|
8521
8521
|
t.stepName,
|
|
@@ -8528,7 +8528,7 @@ class Yo {
|
|
|
8528
8528
|
const l = (u, h) => {
|
|
8529
8529
|
const g = r.find((w) => w.panelId === u.panelId);
|
|
8530
8530
|
if (!g)
|
|
8531
|
-
throw new
|
|
8531
|
+
throw new J(u);
|
|
8532
8532
|
const m = s(), p = `
|
|
8533
8533
|
<svg
|
|
8534
8534
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -8551,11 +8551,11 @@ class Yo {
|
|
|
8551
8551
|
</svg>
|
|
8552
8552
|
`, f = {};
|
|
8553
8553
|
f[this.shapeFillId] = { browserValue: m };
|
|
8554
|
-
const S =
|
|
8554
|
+
const S = Q();
|
|
8555
8555
|
return {
|
|
8556
8556
|
id: S,
|
|
8557
8557
|
region: u,
|
|
8558
|
-
command: new
|
|
8558
|
+
command: new q(
|
|
8559
8559
|
{
|
|
8560
8560
|
stepRegion: u,
|
|
8561
8561
|
stepRegionIndex: h,
|
|
@@ -8579,7 +8579,7 @@ class Yo {
|
|
|
8579
8579
|
};
|
|
8580
8580
|
}, c = t.data.regions.map(l), d = c.filter((u) => !!u).map((u) => u?.command), A = c.filter((u) => !!u).map((u, h) => ({ id: u.id, region: u.region, regionIndex: h }));
|
|
8581
8581
|
return {
|
|
8582
|
-
command: new
|
|
8582
|
+
command: new $(d),
|
|
8583
8583
|
followup: async () => {
|
|
8584
8584
|
await i.setSelectionsAndElements(
|
|
8585
8585
|
t.stepName,
|
|
@@ -8594,7 +8594,7 @@ class Yo {
|
|
|
8594
8594
|
}
|
|
8595
8595
|
}
|
|
8596
8596
|
}
|
|
8597
|
-
const
|
|
8597
|
+
const Gt = new Yo();
|
|
8598
8598
|
class Jo {
|
|
8599
8599
|
constructor() {
|
|
8600
8600
|
this.latestToast = null, this.toastType = null, this.toastCallbacks = [];
|
|
@@ -8729,7 +8729,7 @@ class Xo {
|
|
|
8729
8729
|
const u = e.getWorkflowExperience().getBundle();
|
|
8730
8730
|
if (u && t.globalPropertyAspectConfigurations) {
|
|
8731
8731
|
const m = u.getGlobalPropertyConfiguration()?.aspects?.find(
|
|
8732
|
-
(p) => p.type ===
|
|
8732
|
+
(p) => p.type === z.Text && t.globalPropertyAspectConfigurations?.map((f) => f.aspectName).includes(p.name)
|
|
8733
8733
|
);
|
|
8734
8734
|
if (m) {
|
|
8735
8735
|
const f = u.getGlobalPropertyStateManager().getAspect(m.name);
|
|
@@ -8748,7 +8748,7 @@ class Xo {
|
|
|
8748
8748
|
fillImage: r?.name,
|
|
8749
8749
|
strokeColor: t.data.strokeEnabled ? c?.color : void 0
|
|
8750
8750
|
});
|
|
8751
|
-
const h =
|
|
8751
|
+
const h = Y.getDefaultVariant(i);
|
|
8752
8752
|
if (h)
|
|
8753
8753
|
return this.selectVariantCommand(
|
|
8754
8754
|
t,
|
|
@@ -8767,7 +8767,7 @@ class Xo {
|
|
|
8767
8767
|
return null;
|
|
8768
8768
|
}
|
|
8769
8769
|
findLayoutElements(t, e) {
|
|
8770
|
-
return t.getRegionElements(e.stepName).map((r) =>
|
|
8770
|
+
return t.getRegionElements(e.stepName).map((r) => L(r.id, t.getAllLayoutData()));
|
|
8771
8771
|
}
|
|
8772
8772
|
/**
|
|
8773
8773
|
* Get the colors that can be used for a given text step.
|
|
@@ -8892,7 +8892,7 @@ class Xo {
|
|
|
8892
8892
|
});
|
|
8893
8893
|
}
|
|
8894
8894
|
updateInputText(t, e, a, i) {
|
|
8895
|
-
const r = i.getStepStorage(a.stepName), o =
|
|
8895
|
+
const r = i.getStepStorage(a.stepName), o = Dt(t, i), s = this.getProcessedInput(o, a.data, r?.customiseAllText ?? !1), l = {
|
|
8896
8896
|
command: void 0,
|
|
8897
8897
|
helperData: {},
|
|
8898
8898
|
errorData: this.getErrorsForText(t, s, a, i)
|
|
@@ -8917,7 +8917,7 @@ class Xo {
|
|
|
8917
8917
|
}
|
|
8918
8918
|
return !a.data.curved && e.length > 0 && !Array.from(A.values()).every((h) => h) ? (l.errorData || (l.errorData = {}), l.errorData.doesNotFit = !0, l) : (i.updateStorage(a.stepName, { text: t }), i.updateMetadata(a.stepName, {
|
|
8919
8919
|
text: s
|
|
8920
|
-
}), (r?.defaultCleared || !a.data.deleteDefaultOnFocus) && s.trim() !== "" && i.setMandatoryFulfilled(a.stepName, !0), l.command = new
|
|
8920
|
+
}), (r?.defaultCleared || !a.data.deleteDefaultOnFocus) && s.trim() !== "" && i.setMandatoryFulfilled(a.stepName, !0), l.command = new $(c), l);
|
|
8921
8921
|
}
|
|
8922
8922
|
async selectVariant(t, e, a, i, r) {
|
|
8923
8923
|
const o = await this.selectVariantCommand(
|
|
@@ -8961,7 +8961,7 @@ class Xo {
|
|
|
8961
8961
|
const m = e.getWorkflowExperience().getBundle();
|
|
8962
8962
|
if (m && t.globalPropertyAspectConfigurations) {
|
|
8963
8963
|
const f = m.getGlobalPropertyConfiguration()?.aspects?.find(
|
|
8964
|
-
(S) => S.type ===
|
|
8964
|
+
(S) => S.type === z.Text && t.globalPropertyAspectConfigurations?.map((w) => w.aspectName).includes(S.name)
|
|
8965
8965
|
);
|
|
8966
8966
|
if (f) {
|
|
8967
8967
|
const w = m.getGlobalPropertyStateManager().getAspect(f.name);
|
|
@@ -8974,11 +8974,11 @@ class Xo {
|
|
|
8974
8974
|
u,
|
|
8975
8975
|
async () => {
|
|
8976
8976
|
e.updateMetadata(t.stepName, { color: h, text: g }), e.updateStorage(t.stepName, { text: g, inputText: g });
|
|
8977
|
-
const p = s.map((S) => new en(S.id, A)), f = new
|
|
8977
|
+
const p = s.map((S) => new en(S.id, A)), f = new $(p);
|
|
8978
8978
|
e.getCommandDispatcher()(f);
|
|
8979
8979
|
}
|
|
8980
8980
|
), s.length === 0 && l) {
|
|
8981
|
-
const p =
|
|
8981
|
+
const p = Y.getDefaultVariant(l);
|
|
8982
8982
|
if (p) {
|
|
8983
8983
|
const f = await this.selectVariantCommand(
|
|
8984
8984
|
t,
|
|
@@ -8994,7 +8994,7 @@ class Xo {
|
|
|
8994
8994
|
e.getCommandDispatcher()(f.command);
|
|
8995
8995
|
}
|
|
8996
8996
|
} else {
|
|
8997
|
-
const { command: p } =
|
|
8997
|
+
const { command: p } = H.updateInputText(
|
|
8998
8998
|
g || "",
|
|
8999
8999
|
s,
|
|
9000
9000
|
t,
|
|
@@ -9008,13 +9008,13 @@ class Xo {
|
|
|
9008
9008
|
const c = e.getWorkflowExperience().getBundle();
|
|
9009
9009
|
if (c && t.globalPropertyAspectConfigurations) {
|
|
9010
9010
|
const A = c.getGlobalPropertyConfiguration()?.aspects?.find(
|
|
9011
|
-
(u) => u.type ===
|
|
9011
|
+
(u) => u.type === z.Text && t.globalPropertyAspectConfigurations?.map((h) => h.aspectName).includes(u.name)
|
|
9012
9012
|
);
|
|
9013
9013
|
if (A) {
|
|
9014
9014
|
const h = c.getGlobalPropertyStateManager().getAspect(A.name);
|
|
9015
9015
|
if (h)
|
|
9016
9016
|
if (s.length === 0 && l) {
|
|
9017
|
-
const g =
|
|
9017
|
+
const g = Y.getDefaultVariant(l);
|
|
9018
9018
|
if (g) {
|
|
9019
9019
|
const m = await this.selectVariantCommand(
|
|
9020
9020
|
t,
|
|
@@ -9030,7 +9030,7 @@ class Xo {
|
|
|
9030
9030
|
e.getCommandDispatcher()(m.command);
|
|
9031
9031
|
}
|
|
9032
9032
|
} else {
|
|
9033
|
-
const { command: g } =
|
|
9033
|
+
const { command: g } = H.updateInputText(
|
|
9034
9034
|
h,
|
|
9035
9035
|
s,
|
|
9036
9036
|
t,
|
|
@@ -9045,30 +9045,30 @@ class Xo {
|
|
|
9045
9045
|
getDefaultColorVariant(t) {
|
|
9046
9046
|
const e = t.colorOption;
|
|
9047
9047
|
if (e)
|
|
9048
|
-
return
|
|
9048
|
+
return Y.getDefaultVariant(e);
|
|
9049
9049
|
}
|
|
9050
9050
|
getDefaultColor(t) {
|
|
9051
9051
|
const e = t.colorOption;
|
|
9052
|
-
return e ?
|
|
9052
|
+
return e ? Y.getDefaultVariant(e)?.color : void 0;
|
|
9053
9053
|
}
|
|
9054
9054
|
getDefaultImageFillVariant(t) {
|
|
9055
9055
|
const e = t.imageFillOption;
|
|
9056
9056
|
if (e)
|
|
9057
|
-
return
|
|
9057
|
+
return Y.getDefaultVariant(e);
|
|
9058
9058
|
}
|
|
9059
9059
|
getDefaultStrokeColorVariant(t) {
|
|
9060
9060
|
const e = t.strokeOption;
|
|
9061
9061
|
if (e)
|
|
9062
|
-
return
|
|
9062
|
+
return Y.getDefaultVariant(e);
|
|
9063
9063
|
}
|
|
9064
9064
|
async fontDataFromVariant(t) {
|
|
9065
9065
|
const e = t.asset;
|
|
9066
9066
|
if (!e)
|
|
9067
|
-
throw new
|
|
9067
|
+
throw new It(t);
|
|
9068
9068
|
const a = e.fileLink;
|
|
9069
9069
|
if (!a)
|
|
9070
|
-
throw new
|
|
9071
|
-
const i = await
|
|
9070
|
+
throw new Kt(e);
|
|
9071
|
+
const i = await Nt(a);
|
|
9072
9072
|
return {
|
|
9073
9073
|
assetUrl: a,
|
|
9074
9074
|
name: i.names.fullName.en
|
|
@@ -9100,7 +9100,7 @@ class Xo {
|
|
|
9100
9100
|
s
|
|
9101
9101
|
);
|
|
9102
9102
|
return h && u.push(h), {
|
|
9103
|
-
command: new
|
|
9103
|
+
command: new $(u),
|
|
9104
9104
|
followup: async () => {
|
|
9105
9105
|
r.markUpdateCompleted(d), await r.setSelectionsAndElements(t.stepName, [e], i);
|
|
9106
9106
|
}
|
|
@@ -9137,7 +9137,7 @@ class Xo {
|
|
|
9137
9137
|
g.push(...p);
|
|
9138
9138
|
}
|
|
9139
9139
|
return h && g.push(h), {
|
|
9140
|
-
command: new
|
|
9140
|
+
command: new $(g),
|
|
9141
9141
|
followup: async () => {
|
|
9142
9142
|
r.markUpdateCompleted(d);
|
|
9143
9143
|
}
|
|
@@ -9155,25 +9155,25 @@ class Xo {
|
|
|
9155
9155
|
async createTextboxRegions(t, e, a, i, r, o) {
|
|
9156
9156
|
if (!a || !a.regions)
|
|
9157
9157
|
throw new Error("Step data not supplied");
|
|
9158
|
-
const s = r.text || a.defaultText || "", l =
|
|
9159
|
-
const m = o.getLayouts().find((f) => f.panelId === u.panelId), p =
|
|
9158
|
+
const s = r.text || a.defaultText || "", l = Dt(s, o), c = this.getProcessedInput(l, a, !1), d = async (u, h) => {
|
|
9159
|
+
const m = o.getLayouts().find((f) => f.panelId === u.panelId), p = Q();
|
|
9160
9160
|
try {
|
|
9161
9161
|
if (!m)
|
|
9162
9162
|
throw new Ne("Failed to find layout for region: " + u.panelId);
|
|
9163
9163
|
const f = a.colorOption;
|
|
9164
9164
|
let S;
|
|
9165
9165
|
if (f && f.variants) {
|
|
9166
|
-
const
|
|
9167
|
-
S = this.createTextFillSpotColor(f,
|
|
9166
|
+
const M = f.variants.find((W) => W.id === f.defaultVariant?.id) || f.variants[0];
|
|
9167
|
+
S = this.createTextFillSpotColor(f, M), o.updateStorage(t, {
|
|
9168
9168
|
colorProfileAssetKey: f.colorProfile?.key
|
|
9169
9169
|
});
|
|
9170
9170
|
}
|
|
9171
|
-
const w = await this.getDefaultColor(a),
|
|
9171
|
+
const w = await this.getDefaultColor(a), P = w || "#000000", v = {
|
|
9172
9172
|
stepRegion: u,
|
|
9173
9173
|
stepRegionIndex: h,
|
|
9174
9174
|
stepName: t,
|
|
9175
9175
|
align: this.textAlign(a),
|
|
9176
|
-
fill: r.color ? r.color :
|
|
9176
|
+
fill: r.color ? r.color : P,
|
|
9177
9177
|
fontSize: a.size || na,
|
|
9178
9178
|
fontData: i,
|
|
9179
9179
|
id: p,
|
|
@@ -9193,9 +9193,9 @@ class Xo {
|
|
|
9193
9193
|
curved: a.curved,
|
|
9194
9194
|
paths: a.paths,
|
|
9195
9195
|
fillSpotColorDefinition: S
|
|
9196
|
-
}, b = [],
|
|
9196
|
+
}, b = [], x = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map();
|
|
9197
9197
|
if (!v.fontData) throw new R("Failed to resolve font data for text.");
|
|
9198
|
-
const [N,
|
|
9198
|
+
const [N, I] = ve(
|
|
9199
9199
|
v.fontSize,
|
|
9200
9200
|
v.fontData,
|
|
9201
9201
|
{
|
|
@@ -9209,16 +9209,16 @@ class Xo {
|
|
|
9209
9209
|
[c],
|
|
9210
9210
|
{ size: a.size, minSize: a.minSize, maxSize: a.maxSize }
|
|
9211
9211
|
);
|
|
9212
|
-
|
|
9213
|
-
const
|
|
9212
|
+
x.set(v.id, N), F.set(v.id, I);
|
|
9213
|
+
const k = a.curved || a.vertical ? c : (I || []).join(`
|
|
9214
9214
|
`);
|
|
9215
9215
|
b.push(
|
|
9216
|
-
this.generateTextChangeCommandsForRegion(N, a, v.id,
|
|
9216
|
+
this.generateTextChangeCommandsForRegion(N, a, v.id, k)
|
|
9217
9217
|
);
|
|
9218
|
-
const
|
|
9218
|
+
const V = new q(v, m);
|
|
9219
9219
|
return {
|
|
9220
9220
|
regionElement: { id: p, region: u, regionIndex: h },
|
|
9221
|
-
commands: [
|
|
9221
|
+
commands: [V, ...b],
|
|
9222
9222
|
newElement: v,
|
|
9223
9223
|
fontData: i
|
|
9224
9224
|
};
|
|
@@ -9247,32 +9247,32 @@ class Xo {
|
|
|
9247
9247
|
const l = new No(a, t);
|
|
9248
9248
|
r.push(l);
|
|
9249
9249
|
}
|
|
9250
|
-
return new
|
|
9250
|
+
return new $(r);
|
|
9251
9251
|
}
|
|
9252
9252
|
/**
|
|
9253
9253
|
* @deprecated
|
|
9254
9254
|
*/
|
|
9255
9255
|
async changeInputTextWithRegion(t, e, a, i, r, o, s, l, c, d) {
|
|
9256
|
-
const A = (i || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u =
|
|
9256
|
+
const A = (i || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = Dt(A, o), h = this.getProcessedInput(u, t.data, s), g = o.getRegionElements(t.stepName), m = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
|
|
9257
9257
|
for (const v of g)
|
|
9258
9258
|
if (v.region) {
|
|
9259
|
-
const [b,
|
|
9259
|
+
const [b, x] = ve(
|
|
9260
9260
|
e,
|
|
9261
9261
|
a,
|
|
9262
9262
|
v.region,
|
|
9263
9263
|
[h],
|
|
9264
9264
|
{ size: t.data.size, minSize: t.data.minSize, maxSize: t.data.maxSize }
|
|
9265
9265
|
);
|
|
9266
|
-
m.set(v.id, b), p.set(v.id,
|
|
9266
|
+
m.set(v.id, b), p.set(v.id, x);
|
|
9267
9267
|
}
|
|
9268
9268
|
const S = (() => {
|
|
9269
9269
|
if (t.data && t.data.maxLength && h.length > t.data.maxLength)
|
|
9270
9270
|
return d && d(!0), { info: "0" };
|
|
9271
9271
|
const v = o.getWorkflowExperience().getProfanityList(), b = ca(h.toLowerCase());
|
|
9272
|
-
for (const
|
|
9272
|
+
for (const x of b)
|
|
9273
9273
|
for (const F in v) {
|
|
9274
9274
|
const N = v[F].toLowerCase().replace(/\s/g, "");
|
|
9275
|
-
if (
|
|
9275
|
+
if (x === N)
|
|
9276
9276
|
return l(!0), { error: "Blocked profanity." };
|
|
9277
9277
|
}
|
|
9278
9278
|
return !t.data.vertical && !t.data.allowNewlines && (h.includes(`
|
|
@@ -9300,10 +9300,10 @@ class Xo {
|
|
|
9300
9300
|
)
|
|
9301
9301
|
);
|
|
9302
9302
|
}
|
|
9303
|
-
return new
|
|
9303
|
+
return new $(w);
|
|
9304
9304
|
}
|
|
9305
9305
|
}
|
|
9306
|
-
const
|
|
9306
|
+
const H = new Xo();
|
|
9307
9307
|
class Zo {
|
|
9308
9308
|
}
|
|
9309
9309
|
const ts = "data:application/octet-stream;base64,AAEAAAAPAIAAAwBwRkZUTYdHeHoAAElcAAAAHEdERUYAJwBUAAAe2AAAAB5HUE9TkNtcVAAAHygAACoyR1NVQrj/uP4AAB74AAAAME9TLzJoWmUcAAABeAAAAGBjbWFwtkIacAAAAxAAAAJWZ2FzcP//AAMAAB7QAAAACGdseWY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ARf/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/xAAf/8QAI/+IACf/dAAr/0wAL/+IADP/iAA3/3QAO/+cAD//dABD/zgAR/9MAEv/EABP/0wAU/84AFv/dADH/4gAy/6EAM//jADT/3QA1/+wANv/sADf/5wA4/90AOf/nADr/8QA7/78APP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D3//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+8ADP/7wA0/9wANf/zADb/6AA3//cAOP/hADn/5gA6//MAO//aADz/6QA9//MAPv/pAD//6wBA/+MAQf/3AEL/2gBD/+kARP/rAEX/1ABG/+kAR//JAEj/zABJ/7QASv+7AEv/5wAbAAb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+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//+A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cANf/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==", at = (n) => Xi("http://www.w3.org/2000/svg", n), es = (n, t) => {
|
|
@@ -9381,7 +9381,7 @@ class os {
|
|
|
9381
9381
|
u = (A * 100 | 0) / 100;
|
|
9382
9382
|
break;
|
|
9383
9383
|
default:
|
|
9384
|
-
throw new
|
|
9384
|
+
throw new xt("Failed to encode path.");
|
|
9385
9385
|
}
|
|
9386
9386
|
l || o.push(" "), o.push(u), l = !1;
|
|
9387
9387
|
}
|
|
@@ -9395,12 +9395,12 @@ class os {
|
|
|
9395
9395
|
for (e.lastIndex = 0; r = e.exec(t); ) {
|
|
9396
9396
|
const o = r[1].toLowerCase(), s = (r[2].match(a) || []).map(parseFloat), l = o === r[1], c = nn[o];
|
|
9397
9397
|
if (s.length < c.length)
|
|
9398
|
-
throw new
|
|
9398
|
+
throw new xt(
|
|
9399
9399
|
`Path type "${o}" given ${s.length} arguments, expected ${c.length}.`
|
|
9400
9400
|
);
|
|
9401
9401
|
if (c.length > 0) {
|
|
9402
9402
|
if (s.length % c.length !== 0)
|
|
9403
|
-
throw new
|
|
9403
|
+
throw new xt(
|
|
9404
9404
|
`Path type "${o}" given ${s.length} arguments, not divisible by ${c.length}`
|
|
9405
9405
|
);
|
|
9406
9406
|
for (let d = 0; d < s.length / c.length; d++) {
|
|
@@ -9425,7 +9425,7 @@ class os {
|
|
|
9425
9425
|
if (s in r && l in r) {
|
|
9426
9426
|
const c = [r[s], r[l]], d = e(c);
|
|
9427
9427
|
if (d.length < 2)
|
|
9428
|
-
throw new
|
|
9428
|
+
throw new xt("Transformer must return at least 2 points.");
|
|
9429
9429
|
r[s] = d[0], r[l] = d[1];
|
|
9430
9430
|
}
|
|
9431
9431
|
}
|
|
@@ -9462,18 +9462,18 @@ class ss extends Zo {
|
|
|
9462
9462
|
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 = () => {
|
|
9463
9463
|
const w = at("g");
|
|
9464
9464
|
w.classList.add("module-text-group");
|
|
9465
|
-
const
|
|
9466
|
-
w.appendChild(
|
|
9465
|
+
const P = at("defs");
|
|
9466
|
+
w.appendChild(P), P.appendChild(as(0, 2, 2, "shadow"));
|
|
9467
9467
|
const v = at("path");
|
|
9468
|
-
v.setAttribute("d", d), v.setAttribute("stroke", "black"), v.setAttribute("stroke-width", "3"),
|
|
9468
|
+
v.setAttribute("d", d), v.setAttribute("stroke", "black"), v.setAttribute("stroke-width", "3"), P.appendChild(v);
|
|
9469
9469
|
const b = at("g");
|
|
9470
9470
|
b.classList.add("module-layer0"), w.appendChild(b), b.setAttribute("filter", "url(#shadow)"), b.innerHTML = v.outerHTML;
|
|
9471
|
-
const
|
|
9472
|
-
|
|
9471
|
+
const x = at("g");
|
|
9472
|
+
x.classList.add("module-layer1"), w.appendChild(x), x.setAttribute("stroke-width", "3"), x.setAttribute("stroke", "rgb(45,41,38)"), x.setAttribute("fill", "rgb(45,41,38)"), x.setAttribute("transform", "translate(0.5,0)"), x.innerHTML = s;
|
|
9473
9473
|
const F = at("g");
|
|
9474
9474
|
F.classList.add("module-layer2"), w.appendChild(F), F.setAttribute("fill", "rgb(255,209,0)"), F.setAttribute("transform", "translate(1,-0.1)"), F.innerHTML = s;
|
|
9475
9475
|
const N = at("g");
|
|
9476
|
-
return N.classList.add("module-layer3"), w.appendChild(N), N.setAttribute("fill", "white"), N.innerHTML = s, new os(w).transform(([
|
|
9476
|
+
return N.classList.add("module-layer3"), w.appendChild(N), N.setAttribute("fill", "white"), N.innerHTML = s, new os(w).transform(([k, V]) => [k, V + (c / 2 - k) ** 2 / (c * 6)]), w;
|
|
9477
9477
|
}, u = at("g");
|
|
9478
9478
|
u.classList.add("module-root");
|
|
9479
9479
|
const h = at("defs");
|
|
@@ -9513,9 +9513,9 @@ const ls = [
|
|
|
9513
9513
|
const l = s.toString(), d = `data:image/svg+xml;base64,${Ha(await Sn(l, { type: "svg" }))}`, A = (h) => {
|
|
9514
9514
|
const g = n.find((p) => p.panelId === h.panelId);
|
|
9515
9515
|
if (!g)
|
|
9516
|
-
throw new
|
|
9517
|
-
const m =
|
|
9518
|
-
return new
|
|
9516
|
+
throw new J(h);
|
|
9517
|
+
const m = Q();
|
|
9518
|
+
return new q(
|
|
9519
9519
|
{
|
|
9520
9520
|
id: m,
|
|
9521
9521
|
src: d,
|
|
@@ -9540,9 +9540,9 @@ const ls = [
|
|
|
9540
9540
|
const s = Mo(i, a.option);
|
|
9541
9541
|
s && (t[a.stepName] = { selectedVariants: [s] });
|
|
9542
9542
|
const l = async (c) => {
|
|
9543
|
-
const d = await ti(c, s?.asset?.fileLink), A = await ze(d), u =
|
|
9543
|
+
const d = await ti(c, s?.asset?.fileLink), A = await ze(d), u = Q(), h = n.find((m) => m.panelId === c.panelId);
|
|
9544
9544
|
if (!h)
|
|
9545
|
-
throw new
|
|
9545
|
+
throw new J(c);
|
|
9546
9546
|
const g = Ta(
|
|
9547
9547
|
o,
|
|
9548
9548
|
A,
|
|
@@ -9554,7 +9554,7 @@ const ls = [
|
|
|
9554
9554
|
a.data.forceImageCover
|
|
9555
9555
|
);
|
|
9556
9556
|
return [
|
|
9557
|
-
new
|
|
9557
|
+
new q(
|
|
9558
9558
|
{
|
|
9559
9559
|
id: u,
|
|
9560
9560
|
path: A.path,
|
|
@@ -9595,7 +9595,7 @@ const ls = [
|
|
|
9595
9595
|
const i = e.data, r = a.option;
|
|
9596
9596
|
if (!r)
|
|
9597
9597
|
return console.error(`No option for step ${a.stepName}.`), [];
|
|
9598
|
-
const o = r.variants?.find((v) => v.id === i.illustrationVariantId) ||
|
|
9598
|
+
const o = r.variants?.find((v) => v.id === i.illustrationVariantId) || se(r);
|
|
9599
9599
|
if (!o)
|
|
9600
9600
|
return console.error(`No variant with ID: ${i.illustrationVariantId}`), [];
|
|
9601
9601
|
if (!o.asset)
|
|
@@ -9604,42 +9604,42 @@ const ls = [
|
|
|
9604
9604
|
const s = o.asset?.fileLink;
|
|
9605
9605
|
if (!s)
|
|
9606
9606
|
return console.error(`No asset link for variant with ID: ${i.illustrationVariantId}`), [];
|
|
9607
|
-
const l = await nt(s, !0), c = /<svg.*?<\/svg>/s, d = l.match(c) || [], A = d?.length > 0 ? d[0] : "", g =
|
|
9607
|
+
const l = await nt(s, !0), c = /<svg.*?<\/svg>/s, d = l.match(c) || [], A = d?.length > 0 ? d[0] : "", g = ut().parseFromString(A, "image/svg+xml").firstElementChild;
|
|
9608
9608
|
if (!g)
|
|
9609
9609
|
return console.error("Failed to read SVG."), [];
|
|
9610
9610
|
Pa(g);
|
|
9611
9611
|
const m = {};
|
|
9612
|
-
|
|
9612
|
+
kt(g, (v) => {
|
|
9613
9613
|
ls.includes(v.tagName) && !v.attributes.getNamedItem("fill") && v.setAttribute("fill", "#000000");
|
|
9614
9614
|
const b = v.attributes.getNamedItem("fill");
|
|
9615
9615
|
if (b && b.value !== "none") {
|
|
9616
|
-
const F = b.value,
|
|
9617
|
-
v.classList.add(
|
|
9616
|
+
const F = b.value, I = `spiff-fill-${F.replace(/\W/g, "")}`;
|
|
9617
|
+
v.classList.add(I), m[I] = { browserValue: F };
|
|
9618
9618
|
}
|
|
9619
|
-
const
|
|
9620
|
-
if (
|
|
9621
|
-
const F =
|
|
9622
|
-
v.classList.add(
|
|
9619
|
+
const x = v.attributes.getNamedItem("stroke");
|
|
9620
|
+
if (x && x.value !== "none") {
|
|
9621
|
+
const F = x.value, I = `spiff-stroke-${F.replace(/\W/g, "")}`;
|
|
9622
|
+
v.classList.add(I), m[I] = { browserValue: F };
|
|
9623
9623
|
}
|
|
9624
9624
|
});
|
|
9625
|
-
const f =
|
|
9625
|
+
const f = Bt().serializeToString(g), S = i.colors;
|
|
9626
9626
|
if (S) {
|
|
9627
9627
|
for (const [v, b] of Object.entries(m))
|
|
9628
|
-
for (const
|
|
9629
|
-
if (b.browserValue ===
|
|
9630
|
-
m[v] = { browserValue: S[
|
|
9628
|
+
for (const x of Object.keys(S))
|
|
9629
|
+
if (b.browserValue === x) {
|
|
9630
|
+
m[v] = { browserValue: S[x] };
|
|
9631
9631
|
break;
|
|
9632
9632
|
}
|
|
9633
9633
|
}
|
|
9634
9634
|
const w = (v) => {
|
|
9635
9635
|
const b = n.find((F) => F.panelId === v.panelId);
|
|
9636
9636
|
if (!b)
|
|
9637
|
-
throw new
|
|
9638
|
-
const
|
|
9639
|
-
return new
|
|
9637
|
+
throw new J(v);
|
|
9638
|
+
const x = Q();
|
|
9639
|
+
return new q(
|
|
9640
9640
|
{
|
|
9641
9641
|
colors: m,
|
|
9642
|
-
id:
|
|
9642
|
+
id: x,
|
|
9643
9643
|
svg: f,
|
|
9644
9644
|
type: D.Illustration,
|
|
9645
9645
|
y: v.top,
|
|
@@ -9653,9 +9653,9 @@ const ls = [
|
|
|
9653
9653
|
},
|
|
9654
9654
|
b
|
|
9655
9655
|
);
|
|
9656
|
-
},
|
|
9656
|
+
}, P = a.data.regions;
|
|
9657
9657
|
try {
|
|
9658
|
-
return
|
|
9658
|
+
return P.map(w);
|
|
9659
9659
|
} catch (v) {
|
|
9660
9660
|
return console.error(v), [];
|
|
9661
9661
|
}
|
|
@@ -9663,9 +9663,9 @@ const ls = [
|
|
|
9663
9663
|
const a = await Ai(e.data.module), i = t.data, r = (s, l) => {
|
|
9664
9664
|
const c = n.find((A) => A.panelId === l.panelId);
|
|
9665
9665
|
if (!c)
|
|
9666
|
-
throw new
|
|
9667
|
-
const d =
|
|
9668
|
-
return new
|
|
9666
|
+
throw new J(l);
|
|
9667
|
+
const d = Q();
|
|
9668
|
+
return new q(
|
|
9669
9669
|
{
|
|
9670
9670
|
colors: {},
|
|
9671
9671
|
id: d,
|
|
@@ -9693,7 +9693,7 @@ const ls = [
|
|
|
9693
9693
|
const i = e.data, r = a.option;
|
|
9694
9694
|
if (!r)
|
|
9695
9695
|
return console.error(`No option for step ${a.stepName}.`), [];
|
|
9696
|
-
const o = r.variants?.find((d) => d.id === i.pictureVariantId) ||
|
|
9696
|
+
const o = r.variants?.find((d) => d.id === i.pictureVariantId) || se(r);
|
|
9697
9697
|
if (!o)
|
|
9698
9698
|
return console.error(`No variant with ID: ${i.pictureVariantId}`), [];
|
|
9699
9699
|
if (!o.asset)
|
|
@@ -9705,9 +9705,9 @@ const ls = [
|
|
|
9705
9705
|
const l = (d) => {
|
|
9706
9706
|
const A = n.find((h) => h.panelId === d.panelId);
|
|
9707
9707
|
if (!A)
|
|
9708
|
-
throw new
|
|
9709
|
-
const u =
|
|
9710
|
-
return new
|
|
9708
|
+
throw new J(d);
|
|
9709
|
+
const u = Q();
|
|
9710
|
+
return new q(
|
|
9711
9711
|
{
|
|
9712
9712
|
id: u,
|
|
9713
9713
|
src: s,
|
|
@@ -9734,14 +9734,14 @@ const ls = [
|
|
|
9734
9734
|
const i = e.data, r = a.option;
|
|
9735
9735
|
if (!r)
|
|
9736
9736
|
return console.error(`No option for step ${a.stepName}.`), [];
|
|
9737
|
-
const o = r.variants?.find((c) => c.id === i.colorVariantId) ||
|
|
9737
|
+
const o = r.variants?.find((c) => c.id === i.colorVariantId) || se(r);
|
|
9738
9738
|
if (!o)
|
|
9739
9739
|
return console.error(`No variant with ID: ${i.colorVariantId}`), [];
|
|
9740
9740
|
t[a.stepName] = { selectedVariants: [o] };
|
|
9741
9741
|
const s = (c) => {
|
|
9742
9742
|
const d = n.find((m) => m.panelId === c.panelId);
|
|
9743
9743
|
if (!d)
|
|
9744
|
-
throw new
|
|
9744
|
+
throw new J(c);
|
|
9745
9745
|
const A = `
|
|
9746
9746
|
<svg
|
|
9747
9747
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -9762,8 +9762,8 @@ const ls = [
|
|
|
9762
9762
|
fill="${o?.color}"
|
|
9763
9763
|
/>
|
|
9764
9764
|
</svg>
|
|
9765
|
-
`, h = { "spiff-fill-shape": { browserValue: o.color || "#000000" } }, g =
|
|
9766
|
-
return new
|
|
9765
|
+
`, h = { "spiff-fill-shape": { browserValue: o.color || "#000000" } }, g = Q();
|
|
9766
|
+
return new q(
|
|
9767
9767
|
{
|
|
9768
9768
|
colors: h,
|
|
9769
9769
|
id: g,
|
|
@@ -9793,9 +9793,9 @@ const ls = [
|
|
|
9793
9793
|
l.forEach((c) => {
|
|
9794
9794
|
const d = n.find((u) => u.panelId === c.panelId);
|
|
9795
9795
|
if (!d)
|
|
9796
|
-
throw new
|
|
9796
|
+
throw new J(c);
|
|
9797
9797
|
const A = {
|
|
9798
|
-
id:
|
|
9798
|
+
id: Q(),
|
|
9799
9799
|
src: r,
|
|
9800
9800
|
type: s,
|
|
9801
9801
|
y: c.top,
|
|
@@ -9811,24 +9811,24 @@ const ls = [
|
|
|
9811
9811
|
excludeFromExport: t.data.excludeFromPrint,
|
|
9812
9812
|
preserveAspectRatio: "none"
|
|
9813
9813
|
};
|
|
9814
|
-
a.push(new
|
|
9814
|
+
a.push(new q(A, d));
|
|
9815
9815
|
});
|
|
9816
9816
|
} catch (c) {
|
|
9817
9817
|
console.error(c);
|
|
9818
9818
|
}
|
|
9819
9819
|
else {
|
|
9820
9820
|
const c = await nt(r, !0), d = (A) => {
|
|
9821
|
-
const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], g = h?.length > 0 ? h[0] : "", f =
|
|
9821
|
+
const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], g = h?.length > 0 ? h[0] : "", f = ut().parseFromString(g, "image/svg+xml").firstElementChild;
|
|
9822
9822
|
if (!f)
|
|
9823
|
-
throw new
|
|
9824
|
-
return Pa(f),
|
|
9823
|
+
throw new xt("Failed to read SVG.");
|
|
9824
|
+
return Pa(f), Bt().serializeToString(f);
|
|
9825
9825
|
};
|
|
9826
9826
|
l.forEach((A) => {
|
|
9827
9827
|
const u = n.find((g) => g.panelId === A.panelId);
|
|
9828
9828
|
if (!u)
|
|
9829
|
-
throw new
|
|
9829
|
+
throw new J(A);
|
|
9830
9830
|
const h = {
|
|
9831
|
-
id:
|
|
9831
|
+
id: Q(),
|
|
9832
9832
|
src: r,
|
|
9833
9833
|
asset_key: r,
|
|
9834
9834
|
svg: d(c),
|
|
@@ -9846,7 +9846,7 @@ const ls = [
|
|
|
9846
9846
|
productOverlay: t.type === E.ProductOverlay ? !0 : void 0,
|
|
9847
9847
|
excludeFromExport: t.data.excludeFromPrint
|
|
9848
9848
|
};
|
|
9849
|
-
a.push(new
|
|
9849
|
+
a.push(new q(h, u));
|
|
9850
9850
|
});
|
|
9851
9851
|
}
|
|
9852
9852
|
return a;
|
|
@@ -9855,7 +9855,7 @@ const ls = [
|
|
|
9855
9855
|
const p = a.option;
|
|
9856
9856
|
if (!p)
|
|
9857
9857
|
return;
|
|
9858
|
-
const f = p.variants?.find((w) => w.id === r.fontVariantId) ||
|
|
9858
|
+
const f = p.variants?.find((w) => w.id === r.fontVariantId) || se(p);
|
|
9859
9859
|
if (!f || !f.asset)
|
|
9860
9860
|
return;
|
|
9861
9861
|
t[a.stepName] = { selectedVariants: [f] };
|
|
@@ -9866,7 +9866,7 @@ const ls = [
|
|
|
9866
9866
|
const p = l();
|
|
9867
9867
|
if (!p)
|
|
9868
9868
|
return;
|
|
9869
|
-
const f = await
|
|
9869
|
+
const f = await Nt(p);
|
|
9870
9870
|
return {
|
|
9871
9871
|
assetUrl: p,
|
|
9872
9872
|
name: f.names.fullName.en
|
|
@@ -9876,7 +9876,7 @@ const ls = [
|
|
|
9876
9876
|
uppercase: a.data.uppercase
|
|
9877
9877
|
}), h = async (p) => {
|
|
9878
9878
|
const f = p.colorOption;
|
|
9879
|
-
return f ?
|
|
9879
|
+
return f ? Y.getDefaultVariant(f)?.color : void 0;
|
|
9880
9880
|
}, g = r.color || await h(a.data), m = a.data.regions;
|
|
9881
9881
|
for (const p of m) {
|
|
9882
9882
|
const f = n.find((w) => w.panelId === p.panelId);
|
|
@@ -9884,7 +9884,7 @@ const ls = [
|
|
|
9884
9884
|
continue;
|
|
9885
9885
|
const S = {
|
|
9886
9886
|
stepName: e.name,
|
|
9887
|
-
id:
|
|
9887
|
+
id: Q(),
|
|
9888
9888
|
align: s(a.data),
|
|
9889
9889
|
curved: a.data.curved,
|
|
9890
9890
|
fill: r.color || g || "#000000",
|
|
@@ -9904,7 +9904,7 @@ const ls = [
|
|
|
9904
9904
|
y: p.top
|
|
9905
9905
|
};
|
|
9906
9906
|
if (d) {
|
|
9907
|
-
const [w,
|
|
9907
|
+
const [w, P] = ve(
|
|
9908
9908
|
a.data.size || o,
|
|
9909
9909
|
d,
|
|
9910
9910
|
p,
|
|
@@ -9921,18 +9921,18 @@ const ls = [
|
|
|
9921
9921
|
}
|
|
9922
9922
|
);
|
|
9923
9923
|
i.push(
|
|
9924
|
-
new
|
|
9924
|
+
new q(
|
|
9925
9925
|
{
|
|
9926
9926
|
...S,
|
|
9927
9927
|
fontSize: w,
|
|
9928
|
-
text: S.curved ? S.text : (
|
|
9928
|
+
text: S.curved ? S.text : (P || []).join(`
|
|
9929
9929
|
`)
|
|
9930
9930
|
},
|
|
9931
9931
|
f
|
|
9932
9932
|
)
|
|
9933
9933
|
);
|
|
9934
9934
|
} else
|
|
9935
|
-
i.push(new
|
|
9935
|
+
i.push(new q(S, f));
|
|
9936
9936
|
}
|
|
9937
9937
|
return i;
|
|
9938
9938
|
}, fs = (n, t) => n.conditions ? n.conditions.every((e) => {
|
|
@@ -10086,7 +10086,7 @@ class vs {
|
|
|
10086
10086
|
* Actions to perform when a static render event is fired for this canvas.
|
|
10087
10087
|
*/
|
|
10088
10088
|
async render(t) {
|
|
10089
|
-
const e =
|
|
10089
|
+
const e = bt(t);
|
|
10090
10090
|
this.lastRequestedRenderArguments = e;
|
|
10091
10091
|
const a = this.getStaticContext();
|
|
10092
10092
|
if (!a) {
|
|
@@ -10159,7 +10159,7 @@ class Es extends Wn {
|
|
|
10159
10159
|
l = r.width, c = r.height;
|
|
10160
10160
|
const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = ka(t.layoutState.layout, e, {
|
|
10161
10161
|
renderingConfiguration: {
|
|
10162
|
-
purpose:
|
|
10162
|
+
purpose: Jt.ThreeD,
|
|
10163
10163
|
templatingContext: d
|
|
10164
10164
|
}
|
|
10165
10165
|
}), u = xn(A), h = await va.from(this.ctx, u, {
|
|
@@ -10170,7 +10170,7 @@ class Es extends Wn {
|
|
|
10170
10170
|
ignoreMouse: !0,
|
|
10171
10171
|
enableRedraw: !1,
|
|
10172
10172
|
createCanvas: Ct,
|
|
10173
|
-
createImage:
|
|
10173
|
+
createImage: ne,
|
|
10174
10174
|
DOMParser: Ba(),
|
|
10175
10175
|
fetch
|
|
10176
10176
|
});
|
|
@@ -10193,9 +10193,9 @@ const Md = (n, t) => {
|
|
|
10193
10193
|
serializableWorkflow: { steps: [] },
|
|
10194
10194
|
layouts: {}
|
|
10195
10195
|
};
|
|
10196
|
-
i = new
|
|
10196
|
+
i = new $(e.map((l) => new ni(l))).apply(i);
|
|
10197
10197
|
const o = await Cs(n, t, e, a);
|
|
10198
|
-
return new
|
|
10198
|
+
return new $(o).apply(i);
|
|
10199
10199
|
}, Ge = C`
|
|
10200
10200
|
fragment GlobalPropertyStateAspectFields on GlobalPropertyStateAspect {
|
|
10201
10201
|
name
|
|
@@ -10917,7 +10917,7 @@ class on extends Wn {
|
|
|
10917
10917
|
}
|
|
10918
10918
|
}
|
|
10919
10919
|
const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
10920
|
-
id:
|
|
10920
|
+
id: Q(),
|
|
10921
10921
|
panelId: t.name,
|
|
10922
10922
|
name: t.name,
|
|
10923
10923
|
title: t.title,
|
|
@@ -10933,7 +10933,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
10933
10933
|
})), nl = (n, t) => {
|
|
10934
10934
|
const e = n.workflowState, a = e ? JSON.parse(e) : void 0;
|
|
10935
10935
|
return a ? Object.values(a.layouts).map((i) => i.layout) : al(t.panels);
|
|
10936
|
-
},
|
|
10936
|
+
}, Ht = class Ht {
|
|
10937
10937
|
constructor(t, e, a, i, r, o = !1, s, l = !1, c = !1, d = !1) {
|
|
10938
10938
|
this.workflowStatePromiseQueue = new qn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.setWorkflow = async (u) => {
|
|
10939
10939
|
this.confirmedDesign = !1, this.editedSteps = {}, this.informationResults = [], this.mandatorySteps = {}, this.pendingUpdates = [], this.selectionCost = 0, this.stepSpecificServices = {}, this.pollers = [], this.allScenes = [], this.stepElements = {}, this.stepInitialised = {}, this.stepMetadata = {}, this.stepSelections = {}, this.storage = {}, this.validationErrors = { steps: /* @__PURE__ */ new Map() }, this.currentAdjustingStepId = "", this.reloadedState ? this.layouts = Object.values(this.reloadedState.layouts || {}).map((g) => g.layout) : u ? this.layouts = nl(this.experience.getTransaction(), u) : this.layouts = [], this.commandContext.initialize(this.layouts, this.reloadedState), this.renderableContextService = new ws(this.layouts), this.renderableContextService.setWorkflowManager(this), u.steps.forEach((g) => {
|
|
@@ -11015,7 +11015,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11015
11015
|
}
|
|
11016
11016
|
});
|
|
11017
11017
|
else {
|
|
11018
|
-
const
|
|
11018
|
+
const P = await this.graphQlClient().mutate({
|
|
11019
11019
|
mutation: _s,
|
|
11020
11020
|
errorPolicy: "all",
|
|
11021
11021
|
fetchPolicy: "no-cache",
|
|
@@ -11040,7 +11040,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11040
11040
|
}
|
|
11041
11041
|
});
|
|
11042
11042
|
w.recipient = {
|
|
11043
|
-
id:
|
|
11043
|
+
id: P?.data?.recipientCreate?.id,
|
|
11044
11044
|
firstName: t,
|
|
11045
11045
|
lastName: e,
|
|
11046
11046
|
address: a,
|
|
@@ -11064,19 +11064,19 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11064
11064
|
fetchPolicy: "no-cache",
|
|
11065
11065
|
variables: {
|
|
11066
11066
|
id: this.experience.getTransaction().id,
|
|
11067
|
-
recipientId:
|
|
11067
|
+
recipientId: P.data?.recipientCreate?.id
|
|
11068
11068
|
},
|
|
11069
11069
|
context: {
|
|
11070
11070
|
transactionOwnerId: this.experience.getTransaction().transactionOwnerId
|
|
11071
11071
|
}
|
|
11072
11072
|
});
|
|
11073
11073
|
}
|
|
11074
|
-
await this.fetchConversionConfiguration(), this.recipientCallbacks.forEach((
|
|
11074
|
+
await this.fetchConversionConfiguration(), this.recipientCallbacks.forEach((P) => P(this.experience.getTransaction().recipient));
|
|
11075
11075
|
}
|
|
11076
11076
|
async fetchConversionConfiguration() {
|
|
11077
11077
|
const t = this.experience.getTransaction().recipient;
|
|
11078
11078
|
if (t?.conversionConfigurationId && !this.recipientConversionConfiguration) {
|
|
11079
|
-
const e =
|
|
11079
|
+
const e = Ht.configurationPromiseMap.get(
|
|
11080
11080
|
t.conversionConfigurationId
|
|
11081
11081
|
);
|
|
11082
11082
|
if (e)
|
|
@@ -11090,7 +11090,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11090
11090
|
id: t.conversionConfigurationId
|
|
11091
11091
|
}
|
|
11092
11092
|
})).data.conversionConfiguration)();
|
|
11093
|
-
|
|
11093
|
+
Ht.configurationPromiseMap.set(t.conversionConfigurationId, i), this.recipientConversionConfiguration = await i;
|
|
11094
11094
|
}
|
|
11095
11095
|
}
|
|
11096
11096
|
}
|
|
@@ -11104,8 +11104,8 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11104
11104
|
this.reloadedState && this.reloadedState.serializableWorkflow.steps.forEach((s) => {
|
|
11105
11105
|
this.storage[s.stepName] = s.storage || {};
|
|
11106
11106
|
}), await this.fetchConversionConfiguration(), this.allScenes = await uo(t);
|
|
11107
|
-
const i =
|
|
11108
|
-
this.commandContext.apply(new
|
|
11107
|
+
const i = St(this.allScenes, this.stepSelections).map((s) => s.silentSteps).flat(), { stepElements: r, commands: o } = await this.stepElementsForIntroducedSilentSteps(i, !!this.reloadedState);
|
|
11108
|
+
this.commandContext.apply(new $(o), !0), this.stepElements = { ...this.stepElements, ...r }, await this.ensureStepsAreLoaded(), this.isReloadedTransaction || this.updateStateWithServer(), this.renderLayouts(), this.reloadedState && e();
|
|
11109
11109
|
}
|
|
11110
11110
|
getWorkflowExperience() {
|
|
11111
11111
|
return this.experience;
|
|
@@ -11241,7 +11241,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11241
11241
|
this.pendingUpdates = this.pendingUpdates.filter((e) => e !== t);
|
|
11242
11242
|
}
|
|
11243
11243
|
markUpdatePending() {
|
|
11244
|
-
const t =
|
|
11244
|
+
const t = Q();
|
|
11245
11245
|
return this.pendingUpdates = [...this.pendingUpdates, t], t;
|
|
11246
11246
|
}
|
|
11247
11247
|
setEditedStatus(t, e) {
|
|
@@ -11257,7 +11257,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11257
11257
|
this.mandatorySteps[t] !== e && (this.mandatorySteps = { ...this.mandatorySteps, [t]: e }, this.onMandatoryChange());
|
|
11258
11258
|
}
|
|
11259
11259
|
getMandatoryUnfulfilledSteps() {
|
|
11260
|
-
return
|
|
11260
|
+
return St(this.allScenes, this.stepSelections).flatMap((r) => r.renderableSteps).filter((r) => r.mandatory).filter((r) => !this.mandatorySteps[r.stepName]).map((r) => r.stepName);
|
|
11261
11261
|
}
|
|
11262
11262
|
setStepError(t, e, a) {
|
|
11263
11263
|
let i = !1;
|
|
@@ -11294,7 +11294,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11294
11294
|
},
|
|
11295
11295
|
{ refocusCamera: e }
|
|
11296
11296
|
);
|
|
11297
|
-
this.setModelContainer(i),
|
|
11297
|
+
this.setModelContainer(i), St(this.allScenes, this.stepSelections).filter((s) => s).map((s) => s.renderableSteps).flat().filter((s) => s.type === E.Model || s.type === E.Material).forEach((s) => {
|
|
11298
11298
|
if (!s.option?.id) {
|
|
11299
11299
|
console.error(`Failed to read option id from step: ${s.stepName}`);
|
|
11300
11300
|
return;
|
|
@@ -11350,7 +11350,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11350
11350
|
...this.storage,
|
|
11351
11351
|
[t]: { ...this.storage[t], ...e }
|
|
11352
11352
|
};
|
|
11353
|
-
if (!
|
|
11353
|
+
if (!Yt(a, this.storage)) {
|
|
11354
11354
|
this.storage = a;
|
|
11355
11355
|
const i = new tn(this.constructSerializableWorkflow());
|
|
11356
11356
|
this.commandContext.apply(i, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
|
|
@@ -11401,7 +11401,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11401
11401
|
const t = this.getCommandContext().getState();
|
|
11402
11402
|
if (!t)
|
|
11403
11403
|
throw new R("Attempted to serialize state before it was initialized.");
|
|
11404
|
-
const e =
|
|
11404
|
+
const e = bt(t.transaction), a = this.dehydrateState(e);
|
|
11405
11405
|
return JSON.stringify(a);
|
|
11406
11406
|
}
|
|
11407
11407
|
/**
|
|
@@ -11437,12 +11437,12 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11437
11437
|
this.stepElements = e(this.stepElements, t);
|
|
11438
11438
|
}
|
|
11439
11439
|
getInvalidCanvasRegions() {
|
|
11440
|
-
return this.experience.getWorkflow()?.steps.reduce((t, e) => (
|
|
11440
|
+
return this.experience.getWorkflow()?.steps.reduce((t, e) => (Et(e, this.stepSelections) || this.stepElements[e.stepName] && this.stepElements[e.stepName].forEach(
|
|
11441
11441
|
(a) => t.push(a)
|
|
11442
11442
|
), t), []) || [];
|
|
11443
11443
|
}
|
|
11444
11444
|
getInvalidModelVariants() {
|
|
11445
|
-
return this.experience.getWorkflow()?.steps.reduce((t, e) => (e.type === E.Model && !
|
|
11445
|
+
return this.experience.getWorkflow()?.steps.reduce((t, e) => (e.type === E.Model && !Et(e, this.stepSelections) && t.push(e.stepName), t), []) || [];
|
|
11446
11446
|
}
|
|
11447
11447
|
async stepElementsForIntroducedSilentSteps(t, e) {
|
|
11448
11448
|
const a = this.experience.getProduct();
|
|
@@ -11539,14 +11539,14 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11539
11539
|
this.stepSelections = {
|
|
11540
11540
|
...this.stepSelections,
|
|
11541
11541
|
[t]: { selectedVariants: e }
|
|
11542
|
-
}, this.selectionCost = Object.values(this.stepSelections).reduce((b,
|
|
11543
|
-
|
|
11542
|
+
}, this.selectionCost = Object.values(this.stepSelections).reduce((b, x) => b + x.selectedVariants.map((F) => F.priceModifier || 0).reduce((F, N) => F + N, 0), 0), r.steps.forEach((b) => {
|
|
11543
|
+
Et(b, this.stepSelections) || (this.stepInitialised[b.stepName] = !1, delete this.stepMetadata[b.stepName], delete this.stepSelections[b.stepName], delete this.storage[b.stepName]);
|
|
11544
11544
|
});
|
|
11545
|
-
const s = this.allScenes, l =
|
|
11546
|
-
(b) => !d.some((
|
|
11545
|
+
const s = this.allScenes, l = St(s, o), c = St(s, this.stepSelections), d = l.map((b) => b.silentSteps).flat(), u = c.map((b) => b.silentSteps).flat().filter(
|
|
11546
|
+
(b) => !d.some((x) => x.stepName === b.stepName)
|
|
11547
11547
|
);
|
|
11548
11548
|
d.forEach((b) => {
|
|
11549
|
-
|
|
11549
|
+
Et(b, this.stepSelections) || (this.stepInitialised[b.stepName] = !1);
|
|
11550
11550
|
});
|
|
11551
11551
|
const h = this.getInvalidCanvasRegions(), { stepElements: g, commands: m } = await this.stepElementsForIntroducedSilentSteps(u, !1);
|
|
11552
11552
|
this.stepElements = {
|
|
@@ -11555,14 +11555,14 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11555
11555
|
[t]: a
|
|
11556
11556
|
}, this.removeElements(h);
|
|
11557
11557
|
const p = r.steps.find((b) => b.stepName === t);
|
|
11558
|
-
p?.type === E.Frame && this.getWorkflowExperience().getStepById(p.stepName)?.frameService?.setTargetElements(a.map((
|
|
11559
|
-
const f = h.map((b) => new
|
|
11560
|
-
w.length > 0 && this.commandContext.apply(new
|
|
11561
|
-
const
|
|
11558
|
+
p?.type === E.Frame && this.getWorkflowExperience().getStepById(p.stepName)?.frameService?.setTargetElements(a.map((x) => x.id));
|
|
11559
|
+
const f = h.map((b) => new Qt(b.id)), S = new tn(this.constructSerializableWorkflow()), w = [...m, ...f, S];
|
|
11560
|
+
w.length > 0 && this.commandContext.apply(new $(w), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
|
|
11561
|
+
const P = this.getInvalidModelVariants(), v = this.modelContainer;
|
|
11562
11562
|
if (v) {
|
|
11563
|
-
const b =
|
|
11564
|
-
(
|
|
11565
|
-
|
|
11563
|
+
const b = P.map(
|
|
11564
|
+
(x) => v.applyModelVariant(
|
|
11565
|
+
x,
|
|
11566
11566
|
{
|
|
11567
11567
|
contextService: this.getLayoutPreviewService()
|
|
11568
11568
|
},
|
|
@@ -11574,7 +11574,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11574
11574
|
await this.onSelectionChange(), i && await i();
|
|
11575
11575
|
}
|
|
11576
11576
|
async ensureStepsAreLoaded() {
|
|
11577
|
-
const e =
|
|
11577
|
+
const e = St(this.allScenes, this.stepSelections).map((l) => l.renderableSteps), a = [], i = e.flat();
|
|
11578
11578
|
for (const l of i)
|
|
11579
11579
|
if (!this.stepInitialised[l.stepName])
|
|
11580
11580
|
switch (this.stepInitialised[l.stepName] = !0, l.type) {
|
|
@@ -11588,7 +11588,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11588
11588
|
);
|
|
11589
11589
|
break;
|
|
11590
11590
|
case E.Frame:
|
|
11591
|
-
a.push(
|
|
11591
|
+
a.push(vt.init(l, this, this.reloadedState));
|
|
11592
11592
|
break;
|
|
11593
11593
|
case E.Illustration:
|
|
11594
11594
|
a.push(
|
|
@@ -11621,10 +11621,10 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11621
11621
|
);
|
|
11622
11622
|
break;
|
|
11623
11623
|
case E.Shape:
|
|
11624
|
-
a.push(
|
|
11624
|
+
a.push(Gt.init(l, this, this.reloadedState));
|
|
11625
11625
|
break;
|
|
11626
11626
|
case E.Text:
|
|
11627
|
-
a.push(
|
|
11627
|
+
a.push(H.init(l, this, this.reloadedState));
|
|
11628
11628
|
break;
|
|
11629
11629
|
}
|
|
11630
11630
|
const r = (await Promise.allSettled(a)).map((l) => {
|
|
@@ -11632,7 +11632,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11632
11632
|
throw new Error(`Step initialization failed: ${l.reason}`);
|
|
11633
11633
|
return l.value;
|
|
11634
11634
|
}), o = r.filter((l) => !!l && !!l.command).map((l) => l.command), s = r.filter((l) => !!l && !!l.followup).map((l) => l.followup);
|
|
11635
|
-
o && o.length > 0 && this.commandContext.apply(new
|
|
11635
|
+
o && o.length > 0 && this.commandContext.apply(new $(o), !0);
|
|
11636
11636
|
for (const l of s) await l();
|
|
11637
11637
|
s.length > 0 && await this.ensureStepsAreLoaded(), this.onInitChange();
|
|
11638
11638
|
}
|
|
@@ -11686,9 +11686,9 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11686
11686
|
return mo(this.allScenes, this.stepSelections, this.singleVariantsRenderable);
|
|
11687
11687
|
}
|
|
11688
11688
|
};
|
|
11689
|
-
|
|
11690
|
-
let Ca =
|
|
11691
|
-
class
|
|
11689
|
+
Ht.configurationPromiseMap = /* @__PURE__ */ new Map();
|
|
11690
|
+
let Ca = Ht;
|
|
11691
|
+
class st {
|
|
11692
11692
|
constructor(t) {
|
|
11693
11693
|
this.variantData = t;
|
|
11694
11694
|
}
|
|
@@ -11768,7 +11768,7 @@ class ot {
|
|
|
11768
11768
|
return this.variantData.enabled;
|
|
11769
11769
|
}
|
|
11770
11770
|
}
|
|
11771
|
-
const
|
|
11771
|
+
const jt = class jt {
|
|
11772
11772
|
constructor(t, e, a) {
|
|
11773
11773
|
this.manager = t, this.step = e, this.tags = a;
|
|
11774
11774
|
}
|
|
@@ -11778,7 +11778,7 @@ const Yt = class Yt {
|
|
|
11778
11778
|
* @param value The new value
|
|
11779
11779
|
*/
|
|
11780
11780
|
setUpdateState(t) {
|
|
11781
|
-
|
|
11781
|
+
jt.updateState.set(
|
|
11782
11782
|
`${this.step.stepName}-${this.manager.getWorkflowExperience().getTransaction().id}`,
|
|
11783
11783
|
t
|
|
11784
11784
|
);
|
|
@@ -11787,7 +11787,7 @@ const Yt = class Yt {
|
|
|
11787
11787
|
* @returns Gets the current update state of this step. All step handles for this step will see this value.
|
|
11788
11788
|
*/
|
|
11789
11789
|
getUpdateState() {
|
|
11790
|
-
return !!
|
|
11790
|
+
return !!jt.updateState.get(
|
|
11791
11791
|
`${this.step.stepName}-${this.manager.getWorkflowExperience().getTransaction().id}`
|
|
11792
11792
|
);
|
|
11793
11793
|
}
|
|
@@ -11797,19 +11797,19 @@ const Yt = class Yt {
|
|
|
11797
11797
|
getCurrentVariant() {
|
|
11798
11798
|
const a = this.manager.getWorkflowSelections()[this.step.stepName]?.selections[0];
|
|
11799
11799
|
if (a)
|
|
11800
|
-
return new
|
|
11800
|
+
return new st(a);
|
|
11801
11801
|
}
|
|
11802
11802
|
/**
|
|
11803
11803
|
* @returns A list of valid variants for this step. Does not include disabled variants.
|
|
11804
11804
|
*/
|
|
11805
11805
|
getAvailableVariants() {
|
|
11806
|
-
return (this.step.option?.variants?.filter((e) => e.enabled) || []).map((e) => new
|
|
11806
|
+
return (this.step.option?.variants?.filter((e) => e.enabled) || []).map((e) => new st(e));
|
|
11807
11807
|
}
|
|
11808
11808
|
/**
|
|
11809
11809
|
* @returns A list of all variants for this step, including disabled ones.
|
|
11810
11810
|
*/
|
|
11811
11811
|
getAllVariants() {
|
|
11812
|
-
return (this.step.option?.variants || []).map((e) => new
|
|
11812
|
+
return (this.step.option?.variants || []).map((e) => new st(e));
|
|
11813
11813
|
}
|
|
11814
11814
|
/**
|
|
11815
11815
|
* @returns A unique identifier for this step within the workflow.
|
|
@@ -11899,9 +11899,9 @@ const Yt = class Yt {
|
|
|
11899
11899
|
e ? r && e.executeCameraAnimation(r) : console.warn("No preview service available, cannot execute camera animations."), a ? i && a.executeAnimation(i, t) : console.warn("No model container available, cannot execute model animations.");
|
|
11900
11900
|
}
|
|
11901
11901
|
};
|
|
11902
|
-
|
|
11903
|
-
let
|
|
11904
|
-
class il extends
|
|
11902
|
+
jt.updateState = /* @__PURE__ */ new Map();
|
|
11903
|
+
let tt = jt;
|
|
11904
|
+
class il extends tt {
|
|
11905
11905
|
constructor(t, e, a) {
|
|
11906
11906
|
super(t, e, a);
|
|
11907
11907
|
}
|
|
@@ -11927,7 +11927,7 @@ class il extends et {
|
|
|
11927
11927
|
getColors() {
|
|
11928
11928
|
const t = this.manager.getRegionElements(this.step.stepName) || [];
|
|
11929
11929
|
if (t.length === 0) return;
|
|
11930
|
-
const a =
|
|
11930
|
+
const a = L(t[0].id, this.manager.getAllLayoutData()).colors, r = this.getCurrentVariant()?.getAssetResource()?.assetConfiguration, o = r?.defaultColorVariants || [];
|
|
11931
11931
|
if (o.length !== 0) {
|
|
11932
11932
|
const s = {};
|
|
11933
11933
|
return o.forEach((l) => {
|
|
@@ -11975,7 +11975,7 @@ class il extends et {
|
|
|
11975
11975
|
return this.step.data.pmsPickerEnabled ?? !1;
|
|
11976
11976
|
}
|
|
11977
11977
|
}
|
|
11978
|
-
class rl extends
|
|
11978
|
+
class rl extends tt {
|
|
11979
11979
|
constructor(t, e, a) {
|
|
11980
11980
|
super(t, e, a);
|
|
11981
11981
|
}
|
|
@@ -11988,7 +11988,7 @@ class rl extends et {
|
|
|
11988
11988
|
);
|
|
11989
11989
|
}
|
|
11990
11990
|
}
|
|
11991
|
-
class ol extends
|
|
11991
|
+
class ol extends tt {
|
|
11992
11992
|
constructor(t, e, a) {
|
|
11993
11993
|
super(t, e, a);
|
|
11994
11994
|
}
|
|
@@ -12001,7 +12001,7 @@ class ol extends et {
|
|
|
12001
12001
|
);
|
|
12002
12002
|
}
|
|
12003
12003
|
}
|
|
12004
|
-
class sl extends
|
|
12004
|
+
class sl extends tt {
|
|
12005
12005
|
constructor(t, e, a) {
|
|
12006
12006
|
super(t, e, a);
|
|
12007
12007
|
}
|
|
@@ -12019,7 +12019,7 @@ class sl extends et {
|
|
|
12019
12019
|
);
|
|
12020
12020
|
}
|
|
12021
12021
|
}
|
|
12022
|
-
class ll extends
|
|
12022
|
+
class ll extends tt {
|
|
12023
12023
|
constructor(t, e, a) {
|
|
12024
12024
|
super(t, e, a);
|
|
12025
12025
|
}
|
|
@@ -12035,13 +12035,13 @@ class ll extends et {
|
|
|
12035
12035
|
return this.step.data.displayType || this.step.option?.displayType;
|
|
12036
12036
|
}
|
|
12037
12037
|
}
|
|
12038
|
-
class cl extends
|
|
12038
|
+
class cl extends tt {
|
|
12039
12039
|
constructor(t, e, a) {
|
|
12040
12040
|
super(t, e, a);
|
|
12041
12041
|
}
|
|
12042
12042
|
selectVariant(t) {
|
|
12043
12043
|
const e = t.getResource();
|
|
12044
|
-
return
|
|
12044
|
+
return Gt.selectVariant(
|
|
12045
12045
|
this.step,
|
|
12046
12046
|
{
|
|
12047
12047
|
fill: e.color,
|
|
@@ -12059,7 +12059,7 @@ class cl extends et {
|
|
|
12059
12059
|
* @deprecated The shape step can now pass through colors returned by getColors via selectVariant. Please swap setColor for selectVariant.
|
|
12060
12060
|
*/
|
|
12061
12061
|
setColor(t) {
|
|
12062
|
-
return
|
|
12062
|
+
return Gt.selectVariant(
|
|
12063
12063
|
this.step,
|
|
12064
12064
|
t,
|
|
12065
12065
|
this.manager.getRegionElements(this.step.stepName) || [],
|
|
@@ -12071,7 +12071,7 @@ class cl extends et {
|
|
|
12071
12071
|
* @returns A list of color definitions that are currently applied to the illustration.
|
|
12072
12072
|
*/
|
|
12073
12073
|
getColors() {
|
|
12074
|
-
return
|
|
12074
|
+
return Gt.availableColours(this.step);
|
|
12075
12075
|
}
|
|
12076
12076
|
/**
|
|
12077
12077
|
* Allows for setting a custom color when the custom variant is selected. Will
|
|
@@ -12080,7 +12080,7 @@ class cl extends et {
|
|
|
12080
12080
|
setCustomColor(t) {
|
|
12081
12081
|
return this.getCurrentVariant()?.getColor() !== "#custom" && console.warn(
|
|
12082
12082
|
`setting custom color for step ${this.step.stepName} but color is ${this.getCurrentVariant()?.getColor()}`
|
|
12083
|
-
),
|
|
12083
|
+
), Gt.setCustomColor(t, this.step, this.manager);
|
|
12084
12084
|
}
|
|
12085
12085
|
getCustomColor() {
|
|
12086
12086
|
this.getCurrentVariant()?.getColor() !== "#custom" && console.warn(
|
|
@@ -12094,7 +12094,7 @@ class cl extends et {
|
|
|
12094
12094
|
return t;
|
|
12095
12095
|
}
|
|
12096
12096
|
}
|
|
12097
|
-
class dl extends
|
|
12097
|
+
class dl extends tt {
|
|
12098
12098
|
constructor(t, e, a) {
|
|
12099
12099
|
super(t, e, a);
|
|
12100
12100
|
}
|
|
@@ -12103,7 +12103,7 @@ class dl extends et {
|
|
|
12103
12103
|
* @param variant The font variant to use.
|
|
12104
12104
|
*/
|
|
12105
12105
|
async selectVariant(t) {
|
|
12106
|
-
|
|
12106
|
+
H.selectVariant(
|
|
12107
12107
|
this.step,
|
|
12108
12108
|
t.getResource(),
|
|
12109
12109
|
this.manager,
|
|
@@ -12130,7 +12130,7 @@ class dl extends et {
|
|
|
12130
12130
|
* @returns A list of colors that can be used to fill the text.
|
|
12131
12131
|
*/
|
|
12132
12132
|
getAvailableFillColors() {
|
|
12133
|
-
return this.step.data.colorPickerEnabled ?
|
|
12133
|
+
return this.step.data.colorPickerEnabled ? H.availableFillColors(this.step) : [];
|
|
12134
12134
|
}
|
|
12135
12135
|
/**
|
|
12136
12136
|
* Changes the fill of text related to this step to the new fill value.
|
|
@@ -12138,7 +12138,7 @@ class dl extends et {
|
|
|
12138
12138
|
*/
|
|
12139
12139
|
async setFillColor(t) {
|
|
12140
12140
|
const e = this.manager.getRegionElements(this.step.stepName);
|
|
12141
|
-
await
|
|
12141
|
+
await H.changeFillColor(this.step, t, e, this.manager);
|
|
12142
12142
|
}
|
|
12143
12143
|
/**
|
|
12144
12144
|
* Gets the color currently applied to the element.
|
|
@@ -12147,21 +12147,21 @@ class dl extends et {
|
|
|
12147
12147
|
return this.manager.getStepStorage(this.step.stepName)?.color || "#000000";
|
|
12148
12148
|
}
|
|
12149
12149
|
getAvailableFillImages() {
|
|
12150
|
-
return
|
|
12150
|
+
return H.availableFillImages(this.step);
|
|
12151
12151
|
}
|
|
12152
12152
|
async setFillImage(t) {
|
|
12153
12153
|
const e = this.manager.getRegionElements(this.step.stepName);
|
|
12154
|
-
await
|
|
12154
|
+
await H.changeFillImage(this.step, t, e, this.manager);
|
|
12155
12155
|
}
|
|
12156
12156
|
getFillImage() {
|
|
12157
12157
|
return this.manager.getStepStorage(this.step.stepName)?.fillImage;
|
|
12158
12158
|
}
|
|
12159
12159
|
getAlignment() {
|
|
12160
|
-
return
|
|
12160
|
+
return H.findLayoutElements(this.manager, this.step)?.[0].align;
|
|
12161
12161
|
}
|
|
12162
12162
|
setAlignment(t) {
|
|
12163
12163
|
const e = this.manager.getRegionElements(this.step.stepName);
|
|
12164
|
-
|
|
12164
|
+
H.changeAlignment(this.step, t, e, this.manager);
|
|
12165
12165
|
}
|
|
12166
12166
|
/**
|
|
12167
12167
|
* When true & the step has replaceable text configured the user will be
|
|
@@ -12184,11 +12184,11 @@ class dl extends et {
|
|
|
12184
12184
|
const e = {
|
|
12185
12185
|
input: t,
|
|
12186
12186
|
helperData: {}
|
|
12187
|
-
}, a =
|
|
12187
|
+
}, a = H.findLayoutElements(this.manager, this.step), i = H.filterUnsupportedCharacters(t, a[0]?.fontData), r = Dt(i, this.manager).length, o = !!this.step.data && !!this.step.data.maxLength && r > this.step.data.maxLength;
|
|
12188
12188
|
o || (e.input = i);
|
|
12189
12189
|
const s = a.length <= 0, l = s ? { inputText: i, text: i } : { inputText: i };
|
|
12190
12190
|
this.manager.updateStorage(this.step.stepName, l);
|
|
12191
|
-
const c = this.manager.getStepStorage(this.step.stepName), d =
|
|
12191
|
+
const c = this.manager.getStepStorage(this.step.stepName), d = H.getProcessedInput(
|
|
12192
12192
|
i,
|
|
12193
12193
|
this.step.data,
|
|
12194
12194
|
c?.customiseAllText ?? !1
|
|
@@ -12198,7 +12198,7 @@ class dl extends et {
|
|
|
12198
12198
|
text: d
|
|
12199
12199
|
});
|
|
12200
12200
|
else {
|
|
12201
|
-
const { command: A, errorData: u, helperData: h } =
|
|
12201
|
+
const { command: A, errorData: u, helperData: h } = H.updateInputText(
|
|
12202
12202
|
i,
|
|
12203
12203
|
a,
|
|
12204
12204
|
this.step,
|
|
@@ -12235,8 +12235,8 @@ class dl extends et {
|
|
|
12235
12235
|
if (!this.manager.getStepStorage(this.step.stepName)?.defaultCleared && this.step.data.deleteDefaultOnFocus) {
|
|
12236
12236
|
const e = this.setText("");
|
|
12237
12237
|
this.manager.updateStorage(this.step.stepName, { defaultCleared: !0, inputText: "" });
|
|
12238
|
-
const a =
|
|
12239
|
-
return
|
|
12238
|
+
const a = H.findLayoutElements(this.manager, this.step);
|
|
12239
|
+
return H.updateInputText("", a, this.step, this.manager), e;
|
|
12240
12240
|
}
|
|
12241
12241
|
}
|
|
12242
12242
|
hasColorPicker() {
|
|
@@ -12260,7 +12260,7 @@ class dl extends et {
|
|
|
12260
12260
|
const t = this.step.data.maxLength;
|
|
12261
12261
|
if (t === void 0)
|
|
12262
12262
|
return;
|
|
12263
|
-
const e =
|
|
12263
|
+
const e = Dt(this.getText(), this.manager);
|
|
12264
12264
|
return t - e.length;
|
|
12265
12265
|
}
|
|
12266
12266
|
setCustomColor(t) {
|
|
@@ -12273,7 +12273,7 @@ class dl extends et {
|
|
|
12273
12273
|
* @returns A list of colors that can be used for the text's outline.
|
|
12274
12274
|
*/
|
|
12275
12275
|
getAvailableStrokeColors() {
|
|
12276
|
-
return this.step.data.strokeEnabled ?
|
|
12276
|
+
return this.step.data.strokeEnabled ? H.availableStrokeColors(this.step) : [];
|
|
12277
12277
|
}
|
|
12278
12278
|
getStrokeColor() {
|
|
12279
12279
|
return this.manager.getStepStorage(this.step.stepName)?.strokeColor?.browserValue || "#000000";
|
|
@@ -12284,10 +12284,10 @@ class dl extends et {
|
|
|
12284
12284
|
*/
|
|
12285
12285
|
async setStrokeColor(t) {
|
|
12286
12286
|
const e = this.manager.getRegionElements(this.step.stepName);
|
|
12287
|
-
await
|
|
12287
|
+
await H.changeStrokeColor(this.step, t, e, this.manager);
|
|
12288
12288
|
}
|
|
12289
12289
|
}
|
|
12290
|
-
class Al extends
|
|
12290
|
+
class Al extends tt {
|
|
12291
12291
|
constructor(t, e, a) {
|
|
12292
12292
|
super(t, e, a);
|
|
12293
12293
|
}
|
|
@@ -12300,7 +12300,7 @@ class Al extends et {
|
|
|
12300
12300
|
return this.step.data.content;
|
|
12301
12301
|
}
|
|
12302
12302
|
}
|
|
12303
|
-
class ul extends
|
|
12303
|
+
class ul extends tt {
|
|
12304
12304
|
constructor(t, e, a) {
|
|
12305
12305
|
super(t, e, a);
|
|
12306
12306
|
}
|
|
@@ -12326,7 +12326,7 @@ class ul extends et {
|
|
|
12326
12326
|
);
|
|
12327
12327
|
}
|
|
12328
12328
|
}
|
|
12329
|
-
class hl extends
|
|
12329
|
+
class hl extends tt {
|
|
12330
12330
|
constructor(t, e, a) {
|
|
12331
12331
|
super(t, e, a);
|
|
12332
12332
|
}
|
|
@@ -12341,7 +12341,7 @@ class hl extends et {
|
|
|
12341
12341
|
const t = this.step.data.maxLength;
|
|
12342
12342
|
if (t === void 0)
|
|
12343
12343
|
return;
|
|
12344
|
-
const e =
|
|
12344
|
+
const e = Dt(this.getText(), this.manager);
|
|
12345
12345
|
return t - e.length;
|
|
12346
12346
|
}
|
|
12347
12347
|
/**
|
|
@@ -12475,7 +12475,7 @@ const hi = C`
|
|
|
12475
12475
|
}
|
|
12476
12476
|
}
|
|
12477
12477
|
`;
|
|
12478
|
-
function
|
|
12478
|
+
function te(n) {
|
|
12479
12479
|
const t = JSON.parse(atob(n.split(".")[1])).exp;
|
|
12480
12480
|
return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) >= t;
|
|
12481
12481
|
}
|
|
@@ -12485,7 +12485,7 @@ const pl = async (n, t) => {
|
|
|
12485
12485
|
if (!t) throw new Error();
|
|
12486
12486
|
} catch {
|
|
12487
12487
|
const o = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))?.[0] || "", s = localStorage.getItem(o);
|
|
12488
|
-
s && !
|
|
12488
|
+
s && !te(s) && (e.Authorization = `Bearer ${s}`);
|
|
12489
12489
|
}
|
|
12490
12490
|
return (await y.getShadowGraphqlClient().mutate({
|
|
12491
12491
|
mutation: gl,
|
|
@@ -12511,7 +12511,7 @@ const pl = async (n, t) => {
|
|
|
12511
12511
|
if (!t) throw new Error();
|
|
12512
12512
|
} catch {
|
|
12513
12513
|
const o = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))?.[0] || "", s = localStorage.getItem(o);
|
|
12514
|
-
s && !
|
|
12514
|
+
s && !te(s) && (e.Authorization = `Bearer ${s}`);
|
|
12515
12515
|
}
|
|
12516
12516
|
return (await y.getShadowGraphqlClient().mutate({
|
|
12517
12517
|
mutation: ml,
|
|
@@ -12590,7 +12590,7 @@ const pl = async (n, t) => {
|
|
|
12590
12590
|
}
|
|
12591
12591
|
return i;
|
|
12592
12592
|
}, gi = (n, t, e, a, i, r, o, s) => {
|
|
12593
|
-
const l = t.basePrice || 0, c = n.priceModifierTotal || 0, d = Cl(a, e, void 0, r), u = (
|
|
12593
|
+
const l = t.basePrice || 0, c = n.priceModifierTotal || 0, d = Cl(a, e, void 0, r), u = (T.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), h = {
|
|
12594
12594
|
additionalExternalProductId: n.integrationProduct?.additionalExternalProductId,
|
|
12595
12595
|
additionalExternalVariantId: n.integrationProduct?.additionalExternalVariantId,
|
|
12596
12596
|
baseCost: l,
|
|
@@ -12616,7 +12616,7 @@ const pl = async (n, t) => {
|
|
|
12616
12616
|
await (async () => {
|
|
12617
12617
|
if (c !== void 0) return c;
|
|
12618
12618
|
await n.outstandingRequestsPromise();
|
|
12619
|
-
const N = (
|
|
12619
|
+
const N = (T.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(i.id), k = await y.getShadowGraphqlClient().query({
|
|
12620
12620
|
query: zn,
|
|
12621
12621
|
variables: { ids: [i.id] },
|
|
12622
12622
|
fetchPolicy: "no-cache",
|
|
@@ -12624,49 +12624,49 @@ const pl = async (n, t) => {
|
|
|
12624
12624
|
context: {
|
|
12625
12625
|
transactionOwnerId: N
|
|
12626
12626
|
}
|
|
12627
|
-
}),
|
|
12628
|
-
return
|
|
12629
|
-
|
|
12630
|
-
}), null) :
|
|
12627
|
+
}), V = k.data?.transactions[0].workflowState;
|
|
12628
|
+
return k.errors ? (k.errors.forEach((M) => {
|
|
12629
|
+
k.errors && console.log("Server Error:", M.message);
|
|
12630
|
+
}), null) : V ?? null;
|
|
12631
12631
|
})() || (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"));
|
|
12632
12632
|
const u = n.getPreviewService(), h = t?.finalizeStepConfig?.lookAtAnimation, g = u && t.showModelOnFinishStep && !!h, m = l && sn(l, t, !0), p = l && sn(l, t, !1), f = async (F) => {
|
|
12633
12633
|
const N = {};
|
|
12634
|
-
let
|
|
12634
|
+
let I = 0;
|
|
12635
12635
|
if (Object.keys(r).length > 0)
|
|
12636
|
-
for (const
|
|
12637
|
-
const
|
|
12638
|
-
for (let
|
|
12639
|
-
const
|
|
12640
|
-
if (
|
|
12641
|
-
const
|
|
12642
|
-
N[
|
|
12643
|
-
id:
|
|
12644
|
-
name:
|
|
12645
|
-
priceModifier:
|
|
12646
|
-
}) : N[
|
|
12636
|
+
for (const k of Object.keys(r)) {
|
|
12637
|
+
const V = r[k], M = t.steps.find((W) => W.stepName === k);
|
|
12638
|
+
for (let W = 0; W < V.selections.length; ++W) {
|
|
12639
|
+
const it = V.selections[W];
|
|
12640
|
+
if (M && (!F || M.option && (M.option.variants || []).length > 1 && !M.data.hideSelectionInCart && !M.data.hideSelectionsInCart)) {
|
|
12641
|
+
const et = M.stepTitle;
|
|
12642
|
+
N[et] ? N[et].push({
|
|
12643
|
+
id: it.id || "",
|
|
12644
|
+
name: it.name,
|
|
12645
|
+
priceModifier: it.priceModifier
|
|
12646
|
+
}) : N[et] = [
|
|
12647
12647
|
{
|
|
12648
|
-
id:
|
|
12649
|
-
name:
|
|
12650
|
-
priceModifier:
|
|
12648
|
+
id: it.id || "",
|
|
12649
|
+
name: it.name,
|
|
12650
|
+
priceModifier: it.priceModifier
|
|
12651
12651
|
}
|
|
12652
12652
|
];
|
|
12653
12653
|
}
|
|
12654
|
-
|
|
12654
|
+
I += it.priceModifier;
|
|
12655
12655
|
}
|
|
12656
12656
|
}
|
|
12657
|
-
return [N,
|
|
12657
|
+
return [N, I];
|
|
12658
12658
|
}, [S] = await f(!0), w = Object.fromEntries(
|
|
12659
12659
|
Object.keys(S).map((F) => [F, S[F].map((N) => N.id)])
|
|
12660
|
-
), [
|
|
12661
|
-
Object.keys(
|
|
12660
|
+
), [P] = await f(!1), v = Object.fromEntries(
|
|
12661
|
+
Object.keys(P).map((F) => [
|
|
12662
12662
|
F,
|
|
12663
|
-
|
|
12663
|
+
P[F].map((N) => N.id)
|
|
12664
12664
|
])
|
|
12665
12665
|
);
|
|
12666
12666
|
let b = await s(g, i.id);
|
|
12667
12667
|
if (b) {
|
|
12668
|
-
const F = await (await
|
|
12669
|
-
b = (await
|
|
12668
|
+
const F = await (await rt(b)).blob();
|
|
12669
|
+
b = (await U.uploadAsset(
|
|
12670
12670
|
{ name: `${i.id}-preview-image.png`, blob: F },
|
|
12671
12671
|
Ie.Image,
|
|
12672
12672
|
!0,
|
|
@@ -12688,14 +12688,14 @@ const pl = async (n, t) => {
|
|
|
12688
12688
|
};
|
|
12689
12689
|
if (p) {
|
|
12690
12690
|
const N = [];
|
|
12691
|
-
for (const [
|
|
12692
|
-
N.push({ key:
|
|
12691
|
+
for (const [I, k] of Object.entries(p))
|
|
12692
|
+
N.push({ key: I, value: k });
|
|
12693
12693
|
F.metadata = N;
|
|
12694
12694
|
}
|
|
12695
12695
|
if (w) {
|
|
12696
12696
|
const N = [];
|
|
12697
|
-
for (const [
|
|
12698
|
-
N.push({ key:
|
|
12697
|
+
for (const [I, k] of Object.entries(v))
|
|
12698
|
+
N.push({ key: I, ids: k });
|
|
12699
12699
|
F.selectedVariants = N;
|
|
12700
12700
|
}
|
|
12701
12701
|
return F;
|
|
@@ -12801,7 +12801,7 @@ class Sl {
|
|
|
12801
12801
|
*/
|
|
12802
12802
|
async getSavedDesigns() {
|
|
12803
12803
|
if (this.storageMethod === "Local") {
|
|
12804
|
-
const t =
|
|
12804
|
+
const t = T.get(this.localPersistenceKey);
|
|
12805
12805
|
return t ? JSON.parse(t) : [];
|
|
12806
12806
|
}
|
|
12807
12807
|
throw new R("Unexpected storage method requested");
|
|
@@ -12841,7 +12841,7 @@ class Sl {
|
|
|
12841
12841
|
}
|
|
12842
12842
|
async setDesigns(t) {
|
|
12843
12843
|
if (this.storageMethod === "Local") {
|
|
12844
|
-
|
|
12844
|
+
T.set(this.localPersistenceKey, JSON.stringify(t));
|
|
12845
12845
|
return;
|
|
12846
12846
|
}
|
|
12847
12847
|
throw new R("Unexpected storage method requested");
|
|
@@ -12891,7 +12891,7 @@ const ra = new Sl(), vl = C`
|
|
|
12891
12891
|
}
|
|
12892
12892
|
`, ln = C`
|
|
12893
12893
|
${Le}
|
|
12894
|
-
${
|
|
12894
|
+
${re}
|
|
12895
12895
|
mutation TransactionUpdateIntegrationProduct($id: String!, $integrationProductId: String) {
|
|
12896
12896
|
transactionUpdateIntegrationProduct(id: $id, integrationProductId: $integrationProductId) {
|
|
12897
12897
|
id
|
|
@@ -13165,7 +13165,7 @@ class Il {
|
|
|
13165
13165
|
throw new Re("Failed to obtain 2D context for preview image creation");
|
|
13166
13166
|
const g = this.workflowManager.getTemplatingContext(), m = ka(u.layoutState.layout, u.layoutState.elements, {
|
|
13167
13167
|
renderingConfiguration: {
|
|
13168
|
-
purpose:
|
|
13168
|
+
purpose: Jt.Print,
|
|
13169
13169
|
region: { left: A.x, top: A.y, width: A.width, height: A.height },
|
|
13170
13170
|
templatingContext: g
|
|
13171
13171
|
}
|
|
@@ -13174,7 +13174,7 @@ class Il {
|
|
|
13174
13174
|
anonymousCrossOrigin: !0,
|
|
13175
13175
|
ignoreDimensions: !1,
|
|
13176
13176
|
createCanvas: Ct,
|
|
13177
|
-
createImage:
|
|
13177
|
+
createImage: ne,
|
|
13178
13178
|
DOMParser: Ba(),
|
|
13179
13179
|
fetch
|
|
13180
13180
|
})).render();
|
|
@@ -13196,7 +13196,7 @@ class Il {
|
|
|
13196
13196
|
getStepsConditionallyActive() {
|
|
13197
13197
|
return this.getScenes().flatMap(
|
|
13198
13198
|
(t) => this.getStepsByScene(t).filter(
|
|
13199
|
-
(e) =>
|
|
13199
|
+
(e) => Et(e.getRaw(), this.getWorkflowManager().getStepSelections())
|
|
13200
13200
|
)
|
|
13201
13201
|
);
|
|
13202
13202
|
}
|
|
@@ -13312,8 +13312,8 @@ class Il {
|
|
|
13312
13312
|
);
|
|
13313
13313
|
if (a?.customer) {
|
|
13314
13314
|
this.getWorkflowManager().setTransactionCustomer(a.customer);
|
|
13315
|
-
const i =
|
|
13316
|
-
i.set(this.getTransaction().id, a.customer.id),
|
|
13315
|
+
const i = T.getMap("transactionCustomerIds") || /* @__PURE__ */ new Map();
|
|
13316
|
+
i.set(this.getTransaction().id, a.customer.id), T.setMap("transactionCustomerIds", i);
|
|
13317
13317
|
}
|
|
13318
13318
|
}
|
|
13319
13319
|
attachRenderableSceneListener(t) {
|
|
@@ -13344,7 +13344,7 @@ class Il {
|
|
|
13344
13344
|
return await ra.addDesign(o), o;
|
|
13345
13345
|
}
|
|
13346
13346
|
async copy() {
|
|
13347
|
-
const t =
|
|
13347
|
+
const t = bt(this.getCommandContext().getState());
|
|
13348
13348
|
if (!t) throw new R("Internal state is undefined! Cannot copy experience!");
|
|
13349
13349
|
const e = JSON.stringify(t.transaction), a = this.getWorkflow();
|
|
13350
13350
|
if (!a) throw new R("Workflow is undefined! Cannot copy experience!");
|
|
@@ -13565,19 +13565,19 @@ class xl {
|
|
|
13565
13565
|
}
|
|
13566
13566
|
async createHandle(t) {
|
|
13567
13567
|
switch (t.type) {
|
|
13568
|
-
case
|
|
13568
|
+
case z.FileUpload:
|
|
13569
13569
|
return new Dl(this.bundle, t).initialize();
|
|
13570
|
-
case
|
|
13570
|
+
case z.ColorOption:
|
|
13571
13571
|
return new cn(
|
|
13572
13572
|
this.bundle,
|
|
13573
13573
|
t,
|
|
13574
|
-
t.entityId ? await
|
|
13574
|
+
t.entityId ? await Y.getOption(t.entityId) : void 0
|
|
13575
13575
|
);
|
|
13576
|
-
case
|
|
13577
|
-
const e = t.entityId ? await
|
|
13576
|
+
case z.Option: {
|
|
13577
|
+
const e = t.entityId ? await Y.getOption(t.entityId) : void 0;
|
|
13578
13578
|
return e?.type === "Color" ? new cn(this.bundle, t, e) : new pi(this.bundle, t, e);
|
|
13579
13579
|
}
|
|
13580
|
-
case
|
|
13580
|
+
case z.Text:
|
|
13581
13581
|
return new Fl(this.bundle, t);
|
|
13582
13582
|
default:
|
|
13583
13583
|
throw new Error("Unhandled Global Property Aspect Type");
|
|
@@ -13650,13 +13650,13 @@ class Dl extends Ra {
|
|
|
13650
13650
|
super(t, e);
|
|
13651
13651
|
}
|
|
13652
13652
|
async initialize() {
|
|
13653
|
-
return this.property.data?.fileUpload?.colorOptionId && (this.colorOption = await
|
|
13653
|
+
return this.property.data?.fileUpload?.colorOptionId && (this.colorOption = await Y.getOption(this.property.data?.fileUpload?.colorOptionId)), await this.loadImageData(), this;
|
|
13654
13654
|
}
|
|
13655
13655
|
async loadImageData() {
|
|
13656
13656
|
const t = await this.getImage();
|
|
13657
13657
|
if (t?.fileLink)
|
|
13658
13658
|
if (t?.fileLink.endsWith(".svg")) {
|
|
13659
|
-
const e = await nt(t?.fileLink), a = await Na(t?.fileLink), i = a.width, r = a.height, o = await
|
|
13659
|
+
const e = await nt(t?.fileLink), a = await Na(t?.fileLink), i = a.width, r = a.height, o = await ct(e);
|
|
13660
13660
|
this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.colors?.forEach((c) => {
|
|
13661
13661
|
o.colors[c.key] = {
|
|
13662
13662
|
browserValue: c.browserValue,
|
|
@@ -13714,7 +13714,7 @@ class Dl extends Ra {
|
|
|
13714
13714
|
const e = await this.getOriginalImage();
|
|
13715
13715
|
if (!e)
|
|
13716
13716
|
throw new Error("You must supply an image selection before attempting to remove the background.");
|
|
13717
|
-
const a = this.bundle.getGlobalPropertyStateManager(), i = await
|
|
13717
|
+
const a = this.bundle.getGlobalPropertyStateManager(), i = await U.removeBackgroundFromAsset(e), o = {
|
|
13718
13718
|
...a.getAspectStorage(this.property.name),
|
|
13719
13719
|
backgroundRemovedAssetKey: i.key,
|
|
13720
13720
|
useOriginalAsset: !t
|
|
@@ -13734,7 +13734,7 @@ class Dl extends Ra {
|
|
|
13734
13734
|
async getImage() {
|
|
13735
13735
|
const t = this.getStateValue();
|
|
13736
13736
|
if (t)
|
|
13737
|
-
return
|
|
13737
|
+
return U.getLocalOrFromServer(t);
|
|
13738
13738
|
}
|
|
13739
13739
|
async getImageWithColors() {
|
|
13740
13740
|
return await this.loadImageData(), this.imageData?.svg ? ba(Da(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
|
|
@@ -13746,7 +13746,7 @@ class Dl extends Ra {
|
|
|
13746
13746
|
async getOriginalImage() {
|
|
13747
13747
|
const t = this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name);
|
|
13748
13748
|
if (t?.originalAssetKey)
|
|
13749
|
-
return
|
|
13749
|
+
return U.getLocalOrFromServer(t.originalAssetKey);
|
|
13750
13750
|
}
|
|
13751
13751
|
/**
|
|
13752
13752
|
* Retrieves the version of the image selection that has the background removed, if one exists.
|
|
@@ -13755,7 +13755,7 @@ class Dl extends Ra {
|
|
|
13755
13755
|
async getBackgroundRemovedImage() {
|
|
13756
13756
|
const t = this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name);
|
|
13757
13757
|
if (t?.backgroundRemovedAssetKey)
|
|
13758
|
-
return
|
|
13758
|
+
return U.getLocalOrFromServer(t.backgroundRemovedAssetKey);
|
|
13759
13759
|
}
|
|
13760
13760
|
getUseOriginalImage() {
|
|
13761
13761
|
return this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.useOriginalAsset ?? !1;
|
|
@@ -13789,7 +13789,7 @@ class Dl extends Ra {
|
|
|
13789
13789
|
async applyGlobalState(t) {
|
|
13790
13790
|
const e = this.getStateValue();
|
|
13791
13791
|
if (!e) return;
|
|
13792
|
-
const a = await
|
|
13792
|
+
const a = await U.getLocalOrFromServer(e);
|
|
13793
13793
|
if (!a) return;
|
|
13794
13794
|
await this.applyImageSelection(a, t, !1, !0);
|
|
13795
13795
|
const i = this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name);
|
|
@@ -13823,7 +13823,7 @@ class Dl extends Ra {
|
|
|
13823
13823
|
return this.property.data?.fileUpload?.pmsPickerEnabled ?? !1;
|
|
13824
13824
|
}
|
|
13825
13825
|
async getOriginalColors() {
|
|
13826
|
-
return this.imageData?.svg ? (await
|
|
13826
|
+
return this.imageData?.svg ? (await ct(this.imageData.svg)).colors : void 0;
|
|
13827
13827
|
}
|
|
13828
13828
|
async changeColors(t) {
|
|
13829
13829
|
if (!this.imageData?.svg)
|
|
@@ -13921,7 +13921,7 @@ class pi extends Ra {
|
|
|
13921
13921
|
const t = this.optionResource?.variants?.find(
|
|
13922
13922
|
(e) => e.id === this.optionResource?.defaultVariant?.id
|
|
13923
13923
|
);
|
|
13924
|
-
t && await this.selectVariant(new
|
|
13924
|
+
t && await this.selectVariant(new st(t));
|
|
13925
13925
|
}
|
|
13926
13926
|
/**
|
|
13927
13927
|
* Gets the currently selected variant, or undefined if no variant is selected.
|
|
@@ -13931,25 +13931,25 @@ class pi extends Ra {
|
|
|
13931
13931
|
const t = this.getStateValue();
|
|
13932
13932
|
if (t) {
|
|
13933
13933
|
const e = this.optionResource.variants?.find((a) => a.id === t);
|
|
13934
|
-
return e ? new
|
|
13934
|
+
return e ? new st(e) : void 0;
|
|
13935
13935
|
} else {
|
|
13936
13936
|
const e = this.optionResource.variants?.find(
|
|
13937
13937
|
(a) => a.id === this.optionResource?.defaultVariant?.id
|
|
13938
13938
|
);
|
|
13939
|
-
return e ? new
|
|
13939
|
+
return e ? new st(e) : void 0;
|
|
13940
13940
|
}
|
|
13941
13941
|
}
|
|
13942
13942
|
/**
|
|
13943
13943
|
* @returns A list of valid variants for this step. Does not include disabled variants.
|
|
13944
13944
|
*/
|
|
13945
13945
|
getAvailableVariants() {
|
|
13946
|
-
return (this.optionResource?.variants?.filter((e) => e.enabled) || []).map((e) => new
|
|
13946
|
+
return (this.optionResource?.variants?.filter((e) => e.enabled) || []).map((e) => new st(e));
|
|
13947
13947
|
}
|
|
13948
13948
|
/**
|
|
13949
13949
|
* @returns A list of all variants for this step, including disabled ones.
|
|
13950
13950
|
*/
|
|
13951
13951
|
getAllVariants() {
|
|
13952
|
-
return (this.optionResource?.variants || []).map((e) => new
|
|
13952
|
+
return (this.optionResource?.variants || []).map((e) => new st(e));
|
|
13953
13953
|
}
|
|
13954
13954
|
/**
|
|
13955
13955
|
* Select a given variant on the option for all shared steps.
|
|
@@ -13965,7 +13965,7 @@ class pi extends Ra {
|
|
|
13965
13965
|
const e = this.getStateValue();
|
|
13966
13966
|
if (!e) return Promise.resolve();
|
|
13967
13967
|
const a = this.optionResource?.variants?.find((i) => i.id === e);
|
|
13968
|
-
return a ? this.applyVariantSelection(new
|
|
13968
|
+
return a ? this.applyVariantSelection(new st(a), t) : Promise.resolve();
|
|
13969
13969
|
}
|
|
13970
13970
|
async applyVariantSelection(t, e) {
|
|
13971
13971
|
const i = this.getSharedSteps(e).map((r) => r.selectVariant(t));
|
|
@@ -13988,7 +13988,7 @@ class cn extends pi {
|
|
|
13988
13988
|
if (!e) return Promise.resolve();
|
|
13989
13989
|
const a = this.optionResource?.variants?.find((r) => r.id === e);
|
|
13990
13990
|
if (!a) return Promise.resolve();
|
|
13991
|
-
await this.applyColorVariant(new
|
|
13991
|
+
await this.applyColorVariant(new st(a), t);
|
|
13992
13992
|
const i = this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.customColor;
|
|
13993
13993
|
i && this.setCustomColor(i);
|
|
13994
13994
|
}
|
|
@@ -14098,7 +14098,7 @@ class Ql {
|
|
|
14098
14098
|
}
|
|
14099
14099
|
async setGlobalPropertyState(t) {
|
|
14100
14100
|
this.globalPropertyState || await this.initPromise;
|
|
14101
|
-
const e =
|
|
14101
|
+
const e = bt(this.globalPropertyState);
|
|
14102
14102
|
this.globalPropertyState = { ...me(t), id: e.id }, this.recalculateMandatoryStates(), await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(e, this.globalPropertyState);
|
|
14103
14103
|
}
|
|
14104
14104
|
getAspectMandatoryFulfilled(t) {
|
|
@@ -14125,7 +14125,7 @@ class Ql {
|
|
|
14125
14125
|
if (!r)
|
|
14126
14126
|
throw new Error(`Failed to find configuration aspect with name: ${t}`);
|
|
14127
14127
|
this.mandatoryFulfilledAspects.set(t, e !== "");
|
|
14128
|
-
const o =
|
|
14128
|
+
const o = bt(this.globalPropertyState), s = this.globalPropertyState.aspects.filter((l) => l.name === t);
|
|
14129
14129
|
if (s.length > 0)
|
|
14130
14130
|
if (i) {
|
|
14131
14131
|
const l = s.find((c) => c.channel === i);
|
|
@@ -14158,7 +14158,7 @@ class Ql {
|
|
|
14158
14158
|
storage: a !== null ? a : void 0,
|
|
14159
14159
|
channel: i
|
|
14160
14160
|
});
|
|
14161
|
-
|
|
14161
|
+
Yt(o, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(o, this.globalPropertyState));
|
|
14162
14162
|
}
|
|
14163
14163
|
async setAspectStorage(t, e, a) {
|
|
14164
14164
|
if (!this.globalPropertyState)
|
|
@@ -14168,7 +14168,7 @@ class Ql {
|
|
|
14168
14168
|
const i = this.configuration.aspects.find((s) => s.name === t);
|
|
14169
14169
|
if (!i)
|
|
14170
14170
|
throw new Error(`Failed to find configuration aspect with name: ${t}`);
|
|
14171
|
-
const r =
|
|
14171
|
+
const r = bt(this.globalPropertyState), o = this.globalPropertyState.aspects.filter((s) => s.name === t);
|
|
14172
14172
|
if (o.length > 0)
|
|
14173
14173
|
if (a) {
|
|
14174
14174
|
const s = o.find((l) => l.channel === a);
|
|
@@ -14185,7 +14185,7 @@ class Ql {
|
|
|
14185
14185
|
storage: e !== null ? e : void 0,
|
|
14186
14186
|
channel: a
|
|
14187
14187
|
});
|
|
14188
|
-
|
|
14188
|
+
Yt(r, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(r, this.globalPropertyState));
|
|
14189
14189
|
}
|
|
14190
14190
|
async updateGlobalPropertyState() {
|
|
14191
14191
|
if (!this.globalPropertyState)
|
|
@@ -14198,15 +14198,15 @@ class Ql {
|
|
|
14198
14198
|
let a = e.type && e.storage ? {} : void 0;
|
|
14199
14199
|
if (a)
|
|
14200
14200
|
switch (e.type) {
|
|
14201
|
-
case
|
|
14201
|
+
case z.FileUpload: {
|
|
14202
14202
|
a.fileUpload = e.storage;
|
|
14203
14203
|
break;
|
|
14204
14204
|
}
|
|
14205
|
-
case
|
|
14205
|
+
case z.Option: {
|
|
14206
14206
|
a.option = e.storage;
|
|
14207
14207
|
break;
|
|
14208
14208
|
}
|
|
14209
|
-
case
|
|
14209
|
+
case z.ColorOption: {
|
|
14210
14210
|
a = e.storage;
|
|
14211
14211
|
break;
|
|
14212
14212
|
}
|
|
@@ -14573,7 +14573,7 @@ class Ci {
|
|
|
14573
14573
|
if (h || m.partial && (!m.data.productCollections || m.data.productCollections.length === 0 || !m.data.productCollections[0].productCollectionProductsFeed?.items || m.data.productCollections[0].productCollectionProductsFeed?.items.length === 0))
|
|
14574
14574
|
return;
|
|
14575
14575
|
c.abort(), h = !0, g.unsubscribe();
|
|
14576
|
-
const p = m.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((f) => !!f.product).map((f) => new pe(
|
|
14576
|
+
const p = m.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((f) => !!f.product).map((f) => new pe(bt(f))) || [];
|
|
14577
14577
|
u({
|
|
14578
14578
|
items: p,
|
|
14579
14579
|
// Clone items because it could be cached data (immutable)
|
|
@@ -14655,10 +14655,10 @@ class pe {
|
|
|
14655
14655
|
const e = this.productResource.workflowId;
|
|
14656
14656
|
if (e) {
|
|
14657
14657
|
const a = t.find((i) => i.workflowName === e);
|
|
14658
|
-
if (a) return new
|
|
14658
|
+
if (a) return new qt(a);
|
|
14659
14659
|
}
|
|
14660
14660
|
if (t.length === 1)
|
|
14661
|
-
return new
|
|
14661
|
+
return new qt(t[0]);
|
|
14662
14662
|
throw new mt(
|
|
14663
14663
|
"Called getDefaultWorkflow() but no default workflow is configured for the requested product. Multiple workflows exist so we can't assume!"
|
|
14664
14664
|
);
|
|
@@ -14671,7 +14671,7 @@ class pe {
|
|
|
14671
14671
|
throw new mt(
|
|
14672
14672
|
"No workflows on configured product. Ensure at least 1 workflow is assigned to this product."
|
|
14673
14673
|
);
|
|
14674
|
-
return this.product.workflows.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new
|
|
14674
|
+
return this.product.workflows.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new qt(e));
|
|
14675
14675
|
}
|
|
14676
14676
|
/**
|
|
14677
14677
|
* A list of all integrations this product is connected to.
|
|
@@ -14715,7 +14715,7 @@ class pe {
|
|
|
14715
14715
|
return Ul.requestKeysForEntity(this.product.id, t);
|
|
14716
14716
|
}
|
|
14717
14717
|
}
|
|
14718
|
-
class
|
|
14718
|
+
class qt {
|
|
14719
14719
|
constructor(t) {
|
|
14720
14720
|
this.workflow = t;
|
|
14721
14721
|
}
|
|
@@ -14886,7 +14886,7 @@ class dn {
|
|
|
14886
14886
|
const u = this.globalPropertyStateManager.getGlobalPropertyState();
|
|
14887
14887
|
u ? this.globalPropertyHandleService.getHandles().then((h) => {
|
|
14888
14888
|
const g = h.map((m) => {
|
|
14889
|
-
if (m.getType() ===
|
|
14889
|
+
if (m.getType() === z.ColorOption || m.getType() === z.Option) {
|
|
14890
14890
|
const p = m;
|
|
14891
14891
|
if (!u.aspects.find((S) => S.name === p.getName()))
|
|
14892
14892
|
return p.initDefaultVariant();
|
|
@@ -15079,7 +15079,7 @@ class dn {
|
|
|
15079
15079
|
const i = a?.name, r = e.find((o) => o.getName() === i);
|
|
15080
15080
|
if (r)
|
|
15081
15081
|
switch (a.type) {
|
|
15082
|
-
case
|
|
15082
|
+
case z.FileUpload: {
|
|
15083
15083
|
const o = r, s = await De([a.value]);
|
|
15084
15084
|
s.length > 0 && await o.selectImage(s[0]);
|
|
15085
15085
|
const l = a.storage?.colors;
|
|
@@ -15094,17 +15094,17 @@ class dn {
|
|
|
15094
15094
|
}
|
|
15095
15095
|
break;
|
|
15096
15096
|
}
|
|
15097
|
-
case
|
|
15097
|
+
case z.ColorOption: {
|
|
15098
15098
|
const o = r, l = o.getAllVariants().find((d) => d.getId() === a.value), c = a.storage ? a.storage : void 0;
|
|
15099
15099
|
l && await o.selectVariant(l), c?.customColor && o.setCustomColor(c.customColor);
|
|
15100
15100
|
break;
|
|
15101
15101
|
}
|
|
15102
|
-
case
|
|
15102
|
+
case z.Option: {
|
|
15103
15103
|
const o = r, l = o.getAllVariants().find((c) => c.getId() === a.value);
|
|
15104
15104
|
l && await o.selectVariant(l);
|
|
15105
15105
|
break;
|
|
15106
15106
|
}
|
|
15107
|
-
case
|
|
15107
|
+
case z.Text: {
|
|
15108
15108
|
await r.setText(a.value);
|
|
15109
15109
|
break;
|
|
15110
15110
|
}
|
|
@@ -15118,7 +15118,7 @@ class dn {
|
|
|
15118
15118
|
return this.globalPropertyStateManager;
|
|
15119
15119
|
}
|
|
15120
15120
|
async getGlobalPropertyTotalSubunits() {
|
|
15121
|
-
return (await this.globalPropertyHandleService.getHandles()).filter((a) => a.getType() ===
|
|
15121
|
+
return (await this.globalPropertyHandleService.getHandles()).filter((a) => a.getType() === z.Option).map((a) => a.getCurrentVariant()?.getPrice() || 0).reduce((a, i) => a + i, 0);
|
|
15122
15122
|
}
|
|
15123
15123
|
getTotalSubunits() {
|
|
15124
15124
|
return this.workflowExperiences.map((t) => t.getTotalPriceSubunits()).reduce((t, e) => t + e, 0);
|
|
@@ -15133,7 +15133,7 @@ class dn {
|
|
|
15133
15133
|
const r = this.getGlobalPropertyConfiguration()?.aspects.find(
|
|
15134
15134
|
(o) => o.name === i
|
|
15135
15135
|
);
|
|
15136
|
-
if (r && r.type ===
|
|
15136
|
+
if (r && r.type === z.ColorOption) {
|
|
15137
15137
|
const o = e.getCurrentVariant()?.getAssetResource(), s = o?.assetConfiguration?.channelNumbers || [], l = o?.assetConfiguration?.defaultColorVariants || [], c = Ml(
|
|
15138
15138
|
this.getWorkflowExperiences(),
|
|
15139
15139
|
this.globalConfigurationPropertyId || "",
|
|
@@ -15167,7 +15167,7 @@ class dn {
|
|
|
15167
15167
|
throw new Error(
|
|
15168
15168
|
"Unable to add transaction to bundle - Already Exists: " + a.filter((s) => !!s).map((s) => s?.getTransaction().id).join(", ")
|
|
15169
15169
|
);
|
|
15170
|
-
const i =
|
|
15170
|
+
const i = T.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), r = e.map((s) => i.get(s));
|
|
15171
15171
|
await y.getShadowGraphqlClient().mutate({
|
|
15172
15172
|
mutation: Rs,
|
|
15173
15173
|
variables: {
|
|
@@ -15196,7 +15196,7 @@ class dn {
|
|
|
15196
15196
|
async appendWorkflowExperience(t, e = !0) {
|
|
15197
15197
|
const a = t.getTransaction().id;
|
|
15198
15198
|
if (this.workflowExperiences.find((s) => s.getTransaction().id === a)) throw new Error("Unable to add transaction to bundle - Already Exists!");
|
|
15199
|
-
const o = (
|
|
15199
|
+
const o = (T.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(a);
|
|
15200
15200
|
await y.getShadowGraphqlClient().mutate({
|
|
15201
15201
|
mutation: Qs,
|
|
15202
15202
|
variables: {
|
|
@@ -15580,7 +15580,7 @@ class dn {
|
|
|
15580
15580
|
r.find((u) => u.getName() == A.getName()) || (s = [...s, A.getName()]);
|
|
15581
15581
|
await o.clearAspects(s);
|
|
15582
15582
|
const l = r.map((A) => {
|
|
15583
|
-
if (A.getType() ===
|
|
15583
|
+
if (A.getType() === z.ColorOption || A.getType() === z.Option) {
|
|
15584
15584
|
const u = A;
|
|
15585
15585
|
if (!e.aspects.find((g) => g.name === u.getName()))
|
|
15586
15586
|
return u.initDefaultVariant();
|
|
@@ -15588,7 +15588,7 @@ class dn {
|
|
|
15588
15588
|
});
|
|
15589
15589
|
await Promise.all(l), await Promise.all(r.map((A) => A.applyGlobalState()));
|
|
15590
15590
|
const c = this.globalPropertyStateManager.getGlobalPropertyState(), d = this.globalPropertyHandleService.applyConditionsFromState(a, c);
|
|
15591
|
-
|
|
15591
|
+
Yt(r.sort(), d.sort()) || (this.checkConditionalHandlesChanged(r, d), this.checkMandatoryHandlesChanged(c, d), await this.onGlobalPropertiesChanged(e, c));
|
|
15592
15592
|
}
|
|
15593
15593
|
checkConditionalHandlesChanged(t, e) {
|
|
15594
15594
|
(() => {
|
|
@@ -15861,7 +15861,7 @@ class An {
|
|
|
15861
15861
|
throw new Error(
|
|
15862
15862
|
"No workflows found on product. This is generally due to a configuration error. Please confirm at least one workflow is configured for this product."
|
|
15863
15863
|
);
|
|
15864
|
-
return new
|
|
15864
|
+
return new qt(t[0]);
|
|
15865
15865
|
}
|
|
15866
15866
|
getAllWorkflows() {
|
|
15867
15867
|
if (!this.integrationProduct.product)
|
|
@@ -15871,7 +15871,7 @@ class An {
|
|
|
15871
15871
|
throw new Error(
|
|
15872
15872
|
"No workflows found on product. This is generally due to a configuration error. Please confirm at least one workflow is configured for this product."
|
|
15873
15873
|
);
|
|
15874
|
-
return t.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new
|
|
15874
|
+
return t.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new qt(e));
|
|
15875
15875
|
}
|
|
15876
15876
|
}
|
|
15877
15877
|
const Ce = C`
|
|
@@ -16066,7 +16066,7 @@ class ac {
|
|
|
16066
16066
|
);
|
|
16067
16067
|
}
|
|
16068
16068
|
}
|
|
16069
|
-
const
|
|
16069
|
+
const Vt = new ac();
|
|
16070
16070
|
class nc {
|
|
16071
16071
|
/**
|
|
16072
16072
|
* Returns a formatted string representing a given amount with desired currency.
|
|
@@ -16159,9 +16159,9 @@ const rc = async (n, t) => {
|
|
|
16159
16159
|
throw new Error(`Unable to read workflows: ${e.errors ?? "Length mismatch in response"}`);
|
|
16160
16160
|
return a.forEach((i) => {
|
|
16161
16161
|
i.steps.forEach((r) => {
|
|
16162
|
-
delete r.data.__typename, r.option?.id && (r.option.defaultVariant?.asset &&
|
|
16163
|
-
o.asset &&
|
|
16164
|
-
}),
|
|
16162
|
+
delete r.data.__typename, r.option?.id && (r.option.defaultVariant?.asset && U.cacheAsset(r.option.defaultVariant.asset), r.option.colorProfile && U.cacheAsset(r.option.colorProfile), r.option.variants?.forEach((o) => {
|
|
16163
|
+
o.asset && U.cacheAsset(o.asset), o.thumbnail && U.cacheAsset(o.thumbnail), o.material && U.cacheMaterial(o.material);
|
|
16164
|
+
}), Xt.set({ id: r.option.id }, Promise.resolve(r.option)));
|
|
16165
16165
|
}), i.finalizeStepConfig || (i.finalizeStepConfig = {}), i.finalizeStepConfig.termsMarkdown = i.finalizeStepConfig.termsMarkdown || i.partner.termsMarkdown;
|
|
16166
16166
|
}), a;
|
|
16167
16167
|
}, oc = async (n, t) => {
|
|
@@ -16170,11 +16170,11 @@ const rc = async (n, t) => {
|
|
|
16170
16170
|
throw new Error(`Workflow not found: ${n}`);
|
|
16171
16171
|
return a;
|
|
16172
16172
|
}, yi = async (n, t) => {
|
|
16173
|
-
const e = n.map((s) =>
|
|
16173
|
+
const e = n.map((s) => Xt.get({ id: s, options: t })), a = n.filter((s, l) => e[l] === void 0);
|
|
16174
16174
|
if (a.length === 0)
|
|
16175
16175
|
return Promise.all(e);
|
|
16176
16176
|
const i = rc(a, t), r = a.map(
|
|
16177
|
-
(s) =>
|
|
16177
|
+
(s) => Xt.set({ id: s, options: t }, oc(s, i))
|
|
16178
16178
|
), o = e.filter((s) => s !== void 0);
|
|
16179
16179
|
return await Promise.all(o.concat(r));
|
|
16180
16180
|
}, sc = async (n, t) => (await yi([n], t))[0], lc = async (n) => {
|
|
@@ -16199,17 +16199,17 @@ class $d {
|
|
|
16199
16199
|
} catch (a) {
|
|
16200
16200
|
throw console.error(a), new mt("Critical - Unable to synchronize workflow state with server.");
|
|
16201
16201
|
}
|
|
16202
|
-
}, this.options = t, this.options.applicationKey && rr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.13.
|
|
16202
|
+
}, this.options = t, this.options.applicationKey && rr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.13.4"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
16203
16203
|
}
|
|
16204
16204
|
configure(t) {
|
|
16205
|
-
ft.setHubUrl(t.hubUrl), ft.setServerUrl(t.serverUrl), ft.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 && sr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId &&
|
|
16205
|
+
ft.setHubUrl(t.hubUrl), ft.setServerUrl(t.serverUrl), ft.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 && sr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Vt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|
|
16206
16206
|
}
|
|
16207
16207
|
/**
|
|
16208
16208
|
* @returns The asset manager allows for common operations related to assets
|
|
16209
16209
|
* and the Spiff Commerce platform.
|
|
16210
16210
|
*/
|
|
16211
16211
|
getAssetManager() {
|
|
16212
|
-
return
|
|
16212
|
+
return U;
|
|
16213
16213
|
}
|
|
16214
16214
|
getFlowService() {
|
|
16215
16215
|
if (!or()) throw new Error("Application key required to use Flow Service.");
|
|
@@ -16248,12 +16248,12 @@ class $d {
|
|
|
16248
16248
|
* @returns An object containing the success status of the authentication attempt, and the type of stakeholder when successful.
|
|
16249
16249
|
*/
|
|
16250
16250
|
async authenticateBundleFromLocalStorage(t) {
|
|
16251
|
-
if (
|
|
16251
|
+
if (T.getMap("bundleOwnerIds")?.has(t))
|
|
16252
16252
|
return Promise.resolve({ success: !0, stakeholderType: Be.Owner });
|
|
16253
|
-
const a =
|
|
16253
|
+
const a = T.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
16254
16254
|
if (a.has(t)) {
|
|
16255
16255
|
const i = a.get(t);
|
|
16256
|
-
if ((
|
|
16256
|
+
if ((T.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map()).get(i) && await this.reloadLoggedInCustomer()) {
|
|
16257
16257
|
const l = this.customer?.bundleStakeholders?.find(
|
|
16258
16258
|
(c) => c.bundle?.id === t
|
|
16259
16259
|
);
|
|
@@ -16292,9 +16292,9 @@ class $d {
|
|
|
16292
16292
|
throw new Error(`Unable to read transaction: ${t}`);
|
|
16293
16293
|
if (i.isOrdered)
|
|
16294
16294
|
return Promise.resolve({ success: !1, transactionReadOnly: !0 });
|
|
16295
|
-
if (
|
|
16295
|
+
if (T.getMap("transactionOwnerIds")?.has(t))
|
|
16296
16296
|
return Promise.resolve({ success: !0, stakeholderType: Be.Owner });
|
|
16297
|
-
const s =
|
|
16297
|
+
const s = T.getMap("transactionCustomerIds");
|
|
16298
16298
|
if (s?.has(t) && s.get(t) && await this.reloadLoggedInCustomer()) {
|
|
16299
16299
|
const u = this.customer?.bundleStakeholders?.find(
|
|
16300
16300
|
(h) => h.bundle?.transactions?.some((g) => g.id === t)
|
|
@@ -16326,8 +16326,8 @@ class $d {
|
|
|
16326
16326
|
this.customer = void 0;
|
|
16327
16327
|
}
|
|
16328
16328
|
clearCustomerForTransaction(t) {
|
|
16329
|
-
const e =
|
|
16330
|
-
e?.has(t) && (e.delete(t),
|
|
16329
|
+
const e = T.getMap("transactionCustomerIds");
|
|
16330
|
+
e?.has(t) && (e.delete(t), T.setMap("transactionCustomerIds", e));
|
|
16331
16331
|
}
|
|
16332
16332
|
async customerHasBundleTemplates(t) {
|
|
16333
16333
|
const i = (await y.getShadowGraphqlClient().query({
|
|
@@ -16396,7 +16396,7 @@ class $d {
|
|
|
16396
16396
|
return !1;
|
|
16397
16397
|
const i = JSON.parse(e), r = (/* @__PURE__ */ new Date()).getTime() / 1e3;
|
|
16398
16398
|
if (!i.ExpiresIn || i.ExpiresIn < r - parseInt(t)) {
|
|
16399
|
-
const l = await
|
|
16399
|
+
const l = await Vt.refreshTokens();
|
|
16400
16400
|
if (l?.AuthenticationResult)
|
|
16401
16401
|
localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`), i.AccessToken = l.AuthenticationResult.AccessToken, localStorage.setItem("cognito-tokens", JSON.stringify(i));
|
|
16402
16402
|
else
|
|
@@ -16421,14 +16421,14 @@ class $d {
|
|
|
16421
16421
|
variables: {
|
|
16422
16422
|
emailAddress: t
|
|
16423
16423
|
}
|
|
16424
|
-
}), await
|
|
16424
|
+
}), await Vt.generateCode(t);
|
|
16425
16425
|
}
|
|
16426
16426
|
/**
|
|
16427
16427
|
* Verify an email code to log in as a Spiff user.
|
|
16428
16428
|
* Always returns true if it doesn't throw.
|
|
16429
16429
|
*/
|
|
16430
16430
|
async verifyCode(t, e) {
|
|
16431
|
-
const a = (await this.getIntegration()).partner.id || "", i = await
|
|
16431
|
+
const a = (await this.getIntegration()).partner.id || "", i = await Vt.verifyCode(t, e, a);
|
|
16432
16432
|
if (i?.AuthenticationResult) {
|
|
16433
16433
|
localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`), localStorage.setItem("cognito-tokens", JSON.stringify(i.AuthenticationResult)), localStorage.setItem("cognito-email", t);
|
|
16434
16434
|
const o = (await y.getShadowGraphqlClient().query({
|
|
@@ -16456,9 +16456,9 @@ class $d {
|
|
|
16456
16456
|
const t = localStorage.getItem("last-refreshed-cognito-tokens"), e = localStorage.getItem("cognito-tokens");
|
|
16457
16457
|
if (!t || !e)
|
|
16458
16458
|
throw new Error("No token data in storage.");
|
|
16459
|
-
const a = JSON.parse(e), i = (/* @__PURE__ */ new Date()).getTime() / 1e3, r = !a?.AccessToken ||
|
|
16459
|
+
const a = JSON.parse(e), i = (/* @__PURE__ */ new Date()).getTime() / 1e3, r = !a?.AccessToken || te(a.AccessToken);
|
|
16460
16460
|
if (!a.ExpiresIn || a.ExpiresIn < i - parseInt(t) || r) {
|
|
16461
|
-
const o = await
|
|
16461
|
+
const o = await Vt.refreshTokens();
|
|
16462
16462
|
if (o?.AuthenticationResult)
|
|
16463
16463
|
localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`), a.AccessToken = o.AuthenticationResult.AccessToken, localStorage.setItem("cognito-tokens", JSON.stringify(a));
|
|
16464
16464
|
else
|
|
@@ -16495,10 +16495,10 @@ class $d {
|
|
|
16495
16495
|
})).data?.bundleCreate;
|
|
16496
16496
|
if (!r?.id)
|
|
16497
16497
|
throw new Error("Unable to create bundle");
|
|
16498
|
-
const o =
|
|
16499
|
-
o.set(r.id, r.partner.id),
|
|
16500
|
-
const s =
|
|
16501
|
-
s.set(r.id, r.bundleOwnerId),
|
|
16498
|
+
const o = T.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
16499
|
+
o.set(r.id, r.partner.id), T.setMap("bundlePartnerIds", o);
|
|
16500
|
+
const s = T.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
|
|
16501
|
+
s.set(r.id, r.bundleOwnerId), T.setMap("bundleOwnerIds", s);
|
|
16502
16502
|
const l = new dn(this, r, void 0, void 0, r.bundleOwnerId, {
|
|
16503
16503
|
eagerFetchProducts: a?.graphql?.productCollection?.eagerFetchProducts
|
|
16504
16504
|
});
|
|
@@ -16513,13 +16513,13 @@ class $d {
|
|
|
16513
16513
|
* @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
|
|
16514
16514
|
*/
|
|
16515
16515
|
async getExistingBundle(t, e, a, i, r) {
|
|
16516
|
-
const s =
|
|
16516
|
+
const s = T.getMap("bundleOwnerIds")?.get(t), l = {};
|
|
16517
16517
|
try {
|
|
16518
16518
|
const g = await this.loggedInBearerToken();
|
|
16519
16519
|
l.Authorization = `Bearer ${g}`;
|
|
16520
16520
|
} catch {
|
|
16521
16521
|
const p = Object.entries(localStorage).find(([S, w]) => S.startsWith("CognitoIdentityServiceProvider") && S.endsWith("idToken"))?.[0] || "", f = localStorage.getItem(p);
|
|
16522
|
-
f && !
|
|
16522
|
+
f && !te(f) && (l.Authorization = `Bearer ${f}`);
|
|
16523
16523
|
}
|
|
16524
16524
|
const c = {
|
|
16525
16525
|
bundleOwnerId: s,
|
|
@@ -16537,8 +16537,8 @@ class $d {
|
|
|
16537
16537
|
});
|
|
16538
16538
|
if (!d.data?.bundles || d.data?.bundles.length === 0 || !d.data?.bundles[0])
|
|
16539
16539
|
throw new Error(`Unable to find bundle: ${t}`);
|
|
16540
|
-
const A = d.data?.bundles[0], u =
|
|
16541
|
-
u.set(A.id, A.partner.id),
|
|
16540
|
+
const A = d.data?.bundles[0], u = T.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
16541
|
+
u.set(A.id, A.partner.id), T.setMap("bundlePartnerIds", u);
|
|
16542
16542
|
const h = new dn(
|
|
16543
16543
|
this,
|
|
16544
16544
|
A,
|
|
@@ -16581,10 +16581,10 @@ class $d {
|
|
|
16581
16581
|
})).data?.bundleDuplicate;
|
|
16582
16582
|
if (!l?.id)
|
|
16583
16583
|
throw new Error("Unable to duplicate bundle");
|
|
16584
|
-
const c =
|
|
16585
|
-
c.set(l.id, l.partner.id),
|
|
16586
|
-
const d =
|
|
16587
|
-
return d.set(l.id, l.bundleOwnerId),
|
|
16584
|
+
const c = T.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
16585
|
+
c.set(l.id, l.partner.id), T.setMap("bundlePartnerIds", c);
|
|
16586
|
+
const d = T.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
|
|
16587
|
+
return d.set(l.id, l.bundleOwnerId), T.setMap("bundleOwnerIds", d), async () => await this.getExistingBundle(l.id, void 0, void 0, {
|
|
16588
16588
|
graphql: {
|
|
16589
16589
|
productCollection: {
|
|
16590
16590
|
eagerFetchProducts: i?.graphql?.productCollection?.eagerFetchProducts || !1
|
|
@@ -16630,10 +16630,10 @@ class $d {
|
|
|
16630
16630
|
});
|
|
16631
16631
|
if (!t.data?.customers || t.data.customers.length === 0)
|
|
16632
16632
|
throw new Error("Unable to find customer.");
|
|
16633
|
-
const a = t.data.customers[0].bundleStakeholders || [], i =
|
|
16633
|
+
const a = t.data.customers[0].bundleStakeholders || [], i = T.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
16634
16634
|
return a.forEach((r) => {
|
|
16635
16635
|
r.bundle?.id && r.bundle.partner?.id && i.set(r.bundle.id, r.bundle.partner.id);
|
|
16636
|
-
}),
|
|
16636
|
+
}), T.setMap("bundlePartnerIds", i), a;
|
|
16637
16637
|
}
|
|
16638
16638
|
/**
|
|
16639
16639
|
* Creates a new instance of WorkflowExperience. A high level wrapper for workflows.
|
|
@@ -16657,35 +16657,35 @@ class $d {
|
|
|
16657
16657
|
async getWorkflowExperiences(t, e, a, i) {
|
|
16658
16658
|
if (t.length === 0)
|
|
16659
16659
|
throw new mt("No options provided!");
|
|
16660
|
-
const r = t.map((I,
|
|
16660
|
+
const r = t.map((I, k) => ({ option: I, index: k })), o = r.filter((I) => I.option.type === "transaction"), s = r.filter(
|
|
16661
16661
|
(I) => I.option.type === "integration" || I.option.type === "external" || I.option.type === "blank"
|
|
16662
16662
|
), l = 50, c = La(o, l), d = La(s, l);
|
|
16663
16663
|
let A = 0;
|
|
16664
16664
|
const u = y.getShadowGraphqlClient(), h = async (I) => {
|
|
16665
16665
|
if (I.length === 0)
|
|
16666
16666
|
return [];
|
|
16667
|
-
const
|
|
16667
|
+
const k = I.map((W) => W.option.transactionId), V = await u.query({
|
|
16668
16668
|
query: Vr,
|
|
16669
16669
|
variables: {
|
|
16670
|
-
ids:
|
|
16670
|
+
ids: k
|
|
16671
16671
|
},
|
|
16672
16672
|
errorPolicy: "all",
|
|
16673
16673
|
fetchPolicy: "no-cache"
|
|
16674
|
-
}), M =
|
|
16674
|
+
}), M = V.data.transactions;
|
|
16675
16675
|
if (A = A + M.length, i && i(A, o.length), M.length !== I.length) {
|
|
16676
|
-
const
|
|
16677
|
-
throw new mt(`Not all transactions were found: ${
|
|
16676
|
+
const W = V.errors?.[0]?.message || "Unknown error";
|
|
16677
|
+
throw new mt(`Not all transactions were found: ${W}`);
|
|
16678
16678
|
}
|
|
16679
|
-
return !this.activeIntegration && M[0].integrationProduct?.integration && (this.activeIntegration = Promise.resolve(M[0].integrationProduct.integration)), M.map((
|
|
16680
|
-
transaction:
|
|
16681
|
-
workflowId:
|
|
16682
|
-
readOnly: I.find((
|
|
16683
|
-
index: I[
|
|
16679
|
+
return !this.activeIntegration && M[0].integrationProduct?.integration && (this.activeIntegration = Promise.resolve(M[0].integrationProduct.integration)), M.map((W, it) => ({
|
|
16680
|
+
transaction: W,
|
|
16681
|
+
workflowId: W.workflowId,
|
|
16682
|
+
readOnly: I.find((et) => et.option.transactionId === W.id)?.option.readOnly ?? !1,
|
|
16683
|
+
index: I[it].index
|
|
16684
16684
|
}));
|
|
16685
16685
|
}, g = async (I) => {
|
|
16686
16686
|
if (I.length === 0)
|
|
16687
16687
|
return [];
|
|
16688
|
-
const
|
|
16688
|
+
const k = await u.mutate({
|
|
16689
16689
|
mutation: Ur,
|
|
16690
16690
|
variables: {
|
|
16691
16691
|
inputs: I.map((M) => ({
|
|
@@ -16703,16 +16703,16 @@ class $d {
|
|
|
16703
16703
|
},
|
|
16704
16704
|
errorPolicy: "all",
|
|
16705
16705
|
fetchPolicy: "no-cache"
|
|
16706
|
-
}),
|
|
16707
|
-
if (!
|
|
16708
|
-
const M =
|
|
16706
|
+
}), V = k.data?.transactionCreateMany;
|
|
16707
|
+
if (!V || V.length === 0) {
|
|
16708
|
+
const M = k.errors?.[0]?.message || "Unknown error";
|
|
16709
16709
|
throw new mt(`Failed to create transactions: ${M}`);
|
|
16710
16710
|
}
|
|
16711
|
-
return A = A +
|
|
16711
|
+
return A = A + V.length, i && i(A, o.length), V.map((M, W) => ({
|
|
16712
16712
|
transaction: M,
|
|
16713
16713
|
workflowId: M.workflowId,
|
|
16714
16714
|
readOnly: !1,
|
|
16715
|
-
index: I[
|
|
16715
|
+
index: I[W].index
|
|
16716
16716
|
}));
|
|
16717
16717
|
}, m = (await Promise.all([
|
|
16718
16718
|
...c.map(h),
|
|
@@ -16724,51 +16724,50 @@ class $d {
|
|
|
16724
16724
|
), [S, w] = await Promise.all([
|
|
16725
16725
|
(async () => p.length > 0 ? await lc(p) : [])(),
|
|
16726
16726
|
(async () => f.length > 0 ? await yi(f, e) : [])()
|
|
16727
|
-
]),
|
|
16728
|
-
const { transaction:
|
|
16729
|
-
if (
|
|
16730
|
-
const
|
|
16731
|
-
|
|
16727
|
+
]), P = new Map(S.map((I) => [I.id, I])), v = new Map(w.map((I) => [I.id, I])), b = m.map(async (I) => {
|
|
16728
|
+
const { transaction: k, workflowId: V, readOnly: M, index: W } = I, it = V ? v.get(V) : void 0, et = t[W];
|
|
16729
|
+
if (k.integrationProductId) {
|
|
16730
|
+
const ot = P.get(k.integrationProductId);
|
|
16731
|
+
k.integrationProduct = ot, k.product = ot?.product, k.integrationProduct || console.error("failed to find transaction's product");
|
|
16732
16732
|
}
|
|
16733
|
-
|
|
16734
|
-
|
|
16733
|
+
const le = T.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map();
|
|
16734
|
+
!le.get(k.id) && k.transactionOwnerId && (le.set(k.id, k.transactionOwnerId), T.setMap("transactionOwnerIds", le));
|
|
16735
|
+
const He = le.get(k.id) || void 0, bi = new ec({
|
|
16735
16736
|
onMutate: () => ({ context: { transactionOwnerId: He, bundleOwnerId: e?.bundleOwnerId } }),
|
|
16736
16737
|
onQuery: () => ({ context: { transactionOwnerId: He, bundleOwnerId: e?.bundleOwnerId } })
|
|
16737
16738
|
}), ce = {
|
|
16738
|
-
workflow:
|
|
16739
|
-
transaction:
|
|
16740
|
-
singleVariantsRenderable:
|
|
16739
|
+
workflow: it,
|
|
16740
|
+
transaction: k,
|
|
16741
|
+
singleVariantsRenderable: et?.workflowConfiguration?.singleVariantsRenderable,
|
|
16741
16742
|
stateMutationFunc: M ? async () => {
|
|
16742
16743
|
throw new R("State mutation is forbidden in read only mode!");
|
|
16743
|
-
} : async (
|
|
16744
|
-
...
|
|
16744
|
+
} : async (ot) => this.updateTransactionState({
|
|
16745
|
+
...ot,
|
|
16745
16746
|
context: { transactionOwnerId: He, bundleOwnerId: e?.bundleOwnerId }
|
|
16746
16747
|
}),
|
|
16747
16748
|
graphQlClient: () => bi,
|
|
16748
16749
|
readOnly: M,
|
|
16749
|
-
isReloadedTransaction:
|
|
16750
|
+
isReloadedTransaction: et.type === "transaction"
|
|
16750
16751
|
};
|
|
16751
|
-
if (
|
|
16752
|
-
const
|
|
16753
|
-
await Za(
|
|
16754
|
-
} else if (!M &&
|
|
16755
|
-
const
|
|
16756
|
-
await Za(
|
|
16752
|
+
if (et.type === "transaction" && k.workflowState) {
|
|
16753
|
+
const ot = JSON.parse(k.workflowState);
|
|
16754
|
+
await Za(ot), ce.reloadedState = ot;
|
|
16755
|
+
} else if (!M && et.workflowState) {
|
|
16756
|
+
const ot = JSON.parse(et.workflowState);
|
|
16757
|
+
await Za(ot), ce.reloadedState = ot;
|
|
16757
16758
|
}
|
|
16758
|
-
return ce.delayWorkflowStateSync = !0, { experienceOptions: ce, index:
|
|
16759
|
-
}), F = await Promise.all(
|
|
16760
|
-
|
|
16761
|
-
const
|
|
16762
|
-
|
|
16763
|
-
|
|
16764
|
-
const { experienceOptions: Q, options: U } = I, M = new Il(this, Q);
|
|
16765
|
-
await M.getWorkflowManager().getInitializationPromise(), a && a(), U.type !== "transaction" && this.customer && await M.attachCustomerDetails({ email: this.customer.emailAddress }), O = [...O, M], M.getWorkflowManager().setWorkflowStateSyncEnabled(!0);
|
|
16759
|
+
return ce.delayWorkflowStateSync = !0, { experienceOptions: ce, index: W, options: et };
|
|
16760
|
+
}), F = (await Promise.all(b)).sort((I, k) => I.index - k.index);
|
|
16761
|
+
let N = [];
|
|
16762
|
+
for (const I of F) {
|
|
16763
|
+
const { experienceOptions: k, options: V } = I, M = new Il(this, k);
|
|
16764
|
+
await M.getWorkflowManager().getInitializationPromise(), a && a(), V.type !== "transaction" && this.customer && await M.attachCustomerDetails({ email: this.customer.emailAddress }), N = [...N, M], M.getWorkflowManager().setWorkflowStateSyncEnabled(!0);
|
|
16766
16765
|
}
|
|
16767
|
-
return
|
|
16766
|
+
return N;
|
|
16768
16767
|
}
|
|
16769
16768
|
storeCustomer(t) {
|
|
16770
|
-
const e =
|
|
16771
|
-
e.set(t.partner.id, t.id),
|
|
16769
|
+
const e = T.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map();
|
|
16770
|
+
e.set(t.partner.id, t.id), T.setMap("partnerCustomerIds", e);
|
|
16772
16771
|
}
|
|
16773
16772
|
async getIntegrationProductById(t, e) {
|
|
16774
16773
|
const r = (await y.getShadowGraphqlClient().query({
|
|
@@ -16801,7 +16800,7 @@ class $d {
|
|
|
16801
16800
|
return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
|
|
16802
16801
|
}
|
|
16803
16802
|
async getShareActionsForTransaction(t) {
|
|
16804
|
-
const a = (
|
|
16803
|
+
const a = (T.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(t) || void 0, i = await y.getShadowGraphqlClient().query({
|
|
16805
16804
|
query: jr,
|
|
16806
16805
|
errorPolicy: "all",
|
|
16807
16806
|
fetchPolicy: "no-cache",
|
|
@@ -16877,13 +16876,13 @@ const cc = async (n, t) => (await y.getShadowGraphqlClient().query({
|
|
|
16877
16876
|
}
|
|
16878
16877
|
})).data?.transactions?.[0]?.marketplaceThemeInstallConfiguration;
|
|
16879
16878
|
async function Si(n) {
|
|
16880
|
-
const e =
|
|
16879
|
+
const e = T.getMap("bundleOwnerIds")?.get(n), a = {};
|
|
16881
16880
|
try {
|
|
16882
16881
|
const i = await this.loggedInBearerToken();
|
|
16883
16882
|
a.Authorization = `Bearer ${i}`;
|
|
16884
16883
|
} catch {
|
|
16885
16884
|
const o = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))?.[0] || "", s = localStorage.getItem(o);
|
|
16886
|
-
s && !
|
|
16885
|
+
s && !te(s) && (a.Authorization = `Bearer ${s}`);
|
|
16887
16886
|
}
|
|
16888
16887
|
return {
|
|
16889
16888
|
bundleOwnerId: e,
|
|
@@ -16942,7 +16941,7 @@ class Ac {
|
|
|
16942
16941
|
let r = !1;
|
|
16943
16942
|
for (let o = 0; o < i.currentFrameSources.length; o++) {
|
|
16944
16943
|
const s = i.currentFrameSources[o], l = await ze(s), c = this.frameData ? this.frameData[o] : void 0;
|
|
16945
|
-
|
|
16944
|
+
Yt(l, c) || (this.frameData || (this.frameData = new Array(i.currentFrameSources.length)), this.frameData[o] = l, r = !0);
|
|
16946
16945
|
}
|
|
16947
16946
|
r && (this.onFrameDataChangeListeners.forEach(
|
|
16948
16947
|
(o) => o(this.frameData)
|
|
@@ -16976,7 +16975,7 @@ class Ac {
|
|
|
16976
16975
|
return;
|
|
16977
16976
|
}
|
|
16978
16977
|
t.forEach((e, a) => {
|
|
16979
|
-
const i =
|
|
16978
|
+
const i = zt.get(e);
|
|
16980
16979
|
i && (this.frameData || (this.frameData = new Array(t.length)), this.frameData[a] = i);
|
|
16981
16980
|
});
|
|
16982
16981
|
}
|
|
@@ -17104,7 +17103,7 @@ class Ac {
|
|
|
17104
17103
|
this.targetElements.forEach((l, c) => {
|
|
17105
17104
|
let d = o.find((A) => A.id === l)?.regionIndex ?? c;
|
|
17106
17105
|
d >= t.length && (d = c), s(
|
|
17107
|
-
new
|
|
17106
|
+
new $([
|
|
17108
17107
|
new Ro(l, e, t[d]),
|
|
17109
17108
|
new Oo(
|
|
17110
17109
|
l,
|
|
@@ -17304,7 +17303,7 @@ class Wd {
|
|
|
17304
17303
|
}
|
|
17305
17304
|
}
|
|
17306
17305
|
var uc = /* @__PURE__ */ ((n) => (n.SelectFrame = "SelectFrame", n.SelectImage = "SelectImage", n.Position = "Position", n))(uc || {});
|
|
17307
|
-
class hc extends
|
|
17306
|
+
class hc extends tt {
|
|
17308
17307
|
constructor(t, e, a) {
|
|
17309
17308
|
super(t, e, a);
|
|
17310
17309
|
const i = e.data;
|
|
@@ -17312,7 +17311,7 @@ class hc extends et {
|
|
|
17312
17311
|
}
|
|
17313
17312
|
selectVariant(t) {
|
|
17314
17313
|
const e = this.manager.getRegionElements(this.step.stepName);
|
|
17315
|
-
return
|
|
17314
|
+
return vt.selectVariant(
|
|
17316
17315
|
this.step,
|
|
17317
17316
|
t.getResource(),
|
|
17318
17317
|
e,
|
|
@@ -17332,7 +17331,7 @@ class hc extends et {
|
|
|
17332
17331
|
* @param [recalculateOffsets=true] Optional: Recalculates the offsets of the image inside the frame. Default: `true`.
|
|
17333
17332
|
*/
|
|
17334
17333
|
async selectImage(t, e = !0, a = !0) {
|
|
17335
|
-
if (await
|
|
17334
|
+
if (await vt.selectImage(this.step, t, this.manager, a), e) {
|
|
17336
17335
|
const i = this.manager.getStepStorage(this.step.stepName)?.framePatternData || {};
|
|
17337
17336
|
this.manager.updateStorage(this.step.stepName, {
|
|
17338
17337
|
framePatternData: {
|
|
@@ -17369,8 +17368,8 @@ class hc extends et {
|
|
|
17369
17368
|
const e = await this.getOriginalImageSelection();
|
|
17370
17369
|
if (!e)
|
|
17371
17370
|
throw new Error("You must supply an image selection before attempting to remove the background.");
|
|
17372
|
-
const a = await
|
|
17373
|
-
t && await
|
|
17371
|
+
const a = await U.removeBackgroundFromAsset(e);
|
|
17372
|
+
t && await vt.selectImage(this.step, a, this.manager, !1);
|
|
17374
17373
|
const i = this.manager.getStepStorage(this.step.stepName)?.framePatternData || {};
|
|
17375
17374
|
return this.manager.updateStorage(this.step.stepName, {
|
|
17376
17375
|
framePatternData: {
|
|
@@ -17381,7 +17380,7 @@ class hc extends et {
|
|
|
17381
17380
|
}), a;
|
|
17382
17381
|
}
|
|
17383
17382
|
changeColors(t) {
|
|
17384
|
-
|
|
17383
|
+
vt.changeColors(this.step, this.manager, t);
|
|
17385
17384
|
}
|
|
17386
17385
|
getImageData() {
|
|
17387
17386
|
if (this.frameService)
|
|
@@ -17391,20 +17390,20 @@ class hc extends et {
|
|
|
17391
17390
|
return this.step.data.colorOption;
|
|
17392
17391
|
}
|
|
17393
17392
|
getAvailableColors() {
|
|
17394
|
-
return this.step.data.colorPickerEnabled ?
|
|
17393
|
+
return this.step.data.colorPickerEnabled ? vt.availableColors(this.step, this.manager) : Promise.resolve([]);
|
|
17395
17394
|
}
|
|
17396
17395
|
isColorPickerEnabled() {
|
|
17397
17396
|
return this.step.data.colorPickerEnabled ?? !1;
|
|
17398
17397
|
}
|
|
17399
17398
|
async getOriginalImageColors() {
|
|
17400
17399
|
const t = this.getImageData();
|
|
17401
|
-
return t?.svg ? (await
|
|
17400
|
+
return t?.svg ? (await ct(t.svg)).colors : void 0;
|
|
17402
17401
|
}
|
|
17403
17402
|
getMaxAllowedColors() {
|
|
17404
17403
|
return this.step.data.maxColors;
|
|
17405
17404
|
}
|
|
17406
17405
|
getUniqueColorCount() {
|
|
17407
|
-
return
|
|
17406
|
+
return vt.getUniqueColorCount(this.step, this.manager);
|
|
17408
17407
|
}
|
|
17409
17408
|
getCurrentFrameStep(t, e, a, i) {
|
|
17410
17409
|
return i && i.length > 1 && t === void 0 ? "SelectFrame" : e || a || this.getImageData() ? "Position" : "SelectImage";
|
|
@@ -17427,12 +17426,12 @@ class hc extends et {
|
|
|
17427
17426
|
async getOriginalImageSelection() {
|
|
17428
17427
|
const t = this.manager.getStepStorage(this.step.stepName)?.framePatternData?.originalAssetKey;
|
|
17429
17428
|
if (t)
|
|
17430
|
-
return
|
|
17429
|
+
return U.getLocalOrFromServer(t);
|
|
17431
17430
|
}
|
|
17432
17431
|
async getBackgroundRemovedImageSelection() {
|
|
17433
17432
|
const t = this.manager.getStepStorage(this.step.stepName)?.framePatternData?.backgroundRemovedAssetKey;
|
|
17434
17433
|
if (t)
|
|
17435
|
-
return
|
|
17434
|
+
return U.getLocalOrFromServer(t);
|
|
17436
17435
|
}
|
|
17437
17436
|
hasOriginalImageSelection() {
|
|
17438
17437
|
return !!this.manager.getStepStorage(this.step.stepName)?.framePatternData?.originalAssetKey;
|
|
@@ -17716,8 +17715,8 @@ const gc = C`
|
|
|
17716
17715
|
console.error("vite-plugin-css-injected-by-js", t);
|
|
17717
17716
|
}
|
|
17718
17717
|
})();
|
|
17719
|
-
var vc = /* @__PURE__ */ ((n) => (n.Manual = "Manual", n.OnStart = "OnStart", n.OnQuit = "OnQuit", n.OnEnd = "OnEnd", n))(vc || {}), Ee = /* @__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))(Ee || {}),
|
|
17720
|
-
|
|
17718
|
+
var vc = /* @__PURE__ */ ((n) => (n.Manual = "Manual", n.OnStart = "OnStart", n.OnQuit = "OnQuit", n.OnEnd = "OnEnd", n))(vc || {}), Ee = /* @__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))(Ee || {}), _;
|
|
17719
|
+
_ = { __e: function(n, t, e, a) {
|
|
17721
17720
|
for (var i, r, o; t = t.__; )
|
|
17722
17721
|
if ((i = t.__c) && !i.__)
|
|
17723
17722
|
try {
|
|
@@ -17728,31 +17727,31 @@ X = { __e: function(n, t, e, a) {
|
|
|
17728
17727
|
}
|
|
17729
17728
|
throw n;
|
|
17730
17729
|
} }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
|
|
17731
|
-
var
|
|
17730
|
+
var lt, oa, hn, vi = [], sa = [], gn = _.__b, mn = _.__r, pn = _.diffed, fn = _.__c, Cn = _.unmount;
|
|
17732
17731
|
function Ec() {
|
|
17733
17732
|
for (var n; n = vi.shift(); )
|
|
17734
17733
|
if (n.__P && n.__H)
|
|
17735
17734
|
try {
|
|
17736
17735
|
n.__H.__h.forEach(be), n.__H.__h.forEach(Sa), n.__H.__h = [];
|
|
17737
17736
|
} catch (t) {
|
|
17738
|
-
n.__H.__h = [],
|
|
17737
|
+
n.__H.__h = [], _.__e(t, n.__v);
|
|
17739
17738
|
}
|
|
17740
17739
|
}
|
|
17741
|
-
|
|
17742
|
-
|
|
17743
|
-
},
|
|
17740
|
+
_.__b = function(n) {
|
|
17741
|
+
lt = null, gn && gn(n);
|
|
17742
|
+
}, _.__r = function(n) {
|
|
17744
17743
|
mn && mn(n);
|
|
17745
|
-
var t = (
|
|
17746
|
-
t && (oa ===
|
|
17744
|
+
var t = (lt = n.__c).__H;
|
|
17745
|
+
t && (oa === lt ? (t.__h = [], lt.__h = [], t.__.forEach(function(e) {
|
|
17747
17746
|
e.__N && (e.__ = e.__N), e.__V = sa, e.__N = e.i = void 0;
|
|
17748
|
-
})) : (t.__h.forEach(be), t.__h.forEach(Sa), t.__h = [])), oa =
|
|
17749
|
-
},
|
|
17747
|
+
})) : (t.__h.forEach(be), t.__h.forEach(Sa), t.__h = [])), oa = lt;
|
|
17748
|
+
}, _.diffed = function(n) {
|
|
17750
17749
|
pn && pn(n);
|
|
17751
17750
|
var t = n.__c;
|
|
17752
|
-
t && t.__H && (t.__H.__h.length && (vi.push(t) !== 1 && hn ===
|
|
17751
|
+
t && t.__H && (t.__H.__h.length && (vi.push(t) !== 1 && hn === _.requestAnimationFrame || ((hn = _.requestAnimationFrame) || bc)(Ec)), t.__H.__.forEach(function(e) {
|
|
17753
17752
|
e.i && (e.__H = e.i), e.__V !== sa && (e.__ = e.__V), e.i = void 0, e.__V = sa;
|
|
17754
|
-
})), oa =
|
|
17755
|
-
},
|
|
17753
|
+
})), oa = lt = null;
|
|
17754
|
+
}, _.__c = function(n, t) {
|
|
17756
17755
|
t.some(function(e) {
|
|
17757
17756
|
try {
|
|
17758
17757
|
e.__h.forEach(be), e.__h = e.__h.filter(function(a) {
|
|
@@ -17761,10 +17760,10 @@ X.__b = function(n) {
|
|
|
17761
17760
|
} catch (a) {
|
|
17762
17761
|
t.some(function(i) {
|
|
17763
17762
|
i.__h && (i.__h = []);
|
|
17764
|
-
}), t = [],
|
|
17763
|
+
}), t = [], _.__e(a, e.__v);
|
|
17765
17764
|
}
|
|
17766
17765
|
}), fn && fn(n, t);
|
|
17767
|
-
},
|
|
17766
|
+
}, _.unmount = function(n) {
|
|
17768
17767
|
Cn && Cn(n);
|
|
17769
17768
|
var t, e = n.__c;
|
|
17770
17769
|
e && e.__H && (e.__H.__.forEach(function(a) {
|
|
@@ -17773,7 +17772,7 @@ X.__b = function(n) {
|
|
|
17773
17772
|
} catch (i) {
|
|
17774
17773
|
t = i;
|
|
17775
17774
|
}
|
|
17776
|
-
}), e.__H = void 0, t &&
|
|
17775
|
+
}), e.__H = void 0, t && _.__e(t, e.__v));
|
|
17777
17776
|
};
|
|
17778
17777
|
var wn = typeof requestAnimationFrame == "function";
|
|
17779
17778
|
function bc(n) {
|
|
@@ -17783,12 +17782,12 @@ function bc(n) {
|
|
|
17783
17782
|
wn && (t = requestAnimationFrame(e));
|
|
17784
17783
|
}
|
|
17785
17784
|
function be(n) {
|
|
17786
|
-
var t =
|
|
17787
|
-
typeof e == "function" && (n.__c = void 0, e()),
|
|
17785
|
+
var t = lt, e = n.__c;
|
|
17786
|
+
typeof e == "function" && (n.__c = void 0, e()), lt = t;
|
|
17788
17787
|
}
|
|
17789
17788
|
function Sa(n) {
|
|
17790
|
-
var t =
|
|
17791
|
-
n.__c = n.__(),
|
|
17789
|
+
var t = lt;
|
|
17790
|
+
n.__c = n.__(), lt = t;
|
|
17792
17791
|
}
|
|
17793
17792
|
const Ei = C`
|
|
17794
17793
|
fragment AddressValidationResultFields on AddressValidationResult {
|
|
@@ -17939,24 +17938,24 @@ export {
|
|
|
17939
17938
|
Fc as AddressValidationResultConfirmationLevel,
|
|
17940
17939
|
bn as AddressValidationStatus,
|
|
17941
17940
|
Od as ArrayInput,
|
|
17942
|
-
|
|
17943
|
-
|
|
17941
|
+
z as AspectType,
|
|
17942
|
+
It as AssetNotFoundError,
|
|
17944
17943
|
Ie as AssetType,
|
|
17945
17944
|
Fd as BringForwardCommand,
|
|
17946
17945
|
Dd as BringToBackCommand,
|
|
17947
17946
|
xd as BringToFrontCommand,
|
|
17948
17947
|
Gi as BundleDesignCreationCartAddMode,
|
|
17949
|
-
|
|
17948
|
+
O as CanvasCommand,
|
|
17950
17949
|
pe as CollectionProduct,
|
|
17951
17950
|
cn as ColorOptionGlobalPropertyHandle,
|
|
17952
17951
|
ko as CommandContext,
|
|
17953
17952
|
Ee as ConversionDataType,
|
|
17954
17953
|
vc as ConversionLocation,
|
|
17955
|
-
|
|
17954
|
+
q as CreateElementCommand,
|
|
17956
17955
|
ni as CreateLayoutCommand,
|
|
17957
17956
|
ic as CurrencyContext,
|
|
17958
17957
|
nc as CurrencyService,
|
|
17959
|
-
|
|
17958
|
+
Qt as DeleteElementCommand,
|
|
17960
17959
|
ul as DigitalContentStepHandle,
|
|
17961
17960
|
Dl as FileUploadGlobalPropertyHandle,
|
|
17962
17961
|
fe as FlowExecutionNodeResult,
|
|
@@ -17970,7 +17969,7 @@ export {
|
|
|
17970
17969
|
uc as FrameStep,
|
|
17971
17970
|
hc as FrameStepHandle,
|
|
17972
17971
|
Ra as GlobalPropertyHandle,
|
|
17973
|
-
|
|
17972
|
+
$ as GroupCommand,
|
|
17974
17973
|
il as IllustrationStepHandle,
|
|
17975
17974
|
qe as InformationMessageType,
|
|
17976
17975
|
Al as InformationStepHandle,
|
|
@@ -17978,8 +17977,8 @@ export {
|
|
|
17978
17977
|
qi as IntegrationType,
|
|
17979
17978
|
Ed as LayoutElementFactory,
|
|
17980
17979
|
D as LayoutElementType,
|
|
17981
|
-
|
|
17982
|
-
|
|
17980
|
+
J as LayoutNotFoundError,
|
|
17981
|
+
Jt as LayoutRenderingPurpose,
|
|
17983
17982
|
rl as MaterialStepHandle,
|
|
17984
17983
|
xe as MisconfigurationError,
|
|
17985
17984
|
Wd as MockWorkflowManager,
|
|
@@ -17990,29 +17989,29 @@ export {
|
|
|
17990
17989
|
_l as ObjectInputType,
|
|
17991
17990
|
pi as OptionGlobalPropertyHandle,
|
|
17992
17991
|
Pe as OptionNotFoundError,
|
|
17993
|
-
|
|
17992
|
+
xt as ParseError,
|
|
17994
17993
|
sl as PictureStepHandle,
|
|
17995
17994
|
Hi as ProductCameraRig,
|
|
17996
17995
|
Ci as ProductCollection,
|
|
17997
17996
|
Ll as ProductCollectionProductSortKey,
|
|
17998
|
-
|
|
17999
|
-
|
|
17997
|
+
qt as ProductWorkflow,
|
|
17998
|
+
Xt as PromiseCache,
|
|
18000
17999
|
qn as PromiseQueue,
|
|
18001
18000
|
ll as QuestionStepHandle,
|
|
18002
18001
|
Wn as QueueablePromise,
|
|
18003
18002
|
Bd as ResizeCommand,
|
|
18004
|
-
|
|
18003
|
+
Kt as ResourceNotFoundError,
|
|
18005
18004
|
Id as RotateCommand,
|
|
18006
|
-
|
|
18005
|
+
j as ScaleAxis,
|
|
18007
18006
|
kd as SendBackwardsCommand,
|
|
18008
18007
|
cl as ShapeStepHandle,
|
|
18009
18008
|
Wi as ShareActionType,
|
|
18010
18009
|
$d as SpiffCommerceClient,
|
|
18011
18010
|
Be as StakeholderType,
|
|
18012
18011
|
zi as StepAspectType,
|
|
18013
|
-
|
|
18012
|
+
tt as StepHandle,
|
|
18014
18013
|
E as StepType,
|
|
18015
|
-
|
|
18014
|
+
Mt as TextAlgorithm,
|
|
18016
18015
|
$o as TextChangeCommand,
|
|
18017
18016
|
Fl as TextGlobalPropertyHandle,
|
|
18018
18017
|
Rd as TextInput,
|
|
@@ -18022,10 +18021,10 @@ export {
|
|
|
18022
18021
|
R as UnhandledBehaviorError,
|
|
18023
18022
|
ji as UnitOfMeasurement,
|
|
18024
18023
|
Pd as UpdateImageSourceCommand,
|
|
18025
|
-
|
|
18024
|
+
st as Variant,
|
|
18026
18025
|
wa as WorkflowExperienceEventType,
|
|
18027
18026
|
Il as WorkflowExperienceImpl,
|
|
18028
|
-
|
|
18027
|
+
U as assetService,
|
|
18029
18028
|
wr as browserColorToHex,
|
|
18030
18029
|
Sd as cmPerPixel,
|
|
18031
18030
|
wl as createDesign,
|
|
@@ -18035,18 +18034,18 @@ export {
|
|
|
18035
18034
|
ra as designService,
|
|
18036
18035
|
ve as determineCorrectFontSizeAndLines,
|
|
18037
18036
|
ri as digitalContentStepService,
|
|
18038
|
-
|
|
18037
|
+
ut as domParser,
|
|
18039
18038
|
jd as duplicateBundle,
|
|
18040
18039
|
Yd as duplicateTransaction,
|
|
18041
18040
|
nt as fetchAsString,
|
|
18042
18041
|
Ad as findAngle,
|
|
18043
|
-
|
|
18042
|
+
L as findElement,
|
|
18044
18043
|
cd as findPmsColors,
|
|
18045
|
-
|
|
18046
|
-
|
|
18047
|
-
|
|
18044
|
+
zt as frameDataCache,
|
|
18045
|
+
vt as frameStepService,
|
|
18046
|
+
Q as generate,
|
|
18048
18047
|
Cs as generateCommands,
|
|
18049
|
-
|
|
18048
|
+
ct as generateSVGWithUnknownColors,
|
|
18050
18049
|
Td as generateStateFromDesignInputSteps,
|
|
18051
18050
|
nA as getAddressValidationJobs,
|
|
18052
18051
|
Ue as getAttributesFromArrayBuffer,
|
|
@@ -18081,7 +18080,7 @@ export {
|
|
|
18081
18080
|
y as graphQlManager,
|
|
18082
18081
|
Se as illustrationStepService,
|
|
18083
18082
|
ud as isCloseToValue,
|
|
18084
|
-
|
|
18083
|
+
Nt as loadFont,
|
|
18085
18084
|
ld as matchHexToPms,
|
|
18086
18085
|
oi as materialStepService,
|
|
18087
18086
|
Ul as metafieldManager,
|
|
@@ -18091,11 +18090,11 @@ export {
|
|
|
18091
18090
|
li as moduleStepService,
|
|
18092
18091
|
qd as nameBundle,
|
|
18093
18092
|
Hd as nameTransaction,
|
|
18094
|
-
|
|
18093
|
+
Y as optionService,
|
|
18095
18094
|
vd as outlineFontsInSvg,
|
|
18096
18095
|
oA as overrideWorkflowExperienceRecipientAddress,
|
|
18097
18096
|
gt as patternImageDataCache,
|
|
18098
|
-
|
|
18097
|
+
T as persistenceService,
|
|
18099
18098
|
ci as pictureStepService,
|
|
18100
18099
|
sd as pmsToRgb,
|
|
18101
18100
|
di as questionStepService,
|
|
@@ -18107,17 +18106,17 @@ export {
|
|
|
18107
18106
|
Pa as sanitizeSvgTree,
|
|
18108
18107
|
sr as setBearerAuthenticationToken,
|
|
18109
18108
|
kn as setCanvasModule,
|
|
18110
|
-
|
|
18109
|
+
Gt as shapeStepService,
|
|
18111
18110
|
Lo as shortenUrl,
|
|
18112
18111
|
ft as spiffCoreConfiguration,
|
|
18113
18112
|
Md as stepAspectValuesToDesignInputSteps,
|
|
18114
18113
|
Ya as svgColorValueToDefinition,
|
|
18115
18114
|
ei as svgStringDimensions,
|
|
18116
18115
|
ba as svgToDataUrl,
|
|
18117
|
-
|
|
18116
|
+
H as textStepService,
|
|
18118
18117
|
Ko as toast,
|
|
18119
18118
|
iA as validateWorkflowExperienceRecipient,
|
|
18120
18119
|
rA as validateWorkflowExperienceRecipients,
|
|
18121
|
-
|
|
18120
|
+
Bt as xmlSerializer
|
|
18122
18121
|
};
|
|
18123
18122
|
//# sourceMappingURL=index.mjs.map
|