@alfadocs/ui-kit-debug 0.72.0 → 0.72.1
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/_chunks/{face-scheme-DOZO3M_c.js → face-scheme-DruX4mca.js} +74 -74
- package/dist/_chunks/face-scheme-DruX4mca.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/_chunks/face-scheme-DOZO3M_c.js.map +0 -1
|
@@ -258,14 +258,14 @@ async function Gt(t, n) {
|
|
|
258
258
|
}
|
|
259
259
|
return R.length >= 3 ? R : null;
|
|
260
260
|
}
|
|
261
|
-
const Jt = "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.19.2/dist/ort.min.mjs", Qt = "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.19.2/dist/", L = 640,
|
|
261
|
+
const Jt = "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.19.2/dist/ort.min.mjs", Qt = "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.19.2/dist/", L = 640, e1 = [8, 16, 32], t1 = [
|
|
262
262
|
"right-eye",
|
|
263
263
|
"left-eye",
|
|
264
264
|
"nose-tip",
|
|
265
265
|
"mouth-right",
|
|
266
266
|
"mouth-left"
|
|
267
267
|
], Oe = /* @__PURE__ */ new Map();
|
|
268
|
-
async function
|
|
268
|
+
async function n1(t, n, c, o) {
|
|
269
269
|
const d = `${t}|${n}|${c}`, s = Oe.get(d);
|
|
270
270
|
if (s) return s;
|
|
271
271
|
o == null || o("loading");
|
|
@@ -282,14 +282,14 @@ async function nn(t, n, c, o) {
|
|
|
282
282
|
})();
|
|
283
283
|
return Oe.set(d, u), u.catch(() => Oe.delete(d)), u;
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function r1(t) {
|
|
286
286
|
const n = new Image();
|
|
287
287
|
return n.crossOrigin = "anonymous", n.src = t, n.decode().then(() => n);
|
|
288
288
|
}
|
|
289
|
-
async function
|
|
289
|
+
async function a1() {
|
|
290
290
|
return (await import("./face_detection_yunet_2023mar-BnsRs4bD.js")).default;
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function i1(t, n) {
|
|
293
293
|
const c = n.naturalWidth || n.width, o = n.naturalHeight || n.height, d = Math.min(L / c, L / o), s = Math.round(c * d), u = Math.round(o * d), l = Math.floor((L - s) / 2), f = Math.floor((L - u) / 2), m = document.createElement("canvas");
|
|
294
294
|
m.width = L, m.height = L;
|
|
295
295
|
const w = m.getContext("2d");
|
|
@@ -306,7 +306,7 @@ function sn(t, n) {
|
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
308
|
const rt = (t) => 1 / (1 + Math.exp(-t));
|
|
309
|
-
function
|
|
309
|
+
function s1(t, n) {
|
|
310
310
|
let c = !1;
|
|
311
311
|
const o = t.cls_8.data;
|
|
312
312
|
for (let s = 0; s < Math.min(o.length, 256); s++)
|
|
@@ -315,7 +315,7 @@ function cn(t, n) {
|
|
|
315
315
|
break;
|
|
316
316
|
}
|
|
317
317
|
let d = null;
|
|
318
|
-
for (const s of
|
|
318
|
+
for (const s of e1) {
|
|
319
319
|
const u = t[`cls_${s}`].data, l = t[`obj_${s}`].data, f = t[`kps_${s}`].data, m = L / s, w = L / s, x = m * w;
|
|
320
320
|
for (let y = 0; y < x; y++) {
|
|
321
321
|
let C = u[y], p = l[y];
|
|
@@ -333,7 +333,7 @@ function cn(t, n) {
|
|
|
333
333
|
}
|
|
334
334
|
return d;
|
|
335
335
|
}
|
|
336
|
-
async function
|
|
336
|
+
async function c1(t, n) {
|
|
337
337
|
if (typeof window > "u" || typeof Image > "u")
|
|
338
338
|
throw new Error("detectFaceYuNet runs in the browser only.");
|
|
339
339
|
const {
|
|
@@ -341,21 +341,21 @@ async function on(t, n) {
|
|
|
341
341
|
viewHeight: o,
|
|
342
342
|
ortModuleUrl: d = Jt,
|
|
343
343
|
ortWasmBaseUrl: s = Qt,
|
|
344
|
-
modelUrl: u = await
|
|
344
|
+
modelUrl: u = await a1(),
|
|
345
345
|
scoreThreshold: l = 0.6,
|
|
346
346
|
onStage: f
|
|
347
347
|
} = n, [m, { ort: w, session: x }] = await Promise.all([
|
|
348
|
-
|
|
349
|
-
|
|
348
|
+
r1(t),
|
|
349
|
+
n1(d, s, u, f)
|
|
350
350
|
]);
|
|
351
351
|
f == null || f("detecting");
|
|
352
|
-
const { tensor: y, scale: C, padX: p, padY: N } =
|
|
352
|
+
const { tensor: y, scale: C, padX: p, padY: N } = i1(w.Tensor, m), z = await x.run({ [x.inputNames[0]]: y }), K = s1(z, l);
|
|
353
353
|
if (!K) return null;
|
|
354
354
|
const R = m.naturalWidth || m.width, E = m.naturalHeight || m.height, I = Math.max(c / R, o / E), Z = (c - R * I) / 2, V = (o - E * I) / 2;
|
|
355
355
|
return K.keypoints.map(([D, q], Y) => {
|
|
356
356
|
const h = (D - p) / C, ce = (q - N) / C;
|
|
357
357
|
return {
|
|
358
|
-
id:
|
|
358
|
+
id: t1[Y],
|
|
359
359
|
photo: {
|
|
360
360
|
x: Z + h * I,
|
|
361
361
|
y: V + ce * I
|
|
@@ -367,7 +367,7 @@ const je = "0 0 808 944", $e = { x: 404, y: 472 }, ut = {
|
|
|
367
367
|
id: "faceContour",
|
|
368
368
|
labelKey: "faceContour",
|
|
369
369
|
d: "M688.38,439.4c-9.78,0-15.37,4.04-17.86,6.47,1.31-10.99,2.5-20.62,3.49-28.2,7.55-57.89,5.03-94.39,5.03-94.39-15.15-165.92-111.73-221.46-186.21-239.39h0s-.1-.02-.1-.02c-6.18-1.49-12.21-2.72-18.02-3.73l-.96-.2c-46.02-9.51-93.5-9.51-139.52,0l-.95.2c-5.82,1.01-11.85,2.24-18.04,3.73l-.08.02h0c-74.48,17.94-171.06,73.48-186.21,239.39,0,0-2.52,36.5,5.03,94.39,1,7.68,2.2,17.45,3.53,28.61-2.25-2.35-7.91-6.88-18.26-6.88-13.97,0-29.06,16.21-20.12,63.71,8.94,47.5,17.3,80.48,18.43,97.24,1.11,16.47,24.08,47.91,41.43,38.23.9,8.33,1.42,13.17,1.42,13.17,0,0,8.81,59.15,56.63,104.46,12.62,11.95,25.84,23.46,38.49,33.94,7.14-4.56,24-16.96,29.06-35.21.9-3.24,1.73-6.33,2.52-9.29,2.46-9.17,4.59-17.1,7.4-24.46,3.44-9.01,7.62-16.28,13.25-23.04-47.54-46.57-49.82-89.3-48.75-104.93-21.75-2.47-38.06-19.4-47.37-49.37-7.27-23.39-7.77-46.39-7.79-47.36-.02-1.34.43-2.57,1.21-3.54-.47-2.21-.65-3.58-.67-3.77-.28-2.23.97-4.38,3.05-5.24.34-.14.69-.23,1.04-.29.47-3.26,2.23-10.86,8.8-18.21,10.82-12.11,28.95-17.92,53.93-17.22,41.5,1.13,55.11,17.49,59.58,28.15,1.45.85,2.49,2.34,2.68,4.14,0,.05.02.21.05.45.22.48.36,1,.42,1.56.04.41.34,3.71.16,8.68.17,6.11.1,14.39-.75,23.68-.27,2.9-.6,5.73-.98,8.49,4.1-9.94,7.68-20.29,11.15-30.32l.31-.89-10.84-54.18c-2.15-3.39-8.76-12.5-21.75-19.51-21.63-11.68-51.16-12.3-85.4-1.8-2.58.79-5.32-.61-6.19-3.16l-53.03-154.45c-.88-1.09-1.31-2.52-1.05-4.01.26-1.43,6.68-35.35,39.46-69.52,19.15-19.96,43.37-35.84,72.01-47.21,35.3-14.02,77.45-21.18,125.28-21.27h0s.98,0,.98,0c47.83.1,89.98,7.25,125.28,21.27,28.63,11.37,52.86,27.26,72.01,47.21,30.62,31.92,38.24,63.61,39.32,68.82.29.8.42,1.35.47,1.59.17.87.11,1.77-.17,2.61l-53.21,154.96c-.88,2.55-3.62,3.95-6.19,3.16-34.24-10.5-63.77-9.88-85.4,1.8-11.42,6.17-17.92,13.96-20.78,18.06l-11.25,56.25.04.11c2.95,8.52,5.98,17.28,9.34,25.81-.14-1.26-.28-2.53-.4-3.82-.53-5.79-.75-11.19-.81-15.92-1.11-9.09-.51-15.85-.45-16.44.11-1.1.59-2.08,1.3-2.85.19-.72.52-1.37.96-1.94,3.86-10.54,16.77-28.3,60.04-29.48,24.93-.69,43.04,5.1,53.85,17.2,6.53,7.3,8.3,14.85,8.78,18.13.53.04,1.05.16,1.56.37,2.08.86,3.32,3.01,3.05,5.24-.02.14-.12.93-.37,2.25,1.7.96,2.84,2.8,2.8,4.89-.02.97-.52,23.97-7.79,47.36-8.99,28.91-24.49,45.69-45.11,49.05,1.16,15.29-.68,58.78-49.42,106.1,5.35,6.56,9.36,13.63,12.68,22.33,2.81,7.36,4.94,15.28,7.4,24.45.79,2.96,1.62,6.05,2.52,9.29,5.07,18.28,21.97,30.69,29.09,35.23,12.65-10.48,25.88-21.99,38.5-33.95,47.82-45.31,56.63-104.46,56.63-104.46,0,0,.51-4.77,1.4-13,17.31,9.1,39.99-22.04,41.09-38.41,1.13-16.77,9.49-49.74,18.43-97.24,8.94-47.5-6.15-63.71-20.12-63.71Z"
|
|
370
|
-
},
|
|
370
|
+
}, o1 = [
|
|
371
371
|
{
|
|
372
372
|
id: "lateralNeckRight",
|
|
373
373
|
labelKey: "lateralNeckRight",
|
|
@@ -544,7 +544,7 @@ const je = "0 0 808 944", $e = { x: 404, y: 472 }, ut = {
|
|
|
544
544
|
cy: 487,
|
|
545
545
|
side: "left"
|
|
546
546
|
}
|
|
547
|
-
],
|
|
547
|
+
], d1 = [
|
|
548
548
|
{ id: "right-eye", labelKey: "rightEye", x: 268, y: 487 },
|
|
549
549
|
{ id: "left-eye", labelKey: "leftEye", x: 535, y: 487 },
|
|
550
550
|
{ id: "nose-tip", labelKey: "noseTip", x: 403, y: 620 },
|
|
@@ -553,72 +553,72 @@ const je = "0 0 808 944", $e = { x: 404, y: 472 }, ut = {
|
|
|
553
553
|
{
|
|
554
554
|
id: "cheekbone",
|
|
555
555
|
labelKey: "cheekbone",
|
|
556
|
-
d: "
|
|
556
|
+
d: "M599.74 393.76C599.3 384.62 596.7 384.14 588.09 384.25C583.27 384.39 576.8 384.62 568.96 383.15C552.82 380.58 492.19 345.52 469.61 336.06C440.38 326.14 412.86 318.69 397.01 315.46C400.9 321.51 403.74 331.47 392.68 339.19C401 341.68 411.76 345.36 424.07 350.07C470 372.06 526.56 410.04 544.51 422.16C553.02 428.85 557.05 435.17 560.03 440.26C564.22 448.17 566.53 452.96 577.56 454.45C581.58 455.09 585.14 452.84 588.49 447.52C593.74 438.79 600.27 414.02 599.74 393.77Z",
|
|
557
557
|
cx: 496,
|
|
558
|
-
cy:
|
|
558
|
+
cy: 385
|
|
559
559
|
},
|
|
560
560
|
{
|
|
561
561
|
id: "profileContour",
|
|
562
562
|
labelKey: "profileContour",
|
|
563
|
-
d: "
|
|
564
|
-
cx:
|
|
565
|
-
cy:
|
|
563
|
+
d: "M638.9 451.42C633.73 426.42 619.22 379.5 612.61 357.96C605.46 341.98 600.24 334.74 573.4 281.82C541.2 215.41 469.37 143.55 335.72 118.12C196.25 143.79 161.09 246.4 178.43 336.04C159.29 396.67 198.13 422.16 198.13 422.16L232.97 452.09C241.18 459.35 255.23 462.4 265.52 459.01L325.94 444.07C333.14 442.06 329.15 431.3 320.97 425.67C296.97 409.98 265.98 385.75 277.56 356.9C285.86 340.17 301.59 326.75 318.23 316.57C343.47 301.54 377.45 297.3 390.61 308.08C390.72 308.2 390.77 308.32 390.8 308.44C396.2 309.24 411.72 312.03 431.97 316.59C429.69 313 428.54 308.79 428.56 304.03C428.36 296.96 430.71 290.78 431.14 289.68C433.31 269.26 477.86 224.7 495 195.88L495.07 195.61C495.47 193.83 498.33 192.97 502.57 193.38C506.76 193.84 511.59 195.47 515.15 197.64L579.36 298.78C580.54 302.49 579.4 305.89 576.46 306.88C574.75 307.45 572.17 308.96 569.26 311.18C569.42 311.41 569.52 311.55 569.52 311.55L586.97 339.97C589.51 337.81 593.1 335.15 597.34 333.65C602.42 331.61 607.36 332.83 611.63 347.33C611.84 348.44 612.35 350.76 612.69 352.21C612.93 353.29 612.93 353.35 612.74 352.48C612.4 351 612.06 349.65 611.72 348.4C613.12 357.29 614.4 383.55 610.5 378.48C604.71 373.02 605.47 349.36 606.04 339.68C604.14 339.03 602.01 339.16 599.63 340.12C595.66 341.58 592.34 344.28 590.17 346.25L591.59 349.25C591.99 350.12 592.11 351.14 591.92 352.07C591.72 353.01 591.23 353.77 590.55 354.18L559.84 370.56C565.72 373.73 568.94 374.9 570.73 375.2C578.04 376.54 583.98 376.34 588.85 376.21C597.15 376.12 602.9 376.27 603.67 391.42C604.1 406.39 600.08 437.28 591.11 453.04C586.38 460.6 580.95 464.07 575.38 463.15C572.45 462.72 570.03 462.05 567.97 461.15C565.06 459.92 562.9 458.24 561.12 456.23C560.45 459.98 559.49 464.71 558.16 470.21C562.79 471.69 571.76 476.58 574.13 491.02C575.29 500.37 573.27 511.64 568.1 524.29C569.44 527.69 573.56 536.93 583.12 538.43C590.27 539.41 596.71 543.15 600.96 547.77C605.82 544.11 611.36 538.82 614.36 532.93C616.91 521.86 616.01 513.62 619.44 510.27C621.95 506.65 628.86 504.43 635.06 490.62C640.71 476.98 641.21 477.24 638.91 451.46Z",
|
|
564
|
+
cx: 400,
|
|
565
|
+
cy: 333
|
|
566
566
|
},
|
|
567
567
|
{
|
|
568
568
|
id: "temple",
|
|
569
569
|
labelKey: "temple",
|
|
570
|
-
d: "
|
|
571
|
-
cx:
|
|
572
|
-
cy:
|
|
570
|
+
d: "M560.64 308.97C561.18 308.44 561.7 308.08 562.23 307.85C566.56 304.4 570.68 301.88 573.59 300.94C574.22 300.74 574.5 300.03 574.25 299.26L508.89 198.98C508.01 198.43 507.11 198.27 506.65 198.22C506.2 198.17 505.4 198.17 505.27 198.61L505.19 198.88C502.03 206.46 490.52 223.21 477.21 241.2C462.92 256.64 442.61 277.67 441.12 288.85L441.09 289.02L441.02 289.19C440.92 289.43 429.93 313.98 452.59 322.35C452.86 322.46 453.1 322.59 453.3 322.74C460.51 325.1 467.96 327.7 475.49 330.45C506.6 343.72 527.63 353.75 541.74 360.83C540.77 358.04 539.98 354.85 539.64 351.34C538.86 344.21 540.24 337.74 542.85 331.97C546.67 320.71 553.5 315.21 558.33 311.06C558.39 311.01 558.46 310.96 558.52 310.91C559.28 310.23 560 309.59 560.64 308.96Z",
|
|
571
|
+
cx: 502,
|
|
572
|
+
cy: 280
|
|
573
573
|
},
|
|
574
574
|
{
|
|
575
575
|
id: "preauricularArea",
|
|
576
576
|
labelKey: "preauricularArea",
|
|
577
|
-
d: "M404.
|
|
577
|
+
d: "M404.71 426.8C406.27 429.39 405.69 431.68 403.41 431.9L438.4 484.93C447.87 490.32 461.13 499.46 474.85 513.59C480.37 519.99 485.9 527.74 490.96 536.88C493.3 521.6 491.8 491.69 486.44 449.56C484.9 419.4 482.24 393.66 481.82 388.28C460.36 376.06 437.32 364.27 417.72 355.54C406.44 351.09 396.49 347.55 388.57 345.04C386.61 350.16 384.89 360.02 386.63 380.06C391.68 401.81 404.55 426.53 404.71 426.79Z",
|
|
578
578
|
cx: 439,
|
|
579
|
-
cy:
|
|
579
|
+
cy: 441
|
|
580
580
|
},
|
|
581
581
|
{
|
|
582
582
|
id: "mandibularBody",
|
|
583
583
|
labelKey: "mandibularBody",
|
|
584
|
-
d: "
|
|
585
|
-
cx:
|
|
586
|
-
cy:
|
|
584
|
+
d: "M474.72 521.09C464.83 510.61 455.02 502.99 446.93 497.71L476.93 546.64L477.06 546.91C478.17 549.32 487.49 582.39 501.97 596.75C502.84 597.63 503.76 598.5 504.7 599.38C501.51 570.8 491.86 543.76 474.72 521.09Z",
|
|
585
|
+
cx: 476,
|
|
586
|
+
cy: 549
|
|
587
587
|
},
|
|
588
588
|
{
|
|
589
589
|
id: "submentalProfile",
|
|
590
590
|
labelKey: "submentalProfile",
|
|
591
|
-
d: "
|
|
592
|
-
cx:
|
|
593
|
-
cy:
|
|
591
|
+
d: "M538.73 609.05C537.56 608.86 536.39 608.63 535.23 608.37C526.95 606.64 519.63 601.3 513.88 592.08C513.87 592.06 513.86 592.04 513.84 592.02C513.69 591.76 513.53 591.51 513.36 591.24C509.97 586.01 506.52 580.48 504.43 577.37C505.54 584.77 506.27 592.68 506.65 601.17C515.88 609.62 539.38 620.44 539.38 620.44C539.38 620.44 562.85 635.23 564.3 609.47C562.09 610.27 559.43 610.55 556.43 610.35C551.47 610.64 545.25 610.3 538.73 609.06Z",
|
|
592
|
+
cx: 534,
|
|
593
|
+
cy: 606
|
|
594
594
|
},
|
|
595
595
|
{
|
|
596
596
|
id: "masseter",
|
|
597
597
|
labelKey: "masseter",
|
|
598
|
-
d: "
|
|
599
|
-
cx:
|
|
598
|
+
d: "M554.82 446.58C551.83 441.58 548.16 435.94 540.33 429.79C531.39 423.43 513.98 409.82 491.68 394.42C493.46 420.5 503.6 510.61 494.57 544.38C497.63 551.55 500.33 559.39 502.54 567.95C502.83 567.69 503.16 567.75 503.49 568.2C503.6 568.36 508.3 575.43 513.24 582.7C525.84 552.53 537.77 519.85 545.45 496.02C553.06 472.88 555.68 454.45 556.26 449.1C555.78 448.28 555.31 447.44 554.81 446.58Z",
|
|
599
|
+
cx: 524,
|
|
600
600
|
cy: 489
|
|
601
601
|
},
|
|
602
602
|
{
|
|
603
603
|
id: "cheek",
|
|
604
604
|
labelKey: "cheek",
|
|
605
|
-
d: "
|
|
606
|
-
cx:
|
|
607
|
-
cy:
|
|
605
|
+
d: "M514.77 585.03L514.8 585.44C515.79 584.54 520.39 580.63 526.83 573.23C539.09 564.18 550.25 551.66 559.54 533C566.84 518.24 570.05 505.59 568.89 495.85C567.06 484.36 559.75 480.19 555.86 478.85C554.24 484.59 552.26 490.86 549.91 497.51C541.29 521.83 528.13 554.68 514.77 585.03Z",
|
|
606
|
+
cx: 542,
|
|
607
|
+
cy: 532
|
|
608
608
|
},
|
|
609
609
|
{
|
|
610
610
|
id: "chin",
|
|
611
611
|
labelKey: "chin",
|
|
612
|
-
d: "
|
|
613
|
-
cx:
|
|
614
|
-
cy:
|
|
612
|
+
d: "M593 553.16C589.5 549.65 584.7 546.73 578.99 545.84C570.4 544.32 566.21 537.16 564.17 532.62C563.77 533.38 563.38 534.14 562.97 534.92C552.11 555.64 539.54 569.56 526.37 579.09C522.28 583.61 519.13 586.88 517.12 589.05C521.06 595.09 527.55 600.76 535.58 602.72C550.77 607.54 560.24 606.39 564.52 603.49C564.54 602.19 564.55 600.82 564.54 599.34L567.55 579.58L567.6 579.44C567.82 578.79 570.13 573.61 573.44 572.98C577.31 572.14 588.48 559.59 592.27 554.04C592.47 553.73 592.72 553.45 592.98 553.17Z",
|
|
613
|
+
cx: 555,
|
|
614
|
+
cy: 570
|
|
615
615
|
},
|
|
616
616
|
{
|
|
617
617
|
id: "browTail",
|
|
618
618
|
labelKey: "browTail",
|
|
619
|
-
d: "
|
|
620
|
-
cx:
|
|
621
|
-
cy:
|
|
619
|
+
d: "M565.1 315.19C565.1 315.19 535.7 334.2 553.37 365.27L585.33 349.08L565.1 315.19Z",
|
|
620
|
+
cx: 561,
|
|
621
|
+
cy: 340
|
|
622
622
|
}
|
|
623
623
|
], at = mt.find((t) => t.id === "profileContour") ?? ut, it = mt.filter(
|
|
624
624
|
(t) => t.id !== "profileContour"
|
|
@@ -641,8 +641,8 @@ const je = "0 0 808 944", $e = { x: 404, y: 472 }, ut = {
|
|
|
641
641
|
pivot: $e,
|
|
642
642
|
contour: ut,
|
|
643
643
|
// The generator guarantees every clickable zone carries cx/cy/side.
|
|
644
|
-
zones:
|
|
645
|
-
landmarks:
|
|
644
|
+
zones: o1,
|
|
645
|
+
landmarks: d1
|
|
646
646
|
},
|
|
647
647
|
// The reshaped profile zones face +x; the right profile is the same mesh
|
|
648
648
|
// mirrored. Both fit on the eye/nose-tip/mouth anchors — auto-detect and manual
|
|
@@ -670,7 +670,7 @@ const je = "0 0 808 944", $e = { x: 404, y: 472 }, ut = {
|
|
|
670
670
|
"front",
|
|
671
671
|
"profile-left",
|
|
672
672
|
"profile-right"
|
|
673
|
-
],
|
|
673
|
+
], l1 = [
|
|
674
674
|
"observation",
|
|
675
675
|
"treatment",
|
|
676
676
|
"concern",
|
|
@@ -691,11 +691,11 @@ function ze(t, n) {
|
|
|
691
691
|
};
|
|
692
692
|
}
|
|
693
693
|
const xe = Math.PI / 180;
|
|
694
|
-
function
|
|
694
|
+
function f1(t, n) {
|
|
695
695
|
const c = t.rotation * xe, o = Math.cos(c), d = Math.sin(c), s = Math.tan(t.shear * xe), u = t.scaleX * o, l = t.scaleX * d, f = t.scaleY * (s * o - d), m = t.scaleY * (s * d + o), w = t.translateX + n.x - (u * n.x + f * n.y), x = t.translateY + n.y - (l * n.x + m * n.y);
|
|
696
696
|
return [u, l, f, m, w, x];
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function u1(t, n) {
|
|
699
699
|
const [c, o, d, s, u, l] = t, f = Math.hypot(c, o), m = Math.atan2(o, c) / xe, w = c * s - o * d, x = f === 0 ? 0 : w / f, y = Math.atan2(c * d + o * s, w) / xe, C = u - n.x + (c * n.x + d * n.y), p = l - n.y + (o * n.x + s * n.y);
|
|
700
700
|
return { scaleX: f, scaleY: x, rotation: m, shear: y, translateX: C, translateY: p };
|
|
701
701
|
}
|
|
@@ -716,7 +716,7 @@ function ft(t, n) {
|
|
|
716
716
|
], [V, D, q] = Z(f, m, w), [Y, h, ce] = Z(x, y, C);
|
|
717
717
|
return [V, Y, D, h, q, ce];
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function m1(t) {
|
|
720
720
|
const n = (f) => {
|
|
721
721
|
var m;
|
|
722
722
|
return (m = t.find((w) => w.id === f)) == null ? void 0 : m.photo;
|
|
@@ -729,27 +729,27 @@ function hn(t) {
|
|
|
729
729
|
{ id: "mouth", photo: l(s, u) }
|
|
730
730
|
];
|
|
731
731
|
}
|
|
732
|
-
function
|
|
732
|
+
function h1() {
|
|
733
733
|
return typeof navigator < "u" && typeof navigator.mediaDevices < "u" && typeof navigator.mediaDevices.getUserMedia == "function";
|
|
734
734
|
}
|
|
735
|
-
function
|
|
735
|
+
function p1(t) {
|
|
736
736
|
const n = t instanceof Error ? t.name : "";
|
|
737
737
|
return n === "NotAllowedError" || n === "SecurityError" ? "permission-denied" : n === "NotFoundError" || n === "OverconstrainedError" ? "no-camera" : n === "NotReadableError" || n === "AbortError" ? "not-readable" : "capture-failed";
|
|
738
738
|
}
|
|
739
|
-
const
|
|
739
|
+
const g1 = {
|
|
740
740
|
"permission-denied": "faceScheme.capture.error.permissionDenied",
|
|
741
741
|
"no-camera": "faceScheme.capture.error.noCamera",
|
|
742
742
|
"not-readable": "faceScheme.capture.error.notReadable",
|
|
743
743
|
"insecure-context": "faceScheme.capture.error.insecureContext",
|
|
744
744
|
"capture-failed": "faceScheme.capture.error.captureFailed"
|
|
745
|
-
},
|
|
745
|
+
}, y1 = {
|
|
746
746
|
neutral: "ds:[fill:var(--muted-foreground)]",
|
|
747
747
|
info: "ds:[fill:var(--info)]",
|
|
748
748
|
success: "ds:[fill:var(--success)]",
|
|
749
749
|
warning: "ds:[fill:var(--warning)]",
|
|
750
750
|
error: "ds:[fill:var(--destructive)]",
|
|
751
751
|
accent: "ds:[fill:var(--accent)]"
|
|
752
|
-
},
|
|
752
|
+
}, v1 = It(
|
|
753
753
|
[
|
|
754
754
|
"ds:[vector-effect:non-scaling-stroke]",
|
|
755
755
|
"ds:transition-[fill-opacity] ds:[transition-duration:var(--animation-duration)]",
|
|
@@ -773,21 +773,21 @@ const yn = {
|
|
|
773
773
|
],
|
|
774
774
|
defaultVariants: { interactive: !1, marked: !1 }
|
|
775
775
|
}
|
|
776
|
-
),
|
|
776
|
+
), x1 = {
|
|
777
777
|
scaleX: { min: 0.3, max: 1.8, step: 0.01 },
|
|
778
778
|
scaleY: { min: 0.3, max: 1.8, step: 0.01 },
|
|
779
779
|
rotation: { min: -20, max: 20, step: 0.5 },
|
|
780
780
|
shear: { min: -20, max: 20, step: 0.5 },
|
|
781
781
|
translateX: { min: -240, max: 240, step: 1 },
|
|
782
782
|
translateY: { min: -240, max: 240, step: 1 }
|
|
783
|
-
},
|
|
783
|
+
}, C1 = [
|
|
784
784
|
"scaleX",
|
|
785
785
|
"scaleY",
|
|
786
786
|
"rotation",
|
|
787
787
|
"shear",
|
|
788
788
|
"translateX",
|
|
789
789
|
"translateY"
|
|
790
|
-
],
|
|
790
|
+
], b1 = At(
|
|
791
791
|
({
|
|
792
792
|
id: t,
|
|
793
793
|
patientPhoto: n,
|
|
@@ -866,7 +866,7 @@ const yn = {
|
|
|
866
866
|
},
|
|
867
867
|
[Se, N, A]
|
|
868
868
|
), Re = nt(
|
|
869
|
-
() =>
|
|
869
|
+
() => u1(P, b.pivot),
|
|
870
870
|
[P, b.pivot]
|
|
871
871
|
), H = k(
|
|
872
872
|
(e) => b.mirror ? { x: B - e.x, y: e.y } : e,
|
|
@@ -930,7 +930,7 @@ const yn = {
|
|
|
930
930
|
}, [ne]), Fe = k(async () => {
|
|
931
931
|
var e;
|
|
932
932
|
if (E) {
|
|
933
|
-
if (!
|
|
933
|
+
if (!h1()) {
|
|
934
934
|
te("insecure-context"), W("error");
|
|
935
935
|
return;
|
|
936
936
|
}
|
|
@@ -957,7 +957,7 @@ const yn = {
|
|
|
957
957
|
}
|
|
958
958
|
W("streaming");
|
|
959
959
|
} catch (r) {
|
|
960
|
-
ne(), te(
|
|
960
|
+
ne(), te(p1(r)), W("error");
|
|
961
961
|
}
|
|
962
962
|
}
|
|
963
963
|
}, [E, I, ne]), de = k(
|
|
@@ -1030,7 +1030,7 @@ const yn = {
|
|
|
1030
1030
|
modelAssetPath: e.modelAssetPath
|
|
1031
1031
|
});
|
|
1032
1032
|
else {
|
|
1033
|
-
const i = await
|
|
1033
|
+
const i = await c1($, {
|
|
1034
1034
|
viewWidth: B,
|
|
1035
1035
|
viewHeight: Q,
|
|
1036
1036
|
onStage: r,
|
|
@@ -1038,7 +1038,7 @@ const yn = {
|
|
|
1038
1038
|
ortWasmBaseUrl: e.ortWasmBaseUrl,
|
|
1039
1039
|
modelUrl: e.yunetModelUrl
|
|
1040
1040
|
});
|
|
1041
|
-
a = i &&
|
|
1041
|
+
a = i && m1(i);
|
|
1042
1042
|
}
|
|
1043
1043
|
return !a || a.length < 3 ? (re("no-face"), !1) : (ge(a), re("done"), !0);
|
|
1044
1044
|
} catch {
|
|
@@ -1111,7 +1111,7 @@ const yn = {
|
|
|
1111
1111
|
[G, y, We, x]
|
|
1112
1112
|
), Lt = J != null && J.altKey ? h(J.altKey) : h("faceScheme.photo.defaultAlt"), Kt = b.mirror ? `translate(${B} 0) scale(-1 1) ${lt(P)}` : lt(P), Nt = k(
|
|
1113
1113
|
(e, r) => {
|
|
1114
|
-
U(
|
|
1114
|
+
U(f1({ ...Re, [e]: r }, b.pivot));
|
|
1115
1115
|
},
|
|
1116
1116
|
[U, Re, b.pivot]
|
|
1117
1117
|
), tt = !!K && !!$ && b.landmarks.length > 0, Ft = E;
|
|
@@ -1221,7 +1221,7 @@ const yn = {
|
|
|
1221
1221
|
"path",
|
|
1222
1222
|
{
|
|
1223
1223
|
d: e.d,
|
|
1224
|
-
className:
|
|
1224
|
+
className: v1({ interactive: G, marked: a })
|
|
1225
1225
|
}
|
|
1226
1226
|
),
|
|
1227
1227
|
r.map((i, v) => {
|
|
@@ -1236,7 +1236,7 @@ const yn = {
|
|
|
1236
1236
|
11
|
|
1237
1237
|
),
|
|
1238
1238
|
"aria-hidden": "true",
|
|
1239
|
-
className:
|
|
1239
|
+
className: y1[S.tone]
|
|
1240
1240
|
},
|
|
1241
1241
|
i.type
|
|
1242
1242
|
);
|
|
@@ -1335,7 +1335,7 @@ const yn = {
|
|
|
1335
1335
|
role: "status",
|
|
1336
1336
|
"aria-live": "polite",
|
|
1337
1337
|
className: "ds:text-center ds:text-[length:var(--font-size-xs)] ds:text-[var(--destructive)] ds:empty:hidden",
|
|
1338
|
-
children: Ke === "error" && qe ? h(
|
|
1338
|
+
children: Ke === "error" && qe ? h(g1[qe]) : ""
|
|
1339
1339
|
}
|
|
1340
1340
|
)
|
|
1341
1341
|
] }),
|
|
@@ -1346,8 +1346,8 @@ const yn = {
|
|
|
1346
1346
|
"data-testid": "face-scheme-registration",
|
|
1347
1347
|
children: [
|
|
1348
1348
|
/* @__PURE__ */ g("p", { className: "ds:m-0 ds:text-[length:var(--font-size-xs)] ds:text-[var(--muted-foreground)]", children: h("faceScheme.registration.hint") }),
|
|
1349
|
-
/* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-2", children:
|
|
1350
|
-
const r =
|
|
1349
|
+
/* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-2", children: C1.map((e) => {
|
|
1350
|
+
const r = x1[e], a = e === "scaleX" || e === "scaleY";
|
|
1351
1351
|
return /* @__PURE__ */ T(
|
|
1352
1352
|
"div",
|
|
1353
1353
|
{
|
|
@@ -1412,7 +1412,7 @@ const yn = {
|
|
|
1412
1412
|
{
|
|
1413
1413
|
"aria-label": h("faceScheme.legendLabel"),
|
|
1414
1414
|
className: "ds:flex ds:flex-wrap ds:gap-x-4 ds:gap-y-1 ds:p-0 ds:text-[length:var(--font-size-xs)] ds:text-[var(--muted-foreground)]",
|
|
1415
|
-
children:
|
|
1415
|
+
children: l1.map((e) => {
|
|
1416
1416
|
const r = dt[e];
|
|
1417
1417
|
return /* @__PURE__ */ g("li", { className: "ds:flex ds:list-none ds:items-center", children: /* @__PURE__ */ g(
|
|
1418
1418
|
$t,
|
|
@@ -1431,20 +1431,20 @@ const yn = {
|
|
|
1431
1431
|
);
|
|
1432
1432
|
}
|
|
1433
1433
|
);
|
|
1434
|
-
|
|
1434
|
+
b1.displayName = "FaceScheme";
|
|
1435
1435
|
export {
|
|
1436
1436
|
dt as F,
|
|
1437
1437
|
fe as I,
|
|
1438
|
-
|
|
1438
|
+
l1 as a,
|
|
1439
1439
|
ct as b,
|
|
1440
1440
|
ot as c,
|
|
1441
|
-
|
|
1441
|
+
b1 as d,
|
|
1442
1442
|
lt as e,
|
|
1443
1443
|
ze as f,
|
|
1444
|
-
|
|
1445
|
-
|
|
1444
|
+
f1 as g,
|
|
1445
|
+
u1 as h,
|
|
1446
1446
|
Gt as i,
|
|
1447
1447
|
Bt as j,
|
|
1448
1448
|
ft as s
|
|
1449
1449
|
};
|
|
1450
|
-
//# sourceMappingURL=face-scheme-
|
|
1450
|
+
//# sourceMappingURL=face-scheme-DruX4mca.js.map
|