@primestyleai/tryon 5.10.17 → 5.10.18
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/react/index.js +480 -476
- package/dist/react/index.js.map +1 -1
- package/dist/storefront/primestyle-tryon.js +14 -2
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -31,11 +31,11 @@ async function rP(f) {
|
|
|
31
31
|
const n = await Fn(f), g = HP.detect(n);
|
|
32
32
|
if (!g?.landmarks?.length || g.landmarks[0].length < 25)
|
|
33
33
|
return null;
|
|
34
|
-
const e = g.landmarks[0], B = e[sP], C = e[TP], D = e[GP],
|
|
34
|
+
const e = g.landmarks[0], B = e[sP], C = e[TP], D = e[GP], t = e[YP], o = (B.y + C.y) / 2, r = (D.y + t.y) / 2, z = r - o, p = o + z * 0.28, T = Math.abs(C.x - B.x), F = Math.min(B.x, C.x) - T * 0.05, h = Math.max(B.x, C.x) + T * 0.05, W = Math.abs(t.x - D.x), i = Math.min(D.x, t.x) - W * 0.15, k = Math.max(D.x, t.x) + W * 0.15, u = p + (r - p) * 0.55, v = T * 0.85, I = (B.x + C.x + D.x + t.x) / 4, K = I - v / 2, N = I + v / 2;
|
|
35
35
|
return {
|
|
36
36
|
chest: { y: p, x1: F, x2: h },
|
|
37
|
-
waist: { y: u, x1:
|
|
38
|
-
hips: { y: r, x1:
|
|
37
|
+
waist: { y: u, x1: K, x2: N },
|
|
38
|
+
hips: { y: r, x1: i, x2: k }
|
|
39
39
|
};
|
|
40
40
|
} catch (n) {
|
|
41
41
|
return console.error("[PS-SDK] Pose detection failed:", n), null;
|
|
@@ -134,7 +134,7 @@ function Ug(f) {
|
|
|
134
134
|
}
|
|
135
135
|
function Dn(f, n, g) {
|
|
136
136
|
if (f.length < 4) return 0;
|
|
137
|
-
const e = (z) => ({ x: z.x * n, y: z.y * g }), [B, C, D,
|
|
137
|
+
const e = (z) => ({ x: z.x * n, y: z.y * g }), [B, C, D, t] = f.map(e), o = Math.hypot(B.x - D.x, B.y - D.y), r = Math.hypot(C.x - t.x, C.y - t.y);
|
|
138
138
|
return (o + r) / 2;
|
|
139
139
|
}
|
|
140
140
|
function Eg(f) {
|
|
@@ -163,10 +163,10 @@ function ag(f, n, g) {
|
|
|
163
163
|
const e = Dn(f.leftIrisRing, n, g), B = Dn(f.rightIrisRing, n, g), C = (e + B) / 2;
|
|
164
164
|
let D = 1;
|
|
165
165
|
C < 8 ? D = 0.3 : Math.abs(e - B) / C > 0.3 ? D = 0.5 : Math.abs(e - B) / C > 0.15 && (D = 0.8);
|
|
166
|
-
const
|
|
167
|
-
(
|
|
168
|
-
(
|
|
169
|
-
) *
|
|
166
|
+
const t = C > 0 ? vn / C : 0, o = (x, E) => Math.hypot(
|
|
167
|
+
(x.x - E.x) * n,
|
|
168
|
+
(x.y - E.y) * g
|
|
169
|
+
) * t, r = o(f.leftIrisCenter, f.rightIrisCenter), p = o(f.leftInnerEye, f.rightInnerEye) / 1.6, T = o(f.leftTragus, f.rightTragus), F = o(f.leftTragus, f.leftOuterEye), h = o(f.rightTragus, f.rightOuterEye), W = (F + h) / 2, i = T * 1.07, u = Math.abs((f.forehead.z ?? 0) - (f.chin.z ?? 0)) * n * t, v = Math.max(170, Math.min(210, u || 190)), I = i / 2, K = v / 2, N = Math.PI * Math.sqrt(2 * (I * I + K * K));
|
|
170
170
|
return {
|
|
171
171
|
measurements: {
|
|
172
172
|
irisDiameter: vn,
|
|
@@ -176,7 +176,7 @@ function ag(f, n, g) {
|
|
|
176
176
|
templeLengthLeft: Rf(F),
|
|
177
177
|
templeLengthRight: Rf(h),
|
|
178
178
|
templeLength: Rf(W),
|
|
179
|
-
headWidth: Rf(
|
|
179
|
+
headWidth: Rf(i),
|
|
180
180
|
headDepth: Rf(v),
|
|
181
181
|
headCircumference: Rf(N)
|
|
182
182
|
},
|
|
@@ -193,8 +193,8 @@ async function dg(f) {
|
|
|
193
193
|
if (!g?.faceLandmarks?.length) return null;
|
|
194
194
|
const e = g.faceLandmarks[0], B = Eg(e);
|
|
195
195
|
if (!B) return null;
|
|
196
|
-
const C = n.naturalWidth || n.width, D = n.naturalHeight || n.height, { measurements:
|
|
197
|
-
return { landmarks: B, measurementsMm:
|
|
196
|
+
const C = n.naturalWidth || n.width, D = n.naturalHeight || n.height, { measurements: t, irisConfidence: o } = ag(B, C, D);
|
|
197
|
+
return { landmarks: B, measurementsMm: t, irisConfidence: o, imageWidth: C, imageHeight: D };
|
|
198
198
|
} catch (n) {
|
|
199
199
|
return console.error("[PS-SDK] Face detection failed:", n), null;
|
|
200
200
|
}
|
|
@@ -213,8 +213,8 @@ function Ig(f, n) {
|
|
|
213
213
|
const B = e - g, C = B > 0 ? B * 0.5 : g * 0.05 || 3;
|
|
214
214
|
if (f >= g && f <= e) return "good";
|
|
215
215
|
if (f < g) {
|
|
216
|
-
const
|
|
217
|
-
return
|
|
216
|
+
const t = g - f;
|
|
217
|
+
return t > C * 2 ? "too-loose" : t > C ? "loose" : "a-bit-loose";
|
|
218
218
|
}
|
|
219
219
|
const D = f - e;
|
|
220
220
|
return D > C * 2 ? "too-tight" : D > C ? "tight" : "a-bit-tight";
|
|
@@ -237,8 +237,8 @@ function xg(f, n) {
|
|
|
237
237
|
if (n) {
|
|
238
238
|
const D = Rg[g.measurement.toLowerCase()];
|
|
239
239
|
if (D && n[D]) {
|
|
240
|
-
const
|
|
241
|
-
C.y = Math.round(
|
|
240
|
+
const t = n[D];
|
|
241
|
+
C.y = Math.round(t.y * 1e3) / 1e3, C.x1 = Math.round(t.x1 * 1e3) / 1e3, C.x2 = Math.round(t.x2 * 1e3) / 1e3;
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
return C;
|
|
@@ -250,18 +250,18 @@ function Cn(f, n) {
|
|
|
250
250
|
f?.recommendedSize && (g.recommendedSize = f.recommendedSize);
|
|
251
251
|
const e = /* @__PURE__ */ new Set(), B = [], C = (D) => {
|
|
252
252
|
if (D)
|
|
253
|
-
for (const
|
|
254
|
-
const o =
|
|
255
|
-
e.has(o) || (e.add(o),
|
|
253
|
+
for (const t of D) {
|
|
254
|
+
const o = t.measurement.toLowerCase();
|
|
255
|
+
e.has(o) || (e.add(o), t.userValue && B.push(`${t.measurement} ${t.userValue}`));
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
258
|
if (C(f?.matchDetails), f?.sections)
|
|
259
259
|
for (const D of Object.values(f.sections)) C(D.matchDetails);
|
|
260
260
|
if (B.length && (g.userMeasurementsText = B.join(", ")), n?.headers?.length && n.rows?.length) {
|
|
261
|
-
const D = n.headers,
|
|
261
|
+
const D = n.headers, t = n.rows.slice(0, 20).map(
|
|
262
262
|
(o) => D.map((r, z) => `${r} ${o[z] ?? "—"}`).join(", ")
|
|
263
263
|
);
|
|
264
|
-
g.sizeChartSummary =
|
|
264
|
+
g.sizeChartSummary = t.join(" | ");
|
|
265
265
|
}
|
|
266
266
|
return Object.keys(g).length ? g : void 0;
|
|
267
267
|
}
|
|
@@ -336,10 +336,10 @@ function FP(f, n, g = "cm") {
|
|
|
336
336
|
return sn(f, { measurements: n, measurementsUnit: g });
|
|
337
337
|
}
|
|
338
338
|
function Tn(f, n) {
|
|
339
|
-
const g = JP(), e = g.findIndex((
|
|
339
|
+
const g = JP(), e = g.findIndex((t) => t.id === f);
|
|
340
340
|
if (e < 0) return null;
|
|
341
341
|
const B = g[e], C = (B.sizeHistory || []).filter(
|
|
342
|
-
(
|
|
342
|
+
(t) => t.productId !== n.productId
|
|
343
343
|
);
|
|
344
344
|
C.unshift(n);
|
|
345
345
|
const D = C.slice(0, 50);
|
|
@@ -463,20 +463,20 @@ async function Gn(f) {
|
|
|
463
463
|
for (const [p, T] of Object.entries(g.measurements))
|
|
464
464
|
T != null && (D[p] = T);
|
|
465
465
|
g.height != null && (D.height = g.height), g.weight != null && (D.weight = g.weight), g.heightUnit && (D.heightUnit = g.heightUnit), g.weightUnit && (D.weightUnit = g.weightUnit), g.age && (D.age = g.age), g.chestProfile && (D.chestProfile = g.chestProfile), g.midsectionProfile && (D.midsectionProfile = g.midsectionProfile), g.hipProfile && (D.hipProfile = g.hipProfile);
|
|
466
|
-
const
|
|
466
|
+
const t = {
|
|
467
467
|
method: "exact",
|
|
468
468
|
locale: g.country || "US",
|
|
469
469
|
sizingUnit: g.measurementsUnit || g.sizingUnit || "cm",
|
|
470
470
|
product: { title: f.productTitle, productId: f.productId, description: "", variants: [] },
|
|
471
471
|
measurements: D
|
|
472
472
|
};
|
|
473
|
-
C && C.found && (
|
|
473
|
+
C && C.found && (t.sizeGuide = C), n("calling /sizing/recommend", { measurements: Object.keys(D), hasSizeGuide: !!t.sizeGuide });
|
|
474
474
|
let o = null;
|
|
475
475
|
try {
|
|
476
476
|
const p = await fetch(`${B}/api/v1/sizing/recommend`, {
|
|
477
477
|
method: "POST",
|
|
478
478
|
headers: { "Content-Type": "application/json", Authorization: `Bearer ${e}` },
|
|
479
|
-
body: JSON.stringify(
|
|
479
|
+
body: JSON.stringify(t)
|
|
480
480
|
});
|
|
481
481
|
if (!p.ok)
|
|
482
482
|
return n("recommend FAILED", p.status, p.statusText), null;
|
|
@@ -6786,10 +6786,10 @@ function $g({ view: f, stepIndex: n }) {
|
|
|
6786
6786
|
return f === "error" || f === "idle" ? null : /* @__PURE__ */ A("div", { className: "ps-tryon-dots", children: Array.from({ length: sg }, (g, e) => e + 1).map((g) => /* @__PURE__ */ A("div", { className: `ps-tryon-dot${g < n ? " ps-done" : g === n ? " ps-active" : ""}` }, g)) });
|
|
6787
6787
|
}
|
|
6788
6788
|
function _g({ activeLocale: f, onSelect: n }) {
|
|
6789
|
-
const [g, e] = j(!1), B = tA(null), C = tA(null), [D,
|
|
6789
|
+
const [g, e] = j(!1), B = tA(null), C = tA(null), [D, t] = j({ top: 0, right: 0 }), o = _P[f] || "English", r = UA(() => {
|
|
6790
6790
|
if (!B.current) return;
|
|
6791
6791
|
const z = B.current.getBoundingClientRect();
|
|
6792
|
-
|
|
6792
|
+
t({ top: z.bottom + 4, right: window.innerWidth - z.right });
|
|
6793
6793
|
}, []);
|
|
6794
6794
|
return JA(() => {
|
|
6795
6795
|
if (!g) return;
|
|
@@ -6865,20 +6865,20 @@ function un({
|
|
|
6865
6865
|
onCancel: g,
|
|
6866
6866
|
t: e
|
|
6867
6867
|
}) {
|
|
6868
|
-
const [B, C] = j(f?.name || ""), [D,
|
|
6868
|
+
const [B, C] = j(f?.name || ""), [D, t] = j(f?.gender || "male"), [o, r] = j(f?.sizingUnit || "cm"), [z, p] = j(() => {
|
|
6869
6869
|
if (!f) return {};
|
|
6870
|
-
const
|
|
6870
|
+
const i = {};
|
|
6871
6871
|
for (const k of ["heightCm", "weightKg", "age"]) {
|
|
6872
6872
|
const u = f[k];
|
|
6873
|
-
typeof u == "number" && u > 0 && (
|
|
6873
|
+
typeof u == "number" && u > 0 && (i[k] = String(u));
|
|
6874
6874
|
}
|
|
6875
|
-
return
|
|
6875
|
+
return i;
|
|
6876
6876
|
}), T = D === "female" ? fB : AB, [F, h] = j(""), W = () => {
|
|
6877
|
-
const
|
|
6878
|
-
B.trim() ||
|
|
6877
|
+
const i = [];
|
|
6878
|
+
B.trim() || i.push(e("Profile Name"));
|
|
6879
6879
|
for (const u of T)
|
|
6880
|
-
parseFloat(z[u.key] || "") > 0 ||
|
|
6881
|
-
if (
|
|
6880
|
+
parseFloat(z[u.key] || "") > 0 || i.push(e(u.label));
|
|
6881
|
+
if (i.length > 0) {
|
|
6882
6882
|
h(e("Please fill in all fields"));
|
|
6883
6883
|
return;
|
|
6884
6884
|
}
|
|
@@ -6897,8 +6897,8 @@ function un({
|
|
|
6897
6897
|
type: "text",
|
|
6898
6898
|
className: "ps-tryon-sf-input",
|
|
6899
6899
|
value: B,
|
|
6900
|
-
onChange: (
|
|
6901
|
-
C(
|
|
6900
|
+
onChange: (i) => {
|
|
6901
|
+
C(i.target.value), h("");
|
|
6902
6902
|
},
|
|
6903
6903
|
placeholder: e("e.g. My Measurements")
|
|
6904
6904
|
}
|
|
@@ -6911,7 +6911,7 @@ function un({
|
|
|
6911
6911
|
{
|
|
6912
6912
|
type: "button",
|
|
6913
6913
|
className: `ps-tryon-pe-pill-btn${D === "male" ? " ps-active" : ""}`,
|
|
6914
|
-
onClick: () =>
|
|
6914
|
+
onClick: () => t("male"),
|
|
6915
6915
|
children: e("Male")
|
|
6916
6916
|
}
|
|
6917
6917
|
),
|
|
@@ -6920,7 +6920,7 @@ function un({
|
|
|
6920
6920
|
{
|
|
6921
6921
|
type: "button",
|
|
6922
6922
|
className: `ps-tryon-pe-pill-btn${D === "female" ? " ps-active" : ""}`,
|
|
6923
|
-
onClick: () =>
|
|
6923
|
+
onClick: () => t("female"),
|
|
6924
6924
|
children: e("Female")
|
|
6925
6925
|
}
|
|
6926
6926
|
)
|
|
@@ -6946,11 +6946,11 @@ function un({
|
|
|
6946
6946
|
)
|
|
6947
6947
|
] })
|
|
6948
6948
|
] }),
|
|
6949
|
-
/* @__PURE__ */ A("div", { className: "ps-tryon-pe-fields", children: T.map((
|
|
6949
|
+
/* @__PURE__ */ A("div", { className: "ps-tryon-pe-fields", children: T.map((i) => /* @__PURE__ */ P("div", { className: "ps-tryon-sf-float-field", children: [
|
|
6950
6950
|
/* @__PURE__ */ P("label", { className: "ps-tryon-sf-float-label", children: [
|
|
6951
|
-
e(
|
|
6951
|
+
e(i.label),
|
|
6952
6952
|
" (",
|
|
6953
|
-
o === "in" ?
|
|
6953
|
+
o === "in" ? i.imperialUnit : i.metricUnit,
|
|
6954
6954
|
")"
|
|
6955
6955
|
] }),
|
|
6956
6956
|
/* @__PURE__ */ A(
|
|
@@ -6959,13 +6959,13 @@ function un({
|
|
|
6959
6959
|
type: "number",
|
|
6960
6960
|
className: "ps-tryon-sf-input",
|
|
6961
6961
|
placeholder: " ",
|
|
6962
|
-
value: z[
|
|
6962
|
+
value: z[i.key] || "",
|
|
6963
6963
|
onChange: (k) => {
|
|
6964
|
-
p((u) => ({ ...u, [
|
|
6964
|
+
p((u) => ({ ...u, [i.key]: k.target.value })), h("");
|
|
6965
6965
|
}
|
|
6966
6966
|
}
|
|
6967
6967
|
)
|
|
6968
|
-
] },
|
|
6968
|
+
] }, i.key)) }),
|
|
6969
6969
|
F && /* @__PURE__ */ A("div", { className: "ps-tryon-pe-error", children: F }),
|
|
6970
6970
|
/* @__PURE__ */ P("div", { className: "ps-tryon-pe-actions", children: [
|
|
6971
6971
|
/* @__PURE__ */ A("button", { type: "button", className: "ps-tryon-est-back", onClick: g, children: e("Cancel") }),
|
|
@@ -6981,7 +6981,7 @@ function PB({
|
|
|
6981
6981
|
history: B,
|
|
6982
6982
|
setHistory: C,
|
|
6983
6983
|
setProfileDetail: D,
|
|
6984
|
-
restoreHistory:
|
|
6984
|
+
restoreHistory: t,
|
|
6985
6985
|
t: o
|
|
6986
6986
|
}) {
|
|
6987
6987
|
const [r, z] = j(!1);
|
|
@@ -7021,7 +7021,7 @@ function PB({
|
|
|
7021
7021
|
/* @__PURE__ */ A(mg, {})
|
|
7022
7022
|
] }, F.id))
|
|
7023
7023
|
] }) : /* @__PURE__ */ A(rA, { children: B.length === 0 ? /* @__PURE__ */ A("div", { className: "ps-tryon-drawer-empty", children: o("No history yet.") }) : /* @__PURE__ */ P(rA, { children: [
|
|
7024
|
-
B.map((F, h) => /* @__PURE__ */ P("div", { className: "ps-tryon-history-item ps-tryon-history-clickable", onClick: () =>
|
|
7024
|
+
B.map((F, h) => /* @__PURE__ */ P("div", { className: "ps-tryon-history-item ps-tryon-history-clickable", onClick: () => t(F), children: [
|
|
7025
7025
|
/* @__PURE__ */ P("div", { className: "ps-tryon-history-images", children: [
|
|
7026
7026
|
F.productImage && /* @__PURE__ */ A("img", { src: F.productImage, alt: "", className: "ps-tryon-history-thumb" }),
|
|
7027
7027
|
F.resultImageUrl && /* @__PURE__ */ A("img", { src: F.resultImageUrl, alt: "", className: "ps-tryon-history-result-img" })
|
|
@@ -7036,15 +7036,15 @@ function PB({
|
|
|
7036
7036
|
/* @__PURE__ */ A("span", { className: "ps-tryon-history-size-badge", children: F.recommendedSize }),
|
|
7037
7037
|
F.reasoning && /* @__PURE__ */ A("span", { className: "ps-tryon-history-sizing-reason", children: F.reasoning })
|
|
7038
7038
|
] }),
|
|
7039
|
-
p(F) && F.sizingResult?.sections && /* @__PURE__ */ A("div", { className: "ps-tryon-history-sections", children: Object.entries(F.sizingResult.sections).map(([W,
|
|
7039
|
+
p(F) && F.sizingResult?.sections && /* @__PURE__ */ A("div", { className: "ps-tryon-history-sections", children: Object.entries(F.sizingResult.sections).map(([W, i]) => /* @__PURE__ */ P("span", { className: "ps-tryon-history-section-chip", children: [
|
|
7040
7040
|
W,
|
|
7041
7041
|
": ",
|
|
7042
|
-
|
|
7042
|
+
i.recommendedSize
|
|
7043
7043
|
] }, W)) }),
|
|
7044
7044
|
F.resultImageUrl && /* @__PURE__ */ A("span", { className: "ps-tryon-history-tryon-badge", children: o("Try-on") })
|
|
7045
7045
|
] }),
|
|
7046
7046
|
/* @__PURE__ */ A("button", { className: "ps-tryon-history-delete", onClick: (W) => {
|
|
7047
|
-
W.stopPropagation(), C((
|
|
7047
|
+
W.stopPropagation(), C((i) => i.filter((k, u) => u !== h));
|
|
7048
7048
|
}, children: /* @__PURE__ */ A(Jg, {}) })
|
|
7049
7049
|
] }, F.id)),
|
|
7050
7050
|
/* @__PURE__ */ A("button", { className: "ps-tryon-drawer-clear", onClick: () => C([]), children: o("Clear All") })
|
|
@@ -7079,26 +7079,26 @@ function nB({
|
|
|
7079
7079
|
lastEditedAt: Date.now()
|
|
7080
7080
|
} : z
|
|
7081
7081
|
)), n(null);
|
|
7082
|
-
},
|
|
7082
|
+
}, t = () => n(null);
|
|
7083
7083
|
return lP(
|
|
7084
7084
|
/* @__PURE__ */ A(
|
|
7085
7085
|
"div",
|
|
7086
7086
|
{
|
|
7087
7087
|
className: "ps-tryon-detail-overlay",
|
|
7088
7088
|
onClick: (o) => {
|
|
7089
|
-
o.target === o.currentTarget &&
|
|
7089
|
+
o.target === o.currentTarget && t();
|
|
7090
7090
|
},
|
|
7091
7091
|
children: /* @__PURE__ */ P("div", { className: "ps-tryon-detail-modal", children: [
|
|
7092
7092
|
/* @__PURE__ */ P("div", { className: "ps-tryon-detail-header", children: [
|
|
7093
7093
|
/* @__PURE__ */ A("span", { children: C("Edit Profile") }),
|
|
7094
|
-
/* @__PURE__ */ A("button", { onClick:
|
|
7094
|
+
/* @__PURE__ */ A("button", { onClick: t, "aria-label": C("Close"), children: /* @__PURE__ */ A(Xn, { size: 18 }) })
|
|
7095
7095
|
] }),
|
|
7096
7096
|
/* @__PURE__ */ A("div", { className: "ps-tryon-detail-body", children: /* @__PURE__ */ A(
|
|
7097
7097
|
un,
|
|
7098
7098
|
{
|
|
7099
7099
|
profile: f,
|
|
7100
7100
|
onSave: D,
|
|
7101
|
-
onCancel:
|
|
7101
|
+
onCancel: t,
|
|
7102
7102
|
t: C
|
|
7103
7103
|
}
|
|
7104
7104
|
) })
|
|
@@ -7114,7 +7114,7 @@ function gB({
|
|
|
7114
7114
|
onEdit: g,
|
|
7115
7115
|
t: e
|
|
7116
7116
|
}) {
|
|
7117
|
-
const B = f.heightUnit === "in" || f.heightUnit === "ft" ? "in" : "cm", C = f.weightUnit === "lbs" ? "lbs" : "kg", D = xf(B),
|
|
7117
|
+
const B = f.heightUnit === "in" || f.heightUnit === "ft" ? "in" : "cm", C = f.weightUnit === "lbs" ? "lbs" : "kg", D = xf(B), t = (p) => {
|
|
7118
7118
|
if (!p) return "—";
|
|
7119
7119
|
if (B === "in") {
|
|
7120
7120
|
const T = Math.floor(p / 12), F = Math.round(p % 12);
|
|
@@ -7163,7 +7163,7 @@ function gB({
|
|
|
7163
7163
|
}, children: [
|
|
7164
7164
|
/* @__PURE__ */ P("li", { style: { display: "flex", justifyContent: "space-between", gap: "1vw" }, children: [
|
|
7165
7165
|
/* @__PURE__ */ A("span", { style: { color: "var(--ps-text-muted)" }, children: e("Height") }),
|
|
7166
|
-
/* @__PURE__ */ A("span", { style: { fontWeight: 600 }, children:
|
|
7166
|
+
/* @__PURE__ */ A("span", { style: { fontWeight: 600 }, children: t(r) })
|
|
7167
7167
|
] }),
|
|
7168
7168
|
/* @__PURE__ */ P("li", { style: { display: "flex", justifyContent: "space-between", gap: "1vw" }, children: [
|
|
7169
7169
|
/* @__PURE__ */ A("span", { style: { color: "var(--ps-text-muted)" }, children: e("Weight") }),
|
|
@@ -7222,7 +7222,7 @@ function eB({
|
|
|
7222
7222
|
dynamicFields: B,
|
|
7223
7223
|
formRef: C,
|
|
7224
7224
|
formGender: D,
|
|
7225
|
-
sizingUnit:
|
|
7225
|
+
sizingUnit: t,
|
|
7226
7226
|
setSizingUnit: o,
|
|
7227
7227
|
formKey: r,
|
|
7228
7228
|
setFormKey: z,
|
|
@@ -7231,33 +7231,33 @@ function eB({
|
|
|
7231
7231
|
setSizingLoading: F,
|
|
7232
7232
|
setView: h,
|
|
7233
7233
|
submitSizing: W,
|
|
7234
|
-
t
|
|
7234
|
+
t: i
|
|
7235
7235
|
}) {
|
|
7236
|
-
const k =
|
|
7236
|
+
const k = t === "in" ? "in" : "cm", u = /* @__PURE__ */ new Set(["weight", "weightKg", "height"]), v = B.filter((K) => K.required && K.unit === "cm" && !u.has(K.key)), I = () => {
|
|
7237
7237
|
C.current.gender = D, T("exact"), F(!0), h("size-result"), W("exact");
|
|
7238
7238
|
};
|
|
7239
7239
|
return e || !g ? /* @__PURE__ */ P("div", { className: "ps-bp-layout", children: [
|
|
7240
7240
|
/* @__PURE__ */ A("div", { className: "ps-bp-image", children: /* @__PURE__ */ A("img", { src: f, alt: n, className: "ps-bp-image-img" }) }),
|
|
7241
7241
|
/* @__PURE__ */ P("div", { className: "ps-bp-root", style: { alignItems: "center", justifyContent: "center" }, children: [
|
|
7242
7242
|
/* @__PURE__ */ A("div", { className: "ps-tryon-size-loading-spinner" }),
|
|
7243
|
-
/* @__PURE__ */ A("p", { style: { color: "var(--ps-text-muted)", fontSize: "0.8vw", marginTop: "0.6vw" }, children:
|
|
7243
|
+
/* @__PURE__ */ A("p", { style: { color: "var(--ps-text-muted)", fontSize: "0.8vw", marginTop: "0.6vw" }, children: i("Estimating your measurements...") })
|
|
7244
7244
|
] })
|
|
7245
7245
|
] }) : /* @__PURE__ */ P("div", { className: "ps-bp-layout", children: [
|
|
7246
7246
|
/* @__PURE__ */ A("div", { className: "ps-bp-image", children: /* @__PURE__ */ A("img", { src: f, alt: n, className: "ps-bp-image-img" }) }),
|
|
7247
7247
|
/* @__PURE__ */ P("div", { className: "ps-bp-root", children: [
|
|
7248
|
-
/* @__PURE__ */ A("h3", { className: "ps-bp-title", style: { fontSize: "1.1vw" }, children:
|
|
7249
|
-
/* @__PURE__ */ A("p", { className: "ps-bp-subtitle", children:
|
|
7250
|
-
/* @__PURE__ */ A("div", { className: "ps-tryon-sf-fields", style: { flex: 1, overflowY: "auto" }, children: v.map((
|
|
7251
|
-
const N = g[
|
|
7248
|
+
/* @__PURE__ */ A("h3", { className: "ps-bp-title", style: { fontSize: "1.1vw" }, children: i("Here's what we estimated") }),
|
|
7249
|
+
/* @__PURE__ */ A("p", { className: "ps-bp-subtitle", children: i("Tap any value to adjust if needed") }),
|
|
7250
|
+
/* @__PURE__ */ A("div", { className: "ps-tryon-sf-fields", style: { flex: 1, overflowY: "auto" }, children: v.map((K) => {
|
|
7251
|
+
const N = g[K.key], x = C.current[K.key] ? parseFloat(C.current[K.key]) : null, E = N || x;
|
|
7252
7252
|
if (!E) return null;
|
|
7253
|
-
const BA = !N && !!
|
|
7254
|
-
return C.current[
|
|
7253
|
+
const BA = !N && !!x;
|
|
7254
|
+
return C.current[K.key] || (C.current[K.key] = String(E)), /* @__PURE__ */ A("div", { className: "ps-tryon-sf-float-row", children: /* @__PURE__ */ P("div", { className: "ps-tryon-sf-float-field", children: [
|
|
7255
7255
|
/* @__PURE__ */ P("label", { className: "ps-tryon-sf-float-label", children: [
|
|
7256
|
-
|
|
7256
|
+
i(K.label),
|
|
7257
7257
|
" (",
|
|
7258
7258
|
k,
|
|
7259
7259
|
") ",
|
|
7260
|
-
BA ? /* @__PURE__ */ A("span", { className: "ps-tryon-sf-entered-badge", children:
|
|
7260
|
+
BA ? /* @__PURE__ */ A("span", { className: "ps-tryon-sf-entered-badge", children: i("ENTERED") }) : /* @__PURE__ */ A("span", { className: "ps-tryon-sf-estimated-badge", children: i("ESTIMATED") })
|
|
7261
7261
|
] }),
|
|
7262
7262
|
/* @__PURE__ */ A(
|
|
7263
7263
|
"input",
|
|
@@ -7266,18 +7266,18 @@ function eB({
|
|
|
7266
7266
|
placeholder: " ",
|
|
7267
7267
|
className: "ps-tryon-sf-input",
|
|
7268
7268
|
defaultValue: E,
|
|
7269
|
-
onInput: (c) => p(
|
|
7269
|
+
onInput: (c) => p(K.key, c.target.value)
|
|
7270
7270
|
}
|
|
7271
7271
|
)
|
|
7272
|
-
] }) },
|
|
7272
|
+
] }) }, K.key);
|
|
7273
7273
|
}) }, `est-${r}`),
|
|
7274
7274
|
/* @__PURE__ */ P("div", { className: "ps-bp-nav", children: [
|
|
7275
7275
|
/* @__PURE__ */ P("button", { type: "button", className: "ps-bp-back-btn", onClick: () => h("body-profile"), children: [
|
|
7276
7276
|
/* @__PURE__ */ A("span", { className: "ps-bp-back-arrow", children: "←" }),
|
|
7277
7277
|
" ",
|
|
7278
|
-
|
|
7278
|
+
i("Back")
|
|
7279
7279
|
] }),
|
|
7280
|
-
/* @__PURE__ */ A("button", { className: "ps-bp-next-btn", onClick: I, children:
|
|
7280
|
+
/* @__PURE__ */ A("button", { className: "ps-bp-next-btn", onClick: I, children: i("What is my size?") })
|
|
7281
7281
|
] })
|
|
7282
7282
|
] })
|
|
7283
7283
|
] });
|
|
@@ -7354,14 +7354,14 @@ function CB({ landmarks: f, w: n, h: g }) {
|
|
|
7354
7354
|
preserveAspectRatio: "xMidYMid meet",
|
|
7355
7355
|
children: [
|
|
7356
7356
|
DB.map(([e, B], C) => {
|
|
7357
|
-
const D = f[e],
|
|
7358
|
-
return !D || !
|
|
7357
|
+
const D = f[e], t = f[B];
|
|
7358
|
+
return !D || !t ? null : /* @__PURE__ */ A(
|
|
7359
7359
|
"line",
|
|
7360
7360
|
{
|
|
7361
7361
|
x1: D.x * n,
|
|
7362
7362
|
y1: D.y * g,
|
|
7363
|
-
x2:
|
|
7364
|
-
y2:
|
|
7363
|
+
x2: t.x * n,
|
|
7364
|
+
y2: t.y * g,
|
|
7365
7365
|
stroke: "rgba(100,210,255,0.9)",
|
|
7366
7366
|
strokeWidth: "4",
|
|
7367
7367
|
strokeLinecap: "round",
|
|
@@ -7405,10 +7405,10 @@ function iB({ t: f }) {
|
|
|
7405
7405
|
return JA(() => {
|
|
7406
7406
|
n.current = Date.now();
|
|
7407
7407
|
const D = setInterval(() => {
|
|
7408
|
-
const
|
|
7408
|
+
const t = (Date.now() - n.current) / 1e3, o = Math.min(95, t / wP * 100), r = Math.round(o);
|
|
7409
7409
|
if (e.current && (e.current.style.width = `${r}%`), C.current && (C.current.textContent = `${r}%`), g.current && (g.current.style.strokeDashoffset = String(IP * (1 - o / 100))), B.current) {
|
|
7410
|
-
const z = Math.max(0, wP - Math.floor(
|
|
7411
|
-
B.current.textContent =
|
|
7410
|
+
const z = Math.max(0, wP - Math.floor(t));
|
|
7411
|
+
B.current.textContent = t >= wP ? "•••" : `~${z}s`;
|
|
7412
7412
|
}
|
|
7413
7413
|
}, 200);
|
|
7414
7414
|
return () => clearInterval(D);
|
|
@@ -7444,7 +7444,7 @@ function rn({
|
|
|
7444
7444
|
onSwitchToManual: C,
|
|
7445
7445
|
t: D
|
|
7446
7446
|
}) {
|
|
7447
|
-
const
|
|
7447
|
+
const t = f || n || "", o = !!f, r = B ? [
|
|
7448
7448
|
{ title: D("GENERATING TRY-ON"), desc: D("Rendering the garment on your photo."), viewfinderText: D("GENERATING") },
|
|
7449
7449
|
{ title: D("REFINING DETAILS"), desc: D("Fine-tuning fit, drape and shadows."), viewfinderText: D("REFINING") },
|
|
7450
7450
|
{ title: D("ALMOST THERE"), desc: D("Final compositing in progress."), viewfinderText: D("COMPOSITING") },
|
|
@@ -7460,8 +7460,8 @@ function rn({
|
|
|
7460
7460
|
{ title: D("ESTIMATING BODY"), desc: D("Computing chest, waist, hips, sleeve and inseam from your basics."), viewfinderText: D("ESTIMATING BODY") },
|
|
7461
7461
|
{ title: D("MATCHING SIZE"), desc: D("Comparing your measurements to the garment's size guide."), viewfinderText: D("MATCHING SIZE") },
|
|
7462
7462
|
{ title: D("FINALIZING RESULT"), desc: D("Almost done — preparing your recommendation."), viewfinderText: D("FINALIZING") }
|
|
7463
|
-
], [z, p] = j({ w: 800, h: 1200 }), T = (
|
|
7464
|
-
const k =
|
|
7463
|
+
], [z, p] = j({ w: 800, h: 1200 }), T = (i) => {
|
|
7464
|
+
const k = i.currentTarget;
|
|
7465
7465
|
p({ w: k.naturalWidth || k.offsetWidth, h: k.naturalHeight || k.offsetHeight });
|
|
7466
7466
|
}, [F, h] = j(0);
|
|
7467
7467
|
JA(() => {
|
|
@@ -7475,10 +7475,10 @@ function rn({
|
|
|
7475
7475
|
const W = r[F] ?? r[0];
|
|
7476
7476
|
return /* @__PURE__ */ P("div", { className: "ps-msc-root", children: [
|
|
7477
7477
|
/* @__PURE__ */ P("div", { className: "ps-msc-viewfinder", children: [
|
|
7478
|
-
|
|
7478
|
+
t && /* @__PURE__ */ A(
|
|
7479
7479
|
"img",
|
|
7480
7480
|
{
|
|
7481
|
-
src:
|
|
7481
|
+
src: t,
|
|
7482
7482
|
alt: D("Your photo"),
|
|
7483
7483
|
className: "ps-msc-photo",
|
|
7484
7484
|
onLoad: T
|
|
@@ -7529,7 +7529,7 @@ function HB({
|
|
|
7529
7529
|
sectionEntries: B,
|
|
7530
7530
|
onSelectSection: C,
|
|
7531
7531
|
onTryOn: D,
|
|
7532
|
-
tryOnProcessing:
|
|
7532
|
+
tryOnProcessing: t,
|
|
7533
7533
|
resultImageUrl: o,
|
|
7534
7534
|
tryOnDone: r,
|
|
7535
7535
|
onTryAgain: z,
|
|
@@ -7538,24 +7538,24 @@ function HB({
|
|
|
7538
7538
|
showLines: F,
|
|
7539
7539
|
onToggleLines: h,
|
|
7540
7540
|
onImageLoad: W,
|
|
7541
|
-
t
|
|
7541
|
+
t: i
|
|
7542
7542
|
}) {
|
|
7543
7543
|
const k = vf(() => {
|
|
7544
7544
|
const I = [...g?.matchDetails || []];
|
|
7545
7545
|
if (g?.sections)
|
|
7546
|
-
for (const
|
|
7547
|
-
|
|
7546
|
+
for (const K of Object.values(g.sections))
|
|
7547
|
+
K.matchDetails && I.push(...K.matchDetails);
|
|
7548
7548
|
if (I.length > 0) {
|
|
7549
|
-
const
|
|
7550
|
-
(
|
|
7551
|
-
).length, N = Math.round(
|
|
7549
|
+
const K = I.filter(
|
|
7550
|
+
(x) => x.fit === "good" || x.fit === "a-bit-tight" || x.fit === "a-bit-loose"
|
|
7551
|
+
).length, N = Math.round(K / I.length * 100);
|
|
7552
7552
|
return Math.max(70, N);
|
|
7553
7553
|
}
|
|
7554
7554
|
return g?.confidence === "high" ? 96 : g?.confidence === "medium" ? 84 : 72;
|
|
7555
7555
|
}, [g]), u = o || f, v = !!o;
|
|
7556
7556
|
return /* @__PURE__ */ P("div", { className: "ps-msr-root", children: [
|
|
7557
7557
|
/* @__PURE__ */ P("div", { className: "ps-msr-scroll", children: [
|
|
7558
|
-
/* @__PURE__ */ A("div", { className: "ps-msr-eyebrow", children:
|
|
7558
|
+
/* @__PURE__ */ A("div", { className: "ps-msr-eyebrow", children: i("Sizing Profile") }),
|
|
7559
7559
|
/* @__PURE__ */ P("div", { className: "ps-msr-product", children: [
|
|
7560
7560
|
/* @__PURE__ */ P("div", { className: `ps-msr-product-img-wrap${v ? " ps-tryon" : ""}`, children: [
|
|
7561
7561
|
/* @__PURE__ */ A(
|
|
@@ -7568,7 +7568,7 @@ function HB({
|
|
|
7568
7568
|
}
|
|
7569
7569
|
),
|
|
7570
7570
|
F && T,
|
|
7571
|
-
!v && /* @__PURE__ */ A("button", { type: "button", className: "ps-msr-bookmark", "aria-label":
|
|
7571
|
+
!v && /* @__PURE__ */ A("button", { type: "button", className: "ps-msr-bookmark", "aria-label": i("Save"), children: /* @__PURE__ */ A(rB, {}) }),
|
|
7572
7572
|
v && h && /* @__PURE__ */ P(
|
|
7573
7573
|
"button",
|
|
7574
7574
|
{
|
|
@@ -7578,7 +7578,7 @@ function HB({
|
|
|
7578
7578
|
"aria-pressed": !!F,
|
|
7579
7579
|
children: [
|
|
7580
7580
|
/* @__PURE__ */ A(QB, {}),
|
|
7581
|
-
|
|
7581
|
+
i(F ? "Hide Fit" : "Show Fit")
|
|
7582
7582
|
]
|
|
7583
7583
|
}
|
|
7584
7584
|
)
|
|
@@ -7609,10 +7609,10 @@ function HB({
|
|
|
7609
7609
|
"%"
|
|
7610
7610
|
] })
|
|
7611
7611
|
] }),
|
|
7612
|
-
/* @__PURE__ */ A("span", { className: "ps-msr-match-label", children:
|
|
7612
|
+
/* @__PURE__ */ A("span", { className: "ps-msr-match-label", children: i("FIT MATCH") })
|
|
7613
7613
|
] }) }),
|
|
7614
|
-
/* @__PURE__ */ A("div", { className: "ps-msr-sections", children: B.map(({ name: I, secResult:
|
|
7615
|
-
const N = I.replace(/\s*[—–-]\s*.*/g, ""),
|
|
7614
|
+
/* @__PURE__ */ A("div", { className: "ps-msr-sections", children: B.map(({ name: I, secResult: K }) => {
|
|
7615
|
+
const N = I.replace(/\s*[—–-]\s*.*/g, ""), x = K, E = x.found === !1 ? i("No fit") : x.size || K.recommendedSize;
|
|
7616
7616
|
return /* @__PURE__ */ P(
|
|
7617
7617
|
"button",
|
|
7618
7618
|
{
|
|
@@ -7635,7 +7635,7 @@ function HB({
|
|
|
7635
7635
|
type: "button",
|
|
7636
7636
|
className: "ps-msr-tryon-cta ps-secondary",
|
|
7637
7637
|
onClick: z,
|
|
7638
|
-
children:
|
|
7638
|
+
children: i("Try Again")
|
|
7639
7639
|
}
|
|
7640
7640
|
),
|
|
7641
7641
|
/* @__PURE__ */ A(
|
|
@@ -7644,7 +7644,7 @@ function HB({
|
|
|
7644
7644
|
type: "button",
|
|
7645
7645
|
className: "ps-msr-tryon-cta",
|
|
7646
7646
|
onClick: p,
|
|
7647
|
-
children:
|
|
7647
|
+
children: i("Continue Shopping")
|
|
7648
7648
|
}
|
|
7649
7649
|
)
|
|
7650
7650
|
] }) : (
|
|
@@ -7656,10 +7656,10 @@ function HB({
|
|
|
7656
7656
|
type: "button",
|
|
7657
7657
|
className: "ps-msr-tryon-cta",
|
|
7658
7658
|
onClick: D,
|
|
7659
|
-
disabled:
|
|
7659
|
+
disabled: t,
|
|
7660
7660
|
children: [
|
|
7661
7661
|
/* @__PURE__ */ A(tB, {}),
|
|
7662
|
-
t
|
|
7662
|
+
i(t ? "Processing..." : "See how it looks on yourself")
|
|
7663
7663
|
]
|
|
7664
7664
|
}
|
|
7665
7665
|
)
|
|
@@ -7691,14 +7691,14 @@ function kn({ t: f, isActive: n }) {
|
|
|
7691
7691
|
return;
|
|
7692
7692
|
}
|
|
7693
7693
|
g.current = Date.now();
|
|
7694
|
-
const
|
|
7694
|
+
const t = setInterval(() => {
|
|
7695
7695
|
const o = g.current || Date.now(), r = (Date.now() - o) / 1e3, z = Math.min(95, r / vP * 100), p = Math.round(z);
|
|
7696
7696
|
if (B.current && (B.current.style.width = `${p}%`), D.current && (D.current.textContent = `${p}%`), e.current && (e.current.style.strokeDashoffset = String(RP * (1 - z / 100))), C.current) {
|
|
7697
7697
|
const T = Math.max(0, vP - Math.floor(r));
|
|
7698
7698
|
C.current.textContent = r >= vP ? "•••" : `~${T}s`;
|
|
7699
7699
|
}
|
|
7700
7700
|
}, 200);
|
|
7701
|
-
return () => clearInterval(
|
|
7701
|
+
return () => clearInterval(t);
|
|
7702
7702
|
}, [n]), n ? /* @__PURE__ */ P("div", { className: "ps-tryon-progress-wrap", children: [
|
|
7703
7703
|
/* @__PURE__ */ P("div", { className: "ps-tryon-progress-ring", children: [
|
|
7704
7704
|
/* @__PURE__ */ P("svg", { width: "64", height: "64", viewBox: "0 0 64 64", "aria-hidden": "true", children: [
|
|
@@ -7756,11 +7756,11 @@ function cB({
|
|
|
7756
7756
|
[f.leftMouth, f.rightMouth]
|
|
7757
7757
|
];
|
|
7758
7758
|
return /* @__PURE__ */ P("svg", { className: "ps-tryon-pose-overlay", viewBox: `0 0 ${e} ${B}`, preserveAspectRatio: "xMidYMid meet", children: [
|
|
7759
|
-
D.map(([
|
|
7759
|
+
D.map(([t, o], r) => /* @__PURE__ */ A(
|
|
7760
7760
|
"line",
|
|
7761
7761
|
{
|
|
7762
|
-
x1:
|
|
7763
|
-
y1:
|
|
7762
|
+
x1: t.x * e,
|
|
7763
|
+
y1: t.y * B,
|
|
7764
7764
|
x2: o.x * e,
|
|
7765
7765
|
y2: o.y * B,
|
|
7766
7766
|
stroke: "rgba(100,210,255,0.55)",
|
|
@@ -7771,13 +7771,13 @@ function cB({
|
|
|
7771
7771
|
},
|
|
7772
7772
|
`fl-${r}`
|
|
7773
7773
|
)),
|
|
7774
|
-
[f.leftIrisCenter, f.rightIrisCenter].map((
|
|
7775
|
-
const r = o === 0 ? f.leftIrisRing : f.rightIrisRing, z = r?.length ? Math.abs((r[0]?.x ??
|
|
7774
|
+
[f.leftIrisCenter, f.rightIrisCenter].map((t, o) => {
|
|
7775
|
+
const r = o === 0 ? f.leftIrisRing : f.rightIrisRing, z = r?.length ? Math.abs((r[0]?.x ?? t.x) - (r[2]?.x ?? t.x)) * e / 2 : 6;
|
|
7776
7776
|
return /* @__PURE__ */ A(
|
|
7777
7777
|
"circle",
|
|
7778
7778
|
{
|
|
7779
|
-
cx:
|
|
7780
|
-
cy:
|
|
7779
|
+
cx: t.x * e,
|
|
7780
|
+
cy: t.y * B,
|
|
7781
7781
|
r: Math.max(6, z),
|
|
7782
7782
|
fill: "none",
|
|
7783
7783
|
stroke: "rgba(255,230,120,0.95)",
|
|
@@ -7788,7 +7788,7 @@ function cB({
|
|
|
7788
7788
|
`iris-${o}`
|
|
7789
7789
|
);
|
|
7790
7790
|
}),
|
|
7791
|
-
C.map(({ key:
|
|
7791
|
+
C.map(({ key: t, p: o }, r) => /* @__PURE__ */ P("g", { children: [
|
|
7792
7792
|
/* @__PURE__ */ A(
|
|
7793
7793
|
"circle",
|
|
7794
7794
|
{
|
|
@@ -7811,7 +7811,7 @@ function cB({
|
|
|
7811
7811
|
style: { animation: `ps-pose-fade 0.3s ease ${r * 0.04}s forwards, ps-dot-pulse 1.5s ease-in-out ${0.5 + r * 0.04}s infinite` }
|
|
7812
7812
|
}
|
|
7813
7813
|
)
|
|
7814
|
-
] },
|
|
7814
|
+
] }, t))
|
|
7815
7815
|
] });
|
|
7816
7816
|
}
|
|
7817
7817
|
function pB({
|
|
@@ -7845,17 +7845,17 @@ function pB({
|
|
|
7845
7845
|
{ title: B("REFINING DETAILS"), desc: B("Fine-tuning fit, drape and shadows.") },
|
|
7846
7846
|
{ title: B("ALMOST THERE"), desc: B("Final compositing in progress.") },
|
|
7847
7847
|
{ title: B("FINISHING TOUCHES"), desc: B("Polishing the result.") }
|
|
7848
|
-
],
|
|
7848
|
+
], t = g ? D : C, o = g ? !!e : n, [r, z] = j(0);
|
|
7849
7849
|
JA(() => {
|
|
7850
7850
|
z(0);
|
|
7851
7851
|
}, [g]), JA(() => {
|
|
7852
7852
|
if (o) return;
|
|
7853
7853
|
const F = setInterval(() => {
|
|
7854
|
-
z((h) => Math.min(h + 1,
|
|
7854
|
+
z((h) => Math.min(h + 1, t.length - 1));
|
|
7855
7855
|
}, g ? 2200 : 900);
|
|
7856
7856
|
return () => clearInterval(F);
|
|
7857
|
-
}, [o,
|
|
7858
|
-
const p =
|
|
7857
|
+
}, [o, t.length, g]);
|
|
7858
|
+
const p = t[r] ?? t[0];
|
|
7859
7859
|
return /* @__PURE__ */ P("div", { className: "ps-msc-stage", style: { alignSelf: "center", marginTop: "auto", marginBottom: "auto" }, children: [
|
|
7860
7860
|
/* @__PURE__ */ P("div", { className: "ps-msc-stage-slot", children: [
|
|
7861
7861
|
/* @__PURE__ */ A("div", { className: "ps-msc-stage-title", children: p.title }),
|
|
@@ -7867,7 +7867,7 @@ function pB({
|
|
|
7867
7867
|
function Qn({ landmarks: f, imgWidth: n, imgHeight: g }) {
|
|
7868
7868
|
const e = n, B = g;
|
|
7869
7869
|
return /* @__PURE__ */ P("svg", { className: "ps-tryon-pose-overlay", viewBox: `0 0 ${e} ${B}`, preserveAspectRatio: "xMidYMid meet", children: [
|
|
7870
|
-
zB.map(([C, D],
|
|
7870
|
+
zB.map(([C, D], t) => {
|
|
7871
7871
|
const o = f[C], r = f[D];
|
|
7872
7872
|
return !o || !r || typeof o != "object" || typeof r != "object" || typeof o.x != "number" || typeof o.y != "number" || typeof r.x != "number" || typeof r.y != "number" ? null : /* @__PURE__ */ A(
|
|
7873
7873
|
"line",
|
|
@@ -7880,12 +7880,12 @@ function Qn({ landmarks: f, imgWidth: n, imgHeight: g }) {
|
|
|
7880
7880
|
strokeWidth: "4",
|
|
7881
7881
|
strokeLinecap: "round",
|
|
7882
7882
|
opacity: "0",
|
|
7883
|
-
style: { animation: `ps-pose-fade 0.4s ease ${
|
|
7883
|
+
style: { animation: `ps-pose-fade 0.4s ease ${t * 0.05}s forwards` }
|
|
7884
7884
|
},
|
|
7885
|
-
`l-${
|
|
7885
|
+
`l-${t}`
|
|
7886
7886
|
);
|
|
7887
7887
|
}),
|
|
7888
|
-
Object.entries(f).filter(([, C]) => C && typeof C == "object" && typeof C.x == "number" && typeof C.y == "number").map(([C, D],
|
|
7888
|
+
Object.entries(f).filter(([, C]) => C && typeof C == "object" && typeof C.x == "number" && typeof C.y == "number").map(([C, D], t) => /* @__PURE__ */ P("g", { children: [
|
|
7889
7889
|
/* @__PURE__ */ A(
|
|
7890
7890
|
"circle",
|
|
7891
7891
|
{
|
|
@@ -7894,7 +7894,7 @@ function Qn({ landmarks: f, imgWidth: n, imgHeight: g }) {
|
|
|
7894
7894
|
r: "14",
|
|
7895
7895
|
fill: "rgba(100,210,255,0.25)",
|
|
7896
7896
|
opacity: "0",
|
|
7897
|
-
style: { animation: `ps-pose-fade 0.3s ease ${
|
|
7897
|
+
style: { animation: `ps-pose-fade 0.3s ease ${t * 0.04}s forwards` }
|
|
7898
7898
|
}
|
|
7899
7899
|
),
|
|
7900
7900
|
/* @__PURE__ */ A(
|
|
@@ -7905,7 +7905,7 @@ function Qn({ landmarks: f, imgWidth: n, imgHeight: g }) {
|
|
|
7905
7905
|
r: "8",
|
|
7906
7906
|
fill: "rgba(100,210,255,0.9)",
|
|
7907
7907
|
opacity: "0",
|
|
7908
|
-
style: { animation: `ps-pose-fade 0.3s ease ${
|
|
7908
|
+
style: { animation: `ps-pose-fade 0.3s ease ${t * 0.04}s forwards, ps-dot-pulse 1.5s ease-in-out ${0.5 + t * 0.04}s infinite` }
|
|
7909
7909
|
}
|
|
7910
7910
|
)
|
|
7911
7911
|
] }, C))
|
|
@@ -7917,20 +7917,20 @@ function $f({ lines: f, fitRows: n, show: g, imgWidth: e, imgHeight: B }) {
|
|
|
7917
7917
|
{ key: "chest", line: f.chest, label: "Chest" },
|
|
7918
7918
|
{ key: "waist", line: f.waist, label: "Waist" },
|
|
7919
7919
|
{ key: "hips", line: f.hips, label: "Hips" }
|
|
7920
|
-
],
|
|
7921
|
-
return /* @__PURE__ */ A("svg", { className: "ps-tryon-pose-overlay", viewBox: `0 0 ${
|
|
7920
|
+
], t = e, o = B, r = Math.max(t, o) / 500, z = Math.max(5, 3 * r), p = Math.max(7, 5 * r);
|
|
7921
|
+
return /* @__PURE__ */ A("svg", { className: "ps-tryon-pose-overlay", viewBox: `0 0 ${t} ${o}`, preserveAspectRatio: "xMidYMid meet", children: D.map(({ key: T, line: F, label: h }, W) => {
|
|
7922
7922
|
if (!F || typeof F.x1 != "number" || typeof F.x2 != "number" || typeof F.y != "number") return null;
|
|
7923
|
-
const
|
|
7923
|
+
const i = F.x1 * t, k = F.x2 * t, u = F.y * o, v = k - i, I = v * 0.06, K = (i + k) / 2, N = n.find((mA) => {
|
|
7924
7924
|
const EA = mA.area.toLowerCase().trim();
|
|
7925
7925
|
return !!(EA === T || T === "chest" && (EA.includes("bust") || EA.includes("chest")) || T === "waist" && EA.includes("waist") || T === "hips" && (EA.includes("hip") || EA === "hips"));
|
|
7926
|
-
}),
|
|
7926
|
+
}), x = N ? C(N.fit) : "#2154EF", E = W * 0.35, BA = `M ${i} ${u} Q ${K} ${u + I} ${k} ${u}`, c = v * 1.05, hA = N ? N.fit === "good" ? "✓ Fit" : N.isLength ? N.fit.includes("short") || N.fit.includes("tight") ? "Short" : "Long" : N.fit.includes("tight") ? "Tight" : "Loose" : h, l = Math.round(14 * r), y = hA.length * l * 0.62, sA = t - k - 12 * r < y, V = sA ? i - 10 * r : k + 10 * r, s = sA ? "end" : "start", PA = sA ? i : k, RA = sA ? i - 6 * r : k + 6 * r;
|
|
7927
7927
|
return /* @__PURE__ */ P("g", { children: [
|
|
7928
7928
|
/* @__PURE__ */ A(
|
|
7929
7929
|
"path",
|
|
7930
7930
|
{
|
|
7931
7931
|
d: BA,
|
|
7932
7932
|
fill: "none",
|
|
7933
|
-
stroke:
|
|
7933
|
+
stroke: x,
|
|
7934
7934
|
strokeWidth: z,
|
|
7935
7935
|
strokeLinecap: "round",
|
|
7936
7936
|
strokeDasharray: c,
|
|
@@ -7941,10 +7941,10 @@ function $f({ lines: f, fitRows: n, show: g, imgWidth: e, imgHeight: B }) {
|
|
|
7941
7941
|
/* @__PURE__ */ A(
|
|
7942
7942
|
"circle",
|
|
7943
7943
|
{
|
|
7944
|
-
cx:
|
|
7944
|
+
cx: i,
|
|
7945
7945
|
cy: u,
|
|
7946
7946
|
r: p,
|
|
7947
|
-
fill:
|
|
7947
|
+
fill: x,
|
|
7948
7948
|
opacity: "0",
|
|
7949
7949
|
style: { animation: `ps-pose-fade 0.3s ease ${E + 0.5}s forwards` }
|
|
7950
7950
|
}
|
|
@@ -7955,7 +7955,7 @@ function $f({ lines: f, fitRows: n, show: g, imgWidth: e, imgHeight: B }) {
|
|
|
7955
7955
|
cx: k,
|
|
7956
7956
|
cy: u,
|
|
7957
7957
|
r: p,
|
|
7958
|
-
fill:
|
|
7958
|
+
fill: x,
|
|
7959
7959
|
opacity: "0",
|
|
7960
7960
|
style: { animation: `ps-pose-fade 0.3s ease ${E + 0.5}s forwards` }
|
|
7961
7961
|
}
|
|
@@ -7968,7 +7968,7 @@ function $f({ lines: f, fitRows: n, show: g, imgWidth: e, imgHeight: B }) {
|
|
|
7968
7968
|
y1: u,
|
|
7969
7969
|
x2: RA,
|
|
7970
7970
|
y2: u,
|
|
7971
|
-
stroke:
|
|
7971
|
+
stroke: x,
|
|
7972
7972
|
strokeWidth: 2 * r
|
|
7973
7973
|
}
|
|
7974
7974
|
),
|
|
@@ -7977,7 +7977,7 @@ function $f({ lines: f, fitRows: n, show: g, imgWidth: e, imgHeight: B }) {
|
|
|
7977
7977
|
{
|
|
7978
7978
|
x: V,
|
|
7979
7979
|
y: u + 1 * r,
|
|
7980
|
-
fill:
|
|
7980
|
+
fill: x,
|
|
7981
7981
|
fontSize: l,
|
|
7982
7982
|
fontWeight: "700",
|
|
7983
7983
|
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
@@ -8038,7 +8038,7 @@ function DP({
|
|
|
8038
8038
|
unitLbl: B,
|
|
8039
8039
|
chartUnit: C,
|
|
8040
8040
|
lengthEntry: D,
|
|
8041
|
-
onBack:
|
|
8041
|
+
onBack: t,
|
|
8042
8042
|
t: o,
|
|
8043
8043
|
productImage: r,
|
|
8044
8044
|
productTitle: z,
|
|
@@ -8047,14 +8047,14 @@ function DP({
|
|
|
8047
8047
|
showLines: F,
|
|
8048
8048
|
onToggleLines: h,
|
|
8049
8049
|
overlayNode: W,
|
|
8050
|
-
onImageLoad:
|
|
8050
|
+
onImageLoad: i,
|
|
8051
8051
|
onTryOn: k,
|
|
8052
8052
|
tryOnProcessing: u,
|
|
8053
8053
|
backLabel: v,
|
|
8054
8054
|
internationalSizes: I,
|
|
8055
|
-
continueLabel:
|
|
8055
|
+
continueLabel: K,
|
|
8056
8056
|
renderRaw: N = !1,
|
|
8057
|
-
sectionFound:
|
|
8057
|
+
sectionFound: x
|
|
8058
8058
|
}) {
|
|
8059
8059
|
const E = g?.recommendedSize || "", [BA, c] = j(null), hA = B.toLowerCase(), l = hA.includes("mm") ? "mm" : hA.includes("cm") ? "cm" : "in", y = C || l, XA = (a) => hn(a, y, l), sA = (a) => UB(a, y, l), V = I ? Object.keys(I) : [], [s, PA] = j(null), RA = D?.secResult?.recommendedSize || "", [mA, EA] = j(null), ZA = vf(() => {
|
|
8060
8060
|
if (!D) return [];
|
|
@@ -8202,12 +8202,12 @@ function DP({
|
|
|
8202
8202
|
let { min: Bf, max: FA } = QP(J.chartRange), OA = J.chartRange;
|
|
8203
8203
|
const AA = ff(J.measurement, bA);
|
|
8204
8204
|
AA && (OA = AA.range, Bf = AA.min, FA = AA.max);
|
|
8205
|
-
const LA = FA - Bf, Pf = LA > 0 ? LA * 0.5 : Bf * 0.05 || 3, lA = J.measurement.toLowerCase(),
|
|
8205
|
+
const LA = FA - Bf, Pf = LA > 0 ? LA * 0.5 : Bf * 0.05 || 3, lA = J.measurement.toLowerCase(), O = /length|inseam|sleeve|hem|rise/.test(lA);
|
|
8206
8206
|
let q;
|
|
8207
8207
|
const QA = Math.max((FA || Bf) * 0.03, 0.5);
|
|
8208
8208
|
if (gA >= Bf - QA && gA <= FA + QA)
|
|
8209
8209
|
q = "good";
|
|
8210
|
-
else if (
|
|
8210
|
+
else if (O) {
|
|
8211
8211
|
const U = gA > FA ? gA - FA : Bf - gA;
|
|
8212
8212
|
q = (U > Pf * 2 ? "too-" : U > Pf ? "" : "a-bit-") + (gA > FA ? "short" : "long");
|
|
8213
8213
|
} else if (gA < Bf) {
|
|
@@ -8217,7 +8217,7 @@ function DP({
|
|
|
8217
8217
|
const U = gA - FA;
|
|
8218
8218
|
q = U > Pf * 2 ? "too-tight" : U > Pf ? "tight" : "a-bit-tight";
|
|
8219
8219
|
}
|
|
8220
|
-
return { area: J.measurement, userNum: gA, chartLabel: kP(OA), fit: q, isLength:
|
|
8220
|
+
return { area: J.measurement, userNum: gA, chartLabel: kP(OA), fit: q, isLength: O };
|
|
8221
8221
|
});
|
|
8222
8222
|
}, [g, D, e, bA, E, ff, mA, RA, N]), nf = iA.filter(
|
|
8223
8223
|
(a) => a.fit === "good" || a.fit === "a-bit-tight" || a.fit === "a-bit-loose"
|
|
@@ -8243,7 +8243,7 @@ function DP({
|
|
|
8243
8243
|
}, nA = (H, oA) => oA && H === "good" ? o("EDITORIAL LENGTH") : H === "good" ? o("PERFECT TENSION") : H === "a-bit-tight" ? o("SLIGHTLY TIGHT") : H === "a-bit-loose" ? o("SLIGHT EASE") : H.includes("tight") ? o("TIGHT") : H.includes("loose") ? o("LOOSE") : o("FIT");
|
|
8244
8244
|
return /* @__PURE__ */ A("div", { className: "ps-msd-root", children: /* @__PURE__ */ P("div", { className: "ps-msd-scroll", children: [
|
|
8245
8245
|
/* @__PURE__ */ P("div", { className: "ps-msd-topbar", children: [
|
|
8246
|
-
/* @__PURE__ */ A("button", { type: "button", className: "ps-msd-back", onClick:
|
|
8246
|
+
/* @__PURE__ */ A("button", { type: "button", className: "ps-msd-back", onClick: t, "aria-label": o("Back"), children: /* @__PURE__ */ P("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "20", height: "20", children: [
|
|
8247
8247
|
/* @__PURE__ */ A("line", { x1: "19", y1: "12", x2: "5", y2: "12" }),
|
|
8248
8248
|
/* @__PURE__ */ A("polyline", { points: "12 19 5 12 12 5" })
|
|
8249
8249
|
] }) }),
|
|
@@ -8261,7 +8261,7 @@ function DP({
|
|
|
8261
8261
|
src: r,
|
|
8262
8262
|
alt: z || "",
|
|
8263
8263
|
className: "ps-msd-image-img",
|
|
8264
|
-
onLoad:
|
|
8264
|
+
onLoad: i
|
|
8265
8265
|
}
|
|
8266
8266
|
),
|
|
8267
8267
|
F && W,
|
|
@@ -8284,7 +8284,7 @@ function DP({
|
|
|
8284
8284
|
}
|
|
8285
8285
|
)
|
|
8286
8286
|
] }),
|
|
8287
|
-
|
|
8287
|
+
x === !1 && /* @__PURE__ */ A("div", { style: {
|
|
8288
8288
|
flex: 1,
|
|
8289
8289
|
display: "flex",
|
|
8290
8290
|
alignItems: "center",
|
|
@@ -8301,7 +8301,7 @@ function DP({
|
|
|
8301
8301
|
/* @__PURE__ */ A("p", { style: { fontSize: "15px", fontWeight: 600, color: "var(--ps-text-primary)", margin: "10px 0 6px", lineHeight: 1.4 }, children: o("We couldn't find a size that fits for this product.") }),
|
|
8302
8302
|
/* @__PURE__ */ A("p", { className: "ps-msd-card-note", style: { margin: 0, lineHeight: 1.5 }, children: o("Your measurements are outside this product's size range. You can still try it on visually below.") })
|
|
8303
8303
|
] }) }),
|
|
8304
|
-
|
|
8304
|
+
x !== !1 && /* @__PURE__ */ P("div", { className: "ps-msd-card", children: [
|
|
8305
8305
|
/* @__PURE__ */ A("span", { className: "ps-msd-card-eyebrow", children: o(bA === $ ? "RECOMMENDED SIZE" : "TRYING SIZE") }),
|
|
8306
8306
|
/* @__PURE__ */ P("div", { style: { display: "flex", alignItems: "center", gap: "10px", marginTop: "6px", marginBottom: "4px" }, children: [
|
|
8307
8307
|
V.length > 1 && /* @__PURE__ */ P(
|
|
@@ -8361,7 +8361,7 @@ function DP({
|
|
|
8361
8361
|
] }),
|
|
8362
8362
|
/* @__PURE__ */ A("p", { className: "ps-msd-card-note", children: o("Based on your measurements and the garment's tailoring chart.") })
|
|
8363
8363
|
] }),
|
|
8364
|
-
|
|
8364
|
+
x !== !1 && iA.length > 0 && /* @__PURE__ */ P("div", { className: "ps-msd-blueprint", children: [
|
|
8365
8365
|
/* @__PURE__ */ A("span", { className: "ps-msd-blueprint-title", children: o("MEASUREMENT BLUEPRINT") }),
|
|
8366
8366
|
/* @__PURE__ */ A("div", { className: "ps-msd-blueprint-underline" }),
|
|
8367
8367
|
/* @__PURE__ */ A("div", { className: "ps-msd-rows", children: iA.map((H, oA) => {
|
|
@@ -8394,7 +8394,7 @@ function DP({
|
|
|
8394
8394
|
] }, oA);
|
|
8395
8395
|
}) })
|
|
8396
8396
|
] }),
|
|
8397
|
-
|
|
8397
|
+
x !== !1 && _.length > 1 && /* @__PURE__ */ P("div", { className: "ps-msd-sizes", children: [
|
|
8398
8398
|
/* @__PURE__ */ A("span", { className: "ps-msd-sizes-label", children: o("TRY ANOTHER SIZE") }),
|
|
8399
8399
|
/* @__PURE__ */ A("div", { className: "ps-msd-sizes-pills", children: _.map((H) => /* @__PURE__ */ A(
|
|
8400
8400
|
"button",
|
|
@@ -8407,7 +8407,7 @@ function DP({
|
|
|
8407
8407
|
H
|
|
8408
8408
|
)) })
|
|
8409
8409
|
] }),
|
|
8410
|
-
|
|
8410
|
+
x !== !1 && WA.length > 0 && /* @__PURE__ */ P("div", { className: "ps-msd-sizes", children: [
|
|
8411
8411
|
/* @__PURE__ */ A("span", { className: "ps-msd-sizes-label", children: o("LENGTH ADJUSTMENT") }),
|
|
8412
8412
|
/* @__PURE__ */ A("div", { className: "ps-msd-sizes-pills", children: WA.map((H) => {
|
|
8413
8413
|
const oA = String(qA ?? "").trim() === String(H ?? "").trim(), zA = Hf[String(H).trim()];
|
|
@@ -8427,7 +8427,7 @@ function DP({
|
|
|
8427
8427
|
);
|
|
8428
8428
|
}) })
|
|
8429
8429
|
] }),
|
|
8430
|
-
|
|
8430
|
+
x !== !1 && /* @__PURE__ */ P("p", { className: "ps-msd-footer-note", children: [
|
|
8431
8431
|
o("*Our sizing engine recommends"),
|
|
8432
8432
|
" ",
|
|
8433
8433
|
$,
|
|
@@ -8441,7 +8441,7 @@ function DP({
|
|
|
8441
8441
|
{
|
|
8442
8442
|
type: "button",
|
|
8443
8443
|
className: "ps-bp-back-btn",
|
|
8444
|
-
onClick:
|
|
8444
|
+
onClick: t,
|
|
8445
8445
|
style: { fontSize: 13, padding: "10px 6px" },
|
|
8446
8446
|
children: [
|
|
8447
8447
|
/* @__PURE__ */ A("span", { className: "ps-bp-back-arrow", children: "←" }),
|
|
@@ -8483,7 +8483,7 @@ function DP({
|
|
|
8483
8483
|
"button",
|
|
8484
8484
|
{
|
|
8485
8485
|
type: "button",
|
|
8486
|
-
onClick:
|
|
8486
|
+
onClick: t,
|
|
8487
8487
|
style: {
|
|
8488
8488
|
flex: 1,
|
|
8489
8489
|
padding: "12px 16px",
|
|
@@ -8501,7 +8501,7 @@ function DP({
|
|
|
8501
8501
|
gap: 6
|
|
8502
8502
|
},
|
|
8503
8503
|
children: [
|
|
8504
|
-
|
|
8504
|
+
K || o("Continue"),
|
|
8505
8505
|
" →"
|
|
8506
8506
|
]
|
|
8507
8507
|
}
|
|
@@ -8510,7 +8510,7 @@ function DP({
|
|
|
8510
8510
|
] }) });
|
|
8511
8511
|
}
|
|
8512
8512
|
return /* @__PURE__ */ P("div", { className: "ps-tryon-sec-detail", style: { padding: "1.5vw", display: "flex", flexDirection: "column", height: "100%", background: "#F8F9FA" }, children: [
|
|
8513
|
-
/* @__PURE__ */ A("div", { style: { flex: 1, minHeight: 0, overflowY: "auto", scrollbarWidth: "thin", scrollbarColor: "rgba(0,0,0,0.04) transparent", display:
|
|
8513
|
+
/* @__PURE__ */ A("div", { style: { flex: 1, minHeight: 0, overflowY: "auto", scrollbarWidth: "thin", scrollbarColor: "rgba(0,0,0,0.04) transparent", display: x === !1 ? "flex" : "block", alignItems: x === !1 ? "center" : void 0, justifyContent: x === !1 ? "center" : void 0 }, children: x === !1 ? /* @__PURE__ */ P("div", { style: {
|
|
8514
8514
|
background: "white",
|
|
8515
8515
|
borderRadius: "0.7vw",
|
|
8516
8516
|
border: "1px solid rgba(0,0,0,0.06)",
|
|
@@ -8673,7 +8673,7 @@ function DP({
|
|
|
8673
8673
|
] })
|
|
8674
8674
|
] }) }),
|
|
8675
8675
|
/* @__PURE__ */ P("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", paddingTop: "0.6vw", borderTop: "1px solid rgba(0,0,0,0.06)", flexShrink: 0 }, children: [
|
|
8676
|
-
/* @__PURE__ */ P("button", { className: "ps-bp-back-btn", onClick:
|
|
8676
|
+
/* @__PURE__ */ P("button", { className: "ps-bp-back-btn", onClick: t, type: "button", style: { fontSize: "0.7vw" }, children: [
|
|
8677
8677
|
/* @__PURE__ */ A("span", { className: "ps-bp-back-arrow", children: "←" }),
|
|
8678
8678
|
" ",
|
|
8679
8679
|
v || o("Back to sections")
|
|
@@ -8713,7 +8713,7 @@ function DP({
|
|
|
8713
8713
|
) : /* @__PURE__ */ P(
|
|
8714
8714
|
"button",
|
|
8715
8715
|
{
|
|
8716
|
-
onClick:
|
|
8716
|
+
onClick: t,
|
|
8717
8717
|
style: {
|
|
8718
8718
|
padding: "0.45vw 1.2vw",
|
|
8719
8719
|
borderRadius: "0.4vw",
|
|
@@ -8732,7 +8732,7 @@ function DP({
|
|
|
8732
8732
|
onMouseEnter: (a) => a.currentTarget.style.opacity = "0.9",
|
|
8733
8733
|
onMouseLeave: (a) => a.currentTarget.style.opacity = "1",
|
|
8734
8734
|
children: [
|
|
8735
|
-
|
|
8735
|
+
K || o("Continue"),
|
|
8736
8736
|
" →"
|
|
8737
8737
|
]
|
|
8738
8738
|
}
|
|
@@ -8748,7 +8748,7 @@ function EB({
|
|
|
8748
8748
|
productImage: B,
|
|
8749
8749
|
productTitle: C,
|
|
8750
8750
|
sizingUnit: D,
|
|
8751
|
-
setView:
|
|
8751
|
+
setView: t,
|
|
8752
8752
|
handleDownload: o,
|
|
8753
8753
|
onRetryWithFit: r,
|
|
8754
8754
|
retryLoading: z,
|
|
@@ -8757,14 +8757,14 @@ function EB({
|
|
|
8757
8757
|
handleFileSelect: F,
|
|
8758
8758
|
handleRemovePreview: h,
|
|
8759
8759
|
handleTryOnSubmit: W,
|
|
8760
|
-
tryOnProcessing:
|
|
8760
|
+
tryOnProcessing: i,
|
|
8761
8761
|
bodyLandmarks: k,
|
|
8762
8762
|
faceLandmarks: u = null,
|
|
8763
8763
|
measurementType: v = "body",
|
|
8764
8764
|
estimationDone: I = !1,
|
|
8765
|
-
activeSection:
|
|
8765
|
+
activeSection: K,
|
|
8766
8766
|
setActiveSection: N,
|
|
8767
|
-
onResetTryOn:
|
|
8767
|
+
onResetTryOn: x,
|
|
8768
8768
|
onClose: E,
|
|
8769
8769
|
userHeightCm: BA,
|
|
8770
8770
|
t: c
|
|
@@ -8846,7 +8846,7 @@ function EB({
|
|
|
8846
8846
|
R.naturalWidth && R.naturalHeight && $({ w: R.naturalWidth, h: R.naturalHeight });
|
|
8847
8847
|
}, []);
|
|
8848
8848
|
JA(() => {
|
|
8849
|
-
if (!e ||
|
|
8849
|
+
if (!e || i) {
|
|
8850
8850
|
nf(null), Ef(!1);
|
|
8851
8851
|
return;
|
|
8852
8852
|
}
|
|
@@ -8855,7 +8855,7 @@ function EB({
|
|
|
8855
8855
|
}).catch(() => {
|
|
8856
8856
|
Ef(!0);
|
|
8857
8857
|
});
|
|
8858
|
-
}, [e,
|
|
8858
|
+
}, [e, i]);
|
|
8859
8859
|
const [Of, cf] = j(!1), [Mf, gf] = j(!1);
|
|
8860
8860
|
tA(null);
|
|
8861
8861
|
const [qA, GA] = j(!1), [_, uA] = j(null), [WA, a] = j(!1), X = tA(null), [nA, H] = j(null), [oA, zA] = j(!1);
|
|
@@ -8918,7 +8918,7 @@ function EB({
|
|
|
8918
8918
|
if (G.matchDetails)
|
|
8919
8919
|
for (const dA of G.matchDetails) S[dA.measurement.toLowerCase()] = kf(dA.userValue);
|
|
8920
8920
|
return BA && BA > 0 && !S.height && (S.height = BA), { name: U, section: R, secResult: G, userMeasurements: S };
|
|
8921
|
-
}), [wf, g, n, BA]), gA = vf(() => J.filter((U) => !zn(U.name)), [J]), Bf = vf(() => J.filter((U) => zn(U.name)), [J]), FA = !!T, OA = FA && (
|
|
8921
|
+
}), [wf, g, n, BA]), gA = vf(() => J.filter((U) => !zn(U.name)), [J]), Bf = vf(() => J.filter((U) => zn(U.name)), [J]), FA = !!T, OA = FA && (i || f && !n), AA = !FA && f && !n, LA = !!n, Pf = !!e && !i, lA = FA ? LA && Pf : LA, O = NP(), q = v === "face" || v === "head";
|
|
8922
8922
|
n?.found;
|
|
8923
8923
|
const QA = v === "foot";
|
|
8924
8924
|
return console.log("[PS-SDK] SizeResultView render:", {
|
|
@@ -8931,38 +8931,38 @@ function EB({
|
|
|
8931
8931
|
sizingLoading: f,
|
|
8932
8932
|
sizingResult: !!n,
|
|
8933
8933
|
resultImageUrl: !!e,
|
|
8934
|
-
tryOnProcessing:
|
|
8934
|
+
tryOnProcessing: i,
|
|
8935
8935
|
previewUrl: !!T
|
|
8936
8936
|
}), /* @__PURE__ */ P("div", { className: "ps-tryon-sr", children: [
|
|
8937
|
-
|
|
8937
|
+
O && AA && /* @__PURE__ */ A(
|
|
8938
8938
|
rn,
|
|
8939
8939
|
{
|
|
8940
8940
|
productImage: B,
|
|
8941
8941
|
bodyLandmarks: null,
|
|
8942
8942
|
sizingDone: LA,
|
|
8943
|
-
onSwitchToManual: () =>
|
|
8943
|
+
onSwitchToManual: () => t("body-profile"),
|
|
8944
8944
|
t: c
|
|
8945
8945
|
}
|
|
8946
8946
|
),
|
|
8947
|
-
!
|
|
8947
|
+
!O && AA && /* @__PURE__ */ P("div", { className: "ps-tryon-sr-split", children: [
|
|
8948
8948
|
/* @__PURE__ */ A("div", { className: "ps-tryon-sr-img-col", children: /* @__PURE__ */ A("img", { src: B, alt: C, className: "ps-tryon-sr-product-img" }) }),
|
|
8949
8949
|
/* @__PURE__ */ P("div", { className: "ps-tryon-sr-right-col", style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "0.8vw" }, children: [
|
|
8950
8950
|
/* @__PURE__ */ A("div", { className: "ps-tryon-size-loading-spinner" }),
|
|
8951
8951
|
/* @__PURE__ */ A("p", { style: { color: "var(--ps-text-muted)", fontSize: "0.8vw" }, children: c("Generating your size recommendation...") })
|
|
8952
8952
|
] })
|
|
8953
8953
|
] }),
|
|
8954
|
-
|
|
8954
|
+
O && OA && !lA && T && /* @__PURE__ */ A(
|
|
8955
8955
|
rn,
|
|
8956
8956
|
{
|
|
8957
8957
|
previewUrl: T,
|
|
8958
8958
|
bodyLandmarks: k ?? null,
|
|
8959
8959
|
sizingDone: LA,
|
|
8960
|
-
tryOnProcessing:
|
|
8961
|
-
onSwitchToManual: () =>
|
|
8960
|
+
tryOnProcessing: i,
|
|
8961
|
+
onSwitchToManual: () => t("body-profile"),
|
|
8962
8962
|
t: c
|
|
8963
8963
|
}
|
|
8964
8964
|
),
|
|
8965
|
-
!
|
|
8965
|
+
!O && OA && !lA && /* @__PURE__ */ P("div", { className: "ps-tryon-sr-split", children: [
|
|
8966
8966
|
/* @__PURE__ */ P("div", { className: "ps-tryon-sr-img-col", style: { position: "relative" }, children: [
|
|
8967
8967
|
/* @__PURE__ */ A(
|
|
8968
8968
|
"img",
|
|
@@ -8982,7 +8982,7 @@ function EB({
|
|
|
8982
8982
|
{
|
|
8983
8983
|
category: U ? v : "body",
|
|
8984
8984
|
sizingDone: LA,
|
|
8985
|
-
tryOnProcessing:
|
|
8985
|
+
tryOnProcessing: i,
|
|
8986
8986
|
tryOnDone: Pf,
|
|
8987
8987
|
t: c
|
|
8988
8988
|
}
|
|
@@ -8990,11 +8990,11 @@ function EB({
|
|
|
8990
8990
|
})()
|
|
8991
8991
|
] }),
|
|
8992
8992
|
(lA || n && !OA) && /* @__PURE__ */ P(rA, { children: [
|
|
8993
|
-
wf ?
|
|
8993
|
+
wf ? K ? (
|
|
8994
8994
|
/* ── Detail view for a single section ── */
|
|
8995
8995
|
(() => {
|
|
8996
|
-
const U = gA.find((R) => R.name ===
|
|
8997
|
-
return U ?
|
|
8996
|
+
const U = gA.find((R) => R.name === K);
|
|
8997
|
+
return U ? O ? /* @__PURE__ */ A(
|
|
8998
8998
|
DP,
|
|
8999
8999
|
{
|
|
9000
9000
|
sectionName: U.name,
|
|
@@ -9053,10 +9053,10 @@ function EB({
|
|
|
9053
9053
|
internationalSizes: U.secResult?.internationalSizes,
|
|
9054
9054
|
t: c
|
|
9055
9055
|
}
|
|
9056
|
-
) }, `detail-${
|
|
9056
|
+
) }, `detail-${K}`)
|
|
9057
9057
|
] }) : null;
|
|
9058
9058
|
})()
|
|
9059
|
-
) :
|
|
9059
|
+
) : O ? (
|
|
9060
9060
|
/* ── Mobile section picker: vertical list, fit% badge, try-on CTA ── */
|
|
9061
9061
|
/* @__PURE__ */ A(
|
|
9062
9062
|
HB,
|
|
@@ -9070,11 +9070,11 @@ function EB({
|
|
|
9070
9070
|
onTryOn: () => {
|
|
9071
9071
|
uA(p || null), GA(!0);
|
|
9072
9072
|
},
|
|
9073
|
-
tryOnProcessing:
|
|
9073
|
+
tryOnProcessing: i,
|
|
9074
9074
|
resultImageUrl: e,
|
|
9075
|
-
tryOnDone: !!e && !
|
|
9075
|
+
tryOnDone: !!e && !i,
|
|
9076
9076
|
onTryAgain: () => {
|
|
9077
|
-
|
|
9077
|
+
x?.(), uA(p || null), GA(!0);
|
|
9078
9078
|
},
|
|
9079
9079
|
onClose: E,
|
|
9080
9080
|
showLines: kA,
|
|
@@ -9107,13 +9107,13 @@ function EB({
|
|
|
9107
9107
|
/* ── Desktop section picker: split layout — image left, image cards right ── */
|
|
9108
9108
|
/* @__PURE__ */ P("div", { className: "ps-tryon-v2", children: [
|
|
9109
9109
|
/* @__PURE__ */ P("div", { className: "ps-tryon-v2-bg", style: { position: "relative" }, children: [
|
|
9110
|
-
/* @__PURE__ */ A("img", { src:
|
|
9111
|
-
|
|
9112
|
-
|
|
9110
|
+
/* @__PURE__ */ A("img", { src: i && T ? T : e || B, alt: C, className: "ps-tryon-v2-bg-img", onLoad: _A }),
|
|
9111
|
+
i && k && /* @__PURE__ */ A(Qn, { landmarks: k, imgWidth: eA.w, imgHeight: eA.h }),
|
|
9112
|
+
i && /* @__PURE__ */ P("div", { className: "ps-tryon-v2-processing-label", children: [
|
|
9113
9113
|
/* @__PURE__ */ A("span", { children: c("Generating try-on...") }),
|
|
9114
9114
|
/* @__PURE__ */ A(kn, { t: c, isActive: !0 })
|
|
9115
9115
|
] }),
|
|
9116
|
-
e && !
|
|
9116
|
+
e && !i && xA && iA && /* @__PURE__ */ A($f, { lines: iA, fitRows: (() => {
|
|
9117
9117
|
const U = [...n?.matchDetails || []];
|
|
9118
9118
|
if (n?.sections)
|
|
9119
9119
|
for (const G of Object.values(n.sections))
|
|
@@ -9124,7 +9124,7 @@ function EB({
|
|
|
9124
9124
|
return R.has(S) ? !1 : (R.add(S), !0);
|
|
9125
9125
|
}).map((G) => ({ area: G.measurement, userNum: parseFloat(G.userValue) || 0, chartLabel: G.chartRange || "", fit: G.fit }));
|
|
9126
9126
|
})(), show: kA, imgWidth: eA.w, imgHeight: eA.h }),
|
|
9127
|
-
e && !
|
|
9127
|
+
e && !i && /* @__PURE__ */ P("div", { style: { position: "absolute", bottom: "0.5vw", left: "0.5vw", zIndex: 3, display: "flex", flexDirection: "column", gap: "0.3vw" }, children: [
|
|
9128
9128
|
!q && /* @__PURE__ */ P("button", { className: "ps-tryon-sr-glass-btn", onClick: () => vA(!kA), children: [
|
|
9129
9129
|
/* @__PURE__ */ P("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", style: { marginRight: "0.3vw" }, children: [
|
|
9130
9130
|
/* @__PURE__ */ A("line", { x1: "4", y1: "9", x2: "20", y2: "9" }),
|
|
@@ -9161,12 +9161,12 @@ function EB({
|
|
|
9161
9161
|
] }, U);
|
|
9162
9162
|
}) }),
|
|
9163
9163
|
/* @__PURE__ */ P("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginTop: "0.5vw", gap: "0.5vw" }, children: [
|
|
9164
|
-
/* @__PURE__ */ P("button", { className: "ps-bp-back-btn", onClick: () =>
|
|
9164
|
+
/* @__PURE__ */ P("button", { className: "ps-bp-back-btn", onClick: () => t("body-profile"), type: "button", children: [
|
|
9165
9165
|
/* @__PURE__ */ A("span", { className: "ps-bp-back-arrow", children: "←" }),
|
|
9166
9166
|
" ",
|
|
9167
9167
|
c("Back")
|
|
9168
9168
|
] }),
|
|
9169
|
-
e && !
|
|
9169
|
+
e && !i ? /* @__PURE__ */ P(
|
|
9170
9170
|
"button",
|
|
9171
9171
|
{
|
|
9172
9172
|
className: "ps-tryon-v2-cta",
|
|
@@ -9193,14 +9193,14 @@ function EB({
|
|
|
9193
9193
|
{
|
|
9194
9194
|
className: "ps-tryon-v2-cta",
|
|
9195
9195
|
style: { marginTop: 0 },
|
|
9196
|
-
disabled:
|
|
9196
|
+
disabled: i,
|
|
9197
9197
|
onClick: () => {
|
|
9198
9198
|
uA(p || null), GA(!0);
|
|
9199
9199
|
},
|
|
9200
9200
|
children: [
|
|
9201
9201
|
/* @__PURE__ */ A(hf, { size: 14 }),
|
|
9202
9202
|
" ",
|
|
9203
|
-
c(
|
|
9203
|
+
c(i ? "Processing..." : "Try It On")
|
|
9204
9204
|
]
|
|
9205
9205
|
}
|
|
9206
9206
|
)
|
|
@@ -9216,7 +9216,7 @@ function EB({
|
|
|
9216
9216
|
const S = c("Your Fit"), dA = () => {
|
|
9217
9217
|
e || (uA(p || null), GA(!0));
|
|
9218
9218
|
};
|
|
9219
|
-
return
|
|
9219
|
+
return O ? /* @__PURE__ */ A(
|
|
9220
9220
|
DP,
|
|
9221
9221
|
{
|
|
9222
9222
|
sectionName: S,
|
|
@@ -9227,12 +9227,14 @@ function EB({
|
|
|
9227
9227
|
unitLbl: y,
|
|
9228
9228
|
chartUnit: l,
|
|
9229
9229
|
lengthEntry: null,
|
|
9230
|
-
onBack:
|
|
9230
|
+
onBack: () => {
|
|
9231
|
+
e ? x?.() : t("body-profile");
|
|
9232
|
+
},
|
|
9231
9233
|
backLabel: c("Back"),
|
|
9232
9234
|
internationalSizes: n?.internationalSizes,
|
|
9233
9235
|
onTryOn: e || QA ? void 0 : dA,
|
|
9234
9236
|
continueLabel: e ? c("Continue Shopping") : void 0,
|
|
9235
|
-
tryOnProcessing:
|
|
9237
|
+
tryOnProcessing: i,
|
|
9236
9238
|
productImage: e || B,
|
|
9237
9239
|
productTitle: C,
|
|
9238
9240
|
isMobile: !0,
|
|
@@ -9257,7 +9259,7 @@ function EB({
|
|
|
9257
9259
|
/* @__PURE__ */ P("div", { className: "ps-tryon-v2-bg", style: { position: "relative" }, children: [
|
|
9258
9260
|
/* @__PURE__ */ A("img", { src: e || B, alt: C, className: "ps-tryon-v2-bg-img", onLoad: _A }),
|
|
9259
9261
|
e && xA && iA && /* @__PURE__ */ A($f, { lines: iA, fitRows: (n?.matchDetails || []).map((fA) => ({ area: fA.measurement, userNum: parseFloat(fA.userValue) || 0, chartLabel: fA.chartRange || "", fit: fA.fit })), show: kA, imgWidth: eA.w, imgHeight: eA.h }),
|
|
9260
|
-
e && !
|
|
9262
|
+
e && !i && /* @__PURE__ */ P("div", { style: { position: "absolute", bottom: "0.5vw", left: "0.5vw", zIndex: 3, display: "flex", flexDirection: "column", gap: "0.3vw" }, children: [
|
|
9261
9263
|
!q && /* @__PURE__ */ A("button", { className: "ps-tryon-sr-glass-btn", onClick: () => vA(!kA), children: c(kA ? "Hide Fit" : "Show Fit") }),
|
|
9262
9264
|
/* @__PURE__ */ A("button", { className: "ps-tryon-sr-glass-btn", onClick: o, children: c("Download") })
|
|
9263
9265
|
] })
|
|
@@ -9273,12 +9275,14 @@ function EB({
|
|
|
9273
9275
|
unitLbl: y,
|
|
9274
9276
|
chartUnit: l,
|
|
9275
9277
|
lengthEntry: null,
|
|
9276
|
-
onBack:
|
|
9278
|
+
onBack: () => {
|
|
9279
|
+
e ? x?.() : t("body-profile");
|
|
9280
|
+
},
|
|
9277
9281
|
backLabel: c("Back"),
|
|
9278
9282
|
internationalSizes: n?.internationalSizes,
|
|
9279
9283
|
onTryOn: e || QA ? void 0 : dA,
|
|
9280
9284
|
continueLabel: e ? c("Continue Shopping") : void 0,
|
|
9281
|
-
tryOnProcessing:
|
|
9285
|
+
tryOnProcessing: i,
|
|
9282
9286
|
t: c,
|
|
9283
9287
|
renderRaw: q
|
|
9284
9288
|
}
|
|
@@ -9286,7 +9290,7 @@ function EB({
|
|
|
9286
9290
|
] });
|
|
9287
9291
|
})()
|
|
9288
9292
|
),
|
|
9289
|
-
qA && !QA && /* @__PURE__ */ A("div", { className: "ps-tryon-sr-chart-overlay", children:
|
|
9293
|
+
qA && !QA && /* @__PURE__ */ A("div", { className: "ps-tryon-sr-chart-overlay", children: O ? (
|
|
9290
9294
|
/* ── Mobile: same layout as the AI-sizing photo step
|
|
9291
9295
|
(PhotoStepMobile) — title + subtitle, large preview,
|
|
9292
9296
|
checklist card, primary CTA + RETAKE secondary. ── */
|
|
@@ -9582,7 +9586,7 @@ function aB({
|
|
|
9582
9586
|
fileInputRef: B,
|
|
9583
9587
|
handleFileSelect: C,
|
|
9584
9588
|
handleRemovePreview: D,
|
|
9585
|
-
handleTryOnSubmit:
|
|
9589
|
+
handleTryOnSubmit: t,
|
|
9586
9590
|
cn: o,
|
|
9587
9591
|
t: r
|
|
9588
9592
|
}) {
|
|
@@ -9592,7 +9596,7 @@ function aB({
|
|
|
9592
9596
|
/* @__PURE__ */ A("img", { src: n, alt: r("Your photo"), className: o.previewImage }),
|
|
9593
9597
|
/* @__PURE__ */ A("button", { onClick: D, className: Qf("ps-tryon-preview-remove", o.removeButton), children: "×" })
|
|
9594
9598
|
] }),
|
|
9595
|
-
/* @__PURE__ */ P("button", { onClick:
|
|
9599
|
+
/* @__PURE__ */ P("button", { onClick: t, className: Qf("ps-tryon-submit", o.submitButton), children: [
|
|
9596
9600
|
r("Try It On"),
|
|
9597
9601
|
" ",
|
|
9598
9602
|
/* @__PURE__ */ A(_f, {})
|
|
@@ -9641,7 +9645,7 @@ function dB({
|
|
|
9641
9645
|
progressStatusRef: B,
|
|
9642
9646
|
progressEtaRef: C,
|
|
9643
9647
|
progressRingRef: D,
|
|
9644
|
-
cn:
|
|
9648
|
+
cn: t,
|
|
9645
9649
|
t: o
|
|
9646
9650
|
}) {
|
|
9647
9651
|
const r = UA((h) => {
|
|
@@ -9697,8 +9701,8 @@ function dB({
|
|
|
9697
9701
|
/* @__PURE__ */ A("div", { className: "ps-tryon-progress-bar-wrap", children: /* @__PURE__ */ A("div", { ref: r, className: "ps-tryon-progress-bar-fill" }) }),
|
|
9698
9702
|
/* @__PURE__ */ A("span", { ref: z, className: "ps-tryon-progress-pct", children: "0%" })
|
|
9699
9703
|
] }),
|
|
9700
|
-
/* @__PURE__ */ A("div", { ref: p, className: Qf("ps-tryon-processing-text",
|
|
9701
|
-
/* @__PURE__ */ A("p", { className: Qf("ps-tryon-processing-sub",
|
|
9704
|
+
/* @__PURE__ */ A("div", { ref: p, className: Qf("ps-tryon-processing-text", t.processingText), children: o("Preparing your image...") }),
|
|
9705
|
+
/* @__PURE__ */ A("p", { className: Qf("ps-tryon-processing-sub", t.processingSubText), children: o("This usually takes 15-25 seconds") })
|
|
9702
9706
|
] });
|
|
9703
9707
|
}
|
|
9704
9708
|
function FB({
|
|
@@ -9783,14 +9787,14 @@ function CP({
|
|
|
9783
9787
|
] }, f);
|
|
9784
9788
|
}
|
|
9785
9789
|
function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B }) {
|
|
9786
|
-
const [C, D] = j(null), [
|
|
9790
|
+
const [C, D] = j(null), [t, o] = j("identity"), [r, z] = j("name-photo"), [p, T] = j(!1), [F, h] = j(null), W = tA(null);
|
|
9787
9791
|
JA(() => {
|
|
9788
9792
|
W.current && (W.current.scrollTop = 0);
|
|
9789
|
-
}, [C,
|
|
9790
|
-
const [
|
|
9793
|
+
}, [C, t]);
|
|
9794
|
+
const [i, k] = j(""), [u, v] = j("male"), [I, K] = j("cm"), [N, x] = j(""), [E, BA] = j(""), [c, hA] = j(""), [l, y] = j(""), [XA, sA] = j(""), [V, s] = j(""), [PA, RA] = j(null), [mA, EA] = j(!1), ZA = tA(null), Hf = tA(null), [m, aA] = j(!1), [TA, bA] = j(null), VA = () => {
|
|
9791
9795
|
TA === !0 && ZA.current?.click();
|
|
9792
|
-
}, kA = async (
|
|
9793
|
-
const q =
|
|
9796
|
+
}, kA = async (O) => {
|
|
9797
|
+
const q = O.target.files?.[0];
|
|
9794
9798
|
if (q) {
|
|
9795
9799
|
if (TA !== !0) {
|
|
9796
9800
|
s(B("Please confirm that the person in the photo is 18 or older before uploading."));
|
|
@@ -9816,44 +9820,44 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
9816
9820
|
}
|
|
9817
9821
|
}, vA = () => {
|
|
9818
9822
|
RA(null), g?.(null), ZA.current && (ZA.current.value = "");
|
|
9819
|
-
}, [SA, ff] = j(null), [iA, nf] = j(null), [xA, Ef] = j(null), [eA, $] = j(null), [_A, Of] = j(null), [cf, Mf] = j(null), gf = ["28", "30", "32", "34", "36", "38", "40", "42", "44", "46", "48", "50", "52", "54", "56"], qA = ["AA", "A", "B", "C", "D", "DD/E", "DDD/F", "G", "H", "I", "J"], GA = u === "female", _ = GA ? MA.female : MA.male, uA = GA ? ["identity", "stomach", "seat", "hips", "bra"] : ["identity", "chest", "stomach", "seat"], WA = uA.indexOf(
|
|
9823
|
+
}, [SA, ff] = j(null), [iA, nf] = j(null), [xA, Ef] = j(null), [eA, $] = j(null), [_A, Of] = j(null), [cf, Mf] = j(null), gf = ["28", "30", "32", "34", "36", "38", "40", "42", "44", "46", "48", "50", "52", "54", "56"], qA = ["AA", "A", "B", "C", "D", "DD/E", "DDD/F", "G", "H", "I", "J"], GA = u === "female", _ = GA ? MA.female : MA.male, uA = GA ? ["identity", "stomach", "seat", "hips", "bra"] : ["identity", "chest", "stomach", "seat"], WA = uA.indexOf(t), a = uA.length, X = WA === a - 1, nA = () => {
|
|
9820
9824
|
if (I === "in") {
|
|
9821
|
-
const
|
|
9822
|
-
!isNaN(
|
|
9825
|
+
const O = parseInt(E, 10), q = parseInt(c, 10);
|
|
9826
|
+
!isNaN(O) && O >= 0 && !isNaN(q) && q >= 0 && x(String(Math.round((O * 12 + q) * 2.54)));
|
|
9823
9827
|
}
|
|
9824
|
-
|
|
9828
|
+
K("cm");
|
|
9825
9829
|
}, H = () => {
|
|
9826
9830
|
if (I === "cm") {
|
|
9827
|
-
const
|
|
9828
|
-
!isNaN(
|
|
9831
|
+
const O = parseFloat(N);
|
|
9832
|
+
!isNaN(O) && O > 0 && (BA(String(Math.floor(O / 2.54 / 12))), hA(String(Math.round(O / 2.54 % 12))));
|
|
9829
9833
|
}
|
|
9830
|
-
|
|
9834
|
+
K("in");
|
|
9831
9835
|
}, oA = () => {
|
|
9832
|
-
if (!
|
|
9836
|
+
if (!i.trim())
|
|
9833
9837
|
return s(B("Please enter a profile name")), !1;
|
|
9834
|
-
let
|
|
9838
|
+
let O;
|
|
9835
9839
|
if (I === "in") {
|
|
9836
9840
|
const U = parseInt(E, 10), R = parseInt(c, 10);
|
|
9837
|
-
|
|
9841
|
+
O = !isNaN(U) && U > 0 && !isNaN(R) && R >= 0 && R <= 11;
|
|
9838
9842
|
} else {
|
|
9839
9843
|
const U = parseFloat(N);
|
|
9840
|
-
|
|
9844
|
+
O = !isNaN(U) && U > 0;
|
|
9841
9845
|
}
|
|
9842
|
-
if (!
|
|
9846
|
+
if (!O)
|
|
9843
9847
|
return s(B("Please enter a valid height")), !1;
|
|
9844
9848
|
const q = parseFloat(l), QA = parseFloat(XA);
|
|
9845
9849
|
return !q || q <= 0 ? (s(B("Please enter a valid weight")), !1) : !QA || QA <= 0 ? (s(B("Please enter a valid age")), !1) : (s(""), !0);
|
|
9846
|
-
}, zA = () =>
|
|
9847
|
-
const
|
|
9850
|
+
}, zA = () => i.trim() ? (s(""), !0) : (s(B("Please enter a profile name")), !1), YA = () => {
|
|
9851
|
+
const O = I === "in" ? (parseInt(E, 10) || 0) * 12 + (parseInt(c, 10) || 0) : parseFloat(N);
|
|
9848
9852
|
return {
|
|
9849
|
-
name:
|
|
9853
|
+
name: i.trim(),
|
|
9850
9854
|
gender: u,
|
|
9851
9855
|
sizingUnit: I,
|
|
9852
9856
|
heightUnit: I,
|
|
9853
9857
|
weightUnit: I === "in" ? "lbs" : "kg",
|
|
9854
|
-
heightCm:
|
|
9858
|
+
heightCm: O,
|
|
9855
9859
|
weightKg: parseFloat(l),
|
|
9856
|
-
height:
|
|
9860
|
+
height: O,
|
|
9857
9861
|
weight: parseFloat(l),
|
|
9858
9862
|
age: parseFloat(XA),
|
|
9859
9863
|
chestProfile: SA || void 0,
|
|
@@ -9863,37 +9867,37 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
9863
9867
|
cupSize: GA && cf || void 0
|
|
9864
9868
|
};
|
|
9865
9869
|
}, wf = () => {
|
|
9866
|
-
const
|
|
9870
|
+
const O = I === "in" ? (parseInt(E, 10) || 0) * 12 + (parseInt(c, 10) || 0) : parseFloat(N), q = parseFloat(l), QA = parseFloat(XA);
|
|
9867
9871
|
return {
|
|
9868
|
-
name:
|
|
9872
|
+
name: i.trim(),
|
|
9869
9873
|
gender: u,
|
|
9870
9874
|
sizingUnit: I,
|
|
9871
9875
|
heightUnit: I,
|
|
9872
9876
|
weightUnit: I === "in" ? "lbs" : "kg",
|
|
9873
|
-
...
|
|
9877
|
+
...O > 0 ? { heightCm: O, height: O } : {},
|
|
9874
9878
|
...q > 0 ? { weightKg: q, weight: q } : {},
|
|
9875
9879
|
...QA > 0 ? { age: QA } : {},
|
|
9876
9880
|
photoBase64: PA || void 0
|
|
9877
9881
|
};
|
|
9878
9882
|
}, J = () => {
|
|
9879
|
-
if (!(
|
|
9880
|
-
if (
|
|
9883
|
+
if (!(t === "identity" && !oA())) {
|
|
9884
|
+
if (t === "chest" && !SA) {
|
|
9881
9885
|
s(B("Please pick an option"));
|
|
9882
9886
|
return;
|
|
9883
9887
|
}
|
|
9884
|
-
if (
|
|
9888
|
+
if (t === "stomach" && !iA) {
|
|
9885
9889
|
s(B("Please pick an option"));
|
|
9886
9890
|
return;
|
|
9887
9891
|
}
|
|
9888
|
-
if (
|
|
9892
|
+
if (t === "seat" && !xA) {
|
|
9889
9893
|
s(B("Please pick an option"));
|
|
9890
9894
|
return;
|
|
9891
9895
|
}
|
|
9892
|
-
if (
|
|
9896
|
+
if (t === "hips" && !eA) {
|
|
9893
9897
|
s(B("Please pick an option"));
|
|
9894
9898
|
return;
|
|
9895
9899
|
}
|
|
9896
|
-
if (
|
|
9900
|
+
if (t === "bra" && (!_A || !cf)) {
|
|
9897
9901
|
s(B("Please pick band and cup size"));
|
|
9898
9902
|
return;
|
|
9899
9903
|
}
|
|
@@ -9903,23 +9907,23 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
9903
9907
|
}
|
|
9904
9908
|
o(uA[WA + 1]);
|
|
9905
9909
|
}
|
|
9906
|
-
}, gA = (
|
|
9907
|
-
s(""),
|
|
9908
|
-
const QA = uA.indexOf(
|
|
9910
|
+
}, gA = (O, q) => {
|
|
9911
|
+
s(""), O === "chest" ? ff(q) : O === "stomach" ? nf(q) : O === "seat" ? Ef(q) : O === "hips" && $(q);
|
|
9912
|
+
const QA = uA.indexOf(O), U = QA === a - 1;
|
|
9909
9913
|
setTimeout(() => {
|
|
9910
9914
|
if (U) {
|
|
9911
9915
|
const R = YA();
|
|
9912
|
-
|
|
9916
|
+
O === "chest" ? R.chestProfile = q : O === "stomach" ? R.midsectionProfile = q : (O === "seat" || O === "hips") && (R.hipProfile = q), f(R);
|
|
9913
9917
|
} else
|
|
9914
9918
|
o(uA[QA + 1]);
|
|
9915
9919
|
}, 220);
|
|
9916
9920
|
}, Bf = () => {
|
|
9917
|
-
if (s(""),
|
|
9921
|
+
if (s(""), t === "identity") {
|
|
9918
9922
|
D(null);
|
|
9919
9923
|
return;
|
|
9920
9924
|
}
|
|
9921
9925
|
o(uA[Math.max(0, WA - 1)]);
|
|
9922
|
-
}, FA = C === "manual" && (
|
|
9926
|
+
}, FA = C === "manual" && (t === "chest" || t === "stomach" || t === "seat" || t === "hips"), OA = async () => {
|
|
9923
9927
|
if (r === "name-photo") {
|
|
9924
9928
|
if (!zA()) return;
|
|
9925
9929
|
if (!PA) {
|
|
@@ -9962,8 +9966,8 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
9962
9966
|
T(!1);
|
|
9963
9967
|
return;
|
|
9964
9968
|
}
|
|
9965
|
-
const
|
|
9966
|
-
F && (
|
|
9969
|
+
const O = wf();
|
|
9970
|
+
F && (O.measurements = F, O.measurementsUnit = "cm"), f(O);
|
|
9967
9971
|
}, AA = () => {
|
|
9968
9972
|
if (s(""), r === "details") {
|
|
9969
9973
|
z("name-photo");
|
|
@@ -9981,7 +9985,7 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
9981
9985
|
}, Pf = (() => {
|
|
9982
9986
|
if (C == null) return B("Choose a method");
|
|
9983
9987
|
if (C === "manual") {
|
|
9984
|
-
const
|
|
9988
|
+
const O = {
|
|
9985
9989
|
identity: B("Identity"),
|
|
9986
9990
|
chest: B("Chest"),
|
|
9987
9991
|
stomach: B("Stomach"),
|
|
@@ -9989,14 +9993,14 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
9989
9993
|
hips: B("Hips"),
|
|
9990
9994
|
bra: B("Bra")
|
|
9991
9995
|
};
|
|
9992
|
-
return `${String(WA + 1).padStart(2, "0")} · ${
|
|
9996
|
+
return `${String(WA + 1).padStart(2, "0")} · ${O[t]}`;
|
|
9993
9997
|
}
|
|
9994
9998
|
return B("Analyze by photo");
|
|
9995
9999
|
})(), lA = (() => {
|
|
9996
10000
|
if (C == null) return 0;
|
|
9997
10001
|
if (C === "manual") return Math.round((WA + 1) / a * 100);
|
|
9998
|
-
let
|
|
9999
|
-
return
|
|
10002
|
+
let O = 0;
|
|
10003
|
+
return i.trim() && (O += 50), PA && (O += 50), O;
|
|
10000
10004
|
})();
|
|
10001
10005
|
return /* @__PURE__ */ P("div", { className: "ps-cpw-root", children: [
|
|
10002
10006
|
/* @__PURE__ */ P("div", { className: "ps-cpw-step-head", children: [
|
|
@@ -10048,7 +10052,7 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10048
10052
|
}
|
|
10049
10053
|
)
|
|
10050
10054
|
] }) }, "method-picker"),
|
|
10051
|
-
C === "manual" &&
|
|
10055
|
+
C === "manual" && t === "identity" && /* @__PURE__ */ P("div", { className: "ps-cpw-identity ps-cpw-fade-in", children: [
|
|
10052
10056
|
/* @__PURE__ */ P("div", { className: "ps-cpw-pill-row", children: [
|
|
10053
10057
|
/* @__PURE__ */ P("div", { className: "ps-cpw-pill-group", children: [
|
|
10054
10058
|
/* @__PURE__ */ A("button", { type: "button", className: `ps-cpw-pill${u === "male" ? " ps-active" : ""}`, onClick: () => v("male"), children: B("Male") }),
|
|
@@ -10067,10 +10071,10 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10067
10071
|
{
|
|
10068
10072
|
type: "text",
|
|
10069
10073
|
className: "ps-bp-inline-input",
|
|
10070
|
-
value:
|
|
10074
|
+
value: i,
|
|
10071
10075
|
placeholder: B("e.g. My Measurements"),
|
|
10072
|
-
onChange: (
|
|
10073
|
-
k(
|
|
10076
|
+
onChange: (O) => {
|
|
10077
|
+
k(O.target.value), s("");
|
|
10074
10078
|
}
|
|
10075
10079
|
}
|
|
10076
10080
|
) })
|
|
@@ -10086,8 +10090,8 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10086
10090
|
className: "ps-bp-inline-input",
|
|
10087
10091
|
value: N,
|
|
10088
10092
|
placeholder: B("e.g. 173"),
|
|
10089
|
-
onChange: (
|
|
10090
|
-
|
|
10093
|
+
onChange: (O) => {
|
|
10094
|
+
x(O.target.value), s("");
|
|
10091
10095
|
}
|
|
10092
10096
|
}
|
|
10093
10097
|
),
|
|
@@ -10102,8 +10106,8 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10102
10106
|
style: { width: "3em" },
|
|
10103
10107
|
value: E,
|
|
10104
10108
|
placeholder: "5",
|
|
10105
|
-
onChange: (
|
|
10106
|
-
BA(
|
|
10109
|
+
onChange: (O) => {
|
|
10110
|
+
BA(O.target.value), s("");
|
|
10107
10111
|
}
|
|
10108
10112
|
}
|
|
10109
10113
|
),
|
|
@@ -10117,8 +10121,8 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10117
10121
|
style: { width: "3em" },
|
|
10118
10122
|
value: c,
|
|
10119
10123
|
placeholder: "8",
|
|
10120
|
-
onChange: (
|
|
10121
|
-
hA(
|
|
10124
|
+
onChange: (O) => {
|
|
10125
|
+
hA(O.target.value), s("");
|
|
10122
10126
|
}
|
|
10123
10127
|
}
|
|
10124
10128
|
),
|
|
@@ -10136,8 +10140,8 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10136
10140
|
className: "ps-bp-inline-input",
|
|
10137
10141
|
value: l,
|
|
10138
10142
|
placeholder: B(I === "in" ? "e.g. 154" : "e.g. 70"),
|
|
10139
|
-
onChange: (
|
|
10140
|
-
y(
|
|
10143
|
+
onChange: (O) => {
|
|
10144
|
+
y(O.target.value), s("");
|
|
10141
10145
|
}
|
|
10142
10146
|
}
|
|
10143
10147
|
),
|
|
@@ -10155,8 +10159,8 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10155
10159
|
className: "ps-bp-inline-input",
|
|
10156
10160
|
value: XA,
|
|
10157
10161
|
placeholder: B("e.g. 30"),
|
|
10158
|
-
onChange: (
|
|
10159
|
-
sA(
|
|
10162
|
+
onChange: (O) => {
|
|
10163
|
+
sA(O.target.value), s("");
|
|
10160
10164
|
}
|
|
10161
10165
|
}
|
|
10162
10166
|
),
|
|
@@ -10166,7 +10170,7 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10166
10170
|
] }),
|
|
10167
10171
|
V && /* @__PURE__ */ A("div", { className: "ps-cpw-error", children: V })
|
|
10168
10172
|
] }, "manual-identity"),
|
|
10169
|
-
C === "manual" &&
|
|
10173
|
+
C === "manual" && t === "chest" && !GA && /* @__PURE__ */ P(
|
|
10170
10174
|
CP,
|
|
10171
10175
|
{
|
|
10172
10176
|
stepKey: "chest",
|
|
@@ -10179,7 +10183,7 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10179
10183
|
]
|
|
10180
10184
|
}
|
|
10181
10185
|
),
|
|
10182
|
-
C === "manual" &&
|
|
10186
|
+
C === "manual" && t === "stomach" && /* @__PURE__ */ P(
|
|
10183
10187
|
CP,
|
|
10184
10188
|
{
|
|
10185
10189
|
stepKey: "stomach",
|
|
@@ -10192,7 +10196,7 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10192
10196
|
]
|
|
10193
10197
|
}
|
|
10194
10198
|
),
|
|
10195
|
-
C === "manual" &&
|
|
10199
|
+
C === "manual" && t === "seat" && /* @__PURE__ */ P(
|
|
10196
10200
|
CP,
|
|
10197
10201
|
{
|
|
10198
10202
|
stepKey: "seat",
|
|
@@ -10205,7 +10209,7 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10205
10209
|
]
|
|
10206
10210
|
}
|
|
10207
10211
|
),
|
|
10208
|
-
C === "manual" &&
|
|
10212
|
+
C === "manual" && t === "hips" && GA && _.hips && /* @__PURE__ */ P(
|
|
10209
10213
|
CP,
|
|
10210
10214
|
{
|
|
10211
10215
|
stepKey: "hips",
|
|
@@ -10218,7 +10222,7 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10218
10222
|
]
|
|
10219
10223
|
}
|
|
10220
10224
|
),
|
|
10221
|
-
C === "manual" &&
|
|
10225
|
+
C === "manual" && t === "bra" && GA && /* @__PURE__ */ P("div", { className: "ps-cpw-progressive ps-cpw-fade-in", children: [
|
|
10222
10226
|
/* @__PURE__ */ P("div", { className: "ps-cpw-section-head", children: [
|
|
10223
10227
|
/* @__PURE__ */ A("div", { className: "ps-cpw-section-title", children: B("BRA SIZE") }),
|
|
10224
10228
|
/* @__PURE__ */ A("div", { className: "ps-cpw-section-sub", children: B("Helps us refine bust measurements for tops and dresses") })
|
|
@@ -10231,12 +10235,12 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10231
10235
|
{
|
|
10232
10236
|
className: "ps-cpw-input",
|
|
10233
10237
|
value: _A ?? "",
|
|
10234
|
-
onChange: (
|
|
10235
|
-
Of(
|
|
10238
|
+
onChange: (O) => {
|
|
10239
|
+
Of(O.target.value || null), s("");
|
|
10236
10240
|
},
|
|
10237
10241
|
children: [
|
|
10238
10242
|
/* @__PURE__ */ A("option", { value: "", children: B("Select") }),
|
|
10239
|
-
gf.map((
|
|
10243
|
+
gf.map((O) => /* @__PURE__ */ A("option", { value: O, children: O }, O))
|
|
10240
10244
|
]
|
|
10241
10245
|
}
|
|
10242
10246
|
)
|
|
@@ -10248,12 +10252,12 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10248
10252
|
{
|
|
10249
10253
|
className: "ps-cpw-input",
|
|
10250
10254
|
value: cf ?? "",
|
|
10251
|
-
onChange: (
|
|
10252
|
-
Mf(
|
|
10255
|
+
onChange: (O) => {
|
|
10256
|
+
Mf(O.target.value || null), s("");
|
|
10253
10257
|
},
|
|
10254
10258
|
children: [
|
|
10255
10259
|
/* @__PURE__ */ A("option", { value: "", children: B("Select") }),
|
|
10256
|
-
qA.map((
|
|
10260
|
+
qA.map((O) => /* @__PURE__ */ A("option", { value: O, children: O }, O))
|
|
10257
10261
|
]
|
|
10258
10262
|
}
|
|
10259
10263
|
)
|
|
@@ -10343,8 +10347,8 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10343
10347
|
/* @__PURE__ */ P("div", { className: "ps-cpw-image-right", children: [
|
|
10344
10348
|
/* @__PURE__ */ A("div", { className: "ps-bp-inline-fields ps-cpw-inline-fields", children: /* @__PURE__ */ P("div", { className: "ps-bp-inline-row", children: [
|
|
10345
10349
|
/* @__PURE__ */ A("span", { className: "ps-bp-inline-label", children: B("NAME") }),
|
|
10346
|
-
/* @__PURE__ */ A("div", { className: "ps-bp-inline-input-group", children: /* @__PURE__ */ A("input", { ref: Hf, type: "text", className: `ps-bp-inline-input${m ? " ps-cpw-shake" : ""}`, value:
|
|
10347
|
-
k(
|
|
10350
|
+
/* @__PURE__ */ A("div", { className: "ps-bp-inline-input-group", children: /* @__PURE__ */ A("input", { ref: Hf, type: "text", className: `ps-bp-inline-input${m ? " ps-cpw-shake" : ""}`, value: i, placeholder: B("e.g. My Photo Profile"), onChange: (O) => {
|
|
10351
|
+
k(O.target.value), s("");
|
|
10348
10352
|
}, onAnimationEnd: () => aA(!1) }) })
|
|
10349
10353
|
] }) }),
|
|
10350
10354
|
/* @__PURE__ */ P("div", { className: "ps-cpw-photo-guide", children: [
|
|
@@ -10391,17 +10395,17 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10391
10395
|
/* @__PURE__ */ P("div", { className: "ps-bp-inline-row", children: [
|
|
10392
10396
|
/* @__PURE__ */ A("span", { className: "ps-bp-inline-label", children: B("HEIGHT") }),
|
|
10393
10397
|
I === "cm" ? /* @__PURE__ */ P("div", { className: "ps-bp-inline-input-group", children: [
|
|
10394
|
-
/* @__PURE__ */ A("input", { type: "number", inputMode: "numeric", className: "ps-bp-inline-input", value: N, placeholder: B("e.g. 173"), onChange: (
|
|
10395
|
-
|
|
10398
|
+
/* @__PURE__ */ A("input", { type: "number", inputMode: "numeric", className: "ps-bp-inline-input", value: N, placeholder: B("e.g. 173"), onChange: (O) => {
|
|
10399
|
+
x(O.target.value), s("");
|
|
10396
10400
|
} }),
|
|
10397
10401
|
/* @__PURE__ */ A("span", { className: "ps-bp-inline-unit", children: "cm" })
|
|
10398
10402
|
] }) : /* @__PURE__ */ P("div", { className: "ps-bp-inline-input-group", style: { gap: "6px" }, children: [
|
|
10399
|
-
/* @__PURE__ */ A("input", { type: "number", inputMode: "numeric", className: "ps-bp-inline-input", style: { width: "3em" }, value: E, placeholder: "5", onChange: (
|
|
10400
|
-
BA(
|
|
10403
|
+
/* @__PURE__ */ A("input", { type: "number", inputMode: "numeric", className: "ps-bp-inline-input", style: { width: "3em" }, value: E, placeholder: "5", onChange: (O) => {
|
|
10404
|
+
BA(O.target.value), s("");
|
|
10401
10405
|
} }),
|
|
10402
10406
|
/* @__PURE__ */ A("span", { className: "ps-bp-inline-unit", children: "ft" }),
|
|
10403
|
-
/* @__PURE__ */ A("input", { type: "number", inputMode: "numeric", className: "ps-bp-inline-input", style: { width: "3em" }, value: c, placeholder: "8", onChange: (
|
|
10404
|
-
hA(
|
|
10407
|
+
/* @__PURE__ */ A("input", { type: "number", inputMode: "numeric", className: "ps-bp-inline-input", style: { width: "3em" }, value: c, placeholder: "8", onChange: (O) => {
|
|
10408
|
+
hA(O.target.value), s("");
|
|
10405
10409
|
} }),
|
|
10406
10410
|
/* @__PURE__ */ A("span", { className: "ps-bp-inline-unit", children: "in" })
|
|
10407
10411
|
] })
|
|
@@ -10409,8 +10413,8 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10409
10413
|
/* @__PURE__ */ P("div", { className: "ps-bp-inline-row", children: [
|
|
10410
10414
|
/* @__PURE__ */ A("span", { className: "ps-bp-inline-label", children: B("WEIGHT") }),
|
|
10411
10415
|
/* @__PURE__ */ P("div", { className: "ps-bp-inline-input-group", children: [
|
|
10412
|
-
/* @__PURE__ */ A("input", { type: "number", inputMode: "numeric", className: "ps-bp-inline-input", value: l, placeholder: B(I === "in" ? "e.g. 154" : "e.g. 70"), onChange: (
|
|
10413
|
-
y(
|
|
10416
|
+
/* @__PURE__ */ A("input", { type: "number", inputMode: "numeric", className: "ps-bp-inline-input", value: l, placeholder: B(I === "in" ? "e.g. 154" : "e.g. 70"), onChange: (O) => {
|
|
10417
|
+
y(O.target.value), s("");
|
|
10414
10418
|
} }),
|
|
10415
10419
|
/* @__PURE__ */ A("span", { className: "ps-bp-inline-unit", children: I === "in" ? "lbs" : "kg" })
|
|
10416
10420
|
] })
|
|
@@ -10418,8 +10422,8 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10418
10422
|
/* @__PURE__ */ P("div", { className: "ps-bp-inline-row", children: [
|
|
10419
10423
|
/* @__PURE__ */ A("span", { className: "ps-bp-inline-label", children: B("AGE") }),
|
|
10420
10424
|
/* @__PURE__ */ P("div", { className: "ps-bp-inline-input-group", children: [
|
|
10421
|
-
/* @__PURE__ */ A("input", { type: "number", inputMode: "numeric", className: "ps-bp-inline-input", value: XA, placeholder: B("e.g. 30"), onChange: (
|
|
10422
|
-
sA(
|
|
10425
|
+
/* @__PURE__ */ A("input", { type: "number", inputMode: "numeric", className: "ps-bp-inline-input", value: XA, placeholder: B("e.g. 30"), onChange: (O) => {
|
|
10426
|
+
sA(O.target.value), s("");
|
|
10423
10427
|
} }),
|
|
10424
10428
|
/* @__PURE__ */ A("span", { className: "ps-bp-inline-unit", children: B("years") })
|
|
10425
10429
|
] })
|
|
@@ -10450,8 +10454,8 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10450
10454
|
{ key: "inseam", label: B("INSEAM") },
|
|
10451
10455
|
{ key: "thighCircumference", label: B("THIGH") },
|
|
10452
10456
|
{ key: "footLengthCm", label: B("FOOT") }
|
|
10453
|
-
].map(({ key:
|
|
10454
|
-
const QA = F[
|
|
10457
|
+
].map(({ key: O, label: q }) => {
|
|
10458
|
+
const QA = F[O];
|
|
10455
10459
|
if (!QA || QA === 0) return null;
|
|
10456
10460
|
const U = I === "in" ? Math.round(QA / 2.54 * 10) / 10 : QA;
|
|
10457
10461
|
return /* @__PURE__ */ P("div", { style: { background: "rgba(33,84,239,0.04)", border: "1px solid rgba(33,84,239,0.12)", borderRadius: "0.4vw", padding: "0.6vw 0.8vw" }, children: [
|
|
@@ -10461,7 +10465,7 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10461
10465
|
" ",
|
|
10462
10466
|
/* @__PURE__ */ A("span", { style: { fontSize: "0.7vw", color: "var(--ps-text-muted)", fontWeight: 400 }, children: I })
|
|
10463
10467
|
] })
|
|
10464
|
-
] },
|
|
10468
|
+
] }, O);
|
|
10465
10469
|
}) })
|
|
10466
10470
|
] }) : /* @__PURE__ */ P("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", flex: 1, gap: "0.8vw" }, children: [
|
|
10467
10471
|
/* @__PURE__ */ A("p", { style: { color: "var(--ps-text-primary)", fontSize: "1vw", fontWeight: 600 }, children: B("Estimation could not complete") }),
|
|
@@ -10477,14 +10481,14 @@ function yB({ onSave: f, onCancel: n, onPhotoPreview: g, onEstimate: e, t: B })
|
|
|
10477
10481
|
type: "button",
|
|
10478
10482
|
className: "ps-cpw-next-btn",
|
|
10479
10483
|
onClick: () => {
|
|
10480
|
-
if (!
|
|
10484
|
+
if (!i.trim()) {
|
|
10481
10485
|
aA(!0), Hf.current?.focus();
|
|
10482
10486
|
return;
|
|
10483
10487
|
}
|
|
10484
10488
|
OA();
|
|
10485
10489
|
},
|
|
10486
|
-
disabled: !
|
|
10487
|
-
children:
|
|
10490
|
+
disabled: !i.trim() || !PA,
|
|
10491
|
+
children: i.trim() ? B(PA ? "Continue" : "Upload a photo") : B("Add a name for this profile")
|
|
10488
10492
|
}
|
|
10489
10493
|
),
|
|
10490
10494
|
C === "image" && r === "details" && /* @__PURE__ */ A("button", { type: "button", className: "ps-cpw-next-btn", onClick: OA, children: B("Calculate My Body Parts") }),
|
|
@@ -10522,43 +10526,43 @@ function A8({
|
|
|
10522
10526
|
onDelete: B,
|
|
10523
10527
|
onBack: C,
|
|
10524
10528
|
onSave: D,
|
|
10525
|
-
onSaveBraSize:
|
|
10529
|
+
onSaveBraSize: t,
|
|
10526
10530
|
isEstimating: o = !1,
|
|
10527
10531
|
t: r
|
|
10528
10532
|
}) {
|
|
10529
|
-
const z = f.gender === "female" ? VB : WB, p = f.measurements || {}, T = Object.keys(p).some((
|
|
10530
|
-
const
|
|
10533
|
+
const z = f.gender === "female" ? VB : WB, p = f.measurements || {}, T = Object.keys(p).some((x) => p[x] != null), [F, h] = j(f.measurementsUnit || "cm"), [W, i] = j(() => {
|
|
10534
|
+
const x = {};
|
|
10531
10535
|
return z.forEach((E) => {
|
|
10532
10536
|
const BA = p[E.key];
|
|
10533
|
-
|
|
10534
|
-
}),
|
|
10537
|
+
x[E.key] = BA != null ? String(Math.round(BA * 10) / 10) : "";
|
|
10538
|
+
}), x;
|
|
10535
10539
|
});
|
|
10536
10540
|
JA(() => {
|
|
10537
|
-
|
|
10538
|
-
const E = { ...
|
|
10541
|
+
i((x) => {
|
|
10542
|
+
const E = { ...x };
|
|
10539
10543
|
let BA = !1;
|
|
10540
10544
|
return z.forEach((c) => {
|
|
10541
10545
|
const hA = p[c.key];
|
|
10542
|
-
hA != null && !
|
|
10543
|
-
}), BA ? E :
|
|
10546
|
+
hA != null && !x[c.key] && (E[c.key] = String(Math.round(hA * 10) / 10), BA = !0);
|
|
10547
|
+
}), BA ? E : x;
|
|
10544
10548
|
});
|
|
10545
10549
|
}, [f.measurements, f.id]);
|
|
10546
|
-
const [k, u] = j(f.bandSize || ""), [v, I] = j(f.cupSize || ""),
|
|
10547
|
-
|
|
10550
|
+
const [k, u] = j(f.bandSize || ""), [v, I] = j(f.cupSize || ""), K = (x) => {
|
|
10551
|
+
x !== F && (i((E) => {
|
|
10548
10552
|
const BA = {};
|
|
10549
10553
|
for (const [c, hA] of Object.entries(E)) {
|
|
10550
10554
|
const l = parseFloat(hA);
|
|
10551
|
-
!isNaN(l) && l > 0 ? BA[c] = String(
|
|
10555
|
+
!isNaN(l) && l > 0 ? BA[c] = String(x === "in" ? Math.round(l / 2.54 * 10) / 10 : Math.round(l * 2.54 * 10) / 10) : BA[c] = hA;
|
|
10552
10556
|
}
|
|
10553
10557
|
return BA;
|
|
10554
|
-
}), h(
|
|
10558
|
+
}), h(x));
|
|
10555
10559
|
}, N = () => {
|
|
10556
|
-
const
|
|
10560
|
+
const x = { ...f.measurements || {} };
|
|
10557
10561
|
for (const [E, BA] of Object.entries(W)) {
|
|
10558
10562
|
const c = parseFloat(BA);
|
|
10559
|
-
!isNaN(c) && c > 0 && (
|
|
10563
|
+
!isNaN(c) && c > 0 && (x[E] = c);
|
|
10560
10564
|
}
|
|
10561
|
-
e(
|
|
10565
|
+
e(x, F), f.gender === "female" && t && (k || v) && t(k, v), D();
|
|
10562
10566
|
};
|
|
10563
10567
|
return /* @__PURE__ */ P("div", { className: "ps-pmv-root", children: [
|
|
10564
10568
|
/* @__PURE__ */ P("div", { className: "ps-pmv-hero", children: [
|
|
@@ -10574,7 +10578,7 @@ function A8({
|
|
|
10574
10578
|
{
|
|
10575
10579
|
type: "button",
|
|
10576
10580
|
className: `ps-cpw-pill${F === "cm" ? " ps-active" : ""}`,
|
|
10577
|
-
onClick: () =>
|
|
10581
|
+
onClick: () => K("cm"),
|
|
10578
10582
|
children: "cm"
|
|
10579
10583
|
}
|
|
10580
10584
|
),
|
|
@@ -10583,7 +10587,7 @@ function A8({
|
|
|
10583
10587
|
{
|
|
10584
10588
|
type: "button",
|
|
10585
10589
|
className: `ps-cpw-pill${F === "in" ? " ps-active" : ""}`,
|
|
10586
|
-
onClick: () =>
|
|
10590
|
+
onClick: () => K("in"),
|
|
10587
10591
|
children: "in"
|
|
10588
10592
|
}
|
|
10589
10593
|
)
|
|
@@ -10594,11 +10598,11 @@ function A8({
|
|
|
10594
10598
|
] })
|
|
10595
10599
|
] }) }),
|
|
10596
10600
|
/* @__PURE__ */ P("div", { className: "ps-pmv-measure-list", children: [
|
|
10597
|
-
z.map((
|
|
10598
|
-
const E = p[
|
|
10601
|
+
z.map((x) => {
|
|
10602
|
+
const E = p[x.key], BA = o && E == null && !W[x.key];
|
|
10599
10603
|
return /* @__PURE__ */ P("div", { className: `ps-pmv-measure-row${E == null ? " ps-loading" : ""}`, children: [
|
|
10600
|
-
/* @__PURE__ */ A("span", { className: "ps-pmv-measure-icon", children: /* @__PURE__ */ A("img", { src:
|
|
10601
|
-
/* @__PURE__ */ A("span", { className: "ps-pmv-measure-label", children: r(
|
|
10604
|
+
/* @__PURE__ */ A("span", { className: "ps-pmv-measure-icon", children: /* @__PURE__ */ A("img", { src: x.iconSrc, alt: "", "aria-hidden": "true" }) }),
|
|
10605
|
+
/* @__PURE__ */ A("span", { className: "ps-pmv-measure-label", children: r(x.label) }),
|
|
10602
10606
|
/* @__PURE__ */ A("span", { className: "ps-pmv-measure-value ps-pmv-inline-edit", children: BA ? /* @__PURE__ */ P("span", { style: { display: "inline-flex", alignItems: "center", gap: "0.4vw" }, children: [
|
|
10603
10607
|
/* @__PURE__ */ A("span", { className: "ps-tryon-size-loading-spinner", style: { width: "0.8vw", height: "0.8vw", borderWidth: "1.5px" } }),
|
|
10604
10608
|
/* @__PURE__ */ A("span", { style: { color: "var(--ps-text-muted)", fontSize: "0.7vw" }, children: r("calculating...") })
|
|
@@ -10609,14 +10613,14 @@ function A8({
|
|
|
10609
10613
|
type: "number",
|
|
10610
10614
|
step: "0.1",
|
|
10611
10615
|
className: "ps-pmv-inline-input",
|
|
10612
|
-
value: W[
|
|
10616
|
+
value: W[x.key] ?? "",
|
|
10613
10617
|
placeholder: "—",
|
|
10614
|
-
onChange: (c) =>
|
|
10618
|
+
onChange: (c) => i((hA) => ({ ...hA, [x.key]: c.target.value }))
|
|
10615
10619
|
}
|
|
10616
10620
|
),
|
|
10617
10621
|
/* @__PURE__ */ A("span", { className: "ps-pmv-inline-unit", children: F })
|
|
10618
10622
|
] }) })
|
|
10619
|
-
] },
|
|
10623
|
+
] }, x.key);
|
|
10620
10624
|
}),
|
|
10621
10625
|
f.gender === "female" && /* @__PURE__ */ P(rA, { children: [
|
|
10622
10626
|
/* @__PURE__ */ P("div", { className: "ps-pmv-measure-row", children: [
|
|
@@ -10627,10 +10631,10 @@ function A8({
|
|
|
10627
10631
|
{
|
|
10628
10632
|
className: "ps-pmv-inline-select",
|
|
10629
10633
|
value: k,
|
|
10630
|
-
onChange: (
|
|
10634
|
+
onChange: (x) => u(x.target.value),
|
|
10631
10635
|
children: [
|
|
10632
10636
|
/* @__PURE__ */ A("option", { value: "", children: "—" }),
|
|
10633
|
-
$B.map((
|
|
10637
|
+
$B.map((x) => /* @__PURE__ */ A("option", { value: x, children: x }, x))
|
|
10634
10638
|
]
|
|
10635
10639
|
}
|
|
10636
10640
|
) })
|
|
@@ -10643,10 +10647,10 @@ function A8({
|
|
|
10643
10647
|
{
|
|
10644
10648
|
className: "ps-pmv-inline-select",
|
|
10645
10649
|
value: v,
|
|
10646
|
-
onChange: (
|
|
10650
|
+
onChange: (x) => I(x.target.value),
|
|
10647
10651
|
children: [
|
|
10648
10652
|
/* @__PURE__ */ A("option", { value: "", children: "—" }),
|
|
10649
|
-
_B.map((
|
|
10653
|
+
_B.map((x) => /* @__PURE__ */ A("option", { value: x, children: x }, x))
|
|
10650
10654
|
]
|
|
10651
10655
|
}
|
|
10652
10656
|
) })
|
|
@@ -10702,7 +10706,7 @@ function P8({
|
|
|
10702
10706
|
onOpenDetail: C,
|
|
10703
10707
|
t: D
|
|
10704
10708
|
}) {
|
|
10705
|
-
const
|
|
10709
|
+
const t = (() => {
|
|
10706
10710
|
const z = f.height ?? f.heightCm;
|
|
10707
10711
|
if (!z) return null;
|
|
10708
10712
|
if (f.heightUnit === "in" || f.heightUnit === "ft") {
|
|
@@ -10729,9 +10733,9 @@ function P8({
|
|
|
10729
10733
|
/* @__PURE__ */ A("div", { className: "ps-msp-card-circle", children: f.photoBase64 ? /* @__PURE__ */ A("img", { src: f.photoBase64, alt: f.name }) : /* @__PURE__ */ A(mP, { size: 32 }) }),
|
|
10730
10734
|
/* @__PURE__ */ A("div", { className: "ps-msp-card-name", children: f.name }),
|
|
10731
10735
|
/* @__PURE__ */ P("div", { className: "ps-msp-card-meta", children: [
|
|
10732
|
-
|
|
10736
|
+
t && /* @__PURE__ */ P("div", { className: "ps-msp-meta-row", children: [
|
|
10733
10737
|
/* @__PURE__ */ A("span", { className: "ps-msp-meta-label", children: D("HEIGHT") }),
|
|
10734
|
-
/* @__PURE__ */ A("span", { className: "ps-msp-meta-value", children:
|
|
10738
|
+
/* @__PURE__ */ A("span", { className: "ps-msp-meta-value", children: t })
|
|
10735
10739
|
] }),
|
|
10736
10740
|
o && /* @__PURE__ */ P("div", { className: "ps-msp-meta-row", children: [
|
|
10737
10741
|
/* @__PURE__ */ A("span", { className: "ps-msp-meta-label", children: D("WEIGHT") }),
|
|
@@ -10794,7 +10798,7 @@ function g8({
|
|
|
10794
10798
|
onSaveNewProfile: B,
|
|
10795
10799
|
onSaveProfileMeasurements: C,
|
|
10796
10800
|
onSaveBraSize: D,
|
|
10797
|
-
onRequestDelete:
|
|
10801
|
+
onRequestDelete: t,
|
|
10798
10802
|
onClose: o,
|
|
10799
10803
|
onPhotoPreview: r,
|
|
10800
10804
|
onEstimateFromPhoto: z,
|
|
@@ -10802,22 +10806,22 @@ function g8({
|
|
|
10802
10806
|
t: T,
|
|
10803
10807
|
onRegisterBackInterceptor: F
|
|
10804
10808
|
}) {
|
|
10805
|
-
const [h, W] = j(!1), [
|
|
10809
|
+
const [h, W] = j(!1), [i, k] = j(null), u = i && f.find((v) => v.id === i) || null;
|
|
10806
10810
|
return JA(() => {
|
|
10807
|
-
|
|
10808
|
-
}, [f,
|
|
10811
|
+
i && !f.find((v) => v.id === i) && k(null);
|
|
10812
|
+
}, [f, i]), JA(() => {
|
|
10809
10813
|
if (!F) return;
|
|
10810
|
-
F(() => h ||
|
|
10814
|
+
F(() => h || i !== null, () => {
|
|
10811
10815
|
if (h) {
|
|
10812
10816
|
W(!1);
|
|
10813
10817
|
return;
|
|
10814
10818
|
}
|
|
10815
|
-
if (
|
|
10819
|
+
if (i !== null) {
|
|
10816
10820
|
k(null);
|
|
10817
10821
|
return;
|
|
10818
10822
|
}
|
|
10819
10823
|
});
|
|
10820
|
-
}, [h,
|
|
10824
|
+
}, [h, i, F]), /* @__PURE__ */ A("div", { className: "ps-msp-root", children: /* @__PURE__ */ A("div", { className: "ps-msp-scroll", children: u ? /* @__PURE__ */ A(
|
|
10821
10825
|
A8,
|
|
10822
10826
|
{
|
|
10823
10827
|
profile: u,
|
|
@@ -10828,7 +10832,7 @@ function g8({
|
|
|
10828
10832
|
},
|
|
10829
10833
|
onSaveMeasurements: (v, I) => C(u.id, v, I),
|
|
10830
10834
|
onSaveBraSize: D ? (v, I) => D(u.id, v, I) : void 0,
|
|
10831
|
-
onDelete: () =>
|
|
10835
|
+
onDelete: () => t(u.id),
|
|
10832
10836
|
onBack: () => k(null),
|
|
10833
10837
|
onSave: () => k(null),
|
|
10834
10838
|
t: T
|
|
@@ -10841,9 +10845,9 @@ function g8({
|
|
|
10841
10845
|
let I = null;
|
|
10842
10846
|
if (typeof window < "u")
|
|
10843
10847
|
try {
|
|
10844
|
-
const
|
|
10845
|
-
if (
|
|
10846
|
-
const N = JSON.parse(
|
|
10848
|
+
const K = localStorage.getItem("primestyle_profiles");
|
|
10849
|
+
if (K) {
|
|
10850
|
+
const N = JSON.parse(K);
|
|
10847
10851
|
N.length > 0 && (I = N[0].id ?? null);
|
|
10848
10852
|
}
|
|
10849
10853
|
} catch {
|
|
@@ -10869,7 +10873,7 @@ function g8({
|
|
|
10869
10873
|
isActive: v.id === n,
|
|
10870
10874
|
onSelect: () => g(v.id),
|
|
10871
10875
|
onEdit: () => k(v.id),
|
|
10872
|
-
onDelete: () =>
|
|
10876
|
+
onDelete: () => t(v.id),
|
|
10873
10877
|
onOpenDetail: () => k(v.id),
|
|
10874
10878
|
t: T
|
|
10875
10879
|
},
|
|
@@ -10909,7 +10913,7 @@ function w8({
|
|
|
10909
10913
|
setHeight: B,
|
|
10910
10914
|
heightFeet: C,
|
|
10911
10915
|
setHeightFeet: D,
|
|
10912
|
-
heightInches:
|
|
10916
|
+
heightInches: t,
|
|
10913
10917
|
setHeightInches: o,
|
|
10914
10918
|
weight: r,
|
|
10915
10919
|
setWeight: z,
|
|
@@ -10918,17 +10922,17 @@ function w8({
|
|
|
10918
10922
|
switchToMetric: F,
|
|
10919
10923
|
switchToImperial: h,
|
|
10920
10924
|
onUploadPhoto: W,
|
|
10921
|
-
onSwitchToScan:
|
|
10925
|
+
onSwitchToScan: i,
|
|
10922
10926
|
onNext: k,
|
|
10923
10927
|
canProceed: u,
|
|
10924
10928
|
fastPathLabel: v,
|
|
10925
10929
|
activeProfileName: I,
|
|
10926
|
-
onStartFresh:
|
|
10930
|
+
onStartFresh: K,
|
|
10927
10931
|
hidePhotoOptions: N = !1,
|
|
10928
|
-
error:
|
|
10932
|
+
error: x,
|
|
10929
10933
|
t: E
|
|
10930
10934
|
}) {
|
|
10931
|
-
const BA = parseFloat(e) || 173, c = (parseFloat(C) || 5) * 12 + (parseFloat(
|
|
10935
|
+
const BA = parseFloat(e) || 173, c = (parseFloat(C) || 5) * 12 + (parseFloat(t) || 8), hA = Math.floor(c / 12), l = c % 12, y = parseFloat(r) || (n === "kg" ? 70 : 154), XA = parseFloat(p) || 30, sA = n === "kg" ? 30 : 66, V = n === "kg" ? 200 : 440, s = 120, PA = 220, RA = 48, mA = 84, EA = 13, ZA = 100, Hf = (BA - s) / (PA - s) * 100, m = (c - RA) / (mA - RA) * 100, aA = (y - sA) / (V - sA) * 100, TA = (XA - EA) / (ZA - EA) * 100, bA = (nf) => {
|
|
10932
10936
|
const xA = Math.max(RA, Math.min(mA, nf));
|
|
10933
10937
|
D(String(Math.floor(xA / 12))), o(String(xA % 12));
|
|
10934
10938
|
}, VA = () => {
|
|
@@ -10945,9 +10949,9 @@ function w8({
|
|
|
10945
10949
|
E("Using"),
|
|
10946
10950
|
" ",
|
|
10947
10951
|
/* @__PURE__ */ A("strong", { children: I }),
|
|
10948
|
-
|
|
10952
|
+
K && /* @__PURE__ */ P(rA, { children: [
|
|
10949
10953
|
" · ",
|
|
10950
|
-
/* @__PURE__ */ A("button", { type: "button", className: "ps-bp-profile-hint-link", onClick:
|
|
10954
|
+
/* @__PURE__ */ A("button", { type: "button", className: "ps-bp-profile-hint-link", onClick: K, children: E("start fresh") })
|
|
10951
10955
|
] })
|
|
10952
10956
|
] }),
|
|
10953
10957
|
/* @__PURE__ */ P("div", { className: "ps-bpm-toggle", children: [
|
|
@@ -11077,7 +11081,7 @@ function w8({
|
|
|
11077
11081
|
}
|
|
11078
11082
|
)
|
|
11079
11083
|
] }),
|
|
11080
|
-
|
|
11084
|
+
x && /* @__PURE__ */ A("p", { className: "ps-bpm-error", children: x }),
|
|
11081
11085
|
/* @__PURE__ */ A("div", { className: "ps-bpm-spacer" }),
|
|
11082
11086
|
/* @__PURE__ */ P("div", { className: "ps-bpm-bottom", children: [
|
|
11083
11087
|
/* @__PURE__ */ A(
|
|
@@ -11096,7 +11100,7 @@ function w8({
|
|
|
11096
11100
|
mode: "manual",
|
|
11097
11101
|
onSwitchToManual: () => {
|
|
11098
11102
|
},
|
|
11099
|
-
onSwitchToScan:
|
|
11103
|
+
onSwitchToScan: i,
|
|
11100
11104
|
t: E
|
|
11101
11105
|
}
|
|
11102
11106
|
)
|
|
@@ -11127,7 +11131,7 @@ function Zn({
|
|
|
11127
11131
|
onSwitchToManual: B,
|
|
11128
11132
|
error: C,
|
|
11129
11133
|
photoVariant: D = "full-body",
|
|
11130
|
-
photoStepHeight:
|
|
11134
|
+
photoStepHeight: t,
|
|
11131
11135
|
onPhotoStepHeightChange: o,
|
|
11132
11136
|
ageConfirmed: r,
|
|
11133
11137
|
onAgeConfirmedChange: z,
|
|
@@ -11269,14 +11273,14 @@ function iP({
|
|
|
11269
11273
|
String(n).padStart(2, "0")
|
|
11270
11274
|
] }),
|
|
11271
11275
|
/* @__PURE__ */ A("h2", { className: "ps-bsm-question", children: g }),
|
|
11272
|
-
/* @__PURE__ */ A("div", { className: "ps-bsm-options-center", children: /* @__PURE__ */ A("div", { className: "ps-bsm-options", children: e.map((
|
|
11273
|
-
const r = B ===
|
|
11276
|
+
/* @__PURE__ */ A("div", { className: "ps-bsm-options-center", children: /* @__PURE__ */ A("div", { className: "ps-bsm-options", children: e.map((t, o) => {
|
|
11277
|
+
const r = B === t.value, z = String.fromCharCode(65 + o);
|
|
11274
11278
|
return /* @__PURE__ */ P(
|
|
11275
11279
|
"button",
|
|
11276
11280
|
{
|
|
11277
11281
|
type: "button",
|
|
11278
11282
|
className: `ps-bsm-card${r ? " ps-active" : ""}`,
|
|
11279
|
-
onClick: () => C(
|
|
11283
|
+
onClick: () => C(t.value),
|
|
11280
11284
|
children: [
|
|
11281
11285
|
/* @__PURE__ */ P("div", { className: "ps-bsm-card-content", children: [
|
|
11282
11286
|
/* @__PURE__ */ P("span", { className: "ps-bsm-card-eyebrow", children: [
|
|
@@ -11284,12 +11288,12 @@ function iP({
|
|
|
11284
11288
|
" ",
|
|
11285
11289
|
z
|
|
11286
11290
|
] }),
|
|
11287
|
-
/* @__PURE__ */ A("span", { className: "ps-bsm-card-label", children:
|
|
11291
|
+
/* @__PURE__ */ A("span", { className: "ps-bsm-card-label", children: t.label.toUpperCase() })
|
|
11288
11292
|
] }),
|
|
11289
|
-
|
|
11293
|
+
t.img && /* @__PURE__ */ A("div", { className: "ps-bsm-card-thumb", children: /* @__PURE__ */ A("img", { src: t.img, alt: t.label }) })
|
|
11290
11294
|
]
|
|
11291
11295
|
},
|
|
11292
|
-
|
|
11296
|
+
t.value
|
|
11293
11297
|
);
|
|
11294
11298
|
}) }) })
|
|
11295
11299
|
] });
|
|
@@ -11367,8 +11371,8 @@ function H8(f, n, g) {
|
|
|
11367
11371
|
return { cm: Math.round(D), inch: Math.round(D / 2.54) };
|
|
11368
11372
|
}
|
|
11369
11373
|
if (g === "IT") {
|
|
11370
|
-
const
|
|
11371
|
-
return { cm: Math.round(
|
|
11374
|
+
const t = 60 + B * 5 + e * 2.54;
|
|
11375
|
+
return { cm: Math.round(t), inch: Math.round(t / 2.54) };
|
|
11372
11376
|
}
|
|
11373
11377
|
const C = B + e;
|
|
11374
11378
|
return { cm: Math.round(C * 2.54), inch: Math.round(C) };
|
|
@@ -11381,7 +11385,7 @@ function z8({
|
|
|
11381
11385
|
sizingCountry: B,
|
|
11382
11386
|
heightUnit: C,
|
|
11383
11387
|
setHeightUnit: D,
|
|
11384
|
-
weightUnit:
|
|
11388
|
+
weightUnit: t,
|
|
11385
11389
|
setWeightUnit: o,
|
|
11386
11390
|
sizingUnit: r,
|
|
11387
11391
|
setSizingUnit: z,
|
|
@@ -11390,18 +11394,18 @@ function z8({
|
|
|
11390
11394
|
hasActiveProfileWithMeasurements: F = !1,
|
|
11391
11395
|
onUseActiveProfile: h,
|
|
11392
11396
|
activeProfileName: W,
|
|
11393
|
-
onStartFresh:
|
|
11397
|
+
onStartFresh: i,
|
|
11394
11398
|
activeProfile: k,
|
|
11395
11399
|
onBack: u,
|
|
11396
11400
|
t: v
|
|
11397
11401
|
}) {
|
|
11398
|
-
const I = g ? r8 : t8, [
|
|
11399
|
-
|
|
11400
|
-
const
|
|
11402
|
+
const I = g ? r8 : t8, [K, N] = j("basics");
|
|
11403
|
+
K === "photo" || I.indexOf(K);
|
|
11404
|
+
const x = NP(), E = Yn(B), BA = k?.height, c = k?.weight, hA = k?.age, l = k?.heightUnit === "ft" ? "in" : k?.heightUnit, y = k?.weightUnit, XA = BA != null && l === "cm" ? String(Math.round(BA)) : BA != null && (l === "in" || l === "ft") ? String(Math.round(BA * 2.54)) : e.current.height || "173", sA = BA != null && (l === "in" || l === "ft") ? Math.round(BA) : BA != null && l === "cm" ? Math.round(BA / 2.54) : null, V = sA != null ? String(Math.floor(sA / 12)) : e.current.heightFeet || "5", s = sA != null ? String(sA % 12) : e.current.heightInches || "8", PA = c != null ? String(Math.round(c)) : e.current.weight || (E ? "154" : "70"), RA = hA != null ? String(hA) : e.current.age || "30", [mA, EA] = j(XA), [ZA, Hf] = j(V), [m, aA] = j(s), [TA, bA] = j(PA), [VA, kA] = j(RA), [vA, SA] = j(
|
|
11401
11405
|
l || (C === "ft" ? "in" : C || (E ? "in" : "cm"))
|
|
11402
11406
|
), [ff, iA] = j(
|
|
11403
|
-
y ||
|
|
11404
|
-
), nf = vA === "in" || ff === "lbs", [xA, Ef] = j(null), [eA, $] = j(null), [_A, Of] = j(null), [cf, Mf] = j(!1), gf = tA(null), [qA, GA] = j(null), [_, uA] = j(() => sA != null ? String(Math.round(sA * 2.54)) : XA), [WA, a] = j(null), [X, nA] = j(null), [H, oA] = j(null), [zA, YA] = j(null), [wf, J] = j(""), [gA, Bf] = j(null), [FA, OA] = j(null), [AA, LA] = j(() => ["US", "UK", "AU"].includes(B) ? B === "AU" ? "UK" : B : ["FR", "ES"].includes(B) ? "FR" : ["IT"].includes(B) ? "IT" : ["JP", "CN", "KR"].includes(B) ? "JP" : "EU"), [Pf, lA] = j(!1),
|
|
11407
|
+
y || t || (E ? "lbs" : "kg")
|
|
11408
|
+
), nf = vA === "in" || ff === "lbs", [xA, Ef] = j(null), [eA, $] = j(null), [_A, Of] = j(null), [cf, Mf] = j(!1), gf = tA(null), [qA, GA] = j(null), [_, uA] = j(() => sA != null ? String(Math.round(sA * 2.54)) : XA), [WA, a] = j(null), [X, nA] = j(null), [H, oA] = j(null), [zA, YA] = j(null), [wf, J] = j(""), [gA, Bf] = j(null), [FA, OA] = j(null), [AA, LA] = j(() => ["US", "UK", "AU"].includes(B) ? B === "AU" ? "UK" : B : ["FR", "ES"].includes(B) ? "FR" : ["IT"].includes(B) ? "IT" : ["JP", "CN", "KR"].includes(B) ? "JP" : "EU"), [Pf, lA] = j(!1), O = pn[AA] || pn.US, [q, QA] = j(""), U = UA(async (M) => {
|
|
11405
11409
|
const cA = M.target.files?.[0];
|
|
11406
11410
|
if (!cA) return;
|
|
11407
11411
|
if (qA !== !0) {
|
|
@@ -11474,30 +11478,30 @@ function z8({
|
|
|
11474
11478
|
cupSize: FA || void 0
|
|
11475
11479
|
});
|
|
11476
11480
|
}, $A = UA(() => {
|
|
11477
|
-
if (
|
|
11481
|
+
if (K === "basics") {
|
|
11478
11482
|
if (!G()) return;
|
|
11479
11483
|
N(fA("basics"));
|
|
11480
|
-
} else if (
|
|
11484
|
+
} else if (K === "chest") {
|
|
11481
11485
|
if (!WA) return;
|
|
11482
11486
|
N(fA("chest"));
|
|
11483
|
-
} else if (
|
|
11487
|
+
} else if (K === "midsection") {
|
|
11484
11488
|
if (!X) return;
|
|
11485
11489
|
N(fA("midsection"));
|
|
11486
|
-
} else if (
|
|
11490
|
+
} else if (K === "seat") {
|
|
11487
11491
|
if (!zA) return;
|
|
11488
11492
|
const M = fA("seat");
|
|
11489
11493
|
M === "submit" ? NA() : N(M);
|
|
11490
|
-
} else if (
|
|
11494
|
+
} else if (K === "hips") {
|
|
11491
11495
|
if (!H) return;
|
|
11492
11496
|
const M = fA("hips");
|
|
11493
11497
|
M === "submit" ? NA() : N(M);
|
|
11494
|
-
} else if (
|
|
11498
|
+
} else if (K === "bra") {
|
|
11495
11499
|
if (!gA || !FA) {
|
|
11496
11500
|
QA(v("Please select both band and cup size"));
|
|
11497
11501
|
return;
|
|
11498
11502
|
}
|
|
11499
11503
|
QA(""), NA();
|
|
11500
|
-
} else if (
|
|
11504
|
+
} else if (K === "photo") {
|
|
11501
11505
|
if (!_A || !xA) {
|
|
11502
11506
|
if (F && h) {
|
|
11503
11507
|
h();
|
|
@@ -11516,20 +11520,20 @@ function z8({
|
|
|
11516
11520
|
gender: dA
|
|
11517
11521
|
});
|
|
11518
11522
|
}
|
|
11519
|
-
}, [
|
|
11523
|
+
}, [K, I, G, WA, X, H, zA, gA, FA, vA, ff, mA, ZA, m, TA, VA, _A, xA, _, e, D, o, p, T, g, dA, F, h]), ef = (M) => {
|
|
11520
11524
|
const cA = I.indexOf(M);
|
|
11521
11525
|
return cA > 0 ? I[cA - 1] : null;
|
|
11522
11526
|
}, yA = UA(() => {
|
|
11523
|
-
if (QA(""),
|
|
11527
|
+
if (QA(""), K === "basics")
|
|
11524
11528
|
u();
|
|
11525
|
-
else if (
|
|
11529
|
+
else if (K === "photo")
|
|
11526
11530
|
N("basics");
|
|
11527
11531
|
else {
|
|
11528
|
-
const M = ef(
|
|
11532
|
+
const M = ef(K);
|
|
11529
11533
|
M ? N(M) : u();
|
|
11530
11534
|
}
|
|
11531
|
-
}, [
|
|
11532
|
-
return
|
|
11535
|
+
}, [K, I, u]), KA = K === "basics" ? !0 : K === "chest" ? !!WA : K === "midsection" ? !!X : K === "seat" ? !!zA : K === "hips" ? !!H : K === "bra" ? !!(gA && FA) : K === "photo", Df = K === I[I.length - 1];
|
|
11536
|
+
return K === "photo" ? x ? /* @__PURE__ */ A("div", { className: "ps-bp-wrapper", children: /* @__PURE__ */ A(
|
|
11533
11537
|
Zn,
|
|
11534
11538
|
{
|
|
11535
11539
|
photoPreview: eA,
|
|
@@ -11787,7 +11791,7 @@ function z8({
|
|
|
11787
11791
|
] })
|
|
11788
11792
|
] }),
|
|
11789
11793
|
/* @__PURE__ */ A("input", { ref: gf, type: "file", accept: "image/*", onChange: U, style: { display: "none" } }),
|
|
11790
|
-
|
|
11794
|
+
x ? /* @__PURE__ */ P(rA, { children: [
|
|
11791
11795
|
/* @__PURE__ */ A("div", { className: "ps-bpm-spacer" }),
|
|
11792
11796
|
/* @__PURE__ */ P("div", { className: "ps-bpm-bottom", children: [
|
|
11793
11797
|
/* @__PURE__ */ A(
|
|
@@ -11840,7 +11844,7 @@ function z8({
|
|
|
11840
11844
|
}
|
|
11841
11845
|
),
|
|
11842
11846
|
/* @__PURE__ */ P("div", { className: "ps-bp-root", children: [
|
|
11843
|
-
|
|
11847
|
+
K === "basics" && (() => {
|
|
11844
11848
|
const M = () => {
|
|
11845
11849
|
if (vA === "in") {
|
|
11846
11850
|
const pA = (parseFloat(ZA) || 5) * 12 + (parseFloat(m) || 8);
|
|
@@ -11854,7 +11858,7 @@ function z8({
|
|
|
11854
11858
|
}
|
|
11855
11859
|
ff === "kg" && TA && bA(String(Math.round(parseFloat(TA) * 2.205))), SA("in"), iA("lbs"), D("in"), o("lbs"), z?.("in");
|
|
11856
11860
|
};
|
|
11857
|
-
return
|
|
11861
|
+
return x ? /* @__PURE__ */ A(
|
|
11858
11862
|
w8,
|
|
11859
11863
|
{
|
|
11860
11864
|
hUnit: vA,
|
|
@@ -11879,7 +11883,7 @@ function z8({
|
|
|
11879
11883
|
canProceed: !0,
|
|
11880
11884
|
fastPathLabel: F ? v("Find My Best Fit") + (xf(vA) ? ` (${xf(vA)})` : "") : void 0,
|
|
11881
11885
|
activeProfileName: F ? W : null,
|
|
11882
|
-
onStartFresh:
|
|
11886
|
+
onStartFresh: i,
|
|
11883
11887
|
error: q,
|
|
11884
11888
|
t: v
|
|
11885
11889
|
},
|
|
@@ -11890,9 +11894,9 @@ function z8({
|
|
|
11890
11894
|
v("Using"),
|
|
11891
11895
|
" ",
|
|
11892
11896
|
/* @__PURE__ */ A("strong", { children: W }),
|
|
11893
|
-
|
|
11897
|
+
i && /* @__PURE__ */ P(rA, { children: [
|
|
11894
11898
|
" · ",
|
|
11895
|
-
/* @__PURE__ */ A("button", { type: "button", className: "ps-bp-profile-hint-link", onClick:
|
|
11899
|
+
/* @__PURE__ */ A("button", { type: "button", className: "ps-bp-profile-hint-link", onClick: i, children: v("start fresh") })
|
|
11896
11900
|
] })
|
|
11897
11901
|
] }),
|
|
11898
11902
|
/* @__PURE__ */ P("div", { className: "ps-bp-system-toggle", children: [
|
|
@@ -11935,7 +11939,7 @@ function z8({
|
|
|
11935
11939
|
q && /* @__PURE__ */ A("p", { className: "ps-bp-error", children: q })
|
|
11936
11940
|
] }, "step-basics");
|
|
11937
11941
|
})(),
|
|
11938
|
-
|
|
11942
|
+
K === "chest" && !g && (x ? /* @__PURE__ */ A(
|
|
11939
11943
|
iP,
|
|
11940
11944
|
{
|
|
11941
11945
|
stepNumber: I.indexOf("chest") + 1,
|
|
@@ -11960,7 +11964,7 @@ function z8({
|
|
|
11960
11964
|
] }),
|
|
11961
11965
|
/* @__PURE__ */ A("p", { className: "ps-bp-hover-hint", children: wf || " " })
|
|
11962
11966
|
] }, "step-chest")),
|
|
11963
|
-
|
|
11967
|
+
K === "midsection" && (x ? /* @__PURE__ */ A(
|
|
11964
11968
|
iP,
|
|
11965
11969
|
{
|
|
11966
11970
|
stepNumber: I.indexOf("midsection") + 1,
|
|
@@ -11993,7 +11997,7 @@ function z8({
|
|
|
11993
11997
|
] }) }),
|
|
11994
11998
|
/* @__PURE__ */ A("p", { className: "ps-bp-hover-hint", children: wf || " " })
|
|
11995
11999
|
] }, "step-midsection")),
|
|
11996
|
-
|
|
12000
|
+
K === "seat" && (x ? /* @__PURE__ */ A(
|
|
11997
12001
|
iP,
|
|
11998
12002
|
{
|
|
11999
12003
|
stepNumber: I.indexOf("seat") + 1,
|
|
@@ -12026,7 +12030,7 @@ function z8({
|
|
|
12026
12030
|
] }) }),
|
|
12027
12031
|
/* @__PURE__ */ A("p", { className: "ps-bp-hover-hint", children: wf || " " })
|
|
12028
12032
|
] }, "step-seat")),
|
|
12029
|
-
|
|
12033
|
+
K === "hips" && g && (x ? /* @__PURE__ */ A(
|
|
12030
12034
|
iP,
|
|
12031
12035
|
{
|
|
12032
12036
|
stepNumber: I.indexOf("hips") + 1,
|
|
@@ -12051,7 +12055,7 @@ function z8({
|
|
|
12051
12055
|
] }),
|
|
12052
12056
|
/* @__PURE__ */ A("p", { className: "ps-bp-hover-hint", children: wf || " " })
|
|
12053
12057
|
] }, "step-hips")),
|
|
12054
|
-
|
|
12058
|
+
K === "bra" && g && /* @__PURE__ */ P("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-bra-step", children: [
|
|
12055
12059
|
/* @__PURE__ */ A("h2", { className: "ps-bp-title", children: v("Select your bra size") }),
|
|
12056
12060
|
/* @__PURE__ */ P("div", { className: "ps-bp-bra-section", children: [
|
|
12057
12061
|
/* @__PURE__ */ P("div", { className: "ps-bp-bra-header", children: [
|
|
@@ -12098,7 +12102,7 @@ function z8({
|
|
|
12098
12102
|
] });
|
|
12099
12103
|
})()
|
|
12100
12104
|
] }),
|
|
12101
|
-
/* @__PURE__ */ A("div", { className: "ps-bp-bra-grid", children:
|
|
12105
|
+
/* @__PURE__ */ A("div", { className: "ps-bp-bra-grid", children: O.map((M) => /* @__PURE__ */ A(
|
|
12102
12106
|
"button",
|
|
12103
12107
|
{
|
|
12104
12108
|
className: `ps-bp-bra-btn${gA === M ? " ps-bp-bra-btn-selected" : ""}`,
|
|
@@ -12124,10 +12128,10 @@ function z8({
|
|
|
12124
12128
|
] }),
|
|
12125
12129
|
q && /* @__PURE__ */ A("p", { className: "ps-bp-error", children: q })
|
|
12126
12130
|
] }, "step-bra"),
|
|
12127
|
-
!(
|
|
12128
|
-
const M =
|
|
12131
|
+
!(x && K === "basics") && (() => {
|
|
12132
|
+
const M = K === "basics" && F && !!h, cA = M ? h : $A, pA = xf(vA) ? ` (${xf(vA)})` : "", tf = M ? v("Find My Best Fit") + pA : Df ? v("Find My Size") + pA : v("Next");
|
|
12129
12133
|
return /* @__PURE__ */ P("div", { className: "ps-bp-nav", children: [
|
|
12130
|
-
|
|
12134
|
+
K !== "basics" ? /* @__PURE__ */ P("button", { className: "ps-bp-back-btn", onClick: yA, type: "button", children: [
|
|
12131
12135
|
/* @__PURE__ */ A("span", { className: "ps-bp-back-arrow", children: "←" }),
|
|
12132
12136
|
" ",
|
|
12133
12137
|
v("Back")
|
|
@@ -12161,7 +12165,7 @@ function SP({
|
|
|
12161
12165
|
disablePhotoUpload: B = !1,
|
|
12162
12166
|
productImage: C,
|
|
12163
12167
|
productTitle: D,
|
|
12164
|
-
formRef:
|
|
12168
|
+
formRef: t,
|
|
12165
12169
|
sizingUnit: o,
|
|
12166
12170
|
setSizingUnit: r,
|
|
12167
12171
|
setSizingMethod: z,
|
|
@@ -12170,14 +12174,14 @@ function SP({
|
|
|
12170
12174
|
submitSizing: F,
|
|
12171
12175
|
onSnapSubmit: h,
|
|
12172
12176
|
onBack: W,
|
|
12173
|
-
t
|
|
12177
|
+
t: i
|
|
12174
12178
|
}) {
|
|
12175
|
-
const k = e === "close-up", u = NP(), [v, I] = j("manual"), [
|
|
12179
|
+
const k = e === "close-up", u = NP(), [v, I] = j("manual"), [K, N] = j(() => {
|
|
12176
12180
|
const m = {};
|
|
12177
12181
|
return n.forEach((aA) => {
|
|
12178
|
-
m[aA.key] =
|
|
12182
|
+
m[aA.key] = t.current[aA.key] || "";
|
|
12179
12183
|
}), m;
|
|
12180
|
-
}), [
|
|
12184
|
+
}), [x, E] = j(""), BA = tA(null), [c, hA] = j(null), [l, y] = j(null), [XA, sA] = j(null), [V, s] = j(null), PA = UA(async (m) => {
|
|
12181
12185
|
const aA = m.target.files?.[0];
|
|
12182
12186
|
if (!aA) return;
|
|
12183
12187
|
const TA = URL.createObjectURL(aA);
|
|
@@ -12194,22 +12198,22 @@ function SP({
|
|
|
12194
12198
|
}, EA = () => {
|
|
12195
12199
|
const m = n[0];
|
|
12196
12200
|
if (!m) return;
|
|
12197
|
-
const aA = parseFloat(
|
|
12201
|
+
const aA = parseFloat(K[m.key] || "");
|
|
12198
12202
|
if (!aA || aA <= 0) {
|
|
12199
|
-
E(
|
|
12203
|
+
E(i("Please enter your ") + i(m.label).toLowerCase());
|
|
12200
12204
|
return;
|
|
12201
12205
|
}
|
|
12202
12206
|
n.forEach((TA) => {
|
|
12203
|
-
const bA = parseFloat(
|
|
12204
|
-
bA > 0 && (
|
|
12205
|
-
}),
|
|
12207
|
+
const bA = parseFloat(K[TA.key] || "");
|
|
12208
|
+
bA > 0 && (t.current[TA.key] = String(bA));
|
|
12209
|
+
}), t.current.gender = t.current.gender || "male", z("exact"), p(!0), T("size-result"), F("exact");
|
|
12206
12210
|
}, ZA = () => {
|
|
12207
12211
|
if (V !== !0) {
|
|
12208
|
-
E(
|
|
12212
|
+
E(i("Please confirm that the person in the photo is 18 or older before uploading."));
|
|
12209
12213
|
return;
|
|
12210
12214
|
}
|
|
12211
12215
|
if (!l || !XA) {
|
|
12212
|
-
E(
|
|
12216
|
+
E(i("Please upload a photo"));
|
|
12213
12217
|
return;
|
|
12214
12218
|
}
|
|
12215
12219
|
h({
|
|
@@ -12219,7 +12223,7 @@ function SP({
|
|
|
12219
12223
|
weight: 0,
|
|
12220
12224
|
heightUnit: "cm",
|
|
12221
12225
|
weightUnit: "kg",
|
|
12222
|
-
gender:
|
|
12226
|
+
gender: t.current.gender || "male"
|
|
12223
12227
|
});
|
|
12224
12228
|
}, Hf = g.find((m) => m.value === o)?.label || g[0].label;
|
|
12225
12229
|
return u && v === "photo" ? /* @__PURE__ */ A("div", { className: "ps-bp-wrapper", children: /* @__PURE__ */ A(
|
|
@@ -12230,36 +12234,36 @@ function SP({
|
|
|
12230
12234
|
handleRemovePhoto: RA,
|
|
12231
12235
|
onAnalyze: ZA,
|
|
12232
12236
|
onSwitchToManual: () => I("manual"),
|
|
12233
|
-
error:
|
|
12237
|
+
error: x,
|
|
12234
12238
|
photoVariant: e,
|
|
12235
12239
|
ageConfirmed: V,
|
|
12236
12240
|
onAgeConfirmedChange: (m) => {
|
|
12237
12241
|
s(m), m === !0 && E("");
|
|
12238
12242
|
},
|
|
12239
|
-
t
|
|
12243
|
+
t: i
|
|
12240
12244
|
}
|
|
12241
12245
|
) }) : u ? /* @__PURE__ */ A("div", { className: "ps-bp-wrapper", children: /* @__PURE__ */ P("div", { className: "ps-bpm-root", children: [
|
|
12242
|
-
/* @__PURE__ */ A("div", { className: "ps-bpm-header", children: /* @__PURE__ */ A("h2", { className: "ps-bpm-title", children:
|
|
12246
|
+
/* @__PURE__ */ A("div", { className: "ps-bpm-header", children: /* @__PURE__ */ A("h2", { className: "ps-bpm-title", children: i(f) }) }),
|
|
12243
12247
|
/* @__PURE__ */ A("div", { className: "ps-bpm-toggle", style: { padding: "0 4%" }, children: g.map((m) => /* @__PURE__ */ A(
|
|
12244
12248
|
"button",
|
|
12245
12249
|
{
|
|
12246
12250
|
type: "button",
|
|
12247
12251
|
className: `ps-bpm-toggle-btn${o === m.value ? " ps-bpm-toggle-active" : ""}`,
|
|
12248
12252
|
onClick: () => r(m.value),
|
|
12249
|
-
children:
|
|
12253
|
+
children: i(m.label)
|
|
12250
12254
|
},
|
|
12251
12255
|
m.value
|
|
12252
12256
|
)) }),
|
|
12253
12257
|
/* @__PURE__ */ P("div", { style: { padding: "0 4%" }, children: [
|
|
12254
12258
|
n.map((m) => /* @__PURE__ */ P("div", { className: "ps-bpm-row", children: [
|
|
12255
|
-
/* @__PURE__ */ A("span", { className: "ps-bpm-label", children:
|
|
12259
|
+
/* @__PURE__ */ A("span", { className: "ps-bpm-label", children: i(m.label).toUpperCase() }),
|
|
12256
12260
|
/* @__PURE__ */ P("div", { className: "ps-bpm-inline-group", children: [
|
|
12257
12261
|
/* @__PURE__ */ A(
|
|
12258
12262
|
"input",
|
|
12259
12263
|
{
|
|
12260
12264
|
type: "number",
|
|
12261
12265
|
className: "ps-bpm-value-input",
|
|
12262
|
-
value:
|
|
12266
|
+
value: K[m.key],
|
|
12263
12267
|
onChange: (aA) => mA(m.key, aA.target.value),
|
|
12264
12268
|
placeholder: m.placeholder[o] || m.placeholder.cm || m.placeholder.in || "",
|
|
12265
12269
|
step: m.step ?? 0.5,
|
|
@@ -12270,20 +12274,20 @@ function SP({
|
|
|
12270
12274
|
/* @__PURE__ */ A("span", { className: "ps-bpm-unit", children: Hf.toLowerCase() })
|
|
12271
12275
|
] })
|
|
12272
12276
|
] }, m.key)),
|
|
12273
|
-
|
|
12277
|
+
x && /* @__PURE__ */ A("p", { className: "ps-acc-error", style: { paddingTop: 8 }, children: x })
|
|
12274
12278
|
] }),
|
|
12275
12279
|
/* @__PURE__ */ A("div", { style: { flex: 1, minHeight: 16 } }),
|
|
12276
12280
|
!B && /* @__PURE__ */ P(rA, { children: [
|
|
12277
|
-
/* @__PURE__ */ A("div", { className: "ps-bpm-or", children: /* @__PURE__ */ A("span", { children:
|
|
12281
|
+
/* @__PURE__ */ A("div", { className: "ps-bpm-or", children: /* @__PURE__ */ A("span", { children: i("or") }) }),
|
|
12278
12282
|
/* @__PURE__ */ P("button", { type: "button", className: "ps-bpm-upload-link", onClick: () => I("photo"), children: [
|
|
12279
12283
|
/* @__PURE__ */ A(Un, {}),
|
|
12280
|
-
/* @__PURE__ */ A("span", { children:
|
|
12284
|
+
/* @__PURE__ */ A("span", { children: i(k ? "Upload a close-up face photo or selfie" : "Upload a photo for AI sizing") }),
|
|
12281
12285
|
/* @__PURE__ */ A("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "14", height: "14", children: /* @__PURE__ */ A("polyline", { points: "9 18 15 12 9 6" }) })
|
|
12282
12286
|
] })
|
|
12283
12287
|
] }),
|
|
12284
12288
|
/* @__PURE__ */ P("div", { className: "ps-bpm-bottom", children: [
|
|
12285
12289
|
/* @__PURE__ */ P("button", { type: "button", className: "ps-bpm-next-btn", onClick: EA, children: [
|
|
12286
|
-
|
|
12290
|
+
i("Find My Size"),
|
|
12287
12291
|
xf(o) ? ` (${xf(o)})` : "",
|
|
12288
12292
|
" ",
|
|
12289
12293
|
/* @__PURE__ */ A(_f, {})
|
|
@@ -12295,7 +12299,7 @@ function SP({
|
|
|
12295
12299
|
onSwitchToManual: () => {
|
|
12296
12300
|
},
|
|
12297
12301
|
onSwitchToScan: () => I("photo"),
|
|
12298
|
-
t
|
|
12302
|
+
t: i
|
|
12299
12303
|
}
|
|
12300
12304
|
)
|
|
12301
12305
|
] })
|
|
@@ -12335,8 +12339,8 @@ function SP({
|
|
|
12335
12339
|
}, style: { position: "absolute", top: "0.5vw", right: "0.5vw", width: "1.4vw", height: "1.4vw", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "none", color: "#fff", fontSize: "0.7vw", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center" }, children: "×" })
|
|
12336
12340
|
] }) : /* @__PURE__ */ P(rA, { children: [
|
|
12337
12341
|
/* @__PURE__ */ A(zP, { size: 32 }),
|
|
12338
|
-
/* @__PURE__ */ A("span", { style: { fontSize: "0.85vw", fontWeight: 600, color: "var(--ps-text-primary)", marginTop: "0.5vw" }, children:
|
|
12339
|
-
/* @__PURE__ */ A("span", { style: { fontSize: "0.6vw", color: "var(--ps-text-muted)", marginTop: "0.2vw" }, children:
|
|
12342
|
+
/* @__PURE__ */ A("span", { style: { fontSize: "0.85vw", fontWeight: 600, color: "var(--ps-text-primary)", marginTop: "0.5vw" }, children: i(k ? "Upload close-up photo" : "Upload your photo") }),
|
|
12343
|
+
/* @__PURE__ */ A("span", { style: { fontSize: "0.6vw", color: "var(--ps-text-muted)", marginTop: "0.2vw" }, children: i(k ? "Click or drag a close-up face photo" : "Click or drag a full-body photo") }),
|
|
12340
12344
|
/* @__PURE__ */ A("span", { style: { fontSize: "0.5vw", color: "var(--ps-text-dim)", marginTop: "0.4vw" }, children: "JPEG, PNG (max 10MB)" })
|
|
12341
12345
|
] })
|
|
12342
12346
|
}
|
|
@@ -12372,8 +12376,8 @@ function SP({
|
|
|
12372
12376
|
textAlign: "center",
|
|
12373
12377
|
gap: "0.75vw"
|
|
12374
12378
|
}, children: [
|
|
12375
|
-
/* @__PURE__ */ A("div", { style: { fontSize: "0.62vw", fontWeight: 700, letterSpacing: "0.18em", textTransform: "uppercase", color: "var(--ps-accent)" }, children:
|
|
12376
|
-
/* @__PURE__ */ A("div", { style: { fontSize: "0.95vw", fontWeight: 600, lineHeight: 1.35, color: "var(--ps-text-primary)" }, children:
|
|
12379
|
+
/* @__PURE__ */ A("div", { style: { fontSize: "0.62vw", fontWeight: 700, letterSpacing: "0.18em", textTransform: "uppercase", color: "var(--ps-accent)" }, children: i("AGE VERIFICATION") }),
|
|
12380
|
+
/* @__PURE__ */ A("div", { style: { fontSize: "0.95vw", fontWeight: 600, lineHeight: 1.35, color: "var(--ps-text-primary)" }, children: i("Is the person in this photo 18 years or older?") }),
|
|
12377
12381
|
/* @__PURE__ */ P("div", { style: { display: "flex", gap: "0.65vw", width: "100%", marginTop: "0.4vw" }, children: [
|
|
12378
12382
|
/* @__PURE__ */ A(
|
|
12379
12383
|
"button",
|
|
@@ -12394,7 +12398,7 @@ function SP({
|
|
|
12394
12398
|
fontWeight: 700,
|
|
12395
12399
|
cursor: "pointer"
|
|
12396
12400
|
},
|
|
12397
|
-
children:
|
|
12401
|
+
children: i("Yes")
|
|
12398
12402
|
}
|
|
12399
12403
|
),
|
|
12400
12404
|
/* @__PURE__ */ A(
|
|
@@ -12414,7 +12418,7 @@ function SP({
|
|
|
12414
12418
|
fontWeight: 700,
|
|
12415
12419
|
cursor: "pointer"
|
|
12416
12420
|
},
|
|
12417
|
-
children:
|
|
12421
|
+
children: i("No")
|
|
12418
12422
|
}
|
|
12419
12423
|
)
|
|
12420
12424
|
] })
|
|
@@ -12452,8 +12456,8 @@ function SP({
|
|
|
12452
12456
|
textAlign: "center",
|
|
12453
12457
|
gap: "0.75vw"
|
|
12454
12458
|
}, children: [
|
|
12455
|
-
/* @__PURE__ */ A("div", { style: { fontSize: "0.62vw", fontWeight: 700, letterSpacing: "0.18em", textTransform: "uppercase", color: "#C02626" }, children:
|
|
12456
|
-
/* @__PURE__ */ A("div", { style: { fontSize: "0.95vw", fontWeight: 600, lineHeight: 1.35, color: "var(--ps-text-primary)" }, children:
|
|
12459
|
+
/* @__PURE__ */ A("div", { style: { fontSize: "0.62vw", fontWeight: 700, letterSpacing: "0.18em", textTransform: "uppercase", color: "#C02626" }, children: i("UPLOAD NOT ALLOWED") }),
|
|
12460
|
+
/* @__PURE__ */ A("div", { style: { fontSize: "0.95vw", fontWeight: 600, lineHeight: 1.35, color: "var(--ps-text-primary)" }, children: i("For your safety, we cannot process photos of people under 18.") }),
|
|
12457
12461
|
/* @__PURE__ */ A(
|
|
12458
12462
|
"button",
|
|
12459
12463
|
{
|
|
@@ -12470,7 +12474,7 @@ function SP({
|
|
|
12470
12474
|
fontWeight: 700,
|
|
12471
12475
|
cursor: "pointer"
|
|
12472
12476
|
},
|
|
12473
|
-
children:
|
|
12477
|
+
children: i("Go back")
|
|
12474
12478
|
}
|
|
12475
12479
|
)
|
|
12476
12480
|
] })
|
|
@@ -12478,67 +12482,67 @@ function SP({
|
|
|
12478
12482
|
)
|
|
12479
12483
|
] }),
|
|
12480
12484
|
/* @__PURE__ */ P("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "0.6vw", justifyContent: "center" }, children: [
|
|
12481
|
-
/* @__PURE__ */ A("div", { style: { fontSize: "0.85vw", fontWeight: 700, color: "var(--ps-text-primary)", marginBottom: "0.3vw" }, children:
|
|
12485
|
+
/* @__PURE__ */ A("div", { style: { fontSize: "0.85vw", fontWeight: 700, color: "var(--ps-text-primary)", marginBottom: "0.3vw" }, children: i("How to take the best photo") }),
|
|
12482
12486
|
/* @__PURE__ */ P("div", { style: { background: "#ddfbe7", borderRadius: "0.5vw", padding: "0.6vw 0.8vw" }, children: [
|
|
12483
12487
|
/* @__PURE__ */ P("div", { style: { display: "flex", alignItems: "center", gap: "0.3vw", marginBottom: "0.3vw" }, children: [
|
|
12484
12488
|
/* @__PURE__ */ A("span", { style: { color: "#1c9d4c", fontSize: "0.75vw", fontWeight: 700 }, children: "✓" }),
|
|
12485
|
-
/* @__PURE__ */ A("span", { style: { color: "#1c9d4c", fontSize: "0.65vw", fontWeight: 600 }, children:
|
|
12489
|
+
/* @__PURE__ */ A("span", { style: { color: "#1c9d4c", fontSize: "0.65vw", fontWeight: 600 }, children: i("Do") })
|
|
12486
12490
|
] }),
|
|
12487
12491
|
/* @__PURE__ */ A("div", { style: { fontSize: "0.58vw", color: "var(--ps-text-primary)", lineHeight: 1.8 }, children: k ? /* @__PURE__ */ P(rA, { children: [
|
|
12488
|
-
|
|
12492
|
+
i("Face the camera directly, centered in frame"),
|
|
12489
12493
|
/* @__PURE__ */ A("br", {}),
|
|
12490
|
-
|
|
12494
|
+
i("Use natural, even lighting (e.g. near a window)"),
|
|
12491
12495
|
/* @__PURE__ */ A("br", {}),
|
|
12492
|
-
|
|
12496
|
+
i("Keep hair away from your face and ears"),
|
|
12493
12497
|
/* @__PURE__ */ A("br", {}),
|
|
12494
|
-
|
|
12498
|
+
i("Choose a plain, light background"),
|
|
12495
12499
|
/* @__PURE__ */ A("br", {}),
|
|
12496
|
-
|
|
12500
|
+
i("Hold the camera at eye level")
|
|
12497
12501
|
] }) : /* @__PURE__ */ P(rA, { children: [
|
|
12498
|
-
|
|
12502
|
+
i("Stand facing the camera with your full body in frame"),
|
|
12499
12503
|
/* @__PURE__ */ A("br", {}),
|
|
12500
|
-
|
|
12504
|
+
i("Use natural or even lighting (e.g. near a window)"),
|
|
12501
12505
|
/* @__PURE__ */ A("br", {}),
|
|
12502
|
-
|
|
12506
|
+
i("Wear fitted, simple clothing (e.g. neutral colors)"),
|
|
12503
12507
|
/* @__PURE__ */ A("br", {}),
|
|
12504
|
-
|
|
12508
|
+
i("Choose a plain background (a light wall is ideal)"),
|
|
12505
12509
|
/* @__PURE__ */ A("br", {}),
|
|
12506
|
-
|
|
12510
|
+
i("Stand straight and still, arms relaxed by your sides")
|
|
12507
12511
|
] }) })
|
|
12508
12512
|
] }),
|
|
12509
12513
|
/* @__PURE__ */ P("div", { style: { background: "#ffe2e2", borderRadius: "0.5vw", padding: "0.6vw 0.8vw" }, children: [
|
|
12510
12514
|
/* @__PURE__ */ P("div", { style: { display: "flex", alignItems: "center", gap: "0.3vw", marginBottom: "0.3vw" }, children: [
|
|
12511
12515
|
/* @__PURE__ */ A("span", { style: { color: "#e7000b", fontSize: "0.75vw", fontWeight: 700 }, children: "✗" }),
|
|
12512
|
-
/* @__PURE__ */ A("span", { style: { color: "#e7000b", fontSize: "0.65vw", fontWeight: 600 }, children:
|
|
12516
|
+
/* @__PURE__ */ A("span", { style: { color: "#e7000b", fontSize: "0.65vw", fontWeight: 600 }, children: i("Don't") })
|
|
12513
12517
|
] }),
|
|
12514
12518
|
/* @__PURE__ */ A("div", { style: { fontSize: "0.58vw", color: "var(--ps-text-primary)", lineHeight: 1.8 }, children: k ? /* @__PURE__ */ P(rA, { children: [
|
|
12515
|
-
|
|
12519
|
+
i("Don't wear sunglasses or a hat in the photo"),
|
|
12516
12520
|
/* @__PURE__ */ A("br", {}),
|
|
12517
|
-
|
|
12521
|
+
i("Don't tilt or turn your head"),
|
|
12518
12522
|
/* @__PURE__ */ A("br", {}),
|
|
12519
|
-
|
|
12523
|
+
i("Don't use strong backlighting or flash"),
|
|
12520
12524
|
/* @__PURE__ */ A("br", {}),
|
|
12521
|
-
|
|
12525
|
+
i("Don't crop out your ears or top of head"),
|
|
12522
12526
|
/* @__PURE__ */ A("br", {}),
|
|
12523
|
-
|
|
12527
|
+
i("Don't apply filters or heavy edits")
|
|
12524
12528
|
] }) : /* @__PURE__ */ P(rA, { children: [
|
|
12525
|
-
|
|
12529
|
+
i("Don't wear loose, baggy, or layered clothing"),
|
|
12526
12530
|
/* @__PURE__ */ A("br", {}),
|
|
12527
|
-
|
|
12531
|
+
i("Don't sit, pose, or bend your body"),
|
|
12528
12532
|
/* @__PURE__ */ A("br", {}),
|
|
12529
|
-
|
|
12533
|
+
i("Don't use strong backlighting"),
|
|
12530
12534
|
/* @__PURE__ */ A("br", {}),
|
|
12531
|
-
|
|
12535
|
+
i("Don't take mirror photos or selfies"),
|
|
12532
12536
|
/* @__PURE__ */ A("br", {}),
|
|
12533
|
-
|
|
12537
|
+
i("Don't apply filters, effects, or edits")
|
|
12534
12538
|
] }) })
|
|
12535
12539
|
] }),
|
|
12536
12540
|
/* @__PURE__ */ P("div", { style: { background: "#c6e1f7", borderRadius: "0.5vw", padding: "0.6vw 0.8vw" }, children: [
|
|
12537
12541
|
/* @__PURE__ */ P("div", { style: { display: "flex", alignItems: "center", gap: "0.3vw", marginBottom: "0.2vw" }, children: [
|
|
12538
12542
|
/* @__PURE__ */ A("span", { style: { fontSize: "0.7vw" }, children: "💡" }),
|
|
12539
|
-
/* @__PURE__ */ A("span", { style: { color: "#3267c3", fontSize: "0.65vw", fontWeight: 600 }, children:
|
|
12543
|
+
/* @__PURE__ */ A("span", { style: { color: "#3267c3", fontSize: "0.65vw", fontWeight: 600 }, children: i("Quick Tip") })
|
|
12540
12544
|
] }),
|
|
12541
|
-
/* @__PURE__ */ A("div", { style: { fontSize: "0.58vw", color: "var(--ps-text-primary)", lineHeight: 1.6 }, children:
|
|
12545
|
+
/* @__PURE__ */ A("div", { style: { fontSize: "0.58vw", color: "var(--ps-text-primary)", lineHeight: 1.6 }, children: i(k ? "A clear, well-lit face photo gives the most accurate fit for eyewear and headwear." : "The simpler your photo is, the more accurate your virtual try-on results will be.") })
|
|
12542
12546
|
] }),
|
|
12543
12547
|
/* @__PURE__ */ P("div", { style: {
|
|
12544
12548
|
background: "rgba(33, 84, 239, 0.04)",
|
|
@@ -12551,22 +12555,22 @@ function SP({
|
|
|
12551
12555
|
}, children: [
|
|
12552
12556
|
/* @__PURE__ */ P("div", { style: { display: "flex", alignItems: "center", gap: "0.35vw" }, children: [
|
|
12553
12557
|
/* @__PURE__ */ A("svg", { viewBox: "0 0 24 24", width: "0.75vw", height: "0.75vw", fill: "none", stroke: "#2154ef", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ A("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }) }),
|
|
12554
|
-
/* @__PURE__ */ A("span", { style: { color: "#2154ef", fontSize: "0.62vw", fontWeight: 700, letterSpacing: "0.12em", textTransform: "uppercase" }, children:
|
|
12558
|
+
/* @__PURE__ */ A("span", { style: { color: "#2154ef", fontSize: "0.62vw", fontWeight: 700, letterSpacing: "0.12em", textTransform: "uppercase" }, children: i("Legal Notice") })
|
|
12555
12559
|
] }),
|
|
12556
|
-
/* @__PURE__ */ A("div", { style: { fontSize: "0.58vw", color: "var(--ps-text-secondary)", lineHeight: 1.55 }, children:
|
|
12560
|
+
/* @__PURE__ */ A("div", { style: { fontSize: "0.58vw", color: "var(--ps-text-secondary)", lineHeight: 1.55 }, children: i("Your image will be used to generate a virtual try-on preview showing how selected items may look and fit. Images are processed securely and are not stored after generation.") })
|
|
12557
12561
|
] })
|
|
12558
12562
|
] })
|
|
12559
12563
|
] }),
|
|
12560
12564
|
/* @__PURE__ */ A("input", { ref: BA, type: "file", accept: "image/*", style: { display: "none" }, onChange: PA }),
|
|
12561
|
-
|
|
12565
|
+
x && /* @__PURE__ */ A("p", { className: "ps-bp-error", style: { padding: "0 1.5vw" }, children: x }),
|
|
12562
12566
|
/* @__PURE__ */ P("div", { className: "ps-bp-nav", children: [
|
|
12563
12567
|
/* @__PURE__ */ P("button", { className: "ps-bp-back-btn", onClick: () => I("manual"), type: "button", children: [
|
|
12564
12568
|
/* @__PURE__ */ A("span", { className: "ps-bp-back-arrow", children: "←" }),
|
|
12565
12569
|
" ",
|
|
12566
|
-
|
|
12570
|
+
i("Back")
|
|
12567
12571
|
] }),
|
|
12568
12572
|
/* @__PURE__ */ P("button", { className: "ps-bp-next-btn", onClick: ZA, type: "button", children: [
|
|
12569
|
-
|
|
12573
|
+
i("Analyze"),
|
|
12570
12574
|
" ",
|
|
12571
12575
|
/* @__PURE__ */ A(_f, {})
|
|
12572
12576
|
] })
|
|
@@ -12575,26 +12579,26 @@ function SP({
|
|
|
12575
12579
|
) : (
|
|
12576
12580
|
/* ── Manual step — identical structure to BodyProfileView basics step ── */
|
|
12577
12581
|
/* @__PURE__ */ P("div", { className: "ps-bp-step ps-bp-step-enter", children: [
|
|
12578
|
-
/* @__PURE__ */ A("h2", { className: "ps-bp-title", children:
|
|
12582
|
+
/* @__PURE__ */ A("h2", { className: "ps-bp-title", children: i(f) }),
|
|
12579
12583
|
/* @__PURE__ */ A("div", { className: "ps-bp-system-toggle", children: g.map((m) => /* @__PURE__ */ A(
|
|
12580
12584
|
"button",
|
|
12581
12585
|
{
|
|
12582
12586
|
type: "button",
|
|
12583
12587
|
className: `ps-bp-system-btn${o === m.value ? " ps-bp-system-active" : ""}`,
|
|
12584
12588
|
onClick: () => r(m.value),
|
|
12585
|
-
children:
|
|
12589
|
+
children: i(m.label)
|
|
12586
12590
|
},
|
|
12587
12591
|
m.value
|
|
12588
12592
|
)) }),
|
|
12589
12593
|
/* @__PURE__ */ A("div", { className: "ps-bp-inline-fields", children: n.map((m) => /* @__PURE__ */ P("div", { className: "ps-bp-inline-row", children: [
|
|
12590
|
-
/* @__PURE__ */ A("span", { className: "ps-bp-inline-label", children:
|
|
12594
|
+
/* @__PURE__ */ A("span", { className: "ps-bp-inline-label", children: i(m.label).toUpperCase() }),
|
|
12591
12595
|
/* @__PURE__ */ P("div", { className: "ps-bp-inline-input-group", children: [
|
|
12592
12596
|
/* @__PURE__ */ A(
|
|
12593
12597
|
"input",
|
|
12594
12598
|
{
|
|
12595
12599
|
type: "number",
|
|
12596
12600
|
className: "ps-bp-inline-input",
|
|
12597
|
-
value:
|
|
12601
|
+
value: K[m.key],
|
|
12598
12602
|
onChange: (aA) => mA(m.key, aA.target.value),
|
|
12599
12603
|
placeholder: m.placeholder[o] || m.placeholder.cm || m.placeholder.in || "",
|
|
12600
12604
|
step: m.step ?? 0.5,
|
|
@@ -12605,16 +12609,16 @@ function SP({
|
|
|
12605
12609
|
/* @__PURE__ */ A("span", { className: "ps-bp-inline-unit", children: Hf.toLowerCase() })
|
|
12606
12610
|
] })
|
|
12607
12611
|
] }, m.key)) }),
|
|
12608
|
-
|
|
12612
|
+
x && /* @__PURE__ */ A("p", { className: "ps-bp-error", children: x }),
|
|
12609
12613
|
!B && /* @__PURE__ */ P("button", { className: "ps-bp-photo-cta", onClick: () => I("photo"), type: "button", children: [
|
|
12610
12614
|
/* @__PURE__ */ A(Un, {}),
|
|
12611
|
-
/* @__PURE__ */ A("span", { children:
|
|
12615
|
+
/* @__PURE__ */ A("span", { children: i(k ? "Or upload a close-up face photo or selfie" : "Or upload a photo for AI sizing") }),
|
|
12612
12616
|
/* @__PURE__ */ A("span", { className: "ps-bp-photo-cta-arrow", children: "→" })
|
|
12613
12617
|
] }),
|
|
12614
12618
|
/* @__PURE__ */ P("div", { className: "ps-bp-nav", style: { marginTop: "auto" }, children: [
|
|
12615
12619
|
/* @__PURE__ */ A("div", {}),
|
|
12616
12620
|
/* @__PURE__ */ P("button", { className: "ps-bp-next-btn", onClick: EA, type: "button", children: [
|
|
12617
|
-
|
|
12621
|
+
i("Find My Size"),
|
|
12618
12622
|
xf(o) ? ` (${xf(o)})` : "",
|
|
12619
12623
|
" ",
|
|
12620
12624
|
/* @__PURE__ */ A(_f, {})
|
|
@@ -12640,8 +12644,8 @@ function p8(f) {
|
|
|
12640
12644
|
const n = f?.requiredFields;
|
|
12641
12645
|
if (!n || n.length === 0) return tP;
|
|
12642
12646
|
const g = /* @__PURE__ */ new Set(["size", "country", "eu", "__skip__", "shoeEU", "shoeUS", "shoeUK", "shoeJP"]), e = (C, D) => {
|
|
12643
|
-
const
|
|
12644
|
-
return
|
|
12647
|
+
const t = tP.find((r) => r.key === C);
|
|
12648
|
+
return t ? t.placeholder : /foot|length/i.test(C) || /foot|length/i.test(D) ? tP[0].placeholder : { cm: "", in: "" };
|
|
12645
12649
|
}, B = n.filter((C) => !g.has(C.key) && C.unit !== "size").map((C) => {
|
|
12646
12650
|
const D = e(C.key, C.label || "");
|
|
12647
12651
|
return {
|
|
@@ -12784,7 +12788,7 @@ function R8({
|
|
|
12784
12788
|
apiUrl: B,
|
|
12785
12789
|
showPoweredBy: C = !0,
|
|
12786
12790
|
showIcon: D = !0,
|
|
12787
|
-
buttonIcon:
|
|
12791
|
+
buttonIcon: t,
|
|
12788
12792
|
locale: o,
|
|
12789
12793
|
buttonStyles: r = {},
|
|
12790
12794
|
modalStyles: z = {},
|
|
@@ -12793,15 +12797,15 @@ function R8({
|
|
|
12793
12797
|
style: F,
|
|
12794
12798
|
onOpen: h,
|
|
12795
12799
|
onClose: W,
|
|
12796
|
-
onUpload:
|
|
12800
|
+
onUpload: i,
|
|
12797
12801
|
onProcessing: k,
|
|
12798
12802
|
onComplete: u,
|
|
12799
12803
|
onError: v,
|
|
12800
12804
|
sizeGuideData: I
|
|
12801
12805
|
}) {
|
|
12802
|
-
const
|
|
12806
|
+
const K = g || f, [N, x] = j(() => o || "");
|
|
12803
12807
|
JA(() => {
|
|
12804
|
-
o !== void 0 &&
|
|
12808
|
+
o !== void 0 && x(o);
|
|
12805
12809
|
}, [o]);
|
|
12806
12810
|
const E = vf(() => Hg(N || void 0), [N]), BA = e ?? E("Virtual Try-On"), [c, hA] = j(!1);
|
|
12807
12811
|
JA(() => {
|
|
@@ -12812,8 +12816,8 @@ function R8({
|
|
|
12812
12816
|
const w = Xf(n);
|
|
12813
12817
|
w === "foot" || w === "head" ? uA("cm") : w === "face" && uA("mm");
|
|
12814
12818
|
}, [n]);
|
|
12815
|
-
const H = tA({}), [oA, zA] = j("male"), [YA, wf] = j(0), [J, gA] = j(null), [Bf, FA] = j(!1), [OA, AA] = j(() => af("profiles", [])), [LA, Pf] = j(() => af("history", [])), [lA,
|
|
12816
|
-
|
|
12819
|
+
const H = tA({}), [oA, zA] = j("male"), [YA, wf] = j(0), [J, gA] = j(null), [Bf, FA] = j(!1), [OA, AA] = j(() => af("profiles", [])), [LA, Pf] = j(() => af("history", [])), [lA, O] = j(() => Kn()), [q, QA] = j(() => /* @__PURE__ */ new Set()), [U, R] = j(null), G = UA((w) => {
|
|
12820
|
+
O(w), Tg(w);
|
|
12817
12821
|
}, []), [S, dA] = j(!1), [fA, NA] = j(null), [$A, ef] = j(null), yA = tA(null), KA = tA(() => !1), Df = tA(() => {
|
|
12818
12822
|
}), M = UA((w, Q) => {
|
|
12819
12823
|
KA.current = w, Df.current = Q;
|
|
@@ -12899,7 +12903,7 @@ function R8({
|
|
|
12899
12903
|
fetch(`${w}/api/v1/sizing/sizeguide`, {
|
|
12900
12904
|
method: "POST",
|
|
12901
12905
|
headers: { "Content-Type": "application/json", Authorization: `Bearer ${Q}` },
|
|
12902
|
-
body: JSON.stringify({ product: { title: n, productId:
|
|
12906
|
+
body: JSON.stringify({ product: { title: n, productId: K }, sizeGuideRaw: I })
|
|
12903
12907
|
}).then((Y) => Y.ok ? Y.json() : null).then((Y) => {
|
|
12904
12908
|
_A(Y || { found: !1 });
|
|
12905
12909
|
}).catch(() => {
|
|
@@ -12964,7 +12968,7 @@ function R8({
|
|
|
12964
12968
|
Object.entries(Q.sections).map(([Z, d]) => [Z, d.recommendedSize])
|
|
12965
12969
|
) : void 0;
|
|
12966
12970
|
Tn(Y, {
|
|
12967
|
-
productId:
|
|
12971
|
+
productId: K,
|
|
12968
12972
|
productTitle: n,
|
|
12969
12973
|
productImage: f,
|
|
12970
12974
|
recommendedSize: Q.recommendedSize,
|
|
@@ -12974,7 +12978,7 @@ function R8({
|
|
|
12974
12978
|
}), AA(af("profiles", []));
|
|
12975
12979
|
}
|
|
12976
12980
|
},
|
|
12977
|
-
[lA, OA, B, f, n,
|
|
12981
|
+
[lA, OA, B, f, n, K, G]
|
|
12978
12982
|
), UP = tA(null), [qf, EP] = j(null), yP = UA(async (w) => {
|
|
12979
12983
|
const Q = w.height ?? w.heightCm ?? 0, Y = w.weight ?? w.weightKg ?? 0, wA = !!w.measurements && Object.keys(w.measurements).length > 0, L = w.photoBase64;
|
|
12980
12984
|
if (!wA && L && Q > 0 && UP.current) {
|
|
@@ -13007,7 +13011,7 @@ function R8({
|
|
|
13007
13011
|
} catch {
|
|
13008
13012
|
}
|
|
13009
13013
|
y("size-result"), Gn({
|
|
13010
|
-
productId:
|
|
13014
|
+
productId: K,
|
|
13011
13015
|
productTitle: n,
|
|
13012
13016
|
productImage: f,
|
|
13013
13017
|
sizeGuideData: I,
|
|
@@ -13018,7 +13022,7 @@ function R8({
|
|
|
13018
13022
|
d?.raw && SA(d.raw), xA(!0);
|
|
13019
13023
|
}).catch(() => {
|
|
13020
13024
|
}).finally(() => iA(!1));
|
|
13021
|
-
}, [
|
|
13025
|
+
}, [K, n, f, I, B, V]), _n = UA(async () => {
|
|
13022
13026
|
const w = OA.find((L) => L.id === lA);
|
|
13023
13027
|
if (!w) return;
|
|
13024
13028
|
const Q = w.height ?? w.heightCm ?? 0, Y = w.weight ?? w.weightKg ?? 0;
|
|
@@ -13081,11 +13085,11 @@ function R8({
|
|
|
13081
13085
|
}
|
|
13082
13086
|
sA(w), Jf.current = w;
|
|
13083
13087
|
const Q = URL.createObjectURL(w);
|
|
13084
|
-
s(Q),
|
|
13088
|
+
s(Q), i?.(w), If.current = null, rP(Q).then((Y) => {
|
|
13085
13089
|
If.current = Y;
|
|
13086
13090
|
}).catch(() => {
|
|
13087
13091
|
});
|
|
13088
|
-
}, [
|
|
13092
|
+
}, [i, v]), qP = UA(() => {
|
|
13089
13093
|
sA(null), V && URL.revokeObjectURL(V), s(null);
|
|
13090
13094
|
}, [V]), Wf = UA(() => {
|
|
13091
13095
|
IA.current && (clearInterval(IA.current), IA.current = null), Cf.current?.(), Cf.current = null;
|
|
@@ -13158,7 +13162,7 @@ function R8({
|
|
|
13158
13162
|
const Z = {
|
|
13159
13163
|
method: Q,
|
|
13160
13164
|
locale: gf,
|
|
13161
|
-
product: { title: n, productId:
|
|
13165
|
+
product: { title: n, productId: K, description: "", variants: [] }
|
|
13162
13166
|
};
|
|
13163
13167
|
if ($?.found && (Z.sizeGuide = $, $.sections && (Z.sizeGuide = { ...$, sections: $.sections })), Z.sizingUnit = _, console.log("[PS-SDK] sizeGuide state:", JSON.stringify({ found: $?.found, hasHeaders: !!$?.headers, hasRows: !!$?.rows, headers: $?.headers, rowCount: $?.rows?.length, hasSections: !!$?.sections, sectionNames: $?.sections ? Object.keys($.sections) : [] })), console.log("[PS-SDK] payload.sizeGuide:", Z.sizeGuide ? "present" : "MISSING"), console.log("[PS-SDK] payload.sizeGuide row0 type:", Z.sizeGuide && Z.sizeGuide.rows?.[0] ? Array.isArray(Z.sizeGuide.rows[0]) ? "array" : typeof Z.sizeGuide.rows[0] : "none"), console.log("[PS-SDK] payload:", JSON.stringify(Z).substring(0, 1e3)), console.log("[PS-SDK] ── submitSizing START ──"), console.log("[PS-SDK] method:", Q, "| sizingUnit:", _, "| heightUnit:", WA), console.log("[PS-SDK] formRef.current (all keys):", JSON.stringify(H.current)), console.log("[PS-SDK] dynamicFields:", Kf.map((d) => `${d.key}(unit=${d.unit},req=${d.required})`).join(", ")), Q === "exact") {
|
|
13164
13168
|
const d = { gender: H.current.gender || "male", sizingUnit: _ }, b = /* @__PURE__ */ new Set();
|
|
@@ -13273,7 +13277,7 @@ function R8({
|
|
|
13273
13277
|
}
|
|
13274
13278
|
CA && LP(CA.landmarks);
|
|
13275
13279
|
const zf = {
|
|
13276
|
-
product: { title: n, productId:
|
|
13280
|
+
product: { title: n, productId: K },
|
|
13277
13281
|
sizeGuide: $ ?? { found: !1 },
|
|
13278
13282
|
sizingUnit: L === "head" ? "cm" : "mm",
|
|
13279
13283
|
category: L,
|
|
@@ -13317,7 +13321,7 @@ function R8({
|
|
|
13317
13321
|
method: "photo",
|
|
13318
13322
|
locale: gf,
|
|
13319
13323
|
sizingUnit: _,
|
|
13320
|
-
product: { title: n, productId:
|
|
13324
|
+
product: { title: n, productId: K, description: "", variants: [] },
|
|
13321
13325
|
bodyImage: w.photoBase64,
|
|
13322
13326
|
// BlazePose landmarks (normalized 0–1 coordinates). The backend uses
|
|
13323
13327
|
// these to compute exact pixel distances and feed them to Gemini as
|
|
@@ -13388,7 +13392,7 @@ function R8({
|
|
|
13388
13392
|
d,
|
|
13389
13393
|
Y ?? "apparel",
|
|
13390
13394
|
{
|
|
13391
|
-
productId:
|
|
13395
|
+
productId: K,
|
|
13392
13396
|
productTitle: n,
|
|
13393
13397
|
silhouetteContext: Cn(vA, $)
|
|
13394
13398
|
}
|
|
@@ -13442,7 +13446,7 @@ function R8({
|
|
|
13442
13446
|
L,
|
|
13443
13447
|
Q ?? "apparel",
|
|
13444
13448
|
{
|
|
13445
|
-
productId:
|
|
13449
|
+
productId: K,
|
|
13446
13450
|
productTitle: n,
|
|
13447
13451
|
silhouetteContext: Cn(vA, $)
|
|
13448
13452
|
}
|
|
@@ -13922,7 +13926,7 @@ function R8({
|
|
|
13922
13926
|
className: Qf("ps-tryon-btn", p.button),
|
|
13923
13927
|
type: "button",
|
|
13924
13928
|
children: [
|
|
13925
|
-
D !== !1 && (
|
|
13929
|
+
D !== !1 && (t || /* @__PURE__ */ A(hf, {})),
|
|
13926
13930
|
/* @__PURE__ */ A("span", { children: BA })
|
|
13927
13931
|
]
|
|
13928
13932
|
}
|
|
@@ -13930,7 +13934,7 @@ function R8({
|
|
|
13930
13934
|
l !== "idle" && typeof document < "u" && lP(
|
|
13931
13935
|
/* @__PURE__ */ A("div", { className: Qf("ps-tryon-overlay", p.overlay), style: $P, "data-ps-tryon-portal": !0, children: /* @__PURE__ */ P("div", { className: Qf(`ps-tryon-modal${l === "result" && PA && vA || l === "size-result" || l === "estimation-review" || l === "body-profile" || l === "profiles" ? " ps-tryon-modal-wide" : ""}`, p.modal), onClick: (w) => w.stopPropagation(), children: [
|
|
13932
13936
|
/* @__PURE__ */ P("div", { className: Qf("ps-tryon-header ps-tryon-header-minimal", p.header), children: [
|
|
13933
|
-
/* @__PURE__ */ A(_g, { activeLocale: N, onSelect:
|
|
13937
|
+
/* @__PURE__ */ A(_g, { activeLocale: N, onSelect: x }),
|
|
13934
13938
|
/* @__PURE__ */ A("button", { className: "ps-tryon-header-icon", title: E("Profiles"), onClick: () => {
|
|
13935
13939
|
fA && NA(null), l === "profiles" ? (y(yA.current || "body-profile"), yA.current = null) : (yA.current = l, y("profiles"));
|
|
13936
13940
|
}, children: /* @__PURE__ */ A(mP, {}) }),
|
|
@@ -14004,7 +14008,7 @@ function T8(f) {
|
|
|
14004
14008
|
return /* @__PURE__ */ A(R8, { ...f });
|
|
14005
14009
|
}
|
|
14006
14010
|
function G8(f) {
|
|
14007
|
-
const [n, g] = j(null), [e, B] = j(!0), [C, D] = j(!1), [
|
|
14011
|
+
const [n, g] = j(null), [e, B] = j(!0), [C, D] = j(!1), [t, o] = j(0);
|
|
14008
14012
|
return JA(() => {
|
|
14009
14013
|
let r = !1;
|
|
14010
14014
|
return B(!0), D(!1), console.log("[ps-sdk:hook] usePrimeStyleSize start", { productId: f.productId }), Gn(f).then((z) => {
|
|
@@ -14016,7 +14020,7 @@ function G8(f) {
|
|
|
14016
14020
|
}), () => {
|
|
14017
14021
|
r = !0;
|
|
14018
14022
|
};
|
|
14019
|
-
}, [f.productId, f.apiUrl, f.apiKey,
|
|
14023
|
+
}, [f.productId, f.apiUrl, f.apiKey, t]), JA(() => {
|
|
14020
14024
|
if (typeof window > "u") return;
|
|
14021
14025
|
const r = () => o((z) => z + 1);
|
|
14022
14026
|
return window.addEventListener(fP, r), window.addEventListener("storage", r), () => {
|