@sekyro/elements 0.0.0-stage → 0.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/LICENSE +29 -0
- package/README.md +247 -2
- package/custom-elements.json +355 -0
- package/dist/cdn/chunks/background-monitor-GCMNCJMG-UXYQ5GX7.js +1 -0
- package/dist/cdn/chunks/camera-trait-HVV5ZEDI-JB4HN6S3.js +1 -0
- package/dist/cdn/chunks/capture-session-doc-ELX6VK6Z-SDM3ILRA.js +1 -0
- package/dist/cdn/chunks/chunk-36WGD7QV.js +14 -0
- package/dist/cdn/chunks/chunk-4FHWXBOB.js +1 -0
- package/dist/cdn/chunks/chunk-5FLR7RPJ.js +1 -0
- package/dist/cdn/chunks/chunk-6H22RNSK.js +1 -0
- package/dist/cdn/chunks/chunk-7HJH5Q4M.js +1 -0
- package/dist/cdn/chunks/chunk-7Y73DZJB.js +1 -0
- package/dist/cdn/chunks/chunk-BF6SE2AC.js +1 -0
- package/dist/cdn/chunks/chunk-BZ37D4FR.js +1 -0
- package/dist/cdn/chunks/chunk-CFJJD6T2.js +1 -0
- package/dist/cdn/chunks/chunk-CMDITVXF.js +1 -0
- package/dist/cdn/chunks/chunk-CMS5FVGM.js +1 -0
- package/dist/cdn/chunks/chunk-CYGAKCKG.js +1 -0
- package/dist/cdn/chunks/chunk-D334IAZJ.js +1 -0
- package/dist/cdn/chunks/chunk-ET7NCKUV.js +1 -0
- package/dist/cdn/chunks/chunk-FAIDO3QL.js +1 -0
- package/dist/cdn/chunks/chunk-FCTRNWRU.js +1 -0
- package/dist/cdn/chunks/chunk-FDWO4KXK.js +1 -0
- package/dist/cdn/chunks/chunk-FEWP7HBJ.js +1 -0
- package/dist/cdn/chunks/chunk-HDJ6JFXX.js +1 -0
- package/dist/cdn/chunks/chunk-HQF66Y6S.js +1 -0
- package/dist/cdn/chunks/chunk-IBOJTLL7.js +1 -0
- package/dist/cdn/chunks/chunk-JM3CYFFZ.js +1 -0
- package/dist/cdn/chunks/chunk-JOZCJGRV.js +1 -0
- package/dist/cdn/chunks/chunk-KLE75SX4.js +1 -0
- package/dist/cdn/chunks/chunk-LYYAVERP.js +1 -0
- package/dist/cdn/chunks/chunk-PUO2VWDE.js +33 -0
- package/dist/cdn/chunks/chunk-RK4HVNRS.js +1 -0
- package/dist/cdn/chunks/chunk-RRLXNT33.js +1 -0
- package/dist/cdn/chunks/chunk-SK6UAYX2.js +1 -0
- package/dist/cdn/chunks/chunk-T4M2J44L.js +1 -0
- package/dist/cdn/chunks/chunk-U3UDWPBG.js +1 -0
- package/dist/cdn/chunks/chunk-UZWMCNZI.js +1 -0
- package/dist/cdn/chunks/chunk-X3BGM3B2.js +1 -0
- package/dist/cdn/chunks/chunk-X767DBO7.js +1 -0
- package/dist/cdn/chunks/chunk-YWPZG2MZ.js +25 -0
- package/dist/cdn/chunks/chunk-ZIC5GEH2.js +1 -0
- package/dist/cdn/chunks/chunk-ZKLSZJFN.js +1 -0
- package/dist/cdn/chunks/clip-inspect-HZ7N2YOP-DCDXB76T.js +1 -0
- package/dist/cdn/chunks/create-document-capture-UHZJUZHC-YYZNCSW6.js +1 -0
- package/dist/cdn/chunks/create-portrait-capture-VRZZOMJS-I4FBRNBP.js +1 -0
- package/dist/cdn/chunks/detector-scanic-F3Y5X3DF-FGVR4NEM.js +1 -0
- package/dist/cdn/chunks/document-capture-view-JE6IX4IE-2454PW6Z.js +1 -0
- package/dist/cdn/chunks/eid-view-RZS6MLT6-35VSHTV3.js +1 -0
- package/dist/cdn/chunks/email-otp-view-WUQ5OGDD-YDSUKAN2.js +1 -0
- package/dist/cdn/chunks/flow-views-5L7JF3MM-M6C3RXSX.js +1 -0
- package/dist/cdn/chunks/icao-gate-SO6YJ7RV-MPW6W3QN.js +1 -0
- package/dist/cdn/chunks/icao-tuning-DCZCMCEQ-ZQSK7ZOV.js +1 -0
- package/dist/cdn/chunks/keyframe-rank-R4NPQGN3-VRURE6OQ.js +1 -0
- package/dist/cdn/chunks/landmarker-3BBP3RBY-DDXMOLGK.js +1 -0
- package/dist/cdn/chunks/mrz-band-DCXFWDBD-OPMO6HYS.js +1 -0
- package/dist/cdn/chunks/overlay-de-JQ2FDZBA-HLFTXIF6.js +1 -0
- package/dist/cdn/chunks/overlay-es-WDYRSRHH-UXHTYCHD.js +1 -0
- package/dist/cdn/chunks/overlay-pt-AQMDWDWX-BD7TO6Y4.js +1 -0
- package/dist/cdn/chunks/plan-runner-ZHOYMRAO-RDS523K5.js +1 -0
- package/dist/cdn/chunks/portrait-capture-view-GQIBQY4U-TJUYRCTI.js +1 -0
- package/dist/cdn/chunks/portrait-review-view-XOQYQNU7-LPONGGFW.js +1 -0
- package/dist/cdn/chunks/print-4WOMNRBE-DNXJ7ERA.js +11 -0
- package/dist/cdn/chunks/scanic-ml-stub-XPNKT2N3-YSXFN7KY.js +1 -0
- package/dist/cdn/chunks/segmenter-3CVPTZMM-WGI6XGWN.js +1 -0
- package/dist/cdn/chunks/turnstile-N4K4U2AI-SLP55XAA.js +1 -0
- package/dist/cdn/chunks/upload-file-C4MFKLT3-DXCNEDXP.js +1 -0
- package/dist/cdn/chunks/vision_bundle-WBHR7TEE.js +41 -0
- package/dist/cdn/define.js +1 -0
- package/dist/cdn/index.js +1 -0
- package/dist/chunk-6NQ7EWA4.js +1 -0
- package/dist/chunk-72JW2LCH.js +25 -0
- package/dist/chunk-7URX73UH.js +1 -0
- package/dist/chunk-AGPBG22V.js +1 -0
- package/dist/chunk-B6A5RXN4.js +1 -0
- package/dist/chunk-EIRNIJXL.js +1 -0
- package/dist/chunk-ESSKMX7I.js +1 -0
- package/dist/chunk-IBPUWYHJ.js +1 -0
- package/dist/chunk-IGC6OQZ2.js +14 -0
- package/dist/chunk-QE2B3MSJ.js +1 -0
- package/dist/chunk-RMV3BNWO.js +1 -0
- package/dist/chunk-RPLVIGTS.js +1 -0
- package/dist/chunk-SEE6MST7.js +1 -0
- package/dist/chunk-TPIBYY2S.js +1 -0
- package/dist/chunk-XEY5ANJ6.js +1 -0
- package/dist/chunk-ZDF5JILV.js +33 -0
- package/dist/define.cjs +66 -0
- package/dist/define.d.cts +7 -0
- package/dist/define.d.ts +7 -0
- package/dist/define.js +1 -0
- package/dist/document-capture-view-JE6IX4IE-5HJYAEDX.js +1 -0
- package/dist/eid-view-RZS6MLT6-2W2T3AWK.js +1 -0
- package/dist/email-otp-view-WUQ5OGDD-NGI6PBX3.js +1 -0
- package/dist/flow-views-5L7JF3MM-P55CCCOH.js +1 -0
- package/dist/fonts/Cairo-OFL.txt +93 -0
- package/dist/fonts/Geist-OFL.txt +93 -0
- package/dist/fonts/Inter-OFL.txt +93 -0
- package/dist/fonts/SekyroCairo-Bold.woff2 +0 -0
- package/dist/fonts/SekyroCairo-Regular.woff2 +0 -0
- package/dist/fonts/SekyroCairo-SemiBold.woff2 +0 -0
- package/dist/fonts/SekyroGeist-Bold.woff2 +0 -0
- package/dist/fonts/SekyroGeist-SemiBold.woff2 +0 -0
- package/dist/fonts/SekyroInter-Medium.woff2 +0 -0
- package/dist/fonts/SekyroInter-Regular.woff2 +0 -0
- package/dist/fonts/SekyroInter-SemiBold.woff2 +0 -0
- package/dist/index.cjs +66 -0
- package/dist/index.d.cts +1115 -0
- package/dist/index.d.ts +1115 -0
- package/dist/index.js +1 -0
- package/dist/overlay-de-JQ2FDZBA-FR25JPE4.js +1 -0
- package/dist/overlay-es-WDYRSRHH-PFDMX5D2.js +1 -0
- package/dist/overlay-pt-AQMDWDWX-LTD4N2DW.js +1 -0
- package/dist/portrait-capture-view-GQIBQY4U-AFPEUDLY.js +1 -0
- package/dist/portrait-review-view-XOQYQNU7-IPKAZBP6.js +1 -0
- package/dist/styles.css +1479 -0
- package/package.json +117 -4
- package/types/empty.js +2 -0
- package/types/events.d.ts +9 -0
- package/types/jsx.d.ts +15 -0
- package/types/svelte.d.ts +16 -0
- package/types/vue.d.ts +15 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{d as H}from"./chunk-6NQ7EWA4.js";import{a as T,b as C,c as D}from"./chunk-72JW2LCH.js";import{a as s,b as L,c as N,i as u}from"./chunk-RPLVIGTS.js";var V=L(l=>{"use strict";var Q=T();function I(r){var e="https://react.dev/errors/"+r;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var t=2;t<arguments.length;t++)e+="&args[]="+encodeURIComponent(arguments[t])}return"Minified React error #"+r+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}s(I,"formatProdErrorMessage");function h(){}s(h,"noop");var c={d:{f:h,r:s(function(){throw Error(I(522))},"r"),D:h,C:h,L:h,m:h,X:h,S:h,M:h},p:0,findDOMNode:null},ee=Symbol.for("react.portal");function re(r,e,t){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ee,key:n==null?null:""+n,children:r,containerInfo:e,implementation:t}}s(re,"createPortal$1");var O=Q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function M(r,e){if(r==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}s(M,"getCrossOriginStringAs");l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c;l.createPortal=function(r,e){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(I(299));return re(r,e,null,t)};l.flushSync=function(r){var e=O.T,t=c.p;try{if(O.T=null,c.p=2,r)return r()}finally{O.T=e,c.p=t,c.d.f()}};l.preconnect=function(r,e){typeof r=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,c.d.C(r,e))};l.prefetchDNS=function(r){typeof r=="string"&&c.d.D(r)};l.preinit=function(r,e){if(typeof r=="string"&&e&&typeof e.as=="string"){var t=e.as,n=M(t,e.crossOrigin),o=typeof e.integrity=="string"?e.integrity:void 0,i=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;t==="style"?c.d.S(r,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:n,integrity:o,fetchPriority:i}):t==="script"&&c.d.X(r,{crossOrigin:n,integrity:o,fetchPriority:i,nonce:typeof e.nonce=="string"?e.nonce:void 0})}};l.preinitModule=function(r,e){if(typeof r=="string")if(typeof e=="object"&&e!==null){if(e.as==null||e.as==="script"){var t=M(e.as,e.crossOrigin);c.d.M(r,{crossOrigin:t,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})}}else e==null&&c.d.M(r)};l.preload=function(r,e){if(typeof r=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){var t=e.as,n=M(t,e.crossOrigin);c.d.L(r,t,{crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}};l.preloadModule=function(r,e){if(typeof r=="string")if(e){var t=M(e.as,e.crossOrigin);c.d.m(r,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:t,integrity:typeof e.integrity=="string"?e.integrity:void 0})}else c.d.m(r)};l.requestFormReset=function(r){c.d.r(r)};l.unstable_batchedUpdates=function(r,e){return r(e)};l.useFormState=function(r,e,t){return O.H.useFormState(r,e,t)};l.useFormStatus=function(){return O.H.useHostTransitionStatus()};l.version="19.2.0"});var B=L((de,U)=>{"use strict";function j(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j)}catch(r){console.error(r)}}s(j,"checkDCE");j(),U.exports=V()});var W=N(T(),1),f=N(C(),1),a=N(C(),1),E=N(T(),1),Z=N(B(),1),v=N(C(),1);import{screenRampColourValue as Y}from"@sekyro/web";var te=Array.from({length:56},(r,e)=>{let t=e/56*2*Math.PI-Math.PI/2,n=Math.cos(t),o=Math.sin(t);return{id:`tick-${e}`,frac:e/55,x1:150+108*n,y1:150+108*o,x2:150+138*n,y2:150+138*o,style:{transitionDelay:`${e*6}ms`}}});function z(r,e,t,n){return t?"var(--sekyro-color-success)":r?n?"color-mix(in srgb, var(--sekyro-color-warning) 75%, transparent)":e<.33?"color-mix(in srgb, var(--sekyro-color-brand) 55%, transparent)":e<.66?"color-mix(in srgb, var(--sekyro-color-brand) 80%, transparent)":"var(--sekyro-color-brand)":"color-mix(in srgb, var(--sekyro-color-surface) 32%, transparent)"}s(z,"T");u(z,"tickColor");var ae="M0 -50 H300 V350 H0 Z M50 150 a100,100 0 1 0 200,0 a100,100 0 1 0 -200,0 Z";function F({progress:r,phase:e,draining:t=!1}){let n=Math.min(1,Math.max(0,r)),o=Math.round(n*56),i=e==="checking",y=e==="recording",d=e==="frozen",m=i||d,p=i||y||d,k=e==="locked"||p,S=t&&!k;return(0,f.jsxs)("svg",{"aria-hidden":"true",viewBox:"0 0 300 300",preserveAspectRatio:"xMidYMid meet",className:"sekyro-stage__arc","data-testid":"sekyro-capture-arc","data-phase":e,"data-filled":o,"data-recording":y?"":void 0,"data-draining":S?"":void 0,children:[(0,f.jsx)("path",{fillRule:"evenodd",d:ae,fill:"color-mix(in srgb, var(--sekyro-color-fg) var(--sekyro-scrim, 96%), transparent)",style:{"--sekyro-scrim":m?"100%":"96%"},className:"sekyro-arc__scrim sekyro-capture-fade-in","data-testid":"sekyro-capture-scrim"}),(0,f.jsxs)("g",{className:e==="locked"?"sekyro-capture-settle":void 0,children:[(0,f.jsx)("g",{className:m?"sekyro-arc__ring sekyro-arc__ring--dim":"sekyro-arc__ring",children:te.map((g,x)=>(0,f.jsx)("line",{x1:g.x1,y1:g.y1,x2:g.x2,y2:g.y2,stroke:z(x<o,g.frac,k,S),strokeWidth:3,strokeLinecap:"round",style:g.style,className:"sekyro-arc__tick"},g.id))}),(0,f.jsx)("g",{className:e==="seeking"?"sekyro-capture-breathe":void 0,children:(0,f.jsx)("circle",{cx:150,cy:150,r:100,fill:"none",stroke:k?"var(--sekyro-color-success)":"var(--sekyro-color-surface)",strokeWidth:k?3.5:2.5,className:p?"sekyro-arc__guide sekyro-arc__guide--spin sekyro-capture-ring-spin":"sekyro-arc__guide sekyro-capture-fade-in","data-testid":"sekyro-capture-guide"})})]})]})}s(F,"x");u(F,"CaptureArc");function ne({videoRef:r,guidanceText:e,guidanceHint:t,guidanceKey:n,progress:o,phase:i,draining:y=!1,stillUrl:d,showChecking:m,operatorText:p=null,voicePrompt:k,overlay:S,reduceMotion:g=!1,modeSwitch:x=null}){let b=H(),R=i==="checking",_=R||i==="frozen",A=_&&m?b("capture.checking"):e,w=k?.(t,A,n);return(0,a.jsxs)("div",{className:g?"sekyro-stage sekyro-capture-reduce":"sekyro-stage","data-testid":"sekyro-capture-stage",children:[(0,a.jsx)("video",{ref:r,playsInline:!0,muted:!0,className:"sekyro-stage__video","data-testid":"sekyro-capture-video"}),d!==null&&_?(0,a.jsx)("img",{src:d,alt:b("capture.previewAlt"),className:"sekyro-stage__still sekyro-capture-develop","data-testid":"sekyro-capture-still"}):null,(0,a.jsx)(F,{progress:o,phase:i,draining:y}),S?.(r),w!=null&&!_?(0,a.jsx)("div",{className:"sekyro-stage__corner-start","data-testid":"sekyro-voice-slot",children:w}):null,x!==null&&!_?(0,a.jsx)(G,{view:x,className:"sekyro-stage__corner-end sekyro-stage__mode-switch",kind:"chip"}):null,R&&m?(0,a.jsxs)("span",{className:"sekyro-stage__corner-end sekyro-stage__pill sekyro-capture-pill-in","data-testid":"sekyro-camera-off-pill",children:[(0,a.jsx)(K,{}),b("capture.cameraOff")]}):null,(0,a.jsxs)("p",{"aria-live":"polite",className:"sekyro-stage__guidance","data-testid":"sekyro-capture-guidance",children:[(0,a.jsx)("span",{className:"sekyro-stage__guidance-text sekyro-capture-text-in",children:A},A),_&&m?(0,a.jsx)("span",{className:"sekyro-stage__guidance-hint",children:b("capture.checkingHint")}):p!==null&&!_?(0,a.jsx)("span",{className:"sekyro-stage__guidance-hint","data-testid":"sekyro-operator-line",children:p}):null]})]})}s(ne,"ne");u(ne,"CaptureStage");function G({view:r,className:e,kind:t}){let n=(0,W.useId)(),o=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)($,{}),(0,a.jsx)("span",{children:r.label})]}),i={onClick:r.onSwitch,"aria-describedby":n,"data-testid":"sekyro-capture-mode-switch","data-mode":r.to};return(0,a.jsxs)(a.Fragment,{children:[t==="chip"?(0,a.jsx)(D,{kind:"chip",className:e,...i,children:o}):(0,a.jsx)("button",{type:"button",className:e,...i,children:o}),(0,a.jsx)("span",{id:n,className:"sekyro-visually-hidden",children:r.description})]})}s(G,"H");u(G,"ModeSwitchChip");function $(){return(0,a.jsxs)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"sekyro-icon",children:[(0,a.jsx)("path",{d:"M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z"}),(0,a.jsx)("path",{d:"M15.4 11.9a3.5 3.5 0 0 0-6.1-1.4M15.4 11.9h-2.1m2.1 0V9.8"}),(0,a.jsx)("path",{d:"M8.6 13.4a3.5 3.5 0 0 0 6.1 1.4M8.6 13.4h2.1m-2.1 0v2.1"})]})}s($,"D");u($,"FlipCameraIcon");function K(){return(0,a.jsxs)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"sekyro-icon sekyro-icon--sm",children:[(0,a.jsx)("path",{d:"M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z"}),(0,a.jsx)("path",{d:"M3 3l18 18"})]})}s(K,"G");u(K,"CameraOffIcon");var ie=typeof window>"u"?E.useEffect:E.useLayoutEffect,P="data-sekyro-ramp",se=[["background-color","transparent"],["background-image","none"]];function q(r){let e=[],t=r.ownerDocument;for(let i=r;i!==null&&i!==t.documentElement;i=i.parentElement){if(!(i instanceof HTMLElement)&&!(i instanceof SVGElement))continue;let y=i.style;for(let[d,m]of se){let p=y.getPropertyValue(d),k=y.getPropertyPriority(d);y.setProperty(d,m,"important"),e.push(()=>{p===""?y.removeProperty(d):y.setProperty(d,p,k)})}}let n=t.documentElement,o=n.hasAttribute(P);return n.setAttribute(P,""),o||e.push(()=>n.removeAttribute(P)),()=>{for(let i of e.reverse())i()}}s(q,"z");u(q,"clearAncestorBackdrops");function X(r){return{position:"fixed",inset:0,minWidth:"100vw",minHeight:"100lvh",margin:0,padding:0,border:0,zIndex:-1,pointerEvents:"none",backgroundColor:Y(r)}}s(X,"B");u(X,"washStyle");function J(r){return{position:"absolute",inset:0,pointerEvents:"none",backgroundColor:Y(r)}}s(J,"Y");u(J,"coverStyle");function oe({colour:r}){let e=(0,E.useRef)(null),t=r!==null;return ie(()=>{let n=e.current?.parentElement;if(!(!t||n===null||n===void 0))return q(n)},[t]),r===null||typeof document>"u"?null:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{ref:e,"aria-hidden":"true","data-testid":"sekyro-screen-ramp-cover","data-colour":r,style:J(r)}),(0,Z.createPortal)((0,v.jsx)("div",{"aria-hidden":"true","data-testid":"sekyro-screen-ramp","data-colour":r,style:X(r)}),document.body)]})}s(oe,"de");u(oe,"ScreenRampLayer");export{B as a,ne as b,G as c,oe as d};
|
|
2
|
+
/*! Bundled license information:
|
|
3
|
+
|
|
4
|
+
react-dom/cjs/react-dom.production.js:
|
|
5
|
+
(**
|
|
6
|
+
* @license React
|
|
7
|
+
* react-dom.production.js
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the MIT license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*)
|
|
14
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as j}from"./chunk-AGPBG22V.js";import{d as U}from"./chunk-RMV3BNWO.js";import{K as k,L as I,a as A,b as V,c as h,v as T,w as _,y as C}from"./chunk-72JW2LCH.js";import{a as s,c as N,i as n}from"./chunk-RPLVIGTS.js";var f=N(A(),1),e=N(V(),1);var D={"portrait.source.title":"كيف تريد إضافة صورتك الشخصية؟","portrait.source.description":"التقط صورة جديدة بالكاميرا، أو ارفع صورة حديثة من هذا الجهاز.","portrait.source.camera":"التقاط صورة","portrait.source.upload":"رفع صورة","portrait.source.uploadInstead":"رفع صورة بدلًا من ذلك","portrait.upload.title":"ارفع صورتك الشخصية","portrait.upload.hint":"صورة حديثة لوجهك، تنظر فيها مباشرة إلى الكاميرا، أمام جدار فاتح وبلون واحد.","portrait.upload.choose":"اختيار صورة","portrait.upload.unsupported":"اختر صورة بصيغة JPEG أو PNG أو HEIC.","portrait.upload.failed":"تعذّر إرسال هذه الصورة. حاول مرة أخرى.","portrait.review.title":"تحقّق من صورتك المعدّلة","portrait.review.description":"عدّلنا صورتك لتطابق قواعد صور الهوية. لم نغيّر وجهك.","portrait.review.original":"صورتك","portrait.review.fixed":"الصورة المعدّلة","portrait.review.fixesTitle":"ما الذي غيّرناه","portrait.review.accept":"استخدام هذه الصورة","portrait.review.retake":"إعادة الالتقاط","portrait.review.uploadAnother":"رفع صورة أخرى","portrait.fixes.crop":"قُصّت","portrait.fixes.scale":"غُيّر حجمها","portrait.fixes.straighten":"عُدّل ميلها","portrait.fixes.background":"استُبدلت الخلفية","portrait.fixes.exposure":"عُدّل السطوع","portrait.fixes.white_balance":"وُزنت الألوان","reasons.portrait_morph_suspected":"لا يمكن استخدام هذه الصورة. التقط صورة جديدة للشخص.","reasons.portrait_reference_mismatch":"لا تطابق الصورة المرجع. التقط صورة جديدة للشخص.","reasons.portrait_declined_fix":"التقط صورة أخرى أو ارفعها."},y={"portrait.source.title":"How do you want to add your ID photo?","portrait.source.description":"Take a new photo with the camera, or upload a recent photo from this device.","portrait.source.camera":"Take a photo","portrait.source.upload":"Upload a photo","portrait.source.uploadInstead":"Upload a photo instead","portrait.upload.title":"Upload your ID photo","portrait.upload.hint":"A recent photo of your face, looking straight at the camera, in front of a plain, light wall.","portrait.upload.choose":"Choose a photo","portrait.upload.unsupported":"Choose a JPEG, PNG or HEIC photo.","portrait.upload.failed":"We could not send this photo. Try again.","portrait.review.title":"Check your adjusted photo","portrait.review.description":"We adjusted your photo to meet the ID photo rules. Your face was not changed.","portrait.review.original":"Your photo","portrait.review.fixed":"Adjusted photo","portrait.review.fixesTitle":"What we changed","portrait.review.accept":"Use this photo","portrait.review.retake":"Take another","portrait.review.uploadAnother":"Upload another","portrait.fixes.crop":"Cropped","portrait.fixes.scale":"Resized","portrait.fixes.straighten":"Straightened","portrait.fixes.background":"Background replaced","portrait.fixes.exposure":"Brightness adjusted","portrait.fixes.white_balance":"Colours balanced","reasons.portrait_morph_suspected":"This photo cannot be used. Take a new photo of the person.","reasons.portrait_reference_mismatch":"The photo does not match the reference. Take a new photo of the person.","reasons.portrait_declined_fix":"Take or upload another photo."},G={"portrait.source.title":"Comment voulez-vous ajouter votre photo d'identité ?","portrait.source.description":"Prenez une nouvelle photo avec la caméra, ou importez une photo récente depuis cet appareil.","portrait.source.camera":"Prendre une photo","portrait.source.upload":"Importer une photo","portrait.source.uploadInstead":"Importer une photo à la place","portrait.upload.title":"Importez votre photo d'identité","portrait.upload.hint":"Une photo récente de votre visage, de face, devant un mur clair et uni.","portrait.upload.choose":"Choisir une photo","portrait.upload.unsupported":"Choisissez une photo JPEG, PNG ou HEIC.","portrait.upload.failed":"Nous n'avons pas pu envoyer cette photo. Réessayez.","portrait.review.title":"Vérifiez votre photo ajustée","portrait.review.description":"Nous avons ajusté votre photo pour qu'elle respecte les règles des photos d'identité. Votre visage n'a pas été modifié.","portrait.review.original":"Votre photo","portrait.review.fixed":"Photo ajustée","portrait.review.fixesTitle":"Ce que nous avons modifié","portrait.review.accept":"Utiliser cette photo","portrait.review.retake":"Reprendre","portrait.review.uploadAnother":"Importer une autre","portrait.fixes.crop":"Recadrée","portrait.fixes.scale":"Redimensionnée","portrait.fixes.straighten":"Redressée","portrait.fixes.background":"Fond remplacé","portrait.fixes.exposure":"Luminosité ajustée","portrait.fixes.white_balance":"Couleurs équilibrées","reasons.portrait_morph_suspected":"Cette photo ne peut pas être utilisée. Prenez une nouvelle photo de la personne.","reasons.portrait_reference_mismatch":"La photo ne correspond pas à la référence. Prenez une nouvelle photo de la personne.","reasons.portrait_declined_fix":"Prenez ou importez une autre photo."},H={en:y,fr:G,ar:D,es:y,pt:y,de:y},S="image/jpeg,image/png,image/heic,image/heif";function m(r){let o=r.strings,a=H[r.locale];return t=>o[t]??a[t]??""}s(m,"v");n(m,"portraitCopy");function b({step:r,i18n:o}){if(r.reason===void 0||r.reason==="portrait_fix_review")return null;let a=m(o)(`reasons.${r.reason}`)||o.t("portrait.retryTitle");return(0,e.jsxs)(k,{tone:"warning",children:[(0,e.jsx)("span",{children:a}),(0,e.jsx)("span",{children:I(o,r.attemptsRemaining,r.attemptsExhausted)})]})}s(b,"R");n(b,"ReasonNotice");function z({step:r,i18n:o,onCamera:a,onUpload:t}){let i=m(o),p=r.photo?.cameraOnPhone===!0;return(0,e.jsx)(j,{testId:"sekyro-portrait-source",title:i("portrait.source.title"),lead:i("portrait.source.description"),cameraLabel:p?o.t("capture.source.phone"):i("portrait.source.camera"),onPhone:p,uploadLabel:i("portrait.source.upload"),notice:(0,e.jsx)(b,{step:r,i18n:o}),onCamera:a,onUpload:t})}s(z,"z");n(z,"PortraitSourceView");function R({step:r,i18n:o,onCamera:a}){let t=m(o),i=(0,f.useRef)(null),[p,v]=(0,f.useState)("idle"),u=p==="sending",d=r.photo?.uploadOffered===!0,g=n(async c=>{let x=c.currentTarget.files?.[0];if(c.currentTarget.value="",x!==void 0){v("sending");try{await r.uploadPortrait(x),v("idle")}catch(w){v(w instanceof TypeError&&w.message==="unsupported_file"?"unsupported":"failed")}}},"onFile");return(0,e.jsxs)("section",{className:"sekyro-step","data-testid":"sekyro-portrait-upload-screen",children:[(0,e.jsx)(_,{title:t("portrait.upload.title"),lead:t("portrait.upload.hint")}),p==="idle"||p==="sending"?(0,e.jsx)(b,{step:r,i18n:o}):null,p==="unsupported"||p==="failed"?(0,e.jsx)(k,{tone:"warning",children:(0,e.jsx)("span",{children:t(p==="unsupported"?"portrait.upload.unsupported":"portrait.upload.failed")})}):null,u?(0,e.jsx)("p",{className:"sekyro-text-muted",role:"status","aria-busy":"true",children:o.t("portrait.uploading")}):null,(0,e.jsx)("input",{ref:i,type:"file",accept:S,hidden:!0,"data-testid":"sekyro-portrait-upload","aria-label":t("portrait.upload.title"),onChange:s(c=>{g(c)},"onChange")}),(0,e.jsxs)(C,{children:[(0,e.jsx)(h,{full:!0,onClick:s(()=>i.current?.click(),"onClick"),disabled:u||!d||r.attemptsExhausted,children:t("portrait.upload.choose")}),a!==void 0?(0,e.jsxs)(h,{full:!0,kind:"ghost",onClick:a,disabled:u,children:[(0,e.jsx)(T,{name:"camera"}),t("portrait.source.camera")]}):null]})]})}s(R,"A");n(R,"PortraitUploadView");function E({step:r,i18n:o,onDeclined:a}){let t=m(o),[i,p]=(0,f.useState)(!1),[v,u]=(0,f.useState)(!1),d=r.pendingFix;if(d==null)return null;let g=n(async l=>{p(!0),u(!1);try{await r.confirmFix(l),l||a?.()}catch{u(!0)}finally{p(!1)}},"answer"),c=r.photo?.source==="upload"?t("portrait.review.uploadAnother"):t("portrait.review.retake"),x=n(l=>t(`portrait.fixes.${l}`)||l,"fixName"),w=t("portrait.review.original"),P=t("portrait.review.fixed");return(0,e.jsxs)("section",{className:"sekyro-step","data-testid":"sekyro-portrait-review",children:[(0,e.jsx)(_,{title:t("portrait.review.title"),lead:t("portrait.review.description")}),(0,e.jsxs)("div",{className:"sekyro-portrait-pair",children:[(0,e.jsxs)("figure",{className:"sekyro-portrait-pair__item",children:[(0,e.jsx)("img",{src:d.originalUrl,alt:w}),(0,e.jsx)("figcaption",{className:"sekyro-text-muted",children:w})]}),(0,e.jsxs)("figure",{className:"sekyro-portrait-pair__item",children:[(0,e.jsx)("img",{src:d.fixedUrl,alt:P}),(0,e.jsx)("figcaption",{className:"sekyro-text-muted",children:P})]})]}),d.fixes.length>0?(0,e.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,e.jsx)("p",{className:"sekyro-text-body",children:t("portrait.review.fixesTitle")}),(0,e.jsx)("ul",{className:"sekyro-portrait-fixes","data-testid":"sekyro-portrait-fixes",children:d.fixes.map(l=>(0,e.jsx)("li",{children:x(l)},l))})]}):null,v?(0,e.jsx)(k,{tone:"danger",children:(0,e.jsx)("span",{children:o.t("errors.network_error")})}):null,(0,e.jsxs)(C,{children:[(0,e.jsx)(h,{full:!0,onClick:s(()=>{g(!0)},"onClick"),disabled:i,"data-testid":"sekyro-portrait-accept",children:t("portrait.review.accept")}),(0,e.jsx)(h,{full:!0,kind:"ghost",onClick:s(()=>{g(!1)},"onClick"),disabled:i,"data-testid":"sekyro-portrait-decline",children:c})]})]})}s(E,"j");n(E,"PortraitReviewView");function q({screen:r,step:o,i18n:a,onCamera:t,onUpload:i,onDeclined:p}){return r==="phone"?(0,e.jsx)(U,{i18n:a,lead:a.t("handoff.lead.portrait"),refresh:o.refresh,actions:(0,e.jsx)(h,{kind:"ghost",full:!0,onClick:i,children:m(a)("portrait.source.upload")})}):r==="review"?(0,e.jsx)(E,{step:o,i18n:a,onDeclined:p}):r==="upload"?(0,e.jsx)(R,{step:o,i18n:a,...t!==void 0?{onCamera:t}:{}}):(0,e.jsx)(z,{step:o,i18n:a,onCamera:t??i,onUpload:i})}s(q,"Q");n(q,"PortraitScreens");export{m as a,z as b,R as c,E as d,q as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as g}from"./chunk-B6A5RXN4.js";import{K as b,a as k,b as y,c as x}from"./chunk-72JW2LCH.js";import{a as c,c as f,i as n}from"./chunk-RPLVIGTS.js";var l=f(k(),1),t=f(k(),1),w=f(k(),1),r=f(y(),1),e=f(y(),1);var i,C=(i=class extends w.Component{constructor(){super(...arguments),this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}},c(i,"c"),i);n(C,"LoadBoundary");var j=C,F={load:n(()=>import("./flow-views-5L7JF3MM-P55CCCOH.js"),"load")};function S({view:s,i18n:a,quiet:o,...m}){let[d,h]=(0,t.useState)(0),u=(0,t.useMemo)(()=>(0,t.lazy)(()=>F.load().then(v=>({default:v[s]}))),[s,d]),p=(0,r.jsxs)(b,{tone:"danger",children:[(0,r.jsx)("span",{children:a.t("errors.network_error")}),(0,r.jsx)(x,{kind:"secondary",onClick:c(()=>h(v=>v+1),"onClick"),children:a.t("common.retry")})]});return(0,r.jsx)(j,{fallback:p,children:(0,r.jsx)(t.Suspense,{fallback:o===!0?null:(0,r.jsx)("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:a.t("common.loading")}),children:(0,r.jsx)(u,{...m,i18n:a})})},d)}c(S,"k");n(S,"Flow");var B=(0,l.createContext)(void 0);function H({i18n:s,lead:a,refresh:o,actions:m}){let d=(0,l.useContext)(B),[h,u]=(0,l.useState)(!1);if(d!==void 0)return(0,e.jsx)(S,{view:"HandoffView",i18n:s,url:d,lead:a,...o!==void 0?{refresh:o}:{},footer:m});let p=n(()=>{o!==void 0&&(u(!0),o().catch(()=>{}).finally(()=>u(!1)))},"again");return(0,e.jsx)(g,{tone:"brand",icon:"smartphone",title:s.t("handoff.title"),testId:"sekyro-phone-handoff",actions:(0,e.jsxs)(e.Fragment,{children:[m,o!==void 0?(0,e.jsx)(x,{kind:"secondary",full:!0,disabled:h,onClick:p,children:s.t("common.refresh")}):null]}),children:(0,e.jsx)("p",{children:a})})}c(H,"K");n(H,"PhoneHandoff");export{j as a,S as b,B as c,H as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var u=Object.create;var t=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var l=e=>{throw TypeError(e)};var p=(e,a,r)=>a in e?t(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r;var o=(e,a)=>t(e,"name",{value:a,configurable:!0});var j=(e,a)=>()=>(a||e((a={exports:{}}).exports,a),a.exports);var s=(e,a,r,c)=>{if(a&&typeof a=="object"||typeof a=="function")for(let n of b(a))!f.call(e,n)&&n!==r&&t(e,n,{get:()=>a[n],enumerable:!(c=v(a,n))||c.enumerable});return e};var m=(e,a,r)=>(r=e!=null?u(d(e)):{},s(a||!e||!e.__esModule?t(r,"default",{value:e,enumerable:!0}):r,e));var x=(e,a,r)=>p(e,typeof a!="symbol"?a+"":a,r),i=(e,a,r)=>a.has(e)||l("Cannot "+r);var y=(e,a,r)=>(i(e,a,"read from private field"),r?r.call(e):a.get(e)),O=(e,a,r)=>a.has(e)?l("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(e):a.set(e,r),P=(e,a,r,c)=>(i(e,a,"write to private field"),c?c.call(e,r):a.set(e,r),r),h=(e,a,r)=>(i(e,a,"access private method"),r);var g=Object.defineProperty,q=o((e,a)=>g(e,"name",{value:a,configurable:!0}),"d");export{o as a,j as b,m as c,x as d,y as e,O as f,P as g,h,q as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,i}from"./chunk-RPLVIGTS.js";import{HostedApiError as a,InvalidInputError as t,OtpInputError as p}from"@sekyro/web";function d(r,n){if(r instanceof t)return r.field==="phone"?"otp.phoneInvalid":r.field==="code"?"otp.codeInvalid":r.kind==="check_digit"?"population.reason_id_number_invalid":"population.invalid";if(r instanceof p&&r.field==="channel")return"otp.reason_otp_channel_unavailable";if(r instanceof a){let e=`errors.${r.code}`;if(Object.hasOwn(n,e))return e}return"errors.network_error"}o(d,"d");i(d,"errorKey");export{d as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={"eid.identifierTitle":"التحقق عبر {provider}","eid.identifierTitleGeneric":"التحقق بهويتك الرقمية","eid.identifierDescription":"أدخل رقمك الوطني. سيعرض لك تطبيق {provider} رمزًا.","eid.identifierDescriptionGeneric":"أدخل رقمك الوطني. سيعرض لك تطبيق الهوية الرقمية رمزًا.","eid.boundDescription":"سيعرض لك تطبيق {provider} رمزًا.","eid.boundDescriptionGeneric":"سيعرض لك تطبيق الهوية الرقمية رمزًا.","eid.start":"احصل على رمزي","eid.codeTitle":"أدخل رمز {provider}","eid.codeTitleGeneric":"أدخل رمز الهوية الرقمية","eid.codeHelp":"افتح تطبيق {provider} لرؤية رمزك","eid.codeHelpGeneric":"افتح تطبيق الهوية الرقمية الوطنية لرؤية رمزك","eid.codeLabel":"الرمز","eid.verify":"تحقّق من الرمز","eid.resend":"احصل على رمز جديد","eid.resendIn":"رمز جديد خلال {seconds} ثانية","eid.noResendsLeft":"لم يعد بإمكانك طلب رمز جديد","eid.expiresIn":"ينتهي الرمز خلال {time}","eid.expired":"انتهت صلاحية الرمز. اطلب رمزًا جديدًا","eid.useCamera":"التحقق بالكاميرا بدلًا من ذلك","reasons.eid_identifier_invalid":"تحقّق من رقمك الوطني وأعد إدخاله","reasons.eid_code_invalid":"الرمز غير صحيح. تحقّق منه وأعد إدخاله","reasons.eid_code_expired":"انتهت صلاحية رمزك. اطلب رمزًا جديدًا للمتابعة","reasons.eid_locked":"أُدخلت رموز غير صحيحة عدة مرات. تم قفل الدخول بالهوية الرقمية لهذا التحقق","reasons.eid_not_enrolled":"هذا الرقم الوطني غير مفعّل للدخول بالهوية الرقمية","reasons.eid_unavailable":"الدخول بالهوية الرقمية غير متاح حاليًا. أعد المحاولة بعد قليل","reasons.eid_resend_too_soon":"انتظر قليلًا قبل طلب رمز جديد","reasons.eid_resend_limit":"لا يمكنك طلب رموز أخرى. أدخل آخر رمز وصلك","eid.continueHint":"بعد {provider}، ستلتقط صورة حية سريعة.","eid.continueHintGeneric":"بعد الهوية الرقمية الوطنية، ستلتقط صورة حية سريعة.","eid.resendsRemaining.zero":"لا يمكنك طلب رمز جديد","eid.resendsRemaining.one":"يمكنك طلب رمز جديد واحد","eid.resendsRemaining.two":"يمكنك طلب رمزين جديدين","eid.resendsRemaining.few":"يمكنك طلب {count} رموز جديدة","eid.resendsRemaining.many":"يمكنك طلب {count} رمزًا جديدًا","eid.resendsRemaining.other":"يمكنك طلب {count} رمز جديد","eid.codeAttemptsRemaining.zero":"لم تتبقَّ أي محاولة","eid.codeAttemptsRemaining.one":"تبقّت محاولة واحدة","eid.codeAttemptsRemaining.two":"تبقّت محاولتان","eid.codeAttemptsRemaining.few":"تبقّت {count} محاولات","eid.codeAttemptsRemaining.many":"تبقّت {count} محاولة","eid.codeAttemptsRemaining.other":"تبقّت {count} محاولة"},i={"eid.identifierTitle":"Verify with {provider}","eid.identifierTitleGeneric":"Verify with your eID","eid.identifierDescription":"Enter your national number. {provider} will show you a code in its app.","eid.identifierDescriptionGeneric":"Enter your national number. Your national eID app will show you a code.","eid.boundDescription":"{provider} will show you a code in its app.","eid.boundDescriptionGeneric":"Your national eID app will show you a code.","eid.start":"Get my code","eid.codeTitle":"Enter your {provider} code","eid.codeTitleGeneric":"Enter your eID code","eid.codeHelp":"Open the {provider} app to see your code","eid.codeHelpGeneric":"Open your national eID app to see your code","eid.codeLabel":"Code","eid.verify":"Verify code","eid.resend":"Get a new code","eid.resendIn":"Get a new code in {seconds}s","eid.noResendsLeft":"You can't get more codes","eid.expiresIn":"Code expires in {time}","eid.expired":"This code has expired. Get a new code","eid.useCamera":"Verify with my camera instead","reasons.eid_identifier_invalid":"Check your national number and enter it again","reasons.eid_code_invalid":"That code is incorrect. Check it and enter it again","reasons.eid_code_expired":"Your code has expired. Get a new code to continue","reasons.eid_locked":"Too many incorrect codes. eID sign-in is locked for this verification","reasons.eid_not_enrolled":"This national number isn't set up for eID sign-in","reasons.eid_unavailable":"eID sign-in isn't available right now. Try again in a moment","reasons.eid_resend_too_soon":"Wait a moment before asking for a new code","reasons.eid_resend_limit":"You can't get more codes. Enter the last code you received","eid.continueHint":"After {provider}, you'll take a quick live photo.","eid.continueHintGeneric":"After your national eID, you'll take a quick live photo.","eid.resendsRemaining.one":"{count} new code left","eid.resendsRemaining.other":"{count} new codes left","eid.codeAttemptsRemaining.one":"{count} try left","eid.codeAttemptsRemaining.other":"{count} tries left"},n={"eid.identifierTitle":"Vérifier avec {provider}","eid.identifierTitleGeneric":"Vérifier avec votre eID","eid.identifierDescription":"Saisissez votre numéro national. {provider} vous affichera un code dans son application.","eid.identifierDescriptionGeneric":"Saisissez votre numéro national. Votre application eID vous affichera un code.","eid.boundDescription":"{provider} vous affichera un code dans son application.","eid.boundDescriptionGeneric":"Votre application eID vous affichera un code.","eid.start":"Recevoir mon code","eid.codeTitle":"Votre code {provider}","eid.codeTitleGeneric":"Saisissez votre code eID","eid.codeHelp":"Ouvrez l'application {provider} pour voir votre code","eid.codeHelpGeneric":"Ouvrez votre application eID nationale pour voir votre code","eid.codeLabel":"Code","eid.verify":"Vérifier le code","eid.resend":"Recevoir un nouveau code","eid.resendIn":"Nouveau code dans {seconds} s","eid.noResendsLeft":"Vous ne pouvez plus demander de nouveau code","eid.expiresIn":"Le code expire dans {time}","eid.expired":"Ce code a expiré. Demandez un nouveau code","eid.useCamera":"Vérifier plutôt avec ma caméra","reasons.eid_identifier_invalid":"Vérifiez votre numéro national et saisissez-le à nouveau","reasons.eid_code_invalid":"Ce code est incorrect. Vérifiez-le et saisissez-le à nouveau","reasons.eid_code_expired":"Votre code a expiré. Demandez un nouveau code pour continuer","reasons.eid_locked":"Trop de codes incorrects. La connexion eID est bloquée pour cette vérification","reasons.eid_not_enrolled":"Ce numéro national n'est pas activé pour la connexion eID","reasons.eid_unavailable":"La connexion eID n'est pas disponible pour le moment. Réessayez dans un instant","reasons.eid_resend_too_soon":"Patientez un instant avant de demander un nouveau code","reasons.eid_resend_limit":"Vous ne pouvez plus demander de code. Saisissez le dernier code reçu","eid.continueHint":"Après {provider}, vous prendrez une photo rapide en direct.","eid.continueHintGeneric":"Après votre eID nationale, vous prendrez une photo rapide en direct.","eid.resendsRemaining.one":"{count} nouveau code possible","eid.resendsRemaining.other":"{count} nouveaux codes possibles","eid.codeAttemptsRemaining.one":"{count} essai restant","eid.codeAttemptsRemaining.other":"{count} essais restants"};export{e as a,i as b,n as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as U}from"./chunk-IGC6OQZ2.js";import{E as C,I as H,a as Z,b as E,v as B}from"./chunk-72JW2LCH.js";import{a as N,c as R,i as d}from"./chunk-RPLVIGTS.js";var y=R(Z(),1),s=R(E(),1);var b=72;function P(c,t){let r=c*.72,a=r*1.32;return{cx:c/2,cy:(t-a)/2.1+a/2,a:r/2,b:a/2}}N(P,"B");d(P,"faceOval");function z({cx:c,cy:t,a:r,b:a}){return Array.from({length:b},(j,M)=>{let m=-Math.PI/2+M/b*2*Math.PI,h=Math.cos(m),i=Math.sin(m),u=c+r*h,f=t+a*i,k=Math.hypot(a*h,r*i),p=a*h/k,$=r*i/k,o=d(v=>Math.round(v*10)/10,"r");return`M${o(u+p*16)} ${o(f+$*16)}L${o(u+p*28)} ${o(f+$*28)}`})}N(z,"E");d(z,"ticks");function F({video:c,instruction:t,note:r,status:a,busy:j,progress:M,still:m,overlay:h,ramp:i,onClose:u,closeLabel:f,end:k,live:p=!0,children:$,testId:o}){C(p);let v=(0,y.useRef)(null),[l,A]=(0,y.useState)({w:0,h:0});(0,y.useLayoutEffect)(()=>{let x=v.current;if(x===null)return;let I=d(()=>A({w:x.clientWidth,h:x.clientHeight}),"measure");if(I(),typeof ResizeObserver>"u")return;let L=new ResizeObserver(I);return L.observe(x),()=>L.disconnect()},[]);let e=P(l.w,l.h),g=l.w>0?z(e):[],w=Math.round(Math.min(1,Math.max(0,M))*b),S=e.cy-e.b,n=Math.max(e.a,e.b)+40,O=70*Math.PI/180;return(0,s.jsx)("section",{className:"sekyro-lm sekyro-fc","aria-label":t,"data-testid":o,"data-ramp":i?"":void 0,children:(0,s.jsxs)("div",{ref:v,className:"sekyro-lm-stage",children:[c,m?(0,s.jsx)("img",{className:"sekyro-lm-video sekyro-fc-still",src:m,alt:""}):null,h,(0,s.jsx)(U,{colour:i??null}),l.w>0?(0,s.jsxs)("svg",{className:"sekyro-lm-overlay",viewBox:`0 0 ${l.w} ${l.h}`,"aria-hidden":"true",focusable:"false",children:[(0,s.jsxs)("defs",{children:[(0,s.jsxs)("linearGradient",{id:"sekyro-fc-fade",gradientUnits:"userSpaceOnUse",x1:e.cx-n*Math.sin(O),y1:e.cy,x2:e.cx,y2:e.cy,children:[(0,s.jsx)("stop",{offset:"0",className:"sekyro-fc-fade",stopOpacity:"0"}),(0,s.jsx)("stop",{offset:"1",className:"sekyro-fc-fade"})]}),(0,s.jsx)("mask",{id:"sekyro-fc-light",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:l.w,height:l.h,children:(0,s.jsx)("path",{className:"sekyro-fc-sweep",style:{transformOrigin:`${e.cx}px ${e.cy}px`},d:`M${e.cx} ${e.cy}L${e.cx-n*Math.sin(O)} ${e.cy-n*Math.cos(O)}A${n} ${n} 0 0 1 ${e.cx} ${e.cy-n}Z`,fill:"url(#sekyro-fc-fade)"})})]}),(0,s.jsx)("path",{className:"sekyro-fc-scrim",fillRule:"evenodd",d:`M0 0H${l.w}V${l.h}H0Z M${e.cx-e.a} ${e.cy}a${e.a} ${e.b} 0 1 0 ${2*e.a} 0a${e.a} ${e.b} 0 1 0 ${-2*e.a} 0Z`}),(0,s.jsx)("ellipse",{className:"sekyro-fc-rim",cx:e.cx,cy:e.cy,rx:e.a,ry:e.b}),(0,s.jsx)("path",{className:"sekyro-fc-ticks",d:g.join("")}),w>0?(0,s.jsx)("path",{className:"sekyro-fc-ticks is-done",d:g.slice(0,w).join("")}):null,w<b?(0,s.jsx)("path",{className:"sekyro-fc-ticks is-light",d:g.join(""),mask:"url(#sekyro-fc-light)"}):null]}):null,(0,s.jsx)("div",{className:"sekyro-lm-instruction sekyro-fc-instruction",style:{insetBlockStart:S-80},children:(0,s.jsx)("div",{role:"status","aria-live":"polite",children:(0,s.jsx)(H,{swapKey:t,className:"sekyro-lm-line",children:t})})}),a!==void 0?(0,s.jsx)("p",{role:"status",className:"sekyro-visually-hidden","data-testid":"sekyro-camera-status",children:a??""}):null,r?(0,s.jsxs)("p",{className:"sekyro-lm-under sekyro-lm-note",style:{insetBlockStart:S+2*e.b+48},children:[j?(0,s.jsx)("span",{className:"sekyro-lm-spinner","aria-hidden":"true"}):null,(0,s.jsx)("span",{children:r})]}):null,(0,s.jsxs)("div",{className:"sekyro-lm-controls",children:[(0,s.jsxs)("div",{className:"sekyro-lm-bar",children:[u!==void 0?(0,s.jsx)("button",{type:"button",className:"sekyro-glass","aria-label":f,onClick:u,children:(0,s.jsx)(B,{name:"close"})}):null,k]}),$]})]})})}N(F,"T");d(F,"FaceCamera");export{F as a};
|