@spiffcommerce/core 31.2.3 → 31.2.4-beta.deb69c8f-1db2-5c9d-aec1-f3e61315a90a
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.d.ts +5 -4
- package/dist/index.js +68 -66
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +603 -590
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -4,32 +4,32 @@ import { onError as ur } from "@apollo/client/link/error";
|
|
4
4
|
import { renderToStaticMarkup as hr } from "preact-render-to-string";
|
5
5
|
import { removeTypenameFromVariables as mr } from "@apollo/client/link/remove-typename";
|
6
6
|
import { orientation as gr } from "exifr/dist/mini.umd.cjs";
|
7
|
-
import { parse as
|
7
|
+
import { parse as on } from "css";
|
8
8
|
import pr from "fuse.js";
|
9
9
|
import { Pith as Aa } from "pith";
|
10
|
-
import
|
11
|
-
import { toString as
|
10
|
+
import vt from "lodash.clonedeep";
|
11
|
+
import { toString as ln } from "qrcode";
|
12
12
|
import fr from "svg-path-bbox";
|
13
13
|
import { parse as ta } from "opentype.js";
|
14
14
|
import { jsx as D, jsxs as ct, Fragment as Gt } from "preact/jsx-runtime";
|
15
15
|
import Cr from "handlebars";
|
16
16
|
import { dataUriToBuffer as wr } from "data-uri-to-buffer";
|
17
|
-
import
|
18
|
-
import { CognitoIdentityProviderClient as yr, InitiateAuthCommand as
|
17
|
+
import Fa from "lodash.chunk";
|
18
|
+
import { CognitoIdentityProviderClient as yr, InitiateAuthCommand as xa, RespondToAuthChallengeCommand as Sr } from "@aws-sdk/client-cognito-identity-provider";
|
19
19
|
import vr from "dinero.js";
|
20
|
-
import * as
|
21
|
-
import
|
20
|
+
import * as ka from "currency-codes";
|
21
|
+
import cn from "lodash.isequal";
|
22
22
|
import { split as ea } from "unicode-default-word-boundary";
|
23
|
-
import
|
23
|
+
import dn from "lodash.debounce";
|
24
24
|
import "fs";
|
25
25
|
import "path";
|
26
26
|
var ye = /* @__PURE__ */ ((r) => (r.Data = "Data", r.Font = "Font", r.Frame = "Frame", r.Illustration = "Illustration", r.Image = "Image", r.Model = "Model", r.Material = "Material", r.Color = "Color", r.QuestionnaireCollateral = "QuestionnaireCollateral", r.RequestCollateral = "RequestCollateral", r.SignupCollateral = "SignupCollateral", r.Video = "Video", r.ColorProfile = "ColorProfile", r.Environment = "Environment", r))(ye || {}), L = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(L || {}), v = /* @__PURE__ */ ((r) => (r.Information = "Information", r.Bulk = "Bulk", r.DigitalContent = "DigitalContent", r.Finish = "Finish", r.Frame = "Frame", r.Illustration = "Illustration", r.Introduction = "Introduction", r.Material = "Material", r.Model = "Model", r.Module = "Module", r.Picture = "Picture", r.Photo = "Photo", r.ProductOverlay = "ProductOverlay", r.Question = "Question", r.Shape = "Shape", r.SilentIllustration = "SilentIllustration", r.Text = "Text", r))(v || {}), Er = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(Er || {}), Ht = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Ht || {}), x = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(x || {}), br = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(br || {}), Br = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(Br || {}), Ir = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(Ir || {}), ua = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(ua || {}), Pr = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(Pr || {}), Se = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(Se || {}), Mt = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(Mt || {}), j = /* @__PURE__ */ ((r) => (r[r.North = 0] = "North", r[r.Northeast = 1] = "Northeast", r[r.East = 2] = "East", r[r.Southeast = 3] = "Southeast", r[r.South = 4] = "South", r[r.Southwest = 5] = "Southwest", r[r.West = 6] = "West", r[r.Northwest = 7] = "Northwest", r))(j || {}), Dr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Dr || {});
|
27
|
-
class
|
27
|
+
class An extends Error {
|
28
28
|
constructor(t) {
|
29
29
|
super(t), this.name = this.constructor.name;
|
30
30
|
}
|
31
31
|
}
|
32
|
-
class Xt extends
|
32
|
+
class Xt extends An {
|
33
33
|
constructor(t) {
|
34
34
|
super(`ConfigurationError - ${t}`);
|
35
35
|
}
|
@@ -44,7 +44,7 @@ class Y extends Xt {
|
|
44
44
|
super(`Panel not Found: ${t.panelId}`), this.panelId = t?.panelId || "N/A";
|
45
45
|
}
|
46
46
|
}
|
47
|
-
class
|
47
|
+
class Et extends Xt {
|
48
48
|
constructor(t) {
|
49
49
|
super(`Asset not found for variant: ${t.name}`), this.variant = t;
|
50
50
|
}
|
@@ -59,7 +59,7 @@ class Ee extends Xt {
|
|
59
59
|
super(`Workflow Misconfiguration: ${t.stepName} - ${e}`), this.step = t;
|
60
60
|
}
|
61
61
|
}
|
62
|
-
class xe extends
|
62
|
+
class xe extends An {
|
63
63
|
constructor(t) {
|
64
64
|
super(`ImplementationError - ${t}`);
|
65
65
|
}
|
@@ -104,7 +104,7 @@ class Fr {
|
|
104
104
|
this.set(t, a);
|
105
105
|
}
|
106
106
|
}
|
107
|
-
class
|
107
|
+
class Ma {
|
108
108
|
constructor() {
|
109
109
|
this.storage = /* @__PURE__ */ new Map();
|
110
110
|
}
|
@@ -129,9 +129,9 @@ class Ta {
|
|
129
129
|
}
|
130
130
|
const xr = () => {
|
131
131
|
try {
|
132
|
-
return localStorage ? new Fr() : new
|
132
|
+
return localStorage ? new Fr() : new Ma();
|
133
133
|
} catch {
|
134
|
-
return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new
|
134
|
+
return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new Ma();
|
135
135
|
}
|
136
136
|
}, k = xr();
|
137
137
|
class kr {
|
@@ -183,19 +183,19 @@ function rt(r, t) {
|
|
183
183
|
}
|
184
184
|
return na(r, t);
|
185
185
|
}
|
186
|
-
const
|
187
|
-
const t =
|
186
|
+
const un = /* @__PURE__ */ new Map(), Ta = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), hn = async (r) => {
|
187
|
+
const t = Ta.get(r);
|
188
188
|
if (t) return t;
|
189
189
|
const a = (async () => {
|
190
190
|
const n = await rt(r);
|
191
|
-
return
|
191
|
+
return un.set(r, n.headers?.get("content-type") || ""), await n.arrayBuffer();
|
192
192
|
})();
|
193
|
-
return
|
193
|
+
return Ta.set(r, a), a;
|
194
194
|
}, Mr = async (r) => {
|
195
|
-
const t =
|
195
|
+
const t = Na.get(r);
|
196
196
|
if (t) return t;
|
197
197
|
const a = (async () => await (await rt(r)).text())();
|
198
|
-
return
|
198
|
+
return Na.set(r, a), a;
|
199
199
|
}, Tt = (r) => r.every((t) => t !== "undefined"), se = (r) => Tt([typeof document]) ? document.createElement(r) : Zt().document.createElement(r), Tr = (r, t) => {
|
200
200
|
if (Tt([typeof document]))
|
201
201
|
return document.createElementNS(r, t);
|
@@ -207,7 +207,7 @@ const hn = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @_
|
|
207
207
|
const r = Zt();
|
208
208
|
return new r.DOMParser();
|
209
209
|
}, Nr = () => Tt([typeof DOMParser]) ? DOMParser : Zt().DOMParser, Me = (r, t) => new Promise((e, a) => {
|
210
|
-
t ?
|
210
|
+
t ? hn(r).then(e).catch(a) : rt(r).then((n) => {
|
211
211
|
n.arrayBuffer().then(e).catch(a);
|
212
212
|
}).catch((n) => {
|
213
213
|
a(n);
|
@@ -216,7 +216,7 @@ const hn = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @_
|
|
216
216
|
t ? Mr(r).then(e).catch(a) : rt(r).then((n) => {
|
217
217
|
n.text().then(e).catch(a);
|
218
218
|
}).catch(a);
|
219
|
-
}),
|
219
|
+
}), mn = (r) => hr(r), Ue = /* @__PURE__ */ new Map(), Qr = async (r, t) => {
|
220
220
|
if (Tt([typeof FontFace])) {
|
221
221
|
if (Ue.has(t))
|
222
222
|
return Ue.get(t);
|
@@ -230,7 +230,7 @@ const hn = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @_
|
|
230
230
|
return new XMLSerializer();
|
231
231
|
const r = Zt();
|
232
232
|
return new r.XMLSerializer();
|
233
|
-
},
|
233
|
+
}, Qa = (r) => btoa(r), Te = (r) => {
|
234
234
|
function t() {
|
235
235
|
const a = new Uint8Array(r), n = 4;
|
236
236
|
if (a.length >= n) {
|
@@ -257,7 +257,7 @@ const hn = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @_
|
|
257
257
|
const e = t();
|
258
258
|
return e || "image/svg+xml";
|
259
259
|
}, Qc = async (r) => {
|
260
|
-
const t = await
|
260
|
+
const t = await hn(r), e = un.get(r) || Te(t);
|
261
261
|
return await $r(new Blob([t], { type: e }));
|
262
262
|
}, Rr = (r) => {
|
263
263
|
let t = "";
|
@@ -268,7 +268,7 @@ const hn = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @_
|
|
268
268
|
}, Or = async (r) => {
|
269
269
|
const t = Te(r), e = new Uint8Array(r), a = Rr(e), n = btoa(a);
|
270
270
|
return `data:${t};base64,${n}`;
|
271
|
-
}, ha = (r) => `data:image/svg+xml;base64,${btoa(r)}`,
|
271
|
+
}, ha = (r) => `data:image/svg+xml;base64,${btoa(r)}`, gn = (r) => {
|
272
272
|
const t = r.replace(/\r?\n/g, ""), e = t.indexOf(",");
|
273
273
|
if (e === -1 || e <= 4)
|
274
274
|
throw new TypeError("malformed data: URI");
|
@@ -291,9 +291,9 @@ let Ur, ma;
|
|
291
291
|
const Lr = (r) => {
|
292
292
|
ma = r;
|
293
293
|
}, Vr = () => ma;
|
294
|
-
let
|
294
|
+
let pn;
|
295
295
|
const zr = (r) => {
|
296
|
-
|
296
|
+
pn = r;
|
297
297
|
}, Gr = () => new Promise((r) => {
|
298
298
|
const t = gt.getHubUrl(), e = (a) => {
|
299
299
|
a.origin === t && (window.removeEventListener("message", e), r(a.data));
|
@@ -303,7 +303,7 @@ const zr = (r) => {
|
|
303
303
|
const r = {
|
304
304
|
applicationKey: ma,
|
305
305
|
customerToken: Ur,
|
306
|
-
bearer:
|
306
|
+
bearer: pn
|
307
307
|
};
|
308
308
|
return typeof window < "u" && (window.location.href.includes("/workflows/product/") || window.location.href.includes("hub=true")) ? { ...await Gr(), ...r } : r;
|
309
309
|
};
|
@@ -336,12 +336,12 @@ class jr {
|
|
336
336
|
d = await this.spiffClient.loggedInBearerToken();
|
337
337
|
} catch {
|
338
338
|
}
|
339
|
-
const A = s.partnerId ?? c.partnerId, u = s.activeIntegration ?? c.activeIntegration, h = s.transactionOwnerId, m = s.customerToken ?? c.customerToken,
|
339
|
+
const A = s.partnerId ?? c.partnerId, u = s.activeIntegration ?? c.activeIntegration, h = s.transactionOwnerId, m = s.customerToken ?? c.customerToken, g = s.applicationKey ?? c.applicationKey, p = s.bundleOwnerId;
|
340
340
|
try {
|
341
341
|
if (window && window.__SENTRY__) {
|
342
|
-
const
|
343
|
-
if (
|
344
|
-
const S =
|
342
|
+
const f = window.__SENTRY__.hub;
|
343
|
+
if (f) {
|
344
|
+
const S = f.traceHeaders();
|
345
345
|
Object.entries(S).forEach(([b, I]) => {
|
346
346
|
l[b] = I;
|
347
347
|
});
|
@@ -349,7 +349,7 @@ class jr {
|
|
349
349
|
}
|
350
350
|
} catch {
|
351
351
|
}
|
352
|
-
return d && (l.Authorization = `Bearer ${d}`), A && (l.partnerId = A), u && (l.activeIntegration = u), h && (l.transactionOwnerId = h), m && (l.customerToken = m),
|
352
|
+
return d && (l.Authorization = `Bearer ${d}`), A && (l.partnerId = A), u && (l.activeIntegration = u), h && (l.transactionOwnerId = h), m && (l.customerToken = m), g && (l["X-Application-Key"] = g), p && (l.bundleOwnerId = p), l["Allow-Moonlight-Redirect"] = "true", {
|
353
353
|
headers: l
|
354
354
|
};
|
355
355
|
}), a = ur(({ operation: i, graphQLErrors: s, networkError: o }) => {
|
@@ -369,8 +369,8 @@ const pt = (r, t, e) => {
|
|
369
369
|
if (ra !== void 0)
|
370
370
|
return ra(r, t, e);
|
371
371
|
try {
|
372
|
-
const a =
|
373
|
-
return
|
372
|
+
const a = Cn(!0);
|
373
|
+
return fn(a), a.createCanvas(r, t, e);
|
374
374
|
} catch {
|
375
375
|
throw new Error("Canvas module not set");
|
376
376
|
}
|
@@ -378,16 +378,16 @@ const pt = (r, t, e) => {
|
|
378
378
|
if (ia !== void 0)
|
379
379
|
return ia(r, t);
|
380
380
|
try {
|
381
|
-
const e =
|
382
|
-
return
|
381
|
+
const e = Cn(!0);
|
382
|
+
return fn(e), e.loadImage(r, t);
|
383
383
|
} catch {
|
384
384
|
throw new Error("Canvas module not set");
|
385
385
|
}
|
386
386
|
};
|
387
|
-
function
|
387
|
+
function fn(r) {
|
388
388
|
ra = r?.createCanvas, ia = r?.loadImage;
|
389
389
|
}
|
390
|
-
function
|
390
|
+
function Cn(r) {
|
391
391
|
try {
|
392
392
|
if (document.createElement("canvas").getContext("2d"))
|
393
393
|
return {
|
@@ -3187,23 +3187,23 @@ function $c(r, t) {
|
|
3187
3187
|
let Qt = null;
|
3188
3188
|
function ti(r) {
|
3189
3189
|
if (r.startsWith("#"))
|
3190
|
-
return
|
3190
|
+
return Ra(r);
|
3191
3191
|
if (!document)
|
3192
3192
|
throw new Error("browserColorToHex is only supported on browsers");
|
3193
3193
|
if (Qt || (Qt = document.createElement("canvas").getContext("2d")), !Qt)
|
3194
3194
|
throw new Error("Failed to create canvas context required to convert colors");
|
3195
3195
|
Qt.fillStyle = r;
|
3196
|
-
const t =
|
3196
|
+
const t = Ra(Qt.fillStyle);
|
3197
3197
|
return t || console.error(`Unknown browser color ${r}`), t;
|
3198
3198
|
}
|
3199
|
-
function
|
3199
|
+
function Ra(r) {
|
3200
3200
|
const t = r.substring(1).toUpperCase();
|
3201
3201
|
return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
|
3202
3202
|
}
|
3203
3203
|
const le = (r) => {
|
3204
|
-
const t =
|
3204
|
+
const t = wn(r.spotColor);
|
3205
3205
|
return t ? `${r.browserValue} ${t}` : r.browserValue;
|
3206
|
-
},
|
3206
|
+
}, wn = (r) => {
|
3207
3207
|
if (!r)
|
3208
3208
|
return "";
|
3209
3209
|
if (r.profileName.includes("/") && r.profileName.includes(".icc")) {
|
@@ -3211,7 +3211,7 @@ const le = (r) => {
|
|
3211
3211
|
return `icc-named-color(${t.slice(e + 1).slice(0, -4)}, ${r.namedColor})`;
|
3212
3212
|
}
|
3213
3213
|
return `icc-named-color(${r.profileName}, ${r.namedColor})`;
|
3214
|
-
},
|
3214
|
+
}, Oa = (r) => {
|
3215
3215
|
const t = r.split(/[ ](?=[^)]*?(?:\(|$))/);
|
3216
3216
|
if (t.length === 0)
|
3217
3217
|
return { browserValue: "#000000" };
|
@@ -3255,7 +3255,7 @@ const le = (r) => {
|
|
3255
3255
|
}
|
3256
3256
|
if (a.tagName === "style") {
|
3257
3257
|
try {
|
3258
|
-
|
3258
|
+
on(a.innerHTML).stylesheet?.rules.forEach((s) => {
|
3259
3259
|
e.push(s);
|
3260
3260
|
}), a.remove();
|
3261
3261
|
} catch (i) {
|
@@ -3287,9 +3287,9 @@ const le = (r) => {
|
|
3287
3287
|
const t = /pt|pc|mm|cm|in/gm, e = r.getAttribute("viewBox"), a = r.getAttribute("width"), n = r.getAttribute("height");
|
3288
3288
|
if (!e) throw new Error("viewBox not specified on SVG!");
|
3289
3289
|
a && r.setAttribute("width", a.replace(t, "")), n && r.setAttribute("height", n.replace(t, ""));
|
3290
|
-
},
|
3290
|
+
}, yn = (r) => dt().parseFromString(r, "image/svg+xml").firstElementChild, ii = (r, t, e) => {
|
3291
3291
|
r.setAttribute("height", `${e}px`), r.setAttribute("width", `${t}px`);
|
3292
|
-
},
|
3292
|
+
}, Sn = (r, t, e) => {
|
3293
3293
|
kt(r, (a) => {
|
3294
3294
|
const n = a.attributes.getNamedItem("fill");
|
3295
3295
|
n && n.value !== "none" && a.classList.forEach((s) => {
|
@@ -3328,16 +3328,16 @@ const le = (r) => {
|
|
3328
3328
|
}
|
3329
3329
|
});
|
3330
3330
|
});
|
3331
|
-
},
|
3332
|
-
const i =
|
3331
|
+
}, vn = (r) => Bt().serializeToString(r), fa = (r, t, e, a, n) => {
|
3332
|
+
const i = yn(r);
|
3333
3333
|
if (!i)
|
3334
3334
|
throw new Error("Failed to read SVG.");
|
3335
|
-
return ii(i, t, e),
|
3335
|
+
return ii(i, t, e), Sn(i, a, n), vn(i);
|
3336
3336
|
}, Ca = (r, t, e) => {
|
3337
|
-
const a =
|
3337
|
+
const a = yn(r);
|
3338
3338
|
if (!a)
|
3339
3339
|
throw new Error("Failed to read SVG.");
|
3340
|
-
return
|
3340
|
+
return Sn(a, t, e), vn(a);
|
3341
3341
|
}, si = (r) => {
|
3342
3342
|
const t = /<svg.*<\/svg>/s, e = r.match(t) || [], a = e?.length > 0 ? e[0] : "";
|
3343
3343
|
return dt().parseFromString(a, "image/svg+xml");
|
@@ -3351,12 +3351,12 @@ const le = (r) => {
|
|
3351
3351
|
ei.includes(s.tagName) && !s.attributes.getNamedItem("fill") && s.setAttribute("fill", "black");
|
3352
3352
|
const o = s.attributes.getNamedItem("fill");
|
3353
3353
|
if (o && o.value !== "none" && !o.value.startsWith("url(")) {
|
3354
|
-
const c =
|
3354
|
+
const c = Oa(o.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
|
3355
3355
|
s.setAttribute("fill", c.browserValue), s.classList.add(A), a[d] = c;
|
3356
3356
|
}
|
3357
3357
|
const l = s.attributes.getNamedItem("stroke");
|
3358
3358
|
if (l && l.value !== "none" && !l.value.startsWith("url(")) {
|
3359
|
-
const c =
|
3359
|
+
const c = Oa(l.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-stroke-${d}`;
|
3360
3360
|
s.classList.add(A), s.setAttribute("stroke", c.browserValue), a[d] = c;
|
3361
3361
|
}
|
3362
3362
|
});
|
@@ -3748,7 +3748,7 @@ const Rt = "persistentAssets", lt = class lt {
|
|
3748
3748
|
};
|
3749
3749
|
lt.callbacks = [];
|
3750
3750
|
let At = lt;
|
3751
|
-
const
|
3751
|
+
const $a = "bgrmPersistentAssets";
|
3752
3752
|
class J {
|
3753
3753
|
static has(t) {
|
3754
3754
|
return J.getMap().has(t);
|
@@ -3775,10 +3775,10 @@ class J {
|
|
3775
3775
|
a && (e.delete(a), J.setMap(e));
|
3776
3776
|
}
|
3777
3777
|
static getMap() {
|
3778
|
-
return k.getMap(
|
3778
|
+
return k.getMap($a) || /* @__PURE__ */ new Map();
|
3779
3779
|
}
|
3780
3780
|
static setMap(t) {
|
3781
|
-
k.setMap(
|
3781
|
+
k.setMap($a, t);
|
3782
3782
|
}
|
3783
3783
|
}
|
3784
3784
|
const O = new mi();
|
@@ -3811,7 +3811,7 @@ class gi {
|
|
3811
3811
|
this.disabled = t;
|
3812
3812
|
}
|
3813
3813
|
}
|
3814
|
-
const Kt = new gi(),
|
3814
|
+
const Kt = new gi(), En = w`
|
3815
3815
|
fragment OptionFields on Option {
|
3816
3816
|
id
|
3817
3817
|
name
|
@@ -3851,7 +3851,7 @@ const Kt = new gi(), bn = w`
|
|
3851
3851
|
`, pi = w`
|
3852
3852
|
${ee(!1)}
|
3853
3853
|
${wa}
|
3854
|
-
${
|
3854
|
+
${En}
|
3855
3855
|
query GetOptions($ids: [String]!) {
|
3856
3856
|
options(ids: $ids) {
|
3857
3857
|
...OptionFields
|
@@ -3920,7 +3920,7 @@ class yi {
|
|
3920
3920
|
}
|
3921
3921
|
}
|
3922
3922
|
}
|
3923
|
-
const H = new yi(),
|
3923
|
+
const H = new yi(), bn = w`
|
3924
3924
|
fragment ActiveIntegrationFields on Integration {
|
3925
3925
|
id
|
3926
3926
|
logo
|
@@ -4048,7 +4048,7 @@ const H = new yi(), Bn = w`
|
|
4048
4048
|
}
|
4049
4049
|
}
|
4050
4050
|
}
|
4051
|
-
`,
|
4051
|
+
`, Bn = w`
|
4052
4052
|
fragment StakeholderFields on Stakeholder {
|
4053
4053
|
id
|
4054
4054
|
type
|
@@ -4056,7 +4056,7 @@ const H = new yi(), Bn = w`
|
|
4056
4056
|
authorizationNote
|
4057
4057
|
authorizationStatus
|
4058
4058
|
}
|
4059
|
-
`,
|
4059
|
+
`, In = w`
|
4060
4060
|
fragment TransactionShareActionFields on TransactionShareAction {
|
4061
4061
|
id
|
4062
4062
|
title
|
@@ -4067,9 +4067,9 @@ const H = new yi(), Bn = w`
|
|
4067
4067
|
}
|
4068
4068
|
`, vi = w`
|
4069
4069
|
${Qe}
|
4070
|
-
${In}
|
4071
|
-
${Pn}
|
4072
4070
|
${Bn}
|
4071
|
+
${In}
|
4072
|
+
${bn}
|
4073
4073
|
query ReadTransactions($ids: [String]!) {
|
4074
4074
|
transactions(ids: $ids) {
|
4075
4075
|
customLogoLink
|
@@ -4332,7 +4332,7 @@ const H = new yi(), Bn = w`
|
|
4332
4332
|
}
|
4333
4333
|
}
|
4334
4334
|
`, Pi = w`
|
4335
|
-
${
|
4335
|
+
${In}
|
4336
4336
|
query ReadTransactionForShareActions($id: String!) {
|
4337
4337
|
transactions(ids: [$id]) {
|
4338
4338
|
id
|
@@ -4342,14 +4342,14 @@ const H = new yi(), Bn = w`
|
|
4342
4342
|
}
|
4343
4343
|
}
|
4344
4344
|
}
|
4345
|
-
`,
|
4345
|
+
`, Pn = w`
|
4346
4346
|
query ReadWorkflowStates($ids: [String]!) {
|
4347
4347
|
transactions(ids: $ids) {
|
4348
4348
|
id
|
4349
4349
|
workflowState
|
4350
4350
|
}
|
4351
4351
|
}
|
4352
|
-
`,
|
4352
|
+
`, Dn = (r) => w`
|
4353
4353
|
${Qe}
|
4354
4354
|
fragment IntegrationProductFields on IntegrationProduct {
|
4355
4355
|
id
|
@@ -4433,14 +4433,14 @@ const H = new yi(), Bn = w`
|
|
4433
4433
|
}
|
4434
4434
|
}
|
4435
4435
|
`, Di = (r) => w`
|
4436
|
-
${
|
4436
|
+
${Dn(r)}
|
4437
4437
|
query GetIntegrationProducts($ids: [String!]!) {
|
4438
4438
|
integrationProducts(ids: $ids) {
|
4439
4439
|
...IntegrationProductFields
|
4440
4440
|
}
|
4441
4441
|
}
|
4442
4442
|
`, Fi = (r) => w`
|
4443
|
-
${
|
4443
|
+
${Dn(r)}
|
4444
4444
|
query GetIntegrationProductFromExternalIds($externalIntegrationId: String!, $externalProductId: String!) {
|
4445
4445
|
integrationProductFromExternalIds(
|
4446
4446
|
externalIntegrationId: $externalIntegrationId
|
@@ -4450,7 +4450,7 @@ const H = new yi(), Bn = w`
|
|
4450
4450
|
}
|
4451
4451
|
}
|
4452
4452
|
`, xi = w`
|
4453
|
-
${
|
4453
|
+
${Bn}
|
4454
4454
|
query ReadTransactionForStakeholders($id: String!) {
|
4455
4455
|
transactions(ids: [$id]) {
|
4456
4456
|
stakeholders {
|
@@ -4588,7 +4588,7 @@ const H = new yi(), Bn = w`
|
|
4588
4588
|
`, Ri = (r) => w`
|
4589
4589
|
${ee(r)}
|
4590
4590
|
${wa}
|
4591
|
-
${
|
4591
|
+
${En}
|
4592
4592
|
${Mi}
|
4593
4593
|
${Ti}
|
4594
4594
|
${Ni}
|
@@ -5113,7 +5113,7 @@ const H = new yi(), Bn = w`
|
|
5113
5113
|
}
|
5114
5114
|
}
|
5115
5115
|
`, Li = w`
|
5116
|
-
${
|
5116
|
+
${bn}
|
5117
5117
|
${Re}
|
5118
5118
|
query GetCurrentIntegration($themeConfigurationId: String) {
|
5119
5119
|
currentIntegration {
|
@@ -5213,7 +5213,7 @@ const H = new yi(), Bn = w`
|
|
5213
5213
|
],
|
5214
5214
|
silentSteps: []
|
5215
5215
|
}), t;
|
5216
|
-
}, ji = (r, t) => t.find((e) => e.stepNames.includes(r)),
|
5216
|
+
}, ji = (r, t) => t.find((e) => e.stepNames.includes(r)), St = (r, t) => (r.conditions || []).every((e) => {
|
5217
5217
|
const a = t[e.targetStepName];
|
5218
5218
|
if (a && a.selectedVariants) {
|
5219
5219
|
const n = a.selectedVariants;
|
@@ -5226,8 +5226,8 @@ const H = new yi(), Bn = w`
|
|
5226
5226
|
const e = {
|
5227
5227
|
name: r.name,
|
5228
5228
|
title: r.title,
|
5229
|
-
renderableSteps: r.renderableSteps.filter((a) =>
|
5230
|
-
silentSteps: r.silentSteps.filter((a) =>
|
5229
|
+
renderableSteps: r.renderableSteps.filter((a) => St(a, t)),
|
5230
|
+
silentSteps: r.silentSteps.filter((a) => St(a, t))
|
5231
5231
|
};
|
5232
5232
|
return e.silentSteps.length === 0 && e.renderableSteps.length === 0 ? null : e;
|
5233
5233
|
}, Pt = (r, t) => r.map((e) => Hi(e, t)).filter((e) => e !== null), Yi = async (r, t, e = !1) => {
|
@@ -5246,12 +5246,12 @@ const H = new yi(), Bn = w`
|
|
5246
5246
|
);
|
5247
5247
|
return i;
|
5248
5248
|
};
|
5249
|
-
class
|
5249
|
+
class Fn {
|
5250
5250
|
constructor() {
|
5251
5251
|
this.timestamp = Date.now();
|
5252
5252
|
}
|
5253
5253
|
}
|
5254
|
-
class
|
5254
|
+
class xn {
|
5255
5255
|
/**
|
5256
5256
|
* Constructs a new promise queue.
|
5257
5257
|
* @param queueMaxSize An optional maximum size, when the max size is hit.
|
@@ -5339,14 +5339,14 @@ const M = () => {
|
|
5339
5339
|
viewBox: A,
|
5340
5340
|
width: u
|
5341
5341
|
}) => {
|
5342
|
-
const h = e || 0, m = 2 * (l?.scale || 1),
|
5342
|
+
const h = e || 0, m = 2 * (l?.scale || 1), g = A || { x: 0, y: 0, width: u, height: i }, p = `${g.x} ${g.y} ${g.width} ${g.height}`, f = M(), S = a.purpose === Ht.FreeDesign && /* @__PURE__ */ D("defs", { children: /* @__PURE__ */ D("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ D("rect", { width: g.width, height: g.height, rx: h }) }) }), b = a.colorProfiles?.map((E, P) => (
|
5343
5343
|
/* @ts-ignore */
|
5344
5344
|
/* @__PURE__ */ D("color-profile", { name: E.name, xlinkHref: E.key, children: " " }, P)
|
5345
5345
|
)), I = n.map((E) => ({
|
5346
5346
|
...E,
|
5347
5347
|
_renderingConfiguration: a,
|
5348
|
-
mask: l ? `url(#viewmask-${
|
5349
|
-
})),
|
5348
|
+
mask: l ? `url(#viewmask-${f})` : void 0
|
5349
|
+
})), C = Sa(I);
|
5350
5350
|
return /* @__PURE__ */ ct(
|
5351
5351
|
"svg",
|
5352
5352
|
{
|
@@ -5364,7 +5364,7 @@ const M = () => {
|
|
5364
5364
|
maxHeight: s,
|
5365
5365
|
position: c
|
5366
5366
|
},
|
5367
|
-
viewBox:
|
5367
|
+
viewBox: p,
|
5368
5368
|
children: [
|
5369
5369
|
b,
|
5370
5370
|
S,
|
@@ -5372,8 +5372,8 @@ const M = () => {
|
|
5372
5372
|
"rect",
|
5373
5373
|
{
|
5374
5374
|
id: "layout-background",
|
5375
|
-
width:
|
5376
|
-
height:
|
5375
|
+
width: g.width,
|
5376
|
+
height: g.height,
|
5377
5377
|
fill: r,
|
5378
5378
|
rx: h
|
5379
5379
|
}
|
@@ -5383,7 +5383,7 @@ const M = () => {
|
|
5383
5383
|
{
|
5384
5384
|
id: "element-group",
|
5385
5385
|
clipPath: a.purpose === Ht.FreeDesign ? "url(#viewboxClip)" : void 0,
|
5386
|
-
children:
|
5386
|
+
children: C.map((E) => $n(E)).filter((E) => !!E)
|
5387
5387
|
}
|
5388
5388
|
),
|
5389
5389
|
l && /* @__PURE__ */ D(
|
@@ -5399,14 +5399,14 @@ const M = () => {
|
|
5399
5399
|
strokeDasharray: `${m * 2} ${m}`
|
5400
5400
|
}
|
5401
5401
|
),
|
5402
|
-
l && /* @__PURE__ */ ct("mask", { id: `viewmask-${
|
5402
|
+
l && /* @__PURE__ */ ct("mask", { id: `viewmask-${f}`, children: [
|
5403
5403
|
/* @__PURE__ */ D(
|
5404
5404
|
"rect",
|
5405
5405
|
{
|
5406
|
-
x:
|
5407
|
-
y:
|
5408
|
-
width:
|
5409
|
-
height:
|
5406
|
+
x: g.x,
|
5407
|
+
y: g.y,
|
5408
|
+
width: g.width,
|
5409
|
+
height: g.height,
|
5410
5410
|
fill: "black"
|
5411
5411
|
}
|
5412
5412
|
),
|
@@ -5425,12 +5425,12 @@ const M = () => {
|
|
5425
5425
|
}
|
5426
5426
|
);
|
5427
5427
|
}, Uc = (r, t, e, a, n) => {
|
5428
|
-
const i = ft(n), s = e / 2, o = a / 2, l = r + s, c = t + o, d = Math.sin(i), A = Math.cos(i), u = s, h = s, m = -o,
|
5428
|
+
const i = ft(n), s = e / 2, o = a / 2, l = r + s, c = t + o, d = Math.sin(i), A = Math.cos(i), u = s, h = s, m = -o, g = o, p = u * A - m * d, f = h * A - g * d, S = u * d + m * A, b = h * d + g * A, I = Math.max(Math.abs(p), Math.abs(f)), C = Math.max(Math.abs(S), Math.abs(b));
|
5429
5429
|
return {
|
5430
5430
|
minX: l - I,
|
5431
5431
|
maxX: l + I,
|
5432
|
-
minY: c -
|
5433
|
-
maxY: c +
|
5432
|
+
minY: c - C,
|
5433
|
+
maxY: c + C
|
5434
5434
|
};
|
5435
5435
|
}, Lc = (r, t, e) => {
|
5436
5436
|
const a = Math.sqrt(Math.pow(t.x - r.x, 2) + Math.pow(t.y - r.y, 2)), n = Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2)), i = Math.sqrt(Math.pow(e.x - r.x, 2) + Math.pow(e.y - r.y, 2));
|
@@ -5502,7 +5502,7 @@ const M = () => {
|
|
5502
5502
|
x: (r.x - t.x) * n - (r.y - t.y) * a + t.x,
|
5503
5503
|
y: (r.x - t.x) * a + (r.y - t.y) * n + t.y
|
5504
5504
|
};
|
5505
|
-
}, Jc = 0.352778, Kc = 0.035277,
|
5505
|
+
}, Jc = 0.352778, Kc = 0.035277, kn = (r) => {
|
5506
5506
|
const t = r.rotation || 0, e = ft(t), a = Math.cos(e), n = -Math.sin(e);
|
5507
5507
|
return /* @__PURE__ */ D("g", { mask: r.stepName || r.productOverlay ? void 0 : r.mask, children: /* @__PURE__ */ D(
|
5508
5508
|
"g",
|
@@ -5524,8 +5524,8 @@ const M = () => {
|
|
5524
5524
|
)
|
5525
5525
|
}
|
5526
5526
|
) });
|
5527
|
-
},
|
5528
|
-
const t = `spiff-group-clip-${r.id}`, e = r.rotation || 0, a = ft(e), n = Math.cos(a), i = -Math.sin(a), s =
|
5527
|
+
}, Mn = (r) => {
|
5528
|
+
const t = `spiff-group-clip-${r.id}`, e = r.rotation || 0, a = ft(e), n = Math.cos(a), i = -Math.sin(a), s = Sa(r.children);
|
5529
5529
|
return /* @__PURE__ */ ct(Gt, { children: [
|
5530
5530
|
/* @__PURE__ */ D("defs", { children: /* @__PURE__ */ D("clipPath", { id: t, preserveAspectRatio: "none", children: r.clipPath ? /* @__PURE__ */ D("path", { d: r.clipPath }) : /* @__PURE__ */ D("rect", { x: 0, y: 0, width: r.width, height: r.height }) }) }),
|
5531
5531
|
/* @__PURE__ */ ct(
|
@@ -5587,15 +5587,15 @@ const M = () => {
|
|
5587
5587
|
/* @__PURE__ */ D("feFuncB", { type: "discrete", tableValues: n() })
|
5588
5588
|
] })
|
5589
5589
|
] }) }) }), s = r.rotation || 0, o = ft(s), l = Math.cos(o), c = -Math.sin(o), d = () => {
|
5590
|
-
const A = r.pattern?.x || 0, u = r.pattern?.y || 0, h = r.pattern?.width || 0, m = r.pattern?.height || 0,
|
5590
|
+
const A = r.pattern?.x || 0, u = r.pattern?.y || 0, h = r.pattern?.width || 0, m = r.pattern?.height || 0, g = r.pattern?.scaleX || 1, p = r.pattern?.scaleY || 1, f = r.pattern?.rotation || 0;
|
5591
5591
|
return [r.pattern?.svg ? {
|
5592
5592
|
id: `${t}-contents`,
|
5593
5593
|
type: x.Illustration,
|
5594
5594
|
x: A,
|
5595
5595
|
y: u,
|
5596
|
-
rotation:
|
5597
|
-
width: h *
|
5598
|
-
height: m *
|
5596
|
+
rotation: f,
|
5597
|
+
width: h * g,
|
5598
|
+
height: m * p,
|
5599
5599
|
src: a(),
|
5600
5600
|
svg: r.pattern?.svg,
|
5601
5601
|
colors: r.pattern?.colors
|
@@ -5604,9 +5604,9 @@ const M = () => {
|
|
5604
5604
|
type: x.Image,
|
5605
5605
|
x: A,
|
5606
5606
|
y: u,
|
5607
|
-
rotation:
|
5608
|
-
width: h *
|
5609
|
-
height: m *
|
5607
|
+
rotation: f,
|
5608
|
+
width: h * g,
|
5609
|
+
height: m * p,
|
5610
5610
|
src: a()
|
5611
5611
|
}];
|
5612
5612
|
};
|
@@ -5629,7 +5629,7 @@ const M = () => {
|
|
5629
5629
|
matrix(${r.scaleX}, 0, 0, ${r.scaleY}, 0, 0)
|
5630
5630
|
`,
|
5631
5631
|
children: /* @__PURE__ */ D(
|
5632
|
-
|
5632
|
+
Mn,
|
5633
5633
|
{
|
5634
5634
|
id: t,
|
5635
5635
|
x: 0,
|
@@ -5646,7 +5646,7 @@ const M = () => {
|
|
5646
5646
|
}
|
5647
5647
|
)
|
5648
5648
|
] });
|
5649
|
-
},
|
5649
|
+
}, Tn = /* @__PURE__ */ new Map();
|
5650
5650
|
class _i {
|
5651
5651
|
constructor(t) {
|
5652
5652
|
this.font = t, this.glyphsFromText = /* @__PURE__ */ new Map(), this.kerningValues = /* @__PURE__ */ new Map(), this.height = this.calculateApproximateHeight();
|
@@ -5701,10 +5701,10 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
|
|
5701
5701
|
return ze.get(r);
|
5702
5702
|
const e = (async () => {
|
5703
5703
|
try {
|
5704
|
-
return
|
5704
|
+
return Ct(r).getFont();
|
5705
5705
|
} catch {
|
5706
5706
|
if (Xi(r)) {
|
5707
|
-
const a =
|
5707
|
+
const a = gn(r), n = ta(a);
|
5708
5708
|
return sa(r, n), n;
|
5709
5709
|
} else {
|
5710
5710
|
const a = await Me(r, !0), n = ta(a);
|
@@ -5714,53 +5714,53 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
|
|
5714
5714
|
})();
|
5715
5715
|
return ze.set(r, e), e;
|
5716
5716
|
}, Zi = (r) => {
|
5717
|
-
const t =
|
5717
|
+
const t = gn(r), e = ta(t);
|
5718
5718
|
return sa(r, e), e;
|
5719
|
-
},
|
5720
|
-
const t =
|
5719
|
+
}, Ct = (r) => {
|
5720
|
+
const t = Tn.get(r);
|
5721
5721
|
if (t)
|
5722
5722
|
return t;
|
5723
5723
|
throw new Error("Font metrics unavailable for font");
|
5724
5724
|
}, sa = (r, t) => {
|
5725
5725
|
const e = new _i(t);
|
5726
|
-
return
|
5726
|
+
return Tn.set(r, e), e;
|
5727
5727
|
}, _c = async (r) => {
|
5728
5728
|
const t = dt(), e = t.parseFromString(r, "image/svg+xml"), a = e.firstElementChild, n = /* @__PURE__ */ new Map();
|
5729
5729
|
a.querySelectorAll("style").forEach((d) => {
|
5730
|
-
|
5730
|
+
on(d.innerHTML).stylesheet?.rules.forEach((u) => {
|
5731
5731
|
if (u.type === "font-face" && u.declarations) {
|
5732
5732
|
const h = u.declarations.find(
|
5733
|
-
(
|
5734
|
-
)?.value,
|
5735
|
-
h &&
|
5733
|
+
(p) => p.property === "font-family"
|
5734
|
+
)?.value, g = u.declarations.find((p) => p.property === "src")?.value?.match(/'(https.*?)'/)?.[1];
|
5735
|
+
h && g && n.set(h, g);
|
5736
5736
|
}
|
5737
5737
|
});
|
5738
5738
|
});
|
5739
5739
|
const s = e.querySelectorAll("tspan");
|
5740
5740
|
for (let d = 0; d < s.length; d++) {
|
5741
|
-
const A = s.item(d), u = A.closest("text"), h = A.closest("g"), m = u.getAttribute("font-family"),
|
5741
|
+
const A = s.item(d), u = A.closest("text"), h = A.closest("g"), m = u.getAttribute("font-family"), g = await Nt(n.get(m)), p = u.getAttribute("fill"), f = u.getAttribute("stroke"), S = u.getAttribute("stroke-width"), b = g.getPath(
|
5742
5742
|
A.innerHTML,
|
5743
5743
|
0,
|
5744
5744
|
0,
|
5745
5745
|
parseInt(u.getAttribute("font-size") ?? "72")
|
5746
5746
|
), I = b.getBoundingBox().x2 - b.getBoundingBox().x1;
|
5747
|
-
let
|
5747
|
+
let C = 0;
|
5748
5748
|
const E = A.getAttribute("text-anchor");
|
5749
|
-
E === "middle" ?
|
5750
|
-
const P =
|
5749
|
+
E === "middle" ? C = I / 2 : E === "end" && (C = I);
|
5750
|
+
const P = g.getPath(
|
5751
5751
|
A.innerHTML,
|
5752
|
-
parseFloat(A.getAttribute("x") ?? "0") -
|
5752
|
+
parseFloat(A.getAttribute("x") ?? "0") - C,
|
5753
5753
|
parseFloat(A.getAttribute("y") ?? "0"),
|
5754
5754
|
parseInt(u.getAttribute("font-size") ?? "72")
|
5755
5755
|
);
|
5756
|
-
P.fill =
|
5756
|
+
P.fill = p, P.stroke = f, P.strokeWidth = parseFloat(S ?? "0");
|
5757
5757
|
const B = P.toSVG(2), Q = t.parseFromString(B, "image/svg+xml").firstElementChild;
|
5758
5758
|
h.appendChild(Q);
|
5759
5759
|
}
|
5760
5760
|
return e.querySelectorAll("text").forEach((d) => d.remove()), Bt().serializeToString(a);
|
5761
5761
|
}, Be = (r, t, e, a) => Math.max(ns(r.join(`
|
5762
|
-
`), e, a), t),
|
5763
|
-
const s = (i ||
|
5762
|
+
`), e, a), t), Ua = (r, t, e, a, n, i) => {
|
5763
|
+
const s = (i || Rn) * n.getApproximateHeight(), o = t.split(`
|
5764
5764
|
`);
|
5765
5765
|
try {
|
5766
5766
|
const l = o.flatMap((d) => ge(d, r.width, a, n)), c = l.flatMap((d) => d.lines);
|
@@ -5801,8 +5801,8 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
|
|
5801
5801
|
l = Math.max(l, mt(d, e, a));
|
5802
5802
|
let u = c + 1, h = !0;
|
5803
5803
|
for (; u < s.length && h; ) {
|
5804
|
-
const m = s[u],
|
5805
|
-
|
5804
|
+
const m = s[u], g = mt(`${A.join(" ")} ${m}`, e, a);
|
5805
|
+
g <= t ? (A.push(m), l = Math.max(l, g), u++) : h = !1;
|
5806
5806
|
}
|
5807
5807
|
o.push(A.join(" ")), c = u;
|
5808
5808
|
}
|
@@ -5811,12 +5811,12 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
|
|
5811
5811
|
throw new Error(`No max width calculated for text: ${o}.`);
|
5812
5812
|
return { lines: o, width: l };
|
5813
5813
|
}, ts = (r, t, e, a, n, i) => {
|
5814
|
-
const s = (i ??
|
5814
|
+
const s = (i ?? Rn) * t.getApproximateHeight(), o = 1 / e.unitsPerEm, l = Nn(r, o, t), c = r.length * s * o, d = a / l, A = n / c;
|
5815
5815
|
return Math.min(A, d);
|
5816
5816
|
}, es = (r, t, e, a) => {
|
5817
|
-
const n =
|
5817
|
+
const n = Ct(t.fontData.assetUrl), i = n.getFont(), s = t.fontSize / i.unitsPerEm;
|
5818
5818
|
if (!e)
|
5819
|
-
return
|
5819
|
+
return Ua(t, r, t.fontSize, s, n, a);
|
5820
5820
|
let o;
|
5821
5821
|
if (t.text ? o = t.text.split(`
|
5822
5822
|
`) : o = t.input?.split(`
|
@@ -5833,11 +5833,11 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
|
|
5833
5833
|
requiredHeight: t.height,
|
5834
5834
|
requiredWidth: Be(o, t.width, s, n),
|
5835
5835
|
fontSize: ts(o, n, i, t.width, t.height, a)
|
5836
|
-
} :
|
5836
|
+
} : Ua(t, r, t.fontSize, s, n, a);
|
5837
5837
|
}, as = (r, t, e, a, n) => {
|
5838
|
-
const s =
|
5838
|
+
const s = Ct(t.assetUrl).getFont();
|
5839
5839
|
let o = { ...r };
|
5840
|
-
const l = { ...r }, c =
|
5840
|
+
const l = { ...r }, c = Nn(a, e / s.unitsPerEm, Ct(t.assetUrl));
|
5841
5841
|
return c && c < o.width && (l.width = c, n === "left" ? (l.left += Math.sin(o.rotation * Math.PI / 360) * (o.width - c), l.top += Math.sin(o.rotation * Math.PI / 180) * (c - o.width) / 2) : n === "right" ? l.left += o.width - c : l.left += (o.width - c) / 2, a && rs(a, a).every(([d, A]) => d === A) && (o = l)), o;
|
5842
5842
|
}, Ge = 1, mt = (r, t, e) => {
|
5843
5843
|
let a = 0;
|
@@ -5857,21 +5857,21 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
|
|
5857
5857
|
a = Math.max(a, o || 0);
|
5858
5858
|
}
|
5859
5859
|
}), a *= t, a;
|
5860
|
-
},
|
5860
|
+
}, Nn = (r, t, e) => {
|
5861
5861
|
let a = 0;
|
5862
5862
|
return r.forEach((n) => {
|
5863
5863
|
a = Math.max(a, mt(n, t, e));
|
5864
5864
|
}), a;
|
5865
|
-
},
|
5865
|
+
}, La = {
|
5866
5866
|
stripControlCharacters: !0,
|
5867
5867
|
vertical: !1,
|
5868
5868
|
uppercase: !1
|
5869
|
-
}, Ie = (r, t =
|
5870
|
-
const e = { ...
|
5869
|
+
}, Ie = (r, t = La) => {
|
5870
|
+
const e = { ...La, ...t };
|
5871
5871
|
let a = r || "";
|
5872
5872
|
return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
|
5873
5873
|
`)), a;
|
5874
|
-
}, rs = (r, t) => r.map((e, a) => [e, t[a]]), is = (r = "center", t = !1) => t ? "center" : r,
|
5874
|
+
}, rs = (r, t) => r.map((e, a) => [e, t[a]]), is = (r = "center", t = !1) => t ? "center" : r, Qn = (r) => r === "left" ? "start" : r === "right" ? "end" : "middle", ae = (r, t, e) => r.fontData ? {
|
5875
5875
|
...r,
|
5876
5876
|
...(() => {
|
5877
5877
|
if (r.algorithm === Mt.Traditional) {
|
@@ -5889,7 +5889,7 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
|
|
5889
5889
|
text: t
|
5890
5890
|
};
|
5891
5891
|
})()
|
5892
|
-
} : r,
|
5892
|
+
} : r, Rn = 1.1;
|
5893
5893
|
function Ft(r, t) {
|
5894
5894
|
return On(r, t.getTemplatingContext());
|
5895
5895
|
}
|
@@ -5906,7 +5906,7 @@ const ss = (r) => {
|
|
5906
5906
|
`), A = r.strokeColor?.browserValue && r.strokeThickness ? r.strokeColor?.browserValue : void 0, u = r.strokeColor?.browserValue && r.strokeThickness ? r.strokeThickness : void 0;
|
5907
5907
|
if (r.curved && !r.paths || !r.fontData)
|
5908
5908
|
return null;
|
5909
|
-
const h = () => r.textFillImage ? `url("#${s}")` : r._renderingConfiguration?.spotColors && r.fillSpotColorDefinition ? `${r.fill} ${
|
5909
|
+
const h = () => r.textFillImage ? `url("#${s}")` : r._renderingConfiguration?.spotColors && r.fillSpotColorDefinition ? `${r.fill} ${wn(r.fillSpotColorDefinition)}` : r.fill;
|
5910
5910
|
return /* @__PURE__ */ ct(Gt, { children: [
|
5911
5911
|
/* @__PURE__ */ ct("defs", { children: [
|
5912
5912
|
r.textFillImage && /* @__PURE__ */ D(
|
@@ -5961,28 +5961,34 @@ const ss = (r) => {
|
|
5961
5961
|
},
|
5962
5962
|
stroke: A,
|
5963
5963
|
strokeWidth: u,
|
5964
|
-
children: r.curved ? /* @__PURE__ */ D(ls, { text: c, curvedPathId: i, align: r.align }) : d.map((m,
|
5964
|
+
children: r.curved ? /* @__PURE__ */ D(ls, { text: c, curvedPathId: i, align: r.align }) : d.map((m, g) => /* @__PURE__ */ D(
|
5965
5965
|
os,
|
5966
5966
|
{
|
5967
5967
|
align: r.vertical ? "center" : r.align,
|
5968
5968
|
fontSize: r.fontSize,
|
5969
|
-
thisLineIdx:
|
5969
|
+
thisLineIdx: g,
|
5970
5970
|
amountLines: d.length,
|
5971
5971
|
text: m,
|
5972
5972
|
textboxHeight: r.height,
|
5973
5973
|
textboxWidth: r.width,
|
5974
5974
|
lineHeight: r.lineHeight,
|
5975
5975
|
vertical: r.vertical,
|
5976
|
-
verticalAlign: r.verticalAlign
|
5976
|
+
verticalAlign: r.verticalAlign,
|
5977
|
+
fontData: r.fontData
|
5977
5978
|
},
|
5978
|
-
|
5979
|
+
g
|
5979
5980
|
))
|
5980
5981
|
}
|
5981
5982
|
) }) })
|
5982
5983
|
] });
|
5983
5984
|
}, os = (r) => {
|
5984
|
-
const t = () =>
|
5985
|
-
|
5985
|
+
const t = () => {
|
5986
|
+
if (r.lineHeight !== void 0)
|
5987
|
+
return r.lineHeight * r.fontSize;
|
5988
|
+
const n = Ct(r.fontData.assetUrl), i = n.getFont(), s = r.fontSize / i.unitsPerEm;
|
5989
|
+
return n.getApproximateHeight() * s;
|
5990
|
+
}, e = () => r.align === "left" ? -r.textboxWidth / 2 : r.align === "right" ? r.textboxWidth / 2 : 0, a = () => {
|
5991
|
+
const n = t(), i = r.textboxHeight / 2;
|
5986
5992
|
if (r.verticalAlign === "top")
|
5987
5993
|
return -i + r.fontSize * 3 / 4 + r.thisLineIdx * n;
|
5988
5994
|
if (r.verticalAlign === "bottom") {
|
@@ -5992,14 +5998,14 @@ const ss = (r) => {
|
|
5992
5998
|
const s = (r.amountLines - 1) / 2;
|
5993
5999
|
return (r.thisLineIdx - s) * n + r.fontSize / 4;
|
5994
6000
|
};
|
5995
|
-
return /* @__PURE__ */ D("tspan", { textAnchor:
|
6001
|
+
return /* @__PURE__ */ D("tspan", { textAnchor: Qn(r.align), x: e(), y: `${a()}px`, children: r.text });
|
5996
6002
|
}, ls = (r) => {
|
5997
6003
|
const t = `#${r.curvedPathId}`;
|
5998
6004
|
return /* @__PURE__ */ D(
|
5999
6005
|
"textPath",
|
6000
6006
|
{
|
6001
6007
|
startOffset: r.align === "left" ? "0%" : r.align === "right" ? "100%" : "50%",
|
6002
|
-
textAnchor:
|
6008
|
+
textAnchor: Qn(r.align),
|
6003
6009
|
href: t,
|
6004
6010
|
xlinkHref: t,
|
6005
6011
|
children: r.text
|
@@ -6008,7 +6014,7 @@ const ss = (r) => {
|
|
6008
6014
|
}, cs = (r) => {
|
6009
6015
|
if (r.cachedObjectURL && !r._renderingConfiguration?.omitCachedFields)
|
6010
6016
|
return /* @__PURE__ */ D(
|
6011
|
-
|
6017
|
+
kn,
|
6012
6018
|
{
|
6013
6019
|
id: r.id,
|
6014
6020
|
src: r.cachedObjectURL,
|
@@ -6113,7 +6119,7 @@ class ds {
|
|
6113
6119
|
layout: t,
|
6114
6120
|
elements: e
|
6115
6121
|
},
|
6116
|
-
getComponentWithProps: (a) =>
|
6122
|
+
getComponentWithProps: (a) => ya(t, e, a)
|
6117
6123
|
};
|
6118
6124
|
}
|
6119
6125
|
initialize(t, e) {
|
@@ -6138,7 +6144,7 @@ class ds {
|
|
6138
6144
|
return { ...t, transaction: e.apply(a) };
|
6139
6145
|
}
|
6140
6146
|
}
|
6141
|
-
const $n = (r) => r.type === x.Image ? /* @__PURE__ */ D(
|
6147
|
+
const $n = (r) => r.type === x.Image ? /* @__PURE__ */ D(kn, { ...r }, r.id) : r.type === x.Frame ? /* @__PURE__ */ D(Ki, { ...r }, r.id) : r.type === x.Illustration ? /* @__PURE__ */ D(cs, { ...r }, r.id) : r.type === x.Textbox ? /* @__PURE__ */ D(ss, { ...r }, r.id) : r.type === x.Group ? /* @__PURE__ */ D(Mn, { ...r }, r.id) : null, ya = (r, t, e) => {
|
6142
6148
|
const a = e.renderingConfiguration, n = a?.removeExcludedElements ? t.filter((i) => !i.excludeFromExport) : t;
|
6143
6149
|
return /* @__PURE__ */ D(
|
6144
6150
|
Ji,
|
@@ -6169,7 +6175,7 @@ const $n = (r) => r.type === x.Image ? /* @__PURE__ */ D(Mn, { ...r }, r.id) : r
|
|
6169
6175
|
}
|
6170
6176
|
);
|
6171
6177
|
};
|
6172
|
-
function
|
6178
|
+
function Sa(r) {
|
6173
6179
|
return r.sort((t, e) => {
|
6174
6180
|
const a = t.layer || 0, n = e.layer || 0;
|
6175
6181
|
if (a < n) return -1;
|
@@ -6246,7 +6252,7 @@ const ne = (r) => {
|
|
6246
6252
|
throw new Error("Malformed frame SVG");
|
6247
6253
|
})();
|
6248
6254
|
return We.set(r, e), e;
|
6249
|
-
},
|
6255
|
+
}, va = (r, t, e, a) => {
|
6250
6256
|
const n = t.width / t.height, i = r.width / r.height;
|
6251
6257
|
let s;
|
6252
6258
|
a ? i > n ? s = t.height / r.height : s = t.width / r.width : i > n ? s = t.width / r.width : s = t.height / r.height, e?.scale !== void 0 && (s *= e?.scale);
|
@@ -6269,7 +6275,7 @@ const ne = (r) => {
|
|
6269
6275
|
return ut.set(r, i), i;
|
6270
6276
|
}
|
6271
6277
|
if ((r.split(".").pop()?.toLowerCase() ?? "") === "svg") {
|
6272
|
-
const e = await
|
6278
|
+
const e = await Ea(r), a = e.width, n = e.height, i = {
|
6273
6279
|
src: r,
|
6274
6280
|
width: a,
|
6275
6281
|
height: n,
|
@@ -6285,14 +6291,14 @@ const ne = (r) => {
|
|
6285
6291
|
};
|
6286
6292
|
return ut.set(r, n), n;
|
6287
6293
|
}
|
6288
|
-
},
|
6294
|
+
}, Ea = async (r) => {
|
6289
6295
|
const t = await nt(r);
|
6290
6296
|
return Ln(t);
|
6291
|
-
},
|
6297
|
+
}, Va = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r), Ln = (r) => {
|
6292
6298
|
const a = dt().parseFromString(r, "image/svg+xml").querySelector("svg");
|
6293
6299
|
if (!a)
|
6294
6300
|
throw new Error("No svg tag found, this svg must be malformed!");
|
6295
|
-
const n = a.getAttribute("viewBox"), i = a.getAttribute("width"), s = a.getAttribute("height"), o = s && i ? [0, 0,
|
6301
|
+
const n = a.getAttribute("viewBox"), i = a.getAttribute("width"), s = a.getAttribute("height"), o = s && i ? [0, 0, Va(i), Va(s)] : n?.split(" ").map((l) => Number(l));
|
6296
6302
|
if (!o)
|
6297
6303
|
throw new Error("No viewbox or width/height values detected on SVG file!");
|
6298
6304
|
return {
|
@@ -6333,8 +6339,8 @@ const ne = (r) => {
|
|
6333
6339
|
fetch: rt
|
6334
6340
|
}), u = s.getAttribute("width"), h = s.getAttribute("height"), m = 2048;
|
6335
6341
|
if (h && u) {
|
6336
|
-
const
|
6337
|
-
|
6342
|
+
const g = parseFloat(h), f = parseFloat(u) / g;
|
6343
|
+
f > 1 ? A.resize(m, m / f) : A.resize(m * f, m);
|
6338
6344
|
} else
|
6339
6345
|
A.resize(m, m);
|
6340
6346
|
return await A.render(), await t(c);
|
@@ -6357,8 +6363,8 @@ const ne = (r) => {
|
|
6357
6363
|
if (e && t === x.Illustration) {
|
6358
6364
|
const l = await ot(await Vn(e)), u = dt().parseFromString(l.svg, "image/svg+xml").firstElementChild.getAttribute("viewBox");
|
6359
6365
|
if (!u) throw new Error("SVG missing viewBox.");
|
6360
|
-
const h = o.height, m = u.split(" "),
|
6361
|
-
o.height = o.width /
|
6366
|
+
const h = o.height, m = u.split(" "), g = parseFloat(m[2]) || 1, p = parseFloat(m[3]) || 1, f = g / p;
|
6367
|
+
o.height = o.width / f, o.top += (h - o.height) / 2;
|
6362
6368
|
}
|
6363
6369
|
if (e && t === x.Image) {
|
6364
6370
|
const l = o.height, c = await Me(e), d = await Ne(c), A = d.width / d.height;
|
@@ -6366,7 +6372,7 @@ const ne = (r) => {
|
|
6366
6372
|
}
|
6367
6373
|
if (e && t === x.Textbox && a?.text && a?.fontScale) {
|
6368
6374
|
await Nt(e);
|
6369
|
-
const l =
|
6375
|
+
const l = Ct(e), c = mt(a.text, a?.fontScale, l);
|
6370
6376
|
o.width = Math.min(c, n.width * 0.85), o.left = n.x + n.width / 2 - o.width / 2;
|
6371
6377
|
}
|
6372
6378
|
return o;
|
@@ -6537,13 +6543,13 @@ const $ = (r, t) => _(r, t).elements.find((n) => n.id === r), _ = (r, t) => {
|
|
6537
6543
|
throw new U();
|
6538
6544
|
return e;
|
6539
6545
|
}, X = (r, t) => {
|
6540
|
-
const e = [...t.elements.filter((n) => n.id !== r.id), r], a =
|
6546
|
+
const e = [...t.elements.filter((n) => n.id !== r.id), r], a = Sa(e);
|
6541
6547
|
return {
|
6542
6548
|
layout: t.layout,
|
6543
6549
|
elements: a,
|
6544
6550
|
modificationID: M()
|
6545
6551
|
};
|
6546
|
-
},
|
6552
|
+
}, za = async (r) => {
|
6547
6553
|
const t = [...Object.keys(r.layouts)], e = [...new Set(t)];
|
6548
6554
|
for (let a = 0; a < e.length; a++) {
|
6549
6555
|
const n = e[a], i = r.layouts[n];
|
@@ -6603,7 +6609,7 @@ class N {
|
|
6603
6609
|
this.oldState = t;
|
6604
6610
|
}
|
6605
6611
|
}
|
6606
|
-
class
|
6612
|
+
class Ga extends N {
|
6607
6613
|
constructor(t) {
|
6608
6614
|
super(), this.serializableWorkflow = t;
|
6609
6615
|
}
|
@@ -6865,7 +6871,7 @@ class hs extends N {
|
|
6865
6871
|
};
|
6866
6872
|
}
|
6867
6873
|
}
|
6868
|
-
class
|
6874
|
+
class Wa extends N {
|
6869
6875
|
constructor(t, e) {
|
6870
6876
|
super(), this.id = t, this.fontData = e;
|
6871
6877
|
}
|
@@ -7203,7 +7209,7 @@ class sd extends N {
|
|
7203
7209
|
};
|
7204
7210
|
}
|
7205
7211
|
}
|
7206
|
-
class
|
7212
|
+
class qa {
|
7207
7213
|
constructor(t, e, a) {
|
7208
7214
|
this.processRegion = async (n) => {
|
7209
7215
|
const i = this.layouts.find((l) => l.panelId === n.panelId);
|
@@ -7357,18 +7363,18 @@ class ys {
|
|
7357
7363
|
}
|
7358
7364
|
async regenerateQRCode(t, e, a, n) {
|
7359
7365
|
const i = async () => {
|
7360
|
-
const h = (await be([e]))[0], m = h?.versions?.find((
|
7366
|
+
const h = (await be([e]))[0], m = h?.versions?.find((g) => g.name === "mpeg4")?.link;
|
7361
7367
|
return { asset: h, link: m };
|
7362
7368
|
}, s = await new Promise((h, m) => {
|
7363
7369
|
new Gn(
|
7364
7370
|
async () => !!(await i()).link,
|
7365
7371
|
async () => {
|
7366
|
-
const
|
7367
|
-
if (!
|
7368
|
-
throw new Yt(
|
7372
|
+
const g = await i();
|
7373
|
+
if (!g.link || !g.link)
|
7374
|
+
throw new Yt(g.asset);
|
7369
7375
|
h({
|
7370
7376
|
rel: "mpeg4",
|
7371
|
-
href:
|
7377
|
+
href: g.link
|
7372
7378
|
});
|
7373
7379
|
},
|
7374
7380
|
() => {
|
@@ -7400,7 +7406,7 @@ class ys {
|
|
7400
7406
|
return t.data.regions.map(e);
|
7401
7407
|
}
|
7402
7408
|
async command(t, e, a, n) {
|
7403
|
-
const i = a.getLayouts(), o = `data:image/svg+xml;base64,${btoa(await
|
7409
|
+
const i = a.getLayouts(), o = `data:image/svg+xml;base64,${btoa(await ln(t, { type: "svg" }))}`, l = e.map((c) => {
|
7404
7410
|
const d = c.region, A = i.find((u) => u.panelId === d?.panelId);
|
7405
7411
|
if (!A && d)
|
7406
7412
|
throw new Y(d);
|
@@ -7436,7 +7442,7 @@ class Pe {
|
|
7436
7442
|
return oa(e);
|
7437
7443
|
const a = t.asset;
|
7438
7444
|
if (!a)
|
7439
|
-
throw new
|
7445
|
+
throw new Et(t);
|
7440
7446
|
const n = a.fileLink;
|
7441
7447
|
if (n)
|
7442
7448
|
return nt(n, !0);
|
@@ -7600,7 +7606,7 @@ class Pe {
|
|
7600
7606
|
}
|
7601
7607
|
async loadPatternFromString(t, e, a = !0, n = void 0, i) {
|
7602
7608
|
if (t.endsWith("svg")) {
|
7603
|
-
const s = await
|
7609
|
+
const s = await Ea(t), o = s.width, l = s.height, c = await nt(t);
|
7604
7610
|
if (i) {
|
7605
7611
|
const u = c.match(/<(image|linearGradient|radialGradient)(\s|>|\/>)/gim);
|
7606
7612
|
if (u && u.length > 0)
|
@@ -7703,18 +7709,18 @@ class Pe {
|
|
7703
7709
|
i && i(!0);
|
7704
7710
|
const c = t.data.initialZoomLevel, d = await Promise.all(
|
7705
7711
|
t.data.regions.map(async (h, m) => {
|
7706
|
-
const
|
7707
|
-
g,
|
7712
|
+
const g = await Oe(l[m]), p = o.getImageData(), f = a.map((P) => new bt(P.id)), S = p ? va(
|
7708
7713
|
p,
|
7714
|
+
g,
|
7709
7715
|
c && !t.data.forceImageCover ? { scale: c } : void 0,
|
7710
7716
|
t.data.forceImageCover
|
7711
|
-
) : void 0, b =
|
7717
|
+
) : void 0, b = p ? {
|
7712
7718
|
id: M(),
|
7713
|
-
src:
|
7719
|
+
src: p.src,
|
7714
7720
|
x: S?.x || 0,
|
7715
7721
|
y: S?.y || 0,
|
7716
|
-
width:
|
7717
|
-
height:
|
7722
|
+
width: p.width,
|
7723
|
+
height: p.height,
|
7718
7724
|
scaleX: S?.zoom || 1,
|
7719
7725
|
scaleY: S?.zoom || 1,
|
7720
7726
|
rotation: 0
|
@@ -7723,7 +7729,7 @@ class Pe {
|
|
7723
7729
|
throw new Y(h);
|
7724
7730
|
return {
|
7725
7731
|
command: this.getCreateElementCommand(I, h, E, {
|
7726
|
-
frameData:
|
7732
|
+
frameData: g,
|
7727
7733
|
pattern: b,
|
7728
7734
|
disablePlaceholder: t.data.disablePlaceholder,
|
7729
7735
|
stepName: t.stepName
|
@@ -7732,7 +7738,7 @@ class Pe {
|
|
7732
7738
|
id: I,
|
7733
7739
|
region: h
|
7734
7740
|
},
|
7735
|
-
removeExistingCommands:
|
7741
|
+
removeExistingCommands: f
|
7736
7742
|
};
|
7737
7743
|
})
|
7738
7744
|
), A = d.map((h) => h.command), u = d.map((h) => h.removeExistingCommands).flat();
|
@@ -7794,7 +7800,7 @@ class Pe {
|
|
7794
7800
|
), this.validateColorCount(e, a);
|
7795
7801
|
}
|
7796
7802
|
}
|
7797
|
-
const
|
7803
|
+
const yt = new Pe();
|
7798
7804
|
class Ss {
|
7799
7805
|
async getIllustrationBody(t) {
|
7800
7806
|
return new Promise((e) => {
|
@@ -7915,12 +7921,12 @@ class Ss {
|
|
7915
7921
|
n().map((h) => h.layoutState)
|
7916
7922
|
), o = { ...s.colors }, l = {};
|
7917
7923
|
Object.entries(o).forEach(([h, m]) => {
|
7918
|
-
const
|
7919
|
-
|
7924
|
+
const g = { browserValue: m.browserValue, pmsValue: m.pmsValue }, p = m.spotColor;
|
7925
|
+
p && (g.spotColor = { profileName: p.profileName, namedColor: p.namedColor }), l[h] = g;
|
7920
7926
|
});
|
7921
7927
|
for (const [h, m] of i.entries()) {
|
7922
|
-
const
|
7923
|
-
o[h] = { browserValue:
|
7928
|
+
const g = typeof m == "string" ? m : m.browserValue, p = typeof m == "string" ? void 0 : m.pmsValue;
|
7929
|
+
o[h] = { browserValue: g, spotColor: o[h]?.spotColor, pmsValue: p }, l[h] = { browserValue: g };
|
7924
7930
|
}
|
7925
7931
|
let c = Array.from(Object.values(o)).map((h) => h.browserValue);
|
7926
7932
|
const d = t.data.colorOption;
|
@@ -7951,34 +7957,34 @@ class Ss {
|
|
7951
7957
|
if (!t.data || !t.data.regions)
|
7952
7958
|
throw new Ee(t, "Missing regions.");
|
7953
7959
|
n(!0);
|
7954
|
-
const s = a.map((
|
7960
|
+
const s = a.map((f) => new bt(f.id));
|
7955
7961
|
t.mandatory && i.setMandatoryFulfilled(t.stepName, !1);
|
7956
7962
|
const o = e.asset;
|
7957
7963
|
if (!o)
|
7958
|
-
throw new
|
7964
|
+
throw new Et(e);
|
7959
7965
|
const l = o.fileLink;
|
7960
7966
|
if (!l)
|
7961
7967
|
throw new Yt(o);
|
7962
|
-
const c = await ot(await this.getIllustrationBody(l)), d = await _t(c.svg), A = (
|
7963
|
-
const S = i.getLayouts().find((I) => I.panelId ===
|
7968
|
+
const c = await ot(await this.getIllustrationBody(l)), d = await _t(c.svg), A = (f) => {
|
7969
|
+
const S = i.getLayouts().find((I) => I.panelId === f.panelId);
|
7964
7970
|
if (!S)
|
7965
|
-
throw new Y(
|
7971
|
+
throw new Y(f);
|
7966
7972
|
const b = M();
|
7967
7973
|
return {
|
7968
|
-
regionElement: { id: b, region:
|
7969
|
-
command: this.getCreateElementCommand(b,
|
7974
|
+
regionElement: { id: b, region: f },
|
7975
|
+
command: this.getCreateElementCommand(b, f, S, {
|
7970
7976
|
stepName: t.stepName,
|
7971
7977
|
src: l,
|
7972
7978
|
objectURL: d,
|
7973
7979
|
svg: c
|
7974
7980
|
})
|
7975
7981
|
};
|
7976
|
-
}, u = t.data.regions.map(A), m = [...u.map((
|
7977
|
-
let
|
7978
|
-
const
|
7979
|
-
return
|
7980
|
-
|
7981
|
-
}), i.updateMetadata(t.stepName, { colors:
|
7982
|
+
}, u = t.data.regions.map(A), m = [...u.map((f) => f.command), ...s];
|
7983
|
+
let g = Array.from(Object.values(c.colors)).map((f) => f.browserValue);
|
7984
|
+
const p = t.data.colorOption;
|
7985
|
+
return p && p.variants?.forEach((f) => {
|
7986
|
+
g = g.map((S) => S.toLowerCase() === f.color?.toLowerCase() ? f.name : S);
|
7987
|
+
}), i.updateMetadata(t.stepName, { colors: g }), {
|
7982
7988
|
command: new R(m),
|
7983
7989
|
followup: async () => {
|
7984
7990
|
await i.setSelectionsAndElements(
|
@@ -7989,12 +7995,12 @@ class Ss {
|
|
7989
7995
|
i.setMandatoryFulfilled(t.stepName, !0), n(!1);
|
7990
7996
|
}
|
7991
7997
|
);
|
7992
|
-
const
|
7993
|
-
if (
|
7998
|
+
const f = o.assetConfiguration?.defaultColorVariants || [];
|
7999
|
+
if (f.length !== 0) {
|
7994
8000
|
const S = {};
|
7995
8001
|
(o.assetConfiguration?.channelNumbers || []).forEach((I) => {
|
7996
|
-
const
|
7997
|
-
|
8002
|
+
const C = f.find((E) => E.channelNumber === I.number);
|
8003
|
+
C && (S[`${I.id.replace(/\W/g, "")}`] = { browserValue: C?.variant?.color || "" });
|
7998
8004
|
}), await this.changeColors(
|
7999
8005
|
t,
|
8000
8006
|
u.map((I) => I.regionElement),
|
@@ -8006,18 +8012,18 @@ class Ss {
|
|
8006
8012
|
if (t.data.colorPickerEnabled) {
|
8007
8013
|
const S = await this.availableColors(t, i) || [], b = Object.keys(c.colors), I = S.length === 1 && b.length === 1;
|
8008
8014
|
if (I) {
|
8009
|
-
const
|
8015
|
+
const C = S[0], E = b[0];
|
8010
8016
|
await this.changeColors(
|
8011
8017
|
t,
|
8012
8018
|
u.map((P) => P.regionElement),
|
8013
8019
|
i,
|
8014
8020
|
() => i.getCommandContext().getAllLayouts(),
|
8015
|
-
/* @__PURE__ */ new Map([[E,
|
8021
|
+
/* @__PURE__ */ new Map([[E, C.variant.color]])
|
8016
8022
|
);
|
8017
8023
|
}
|
8018
|
-
!I &&
|
8024
|
+
!I && f.length === 0 && await this.changeColors(
|
8019
8025
|
t,
|
8020
|
-
u.map((
|
8026
|
+
u.map((C) => C.regionElement),
|
8021
8027
|
i,
|
8022
8028
|
() => i.getCommandContext().getAllLayouts(),
|
8023
8029
|
/* @__PURE__ */ new Map()
|
@@ -8062,8 +8068,8 @@ class vs {
|
|
8062
8068
|
async () => {
|
8063
8069
|
const h = e.getModelContainer();
|
8064
8070
|
if (h) {
|
8065
|
-
const m = t.data.targetMaterials.map((
|
8066
|
-
|
8071
|
+
const m = t.data.targetMaterials.map((g) => h.applyMaterialVariant(
|
8072
|
+
g,
|
8067
8073
|
l.id || "",
|
8068
8074
|
A || {}
|
8069
8075
|
));
|
@@ -8086,7 +8092,7 @@ class vs {
|
|
8086
8092
|
n(!0);
|
8087
8093
|
const s = e.material;
|
8088
8094
|
if (!s)
|
8089
|
-
throw n(!1), new
|
8095
|
+
throw n(!1), new Et(e);
|
8090
8096
|
return {
|
8091
8097
|
command: void 0,
|
8092
8098
|
followup: async () => {
|
@@ -8137,7 +8143,7 @@ class Es {
|
|
8137
8143
|
const u = e.getModelContainer();
|
8138
8144
|
if (u && t.option) {
|
8139
8145
|
const h = d.asset?.fileLink;
|
8140
|
-
if (!h) throw new
|
8146
|
+
if (!h) throw new Et(d);
|
8141
8147
|
await u.applyModelVariant(
|
8142
8148
|
t.stepName || "",
|
8143
8149
|
{
|
@@ -8161,7 +8167,7 @@ class Es {
|
|
8161
8167
|
n(!0);
|
8162
8168
|
const i = e.asset?.fileLink;
|
8163
8169
|
if (!i)
|
8164
|
-
throw new
|
8170
|
+
throw new Et(e);
|
8165
8171
|
return {
|
8166
8172
|
command: void 0,
|
8167
8173
|
followup: async () => {
|
@@ -8218,11 +8224,11 @@ class bs {
|
|
8218
8224
|
return console.error("Missing configuration."), null;
|
8219
8225
|
a.updateStorage(t.stepName, { text: e }), a.updateMetadata(t.stepName, { text: e });
|
8220
8226
|
const c = (d, A, u) => {
|
8221
|
-
const h = u || M(),
|
8222
|
-
if (!
|
8227
|
+
const h = u || M(), g = a.getLayouts().find((f) => f.panelId === A.panelId);
|
8228
|
+
if (!g)
|
8223
8229
|
return console.error(`Can not find layout for region: ${A.panelId}`), null;
|
8224
|
-
const
|
8225
|
-
return u &&
|
8230
|
+
const p = [];
|
8231
|
+
return u && p.push(new bt(h)), p.push(
|
8226
8232
|
new z(
|
8227
8233
|
{
|
8228
8234
|
stepRegion: A,
|
@@ -8240,12 +8246,12 @@ class bs {
|
|
8240
8246
|
layerIndex: A.layerIndex,
|
8241
8247
|
immutable: A.immutable
|
8242
8248
|
},
|
8243
|
-
|
8249
|
+
g
|
8244
8250
|
)
|
8245
8251
|
), {
|
8246
8252
|
id: h,
|
8247
8253
|
region: A,
|
8248
|
-
command: new R(
|
8254
|
+
command: new R(p)
|
8249
8255
|
};
|
8250
8256
|
};
|
8251
8257
|
if (i.length > 0) {
|
@@ -8338,13 +8344,13 @@ class Bs {
|
|
8338
8344
|
async selectVariantCommand(t, e, a, n) {
|
8339
8345
|
const i = e.asset;
|
8340
8346
|
if (!i)
|
8341
|
-
throw new
|
8347
|
+
throw new Et(e);
|
8342
8348
|
const s = i?.fileLink;
|
8343
8349
|
if (!s)
|
8344
8350
|
return console.error("No URL for picture!"), null;
|
8345
8351
|
n(!0), t.mandatory && a.setMandatoryFulfilled(t.stepName, !1);
|
8346
8352
|
const l = a.getRegionElements(t.stepName).map((A) => new bt(A.id)), c = (A) => {
|
8347
|
-
const h = a.getLayouts().find((
|
8353
|
+
const h = a.getLayouts().find((g) => g.panelId === A.panelId);
|
8348
8354
|
if (!h)
|
8349
8355
|
throw new Y(A);
|
8350
8356
|
const m = M();
|
@@ -8542,7 +8548,7 @@ class Ps {
|
|
8542
8548
|
const h = i.find((S) => S.panelId === u.panelId);
|
8543
8549
|
if (!h)
|
8544
8550
|
throw new Y(u);
|
8545
|
-
const m = o(),
|
8551
|
+
const m = o(), g = `
|
8546
8552
|
<svg
|
8547
8553
|
xmlns="http://www.w3.org/2000/svg"
|
8548
8554
|
xmlnsXlink="http://www.w3.org/1999/xlink"
|
@@ -8562,19 +8568,19 @@ class Ps {
|
|
8562
8568
|
fill="${m}"
|
8563
8569
|
/>
|
8564
8570
|
</svg>
|
8565
|
-
`,
|
8566
|
-
|
8567
|
-
const
|
8571
|
+
`, p = {};
|
8572
|
+
p[this.shapeFillId] = { browserValue: m };
|
8573
|
+
const f = M();
|
8568
8574
|
return {
|
8569
|
-
id:
|
8575
|
+
id: f,
|
8570
8576
|
region: u,
|
8571
8577
|
command: new z(
|
8572
8578
|
{
|
8573
8579
|
stepRegion: u,
|
8574
8580
|
stepName: t.stepName,
|
8575
|
-
colors:
|
8576
|
-
id:
|
8577
|
-
svg:
|
8581
|
+
colors: p,
|
8582
|
+
id: f,
|
8583
|
+
svg: g,
|
8578
8584
|
type: x.Illustration,
|
8579
8585
|
y: u.top,
|
8580
8586
|
x: u.left,
|
@@ -8645,14 +8651,14 @@ const Fs = new Ds(), Ye = (r, t, e, a, n) => {
|
|
8645
8651
|
const A = Math.max(...o);
|
8646
8652
|
if (A <= r.width)
|
8647
8653
|
return [i, A];
|
8648
|
-
const u = o.reduce((
|
8649
|
-
let m = !1,
|
8650
|
-
for (; !m &&
|
8651
|
-
|
8652
|
-
const
|
8653
|
-
|
8654
|
+
const u = o.reduce((p, f, S, b) => f > b[p] ? S : p, 0), h = i[u];
|
8655
|
+
let m = !1, g = h.length;
|
8656
|
+
for (; !m && g > -1; ) {
|
8657
|
+
g = h.lastIndexOf(" ", g - 1);
|
8658
|
+
const p = [h.slice(0, g), h.slice(g + 1)], f = p.map((b) => mt(b, a, n));
|
8659
|
+
f[0] <= r.width && (i = [...i.slice(0, u), ...p, ...i.slice(u + 1)], o = [
|
8654
8660
|
...o.slice(0, u),
|
8655
|
-
...
|
8661
|
+
...f,
|
8656
8662
|
...o.slice(u + 1)
|
8657
8663
|
], s += 1, m = !0);
|
8658
8664
|
}
|
@@ -8661,7 +8667,7 @@ const Fs = new Ds(), Ye = (r, t, e, a, n) => {
|
|
8661
8667
|
return [null, null];
|
8662
8668
|
}, fe = (r, t, e, a, n) => {
|
8663
8669
|
let i, s;
|
8664
|
-
const o =
|
8670
|
+
const o = Ct(t.assetUrl), l = o.getFont();
|
8665
8671
|
if (n.size) {
|
8666
8672
|
const u = r / l.unitsPerEm;
|
8667
8673
|
return [i, s] = Ye(e, a, r, u, o), [n.size, i, s];
|
@@ -8696,7 +8702,7 @@ class ks {
|
|
8696
8702
|
/(\r\n|\r|(\u2665|\u00a9|\u00ae|[\u2000-\u2017]|[\u201E-\u3300]]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]))/gm,
|
8697
8703
|
""
|
8698
8704
|
);
|
8699
|
-
const n = [], i = e ?
|
8705
|
+
const n = [], i = e ? Ct(e.assetUrl) : void 0;
|
8700
8706
|
if (i) {
|
8701
8707
|
const s = a.split("").filter((l) => !xs.includes(l)).join(""), o = s.split("").map((l) => i.getFont().charToGlyph(l));
|
8702
8708
|
for (let l = 0; l < o.length; l++)
|
@@ -8740,12 +8746,12 @@ class ks {
|
|
8740
8746
|
let A = t.data.defaultText || "";
|
8741
8747
|
const u = e.getWorkflowExperience().getBundle();
|
8742
8748
|
if (u && t.globalPropertyAspectConfigurations) {
|
8743
|
-
const
|
8744
|
-
(
|
8749
|
+
const g = u.getGlobalPropertyConfiguration()?.aspects?.find(
|
8750
|
+
(p) => p.type === L.Text && t.globalPropertyAspectConfigurations?.map((f) => f.aspectName).includes(p.name)
|
8745
8751
|
);
|
8746
|
-
if (
|
8747
|
-
const
|
8748
|
-
|
8752
|
+
if (g) {
|
8753
|
+
const f = u.getGlobalPropertyStateManager().getAspect(g.name);
|
8754
|
+
f && (A = f);
|
8749
8755
|
}
|
8750
8756
|
}
|
8751
8757
|
e.updateStorage(t.stepName, {
|
@@ -8923,9 +8929,9 @@ class ks {
|
|
8923
8929
|
{ size: a.data.size, minSize: a.data.minSize, maxSize: a.data.maxSize }
|
8924
8930
|
);
|
8925
8931
|
d.set(u.id, h), A.set(u.id, m);
|
8926
|
-
const
|
8932
|
+
const g = a.data.curved ? s : (m || []).join(`
|
8927
8933
|
`);
|
8928
|
-
c.push(this.generateTextChangeCommandsForRegion(h, a.data, u.id,
|
8934
|
+
c.push(this.generateTextChangeCommandsForRegion(h, a.data, u.id, g));
|
8929
8935
|
}
|
8930
8936
|
return !a.data.curved && e.length > 0 && !Array.from(A.values()).every((h) => h) ? (l.errorData || (l.errorData = {}), l.errorData.doesNotFit = !0, l) : (n.updateStorage(a.stepName, { text: t }), n.updateMetadata(a.stepName, {
|
8931
8937
|
text: s
|
@@ -8964,15 +8970,15 @@ class ks {
|
|
8964
8970
|
if (l && c) {
|
8965
8971
|
const d = l.variants?.find((A) => A.id === c);
|
8966
8972
|
if (d) {
|
8967
|
-
const A = await this.fontDataFromVariant(d), u = o.map((
|
8973
|
+
const A = await this.fontDataFromVariant(d), u = o.map((p) => ({ id: p.id, region: p.stepRegion })), h = n.storage?.color;
|
8968
8974
|
let m = n.storage?.text;
|
8969
|
-
const
|
8970
|
-
if (
|
8971
|
-
const
|
8975
|
+
const g = e.getWorkflowExperience().getBundle();
|
8976
|
+
if (g && t.globalPropertyAspectConfigurations) {
|
8977
|
+
const f = g.getGlobalPropertyConfiguration()?.aspects?.find(
|
8972
8978
|
(S) => S.type === L.Text && t.globalPropertyAspectConfigurations?.map((b) => b.aspectName).includes(S.name)
|
8973
8979
|
);
|
8974
|
-
if (
|
8975
|
-
const b =
|
8980
|
+
if (f) {
|
8981
|
+
const b = g.getGlobalPropertyStateManager().getAspect(f.name);
|
8976
8982
|
b && (m = b);
|
8977
8983
|
}
|
8978
8984
|
}
|
@@ -8982,15 +8988,15 @@ class ks {
|
|
8982
8988
|
u,
|
8983
8989
|
async () => {
|
8984
8990
|
e.updateMetadata(t.stepName, { color: h, text: m }), e.updateStorage(t.stepName, { text: m, inputText: m });
|
8985
|
-
const
|
8986
|
-
e.getCommandDispatcher()(
|
8991
|
+
const p = o.map((S) => new Wa(S.id, A)), f = new R(p);
|
8992
|
+
e.getCommandDispatcher()(f);
|
8987
8993
|
}
|
8988
8994
|
), o.length === 0 && l) {
|
8989
|
-
const
|
8990
|
-
if (
|
8991
|
-
const
|
8995
|
+
const p = H.getDefaultVariant(l);
|
8996
|
+
if (p) {
|
8997
|
+
const f = await this.selectVariantCommand(
|
8992
8998
|
t,
|
8993
|
-
|
8999
|
+
p,
|
8994
9000
|
{ text: m },
|
8995
9001
|
[],
|
8996
9002
|
e,
|
@@ -8999,16 +9005,16 @@ class ks {
|
|
8999
9005
|
() => {
|
9000
9006
|
}
|
9001
9007
|
);
|
9002
|
-
e.getCommandDispatcher()(
|
9008
|
+
e.getCommandDispatcher()(f.command);
|
9003
9009
|
}
|
9004
9010
|
} else {
|
9005
|
-
const { command:
|
9011
|
+
const { command: p } = G.updateInputText(
|
9006
9012
|
m || "",
|
9007
9013
|
o,
|
9008
9014
|
t,
|
9009
9015
|
e
|
9010
9016
|
);
|
9011
|
-
|
9017
|
+
p && e.getCommandDispatcher()(p);
|
9012
9018
|
}
|
9013
9019
|
}
|
9014
9020
|
}
|
@@ -9024,7 +9030,7 @@ class ks {
|
|
9024
9030
|
if (o.length === 0 && l) {
|
9025
9031
|
const m = H.getDefaultVariant(l);
|
9026
9032
|
if (m) {
|
9027
|
-
const
|
9033
|
+
const g = await this.selectVariantCommand(
|
9028
9034
|
t,
|
9029
9035
|
m,
|
9030
9036
|
{ text: h },
|
@@ -9035,7 +9041,7 @@ class ks {
|
|
9035
9041
|
() => {
|
9036
9042
|
}
|
9037
9043
|
);
|
9038
|
-
e.getCommandDispatcher()(
|
9044
|
+
e.getCommandDispatcher()(g.command);
|
9039
9045
|
}
|
9040
9046
|
} else {
|
9041
9047
|
const { command: m } = G.updateInputText(
|
@@ -9072,7 +9078,7 @@ class ks {
|
|
9072
9078
|
async fontDataFromVariant(t) {
|
9073
9079
|
const e = t.asset;
|
9074
9080
|
if (!e)
|
9075
|
-
throw new
|
9081
|
+
throw new Et(t);
|
9076
9082
|
const a = e.fileLink;
|
9077
9083
|
if (!a)
|
9078
9084
|
throw new Yt(e);
|
@@ -9085,16 +9091,16 @@ class ks {
|
|
9085
9091
|
async selectVariantCommand(t, e, a, n, i, s, o, l, c) {
|
9086
9092
|
const d = i.markUpdatePending(), A = await this.fontDataFromVariant(e);
|
9087
9093
|
if (n.length > 0) {
|
9088
|
-
const u = n.map((
|
9094
|
+
const u = n.map((g) => new Wa(g.id, A));
|
9089
9095
|
if (l) {
|
9090
|
-
const
|
9091
|
-
u.push(...
|
9096
|
+
const g = n.map((p) => new je(p.id, l));
|
9097
|
+
u.push(...g);
|
9092
9098
|
}
|
9093
9099
|
if (c) {
|
9094
|
-
const
|
9095
|
-
(
|
9100
|
+
const g = n.map(
|
9101
|
+
(p) => new He(p.id, c, t.data.strokeThickness)
|
9096
9102
|
);
|
9097
|
-
u.push(...
|
9103
|
+
u.push(...g);
|
9098
9104
|
}
|
9099
9105
|
const h = await this.changeInputTextWithRegion(
|
9100
9106
|
t,
|
@@ -9131,18 +9137,18 @@ class ks {
|
|
9131
9137
|
a?.customiseAllText ?? !1,
|
9132
9138
|
s,
|
9133
9139
|
o
|
9134
|
-
), m = u.flatMap((
|
9140
|
+
), m = u.flatMap((p) => p.commands);
|
9135
9141
|
if (l) {
|
9136
|
-
const
|
9137
|
-
(
|
9142
|
+
const p = u.map(
|
9143
|
+
(f) => new je(f.regionElement.id, l)
|
9138
9144
|
);
|
9139
|
-
m.push(...
|
9145
|
+
m.push(...p);
|
9140
9146
|
}
|
9141
9147
|
if (c) {
|
9142
|
-
const
|
9143
|
-
(
|
9148
|
+
const p = n.map(
|
9149
|
+
(f) => new He(f.id, c, t.data.strokeThickness)
|
9144
9150
|
);
|
9145
|
-
m.push(...
|
9151
|
+
m.push(...p);
|
9146
9152
|
}
|
9147
9153
|
return h && m.push(h), {
|
9148
9154
|
command: new R(m),
|
@@ -9164,16 +9170,16 @@ class ks {
|
|
9164
9170
|
if (!a || !a.regions)
|
9165
9171
|
throw new Error("Step data not supplied");
|
9166
9172
|
const o = i.text || a.defaultText || "", l = this.getProcessedInput(o, a, !1), c = Ft(l, s), d = async (u) => {
|
9167
|
-
const m = s.getLayouts().find((
|
9173
|
+
const m = s.getLayouts().find((p) => p.panelId === u.panelId), g = M();
|
9168
9174
|
try {
|
9169
9175
|
if (!m)
|
9170
9176
|
throw new Fe("Failed to find layout for region: " + u.panelId);
|
9171
|
-
const
|
9172
|
-
let
|
9173
|
-
if (
|
9174
|
-
const tt =
|
9175
|
-
|
9176
|
-
colorProfileAssetKey:
|
9177
|
+
const p = a.colorOption;
|
9178
|
+
let f;
|
9179
|
+
if (p && p.variants) {
|
9180
|
+
const tt = p.variants.find((et) => et.id === p.defaultVariant?.id) || p.variants[0];
|
9181
|
+
f = this.createTextFillSpotColor(p, tt), s.updateStorage(t, {
|
9182
|
+
colorProfileAssetKey: p.colorProfile?.key
|
9177
9183
|
});
|
9178
9184
|
}
|
9179
9185
|
const S = await this.getDefaultColor(a), b = S || "#000000", I = {
|
@@ -9183,7 +9189,7 @@ class ks {
|
|
9183
9189
|
fill: i.color ? i.color : b,
|
9184
9190
|
fontSize: a.size || Je,
|
9185
9191
|
fontData: n,
|
9186
|
-
id:
|
9192
|
+
id: g,
|
9187
9193
|
layer: u.layer,
|
9188
9194
|
layerIndex: u.layerIndex,
|
9189
9195
|
rotation: u.rotation,
|
@@ -9199,8 +9205,8 @@ class ks {
|
|
9199
9205
|
verticalAlign: a.verticalAlign || "middle",
|
9200
9206
|
curved: a.curved,
|
9201
9207
|
paths: a.paths,
|
9202
|
-
fillSpotColorDefinition:
|
9203
|
-
},
|
9208
|
+
fillSpotColorDefinition: f
|
9209
|
+
}, C = [], E = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
|
9204
9210
|
if (!I.fontData) throw new V("Failed to resolve font data for text.");
|
9205
9211
|
const [B, F] = fe(
|
9206
9212
|
I.fontSize,
|
@@ -9219,18 +9225,18 @@ class ks {
|
|
9219
9225
|
E.set(I.id, B), P.set(I.id, F);
|
9220
9226
|
const Q = a.curved || a.vertical ? l : (F || []).join(`
|
9221
9227
|
`);
|
9222
|
-
|
9228
|
+
C.push(
|
9223
9229
|
this.generateTextChangeCommandsForRegion(B, a, I.id, Q)
|
9224
9230
|
);
|
9225
9231
|
const T = new z(I, m);
|
9226
9232
|
return {
|
9227
|
-
regionElement: { id:
|
9228
|
-
commands: [T, ...
|
9233
|
+
regionElement: { id: g, region: u },
|
9234
|
+
commands: [T, ...C],
|
9229
9235
|
newElement: I,
|
9230
9236
|
fontData: n
|
9231
9237
|
};
|
9232
|
-
} catch (
|
9233
|
-
throw console.log(
|
9238
|
+
} catch (p) {
|
9239
|
+
throw console.log(p), new De("Error adding font to region");
|
9234
9240
|
}
|
9235
9241
|
}, A = await Promise.all(a.regions.map(d)).catch((u) => {
|
9236
9242
|
throw u instanceof De ? (Fs.setLatestToast("Failed to load font.", $e.Error), u) : u instanceof Fe ? u : new Error(u);
|
@@ -9260,30 +9266,30 @@ class ks {
|
|
9260
9266
|
* @deprecated
|
9261
9267
|
*/
|
9262
9268
|
async changeInputTextWithRegion(t, e, a, n, i, s, o, l, c, d) {
|
9263
|
-
const A = (n || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = this.getProcessedInput(A, t.data, o), h = Ft(u, s), m = s.getRegionElements(t.stepName),
|
9264
|
-
for (const
|
9265
|
-
if (
|
9269
|
+
const A = (n || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = this.getProcessedInput(A, t.data, o), h = Ft(u, s), m = s.getRegionElements(t.stepName), g = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
|
9270
|
+
for (const C of m)
|
9271
|
+
if (C.region) {
|
9266
9272
|
const [E, P] = fe(
|
9267
9273
|
e,
|
9268
9274
|
a,
|
9269
|
-
|
9275
|
+
C.region,
|
9270
9276
|
[h],
|
9271
9277
|
{ size: t.data.size, minSize: t.data.minSize, maxSize: t.data.maxSize }
|
9272
9278
|
);
|
9273
|
-
|
9279
|
+
g.set(C.id, E), p.set(C.id, P);
|
9274
9280
|
}
|
9275
9281
|
const S = (() => {
|
9276
9282
|
if (t.data && t.data.maxLength && h.length > t.data.maxLength)
|
9277
9283
|
return d && d(!0), { info: "0" };
|
9278
|
-
const
|
9284
|
+
const C = s.getProfanities(), E = ea(u.toLowerCase());
|
9279
9285
|
for (const P of E)
|
9280
|
-
for (const B in
|
9281
|
-
const F =
|
9286
|
+
for (const B in C) {
|
9287
|
+
const F = C[B].toLowerCase().replace(/\s/g, "");
|
9282
9288
|
if (P === F)
|
9283
9289
|
return l(!0), { error: "Blocked profanity." };
|
9284
9290
|
}
|
9285
9291
|
return !t.data.vertical && !t.data.allowNewlines && (u.includes(`
|
9286
|
-
`) || u.includes("\r")) ? (l(!0), { error: "Cannot span multiple lines." }) : !t.data.curved && !Array.from(
|
9292
|
+
`) || u.includes("\r")) ? (l(!0), { error: "Cannot span multiple lines." }) : !t.data.curved && !Array.from(p.values()).every((B) => B) ? (l(!0), { error: "Does not fit." }) : (l(!1), { info: (t.data.maxLength - h.length).toString() });
|
9287
9293
|
})();
|
9288
9294
|
if (S.error) {
|
9289
9295
|
c(S.error);
|
@@ -9295,14 +9301,14 @@ class ks {
|
|
9295
9301
|
text: this.injectReplaceableText(A, t.data)
|
9296
9302
|
}), (i.defaultCleared || !t.data.deleteDefaultOnFocus) && A.trim() !== "" && s.setMandatoryFulfilled(t.stepName, !0);
|
9297
9303
|
const b = [];
|
9298
|
-
for (const
|
9299
|
-
const E = t.data.curved ? u : (
|
9304
|
+
for (const C of m) {
|
9305
|
+
const E = t.data.curved ? u : (p.get(C.id) || []).join(`
|
9300
9306
|
`);
|
9301
9307
|
b.push(
|
9302
9308
|
this.generateTextChangeCommandsForRegion(
|
9303
|
-
|
9309
|
+
g.get(C.id) || 1,
|
9304
9310
|
t.data,
|
9305
|
-
|
9311
|
+
C.id,
|
9306
9312
|
E
|
9307
9313
|
)
|
9308
9314
|
);
|
@@ -9345,7 +9351,7 @@ function $s(r, t, e, a) {
|
|
9345
9351
|
const n = e / r, i = a / t;
|
9346
9352
|
return n > 1 && i > 1 ? Math.min(n, i) : n > 1 && i < 1 ? i : n < 1 && i > 1 ? n : Math.min(n, i);
|
9347
9353
|
}
|
9348
|
-
const
|
9354
|
+
const ja = {
|
9349
9355
|
m: ["x", "y"],
|
9350
9356
|
z: [],
|
9351
9357
|
l: ["x", "y"],
|
@@ -9375,7 +9381,7 @@ class Us {
|
|
9375
9381
|
const n = (i) => {
|
9376
9382
|
const s = [], o = i.relative ? i.type : i.type.toUpperCase();
|
9377
9383
|
let l = e !== o;
|
9378
|
-
const c =
|
9384
|
+
const c = ja[i.type];
|
9379
9385
|
l && (s.push(o), e = o);
|
9380
9386
|
for (const d of c) {
|
9381
9387
|
const A = i[d];
|
@@ -9400,7 +9406,7 @@ class Us {
|
|
9400
9406
|
const e = /([mzlhvcsqta])([^mzlhvcsqta]*)/gi, a = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, n = [];
|
9401
9407
|
let i;
|
9402
9408
|
for (e.lastIndex = 0; i = e.exec(t); ) {
|
9403
|
-
const s = i[1].toLowerCase(), o = (i[2].match(a) || []).map(parseFloat), l = s === i[1], c =
|
9409
|
+
const s = i[1].toLowerCase(), o = (i[2].match(a) || []).map(parseFloat), l = s === i[1], c = ja[s];
|
9404
9410
|
if (o.length < c.length)
|
9405
9411
|
throw new Dt(
|
9406
9412
|
`Path type "${s}" given ${o.length} arguments, expected ${c.length}.`
|
@@ -9471,10 +9477,10 @@ class Ls extends Ms {
|
|
9471
9477
|
b.classList.add("module-text-group");
|
9472
9478
|
const I = at("defs");
|
9473
9479
|
b.appendChild(I), I.appendChild(Qs(0, 2, 2, "shadow"));
|
9474
|
-
const
|
9475
|
-
|
9480
|
+
const C = at("path");
|
9481
|
+
C.setAttribute("d", d), C.setAttribute("stroke", "black"), C.setAttribute("stroke-width", "3"), I.appendChild(C);
|
9476
9482
|
const E = at("g");
|
9477
|
-
E.classList.add("module-layer0"), b.appendChild(E), E.setAttribute("filter", "url(#shadow)"), E.innerHTML =
|
9483
|
+
E.classList.add("module-layer0"), b.appendChild(E), E.setAttribute("filter", "url(#shadow)"), E.innerHTML = C.outerHTML;
|
9478
9484
|
const P = at("g");
|
9479
9485
|
P.classList.add("module-layer1"), b.appendChild(P), P.setAttribute("stroke-width", "3"), P.setAttribute("stroke", "rgb(45,41,38)"), P.setAttribute("fill", "rgb(45,41,38)"), P.setAttribute("transform", "translate(0.5,0)"), P.innerHTML = o;
|
9480
9486
|
const B = at("g");
|
@@ -9487,14 +9493,14 @@ class Ls extends Ms {
|
|
9487
9493
|
u.appendChild(h);
|
9488
9494
|
const m = at("g");
|
9489
9495
|
m.classList.add("module-bounds"), u.appendChild(m);
|
9490
|
-
const
|
9491
|
-
|
9492
|
-
const
|
9493
|
-
|
9494
|
-
const
|
9495
|
-
|
9496
|
+
const g = Ns(e.height, e.width);
|
9497
|
+
g.setAttribute("opacity", "0"), m.appendChild(g);
|
9498
|
+
const p = at("g");
|
9499
|
+
p.classList.add("module-text-enclosure"), u.appendChild(p);
|
9500
|
+
const f = A();
|
9501
|
+
p.appendChild(f);
|
9496
9502
|
const S = fr(d);
|
9497
|
-
return Os(
|
9503
|
+
return Os(p, S, e.height, e.width, 0.35, 0.65), Rs(u.outerHTML);
|
9498
9504
|
}
|
9499
9505
|
}
|
9500
9506
|
async function Kn(r) {
|
@@ -9561,7 +9567,7 @@ const re = w`
|
|
9561
9567
|
variables: {
|
9562
9568
|
bundleId: r
|
9563
9569
|
}
|
9564
|
-
})).data.globalPropertyState, Ws = w`
|
9570
|
+
})).data.globalPropertyState, Ws = (r) => w`
|
9565
9571
|
${Qe}
|
9566
9572
|
fragment ProductFields on Product {
|
9567
9573
|
id
|
@@ -9593,7 +9599,7 @@ const re = w`
|
|
9593
9599
|
preloadImageUrl
|
9594
9600
|
sku
|
9595
9601
|
skuCode
|
9596
|
-
workflows {
|
9602
|
+
workflows${r ? "(filters: $productWorkflowFilters)" : ""} {
|
9597
9603
|
id
|
9598
9604
|
index
|
9599
9605
|
friendlyName
|
@@ -9606,8 +9612,8 @@ const re = w`
|
|
9606
9612
|
name
|
9607
9613
|
}
|
9608
9614
|
}
|
9609
|
-
`,
|
9610
|
-
${Ws}
|
9615
|
+
`, ba = (r) => w`
|
9616
|
+
${Ws(r)}
|
9611
9617
|
fragment ProductCollectionProductFields on ProductCollectionProduct {
|
9612
9618
|
id
|
9613
9619
|
productId
|
@@ -9616,8 +9622,8 @@ const re = w`
|
|
9616
9622
|
...ProductFields
|
9617
9623
|
}
|
9618
9624
|
}
|
9619
|
-
`, ie = (r) => w`
|
9620
|
-
${r ?
|
9625
|
+
`, ie = (r, t = !1) => w`
|
9626
|
+
${r ? ba(t) : ""}
|
9621
9627
|
fragment ProductCollectionFields on ProductCollection {
|
9622
9628
|
id
|
9623
9629
|
name
|
@@ -9730,7 +9736,7 @@ const re = w`
|
|
9730
9736
|
quoteId
|
9731
9737
|
}
|
9732
9738
|
}
|
9733
|
-
`,
|
9739
|
+
`, Ha = w`
|
9734
9740
|
query GetBundleStakeholders($id: String!) {
|
9735
9741
|
bundles(ids: [$id]) {
|
9736
9742
|
id
|
@@ -9805,7 +9811,7 @@ const re = w`
|
|
9805
9811
|
}
|
9806
9812
|
}
|
9807
9813
|
`, Hs = w`
|
9808
|
-
${
|
9814
|
+
${ba(!1)}
|
9809
9815
|
query GetProductCollectionProducts($id: String!, $productIds: [String!]) {
|
9810
9816
|
productCollections(ids: [$id], productIds: $productIds) {
|
9811
9817
|
id
|
@@ -9838,12 +9844,13 @@ const re = w`
|
|
9838
9844
|
}
|
9839
9845
|
}
|
9840
9846
|
`, Js = w`
|
9841
|
-
${
|
9847
|
+
${ba(!0)}
|
9842
9848
|
query GetProductCollectionForProductsFeed(
|
9843
9849
|
$id: String!
|
9844
9850
|
$limit: Int
|
9845
9851
|
$offset: Int
|
9846
|
-
$
|
9852
|
+
$productFilters: ProductCollectionProductFilterInput
|
9853
|
+
$productWorkflowFilters: MetafieldFilterListInput
|
9847
9854
|
$tags: ProductCollectionProductTagFilterInput
|
9848
9855
|
$sortKey: ProductCollectionProductSortKey
|
9849
9856
|
$sortDescending: Boolean
|
@@ -9852,7 +9859,8 @@ const re = w`
|
|
9852
9859
|
productCollections(ids: [$id]) {
|
9853
9860
|
id
|
9854
9861
|
productCollectionProductsFeed(
|
9855
|
-
filters: $
|
9862
|
+
filters: $productFilters
|
9863
|
+
workflowFilters: $productWorkflowFilters
|
9856
9864
|
tags: $tags
|
9857
9865
|
limit: $limit
|
9858
9866
|
offset: $offset
|
@@ -10219,7 +10227,7 @@ const re = w`
|
|
10219
10227
|
`;
|
10220
10228
|
var $e = /* @__PURE__ */ ((r) => (r.Error = "Error", r.Warning = "Warning", r.Info = "Info", r))($e || {});
|
10221
10229
|
const wo = 1e3;
|
10222
|
-
class
|
10230
|
+
class Ya extends Fn {
|
10223
10231
|
constructor(t) {
|
10224
10232
|
super(), this.createdAt = /* @__PURE__ */ new Date(), this.update = t;
|
10225
10233
|
}
|
@@ -10232,14 +10240,14 @@ class Ja extends xn {
|
|
10232
10240
|
}
|
10233
10241
|
}
|
10234
10242
|
class yo {
|
10235
|
-
constructor(t, e, a, n, i, s, o, l, c, d, A, u, h, m = !1,
|
10236
|
-
this.workflowStatePromiseQueue = new
|
10243
|
+
constructor(t, e, a, n, i, s, o, l, c, d, A, u, h, m = !1, g, p = !1, f = !1, S = !1) {
|
10244
|
+
this.workflowStatePromiseQueue = new xn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
|
10237
10245
|
if (!this.previewService) return;
|
10238
10246
|
const b = this.getCommandContext().getAllLayouts(), I = this.getLayoutPreviewService()?.getAll();
|
10239
10247
|
if (I)
|
10240
|
-
for (const [,
|
10241
|
-
|
10242
|
-
}, this.experience = t, this.client = e, this.updateTransaction = o, this.graphQlClient = l, this.commandContext = s, this.reloadedState = h, this.transaction = c, this.readOnly = m, this.singleVariantsRenderable =
|
10248
|
+
for (const [, C] of I)
|
10249
|
+
C.render(b);
|
10250
|
+
}, this.experience = t, this.client = e, this.updateTransaction = o, this.graphQlClient = l, this.commandContext = s, this.reloadedState = h, this.transaction = c, this.readOnly = m, this.singleVariantsRenderable = f, this.confirmedDesign = !1, this.editedSteps = {}, this.informationResults = [], this.mandatorySteps = {}, this.pendingUpdates = [], this.selectionCost = 0, this.workflow = a, this.stepSpecificServices = {}, this.profanityFilter = n, this.pollers = [], this.allScenes = [], this.layouts = i, this.product = d, this.previewService = A, this.modelContainer = g, this.stepElements = {}, this.stepInitialised = {}, this.stepMetadata = {}, this.stepSelections = {}, this.storage = {}, this.validationErrors = { steps: /* @__PURE__ */ new Map() }, this.confirmCallbacks = [], this.editedCallbacks = [], this.elementsCallbacks = [], this.informationResultCallbacks = [], this.initCallbacks = [], this.mandatoryCallbacks = [], this.makingAdjustmentsCallback = [], this.metadataCallbacks = [], this.selectionCallbacks = [], this.stepSpecificStorageCallbacks = {}, this.storageCallbacks = [], this.validationCallbacks = [], this.recipientCallbacks = [], this.currentAdjustingStepId = "", this.renderableContextService = u, this.renderableContextService?.setWorkflowManager(this), this.isReloadedTransaction = p, this.workflow.steps.forEach((b) => {
|
10243
10251
|
this.stepTags[b.stepName] = b.tags ?? [];
|
10244
10252
|
}), S && (this.workflowStatePromiseQueue.enabled = !1), this.initializationPromise = this.initializeDefaultWorkflowState(a), this.initializationPromise.then(() => {
|
10245
10253
|
this.initialized = !0;
|
@@ -10258,7 +10266,7 @@ class yo {
|
|
10258
10266
|
a.type === Ce.FirstName ? e[n] = t?.firstName : a.type === Ce.LastName ? e[n] = t?.lastName : a.type === Ce.Custom && (a.customFieldIndex === 1 ? e[n] = t?.customField1 : a.customFieldIndex === 2 ? e[n] = t?.customField2 : a.customFieldIndex === 3 ? e[n] = t?.customField3 : a.customFieldIndex === 4 ? e[n] = t?.customField4 : a.customFieldIndex === 5 && (e[n] = t?.customField5));
|
10259
10267
|
}), e;
|
10260
10268
|
}
|
10261
|
-
async updateRecipient(t, e, a, n, i, s, o, l, c, d, A, u, h, m,
|
10269
|
+
async updateRecipient(t, e, a, n, i, s, o, l, c, d, A, u, h, m, g, p, f) {
|
10262
10270
|
if (this.transaction.recipient?.id)
|
10263
10271
|
this.transaction.recipient = {
|
10264
10272
|
id: this.transaction.recipient.id,
|
@@ -10276,9 +10284,9 @@ class yo {
|
|
10276
10284
|
customField1: u || this.transaction.recipient.customField1,
|
10277
10285
|
customField2: h || this.transaction.recipient.customField2,
|
10278
10286
|
customField3: m || this.transaction.recipient.customField3,
|
10279
|
-
customField4:
|
10280
|
-
customField5:
|
10281
|
-
conversionConfigurationId:
|
10287
|
+
customField4: g || this.transaction.recipient.customField4,
|
10288
|
+
customField5: p || this.transaction.recipient.customField5,
|
10289
|
+
conversionConfigurationId: f || this.transaction.recipient.conversionConfigurationId
|
10282
10290
|
}, await this.graphQlClient().mutate({
|
10283
10291
|
mutation: fo,
|
10284
10292
|
errorPolicy: "all",
|
@@ -10299,9 +10307,9 @@ class yo {
|
|
10299
10307
|
customField1: u || this.transaction.recipient.customField1,
|
10300
10308
|
customField2: h || this.transaction.recipient.customField2,
|
10301
10309
|
customField3: m || this.transaction.recipient.customField3,
|
10302
|
-
customField4:
|
10303
|
-
customField5:
|
10304
|
-
conversionConfigurationId:
|
10310
|
+
customField4: g || this.transaction.recipient.customField4,
|
10311
|
+
customField5: p || this.transaction.recipient.customField5,
|
10312
|
+
conversionConfigurationId: f || this.transaction.recipient.conversionConfigurationId
|
10305
10313
|
}
|
10306
10314
|
});
|
10307
10315
|
else {
|
@@ -10324,9 +10332,9 @@ class yo {
|
|
10324
10332
|
customField1: u,
|
10325
10333
|
customField2: h,
|
10326
10334
|
customField3: m,
|
10327
|
-
customField4:
|
10328
|
-
customField5:
|
10329
|
-
conversionConfigurationId:
|
10335
|
+
customField4: g,
|
10336
|
+
customField5: p,
|
10337
|
+
conversionConfigurationId: f
|
10330
10338
|
}
|
10331
10339
|
});
|
10332
10340
|
this.transaction.recipient = {
|
@@ -10345,9 +10353,9 @@ class yo {
|
|
10345
10353
|
customField1: u,
|
10346
10354
|
customField2: h,
|
10347
10355
|
customField3: m,
|
10348
|
-
customField4:
|
10349
|
-
customField5:
|
10350
|
-
conversionConfigurationId:
|
10356
|
+
customField4: g,
|
10357
|
+
customField5: p,
|
10358
|
+
conversionConfigurationId: f
|
10351
10359
|
}, await this.graphQlClient().mutate({
|
10352
10360
|
mutation: Co,
|
10353
10361
|
errorPolicy: "all",
|
@@ -10648,9 +10656,9 @@ class yo {
|
|
10648
10656
|
...this.storage,
|
10649
10657
|
[t]: { ...this.storage[t], ...e }
|
10650
10658
|
};
|
10651
|
-
if (!
|
10659
|
+
if (!cn(a, this.storage)) {
|
10652
10660
|
this.storage = a;
|
10653
|
-
const n = new
|
10661
|
+
const n = new Ga(this.constructSerializableWorkflow());
|
10654
10662
|
this.commandContext.apply(n, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
|
10655
10663
|
}
|
10656
10664
|
}
|
@@ -10669,7 +10677,7 @@ class yo {
|
|
10669
10677
|
if (this.readOnly) return;
|
10670
10678
|
const t = this.serialize();
|
10671
10679
|
this.workflowStatePromiseQueue.enqueue(
|
10672
|
-
new
|
10680
|
+
new Ya(async () => {
|
10673
10681
|
await new Promise((e) => {
|
10674
10682
|
setTimeout(() => {
|
10675
10683
|
e();
|
@@ -10686,7 +10694,7 @@ class yo {
|
|
10686
10694
|
async updateStateWithServerImmediate() {
|
10687
10695
|
if (this.readOnly) return;
|
10688
10696
|
const t = this.serialize();
|
10689
|
-
return new
|
10697
|
+
return new Ya(async () => {
|
10690
10698
|
await this.updateTransaction({
|
10691
10699
|
variables: {
|
10692
10700
|
id: this.transaction.id,
|
@@ -10699,7 +10707,7 @@ class yo {
|
|
10699
10707
|
const t = this.getCommandContext().getState();
|
10700
10708
|
if (!t)
|
10701
10709
|
throw new V("Attempted to serialize state before it was initialized.");
|
10702
|
-
const e =
|
10710
|
+
const e = vt(t.transaction), a = this.dehydrateState(e);
|
10703
10711
|
return JSON.stringify(a);
|
10704
10712
|
}
|
10705
10713
|
/**
|
@@ -10735,12 +10743,12 @@ class yo {
|
|
10735
10743
|
this.stepElements = e(this.stepElements, t);
|
10736
10744
|
}
|
10737
10745
|
getInvalidCanvasRegions() {
|
10738
|
-
return this.workflow.steps.reduce((t, e) => (
|
10746
|
+
return this.workflow.steps.reduce((t, e) => (St(e, this.stepSelections) || this.stepElements[e.stepName] && this.stepElements[e.stepName].forEach(
|
10739
10747
|
(a) => t.push(a)
|
10740
10748
|
), t), []);
|
10741
10749
|
}
|
10742
10750
|
getInvalidModelVariants() {
|
10743
|
-
return this.workflow.steps.reduce((t, e) => (e.type === v.Model && !
|
10751
|
+
return this.workflow.steps.reduce((t, e) => (e.type === v.Model && !St(e, this.stepSelections) && t.push(e.stepName), t), []);
|
10744
10752
|
}
|
10745
10753
|
async stepElementsForIntroducedSilentSteps(t, e) {
|
10746
10754
|
const a = this.product;
|
@@ -10748,10 +10756,10 @@ class yo {
|
|
10748
10756
|
return Promise.resolve({ stepElements: {}, commands: [] });
|
10749
10757
|
const n = async (c, d, A) => {
|
10750
10758
|
if (c.type === v.SilentIllustration) {
|
10751
|
-
const u = await new
|
10759
|
+
const u = await new qa(c, d).trigger();
|
10752
10760
|
return { step: c, results: u };
|
10753
10761
|
} else if (c.type === v.ProductOverlay) {
|
10754
|
-
const u = await new
|
10762
|
+
const u = await new qa(
|
10755
10763
|
c,
|
10756
10764
|
d,
|
10757
10765
|
A
|
@@ -10839,14 +10847,14 @@ class yo {
|
|
10839
10847
|
this.stepSelections = {
|
10840
10848
|
...this.stepSelections,
|
10841
10849
|
[t]: { selectedVariants: e }
|
10842
|
-
}, this.selectionCost = Object.values(this.stepSelections).reduce((
|
10843
|
-
|
10850
|
+
}, this.selectionCost = Object.values(this.stepSelections).reduce((C, E) => C + E.selectedVariants.map((P) => P.priceModifier || 0).reduce((P, B) => P + B, 0), 0), this.workflow.steps.forEach((C) => {
|
10851
|
+
St(C, this.stepSelections) || (this.stepInitialised[C.stepName] = !1, delete this.stepMetadata[C.stepName], delete this.stepSelections[C.stepName], delete this.storage[C.stepName]);
|
10844
10852
|
});
|
10845
|
-
const s = this.allScenes, o = Pt(s, i), l = Pt(s, this.stepSelections), c = o.map((
|
10846
|
-
(
|
10853
|
+
const s = this.allScenes, o = Pt(s, i), l = Pt(s, this.stepSelections), c = o.map((C) => C.silentSteps).flat(), A = l.map((C) => C.silentSteps).flat().filter(
|
10854
|
+
(C) => !c.some((E) => E.stepName === C.stepName)
|
10847
10855
|
);
|
10848
|
-
c.forEach((
|
10849
|
-
|
10856
|
+
c.forEach((C) => {
|
10857
|
+
St(C, this.stepSelections) || (this.stepInitialised[C.stepName] = !1);
|
10850
10858
|
});
|
10851
10859
|
const u = this.getInvalidCanvasRegions(), { stepElements: h, commands: m } = await this.stepElementsForIntroducedSilentSteps(A, !1);
|
10852
10860
|
this.stepElements = {
|
@@ -10854,13 +10862,13 @@ class yo {
|
|
10854
10862
|
...h,
|
10855
10863
|
[t]: a
|
10856
10864
|
}, this.removeElements(u);
|
10857
|
-
const
|
10858
|
-
|
10859
|
-
const
|
10865
|
+
const g = this.workflow.steps.find((C) => C.stepName === t);
|
10866
|
+
g?.type === v.Frame && this.getWorkflowExperience().getStepById(g.stepName)?.frameService?.setTargetElements(a.map((E) => E.id));
|
10867
|
+
const p = u.map((C) => new bt(C.id)), f = new Ga(this.constructSerializableWorkflow()), S = [...m, ...p, f];
|
10860
10868
|
S.length > 0 && this.commandContext.apply(new R(S), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
|
10861
10869
|
const b = this.getInvalidModelVariants(), I = this.modelContainer;
|
10862
10870
|
if (I) {
|
10863
|
-
const
|
10871
|
+
const C = b.map(
|
10864
10872
|
(E) => I.applyModelVariant(
|
10865
10873
|
E,
|
10866
10874
|
{
|
@@ -10869,7 +10877,7 @@ class yo {
|
|
10869
10877
|
!1
|
10870
10878
|
)
|
10871
10879
|
);
|
10872
|
-
await Promise.all(
|
10880
|
+
await Promise.all(C);
|
10873
10881
|
}
|
10874
10882
|
await this.onSelectionChange(), n && await n();
|
10875
10883
|
}
|
@@ -10888,7 +10896,7 @@ class yo {
|
|
10888
10896
|
);
|
10889
10897
|
break;
|
10890
10898
|
case v.Frame:
|
10891
|
-
a.push(
|
10899
|
+
a.push(yt.init(l, this, this.reloadedState));
|
10892
10900
|
break;
|
10893
10901
|
case v.Illustration:
|
10894
10902
|
a.push(
|
@@ -11819,7 +11827,7 @@ const To = async (r, t) => {
|
|
11819
11827
|
headers: e
|
11820
11828
|
}
|
11821
11829
|
})).data?.designCreateMany;
|
11822
|
-
},
|
11830
|
+
}, Ja = (r, t, e) => {
|
11823
11831
|
const a = (i) => {
|
11824
11832
|
const s = {};
|
11825
11833
|
if (i.type === "Frame") {
|
@@ -11903,7 +11911,7 @@ const To = async (r, t) => {
|
|
11903
11911
|
if (c !== void 0) return c;
|
11904
11912
|
await r.outstandingRequestsPromise();
|
11905
11913
|
const F = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), T = await y.getShadowGraphqlClient().query({
|
11906
|
-
query:
|
11914
|
+
query: Pn,
|
11907
11915
|
variables: { ids: [n.id] },
|
11908
11916
|
fetchPolicy: "no-cache",
|
11909
11917
|
errorPolicy: "all",
|
@@ -11915,7 +11923,7 @@ const To = async (r, t) => {
|
|
11915
11923
|
T.errors && console.log("Server Error:", et.message);
|
11916
11924
|
}), null) : tt ?? null;
|
11917
11925
|
})() || (console.warn("State mismatch detected. Uploading known state explicitly"), console.warn("State Object:", JSON.stringify(a())), await r.updateStateWithServerImmediate(a), console.log("Server state is undefined @ Workflow completion"));
|
11918
|
-
const u = r.getPreviewService(), h = t?.finalizeStepConfig?.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h,
|
11926
|
+
const u = r.getPreviewService(), h = t?.finalizeStepConfig?.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, g = l && Ja(l, t, !0), p = l && Ja(l, t, !1), f = async (B) => {
|
11919
11927
|
const F = {};
|
11920
11928
|
let Q = 0;
|
11921
11929
|
if (Object.keys(i).length > 0)
|
@@ -11924,12 +11932,12 @@ const To = async (r, t) => {
|
|
11924
11932
|
for (let W = 0; W < tt.selections.length; ++W) {
|
11925
11933
|
const q = tt.selections[W];
|
11926
11934
|
if (et && (!B || et.option && (et.option.variants || []).length > 1 && !et.data.hideSelectionInCart && !et.data.hideSelectionsInCart)) {
|
11927
|
-
const
|
11928
|
-
F[
|
11935
|
+
const wt = et.stepTitle;
|
11936
|
+
F[wt] ? F[wt].push({
|
11929
11937
|
id: q.id || "",
|
11930
11938
|
name: q.name,
|
11931
11939
|
priceModifier: q.priceModifier
|
11932
|
-
}) : F[
|
11940
|
+
}) : F[wt] = [
|
11933
11941
|
{
|
11934
11942
|
id: q.id || "",
|
11935
11943
|
name: q.name,
|
@@ -11941,9 +11949,9 @@ const To = async (r, t) => {
|
|
11941
11949
|
}
|
11942
11950
|
}
|
11943
11951
|
return [F, Q];
|
11944
|
-
}, [S] = await
|
11952
|
+
}, [S] = await f(!0), b = Object.fromEntries(
|
11945
11953
|
Object.keys(S).map((B) => [B, S[B].map((F) => F.id)])
|
11946
|
-
), [I] = await
|
11954
|
+
), [I] = await f(!1), C = Object.fromEntries(
|
11947
11955
|
Object.keys(I).map((B) => [
|
11948
11956
|
B,
|
11949
11957
|
I[B].map((F) => F.id)
|
@@ -11972,22 +11980,22 @@ const To = async (r, t) => {
|
|
11972
11980
|
useThreeDimPreview: !!m,
|
11973
11981
|
previewImage: E
|
11974
11982
|
};
|
11975
|
-
if (
|
11983
|
+
if (p) {
|
11976
11984
|
const F = [];
|
11977
|
-
for (const [Q, T] of Object.entries(
|
11985
|
+
for (const [Q, T] of Object.entries(p))
|
11978
11986
|
F.push({ key: Q, value: T });
|
11979
11987
|
B.metadata = F;
|
11980
11988
|
}
|
11981
11989
|
if (b) {
|
11982
11990
|
const F = [];
|
11983
|
-
for (const [Q, T] of Object.entries(
|
11991
|
+
for (const [Q, T] of Object.entries(C))
|
11984
11992
|
F.push({ key: Q, ids: T });
|
11985
11993
|
B.selectedVariants = F;
|
11986
11994
|
}
|
11987
11995
|
return B;
|
11988
11996
|
})(),
|
11989
11997
|
cartSelectionsWithPrices: S,
|
11990
|
-
cartMetadata:
|
11998
|
+
cartMetadata: g
|
11991
11999
|
};
|
11992
12000
|
}, Ro = async (r, t, e, a, n, i, s, o, l, c, d) => {
|
11993
12001
|
l("workflow.steps.finish.finalize.buildingLayouts");
|
@@ -12003,19 +12011,19 @@ const To = async (r, t) => {
|
|
12003
12011
|
d
|
12004
12012
|
);
|
12005
12013
|
l("workflow.steps.finish.finalize.creatingDesign");
|
12006
|
-
const m = await To(A),
|
12014
|
+
const m = await To(A), g = m?.transaction?.previewImageLink;
|
12007
12015
|
if (!m?.transaction)
|
12008
12016
|
throw new Error("Failed to create design");
|
12009
12017
|
l("workflow.steps.finish.finalize.updatingTransaction");
|
12010
|
-
const
|
12018
|
+
const p = m.transaction;
|
12011
12019
|
return Xn(
|
12012
|
-
|
12020
|
+
p,
|
12013
12021
|
n,
|
12014
12022
|
t,
|
12015
12023
|
u,
|
12016
12024
|
m?.sku,
|
12017
12025
|
h,
|
12018
|
-
|
12026
|
+
g,
|
12019
12027
|
m?.processExecution?.id
|
12020
12028
|
);
|
12021
12029
|
}, Oo = async (r, t, e) => {
|
@@ -12026,7 +12034,7 @@ const To = async (r, t) => {
|
|
12026
12034
|
);
|
12027
12035
|
const n = await (async () => {
|
12028
12036
|
const l = await y.getShadowGraphqlClient().query({
|
12029
|
-
query:
|
12037
|
+
query: Pn,
|
12030
12038
|
variables: { ids: r.map((c) => c.transaction.id) },
|
12031
12039
|
fetchPolicy: "no-cache",
|
12032
12040
|
errorPolicy: "all"
|
@@ -12179,7 +12187,7 @@ const Ke = new $o(), Uo = w`
|
|
12179
12187
|
var zo = /* @__PURE__ */ ((r) => (r.QuantityChanged = "QuantityChanged", r.PriceBreakChanged = "PriceBreakChanged", r))(zo || {});
|
12180
12188
|
class Go {
|
12181
12189
|
constructor(t, e) {
|
12182
|
-
if (this.cachedStepHandles = /* @__PURE__ */ new Map(), this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate =
|
12190
|
+
if (this.cachedStepHandles = /* @__PURE__ */ new Map(), this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = dn(async () => {
|
12183
12191
|
await Ke.getSavedDesignByTransaction(
|
12184
12192
|
this.getWorkflowManager().getTransaction().id
|
12185
12193
|
) && this.save();
|
@@ -12300,14 +12308,14 @@ class Go {
|
|
12300
12308
|
}, u = this.commandContext.getLayoutById(d.layoutState.layout.id), h = s.getContext("2d");
|
12301
12309
|
if (!h)
|
12302
12310
|
throw new ke("Failed to obtain 2D context for preview image creation");
|
12303
|
-
const m = this.workflowManager.getTemplatingContext(),
|
12311
|
+
const m = this.workflowManager.getTemplatingContext(), g = ya(u.layoutState.layout, u.layoutState.elements, {
|
12304
12312
|
renderingConfiguration: {
|
12305
12313
|
purpose: Ht.Print,
|
12306
12314
|
region: { left: A.x, top: A.y, width: A.width, height: A.height },
|
12307
12315
|
templatingContext: m
|
12308
12316
|
}
|
12309
|
-
}),
|
12310
|
-
await (await Aa.from(h,
|
12317
|
+
}), p = mn(g);
|
12318
|
+
await (await Aa.from(h, p, {
|
12311
12319
|
anonymousCrossOrigin: !0,
|
12312
12320
|
ignoreDimensions: !1,
|
12313
12321
|
createCanvas: pt,
|
@@ -12333,7 +12341,7 @@ class Go {
|
|
12333
12341
|
getStepsConditionallyActive() {
|
12334
12342
|
return this.getScenes().flatMap(
|
12335
12343
|
(t) => this.getStepsByScene(t).filter(
|
12336
|
-
(e) =>
|
12344
|
+
(e) => St(e.getRaw(), this.getWorkflowManager().getStepSelections())
|
12337
12345
|
)
|
12338
12346
|
);
|
12339
12347
|
}
|
@@ -12409,14 +12417,14 @@ class Go {
|
|
12409
12417
|
A !== void 0 && (A.forEach((u) => d.add(JSON.stringify(u))), o.forEach((u) => {
|
12410
12418
|
const h = u.getRaw().globalPropertyAspectConfigurations;
|
12411
12419
|
h !== void 0 && h.forEach((m) => {
|
12412
|
-
const
|
12413
|
-
if (
|
12414
|
-
const
|
12415
|
-
if (!
|
12416
|
-
c.selectVariant(
|
12417
|
-
} else if (
|
12418
|
-
const
|
12419
|
-
c.setText(
|
12420
|
+
const g = l(m), p = d.has(JSON.stringify(m));
|
12421
|
+
if (p && g?.getType() === "Option") {
|
12422
|
+
const f = u.getCurrentVariant();
|
12423
|
+
if (!f) return;
|
12424
|
+
c.selectVariant(f), d.delete(JSON.stringify(m));
|
12425
|
+
} else if (p && g?.getType() === "Text") {
|
12426
|
+
const f = u.getText();
|
12427
|
+
c.setText(f), d.delete(JSON.stringify(m));
|
12420
12428
|
}
|
12421
12429
|
});
|
12422
12430
|
}));
|
@@ -12484,7 +12492,7 @@ class Go {
|
|
12484
12492
|
return await Ke.addDesign(n), n;
|
12485
12493
|
}
|
12486
12494
|
async copy() {
|
12487
|
-
const t =
|
12495
|
+
const t = vt(this.getCommandContext().getState());
|
12488
12496
|
if (!t) throw new V("Internal state is undefined! Cannot copy experience!");
|
12489
12497
|
const e = JSON.stringify(t.transaction), a = this.getWorkflowManager().getWorkflow(), n = this.getWorkflowManager().getTransaction().integrationProduct?.id;
|
12490
12498
|
if (!n) throw new V("Integration product id is undefined!");
|
@@ -12671,15 +12679,15 @@ const Wo = (r) => {
|
|
12671
12679
|
"tspan"
|
12672
12680
|
], Ho = async (r, t, e) => {
|
12673
12681
|
const a = t.data, n = e.data.baseUrl, i = a.assetUrl.replace("localhost", "localstack"), s = n.slice(0, 4) === "http" ? "" : "https://", o = new URL(s + n);
|
12674
|
-
o.searchParams.append("video",
|
12675
|
-
const l = o.toString(), d = `data:image/svg+xml;base64,${
|
12676
|
-
const m = r.find((
|
12682
|
+
o.searchParams.append("video", Qa(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
|
12683
|
+
const l = o.toString(), d = `data:image/svg+xml;base64,${Qa(await ln(l, { type: "svg" }))}`, A = (h) => {
|
12684
|
+
const m = r.find((p) => p.panelId === h.panelId);
|
12677
12685
|
if (!m)
|
12678
12686
|
throw new Y(h);
|
12679
|
-
const
|
12687
|
+
const g = M();
|
12680
12688
|
return new z(
|
12681
12689
|
{
|
12682
|
-
id:
|
12690
|
+
id: g,
|
12683
12691
|
src: d,
|
12684
12692
|
type: x.Image,
|
12685
12693
|
y: h.top,
|
@@ -12702,10 +12710,10 @@ const Wo = (r) => {
|
|
12702
12710
|
const o = As(n, a.option);
|
12703
12711
|
o && (t[a.stepName] = { selectedVariants: [o] });
|
12704
12712
|
const l = async (c) => {
|
12705
|
-
const d = await Un(c, o?.asset?.fileLink), A = await Oe(d), u = M(), h = r.find((
|
12713
|
+
const d = await Un(c, o?.asset?.fileLink), A = await Oe(d), u = M(), h = r.find((g) => g.panelId === c.panelId);
|
12706
12714
|
if (!h)
|
12707
12715
|
throw new Y(c);
|
12708
|
-
const m =
|
12716
|
+
const m = va(
|
12709
12717
|
s,
|
12710
12718
|
A,
|
12711
12719
|
{
|
@@ -12757,7 +12765,7 @@ const Wo = (r) => {
|
|
12757
12765
|
const n = e.data, i = a.option;
|
12758
12766
|
if (!i)
|
12759
12767
|
return console.error(`No option for step ${a.stepName}.`), [];
|
12760
|
-
const s = i.variants?.find((
|
12768
|
+
const s = i.variants?.find((C) => C.id === n.illustrationVariantId) || ne(i);
|
12761
12769
|
if (!s)
|
12762
12770
|
return console.error(`No variant with ID: ${n.illustrationVariantId}`), [];
|
12763
12771
|
if (!s.asset)
|
@@ -12770,56 +12778,56 @@ const Wo = (r) => {
|
|
12770
12778
|
if (!m)
|
12771
12779
|
return console.error("Failed to read SVG."), [];
|
12772
12780
|
pa(m);
|
12773
|
-
const
|
12774
|
-
kt(m, (
|
12775
|
-
jo.includes(
|
12776
|
-
const E =
|
12781
|
+
const g = {};
|
12782
|
+
kt(m, (C) => {
|
12783
|
+
jo.includes(C.tagName) && !C.attributes.getNamedItem("fill") && C.setAttribute("fill", "#000000");
|
12784
|
+
const E = C.attributes.getNamedItem("fill");
|
12777
12785
|
if (E && E.value !== "none") {
|
12778
12786
|
const B = E.value, Q = `spiff-fill-${B.replace(/\W/g, "")}`;
|
12779
|
-
|
12787
|
+
C.classList.add(Q), g[Q] = { browserValue: B };
|
12780
12788
|
}
|
12781
|
-
const P =
|
12789
|
+
const P = C.attributes.getNamedItem("stroke");
|
12782
12790
|
if (P && P.value !== "none") {
|
12783
12791
|
const B = P.value, Q = `spiff-stroke-${B.replace(/\W/g, "")}`;
|
12784
|
-
|
12792
|
+
C.classList.add(Q), g[Q] = { browserValue: B };
|
12785
12793
|
}
|
12786
12794
|
});
|
12787
|
-
const
|
12795
|
+
const f = Bt().serializeToString(m), S = n.colors;
|
12788
12796
|
if (S) {
|
12789
|
-
for (const [
|
12797
|
+
for (const [C, E] of Object.entries(g))
|
12790
12798
|
for (const P of Object.keys(S))
|
12791
12799
|
if (E.browserValue === P) {
|
12792
|
-
|
12800
|
+
g[C] = { browserValue: S[P] };
|
12793
12801
|
break;
|
12794
12802
|
}
|
12795
12803
|
}
|
12796
|
-
const b = (
|
12797
|
-
const E = r.find((B) => B.panelId ===
|
12804
|
+
const b = (C) => {
|
12805
|
+
const E = r.find((B) => B.panelId === C.panelId);
|
12798
12806
|
if (!E)
|
12799
|
-
throw new Y(
|
12807
|
+
throw new Y(C);
|
12800
12808
|
const P = M();
|
12801
12809
|
return new z(
|
12802
12810
|
{
|
12803
|
-
colors:
|
12811
|
+
colors: g,
|
12804
12812
|
id: P,
|
12805
|
-
svg:
|
12813
|
+
svg: f,
|
12806
12814
|
type: x.Illustration,
|
12807
|
-
y:
|
12808
|
-
x:
|
12809
|
-
rotation:
|
12810
|
-
width:
|
12811
|
-
height:
|
12812
|
-
layer:
|
12813
|
-
layerIndex:
|
12814
|
-
immutable:
|
12815
|
+
y: C.top,
|
12816
|
+
x: C.left,
|
12817
|
+
rotation: C.rotation,
|
12818
|
+
width: C.width,
|
12819
|
+
height: C.height,
|
12820
|
+
layer: C.layer,
|
12821
|
+
layerIndex: C.layerIndex,
|
12822
|
+
immutable: C.immutable
|
12815
12823
|
},
|
12816
12824
|
E
|
12817
12825
|
);
|
12818
12826
|
}, I = a.data.regions;
|
12819
12827
|
try {
|
12820
12828
|
return I.map(b);
|
12821
|
-
} catch (
|
12822
|
-
return console.error(
|
12829
|
+
} catch (C) {
|
12830
|
+
return console.error(C), [];
|
12823
12831
|
}
|
12824
12832
|
}, Ko = async (r, t, e) => {
|
12825
12833
|
const a = await Kn(e.data.module), n = t.data, i = (o, l) => {
|
@@ -12901,7 +12909,7 @@ const Wo = (r) => {
|
|
12901
12909
|
return console.error(`No variant with ID: ${n.colorVariantId}`), [];
|
12902
12910
|
t[a.stepName] = { selectedVariants: [s] };
|
12903
12911
|
const o = (c) => {
|
12904
|
-
const d = r.find((
|
12912
|
+
const d = r.find((g) => g.panelId === c.panelId);
|
12905
12913
|
if (!d)
|
12906
12914
|
throw new Y(c);
|
12907
12915
|
const A = `
|
@@ -12980,10 +12988,10 @@ const Wo = (r) => {
|
|
12980
12988
|
}
|
12981
12989
|
else {
|
12982
12990
|
const c = await nt(i, !0), d = (A) => {
|
12983
|
-
const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = h?.length > 0 ? h[0] : "",
|
12984
|
-
if (!
|
12991
|
+
const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = h?.length > 0 ? h[0] : "", f = dt().parseFromString(m, "image/svg+xml").firstElementChild;
|
12992
|
+
if (!f)
|
12985
12993
|
throw new Dt("Failed to read SVG.");
|
12986
|
-
return pa(
|
12994
|
+
return pa(f), Bt().serializeToString(f);
|
12987
12995
|
};
|
12988
12996
|
l.forEach((A) => {
|
12989
12997
|
const u = r.find((m) => m.panelId === A.panelId);
|
@@ -13013,36 +13021,36 @@ const Wo = (r) => {
|
|
13013
13021
|
}
|
13014
13022
|
return a;
|
13015
13023
|
}, tl = async (r, t, e, a) => {
|
13016
|
-
const n = [], i = e.data, s = 30, o = (
|
13017
|
-
const
|
13018
|
-
if (!
|
13024
|
+
const n = [], i = e.data, s = 30, o = (p) => p.vertical ? "center" : p.textAlign || "center", l = () => {
|
13025
|
+
const p = a.option;
|
13026
|
+
if (!p)
|
13019
13027
|
return;
|
13020
|
-
const
|
13021
|
-
if (!
|
13028
|
+
const f = p.variants?.find((b) => b.id === i.fontVariantId) || ne(p);
|
13029
|
+
if (!f || !f.asset)
|
13022
13030
|
return;
|
13023
|
-
t[a.stepName] = { selectedVariants: [
|
13024
|
-
const S =
|
13031
|
+
t[a.stepName] = { selectedVariants: [f] };
|
13032
|
+
const S = f.asset.fileLink;
|
13025
13033
|
if (S)
|
13026
13034
|
return S;
|
13027
13035
|
}, d = await (async () => {
|
13028
|
-
const
|
13029
|
-
if (!
|
13036
|
+
const p = l();
|
13037
|
+
if (!p)
|
13030
13038
|
return;
|
13031
|
-
const
|
13039
|
+
const f = await Nt(p);
|
13032
13040
|
return {
|
13033
|
-
assetUrl:
|
13034
|
-
name:
|
13041
|
+
assetUrl: p,
|
13042
|
+
name: f.names.fullName.en
|
13035
13043
|
};
|
13036
13044
|
})(), A = (a.data.replaceableText ? a.data.replaceableText.replace("{{}}", i.text) : i.text) || "", u = Ie(A, {
|
13037
13045
|
vertical: a.data.vertical,
|
13038
13046
|
uppercase: a.data.uppercase
|
13039
|
-
}), h = async (
|
13040
|
-
const
|
13041
|
-
return
|
13042
|
-
}, m = i.color || await h(a.data),
|
13043
|
-
for (const
|
13044
|
-
const
|
13045
|
-
if (!
|
13047
|
+
}), h = async (p) => {
|
13048
|
+
const f = p.colorOption;
|
13049
|
+
return f ? H.getDefaultVariant(f)?.color : void 0;
|
13050
|
+
}, m = i.color || await h(a.data), g = a.data.regions;
|
13051
|
+
for (const p of g) {
|
13052
|
+
const f = r.find((b) => b.panelId === p.panelId);
|
13053
|
+
if (!f)
|
13046
13054
|
continue;
|
13047
13055
|
const S = {
|
13048
13056
|
stepName: e.name,
|
@@ -13052,24 +13060,24 @@ const Wo = (r) => {
|
|
13052
13060
|
fill: i.color || m || "#000000",
|
13053
13061
|
fontData: d,
|
13054
13062
|
fontSize: a.data.size || s,
|
13055
|
-
height:
|
13056
|
-
layer:
|
13057
|
-
layerIndex:
|
13063
|
+
height: p.height,
|
13064
|
+
layer: p.layer,
|
13065
|
+
layerIndex: p.layerIndex,
|
13058
13066
|
paths: a.data.paths,
|
13059
|
-
rotation:
|
13067
|
+
rotation: p.rotation,
|
13060
13068
|
text: u,
|
13061
13069
|
type: x.Textbox,
|
13062
13070
|
vertical: a.data.vertical,
|
13063
13071
|
verticalAlign: a.data.verticalAlign || "middle",
|
13064
|
-
width:
|
13065
|
-
x:
|
13066
|
-
y:
|
13072
|
+
width: p.width,
|
13073
|
+
x: p.left,
|
13074
|
+
y: p.top
|
13067
13075
|
};
|
13068
13076
|
if (d) {
|
13069
13077
|
const [b, I] = fe(
|
13070
13078
|
a.data.size || s,
|
13071
13079
|
d,
|
13072
|
-
|
13080
|
+
p,
|
13073
13081
|
[
|
13074
13082
|
Ie(u, {
|
13075
13083
|
vertical: a.data.vertical,
|
@@ -13090,11 +13098,11 @@ const Wo = (r) => {
|
|
13090
13098
|
text: S.curved ? S.text : (I || []).join(`
|
13091
13099
|
`)
|
13092
13100
|
},
|
13093
|
-
|
13101
|
+
f
|
13094
13102
|
)
|
13095
13103
|
);
|
13096
13104
|
} else
|
13097
|
-
n.push(new z(S,
|
13105
|
+
n.push(new z(S, f));
|
13098
13106
|
}
|
13099
13107
|
return n;
|
13100
13108
|
}, el = (r, t) => r.conditions ? r.conditions.every((e) => {
|
@@ -13202,7 +13210,7 @@ const rl = () => new Promise((r, t) => {
|
|
13202
13210
|
}), il = rl();
|
13203
13211
|
class sl {
|
13204
13212
|
constructor(t, e, a, n, i) {
|
13205
|
-
this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new
|
13213
|
+
this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new xn(2), this.id = t, this.name = e, this.service = a, this.panelSize = n, this.getWorkflowManager = i;
|
13206
13214
|
}
|
13207
13215
|
getID() {
|
13208
13216
|
return this.id;
|
@@ -13248,7 +13256,7 @@ class sl {
|
|
13248
13256
|
* Actions to perform when a static render event is fired for this canvas.
|
13249
13257
|
*/
|
13250
13258
|
async render(t) {
|
13251
|
-
const e =
|
13259
|
+
const e = vt(t);
|
13252
13260
|
this.lastRequestedRenderArguments = e;
|
13253
13261
|
const a = this.getStaticContext();
|
13254
13262
|
if (!a) {
|
@@ -13269,7 +13277,7 @@ class sl {
|
|
13269
13277
|
);
|
13270
13278
|
}
|
13271
13279
|
}
|
13272
|
-
class ol extends
|
13280
|
+
class ol extends Fn {
|
13273
13281
|
constructor(t, e, a, n, i, s) {
|
13274
13282
|
super(), this.layoutId = t, this.ctx = e, this.nonPOTSupport = a, this.onRender = n, this.layouts = i, this.getWorkflowManager = s;
|
13275
13283
|
}
|
@@ -13315,16 +13323,16 @@ class ol extends xn {
|
|
13315
13323
|
if (this.nonPOTSupport) {
|
13316
13324
|
const m = s / o;
|
13317
13325
|
a / n < m ? (l = s, c = n * (s / a)) : (l = a * (o / n), c = o);
|
13318
|
-
const
|
13319
|
-
l =
|
13326
|
+
const p = this.resizeFit({ width: l, height: c });
|
13327
|
+
l = p.width, c = p.height;
|
13320
13328
|
} else
|
13321
13329
|
l = i.width, c = i.height;
|
13322
|
-
const d = this.getWorkflowManager?.()?.getTemplatingContext(), A =
|
13330
|
+
const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = ya(t.layoutState.layout, e, {
|
13323
13331
|
renderingConfiguration: {
|
13324
13332
|
purpose: Ht.ThreeD,
|
13325
13333
|
templatingContext: d
|
13326
13334
|
}
|
13327
|
-
}), u =
|
13335
|
+
}), u = mn(A), h = await Aa.from(this.ctx, u, {
|
13328
13336
|
anonymousCrossOrigin: !0,
|
13329
13337
|
ignoreDimensions: !this.nonPOTSupport,
|
13330
13338
|
ignoreAnimation: !0,
|
@@ -13403,14 +13411,14 @@ class ll {
|
|
13403
13411
|
case L.FileUpload:
|
13404
13412
|
return new cl(this.bundle, t).initialize();
|
13405
13413
|
case L.ColorOption:
|
13406
|
-
return new
|
13414
|
+
return new Ka(
|
13407
13415
|
this.bundle,
|
13408
13416
|
t,
|
13409
13417
|
t.entityId ? await H.getOption(t.entityId) : void 0
|
13410
13418
|
);
|
13411
13419
|
case L.Option: {
|
13412
13420
|
const e = t.entityId ? await H.getOption(t.entityId) : void 0;
|
13413
|
-
return e?.type === "Color" ? new
|
13421
|
+
return e?.type === "Color" ? new Ka(this.bundle, t, e) : new tr(this.bundle, t, e);
|
13414
13422
|
}
|
13415
13423
|
case L.Text:
|
13416
13424
|
return new dl(this.bundle, t);
|
@@ -13419,7 +13427,7 @@ class ll {
|
|
13419
13427
|
}
|
13420
13428
|
}
|
13421
13429
|
}
|
13422
|
-
class
|
13430
|
+
class Ba {
|
13423
13431
|
constructor(t, e) {
|
13424
13432
|
this.bundle = t, this.property = e;
|
13425
13433
|
}
|
@@ -13480,7 +13488,7 @@ class Ia {
|
|
13480
13488
|
return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);
|
13481
13489
|
}
|
13482
13490
|
}
|
13483
|
-
class cl extends
|
13491
|
+
class cl extends Ba {
|
13484
13492
|
constructor(t, e) {
|
13485
13493
|
super(t, e);
|
13486
13494
|
}
|
@@ -13491,7 +13499,7 @@ class cl extends Ia {
|
|
13491
13499
|
const t = await this.getImage();
|
13492
13500
|
if (t?.fileLink)
|
13493
13501
|
if (t?.fileLink.endsWith(".svg")) {
|
13494
|
-
const e = await nt(t?.fileLink), a = await
|
13502
|
+
const e = await nt(t?.fileLink), a = await Ea(t?.fileLink), n = a.width, i = a.height, s = await ot(e);
|
13495
13503
|
this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.colors?.forEach((c) => {
|
13496
13504
|
s.colors[c.key] = {
|
13497
13505
|
browserValue: c.browserValue,
|
@@ -13706,7 +13714,7 @@ class cl extends Ia {
|
|
13706
13714
|
);
|
13707
13715
|
}
|
13708
13716
|
}
|
13709
|
-
class dl extends
|
13717
|
+
class dl extends Ba {
|
13710
13718
|
constructor(t, e) {
|
13711
13719
|
super(t, e);
|
13712
13720
|
}
|
@@ -13745,7 +13753,7 @@ class dl extends Ia {
|
|
13745
13753
|
await Promise.all(n);
|
13746
13754
|
}
|
13747
13755
|
}
|
13748
|
-
class tr extends
|
13756
|
+
class tr extends Ba {
|
13749
13757
|
constructor(t, e, a) {
|
13750
13758
|
super(t, e), this.optionResource = a;
|
13751
13759
|
}
|
@@ -13807,7 +13815,7 @@ class tr extends Ia {
|
|
13807
13815
|
await Promise.all(n);
|
13808
13816
|
}
|
13809
13817
|
}
|
13810
|
-
class
|
13818
|
+
class Ka extends tr {
|
13811
13819
|
constructor(t, e, a) {
|
13812
13820
|
super(t, e, a);
|
13813
13821
|
}
|
@@ -13908,7 +13916,7 @@ class hl {
|
|
13908
13916
|
}
|
13909
13917
|
async setGlobalPropertyState(t) {
|
13910
13918
|
this.globalPropertyState || await this.initPromise;
|
13911
|
-
const e =
|
13919
|
+
const e = vt(this.globalPropertyState);
|
13912
13920
|
this.globalPropertyState = { ...t, id: e.id }, this.recalculateMandatoryStates(), await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(e, this.globalPropertyState);
|
13913
13921
|
}
|
13914
13922
|
getAspectMandatoryFulfilled(t) {
|
@@ -13935,7 +13943,7 @@ class hl {
|
|
13935
13943
|
if (!i)
|
13936
13944
|
throw new Error(`Failed to find configuration aspect with name: ${t}`);
|
13937
13945
|
this.mandatoryFulfilledAspects.set(t, e !== "");
|
13938
|
-
const s =
|
13946
|
+
const s = vt(this.globalPropertyState), o = this.globalPropertyState.aspects.filter((l) => l.name === t);
|
13939
13947
|
if (o.length > 0)
|
13940
13948
|
if (n) {
|
13941
13949
|
const l = o.find((c) => c.channel === n);
|
@@ -13978,7 +13986,7 @@ class hl {
|
|
13978
13986
|
const n = this.configuration.aspects.find((o) => o.name === t);
|
13979
13987
|
if (!n)
|
13980
13988
|
throw new Error(`Failed to find configuration aspect with name: ${t}`);
|
13981
|
-
const i =
|
13989
|
+
const i = vt(this.globalPropertyState), s = this.globalPropertyState.aspects.filter((o) => o.name === t);
|
13982
13990
|
if (s.length > 0)
|
13983
13991
|
if (a) {
|
13984
13992
|
const o = s.find((l) => l.channel === a);
|
@@ -14326,31 +14334,36 @@ class ar {
|
|
14326
14334
|
* Fetches a paginated feed of products.
|
14327
14335
|
* @param offset The zero-based start index.
|
14328
14336
|
* @param limit The maximum number of products to return.
|
14329
|
-
* @param
|
14337
|
+
* @param productFilters Optional product metafields to filter the products by.
|
14330
14338
|
* @param tags Optional object of tag filters to apply.
|
14331
14339
|
* @param sortKey Optional field of the products to sort by.
|
14332
14340
|
* @param sortDescending Optional boolean to indicate if the sort should be in descending order.
|
14333
14341
|
* @param quickSearch Optional string to filter products by name.
|
14342
|
+
* @param workflowFilters Optional workflow metafields to filter the products and their workflows by.
|
14334
14343
|
* @returns
|
14335
14344
|
*/
|
14336
|
-
async fetchProductsFeed(t, e, a, n, i, s, o) {
|
14345
|
+
async fetchProductsFeed(t, e, a, n, i, s, o, l) {
|
14337
14346
|
if (this.fullFetched) {
|
14338
|
-
const
|
14347
|
+
const u = await (a ? this.filterProducts(a) : this.fetchProducts());
|
14339
14348
|
return {
|
14340
|
-
total:
|
14341
|
-
items:
|
14349
|
+
total: u.length,
|
14350
|
+
items: u.slice(t, t + e)
|
14342
14351
|
};
|
14343
14352
|
}
|
14344
|
-
const
|
14353
|
+
const c = new AbortController(), { signal: d } = c, A = y.getShadowGraphqlClient().watchQuery({
|
14345
14354
|
query: Js,
|
14346
14355
|
variables: {
|
14347
14356
|
id: this.getId(),
|
14348
14357
|
limit: e,
|
14349
14358
|
offset: t,
|
14350
|
-
|
14359
|
+
productFilters: a ? {
|
14351
14360
|
link: "And",
|
14352
14361
|
metafields: a
|
14353
14362
|
} : void 0,
|
14363
|
+
workflowFilters: l ? {
|
14364
|
+
link: "And",
|
14365
|
+
metafields: l
|
14366
|
+
} : void 0,
|
14354
14367
|
tags: n ? {
|
14355
14368
|
include: n.include ?? [],
|
14356
14369
|
exclude: n.exclude ?? []
|
@@ -14364,26 +14377,26 @@ class ar {
|
|
14364
14377
|
returnPartialData: !0,
|
14365
14378
|
context: {
|
14366
14379
|
fetchOptions: {
|
14367
|
-
signal:
|
14380
|
+
signal: d
|
14368
14381
|
}
|
14369
14382
|
}
|
14370
14383
|
});
|
14371
|
-
return new Promise((
|
14372
|
-
let
|
14373
|
-
const
|
14374
|
-
next(
|
14375
|
-
if (
|
14384
|
+
return new Promise((u) => {
|
14385
|
+
let h = !1;
|
14386
|
+
const m = A.subscribe({
|
14387
|
+
next(g) {
|
14388
|
+
if (h || g.partial && (!g.data.productCollections || g.data.productCollections.length === 0 || !g.data.productCollections[0].productCollectionProductsFeed?.items || g.data.productCollections[0].productCollectionProductsFeed?.items.length === 0))
|
14376
14389
|
return;
|
14377
|
-
|
14378
|
-
const p =
|
14379
|
-
|
14390
|
+
c.abort(), h = !0, m.unsubscribe();
|
14391
|
+
const p = g.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((f) => !!f.product).map((f) => new Ae(vt(f))) || [];
|
14392
|
+
u({
|
14380
14393
|
items: p,
|
14381
14394
|
// Clone items because it could be cached data (immutable)
|
14382
|
-
total:
|
14395
|
+
total: g.data.productCollections?.[0].productCollectionProductsFeed?.total ?? 0
|
14383
14396
|
});
|
14384
14397
|
},
|
14385
14398
|
error() {
|
14386
|
-
|
14399
|
+
h || (h = !0, m.unsubscribe(), u({ items: [], total: 0 }));
|
14387
14400
|
}
|
14388
14401
|
});
|
14389
14402
|
});
|
@@ -14691,9 +14704,9 @@ class _e {
|
|
14691
14704
|
A ? this.globalPropertyHandleService.getHandles().then((u) => {
|
14692
14705
|
const h = u.map((m) => {
|
14693
14706
|
if (m.getType() === L.ColorOption || m.getType() === L.Option) {
|
14694
|
-
const
|
14695
|
-
if (!A.aspects.find((
|
14696
|
-
return
|
14707
|
+
const g = m;
|
14708
|
+
if (!A.aspects.find((f) => f.name === g.getName()))
|
14709
|
+
return g.initDefaultVariant();
|
14697
14710
|
}
|
14698
14711
|
});
|
14699
14712
|
Promise.all(h).then(c).catch(d);
|
@@ -14889,7 +14902,7 @@ class _e {
|
|
14889
14902
|
), d = [...new Set(o.map((u) => u.number))];
|
14890
14903
|
if (d.length > c)
|
14891
14904
|
for (const u of d) {
|
14892
|
-
const h = this.getGlobalPropertyStateManager(), m = l.find((
|
14905
|
+
const h = this.getGlobalPropertyStateManager(), m = l.find((g) => g.channelNumber === u);
|
14893
14906
|
m && await h.setAspect(n, m.variant.id || "", void 0, m.channelNumber);
|
14894
14907
|
}
|
14895
14908
|
}
|
@@ -15124,7 +15137,7 @@ class _e {
|
|
15124
15137
|
}
|
15125
15138
|
async getAllStakeholders() {
|
15126
15139
|
const t = await y.getShadowGraphqlClient().query({
|
15127
|
-
query:
|
15140
|
+
query: Ha,
|
15128
15141
|
errorPolicy: "all",
|
15129
15142
|
fetchPolicy: "no-cache",
|
15130
15143
|
variables: {
|
@@ -15140,7 +15153,7 @@ class _e {
|
|
15140
15153
|
}
|
15141
15154
|
async getCurrentStakeholder() {
|
15142
15155
|
const t = await y.getShadowGraphqlClient().query({
|
15143
|
-
query:
|
15156
|
+
query: Ha,
|
15144
15157
|
errorPolicy: "all",
|
15145
15158
|
fetchPolicy: "no-cache",
|
15146
15159
|
variables: {
|
@@ -15544,7 +15557,7 @@ class ue {
|
|
15544
15557
|
return this.getArtifacts().get(t);
|
15545
15558
|
}
|
15546
15559
|
}
|
15547
|
-
class
|
15560
|
+
class Ia {
|
15548
15561
|
constructor(t) {
|
15549
15562
|
this.value = t;
|
15550
15563
|
}
|
@@ -15557,12 +15570,12 @@ class Pa {
|
|
15557
15570
|
}
|
15558
15571
|
}
|
15559
15572
|
var Fl = /* @__PURE__ */ ((r) => (r.Transaction = "Transaction", r.Bundle = "Bundle", r.Product = "Product", r.Variant = "Variant", r.Option = "Option", r.LineItem = "LineItem", r.Asset = "Asset", r))(Fl || {});
|
15560
|
-
class Ad extends
|
15573
|
+
class Ad extends Ia {
|
15561
15574
|
constructor(t) {
|
15562
15575
|
super(`"${t}"`);
|
15563
15576
|
}
|
15564
15577
|
}
|
15565
|
-
class nr extends
|
15578
|
+
class nr extends Ia {
|
15566
15579
|
constructor(t, e) {
|
15567
15580
|
if (e !== "Asset" && !nr.validUUID(t))
|
15568
15581
|
throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");
|
@@ -15572,12 +15585,12 @@ class nr extends Pa {
|
|
15572
15585
|
return t.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
|
15573
15586
|
}
|
15574
15587
|
}
|
15575
|
-
class ud extends
|
15588
|
+
class ud extends Ia {
|
15576
15589
|
constructor(t) {
|
15577
15590
|
super(`[${t.map((e) => e.getRaw()).join(",")}]`);
|
15578
15591
|
}
|
15579
15592
|
}
|
15580
|
-
class
|
15593
|
+
class _a {
|
15581
15594
|
constructor(t) {
|
15582
15595
|
this.integrationProduct = t;
|
15583
15596
|
}
|
@@ -15765,7 +15778,7 @@ class Nl {
|
|
15765
15778
|
}
|
15766
15779
|
async generateCode(t) {
|
15767
15780
|
const e = await this.cognitoClient?.send(
|
15768
|
-
new
|
15781
|
+
new xa({
|
15769
15782
|
AuthFlow: "CUSTOM_AUTH",
|
15770
15783
|
ClientId: this.userPoolClientId,
|
15771
15784
|
AuthParameters: {
|
@@ -15799,7 +15812,7 @@ class Nl {
|
|
15799
15812
|
throw new Error("Failed to find existing tokens.");
|
15800
15813
|
const e = JSON.parse(t);
|
15801
15814
|
return await this.cognitoClient?.send(
|
15802
|
-
new
|
15815
|
+
new xa({
|
15803
15816
|
AuthFlow: "REFRESH_TOKEN_AUTH",
|
15804
15817
|
ClientId: this.userPoolClientId,
|
15805
15818
|
AuthParameters: {
|
@@ -15829,7 +15842,7 @@ class Ql {
|
|
15829
15842
|
* @param currency The currency to determine precision for.
|
15830
15843
|
*/
|
15831
15844
|
getPrecisionForCurrency(t) {
|
15832
|
-
const e = t, a =
|
15845
|
+
const e = t, a = ka.code(e);
|
15833
15846
|
return a ? a.digits : 2;
|
15834
15847
|
}
|
15835
15848
|
/**
|
@@ -15840,11 +15853,11 @@ class Ql {
|
|
15840
15853
|
*/
|
15841
15854
|
getSpecialFormat(t) {
|
15842
15855
|
const e = t;
|
15843
|
-
if (
|
15856
|
+
if (ka.code(e)?.code === "CLP")
|
15844
15857
|
return "USD0,0";
|
15845
15858
|
}
|
15846
15859
|
}
|
15847
|
-
const
|
15860
|
+
const Xa = new Ql();
|
15848
15861
|
class Rl {
|
15849
15862
|
constructor(t, e, a, n) {
|
15850
15863
|
this.presentmentCurrency = void 0, this.presentmentCurrency = n, this.partnerCurrency = a, this.rateFrom = t, this.rateTo = e;
|
@@ -15876,13 +15889,13 @@ class Rl {
|
|
15876
15889
|
* Converts a monetary value from the database to the units of its currency.
|
15877
15890
|
*/
|
15878
15891
|
units(t, e) {
|
15879
|
-
return t / Math.pow(10,
|
15892
|
+
return t / Math.pow(10, Xa.getPrecisionForCurrency(e));
|
15880
15893
|
}
|
15881
15894
|
/**
|
15882
15895
|
* Converts a monetary value in units to the subunits of its currency.
|
15883
15896
|
*/
|
15884
15897
|
subunits(t, e) {
|
15885
|
-
return t * Math.pow(10,
|
15898
|
+
return t * Math.pow(10, Xa.getPrecisionForCurrency(e));
|
15886
15899
|
}
|
15887
15900
|
}
|
15888
15901
|
const Ol = async (r, t) => {
|
@@ -15949,7 +15962,7 @@ class md {
|
|
15949
15962
|
} catch (a) {
|
15950
15963
|
throw console.error(a), new ht("Critical - Unable to synchronize workflow state with server.");
|
15951
15964
|
}
|
15952
|
-
}, this.options = t, this.options.applicationKey && Lr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 31.2.
|
15965
|
+
}, this.options = t, this.options.applicationKey && Lr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 31.2.4"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
15953
15966
|
}
|
15954
15967
|
configure(t) {
|
15955
15968
|
gt.setHubUrl(t.hubUrl), gt.setServerUrl(t.serverUrl), gt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && zr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|
@@ -16268,8 +16281,8 @@ class md {
|
|
16268
16281
|
const h = await this.loggedInBearerToken();
|
16269
16282
|
o.Authorization = `Bearer ${h}`;
|
16270
16283
|
} catch {
|
16271
|
-
const
|
16272
|
-
|
16284
|
+
const g = Object.entries(localStorage).find(([f, S]) => f.startsWith("CognitoIdentityServiceProvider") && f.endsWith("idToken"))?.[0] || "", p = localStorage.getItem(g);
|
16285
|
+
p && !Wt(p) && (o.Authorization = `Bearer ${p}`);
|
16273
16286
|
}
|
16274
16287
|
const l = {
|
16275
16288
|
bundleOwnerId: s,
|
@@ -16309,8 +16322,8 @@ class md {
|
|
16309
16322
|
const u = await this.loggedInBearerToken();
|
16310
16323
|
s.Authorization = `Bearer ${u}`;
|
16311
16324
|
} catch {
|
16312
|
-
const m = Object.entries(localStorage).find(([
|
16313
|
-
|
16325
|
+
const m = Object.entries(localStorage).find(([p, f]) => p.startsWith("CognitoIdentityServiceProvider") && p.endsWith("idToken"))?.[0] || "", g = localStorage.getItem(m);
|
16326
|
+
g && !Wt(g) && (s.Authorization = `Bearer ${g}`);
|
16314
16327
|
}
|
16315
16328
|
const o = {
|
16316
16329
|
bundleOwnerId: i,
|
@@ -16408,10 +16421,10 @@ class md {
|
|
16408
16421
|
async getWorkflowExperiences(t, e) {
|
16409
16422
|
if (t.length === 0)
|
16410
16423
|
throw new ht("No options provided!");
|
16411
|
-
const a = y.getShadowGraphqlClient(), n = async (
|
16412
|
-
if (
|
16424
|
+
const a = y.getShadowGraphqlClient(), n = async (C) => {
|
16425
|
+
if (C.length === 0)
|
16413
16426
|
return [];
|
16414
|
-
const E =
|
16427
|
+
const E = C.map((F) => F.option.transactionId), P = await a.query({
|
16415
16428
|
query: vi,
|
16416
16429
|
variables: {
|
16417
16430
|
ids: E
|
@@ -16419,23 +16432,23 @@ class md {
|
|
16419
16432
|
errorPolicy: "all",
|
16420
16433
|
fetchPolicy: "no-cache"
|
16421
16434
|
}), B = P.data.transactions;
|
16422
|
-
if (B.length !==
|
16435
|
+
if (B.length !== C.length) {
|
16423
16436
|
const F = P.errors?.[0]?.message || "Unknown error";
|
16424
16437
|
throw new ht(`Not all transactions were found: ${F}`);
|
16425
16438
|
}
|
16426
16439
|
return !this.activeIntegration && B[0].integrationProduct?.integration && (this.activeIntegration = Promise.resolve(B[0].integrationProduct.integration)), B.map((F, Q) => ({
|
16427
16440
|
transaction: F,
|
16428
16441
|
workflowId: F.workflowId,
|
16429
|
-
readOnly:
|
16430
|
-
index:
|
16442
|
+
readOnly: C.find((T) => T.option.transactionId === F.id)?.option.readOnly ?? !1,
|
16443
|
+
index: C[Q].index
|
16431
16444
|
}));
|
16432
|
-
}, i = async (
|
16433
|
-
if (
|
16445
|
+
}, i = async (C) => {
|
16446
|
+
if (C.length === 0)
|
16434
16447
|
return [];
|
16435
16448
|
const E = await a.mutate({
|
16436
16449
|
mutation: Si,
|
16437
16450
|
variables: {
|
16438
|
-
inputs:
|
16451
|
+
inputs: C.map((B) => ({
|
16439
16452
|
integrationProductId: B.option.type === "integration" ? B.option.integrationProductId : void 0,
|
16440
16453
|
externalIntegrationId: B.option.type === "external" ? B.option.externalIntegrationId : void 0,
|
16441
16454
|
externalProductId: B.option.type === "external" ? B.option.externalProductId : void 0,
|
@@ -16457,17 +16470,17 @@ class md {
|
|
16457
16470
|
transaction: B,
|
16458
16471
|
workflowId: B.workflowId,
|
16459
16472
|
readOnly: !1,
|
16460
|
-
index:
|
16473
|
+
index: C[F].index
|
16461
16474
|
}));
|
16462
|
-
}, s = t.map((
|
16463
|
-
(
|
16464
|
-
), c =
|
16475
|
+
}, s = t.map((C, E) => ({ option: C, index: E })), o = s.filter((C) => C.option.type === "transaction"), l = s.filter(
|
16476
|
+
(C) => C.option.type === "integration" || C.option.type === "external"
|
16477
|
+
), c = Fa(o, 10), d = Fa(l, 10), A = (await Promise.all([
|
16465
16478
|
...c.map(n),
|
16466
16479
|
...d.map(i)
|
16467
|
-
])).flat(), u = [...new Set(A.map((
|
16468
|
-
const { transaction: E, workflowId: P, readOnly: B, index: F } =
|
16469
|
-
!
|
16470
|
-
const tt =
|
16480
|
+
])).flat(), u = [...new Set(A.map((C) => C.workflowId))], h = await rr(u, e), m = new Map(h.map((C) => [C.id, C])), g = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), p = A.map(async (C) => {
|
16481
|
+
const { transaction: E, workflowId: P, readOnly: B, index: F } = C, Q = m.get(P), T = t[F];
|
16482
|
+
!g.get(E.id) && E.transactionOwnerId && g.set(E.id, E.transactionOwnerId);
|
16483
|
+
const tt = g.get(E.id) || void 0, et = new Tl({
|
16471
16484
|
onMutate: () => ({ context: { transactionOwnerId: tt, bundleOwnerId: e?.bundleOwnerId } }),
|
16472
16485
|
onQuery: () => ({ context: { transactionOwnerId: tt, bundleOwnerId: e?.bundleOwnerId } })
|
16473
16486
|
}), W = {
|
@@ -16488,10 +16501,10 @@ class md {
|
|
16488
16501
|
};
|
16489
16502
|
if (T.type === "transaction" && E.workflowState) {
|
16490
16503
|
const q = JSON.parse(E.workflowState);
|
16491
|
-
W.layouts = Object.values(q.layouts || {}).map((
|
16504
|
+
W.layouts = Object.values(q.layouts || {}).map((wt) => wt.layout), await za(q), W.reloadedState = q;
|
16492
16505
|
} else if (!B && T.workflowState) {
|
16493
16506
|
const q = JSON.parse(T.workflowState);
|
16494
|
-
W.layouts = Object.values(q.layouts || {}).map((
|
16507
|
+
W.layouts = Object.values(q.layouts || {}).map((wt) => wt.layout), await za(q), W.reloadedState = q;
|
16495
16508
|
} else
|
16496
16509
|
W.layouts = Ll(
|
16497
16510
|
W.transaction,
|
@@ -16500,13 +16513,13 @@ class md {
|
|
16500
16513
|
return W.renderableContextService = new nl(
|
16501
16514
|
W.layouts
|
16502
16515
|
), W.delayWorkflowStateSync = !0, { experienceOptions: W, index: F, options: T };
|
16503
|
-
}),
|
16504
|
-
k.setMap("transactionOwnerIds",
|
16505
|
-
const b =
|
16506
|
-
const { experienceOptions: E, options: P } =
|
16516
|
+
}), f = await Promise.all(p);
|
16517
|
+
k.setMap("transactionOwnerIds", g);
|
16518
|
+
const b = f.sort((C, E) => C.index - E.index).map(async (C) => {
|
16519
|
+
const { experienceOptions: E, options: P } = C, B = new Go(this, E);
|
16507
16520
|
return await B.getWorkflowManager().getInitializationPromise(), P.type !== "transaction" && this.customer && await B.attachCustomerDetails({ email: this.customer.emailAddress }), B;
|
16508
16521
|
}), I = await Promise.all(b);
|
16509
|
-
return I.forEach((
|
16522
|
+
return I.forEach((C) => C.getWorkflowManager().setWorkflowStateSyncEnabled(!0)), I;
|
16510
16523
|
}
|
16511
16524
|
storeCustomer(t) {
|
16512
16525
|
const e = k.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map();
|
@@ -16523,7 +16536,7 @@ class md {
|
|
16523
16536
|
})).data?.integrationProducts;
|
16524
16537
|
if (!i || i.length === 0 || !i[0]?.id)
|
16525
16538
|
throw new Error("Integration product not found.");
|
16526
|
-
return new
|
16539
|
+
return new _a(i[0]);
|
16527
16540
|
}
|
16528
16541
|
async getIntegrationProductFromExternalIds(t, e, a) {
|
16529
16542
|
const s = (await y.getShadowGraphqlClient().query({
|
@@ -16537,7 +16550,7 @@ class md {
|
|
16537
16550
|
})).data?.integrationProductFromExternalIds;
|
16538
16551
|
if (!s?.id)
|
16539
16552
|
throw new Error("Integration product not found.");
|
16540
|
-
return new
|
16553
|
+
return new _a(s);
|
16541
16554
|
}
|
16542
16555
|
async getIntegrationProduct(t) {
|
16543
16556
|
return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
|
@@ -16634,7 +16647,7 @@ function me(r, t, e) {
|
|
16634
16647
|
}
|
16635
16648
|
class Gl {
|
16636
16649
|
constructor(t, e) {
|
16637
|
-
this.minZoomScale = [0.03], this.maxZoomScale = [20], this._debouncedUpdateFrameOffsets =
|
16650
|
+
this.minZoomScale = [0.03], this.maxZoomScale = [20], this._debouncedUpdateFrameOffsets = dn(this.updateFrameOffsets, 200), this.targetElements = [], this.onFrameDataChangeListeners = [], this.onZoomChangeListeners = [], this.forceImageCover = t, this.initialZoom = e, this.thresholdSettings = {
|
16638
16651
|
useThreshold: !1,
|
16639
16652
|
invertThreshold: !1,
|
16640
16653
|
threshold: 128,
|
@@ -16655,7 +16668,7 @@ class Gl {
|
|
16655
16668
|
let i = !1;
|
16656
16669
|
for (let s = 0; s < n.currentFrameSources.length; s++) {
|
16657
16670
|
const o = n.currentFrameSources[s], l = await Oe(o), c = this.frameData ? this.frameData[s] : void 0;
|
16658
|
-
|
16671
|
+
cn(l, c) || (this.frameData || (this.frameData = new Array(n.currentFrameSources.length)), this.frameData[s] = l, i = !0);
|
16659
16672
|
}
|
16660
16673
|
i && (this.onFrameDataChangeListeners.forEach(
|
16661
16674
|
(s) => s(this.frameData)
|
@@ -16844,7 +16857,7 @@ class Gl {
|
|
16844
16857
|
}
|
16845
16858
|
recalculateOffsets(t) {
|
16846
16859
|
this.frameData && ((!this.offsets || this.offsets.length !== this.frameData.length) && (this.offsets = new Array(this.frameData.length)), this.frameData.forEach((e, a) => {
|
16847
|
-
this.offsets[a] =
|
16860
|
+
this.offsets[a] = va(
|
16848
16861
|
t,
|
16849
16862
|
e,
|
16850
16863
|
this.initialZoom && !this.forceImageCover ? { scale: this.initialZoom } : void 0,
|
@@ -16854,7 +16867,7 @@ class Gl {
|
|
16854
16867
|
}
|
16855
16868
|
}
|
16856
16869
|
class wd {
|
16857
|
-
updateRecipient(t, e, a, n, i, s, o, l, c, d, A, u, h, m,
|
16870
|
+
updateRecipient(t, e, a, n, i, s, o, l, c, d, A, u, h, m, g, p, f) {
|
16858
16871
|
throw new Error("Method not implemented.");
|
16859
16872
|
}
|
16860
16873
|
approveTransaction(t) {
|
@@ -17024,7 +17037,7 @@ class ql extends Z {
|
|
17024
17037
|
}
|
17025
17038
|
selectVariant(t) {
|
17026
17039
|
const e = this.manager.getRegionElements(this.step.stepName);
|
17027
|
-
return
|
17040
|
+
return yt.selectVariant(
|
17028
17041
|
this.step,
|
17029
17042
|
t.getResource(),
|
17030
17043
|
e,
|
@@ -17044,7 +17057,7 @@ class ql extends Z {
|
|
17044
17057
|
* @param [recalculateOffsets=true] Optional: Recalculates the offsets of the image inside the frame. Default: `true`.
|
17045
17058
|
*/
|
17046
17059
|
async selectImage(t, e = !0, a = !0) {
|
17047
|
-
if (await
|
17060
|
+
if (await yt.selectImage(this.step, t, this.manager, a), e) {
|
17048
17061
|
const n = this.manager.getStepStorage(this.step.stepName)?.framePatternData || {};
|
17049
17062
|
this.manager.updateStorage(this.step.stepName, {
|
17050
17063
|
framePatternData: {
|
@@ -17082,7 +17095,7 @@ class ql extends Z {
|
|
17082
17095
|
if (!e)
|
17083
17096
|
throw new Error("You must supply an image selection before attempting to remove the background.");
|
17084
17097
|
const a = await O.removeBackgroundFromAsset(e);
|
17085
|
-
t && await
|
17098
|
+
t && await yt.selectImage(this.step, a, this.manager, !1);
|
17086
17099
|
const n = this.manager.getStepStorage(this.step.stepName)?.framePatternData || {};
|
17087
17100
|
return this.manager.updateStorage(this.step.stepName, {
|
17088
17101
|
framePatternData: {
|
@@ -17093,7 +17106,7 @@ class ql extends Z {
|
|
17093
17106
|
}), a;
|
17094
17107
|
}
|
17095
17108
|
changeColors(t) {
|
17096
|
-
|
17109
|
+
yt.changeColors(this.step, this.manager, t);
|
17097
17110
|
}
|
17098
17111
|
getImageData() {
|
17099
17112
|
if (this.frameService)
|
@@ -17103,7 +17116,7 @@ class ql extends Z {
|
|
17103
17116
|
return this.step.data.colorOption;
|
17104
17117
|
}
|
17105
17118
|
getAvailableColors() {
|
17106
|
-
return this.step.data.colorPickerEnabled ?
|
17119
|
+
return this.step.data.colorPickerEnabled ? yt.availableColors(this.step, this.manager) : Promise.resolve([]);
|
17107
17120
|
}
|
17108
17121
|
isColorPickerEnabled() {
|
17109
17122
|
return this.step.data.colorPickerEnabled ?? !1;
|
@@ -17116,7 +17129,7 @@ class ql extends Z {
|
|
17116
17129
|
return this.step.data.maxColors;
|
17117
17130
|
}
|
17118
17131
|
getUniqueColorCount() {
|
17119
|
-
return
|
17132
|
+
return yt.getUniqueColorCount(this.step, this.manager);
|
17120
17133
|
}
|
17121
17134
|
getCurrentFrameStep(t, e, a, n) {
|
17122
17135
|
return n && n.length > 1 && t === void 0 ? "SelectFrame" : e || a || this.getImageData() ? "Position" : "SelectImage";
|
@@ -17186,7 +17199,7 @@ const jl = w`
|
|
17186
17199
|
id
|
17187
17200
|
}
|
17188
17201
|
}
|
17189
|
-
`,
|
17202
|
+
`, Pa = w`
|
17190
17203
|
query GetCustomerTransactions(
|
17191
17204
|
$id: String!
|
17192
17205
|
$limit: Int!
|
@@ -17353,7 +17366,7 @@ const jl = w`
|
|
17353
17366
|
},
|
17354
17367
|
context: t
|
17355
17368
|
}), Pd = async (r, t, e) => (await y.getShadowGraphqlClient().query({
|
17356
|
-
query:
|
17369
|
+
query: Pa,
|
17357
17370
|
errorPolicy: "all",
|
17358
17371
|
fetchPolicy: "no-cache",
|
17359
17372
|
variables: {
|
@@ -17373,7 +17386,7 @@ const jl = w`
|
|
17373
17386
|
limit: t
|
17374
17387
|
}
|
17375
17388
|
}))?.data.customerTransactionsFeed?.items || [], Dd = async (r, t, e) => (await y.getShadowGraphqlClient().query({
|
17376
|
-
query:
|
17389
|
+
query: Pa,
|
17377
17390
|
errorPolicy: "all",
|
17378
17391
|
fetchPolicy: "no-cache",
|
17379
17392
|
variables: {
|
@@ -17393,7 +17406,7 @@ const jl = w`
|
|
17393
17406
|
limit: t
|
17394
17407
|
}
|
17395
17408
|
}))?.data.customerTransactionsFeed?.items || [], Fd = async (r, t, e) => (await y.getShadowGraphqlClient().query({
|
17396
|
-
query:
|
17409
|
+
query: Pa,
|
17397
17410
|
errorPolicy: "all",
|
17398
17411
|
fetchPolicy: "no-cache",
|
17399
17412
|
variables: {
|
@@ -17440,7 +17453,7 @@ K = { __e: function(r, t, e, a) {
|
|
17440
17453
|
}
|
17441
17454
|
throw r;
|
17442
17455
|
} }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
|
17443
|
-
var st, Xe,
|
17456
|
+
var st, Xe, Za, ir = [], Ze = [], tn = K.__b, en = K.__r, an = K.diffed, nn = K.__c, rn = K.unmount;
|
17444
17457
|
function ec() {
|
17445
17458
|
for (var r; r = ir.shift(); )
|
17446
17459
|
if (r.__P && r.__H)
|
@@ -17451,17 +17464,17 @@ function ec() {
|
|
17451
17464
|
}
|
17452
17465
|
}
|
17453
17466
|
K.__b = function(r) {
|
17454
|
-
st = null,
|
17467
|
+
st = null, tn && tn(r);
|
17455
17468
|
}, K.__r = function(r) {
|
17456
|
-
|
17469
|
+
en && en(r);
|
17457
17470
|
var t = (st = r.__c).__H;
|
17458
17471
|
t && (Xe === st ? (t.__h = [], st.__h = [], t.__.forEach(function(e) {
|
17459
17472
|
e.__N && (e.__ = e.__N), e.__V = Ze, e.__N = e.i = void 0;
|
17460
17473
|
})) : (t.__h.forEach(we), t.__h.forEach(da), t.__h = [])), Xe = st;
|
17461
17474
|
}, K.diffed = function(r) {
|
17462
|
-
|
17475
|
+
an && an(r);
|
17463
17476
|
var t = r.__c;
|
17464
|
-
t && t.__H && (t.__H.__h.length && (ir.push(t) !== 1 &&
|
17477
|
+
t && t.__H && (t.__H.__h.length && (ir.push(t) !== 1 && Za === K.requestAnimationFrame || ((Za = K.requestAnimationFrame) || ac)(ec)), t.__H.__.forEach(function(e) {
|
17465
17478
|
e.i && (e.__H = e.i), e.__V !== Ze && (e.__ = e.__V), e.i = void 0, e.__V = Ze;
|
17466
17479
|
})), Xe = st = null;
|
17467
17480
|
}, K.__c = function(r, t) {
|
@@ -17475,9 +17488,9 @@ K.__b = function(r) {
|
|
17475
17488
|
n.__h && (n.__h = []);
|
17476
17489
|
}), t = [], K.__e(a, e.__v);
|
17477
17490
|
}
|
17478
|
-
}),
|
17491
|
+
}), nn && nn(r, t);
|
17479
17492
|
}, K.unmount = function(r) {
|
17480
|
-
|
17493
|
+
rn && rn(r);
|
17481
17494
|
var t, e = r.__c;
|
17482
17495
|
e && e.__H && (e.__H.__.forEach(function(a) {
|
17483
17496
|
try {
|
@@ -17487,12 +17500,12 @@ K.__b = function(r) {
|
|
17487
17500
|
}
|
17488
17501
|
}), e.__H = void 0, t && K.__e(t, e.__v));
|
17489
17502
|
};
|
17490
|
-
var
|
17503
|
+
var sn = typeof requestAnimationFrame == "function";
|
17491
17504
|
function ac(r) {
|
17492
17505
|
var t, e = function() {
|
17493
|
-
clearTimeout(a),
|
17506
|
+
clearTimeout(a), sn && cancelAnimationFrame(t), setTimeout(r);
|
17494
17507
|
}, a = setTimeout(e, 100);
|
17495
|
-
|
17508
|
+
sn && (t = requestAnimationFrame(e));
|
17496
17509
|
}
|
17497
17510
|
function we(r) {
|
17498
17511
|
var t = st, e = r.__c;
|
@@ -17524,7 +17537,7 @@ const sr = w`
|
|
17524
17537
|
}
|
17525
17538
|
missingComponentTypes
|
17526
17539
|
}
|
17527
|
-
`,
|
17540
|
+
`, Da = w`
|
17528
17541
|
${sr}
|
17529
17542
|
fragment AddressValidationJobFields on AddressValidationJob {
|
17530
17543
|
id
|
@@ -17537,14 +17550,14 @@ const sr = w`
|
|
17537
17550
|
}
|
17538
17551
|
}
|
17539
17552
|
`, nc = w`
|
17540
|
-
${
|
17553
|
+
${Da}
|
17541
17554
|
query GetAddressValidationJobs($ids: [String!]!) {
|
17542
17555
|
addressValidationJobs(ids: $ids) {
|
17543
17556
|
...AddressValidationJobFields
|
17544
17557
|
}
|
17545
17558
|
}
|
17546
17559
|
`, rc = w`
|
17547
|
-
${
|
17560
|
+
${Da}
|
17548
17561
|
query GetRecipientsWithAddressValidationJobs($ids: [String!]!) {
|
17549
17562
|
recipients(ids: $ids) {
|
17550
17563
|
id
|
@@ -17561,7 +17574,7 @@ const sr = w`
|
|
17561
17574
|
}
|
17562
17575
|
}
|
17563
17576
|
`, sc = w`
|
17564
|
-
${
|
17577
|
+
${Da}
|
17565
17578
|
mutation BatchValidateRecipientAddress($ids: [String!]!) {
|
17566
17579
|
recipientValidateBatch(ids: $ids) {
|
17567
17580
|
...AddressValidationJobFields
|
@@ -17618,7 +17631,7 @@ export {
|
|
17618
17631
|
oc as AddressValidationResultConfirmationLevel,
|
17619
17632
|
ud as ArrayInput,
|
17620
17633
|
L as AspectType,
|
17621
|
-
|
17634
|
+
Et as AssetNotFoundError,
|
17622
17635
|
ye as AssetType,
|
17623
17636
|
id as BringForwardCommand,
|
17624
17637
|
rd as BringToBackCommand,
|
@@ -17626,7 +17639,7 @@ export {
|
|
17626
17639
|
br as BundleDesignCreationCartAddMode,
|
17627
17640
|
N as CanvasCommand,
|
17628
17641
|
Ae as CollectionProduct,
|
17629
|
-
|
17642
|
+
Ka as ColorOptionGlobalPropertyHandle,
|
17630
17643
|
ds as CommandContext,
|
17631
17644
|
Ce as ConversionDataType,
|
17632
17645
|
tc as ConversionLocation,
|
@@ -17643,16 +17656,16 @@ export {
|
|
17643
17656
|
ms as FontAlignmentCommand,
|
17644
17657
|
us as FontColorCommand,
|
17645
17658
|
hs as FontSizeCommand,
|
17646
|
-
|
17659
|
+
Wa as FontSourceCommand,
|
17647
17660
|
Gl as FrameService,
|
17648
17661
|
Wl as FrameStep,
|
17649
17662
|
ql as FrameStepHandle,
|
17650
|
-
|
17663
|
+
Ba as GlobalPropertyHandle,
|
17651
17664
|
R as GroupCommand,
|
17652
17665
|
So as IllustrationStepHandle,
|
17653
17666
|
$e as InformationMessageType,
|
17654
17667
|
Do as InformationStepHandle,
|
17655
|
-
|
17668
|
+
_a as IntegrationProduct,
|
17656
17669
|
Ir as IntegrationType,
|
17657
17670
|
Xc as LayoutElementFactory,
|
17658
17671
|
x as LayoutElementType,
|
@@ -17675,9 +17688,9 @@ export {
|
|
17675
17688
|
Cl as ProductCollectionProductSortKey,
|
17676
17689
|
qt as ProductWorkflow,
|
17677
17690
|
Kt as PromiseCache,
|
17678
|
-
|
17691
|
+
xn as PromiseQueue,
|
17679
17692
|
Bo as QuestionStepHandle,
|
17680
|
-
|
17693
|
+
Fn as QueueablePromise,
|
17681
17694
|
ed as ResizeCommand,
|
17682
17695
|
Yt as ResourceNotFoundError,
|
17683
17696
|
td as RotateCommand,
|
@@ -17720,7 +17733,7 @@ export {
|
|
17720
17733
|
$ as findElement,
|
17721
17734
|
$c as findPmsColors,
|
17722
17735
|
Vt as frameDataCache,
|
17723
|
-
|
17736
|
+
yt as frameStepService,
|
17724
17737
|
M as generate,
|
17725
17738
|
al as generateCommands,
|
17726
17739
|
ot as generateSVGWithUnknownColors,
|
@@ -17743,7 +17756,7 @@ export {
|
|
17743
17756
|
Gc as getPointOfRotation,
|
17744
17757
|
dd as getProductCollections,
|
17745
17758
|
jc as getSEPoint,
|
17746
|
-
|
17759
|
+
ya as getSvgElement,
|
17747
17760
|
xd as getTemplateBundles,
|
17748
17761
|
Fd as getTemplateTransactions,
|
17749
17762
|
gd as getTransaction,
|
@@ -17776,17 +17789,17 @@ export {
|
|
17776
17789
|
Jn as questionStepService,
|
17777
17790
|
Nc as registerFetchImplementation,
|
17778
17791
|
Tc as registerWindowImplementation,
|
17779
|
-
|
17792
|
+
za as rehydrateSerializedLayout,
|
17780
17793
|
_r as rgbToPms,
|
17781
17794
|
ce as rotateAroundPoint,
|
17782
17795
|
pa as sanitizeSvgTree,
|
17783
17796
|
zr as setBearerAuthenticationToken,
|
17784
|
-
|
17797
|
+
fn as setCanvasModule,
|
17785
17798
|
zt as shapeStepService,
|
17786
17799
|
ws as shortenUrl,
|
17787
17800
|
gt as spiffCoreConfiguration,
|
17788
17801
|
ld as stepAspectValuesToDesignInputSteps,
|
17789
|
-
|
17802
|
+
Oa as svgColorValueToDefinition,
|
17790
17803
|
Ln as svgStringDimensions,
|
17791
17804
|
ha as svgToDataUrl,
|
17792
17805
|
G as textStepService,
|