@spiffcommerce/core 34.0.3 → 34.1.0-beta.57ce2174-0b20-572b-b04b-0ff17612ce88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +205 -187
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createHttpLink as Ei, ApolloClient as bi, InMemoryCache as Ii, from as Bi, gql as C } from "@apollo/client/core";
|
|
2
2
|
import { setContext as Pi } from "@apollo/client/link/context";
|
|
3
3
|
import { onError as xi } from "@apollo/client/link/error";
|
|
4
|
-
import { renderToStaticMarkup as
|
|
5
|
-
import { removeTypenameFromVariables as
|
|
4
|
+
import { renderToStaticMarkup as Di } from "preact-render-to-string";
|
|
5
|
+
import { removeTypenameFromVariables as Fi } from "@apollo/client/link/remove-typename";
|
|
6
6
|
import { orientation as ki } from "exifr/dist/mini.umd.cjs";
|
|
7
7
|
import { parse as yn } from "css";
|
|
8
8
|
import Mi from "fuse.js";
|
|
@@ -24,7 +24,7 @@ import vn from "lodash.debounce";
|
|
|
24
24
|
import "fs";
|
|
25
25
|
import "path";
|
|
26
26
|
import Ui from "lodash.omit";
|
|
27
|
-
var Ee = /* @__PURE__ */ ((n) => (n.Data = "Data", n.Font = "Font", n.Frame = "Frame", n.Illustration = "Illustration", n.Image = "Image", n.Model = "Model", n.Material = "Material", n.Color = "Color", n.QuestionnaireCollateral = "QuestionnaireCollateral", n.RequestCollateral = "RequestCollateral", n.SignupCollateral = "SignupCollateral", n.Video = "Video", n.ColorProfile = "ColorProfile", n.Environment = "Environment", n))(Ee || {}), En = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(En || {}), z = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(z || {}), b = /* @__PURE__ */ ((n) => (n.Information = "Information", n.Bulk = "Bulk", n.DigitalContent = "DigitalContent", n.Finish = "Finish", n.Frame = "Frame", n.Illustration = "Illustration", n.Introduction = "Introduction", n.Material = "Material", n.Model = "Model", n.Module = "Module", n.Picture = "Picture", n.Photo = "Photo", n.ProductOverlay = "ProductOverlay", n.Question = "Question", n.Shape = "Shape", n.SilentIllustration = "SilentIllustration", n.Text = "Text", n))(b || {}), Li = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Li || {}), Yt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Yt || {}),
|
|
27
|
+
var Ee = /* @__PURE__ */ ((n) => (n.Data = "Data", n.Font = "Font", n.Frame = "Frame", n.Illustration = "Illustration", n.Image = "Image", n.Model = "Model", n.Material = "Material", n.Color = "Color", n.QuestionnaireCollateral = "QuestionnaireCollateral", n.RequestCollateral = "RequestCollateral", n.SignupCollateral = "SignupCollateral", n.Video = "Video", n.ColorProfile = "ColorProfile", n.Environment = "Environment", n))(Ee || {}), En = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(En || {}), z = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(z || {}), b = /* @__PURE__ */ ((n) => (n.Information = "Information", n.Bulk = "Bulk", n.DigitalContent = "DigitalContent", n.Finish = "Finish", n.Frame = "Frame", n.Illustration = "Illustration", n.Introduction = "Introduction", n.Material = "Material", n.Model = "Model", n.Module = "Module", n.Picture = "Picture", n.Photo = "Photo", n.ProductOverlay = "ProductOverlay", n.Question = "Question", n.Shape = "Shape", n.SilentIllustration = "SilentIllustration", n.Text = "Text", n))(b || {}), Li = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Li || {}), Yt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Yt || {}), D = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(D || {}), Vi = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Vi || {}), bn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(bn || {}), zi = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(zi || {}), Gi = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(Gi || {}), ba = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(ba || {}), Wi = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Wi || {}), be = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(be || {}), kt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(kt || {}), j = /* @__PURE__ */ ((n) => (n[n.North = 0] = "North", n[n.Northeast = 1] = "Northeast", n[n.East = 2] = "East", n[n.Southeast = 3] = "Southeast", n[n.South = 4] = "South", n[n.Southwest = 5] = "Southwest", n[n.West = 6] = "West", n[n.Northwest = 7] = "Northwest", n))(j || {}), qi = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(qi || {});
|
|
28
28
|
class In extends Error {
|
|
29
29
|
constructor(t) {
|
|
30
30
|
super(t), this.name = this.constructor.name;
|
|
@@ -217,7 +217,7 @@ const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @_
|
|
|
217
217
|
t ? Ji(n).then(e).catch(a) : nt(n).then((i) => {
|
|
218
218
|
i.text().then(e).catch(a);
|
|
219
219
|
}).catch(a);
|
|
220
|
-
}), xn = (n) =>
|
|
220
|
+
}), xn = (n) => Di(n), je = /* @__PURE__ */ new Map(), Xi = async (n, t) => {
|
|
221
221
|
if (Mt([typeof FontFace])) {
|
|
222
222
|
if (je.has(t))
|
|
223
223
|
return je.get(t);
|
|
@@ -269,7 +269,7 @@ const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @_
|
|
|
269
269
|
}, tr = async (n) => {
|
|
270
270
|
const t = Oe(n), e = new Uint8Array(n), a = Zi(e), i = btoa(a);
|
|
271
271
|
return `data:${t};base64,${i}`;
|
|
272
|
-
}, Ia = (n) => `data:image/svg+xml;base64,${btoa(n)}`,
|
|
272
|
+
}, Ia = (n) => `data:image/svg+xml;base64,${btoa(n)}`, Dn = (n) => {
|
|
273
273
|
const t = n.replace(/\r?\n/g, ""), e = t.indexOf(",");
|
|
274
274
|
if (e === -1 || e <= 4)
|
|
275
275
|
throw new TypeError("malformed data: URI");
|
|
@@ -292,9 +292,9 @@ let ar, Ba;
|
|
|
292
292
|
const nr = (n) => {
|
|
293
293
|
Ba = n;
|
|
294
294
|
}, ir = () => Ba;
|
|
295
|
-
let
|
|
295
|
+
let Fn;
|
|
296
296
|
const rr = (n) => {
|
|
297
|
-
|
|
297
|
+
Fn = n;
|
|
298
298
|
}, or = () => new Promise((n) => {
|
|
299
299
|
const t = pt.getHubUrl(), e = (a) => {
|
|
300
300
|
a.origin === t && (window.removeEventListener("message", e), n(a.data));
|
|
@@ -304,7 +304,7 @@ const rr = (n) => {
|
|
|
304
304
|
const n = {
|
|
305
305
|
applicationKey: Ba,
|
|
306
306
|
customerToken: ar,
|
|
307
|
-
bearer:
|
|
307
|
+
bearer: Fn
|
|
308
308
|
};
|
|
309
309
|
return typeof window < "u" && (window.location.href.includes("/workflows/product/") || window.location.href.includes("hub=true")) ? { ...await or(), ...n } : n;
|
|
310
310
|
};
|
|
@@ -356,7 +356,7 @@ class cr {
|
|
|
356
356
|
}), a = xi(({ operation: r, graphQLErrors: o, networkError: s }) => {
|
|
357
357
|
const l = o || [], c = r.getContext();
|
|
358
358
|
s && !c?.fetchOptions?.signal?.aborted && console.log("GraphQL Network error"), l.forEach(() => console.log("GraphQL Error: " + r.operationName));
|
|
359
|
-
}), i =
|
|
359
|
+
}), i = Fi();
|
|
360
360
|
return new bi({
|
|
361
361
|
link: Bi([i, a, e, t]),
|
|
362
362
|
cache: new Ii(),
|
|
@@ -1808,7 +1808,7 @@ const dr = (n) => new Promise((t) => {
|
|
|
1808
1808
|
"Black 5 C",
|
|
1809
1809
|
"Black 6 C",
|
|
1810
1810
|
"Black 7 C"
|
|
1811
|
-
],
|
|
1811
|
+
], Dt = [
|
|
1812
1812
|
"FEDD00",
|
|
1813
1813
|
"FFD700",
|
|
1814
1814
|
"FE5000",
|
|
@@ -3150,17 +3150,17 @@ const dr = (n) => new Promise((t) => {
|
|
|
3150
3150
|
"3E2B2E",
|
|
3151
3151
|
"101820",
|
|
3152
3152
|
"3D3935"
|
|
3153
|
-
], Je =
|
|
3153
|
+
], Je = Dt.map((n) => [
|
|
3154
3154
|
parseInt(n.substring(0, 2), 16),
|
|
3155
3155
|
parseInt(n.substring(2, 4), 16),
|
|
3156
3156
|
parseInt(n.substring(4, 6), 16)
|
|
3157
3157
|
]);
|
|
3158
3158
|
function od(n) {
|
|
3159
3159
|
const t = Kt.indexOf(n);
|
|
3160
|
-
return t >= 0 ?
|
|
3160
|
+
return t >= 0 ? Dt[t] : "";
|
|
3161
3161
|
}
|
|
3162
3162
|
function gr(n) {
|
|
3163
|
-
const t =
|
|
3163
|
+
const t = Dt.indexOf(n);
|
|
3164
3164
|
return t >= 0 ? Kt[t] : "";
|
|
3165
3165
|
}
|
|
3166
3166
|
function sd(n, t = 64) {
|
|
@@ -3172,16 +3172,16 @@ function sd(n, t = 64) {
|
|
|
3172
3172
|
});
|
|
3173
3173
|
const r = parseInt(n.substring(0, 2), 16), o = parseInt(n.substring(2, 4), 16), s = parseInt(n.substring(4, 6), 16);
|
|
3174
3174
|
let l, c, d;
|
|
3175
|
-
for (let A = 0; A <
|
|
3175
|
+
for (let A = 0; A < Dt.length; A++) {
|
|
3176
3176
|
l = Je[A][0], c = Je[A][1], d = Je[A][2];
|
|
3177
3177
|
const u = Math.sqrt(Math.pow(r - l, 2) + Math.pow(o - c, 2) + Math.pow(s - d, 2));
|
|
3178
3178
|
a.push(u);
|
|
3179
3179
|
}
|
|
3180
3180
|
for (let A = 0; A < a.length; A++)
|
|
3181
|
-
a[A] <= t && !e.some((u) => u.pms === Kt[A]) && e.push({ pms: Kt[A], hex:
|
|
3181
|
+
a[A] <= t && !e.some((u) => u.pms === Kt[A]) && e.push({ pms: Kt[A], hex: Dt[A], distance: a[A] });
|
|
3182
3182
|
return e.sort((A, u) => A.distance - u.distance);
|
|
3183
3183
|
}
|
|
3184
|
-
const mr = Kt.map((n, t) => ({ pms: n, hex:
|
|
3184
|
+
const mr = Kt.map((n, t) => ({ pms: n, hex: Dt[t] })), pr = new Mi(mr, { keys: ["pms"] });
|
|
3185
3185
|
function ld(n, t) {
|
|
3186
3186
|
return pr.search(n, t ? { limit: t } : void 0);
|
|
3187
3187
|
}
|
|
@@ -3238,8 +3238,8 @@ const de = (n) => {
|
|
|
3238
3238
|
"textPath",
|
|
3239
3239
|
"tref",
|
|
3240
3240
|
"tspan"
|
|
3241
|
-
], wr = ["fill", "stroke"],
|
|
3242
|
-
t(n), n.children.length > 0 && Array.from(n.children).forEach((e) =>
|
|
3241
|
+
], wr = ["fill", "stroke"], Ft = (n, t) => {
|
|
3242
|
+
t(n), n.children.length > 0 && Array.from(n.children).forEach((e) => Ft(e, t));
|
|
3243
3243
|
}, Nn = (n, t) => {
|
|
3244
3244
|
const e = t(n);
|
|
3245
3245
|
if (e)
|
|
@@ -3256,7 +3256,7 @@ const de = (n) => {
|
|
|
3256
3256
|
}, xa = (n, t = !1) => {
|
|
3257
3257
|
!t && n.setAttribute("preserveAspectRatio", "none");
|
|
3258
3258
|
const e = [];
|
|
3259
|
-
|
|
3259
|
+
Ft(n, (a) => {
|
|
3260
3260
|
if (a.tagName === "script") {
|
|
3261
3261
|
a.remove();
|
|
3262
3262
|
return;
|
|
@@ -3282,7 +3282,7 @@ const de = (n) => {
|
|
|
3282
3282
|
}
|
|
3283
3283
|
}), r.length > 0 ? a.setAttribute("style", r.join(";")) : a.removeAttribute("style");
|
|
3284
3284
|
}
|
|
3285
|
-
}),
|
|
3285
|
+
}), Ft(n, (a) => {
|
|
3286
3286
|
e.forEach((i) => {
|
|
3287
3287
|
i.selectors?.forEach((r) => {
|
|
3288
3288
|
yr(a, r) && i.declarations?.forEach((o) => {
|
|
@@ -3298,7 +3298,7 @@ const de = (n) => {
|
|
|
3298
3298
|
}, Qn = (n) => dt().parseFromString(n, "image/svg+xml").firstElementChild, vr = (n, t, e) => {
|
|
3299
3299
|
n.setAttribute("height", `${e}px`), n.setAttribute("width", `${t}px`);
|
|
3300
3300
|
}, Rn = (n, t, e) => {
|
|
3301
|
-
|
|
3301
|
+
Ft(n, (a) => {
|
|
3302
3302
|
const i = a.attributes.getNamedItem("fill");
|
|
3303
3303
|
i && i.value !== "none" && a.classList.forEach((o) => {
|
|
3304
3304
|
if (o.startsWith("spiff-fill")) {
|
|
@@ -3336,12 +3336,12 @@ const de = (n) => {
|
|
|
3336
3336
|
}
|
|
3337
3337
|
});
|
|
3338
3338
|
});
|
|
3339
|
-
}, On = (n) => It().serializeToString(n),
|
|
3339
|
+
}, On = (n) => It().serializeToString(n), Da = (n, t, e, a, i) => {
|
|
3340
3340
|
const r = Qn(n);
|
|
3341
3341
|
if (!r)
|
|
3342
3342
|
throw new Error("Failed to read SVG.");
|
|
3343
3343
|
return vr(r, t, e), Rn(r, a, i), On(r);
|
|
3344
|
-
},
|
|
3344
|
+
}, Fa = (n, t, e) => {
|
|
3345
3345
|
const a = Qn(n);
|
|
3346
3346
|
if (!a)
|
|
3347
3347
|
throw new Error("Failed to read SVG.");
|
|
@@ -3355,7 +3355,7 @@ const de = (n) => {
|
|
|
3355
3355
|
throw new Error("Failed to read SVG.");
|
|
3356
3356
|
xa(e);
|
|
3357
3357
|
const a = {};
|
|
3358
|
-
|
|
3358
|
+
Ft(e, (o) => {
|
|
3359
3359
|
if (Cr.includes(o.tagName) && !o.attributes.getNamedItem("fill")) {
|
|
3360
3360
|
let c = "black";
|
|
3361
3361
|
const d = o.parentElement;
|
|
@@ -3527,13 +3527,13 @@ const de = (n) => {
|
|
|
3527
3527
|
variables: {
|
|
3528
3528
|
keys: n
|
|
3529
3529
|
}
|
|
3530
|
-
})).data.assets,
|
|
3530
|
+
})).data.assets, Dr = async (n) => (await y.getShadowGraphqlClient().query({
|
|
3531
3531
|
query: Br,
|
|
3532
3532
|
errorPolicy: "all",
|
|
3533
3533
|
variables: {
|
|
3534
3534
|
ids: n
|
|
3535
3535
|
}
|
|
3536
|
-
})).data.materials,
|
|
3536
|
+
})).data.materials, Fr = async (n, t, e, a, i) => (await y.getShadowGraphqlClient().mutate({
|
|
3537
3537
|
mutation: Pr,
|
|
3538
3538
|
errorPolicy: "all",
|
|
3539
3539
|
fetchPolicy: "no-cache",
|
|
@@ -3609,7 +3609,7 @@ class kr {
|
|
|
3609
3609
|
async getMaterialLocalOrFromServer(t) {
|
|
3610
3610
|
if (this.materialCache.has(t))
|
|
3611
3611
|
return this.materialCache.get(t);
|
|
3612
|
-
const a = (async () => (await
|
|
3612
|
+
const a = (async () => (await Dr([t]))[0])();
|
|
3613
3613
|
return this.materialCache.set(t, a), a;
|
|
3614
3614
|
}
|
|
3615
3615
|
/**
|
|
@@ -3698,7 +3698,7 @@ class kr {
|
|
|
3698
3698
|
* @param assetType The type of asset we're expecting to upload
|
|
3699
3699
|
*/
|
|
3700
3700
|
async dispatchCreateAssetRequest(t, e, a, i) {
|
|
3701
|
-
const r = t.blob.type ? t.blob.type : this.guessMIME(t.name), o = await
|
|
3701
|
+
const r = t.blob.type ? t.blob.type : this.guessMIME(t.name), o = await Fr(t.name, e, r, a, i);
|
|
3702
3702
|
if (o)
|
|
3703
3703
|
return {
|
|
3704
3704
|
assetResponse: o,
|
|
@@ -3964,6 +3964,7 @@ const Y = new Or(), Un = C`
|
|
|
3964
3964
|
name
|
|
3965
3965
|
activeAddons
|
|
3966
3966
|
currencyCode
|
|
3967
|
+
beta
|
|
3967
3968
|
}
|
|
3968
3969
|
}
|
|
3969
3970
|
`, Ue = C`
|
|
@@ -5528,7 +5529,7 @@ const M = () => {
|
|
|
5528
5529
|
if (!n.pattern)
|
|
5529
5530
|
return "";
|
|
5530
5531
|
if (n.pattern.svg) {
|
|
5531
|
-
const A =
|
|
5532
|
+
const A = Fa(n.pattern.svg, n.pattern.colors || {}, !1);
|
|
5532
5533
|
return Ia(A);
|
|
5533
5534
|
}
|
|
5534
5535
|
return n.pattern.src;
|
|
@@ -5558,7 +5559,7 @@ const M = () => {
|
|
|
5558
5559
|
const A = n.pattern?.x || 0, u = n.pattern?.y || 0, h = n.pattern?.width || 0, g = n.pattern?.height || 0, m = n.pattern?.scaleX || 1, p = n.pattern?.scaleY || 1, f = n.pattern?.rotation || 0;
|
|
5559
5560
|
return [n.pattern?.svg ? {
|
|
5560
5561
|
id: `${t}-contents`,
|
|
5561
|
-
type:
|
|
5562
|
+
type: D.Illustration,
|
|
5562
5563
|
x: A,
|
|
5563
5564
|
y: u,
|
|
5564
5565
|
rotation: f,
|
|
@@ -5569,7 +5570,7 @@ const M = () => {
|
|
|
5569
5570
|
colors: n.pattern?.colors
|
|
5570
5571
|
} : {
|
|
5571
5572
|
id: `${t}-contents`,
|
|
5572
|
-
type:
|
|
5573
|
+
type: D.Image,
|
|
5573
5574
|
x: A,
|
|
5574
5575
|
y: u,
|
|
5575
5576
|
rotation: f,
|
|
@@ -5672,7 +5673,7 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
|
|
|
5672
5673
|
return wt(n).getFont();
|
|
5673
5674
|
} catch {
|
|
5674
5675
|
if (wo(n)) {
|
|
5675
|
-
const a =
|
|
5676
|
+
const a = Dn(n), i = la(a);
|
|
5676
5677
|
return ma(n, i), i;
|
|
5677
5678
|
} else {
|
|
5678
5679
|
const a = await Re(n, !0), i = la(a);
|
|
@@ -5682,7 +5683,7 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
|
|
|
5682
5683
|
})();
|
|
5683
5684
|
return Ke.set(n, e), e;
|
|
5684
5685
|
}, yo = (n) => {
|
|
5685
|
-
const t =
|
|
5686
|
+
const t = Dn(n), e = la(t);
|
|
5686
5687
|
return ma(n, e), e;
|
|
5687
5688
|
}, wt = (n) => {
|
|
5688
5689
|
const t = Yn.get(n);
|
|
@@ -5834,7 +5835,7 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
|
|
|
5834
5835
|
stripControlCharacters: !0,
|
|
5835
5836
|
vertical: !1,
|
|
5836
5837
|
uppercase: !1
|
|
5837
|
-
},
|
|
5838
|
+
}, De = (n, t = _a) => {
|
|
5838
5839
|
const e = { ..._a, ...t };
|
|
5839
5840
|
let a = n || "";
|
|
5840
5841
|
return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
|
|
@@ -5929,7 +5930,7 @@ const Po = (n) => {
|
|
|
5929
5930
|
},
|
|
5930
5931
|
stroke: A,
|
|
5931
5932
|
strokeWidth: u,
|
|
5932
|
-
children: n.curved ? /* @__PURE__ */ P(
|
|
5933
|
+
children: n.curved ? /* @__PURE__ */ P(Do, { text: c, curvedPathId: r, align: n.align }) : d.map((g, m) => /* @__PURE__ */ P(
|
|
5933
5934
|
xo,
|
|
5934
5935
|
{
|
|
5935
5936
|
align: n.vertical ? "center" : n.align,
|
|
@@ -5967,7 +5968,7 @@ const Po = (n) => {
|
|
|
5967
5968
|
return (n.thisLineIdx - o) * i + n.fontSize / 4;
|
|
5968
5969
|
};
|
|
5969
5970
|
return /* @__PURE__ */ P("tspan", { textAnchor: Kn(n.align), x: e(), y: `${a()}px`, children: n.text });
|
|
5970
|
-
},
|
|
5971
|
+
}, Do = (n) => {
|
|
5971
5972
|
const t = `#${n.curvedPathId}`;
|
|
5972
5973
|
return /* @__PURE__ */ P(
|
|
5973
5974
|
"textPath",
|
|
@@ -5979,7 +5980,7 @@ const Po = (n) => {
|
|
|
5979
5980
|
children: n.text
|
|
5980
5981
|
}
|
|
5981
5982
|
);
|
|
5982
|
-
},
|
|
5983
|
+
}, Fo = (n) => {
|
|
5983
5984
|
if (n.cachedObjectURL && !n._renderingConfiguration?.omitCachedFields)
|
|
5984
5985
|
return /* @__PURE__ */ P(
|
|
5985
5986
|
Hn,
|
|
@@ -6011,7 +6012,7 @@ const Po = (n) => {
|
|
|
6011
6012
|
{
|
|
6012
6013
|
transform: r,
|
|
6013
6014
|
dangerouslySetInnerHTML: {
|
|
6014
|
-
__html:
|
|
6015
|
+
__html: Da(
|
|
6015
6016
|
n.svg,
|
|
6016
6017
|
n.width,
|
|
6017
6018
|
n.height,
|
|
@@ -6112,7 +6113,7 @@ class ko {
|
|
|
6112
6113
|
return { ...t, transaction: e.apply(a) };
|
|
6113
6114
|
}
|
|
6114
6115
|
}
|
|
6115
|
-
const Zn = (n) => n.type ===
|
|
6116
|
+
const Zn = (n) => n.type === D.Image ? /* @__PURE__ */ P(Hn, { ...n }, n.id) : n.type === D.Frame ? /* @__PURE__ */ P(fo, { ...n }, n.id) : n.type === D.Illustration ? /* @__PURE__ */ P(Fo, { ...n }, n.id) : n.type === D.Textbox ? /* @__PURE__ */ P(Po, { ...n }, n.id) : n.type === D.Group ? /* @__PURE__ */ P(jn, { ...n }, n.id) : null, Ma = (n, t, e) => {
|
|
6116
6117
|
const a = e.renderingConfiguration, i = a?.removeExcludedElements ? t.filter((r) => !r.excludeFromExport) : t;
|
|
6117
6118
|
return /* @__PURE__ */ P(
|
|
6118
6119
|
po,
|
|
@@ -6328,17 +6329,17 @@ const re = (n) => {
|
|
|
6328
6329
|
rotation: 0,
|
|
6329
6330
|
panelId: n.layoutState.layout.panelId
|
|
6330
6331
|
};
|
|
6331
|
-
if (e && t ===
|
|
6332
|
+
if (e && t === D.Illustration) {
|
|
6332
6333
|
const l = await st(await ai(e)), u = dt().parseFromString(l.svg, "image/svg+xml").firstElementChild.getAttribute("viewBox");
|
|
6333
6334
|
if (!u) throw new Error("SVG missing viewBox.");
|
|
6334
6335
|
const h = s.height, g = u.split(" "), m = parseFloat(g[2]) || 1, p = parseFloat(g[3]) || 1, f = m / p;
|
|
6335
6336
|
s.height = s.width / f, s.top += (h - s.height) / 2;
|
|
6336
6337
|
}
|
|
6337
|
-
if (e && t ===
|
|
6338
|
+
if (e && t === D.Image) {
|
|
6338
6339
|
const l = s.height, c = await Re(e), d = await $e(c), A = d.width / d.height;
|
|
6339
6340
|
s.height = s.width / A, s.top += (l - s.height) / 2;
|
|
6340
6341
|
}
|
|
6341
|
-
if (e && t ===
|
|
6342
|
+
if (e && t === D.Textbox && a?.text && a?.fontScale) {
|
|
6342
6343
|
await Tt(e);
|
|
6343
6344
|
const l = wt(e), c = mt(a.text, a?.fontScale, l);
|
|
6344
6345
|
s.width = Math.min(c, i.width * 0.85), s.left = i.x + i.width / 2 - s.width / 2;
|
|
@@ -6347,7 +6348,7 @@ const re = (n) => {
|
|
|
6347
6348
|
};
|
|
6348
6349
|
class vd {
|
|
6349
6350
|
static async getFrame(t, e) {
|
|
6350
|
-
const a = await ti(e.region, e.src), i = await Ve(a), r = e.region || await Ut(t,
|
|
6351
|
+
const a = await ti(e.region, e.src), i = await Ve(a), r = e.region || await Ut(t, D.Frame);
|
|
6351
6352
|
return {
|
|
6352
6353
|
id: M(),
|
|
6353
6354
|
x: r.left,
|
|
@@ -6362,7 +6363,7 @@ class vd {
|
|
|
6362
6363
|
path: i.path,
|
|
6363
6364
|
dataWidth: i.width,
|
|
6364
6365
|
dataHeight: i.height,
|
|
6365
|
-
type:
|
|
6366
|
+
type: D.Frame,
|
|
6366
6367
|
disablePlaceholder: e.configuration.disablePlaceholder,
|
|
6367
6368
|
focalBlur: e.configuration.focalBlur,
|
|
6368
6369
|
focalBlurStrength: e.configuration.focalBlurStrength,
|
|
@@ -6373,11 +6374,11 @@ class vd {
|
|
|
6373
6374
|
};
|
|
6374
6375
|
}
|
|
6375
6376
|
static async getImage(t, e) {
|
|
6376
|
-
const a = e.region || await Ut(t,
|
|
6377
|
+
const a = e.region || await Ut(t, D.Image, e.src);
|
|
6377
6378
|
return {
|
|
6378
6379
|
id: M(),
|
|
6379
6380
|
src: e.src,
|
|
6380
|
-
type:
|
|
6381
|
+
type: D.Image,
|
|
6381
6382
|
y: a.top,
|
|
6382
6383
|
x: a.left,
|
|
6383
6384
|
rotation: a.rotation,
|
|
@@ -6393,16 +6394,16 @@ class vd {
|
|
|
6393
6394
|
const { configuration: a, fontSrc: i, designInputStep: r } = e, o = await Tt(i), s = {
|
|
6394
6395
|
assetUrl: i,
|
|
6395
6396
|
name: o.names.fullName.en
|
|
6396
|
-
}, l = r?.text || a.defaultText || "", c = a.replaceableText ? a.replaceableText.replace("{{}}", l) : l, d =
|
|
6397
|
+
}, l = r?.text || a.defaultText || "", c = a.replaceableText ? a.replaceableText.replace("{{}}", l) : l, d = De(c, {
|
|
6397
6398
|
vertical: a.vertical,
|
|
6398
6399
|
uppercase: a.uppercase
|
|
6399
|
-
}), A = e.region || await Ut(t,
|
|
6400
|
+
}), A = e.region || await Ut(t, D.Textbox, i, {
|
|
6400
6401
|
text: d,
|
|
6401
6402
|
fontScale: a.size ? a.size / o.unitsPerEm : void 0
|
|
6402
6403
|
}), u = ie(
|
|
6403
6404
|
{
|
|
6404
6405
|
id: M(),
|
|
6405
|
-
type:
|
|
6406
|
+
type: D.Textbox,
|
|
6406
6407
|
x: A.left,
|
|
6407
6408
|
y: A.top,
|
|
6408
6409
|
width: A.width,
|
|
@@ -6462,14 +6463,14 @@ class vd {
|
|
|
6462
6463
|
</svg>
|
|
6463
6464
|
`, i = {};
|
|
6464
6465
|
i["spiff-fill-shape"] = { browserValue: e.color };
|
|
6465
|
-
const r = e.region?.item || await Ut(t,
|
|
6466
|
+
const r = e.region?.item || await Ut(t, D.Illustration), o = M();
|
|
6466
6467
|
return {
|
|
6467
6468
|
stepRegion: e.region?.item,
|
|
6468
6469
|
stepRegionIndex: e.region?.index,
|
|
6469
6470
|
colors: i,
|
|
6470
6471
|
id: o,
|
|
6471
6472
|
svg: a,
|
|
6472
|
-
type:
|
|
6473
|
+
type: D.Illustration,
|
|
6473
6474
|
y: r.top,
|
|
6474
6475
|
x: r.left,
|
|
6475
6476
|
rotation: r.rotation,
|
|
@@ -6481,7 +6482,7 @@ class vd {
|
|
|
6481
6482
|
};
|
|
6482
6483
|
}
|
|
6483
6484
|
static async getIllustration(t, e) {
|
|
6484
|
-
const a = e.region?.item || await Ut(t,
|
|
6485
|
+
const a = e.region?.item || await Ut(t, D.Illustration, e.src), i = await st(await ai(e.src)), r = await Xt(i.svg), o = M();
|
|
6485
6486
|
return {
|
|
6486
6487
|
cachedObjectURL: r,
|
|
6487
6488
|
stepRegion: e.region?.item,
|
|
@@ -6490,7 +6491,7 @@ class vd {
|
|
|
6490
6491
|
id: o,
|
|
6491
6492
|
src: e.src,
|
|
6492
6493
|
svg: i.svg,
|
|
6493
|
-
type:
|
|
6494
|
+
type: D.Illustration,
|
|
6494
6495
|
y: a.top,
|
|
6495
6496
|
x: a.left,
|
|
6496
6497
|
rotation: a.rotation,
|
|
@@ -6529,7 +6530,7 @@ const V = (n, t) => X(n, t).elements.find((i) => i.id === n), X = (n, t) => {
|
|
|
6529
6530
|
const s = o;
|
|
6530
6531
|
if (s.src && !s.svg) {
|
|
6531
6532
|
const l = await at(s.src), c = await st(l);
|
|
6532
|
-
s.svg =
|
|
6533
|
+
s.svg = Da(
|
|
6533
6534
|
c.svg,
|
|
6534
6535
|
s.width,
|
|
6535
6536
|
s.height,
|
|
@@ -6549,7 +6550,7 @@ const V = (n, t) => X(n, t).elements.find((i) => i.id === n), X = (n, t) => {
|
|
|
6549
6550
|
}
|
|
6550
6551
|
for (const a in n.layouts) {
|
|
6551
6552
|
const i = n.layouts[a].elements.filter(
|
|
6552
|
-
(o) => o.type ===
|
|
6553
|
+
(o) => o.type === D.Illustration
|
|
6553
6554
|
);
|
|
6554
6555
|
for (let o = 0; o < i.length; ++o) {
|
|
6555
6556
|
const s = i[o];
|
|
@@ -6561,7 +6562,7 @@ const V = (n, t) => X(n, t).elements.find((i) => i.id === n), X = (n, t) => {
|
|
|
6561
6562
|
}
|
|
6562
6563
|
}
|
|
6563
6564
|
const r = n.layouts[a].elements.filter(
|
|
6564
|
-
(o) => o.type ===
|
|
6565
|
+
(o) => o.type === D.Textbox
|
|
6565
6566
|
);
|
|
6566
6567
|
for (let o = 0; o < r.length; ++o) {
|
|
6567
6568
|
const s = r[o];
|
|
@@ -7125,7 +7126,7 @@ class xd extends O {
|
|
|
7125
7126
|
};
|
|
7126
7127
|
}
|
|
7127
7128
|
}
|
|
7128
|
-
class
|
|
7129
|
+
class Dd extends O {
|
|
7129
7130
|
/**
|
|
7130
7131
|
* @param id The targeted element to bring to the front.
|
|
7131
7132
|
*/
|
|
@@ -7152,7 +7153,7 @@ class Fd extends O {
|
|
|
7152
7153
|
};
|
|
7153
7154
|
}
|
|
7154
7155
|
}
|
|
7155
|
-
class
|
|
7156
|
+
class Fd extends O {
|
|
7156
7157
|
/**
|
|
7157
7158
|
* @param id The targeted element to bring to the front.
|
|
7158
7159
|
*/
|
|
@@ -7192,7 +7193,7 @@ class an {
|
|
|
7192
7193
|
throw new Be(this.configuration, "Couldn't find an asset for product overlay step");
|
|
7193
7194
|
}
|
|
7194
7195
|
const s = this.evaluateAssetType();
|
|
7195
|
-
if (s ===
|
|
7196
|
+
if (s === D.Image) {
|
|
7196
7197
|
const l = this.configuration.type === b.SilentIllustration ? this.configuration.data.asset?.fileLink : this.product?.overlayImageUrl;
|
|
7197
7198
|
if (!l)
|
|
7198
7199
|
throw new Error("Undefined raster silent step source");
|
|
@@ -7274,7 +7275,7 @@ class an {
|
|
|
7274
7275
|
}
|
|
7275
7276
|
evaluateAssetType() {
|
|
7276
7277
|
const t = this.configuration.type === b.ProductOverlay && this.product?.overlayImageUrl ? this.product.overlayImageUrl.toLowerCase() : this.configuration.data.asset?.fileLink?.toLowerCase().split("?")[0];
|
|
7277
|
-
return t?.startsWith("data:image/png") || t?.endsWith(".jpeg") || t?.endsWith(".jpg") || t?.endsWith(".png") ?
|
|
7278
|
+
return t?.startsWith("data:image/png") || t?.endsWith(".jpeg") || t?.endsWith(".jpg") || t?.endsWith(".png") ? D.Image : (t?.endsWith(".svg") || t?.startsWith("image/svg+xml"), D.Illustration);
|
|
7278
7279
|
}
|
|
7279
7280
|
}
|
|
7280
7281
|
const Lo = async (n) => {
|
|
@@ -7395,7 +7396,7 @@ class Vo {
|
|
|
7395
7396
|
stepName: i,
|
|
7396
7397
|
id: c.id,
|
|
7397
7398
|
src: s,
|
|
7398
|
-
type:
|
|
7399
|
+
type: D.Image,
|
|
7399
7400
|
y: d.top,
|
|
7400
7401
|
x: d.left,
|
|
7401
7402
|
width: d.width,
|
|
@@ -7410,7 +7411,7 @@ class Vo {
|
|
|
7410
7411
|
}
|
|
7411
7412
|
}
|
|
7412
7413
|
const ri = new Vo();
|
|
7413
|
-
class
|
|
7414
|
+
class Fe {
|
|
7414
7415
|
constructor() {
|
|
7415
7416
|
this.frameSourceSvg = async (t, e) => {
|
|
7416
7417
|
if (!t)
|
|
@@ -7521,7 +7522,7 @@ class De {
|
|
|
7521
7522
|
})) ?? [];
|
|
7522
7523
|
}
|
|
7523
7524
|
selectImage(t, e, a, i = !0) {
|
|
7524
|
-
const r =
|
|
7525
|
+
const r = Fe.patternSource(e), o = a.getStepStorage(t.stepName)?.framePatternSrc;
|
|
7525
7526
|
if (o && o === r)
|
|
7526
7527
|
return Promise.resolve();
|
|
7527
7528
|
a.setEditedStatus(t.stepName, !0);
|
|
@@ -7561,7 +7562,7 @@ class De {
|
|
|
7561
7562
|
return new W(
|
|
7562
7563
|
{
|
|
7563
7564
|
id: t,
|
|
7564
|
-
type:
|
|
7565
|
+
type: D.Frame,
|
|
7565
7566
|
x: e.left,
|
|
7566
7567
|
y: e.top,
|
|
7567
7568
|
width: e.width,
|
|
@@ -7754,7 +7755,7 @@ class De {
|
|
|
7754
7755
|
throw new Jt(t);
|
|
7755
7756
|
}
|
|
7756
7757
|
async loadPatternFromAsset(t, e, a, i) {
|
|
7757
|
-
const r =
|
|
7758
|
+
const r = Fe.patternSource(t), o = a.markUpdatePending(), s = a.getWorkflowExperience().getStepById(e.stepName)?.frameService;
|
|
7758
7759
|
if (!s)
|
|
7759
7760
|
throw a.markUpdateCompleted(o), new Error("Frame service unavailable, cannot load pattern!");
|
|
7760
7761
|
try {
|
|
@@ -7781,7 +7782,7 @@ class De {
|
|
|
7781
7782
|
), this.validateColorCount(e, a);
|
|
7782
7783
|
}
|
|
7783
7784
|
}
|
|
7784
|
-
const St = new
|
|
7785
|
+
const St = new Fe();
|
|
7785
7786
|
class zo {
|
|
7786
7787
|
async getIllustrationBody(t) {
|
|
7787
7788
|
return new Promise((e) => {
|
|
@@ -7801,7 +7802,7 @@ class zo {
|
|
|
7801
7802
|
src: r.src,
|
|
7802
7803
|
svg: r.svg.svg,
|
|
7803
7804
|
cachedObjectURL: r.objectURL,
|
|
7804
|
-
type:
|
|
7805
|
+
type: D.Illustration,
|
|
7805
7806
|
y: e.top,
|
|
7806
7807
|
x: e.left,
|
|
7807
7808
|
rotation: e.rotation,
|
|
@@ -7891,7 +7892,7 @@ class zo {
|
|
|
7891
7892
|
spotColor: A.spotColor,
|
|
7892
7893
|
pmsValue: A.pmsValue
|
|
7893
7894
|
};
|
|
7894
|
-
const s =
|
|
7895
|
+
const s = Da(t, e, a, o), l = await Xt(s), c = [];
|
|
7895
7896
|
for (const d of i) {
|
|
7896
7897
|
for (const [A, u] of r.entries())
|
|
7897
7898
|
c.push(new Ca(d, A, u));
|
|
@@ -8235,7 +8236,7 @@ class qo {
|
|
|
8235
8236
|
colors: {},
|
|
8236
8237
|
id: g,
|
|
8237
8238
|
svg: d,
|
|
8238
|
-
type:
|
|
8239
|
+
type: D.Illustration,
|
|
8239
8240
|
y: A.top,
|
|
8240
8241
|
x: A.left,
|
|
8241
8242
|
rotation: A.rotation,
|
|
@@ -8371,7 +8372,7 @@ class Ho {
|
|
|
8371
8372
|
stepRegionIndex: u,
|
|
8372
8373
|
id: m,
|
|
8373
8374
|
src: o,
|
|
8374
|
-
type:
|
|
8375
|
+
type: D.Image,
|
|
8375
8376
|
y: A.top,
|
|
8376
8377
|
x: A.left,
|
|
8377
8378
|
rotation: A.rotation,
|
|
@@ -8595,7 +8596,7 @@ class Yo {
|
|
|
8595
8596
|
colors: f,
|
|
8596
8597
|
id: S,
|
|
8597
8598
|
svg: p,
|
|
8598
|
-
type:
|
|
8599
|
+
type: D.Illustration,
|
|
8599
8600
|
y: u.top,
|
|
8600
8601
|
x: u.left,
|
|
8601
8602
|
rotation: u.rotation,
|
|
@@ -8918,7 +8919,7 @@ class Xo {
|
|
|
8918
8919
|
}
|
|
8919
8920
|
getProcessedInput(t, e, a) {
|
|
8920
8921
|
const i = a ? t : this.injectReplaceableText(t, e);
|
|
8921
|
-
return
|
|
8922
|
+
return De(i, {
|
|
8922
8923
|
vertical: e.vertical,
|
|
8923
8924
|
uppercase: e.uppercase
|
|
8924
8925
|
});
|
|
@@ -9195,8 +9196,8 @@ class Xo {
|
|
|
9195
9196
|
const f = a.colorOption;
|
|
9196
9197
|
let S;
|
|
9197
9198
|
if (f && f.variants) {
|
|
9198
|
-
const
|
|
9199
|
-
S = this.createTextFillSpotColor(f,
|
|
9199
|
+
const F = f.variants.find((q) => q.id === f.defaultVariant?.id) || f.variants[0];
|
|
9200
|
+
S = this.createTextFillSpotColor(f, F), o.updateStorage(t, {
|
|
9200
9201
|
colorProfileAssetKey: f.colorProfile?.key
|
|
9201
9202
|
});
|
|
9202
9203
|
}
|
|
@@ -9214,7 +9215,7 @@ class Xo {
|
|
|
9214
9215
|
rotation: u.rotation,
|
|
9215
9216
|
text: c,
|
|
9216
9217
|
input: s,
|
|
9217
|
-
type:
|
|
9218
|
+
type: D.Textbox,
|
|
9218
9219
|
vertical: a.vertical,
|
|
9219
9220
|
x: u.left,
|
|
9220
9221
|
y: u.top,
|
|
@@ -9551,7 +9552,7 @@ const ls = [
|
|
|
9551
9552
|
{
|
|
9552
9553
|
id: m,
|
|
9553
9554
|
src: d,
|
|
9554
|
-
type:
|
|
9555
|
+
type: D.Image,
|
|
9555
9556
|
y: h.top,
|
|
9556
9557
|
x: h.left,
|
|
9557
9558
|
width: h.width,
|
|
@@ -9590,7 +9591,7 @@ const ls = [
|
|
|
9590
9591
|
{
|
|
9591
9592
|
id: u,
|
|
9592
9593
|
path: A.path,
|
|
9593
|
-
type:
|
|
9594
|
+
type: D.Frame,
|
|
9594
9595
|
forceImageCover: a.data.forceImageCover,
|
|
9595
9596
|
x: c.left,
|
|
9596
9597
|
y: c.top,
|
|
@@ -9641,7 +9642,7 @@ const ls = [
|
|
|
9641
9642
|
return console.error("Failed to read SVG."), [];
|
|
9642
9643
|
xa(g);
|
|
9643
9644
|
const m = {};
|
|
9644
|
-
|
|
9645
|
+
Ft(g, (v) => {
|
|
9645
9646
|
ls.includes(v.tagName) && !v.attributes.getNamedItem("fill") && v.setAttribute("fill", "#000000");
|
|
9646
9647
|
const E = v.attributes.getNamedItem("fill");
|
|
9647
9648
|
if (E && E.value !== "none") {
|
|
@@ -9673,7 +9674,7 @@ const ls = [
|
|
|
9673
9674
|
colors: m,
|
|
9674
9675
|
id: I,
|
|
9675
9676
|
svg: f,
|
|
9676
|
-
type:
|
|
9677
|
+
type: D.Illustration,
|
|
9677
9678
|
y: v.top,
|
|
9678
9679
|
x: v.left,
|
|
9679
9680
|
rotation: v.rotation,
|
|
@@ -9702,7 +9703,7 @@ const ls = [
|
|
|
9702
9703
|
colors: {},
|
|
9703
9704
|
id: d,
|
|
9704
9705
|
svg: s,
|
|
9705
|
-
type:
|
|
9706
|
+
type: D.Illustration,
|
|
9706
9707
|
y: l.top,
|
|
9707
9708
|
x: l.left,
|
|
9708
9709
|
rotation: l.rotation,
|
|
@@ -9743,7 +9744,7 @@ const ls = [
|
|
|
9743
9744
|
{
|
|
9744
9745
|
id: u,
|
|
9745
9746
|
src: s,
|
|
9746
|
-
type:
|
|
9747
|
+
type: D.Image,
|
|
9747
9748
|
y: d.top,
|
|
9748
9749
|
x: d.left,
|
|
9749
9750
|
rotation: d.rotation,
|
|
@@ -9800,7 +9801,7 @@ const ls = [
|
|
|
9800
9801
|
colors: h,
|
|
9801
9802
|
id: g,
|
|
9802
9803
|
svg: A,
|
|
9803
|
-
type:
|
|
9804
|
+
type: D.Illustration,
|
|
9804
9805
|
y: c.top,
|
|
9805
9806
|
x: c.left,
|
|
9806
9807
|
rotation: c.rotation,
|
|
@@ -9819,7 +9820,7 @@ const ls = [
|
|
|
9819
9820
|
return console.error(c), [];
|
|
9820
9821
|
}
|
|
9821
9822
|
}, ms = async (n, t, e) => {
|
|
9822
|
-
const a = [], r = t.type === b.ProductOverlay ? e || t.data.asset?.fileLink || "" : t.data.asset?.fileLink || "", s = r.endsWith(".jpeg") || r.endsWith(".jpg") || r.endsWith(".png") ?
|
|
9823
|
+
const a = [], r = t.type === b.ProductOverlay ? e || t.data.asset?.fileLink || "" : t.data.asset?.fileLink || "", s = r.endsWith(".jpeg") || r.endsWith(".jpg") || r.endsWith(".png") ? D.Image : (r.endsWith(".svg"), D.Illustration), l = t.data.regions;
|
|
9823
9824
|
if (s === "image")
|
|
9824
9825
|
try {
|
|
9825
9826
|
l.forEach((c) => {
|
|
@@ -9903,7 +9904,7 @@ const ls = [
|
|
|
9903
9904
|
assetUrl: p,
|
|
9904
9905
|
name: f.names.fullName.en
|
|
9905
9906
|
};
|
|
9906
|
-
})(), A = (a.data.replaceableText ? a.data.replaceableText.replace("{{}}", r.text) : r.text) || "", u =
|
|
9907
|
+
})(), A = (a.data.replaceableText ? a.data.replaceableText.replace("{{}}", r.text) : r.text) || "", u = De(A, {
|
|
9907
9908
|
vertical: a.data.vertical,
|
|
9908
9909
|
uppercase: a.data.uppercase
|
|
9909
9910
|
}), h = async (p) => {
|
|
@@ -9928,7 +9929,7 @@ const ls = [
|
|
|
9928
9929
|
paths: a.data.paths,
|
|
9929
9930
|
rotation: p.rotation,
|
|
9930
9931
|
text: u,
|
|
9931
|
-
type:
|
|
9932
|
+
type: D.Textbox,
|
|
9932
9933
|
vertical: a.data.vertical,
|
|
9933
9934
|
verticalAlign: a.data.verticalAlign || "middle",
|
|
9934
9935
|
width: p.width,
|
|
@@ -9941,7 +9942,7 @@ const ls = [
|
|
|
9941
9942
|
d,
|
|
9942
9943
|
p,
|
|
9943
9944
|
[
|
|
9944
|
-
|
|
9945
|
+
De(u, {
|
|
9945
9946
|
vertical: a.data.vertical,
|
|
9946
9947
|
uppercase: a.data.uppercase
|
|
9947
9948
|
})
|
|
@@ -10514,7 +10515,7 @@ const kd = (n, t) => {
|
|
|
10514
10515
|
}
|
|
10515
10516
|
}
|
|
10516
10517
|
}
|
|
10517
|
-
`,
|
|
10518
|
+
`, Ds = C`
|
|
10518
10519
|
query GetBundlesForCustomer($id: String!) {
|
|
10519
10520
|
customers(ids: [$id]) {
|
|
10520
10521
|
bundleStakeholders {
|
|
@@ -10543,7 +10544,7 @@ const kd = (n, t) => {
|
|
|
10543
10544
|
}
|
|
10544
10545
|
}
|
|
10545
10546
|
}
|
|
10546
|
-
`,
|
|
10547
|
+
`, Fs = C`
|
|
10547
10548
|
${Ra(!1)}
|
|
10548
10549
|
query GetProductCollectionProducts($id: String!, $productIds: [String!]) {
|
|
10549
10550
|
productCollections(ids: [$id], productIds: $productIds) {
|
|
@@ -12494,25 +12495,29 @@ function Te(n) {
|
|
|
12494
12495
|
const pl = async (n, t) => {
|
|
12495
12496
|
const e = {};
|
|
12496
12497
|
try {
|
|
12497
|
-
if (
|
|
12498
|
+
if (t) {
|
|
12499
|
+
const r = await t.loggedInBearerToken();
|
|
12500
|
+
e.Authorization = `Bearer ${r}`;
|
|
12501
|
+
} else
|
|
12502
|
+
throw new Error();
|
|
12498
12503
|
} catch {
|
|
12499
|
-
const
|
|
12500
|
-
|
|
12504
|
+
const s = Object.entries(localStorage).find(([c, d]) => c.startsWith("CognitoIdentityServiceProvider") && c.endsWith("idToken"))?.[0] || "", l = localStorage.getItem(s);
|
|
12505
|
+
l && !Te(l) && (e.Authorization = `Bearer ${l}`);
|
|
12501
12506
|
}
|
|
12502
|
-
return (await y.getShadowGraphqlClient().mutate({
|
|
12507
|
+
return (await t.getIntegration()).partner.beta && (e["X-Spiff-Beta"] = "true"), (await y.getShadowGraphqlClient().mutate({
|
|
12503
12508
|
mutation: ml,
|
|
12504
12509
|
errorPolicy: "all",
|
|
12505
12510
|
fetchPolicy: "no-cache",
|
|
12506
12511
|
variables: {
|
|
12507
|
-
inputs: n.map((
|
|
12508
|
-
name:
|
|
12509
|
-
layouts:
|
|
12510
|
-
workflowId:
|
|
12511
|
-
transactionId:
|
|
12512
|
-
previewImage:
|
|
12513
|
-
useThreeDimPreview:
|
|
12514
|
-
metadata:
|
|
12515
|
-
selectedVariants:
|
|
12512
|
+
inputs: n.map((r) => ({
|
|
12513
|
+
name: r.name,
|
|
12514
|
+
layouts: r.layouts,
|
|
12515
|
+
workflowId: r.workflowId,
|
|
12516
|
+
transactionId: r.transactionId,
|
|
12517
|
+
previewImage: r.previewImage,
|
|
12518
|
+
useThreeDimPreview: r.useThreeDimPreview,
|
|
12519
|
+
metadata: r.metadata,
|
|
12520
|
+
selectedVariants: r.selectedVariants
|
|
12516
12521
|
}))
|
|
12517
12522
|
},
|
|
12518
12523
|
context: {
|
|
@@ -12607,22 +12612,22 @@ const pl = async (n, t) => {
|
|
|
12607
12612
|
for (const R of Object.keys(r)) {
|
|
12608
12613
|
const B = r[R], T = t.steps.find((L) => L.stepName === R);
|
|
12609
12614
|
for (let L = 0; L < B.selections.length; ++L) {
|
|
12610
|
-
const
|
|
12615
|
+
const F = B.selections[L];
|
|
12611
12616
|
if (T && (!E || T.option && (T.option.variants || []).length > 1 && !T.data.hideSelectionInCart && !T.data.hideSelectionsInCart)) {
|
|
12612
12617
|
const q = T.stepTitle;
|
|
12613
12618
|
I[q] ? I[q].push({
|
|
12614
|
-
id:
|
|
12615
|
-
name:
|
|
12616
|
-
priceModifier:
|
|
12619
|
+
id: F.id || "",
|
|
12620
|
+
name: F.name,
|
|
12621
|
+
priceModifier: F.priceModifier
|
|
12617
12622
|
}) : I[q] = [
|
|
12618
12623
|
{
|
|
12619
|
-
id:
|
|
12620
|
-
name:
|
|
12621
|
-
priceModifier:
|
|
12624
|
+
id: F.id || "",
|
|
12625
|
+
name: F.name,
|
|
12626
|
+
priceModifier: F.priceModifier
|
|
12622
12627
|
}
|
|
12623
12628
|
];
|
|
12624
12629
|
}
|
|
12625
|
-
N +=
|
|
12630
|
+
N += F.priceModifier;
|
|
12626
12631
|
}
|
|
12627
12632
|
}
|
|
12628
12633
|
return [I, N];
|
|
@@ -12676,58 +12681,61 @@ const pl = async (n, t) => {
|
|
|
12676
12681
|
};
|
|
12677
12682
|
}, hi = async (n, t) => {
|
|
12678
12683
|
await Promise.all(
|
|
12679
|
-
n.map(async (
|
|
12680
|
-
await
|
|
12684
|
+
n.map(async (s) => {
|
|
12685
|
+
await s.workflowManager.outstandingRequestsPromise();
|
|
12681
12686
|
})
|
|
12682
12687
|
);
|
|
12683
12688
|
const a = await (async () => {
|
|
12684
|
-
const
|
|
12685
|
-
n.map(async (
|
|
12686
|
-
id:
|
|
12687
|
-
hash: await
|
|
12689
|
+
const s = y.getShadowGraphqlClient(), l = await Promise.all(
|
|
12690
|
+
n.map(async (u) => ({
|
|
12691
|
+
id: u.transaction.id,
|
|
12692
|
+
hash: await u.workflowManager.getStateHash()
|
|
12688
12693
|
}))
|
|
12689
|
-
),
|
|
12690
|
-
for (const
|
|
12691
|
-
const
|
|
12694
|
+
), d = da(l, 100), A = [];
|
|
12695
|
+
for (const u of d) {
|
|
12696
|
+
const h = await s.query({
|
|
12692
12697
|
query: jr,
|
|
12693
12698
|
variables: {
|
|
12694
|
-
transactions:
|
|
12699
|
+
transactions: u
|
|
12695
12700
|
},
|
|
12696
12701
|
fetchPolicy: "no-cache",
|
|
12697
12702
|
errorPolicy: "all"
|
|
12698
12703
|
});
|
|
12699
|
-
if (
|
|
12700
|
-
return
|
|
12701
|
-
|
|
12704
|
+
if (h.errors && h.errors.length > 0)
|
|
12705
|
+
return l.map((g) => g.id);
|
|
12706
|
+
A.push(...h.data?.transactionConfirmWorkflowStates ?? []);
|
|
12702
12707
|
}
|
|
12703
|
-
return
|
|
12708
|
+
return A;
|
|
12704
12709
|
})(), i = await Promise.all(
|
|
12705
|
-
n.map(async (
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12710
|
+
n.map(async (s) => await wl(
|
|
12711
|
+
s.workflowManager,
|
|
12712
|
+
s.workflow,
|
|
12713
|
+
s.layouts,
|
|
12714
|
+
s.getReducerState,
|
|
12715
|
+
s.transaction,
|
|
12716
|
+
s.workflowSelections,
|
|
12717
|
+
s.designName,
|
|
12713
12718
|
t ?? (() => Promise.resolve(void 0)),
|
|
12714
|
-
|
|
12715
|
-
a.includes(
|
|
12719
|
+
s.workflowMetadata,
|
|
12720
|
+
a.includes(s.transaction.id)
|
|
12716
12721
|
))
|
|
12717
|
-
), r =
|
|
12718
|
-
|
|
12722
|
+
), r = n[0].workflowManager.getClient(), o = await pl(
|
|
12723
|
+
i.map((s) => s.designDetails),
|
|
12724
|
+
r
|
|
12725
|
+
);
|
|
12726
|
+
if (!o)
|
|
12719
12727
|
throw new Error("Failed to create designs");
|
|
12720
|
-
return
|
|
12721
|
-
const
|
|
12728
|
+
return o.map((s, l) => {
|
|
12729
|
+
const c = n[l], d = i[l], A = s.transaction;
|
|
12722
12730
|
return Cl(
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
-
|
|
12730
|
-
|
|
12731
|
+
A,
|
|
12732
|
+
c.product,
|
|
12733
|
+
c.workflow,
|
|
12734
|
+
d.cartSelectionsWithPrices,
|
|
12735
|
+
s.sku,
|
|
12736
|
+
d.cartMetadata,
|
|
12737
|
+
A.previewImageLink,
|
|
12738
|
+
s.processExecution?.id
|
|
12731
12739
|
);
|
|
12732
12740
|
});
|
|
12733
12741
|
};
|
|
@@ -13531,7 +13539,7 @@ class Pl {
|
|
|
13531
13539
|
return e?.type === "Color" ? new cn(this.bundle, t, e) : new gi(this.bundle, t, e);
|
|
13532
13540
|
}
|
|
13533
13541
|
case z.Text:
|
|
13534
|
-
return new
|
|
13542
|
+
return new Dl(this.bundle, t);
|
|
13535
13543
|
default:
|
|
13536
13544
|
throw new Error("Unhandled Global Property Aspect Type");
|
|
13537
13545
|
}
|
|
@@ -13690,7 +13698,7 @@ class xl extends Oa {
|
|
|
13690
13698
|
return U.getLocalOrFromServer(t);
|
|
13691
13699
|
}
|
|
13692
13700
|
async getImageWithColors() {
|
|
13693
|
-
return await this.loadImageData(), this.imageData?.svg ? Ia(
|
|
13701
|
+
return await this.loadImageData(), this.imageData?.svg ? Ia(Fa(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
|
|
13694
13702
|
}
|
|
13695
13703
|
/**
|
|
13696
13704
|
* Retrieves the original, unmodified image selection, if one exists.
|
|
@@ -13824,7 +13832,7 @@ class xl extends Oa {
|
|
|
13824
13832
|
);
|
|
13825
13833
|
}
|
|
13826
13834
|
}
|
|
13827
|
-
class
|
|
13835
|
+
class Dl extends Oa {
|
|
13828
13836
|
constructor(t, e) {
|
|
13829
13837
|
super(t, e);
|
|
13830
13838
|
}
|
|
@@ -13975,8 +13983,8 @@ class cn extends gi {
|
|
|
13975
13983
|
return this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.customColor || this.getCurrentVariant()?.getColor() || "#ffffff";
|
|
13976
13984
|
}
|
|
13977
13985
|
}
|
|
13978
|
-
const
|
|
13979
|
-
const i =
|
|
13986
|
+
const Fl = (n, t, e, a) => n.flatMap((i) => i.getSteps()).filter((i) => i.getGlobalPropertyAspects(t).includes(e) && i.getType() === a), kl = (n, t, e) => {
|
|
13987
|
+
const i = Fl(
|
|
13980
13988
|
n,
|
|
13981
13989
|
t,
|
|
13982
13990
|
e,
|
|
@@ -14429,7 +14437,7 @@ class pi {
|
|
|
14429
14437
|
if (this.fullFetched)
|
|
14430
14438
|
return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new ge(a));
|
|
14431
14439
|
const e = await y.getShadowGraphqlClient().query({
|
|
14432
|
-
query:
|
|
14440
|
+
query: Fs,
|
|
14433
14441
|
variables: {
|
|
14434
14442
|
id: this.getId(),
|
|
14435
14443
|
productIds: t
|
|
@@ -15102,13 +15110,23 @@ class dn {
|
|
|
15102
15110
|
}
|
|
15103
15111
|
}
|
|
15104
15112
|
async addWorkflowExperience(t) {
|
|
15105
|
-
await this.initializeAdditionalRequiredColorChannels(t), t.setBundle(this), await this.appendWorkflowExperience(t), await this.injectExperienceIntoPreviewService(t), await t.getWorkflowManager().getInitializationPromise();
|
|
15113
|
+
console.log(`log: awe 1 ${Date.now()}`), await this.initializeAdditionalRequiredColorChannels(t), console.log(`log: awe 2 ${Date.now()}`), t.setBundle(this), console.log(`log: awe 3 ${Date.now()}`), await this.appendWorkflowExperience(t), console.log(`log: awe 4 ${Date.now()}`), await this.injectExperienceIntoPreviewService(t), console.log(`log: awe 5 ${Date.now()}`), await t.getWorkflowManager().getInitializationPromise(), console.log(`log: awe 6 ${Date.now()}`);
|
|
15106
15114
|
const e = await this.getGlobalProperties();
|
|
15115
|
+
console.log(`log: awe 7 ${Date.now()}`);
|
|
15107
15116
|
for (const a of e)
|
|
15108
|
-
await a.applyGlobalState([t]);
|
|
15117
|
+
await a.applyGlobalState([t]), console.log(`log: awe global ${Date.now()}`);
|
|
15109
15118
|
this.fireEvent("workflow-experience-added", {
|
|
15110
15119
|
workflowExperiences: [t]
|
|
15111
|
-
})
|
|
15120
|
+
}), console.log(`log: awe 8 ${Date.now()}`), performance.mark("awe8-start"), Promise.resolve().then(
|
|
15121
|
+
() => {
|
|
15122
|
+
console.log("f microtask:", Date.now()), performance.mark("awe8-end"), performance.measure("awe8", "awe8-start", "awe8-end");
|
|
15123
|
+
}
|
|
15124
|
+
), setTimeout(
|
|
15125
|
+
() => console.log("f timeout:", Date.now()),
|
|
15126
|
+
0
|
|
15127
|
+
), requestAnimationFrame(
|
|
15128
|
+
() => console.log("f raf:", Date.now())
|
|
15129
|
+
);
|
|
15112
15130
|
}
|
|
15113
15131
|
async addWorkflowExperiences(t) {
|
|
15114
15132
|
for (const s of t)
|
|
@@ -16150,7 +16168,7 @@ class Od {
|
|
|
16150
16168
|
} catch (a) {
|
|
16151
16169
|
throw console.error(a), new gt("Critical - Unable to synchronize workflow state with server.");
|
|
16152
16170
|
}
|
|
16153
|
-
}, this.options = t, this.options.applicationKey && nr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.0.
|
|
16171
|
+
}, this.options = t, this.options.applicationKey && nr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.1.0-beta.af48b4bc-f77e-5542-857a-72db59fb2fc9"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
16154
16172
|
}
|
|
16155
16173
|
configure(t) {
|
|
16156
16174
|
pt.setHubUrl(t.hubUrl), pt.setServerUrl(t.serverUrl), pt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && rr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|
|
@@ -16573,7 +16591,7 @@ class Od {
|
|
|
16573
16591
|
if (!this.customer)
|
|
16574
16592
|
throw new Error("Customer not authenticated.");
|
|
16575
16593
|
const t = await y.getShadowGraphqlClient().query({
|
|
16576
|
-
query:
|
|
16594
|
+
query: Ds,
|
|
16577
16595
|
variables: {
|
|
16578
16596
|
id: this.customer.id
|
|
16579
16597
|
},
|
|
@@ -16622,12 +16640,12 @@ class Od {
|
|
|
16622
16640
|
},
|
|
16623
16641
|
errorPolicy: "all",
|
|
16624
16642
|
fetchPolicy: "no-cache"
|
|
16625
|
-
}),
|
|
16626
|
-
if (A = A +
|
|
16643
|
+
}), F = L.data.transactions;
|
|
16644
|
+
if (A = A + F.length, i && i(A, o.length), F.length !== B.length) {
|
|
16627
16645
|
const q = L.errors?.[0]?.message || "Unknown error";
|
|
16628
16646
|
throw new gt(`Not all transactions were found: ${q}`);
|
|
16629
16647
|
}
|
|
16630
|
-
return !this.activeIntegration &&
|
|
16648
|
+
return !this.activeIntegration && F[0].integrationProduct?.integration && (this.activeIntegration = Promise.resolve(F[0].integrationProduct.integration)), F.map((q, qe) => ({
|
|
16631
16649
|
transaction: q,
|
|
16632
16650
|
workflowId: q.workflowId,
|
|
16633
16651
|
readOnly: B.find((At) => At.option.transactionId === q.id)?.option.readOnly ?? !1,
|
|
@@ -16639,15 +16657,15 @@ class Od {
|
|
|
16639
16657
|
const T = await u.mutate({
|
|
16640
16658
|
mutation: $r,
|
|
16641
16659
|
variables: {
|
|
16642
|
-
inputs: B.map((
|
|
16643
|
-
integrationProductId:
|
|
16644
|
-
externalIntegrationId:
|
|
16645
|
-
externalProductId:
|
|
16646
|
-
workflowId:
|
|
16647
|
-
designName:
|
|
16660
|
+
inputs: B.map((F) => ({
|
|
16661
|
+
integrationProductId: F.option.type === "integration" ? F.option.integrationProductId : void 0,
|
|
16662
|
+
externalIntegrationId: F.option.type === "external" ? F.option.externalIntegrationId : void 0,
|
|
16663
|
+
externalProductId: F.option.type === "external" ? F.option.externalProductId : void 0,
|
|
16664
|
+
workflowId: F.option.workflowId,
|
|
16665
|
+
designName: F.option.designName,
|
|
16648
16666
|
claim: !0,
|
|
16649
|
-
quantity:
|
|
16650
|
-
recipient:
|
|
16667
|
+
quantity: F.option.quantity,
|
|
16668
|
+
recipient: F.option.recipient
|
|
16651
16669
|
})),
|
|
16652
16670
|
marketplaceThemeInstallId: this.marketplaceThemeInstallId,
|
|
16653
16671
|
marketplaceThemeInstallConfigurationId: this.marketplaceThemeInstallConfigurationId
|
|
@@ -16656,12 +16674,12 @@ class Od {
|
|
|
16656
16674
|
fetchPolicy: "no-cache"
|
|
16657
16675
|
}), L = T.data?.transactionCreateMany;
|
|
16658
16676
|
if (!L || L.length === 0) {
|
|
16659
|
-
const
|
|
16660
|
-
throw new gt(`Failed to create transactions: ${
|
|
16677
|
+
const F = T.errors?.[0]?.message || "Unknown error";
|
|
16678
|
+
throw new gt(`Failed to create transactions: ${F}`);
|
|
16661
16679
|
}
|
|
16662
|
-
return A = A + L.length, i && i(A, o.length), L.map((
|
|
16663
|
-
transaction:
|
|
16664
|
-
workflowId:
|
|
16680
|
+
return A = A + L.length, i && i(A, o.length), L.map((F, q) => ({
|
|
16681
|
+
transaction: F,
|
|
16682
|
+
workflowId: F.workflowId,
|
|
16665
16683
|
readOnly: !1,
|
|
16666
16684
|
index: B[q].index
|
|
16667
16685
|
}));
|
|
@@ -16676,7 +16694,7 @@ class Od {
|
|
|
16676
16694
|
(async () => p.length > 0 ? await sc(p) : [])(),
|
|
16677
16695
|
(async () => f.length > 0 ? await Ci(f, e) : [])()
|
|
16678
16696
|
]), x = new Map(S.map((B) => [B.id, B])), v = new Map(w.map((B) => [B.id, B])), E = m.map(async (B) => {
|
|
16679
|
-
const { transaction: T, workflowId: L, readOnly:
|
|
16697
|
+
const { transaction: T, workflowId: L, readOnly: F, index: q } = B, qe = L ? v.get(L) : void 0, At = t[q];
|
|
16680
16698
|
if (T.integrationProductId) {
|
|
16681
16699
|
const it = x.get(T.integrationProductId);
|
|
16682
16700
|
T.integrationProduct = it, T.product = it?.product, T.integrationProduct || console.error("failed to find transaction's product");
|
|
@@ -16690,20 +16708,20 @@ class Od {
|
|
|
16690
16708
|
workflow: qe,
|
|
16691
16709
|
transaction: T,
|
|
16692
16710
|
singleVariantsRenderable: At?.workflowConfiguration?.singleVariantsRenderable,
|
|
16693
|
-
stateMutationFunc:
|
|
16711
|
+
stateMutationFunc: F ? async () => {
|
|
16694
16712
|
throw new Q("State mutation is forbidden in read only mode!");
|
|
16695
16713
|
} : async (it) => this.updateTransactionState({
|
|
16696
16714
|
...it,
|
|
16697
16715
|
context: { transactionOwnerId: He, bundleOwnerId: e?.bundleOwnerId }
|
|
16698
16716
|
}),
|
|
16699
16717
|
graphQlClient: () => vi,
|
|
16700
|
-
readOnly:
|
|
16718
|
+
readOnly: F,
|
|
16701
16719
|
isReloadedTransaction: At.type === "transaction"
|
|
16702
16720
|
};
|
|
16703
16721
|
if (At.type === "transaction" && T.workflowState) {
|
|
16704
16722
|
const it = JSON.parse(T.workflowState);
|
|
16705
16723
|
await Za(it), se.reloadedState = it;
|
|
16706
|
-
} else if (!
|
|
16724
|
+
} else if (!F && At.workflowState) {
|
|
16707
16725
|
const it = JSON.parse(At.workflowState);
|
|
16708
16726
|
await Za(it), se.reloadedState = it;
|
|
16709
16727
|
}
|
|
@@ -16711,8 +16729,8 @@ class Od {
|
|
|
16711
16729
|
}), N = (await Promise.all(E)).sort((B, T) => B.index - T.index);
|
|
16712
16730
|
let R = [];
|
|
16713
16731
|
for (const B of N) {
|
|
16714
|
-
const { experienceOptions: T, options: L } = B,
|
|
16715
|
-
await
|
|
16732
|
+
const { experienceOptions: T, options: L } = B, F = new bl(this, T);
|
|
16733
|
+
await F.getWorkflowManager().getInitializationPromise(), a && a(), L.type !== "transaction" && this.customer && await F.attachCustomerDetails({ email: this.customer.emailAddress }), R = [...R, F], F.getWorkflowManager().setWorkflowStateSyncEnabled(!0);
|
|
16716
16734
|
}
|
|
16717
16735
|
return R;
|
|
16718
16736
|
}
|
|
@@ -16944,7 +16962,7 @@ class dc {
|
|
|
16944
16962
|
getImageSrc() {
|
|
16945
16963
|
if (this.imageData) {
|
|
16946
16964
|
if (this.imageData.svg) {
|
|
16947
|
-
const t =
|
|
16965
|
+
const t = Fa(this.imageData.svg, this.imageData.colors || {}, !1);
|
|
16948
16966
|
return Ia(t);
|
|
16949
16967
|
}
|
|
16950
16968
|
return this.imageData.src;
|
|
@@ -17812,7 +17830,7 @@ const Si = C`
|
|
|
17812
17830
|
}
|
|
17813
17831
|
}
|
|
17814
17832
|
`;
|
|
17815
|
-
var
|
|
17833
|
+
var Dc = /* @__PURE__ */ ((n) => (n.Confirmed = "Confirmed", n.Plausible = "Plausible", n.Unlikely = "Unlikely", n))(Dc || {}), Fc = /* @__PURE__ */ ((n) => (n.Created = "Created", n.Processing = "Processing", n.Completed = "Completed", n.Failed = "Failed", n.Cancelled = "Cancelled", n))(Fc || {});
|
|
17816
17834
|
const eA = async (n) => {
|
|
17817
17835
|
const t = n.map((a) => a.getTransaction().recipient?.id).filter((a) => !!a), e = await y.getShadowGraphqlClient().query({
|
|
17818
17836
|
query: Ic,
|
|
@@ -17885,14 +17903,14 @@ const eA = async (n) => {
|
|
|
17885
17903
|
})).data.integrationProducts;
|
|
17886
17904
|
export {
|
|
17887
17905
|
ba as AddonHandle,
|
|
17888
|
-
|
|
17889
|
-
|
|
17906
|
+
Fc as AddressValidationJobStatus,
|
|
17907
|
+
Dc as AddressValidationResultConfirmationLevel,
|
|
17890
17908
|
bn as AddressValidationStatus,
|
|
17891
17909
|
Rd as ArrayInput,
|
|
17892
17910
|
z as AspectType,
|
|
17893
17911
|
bt as AssetNotFoundError,
|
|
17894
17912
|
Ee as AssetType,
|
|
17895
|
-
|
|
17913
|
+
Dd as BringForwardCommand,
|
|
17896
17914
|
xd as BringToBackCommand,
|
|
17897
17915
|
Pd as BringToFrontCommand,
|
|
17898
17916
|
Vi as BundleDesignCreationCartAddMode,
|
|
@@ -17927,7 +17945,7 @@ export {
|
|
|
17927
17945
|
An as IntegrationProduct,
|
|
17928
17946
|
Gi as IntegrationType,
|
|
17929
17947
|
vd as LayoutElementFactory,
|
|
17930
|
-
|
|
17948
|
+
D as LayoutElementType,
|
|
17931
17949
|
J as LayoutNotFoundError,
|
|
17932
17950
|
Yt as LayoutRenderingPurpose,
|
|
17933
17951
|
rl as MaterialStepHandle,
|
|
@@ -17954,7 +17972,7 @@ export {
|
|
|
17954
17972
|
Jt as ResourceNotFoundError,
|
|
17955
17973
|
bd as RotateCommand,
|
|
17956
17974
|
j as ScaleAxis,
|
|
17957
|
-
|
|
17975
|
+
Fd as SendBackwardsCommand,
|
|
17958
17976
|
cl as ShapeStepHandle,
|
|
17959
17977
|
zi as ShareActionType,
|
|
17960
17978
|
Od as SpiffCommerceClient,
|
|
@@ -17964,7 +17982,7 @@ export {
|
|
|
17964
17982
|
b as StepType,
|
|
17965
17983
|
kt as TextAlgorithm,
|
|
17966
17984
|
$o as TextChangeCommand,
|
|
17967
|
-
|
|
17985
|
+
Dl as TextGlobalPropertyHandle,
|
|
17968
17986
|
Qd as TextInput,
|
|
17969
17987
|
dl as TextStepHandle,
|
|
17970
17988
|
Vl as Transform,
|
|
@@ -18036,7 +18054,7 @@ export {
|
|
|
18036
18054
|
$l as metafieldManager,
|
|
18037
18055
|
wd as mmPerPixel,
|
|
18038
18056
|
si as modelStepService,
|
|
18039
|
-
|
|
18057
|
+
Fa as modifySVGColors,
|
|
18040
18058
|
li as moduleStepService,
|
|
18041
18059
|
Wd as nameBundle,
|
|
18042
18060
|
qd as nameTransaction,
|