@swan-admin/swan-web-component 1.0.71 → 1.0.72
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/Header-CGdVhD4h.js +32 -0
- package/dist/Header-CGdVhD4h.js.map +1 -0
- package/dist/Header-DyVbEgG9.js +32 -0
- package/dist/Header-DyVbEgG9.js.map +1 -0
- package/dist/LoadingScreen-CoRs0lHa.js +12 -0
- package/dist/LoadingScreen-CoRs0lHa.js.map +1 -0
- package/dist/LoadingScreen-DTHZFIRE.js +12 -0
- package/dist/LoadingScreen-DTHZFIRE.js.map +1 -0
- package/dist/arrow-right-CC1_17IM.js +27 -0
- package/dist/arrow-right-CC1_17IM.js.map +1 -0
- package/dist/arrow-right-DXQbS3wL.js +27 -0
- package/dist/arrow-right-DXQbS3wL.js.map +1 -0
- package/dist/bodyScan.d.ts +2 -2
- package/dist/bodyScan.js +1 -1
- package/dist/bodyScan.mjs +1 -1
- package/dist/createSvgIcon-DS-4jmZ4.js +2 -0
- package/dist/createSvgIcon-DS-4jmZ4.js.map +1 -0
- package/dist/createSvgIcon-qbf2BgaS.js +2 -0
- package/dist/createSvgIcon-qbf2BgaS.js.map +1 -0
- package/dist/faceScan.d.ts +2 -2
- package/dist/faceScan.js +1 -1
- package/dist/faceScan.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces-ej_cyAqr.d.ts +138 -0
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";var e=require("react");
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.553.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const r=e=>{const r=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase()))(e);return r.charAt(0).toUpperCase()+r.slice(1)},t=(...e)=>e.filter((e,r,t)=>Boolean(e)&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim(),o=e=>{for(const r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0};
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide-react v0.553.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
15
|
+
/**
|
|
16
|
+
* @license lucide-react v0.553.0 - ISC
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the ISC license.
|
|
19
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
+
*/const i=e.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:c,className:n="",children:l,iconNode:d,...h},u)=>e.createElement("svg",{ref:u,...a,width:i,height:i,stroke:r,strokeWidth:c?24*Number(s)/Number(i):s,className:t("lucide",n),...!l&&!o(h)&&{"aria-hidden":"true"},...h},[...d.map(([r,t])=>e.createElement(r,t)),...Array.isArray(l)?l:[l]])),s=(o,a)=>{const s=e.forwardRef(({className:s,...c},n)=>{return e.createElement(i,{ref:n,iconNode:a,className:t(`lucide-${l=r(o),l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${o}`,s),...c});var l});return s.displayName=r(o),s},c=s("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);
|
|
21
|
+
/**
|
|
22
|
+
* @license lucide-react v0.553.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/exports.ArrowRight=c,exports.createLucideIcon=s;
|
|
27
|
+
//# sourceMappingURL=arrow-right-CC1_17IM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrow-right-CC1_17IM.js","sources":["../../node_modules/lucide-react/dist/esm/shared/src/utils.js","../../node_modules/lucide-react/dist/esm/defaultAttributes.js","../../node_modules/lucide-react/dist/esm/Icon.js","../../node_modules/lucide-react/dist/esm/createLucideIcon.js","../../node_modules/lucide-react/dist/esm/icons/arrow-right.js"],"sourcesContent":["/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\nconst toCamelCase = (string) => string.replace(\n /^([A-Z])|[\\s-_]+(\\w)/g,\n (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()\n);\nconst toPascalCase = (string) => {\n const camelCase = toCamelCase(string);\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\nconst hasA11yProp = (props) => {\n for (const prop in props) {\n if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n return true;\n }\n }\n};\n\nexport { hasA11yProp, mergeClasses, toCamelCase, toKebabCase, toPascalCase };\n//# sourceMappingURL=utils.js.map\n","/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n","/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { mergeClasses, hasA11yProp } from './shared/src/utils.js';\n\nconst Icon = forwardRef(\n ({\n color = \"currentColor\",\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = \"\",\n children,\n iconNode,\n ...rest\n }, ref) => createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: mergeClasses(\"lucide\", className),\n ...!children && !hasA11yProp(rest) && { \"aria-hidden\": \"true\" },\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n )\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n","/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses, toKebabCase, toPascalCase } from './shared/src/utils.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className\n ),\n ...props\n })\n );\n Component.displayName = toPascalCase(iconName);\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n","/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }],\n [\"path\", { d: \"m12 5 7 7-7 7\", key: \"xquz4c\" }]\n];\nconst ArrowRight = createLucideIcon(\"arrow-right\", __iconNode);\n\nexport { __iconNode, ArrowRight as default };\n//# sourceMappingURL=arrow-right.js.map\n"],"names":["toPascalCase","string","camelCase","replace","match","p1","p2","toUpperCase","toLowerCase","toCamelCase","charAt","slice","mergeClasses","classes","filter","className","index","array","Boolean","trim","indexOf","join","hasA11yProp","props","prop","startsWith","defaultAttributes","xmlns","width","height","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","Icon","forwardRef","color","size","absoluteStrokeWidth","children","iconNode","rest","ref","createElement","Number","map","tag","attrs","Array","isArray","createLucideIcon","iconName","Component","displayName","ArrowRight","d","key"],"mappings":";;;;;;GAOA,MAKMA,EAAgBC,IACpB,MAAMC,EALY,CAACD,GAAWA,EAAOE,QACrC,wBACA,CAACC,EAAOC,EAAIC,IAAOA,EAAKA,EAAGC,cAAgBF,EAAGG,eAG5BC,CAAYR,GAC9B,OAAOC,EAAUQ,OAAO,GAAGH,cAAgBL,EAAUS,MAAM,IAEvDC,EAAe,IAAIC,IAAYA,EAAQC,OAAO,CAACC,EAAWC,EAAOC,IAC9DC,QAAQH,IAAmC,KAArBA,EAAUI,QAAiBF,EAAMG,QAAQL,KAAeC,GACpFK,KAAK,KAAKF,OACPG,EAAeC,IACnB,IAAK,MAAMC,KAAQD,EACjB,GAAIC,EAAKC,WAAW,UAAqB,SAATD,GAA4B,UAATA,EACjD,OAAO;;;;;;;ACfb,IAAIE,EAAoB,CACtBC,MAAO,6BACPC,MAAO,GACPC,OAAQ,GACRC,QAAS,YACTC,KAAM,OACNC,OAAQ,eACRC,YAAa,EACbC,cAAe,QACfC,eAAgB;;;;;;GCLlB,MAAMC,EAAOC,EAAAA,WACX,EACEC,QAAQ,eACRC,OAAO,GACPN,cAAc,EACdO,sBACAzB,YAAY,GACZ0B,WACAC,cACGC,GACFC,IAAQC,EAAAA,cACT,MACA,CACED,SACGlB,EACHE,MAAOW,EACPV,OAAQU,EACRP,OAAQM,EACRL,YAAaO,EAA4C,GAAtBM,OAAOb,GAAoBa,OAAOP,GAAQN,EAC7ElB,UAAWH,EAAa,SAAUG,OAC9B0B,IAAanB,EAAYqB,IAAS,CAAE,cAAe,WACpDA,GAEL,IACKD,EAASK,IAAI,EAAEC,EAAKC,KAAWJ,EAAAA,cAAcG,EAAKC,OAClDC,MAAMC,QAAQV,GAAYA,EAAW,CAACA,MCzBzCW,EAAmB,CAACC,EAAUX,KAClC,MAAMY,EAAYjB,EAAAA,WAChB,EAAGtB,eAAcQ,GAASqB,KAAQC,SAAAA,cAAcT,EAAM,CACpDQ,MACAF,WACA3B,UAAWH,EACT,UHVaX,EGUSD,EAAaqD,GHVXpD,EAAOE,QAAQ,qBAAsB,SAASK,gBGWtE,UAAU6C,IACVtC,MAECQ,IHdW,IAACtB,IGkBnB,OADAqD,EAAUC,YAAcvD,EAAaqD,GAC9BC,GCZHE,EAAaJ,EAAiB,cAJjB,CACjB,CAAC,OAAQ,CAAEK,EAAG,WAAYC,IAAK,WAC/B,CAAC,OAAQ,CAAED,EAAG,gBAAiBC,IAAK;;;;;;","x_google_ignoreList":[0,1,2,3,4]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import{forwardRef as e,createElement as r}from"react";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.553.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const t=e=>{const r=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase()))(e);return r.charAt(0).toUpperCase()+r.slice(1)},o=(...e)=>e.filter((e,r,t)=>Boolean(e)&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim(),a=e=>{for(const r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0};
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide-react v0.553.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
15
|
+
/**
|
|
16
|
+
* @license lucide-react v0.553.0 - ISC
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the ISC license.
|
|
19
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
+
*/const i=e(({color:e="currentColor",size:t=24,strokeWidth:i=2,absoluteStrokeWidth:n,className:c="",children:l,iconNode:d,...h},u)=>r("svg",{ref:u,...s,width:t,height:t,stroke:e,strokeWidth:n?24*Number(i)/Number(t):i,className:o("lucide",c),...!l&&!a(h)&&{"aria-hidden":"true"},...h},[...d.map(([e,t])=>r(e,t)),...Array.isArray(l)?l:[l]])),n=(a,s)=>{const n=e(({className:e,...n},c)=>{return r(i,{ref:c,iconNode:s,className:o(`lucide-${l=t(a),l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${a}`,e),...n});var l});return n.displayName=t(a),n},c=n("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);
|
|
21
|
+
/**
|
|
22
|
+
* @license lucide-react v0.553.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/export{c as A,n as c};
|
|
27
|
+
//# sourceMappingURL=arrow-right-DXQbS3wL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrow-right-DXQbS3wL.js","sources":["../../node_modules/lucide-react/dist/esm/shared/src/utils.js","../../node_modules/lucide-react/dist/esm/defaultAttributes.js","../../node_modules/lucide-react/dist/esm/Icon.js","../../node_modules/lucide-react/dist/esm/createLucideIcon.js","../../node_modules/lucide-react/dist/esm/icons/arrow-right.js"],"sourcesContent":["/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\nconst toCamelCase = (string) => string.replace(\n /^([A-Z])|[\\s-_]+(\\w)/g,\n (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()\n);\nconst toPascalCase = (string) => {\n const camelCase = toCamelCase(string);\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\nconst hasA11yProp = (props) => {\n for (const prop in props) {\n if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n return true;\n }\n }\n};\n\nexport { hasA11yProp, mergeClasses, toCamelCase, toKebabCase, toPascalCase };\n//# sourceMappingURL=utils.js.map\n","/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n","/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { mergeClasses, hasA11yProp } from './shared/src/utils.js';\n\nconst Icon = forwardRef(\n ({\n color = \"currentColor\",\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = \"\",\n children,\n iconNode,\n ...rest\n }, ref) => createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: mergeClasses(\"lucide\", className),\n ...!children && !hasA11yProp(rest) && { \"aria-hidden\": \"true\" },\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n )\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n","/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses, toKebabCase, toPascalCase } from './shared/src/utils.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className\n ),\n ...props\n })\n );\n Component.displayName = toPascalCase(iconName);\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n","/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }],\n [\"path\", { d: \"m12 5 7 7-7 7\", key: \"xquz4c\" }]\n];\nconst ArrowRight = createLucideIcon(\"arrow-right\", __iconNode);\n\nexport { __iconNode, ArrowRight as default };\n//# sourceMappingURL=arrow-right.js.map\n"],"names":["toPascalCase","string","camelCase","replace","match","p1","p2","toUpperCase","toLowerCase","toCamelCase","charAt","slice","mergeClasses","classes","filter","className","index","array","Boolean","trim","indexOf","join","hasA11yProp","props","prop","startsWith","defaultAttributes","xmlns","width","height","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","Icon","forwardRef","color","size","absoluteStrokeWidth","children","iconNode","rest","ref","createElement","Number","map","tag","attrs","Array","isArray","createLucideIcon","iconName","Component","displayName","ArrowRight","d","key"],"mappings":";;;;;;GAOA,MAKMA,EAAgBC,IACpB,MAAMC,EALY,CAACD,GAAWA,EAAOE,QACrC,wBACA,CAACC,EAAOC,EAAIC,IAAOA,EAAKA,EAAGC,cAAgBF,EAAGG,eAG5BC,CAAYR,GAC9B,OAAOC,EAAUQ,OAAO,GAAGH,cAAgBL,EAAUS,MAAM,IAEvDC,EAAe,IAAIC,IAAYA,EAAQC,OAAO,CAACC,EAAWC,EAAOC,IAC9DC,QAAQH,IAAmC,KAArBA,EAAUI,QAAiBF,EAAMG,QAAQL,KAAeC,GACpFK,KAAK,KAAKF,OACPG,EAAeC,IACnB,IAAK,MAAMC,KAAQD,EACjB,GAAIC,EAAKC,WAAW,UAAqB,SAATD,GAA4B,UAATA,EACjD,OAAO;;;;;;;ACfb,IAAIE,EAAoB,CACtBC,MAAO,6BACPC,MAAO,GACPC,OAAQ,GACRC,QAAS,YACTC,KAAM,OACNC,OAAQ,eACRC,YAAa,EACbC,cAAe,QACfC,eAAgB;;;;;;GCLlB,MAAMC,EAAOC,EACX,EACEC,QAAQ,eACRC,OAAO,GACPN,cAAc,EACdO,sBACAzB,YAAY,GACZ0B,WACAC,cACGC,GACFC,IAAQC,EACT,MACA,CACED,SACGlB,EACHE,MAAOW,EACPV,OAAQU,EACRP,OAAQM,EACRL,YAAaO,EAA4C,GAAtBM,OAAOb,GAAoBa,OAAOP,GAAQN,EAC7ElB,UAAWH,EAAa,SAAUG,OAC9B0B,IAAanB,EAAYqB,IAAS,CAAE,cAAe,WACpDA,GAEL,IACKD,EAASK,IAAI,EAAEC,EAAKC,KAAWJ,EAAcG,EAAKC,OAClDC,MAAMC,QAAQV,GAAYA,EAAW,CAACA,MCzBzCW,EAAmB,CAACC,EAAUX,KAClC,MAAMY,EAAYjB,EAChB,EAAGtB,eAAcQ,GAASqB,KAAQC,SAAcT,EAAM,CACpDQ,MACAF,WACA3B,UAAWH,EACT,UHVaX,EGUSD,EAAaqD,GHVXpD,EAAOE,QAAQ,qBAAsB,SAASK,gBGWtE,UAAU6C,IACVtC,MAECQ,IHdW,IAACtB,IGkBnB,OADAqD,EAAUC,YAAcvD,EAAaqD,GAC9BC,GCZHE,EAAaJ,EAAiB,cAJjB,CACjB,CAAC,OAAQ,CAAEK,EAAG,WAAYC,IAAK,WAC/B,CAAC,OAAQ,CAAED,EAAG,gBAAiBC,IAAK;;;;;;","x_google_ignoreList":[0,1,2,3,4]}
|
package/dist/bodyScan.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BodyScanProps } from './interfaces-
|
|
2
|
-
export { U as UserDetails } from './interfaces-
|
|
1
|
+
import { B as BodyScanProps } from './interfaces-ej_cyAqr.js';
|
|
2
|
+
export { U as UserDetails } from './interfaces-ej_cyAqr.js';
|
|
3
3
|
|
|
4
4
|
declare const BodyScan: React.FC<BodyScanProps>;
|
|
5
5
|
|
package/dist/bodyScan.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),a=require("react"),n=require("./Header-COGK6xNN.js"),t=require("./createSvgIcon-BVYKHfGW.js"),o=require("./LoadingScreen-Dziucpn5.js"),i=require("video.js");function r(e){var a=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,t.get?t:{enumerable:!0,get:function(){return e[n]}})}}),a.default=e,Object.freeze(a)}require("react-dom");var s=r(a);function _(e){const{sx:a,...t}=e,{systemProps:o,otherProps:i}=(e=>{const a={systemProps:{},otherProps:{}},t=e?.theme?.unstable_sxConfig??n.defaultSxConfig;return Object.keys(e).forEach(n=>{t[n]?a.systemProps[n]=e[n]:a.otherProps[n]=e[n]}),a})(t);let r;return r=Array.isArray(a)?[o,...a]:"function"==typeof a?(...e)=>{const t=a(...e);return n.isPlainObject(t)?{...o,...t}:o}:{...o,...a},{...i,sx:r}}const l=n.generateUtilityClasses("MuiBox",["root"]),c=n.createTheme(),u=function(a={}){const{themeId:t,defaultTheme:o,defaultClassName:i="MuiBox-root",generateClassName:r}=a,l=n.styled$1("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(n.styleFunctionSx);return s.forwardRef(function(a,s){const c=n.useTheme(o),{className:u,component:d="div",...m}=_(a);return e.jsx(l,{as:d,ref:s,className:n.clsx(u,r?r(i):i),theme:t&&c[t]||c,...m})})}({themeId:n.THEME_ID,defaultTheme:c,defaultClassName:l.root,generateClassName:n.ClassNameGenerator.generate});function d(e){return n.generateUtilityClass("MuiDialog",e)}"production"!==process.env.NODE_ENV&&(u.propTypes={children:n.PropTypes.node,component:n.PropTypes.elementType,sx:n.PropTypes.oneOfType([n.PropTypes.arrayOf(n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object,n.PropTypes.bool])),n.PropTypes.func,n.PropTypes.object])});const m=n.generateUtilityClasses("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),p=s.createContext({});"production"!==process.env.NODE_ENV&&(p.displayName="DialogContext");const h=n.styled(n.Backdrop,{name:"MuiDialog",slot:"Backdrop",overrides:(e,a)=>a.backdrop})({zIndex:-1}),g=n.styled(n.Modal,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),f=n.styled("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,a)=>{const{ownerState:t}=e;return[a.container,a[`scroll${n.capitalize(t.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),y=n.styled(n.Paper,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,a)=>{const{ownerState:t}=e;return[a.paper,a[`scrollPaper${n.capitalize(t.scroll)}`],a[`paperWidth${n.capitalize(String(t.maxWidth))}`],t.fullWidth&&a.paperFullWidth,t.fullScreen&&a.paperFullScreen]}})(n.memoTheme(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${m.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(a=>({props:{maxWidth:a},style:{maxWidth:`${e.breakpoints.values[a]}${e.breakpoints.unit}`,[`&.${m.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[a]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${m.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),v=s.forwardRef(function(a,o){const i=n.useDefaultProps({props:a,name:"MuiDialog"}),r=n.useTheme$1(),_={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":l,"aria-labelledby":c,"aria-modal":u=!0,BackdropComponent:m,BackdropProps:v,children:S,className:w,disableEscapeKeyDown:b=!1,fullScreen:k=!1,fullWidth:x=!1,maxWidth:P="sm",onClick:C,onClose:E,open:T,PaperComponent:N=n.Paper,PaperProps:I={},scroll:M="paper",slots:z={},slotProps:F={},TransitionComponent:j=n.Fade,transitionDuration:W=_,TransitionProps:R,...D}=i,A={...i,disableEscapeKeyDown:b,fullScreen:k,fullWidth:x,maxWidth:P,scroll:M},O=(e=>{const{classes:a,scroll:t,maxWidth:o,fullWidth:i,fullScreen:r}=e,s={root:["root"],container:["container",`scroll${n.capitalize(t)}`],paper:["paper",`paperScroll${n.capitalize(t)}`,`paperWidth${n.capitalize(String(o))}`,i&&"paperFullWidth",r&&"paperFullScreen"]};return n.composeClasses(s,d,a)})(A),L=s.useRef(),H=t.useId(c),B=s.useMemo(()=>({titleId:H}),[H]),q={slots:{transition:j,...z},slotProps:{transition:R,paper:I,backdrop:v,...F}},[U,Y]=n.useSlot("root",{elementType:g,shouldForwardComponentProp:!0,externalForwardedProps:q,ownerState:A,className:n.clsx(O.root,w),ref:o}),[G,V]=n.useSlot("backdrop",{elementType:h,shouldForwardComponentProp:!0,externalForwardedProps:q,ownerState:A}),[$,Q]=n.useSlot("paper",{elementType:y,shouldForwardComponentProp:!0,externalForwardedProps:q,ownerState:A,className:n.clsx(O.paper,I.className)}),[J,K]=n.useSlot("container",{elementType:f,externalForwardedProps:q,ownerState:A,className:O.container}),[Z,X]=n.useSlot("transition",{elementType:n.Fade,externalForwardedProps:q,ownerState:A,additionalProps:{appear:!0,in:T,timeout:W,role:"presentation"}});return e.jsx(U,{closeAfterTransition:!0,slots:{backdrop:G},slotProps:{backdrop:{transitionDuration:W,as:m,...V}},disableEscapeKeyDown:b,onClose:E,open:T,onClick:e=>{C&&C(e),L.current&&(L.current=null,E&&E(e,"backdropClick"))},...Y,...D,children:e.jsx(Z,{...X,children:e.jsx(J,{onMouseDown:e=>{L.current=e.target===e.currentTarget},...K,children:e.jsx($,{as:N,elevation:24,role:"dialog","aria-describedby":l,"aria-labelledby":H,"aria-modal":u,...Q,children:e.jsx(p.Provider,{value:B,children:S})})})})})});"production"!==process.env.NODE_ENV&&(v.propTypes={"aria-describedby":n.PropTypes.string,"aria-labelledby":n.PropTypes.string,"aria-modal":n.PropTypes.oneOfType([n.PropTypes.oneOf(["false","true"]),n.PropTypes.bool]),BackdropComponent:n.PropTypes.elementType,BackdropProps:n.PropTypes.object,children:n.PropTypes.node,classes:n.PropTypes.object,className:n.PropTypes.string,disableEscapeKeyDown:n.PropTypes.bool,fullScreen:n.PropTypes.bool,fullWidth:n.PropTypes.bool,maxWidth:n.PropTypes.oneOfType([n.PropTypes.oneOf(["xs","sm","md","lg","xl",!1]),n.PropTypes.string]),onClick:n.PropTypes.func,onClose:n.PropTypes.func,open:n.PropTypes.bool.isRequired,PaperComponent:n.PropTypes.elementType,PaperProps:n.PropTypes.object,scroll:n.PropTypes.oneOf(["body","paper"]),slotProps:n.PropTypes.shape({backdrop:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object]),container:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object]),paper:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object]),root:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object]),transition:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object])}),slots:n.PropTypes.shape({backdrop:n.PropTypes.elementType,container:n.PropTypes.elementType,paper:n.PropTypes.elementType,root:n.PropTypes.elementType,transition:n.PropTypes.elementType}),sx:n.PropTypes.oneOfType([n.PropTypes.arrayOf(n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object,n.PropTypes.bool])),n.PropTypes.func,n.PropTypes.object]),TransitionComponent:n.PropTypes.elementType,transitionDuration:n.PropTypes.oneOfType([n.PropTypes.number,n.PropTypes.shape({appear:n.PropTypes.number,enter:n.PropTypes.number,exit:n.PropTypes.number})]),TransitionProps:n.PropTypes.object});var S=a.memo(function({size:a=16}){return e.jsxs("svg",{width:a,height:a,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M22.6968 14.6968C22.6968 16.8185 21.8539 18.8533 20.3536 20.3536C18.8533 21.8539 16.8185 22.6968 14.6968 22.6968",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M18.6968 11.6968V10.6968C18.6968 10.1663 18.4861 9.65764 18.111 9.28256C17.7359 8.90749 17.2272 8.69678 16.6968 8.69678C16.1663 8.69678 15.6576 8.90749 15.2826 9.28256C14.9075 9.65764 14.6968 10.1663 14.6968 10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M14.6968 10.6968V9.69678C14.6968 9.16634 14.4861 8.65764 14.111 8.28256C13.7359 7.90749 13.2272 7.69678 12.6968 7.69678C12.1663 7.69678 11.6576 7.90749 11.2826 8.28256C10.9075 8.65764 10.6968 9.16634 10.6968 9.69678V10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M10.6968 10.1968V4.69678C10.6968 4.16634 10.4861 3.65764 10.111 3.28256C9.73592 2.90749 9.22721 2.69678 8.69678 2.69678C8.16634 2.69678 7.65764 2.90749 7.28256 3.28256C6.90749 3.65764 6.69678 4.16634 6.69678 4.69678V14.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M18.6969 11.6968C18.6969 11.1663 18.9076 10.6576 19.2827 10.2826C19.6577 9.90749 20.1664 9.69678 20.6969 9.69678C21.2273 9.69678 21.736 9.90749 22.1111 10.2826C22.4862 10.6576 22.6969 11.1663 22.6969 11.6968V14.6968C22.6969 16.8185 21.854 18.8533 20.3537 20.3536C18.8534 21.8539 16.8186 22.6968 14.6969 22.6968H12.6969C9.89688 22.6968 8.19688 21.8368 6.70688 20.3568L3.10688 16.7568C2.76282 16.3757 2.57847 15.8769 2.592 15.3637C2.60554 14.8505 2.81593 14.3621 3.1796 13.9997C3.54327 13.6373 4.03238 13.4287 4.54565 13.417C5.05892 13.4053 5.55704 13.5914 5.93688 13.9368L7.69688 15.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})});var w,b=a.memo(function({angle:t,countdown:o,isScanning:i,isInTargetRange:r,stabilityScore:s,children:_,config:l}){const c=a.useCallback(()=>t<80?Math.max(0,Math.min(100,10*(t-60))):t>95?Math.max(0,Math.min(100,10*(105-t))):100,[t]),u=a.useMemo(()=>{if(i)return l?.style?.base?.brandColor||"#4f46e5";const e=c();if(0===e)return"#ffffff";if(100===e)return l?.style?.base?.brandColor||"#8b5cf6";return`rgb(${Math.round(255-e/100*116)}, ${Math.round(255-e/100*163)}, ${Math.round(255-e/100*9)})`},[i,c]),d=a.useCallback((e,a)=>a>70?e?"text-[#fff]/70":"text-[#fff]":e?"text-[#fff]/40":"text-[#000]/70",[]),m=a.useCallback((e=!1)=>{const a=c();return i?"text-[#fff]":d(e,a)},[i,c]),p=o;function h(){document.documentElement.style.setProperty("--real-vh",window.innerHeight+"px")}return h(),window.addEventListener("resize",h),e.jsxs("div",{className:"flex w-screen flex-col items-center h-[var(--real-vh)] overflow-hidden touch-none justify-center transition-all duration-300 max-w-[28rem] mx-auto",style:{backgroundColor:u},children:[e.jsx("div",{className:"flex justify-start fixed top-[.5rem] max-w-[28rem] mx-auto w-full px-[1rem]",children:e.jsx("div",{className:"flex justify-start ",children:e.jsx(n.Header,{noTitle:!0,resolvedConfig:l})})}),null!==p?e.jsx("div",{className:"relative flex h-[6rem] w-[6rem] items-center justify-center rounded-[9999px] border-2 border-[#fff] bg-[#fff]/20 transition-all duration-300",children:e.jsx("div",{className:"text-[3rem] font-bold text-[#fff]",style:{fontFamily:l?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:p})}):i?e.jsxs("div",{className:"relative flex flex-col items-center justify-center",children:[e.jsx("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-[9999px] border-2 bg-[#fff]/30 border-[#fff]",children:e.jsx("div",{className:"h-4 w-4 rounded-[9999px] animate-pulse bg-[#fff]/80"})}),_]}):e.jsxs("div",{className:n.clsx("relative flex h-[4rem] w-[4rem] items-center justify-center rounded-[9999px] border-2 ",r?"bg-[#fff]/20 border-[#fff]":"bg-[#fff]/10 border-[#fff]"),style:{transform:`translateY(${3*(90-t)}px)`,transition:"transform 0.2s ease-out"},children:[e.jsx("div",{className:"h-[1rem] w-[1rem] rounded-[9999px] bg-[#fff]/80"}),e.jsxs("div",{className:"mt-[.5rem] w-[180px] flex-col flex items-center absolute top-[60px] text-[#fff]",children:[e.jsx(S,{size:30}),e.jsxs("p",{style:{fontFamily:l?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:[" ","Tap to start level check"]})]})]}),null!==p&&e.jsx("div",{className:"absolute bottom-[8rem] text-center",children:e.jsx("div",{className:"text-[#fff] text-sm font-medium px-4 py-1.5 bg-black/20 rounded-[9999px] mt-8",style:{fontFamily:l?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Leave your phone as is"})}),r&&null===p&&!i&&e.jsx("div",{className:"absolute bottom-[8rem] w-[12rem]",children:e.jsx("div",{className:"h-[.375rem] w-full bg-[#fff]/20 rounded-[9999px] overflow-hidden",children:e.jsx("div",{className:"h-full bg-[#fff]/70 transition-all duration-300 rounded-[9999px]",style:{width:`${s}%`}})})}),null===p&&!i&&e.jsx("div",{className:"absolute bottom-[5rem] text-center",children:e.jsxs("div",{className:n.clsx("text-[1.5rem] font-light",m()),children:[Math.round(t),"°"]})}),null===p&&!i&&e.jsx("div",{className:"absolute bottom-[2rem] text-center max-w-[20rem] mx-auto",children:e.jsx("div",{className:n.clsx("text-[.75rem] opacity-50",m(!0)),style:{fontFamily:l?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Place your phone upright against an object. Once stable and within the 80-95° range a countdown will start to move to the scan."})})]})}),k={exports:{}};var x,P=w?k.exports:(w=1,x=function(e){return function(e){var a={};function n(t){if(a[t])return a[t].exports;var o=a[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=a,n.d=function(e,a,t){n.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,a){if(1&a&&(e=n(e)),8&a)return e;if(4&a&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var o in e)n.d(t,o,function(a){return e[a]}.bind(null,o));return t},n.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(a,"a",a),a},n.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},n.p="",n(n.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),a=require("react"),n=require("./Header-DyVbEgG9.js"),t=require("./createSvgIcon-qbf2BgaS.js"),o=require("./LoadingScreen-DTHZFIRE.js"),i=require("video.js");function r(e){var a=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,t.get?t:{enumerable:!0,get:function(){return e[n]}})}}),a.default=e,Object.freeze(a)}require("react-dom");var s=r(a);function _(e){const{sx:a,...t}=e,{systemProps:o,otherProps:i}=(e=>{const a={systemProps:{},otherProps:{}},t=e?.theme?.unstable_sxConfig??n.defaultSxConfig;return Object.keys(e).forEach(n=>{t[n]?a.systemProps[n]=e[n]:a.otherProps[n]=e[n]}),a})(t);let r;return r=Array.isArray(a)?[o,...a]:"function"==typeof a?(...e)=>{const t=a(...e);return n.isPlainObject(t)?{...o,...t}:o}:{...o,...a},{...i,sx:r}}const l=n.generateUtilityClasses("MuiBox",["root"]),c=n.createTheme(),u=function(a={}){const{themeId:t,defaultTheme:o,defaultClassName:i="MuiBox-root",generateClassName:r}=a,l=n.styled$1("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(n.styleFunctionSx);return s.forwardRef(function(a,s){const c=n.useTheme(o),{className:u,component:d="div",...m}=_(a);return e.jsx(l,{as:d,ref:s,className:n.clsx(u,r?r(i):i),theme:t&&c[t]||c,...m})})}({themeId:n.THEME_ID,defaultTheme:c,defaultClassName:l.root,generateClassName:n.ClassNameGenerator.generate});function d(e){return n.generateUtilityClass("MuiDialog",e)}"production"!==process.env.NODE_ENV&&(u.propTypes={children:n.PropTypes.node,component:n.PropTypes.elementType,sx:n.PropTypes.oneOfType([n.PropTypes.arrayOf(n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object,n.PropTypes.bool])),n.PropTypes.func,n.PropTypes.object])});const m=n.generateUtilityClasses("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),p=s.createContext({});"production"!==process.env.NODE_ENV&&(p.displayName="DialogContext");const h=n.styled(n.Backdrop,{name:"MuiDialog",slot:"Backdrop",overrides:(e,a)=>a.backdrop})({zIndex:-1}),g=n.styled(n.Modal,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),f=n.styled("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,a)=>{const{ownerState:t}=e;return[a.container,a[`scroll${n.capitalize(t.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),y=n.styled(n.Paper,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,a)=>{const{ownerState:t}=e;return[a.paper,a[`scrollPaper${n.capitalize(t.scroll)}`],a[`paperWidth${n.capitalize(String(t.maxWidth))}`],t.fullWidth&&a.paperFullWidth,t.fullScreen&&a.paperFullScreen]}})(n.memoTheme(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${m.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(a=>({props:{maxWidth:a},style:{maxWidth:`${e.breakpoints.values[a]}${e.breakpoints.unit}`,[`&.${m.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[a]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${m.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),v=s.forwardRef(function(a,o){const i=n.useDefaultProps({props:a,name:"MuiDialog"}),r=n.useTheme$1(),_={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":l,"aria-labelledby":c,"aria-modal":u=!0,BackdropComponent:m,BackdropProps:v,children:S,className:w,disableEscapeKeyDown:b=!1,fullScreen:k=!1,fullWidth:x=!1,maxWidth:P="sm",onClick:C,onClose:E,open:T,PaperComponent:N=n.Paper,PaperProps:I={},scroll:M="paper",slots:z={},slotProps:F={},TransitionComponent:j=n.Fade,transitionDuration:W=_,TransitionProps:R,...D}=i,A={...i,disableEscapeKeyDown:b,fullScreen:k,fullWidth:x,maxWidth:P,scroll:M},O=(e=>{const{classes:a,scroll:t,maxWidth:o,fullWidth:i,fullScreen:r}=e,s={root:["root"],container:["container",`scroll${n.capitalize(t)}`],paper:["paper",`paperScroll${n.capitalize(t)}`,`paperWidth${n.capitalize(String(o))}`,i&&"paperFullWidth",r&&"paperFullScreen"]};return n.composeClasses(s,d,a)})(A),L=s.useRef(),H=t.useId(c),B=s.useMemo(()=>({titleId:H}),[H]),q={slots:{transition:j,...z},slotProps:{transition:R,paper:I,backdrop:v,...F}},[U,Y]=n.useSlot("root",{elementType:g,shouldForwardComponentProp:!0,externalForwardedProps:q,ownerState:A,className:n.clsx(O.root,w),ref:o}),[G,V]=n.useSlot("backdrop",{elementType:h,shouldForwardComponentProp:!0,externalForwardedProps:q,ownerState:A}),[$,Q]=n.useSlot("paper",{elementType:y,shouldForwardComponentProp:!0,externalForwardedProps:q,ownerState:A,className:n.clsx(O.paper,I.className)}),[J,K]=n.useSlot("container",{elementType:f,externalForwardedProps:q,ownerState:A,className:O.container}),[Z,X]=n.useSlot("transition",{elementType:n.Fade,externalForwardedProps:q,ownerState:A,additionalProps:{appear:!0,in:T,timeout:W,role:"presentation"}});return e.jsx(U,{closeAfterTransition:!0,slots:{backdrop:G},slotProps:{backdrop:{transitionDuration:W,as:m,...V}},disableEscapeKeyDown:b,onClose:E,open:T,onClick:e=>{C&&C(e),L.current&&(L.current=null,E&&E(e,"backdropClick"))},...Y,...D,children:e.jsx(Z,{...X,children:e.jsx(J,{onMouseDown:e=>{L.current=e.target===e.currentTarget},...K,children:e.jsx($,{as:N,elevation:24,role:"dialog","aria-describedby":l,"aria-labelledby":H,"aria-modal":u,...Q,children:e.jsx(p.Provider,{value:B,children:S})})})})})});"production"!==process.env.NODE_ENV&&(v.propTypes={"aria-describedby":n.PropTypes.string,"aria-labelledby":n.PropTypes.string,"aria-modal":n.PropTypes.oneOfType([n.PropTypes.oneOf(["false","true"]),n.PropTypes.bool]),BackdropComponent:n.PropTypes.elementType,BackdropProps:n.PropTypes.object,children:n.PropTypes.node,classes:n.PropTypes.object,className:n.PropTypes.string,disableEscapeKeyDown:n.PropTypes.bool,fullScreen:n.PropTypes.bool,fullWidth:n.PropTypes.bool,maxWidth:n.PropTypes.oneOfType([n.PropTypes.oneOf(["xs","sm","md","lg","xl",!1]),n.PropTypes.string]),onClick:n.PropTypes.func,onClose:n.PropTypes.func,open:n.PropTypes.bool.isRequired,PaperComponent:n.PropTypes.elementType,PaperProps:n.PropTypes.object,scroll:n.PropTypes.oneOf(["body","paper"]),slotProps:n.PropTypes.shape({backdrop:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object]),container:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object]),paper:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object]),root:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object]),transition:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object])}),slots:n.PropTypes.shape({backdrop:n.PropTypes.elementType,container:n.PropTypes.elementType,paper:n.PropTypes.elementType,root:n.PropTypes.elementType,transition:n.PropTypes.elementType}),sx:n.PropTypes.oneOfType([n.PropTypes.arrayOf(n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object,n.PropTypes.bool])),n.PropTypes.func,n.PropTypes.object]),TransitionComponent:n.PropTypes.elementType,transitionDuration:n.PropTypes.oneOfType([n.PropTypes.number,n.PropTypes.shape({appear:n.PropTypes.number,enter:n.PropTypes.number,exit:n.PropTypes.number})]),TransitionProps:n.PropTypes.object});var S=a.memo(function({size:a=16}){return e.jsxs("svg",{width:a,height:a,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M22.6968 14.6968C22.6968 16.8185 21.8539 18.8533 20.3536 20.3536C18.8533 21.8539 16.8185 22.6968 14.6968 22.6968",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M18.6968 11.6968V10.6968C18.6968 10.1663 18.4861 9.65764 18.111 9.28256C17.7359 8.90749 17.2272 8.69678 16.6968 8.69678C16.1663 8.69678 15.6576 8.90749 15.2826 9.28256C14.9075 9.65764 14.6968 10.1663 14.6968 10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M14.6968 10.6968V9.69678C14.6968 9.16634 14.4861 8.65764 14.111 8.28256C13.7359 7.90749 13.2272 7.69678 12.6968 7.69678C12.1663 7.69678 11.6576 7.90749 11.2826 8.28256C10.9075 8.65764 10.6968 9.16634 10.6968 9.69678V10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M10.6968 10.1968V4.69678C10.6968 4.16634 10.4861 3.65764 10.111 3.28256C9.73592 2.90749 9.22721 2.69678 8.69678 2.69678C8.16634 2.69678 7.65764 2.90749 7.28256 3.28256C6.90749 3.65764 6.69678 4.16634 6.69678 4.69678V14.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M18.6969 11.6968C18.6969 11.1663 18.9076 10.6576 19.2827 10.2826C19.6577 9.90749 20.1664 9.69678 20.6969 9.69678C21.2273 9.69678 21.736 9.90749 22.1111 10.2826C22.4862 10.6576 22.6969 11.1663 22.6969 11.6968V14.6968C22.6969 16.8185 21.854 18.8533 20.3537 20.3536C18.8534 21.8539 16.8186 22.6968 14.6969 22.6968H12.6969C9.89688 22.6968 8.19688 21.8368 6.70688 20.3568L3.10688 16.7568C2.76282 16.3757 2.57847 15.8769 2.592 15.3637C2.60554 14.8505 2.81593 14.3621 3.1796 13.9997C3.54327 13.6373 4.03238 13.4287 4.54565 13.417C5.05892 13.4053 5.55704 13.5914 5.93688 13.9368L7.69688 15.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})});var w,b=a.memo(function({angle:t,countdown:o,isScanning:i,isInTargetRange:r,stabilityScore:s,children:_,config:l}){const c=a.useCallback(()=>t<80?Math.max(0,Math.min(100,10*(t-60))):t>95?Math.max(0,Math.min(100,10*(105-t))):100,[t]),u=a.useMemo(()=>{if(i)return l?.style?.base?.brandColor||"#4f46e5";const e=c();if(0===e)return"#ffffff";if(100===e)return l?.style?.base?.brandColor||"#8b5cf6";return`rgb(${Math.round(255-e/100*116)}, ${Math.round(255-e/100*163)}, ${Math.round(255-e/100*9)})`},[i,c]),d=a.useCallback((e,a)=>a>70?e?"text-[#fff]/70":"text-[#fff]":e?"text-[#fff]/40":"text-[#000]/70",[]),m=a.useCallback((e=!1)=>{const a=c();return i?"text-[#fff]":d(e,a)},[i,c]),p=o;function h(){document.documentElement.style.setProperty("--real-vh",window.innerHeight+"px")}return h(),window.addEventListener("resize",h),e.jsxs("div",{className:"flex w-screen flex-col items-center h-[var(--real-vh)] overflow-hidden touch-none justify-center transition-all duration-300 max-w-[28rem] mx-auto",style:{backgroundColor:u},children:[e.jsx("div",{className:"flex justify-start fixed top-[.5rem] max-w-[28rem] mx-auto w-full px-[1rem]",children:e.jsx("div",{className:"flex justify-start ",children:e.jsx(n.Header,{noTitle:!0,resolvedConfig:l})})}),null!==p?e.jsx("div",{className:"relative flex h-[6rem] w-[6rem] items-center justify-center rounded-[9999px] border-2 border-[#fff] bg-[#fff]/20 transition-all duration-300",children:e.jsx("div",{className:"text-[3rem] font-bold text-[#fff]",style:{fontFamily:l?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:p})}):i?e.jsxs("div",{className:"relative flex flex-col items-center justify-center",children:[e.jsx("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-[9999px] border-2 bg-[#fff]/30 border-[#fff]",children:e.jsx("div",{className:"h-4 w-4 rounded-[9999px] animate-pulse bg-[#fff]/80"})}),_]}):e.jsxs("div",{className:n.clsx("relative flex h-[4rem] w-[4rem] items-center justify-center rounded-[9999px] border-2 ",r?"bg-[#fff]/20 border-[#fff]":"bg-[#fff]/10 border-[#fff]"),style:{transform:`translateY(${3*(90-t)}px)`,transition:"transform 0.2s ease-out"},children:[e.jsx("div",{className:"h-[1rem] w-[1rem] rounded-[9999px] bg-[#fff]/80"}),e.jsxs("div",{className:"mt-[.5rem] w-[180px] flex-col flex items-center absolute top-[60px] text-[#fff]",children:[e.jsx(S,{size:30}),e.jsxs("p",{style:{fontFamily:l?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:[" ","Tap to start level check"]})]})]}),null!==p&&e.jsx("div",{className:"absolute bottom-[8rem] text-center",children:e.jsx("div",{className:"text-[#fff] text-sm font-medium px-4 py-1.5 bg-black/20 rounded-[9999px] mt-8",style:{fontFamily:l?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Leave your phone as is"})}),r&&null===p&&!i&&e.jsx("div",{className:"absolute bottom-[8rem] w-[12rem]",children:e.jsx("div",{className:"h-[.375rem] w-full bg-[#fff]/20 rounded-[9999px] overflow-hidden",children:e.jsx("div",{className:"h-full bg-[#fff]/70 transition-all duration-300 rounded-[9999px]",style:{width:`${s}%`}})})}),null===p&&!i&&e.jsx("div",{className:"absolute bottom-[5rem] text-center",children:e.jsxs("div",{className:n.clsx("text-[1.5rem] font-light",m()),children:[Math.round(t),"°"]})}),null===p&&!i&&e.jsx("div",{className:"absolute bottom-[2rem] text-center max-w-[20rem] mx-auto",children:e.jsx("div",{className:n.clsx("text-[.75rem] opacity-50",m(!0)),style:{fontFamily:l?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Place your phone upright against an object. Once stable and within the 80-95° range a countdown will start to move to the scan."})})]})}),k={exports:{}};var x,P=w?k.exports:(w=1,x=function(e){return function(e){var a={};function n(t){if(a[t])return a[t].exports;var o=a[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=a,n.d=function(e,a,t){n.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,a){if(1&a&&(e=n(e)),8&a)return e;if(4&a&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var o in e)n.d(t,o,function(a){return e[a]}.bind(null,o));return t},n.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(a,"a",a),a},n.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},n.p="",n(n.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":
|
|
2
2
|
/*!******************************!*\
|
|
3
3
|
!*** ./src/react-webcam.tsx ***!
|
|
4
4
|
\******************************/
|
package/dist/bodyScan.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n,Fragment as a}from"react/jsx-runtime";import*as o from"react";import t,{useCallback as i,useMemo as r,createContext as s,useState as _,useEffect as l,useLayoutEffect as c,useContext as u,useRef as d}from"react";import{aI as m,aJ as h,aK as p,aL as g,d as f,n as y,o as v,aM as w,f as S,aN as b,P as k,r as x,p as E,M as C,Y as P,aO as N,Z as M,q as I,H as z,x as F,a0 as T,aP as W,G as D,ab as R,aQ as A,au as H,aB as L,S as O,aR as j,aS as B,aA as q,aT as U,aU as Y,aD as V,az as G,aG as $,aV as Q,aC as J,aW as K,aX as Z,aY as X,h as ee,aZ as ne,a_ as ae,a$ as oe,b0 as te,b1 as ie,b2 as re,b3 as se,a6 as _e,a7 as le,b4 as ce,aE as ue,aF as de,aH as me}from"./Header-Cqu0fPKD.js";import{u as he,c as pe}from"./createSvgIcon-Dnn36OWu.js";import{s as ge,a as fe,L as ye,D as ve}from"./LoadingScreen-DKV_Oomk.js";import we from"video.js";import"react-dom";function Se(e){const{sx:n,...a}=e,{systemProps:o,otherProps:t}=(e=>{const n={systemProps:{},otherProps:{}},a=e?.theme?.unstable_sxConfig??h;return Object.keys(e).forEach(o=>{a[o]?n.systemProps[o]=e[o]:n.otherProps[o]=e[o]}),n})(a);let i;return i=Array.isArray(n)?[o,...n]:"function"==typeof n?(...e)=>{const a=n(...e);return m(a)?{...o,...a}:o}:{...o,...n},{...t,sx:i}}const be=v("MuiBox",["root"]),ke=function(n={}){const{themeId:a,defaultTheme:t,defaultClassName:i="MuiBox-root",generateClassName:r}=n,s=p("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(g);return o.forwardRef(function(n,o){const _=f(t),{className:l,component:c="div",...u}=Se(n);return e(s,{as:c,ref:o,className:y(l,r?r(i):i),theme:a&&_[a]||_,...u})})}({themeId:S,defaultTheme:b(),defaultClassName:be.root,generateClassName:w.generate});function xe(e){return x("MuiDialog",e)}"production"!==process.env.NODE_ENV&&(ke.propTypes={children:k.node,component:k.elementType,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object])});const Ee=v("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Ce=o.createContext({});"production"!==process.env.NODE_ENV&&(Ce.displayName="DialogContext");const Pe=I(W,{name:"MuiDialog",slot:"Backdrop",overrides:(e,n)=>n.backdrop})({zIndex:-1}),Ne=I(T,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),Me=I("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,n)=>{const{ownerState:a}=e;return[n.container,n[`scroll${z(a.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),Ie=I(P,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,n)=>{const{ownerState:a}=e;return[n.paper,n[`scrollPaper${z(a.scroll)}`],n[`paperWidth${z(String(a.maxWidth))}`],a.fullWidth&&n.paperFullWidth,a.fullScreen&&n.paperFullScreen]}})(D(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Ee.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(n=>({props:{maxWidth:n},style:{maxWidth:`${e.breakpoints.values[n]}${e.breakpoints.unit}`,[`&.${Ee.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[n]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Ee.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),ze=o.forwardRef(function(n,a){const t=E({props:n,name:"MuiDialog"}),i=C(),r={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":_,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:u,children:d,className:m,disableEscapeKeyDown:h=!1,fullScreen:p=!1,fullWidth:g=!1,maxWidth:f="sm",onClick:v,onClose:w,open:S,PaperComponent:b=P,PaperProps:k={},scroll:x="paper",slots:I={},slotProps:T={},TransitionComponent:W=N,transitionDuration:D=r,TransitionProps:R,...A}=t,H={...t,disableEscapeKeyDown:h,fullScreen:p,fullWidth:g,maxWidth:f,scroll:x},L=(e=>{const{classes:n,scroll:a,maxWidth:o,fullWidth:t,fullScreen:i}=e,r={root:["root"],container:["container",`scroll${z(a)}`],paper:["paper",`paperScroll${z(a)}`,`paperWidth${z(String(o))}`,t&&"paperFullWidth",i&&"paperFullScreen"]};return F(r,xe,n)})(H),O=o.useRef(),j=he(_),B=o.useMemo(()=>({titleId:j}),[j]),q={slots:{transition:W,...I},slotProps:{transition:R,paper:k,backdrop:u,...T}},[U,Y]=M("root",{elementType:Ne,shouldForwardComponentProp:!0,externalForwardedProps:q,ownerState:H,className:y(L.root,m),ref:a}),[V,G]=M("backdrop",{elementType:Pe,shouldForwardComponentProp:!0,externalForwardedProps:q,ownerState:H}),[$,Q]=M("paper",{elementType:Ie,shouldForwardComponentProp:!0,externalForwardedProps:q,ownerState:H,className:y(L.paper,k.className)}),[J,K]=M("container",{elementType:Me,externalForwardedProps:q,ownerState:H,className:L.container}),[Z,X]=M("transition",{elementType:N,externalForwardedProps:q,ownerState:H,additionalProps:{appear:!0,in:S,timeout:D,role:"presentation"}});return e(U,{closeAfterTransition:!0,slots:{backdrop:V},slotProps:{backdrop:{transitionDuration:D,as:c,...G}},disableEscapeKeyDown:h,onClose:w,open:S,onClick:e=>{v&&v(e),O.current&&(O.current=null,w&&w(e,"backdropClick"))},...Y,...A,children:e(Z,{...X,children:e(J,{onMouseDown:e=>{O.current=e.target===e.currentTarget},...K,children:e($,{as:b,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":j,"aria-modal":l,...Q,children:e(Ce.Provider,{value:B,children:d})})})})})});"production"!==process.env.NODE_ENV&&(ze.propTypes={"aria-describedby":k.string,"aria-labelledby":k.string,"aria-modal":k.oneOfType([k.oneOf(["false","true"]),k.bool]),BackdropComponent:k.elementType,BackdropProps:k.object,children:k.node,classes:k.object,className:k.string,disableEscapeKeyDown:k.bool,fullScreen:k.bool,fullWidth:k.bool,maxWidth:k.oneOfType([k.oneOf(["xs","sm","md","lg","xl",!1]),k.string]),onClick:k.func,onClose:k.func,open:k.bool.isRequired,PaperComponent:k.elementType,PaperProps:k.object,scroll:k.oneOf(["body","paper"]),slotProps:k.shape({backdrop:k.oneOfType([k.func,k.object]),container:k.oneOfType([k.func,k.object]),paper:k.oneOfType([k.func,k.object]),root:k.oneOfType([k.func,k.object]),transition:k.oneOfType([k.func,k.object])}),slots:k.shape({backdrop:k.elementType,container:k.elementType,paper:k.elementType,root:k.elementType,transition:k.elementType}),sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),TransitionComponent:k.elementType,transitionDuration:k.oneOfType([k.number,k.shape({appear:k.number,enter:k.number,exit:k.number})]),TransitionProps:k.object});var Fe=t.memo(function({size:a=16}){return n("svg",{width:a,height:a,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M22.6968 14.6968C22.6968 16.8185 21.8539 18.8533 20.3536 20.3536C18.8533 21.8539 16.8185 22.6968 14.6968 22.6968",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M18.6968 11.6968V10.6968C18.6968 10.1663 18.4861 9.65764 18.111 9.28256C17.7359 8.90749 17.2272 8.69678 16.6968 8.69678C16.1663 8.69678 15.6576 8.90749 15.2826 9.28256C14.9075 9.65764 14.6968 10.1663 14.6968 10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M14.6968 10.6968V9.69678C14.6968 9.16634 14.4861 8.65764 14.111 8.28256C13.7359 7.90749 13.2272 7.69678 12.6968 7.69678C12.1663 7.69678 11.6576 7.90749 11.2826 8.28256C10.9075 8.65764 10.6968 9.16634 10.6968 9.69678V10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M10.6968 10.1968V4.69678C10.6968 4.16634 10.4861 3.65764 10.111 3.28256C9.73592 2.90749 9.22721 2.69678 8.69678 2.69678C8.16634 2.69678 7.65764 2.90749 7.28256 3.28256C6.90749 3.65764 6.69678 4.16634 6.69678 4.69678V14.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M18.6969 11.6968C18.6969 11.1663 18.9076 10.6576 19.2827 10.2826C19.6577 9.90749 20.1664 9.69678 20.6969 9.69678C21.2273 9.69678 21.736 9.90749 22.1111 10.2826C22.4862 10.6576 22.6969 11.1663 22.6969 11.6968V14.6968C22.6969 16.8185 21.854 18.8533 20.3537 20.3536C18.8534 21.8539 16.8186 22.6968 14.6969 22.6968H12.6969C9.89688 22.6968 8.19688 21.8368 6.70688 20.3568L3.10688 16.7568C2.76282 16.3757 2.57847 15.8769 2.592 15.3637C2.60554 14.8505 2.81593 14.3621 3.1796 13.9997C3.54327 13.6373 4.03238 13.4287 4.54565 13.417C5.05892 13.4053 5.55704 13.5914 5.93688 13.9368L7.69688 15.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})});var Te,We=t.memo(function({angle:a,countdown:o,isScanning:t,isInTargetRange:s,stabilityScore:_,children:l,config:c}){const u=i(()=>a<80?Math.max(0,Math.min(100,10*(a-60))):a>95?Math.max(0,Math.min(100,10*(105-a))):100,[a]),d=r(()=>{if(t)return c?.style?.base?.brandColor||"#4f46e5";const e=u();if(0===e)return"#ffffff";if(100===e)return c?.style?.base?.brandColor||"#8b5cf6";return`rgb(${Math.round(255-e/100*116)}, ${Math.round(255-e/100*163)}, ${Math.round(255-e/100*9)})`},[t,u]),m=i((e,n)=>n>70?e?"text-[#fff]/70":"text-[#fff]":e?"text-[#fff]/40":"text-[#000]/70",[]),h=i((e=!1)=>{const n=u();return t?"text-[#fff]":m(e,n)},[t,u]),p=o;function g(){document.documentElement.style.setProperty("--real-vh",window.innerHeight+"px")}return g(),window.addEventListener("resize",g),n("div",{className:"flex w-screen flex-col items-center h-[var(--real-vh)] overflow-hidden touch-none justify-center transition-all duration-300 max-w-[28rem] mx-auto",style:{backgroundColor:d},children:[e("div",{className:"flex justify-start fixed top-[.5rem] max-w-[28rem] mx-auto w-full px-[1rem]",children:e("div",{className:"flex justify-start ",children:e(R,{noTitle:!0,resolvedConfig:c})})}),null!==p?e("div",{className:"relative flex h-[6rem] w-[6rem] items-center justify-center rounded-[9999px] border-2 border-[#fff] bg-[#fff]/20 transition-all duration-300",children:e("div",{className:"text-[3rem] font-bold text-[#fff]",style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:p})}):n("div",t?{className:"relative flex flex-col items-center justify-center",children:[e("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-[9999px] border-2 bg-[#fff]/30 border-[#fff]",children:e("div",{className:"h-4 w-4 rounded-[9999px] animate-pulse bg-[#fff]/80"})}),l]}:{className:y("relative flex h-[4rem] w-[4rem] items-center justify-center rounded-[9999px] border-2 ",s?"bg-[#fff]/20 border-[#fff]":"bg-[#fff]/10 border-[#fff]"),style:{transform:`translateY(${3*(90-a)}px)`,transition:"transform 0.2s ease-out"},children:[e("div",{className:"h-[1rem] w-[1rem] rounded-[9999px] bg-[#fff]/80"}),n("div",{className:"mt-[.5rem] w-[180px] flex-col flex items-center absolute top-[60px] text-[#fff]",children:[e(Fe,{size:30}),n("p",{style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:[" ","Tap to start level check"]})]})]}),null!==p&&e("div",{className:"absolute bottom-[8rem] text-center",children:e("div",{className:"text-[#fff] text-sm font-medium px-4 py-1.5 bg-black/20 rounded-[9999px] mt-8",style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Leave your phone as is"})}),s&&null===p&&!t&&e("div",{className:"absolute bottom-[8rem] w-[12rem]",children:e("div",{className:"h-[.375rem] w-full bg-[#fff]/20 rounded-[9999px] overflow-hidden",children:e("div",{className:"h-full bg-[#fff]/70 transition-all duration-300 rounded-[9999px]",style:{width:`${_}%`}})})}),null===p&&!t&&e("div",{className:"absolute bottom-[5rem] text-center",children:n("div",{className:y("text-[1.5rem] font-light",h()),children:[Math.round(a),"°"]})}),null===p&&!t&&e("div",{className:"absolute bottom-[2rem] text-center max-w-[20rem] mx-auto",children:e("div",{className:y("text-[.75rem] opacity-50",h(!0)),style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Place your phone upright against an object. Once stable and within the 80-95° range a countdown will start to move to the scan."})})]})}),De={exports:{}};var Re,Ae=Te?De.exports:(Te=1,Re=function(e){return function(e){var n={};function a(o){if(n[o])return n[o].exports;var t=n[o]={i:o,l:!1,exports:{}};return e[o].call(t.exports,t,t.exports,a),t.l=!0,t.exports}return a.m=e,a.c=n,a.d=function(e,n,o){a.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,n){if(1&n&&(e=a(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var t in e)a.d(o,t,function(n){return e[n]}.bind(null,t));return o},a.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(n,"a",n),n},a.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},a.p="",a(a.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":
|
|
1
|
+
import{jsx as e,jsxs as n,Fragment as a}from"react/jsx-runtime";import*as o from"react";import t,{useCallback as i,useMemo as r,createContext as s,useState as _,useEffect as l,useLayoutEffect as c,useContext as u,useRef as d}from"react";import{aI as m,aJ as h,aK as p,aL as g,d as f,n as y,o as v,aM as w,f as S,aN as b,P as k,r as x,p as E,M as C,Y as P,aO as N,Z as M,q as I,H as z,x as F,a0 as T,aP as W,G as D,ab as R,aQ as A,au as H,aB as L,S as O,aR as j,aS as B,aA as q,aT as U,aU as Y,aD as V,az as G,aG as $,aV as Q,aC as J,aW as K,aX as Z,aY as X,h as ee,aZ as ne,a_ as ae,a$ as oe,b0 as te,b1 as ie,b2 as re,b3 as se,a6 as _e,a7 as le,b4 as ce,aE as ue,aF as de,aH as me}from"./Header-CGdVhD4h.js";import{u as he,c as pe}from"./createSvgIcon-DS-4jmZ4.js";import{s as ge,a as fe,L as ye,D as ve}from"./LoadingScreen-CoRs0lHa.js";import we from"video.js";import"react-dom";function Se(e){const{sx:n,...a}=e,{systemProps:o,otherProps:t}=(e=>{const n={systemProps:{},otherProps:{}},a=e?.theme?.unstable_sxConfig??h;return Object.keys(e).forEach(o=>{a[o]?n.systemProps[o]=e[o]:n.otherProps[o]=e[o]}),n})(a);let i;return i=Array.isArray(n)?[o,...n]:"function"==typeof n?(...e)=>{const a=n(...e);return m(a)?{...o,...a}:o}:{...o,...n},{...t,sx:i}}const be=v("MuiBox",["root"]),ke=function(n={}){const{themeId:a,defaultTheme:t,defaultClassName:i="MuiBox-root",generateClassName:r}=n,s=p("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(g);return o.forwardRef(function(n,o){const _=f(t),{className:l,component:c="div",...u}=Se(n);return e(s,{as:c,ref:o,className:y(l,r?r(i):i),theme:a&&_[a]||_,...u})})}({themeId:S,defaultTheme:b(),defaultClassName:be.root,generateClassName:w.generate});function xe(e){return x("MuiDialog",e)}"production"!==process.env.NODE_ENV&&(ke.propTypes={children:k.node,component:k.elementType,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object])});const Ee=v("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Ce=o.createContext({});"production"!==process.env.NODE_ENV&&(Ce.displayName="DialogContext");const Pe=I(W,{name:"MuiDialog",slot:"Backdrop",overrides:(e,n)=>n.backdrop})({zIndex:-1}),Ne=I(T,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),Me=I("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,n)=>{const{ownerState:a}=e;return[n.container,n[`scroll${z(a.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),Ie=I(P,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,n)=>{const{ownerState:a}=e;return[n.paper,n[`scrollPaper${z(a.scroll)}`],n[`paperWidth${z(String(a.maxWidth))}`],a.fullWidth&&n.paperFullWidth,a.fullScreen&&n.paperFullScreen]}})(D(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Ee.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(n=>({props:{maxWidth:n},style:{maxWidth:`${e.breakpoints.values[n]}${e.breakpoints.unit}`,[`&.${Ee.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[n]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Ee.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),ze=o.forwardRef(function(n,a){const t=E({props:n,name:"MuiDialog"}),i=C(),r={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":_,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:u,children:d,className:m,disableEscapeKeyDown:h=!1,fullScreen:p=!1,fullWidth:g=!1,maxWidth:f="sm",onClick:v,onClose:w,open:S,PaperComponent:b=P,PaperProps:k={},scroll:x="paper",slots:I={},slotProps:T={},TransitionComponent:W=N,transitionDuration:D=r,TransitionProps:R,...A}=t,H={...t,disableEscapeKeyDown:h,fullScreen:p,fullWidth:g,maxWidth:f,scroll:x},L=(e=>{const{classes:n,scroll:a,maxWidth:o,fullWidth:t,fullScreen:i}=e,r={root:["root"],container:["container",`scroll${z(a)}`],paper:["paper",`paperScroll${z(a)}`,`paperWidth${z(String(o))}`,t&&"paperFullWidth",i&&"paperFullScreen"]};return F(r,xe,n)})(H),O=o.useRef(),j=he(_),B=o.useMemo(()=>({titleId:j}),[j]),q={slots:{transition:W,...I},slotProps:{transition:R,paper:k,backdrop:u,...T}},[U,Y]=M("root",{elementType:Ne,shouldForwardComponentProp:!0,externalForwardedProps:q,ownerState:H,className:y(L.root,m),ref:a}),[V,G]=M("backdrop",{elementType:Pe,shouldForwardComponentProp:!0,externalForwardedProps:q,ownerState:H}),[$,Q]=M("paper",{elementType:Ie,shouldForwardComponentProp:!0,externalForwardedProps:q,ownerState:H,className:y(L.paper,k.className)}),[J,K]=M("container",{elementType:Me,externalForwardedProps:q,ownerState:H,className:L.container}),[Z,X]=M("transition",{elementType:N,externalForwardedProps:q,ownerState:H,additionalProps:{appear:!0,in:S,timeout:D,role:"presentation"}});return e(U,{closeAfterTransition:!0,slots:{backdrop:V},slotProps:{backdrop:{transitionDuration:D,as:c,...G}},disableEscapeKeyDown:h,onClose:w,open:S,onClick:e=>{v&&v(e),O.current&&(O.current=null,w&&w(e,"backdropClick"))},...Y,...A,children:e(Z,{...X,children:e(J,{onMouseDown:e=>{O.current=e.target===e.currentTarget},...K,children:e($,{as:b,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":j,"aria-modal":l,...Q,children:e(Ce.Provider,{value:B,children:d})})})})})});"production"!==process.env.NODE_ENV&&(ze.propTypes={"aria-describedby":k.string,"aria-labelledby":k.string,"aria-modal":k.oneOfType([k.oneOf(["false","true"]),k.bool]),BackdropComponent:k.elementType,BackdropProps:k.object,children:k.node,classes:k.object,className:k.string,disableEscapeKeyDown:k.bool,fullScreen:k.bool,fullWidth:k.bool,maxWidth:k.oneOfType([k.oneOf(["xs","sm","md","lg","xl",!1]),k.string]),onClick:k.func,onClose:k.func,open:k.bool.isRequired,PaperComponent:k.elementType,PaperProps:k.object,scroll:k.oneOf(["body","paper"]),slotProps:k.shape({backdrop:k.oneOfType([k.func,k.object]),container:k.oneOfType([k.func,k.object]),paper:k.oneOfType([k.func,k.object]),root:k.oneOfType([k.func,k.object]),transition:k.oneOfType([k.func,k.object])}),slots:k.shape({backdrop:k.elementType,container:k.elementType,paper:k.elementType,root:k.elementType,transition:k.elementType}),sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),TransitionComponent:k.elementType,transitionDuration:k.oneOfType([k.number,k.shape({appear:k.number,enter:k.number,exit:k.number})]),TransitionProps:k.object});var Fe=t.memo(function({size:a=16}){return n("svg",{width:a,height:a,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M22.6968 14.6968C22.6968 16.8185 21.8539 18.8533 20.3536 20.3536C18.8533 21.8539 16.8185 22.6968 14.6968 22.6968",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M18.6968 11.6968V10.6968C18.6968 10.1663 18.4861 9.65764 18.111 9.28256C17.7359 8.90749 17.2272 8.69678 16.6968 8.69678C16.1663 8.69678 15.6576 8.90749 15.2826 9.28256C14.9075 9.65764 14.6968 10.1663 14.6968 10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M14.6968 10.6968V9.69678C14.6968 9.16634 14.4861 8.65764 14.111 8.28256C13.7359 7.90749 13.2272 7.69678 12.6968 7.69678C12.1663 7.69678 11.6576 7.90749 11.2826 8.28256C10.9075 8.65764 10.6968 9.16634 10.6968 9.69678V10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M10.6968 10.1968V4.69678C10.6968 4.16634 10.4861 3.65764 10.111 3.28256C9.73592 2.90749 9.22721 2.69678 8.69678 2.69678C8.16634 2.69678 7.65764 2.90749 7.28256 3.28256C6.90749 3.65764 6.69678 4.16634 6.69678 4.69678V14.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M18.6969 11.6968C18.6969 11.1663 18.9076 10.6576 19.2827 10.2826C19.6577 9.90749 20.1664 9.69678 20.6969 9.69678C21.2273 9.69678 21.736 9.90749 22.1111 10.2826C22.4862 10.6576 22.6969 11.1663 22.6969 11.6968V14.6968C22.6969 16.8185 21.854 18.8533 20.3537 20.3536C18.8534 21.8539 16.8186 22.6968 14.6969 22.6968H12.6969C9.89688 22.6968 8.19688 21.8368 6.70688 20.3568L3.10688 16.7568C2.76282 16.3757 2.57847 15.8769 2.592 15.3637C2.60554 14.8505 2.81593 14.3621 3.1796 13.9997C3.54327 13.6373 4.03238 13.4287 4.54565 13.417C5.05892 13.4053 5.55704 13.5914 5.93688 13.9368L7.69688 15.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})});var Te,We=t.memo(function({angle:a,countdown:o,isScanning:t,isInTargetRange:s,stabilityScore:_,children:l,config:c}){const u=i(()=>a<80?Math.max(0,Math.min(100,10*(a-60))):a>95?Math.max(0,Math.min(100,10*(105-a))):100,[a]),d=r(()=>{if(t)return c?.style?.base?.brandColor||"#4f46e5";const e=u();if(0===e)return"#ffffff";if(100===e)return c?.style?.base?.brandColor||"#8b5cf6";return`rgb(${Math.round(255-e/100*116)}, ${Math.round(255-e/100*163)}, ${Math.round(255-e/100*9)})`},[t,u]),m=i((e,n)=>n>70?e?"text-[#fff]/70":"text-[#fff]":e?"text-[#fff]/40":"text-[#000]/70",[]),h=i((e=!1)=>{const n=u();return t?"text-[#fff]":m(e,n)},[t,u]),p=o;function g(){document.documentElement.style.setProperty("--real-vh",window.innerHeight+"px")}return g(),window.addEventListener("resize",g),n("div",{className:"flex w-screen flex-col items-center h-[var(--real-vh)] overflow-hidden touch-none justify-center transition-all duration-300 max-w-[28rem] mx-auto",style:{backgroundColor:d},children:[e("div",{className:"flex justify-start fixed top-[.5rem] max-w-[28rem] mx-auto w-full px-[1rem]",children:e("div",{className:"flex justify-start ",children:e(R,{noTitle:!0,resolvedConfig:c})})}),null!==p?e("div",{className:"relative flex h-[6rem] w-[6rem] items-center justify-center rounded-[9999px] border-2 border-[#fff] bg-[#fff]/20 transition-all duration-300",children:e("div",{className:"text-[3rem] font-bold text-[#fff]",style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:p})}):n("div",t?{className:"relative flex flex-col items-center justify-center",children:[e("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-[9999px] border-2 bg-[#fff]/30 border-[#fff]",children:e("div",{className:"h-4 w-4 rounded-[9999px] animate-pulse bg-[#fff]/80"})}),l]}:{className:y("relative flex h-[4rem] w-[4rem] items-center justify-center rounded-[9999px] border-2 ",s?"bg-[#fff]/20 border-[#fff]":"bg-[#fff]/10 border-[#fff]"),style:{transform:`translateY(${3*(90-a)}px)`,transition:"transform 0.2s ease-out"},children:[e("div",{className:"h-[1rem] w-[1rem] rounded-[9999px] bg-[#fff]/80"}),n("div",{className:"mt-[.5rem] w-[180px] flex-col flex items-center absolute top-[60px] text-[#fff]",children:[e(Fe,{size:30}),n("p",{style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:[" ","Tap to start level check"]})]})]}),null!==p&&e("div",{className:"absolute bottom-[8rem] text-center",children:e("div",{className:"text-[#fff] text-sm font-medium px-4 py-1.5 bg-black/20 rounded-[9999px] mt-8",style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Leave your phone as is"})}),s&&null===p&&!t&&e("div",{className:"absolute bottom-[8rem] w-[12rem]",children:e("div",{className:"h-[.375rem] w-full bg-[#fff]/20 rounded-[9999px] overflow-hidden",children:e("div",{className:"h-full bg-[#fff]/70 transition-all duration-300 rounded-[9999px]",style:{width:`${_}%`}})})}),null===p&&!t&&e("div",{className:"absolute bottom-[5rem] text-center",children:n("div",{className:y("text-[1.5rem] font-light",h()),children:[Math.round(a),"°"]})}),null===p&&!t&&e("div",{className:"absolute bottom-[2rem] text-center max-w-[20rem] mx-auto",children:e("div",{className:y("text-[.75rem] opacity-50",h(!0)),style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Place your phone upright against an object. Once stable and within the 80-95° range a countdown will start to move to the scan."})})]})}),De={exports:{}};var Re,Ae=Te?De.exports:(Te=1,Re=function(e){return function(e){var n={};function a(o){if(n[o])return n[o].exports;var t=n[o]={i:o,l:!1,exports:{}};return e[o].call(t.exports,t,t.exports,a),t.l=!0,t.exports}return a.m=e,a.c=n,a.d=function(e,n,o){a.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,n){if(1&n&&(e=a(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var t in e)a.d(o,t,function(n){return e[n]}.bind(null,t));return o},a.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(n,"a",n),n},a.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},a.p="",a(a.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":
|
|
2
2
|
/*!******************************!*\
|
|
3
3
|
!*** ./src/react-webcam.tsx ***!
|
|
4
4
|
\******************************/
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as o from"react";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{r as t,o as n,p as i,q as s,n as l,H as a,x as c,G as p,P as f}from"./Header-CGdVhD4h.js";let m=0;const d={...o}.useId;function u(e){if(void 0!==d){const o=d();return e??o}return function(e){const[r,t]=o.useState(e),n=e||r;return o.useEffect(()=>{null==r&&(m+=1,t(`mui-${m}`))},[r]),n}(e)}function h(o){return t("MuiSvgIcon",o)}n("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const S=s("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:r}=o;return[e.root,"inherit"!==r.color&&e[`color${a(r.color)}`],e[`fontSize${a(r.fontSize)}`]]}})(p(({theme:o})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:o.transitions?.create?.("fill",{duration:(o.vars??o).transitions?.duration?.shorter}),variants:[{props:o=>!o.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:o.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:o.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:o.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((o.vars??o).palette).filter(([,o])=>o&&o.main).map(([e])=>({props:{color:e},style:{color:(o.vars??o).palette?.[e]?.main}})),{props:{color:"action"},style:{color:(o.vars??o).palette?.action?.active}},{props:{color:"disabled"},style:{color:(o.vars??o).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),v=o.forwardRef(function(t,n){const s=i({props:t,name:"MuiSvgIcon"}),{children:p,className:f,color:m="inherit",component:d="svg",fontSize:u="medium",htmlColor:v,inheritViewBox:y=!1,titleAccess:g,viewBox:z="0 0 24 24",...x}=s,w=o.isValidElement(p)&&"svg"===p.type,N={...s,color:m,component:d,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:y,viewBox:z,hasSvgAsChild:w},b={};y||(b.viewBox=z);const O=(o=>{const{color:e,fontSize:r,classes:t}=o,n={root:["root","inherit"!==e&&`color${a(e)}`,`fontSize${a(r)}`]};return c(n,h,t)})(N);return e(S,{as:d,className:l(O.root,f),focusable:"false",color:v,"aria-hidden":!g||void 0,role:g?"img":void 0,ref:n,...b,...x,...w&&p.props,ownerState:N,children:[w?p.props.children:p,g?r("title",{children:g}):null]})});function y(e,t){function n(o,n){return r(v,{"data-testid":"production"!==process.env.NODE_ENV?`${t}Icon`:void 0,ref:n,...o,children:e})}return"production"!==process.env.NODE_ENV&&(n.displayName=`${t}Icon`),n.muiName=v.muiName,o.memo(o.forwardRef(n))}"production"!==process.env.NODE_ENV&&(v.propTypes={children:f.node,classes:f.object,className:f.string,color:f.oneOfType([f.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),f.string]),component:f.elementType,fontSize:f.oneOfType([f.oneOf(["inherit","large","medium","small"]),f.string]),htmlColor:f.string,inheritViewBox:f.bool,shapeRendering:f.string,sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object]),titleAccess:f.string,viewBox:f.string}),v.muiName="SvgIcon";export{y as c,u};
|
|
2
|
+
//# sourceMappingURL=createSvgIcon-DS-4jmZ4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSvgIcon-DS-4jmZ4.js","sources":["../../node_modules/@mui/utils/esm/useId/useId.js","../../node_modules/@mui/material/esm/SvgIcon/svgIconClasses.js","../../node_modules/@mui/material/esm/SvgIcon/SvgIcon.js","../../node_modules/@mui/material/esm/utils/createSvgIcon.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseId = safeReact.useId;\n\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? reactId;\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSvgIconUtilityClass(slot) {\n return generateUtilityClass('MuiSvgIcon', slot);\n}\nconst svgIconClasses = generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);\nexport default svgIconClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getSvgIconUtilityClass } from \"./svgIconClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n fontSize,\n classes\n } = ownerState;\n const slots = {\n root: ['root', color !== 'inherit' && `color${capitalize(color)}`, `fontSize${capitalize(fontSize)}`]\n };\n return composeClasses(slots, getSvgIconUtilityClass, classes);\n};\nconst SvgIconRoot = styled('svg', {\n name: 'MuiSvgIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'inherit' && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n flexShrink: 0,\n transition: theme.transitions?.create?.('fill', {\n duration: (theme.vars ?? theme).transitions?.duration?.shorter\n }),\n variants: [{\n props: props => !props.hasSvgAsChild,\n style: {\n // the <svg> will define the property that has `currentColor`\n // for example heroicons uses fill=\"none\" and stroke=\"currentColor\"\n fill: 'currentColor'\n }\n }, {\n props: {\n fontSize: 'inherit'\n },\n style: {\n fontSize: 'inherit'\n }\n }, {\n props: {\n fontSize: 'small'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(20) || '1.25rem'\n }\n }, {\n props: {\n fontSize: 'medium'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(24) || '1.5rem'\n }\n }, {\n props: {\n fontSize: 'large'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(35) || '2.1875rem'\n }\n },\n // TODO v5 deprecate color prop, v6 remove for sx\n ...Object.entries((theme.vars ?? theme).palette).filter(([, value]) => value && value.main).map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars ?? theme).palette?.[color]?.main\n }\n })), {\n props: {\n color: 'action'\n },\n style: {\n color: (theme.vars ?? theme).palette?.action?.active\n }\n }, {\n props: {\n color: 'disabled'\n },\n style: {\n color: (theme.vars ?? theme).palette?.action?.disabled\n }\n }, {\n props: {\n color: 'inherit'\n },\n style: {\n color: undefined\n }\n }]\n})));\nconst SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiSvgIcon'\n });\n const {\n children,\n className,\n color = 'inherit',\n component = 'svg',\n fontSize = 'medium',\n htmlColor,\n inheritViewBox = false,\n titleAccess,\n viewBox = '0 0 24 24',\n ...other\n } = props;\n const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';\n const ownerState = {\n ...props,\n color,\n component,\n fontSize,\n instanceFontSize: inProps.fontSize,\n inheritViewBox,\n viewBox,\n hasSvgAsChild\n };\n const more = {};\n if (!inheritViewBox) {\n more.viewBox = viewBox;\n }\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(SvgIconRoot, {\n as: component,\n className: clsx(classes.root, className),\n focusable: \"false\",\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref,\n ...more,\n ...other,\n ...(hasSvgAsChild && children.props),\n ownerState: ownerState,\n children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/_jsx(\"title\", {\n children: titleAccess\n }) : null]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n * @default 'inherit'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'action', 'disabled', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n * @default 'medium'\n */\n fontSize: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'large', 'medium', 'small']), PropTypes.string]),\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n /**\n * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`\n * prop will be ignored.\n * Useful when you want to reference a custom `component` and have `SvgIcon` pass that\n * `component`'s viewBox to the root node.\n * @default false\n */\n inheritViewBox: PropTypes.bool,\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this prop.\n */\n shapeRendering: PropTypes.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n * @default '0 0 24 24'\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default SvgIcon;","'use client';\n\nimport * as React from 'react';\nimport SvgIcon from \"../SvgIcon/index.js\";\n\n/**\n * Private module reserved for @mui packages.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function createSvgIcon(path, displayName) {\n function Component(props, ref) {\n return /*#__PURE__*/_jsx(SvgIcon, {\n \"data-testid\": process.env.NODE_ENV !== 'production' ? `${displayName}Icon` : undefined,\n ref: ref,\n ...props,\n children: path\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = `${displayName}Icon`;\n }\n Component.muiName = SvgIcon.muiName;\n return /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(Component));\n}"],"names":["globalId","maybeReactUseId","React","useId","idOverride","undefined","reactId","defaultId","setDefaultId","useState","id","useEffect","useGlobalId","getSvgIconUtilityClass","slot","generateUtilityClass","generateUtilityClasses","SvgIconRoot","styled","name","overridesResolver","props","styles","ownerState","root","color","capitalize","fontSize","memoTheme","theme","userSelect","width","height","display","flexShrink","transition","transitions","create","duration","vars","shorter","variants","hasSvgAsChild","style","fill","typography","pxToRem","Object","entries","palette","filter","value","main","map","action","active","disabled","SvgIcon","forwardRef","inProps","ref","useDefaultProps","children","className","component","htmlColor","inheritViewBox","titleAccess","viewBox","other","isValidElement","type","instanceFontSize","more","classes","slots","composeClasses","useUtilityClasses","_jsxs","as","clsx","focusable","role","_jsx","createSvgIcon","path","displayName","Component","process","env","NODE_ENV","muiName","memo","propTypes","PropTypes","node","object","string","oneOfType","oneOf","elementType","bool","shapeRendering","sx","arrayOf","func"],"mappings":"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","x_google_ignoreList":[0,1,2,3]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react"),o=require("react/jsx-runtime"),r=require("./Header-DyVbEgG9.js");function t(e){var o=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:function(){return e[r]}})}}),o.default=e,Object.freeze(o)}var i=t(e);let n=0;const s={...i}.useId;function p(e){return r.generateUtilityClass("MuiSvgIcon",e)}r.generateUtilityClasses("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const c=r.styled("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,"inherit"!==t.color&&o[`color${r.capitalize(t.color)}`],o[`fontSize${r.capitalize(t.fontSize)}`]]}})(r.memoTheme(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([o])=>({props:{color:o},style:{color:(e.vars??e).palette?.[o]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),l=i.forwardRef(function(e,t){const n=r.useDefaultProps({props:e,name:"MuiSvgIcon"}),{children:s,className:l,color:a="inherit",component:f="svg",fontSize:u="medium",htmlColor:y,inheritViewBox:m=!1,titleAccess:d,viewBox:h="0 0 24 24",...v}=n,S=i.isValidElement(s)&&"svg"===s.type,g={...n,color:a,component:f,fontSize:u,instanceFontSize:e.fontSize,inheritViewBox:m,viewBox:h,hasSvgAsChild:S},T={};m||(T.viewBox=h);const P=(e=>{const{color:o,fontSize:t,classes:i}=e,n={root:["root","inherit"!==o&&`color${r.capitalize(o)}`,`fontSize${r.capitalize(t)}`]};return r.composeClasses(n,p,i)})(g);return o.jsxs(c,{as:f,className:r.clsx(P.root,l),focusable:"false",color:y,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:t,...T,...v,...S&&s.props,ownerState:g,children:[S?s.props.children:s,d?o.jsx("title",{children:d}):null]})});"production"!==process.env.NODE_ENV&&(l.propTypes={children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,color:r.PropTypes.oneOfType([r.PropTypes.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),r.PropTypes.string]),component:r.PropTypes.elementType,fontSize:r.PropTypes.oneOfType([r.PropTypes.oneOf(["inherit","large","medium","small"]),r.PropTypes.string]),htmlColor:r.PropTypes.string,inheritViewBox:r.PropTypes.bool,shapeRendering:r.PropTypes.string,sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object]),titleAccess:r.PropTypes.string,viewBox:r.PropTypes.string}),l.muiName="SvgIcon",exports.createSvgIcon=function(e,r){function t(t,i){return o.jsx(l,{"data-testid":"production"!==process.env.NODE_ENV?`${r}Icon`:void 0,ref:i,...t,children:e})}return"production"!==process.env.NODE_ENV&&(t.displayName=`${r}Icon`),t.muiName=l.muiName,i.memo(i.forwardRef(t))},exports.useId=function(e){if(void 0!==s){const o=s();return e??o}return function(e){const[o,r]=i.useState(e),t=e||o;return i.useEffect(()=>{null==o&&(n+=1,r(`mui-${n}`))},[o]),t}(e)};
|
|
2
|
+
//# sourceMappingURL=createSvgIcon-qbf2BgaS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSvgIcon-qbf2BgaS.js","sources":["../../node_modules/@mui/utils/esm/useId/useId.js","../../node_modules/@mui/material/esm/SvgIcon/svgIconClasses.js","../../node_modules/@mui/material/esm/SvgIcon/SvgIcon.js","../../node_modules/@mui/material/esm/utils/createSvgIcon.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseId = safeReact.useId;\n\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? reactId;\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSvgIconUtilityClass(slot) {\n return generateUtilityClass('MuiSvgIcon', slot);\n}\nconst svgIconClasses = generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);\nexport default svgIconClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getSvgIconUtilityClass } from \"./svgIconClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n fontSize,\n classes\n } = ownerState;\n const slots = {\n root: ['root', color !== 'inherit' && `color${capitalize(color)}`, `fontSize${capitalize(fontSize)}`]\n };\n return composeClasses(slots, getSvgIconUtilityClass, classes);\n};\nconst SvgIconRoot = styled('svg', {\n name: 'MuiSvgIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'inherit' && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n flexShrink: 0,\n transition: theme.transitions?.create?.('fill', {\n duration: (theme.vars ?? theme).transitions?.duration?.shorter\n }),\n variants: [{\n props: props => !props.hasSvgAsChild,\n style: {\n // the <svg> will define the property that has `currentColor`\n // for example heroicons uses fill=\"none\" and stroke=\"currentColor\"\n fill: 'currentColor'\n }\n }, {\n props: {\n fontSize: 'inherit'\n },\n style: {\n fontSize: 'inherit'\n }\n }, {\n props: {\n fontSize: 'small'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(20) || '1.25rem'\n }\n }, {\n props: {\n fontSize: 'medium'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(24) || '1.5rem'\n }\n }, {\n props: {\n fontSize: 'large'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(35) || '2.1875rem'\n }\n },\n // TODO v5 deprecate color prop, v6 remove for sx\n ...Object.entries((theme.vars ?? theme).palette).filter(([, value]) => value && value.main).map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars ?? theme).palette?.[color]?.main\n }\n })), {\n props: {\n color: 'action'\n },\n style: {\n color: (theme.vars ?? theme).palette?.action?.active\n }\n }, {\n props: {\n color: 'disabled'\n },\n style: {\n color: (theme.vars ?? theme).palette?.action?.disabled\n }\n }, {\n props: {\n color: 'inherit'\n },\n style: {\n color: undefined\n }\n }]\n})));\nconst SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiSvgIcon'\n });\n const {\n children,\n className,\n color = 'inherit',\n component = 'svg',\n fontSize = 'medium',\n htmlColor,\n inheritViewBox = false,\n titleAccess,\n viewBox = '0 0 24 24',\n ...other\n } = props;\n const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';\n const ownerState = {\n ...props,\n color,\n component,\n fontSize,\n instanceFontSize: inProps.fontSize,\n inheritViewBox,\n viewBox,\n hasSvgAsChild\n };\n const more = {};\n if (!inheritViewBox) {\n more.viewBox = viewBox;\n }\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(SvgIconRoot, {\n as: component,\n className: clsx(classes.root, className),\n focusable: \"false\",\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref,\n ...more,\n ...other,\n ...(hasSvgAsChild && children.props),\n ownerState: ownerState,\n children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/_jsx(\"title\", {\n children: titleAccess\n }) : null]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n * @default 'inherit'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'action', 'disabled', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n * @default 'medium'\n */\n fontSize: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'large', 'medium', 'small']), PropTypes.string]),\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n /**\n * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`\n * prop will be ignored.\n * Useful when you want to reference a custom `component` and have `SvgIcon` pass that\n * `component`'s viewBox to the root node.\n * @default false\n */\n inheritViewBox: PropTypes.bool,\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this prop.\n */\n shapeRendering: PropTypes.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n * @default '0 0 24 24'\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default SvgIcon;","'use client';\n\nimport * as React from 'react';\nimport SvgIcon from \"../SvgIcon/index.js\";\n\n/**\n * Private module reserved for @mui packages.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function createSvgIcon(path, displayName) {\n function Component(props, ref) {\n return /*#__PURE__*/_jsx(SvgIcon, {\n \"data-testid\": process.env.NODE_ENV !== 'production' ? `${displayName}Icon` : undefined,\n ref: ref,\n ...props,\n children: path\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = `${displayName}Icon`;\n }\n Component.muiName = SvgIcon.muiName;\n return /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(Component));\n}"],"names":["globalId","maybeReactUseId","React","useId","getSvgIconUtilityClass","slot","generateUtilityClass","generateUtilityClasses","SvgIconRoot","styled","name","overridesResolver","props","styles","ownerState","root","color","capitalize","fontSize","memoTheme","theme","userSelect","width","height","display","flexShrink","transition","transitions","create","duration","vars","shorter","variants","hasSvgAsChild","style","fill","typography","pxToRem","Object","entries","palette","filter","value","main","map","action","active","disabled","undefined","SvgIcon","forwardRef","inProps","ref","useDefaultProps","children","className","component","htmlColor","inheritViewBox","titleAccess","viewBox","other","isValidElement","type","instanceFontSize","more","classes","slots","composeClasses","useUtilityClasses","_jsxs","as","clsx","focusable","role","_jsx","process","env","NODE_ENV","propTypes","PropTypes","node","object","string","oneOfType","oneOf","elementType","bool","shapeRendering","sx","arrayOf","func","muiName","path","displayName","Component","memo","idOverride","reactId","defaultId","setDefaultId","useState","id","useEffect","useGlobalId"],"mappings":"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","x_google_ignoreList":[0,1,2,3]}
|
package/dist/faceScan.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as FaceScanProps } from './interfaces-
|
|
2
|
-
export { c as FaceScanMetaData } from './interfaces-
|
|
1
|
+
import { b as FaceScanProps } from './interfaces-ej_cyAqr.js';
|
|
2
|
+
export { c as FaceScanMetaData } from './interfaces-ej_cyAqr.js';
|
|
3
3
|
|
|
4
4
|
declare const FaceScan: React.FC<FaceScanProps>;
|
|
5
5
|
|
package/dist/faceScan.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("react"),a=require("./Header-COGK6xNN.js"),n=require("./arrow-right-UNw_K0ah.js"),o=require("./LoadingScreen-Dziucpn5.js"),r=require("@tensorflow-models/pose-detection"),s=require("@tensorflow/tfjs");function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}}),t.default=e,Object.freeze(t)}require("react-dom");var i=c(r);function l({stage:t,videoLoading:n,setVideoLoading:o,videoError:r,setVideoError:s,children:c,gender:i,config:l}){return-1===t?e.jsxs("div",{className:"text-center p-[16px] w-full h-full",style:{background:l?.style?.base?.backgroundColor},children:[e.jsxs("div",{className:"w-full",children:[e.jsx(a.Header,{noTitle:!0,resolvedConfig:l}),e.jsxs("h2",{style:{fontFamily:l?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:l?.style?.heading?.headingFontSize||"32px",color:l?.style?.heading?.headingColor||"#000",fontWeight:l?.style?.heading?.headingFontWeight||"normal"},children:["Make sure your face is fully visible"," "]}),n&&e.jsx("div",{className:"mb-4 flex items-center justify-center",style:{fontFamily:l?.style?.subheading?.subheadingFontFamily||"'Inter', sans-serif",fontSize:l?.style?.subheading?.subheadingFontSize||"14px",color:l?.style?.subheading?.subheadingColor||"#4b5563",fontWeight:l?.style?.subheading?.subheadingFontWeight||"normal"},children:"Loading video..."}),r&&e.jsx("div",{className:"mb-4 text-red-600",style:{fontFamily:l?.style?.subheading?.subheadingFontFamily||"'Inter', sans-serif",fontSize:l?.style?.subheading?.subheadingFontSize||"14px",color:"#ff0000",fontWeight:l?.style?.subheading?.subheadingFontWeight||"normal"},children:"Video failed to load. Please refresh the page or check your connection."}),!r&&e.jsx("div",{className:" w-[100px] mx-auto",children:e.jsx("video",{src:i===a.GenderType.Male?a.maleGlassesOffVideo:a.glassesOffVideo,autoPlay:!0,loop:!0,controls:!1,muted:!0,playsInline:!0,className:"h-full w-full object-contain border-none",onCanPlay:()=>o(!1),onLoadStart:()=>o(!0),onError:()=>s(!0),"aria-label":"Instructional video: Please remove your glasses before starting the scan."})})]}),c]}):e.jsx("div",{className:"text-center p-[16px] w-full h-full",style:{background:l?.style?.base?.backgroundColor},children:e.jsxs("div",{className:"w-full",children:[e.jsx(a.Header,{noTitle:!0,resolvedConfig:l}),e.jsx("h3",{className:"mb-[0.5rem]",style:{fontFamily:l?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:l?.style?.heading?.headingFontSize||"32px",color:l?.style?.heading?.headingColor||"#000",fontWeight:l?.style?.heading?.headingFontWeight||"normal"},children:a.directionMessages[t]}),e.jsxs("div",{className:"max-w-[400px] justify-center gap-1 mx-auto flex items-center",children:[e.jsx("div",{className:` w-[120px] overflow-hidden ${0===t?"opacity-100":"opacity-0 hidden"} `,children:e.jsx("video",{className:"h-full w-full object-contain border-none",muted:!0,loop:!0,autoPlay:!0,playsInline:!0,children:e.jsx("source",{src:i===a.GenderType.Male?a.FACE_SCAN_HEADSHOT.male.forward:a.FACE_SCAN_HEADSHOT.female.forward,type:"video/mp4"})})}),e.jsx("div",{className:` w-[120px] overflow-hidden ${1===t?"opacity-100":"opacity-0 hidden"} `,children:e.jsx("video",{className:"h-full w-full object-contain border-none",muted:!0,loop:!0,autoPlay:!0,playsInline:!0,children:e.jsx("source",{src:i===a.GenderType.Male?a.FACE_SCAN_HEADSHOT.male.left:a.FACE_SCAN_HEADSHOT.female.left,type:"video/mp4"})})}),e.jsx("div",{className:` w-[120px] overflow-hidden ${2===t?"opacity-100":"opacity-0 hidden"} `,children:e.jsx("video",{className:"h-full w-full object-contain border-none",muted:!0,loop:!0,autoPlay:!0,playsInline:!0,children:e.jsx("source",{src:i===a.GenderType.Male?a.FACE_SCAN_HEADSHOT.male.right:a.FACE_SCAN_HEADSHOT.female.right,type:"video/mp4"})})}),e.jsx("div",{className:` w-[120px] overflow-hidden ${3===t?"opacity-100":"opacity-0 hidden"} `,children:e.jsx("video",{className:"h-full w-full object-contain border-none",muted:!0,loop:!0,autoPlay:!0,playsInline:!0,children:e.jsx("source",{src:i===a.GenderType.Male?a.FACE_SCAN_HEADSHOT.male.smile:a.FACE_SCAN_HEADSHOT.female.smile,type:"video/mp4"})})})]})]})})}function d({resetScanState:t,loading:o,config:r}){return e.jsx("div",{className:"fixed top-[0] left-[0] z-[999] flex justify-center items-center w-full h-full",style:{background:r?.style?.base?.backgroundColor},children:e.jsxs("div",{className:"flex flex-col w-full items-center p-[1rem] rounded-lg ",children:[e.jsx(a.Header,{noTitle:!0,resolvedConfig:r}),e.jsxs("div",{className:"flex flex-col items-center w-full",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-800 ",style:{fontFamily:r?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:r?.style?.heading?.headingFontSize||"32px",color:r?.style?.heading?.headingColor||"#000",fontWeight:r?.style?.heading?.headingFontWeight||"normal"},children:"Your Scan Failed"}),e.jsx("p",{className:"mb-[1.5rem]",style:{fontFamily:r?.style?.subheading?.subheadingFontFamily||"'Inter', sans-serif",fontSize:r?.style?.subheading?.subheadingFontSize||"14px",color:r?.style?.subheading?.subheadingColor||"#4b5563",fontWeight:r?.style?.subheading?.subheadingFontWeight||"normal"},children:"Please click below to reset your scan."}),e.jsx(a.SpecificButton,{disabled:o,className:"w-full h-[45px] shadow-[0px_1px_2px_0px_#00000040] text-[16px]",buttonText:"Reset Scan",postfixIcon:e.jsx(n.ArrowRight,{}),buttonFunc:()=>t(),resolvedConfig:r})]})]})})}let u=null;function f({faceScanId:e,onValidPose:n,onScanComplete:r,onModelReady:c,onStartRecording:l,shopDomain:d}){const f=t.useRef(null),[h,g]=t.useState(0),[m,p]=t.useState(0),[y,S]=t.useState(!1),[x,b]=t.useState(!1),v=t.useRef(null),w=t.useRef(h),F=t.useRef(m),j=t.useRef([]),C=t.useRef(""),_=t.useRef(0),N=t.useRef(!1),I=t.useRef(0),T=/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,k=t.useMemo(()=>["Face front","Turn head fully left","Turn head fully right","Smile facing front"],[]),E=t.useMemo(()=>function(e,t){let a;return(...n)=>{a&&clearTimeout(a),a=setTimeout(()=>e(...n),t)}}(e=>{a.qo.capture(`${d}/face_scan_pose_detection`,e)},4e3),[d]),D=t.useCallback((t,a,n,o,r,s)=>{const c=Date.now();if(!(c-I.current<4e3)){I.current=c;try{const c=t[0]||[0,0,0],i=t[2]||[0,0,0],l=t[5]||[0,0,0],d=t[9]||[0,0,0],u=t[10]||[0,0,0],f=t.map(e=>e[2]).filter(e=>e>0),h=f.length>0?f.reduce((e,t)=>e+t,0)/f.length:0,g=a.map(e=>e[2]).filter(e=>e>0),m=g.length>0?g.reduce((e,t)=>e+t,0)/g.length:0,p=Math.abs(i[0]-l[0]),y=c[0]-l[0],S=i[0]-c[0];let x="frontal";1===n?x="left":2===n?x="right":3===n&&(x="frontal_smile");const b={faceScanId:e,stage:n,timestamp:(new Date).toISOString(),data:JSON.stringify({headValid:o,bodyInvalid:r,consecutiveValid:s,avgFaceScore:parseFloat(h.toFixed(3)),avgBodyScore:parseFloat(m.toFixed(3)),faceKeypointsDetected:f.length,bodyKeypointsDetected:g.length,eyeDistance:parseFloat(p.toFixed(2)),noseToRightRatio:parseFloat((y/p).toFixed(3)),noseToLeftRatio:parseFloat((S/p).toFixed(3)),noseScore:parseFloat(c[2].toFixed(3)),leftEyeScore:parseFloat(i[2].toFixed(3)),rightEyeScore:parseFloat(l[2].toFixed(3)),leftMouthScore:parseFloat(d[2].toFixed(3)),rightMouthScore:parseFloat(u[2].toFixed(3)),expectedPosition:x})};E(b)}catch(e){console.warn("Failed to track pose detection:",e)}}},[e,E]),A=()=>{a.qo.capture(`${d}/face_scan_detection_started`,{faceScanId:e,stage:w.current,timestamp:(new Date).toISOString(),stageName:k[w.current]}),setTimeout(()=>{b(!0)},1500)},M=async()=>{try{console.log("Initializing TensorFlow..."),await s.setBackend("webgl"),await s.ready(),console.log("TensorFlow initialized, loading models...");const e=await(async()=>{if(u)return u;const e=await i.createDetector(i.SupportedModels.BlazePose,{runtime:"tfjs",modelType:"full"}),t=document.createElement("canvas");t.width=a.videoConstraints.width,t.height=a.videoConstraints.height;const n=t.getContext("2d");n&&(n.fillStyle="black",n.fillRect(0,0,t.width,t.height));try{await e.estimatePoses(t)}catch(e){console.log(e,"at time of preload")}return u=e,e})();console.log(e,"detector"),f.current=e,console.log("Pose detection model loaded successfully"),S(!0),c?.()}catch(e){console.error("Error initializing face scan:",e)}};return t.useEffect(()=>(M(),()=>{(async()=>{try{S(!1),f.current&&(await f.current.dispose(),f.current=null)}catch(e){console.error("Error disposing resources:",e)}finally{g(0),p(0),w.current=0,F.current=0,j.current=[]}})()}),[]),t.useEffect(()=>{w.current=h},[h]),t.useEffect(()=>{F.current=m},[m]),{faceScanDetector:async(t,s)=>{if(f.current&&t.current&&y&&x)try{const c=await f.current.estimatePoses(t.current);if(c.length>0){const t=[],i=[];if(c[0].keypoints.forEach((e,a)=>{const n=e.score??0,o=[e.x??-1,e.y??-1,n];a<=10?t.push(o):i.push(o)}),s?.current){const e=s.current.getContext("2d"),{width:t,height:a}=s.current;if(e){e.clearRect(0,0,t,a);const n=Math.min(F.current/2,1),o=.35*a;e.beginPath(),e.strokeStyle="#00ff00",e.lineWidth=6,e.arc(t/2,a/2,o+10,-Math.PI/2,-Math.PI/2+2*n*Math.PI),e.stroke()}}const u=((e,t)=>{if(t[0][2]<.2||t[2][2]<.2||t[5][2]<.2)return!1;const a=.5*(t[10][1]+t[9][1])-.5*(t[5][1]+t[2][1]),n=(.5*(t[10][1]+t[9][1])-t[0][1])/a,o=n>.7||n<.3,r=Math.abs(t[2][1]-t[5][1])<.5*a&&Math.abs(t[9][1]-t[10][1])<.5*a,s=t[2][0]-t[5][0],c=t[0][0]-t[5][0],i=c>.4*s&&c<.6*s,l=c>.85*s,d=t[2][0]-t[0][0]>.85*s;switch(e){case 0:case 3:return!o&&r&&i;case 1:return!o&&r&&l;case 2:return!o&&r&&d;default:return!1}})(w.current,t),f=i.slice(2).filter(e=>e[2]>.7).length<=2;j.current.push(u&&f),j.current.length>10&&j.current.shift();if(j.current.filter(Boolean).length>=2){const e=F.current+1;p(e)}else p(Math.max(0,F.current-1));if(F.current>=2){n?.();const t=w.current+1;p(0),j.current=[],g(t),b(!1),(async()=>{if(await o.speechService.playAudio(`${a.voiceOverAssetsPath}face-scan-vos/Sound-effect.mp3`),a.qo.capture(`${d}/face_scan_detection_stage_completed`,{faceScanId:e,completedStage:w.current,nextStage:t,timestamp:(new Date).toISOString(),totalStages:4,stageName:k[w.current]}),1===t&&l&&l(),t>=4)r?.();else{let e=null;switch(t){case 1:e="Left.mp3";break;case 2:e="Right.mp3";break;case 3:e="Smile.mp3";break;default:e=null}e&&await o.speechService.playAudio(`${a.voiceOverAssetsPath}face-scan-vos/${e}`),A()}})()}D(t,i,w.current,u,f,F.current)}}catch(e){console.error("Pose detection error:",e)}},scanStage:h,setScanStage:g,consecutiveValid:m,isModelLoaded:y,resetScan:()=>{a.qo.capture(`${d}/face_scan_reset`,{faceScanId:e,stage:w.current,timestamp:(new Date).toISOString(),stageName:k[w.current],consecutiveValid:F.current}),g(0),p(0),b(!1),w.current=0,F.current=0,j.current=[],C.current="",_.current=0,N.current=!1,v.current&&(speechSynthesis.cancel(),v.current=null)},enableVoiceCommands:()=>{if(N.current=!0,T&&"speechSynthesis"in window){const e=new SpeechSynthesisUtterance("");e.volume=0,speechSynthesis.speak(e)}},startScanSequence:A,isScanningActive:x}}exports.FaceScan=({userDetails:r,onComplete:s,onScanError:c,onRetry:i,config:u})=>{const h=t.useRef(null),g=t.useRef(null),m=t.useRef(null),p=t.useRef([]),y=t.useRef(null),[S,x]=t.useState(!1),[b,v]=t.useState(!1),[w,F]=t.useState(!1),[j,C]=t.useState(!0),[_,N]=t.useState(!1),[I,T]=t.useState(!1),[k,E]=t.useState(!1),[D,A]=t.useState(a.generateUuid()),M=a.useLocalConfig(u),{email:R,gender:O,deviceFocalLength:P,shopDomain:z,callbackUrl:$}=r;console.log(p.current,"recoridng");const H=t.useMemo(()=>a.videoTypes.filter(e=>MediaRecorder.isTypeSupported(e)),[]),W=t.useCallback(()=>{console.log("Stopping recording..."),m.current&&"recording"===m.current.state&&m.current.stop(),m.current=null},[]),q=async()=>{if(x(!0),console.log("upload final video"),p.current){if(0===p.current.length)return console.error("No video data recorded"),E(!0),void x(!1);const e=new File(p.current,`${D}.webm`,{type:"video/webm"}),t=e.size,n=(t/1048576).toFixed(2),r=Math.round(t/1e4),s={video_size_mb:parseFloat(n),video_size_bytes:t,blob_count:p.current.length,estimated_duration_seconds:r},c=[{gender:O},{face_scan_id:D},{focal_length:`${P}`},{customer_store_url:z},{scan_type:"face_scan"},{callback_url:$}];console.log(c,"metadata"),console.log(s),a.handleScanTimeCapture({eventName:`${z}/face_scan_meta_data`,faceScanId:D,email:R,data:JSON.stringify({metaData:c,videoData:s})});const i=Date.now();a.handleScanTimeCapture({eventName:`${z}/face_scan_upload_start`,faceScanId:D,email:R,startTime:i});try{const t=await o.swan.fileUpload.faceScanFileUploader({file:e,objectKey:D,email:R,arrayMetaData:c,contentType:e.type}),n=Date.now(),r=n-i;a.handleScanTimeCapture({eventName:`${z}/face_scan_upload_complete`,faceScanId:D,email:R,completionTime:n,uploadDuration:r}),console.log("✅ Upload successful",t),o.swan.measurement.handlFaceScaneSocket({faceScanId:D,onOpen:()=>{a.handleWebSocketCapture({eventName:`${z}/webSocket`,faceScanID:D,connection:"open",type:"faceScan_recommendation",email:R}),console.log("websocket connect open")},onError:e=>{a.handleWebSocketCapture({eventName:`${z}/webSocket`,faceScanID:D,connection:"error",type:"faceScan_recommendation",email:R}),Q(e)},onSuccess:e=>{a.handleWebSocketCapture({eventName:`${z}/webSocket`,faceScanID:D,connection:"success",type:"faceScan_recommendation",email:R}),Z(e)},onClose:()=>{console.log("websocket connect close"),a.handleWebSocketCapture({eventName:`${z}/webSocket`,faceScanID:D,connection:"close",type:"faceScan_recommendation",email:R})}})}catch(e){Q(e)}}},L=t.useCallback(()=>{console.log("Starting recording for stages 1-3...");const e=h.current?.srcObject;if(!e)return;const t=e.getVideoTracks()[0].getSettings(),{width:n=a.videoConstraints.width,height:o=a.videoConstraints.height}=t,r=document.createElement("canvas"),s=r.getContext("2d");n>o?(r.width=o,r.height=n):(r.width=n,r.height=o);const c=document.createElement("video");c.srcObject=e,c.muted=!0,c.playsInline=!0,c.play();const i=()=>{n>o?(s?.save(),s?.translate(r.width,0),s?.rotate(Math.PI/2),s?.drawImage(c,0,0,o,n),s?.restore()):s?.drawImage(c,0,0,n,o),requestAnimationFrame(i)};i();const l=r.captureStream(30),d=H.length>0?{mimeType:H[0]}:{};let u;try{u=new MediaRecorder(l,d)}catch(e){return console.error("MediaRecorder init failed:",e),E(!0),void x(!1)}p.current=[],u.ondataavailable=e=>{e?.data&&e.data.size>0&&p.current&&p.current.push(e.data)},u.onstop=()=>{console.log("Recording stopped, total blobs:",p?.current?.length),q()},u.start(100),m.current=u,console.log("Recording started successfully (portrait normalized)")},[H,q]),{faceScanDetector:V,scanStage:U,setScanStage:B,resetScan:G,isModelLoaded:J,startScanSequence:K}=f({faceScanId:D,shopDomain:z,onScanComplete:()=>{W()},onModelReady:()=>{v(!0)},onStartRecording:()=>{console.log("Stage 0 completed - starting recording for stages 1-3"),L()}}),X=t.useCallback(()=>{J&&(B(0),o.speechService.playAudio(`${a.voiceOverAssetsPath}face-scan-vos/Face-forward.mp3`),setTimeout(()=>{F(!0),setTimeout(()=>{K()},200)},200))},[B,F,K,J]),Y=t.useCallback(()=>{F(!1),C(!0),W(),G(),i?.(),p.current=[],m.current&&(m.current=null),E(!1),B(-1),A(a.generateUuid()),h.current&&y.current&&(h.current.srcObject=y.current,console.log("Camera stream restored after reset"))},[B,F,C,W,G,A]),Q=e=>{console.log(e,"ws error"),c?.(e),E(!0),x(!1),C(!1),a.handleScanTimeCapture({eventName:`${z}/faceScan`,faceScanId:D,status:"failed",email:R,data:JSON.stringify(e)})},Z=e=>{console.log(e,"ws success"),e&&"intermediate"===e?.resultType&&a.handleScanTimeCapture({eventName:`${z}/faceScan_success/intermediate`,faceScanId:D,status:"success",email:R,data:JSON.stringify(e)}),s?.(e)};t.useEffect(()=>(navigator.mediaDevices.getUserMedia&&navigator.mediaDevices.getUserMedia({video:a.videoConstraints}).then(e=>{y.current=e,h.current&&(h.current.srcObject=e,console.log("Webcam initialized"))}).catch(e=>console.error("Error accessing webcam:",e)),()=>{y.current&&y.current.getTracks().forEach(e=>e.stop())}),[]),t.useEffect(()=>{if(!b||!w)return;const e=setInterval(()=>{V(h,g)},500);return()=>clearInterval(e)},[V,b,w]);return console.log("Model ready:",b,"Has error:",k,"Is scanning:",w,"showLoader",S),t.useEffect(()=>{B(-1),a.qo.init(a.posthogPublicKey,{api_host:a.posthogPublicHost}),a.qo.capture("$pageview")},[]),e.jsxs(e.Fragment,{children:[e.jsx("audio",{id:"audioElement",crossOrigin:"anonymous",preload:"auto",style:{position:"absolute",zIndex:-99999},src:""}),S&&!k&&e.jsx("div",{className:"fixed z-[9] w-full h-full",style:{background:M?.style?.base?.primaryColor},children:e.jsx(o.LoadingScreen,{})}),e.jsx("div",{className:"h-full flex-col relative w-full flex justify-center items-center text-center rounded-t-[20px]",style:{background:M?.style?.base?.backgroundColor},children:e.jsx("div",{className:"flex-1 w-full max-w-md overflow-hidden",children:e.jsxs("div",{className:"w-full h-full",children:[e.jsx("video",{ref:h,autoPlay:!0,playsInline:!0,muted:!0,width:a.videoConstraints.width,height:a.videoConstraints.height,className:"w-full h-full object-cover fixed left-0 top-0 z-0",style:{transform:"scaleX(-1)"}}),e.jsx("canvas",{ref:g,width:a.videoConstraints.width,height:a.videoConstraints.height,style:{transform:"scaleX(-1)",opacity:"0"}})]})})}),!S&&k&&e.jsx(d,{loading:S,resetScanState:Y,config:M}),j&&!k&&!S&&e.jsx(o.Drawer,{open:!0,className:"face-scan-small camera-draw",anchor:"bottom",onClose:(e,t)=>{},hideBackdrop:!0,children:e.jsx(l,{stage:U,videoLoading:_,setVideoLoading:N,videoError:I,setVideoError:T,gender:O,config:M,children:e.jsx("div",{className:"flex justify-center w-full p-[1rem]",children:e.jsx(a.SpecificButton,{disabled:S||!J,className:"!w-[60px] !h-[35px] !py-0 !px-0",buttonText:w?"Reset":J?"Start":"Loading...",postfixIcon:w?e.jsx(n.ArrowRight,{}):"",buttonFunc:w?Y:X,resolvedConfig:M})})})})]})};
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),a=require("./Header-DyVbEgG9.js"),n=require("./arrow-right-CC1_17IM.js"),o=require("./LoadingScreen-DTHZFIRE.js"),r=require("@tensorflow-models/pose-detection"),s=require("@tensorflow/tfjs");function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}}),t.default=e,Object.freeze(t)}require("react-dom");var i=c(r);function l({stage:t,videoLoading:n,setVideoLoading:o,videoError:r,setVideoError:s,children:c,gender:i,config:l}){return-1===t?e.jsxs("div",{className:"text-center p-[16px] w-full h-full",style:{background:l?.style?.base?.backgroundColor},children:[e.jsxs("div",{className:"w-full",children:[e.jsx(a.Header,{noTitle:!0,resolvedConfig:l}),e.jsxs("h2",{style:{fontFamily:l?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:l?.style?.heading?.headingFontSize||"32px",color:l?.style?.heading?.headingColor||"#000",fontWeight:l?.style?.heading?.headingFontWeight||"normal"},children:["Make sure your face is fully visible"," "]}),n&&e.jsx("div",{className:"mb-4 flex items-center justify-center",style:{fontFamily:l?.style?.subheading?.subheadingFontFamily||"'Inter', sans-serif",fontSize:l?.style?.subheading?.subheadingFontSize||"14px",color:l?.style?.subheading?.subheadingColor||"#4b5563",fontWeight:l?.style?.subheading?.subheadingFontWeight||"normal"},children:"Loading video..."}),r&&e.jsx("div",{className:"mb-4 text-red-600",style:{fontFamily:l?.style?.subheading?.subheadingFontFamily||"'Inter', sans-serif",fontSize:l?.style?.subheading?.subheadingFontSize||"14px",color:"#ff0000",fontWeight:l?.style?.subheading?.subheadingFontWeight||"normal"},children:"Video failed to load. Please refresh the page or check your connection."}),!r&&e.jsx("div",{className:" w-[100px] mx-auto",children:e.jsx("video",{src:i===a.GenderType.Male?a.maleGlassesOffVideo:a.glassesOffVideo,autoPlay:!0,loop:!0,controls:!1,muted:!0,playsInline:!0,className:"h-full w-full object-contain border-none",onCanPlay:()=>o(!1),onLoadStart:()=>o(!0),onError:()=>s(!0),"aria-label":"Instructional video: Please remove your glasses before starting the scan."})})]}),c]}):e.jsx("div",{className:"text-center p-[16px] w-full h-full",style:{background:l?.style?.base?.backgroundColor},children:e.jsxs("div",{className:"w-full",children:[e.jsx(a.Header,{noTitle:!0,resolvedConfig:l}),e.jsx("h3",{className:"mb-[0.5rem]",style:{fontFamily:l?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:l?.style?.heading?.headingFontSize||"32px",color:l?.style?.heading?.headingColor||"#000",fontWeight:l?.style?.heading?.headingFontWeight||"normal"},children:a.directionMessages[t]}),e.jsxs("div",{className:"max-w-[400px] justify-center gap-1 mx-auto flex items-center",children:[e.jsx("div",{className:` w-[120px] overflow-hidden ${0===t?"opacity-100":"opacity-0 hidden"} `,children:e.jsx("video",{className:"h-full w-full object-contain border-none",muted:!0,loop:!0,autoPlay:!0,playsInline:!0,children:e.jsx("source",{src:i===a.GenderType.Male?a.FACE_SCAN_HEADSHOT.male.forward:a.FACE_SCAN_HEADSHOT.female.forward,type:"video/mp4"})})}),e.jsx("div",{className:` w-[120px] overflow-hidden ${1===t?"opacity-100":"opacity-0 hidden"} `,children:e.jsx("video",{className:"h-full w-full object-contain border-none",muted:!0,loop:!0,autoPlay:!0,playsInline:!0,children:e.jsx("source",{src:i===a.GenderType.Male?a.FACE_SCAN_HEADSHOT.male.left:a.FACE_SCAN_HEADSHOT.female.left,type:"video/mp4"})})}),e.jsx("div",{className:` w-[120px] overflow-hidden ${2===t?"opacity-100":"opacity-0 hidden"} `,children:e.jsx("video",{className:"h-full w-full object-contain border-none",muted:!0,loop:!0,autoPlay:!0,playsInline:!0,children:e.jsx("source",{src:i===a.GenderType.Male?a.FACE_SCAN_HEADSHOT.male.right:a.FACE_SCAN_HEADSHOT.female.right,type:"video/mp4"})})}),e.jsx("div",{className:` w-[120px] overflow-hidden ${3===t?"opacity-100":"opacity-0 hidden"} `,children:e.jsx("video",{className:"h-full w-full object-contain border-none",muted:!0,loop:!0,autoPlay:!0,playsInline:!0,children:e.jsx("source",{src:i===a.GenderType.Male?a.FACE_SCAN_HEADSHOT.male.smile:a.FACE_SCAN_HEADSHOT.female.smile,type:"video/mp4"})})})]})]})})}function d({resetScanState:t,loading:o,config:r}){return e.jsx("div",{className:"fixed top-[0] left-[0] z-[999] flex justify-center items-center w-full h-full",style:{background:r?.style?.base?.backgroundColor},children:e.jsxs("div",{className:"flex flex-col w-full items-center p-[1rem] rounded-lg ",children:[e.jsx(a.Header,{noTitle:!0,resolvedConfig:r}),e.jsxs("div",{className:"flex flex-col items-center w-full",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-800 ",style:{fontFamily:r?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:r?.style?.heading?.headingFontSize||"32px",color:r?.style?.heading?.headingColor||"#000",fontWeight:r?.style?.heading?.headingFontWeight||"normal"},children:"Your Scan Failed"}),e.jsx("p",{className:"mb-[1.5rem]",style:{fontFamily:r?.style?.subheading?.subheadingFontFamily||"'Inter', sans-serif",fontSize:r?.style?.subheading?.subheadingFontSize||"14px",color:r?.style?.subheading?.subheadingColor||"#4b5563",fontWeight:r?.style?.subheading?.subheadingFontWeight||"normal"},children:"Please click below to reset your scan."}),e.jsx(a.SpecificButton,{disabled:o,className:"w-full h-[45px] shadow-[0px_1px_2px_0px_#00000040] text-[16px]",buttonText:"Reset Scan",postfixIcon:e.jsx(n.ArrowRight,{}),buttonFunc:()=>t(),resolvedConfig:r})]})]})})}let u=null;function f({faceScanId:e,onValidPose:n,onScanComplete:r,onModelReady:c,onStartRecording:l,shopDomain:d}){const f=t.useRef(null),[h,g]=t.useState(0),[m,p]=t.useState(0),[y,S]=t.useState(!1),[x,b]=t.useState(!1),v=t.useRef(null),w=t.useRef(h),F=t.useRef(m),j=t.useRef([]),C=t.useRef(""),_=t.useRef(0),N=t.useRef(!1),I=t.useRef(0),T=/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,k=t.useMemo(()=>["Face front","Turn head fully left","Turn head fully right","Smile facing front"],[]),E=t.useMemo(()=>function(e,t){let a;return(...n)=>{a&&clearTimeout(a),a=setTimeout(()=>e(...n),t)}}(e=>{a.qo.capture(`${d}/face_scan_pose_detection`,e)},4e3),[d]),D=t.useCallback((t,a,n,o,r,s)=>{const c=Date.now();if(!(c-I.current<4e3)){I.current=c;try{const c=t[0]||[0,0,0],i=t[2]||[0,0,0],l=t[5]||[0,0,0],d=t[9]||[0,0,0],u=t[10]||[0,0,0],f=t.map(e=>e[2]).filter(e=>e>0),h=f.length>0?f.reduce((e,t)=>e+t,0)/f.length:0,g=a.map(e=>e[2]).filter(e=>e>0),m=g.length>0?g.reduce((e,t)=>e+t,0)/g.length:0,p=Math.abs(i[0]-l[0]),y=c[0]-l[0],S=i[0]-c[0];let x="frontal";1===n?x="left":2===n?x="right":3===n&&(x="frontal_smile");const b={faceScanId:e,stage:n,timestamp:(new Date).toISOString(),data:JSON.stringify({headValid:o,bodyInvalid:r,consecutiveValid:s,avgFaceScore:parseFloat(h.toFixed(3)),avgBodyScore:parseFloat(m.toFixed(3)),faceKeypointsDetected:f.length,bodyKeypointsDetected:g.length,eyeDistance:parseFloat(p.toFixed(2)),noseToRightRatio:parseFloat((y/p).toFixed(3)),noseToLeftRatio:parseFloat((S/p).toFixed(3)),noseScore:parseFloat(c[2].toFixed(3)),leftEyeScore:parseFloat(i[2].toFixed(3)),rightEyeScore:parseFloat(l[2].toFixed(3)),leftMouthScore:parseFloat(d[2].toFixed(3)),rightMouthScore:parseFloat(u[2].toFixed(3)),expectedPosition:x})};E(b)}catch(e){console.warn("Failed to track pose detection:",e)}}},[e,E]),A=()=>{a.qo.capture(`${d}/face_scan_detection_started`,{faceScanId:e,stage:w.current,timestamp:(new Date).toISOString(),stageName:k[w.current]}),setTimeout(()=>{b(!0)},1500)},M=async()=>{try{console.log("Initializing TensorFlow..."),await s.setBackend("webgl"),await s.ready(),console.log("TensorFlow initialized, loading models...");const e=await(async()=>{if(u)return u;const e=await i.createDetector(i.SupportedModels.BlazePose,{runtime:"tfjs",modelType:"full"}),t=document.createElement("canvas");t.width=a.videoConstraints.width,t.height=a.videoConstraints.height;const n=t.getContext("2d");n&&(n.fillStyle="black",n.fillRect(0,0,t.width,t.height));try{await e.estimatePoses(t)}catch(e){console.log(e,"at time of preload")}return u=e,e})();console.log(e,"detector"),f.current=e,console.log("Pose detection model loaded successfully"),S(!0),c?.()}catch(e){console.error("Error initializing face scan:",e)}};return t.useEffect(()=>(M(),()=>{(async()=>{try{S(!1),f.current&&(await f.current.dispose(),f.current=null)}catch(e){console.error("Error disposing resources:",e)}finally{g(0),p(0),w.current=0,F.current=0,j.current=[]}})()}),[]),t.useEffect(()=>{w.current=h},[h]),t.useEffect(()=>{F.current=m},[m]),{faceScanDetector:async(t,s)=>{if(f.current&&t.current&&y&&x)try{const c=await f.current.estimatePoses(t.current);if(c.length>0){const t=[],i=[];if(c[0].keypoints.forEach((e,a)=>{const n=e.score??0,o=[e.x??-1,e.y??-1,n];a<=10?t.push(o):i.push(o)}),s?.current){const e=s.current.getContext("2d"),{width:t,height:a}=s.current;if(e){e.clearRect(0,0,t,a);const n=Math.min(F.current/2,1),o=.35*a;e.beginPath(),e.strokeStyle="#00ff00",e.lineWidth=6,e.arc(t/2,a/2,o+10,-Math.PI/2,-Math.PI/2+2*n*Math.PI),e.stroke()}}const u=((e,t)=>{if(t[0][2]<.2||t[2][2]<.2||t[5][2]<.2)return!1;const a=.5*(t[10][1]+t[9][1])-.5*(t[5][1]+t[2][1]),n=(.5*(t[10][1]+t[9][1])-t[0][1])/a,o=n>.7||n<.3,r=Math.abs(t[2][1]-t[5][1])<.5*a&&Math.abs(t[9][1]-t[10][1])<.5*a,s=t[2][0]-t[5][0],c=t[0][0]-t[5][0],i=c>.4*s&&c<.6*s,l=c>.85*s,d=t[2][0]-t[0][0]>.85*s;switch(e){case 0:case 3:return!o&&r&&i;case 1:return!o&&r&&l;case 2:return!o&&r&&d;default:return!1}})(w.current,t),f=i.slice(2).filter(e=>e[2]>.7).length<=2;j.current.push(u&&f),j.current.length>10&&j.current.shift();if(j.current.filter(Boolean).length>=2){const e=F.current+1;p(e)}else p(Math.max(0,F.current-1));if(F.current>=2){n?.();const t=w.current+1;p(0),j.current=[],g(t),b(!1),(async()=>{if(await o.speechService.playAudio(`${a.voiceOverAssetsPath}face-scan-vos/Sound-effect.mp3`),a.qo.capture(`${d}/face_scan_detection_stage_completed`,{faceScanId:e,completedStage:w.current,nextStage:t,timestamp:(new Date).toISOString(),totalStages:4,stageName:k[w.current]}),1===t&&l&&l(),t>=4)r?.();else{let e=null;switch(t){case 1:e="Left.mp3";break;case 2:e="Right.mp3";break;case 3:e="Smile.mp3";break;default:e=null}e&&await o.speechService.playAudio(`${a.voiceOverAssetsPath}face-scan-vos/${e}`),A()}})()}D(t,i,w.current,u,f,F.current)}}catch(e){console.error("Pose detection error:",e)}},scanStage:h,setScanStage:g,consecutiveValid:m,isModelLoaded:y,resetScan:()=>{a.qo.capture(`${d}/face_scan_reset`,{faceScanId:e,stage:w.current,timestamp:(new Date).toISOString(),stageName:k[w.current],consecutiveValid:F.current}),g(0),p(0),b(!1),w.current=0,F.current=0,j.current=[],C.current="",_.current=0,N.current=!1,v.current&&(speechSynthesis.cancel(),v.current=null)},enableVoiceCommands:()=>{if(N.current=!0,T&&"speechSynthesis"in window){const e=new SpeechSynthesisUtterance("");e.volume=0,speechSynthesis.speak(e)}},startScanSequence:A,isScanningActive:x}}exports.FaceScan=({userDetails:r,onComplete:s,onScanError:c,onRetry:i,config:u})=>{const h=t.useRef(null),g=t.useRef(null),m=t.useRef(null),p=t.useRef([]),y=t.useRef(null),[S,x]=t.useState(!1),[b,v]=t.useState(!1),[w,F]=t.useState(!1),[j,C]=t.useState(!0),[_,N]=t.useState(!1),[I,T]=t.useState(!1),[k,E]=t.useState(!1),[D,A]=t.useState(a.generateUuid()),M=a.useLocalConfig(u),{email:R,gender:O,deviceFocalLength:P,shopDomain:z,callbackUrl:$}=r;console.log(p.current,"recoridng");const H=t.useMemo(()=>a.videoTypes.filter(e=>MediaRecorder.isTypeSupported(e)),[]),W=t.useCallback(()=>{console.log("Stopping recording..."),m.current&&"recording"===m.current.state&&m.current.stop(),m.current=null},[]),q=async()=>{if(x(!0),console.log("upload final video"),p.current){if(0===p.current.length)return console.error("No video data recorded"),E(!0),void x(!1);const e=new File(p.current,`${D}.webm`,{type:"video/webm"}),t=e.size,n=(t/1048576).toFixed(2),r=Math.round(t/1e4),s={video_size_mb:parseFloat(n),video_size_bytes:t,blob_count:p.current.length,estimated_duration_seconds:r},c=[{gender:O},{face_scan_id:D},{focal_length:`${P}`},{customer_store_url:z},{scan_type:"face_scan"},{callback_url:$}];console.log(c,"metadata"),console.log(s),a.handleScanTimeCapture({eventName:`${z}/face_scan_meta_data`,faceScanId:D,email:R,data:JSON.stringify({metaData:c,videoData:s})});const i=Date.now();a.handleScanTimeCapture({eventName:`${z}/face_scan_upload_start`,faceScanId:D,email:R,startTime:i});try{const t=await o.swan.fileUpload.faceScanFileUploader({file:e,objectKey:D,email:R,arrayMetaData:c,contentType:e.type}),n=Date.now(),r=n-i;a.handleScanTimeCapture({eventName:`${z}/face_scan_upload_complete`,faceScanId:D,email:R,completionTime:n,uploadDuration:r}),console.log("✅ Upload successful",t),o.swan.measurement.handlFaceScaneSocket({faceScanId:D,onOpen:()=>{a.handleWebSocketCapture({eventName:`${z}/webSocket`,faceScanID:D,connection:"open",type:"faceScan_recommendation",email:R}),console.log("websocket connect open")},onError:e=>{a.handleWebSocketCapture({eventName:`${z}/webSocket`,faceScanID:D,connection:"error",type:"faceScan_recommendation",email:R}),Q(e)},onSuccess:e=>{a.handleWebSocketCapture({eventName:`${z}/webSocket`,faceScanID:D,connection:"success",type:"faceScan_recommendation",email:R}),Z(e)},onClose:()=>{console.log("websocket connect close"),a.handleWebSocketCapture({eventName:`${z}/webSocket`,faceScanID:D,connection:"close",type:"faceScan_recommendation",email:R})}})}catch(e){Q(e)}}},L=t.useCallback(()=>{console.log("Starting recording for stages 1-3...");const e=h.current?.srcObject;if(!e)return;const t=e.getVideoTracks()[0].getSettings(),{width:n=a.videoConstraints.width,height:o=a.videoConstraints.height}=t,r=document.createElement("canvas"),s=r.getContext("2d");n>o?(r.width=o,r.height=n):(r.width=n,r.height=o);const c=document.createElement("video");c.srcObject=e,c.muted=!0,c.playsInline=!0,c.play();const i=()=>{n>o?(s?.save(),s?.translate(r.width,0),s?.rotate(Math.PI/2),s?.drawImage(c,0,0,o,n),s?.restore()):s?.drawImage(c,0,0,n,o),requestAnimationFrame(i)};i();const l=r.captureStream(30),d=H.length>0?{mimeType:H[0]}:{};let u;try{u=new MediaRecorder(l,d)}catch(e){return console.error("MediaRecorder init failed:",e),E(!0),void x(!1)}p.current=[],u.ondataavailable=e=>{e?.data&&e.data.size>0&&p.current&&p.current.push(e.data)},u.onstop=()=>{console.log("Recording stopped, total blobs:",p?.current?.length),q()},u.start(100),m.current=u,console.log("Recording started successfully (portrait normalized)")},[H,q]),{faceScanDetector:V,scanStage:U,setScanStage:B,resetScan:G,isModelLoaded:J,startScanSequence:K}=f({faceScanId:D,shopDomain:z,onScanComplete:()=>{W()},onModelReady:()=>{v(!0)},onStartRecording:()=>{console.log("Stage 0 completed - starting recording for stages 1-3"),L()}}),X=t.useCallback(()=>{J&&(B(0),o.speechService.playAudio(`${a.voiceOverAssetsPath}face-scan-vos/Face-forward.mp3`),setTimeout(()=>{F(!0),setTimeout(()=>{K()},200)},200))},[B,F,K,J]),Y=t.useCallback(()=>{F(!1),C(!0),W(),G(),i?.(),p.current=[],m.current&&(m.current=null),E(!1),B(-1),A(a.generateUuid()),h.current&&y.current&&(h.current.srcObject=y.current,console.log("Camera stream restored after reset"))},[B,F,C,W,G,A]),Q=e=>{console.log(e,"ws error"),c?.(e),E(!0),x(!1),C(!1),a.handleScanTimeCapture({eventName:`${z}/faceScan`,faceScanId:D,status:"failed",email:R,data:JSON.stringify(e)})},Z=e=>{console.log(e,"ws success"),e&&"intermediate"===e?.resultType&&a.handleScanTimeCapture({eventName:`${z}/faceScan_success/intermediate`,faceScanId:D,status:"success",email:R,data:JSON.stringify(e)}),s?.(e)};t.useEffect(()=>(navigator.mediaDevices.getUserMedia&&navigator.mediaDevices.getUserMedia({video:a.videoConstraints}).then(e=>{y.current=e,h.current&&(h.current.srcObject=e,console.log("Webcam initialized"))}).catch(e=>console.error("Error accessing webcam:",e)),()=>{y.current&&y.current.getTracks().forEach(e=>e.stop())}),[]),t.useEffect(()=>{if(!b||!w)return;const e=setInterval(()=>{V(h,g)},500);return()=>clearInterval(e)},[V,b,w]);return console.log("Model ready:",b,"Has error:",k,"Is scanning:",w,"showLoader",S),t.useEffect(()=>{B(-1),a.qo.init(a.posthogPublicKey,{api_host:a.posthogPublicHost}),a.qo.capture("$pageview")},[]),e.jsxs(e.Fragment,{children:[e.jsx("audio",{id:"audioElement",crossOrigin:"anonymous",preload:"auto",style:{position:"absolute",zIndex:-99999},src:""}),S&&!k&&e.jsx("div",{className:"fixed z-[9] w-full h-full",style:{background:M?.style?.base?.primaryColor},children:e.jsx(o.LoadingScreen,{})}),e.jsx("div",{className:"h-full flex-col relative w-full flex justify-center items-center text-center rounded-t-[20px]",style:{background:M?.style?.base?.backgroundColor},children:e.jsx("div",{className:"flex-1 w-full max-w-md overflow-hidden",children:e.jsxs("div",{className:"w-full h-full",children:[e.jsx("video",{ref:h,autoPlay:!0,playsInline:!0,muted:!0,width:a.videoConstraints.width,height:a.videoConstraints.height,className:"w-full h-full object-cover fixed left-0 top-0 z-0",style:{transform:"scaleX(-1)"}}),e.jsx("canvas",{ref:g,width:a.videoConstraints.width,height:a.videoConstraints.height,style:{transform:"scaleX(-1)",opacity:"0"}})]})})}),!S&&k&&e.jsx(d,{loading:S,resetScanState:Y,config:M}),j&&!k&&!S&&e.jsx(o.Drawer,{open:!0,className:"face-scan-small camera-draw",anchor:"bottom",onClose:(e,t)=>{},hideBackdrop:!0,children:e.jsx(l,{stage:U,videoLoading:_,setVideoLoading:N,videoError:I,setVideoError:T,gender:O,config:M,children:e.jsx("div",{className:"flex justify-center w-full p-[1rem]",children:e.jsx(a.SpecificButton,{disabled:S||!J,className:"!w-[60px] !h-[35px] !py-0 !px-0",buttonText:w?"Reset":J?"Start":"Loading...",postfixIcon:w?e.jsx(n.ArrowRight,{}):"",buttonFunc:w?Y:X,resolvedConfig:M})})})})]})};
|
|
2
2
|
//# sourceMappingURL=faceScan.js.map
|