@sekyro/react 0.1.0-rc.30 → 0.1.0-rc.32
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 +20 -0
- package/dist/{chunk-KJT5NUFX.js → chunk-AZF7USGM.js} +1 -1
- package/dist/{chunk-23GZ62S2.js → chunk-DYWLZHSM.js} +1 -1
- package/dist/{chunk-KK5O6LP4.js → chunk-JEOESSNW.js} +1 -1
- package/dist/{chunk-VXMOKB43.js → chunk-K5H7KWEY.js} +1 -1
- package/dist/{chunk-XQFVLRIY.js → chunk-M7JKVIGW.js} +1 -1
- package/dist/{chunk-U4KOMPUR.js → chunk-MBLJZVNN.js} +1 -1
- package/dist/{chunk-TCSAUR2Y.js → chunk-OHNOGFT2.js} +1 -1
- package/dist/{chunk-FJ3AON46.js → chunk-PMNUDJWG.js} +1 -1
- package/dist/{chunk-QL2NK7GA.js → chunk-Q5BGUJMS.js} +1 -1
- package/dist/{chunk-5WLMXBCT.js → chunk-QD66CL7R.js} +1 -1
- package/dist/{chunk-OXGWLJ5D.js → chunk-RGI6OVB2.js} +1 -1
- package/dist/{chunk-ZOE5QUGI.js → chunk-VNVE5DMF.js} +1 -1
- package/dist/chunk-WC4U54LZ.js +2 -0
- package/dist/{document-capture-view-2NFKF44N.js → document-capture-view-GENB535Z.js} +1 -1
- package/dist/{eid-view-UGYVZ5NM.js → eid-view-IQRZGEMP.js} +1 -1
- package/dist/{email-otp-view-ENQVRS66.js → email-otp-view-CL76K5TY.js} +1 -1
- package/dist/{flow-views-HNJPDQ63.js → flow-views-C3EIMXME.js} +1 -1
- package/dist/{form-view-6ERKUFVD.js → form-view-MEYCK437.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/overlay-de-LOQWEHOH.js +2 -0
- package/dist/overlay-es-F54CKFZO.js +2 -0
- package/dist/overlay-pt-NHIQY3JB.js +2 -0
- package/dist/{portrait-capture-view-ARRN3JW6.js → portrait-capture-view-VTN2VU3E.js} +1 -1
- package/dist/portrait-review-view-JTRGDYNV.js +2 -0
- package/dist/{proof-of-address-view-46Q6F7H5.js → proof-of-address-view-UQOZZXQO.js} +1 -1
- package/dist/{theme-DbHOQCyE.d.ts → theme-BASMEql8.d.cts} +1 -0
- package/dist/{theme-DbHOQCyE.d.cts → theme-BASMEql8.d.ts} +1 -0
- package/dist/verification/index.cjs +1 -1
- package/dist/verification/index.d.cts +2 -2
- package/dist/verification/index.d.ts +2 -2
- package/dist/verification/index.js +1 -1
- package/package.json +2 -2
- package/sbom.cdx.json +4 -4
- package/dist/chunk-5EPFSWU5.js +0 -2
- package/dist/overlay-de-2DL4MNC7.js +0 -2
- package/dist/overlay-es-FMHWRKQW.js +0 -2
- package/dist/overlay-pt-OGIELLCM.js +0 -2
- package/dist/portrait-review-view-JF6TYNBU.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-
|
|
2
|
-
export { k as StringKey, A as retakeHintStringKey } from '../theme-
|
|
1
|
+
import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-BASMEql8.cjs';
|
|
2
|
+
export { k as StringKey, A as retakeHintStringKey } from '../theme-BASMEql8.cjs';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { Verification, VerificationStep, PhoneOtpStepHandle, EmailOtpStepHandle, EidStepHandle, MethodStepHandle, RegistryStepHandle, DocumentStepHandle, DocumentLiveMrzOptions, PortraitStepHandle, ProofOfAddressStepHandle, FormStepHandle, VerificationResult, ResultStepHandle, CapturedArtifacts } from '@sekyro/web';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-
|
|
2
|
-
export { k as StringKey, A as retakeHintStringKey } from '../theme-
|
|
1
|
+
import { a as SekyroLocale, S as Strings, g as SekyroTheme, q as VoiceOptions, d as LivenessCaptureProps } from '../theme-BASMEql8.js';
|
|
2
|
+
export { k as StringKey, A as retakeHintStringKey } from '../theme-BASMEql8.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { Verification, VerificationStep, PhoneOtpStepHandle, EmailOtpStepHandle, EidStepHandle, MethodStepHandle, RegistryStepHandle, DocumentStepHandle, DocumentLiveMrzOptions, PortraitStepHandle, ProofOfAddressStepHandle, FormStepHandle, VerificationResult, ResultStepHandle, CapturedArtifacts } from '@sekyro/web';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as co}from"../chunk-KK5O6LP4.js";import{a as ee,b as B,c as lo}from"../chunk-5WLMXBCT.js";import{a as qt,b as Yt,d as Wt,e as Zt}from"../chunk-ZARKJW2C.js";import{a as $,d as Ut,e as it,f as ze,g as $t,h as Kt}from"../chunk-KJT5NUFX.js";import{a as zt,b as Gt,c as oo}from"../chunk-GUTF3SPK.js";import{a as no,b as ro,c as so,d as io,e as ao,f as lt}from"../chunk-U4KOMPUR.js";import{a as Ze}from"../chunk-ZOE5QUGI.js";import{d as st,f as Dt,g as Mt,j as Ht}from"../chunk-VXMOKB43.js";import{b as Vt}from"../chunk-XQFVLRIY.js";import{a as Ft}from"../chunk-7MMT5M4E.js";import{a as ue}from"../chunk-VRDPGOXM.js";import{a as Xo,b as Jo,c as jo,d as en,e as tn,f as Oe,g as v}from"../chunk-FJ3AON46.js";import{a as M,b as J,c as Qt,d as j,e as Xt,f as Ge,g as qe,h as at,i as Jt,k as Ye,l as jt,m as eo,o as to,p as P,q as We}from"../chunk-QL2NK7GA.js";import"../chunk-23GZ62S2.js";import{a as h,c as rt,j as Zo,l as Qo,n as Bt,o as Lt,p as At,r as Re,s as ke}from"../chunk-5EPFSWU5.js";import{a as i}from"../chunk-2KED7D2Q.js";import{useEffect as on,useState as uo}from"react";function ct(e){let[t,n]=uo(()=>e?.currentStep?.()??null),[r,a]=uo(null);return on(()=>{if(e===void 0)return;if(typeof e.run!="function"){a(new Error("The step components need @sekyro/web 0.2 or later (Verification.run)."));return}let s=!0,o=e.on("step",l=>{s&&n(l)});return e.run().then(l=>{s&&n(u=>u??l)},l=>{s&&a(l)}),()=>{s=!1,o()}},[e]),{step:t,error:r}}i(ct,"useVerificationStep");import{useEffect as po,useId as nn,useMemo as rn,useRef as mo,useState as Se}from"react";import{Fragment as go,jsx as b,jsxs as G}from"react/jsx-runtime";var fo=i((e,t,n)=>{if(e===void 0)return 0;let r=Date.parse(e)-t;return Number.isFinite(r)?Math.min(n,Math.max(0,Math.ceil(r/1e3))):0},"secondsUntil"),sn=600,an=30,ln=i(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),cn=["whatsapp","sms"],yo=new Set(["otp_daily_cap_reached","payment_method_required","spend_cap_reached","insufficient_balance","otp_expired","otp_send_failed","otp_channel_unavailable","otp_destination_not_allowed","otp_destination_unknown","otp_rate_limited","otp_resend_limit","otp_number_invalid","otp_number_not_mobile"]);function un(e){let t=[];for(let n of e.phoneCountries??["MR"]){let r=e.phoneRules?.find(s=>s.code===n),a=r?.dial??qt(n);a!==void 0&&!t.some(s=>s.code===n)&&t.push({code:n,dial:`+${a}`,...r!==void 0?{rule:r}:{}})}return t}i(un,"phoneCountriesOf");function ut({step:e,locale:t,strings:n,className:r,defaultPhone:a,onError:s}){let o=v(t,n),{t:l}=o,u=rn(()=>un(e),[e.phoneCountries,e.phoneRules]),p=a??u[0]?.dial??"",f=e.phoneInternational===!0,g=Wt({countries:u,international:f,closed:!!e.phoneRules?.length,defaultPhone:p}),[k,m]=Se(""),[y,w]=Se(!1),[N,O]=Se(null),[R,S]=Se(null),[x,_]=Se(!1),[Z,H]=Se(null),U=mo(null),D=e.phase==="verify"&&!x,fe=e.phase==="verify",Ne=oo(fe),[_e,Fe]=zt(e.reason==="otp_mismatch",e.attemptsRemaining,()=>m("")),K=nn(),De=mo(null);po(()=>{let C=setTimeout(()=>De.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(C)},[D]);let se=e.phase==="verify"?e.codeExpiresAt??"sent":null;po(()=>{se!==null&&(_(!1),U.current!==null&&!yo.has(e.reason??"")&&H(U.current),U.current=null)},[se]);let ye=i(async C=>{w(!0),S(null);try{await C()}catch(V){S(ue(V,o.strings)),s?.(V)}finally{w(!1),O(null)}},"run"),z=cn.filter(C=>(e.channels??[]).includes(C)),Me=g.typed,ne=!e.needsPhone||Me!==null,ie=i((C,V=!1)=>{let d=e.needsPhone?V?Z:{number:Me??g.phone,shown:g.shown}:null;U.current=d,O(C??null),ye(async()=>{try{await e.send({...d!==null?{phone:d.number}:{},...C!==void 0?{channel:C}:{}})}catch(I){throw U.current=null,I}})},"send"),Pe=i(C=>{ye(()=>e.verify(C))},"submitCode"),He=i(C=>{C.preventDefault(),D?Pe(k):z.length<=1&&ne&&ie(z[0])},"onSubmit"),Ue=`${K}-phone`,ge=fo(e.codeExpiresAt,Ne,sn),Q=fo(e.resendAvailableAt,Ne,an),ae=D&&e.codeExpiresAt!==void 0&&ge===0,xe=e.needsPhone&&!e.attemptsExhausted,le=fe&&(e.codeExpiresAt===void 0||ge>0),Ie=D&&xe?()=>_(!0):x&&le?()=>_(!1):null;Ge(Ie===null?null:y?()=>{}:Ie);let L=i(C=>l(C==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),Te=i(C=>y&&N!==null&&N===C,"busyFor"),[nt,T]=l("otp.sentTo",{channel:L(e.channel)}).split("{number}"),ce=e.context.simulation?.otpCode,$e=e.reason==="otp_mismatch"?G(P,{tone:"danger",children:[b("span",{children:l("otp.reason_otp_mismatch")}),b("span",{children:We(o,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&yo.has(e.reason)?b(P,{tone:"warning",children:b("span",{children:l(`otp.reason_${e.reason}`)})}):e.reason==="tester_phone_mismatch"?b(P,{tone:"warning",children:b("span",{children:l("reasons.tester_phone_mismatch")})}):null,Ee=G(go,{children:[$e,R!==null?b(P,{tone:"danger",children:b("span",{children:l(R)})}):null]});if(D){let C=z.length===0;return G("form",{className:`sekyro-step sekyro-otp${r?` ${r}`:""}`,"aria-labelledby":K,onSubmit:He,noValidate:!0,children:[b(J,{id:K,title:l("otp.verifyTitle"),lead:ce!==void 0?b(eo,{template:l("sandbox.otpHint"),code:ce}):G(go,{children:[nt,b("bdi",{dir:"ltr",className:"sekyro-mono",children:Z?.shown??e.sentToMasked}),T]})}),Ee,G("div",{className:"sekyro-field",children:[b("label",{className:"sekyro-label",htmlFor:`${K}-code`,children:l("otp.codeLabel")}),b(Gt,{id:`${K}-code`,value:k,invalid:_e,onChange:V=>{V!==""&&Fe(),m(V),V.length===6&&k.length!==6&&!y&&!e.attemptsExhausted&&Pe(V)}}),b("span",{className:`sekyro-help sekyro-otp-expiry${ae?" is-danger":""}`,"aria-hidden":!ae||void 0,children:ae?l("otp.expired"):l("otp.expiresIn",{time:ln(ge)})})]}),b("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:ae?l("otp.expired"):""}),G(j,{children:[b(h,{type:"submit",full:!0,disabled:y||k.length!==6||e.attemptsExhausted,"aria-busy":y||void 0,children:l("otp.verify")}),G("div",{className:"sekyro-resend-row",children:[C?b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:y||Q>0,onClick:()=>ie(void 0,!0),children:Q>0?l("otp.resendIn",{seconds:Q}):l("otp.resend")}):Q>0?b("p",{className:"sekyro-resend is-waiting",children:l("otp.resendIn",{seconds:Q})}):z.map(V=>b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:y,onClick:()=>ie(V,!0),children:l("otp.resendBy",{channel:L(V)})},V)),xe?b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:y,onClick:()=>_(!0),"data-testid":"sekyro-otp-change",children:l("otp.changeNumber")}):null]})]})]})}return G("form",{className:`sekyro-step sekyro-otp${r?` ${r}`:""}`,"aria-labelledby":K,onSubmit:He,noValidate:!0,children:[b(J,{id:K,title:l("otp.sendTitle"),lead:l("otp.sendDescription")}),Ee,e.needsPhone?G("div",{className:"sekyro-field",children:[b("label",{className:"sekyro-label",htmlFor:Ue,children:l("otp.phoneLabel")}),b(Zt,{field:g,id:Ue,locale:o.locale,t:l,inputRef:De,ready:ne})]}):b("p",{className:"sekyro-text-muted",children:l("otp.prefilledNotice")}),G(j,{children:[z.length===1?b(h,{type:"submit",full:!0,disabled:y||!ne,"aria-busy":Te(z[0])||void 0,children:l("otp.sendBy",{channel:L(z[0])})}):z.length>1?G("div",{className:"sekyro-actions__group",role:"group","aria-label":l("otp.chooseChannel"),children:[b("p",{className:"sekyro-label","aria-hidden":"true",children:l("otp.chooseChannel")}),b("div",{className:"sekyro-channel-row",children:z.map(C=>G(h,{kind:"primary",disabled:y||!ne,"aria-busy":Te(C)||void 0,onClick:()=>ie(C),children:[b(M,{name:C}),L(C)]},C))})]}):b(h,{type:"submit",full:!0,disabled:y||!ne,"aria-busy":y||void 0,children:l("otp.send")}),b("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:y&&N!==null?l("otp.sending",{channel:L(N)}):""}),x&&le?b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:y,onClick:()=>_(!1),"data-testid":"sekyro-otp-back-to-code",children:l("otp.backToCode")}):null]})]})}i(ut,"PhoneOtpStep");import{lazy as dn,Suspense as pn,useMemo as mn,useState as fn}from"react";import{jsx as he,jsxs as gn}from"react/jsx-runtime";var yn={load:i(()=>import("../email-otp-view-ENQVRS66.js"),"load")};function dt({locale:e,strings:t,...n}){let r=v(e,t),[a,s]=fn(0),o=mn(()=>dn(()=>yn.load().then(u=>({default:u.EmailOtpView}))),[a]),l=gn(P,{tone:"danger",children:[he("span",{children:r.t("errors.network_error")}),he(h,{kind:"secondary",onClick:()=>s(u=>u+1),children:r.t("common.retry")})]});return he(ee,{fallback:l,children:he(pn,{fallback:he("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:he(o,{...n,i18n:r})})},a)}i(dt,"EmailOtpStep");import{lazy as kn,Suspense as Sn,useMemo as hn,useState as bn}from"react";import{jsx as be,jsxs as Cn}from"react/jsx-runtime";var vn={load:i(()=>import("../eid-view-UGYVZ5NM.js"),"load")};function pt({locale:e,strings:t,...n}){let r=v(e,t),[a,s]=bn(0),o=hn(()=>kn(()=>vn.load().then(u=>({default:u.EidView}))),[a]),l=Cn(P,{tone:"danger",children:[be("span",{children:r.t("errors.network_error")}),be(h,{kind:"secondary",onClick:()=>s(u=>u+1),children:r.t("common.retry")})]});return be(ee,{fallback:l,children:be(Sn,{fallback:be("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:be(o,{...n,i18n:r})})},a)}i(pt,"EidStep");import{useMemo as wn}from"react";import{jsx as mt,jsxs as Nn}from"react/jsx-runtime";function ft({step:e,locale:t,strings:n,className:r,onError:a}){let s=v(t,n),{busy:o,error:l,run:u}=so(s,a),p=wn(()=>e.choice.options.flatMap(g=>{let k=ro(g,s),m=no[g.service];return k===null?[]:[{id:g.id,label:k,glyph:m&&mt(M,{name:m})}]}),[e.choice.options,s]),f=e.choice.options.find(g=>g.service==="national_eid");return Nn("div",{className:r,children:[mt(Dt,{title:s.t("method.heading"),description:s.t("method.description"),options:p,busy:o,error:l,focus:!0,testId:"sekyro-method",onChoose:g=>u(()=>e.choose(g))}),f?.nationalEid?.afterPass==="continue"?mt(B,{view:"EidContinueHint",i18n:s,provider:f.nationalEid.providerName,quiet:!0}):null]})}i(ft,"MethodChoice");import{isValidNni as _n,normalizeNni as ko}from"@sekyro/web";import{useId as Pn,useState as yt}from"react";import{Fragment as En,jsx as F,jsxs as ve}from"react/jsx-runtime";var xn=new Set(["nni_not_found","registry_record_not_found"]),In=new Set(["nni_invalid","id_number_invalid"]);function Qe({step:e,locale:t,strings:n,className:r,onError:a}){let s=v(t,n),{t:o}=s,[l,u]=yt(""),[p,f]=yt(!1),[g,k]=yt(null),m=Pn(),y=e.attemptsExhausted,w=i(async U=>{f(!0),k(null);try{await U()}catch(D){k(ue(D,s.strings)),a?.(D)}finally{f(!1)}},"run"),N=i(U=>{if(U.preventDefault(),e.source!=="typed"){w(()=>e.confirm());return}let D=ko(l);if(!/^\d{10}$/.test(D))return k("population.invalid");if(!_n(D))return k("population.reason_id_number_invalid");w(()=>typeof e.submitIdNumber=="function"?e.submitIdNumber(D):e.submitNni(D))},"onSubmit"),O=We(s,e.attemptsRemaining,y),R=e.reason!==void 0&&xn.has(e.reason),S=e.reason!==void 0&&In.has(e.reason),x=ve(En,{children:[e.reason==="registry_unavailable"?ve(P,{tone:"warning",children:[F("span",{children:o("population.reason_registry_unavailable")}),F("span",{children:O})]}):null,R&&e.canUseDocument?ve(P,{tone:"warning",children:[F("span",{children:o("population.reason_registry_record_not_found_or_document")}),F("span",{children:O}),F(h,{kind:"secondary",disabled:p,onClick:()=>{w(()=>e.useDocument())},children:o("population.useDocument")})]}):null,R&&!e.canUseDocument||S?ve(P,{tone:"danger",children:[F("span",{children:o(R?"population.reason_registry_record_not_found":"population.reason_id_number_invalid")}),F("span",{children:O})]}):null,y&&e.reason===void 0?F(P,{tone:"danger",children:F("span",{children:O})}):null,g!==null?F(P,{tone:"danger",children:F("span",{children:o(g)})}):null]}),[_,Z,H]=e.source==="document"?["population.fromDocument.title","population.fromDocument.description","population.fromDocument.continue"]:e.source==="bound"?["session.steps.population.title","population.bound.description","population.bound.confirm"]:e.recheck?["population.recheck.title","population.recheck.description","population.submit"]:["session.steps.population.title","session.steps.population.description","population.submit"];return ve("form",{className:`sekyro-step${r?` ${r}`:""}`,"aria-labelledby":m,onSubmit:N,noValidate:!0,children:[F(J,{id:m,title:o(_),lead:o(Z)}),x,e.source==="typed"?ve("div",{className:"sekyro-field",children:[F("label",{className:"sekyro-label",htmlFor:`${m}-id-number`,children:o("population.label")}),F("input",{id:`${m}-id-number`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:o("population.placeholder"),value:l,"aria-describedby":`${m}-id-number-help`,"aria-invalid":g==="population.invalid"||g==="population.reason_id_number_invalid"||void 0,onChange:U=>{k(null),u(ko(U.target.value).replace(/\D/g,"").slice(0,10))}}),F("span",{id:`${m}-id-number-help`,className:"sekyro-help",children:o("population.helper")})]}):null,F(j,{children:y?null:F(h,{type:"submit",full:!0,disabled:p,"aria-busy":p||void 0,children:o(H)})})]})}i(Qe,"IdNumberEntry");function Tn(e){return Qe(e)}i(Tn,"NniEntry");import{acceptedIssuers as Ln,acceptedTypesFor as Co,warmDocumentCapture as An}from"@sekyro/web";import{lazy as Vn,Suspense as Fn,useEffect as Dn,useMemo as Mn,useState as kt}from"react";import{acceptedIssuers as Rn,acceptedTypesFor as gt}from"@sekyro/web";import{useEffect as So,useMemo as ho,useState as bo}from"react";import{jsx as q,jsxs as Xe}from"react/jsx-runtime";var On=220;function Bn(e,t,n=[],r){let a=null;try{a=new Intl.DisplayNames([e],{type:"region"})}catch{}let s=t.map(u=>({code:u,name:a?.of(u)??u})),o=new Intl.Collator(e),l=i(u=>{if(u===r)return-1;let p=n.indexOf(u);return p<0?n.length:p},"rank");return s.sort((u,p)=>l(u.code)-l(p.code)||o.compare(u.name,p.name))}i(Bn,"countryNames");function vo({step:e,i18n:t,issuer:n,onPicked:r,ageStepUp:a=!1}){let{t:s,locale:o}=t,l=ho(()=>Rn(e.documents),[e.documents]),u=ho(()=>Bn(o,l,Object.keys(e.documents.byIssuer??{}),e.detectedCountry),[o,l,e.documents,e.detectedCountry]),p=l.length===1?l[0]:null,[f,g]=bo(n??p),[k,m]=bo(null),y=p===null?[]:gt(e.documents,p),w=p!==null&&y.length===1?y[0]:null;So(()=>{p!==null&&w!==null&&e.selectDocument(p,w)},[p,w]);let N=i((S,x)=>{e.selectDocument(S,x),r?.()},"pick"),O=i(S=>{let x=gt(e.documents,S);x.length===1?N(S,x[0]):g(S)},"chooseIssuer");if(So(()=>{if(k===null||f===null)return;let S=setTimeout(()=>N(f,k),On);return()=>clearTimeout(S)},[k]),Ge(f!==null&&l.length>1&&n===void 0?()=>{g(null),m(null)}:null),w!==null)return null;if(f===null)return Xe("section",{className:"sekyro-step",children:[q(J,{title:s("doc.countryTitle"),lead:s(a?"doc.ageStepUp":"doc.pickDescription")}),q(Yt,{countries:u,label:s("doc.countryLabel"),searchPlaceholder:s("doc.countrySearch"),noMatch:s("doc.noCountryMatch"),onPick:O}),q(j,{children:null})]});let R=gt(e.documents,f);return Xe("section",{className:"sekyro-step",children:[q(J,{title:s("doc.pickTitle"),lead:s(a&&p!==null?"doc.ageStepUp":"native.doc.holdIt")}),q("div",{className:"sekyro-choices",children:R.map(S=>Xe("button",{type:"button",className:"sekyro-card","aria-pressed":k===S,disabled:k!==null&&k!==S,onClick:()=>m(S),children:[q("span",{className:"sekyro-card__tile",children:q(M,{name:S==="passport"?"passport":"card"})}),Xe("span",{className:"sekyro-card__body",children:[q("span",{className:"sekyro-card__title",children:s(`doc.type.${S}`)}),q("span",{className:"sekyro-card__sub",children:s(`doc.sub.${S}`)})]}),q("span",{className:"sekyro-radio","aria-hidden":"true"})]},S))}),l.length>1?q("button",{type:"button",className:"sekyro-link",onClick:()=>{g(null),m(null)},children:s("native.doc.changeCountry")}):null,q(j,{children:null})]})}i(vo,"DocumentPicker");import{jsx as re,jsxs as Un}from"react/jsx-runtime";var Hn={load:i(()=>import("../document-capture-view-2NFKF44N.js"),"load")};function St({step:e,locale:t,strings:n,className:r,liveMrz:a,barcodeAssetBaseUrl:s}){let o=v(t,n),[l,u]=kt(0),[p,f]=kt(null),g=Ln(e.documents),k=g.length>1,m=e.issuer!==null&&Co(e.documents,e.issuer).length>1,y=e.documentType===null||e.issuer===null||p!==null,w=g.length===1&&Co(e.documents,g[0]).length===1,[N]=kt(()=>y&&!w),O=e.ageStepUp===!0,R=Mn(()=>Vn(()=>Hn.load().then(x=>({default:x.DocumentCaptureView}))),[l]);Dn(()=>{An()},[]);let S=Un(P,{tone:"danger",children:[re("span",{children:o.t("errors.network_error")}),re(h,{kind:"secondary",onClick:()=>u(x=>x+1),children:o.t("doc.retryCamera")})]});return re("div",{className:r,children:y?re(vo,{step:e,i18n:o,ageStepUp:O&&p===null&&N,...p==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>f(null)}):re(ee,{fallback:S,children:re(Fn,{fallback:re("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")}),children:re(R,{step:e,i18n:o,ageLead:O&&!N,liveMrz:e.documentType==="drivers_license"?void 0:a,barcodeAssetBaseUrl:s,...k?{onChangeCountry:i(()=>f("country"),"onChangeCountry")}:{},...m?{onChangeDocument:i(()=>f("document"),"onChangeDocument")}:{}})})},l)})}i(St,"DocumentCapture");import{warmPortraitCapture as $n}from"@sekyro/web";import{Component as Kn,lazy as wo,Suspense as No,useContext as zn,useEffect as Gn,useMemo as _o,useState as Po}from"react";import{jsx as E,jsxs as je}from"react/jsx-runtime";var qn={load:i(()=>import("../portrait-capture-view-ARRN3JW6.js"),"load")},Yn={load:i(()=>import("../portrait-review-view-JF6TYNBU.js"),"load")},bt=class bt extends Kn{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(bt,"LoadBoundary");var Je=bt;function Wn({step:e,i18n:t}){let{t:n}=t,r=ke();return je("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[E("h2",{ref:r,tabIndex:-1,className:"sekyro-text-body",children:n(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?E("p",{className:"sekyro-text-muted",children:n("portrait.reviewDescription")}):null,e.uploadFailed?je(P,{tone:"danger",children:[E("span",{children:n("portrait.uploadFailed")}),E(h,{kind:"secondary",onClick:()=>{e.resubmit()},children:n("portrait.sendAgain")})]}):E("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:n("portrait.matching")})]})}i(Wn,"MatchPhase");function ht({step:e,locale:t,strings:n,className:r,assetBaseUrl:a,verification:s}){let o=v(t,n),l=Mt(s),u=zn(Ye),[p,f]=Po(0),[g,k]=Po(null),m=_o(()=>wo(()=>qn.load().then(H=>({default:H.PortraitCaptureView}))),[p]),y=_o(()=>wo(()=>Yn.load().then(H=>({default:H.PortraitScreens}))),[p]),w=typeof e.uploadPortrait=="function",N=w?e.photo?.source??"camera":"camera",O=w&&N!=="camera"&&e.photo?.uploadOffered===!0,R=N!=="upload",S=N==="upload"?"upload":N==="choice"?g??e.photo?.pick??"source":"camera",x=e.phase==="capture"&&e.photo?.cameraOnPhone===!0;if(Gn(()=>{e.phase==="capture"&&S==="camera"&&!x&&$n()},[e.phase,S,x]),e.phase==="match")return E("div",{className:r,children:E(Wn,{step:e,i18n:o})});let _=E("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")});if(u!==null&&(u.busy||u.failed!==null)&&e.phase==="capture"&&S==="camera")return je("section",{className:`sekyro-step${r?` ${r}`:""}`,children:[E(J,{title:o.t("session.steps.portrait.title")}),E(j,{children:E(h,{kind:"secondary",full:!0,disabled:u.busy,onClick:u.reset,children:o.t("portrait.retryCamera")})})]});if(e.phase==="review"||S!=="camera"||x)return E("div",{className:r,children:E(Je,{fallback:E(h,{kind:"ghost",onClick:()=>f(H=>H+1),children:o.t("common.retry")}),children:E(No,{fallback:_,children:E(y,{screen:e.phase==="review"?"review":x&&S==="camera"?"phone":S==="camera"?"review":S,step:e,i18n:o,...R?{onCamera:i(()=>k("camera"),"onCamera")}:{},onUpload:()=>k("upload"),onDeclined:()=>k(null)})})},p)});if(!l.settled)return E("div",{className:r,children:_});let Z=je(P,{tone:"danger",children:[E("span",{children:o.t("errors.network_error")}),E(h,{kind:"secondary",onClick:()=>f(H=>H+1),children:o.t("portrait.retryCamera")})]});return E("div",{className:r,children:E(Je,{fallback:Z,children:E(No,{fallback:_,children:E(m,{step:e,i18n:o,...a!==void 0?{assetBaseUrl:a}:{},...O?{onUpload:i(()=>k("upload"),"onUpload")}:{}})})},p)})}i(ht,"PortraitCapture");import{lazy as Zn,Suspense as Qn,useMemo as Xn,useState as Jn}from"react";import{jsx as de,jsxs as er}from"react/jsx-runtime";var jn={load:i(()=>import("../proof-of-address-view-46Q6F7H5.js"),"load")};function vt({step:e,locale:t,strings:n,className:r}){let a=v(t,n),[s,o]=Jn(0),l=Xn(()=>Zn(()=>jn.load().then(p=>({default:p.ProofOfAddressView}))),[s]),u=er(P,{tone:"danger",children:[de("span",{children:a.t("errors.network_error")}),de(h,{kind:"secondary",onClick:()=>o(p=>p+1),children:a.t("common.retry")})]});return de("div",{className:r,children:de(ee,{fallback:u,children:de(Qn,{fallback:de("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:a.t("common.loading")}),children:de(l,{step:e,i18n:a})})},s)})}i(vt,"ProofOfAddress");import{lazy as tr,Suspense as or,useMemo as nr,useState as rr}from"react";import{jsx as pe,jsxs as ir}from"react/jsx-runtime";var sr={load:i(()=>import("../form-view-6ERKUFVD.js"),"load")};function Ct({step:e,locale:t,strings:n,className:r,onError:a}){let s=v(t,n),[o,l]=rr(0),u=nr(()=>tr(()=>sr.load().then(f=>({default:f.FormView}))),[o]),p=ir(P,{tone:"danger",children:[pe("span",{children:s.t("errors.network_error")}),pe(h,{kind:"secondary",onClick:()=>l(f=>f+1),children:s.t("common.retry")})]});return pe("div",{className:r,children:pe(ee,{fallback:p,children:pe(or,{fallback:pe("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:pe(u,{step:e,i18n:s,...a!==void 0?{onError:a}:{}})})},o)})}i(Ct,"FormStep");import{cameraUnavailableCauseOf as xr}from"@sekyro/web";import{useCallback as te,useContext as Ir,useEffect as Ve,useId as Tr,useMemo as Rt,useRef as oe,useState as W}from"react";var wt={light:{lineBrand:"#0d3b66",successSoft:"#d5f0e8",successFg:"#005341",onSuccess:"#ffffff",warningSoft:"#fff7e6",warningFg:"#735003",onWarning:"#191a1b",dangerSoft:"#ffdada",dangerFg:"#ca0f07",onDanger:"#ffffff",info:"#0563d4",infoSoft:"#d3e5ff",infoFg:"#064da5",onInfo:"#ffffff"},dark:{lineBrand:"#3f80bf",successSoft:"#002c23",successFg:"#53ffd4",onSuccess:"#030303",warningSoft:"#463102",warningFg:"#ffd98a",onWarning:"#030303",dangerSoft:"#9c1008",dangerFg:"#ffbbbb",onDanger:"#030303",info:"#5da9ff",infoSoft:"#063778",infoFg:"#acd0ff",onInfo:"#030303"},sizes:{buttonHeight:"52px",controlRadius:"10px",cardRadius:"16px",fieldRadius:"10px",iconTile:"56px",iconTileRadius:"16px",headerTile:"40px",choiceTile:"40px",tileRadius:"10px",resultDisc:"64px",resultRing:"8px",progressHeight:"4px",focusRing:"2px",focusRingOffset:"2px",otpBox:"60px",choiceMinHeight:"76px",stepGap:"32px",headingGap:"12px"},motion:{page:"320ms",easeOut:"cubic-bezier(0.16, 1, 0.3, 1)"}};var Be={light:{danger:{base:"#ca0f07",soft:"#ffdada",fg:"#ca0f07",on:"#ffffff"},success:{base:"#007a5e",soft:"#d5f0e8",fg:"#005341",on:"#ffffff"},warning:{base:"#ffab00",soft:"#fff7e6",fg:"#735003",on:"#191a1b"},info:{base:"#0563d4",soft:"#d3e5ff",fg:"#064da5",on:"#ffffff"}},dark:{danger:{base:"#ff7c7c",soft:"#9c1008",fg:"#ffbbbb",on:"#030303"},success:{base:"#00c897",soft:"#002c23",fg:"#53ffd4",on:"#030303"},warning:{base:"#ffbb2e",soft:"#463102",fg:"#ffd98a",on:"#030303"},info:{base:"#5da9ff",soft:"#063778",fg:"#acd0ff",on:"#030303"}}},ar=["danger","success","warning","info"];function Nt(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}i(Nt,"channel");function xo(e){let t=Nt(parseInt(e.slice(1,3),16)),n=Nt(parseInt(e.slice(3,5),16)),r=Nt(parseInt(e.slice(5,7),16));return .2126*t+.7152*n+.0722*r}i(xo,"luminance");function lr(e,t){let n=xo(e),r=xo(t),a=Math.max(n,r),s=Math.min(n,r);return(a+.05)/(s+.05)}i(lr,"contrastRatio");function Io(e,t){return Math.min(...ar.map(n=>lr(Be[e][n].fg,t)))}i(Io,"worstAgainst");function To(e,t,n){return Math.min(Io(e,t),Io(e,n))}i(To,"worstStatusContrast");function Eo(e,t){return To("light",e,t)>=To("dark",e,t)?"light":"dark"}i(Eo,"statusSchemeFor");import{useRef as dr,useState as pr}from"react";import{useEffect as cr,useId as ur,useRef as _t}from"react";import{jsx as Ce,jsxs as Ro}from"react/jsx-runtime";function et({open:e,title:t,closeLabel:n,onClose:r,children:a,actions:s,role:o,testId:l,returnFocus:u}){let p=_t(null),f=_t(null),g=_t(!1),k=ur();return cr(()=>{let m=p.current;if(m!==null){if(e&&!m.open?(f.current=typeof document>"u"?null:document.activeElement,typeof m.showModal=="function"?m.showModal():m.setAttribute("open","")):!e&&m.open&&(typeof m.close=="function"?m.close():m.removeAttribute("open")),!e&&g.current){let y=u?.current??(f.current instanceof HTMLElement?f.current:null);f.current=null,y?.focus()}g.current=e}},[e,u]),Ce("dialog",{ref:p,className:"sekyro-dialog","aria-labelledby":k,...o==="alertdialog"?{role:o}:{},"data-testid":l,onCancel:m=>{m.preventDefault(),r()},onClick:m=>{m.target===m.currentTarget&&r()},children:Ro("div",{className:"sekyro-dialog__panel",children:[Ro("div",{className:"sekyro-dialog__head",children:[Ce("h2",{id:k,className:"sekyro-dialog__title",children:t}),n!==void 0?Ce("button",{type:"button",className:"sekyro-disc sekyro-dialog__close","aria-label":n,onClick:r,children:Ce(M,{name:"close"})}):null]}),a!==void 0?Ce("div",{className:"sekyro-dialog__body",children:a}):null,s!==void 0?Ce("div",{className:"sekyro-dialog__actions",children:s}):null]})})}i(et,"FlowDialog");import{jsx as Le,jsxs as Oo}from"react/jsx-runtime";var mr=["intro","data","processing","sharing","retention"];function Bo({i18n:e,purpose:t="identity"}){let{t:n}=e,[r,a]=pr(!1),s=dr(null),[o,l=""]=n("consent.short").split("{terms}");return Oo("div",{className:"sekyro-consent","data-testid":"sekyro-consent",children:[Oo("p",{className:"sekyro-consent__line",children:[o,Le("button",{ref:s,type:"button",className:"sekyro-link sekyro-link--inline","aria-haspopup":"dialog",onClick:()=>a(!0),children:n("consent.termsLink")}),l]}),Le(et,{open:r,title:n("consent.termsTitle"),closeLabel:n("native.close"),onClose:()=>a(!1),returnFocus:s,testId:"sekyro-consent-terms",children:Le("div",{className:"sekyro-stack sekyro-stack--3",children:t==="human"?Le(B,{view:"HumanConsentTerms",i18n:e,quiet:!0}):mr.map(u=>Le("p",{children:n(`consent.terms.${u}`)},u))})})]})}i(Bo,"ConsentNotice");function Lo(e){let t=e.trim().split(/\s+/).filter(r=>r!=="");return(t.length>=2?[t[0],t[1]].map(r=>Array.from(r??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}i(Lo,"initials");import{useSyncExternalStore as fr}from"react";var Fo=i(e=>({colors:{...e?$.dark:$.light},radius:$.radius,fontFamily:$.font}),"brandTheme"),ea=Fo(!1),Ao=/^#[0-9a-f]{6}$/i;function Pt(e,t,n){if(t)return null;let r=it(e).colors,a=n?.colors?.bg??r?.bg,s=n?.colors?.surface??r?.surface;return a===void 0&&s===void 0||a!==void 0&&!Ao.test(a)||s!==void 0&&!Ao.test(s)?null:Eo(a??$.light.bg,s??$.light.surface)}i(Pt,"partnerStatusScheme");function tt(e,t,n){let r=it(e);if(n&&r.colors!==void 0){let{brand:a,brandFg:s}=r.colors;a!==void 0&&Sr(a,$.dark.bg)>=3?r.colors={brand:a,ring:a,...s!==void 0?{brandFg:s}:{}}:delete r.colors}if(Pt(e,n,t)==="dark"){let a=Be.dark;r.colors={...r.colors,danger:a.danger.base,success:a.success.base,warning:a.warning.fg}}return ze(Fo(n),r,Ut(t))}i(tt,"verificationTheme");function ot(e){let t=fr(kr,gr,()=>!1);return e==="dark"||e==="system"&&t}i(ot,"useDarkScheme");var yr="(prefers-color-scheme: dark)",Do=i(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(yr):null,"media"),gr=i(()=>Do()?.matches??!1,"prefersDark");function kr(e){let t=Do();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}i(kr,"subscribe");function Sr(e,t){let[n,r]=[Vo(e),Vo(t)];return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}i(Sr,"contrast");function Vo(e){let t=[1,3,5].map(n=>{let r=Number.parseInt(e.slice(n,n+2),16)/255;return r<=.03928?r/12.92:((r+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}i(Vo,"luminance");var xt="sekyro.testerGate";function It(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}i(It,"store");function Mo(e=Date.now()){try{It()?.setItem(xt,String(e))}catch{}}i(Mo,"rememberTester");function Ho(e=Date.now()){try{let t=Number(It()?.getItem(xt)??"");return Number.isFinite(t)&&t>0&&e-t<2592e6}catch{return!1}}i(Ho,"rememberedTester");function Uo(){try{It()?.removeItem(xt)}catch{}}i(Uo,"forgetTester");import{useEffect as hr,useId as br,useState as vr}from"react";import{jsx as A,jsxs as me}from"react/jsx-runtime";var $o=new Set(["document_id_number_mismatch","name_mismatch","birth_date_mismatch"]),Cr={review:{icon:"pending",tone:"info"},cooldown:{icon:"timer",tone:"info"},rejected:{icon:"close",tone:"neutral"},policy:{icon:"close",tone:"neutral"},inconclusive:{icon:"warning",tone:"neutral"},unavailable:{icon:"timer",tone:"neutral"},expired:{icon:"timer",tone:"neutral"}};function wr({screen:e}){if(e==="verified")return me("svg",{className:"sekyro-outcome sekyro-outcome--approved",viewBox:"0 0 136 136","aria-hidden":"true",focusable:"false",children:[A("circle",{className:"sekyro-outcome__ring",cx:"68",cy:"68",r:"54",pathLength:"1"}),A("circle",{className:"sekyro-outcome__disc",cx:"68",cy:"68",r:"48"}),A("path",{className:"sekyro-outcome__glyph",d:"M6.5 12.5l3.6 3.6 7.4-8.2",pathLength:"1",transform:"translate(39 39) scale(2.4167)"})]});let{icon:t,tone:n}=Cr[e];return A("span",{className:`sekyro-tile sekyro-tile--${n} sekyro-outcome-tile`,"aria-hidden":"true","data-screen":e,children:A(M,{name:t})})}i(wr,"OutcomeMark");function Nr({label:e,id:t,copied:n}){let[r,a]=vr(!1);return hr(()=>{if(!r)return;let s=setTimeout(()=>a(!1),1600);return()=>clearTimeout(s)},[r]),me("button",{type:"button",className:`sekyro-reference${r?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>a(!0),()=>{})},children:[A("span",{"aria-live":"polite",children:r?n:e}),A("bdi",{dir:"ltr",children:t}),A(M,{name:"copy"})]})}i(Nr,"ReferenceLine");function _r({step:e,t}){let n=e.context.sandbox?e.context.simulation?.reason:void 0;return n===void 0?null:me(Re,{tone:"warning",role:"status",testId:"sekyro-simulated-notice",children:[A("span",{className:"sekyro-notice__icon","aria-hidden":"true",children:A(M,{name:"info"})}),me("div",{className:"sekyro-notice__body","data-reason":n,children:[A("strong",{children:t("sandbox.simulatedTitle")}),A("span",{children:t(n==="no_testers"?"sandbox.simulatedNoTesters":"sandbox.simulatedGate")})]})]})}i(_r,"SimulationNotice");function Pr(e,t){return e==="expired"?"native.result.expiredTitle":e!=="verified"?`session.result.${e}.title`:t.level===3?"session.result.verified.title":t.level===1&&t.assurance==="contact_phone"?"session.result.verified.titlePhone":t.level===1&&t.assurance==="contact_email"?"session.result.verified.titleEmail":t.level===1?"session.result.verified.titleContact":"session.result.verified.titleHuman"}i(Pr,"resultTitleKey");function Tt({step:e,locale:t,strings:n,className:r,onClose:a}){let s=v(t,n),{t:o}=s,l=br(),u=ke(),p=e.context.orgName,f=e.reasonCode??"",g=e.display==="platform_unsupported"?"policy":e.display,k=i(y=>(p!==""||y==="verified")&&y!=="cooldown"?o(`native.result.${y}`,{org:p}):o(`session.result.${y}.description`),"partnerLine"),m;switch(e.display){case"rejected":f==="identity_not_verified"?m=p!==""?o("reasons.identity_not_verified",{org:p}):o("session.result.identityNotVerified"):m=$o.has(rt(f))?o("session.result.detailsMismatch",{org:p}):k("rejected");break;case"policy":{if($o.has(rt(f)))m=o("session.result.detailsMismatch",{org:p});else if(f==="device_velocity_exceeded")m=o("session.result.deviceVelocity",{org:p});else if(f==="capture_tampered")m=o("session.result.deviceStop");else if(f==="camera_unavailable")m=o("reasons.camera_unavailable",{org:p});else if(f==="underage_estimated")m=o("reasons.underage_estimated");else if(f==="starter_credit_claimed")m=o("reasons.starter_credit_claimed");else if(f==="blocked_by_org")m=o("reasons.blocked_by_org");else{let y=f===""?null:Lt(f);m=y!==null?o(y,{org:p}):k("policy")}break}case"cooldown":{let y=At(s.locale,e.retryAfter);m=y!==null?o(y.key,{time:y.time}):o("session.result.cooldown.description");break}case"platform_unsupported":m=o("result.platform_unsupported");break;default:m=k(g)}return me("section",{className:`sekyro-result${r?` ${r}`:""}`,"aria-labelledby":l,"data-testid":"sekyro-result",children:[me("div",{className:"sekyro-result__body",children:[A(wr,{screen:g}),me("div",{className:"sekyro-heading",children:[A("h2",{id:l,ref:u,tabIndex:-1,className:"sekyro-text-body",children:o(Pr(g,e.result))}),A("p",{className:"sekyro-text-muted",children:m})]}),A(_r,{step:e,t:o}),A(Nr,{label:o("result.referenceLabel"),id:e.context.sessionId,copied:o("native.result.copied")})]}),a!==void 0?A("div",{className:"sekyro-actions",children:A(h,{full:!0,onClick:a,children:o("native.result.continue",{org:p})})}):null]})}i(Tt,"VerificationResultScreen");import{Fragment as Ae,jsx as c,jsxs as Y}from"react/jsx-runtime";function Er(e,t,n){let r=t?$.dark:$.light,a=t?$.roles.dark:$.roles.light,s=e.colors??{},o={},l=s.fg===r.fg&&s.surface===r.surface;s.brand===r.brand&&s.surface===r.surface&&(o["--sekyro-color-brand-soft"]=a.brandSoft),l&&(o["--sekyro-color-line"]=a.line,o["--sekyro-color-line-subtle"]=a.lineSubtle,o["--sekyro-color-line-strong"]=a.lineStrong,o["--sekyro-color-sunken"]=a.sunken),s.fgMuted===r.fgMuted&&s.surface===r.surface&&(o["--sekyro-color-fg-subtle"]=a.fgSubtle),e.fontFamily===$.font&&(o["--sekyro-font-display"]=$.fontDisplay);let u=t?wt.dark:wt.light;if(o["--sekyro-color-success-soft"]=u.successSoft,o["--sekyro-color-success-fg"]=u.successFg,o["--sekyro-color-on-success"]=u.onSuccess,o["--sekyro-color-warning-soft"]=u.warningSoft,o["--sekyro-color-warning-fg"]=u.warningFg,o["--sekyro-color-danger-soft"]=u.dangerSoft,o["--sekyro-color-danger-fg"]=u.dangerFg,o["--sekyro-color-on-danger"]=u.onDanger,o["--sekyro-color-info-soft"]=u.infoSoft,o["--sekyro-color-info-fg"]=u.infoFg,s.brand===r.brand&&(o["--sekyro-color-line-brand"]=u.lineBrand),n!==null){let p=Be[n];for(let f of["danger","success","warning","info"])o[`--sekyro-color-${f}-soft`]=p[f].soft,o[`--sekyro-color-${f}-fg`]=p[f].fg;o["--sekyro-color-on-success"]=p.success.on,o["--sekyro-color-on-danger"]=p.danger.on}return o}i(Er,"flowRoles");function Ot(e){let{verification:t,locale:n,strings:r,onStep:a,onResult:s}=e,{step:o,error:l}=ct(t);Ve(()=>{o!==null&&a?.(o)},[o,a]),Ve(()=>s===void 0?void 0:t.on("result",s),[t,s]);let u=ot(e.colorScheme??"light"),p=o?.context.branding,f=tt(p,e.theme,u),[g,k]=W(!1),m=`sekyro-verification${u?" sekyro-verification--dark":""}${g?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,y=oe(e.onClose);y.current=e.onClose;let w=oe(o);w.current=o;let N=te(()=>{let _=w.current;y.current?.(_?.kind==="result"?{reason:"finished",result:_.result}:{reason:"cancelled"})},[]),[O,R]=W(null),S=te(()=>{let _=w.current;_!==null&&_.kind!=="result"&&_.context.consentRecorded?R("close"):N()},[N]),x=Rt(()=>t.reportCaptureIssue===void 0?null:_=>t.reportCaptureIssue?.(_),[t]);return c(Kt,{theme:f,className:m,children:c(Oe,{locale:n,...r!==void 0?{strings:r}:{},children:c("div",{dir:e.dir??(n==="ar"?"rtl":"ltr"),lang:n,className:"sekyro-flow",style:Er(f,u,Pt(p,u,e.theme)),children:c(Jt.Provider,{value:k,children:c(at.Provider,{value:e.onClose!==void 0?N:void 0,children:c(qe.Provider,{value:e.onClose!==void 0?S:void 0,children:Y(Ft.Provider,{value:x,children:[c(Vr,{...e,step:o,error:l,immersive:g,onLeaveAsk:()=>R("history"),onClosed:N}),c(Br,{open:O!==null,onStay:()=>{O==="history"&&Et(),R(null)},onLeave:()=>{let _=O;R(null),_==="close"||e.onClose!==void 0?N():typeof window<"u"&&qo()}})]})})})})})})})}i(Ot,"SekyroVerification");function Rr(e,t){if(t===void 0||t==="aml_screening")return null;let n=e,r=n[`session.processing.${t}.title`],a=n[`session.processing.${t}.description`];return typeof r=="string"&&r!==""&&typeof a=="string"&&a!==""?{title:r,description:a}:null}i(Rr,"processingCopyOf");function Or({error:e,retry:t}){let{t:n}=v(),r=ke();return Y(Re,{tone:"danger",testId:"sekyro-error-notice",children:[c("span",{children:n(Bt(e))}),e.retryable?c(h,{ref:r,kind:"secondary",className:"sekyro-btn--start",onClick:t,children:n("common.retry")}):null]})}i(Or,"CameraErrorNotice");var zo="sekyroFlow";function Go(){let e=window.history.state;return typeof e=="object"&&e!==null&&e[zo]===!0}i(Go,"onGuard");function Et(){if(typeof window>"u"||Go())return;let e=window.history.state;window.history.pushState({...typeof e=="object"&&e!==null?e:{},[zo]:!0},"")}i(Et,"pushGuard");function qo(){window.history.back()}i(qo,"leaveHistory");function Br({open:e,onStay:t,onLeave:n}){let{t:r}=v();return c(et,{open:e,role:"alertdialog",title:r("leave.title"),onClose:t,testId:"sekyro-leave",actions:Y(Ae,{children:[c(h,{full:!0,onClick:t,children:r("leave.stay")}),c(h,{full:!0,kind:"danger",onClick:n,children:r("leave.confirm")})]}),children:c("p",{className:"sekyro-text-muted",children:r("leave.body")})})}i(Br,"LeaveDialog");function Lr(e,t){let[n,r]=W(!1),[a,s]=W(null),o=e===null?void 0:e.skipCapture,l=oe(o);l.current=o;let u=oe(!1),p=e?.key;Ve(()=>s(null),[p]);let f=te(()=>{if(u.current)return;let y=l.current;y!==void 0&&(u.current=!0,r(!0),s(null),y().catch(w=>s(t.t(ue(w,t.strings)))).finally(()=>{u.current=!1,r(!1)}))},[t]),g=te(()=>s(null),[]),k=o!==void 0,m=t.t("sandbox.skipCapture");return Rt(()=>k?{label:m,busy:n,failed:a,run:f,reset:g}:null,[k,m,n,a,f,g])}i(Lr,"useSkipCapture");function Ar({skip:e}){return Y(Ae,{children:[e.failed!==null?c(P,{tone:"danger",children:c("span",{children:e.failed})}):null,c(h,{kind:"ghost",full:!0,disabled:e.busy,"aria-busy":e.busy||void 0,onClick:e.run,"data-testid":"sekyro-skip-capture",children:e.label})]})}i(Ar,"SkipAction");function Vr(e){let{step:t,error:n,slots:r,immersive:a}=e,s=v(),{t:o}=s,[l,u]=W(!1),[p,f]=W([]),g=te(d=>(f(I=>[...I,d]),()=>f(I=>I.filter(X=>X!==d))),[]),[k,m]=W(null),y=te(d=>m(()=>d),[]),[w,N]=W(0),[O,R]=W(null),S=Lr(t,s),x=t?.context.testerGate!==void 0,[_,Z]=W(!1),H=oe(null);Ve(()=>{!x||H.current!==null||(H.current=Ho(),H.current&&Z(!0))},[x]);let U=t?.context.purpose??"identity",D=t?.context.returning===!0,fe=e.verification,Ne=U==="human"||t?.context.cameraUnavailableHandled===!0,_e=fe.reportCameraUnavailable!==void 0&&Ne?d=>fe.reportCameraUnavailable?.(d)??Promise.resolve():void 0,Fe=t?.kind==="liveness"&&t.mode==="liveness"&&t.reason===void 0&&!t.attemptsExhausted,K=e.handoffUrl,De=oe({last:null,count:0}),se=te((d,I,X=!1)=>_e===void 0&&I!=="denied"?void 0:c(B,{view:"NoCameraView",i18n:s,quiet:!0,cause:I,onRetry:d,repeated:X,...Fe&&_e!==void 0?{onContinue:_e}:{},...K!==void 0?{handoffUrl:K}:{}}),[s,fe,Ne,Fe,K]),ye=Rt(()=>io(t),[t]),z=te((d,I)=>c(ao,{start:d,context:I,human:U==="human",returning:D,notice:I.permissionSettled&&I.permission==="denied"?se(d,"denied"):void 0,...ye!==void 0?{retry:ye}:{}}),[U,D,se,ye]),Me=te((d,I)=>{let X=xr(d.kind),Ke=De.current;d.kind==="permission"&&d!==Ke.last&&(Ke.last=d,Ke.count+=1);let Wo=d.kind==="permission"&&Ke.count>1;return(X!==void 0?se(I,X,Wo):void 0)??Y(Ae,{children:[c(Or,{error:d,retry:I}),X!==void 0&&K!==void 0?c(B,{view:"DesktopHandoffView",i18n:s,quiet:!0,url:K}):null]})},[se,K,s]),ne=oe(""),ie=e.livenessProps?.slots?.stageOverlay,Pe=te(d=>(d.guidance!==""&&!d.coached&&(ne.current=d.guidance),c(co,{testId:"sekyro-capture-stage",video:c("video",{ref:d.videoRef,playsInline:!0,muted:!0,className:"sekyro-lm-video sekyro-fc-video","aria-hidden":"true","data-testid":"sekyro-capture-video"}),instruction:d.settled?o("capture.checkingTitle"):d.guidance!==""?d.guidance:ne.current,note:d.note,status:d.status,busy:d.settled,progress:d.phase==="seeking"||d.phase==="aligning"?d.progress:1,still:d.still,live:d.live,closeLabel:o("native.close"),overlay:ie?.(d.videoRef),ramp:d.ramp?.colour??null,...d.settled?{}:{onClose:i(()=>N(I=>I+1),"onClose")},end:d.modeSwitch!=null?c(Vt,{view:d.modeSwitch,className:"sekyro-glass sekyro-glass--label"}):null,children:d.settled||!d.live?null:c(jt,{onStop:()=>N(I=>I+1)})})),[o,ie]),He=Tr(),Ue=t,ge=t!==null&&O===t.key&&t.context.switchable!==void 0,Q=k??(t===null||t.kind==="result"?null:ge?()=>R(null):t.context.switchable!==void 0&&typeof Ue?.chooseOption=="function"?()=>R(t.key):null),ae=oe(Q);ae.current=Q;let xe=oe(t);xe.current=t;let le=oe({ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0});le.current={ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0};let Ie=e.backNavigation==="history";if(Ve(()=>{if(!Ie||typeof window>"u")return;Et();let d=i(()=>{if(Go())return;let I=xe.current,X=ae.current;X!==null?(X(),Et()):I?.kind!=="result"&&I?.context.consentRecorded===!0?le.current.ask():le.current.hostClose?le.current.closed():qo()},"onPop");return window.addEventListener("popstate",d),()=>window.removeEventListener("popstate",d)},[Ie]),n!==null)return c(Re,{tone:"danger",children:c("span",{children:o(ue(n,s.strings))})});if(t===null)return Y("div",{className:"sekyro-skeleton",role:"status","aria-busy":"true",children:[c("span",{className:"sekyro-visually-hidden",children:o("common.loading")}),c("span",{className:"sekyro-skeleton__bar is-title"}),c("span",{className:"sekyro-skeleton__bar"}),c("span",{className:"sekyro-skeleton__bar is-short"}),c("span",{className:"sekyro-skeleton__bar is-block"})]});let{context:L}=t,Te=i(d=>{u(!0),d().finally(()=>u(!1))},"refresh"),nt=r?.header??c(Dr,{context:L,headerId:He,end:r?.headerEnd,...Q!==null?{onBack:Q}:{}}),T,ce=ge;if(_&&e.verification.testerGate!==void 0)T=c(st.Provider,{value:Pe,children:c(B,{view:"TesterGateView",i18n:s,verification:e.verification,attemptsLeft:L.testerGate?.attemptsLeft??0,livenessProps:{...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:e.livenessProps?.slots?.intro??z},locale:e.locale,dir:e.dir,strings:s.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice},onBound:()=>Mo(),onDone:d=>{d&&Uo(),Z(!1)}})});else if(ce)T=c(B,{view:"LaneChoiceView",i18n:s,step:t,onClose:()=>R(null)});else switch(t.kind){case"phone_otp":T=c(ut,{step:t});break;case"email_otp":T=c(dt,{step:t});break;case"method":T=c(ft,{step:t});break;case"registry":T=c(Qe,{step:t});break;case"document":T=c(St,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{},...e.documentBarcodeAssetBaseUrl!==void 0?{barcodeAssetBaseUrl:e.documentBarcodeAssetBaseUrl}:{}});break;case"liveness":{let d=e.livenessProps?.slots?.intro,I={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:d??z,...d===void 0&&e.livenessProps?.slots?.errorPanel===void 0?{errorPanel:Me}:{}},...w>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:s.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};T=c(st.Provider,{value:Pe,children:t.instructions==="icao"||t.livePhoto?.icao===!0?c(B,{view:"LivePhotoLiveness",i18n:s,step:t,livenessProps:I,sekyroIntro:d===void 0},w):c(Ht,{...I},w)});break}case"portrait":T=Y(Ae,{children:[t.retakeOnly?c(B,{view:"PortraitRetakeNotice",i18n:s,quiet:!0}):null,c(ht,{step:t,verification:e.verification,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"proof_of_address":T=c(vt,{step:t});break;case"form":T=c(Ct,{step:t});break;case"contact_choice":T=c(B,{view:"ContactChoiceView",i18n:s,step:t});break;case"choice":T=c(B,{view:"GenericChoiceView",i18n:s,step:t});break;case"identity_summary":T=c(B,{view:"IdentitySummaryView",i18n:s,step:t});break;case"mobile_required":{let d=t.checkType==="doc_ocr"?o("handoff.lead.document"):t.checkType==="portrait_icao"?o("handoff.lead.portrait"):t.checkType==="poa"?o("handoff.lead.poa"):void 0;T=e.handoffUrl!==void 0?c(B,{view:"HandoffView",i18n:s,url:e.handoffUrl,refresh:t.refresh,...d!==void 0?{lead:d}:{}}):c(Ze,{tone:"brand",icon:"smartphone",title:o("handoff.title"),actions:c(h,{kind:"secondary",full:!0,disabled:l,onClick:()=>Te(t.refresh),children:o("common.refresh")}),children:c("p",{children:d??o("reasons.mobile_required")})});break}case"native_app_required":T=c(B,{view:"NativeAppView",i18n:s,org:L.orgName,nativeApp:t.nativeApp,...e.handoffUrl!==void 0?{fallbackUrl:e.handoffUrl}:{},refresh:t.refresh,footer:c(Ko,{org:L.orgName})});break;case"processing":{let d=Rr(s.strings,t.service);T=c(Ze,{tone:"brand",icon:"pending",busy:!t.stalled,live:!0,title:d?.title??o("session.processing.title"),actions:t.stalled?c(h,{kind:"secondary",full:!0,disabled:l,onClick:()=>Te(t.refresh),children:o("common.refresh")}):null,children:c("p",{children:d?.description??o("session.processing.description")})});break}case"eid":T=c(pt,{step:t});break;case"unsupported":{let d=t.reason==="platform_unsupported";T=c(Ze,{tone:"neutral",icon:"smartphone",title:o(d?"needsApp.title":"unsupported.title"),actions:c(Ko,{org:L.orgName}),children:c("p",{children:d?L.orgName!==""?o("needsApp.description",{org:L.orgName}):o("needsApp.descriptionNoOrg"):o("unsupported.description",{org:L.orgName})})});break}case"result":T=r?.result?.(t)??c(Fr,{step:t});break;default:{let d=t;T=null}}let $e=!a&&!L.consentRecorded&&t.kind!=="result"?c(Bo,{i18n:s,purpose:L.purpose}):null,Ee=S!==null&&!a&&!ce&&!_?c(Ar,{skip:S}):null,C=x&&!_&&!a&&!ce&&e.verification.testerGate!==void 0?c(B,{view:"TesterGateAction",i18n:s,quiet:!0,onOpen:()=>Z(!0)}):null,V=Ee===null&&C===null?$e:Y(Ae,{children:[C,Ee,$e]});return c(Xt.Provider,{value:y,children:c(Ye.Provider,{value:S,children:c(lo.Provider,{value:e.handoffUrl,children:Y(Qt.Provider,{value:V===null?null:{node:V,owner:p[0]??null,claim:g},children:[a?null:nt,!a&&t.kind!=="result"&&L.sections.length>1?c(Mr,{context:L,current:t.section,i18n:s}):null,c(to,{pageKey:t.key,children:T}),!a&&!ce&&t.kind!=="result"&&t.context.switchable!==void 0?c(B,{view:"LaneSwitch",i18n:s,step:t,onOpen:()=>R(t.key),quiet:!0},t.key):null,p.length===0?V:null,a?null:r?.footer!==void 0?r.footer:L.branding?.hideAttribution===!0?null:Y("a",{className:"sekyro-footer",href:"https://sekyro.ai",target:"_blank",rel:"noopener noreferrer",children:[c(M,{name:"lock"}),o("shell.verifiedBy")]})]})})})})}i(Vr,"Body");function Ko({org:e}){let{t}=v(),n=Ir(at);return n===void 0?null:c(h,{full:!0,onClick:n,children:t("native.result.continue",{org:e})})}i(Ko,"BackToOrg");function Fr({step:e}){return c(qe.Consumer,{children:t=>c(Tt,{step:e,...t!==void 0?{onClose:t}:{}})})}i(Fr,"ResultPage");function Dr({context:e,headerId:t,end:n,onBack:r}){let{t:a}=v(),[s,o]=W(!1),l=s?void 0:e.branding?.logoUrl,u=e.orgName!==""?e.orgName:a(e.returning?"returning.heading":"session.title");return c("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:Y("div",{className:"sekyro-org",children:[r!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__back","aria-label":a("common.back"),onClick:r,"data-testid":"sekyro-back",children:c(M,{name:"back"})}):null,c("span",{className:"sekyro-org__tile","aria-hidden":"true",children:l!==void 0?c("img",{className:"sekyro-org__logo",src:l,alt:"",onError:()=>o(!0)}):Lo(e.orgName)}),Y("div",{className:"sekyro-org__text",children:[c("h1",{id:t,className:"sekyro-org__name",children:u}),c("p",{className:"sekyro-org__sub",children:a(e.purpose==="human"?"shell.subtitleHuman":"shell.subtitle")})]}),e.sandbox?c("span",{className:"sekyro-sandbox-badge","data-testid":"sekyro-sandbox-badge",children:a("app.sandboxBadge")}):null,n!=null?c("div",{className:"sekyro-org__end",children:n}):null,c(qe.Consumer,{children:p=>p!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":a("native.close"),onClick:p,children:c(M,{name:"close"})}):null})]})})}i(Dr,"OrgHeader");function Mr({context:e,current:t,i18n:n}){let r=t===null?-1:e.sections.indexOf(t),a=e.progress,s=a!==void 0&&a.length===e.sections.length?a:e.sections.map((o,l)=>({id:o,state:l<r?"done":l===r?"current":"upcoming"}));return c("ol",{className:"sekyro-progress__bars","aria-label":n.t("session.progressLabel"),children:s.map(({id:o,state:l})=>c("li",{className:`sekyro-progress__bar${l==="done"?" is-done":l==="current"?" is-current":""}`,...l==="current"?{"aria-current":"step"}:{},children:c("span",{className:"sekyro-visually-hidden",children:n.strings[`section.${o}`]??o})},o))})}i(Mr,"SectionProgress");import{useEffect as Hr,useState as Yo}from"react";import{jsx as we}from"react/jsx-runtime";function Ur(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}i(Ur,"pageUrl");function $r({hostedUrl:e,inAppBrowser:t,...n}){let[r,a]=Yo(t===!0);Hr(()=>{t===void 0&<()&&a(!0)},[t]);let[s,o]=Yo(!1),l=ot(n.colorScheme??"light"),u=n.handoffUrl??e??Ur();return r&&!s?we($t,{theme:ze(tt(void 0,void 0,l),n.theme),className:`sekyro-verification${l?" sekyro-verification--dark":""}${n.className!==void 0?` ${n.className}`:""}`,children:we(Oe,{locale:n.locale,...n.strings!==void 0?{strings:n.strings}:{},children:we("div",{dir:n.dir??(n.locale==="ar"?"rtl":"ltr"),lang:n.locale,className:"sekyro-flow",children:we(Kr,{url:u,onContinue:()=>o(!0)})})})}):we(Ot,{...n,...u!==""?{handoffUrl:u}:{}})}i($r,"SekyroFlow");function Kr({url:e,onContinue:t}){let n=v();return we(B,{view:"InAppBrowserPrompt",i18n:n,url:e,onContinue:t})}i(Kr,"Prompt");export{St as DocumentCapture,pt as EidStep,dt as EmailOtpStep,Ct as FormStep,Qe as IdNumberEntry,ft as MethodChoice,Tn as NniEntry,ut as PhoneOtpStep,ht as PortraitCapture,vt as ProofOfAddress,$r as SekyroFlow,Ot as SekyroVerification,Oe as StepI18nProvider,Tt as VerificationResultScreen,Xo as arSteps,Jo as enSteps,en as formatTemplate,jo as frSteps,lt as isInAppBrowser,Zo as loadSekyroLocale,tn as resolveSekyroStrings,Qo as retakeHintStringKey,v as useStepI18n,ct as useVerificationStep};
|
|
2
|
+
import{a as co}from"../chunk-JEOESSNW.js";import{a as ee,b as B,c as lo}from"../chunk-QD66CL7R.js";import{a as qt,b as Yt,d as Wt,e as Zt}from"../chunk-ZARKJW2C.js";import{a as $,d as Ut,e as it,f as ze,g as $t,h as Kt}from"../chunk-AZF7USGM.js";import{a as zt,b as Gt,c as oo}from"../chunk-GUTF3SPK.js";import{a as no,b as ro,c as so,d as io,e as ao,f as lt}from"../chunk-MBLJZVNN.js";import{a as Ze}from"../chunk-VNVE5DMF.js";import{d as st,f as Dt,g as Mt,j as Ht}from"../chunk-K5H7KWEY.js";import{b as Vt}from"../chunk-M7JKVIGW.js";import{a as Ft}from"../chunk-7MMT5M4E.js";import{a as ue}from"../chunk-VRDPGOXM.js";import{a as Xo,b as Jo,c as jo,d as en,e as tn,f as Oe,g as v}from"../chunk-PMNUDJWG.js";import{a as M,b as J,c as Qt,d as j,e as Xt,f as Ge,g as qe,h as at,i as Jt,k as Ye,l as jt,m as eo,o as to,p as P,q as We}from"../chunk-Q5BGUJMS.js";import"../chunk-DYWLZHSM.js";import{a as h,c as rt,j as Zo,l as Qo,n as Bt,o as Lt,p as At,r as Re,s as ke}from"../chunk-WC4U54LZ.js";import{a as i}from"../chunk-2KED7D2Q.js";import{useEffect as on,useState as uo}from"react";function ct(e){let[t,n]=uo(()=>e?.currentStep?.()??null),[r,a]=uo(null);return on(()=>{if(e===void 0)return;if(typeof e.run!="function"){a(new Error("The step components need @sekyro/web 0.2 or later (Verification.run)."));return}let s=!0,o=e.on("step",l=>{s&&n(l)});return e.run().then(l=>{s&&n(u=>u??l)},l=>{s&&a(l)}),()=>{s=!1,o()}},[e]),{step:t,error:r}}i(ct,"useVerificationStep");import{useEffect as po,useId as nn,useMemo as rn,useRef as mo,useState as Se}from"react";import{Fragment as go,jsx as b,jsxs as G}from"react/jsx-runtime";var fo=i((e,t,n)=>{if(e===void 0)return 0;let r=Date.parse(e)-t;return Number.isFinite(r)?Math.min(n,Math.max(0,Math.ceil(r/1e3))):0},"secondsUntil"),sn=600,an=30,ln=i(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),cn=["whatsapp","sms"],yo=new Set(["otp_daily_cap_reached","payment_method_required","spend_cap_reached","insufficient_balance","otp_expired","otp_send_failed","otp_channel_unavailable","otp_destination_not_allowed","otp_destination_unknown","otp_rate_limited","otp_resend_limit","otp_number_invalid","otp_number_not_mobile"]);function un(e){let t=[];for(let n of e.phoneCountries??["MR"]){let r=e.phoneRules?.find(s=>s.code===n),a=r?.dial??qt(n);a!==void 0&&!t.some(s=>s.code===n)&&t.push({code:n,dial:`+${a}`,...r!==void 0?{rule:r}:{}})}return t}i(un,"phoneCountriesOf");function ut({step:e,locale:t,strings:n,className:r,defaultPhone:a,onError:s}){let o=v(t,n),{t:l}=o,u=rn(()=>un(e),[e.phoneCountries,e.phoneRules]),p=a??u[0]?.dial??"",f=e.phoneInternational===!0,g=Wt({countries:u,international:f,closed:!!e.phoneRules?.length,defaultPhone:p}),[k,m]=Se(""),[y,w]=Se(!1),[N,O]=Se(null),[R,S]=Se(null),[x,_]=Se(!1),[Z,H]=Se(null),U=mo(null),D=e.phase==="verify"&&!x,fe=e.phase==="verify",Ne=oo(fe),[_e,Fe]=zt(e.reason==="otp_mismatch",e.attemptsRemaining,()=>m("")),K=nn(),De=mo(null);po(()=>{let C=setTimeout(()=>De.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(C)},[D]);let se=e.phase==="verify"?e.codeExpiresAt??"sent":null;po(()=>{se!==null&&(_(!1),U.current!==null&&!yo.has(e.reason??"")&&H(U.current),U.current=null)},[se]);let ye=i(async C=>{w(!0),S(null);try{await C()}catch(V){S(ue(V,o.strings)),s?.(V)}finally{w(!1),O(null)}},"run"),z=cn.filter(C=>(e.channels??[]).includes(C)),Me=g.typed,ne=!e.needsPhone||Me!==null,ie=i((C,V=!1)=>{let d=e.needsPhone?V?Z:{number:Me??g.phone,shown:g.shown}:null;U.current=d,O(C??null),ye(async()=>{try{await e.send({...d!==null?{phone:d.number}:{},...C!==void 0?{channel:C}:{}})}catch(I){throw U.current=null,I}})},"send"),Pe=i(C=>{ye(()=>e.verify(C))},"submitCode"),He=i(C=>{C.preventDefault(),D?Pe(k):z.length<=1&&ne&&ie(z[0])},"onSubmit"),Ue=`${K}-phone`,ge=fo(e.codeExpiresAt,Ne,sn),Q=fo(e.resendAvailableAt,Ne,an),ae=D&&e.codeExpiresAt!==void 0&&ge===0,xe=e.needsPhone&&!e.attemptsExhausted,le=fe&&(e.codeExpiresAt===void 0||ge>0),Ie=D&&xe?()=>_(!0):x&&le?()=>_(!1):null;Ge(Ie===null?null:y?()=>{}:Ie);let L=i(C=>l(C==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),Te=i(C=>y&&N!==null&&N===C,"busyFor"),[nt,T]=l("otp.sentTo",{channel:L(e.channel)}).split("{number}"),ce=e.context.simulation?.otpCode,$e=e.reason==="otp_mismatch"?G(P,{tone:"danger",children:[b("span",{children:l("otp.reason_otp_mismatch")}),b("span",{children:We(o,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&yo.has(e.reason)?b(P,{tone:"warning",children:b("span",{children:l(`otp.reason_${e.reason}`)})}):e.reason==="tester_phone_mismatch"?b(P,{tone:"warning",children:b("span",{children:l("reasons.tester_phone_mismatch")})}):null,Ee=G(go,{children:[$e,R!==null?b(P,{tone:"danger",children:b("span",{children:l(R)})}):null]});if(D){let C=z.length===0;return G("form",{className:`sekyro-step sekyro-otp${r?` ${r}`:""}`,"aria-labelledby":K,onSubmit:He,noValidate:!0,children:[b(J,{id:K,title:l("otp.verifyTitle"),lead:ce!==void 0?b(eo,{template:l("sandbox.otpHint"),code:ce}):G(go,{children:[nt,b("bdi",{dir:"ltr",className:"sekyro-mono",children:Z?.shown??e.sentToMasked}),T]})}),Ee,G("div",{className:"sekyro-field",children:[b("label",{className:"sekyro-label",htmlFor:`${K}-code`,children:l("otp.codeLabel")}),b(Gt,{id:`${K}-code`,value:k,invalid:_e,onChange:V=>{V!==""&&Fe(),m(V),V.length===6&&k.length!==6&&!y&&!e.attemptsExhausted&&Pe(V)}}),b("span",{className:`sekyro-help sekyro-otp-expiry${ae?" is-danger":""}`,"aria-hidden":!ae||void 0,children:ae?l("otp.expired"):l("otp.expiresIn",{time:ln(ge)})})]}),b("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:ae?l("otp.expired"):""}),G(j,{children:[b(h,{type:"submit",full:!0,disabled:y||k.length!==6||e.attemptsExhausted,"aria-busy":y||void 0,children:l("otp.verify")}),G("div",{className:"sekyro-resend-row",children:[C?b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:y||Q>0,onClick:()=>ie(void 0,!0),children:Q>0?l("otp.resendIn",{seconds:Q}):l("otp.resend")}):Q>0?b("p",{className:"sekyro-resend is-waiting",children:l("otp.resendIn",{seconds:Q})}):z.map(V=>b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:y,onClick:()=>ie(V,!0),children:l("otp.resendBy",{channel:L(V)})},V)),xe?b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:y,onClick:()=>_(!0),"data-testid":"sekyro-otp-change",children:l("otp.changeNumber")}):null]})]})]})}return G("form",{className:`sekyro-step sekyro-otp${r?` ${r}`:""}`,"aria-labelledby":K,onSubmit:He,noValidate:!0,children:[b(J,{id:K,title:l("otp.sendTitle"),lead:l("otp.sendDescription")}),Ee,e.needsPhone?G("div",{className:"sekyro-field",children:[b("label",{className:"sekyro-label",htmlFor:Ue,children:l("otp.phoneLabel")}),b(Zt,{field:g,id:Ue,locale:o.locale,t:l,inputRef:De,ready:ne})]}):b("p",{className:"sekyro-text-muted",children:l("otp.prefilledNotice")}),G(j,{children:[z.length===1?b(h,{type:"submit",full:!0,disabled:y||!ne,"aria-busy":Te(z[0])||void 0,children:l("otp.sendBy",{channel:L(z[0])})}):z.length>1?G("div",{className:"sekyro-actions__group",role:"group","aria-label":l("otp.chooseChannel"),children:[b("p",{className:"sekyro-label","aria-hidden":"true",children:l("otp.chooseChannel")}),b("div",{className:"sekyro-channel-row",children:z.map(C=>G(h,{kind:"primary",disabled:y||!ne,"aria-busy":Te(C)||void 0,onClick:()=>ie(C),children:[b(M,{name:C}),L(C)]},C))})]}):b(h,{type:"submit",full:!0,disabled:y||!ne,"aria-busy":y||void 0,children:l("otp.send")}),b("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:y&&N!==null?l("otp.sending",{channel:L(N)}):""}),x&&le?b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:y,onClick:()=>_(!1),"data-testid":"sekyro-otp-back-to-code",children:l("otp.backToCode")}):null]})]})}i(ut,"PhoneOtpStep");import{lazy as dn,Suspense as pn,useMemo as mn,useState as fn}from"react";import{jsx as he,jsxs as gn}from"react/jsx-runtime";var yn={load:i(()=>import("../email-otp-view-CL76K5TY.js"),"load")};function dt({locale:e,strings:t,...n}){let r=v(e,t),[a,s]=fn(0),o=mn(()=>dn(()=>yn.load().then(u=>({default:u.EmailOtpView}))),[a]),l=gn(P,{tone:"danger",children:[he("span",{children:r.t("errors.network_error")}),he(h,{kind:"secondary",onClick:()=>s(u=>u+1),children:r.t("common.retry")})]});return he(ee,{fallback:l,children:he(pn,{fallback:he("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:he(o,{...n,i18n:r})})},a)}i(dt,"EmailOtpStep");import{lazy as kn,Suspense as Sn,useMemo as hn,useState as bn}from"react";import{jsx as be,jsxs as Cn}from"react/jsx-runtime";var vn={load:i(()=>import("../eid-view-IQRZGEMP.js"),"load")};function pt({locale:e,strings:t,...n}){let r=v(e,t),[a,s]=bn(0),o=hn(()=>kn(()=>vn.load().then(u=>({default:u.EidView}))),[a]),l=Cn(P,{tone:"danger",children:[be("span",{children:r.t("errors.network_error")}),be(h,{kind:"secondary",onClick:()=>s(u=>u+1),children:r.t("common.retry")})]});return be(ee,{fallback:l,children:be(Sn,{fallback:be("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")}),children:be(o,{...n,i18n:r})})},a)}i(pt,"EidStep");import{useMemo as wn}from"react";import{jsx as mt,jsxs as Nn}from"react/jsx-runtime";function ft({step:e,locale:t,strings:n,className:r,onError:a}){let s=v(t,n),{busy:o,error:l,run:u}=so(s,a),p=wn(()=>e.choice.options.flatMap(g=>{let k=ro(g,s),m=no[g.service];return k===null?[]:[{id:g.id,label:k,glyph:m&&mt(M,{name:m})}]}),[e.choice.options,s]),f=e.choice.options.find(g=>g.service==="national_eid");return Nn("div",{className:r,children:[mt(Dt,{title:s.t("method.heading"),description:s.t("method.description"),options:p,busy:o,error:l,focus:!0,testId:"sekyro-method",onChoose:g=>u(()=>e.choose(g))}),f?.nationalEid?.afterPass==="continue"?mt(B,{view:"EidContinueHint",i18n:s,provider:f.nationalEid.providerName,quiet:!0}):null]})}i(ft,"MethodChoice");import{isValidNni as _n,normalizeNni as ko}from"@sekyro/web";import{useId as Pn,useState as yt}from"react";import{Fragment as En,jsx as F,jsxs as ve}from"react/jsx-runtime";var xn=new Set(["nni_not_found","registry_record_not_found"]),In=new Set(["nni_invalid","id_number_invalid"]);function Qe({step:e,locale:t,strings:n,className:r,onError:a}){let s=v(t,n),{t:o}=s,[l,u]=yt(""),[p,f]=yt(!1),[g,k]=yt(null),m=Pn(),y=e.attemptsExhausted,w=i(async U=>{f(!0),k(null);try{await U()}catch(D){k(ue(D,s.strings)),a?.(D)}finally{f(!1)}},"run"),N=i(U=>{if(U.preventDefault(),e.source!=="typed"){w(()=>e.confirm());return}let D=ko(l);if(!/^\d{10}$/.test(D))return k("population.invalid");if(!_n(D))return k("population.reason_id_number_invalid");w(()=>typeof e.submitIdNumber=="function"?e.submitIdNumber(D):e.submitNni(D))},"onSubmit"),O=We(s,e.attemptsRemaining,y),R=e.reason!==void 0&&xn.has(e.reason),S=e.reason!==void 0&&In.has(e.reason),x=ve(En,{children:[e.reason==="registry_unavailable"?ve(P,{tone:"warning",children:[F("span",{children:o("population.reason_registry_unavailable")}),F("span",{children:O})]}):null,R&&e.canUseDocument?ve(P,{tone:"warning",children:[F("span",{children:o("population.reason_registry_record_not_found_or_document")}),F("span",{children:O}),F(h,{kind:"secondary",disabled:p,onClick:()=>{w(()=>e.useDocument())},children:o("population.useDocument")})]}):null,R&&!e.canUseDocument||S?ve(P,{tone:"danger",children:[F("span",{children:o(R?"population.reason_registry_record_not_found":"population.reason_id_number_invalid")}),F("span",{children:O})]}):null,y&&e.reason===void 0?F(P,{tone:"danger",children:F("span",{children:O})}):null,g!==null?F(P,{tone:"danger",children:F("span",{children:o(g)})}):null]}),[_,Z,H]=e.source==="document"?["population.fromDocument.title","population.fromDocument.description","population.fromDocument.continue"]:e.source==="bound"?["session.steps.population.title","population.bound.description","population.bound.confirm"]:e.recheck?["population.recheck.title","population.recheck.description","population.submit"]:["session.steps.population.title","session.steps.population.description","population.submit"];return ve("form",{className:`sekyro-step${r?` ${r}`:""}`,"aria-labelledby":m,onSubmit:N,noValidate:!0,children:[F(J,{id:m,title:o(_),lead:o(Z)}),x,e.source==="typed"?ve("div",{className:"sekyro-field",children:[F("label",{className:"sekyro-label",htmlFor:`${m}-id-number`,children:o("population.label")}),F("input",{id:`${m}-id-number`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:o("population.placeholder"),value:l,"aria-describedby":`${m}-id-number-help`,"aria-invalid":g==="population.invalid"||g==="population.reason_id_number_invalid"||void 0,onChange:U=>{k(null),u(ko(U.target.value).replace(/\D/g,"").slice(0,10))}}),F("span",{id:`${m}-id-number-help`,className:"sekyro-help",children:o("population.helper")})]}):null,F(j,{children:y?null:F(h,{type:"submit",full:!0,disabled:p,"aria-busy":p||void 0,children:o(H)})})]})}i(Qe,"IdNumberEntry");function Tn(e){return Qe(e)}i(Tn,"NniEntry");import{acceptedIssuers as Ln,acceptedTypesFor as Co,warmDocumentCapture as An}from"@sekyro/web";import{lazy as Vn,Suspense as Fn,useEffect as Dn,useMemo as Mn,useState as kt}from"react";import{acceptedIssuers as Rn,acceptedTypesFor as gt}from"@sekyro/web";import{useEffect as So,useMemo as ho,useState as bo}from"react";import{jsx as q,jsxs as Xe}from"react/jsx-runtime";var On=220;function Bn(e,t,n=[],r){let a=null;try{a=new Intl.DisplayNames([e],{type:"region"})}catch{}let s=t.map(u=>({code:u,name:a?.of(u)??u})),o=new Intl.Collator(e),l=i(u=>{if(u===r)return-1;let p=n.indexOf(u);return p<0?n.length:p},"rank");return s.sort((u,p)=>l(u.code)-l(p.code)||o.compare(u.name,p.name))}i(Bn,"countryNames");function vo({step:e,i18n:t,issuer:n,onPicked:r,ageStepUp:a=!1}){let{t:s,locale:o}=t,l=ho(()=>Rn(e.documents),[e.documents]),u=ho(()=>Bn(o,l,Object.keys(e.documents.byIssuer??{}),e.detectedCountry),[o,l,e.documents,e.detectedCountry]),p=l.length===1?l[0]:null,[f,g]=bo(n??p),[k,m]=bo(null),y=p===null?[]:gt(e.documents,p),w=p!==null&&y.length===1?y[0]:null;So(()=>{p!==null&&w!==null&&e.selectDocument(p,w)},[p,w]);let N=i((S,x)=>{e.selectDocument(S,x),r?.()},"pick"),O=i(S=>{let x=gt(e.documents,S);x.length===1?N(S,x[0]):g(S)},"chooseIssuer");if(So(()=>{if(k===null||f===null)return;let S=setTimeout(()=>N(f,k),On);return()=>clearTimeout(S)},[k]),Ge(f!==null&&l.length>1&&n===void 0?()=>{g(null),m(null)}:null),w!==null)return null;if(f===null)return Xe("section",{className:"sekyro-step",children:[q(J,{title:s("doc.countryTitle"),lead:s(a?"doc.ageStepUp":"doc.pickDescription")}),q(Yt,{countries:u,label:s("doc.countryLabel"),searchPlaceholder:s("doc.countrySearch"),noMatch:s("doc.noCountryMatch"),onPick:O}),q(j,{children:null})]});let R=gt(e.documents,f);return Xe("section",{className:"sekyro-step",children:[q(J,{title:s("doc.pickTitle"),lead:s(a&&p!==null?"doc.ageStepUp":"native.doc.holdIt")}),q("div",{className:"sekyro-choices",children:R.map(S=>Xe("button",{type:"button",className:"sekyro-card","aria-pressed":k===S,disabled:k!==null&&k!==S,onClick:()=>m(S),children:[q("span",{className:"sekyro-card__tile",children:q(M,{name:S==="passport"?"passport":"card"})}),Xe("span",{className:"sekyro-card__body",children:[q("span",{className:"sekyro-card__title",children:s(`doc.type.${S}`)}),q("span",{className:"sekyro-card__sub",children:s(`doc.sub.${S}`)})]}),q("span",{className:"sekyro-radio","aria-hidden":"true"})]},S))}),l.length>1?q("button",{type:"button",className:"sekyro-link",onClick:()=>{g(null),m(null)},children:s("native.doc.changeCountry")}):null,q(j,{children:null})]})}i(vo,"DocumentPicker");import{jsx as re,jsxs as Un}from"react/jsx-runtime";var Hn={load:i(()=>import("../document-capture-view-GENB535Z.js"),"load")};function St({step:e,locale:t,strings:n,className:r,liveMrz:a,barcodeAssetBaseUrl:s}){let o=v(t,n),[l,u]=kt(0),[p,f]=kt(null),g=Ln(e.documents),k=g.length>1,m=e.issuer!==null&&Co(e.documents,e.issuer).length>1,y=e.documentType===null||e.issuer===null||p!==null,w=g.length===1&&Co(e.documents,g[0]).length===1,[N]=kt(()=>y&&!w),O=e.ageStepUp===!0,R=Mn(()=>Vn(()=>Hn.load().then(x=>({default:x.DocumentCaptureView}))),[l]);Dn(()=>{An()},[]);let S=Un(P,{tone:"danger",children:[re("span",{children:o.t("errors.network_error")}),re(h,{kind:"secondary",onClick:()=>u(x=>x+1),children:o.t("doc.retryCamera")})]});return re("div",{className:r,children:y?re(vo,{step:e,i18n:o,ageStepUp:O&&p===null&&N,...p==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>f(null)}):re(ee,{fallback:S,children:re(Fn,{fallback:re("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")}),children:re(R,{step:e,i18n:o,ageLead:O&&!N,liveMrz:e.documentType==="drivers_license"?void 0:a,barcodeAssetBaseUrl:s,...k?{onChangeCountry:i(()=>f("country"),"onChangeCountry")}:{},...m?{onChangeDocument:i(()=>f("document"),"onChangeDocument")}:{}})})},l)})}i(St,"DocumentCapture");import{warmPortraitCapture as $n}from"@sekyro/web";import{Component as Kn,lazy as wo,Suspense as No,useContext as zn,useEffect as Gn,useMemo as _o,useState as Po}from"react";import{jsx as E,jsxs as je}from"react/jsx-runtime";var qn={load:i(()=>import("../portrait-capture-view-VTN2VU3E.js"),"load")},Yn={load:i(()=>import("../portrait-review-view-JTRGDYNV.js"),"load")},bt=class bt extends Kn{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};i(bt,"LoadBoundary");var Je=bt;function Wn({step:e,i18n:t}){let{t:n}=t,r=ke();return je("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[E("h2",{ref:r,tabIndex:-1,className:"sekyro-text-body",children:n(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?E("p",{className:"sekyro-text-muted",children:n("portrait.reviewDescription")}):null,e.uploadFailed?je(P,{tone:"danger",children:[E("span",{children:n("portrait.uploadFailed")}),E(h,{kind:"secondary",onClick:()=>{e.resubmit()},children:n("portrait.sendAgain")})]}):E("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:n("portrait.matching")})]})}i(Wn,"MatchPhase");function ht({step:e,locale:t,strings:n,className:r,assetBaseUrl:a,verification:s}){let o=v(t,n),l=Mt(s),u=zn(Ye),[p,f]=Po(0),[g,k]=Po(null),m=_o(()=>wo(()=>qn.load().then(H=>({default:H.PortraitCaptureView}))),[p]),y=_o(()=>wo(()=>Yn.load().then(H=>({default:H.PortraitScreens}))),[p]),w=typeof e.uploadPortrait=="function",N=w?e.photo?.source??"camera":"camera",O=w&&N!=="camera"&&e.photo?.uploadOffered===!0,R=N!=="upload",S=N==="upload"?"upload":N==="choice"?g??e.photo?.pick??"source":"camera",x=e.phase==="capture"&&e.photo?.cameraOnPhone===!0;if(Gn(()=>{e.phase==="capture"&&S==="camera"&&!x&&$n()},[e.phase,S,x]),e.phase==="match")return E("div",{className:r,children:E(Wn,{step:e,i18n:o})});let _=E("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")});if(u!==null&&(u.busy||u.failed!==null)&&e.phase==="capture"&&S==="camera")return je("section",{className:`sekyro-step${r?` ${r}`:""}`,children:[E(J,{title:o.t("session.steps.portrait.title")}),E(j,{children:E(h,{kind:"secondary",full:!0,disabled:u.busy,onClick:u.reset,children:o.t("portrait.retryCamera")})})]});if(e.phase==="review"||S!=="camera"||x)return E("div",{className:r,children:E(Je,{fallback:E(h,{kind:"ghost",onClick:()=>f(H=>H+1),children:o.t("common.retry")}),children:E(No,{fallback:_,children:E(y,{screen:e.phase==="review"?"review":x&&S==="camera"?"phone":S==="camera"?"review":S,step:e,i18n:o,...R?{onCamera:i(()=>k("camera"),"onCamera")}:{},onUpload:()=>k("upload"),onDeclined:()=>k(null)})})},p)});if(!l.settled)return E("div",{className:r,children:_});let Z=je(P,{tone:"danger",children:[E("span",{children:o.t("errors.network_error")}),E(h,{kind:"secondary",onClick:()=>f(H=>H+1),children:o.t("portrait.retryCamera")})]});return E("div",{className:r,children:E(Je,{fallback:Z,children:E(No,{fallback:_,children:E(m,{step:e,i18n:o,...a!==void 0?{assetBaseUrl:a}:{},...O?{onUpload:i(()=>k("upload"),"onUpload")}:{}})})},p)})}i(ht,"PortraitCapture");import{lazy as Zn,Suspense as Qn,useMemo as Xn,useState as Jn}from"react";import{jsx as de,jsxs as er}from"react/jsx-runtime";var jn={load:i(()=>import("../proof-of-address-view-UQOZZXQO.js"),"load")};function vt({step:e,locale:t,strings:n,className:r}){let a=v(t,n),[s,o]=Jn(0),l=Xn(()=>Zn(()=>jn.load().then(p=>({default:p.ProofOfAddressView}))),[s]),u=er(P,{tone:"danger",children:[de("span",{children:a.t("errors.network_error")}),de(h,{kind:"secondary",onClick:()=>o(p=>p+1),children:a.t("common.retry")})]});return de("div",{className:r,children:de(ee,{fallback:u,children:de(Qn,{fallback:de("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:a.t("common.loading")}),children:de(l,{step:e,i18n:a})})},s)})}i(vt,"ProofOfAddress");import{lazy as tr,Suspense as or,useMemo as nr,useState as rr}from"react";import{jsx as pe,jsxs as ir}from"react/jsx-runtime";var sr={load:i(()=>import("../form-view-MEYCK437.js"),"load")};function Ct({step:e,locale:t,strings:n,className:r,onError:a}){let s=v(t,n),[o,l]=rr(0),u=nr(()=>tr(()=>sr.load().then(f=>({default:f.FormView}))),[o]),p=ir(P,{tone:"danger",children:[pe("span",{children:s.t("errors.network_error")}),pe(h,{kind:"secondary",onClick:()=>l(f=>f+1),children:s.t("common.retry")})]});return pe("div",{className:r,children:pe(ee,{fallback:p,children:pe(or,{fallback:pe("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:s.t("common.loading")}),children:pe(u,{step:e,i18n:s,...a!==void 0?{onError:a}:{}})})},o)})}i(Ct,"FormStep");import{cameraUnavailableCauseOf as xr}from"@sekyro/web";import{useCallback as te,useContext as Ir,useEffect as Ve,useId as Tr,useMemo as Rt,useRef as oe,useState as W}from"react";var wt={light:{lineBrand:"#0d3b66",successSoft:"#d5f0e8",successFg:"#005341",onSuccess:"#ffffff",warningSoft:"#fff7e6",warningFg:"#735003",onWarning:"#191a1b",dangerSoft:"#ffdada",dangerFg:"#ca0f07",onDanger:"#ffffff",info:"#0563d4",infoSoft:"#d3e5ff",infoFg:"#064da5",onInfo:"#ffffff"},dark:{lineBrand:"#3f80bf",successSoft:"#002c23",successFg:"#53ffd4",onSuccess:"#030303",warningSoft:"#463102",warningFg:"#ffd98a",onWarning:"#030303",dangerSoft:"#9c1008",dangerFg:"#ffbbbb",onDanger:"#030303",info:"#5da9ff",infoSoft:"#063778",infoFg:"#acd0ff",onInfo:"#030303"},sizes:{buttonHeight:"52px",controlRadius:"10px",cardRadius:"16px",fieldRadius:"10px",iconTile:"56px",iconTileRadius:"16px",headerTile:"40px",choiceTile:"40px",tileRadius:"10px",resultDisc:"64px",resultRing:"8px",progressHeight:"4px",focusRing:"2px",focusRingOffset:"2px",otpBox:"60px",choiceMinHeight:"76px",stepGap:"32px",headingGap:"12px"},motion:{page:"320ms",easeOut:"cubic-bezier(0.16, 1, 0.3, 1)"}};var Be={light:{danger:{base:"#ca0f07",soft:"#ffdada",fg:"#ca0f07",on:"#ffffff"},success:{base:"#007a5e",soft:"#d5f0e8",fg:"#005341",on:"#ffffff"},warning:{base:"#ffab00",soft:"#fff7e6",fg:"#735003",on:"#191a1b"},info:{base:"#0563d4",soft:"#d3e5ff",fg:"#064da5",on:"#ffffff"}},dark:{danger:{base:"#ff7c7c",soft:"#9c1008",fg:"#ffbbbb",on:"#030303"},success:{base:"#00c897",soft:"#002c23",fg:"#53ffd4",on:"#030303"},warning:{base:"#ffbb2e",soft:"#463102",fg:"#ffd98a",on:"#030303"},info:{base:"#5da9ff",soft:"#063778",fg:"#acd0ff",on:"#030303"}}},ar=["danger","success","warning","info"];function Nt(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}i(Nt,"channel");function xo(e){let t=Nt(parseInt(e.slice(1,3),16)),n=Nt(parseInt(e.slice(3,5),16)),r=Nt(parseInt(e.slice(5,7),16));return .2126*t+.7152*n+.0722*r}i(xo,"luminance");function lr(e,t){let n=xo(e),r=xo(t),a=Math.max(n,r),s=Math.min(n,r);return(a+.05)/(s+.05)}i(lr,"contrastRatio");function Io(e,t){return Math.min(...ar.map(n=>lr(Be[e][n].fg,t)))}i(Io,"worstAgainst");function To(e,t,n){return Math.min(Io(e,t),Io(e,n))}i(To,"worstStatusContrast");function Eo(e,t){return To("light",e,t)>=To("dark",e,t)?"light":"dark"}i(Eo,"statusSchemeFor");import{useRef as dr,useState as pr}from"react";import{useEffect as cr,useId as ur,useRef as _t}from"react";import{jsx as Ce,jsxs as Ro}from"react/jsx-runtime";function et({open:e,title:t,closeLabel:n,onClose:r,children:a,actions:s,role:o,testId:l,returnFocus:u}){let p=_t(null),f=_t(null),g=_t(!1),k=ur();return cr(()=>{let m=p.current;if(m!==null){if(e&&!m.open?(f.current=typeof document>"u"?null:document.activeElement,typeof m.showModal=="function"?m.showModal():m.setAttribute("open","")):!e&&m.open&&(typeof m.close=="function"?m.close():m.removeAttribute("open")),!e&&g.current){let y=u?.current??(f.current instanceof HTMLElement?f.current:null);f.current=null,y?.focus()}g.current=e}},[e,u]),Ce("dialog",{ref:p,className:"sekyro-dialog","aria-labelledby":k,...o==="alertdialog"?{role:o}:{},"data-testid":l,onCancel:m=>{m.preventDefault(),r()},onClick:m=>{m.target===m.currentTarget&&r()},children:Ro("div",{className:"sekyro-dialog__panel",children:[Ro("div",{className:"sekyro-dialog__head",children:[Ce("h2",{id:k,className:"sekyro-dialog__title",children:t}),n!==void 0?Ce("button",{type:"button",className:"sekyro-disc sekyro-dialog__close","aria-label":n,onClick:r,children:Ce(M,{name:"close"})}):null]}),a!==void 0?Ce("div",{className:"sekyro-dialog__body",children:a}):null,s!==void 0?Ce("div",{className:"sekyro-dialog__actions",children:s}):null]})})}i(et,"FlowDialog");import{jsx as Le,jsxs as Oo}from"react/jsx-runtime";var mr=["intro","data","processing","sharing","retention"];function Bo({i18n:e,purpose:t="identity"}){let{t:n}=e,[r,a]=pr(!1),s=dr(null),[o,l=""]=n("consent.short").split("{terms}");return Oo("div",{className:"sekyro-consent","data-testid":"sekyro-consent",children:[Oo("p",{className:"sekyro-consent__line",children:[o,Le("button",{ref:s,type:"button",className:"sekyro-link sekyro-link--inline","aria-haspopup":"dialog",onClick:()=>a(!0),children:n("consent.termsLink")}),l]}),Le(et,{open:r,title:n("consent.termsTitle"),closeLabel:n("native.close"),onClose:()=>a(!1),returnFocus:s,testId:"sekyro-consent-terms",children:Le("div",{className:"sekyro-stack sekyro-stack--3",children:t==="human"?Le(B,{view:"HumanConsentTerms",i18n:e,quiet:!0}):mr.map(u=>Le("p",{children:n(`consent.terms.${u}`)},u))})})]})}i(Bo,"ConsentNotice");function Lo(e){let t=e.trim().split(/\s+/).filter(r=>r!=="");return(t.length>=2?[t[0],t[1]].map(r=>Array.from(r??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}i(Lo,"initials");import{useSyncExternalStore as fr}from"react";var Fo=i(e=>({colors:{...e?$.dark:$.light},radius:$.radius,fontFamily:$.font}),"brandTheme"),ea=Fo(!1),Ao=/^#[0-9a-f]{6}$/i;function Pt(e,t,n){if(t)return null;let r=it(e).colors,a=n?.colors?.bg??r?.bg,s=n?.colors?.surface??r?.surface;return a===void 0&&s===void 0||a!==void 0&&!Ao.test(a)||s!==void 0&&!Ao.test(s)?null:Eo(a??$.light.bg,s??$.light.surface)}i(Pt,"partnerStatusScheme");function tt(e,t,n){let r=it(e);if(n&&r.colors!==void 0){let{brand:a,brandFg:s}=r.colors;a!==void 0&&Sr(a,$.dark.bg)>=3?r.colors={brand:a,ring:a,...s!==void 0?{brandFg:s}:{}}:delete r.colors}if(Pt(e,n,t)==="dark"){let a=Be.dark;r.colors={...r.colors,danger:a.danger.base,success:a.success.base,warning:a.warning.fg}}return ze(Fo(n),r,Ut(t))}i(tt,"verificationTheme");function ot(e){let t=fr(kr,gr,()=>!1);return e==="dark"||e==="system"&&t}i(ot,"useDarkScheme");var yr="(prefers-color-scheme: dark)",Do=i(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(yr):null,"media"),gr=i(()=>Do()?.matches??!1,"prefersDark");function kr(e){let t=Do();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}i(kr,"subscribe");function Sr(e,t){let[n,r]=[Vo(e),Vo(t)];return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}i(Sr,"contrast");function Vo(e){let t=[1,3,5].map(n=>{let r=Number.parseInt(e.slice(n,n+2),16)/255;return r<=.03928?r/12.92:((r+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}i(Vo,"luminance");var xt="sekyro.testerGate";function It(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}i(It,"store");function Mo(e=Date.now()){try{It()?.setItem(xt,String(e))}catch{}}i(Mo,"rememberTester");function Ho(e=Date.now()){try{let t=Number(It()?.getItem(xt)??"");return Number.isFinite(t)&&t>0&&e-t<2592e6}catch{return!1}}i(Ho,"rememberedTester");function Uo(){try{It()?.removeItem(xt)}catch{}}i(Uo,"forgetTester");import{useEffect as hr,useId as br,useState as vr}from"react";import{jsx as A,jsxs as me}from"react/jsx-runtime";var $o=new Set(["document_id_number_mismatch","name_mismatch","birth_date_mismatch"]),Cr={review:{icon:"pending",tone:"info"},cooldown:{icon:"timer",tone:"info"},rejected:{icon:"close",tone:"neutral"},policy:{icon:"close",tone:"neutral"},inconclusive:{icon:"warning",tone:"neutral"},unavailable:{icon:"timer",tone:"neutral"},expired:{icon:"timer",tone:"neutral"}};function wr({screen:e}){if(e==="verified")return me("svg",{className:"sekyro-outcome sekyro-outcome--approved",viewBox:"0 0 136 136","aria-hidden":"true",focusable:"false",children:[A("circle",{className:"sekyro-outcome__ring",cx:"68",cy:"68",r:"54",pathLength:"1"}),A("circle",{className:"sekyro-outcome__disc",cx:"68",cy:"68",r:"48"}),A("path",{className:"sekyro-outcome__glyph",d:"M6.5 12.5l3.6 3.6 7.4-8.2",pathLength:"1",transform:"translate(39 39) scale(2.4167)"})]});let{icon:t,tone:n}=Cr[e];return A("span",{className:`sekyro-tile sekyro-tile--${n} sekyro-outcome-tile`,"aria-hidden":"true","data-screen":e,children:A(M,{name:t})})}i(wr,"OutcomeMark");function Nr({label:e,id:t,copied:n}){let[r,a]=vr(!1);return hr(()=>{if(!r)return;let s=setTimeout(()=>a(!1),1600);return()=>clearTimeout(s)},[r]),me("button",{type:"button",className:`sekyro-reference${r?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>a(!0),()=>{})},children:[A("span",{"aria-live":"polite",children:r?n:e}),A("bdi",{dir:"ltr",children:t}),A(M,{name:"copy"})]})}i(Nr,"ReferenceLine");function _r({step:e,t}){let n=e.context.sandbox?e.context.simulation?.reason:void 0;return n===void 0?null:me(Re,{tone:"warning",role:"status",testId:"sekyro-simulated-notice",children:[A("span",{className:"sekyro-notice__icon","aria-hidden":"true",children:A(M,{name:"info"})}),me("div",{className:"sekyro-notice__body","data-reason":n,children:[A("strong",{children:t("sandbox.simulatedTitle")}),A("span",{children:t(n==="no_testers"?"sandbox.simulatedNoTesters":"sandbox.simulatedGate")})]})]})}i(_r,"SimulationNotice");function Pr(e,t){return e==="expired"?"native.result.expiredTitle":e!=="verified"?`session.result.${e}.title`:t.level===3?"session.result.verified.title":t.level===1&&t.assurance==="contact_phone"?"session.result.verified.titlePhone":t.level===1&&t.assurance==="contact_email"?"session.result.verified.titleEmail":t.level===1?"session.result.verified.titleContact":"session.result.verified.titleHuman"}i(Pr,"resultTitleKey");function Tt({step:e,locale:t,strings:n,className:r,onClose:a}){let s=v(t,n),{t:o}=s,l=br(),u=ke(),p=e.context.orgName,f=e.reasonCode??"",g=e.display==="platform_unsupported"?"policy":e.display,k=i(y=>(p!==""||y==="verified")&&y!=="cooldown"?o(`native.result.${y}`,{org:p}):o(`session.result.${y}.description`),"partnerLine"),m;switch(e.display){case"rejected":f==="identity_not_verified"?m=p!==""?o("reasons.identity_not_verified",{org:p}):o("session.result.identityNotVerified"):m=$o.has(rt(f))?o("session.result.detailsMismatch",{org:p}):k("rejected");break;case"policy":{if($o.has(rt(f)))m=o("session.result.detailsMismatch",{org:p});else if(f==="device_velocity_exceeded")m=o("session.result.deviceVelocity",{org:p});else if(f==="capture_tampered")m=o("session.result.deviceStop");else if(f==="camera_unavailable")m=o("reasons.camera_unavailable",{org:p});else if(f==="underage_estimated")m=o("reasons.underage_estimated");else if(f==="starter_credit_claimed")m=o("reasons.starter_credit_claimed");else if(f==="blocked_by_org")m=o("reasons.blocked_by_org");else{let y=f===""?null:Lt(f);m=y!==null?o(y,{org:p}):k("policy")}break}case"cooldown":{let y=At(s.locale,e.retryAfter);m=y!==null?o(y.key,{time:y.time}):o("session.result.cooldown.description");break}case"platform_unsupported":m=o("result.platform_unsupported");break;default:m=k(g)}return me("section",{className:`sekyro-result${r?` ${r}`:""}`,"aria-labelledby":l,"data-testid":"sekyro-result",children:[me("div",{className:"sekyro-result__body",children:[A(wr,{screen:g}),me("div",{className:"sekyro-heading",children:[A("h2",{id:l,ref:u,tabIndex:-1,className:"sekyro-text-body",children:o(Pr(g,e.result))}),A("p",{className:"sekyro-text-muted",children:m})]}),A(_r,{step:e,t:o}),A(Nr,{label:o("result.referenceLabel"),id:e.context.sessionId,copied:o("native.result.copied")})]}),a!==void 0?A("div",{className:"sekyro-actions",children:A(h,{full:!0,onClick:a,children:o("native.result.continue",{org:p})})}):null]})}i(Tt,"VerificationResultScreen");import{Fragment as Ae,jsx as c,jsxs as Y}from"react/jsx-runtime";function Er(e,t,n){let r=t?$.dark:$.light,a=t?$.roles.dark:$.roles.light,s=e.colors??{},o={},l=s.fg===r.fg&&s.surface===r.surface;s.brand===r.brand&&s.surface===r.surface&&(o["--sekyro-color-brand-soft"]=a.brandSoft),l&&(o["--sekyro-color-line"]=a.line,o["--sekyro-color-line-subtle"]=a.lineSubtle,o["--sekyro-color-line-strong"]=a.lineStrong,o["--sekyro-color-sunken"]=a.sunken),s.fgMuted===r.fgMuted&&s.surface===r.surface&&(o["--sekyro-color-fg-subtle"]=a.fgSubtle),e.fontFamily===$.font&&(o["--sekyro-font-display"]=$.fontDisplay);let u=t?wt.dark:wt.light;if(o["--sekyro-color-success-soft"]=u.successSoft,o["--sekyro-color-success-fg"]=u.successFg,o["--sekyro-color-on-success"]=u.onSuccess,o["--sekyro-color-warning-soft"]=u.warningSoft,o["--sekyro-color-warning-fg"]=u.warningFg,o["--sekyro-color-danger-soft"]=u.dangerSoft,o["--sekyro-color-danger-fg"]=u.dangerFg,o["--sekyro-color-on-danger"]=u.onDanger,o["--sekyro-color-info-soft"]=u.infoSoft,o["--sekyro-color-info-fg"]=u.infoFg,s.brand===r.brand&&(o["--sekyro-color-line-brand"]=u.lineBrand),n!==null){let p=Be[n];for(let f of["danger","success","warning","info"])o[`--sekyro-color-${f}-soft`]=p[f].soft,o[`--sekyro-color-${f}-fg`]=p[f].fg;o["--sekyro-color-on-success"]=p.success.on,o["--sekyro-color-on-danger"]=p.danger.on}return o}i(Er,"flowRoles");function Ot(e){let{verification:t,locale:n,strings:r,onStep:a,onResult:s}=e,{step:o,error:l}=ct(t);Ve(()=>{o!==null&&a?.(o)},[o,a]),Ve(()=>s===void 0?void 0:t.on("result",s),[t,s]);let u=ot(e.colorScheme??"light"),p=o?.context.branding,f=tt(p,e.theme,u),[g,k]=W(!1),m=`sekyro-verification${u?" sekyro-verification--dark":""}${g?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,y=oe(e.onClose);y.current=e.onClose;let w=oe(o);w.current=o;let N=te(()=>{let _=w.current;y.current?.(_?.kind==="result"?{reason:"finished",result:_.result}:{reason:"cancelled"})},[]),[O,R]=W(null),S=te(()=>{let _=w.current;_!==null&&_.kind!=="result"&&_.context.consentRecorded?R("close"):N()},[N]),x=Rt(()=>t.reportCaptureIssue===void 0?null:_=>t.reportCaptureIssue?.(_),[t]);return c(Kt,{theme:f,className:m,children:c(Oe,{locale:n,...r!==void 0?{strings:r}:{},children:c("div",{dir:e.dir??(n==="ar"?"rtl":"ltr"),lang:n,className:"sekyro-flow",style:Er(f,u,Pt(p,u,e.theme)),children:c(Jt.Provider,{value:k,children:c(at.Provider,{value:e.onClose!==void 0?N:void 0,children:c(qe.Provider,{value:e.onClose!==void 0?S:void 0,children:Y(Ft.Provider,{value:x,children:[c(Vr,{...e,step:o,error:l,immersive:g,onLeaveAsk:()=>R("history"),onClosed:N}),c(Br,{open:O!==null,onStay:()=>{O==="history"&&Et(),R(null)},onLeave:()=>{let _=O;R(null),_==="close"||e.onClose!==void 0?N():typeof window<"u"&&qo()}})]})})})})})})})}i(Ot,"SekyroVerification");function Rr(e,t){if(t===void 0||t==="aml_screening")return null;let n=e,r=n[`session.processing.${t}.title`],a=n[`session.processing.${t}.description`];return typeof r=="string"&&r!==""&&typeof a=="string"&&a!==""?{title:r,description:a}:null}i(Rr,"processingCopyOf");function Or({error:e,retry:t}){let{t:n}=v(),r=ke();return Y(Re,{tone:"danger",testId:"sekyro-error-notice",children:[c("span",{children:n(Bt(e))}),e.retryable?c(h,{ref:r,kind:"secondary",className:"sekyro-btn--start",onClick:t,children:n("common.retry")}):null]})}i(Or,"CameraErrorNotice");var zo="sekyroFlow";function Go(){let e=window.history.state;return typeof e=="object"&&e!==null&&e[zo]===!0}i(Go,"onGuard");function Et(){if(typeof window>"u"||Go())return;let e=window.history.state;window.history.pushState({...typeof e=="object"&&e!==null?e:{},[zo]:!0},"")}i(Et,"pushGuard");function qo(){window.history.back()}i(qo,"leaveHistory");function Br({open:e,onStay:t,onLeave:n}){let{t:r}=v();return c(et,{open:e,role:"alertdialog",title:r("leave.title"),onClose:t,testId:"sekyro-leave",actions:Y(Ae,{children:[c(h,{full:!0,onClick:t,children:r("leave.stay")}),c(h,{full:!0,kind:"danger",onClick:n,children:r("leave.confirm")})]}),children:c("p",{className:"sekyro-text-muted",children:r("leave.body")})})}i(Br,"LeaveDialog");function Lr(e,t){let[n,r]=W(!1),[a,s]=W(null),o=e===null?void 0:e.skipCapture,l=oe(o);l.current=o;let u=oe(!1),p=e?.key;Ve(()=>s(null),[p]);let f=te(()=>{if(u.current)return;let y=l.current;y!==void 0&&(u.current=!0,r(!0),s(null),y().catch(w=>s(t.t(ue(w,t.strings)))).finally(()=>{u.current=!1,r(!1)}))},[t]),g=te(()=>s(null),[]),k=o!==void 0,m=t.t("sandbox.skipCapture");return Rt(()=>k?{label:m,busy:n,failed:a,run:f,reset:g}:null,[k,m,n,a,f,g])}i(Lr,"useSkipCapture");function Ar({skip:e}){return Y(Ae,{children:[e.failed!==null?c(P,{tone:"danger",children:c("span",{children:e.failed})}):null,c(h,{kind:"ghost",full:!0,disabled:e.busy,"aria-busy":e.busy||void 0,onClick:e.run,"data-testid":"sekyro-skip-capture",children:e.label})]})}i(Ar,"SkipAction");function Vr(e){let{step:t,error:n,slots:r,immersive:a}=e,s=v(),{t:o}=s,[l,u]=W(!1),[p,f]=W([]),g=te(d=>(f(I=>[...I,d]),()=>f(I=>I.filter(X=>X!==d))),[]),[k,m]=W(null),y=te(d=>m(()=>d),[]),[w,N]=W(0),[O,R]=W(null),S=Lr(t,s),x=t?.context.testerGate!==void 0,[_,Z]=W(!1),H=oe(null);Ve(()=>{!x||H.current!==null||(H.current=Ho(),H.current&&Z(!0))},[x]);let U=t?.context.purpose??"identity",D=t?.context.returning===!0,fe=e.verification,Ne=U==="human"||t?.context.cameraUnavailableHandled===!0,_e=fe.reportCameraUnavailable!==void 0&&Ne?d=>fe.reportCameraUnavailable?.(d)??Promise.resolve():void 0,Fe=t?.kind==="liveness"&&t.mode==="liveness"&&t.reason===void 0&&!t.attemptsExhausted,K=e.handoffUrl,De=oe({last:null,count:0}),se=te((d,I,X=!1)=>_e===void 0&&I!=="denied"?void 0:c(B,{view:"NoCameraView",i18n:s,quiet:!0,cause:I,onRetry:d,repeated:X,...Fe&&_e!==void 0?{onContinue:_e}:{},...K!==void 0?{handoffUrl:K}:{}}),[s,fe,Ne,Fe,K]),ye=Rt(()=>io(t),[t]),z=te((d,I)=>c(ao,{start:d,context:I,human:U==="human",returning:D,notice:I.permissionSettled&&I.permission==="denied"?se(d,"denied"):void 0,...ye!==void 0?{retry:ye}:{}}),[U,D,se,ye]),Me=te((d,I)=>{let X=xr(d.kind),Ke=De.current;d.kind==="permission"&&d!==Ke.last&&(Ke.last=d,Ke.count+=1);let Wo=d.kind==="permission"&&Ke.count>1;return(X!==void 0?se(I,X,Wo):void 0)??Y(Ae,{children:[c(Or,{error:d,retry:I}),X!==void 0&&K!==void 0?c(B,{view:"DesktopHandoffView",i18n:s,quiet:!0,url:K}):null]})},[se,K,s]),ne=oe(""),ie=e.livenessProps?.slots?.stageOverlay,Pe=te(d=>(d.guidance!==""&&!d.coached&&(ne.current=d.guidance),c(co,{testId:"sekyro-capture-stage",video:c("video",{ref:d.videoRef,playsInline:!0,muted:!0,className:"sekyro-lm-video sekyro-fc-video","aria-hidden":"true","data-testid":"sekyro-capture-video"}),instruction:d.settled?o("capture.checkingTitle"):d.guidance!==""?d.guidance:ne.current,note:d.note,status:d.status,busy:d.settled,progress:d.phase==="seeking"||d.phase==="aligning"?d.progress:1,still:d.still,live:d.live,closeLabel:o("native.close"),overlay:ie?.(d.videoRef),ramp:d.ramp?.colour??null,...d.settled?{}:{onClose:i(()=>N(I=>I+1),"onClose")},end:d.modeSwitch!=null?c(Vt,{view:d.modeSwitch,className:"sekyro-glass sekyro-glass--label"}):null,children:d.settled||!d.live?null:c(jt,{onStop:()=>N(I=>I+1)})})),[o,ie]),He=Tr(),Ue=t,ge=t!==null&&O===t.key&&t.context.switchable!==void 0,Q=k??(t===null||t.kind==="result"?null:ge?()=>R(null):t.context.switchable!==void 0&&typeof Ue?.chooseOption=="function"?()=>R(t.key):null),ae=oe(Q);ae.current=Q;let xe=oe(t);xe.current=t;let le=oe({ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0});le.current={ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0};let Ie=e.backNavigation==="history";if(Ve(()=>{if(!Ie||typeof window>"u")return;Et();let d=i(()=>{if(Go())return;let I=xe.current,X=ae.current;X!==null?(X(),Et()):I?.kind!=="result"&&I?.context.consentRecorded===!0?le.current.ask():le.current.hostClose?le.current.closed():qo()},"onPop");return window.addEventListener("popstate",d),()=>window.removeEventListener("popstate",d)},[Ie]),n!==null)return c(Re,{tone:"danger",children:c("span",{children:o(ue(n,s.strings))})});if(t===null)return Y("div",{className:"sekyro-skeleton",role:"status","aria-busy":"true",children:[c("span",{className:"sekyro-visually-hidden",children:o("common.loading")}),c("span",{className:"sekyro-skeleton__bar is-title"}),c("span",{className:"sekyro-skeleton__bar"}),c("span",{className:"sekyro-skeleton__bar is-short"}),c("span",{className:"sekyro-skeleton__bar is-block"})]});let{context:L}=t,Te=i(d=>{u(!0),d().finally(()=>u(!1))},"refresh"),nt=r?.header??c(Dr,{context:L,headerId:He,end:r?.headerEnd,...Q!==null?{onBack:Q}:{}}),T,ce=ge;if(_&&e.verification.testerGate!==void 0)T=c(st.Provider,{value:Pe,children:c(B,{view:"TesterGateView",i18n:s,verification:e.verification,attemptsLeft:L.testerGate?.attemptsLeft??0,livenessProps:{...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:e.livenessProps?.slots?.intro??z},locale:e.locale,dir:e.dir,strings:s.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice},onBound:()=>Mo(),onDone:d=>{d&&Uo(),Z(!1)}})});else if(ce)T=c(B,{view:"LaneChoiceView",i18n:s,step:t,onClose:()=>R(null)});else switch(t.kind){case"phone_otp":T=c(ut,{step:t});break;case"email_otp":T=c(dt,{step:t});break;case"method":T=c(ft,{step:t});break;case"registry":T=c(Qe,{step:t});break;case"document":T=c(St,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{},...e.documentBarcodeAssetBaseUrl!==void 0?{barcodeAssetBaseUrl:e.documentBarcodeAssetBaseUrl}:{}});break;case"liveness":{let d=e.livenessProps?.slots?.intro,I={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:d??z,...d===void 0&&e.livenessProps?.slots?.errorPanel===void 0?{errorPanel:Me}:{}},...w>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:s.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};T=c(st.Provider,{value:Pe,children:t.instructions==="icao"||t.livePhoto?.icao===!0?c(B,{view:"LivePhotoLiveness",i18n:s,step:t,livenessProps:I,sekyroIntro:d===void 0},w):c(Ht,{...I},w)});break}case"portrait":T=Y(Ae,{children:[t.retakeOnly?c(B,{view:"PortraitRetakeNotice",i18n:s,quiet:!0}):null,c(ht,{step:t,verification:e.verification,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"proof_of_address":T=c(vt,{step:t});break;case"form":T=c(Ct,{step:t});break;case"contact_choice":T=c(B,{view:"ContactChoiceView",i18n:s,step:t});break;case"choice":T=c(B,{view:"GenericChoiceView",i18n:s,step:t});break;case"identity_summary":T=c(B,{view:"IdentitySummaryView",i18n:s,step:t});break;case"mobile_required":{let d=t.checkType==="doc_ocr"?o("handoff.lead.document"):t.checkType==="portrait_icao"?o("handoff.lead.portrait"):t.checkType==="poa"?o("handoff.lead.poa"):void 0;T=e.handoffUrl!==void 0?c(B,{view:"HandoffView",i18n:s,url:e.handoffUrl,refresh:t.refresh,...d!==void 0?{lead:d}:{}}):c(Ze,{tone:"brand",icon:"smartphone",title:o("handoff.title"),actions:c(h,{kind:"secondary",full:!0,disabled:l,onClick:()=>Te(t.refresh),children:o("common.refresh")}),children:c("p",{children:d??o("reasons.mobile_required")})});break}case"native_app_required":T=c(B,{view:"NativeAppView",i18n:s,org:L.orgName,nativeApp:t.nativeApp,...e.handoffUrl!==void 0?{fallbackUrl:e.handoffUrl}:{},refresh:t.refresh,footer:c(Ko,{org:L.orgName})});break;case"processing":{let d=Rr(s.strings,t.service);T=c(Ze,{tone:"brand",icon:"pending",busy:!t.stalled,live:!0,title:d?.title??o("session.processing.title"),actions:t.stalled?c(h,{kind:"secondary",full:!0,disabled:l,onClick:()=>Te(t.refresh),children:o("common.refresh")}):null,children:c("p",{children:d?.description??o("session.processing.description")})});break}case"eid":T=c(pt,{step:t});break;case"unsupported":{let d=t.reason==="platform_unsupported";T=c(Ze,{tone:"neutral",icon:"smartphone",title:o(d?"needsApp.title":"unsupported.title"),actions:c(Ko,{org:L.orgName}),children:c("p",{children:d?L.orgName!==""?o("needsApp.description",{org:L.orgName}):o("needsApp.descriptionNoOrg"):o("unsupported.description",{org:L.orgName})})});break}case"result":T=r?.result?.(t)??c(Fr,{step:t});break;default:{let d=t;T=null}}let $e=!a&&!L.consentRecorded&&t.kind!=="result"?c(Bo,{i18n:s,purpose:L.purpose}):null,Ee=S!==null&&!a&&!ce&&!_?c(Ar,{skip:S}):null,C=x&&!_&&!a&&!ce&&e.verification.testerGate!==void 0?c(B,{view:"TesterGateAction",i18n:s,quiet:!0,onOpen:()=>Z(!0)}):null,V=Ee===null&&C===null?$e:Y(Ae,{children:[C,Ee,$e]});return c(Xt.Provider,{value:y,children:c(Ye.Provider,{value:S,children:c(lo.Provider,{value:e.handoffUrl,children:Y(Qt.Provider,{value:V===null?null:{node:V,owner:p[0]??null,claim:g},children:[a?null:nt,!a&&t.kind!=="result"&&L.sections.length>1?c(Mr,{context:L,current:t.section,i18n:s}):null,c(to,{pageKey:t.key,children:T}),!a&&!ce&&t.kind!=="result"&&t.context.switchable!==void 0?c(B,{view:"LaneSwitch",i18n:s,step:t,onOpen:()=>R(t.key),quiet:!0},t.key):null,p.length===0?V:null,a?null:r?.footer!==void 0?r.footer:L.branding?.hideAttribution===!0?null:Y("a",{className:"sekyro-footer",href:"https://sekyro.ai",target:"_blank",rel:"noopener noreferrer",children:[c(M,{name:"lock"}),o("shell.verifiedBy")]})]})})})})}i(Vr,"Body");function Ko({org:e}){let{t}=v(),n=Ir(at);return n===void 0?null:c(h,{full:!0,onClick:n,children:t("native.result.continue",{org:e})})}i(Ko,"BackToOrg");function Fr({step:e}){return c(qe.Consumer,{children:t=>c(Tt,{step:e,...t!==void 0?{onClose:t}:{}})})}i(Fr,"ResultPage");function Dr({context:e,headerId:t,end:n,onBack:r}){let{t:a}=v(),[s,o]=W(!1),l=s?void 0:e.branding?.logoUrl,u=e.orgName!==""?e.orgName:a(e.returning?"returning.heading":"session.title");return c("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:Y("div",{className:"sekyro-org",children:[r!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__back","aria-label":a("common.back"),onClick:r,"data-testid":"sekyro-back",children:c(M,{name:"back"})}):null,c("span",{className:"sekyro-org__tile","aria-hidden":"true",children:l!==void 0?c("img",{className:"sekyro-org__logo",src:l,alt:"",onError:()=>o(!0)}):Lo(e.orgName)}),Y("div",{className:"sekyro-org__text",children:[c("h1",{id:t,className:"sekyro-org__name",children:u}),c("p",{className:"sekyro-org__sub",children:a(e.purpose==="human"?"shell.subtitleHuman":"shell.subtitle")})]}),e.sandbox?c("span",{className:"sekyro-sandbox-badge","data-testid":"sekyro-sandbox-badge",children:a("app.sandboxBadge")}):null,n!=null?c("div",{className:"sekyro-org__end",children:n}):null,c(qe.Consumer,{children:p=>p!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":a("native.close"),onClick:p,children:c(M,{name:"close"})}):null})]})})}i(Dr,"OrgHeader");function Mr({context:e,current:t,i18n:n}){let r=t===null?-1:e.sections.indexOf(t),a=e.progress,s=a!==void 0&&a.length===e.sections.length?a:e.sections.map((o,l)=>({id:o,state:l<r?"done":l===r?"current":"upcoming"}));return c("ol",{className:"sekyro-progress__bars","aria-label":n.t("session.progressLabel"),children:s.map(({id:o,state:l})=>c("li",{className:`sekyro-progress__bar${l==="done"?" is-done":l==="current"?" is-current":""}`,...l==="current"?{"aria-current":"step"}:{},children:c("span",{className:"sekyro-visually-hidden",children:n.strings[`section.${o}`]??o})},o))})}i(Mr,"SectionProgress");import{useEffect as Hr,useState as Yo}from"react";import{jsx as we}from"react/jsx-runtime";function Ur(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}i(Ur,"pageUrl");function $r({hostedUrl:e,inAppBrowser:t,...n}){let[r,a]=Yo(t===!0);Hr(()=>{t===void 0&<()&&a(!0)},[t]);let[s,o]=Yo(!1),l=ot(n.colorScheme??"light"),u=n.handoffUrl??e??Ur();return r&&!s?we($t,{theme:ze(tt(void 0,void 0,l),n.theme),className:`sekyro-verification${l?" sekyro-verification--dark":""}${n.className!==void 0?` ${n.className}`:""}`,children:we(Oe,{locale:n.locale,...n.strings!==void 0?{strings:n.strings}:{},children:we("div",{dir:n.dir??(n.locale==="ar"?"rtl":"ltr"),lang:n.locale,className:"sekyro-flow",children:we(Kr,{url:u,onContinue:()=>o(!0)})})})}):we(Ot,{...n,...u!==""?{handoffUrl:u}:{}})}i($r,"SekyroFlow");function Kr({url:e,onContinue:t}){let n=v();return we(B,{view:"InAppBrowserPrompt",i18n:n,url:e,onContinue:t})}i(Kr,"Prompt");export{St as DocumentCapture,pt as EidStep,dt as EmailOtpStep,Ct as FormStep,Qe as IdNumberEntry,ft as MethodChoice,Tn as NniEntry,ut as PhoneOtpStep,ht as PortraitCapture,vt as ProofOfAddress,$r as SekyroFlow,Ot as SekyroVerification,Oe as StepI18nProvider,Tt as VerificationResultScreen,Xo as arSteps,Jo as enSteps,en as formatTemplate,jo as frSteps,lt as isInAppBrowser,Zo as loadSekyroLocale,tn as resolveSekyroStrings,Qo as retakeHintStringKey,v as useStepI18n,ct as useVerificationStep};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sekyro/react",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.32",
|
|
4
4
|
"description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (Arabic, French, English, Spanish, Portuguese and German, RTL-safe, WCAG AAA defaults)",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"strings:steps": "node scripts/gen-step-strings.mjs"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"@sekyro/web": "^0.1.0-rc.
|
|
78
|
+
"@sekyro/web": "^0.1.0-rc.34 || ^0.2.0-rc.0",
|
|
79
79
|
"react": ">=18.2",
|
|
80
80
|
"react-dom": ">=18.2"
|
|
81
81
|
},
|
package/sbom.cdx.json
CHANGED
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"type": "application",
|
|
98
98
|
"name": "react",
|
|
99
99
|
"group": "@sekyro",
|
|
100
|
-
"version": "0.1.0-rc.
|
|
101
|
-
"bom-ref": "@sekyro/react@0.1.0-rc.
|
|
100
|
+
"version": "0.1.0-rc.32",
|
|
101
|
+
"bom-ref": "@sekyro/react@0.1.0-rc.32",
|
|
102
102
|
"description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (Arabic, French, English, Spanish, Portuguese and German, RTL-safe, WCAG AAA defaults)",
|
|
103
103
|
"licenses": [
|
|
104
104
|
{
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
|
-
"purl": "pkg:npm/%40sekyro/react@0.1.0-rc.
|
|
111
|
+
"purl": "pkg:npm/%40sekyro/react@0.1.0-rc.32?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-react",
|
|
112
112
|
"externalReferences": [
|
|
113
113
|
{
|
|
114
114
|
"url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity/issues",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"components": [],
|
|
148
148
|
"dependencies": [
|
|
149
149
|
{
|
|
150
|
-
"ref": "@sekyro/react@0.1.0-rc.
|
|
150
|
+
"ref": "@sekyro/react@0.1.0-rc.32"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
}
|
package/dist/chunk-5EPFSWU5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as r}from"./chunk-2KED7D2Q.js";import{forwardRef as h}from"react";import{jsx as g}from"react/jsx-runtime";var C=h(r(function({kind:t="primary",full:n=!1,className:a,type:o,...s},c){let i=["sekyro-btn",`sekyro-btn--${t}`];return n&&i.push("sekyro-btn--full"),a!==void 0&&i.push(a),g("button",{ref:c,type:o??"button",className:i.join(" "),...s})},"Button"));var p={"capture.start":"Start camera","capture.recordAgain":"Start a new attempt","capture.switchCamera":"Switch camera","capture.preparing.title":"Preparing secure capture…","capture.checking":"We're checking your identity…","capture.checkingHint":"This usually takes a few seconds. Keep this page open","capture.securityNote":"Your images are encrypted and used only for this verification","capture.cameraOff":"Camera off","capture.previewAlt":"Preview of the captured image of your face","capture.retryCoaching.title":"That attempt didn't work. A few adjustments will help:","capture.retryCoaching.light":"Find good lighting, with the light on your face and not behind you","capture.retryCoaching.eyeLevel":"Hold your phone at eye level","capture.retryCoaching.head":"Look straight at the camera and keep your head upright","capture.retryTips.title":"Before you film again:","capture.retryOneFace.alone":"Make sure nobody is next to or behind the person being verified","capture.retryOneFace.screens":"Keep photos and screens that show a face out of view","capture.retryFrontCamera.screenSide":"The front camera is the one on the screen side, so you can see yourself","capture.retryBackCamera.backSide":"The back camera is the one on the side without the screen","capture.retryBackCamera.circle":"Hold the phone upright in front of the person, with their face in the circle","capture.retryUpright.vertical":"Hold the phone straight up and down, with the camera at the top","capture.retryUpright.untilEnd":"Keep it that way until the recording ends","capture.retryRecording.cameraOn":"Keep the camera on until the recording finishes","capture.retryRecording.stay":"Stay on this screen. Don't switch apps or lock your phone","capture.retryRecording.network":"Use a stable internet connection","capture.retryDevice.screenRecording":"Stop any screen recording or screen sharing","capture.retryDevice.phone":"Use the app on a phone, not on an emulator","capture.attemptsRemaining.one":"{count} attempt remaining","capture.attemptsRemaining.other":"{count} attempts remaining","common.retry":"Try again","fcv2.err.permission":"Allow camera access in your browser settings (the camera icon in the address bar), then try again","fcv2.err.notfound":"No camera detected. Connect or enable a camera, then try again","fcv2.err.inuse":"Another app is using the camera. Close it, then try again","fcv2.err.insecure":"The camera needs a secure connection (HTTPS). Reopen this page over HTTPS","fcv2.err.unsupported":"Your browser cannot capture in a supported format. Open this page in a recent browser such as Chrome or Safari","fcv2.err.generic":"The camera is unavailable. Try again, or contact support if it keeps failing","fcv3.no_face":"We can't see your face. Hold the phone in front of you","fcv3.come_closer":"Bring the phone a little closer","fcv3.move_back":"Move the phone a little farther away","fcv3.center_face":"Center your face in the circle","fcv3.straighten":"Hold your head straight","fcv3.more_light":"Find a brighter spot. Light your face","fcv3.too_bright":"Too much light. Move out of direct light","fcv3.hold_still":"Perfect, hold still","fcv3.steady_camera":"Hold the phone steady","fcv3.hold_upright":"Hold the phone upright","fcv3.one_face":"Only one person should be in the frame","reasons.no_face":"No face could be detected during the check","reasons.media_unreadable":"The submitted capture could not be read","reasons.clip_too_short":"The capture was too short","reasons.spoof_detected":"The liveness check could not confirm a live person in front of the camera","reasons.review_band":"The automatic check was not conclusive, so it was sent to human review","reasons.nni_not_found":"The national identification number was not found in the civil registry","reasons.nni_invalid":"The national identification number is not a valid 10-digit NNI","reasons.registry_unavailable":"The civil registry could not be reached to confirm your number","reasons.no_face_source":"No face could be detected in the selfie photo","reasons.no_face_reference":"No reference photo was available to compare your selfie against. The requester needs to resolve this, so retaking your selfie will not help","reasons.low_quality_reference":"The reference photo on file was not clear enough to compare against","reasons.below_threshold":"The selfie did not match the photo on the identity document closely enough","reasons.side_missing":"One side of the identity document was not submitted","reasons.mrz_checksum_failed":"The machine-readable zone of the document could not be validated","reasons.unreadable":"The document photo was not clear enough to read","reasons.expired_document":"The identity document has expired","reasons.authenticity_review":"The document was sent to human review to confirm its authenticity","reasons.registry_mismatch":"The document's details did not match the civil registry. A reviewer will check","reasons.document_nni_mismatch":"This document belongs to a different person than the one this verification was created for","reasons.id_number_invalid":"The ID number is not valid","reasons.registry_record_not_found":"No record was found in the registry for this ID number","reasons.document_id_number_mismatch":"This document belongs to a different person than the one this verification was created for","reasons.otp_mismatch":"The verification code did not match the one we sent","reasons.otp_expired":"The verification code expired before it was entered","reasons.otp_send_failed":"We could not send a verification code to your phone","reasons.uncalibrated_capture_channel":"Desktop/webcam captures are not yet auto-decided, so your verification went to human review","reasons.capture_back_camera":"Use the front camera. Hold the phone in front of your face and try again","reasons.capture_not_upright":"Hold your phone upright, not sideways, and try again","reasons.capture_front_camera":"Use the back camera. Point it at the person's face and try again","reasons.multiple_faces":"Someone else appeared in the video. Film again with only one person in the frame","reasons.location_not_allowed":"Verification isn't available in your region.","reasons.anonymizer_blocked":"Turn off your VPN or proxy, then open the link again.","reasons.nationality_not_allowed":"This service can't verify this document. Contact the organization for other options.","reasons.document_type_not_accepted":"This type of document isn't accepted. Choose another document.","reasons.underage":"You don't meet the minimum age for this service.","reasons.age_unverifiable":"We couldn't read your date of birth. Take a clearer photo of your document.","reasons.nationality_unreadable":"We couldn't read your nationality. Take a clearer photo of your document.","reasons.name_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.birth_date_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.nationality_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.document_number_mismatch":"The details don't match the information the organization has. Contact the organization.","reasons.liveness_inconclusive":"Let's try again: face a light source and hold still.","reasons.match_inconclusive":"We couldn't confirm it's you. Try again in good light, without glasses.","hints.appearance":"Let's try again: face a light source and hold still.","hints.motion":"Hold still and keep the phone steady, then try again.","hints.lighting":"Face a window or a lamp so your face is well lit, then try again.","hints.framing":"Move closer so your face fills the frame, then try again.","reasons.subject_revoked":"The identity on file for this check is no longer available. The requester needs to run a full verification, so retrying will not help","reasons.probe_not_from_liveness":"The same person needs to be on camera from start to finish. Record the video again","reasons.document_authenticity":"Use the original card, not a photo or a copy, and avoid reflections.","reasons.mobile_required":"Continue on your phone to take the selfie.","reasons.capture_tampered":"We couldn't verify this capture. Use your phone's built-in camera, without screen recording or camera apps.","reasons.device_velocity_exceeded":"This device can't be used for another verification right now. Contact the organization.","reasons.device_cooldown":"Too many attempts. Try again later.","cooldown.retryIn":"Too many attempts. Try again {time}.","cooldown.retryAt":"Too many attempts. Try again after {time}.","capture.busy":"Our service is busy. Trying again…","errors.inference_unavailable":"Try again in a moment.","method.title":"How do you want to verify?","method.description":"Choose one option to continue","returning.title":"Confirm it's you","returning.description":"You verified your identity before. One short face capture confirms it's still you.","method.national_number":"Enter my Mauritanian national ID number (NNI)","method.document_photo":"Photo of my document","errors.method_required":"Choose how you want to verify, then continue","errors.attestation_invalid":"We could not complete the security check. Check your connection and try again","errors.network_error":"We could not reach the verification service. Check your internet connection and try again","errors.session_expired":"This verification session has expired. Ask the organisation that sent you here for a new link","errors.nni_unbound":"This link was created without your national ID number. Ask the requester for a new link","errors.id_number_unbound":"This link was created without your ID number. Ask the requester for a new link","capture.tips.title":"For a successful check:","capture.tips.light":"Face a light source and avoid strong light behind you","capture.tips.uncover":"Uncover your face: no glasses, mask or hand in front of it","capture.tips.eyeLevel":"Hold your phone at eye level","capture.tips.straight":"Look straight at the camera and keep still","capture.tips.summary":"Stand in a well-lit area. Uncover your face: no glasses, no mask. Once the camera starts, hold your phone at eye level, look straight at the camera and keep still.","capture.tips.listen":"Listen to the instructions","capture.tips.stop":"Stop","capture.permission.granted":"Camera access allowed","capture.permission.prompt":"Your browser will ask to use the camera. Choose Allow","capture.permission.denied":"Camera access is blocked. Allow it in your browser settings (the camera icon in the address bar), then reload this page","capture.permission.unknown":"We'll ask to use your camera when you start","capture.cameraLabel":"Camera","capture.facing.user":"Front camera","capture.facing.environment":"Back camera","capture.assisted.title":"Capture the person's face","capture.assisted.lead":"Point the back camera at the person's face and hold the phone upright. The voice guidance speaks to the person being filmed.","capture.assisted.stage":"Point the camera at the person's face","capture.modeSwitch.toAssisted":"Someone is helping me","capture.modeSwitch.toSelf":"I film myself","capture.modeSwitch.toAssistedLabel":"Switch to assisted capture: another person holds the phone and films you","capture.modeSwitch.toSelfLabel":"Switch to self capture: you film yourself with the front camera","capture.modeSwitch.restarted":"Camera switched. Start again when you are ready","capture.lookAtColours":"Look at the colours","capture.voiceGuidance":"Voice guidance","capture.preparing.hint":"Setting up on-device face detection. This can take a moment on a slow connection","capture.ready":"Ready. Start when you are","fcv2.err.models":"The face-detection models could not be loaded. Check your connection and try again","fcv2.err.backcamera":"The back camera could not be opened, and assisted capture needs it. Try again, or continue on another phone"};var f={"capture.start":"تشغيل الكاميرا","capture.recordAgain":"ابدأ محاولة جديدة","capture.switchCamera":"تبديل الكاميرا","capture.preparing.title":"جارٍ تجهيز الالتقاط الآمن…","capture.checking":"نتحقق من هويتك…","capture.checkingHint":"يستغرق هذا عادةً بضع ثوانٍ. أبقِ هذه الصفحة مفتوحة","capture.securityNote":"تُشفَّر لقطاتك وتُستخدم فقط لهذا التحقق","capture.cameraOff":"الكاميرا مطفأة","capture.previewAlt":"معاينة الصورة الملتقطة لوجهك","capture.retryCoaching.title":"لم تنجح هذه المحاولة. بعض التعديلات ستساعد:","capture.retryCoaching.light":"اختر مكانًا جيد الإضاءة، بحيث يكون الضوء على وجهك لا خلفك","capture.retryCoaching.eyeLevel":"أمسك هاتفك بمستوى العينين","capture.retryCoaching.head":"انظر مباشرة إلى الكاميرا وأبقِ رأسك مستقيمًا","capture.retryTips.title":"قبل التصوير مرة أخرى:","capture.retryOneFace.alone":"تأكد من عدم وجود أي شخص بجانب الشخص الذي يتم التحقق منه أو خلفه","capture.retryOneFace.screens":"أبعد عن الإطار الصور والشاشات التي يظهر فيها وجه","capture.retryFrontCamera.screenSide":"الكاميرا الأمامية هي التي في جهة الشاشة، حيث ترى نفسك","capture.retryBackCamera.backSide":"الكاميرا الخلفية هي التي في الجهة المقابلة للشاشة","capture.retryBackCamera.circle":"أمسك الهاتف بشكل عمودي أمام الشخص، مع إبقاء وجهه داخل الدائرة","capture.retryUpright.vertical":"أمسك الهاتف بشكل عمودي، والكاميرا في الأعلى","capture.retryUpright.untilEnd":"أبقِه كذلك حتى ينتهي التسجيل","capture.retryRecording.cameraOn":"أبقِ الكاميرا تعمل حتى ينتهي التسجيل","capture.retryRecording.stay":"ابقَ في هذه الشاشة. لا تنتقل إلى تطبيق آخر ولا تقفل هاتفك","capture.retryRecording.network":"استخدم اتصال إنترنت مستقرًا","capture.retryDevice.screenRecording":"أوقف أي تسجيل للشاشة أو مشاركة لها","capture.retryDevice.phone":"استخدم التطبيق على هاتف، لا على محاكي","capture.attemptsRemaining.zero":"لم تتبقَّ أي محاولة","capture.attemptsRemaining.one":"تبقّت محاولة واحدة","capture.attemptsRemaining.two":"تبقّت محاولتان","capture.attemptsRemaining.few":"تبقّت {count} محاولات","capture.attemptsRemaining.many":"تبقّت {count} محاولة","capture.attemptsRemaining.other":"تبقّت {count} محاولة","common.retry":"أعد المحاولة","fcv2.err.permission":"اسمح بالوصول إلى الكاميرا من إعدادات المتصفح (أيقونة الكاميرا في شريط العنوان) ثم أعد المحاولة","fcv2.err.notfound":"لم يتم العثور على كاميرا. وصِّل كاميرا أو فعِّلها ثم أعد المحاولة","fcv2.err.inuse":"تطبيق آخر يستخدم الكاميرا. أغلقه ثم أعد المحاولة","fcv2.err.insecure":"تتطلب الكاميرا اتصالًا آمنًا (HTTPS). افتح هذه الصفحة عبر HTTPS","fcv2.err.unsupported":"متصفحك لا يستطيع الالتقاط بصيغة مدعومة. افتح هذه الصفحة في متصفح حديث مثل كروم أو سفاري","fcv2.err.generic":"الكاميرا غير متاحة. أعد المحاولة، وتواصل مع الدعم إذا استمرت المشكلة","fcv3.no_face":"لا نرى وجهك. أمسك الهاتف أمامك","fcv3.come_closer":"قرّب الهاتف قليلًا","fcv3.move_back":"أبعد الهاتف قليلًا","fcv3.center_face":"ضع وجهك في منتصف الدائرة","fcv3.straighten":"أبقِ رأسك مستقيمًا","fcv3.more_light":"انتقل إلى مكان أكثر إضاءة. أضئ وجهك","fcv3.too_bright":"الإضاءة قوية جدًا. تجنّب الضوء المباشر على وجهك","fcv3.hold_still":"ممتاز، لا تتحرك","fcv3.steady_camera":"أمسك الهاتف بثبات","fcv3.hold_upright":"أمسك الهاتف بشكل عمودي","fcv3.one_face":"يجب أن يظهر شخص واحد فقط في الإطار","reasons.no_face":"تعذّر اكتشاف أي وجه أثناء التحقق","reasons.media_unreadable":"تعذّرت قراءة اللقطة المُرسلة","reasons.clip_too_short":"كانت اللقطة أقصر من اللازم","reasons.spoof_detected":"لم يتمكن فحص الحضور الحي من تأكيد وجود شخص حقيقي أمام الكاميرا","reasons.review_band":"لم يكن الفحص التلقائي حاسمًا، لذا أُحيل إلى مراجعة بشرية","reasons.nni_not_found":"لم يُعثر على الرقم الوطني في سجل الحالة المدنية","reasons.nni_invalid":"الرقم الوطني ليس رقمًا صالحًا مكوّنًا من 10 أرقام","reasons.registry_unavailable":"تعذّر الوصول إلى سجل الحالة المدنية لتأكيد رقمك","reasons.no_face_source":"تعذّر اكتشاف وجه في الصورة الذاتية","reasons.no_face_reference":"لم تتوفّر صورة مرجعية لمقارنة صورتك الذاتية بها. على الجهة الطالبة معالجة ذلك، وإعادة التقاط صورتك الذاتية لن تُجدي","reasons.low_quality_reference":"الصورة المرجعية المحفوظة لم تكن واضحة بما يكفي للمقارنة","reasons.below_threshold":"الصورة الذاتية لم تطابق صورة وثيقة الهوية بدرجة كافية","reasons.side_missing":"أحد وجهي وثيقة الهوية لم يُرسل","reasons.mrz_checksum_failed":"تعذّر التحقق من منطقة القراءة الآلية في الوثيقة","reasons.unreadable":"صورة الوثيقة لم تكن واضحة بما يكفي للقراءة","reasons.expired_document":"انتهت صلاحية وثيقة الهوية","reasons.authenticity_review":"أُحيلت الوثيقة إلى مراجعة بشرية للتأكد من صحتها","reasons.registry_mismatch":"بيانات الوثيقة لا تطابق السجل المدني. سيتحقق منها مراجع","reasons.document_nni_mismatch":"هذه الوثيقة تخص شخصًا آخر غير الشخص الذي أُنشئ له هذا التحقق","reasons.id_number_invalid":"رقم الهوية غير صالح","reasons.registry_record_not_found":"لم يُعثر على أي سجل لرقم الهوية هذا في السجل","reasons.document_id_number_mismatch":"هذه الوثيقة تخص شخصًا آخر غير الشخص الذي أُنشئ له هذا التحقق","reasons.otp_mismatch":"رمز التحقّق لا يطابق الرمز الذي أرسلناه","reasons.otp_expired":"انتهت صلاحية رمز التحقّق قبل إدخاله","reasons.otp_send_failed":"تعذّر إرسال رمز التحقّق إلى هاتفك","reasons.uncalibrated_capture_channel":"جودة الكاميرا المكتبية غير معايَرة بعد، لذا أُحيل تحققك إلى مراجعة بشرية","reasons.capture_back_camera":"استخدم الكاميرا الأمامية. أمسك الهاتف أمام وجهك وحاول مرة أخرى","reasons.capture_not_upright":"أمسك هاتفك بشكل عمودي وليس أفقيًا، ثم حاول مرة أخرى","reasons.capture_front_camera":"استخدم الكاميرا الخلفية. وجّهها نحو وجه الشخص وحاول مرة أخرى","reasons.multiple_faces":"ظهر شخص آخر في الفيديو. صوّر مرة أخرى مع وجود شخص واحد فقط في الإطار","reasons.location_not_allowed":"التحقق غير متاح في منطقتك.","reasons.anonymizer_blocked":"أوقف تشغيل VPN أو الوكيل ثم افتح الرابط مجددًا.","reasons.nationality_not_allowed":"لا يمكن لهذه الخدمة التحقق من هذه الوثيقة. تواصل مع الجهة لمعرفة الخيارات الأخرى.","reasons.document_type_not_accepted":"هذا النوع من الوثائق غير مقبول. اختر وثيقة أخرى.","reasons.underage":"لا تستوفي الحد الأدنى للسن لهذه الخدمة.","reasons.age_unverifiable":"تعذّرت قراءة تاريخ ميلادك. التقط صورة أوضح لوثيقتك.","reasons.nationality_unreadable":"تعذّرت قراءة جنسيتك. التقط صورة أوضح لوثيقتك.","reasons.name_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.birth_date_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.nationality_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.document_number_mismatch":"بياناتك لا تطابق المعلومات المتوفرة لدى الجهة. تواصل مع الجهة.","reasons.liveness_inconclusive":"لنحاول مجددًا: اجعل وجهك مقابل مصدر ضوء وابقَ ثابتًا.","reasons.match_inconclusive":"لم نتمكّن من التأكد من أنك أنت. حاول مجددًا في إضاءة جيدة ومن دون نظارات.","hints.appearance":"لنحاول مجددًا: اجعل وجهك مقابل مصدر ضوء وابقَ ثابتًا.","hints.motion":"ابقَ ثابتًا وأمسك الهاتف بثبات، ثم حاول مجددًا.","hints.lighting":"اجعل وجهك مقابل نافذة أو مصباح حتى يكون مضاءً جيدًا، ثم حاول مجددًا.","hints.framing":"اقترب أكثر حتى يملأ وجهك الإطار، ثم حاول مجددًا.","reasons.subject_revoked":"لم تعد الهوية المحفوظة لهذا التحقق متاحة. على الجهة الطالبة إجراء تحقق كامل، وإعادة المحاولة لن تُجدي","reasons.probe_not_from_liveness":"يجب أن يظهر الشخص نفسه أمام الكاميرا من البداية إلى النهاية. سجّل الفيديو مرة أخرى","reasons.document_authenticity":"استخدم البطاقة الأصلية، لا صورة لها ولا نسخة منها، وتجنّب الانعكاسات.","reasons.mobile_required":"تابع على هاتفك لالتقاط صورة لوجهك.","reasons.capture_tampered":"تعذّر التحقق من هذا الالتقاط. استخدم الكاميرا المدمجة في هاتفك، دون تسجيل الشاشة أو تطبيقات الكاميرا.","reasons.device_velocity_exceeded":"لا يمكن استخدام هذا الجهاز لعملية تحقق أخرى حاليًا. تواصل مع الجهة.","reasons.device_cooldown":"محاولات كثيرة. حاول مجددًا لاحقًا.","cooldown.retryIn":"محاولات كثيرة. حاول مجددًا {time}.","cooldown.retryAt":"محاولات كثيرة. حاول مجددًا بعد {time}.","capture.busy":"خدمتنا مشغولة حاليًا. نعيد المحاولة…","errors.inference_unavailable":"حاول مجددًا بعد لحظات.","method.title":"كيف تريد التحقق من هويتك؟","method.description":"اختر إحدى الطريقتين للمتابعة","returning.title":"أكّد أنك أنت","returning.description":"سبق أن تحقّقت من هويتك. التقاط قصير لوجهك يكفي لتأكيد أنك أنت.","method.national_number":"إدخال الرقم الوطني للتعريف الموريتاني (NNI)","method.document_photo":"تصوير وثيقتي","errors.method_required":"اختر طريقة التحقق، ثم تابع","errors.attestation_invalid":"تعذّر إكمال فحص الأمان. تحقّق من اتصالك وحاول مجددًا","errors.network_error":"تعذّر الوصول إلى خدمة التحقق. تحقق من اتصالك بالإنترنت وأعد المحاولة","errors.session_expired":"انتهت صلاحية جلسة التحقق هذه. اطلب رابطًا جديدًا من الجهة التي أرسلتك إلى هنا","errors.nni_unbound":"أُنشئ هذا الرابط دون رقمك الوطني للتعريف. اطلب رابطًا جديدًا من الجهة الطالبة","errors.id_number_unbound":"أُنشئ هذا الرابط دون رقم هويتك. اطلب رابطًا جديدًا من الجهة الطالبة","capture.tips.title":"لتحقق ناجح:","capture.tips.light":"اجعل الضوء أمام وجهك وتجنّب الإضاءة القوية خلفك","capture.tips.uncover":"اكشف وجهك: بلا نظارات أو كمامة أو يد أمامه","capture.tips.eyeLevel":"أمسك هاتفك بمستوى العينين","capture.tips.straight":"انظر مباشرة إلى الكاميرا وابقَ ثابتًا","capture.tips.summary":"اختر مكانًا جيد الإضاءة. اكشف وجهك: بلا نظارات أو كمامة. بعد تشغيل الكاميرا، أمسك هاتفك بمستوى العينين، وانظر مباشرة إلى الكاميرا وابقَ ثابتًا.","capture.tips.listen":"استمع إلى التعليمات","capture.tips.stop":"إيقاف","capture.permission.granted":"تم السماح بالوصول إلى الكاميرا","capture.permission.prompt":"سيطلب متصفحك استخدام الكاميرا. اختر «السماح»","capture.permission.denied":"الوصول إلى الكاميرا محظور. اسمح به من إعدادات المتصفح (رمز الكاميرا في شريط العنوان)، ثم أعد تحميل الصفحة","capture.permission.unknown":"سنطلب استخدام الكاميرا عند البدء","capture.cameraLabel":"الكاميرا","capture.facing.user":"الكاميرا الأمامية","capture.facing.environment":"الكاميرا الخلفية","capture.assisted.title":"صوّر وجه الشخص","capture.assisted.lead":"وجّه الكاميرا الخلفية نحو وجه الشخص وأمسك الهاتف بشكل عمودي. الإرشادات الصوتية تخاطب الشخص الذي تصوّره.","capture.assisted.stage":"وجّه الكاميرا نحو وجه الشخص","capture.modeSwitch.toAssisted":"شخص يساعدني","capture.modeSwitch.toSelf":"أصوّر نفسي","capture.modeSwitch.toAssistedLabel":"التبديل إلى التصوير بمساعدة شخص آخر يحمل الهاتف ويصوّرك","capture.modeSwitch.toSelfLabel":"التبديل إلى التصوير الذاتي بالكاميرا الأمامية","capture.modeSwitch.restarted":"تم تبديل الكاميرا. ابدأ من جديد عندما تكون جاهزًا","capture.lookAtColours":"انظر إلى الألوان","capture.voiceGuidance":"الإرشاد الصوتي","capture.preparing.hint":"يجري إعداد كشف الوجه على جهازك. قد يستغرق ذلك لحظة على اتصال بطيء","capture.ready":"جاهز. ابدأ عندما تكون مستعدًا","fcv2.err.models":"تعذّر تحميل نماذج التعرف على الوجه. تحقق من اتصالك ثم أعد المحاولة","fcv2.err.backcamera":"تعذّر فتح الكاميرا الخلفية، والالتقاط المساعَد يحتاج إليها. أعد المحاولة أو تابع على هاتف آخر"};var v={"capture.start":"Démarrer la caméra","capture.recordAgain":"Commencer une nouvelle tentative","capture.switchCamera":"Changer de caméra","capture.preparing.title":"Préparation de la capture sécurisée…","capture.checking":"Nous vérifions votre identité…","capture.checkingHint":"Cela prend généralement quelques secondes. Gardez cette page ouverte","capture.securityNote":"Vos images sont chiffrées et utilisées uniquement pour cette vérification","capture.cameraOff":"Caméra éteinte","capture.previewAlt":"Aperçu de l’image capturée de votre visage","capture.retryCoaching.title":"Cette tentative n'a pas abouti. Quelques ajustements vous aideront :","capture.retryCoaching.light":"Placez-vous dans un endroit bien éclairé, avec la lumière sur le visage et non derrière vous","capture.retryCoaching.eyeLevel":"Tenez votre téléphone à hauteur des yeux","capture.retryCoaching.head":"Regardez droit vers la caméra, la tête bien droite","capture.retryTips.title":"Avant de filmer à nouveau :","capture.retryOneFace.alone":"Assurez-vous que personne ne se trouve à côté ou derrière la personne vérifiée","capture.retryOneFace.screens":"Gardez hors du cadre les photos et les écrans qui montrent un visage","capture.retryFrontCamera.screenSide":"La caméra avant est celle du côté de l'écran : vous vous voyez à l'écran","capture.retryBackCamera.backSide":"La caméra arrière est celle du côté opposé à l'écran","capture.retryBackCamera.circle":"Tenez le téléphone droit face à la personne, son visage dans le cercle","capture.retryUpright.vertical":"Tenez le téléphone bien droit, la caméra en haut","capture.retryUpright.untilEnd":"Gardez-le ainsi jusqu'à la fin de l'enregistrement","capture.retryRecording.cameraOn":"Laissez la caméra allumée jusqu'à la fin de l'enregistrement","capture.retryRecording.stay":"Restez sur cet écran. Ne changez pas d'application et ne verrouillez pas votre téléphone","capture.retryRecording.network":"Utilisez une connexion internet stable","capture.retryDevice.screenRecording":"Arrêtez tout enregistrement ou partage d'écran","capture.retryDevice.phone":"Utilisez l'application sur un téléphone, pas sur un émulateur","capture.attemptsRemaining.one":"{count} tentative restante","capture.attemptsRemaining.other":"{count} tentatives restantes","common.retry":"Réessayer","fcv2.err.permission":"Autorisez la caméra dans les réglages du navigateur (icône caméra dans la barre d’adresse), puis réessayez","fcv2.err.notfound":"Aucune caméra détectée. Branchez ou activez une caméra, puis réessayez","fcv2.err.inuse":"La caméra est utilisée par une autre application. Fermez-la, puis réessayez","fcv2.err.insecure":"La caméra nécessite une connexion sécurisée (HTTPS). Rouvrez cette page en HTTPS","fcv2.err.unsupported":"Votre navigateur ne prend pas en charge un format de capture compatible. Ouvrez cette page dans un navigateur récent comme Chrome ou Safari","fcv2.err.generic":"Caméra indisponible. Réessayez, ou contactez le support si le problème persiste","fcv3.no_face":"Nous ne voyons pas votre visage. Tenez le téléphone devant vous","fcv3.come_closer":"Rapprochez un peu le téléphone","fcv3.move_back":"Éloignez un peu le téléphone","fcv3.center_face":"Centrez votre visage dans le cercle","fcv3.straighten":"Tenez la tête droite","fcv3.more_light":"Cherchez un endroit plus lumineux. Éclairez votre visage","fcv3.too_bright":"Trop de lumière. Évitez la lumière directe sur le visage","fcv3.hold_still":"Parfait, ne bougez plus","fcv3.steady_camera":"Tenez le téléphone stable","fcv3.hold_upright":"Tenez le téléphone à la verticale","fcv3.one_face":"Une seule personne doit être dans le cadre","reasons.no_face":"Aucun visage n’a pu être détecté pendant la vérification","reasons.media_unreadable":"La capture envoyée n’a pas pu être lue","reasons.clip_too_short":"La capture était trop courte","reasons.spoof_detected":"Le contrôle de présence n'a pas pu confirmer la présence d'une personne réelle devant la caméra","reasons.review_band":"Le contrôle automatique n'a pas été concluant, il a donc été transmis à un examen humain","reasons.nni_not_found":"Le numéro national d'identification n'a pas été trouvé dans le registre d'état civil","reasons.nni_invalid":"Le numéro national d'identification n'est pas un NNI valide à 10 chiffres","reasons.registry_unavailable":"Le registre d'état civil n'a pas pu être joint pour confirmer votre numéro","reasons.no_face_source":"Aucun visage n'a pu être détecté sur la photo selfie","reasons.no_face_reference":"Aucune photo de référence n'était disponible pour comparer votre selfie. C'est au demandeur de le résoudre : reprendre votre selfie n'y changera rien","reasons.low_quality_reference":"La photo de référence enregistrée n'était pas assez nette pour la comparaison","reasons.below_threshold":"Le selfie ne correspondait pas suffisamment à la photo de la pièce d'identité","reasons.side_missing":"Un côté de la pièce d'identité n'a pas été envoyé","reasons.mrz_checksum_failed":"La zone de lecture automatique du document n'a pas pu être validée","reasons.unreadable":"La photo du document n'était pas assez nette pour être lue","reasons.expired_document":"La pièce d'identité a expiré","reasons.authenticity_review":"Le document a été transmis à un examen humain pour confirmer son authenticité","reasons.registry_mismatch":"Les informations du document ne correspondent pas au registre civil. Un examinateur va vérifier","reasons.document_nni_mismatch":"Ce document appartient à une autre personne que celle pour qui cette vérification a été créée","reasons.id_number_invalid":"Le numéro d'identité n'est pas valide","reasons.registry_record_not_found":"Aucun dossier n'a été trouvé dans le registre pour ce numéro d'identité","reasons.document_id_number_mismatch":"Ce document appartient à une autre personne que celle pour qui cette vérification a été créée","reasons.otp_mismatch":"Le code de vérification ne correspond pas à celui que nous avons envoyé","reasons.otp_expired":"Le code de vérification a expiré avant d'être saisi","reasons.otp_send_failed":"Nous n'avons pas pu envoyer de code de vérification à votre téléphone","reasons.uncalibrated_capture_channel":"Les captures webcam ne sont pas encore décidées automatiquement, votre vérification part donc en revue humaine","reasons.capture_back_camera":"Utilisez la caméra avant. Tenez le téléphone devant votre visage et réessayez","reasons.capture_not_upright":"Tenez votre téléphone à la verticale, pas à l'horizontale, et réessayez","reasons.capture_front_camera":"Utilisez la caméra arrière. Dirigez-la vers le visage de la personne et réessayez","reasons.multiple_faces":"Une autre personne est apparue dans la vidéo. Filmez à nouveau avec une seule personne dans le cadre","reasons.location_not_allowed":"La vérification n'est pas disponible dans votre région.","reasons.anonymizer_blocked":"Désactivez votre VPN ou proxy, puis rouvrez le lien.","reasons.nationality_not_allowed":"Ce service ne peut pas vérifier ce document. Contactez l'organisation pour d'autres options.","reasons.document_type_not_accepted":"Ce type de document n'est pas accepté. Choisissez un autre document.","reasons.underage":"Vous n'avez pas l'âge minimum requis pour ce service.","reasons.age_unverifiable":"Nous n'avons pas pu lire votre date de naissance. Prenez une photo plus nette de votre document.","reasons.nationality_unreadable":"Nous n'avons pas pu lire votre nationalité. Prenez une photo plus nette de votre document.","reasons.name_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.birth_date_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.nationality_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.document_number_mismatch":"Ces informations ne correspondent pas à celles dont dispose l'organisation. Contactez l'organisation.","reasons.liveness_inconclusive":"Réessayons : placez-vous face à une source de lumière et restez immobile.","reasons.match_inconclusive":"Nous n'avons pas pu confirmer qu'il s'agit bien de vous. Réessayez dans un endroit bien éclairé, sans lunettes.","hints.appearance":"Réessayons : placez-vous face à une source de lumière et restez immobile.","hints.motion":"Restez immobile et tenez le téléphone bien stable, puis réessayez.","hints.lighting":"Placez-vous face à une fenêtre ou une lampe pour que votre visage soit bien éclairé, puis réessayez.","hints.framing":"Rapprochez-vous pour que votre visage remplisse le cadre, puis réessayez.","reasons.subject_revoked":"L'identité enregistrée pour cette vérification n'est plus disponible. Le demandeur doit lancer une vérification complète : réessayer n'y changera rien","reasons.probe_not_from_liveness":"La même personne doit être devant la caméra du début à la fin. Enregistrez à nouveau la vidéo","reasons.document_authenticity":"Utilisez la carte originale, pas une photo ni une copie, et évitez les reflets.","reasons.mobile_required":"Continuez sur votre téléphone pour prendre le selfie.","reasons.capture_tampered":"Nous n'avons pas pu vérifier cette capture. Utilisez l'appareil photo intégré de votre téléphone, sans enregistrement d'écran ni application de caméra.","reasons.device_velocity_exceeded":"Cet appareil ne peut pas servir à une autre vérification pour le moment. Contactez l'organisation.","reasons.device_cooldown":"Trop de tentatives. Réessayez plus tard.","cooldown.retryIn":"Trop de tentatives. Réessayez {time}.","cooldown.retryAt":"Trop de tentatives. Réessayez à partir de {time}.","capture.busy":"Notre service est très sollicité. Nouvel essai en cours…","errors.inference_unavailable":"Réessayez dans un instant.","method.title":"Comment souhaitez-vous vérifier votre identité ?","method.description":"Choisissez une option pour continuer","returning.title":"Confirmez qu'il s'agit bien de vous","returning.description":"Vous avez déjà vérifié votre identité. Une courte capture du visage confirme qu'il s'agit toujours de vous.","method.national_number":"Saisir mon numéro national d'identification mauritanien (NNI)","method.document_photo":"Photographier mon document","errors.method_required":"Choisissez comment vérifier votre identité, puis continuez","errors.attestation_invalid":"Nous n'avons pas pu terminer le contrôle de sécurité. Vérifiez votre connexion et réessayez","errors.network_error":"Nous n'avons pas pu joindre le service de vérification. Vérifiez votre connexion internet et réessayez","errors.session_expired":"Cette session de vérification a expiré. Demandez un nouveau lien à l'organisme qui vous a envoyé ici","errors.nni_unbound":"Ce lien a été créé sans votre numéro national d'identification. Demandez un nouveau lien à l'organisme demandeur","errors.id_number_unbound":"Ce lien a été créé sans votre numéro d'identité. Demandez un nouveau lien à l'organisme demandeur","capture.tips.title":"Pour une vérification réussie :","capture.tips.light":"Placez-vous face à la lumière et évitez une forte lumière derrière vous","capture.tips.uncover":"Dégagez votre visage : ni lunettes, ni masque, ni main devant","capture.tips.eyeLevel":"Tenez votre téléphone à hauteur des yeux","capture.tips.straight":"Regardez droit vers la caméra et restez immobile","capture.tips.summary":"Placez-vous dans une zone bien éclairée. Dégagez votre visage : ni lunettes, ni masque. Une fois la caméra démarrée, tenez votre téléphone à hauteur des yeux, regardez droit vers la caméra et restez immobile.","capture.tips.listen":"Écouter les instructions","capture.tips.stop":"Arrêter","capture.permission.granted":"Accès à la caméra autorisé","capture.permission.prompt":"Votre navigateur va demander l’accès à la caméra. Choisissez « Autoriser »","capture.permission.denied":"L’accès à la caméra est bloqué. Autorisez-le dans les réglages du navigateur (icône caméra dans la barre d’adresse), puis rechargez la page","capture.permission.unknown":"Nous demanderons l’accès à la caméra au démarrage","capture.cameraLabel":"Caméra","capture.facing.user":"Caméra avant","capture.facing.environment":"Caméra arrière","capture.assisted.title":"Filmez le visage de la personne","capture.assisted.lead":"Pointez la caméra arrière vers le visage de la personne et tenez le téléphone à la verticale. Le guidage vocal s'adresse à la personne filmée.","capture.assisted.stage":"Pointez la caméra vers le visage de la personne","capture.modeSwitch.toAssisted":"Quelqu'un m'aide","capture.modeSwitch.toSelf":"Je me filme","capture.modeSwitch.toAssistedLabel":"Passer à la capture assistée : une autre personne tient le téléphone et vous filme","capture.modeSwitch.toSelfLabel":"Passer à la capture seule : vous vous filmez avec la caméra avant","capture.modeSwitch.restarted":"Caméra changée. Recommencez quand vous le souhaitez","capture.lookAtColours":"Regardez les couleurs","capture.voiceGuidance":"Guidage vocal","capture.preparing.hint":"Mise en place de la détection du visage sur l’appareil. Cela peut prendre un instant sur une connexion lente","capture.ready":"Prêt. Commencez quand vous voulez","fcv2.err.models":"Impossible de charger les modèles de détection du visage. Vérifiez votre connexion puis réessayez","fcv2.err.backcamera":"La caméra arrière n'a pas pu s'ouvrir, et la capture assistée en a besoin. Réessayez ou continuez sur un autre téléphone"};var u={},l=r(e=>e==="es"||e==="pt"||e==="de","isOverlayLocale");function q(e){return l(e)?"en":e}r(q,"baseLocale");function N(e){return l(e)?u[e]:void 0}r(N,"overlayOf");function _(e){return l(e)&&u[e]===void 0}r(_,"overlayPending");function O(e){return _(e)?(e==="es"?import("./overlay-es-FMHWRKQW.js"):e==="pt"?import("./overlay-pt-OGIELLCM.js"):import("./overlay-de-2DL4MNC7.js")).then(n=>{u[e]=n.overlay},()=>{u[e]={}}):Promise.resolve()}r(O,"loadSekyroLocale");var d=Object.freeze({"reasons.id_number_invalid":"reasons.nni_invalid","reasons.registry_record_not_found":"reasons.nni_not_found","reasons.document_id_number_mismatch":"reasons.document_nni_mismatch","errors.id_number_unbound":"errors.nni_unbound","population.reason_id_number_invalid":"population.reason_nni_invalid","population.reason_registry_record_not_found":"population.reason_nni_not_found","population.reason_registry_record_not_found_or_document":"population.reason_nni_not_found_or_document","summary.id_number":"summary.nni"}),y=new Map(Object.entries(d).filter(([e])=>e.startsWith("reasons.")).map(([e,t])=>[t.slice(8),e.slice(8)]));function m(e){return y.get(e)??e}r(m,"genericReason");function D(e,t){let n=e,a=t;for(let[o,s]of Object.entries(d)){let c=a[o],i=a[s];typeof c!="string"&&typeof i=="string"?n[o]=i:typeof i!="string"&&typeof c=="string"&&(n[s]=c)}}r(D,"aliasRenamedKeys");function E(e){switch(e){case"center":return"fcv3.center_face";case"closer":return"fcv3.come_closer";case"farther":return"fcv3.move_back";case"light":return"fcv3.more_light";case"still":case"hold":return"fcv3.hold_still";case"upright":return"fcv3.hold_upright";case"one_face":return"fcv3.one_face";default:{let t=e;throw new Error(`hintStringKey: unhandled hint ${t}`)}}}r(E,"hintStringKey");function B(e){let t=`hints.${e}`;return Object.hasOwn(p,t)?t:null}r(B,"retakeHintStringKey");function b(e){return`fcv2.err.${e}`}r(b,"captureErrorStringKey");function M(e){return e.detail?.engineKind==="backcamera"?"fcv2.err.backcamera":b(e.kind)}r(M,"captureErrorCopyKey");function j(e){switch(e){case"no_recorder":return"fcv2.err.unsupported";case"attestation":return"errors.attestation_invalid";case"network":return"errors.network_error";case"nni_unbound":case"id_number_unbound":return"errors.id_number_unbound";case"method_required":return"errors.method_required";case"inference_unavailable":return"errors.inference_unavailable";default:{let t=`reasons.${m(e)}`;return Object.hasOwn(p,t)?t:null}}}r(j,"reasonStringKey");function V(e,t,n=new Date){if(t===void 0)return null;let a=new Date(t),o=a.getTime()-n.getTime();if(!Number.isFinite(o)||o<=0)return null;if(o<36e5){let i=Math.max(1,Math.ceil(o/6e4));return{key:"cooldown.retryIn",time:new Intl.RelativeTimeFormat(e,{numeric:"always"}).format(i,"minute")}}let s=a.toDateString()===n.toDateString();return{key:"cooldown.retryAt",time:new Intl.DateTimeFormat(e,{...s?{}:{day:"numeric",month:"long"},hour:"2-digit",minute:"2-digit"}).format(a)}}r(V,"retryAfterTime");function G(e,t,n){let a=new Intl.PluralRules(t).select(n);return((a==="other"?void 0:e[`capture.attemptsRemaining.${a}`])??e["capture.attemptsRemaining.other"]).replace("{count}",new Intl.NumberFormat(t).format(n))}r(G,"attemptsRemainingText");import{useCallback as w}from"react";function X(){return w(e=>{e?.focus()},[])}r(X,"useFocusOnMount");import{jsx as k}from"react/jsx-runtime";function re({tone:e,role:t,children:n,testId:a}){return k("div",{role:t??(e==="info"?"status":"alert"),className:`sekyro-notice sekyro-notice--${e}`,"data-testid":a,children:n})}r(re,"Notice");export{C as a,p as b,m as c,D as d,f as e,v as f,q as g,N as h,_ as i,O as j,E as k,B as l,b as m,M as n,j as o,V as p,G as q,re as r,X as s};
|