@sekyro/react 0.1.0-rc.17 → 0.1.0-rc.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/{chunk-25KWDPLY.js → chunk-3GCHNE7R.js} +1 -1
- package/dist/{chunk-LPGHMDD4.js → chunk-3H6KQ6BP.js} +1 -1
- package/dist/chunk-455FWUKU.js +2 -0
- package/dist/{chunk-6I7GU4FS.js → chunk-AGIBFSCL.js} +1 -1
- package/dist/chunk-IAJAM4I6.js +2 -0
- package/dist/{chunk-DY5WQVPE.js → chunk-JTDARDD6.js} +1 -1
- package/dist/chunk-T7C7Q4AN.js +2 -0
- package/dist/{chunk-A6UYUVEG.js → chunk-VBIVDLBE.js} +1 -1
- package/dist/{chunk-T3PAN4NN.js → chunk-W3GLUWQ5.js} +1 -1
- package/dist/chunk-ZFGI5LKP.js +2 -0
- package/dist/{chunk-Z7US4CLZ.js → chunk-ZZIBCKKC.js} +1 -1
- package/dist/document-capture-view-ZNZQMJBX.js +2 -0
- package/dist/eid-view-VYUU65A3.js +2 -0
- package/dist/email-otp-view-DUHRTUGD.js +2 -0
- package/dist/flow-views-VJPCIWEJ.js +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{overlay-de-YQA44XTY.js → overlay-de-TSLNGALH.js} +1 -1
- package/dist/{overlay-es-6KRUPYG4.js → overlay-es-44JQULK7.js} +1 -1
- package/dist/{overlay-pt-QEAE4TDI.js → overlay-pt-D5TKF7PI.js} +1 -1
- package/dist/portrait-capture-view-XUWOHJTS.js +2 -0
- package/dist/{portrait-review-view-A5HGZ7ZN.js → portrait-review-view-SJXQZTAK.js} +1 -1
- package/dist/verification/index.cjs +1 -1
- package/dist/verification/index.d.cts +4 -3
- package/dist/verification/index.d.ts +4 -3
- package/dist/verification/index.js +1 -1
- package/dist/verification.css +6 -3
- package/package.json +2 -2
- package/sbom.cdx.json +4 -4
- package/dist/chunk-JT7YHK7F.js +0 -2
- package/dist/chunk-NV7HZJM4.js +0 -2
- package/dist/chunk-XTQARDSJ.js +0 -2
- package/dist/chunk-YVNQ3UUH.js +0 -2
- package/dist/document-capture-view-WDGHEAUI.js +0 -2
- package/dist/eid-view-HQLNWM6A.js +0 -2
- package/dist/email-otp-view-LCIDGNZT.js +0 -2
- package/dist/flow-views-K3HXMKPU.js +0 -2
- package/dist/portrait-capture-view-I7I6FJQO.js +0 -2
|
@@ -223,6 +223,8 @@ interface StepStrings {
|
|
|
223
223
|
"returning.heading": string;
|
|
224
224
|
"capture.checkingTitle": string;
|
|
225
225
|
"method.heading": string;
|
|
226
|
+
"sandbox.otpHint": string;
|
|
227
|
+
"sandbox.skipCapture": string;
|
|
226
228
|
"population.recheck.title": string;
|
|
227
229
|
"population.recheck.description": string;
|
|
228
230
|
"otp.phoneInvalid": string;
|
|
@@ -375,7 +377,6 @@ interface StepStrings {
|
|
|
375
377
|
"portrait.fixes.background"?: string;
|
|
376
378
|
"portrait.fixes.exposure"?: string;
|
|
377
379
|
"portrait.fixes.white_balance"?: string;
|
|
378
|
-
"reasons.portrait_recaptured"?: string;
|
|
379
380
|
"reasons.portrait_morph_suspected"?: string;
|
|
380
381
|
"reasons.portrait_reference_mismatch"?: string;
|
|
381
382
|
"reasons.portrait_declined_fix"?: string;
|
|
@@ -626,7 +627,7 @@ interface SekyroVerificationProps {
|
|
|
626
627
|
onLivenessCaptured?: (artifacts: CapturedArtifacts) => void;
|
|
627
628
|
/**
|
|
628
629
|
* The link a desktop shows as a QR code when the live photo needs a phone
|
|
629
|
-
* (the session's `
|
|
630
|
+
* (the session's `hostedUrl`); absent = a "continue on your phone" notice.
|
|
630
631
|
* `<SekyroFlow>` defaults it to this page's address.
|
|
631
632
|
*/
|
|
632
633
|
handoffUrl?: string;
|
|
@@ -635,7 +636,7 @@ interface SekyroVerificationProps {
|
|
|
635
636
|
declare function SekyroVerification(props: SekyroVerificationProps): react.JSX.Element;
|
|
636
637
|
|
|
637
638
|
interface SekyroFlowProps extends SekyroVerificationProps {
|
|
638
|
-
/** The session's `
|
|
639
|
+
/** The session's `hostedUrl` (create result): the QR code and the "open in your browser" link. Default: this page's address. */
|
|
639
640
|
hostedUrl?: string;
|
|
640
641
|
/** Override the in-app browser detection (tests / hosts that know better). */
|
|
641
642
|
inAppBrowser?: boolean;
|
|
@@ -223,6 +223,8 @@ interface StepStrings {
|
|
|
223
223
|
"returning.heading": string;
|
|
224
224
|
"capture.checkingTitle": string;
|
|
225
225
|
"method.heading": string;
|
|
226
|
+
"sandbox.otpHint": string;
|
|
227
|
+
"sandbox.skipCapture": string;
|
|
226
228
|
"population.recheck.title": string;
|
|
227
229
|
"population.recheck.description": string;
|
|
228
230
|
"otp.phoneInvalid": string;
|
|
@@ -375,7 +377,6 @@ interface StepStrings {
|
|
|
375
377
|
"portrait.fixes.background"?: string;
|
|
376
378
|
"portrait.fixes.exposure"?: string;
|
|
377
379
|
"portrait.fixes.white_balance"?: string;
|
|
378
|
-
"reasons.portrait_recaptured"?: string;
|
|
379
380
|
"reasons.portrait_morph_suspected"?: string;
|
|
380
381
|
"reasons.portrait_reference_mismatch"?: string;
|
|
381
382
|
"reasons.portrait_declined_fix"?: string;
|
|
@@ -626,7 +627,7 @@ interface SekyroVerificationProps {
|
|
|
626
627
|
onLivenessCaptured?: (artifacts: CapturedArtifacts) => void;
|
|
627
628
|
/**
|
|
628
629
|
* The link a desktop shows as a QR code when the live photo needs a phone
|
|
629
|
-
* (the session's `
|
|
630
|
+
* (the session's `hostedUrl`); absent = a "continue on your phone" notice.
|
|
630
631
|
* `<SekyroFlow>` defaults it to this page's address.
|
|
631
632
|
*/
|
|
632
633
|
handoffUrl?: string;
|
|
@@ -635,7 +636,7 @@ interface SekyroVerificationProps {
|
|
|
635
636
|
declare function SekyroVerification(props: SekyroVerificationProps): react.JSX.Element;
|
|
636
637
|
|
|
637
638
|
interface SekyroFlowProps extends SekyroVerificationProps {
|
|
638
|
-
/** The session's `
|
|
639
|
+
/** The session's `hostedUrl` (create result): the QR code and the "open in your browser" link. Default: this page's address. */
|
|
639
640
|
hostedUrl?: string;
|
|
640
641
|
/** Override the in-app browser detection (tests / hosts that know better). */
|
|
641
642
|
inAppBrowser?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as xo}from"../chunk-LPGHMDD4.js";import{a as K,d as fo,e as ut,f as qe,g as mo,h as yo}from"../chunk-Z7US4CLZ.js";import{a as go,b as ho,c as Co}from"../chunk-GUTF3SPK.js";import{a as No,b as wo,c as Po,d as _o,e as pt,g as Xe}from"../chunk-JT7YHK7F.js";import{b as so,c as io,d as ao,e as lo,f as co,h as uo,k as po}from"../chunk-DY5WQVPE.js";import{b as no}from"../chunk-6I7GU4FS.js";import{a as ro}from"../chunk-7MMT5M4E.js";import{a as ke}from"../chunk-VRDPGOXM.js";import{a as bn,b as vn,c as Cn,d as Nn,e as wn,f as Ae,g as I}from"../chunk-XTQARDSJ.js";import{a as F,b as re,c as ko,d as se,e as So,f as Ze,g as Je,h as dt,i as bo,l as vo,m as O,n as Qe}from"../chunk-NV7HZJM4.js";import{c as oo}from"../chunk-A6UYUVEG.js";import{a as w,c as Xt,j as kn,l as Sn,m as jt,n as eo,o as to,q as ct,r as he}from"../chunk-25KWDPLY.js";import{a as s}from"../chunk-2KED7D2Q.js";import{useEffect as Pn,useState as Eo}from"react";function ft(e){let[t,n]=Eo(()=>e?.currentStep?.()??null),[o,l]=Eo(null);return Pn(()=>{if(e===void 0)return;if(typeof e.run!="function"){l(new Error("The step components need @sekyro/web 0.2 or later (Verification.run)."));return}let i=!0,r=e.on("step",a=>{i&&n(a)});return e.run().then(a=>{i&&n(u=>u??a)},a=>{i&&l(a)}),()=>{i=!1,r()}},[e]),{step:t,error:o}}s(ft,"useVerificationStep");import{useEffect as gt,useId as En,useMemo as In,useRef as ht,useState as oe}from"react";var _n="AC247 AD376 AE971/0 AF93/0 AG1/1 AI1/1 AL355/0 AM374/0 AO244 AR54/0 AS1/1 AT43/0 AU61/0 AW297 AX358/0 AZ994/0 BA387/0 BB1/1 BD880/0 BE32/0 BF226 BG359/0 BH973 BI257 BJ229 BL590/0 BM1/1 BN673 BO591/0 BQ599 BR55/0 BS1/1 BT975 BW267 BY375/8 BZ501 CA1/1 CC61/0 CD243/0 CF236 CG242 CH41/0 CI225 CK682 CL56 CM237 CN86/0 CO57/0 CR506 CU53/0 CV238 CW599 CX61/0 CY357 CZ420 DE49/0 DJ253 DK45 DM1/1 DO1/1 DZ213/0 EC593/0 EE372 EG20/0 EH212/0 ER291/0 ES34 ET251/0 FI358/0 FJ679 FK500 FM691 FO298 FR33/0 GA241 GB44/0 GD1/1 GE995/0 GF594/0 GG44/0 GH233/0 GI350 GL299 GM220 GN224 GP590/0 GQ240 GR30 GT502 GU1/1 GW245 GY592 HK852 HN504 HR385/0 HT509 HU36/06 ID62/0 IE353/0 IL972/0 IM44/0 IN91/0 IO246 IQ964/0 IR98/0 IS354 IT39 JE44/0 JM1/1 JO962/0 JP81/0 KE254/0 KG996/0 KH855/0 KI686/0 KM269 KN1/1 KP850/0 KR82/0 KW965 KY1/1 KZ7/8 LA856/0 LB961/0 LC1/1 LI423/0 LK94/0 LR231/0 LS266 LT370/0 LU352 LV371 LY218/0 MA212/0 MC377/0 MD373/0 ME382/0 MF590/0 MG261/0 MH692/1 MK389/0 ML223 MM95/0 MN976/0 MO853 MP1/1 MQ596/0 MR222 MS1/1 MT356 MU230 MV960 MW265/0 MX52 MY60/0 MZ258 NA264/0 NC687 NE227 NF672 NG234/0 NI505 NL31/0 NO47 NP977/0 NR674 NU683 NZ64/0 OM968 PA507 PE51/0 PF689 PG675 PH63/0 PK92/0 PL48 PM508/0 PR1/1 PS970/0 PT351 PW680 PY595/0 QA974 RE262/0 RO40/0 RS381/0 RU7/8 RW250/0 SA966/0 SB677 SC248 SD249/0 SE46/0 SG65 SH290 SI386/0 SJ47 SK421/0 SL232/0 SM378 SN221 SO252/0 SR597 SS211/0 ST239 SV503 SX1/1 SY963/0 SZ268 TA290 TC1/1 TD235 TG228 TH66/0 TJ992 TK690 TL670 TM993/8 TN216 TO676 TR90/0 TT1/1 TV688 TW886/0 TZ255/0 UA380/0 UG256/0 US1/1 UY598/0 UZ998 VA39 VC1/1 VE58/0 VG1/1 VI1/1 VN84/0 VU678 WF681 WS685 XK383/0 YE967/0 YT262/0 ZA27/0 ZM260/0 ZW263/0",Io;function To(e){return Io??(Io=new Map(_n.split(" ").map(t=>{let[n,o]=t.slice(2).split("/");return[t.slice(0,2),[n,o]]}))),Io.get(e.toUpperCase())}s(To,"entryOf");function Ro(e){return To(e)?.[0]}s(Ro,"dialCodeOf");function Lo(e){return To(e)?.[1]}s(Lo,"nationalPrefixOf");import{normalizeNni as xn}from"@sekyro/web";function je(e){let t=xn(e).replace(/\D/g,"");return/^\D*\+/.test(e)?`+${t}`:t.startsWith("00")?`+${t.slice(2)}`:t}s(je,"digitsOf");var mt=s((e,t)=>(t.trunk!==void 0&&e.startsWith(t.trunk)?e.slice(t.trunk.length):e).slice(0,Math.max(...t.lengths)),"fitDigits");function et(e,t){let n="",o=0;for(let l of t?.formats?.find(i=>new RegExp(`^(?:${i.leading})`).test(e))?.groups??[])o<e.length&&(n+=(o>0?" ":"")+e.slice(o,o+l)),o+=l;return n+e.slice(o)}s(et,"groupDigits");function Mo(e,t){let n=0;for(let o=t;o>0&&n<e.length;n+=1)e[n]!==" "&&(o-=1);return n}s(Mo,"caretAfter");var yt=s((e,t)=>t.find(n=>e.startsWith(n.dial)),"countryOfNumber"),Oo=s((e,t)=>e.lengths.join(", ").replace(/, (\d+)$/,` ${t} $1`),"lengthsLabel");import{Fragment as Ho,jsx as v,jsxs as $}from"react/jsx-runtime";var Do=s((e,t,n)=>{if(e===void 0)return 0;let o=Date.parse(e)-t;return Number.isFinite(o)?Math.min(n,Math.max(0,Math.ceil(o/1e3))):0},"secondsUntil"),Tn=600,Rn=30,Ln=s(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),Mn=["whatsapp","sms"],Ao=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 Fo(e){let t=je(e).replace("+","");return/^\d{8,15}$/.test(t)?`+${t}`:null}s(Fo,"normalizedPhone");var On=s(e=>String.fromCodePoint(...Array.from(e,t=>127397+t.charCodeAt(0))),"flagOf");function Dn(e){let t=[];for(let n of e.phoneCountries??["MR"]){let o=e.phoneRules?.find(i=>i.code===n),l=o?.dial??Ro(n);l!==void 0&&!t.some(i=>i.code===n)&&t.push({code:n,dial:`+${l}`,...o!==void 0?{rule:o}:{}})}return t}s(Dn,"phoneCountriesOf");function An(e,t){if(t===null||!e.startsWith(t.dial))return Fo(e);let n=e.slice(t.dial.length).replace(/\D/g,""),o=Lo(t.code);return o!==void 0&&n.startsWith(o)&&(n=n.slice(o.length)),Fo(t.dial+n)}s(An,"e164Of");var Bo=s((e,t)=>(yt(e,t)??t[0])?.code??null,"countryFor");function Fn(e){let t=null;try{t=new Intl.DisplayNames([e],{type:"region"})}catch{}return n=>`${t?.of(n.code)??n.code} (${n.dial})`}s(Fn,"countryLabels");var Vo="other";function kt({step:e,locale:t,strings:n,className:o,defaultPhone:l,onError:i}){let r=I(t,n),{t:a}=r,u=In(()=>Dn(e),[e.phoneCountries,e.phoneRules]),f=l??u[0]?.dial??"",[g,m]=oe(()=>Bo(f,u)),h=u.map(y=>y.code).join(",");gt(()=>{if(g===null||!u.some(y=>y.code===g)){let y=Bo(f,u);m(y);let N=x.current,q=u.find(Q=>Q.code===y)?.dial;q!==void 0&&L(Q=>N!==null&&Q.startsWith(N.dial)?q+Q.slice(N.dial.length):Q.startsWith("+")?Q:q)}},[h,f]);let d=u.find(y=>y.code===g)??null,x=ht(d);d!==null&&(x.current=d);let[k,L]=oe(f),[E,C]=oe(!1),[D,U]=oe(!1),[S,P]=oe(""),[_,M]=oe(!1),[A,ce]=oe(null),[xe,ue]=oe(!1),[Ee,He]=oe(null),de=ht(null),pe=e.phase==="verify"&&!xe,$e=e.phase==="verify",Ie=Co($e),[me,Ue]=go(e.reason==="otp_mismatch",e.attemptsRemaining,()=>P("")),X=En(),fe=ht(null);gt(()=>{let y=setTimeout(()=>fe.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(y)},[pe]);let Te=e.phase==="verify"?e.codeExpiresAt??"sent":null;gt(()=>{Te!==null&&(ue(!1),de.current!==null&&!Ao.has(e.reason??"")&&He(de.current),de.current=null)},[Te]);let W=s(async y=>{M(!0),ce(null);try{await y()}catch(N){ce(ke(N,r.strings)),i?.(N)}finally{M(!1)}},"run"),Z=Mn.filter(y=>(e.channels??[]).includes(y)),ye=e.phoneInternational===!0,T=E||d===null,z=T||k.startsWith("+")&&!k.startsWith(d.dial),Y=z?void 0:d.rule,p=z?k:k.replace(d.dial,"").replace(/\D/g,""),b=Y?mt(p,Y):p,J=z&&!T&&!ye&&e.phoneRules?.length&&!u.some(y=>y.dial.startsWith(k)),Ke=J?null:Y?Y.lengths.includes(b.length)?d.dial+b:null:T&&!k.startsWith("+")?null:An(k,E?null:d),Re=!e.needsPhone||Ke!==null,Ge=s((y,N=!1)=>{let q=e.needsPhone?N?Ee:{number:Ke??k,shown:z||d===null?Ke??k:`${d.dial} ${et(b,Y)}`}:null;de.current=q,W(async()=>{try{await e.send({...q!==null?{phone:q.number}:{},...y!==void 0?{channel:y}:{}})}catch(Q){throw de.current=null,Q}})},"send"),$t=s(y=>{W(()=>e.verify(y))},"submitCode"),Ut=s(y=>{y.preventDefault(),pe?$t(S):Z.length<=1&&Re&&Ge(Z[0])},"onSubmit"),mn=s(y=>{let N=y.target,q=y.nativeEvent.inputType,Q=Math.max(0,N.value.lastIndexOf("+")),ge=je(N.value.slice(Q)),Me=yt(ge,u),Oe=je(N.value.slice(Q,N.selectionStart)).length,at=ge,Zt=ge;if(U(!1),!Me&&(T||ge.startsWith("+")))ye&&C(!0);else{let De=Me??d,te=Me?ge.slice(Me.dial.length):ge;if(m(De.code),C(!1),te===b&&q?.startsWith("delete")&&(q.endsWith("Forward")||(Oe-=1),te=te.slice(0,Oe)+te.slice(Oe+1)),De.rule){let lt=mt(te,De.rule),Qt=te.length-lt.length;Oe-=Qt,te=Qt>0&&!Me&&b.length===lt.length?b:lt}Zt=De.dial+te,at=et(te,De.rule)}L(Zt),N.value=at;let Jt=Mo(at,Oe);N.setSelectionRange(Jt,Jt)},"onNumber"),We=J?a("otp.reason_otp_destination_not_allowed"):D&&Y?a("otp.phoneLengthError",{digits:Oo(Y,a("otp.or"))}):"",Kt=u.length>1||ye,ne=`${X}-phone`,it=Do(e.codeExpiresAt,Ie,Tn),Le=Do(e.resendAvailableAt,Ie,Rn),ze=pe&&e.codeExpiresAt!==void 0&&it===0,Gt=e.needsPhone&&!e.attemptsExhausted,Wt=$e&&(e.codeExpiresAt===void 0||it>0),zt=pe&&Gt?()=>ue(!0):xe&&Wt?()=>ue(!1):null;Ze(zt===null?null:_?()=>{}:zt);let Ye=s(y=>a(y==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),[yn,gn]=a("otp.sentTo",{channel:Ye(e.channel)}).split("{number}"),hn=e.reason==="otp_mismatch"?$(O,{tone:"danger",children:[v("span",{children:a("otp.reason_otp_mismatch")}),v("span",{children:Qe(r,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&Ao.has(e.reason)?v(O,{tone:"warning",children:v("span",{children:a(`otp.reason_${e.reason}`)})}):null,Yt=$(Ho,{children:[hn,A!==null?v(O,{tone:"danger",children:v("span",{children:a(A)})}):null]});if(pe){let y=Z.length===0;return $("form",{className:`sekyro-step sekyro-otp${o?` ${o}`:""}`,"aria-labelledby":X,onSubmit:Ut,noValidate:!0,children:[v(re,{id:X,title:a("otp.verifyTitle"),lead:$(Ho,{children:[yn,v("bdi",{dir:"ltr",className:"sekyro-mono",children:Ee?.shown??e.sentToMasked}),gn]})}),Yt,$("div",{className:"sekyro-field",children:[v("label",{className:"sekyro-label",htmlFor:`${X}-code`,children:a("otp.codeLabel")}),v(ho,{id:`${X}-code`,value:S,invalid:me,onChange:N=>{N!==""&&Ue(),P(N),N.length===6&&S.length!==6&&!_&&!e.attemptsExhausted&&$t(N)}}),v("span",{className:`sekyro-help sekyro-otp-expiry${ze?" is-danger":""}`,"aria-hidden":!ze||void 0,children:ze?a("otp.expired"):a("otp.expiresIn",{time:Ln(it)})})]}),v("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:ze?a("otp.expired"):""}),$(se,{children:[v(w,{type:"submit",full:!0,disabled:_||S.length!==6||e.attemptsExhausted,"aria-busy":_||void 0,children:a("otp.verify")}),$("div",{className:"sekyro-resend-row",children:[y?v("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:_||Le>0,onClick:()=>Ge(void 0,!0),children:Le>0?a("otp.resendIn",{seconds:Le}):a("otp.resend")}):Le>0?v("p",{className:"sekyro-resend is-waiting",children:a("otp.resendIn",{seconds:Le})}):Z.map(N=>v("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:_,onClick:()=>Ge(N,!0),children:a("otp.resendBy",{channel:Ye(N)})},N)),Gt?v("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:_,onClick:()=>ue(!0),"data-testid":"sekyro-otp-change",children:a("otp.changeNumber")}):null]})]})]})}let qt=Fn(r.locale);return $("form",{className:`sekyro-step sekyro-otp${o?` ${o}`:""}`,"aria-labelledby":X,onSubmit:Ut,noValidate:!0,children:[v(re,{id:X,title:a("otp.sendTitle"),lead:a("otp.sendDescription")}),Yt,e.needsPhone?$("div",{className:"sekyro-field",children:[v("label",{className:"sekyro-label",htmlFor:ne,children:a("otp.phoneLabel")}),$("div",{className:"sekyro-phone",dir:"ltr",children:[d===null||z&&!E?null:$("div",{className:"sekyro-phone__lead",children:[Kt?$("select",{className:"sekyro-phone__country",dir:r.locale==="ar"?"rtl":"ltr","aria-label":`${a("otp.countryLabel")}: ${E?a("otp.otherCountry"):qt(d)}`,value:E?Vo:d.code,onChange:y=>{U(!1);let N=u.find(q=>q.code===y.target.value);C(N===void 0),N!==void 0&&m(N.code),L(N===void 0?"":N.dial+(z?"":b))},children:[u.map(y=>v("option",{value:y.code,children:qt(y)},y.code)),ye?v("option",{value:Vo,children:a("otp.otherCountry")}):null]}):null,$("span",{className:"sekyro-phone__dial",id:`${ne}-dial`,"aria-hidden":Kt||void 0,children:[v("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:E?"🌐":On(d.code)}),E?null:d.dial]})]}),v("input",{ref:fe,id:ne,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel","aria-describedby":`${z?"":`${ne}-dial ${ne}-hint `}${We?`${ne}-error`:""}`.trim()||void 0,"aria-invalid":!!We||void 0,placeholder:T?"+":void 0,value:z?k:et(b,Y),onChange:mn,onKeyDown:y=>{y.key==="Enter"&&!Re&&U(!0)},onBlur:y=>{y.relatedTarget?.tagName!=="SELECT"&&U(b!==""&&Ke===null)}})]}),z?null:v("span",{className:"sekyro-help",id:`${ne}-hint`,children:a("otp.phonePlaceholderGeneric")}),We?v("span",{className:"sekyro-help is-danger",id:`${ne}-error`,role:"alert",children:We}):null]}):v("p",{className:"sekyro-text-muted",children:a("otp.prefilledNotice")}),$(se,{children:[Z.length===1?v(w,{type:"submit",full:!0,disabled:_||!Re,"aria-busy":_||void 0,children:a("otp.sendBy",{channel:Ye(Z[0])})}):Z.length>1?$("div",{className:"sekyro-actions__group",role:"group","aria-label":a("otp.chooseChannel"),children:[v("p",{className:"sekyro-label","aria-hidden":"true",children:a("otp.chooseChannel")}),v("div",{className:"sekyro-channel-row",children:Z.map(y=>$(w,{kind:"primary",disabled:_||!Re,"aria-busy":_||void 0,onClick:()=>Ge(y),children:[v(F,{name:y}),Ye(y)]},y))})]}):v(w,{type:"submit",full:!0,disabled:_||!Re,"aria-busy":_||void 0,children:a("otp.send")}),xe&&Wt?v("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:_,onClick:()=>ue(!1),"data-testid":"sekyro-otp-back-to-code",children:a("otp.backToCode")}):null]})]})}s(kt,"PhoneOtpStep");import{lazy as Vn,Suspense as Hn,useMemo as $n,useState as Un}from"react";import{Component as Bn}from"react";var St=class St extends Bn{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};s(St,"LoadBoundary");var j=St;import{jsx as Se,jsxs as Gn}from"react/jsx-runtime";var Kn={load:s(()=>import("../email-otp-view-LCIDGNZT.js"),"load")};function bt({locale:e,strings:t,...n}){let o=I(e,t),[l,i]=Un(0),r=$n(()=>Vn(()=>Kn.load().then(u=>({default:u.EmailOtpView}))),[l]),a=Gn(O,{tone:"danger",children:[Se("span",{children:o.t("errors.network_error")}),Se(w,{kind:"secondary",onClick:()=>i(u=>u+1),children:o.t("common.retry")})]});return Se(j,{fallback:a,children:Se(Hn,{fallback:Se("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")}),children:Se(r,{...n,i18n:o})})},l)}s(bt,"EmailOtpStep");import{lazy as Wn,Suspense as zn,useMemo as Yn,useState as qn}from"react";import{jsx as be,jsxs as Jn}from"react/jsx-runtime";var Zn={load:s(()=>import("../eid-view-HQLNWM6A.js"),"load")};function vt({locale:e,strings:t,...n}){let o=I(e,t),[l,i]=qn(0),r=Yn(()=>Wn(()=>Zn.load().then(u=>({default:u.EidView}))),[l]),a=Jn(O,{tone:"danger",children:[be("span",{children:o.t("errors.network_error")}),be(w,{kind:"secondary",onClick:()=>i(u=>u+1),children:o.t("common.retry")})]});return be(j,{fallback:a,children:be(zn,{fallback:be("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:o.t("common.loading")}),children:be(r,{...n,i18n:o})})},l)}s(vt,"EidStep");import{useMemo as nr}from"react";import{lazy as Qn,Suspense as Xn,useMemo as jn,useState as er}from"react";import{jsx as ve,jsxs as or}from"react/jsx-runtime";var tr={load:s(()=>import("../flow-views-K3HXMKPU.js"),"load")};function B({view:e,i18n:t,quiet:n,...o}){let[l,i]=er(0),r=jn(()=>Qn(()=>tr.load().then(u=>({default:u[e]}))),[e,l]),a=or(O,{tone:"danger",children:[ve("span",{children:t.t("errors.network_error")}),ve(w,{kind:"secondary",onClick:()=>i(u=>u+1),children:t.t("common.retry")})]});return ve(j,{fallback:a,children:ve(Xn,{fallback:n===!0?null:ve("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:t.t("common.loading")}),children:ve(r,{...o,i18n:t})})},l)}s(B,"Flow");import{jsx as Ct,jsxs as rr}from"react/jsx-runtime";function Nt({step:e,locale:t,strings:n,className:o,onError:l}){let i=I(t,n),{busy:r,error:a,run:u}=Po(i,l),f=nr(()=>e.choice.options.flatMap(m=>{let h=wo(m,i),d=No[m.service];return h===null?[]:[{id:m.id,label:h,glyph:d&&Ct(F,{name:d})}]}),[e.choice.options,i]),g=e.choice.options.find(m=>m.service==="national_eid");return rr("div",{className:o,children:[Ct(ao,{title:i.t("method.heading"),description:i.t("method.description"),options:f,busy:r,error:a,focus:!0,testId:"sekyro-method",onChoose:m=>u(()=>e.choose(m))}),g?.nationalEid?.afterPass==="continue"?Ct(B,{view:"EidContinueHint",i18n:i,provider:g.nationalEid.providerName,quiet:!0}):null]})}s(Nt,"MethodChoice");import{isValidNni as sr,normalizeNni as $o}from"@sekyro/web";import{useId as ir,useState as wt}from"react";import{Fragment as ur,jsx as V,jsxs as Ce}from"react/jsx-runtime";var ar=new Set(["nni_not_found","registry_record_not_found"]),lr=new Set(["nni_invalid","id_number_invalid"]);function tt({step:e,locale:t,strings:n,className:o,onError:l}){let i=I(t,n),{t:r}=i,[a,u]=wt(""),[f,g]=wt(!1),[m,h]=wt(null),d=ir(),x=e.attemptsExhausted,k=s(async M=>{g(!0),h(null);try{await M()}catch(A){h(ke(A,i.strings)),l?.(A)}finally{g(!1)}},"run"),L=s(M=>{if(M.preventDefault(),e.source!=="typed"){k(()=>e.confirm());return}let A=$o(a);if(!/^\d{10}$/.test(A))return h("population.invalid");if(!sr(A))return h("population.reason_id_number_invalid");k(()=>typeof e.submitIdNumber=="function"?e.submitIdNumber(A):e.submitNni(A))},"onSubmit"),E=Qe(i,e.attemptsRemaining,x),C=e.reason!==void 0&&ar.has(e.reason),D=e.reason!==void 0&&lr.has(e.reason),U=Ce(ur,{children:[e.reason==="registry_unavailable"?Ce(O,{tone:"warning",children:[V("span",{children:r("population.reason_registry_unavailable")}),V("span",{children:E})]}):null,C&&e.canUseDocument?Ce(O,{tone:"warning",children:[V("span",{children:r("population.reason_registry_record_not_found_or_document")}),V("span",{children:E}),V(w,{kind:"secondary",disabled:f,onClick:()=>{k(()=>e.useDocument())},children:r("population.useDocument")})]}):null,C&&!e.canUseDocument||D?Ce(O,{tone:"danger",children:[V("span",{children:r(C?"population.reason_registry_record_not_found":"population.reason_id_number_invalid")}),V("span",{children:E})]}):null,x&&e.reason===void 0?V(O,{tone:"danger",children:V("span",{children:E})}):null,m!==null?V(O,{tone:"danger",children:V("span",{children:r(m)})}):null]}),[S,P,_]=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 Ce("form",{className:`sekyro-step${o?` ${o}`:""}`,"aria-labelledby":d,onSubmit:L,noValidate:!0,children:[V(re,{id:d,title:r(S),lead:r(P)}),U,e.source==="typed"?Ce("div",{className:"sekyro-field",children:[V("label",{className:"sekyro-label",htmlFor:`${d}-id-number`,children:r("population.label")}),V("input",{id:`${d}-id-number`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:r("population.placeholder"),value:a,"aria-describedby":`${d}-id-number-help`,"aria-invalid":m==="population.invalid"||m==="population.reason_id_number_invalid"||void 0,onChange:M=>{h(null),u($o(M.target.value).replace(/\D/g,"").slice(0,10))}}),V("span",{id:`${d}-id-number-help`,className:"sekyro-help",children:r("population.helper")})]}):null,V(se,{children:x?null:V(w,{type:"submit",full:!0,disabled:f,"aria-busy":f||void 0,children:r(_)})})]})}s(tt,"IdNumberEntry");function cr(e){return tt(e)}s(cr,"NniEntry");import{acceptedIssuers as gr,acceptedTypesFor as zo,warmDocumentCapture as hr}from"@sekyro/web";import{lazy as kr,Suspense as Sr,useEffect as br,useMemo as vr,useState as xt}from"react";import{acceptedIssuers as dr,acceptedTypesFor as Pt}from"@sekyro/web";import{useEffect as Uo,useId as pr,useMemo as Ko,useState as _t}from"react";import{jsx as H,jsxs as Ne}from"react/jsx-runtime";var Go=s(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold"),fr=s(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),t=>127397+t.charCodeAt(0))),"flag"),mr=220;function yr(e,t,n=[]){let o=null;try{o=new Intl.DisplayNames([e],{type:"region"})}catch{}let l=t.map(a=>({code:a,name:o?.of(a)??a})),i=new Intl.Collator(e),r=s(a=>{let u=n.indexOf(a);return u<0?n.length:u},"rank");return l.sort((a,u)=>r(a.code)-r(u.code)||i.compare(a.name,u.name))}s(yr,"countryNames");function Wo({step:e,i18n:t,issuer:n,onPicked:o,ageStepUp:l=!1}){let{t:i,locale:r}=t,a=Ko(()=>dr(e.documents),[e.documents]),u=Ko(()=>yr(r,a,Object.keys(e.documents.byIssuer??{})),[r,a,e.documents]),f=a.length===1?a[0]:null,[g,m]=_t(n??f),[h,d]=_t(""),[x,k]=_t(null),L=pr(),E=f===null?[]:Pt(e.documents,f),C=f!==null&&E.length===1?E[0]:null;Uo(()=>{f!==null&&C!==null&&e.selectDocument(f,C)},[f,C]);let D=s((P,_)=>{e.selectDocument(P,_),o?.()},"pick"),U=s(P=>{let _=Pt(e.documents,P);_.length===1?D(P,_[0]):m(P)},"chooseIssuer");if(Uo(()=>{if(x===null||g===null)return;let P=setTimeout(()=>D(g,x),mr);return()=>clearTimeout(P)},[x]),Ze(g!==null&&a.length>1&&n===void 0?()=>{m(null),k(null)}:null),C!==null)return null;if(g===null){let P=Go(h.trim()),_=P===""?u:u.filter(M=>Go(M.name).includes(P)||M.code.toLowerCase()===P);return Ne("section",{className:"sekyro-step",children:[H(re,{title:i("doc.countryTitle"),lead:i(l?"doc.ageStepUp":"doc.pickDescription")}),Ne("div",{className:"sekyro-field",children:[H("label",{className:"sekyro-label",htmlFor:L,children:i("doc.countryLabel")}),H("input",{id:L,type:"search",className:"sekyro-input",placeholder:i("doc.countrySearch"),value:h,onChange:M=>d(M.target.value)})]}),_.length===0?H("p",{className:"sekyro-text-muted",children:i("doc.noCountryMatch")}):H("ul",{className:"sekyro-rows",children:_.map(M=>H("li",{children:Ne("button",{type:"button",className:"sekyro-row-btn",onClick:()=>U(M.code),children:[H("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:fr(M.code)}),M.name]})},M.code))}),H(se,{children:null})]})}let S=Pt(e.documents,g);return Ne("section",{className:"sekyro-step",children:[H(re,{title:i("doc.pickTitle"),lead:i(l&&f!==null?"doc.ageStepUp":"native.doc.holdIt")}),H("div",{className:"sekyro-choices",children:S.map(P=>Ne("button",{type:"button",className:"sekyro-card","aria-pressed":x===P,disabled:x!==null&&x!==P,onClick:()=>k(P),children:[H("span",{className:"sekyro-card__tile",children:H(F,{name:P==="passport"?"passport":"card"})}),Ne("span",{className:"sekyro-card__body",children:[H("span",{className:"sekyro-card__title",children:i(`doc.type.${P}`)}),H("span",{className:"sekyro-card__sub",children:i(`doc.sub.${P}`)})]}),H("span",{className:"sekyro-radio","aria-hidden":"true"})]},P))}),a.length>1?H("button",{type:"button",className:"sekyro-link",onClick:()=>{m(null),k(null)},children:i("native.doc.changeCountry")}):null,H(se,{children:null})]})}s(Wo,"DocumentPicker");import{jsx as ie,jsxs as Nr}from"react/jsx-runtime";var Cr={load:s(()=>import("../document-capture-view-WDGHEAUI.js"),"load")};function Et({step:e,locale:t,strings:n,className:o,liveMrz:l}){let i=I(t,n),[r,a]=xt(0),[u,f]=xt(null),g=gr(e.documents),m=g.length>1,h=e.issuer!==null&&zo(e.documents,e.issuer).length>1,d=e.documentType===null||e.issuer===null||u!==null,x=g.length===1&&zo(e.documents,g[0]).length===1,[k]=xt(()=>d&&!x),L=e.ageStepUp===!0,E=vr(()=>kr(()=>Cr.load().then(D=>({default:D.DocumentCaptureView}))),[r]);br(()=>{hr()},[]);let C=Nr(O,{tone:"danger",children:[ie("span",{children:i.t("errors.network_error")}),ie(w,{kind:"secondary",onClick:()=>a(D=>D+1),children:i.t("doc.retryCamera")})]});return ie("div",{className:o,children:d?ie(Wo,{step:e,i18n:i,ageStepUp:L&&u===null&&k,...u==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>f(null)}):ie(j,{fallback:C,children:ie(Sr,{fallback:ie("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:i.t("common.loading")}),children:ie(E,{step:e,i18n:i,ageLead:L&&!k,liveMrz:l,...m?{onChangeCountry:s(()=>f("country"),"onChangeCountry")}:{},...h?{onChangeDocument:s(()=>f("document"),"onChangeDocument")}:{}})})},r)})}s(Et,"DocumentCapture");import{warmPortraitCapture as wr}from"@sekyro/web";import{Component as Pr,lazy as Yo,Suspense as qo,useEffect as _r,useMemo as Zo,useState as Jo}from"react";import{jsx as R,jsxs as It}from"react/jsx-runtime";var xr={load:s(()=>import("../portrait-capture-view-I7I6FJQO.js"),"load")},Er={load:s(()=>import("../portrait-review-view-A5HGZ7ZN.js"),"load")},Rt=class Rt extends Pr{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};s(Rt,"LoadBoundary");var ot=Rt;function Ir({step:e,i18n:t}){let{t:n}=t,o=he();return It("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[R("h2",{ref:o,tabIndex:-1,className:"sekyro-text-body",children:n(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?R("p",{className:"sekyro-text-muted",children:n("portrait.reviewDescription")}):null,e.uploadFailed?It(O,{tone:"danger",children:[R("span",{children:n("portrait.uploadFailed")}),R(w,{kind:"secondary",onClick:()=>{e.resubmit()},children:n("portrait.sendAgain")})]}):R("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:n("portrait.matching")})]})}s(Ir,"MatchPhase");function Tt({step:e,locale:t,strings:n,className:o,assetBaseUrl:l,verification:i}){let r=I(t,n),a=uo(i),[u,f]=Jo(0),[g,m]=Jo(null),h=Zo(()=>Yo(()=>xr.load().then(S=>({default:S.PortraitCaptureView}))),[u]),d=Zo(()=>Yo(()=>Er.load().then(S=>({default:S.PortraitScreens}))),[u]),x=typeof e.uploadPortrait=="function",k=x?e.photo?.source??"camera":"camera",L=x&&k!=="camera"&&e.photo?.uploadOffered===!0,E=k!=="upload",C=k==="upload"?"upload":k==="choice"?g??e.photo?.pick??"source":"camera";if(_r(()=>{e.phase==="capture"&&C==="camera"&&wr()},[e.phase,C]),e.phase==="match")return R("div",{className:o,children:R(Ir,{step:e,i18n:r})});let D=R("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")});if(e.phase==="review"||C!=="camera")return R("div",{className:o,children:R(ot,{fallback:R(w,{kind:"ghost",onClick:()=>f(S=>S+1),children:r.t("common.retry")}),children:R(qo,{fallback:D,children:R(d,{screen:e.phase==="review"||C==="camera"?"review":C,step:e,i18n:r,...E?{onCamera:s(()=>m("camera"),"onCamera")}:{},onUpload:()=>m("upload"),onDeclined:()=>m(null)})})},u)});if(!a.settled)return R("div",{className:o,children:D});if((e.captureMode??a.session)==="choice"&&a.choice===null)return R("div",{className:o,children:R(oo,{value:S=>r.t(S),children:R(lo,{onChoose:a.choose,legend:r.t("capture.modePicker.legendPhoto"),help:r.t("capture.modePicker.helpPhoto")})})});let U=It(O,{tone:"danger",children:[R("span",{children:r.t("errors.network_error")}),R(w,{kind:"secondary",onClick:()=>f(S=>S+1),children:r.t("portrait.retryCamera")})]});return R("div",{className:o,children:R(ot,{fallback:U,children:R(qo,{fallback:D,children:R(h,{step:e,i18n:r,...l!==void 0?{assetBaseUrl:l}:{},...L?{onUpload:s(()=>m("upload"),"onUpload")}:{}})})},u)})}s(Tt,"PortraitCapture");import{cameraUnavailableCauseOf as qr}from"@sekyro/web";import{useCallback as ae,useContext as Zr,useEffect as Ft,useId as Jr,useMemo as Qr,useRef as Pe,useState as le}from"react";var Lt={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 Fe={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"}}},Tr=["danger","success","warning","info"];function Mt(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}s(Mt,"channel");function Qo(e){let t=Mt(parseInt(e.slice(1,3),16)),n=Mt(parseInt(e.slice(3,5),16)),o=Mt(parseInt(e.slice(5,7),16));return .2126*t+.7152*n+.0722*o}s(Qo,"luminance");function Rr(e,t){let n=Qo(e),o=Qo(t),l=Math.max(n,o),i=Math.min(n,o);return(l+.05)/(i+.05)}s(Rr,"contrastRatio");function Xo(e,t){return Math.min(...Tr.map(n=>Rr(Fe[e][n].fg,t)))}s(Xo,"worstAgainst");function jo(e,t,n){return Math.min(Xo(e,t),Xo(e,n))}s(jo,"worstStatusContrast");function en(e,t){return jo("light",e,t)>=jo("dark",e,t)?"light":"dark"}s(en,"statusSchemeFor");import{useRef as Or,useState as Dr}from"react";import{useEffect as Lr,useId as Mr,useRef as Ot}from"react";import{jsx as we,jsxs as tn}from"react/jsx-runtime";function nt({open:e,title:t,closeLabel:n,onClose:o,children:l,actions:i,role:r,testId:a,returnFocus:u}){let f=Ot(null),g=Ot(null),m=Ot(!1),h=Mr();return Lr(()=>{let d=f.current;if(d!==null){if(e&&!d.open?(g.current=typeof document>"u"?null:document.activeElement,typeof d.showModal=="function"?d.showModal():d.setAttribute("open","")):!e&&d.open&&(typeof d.close=="function"?d.close():d.removeAttribute("open")),!e&&m.current){let x=u?.current??(g.current instanceof HTMLElement?g.current:null);g.current=null,x?.focus()}m.current=e}},[e,u]),we("dialog",{ref:f,className:"sekyro-dialog","aria-labelledby":h,...r==="alertdialog"?{role:r}:{},"data-testid":a,onCancel:d=>{d.preventDefault(),o()},onClick:d=>{d.target===d.currentTarget&&o()},children:tn("div",{className:"sekyro-dialog__panel",children:[tn("div",{className:"sekyro-dialog__head",children:[we("h2",{id:h,className:"sekyro-dialog__title",children:t}),n!==void 0?we("button",{type:"button",className:"sekyro-disc sekyro-dialog__close","aria-label":n,onClick:o,children:we(F,{name:"close"})}):null]}),l!==void 0?we("div",{className:"sekyro-dialog__body",children:l}):null,i!==void 0?we("div",{className:"sekyro-dialog__actions",children:i}):null]})})}s(nt,"FlowDialog");import{jsx as Be,jsxs as on}from"react/jsx-runtime";var Ar=["intro","data","processing","sharing","retention"];function nn({i18n:e,purpose:t="identity"}){let{t:n}=e,[o,l]=Dr(!1),i=Or(null),[r,a=""]=n("consent.short").split("{terms}");return on("div",{className:"sekyro-consent","data-testid":"sekyro-consent",children:[on("p",{className:"sekyro-consent__line",children:[r,Be("button",{ref:i,type:"button",className:"sekyro-link sekyro-link--inline","aria-haspopup":"dialog",onClick:()=>l(!0),children:n("consent.termsLink")}),a]}),Be(nt,{open:o,title:n("consent.termsTitle"),closeLabel:n("native.close"),onClose:()=>l(!1),returnFocus:i,testId:"sekyro-consent-terms",children:Be("div",{className:"sekyro-stack sekyro-stack--3",children:t==="human"?Be(B,{view:"HumanConsentTerms",i18n:e,quiet:!0}):Ar.map(u=>Be("p",{children:n(`consent.terms.${u}`)},u))})})]})}s(nn,"ConsentNotice");function rn(e){let t=e.trim().split(/\s+/).filter(o=>o!=="");return(t.length>=2?[t[0],t[1]].map(o=>Array.from(o??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}s(rn,"initials");import{useSyncExternalStore as Fr}from"react";var ln=s(e=>({colors:{...e?K.dark:K.light},radius:K.radius,fontFamily:K.font}),"brandTheme"),va=ln(!1),sn=/^#[0-9a-f]{6}$/i;function Dt(e,t,n){if(t)return null;let o=ut(e).colors,l=n?.colors?.bg??o?.bg,i=n?.colors?.surface??o?.surface;return l===void 0&&i===void 0||l!==void 0&&!sn.test(l)||i!==void 0&&!sn.test(i)?null:en(l??K.light.bg,i??K.light.surface)}s(Dt,"partnerStatusScheme");function rt(e,t,n){let o=ut(e);if(n&&o.colors!==void 0){let{brand:l,brandFg:i}=o.colors;l!==void 0&&$r(l,K.dark.bg)>=3?o.colors={brand:l,ring:l,...i!==void 0?{brandFg:i}:{}}:delete o.colors}if(Dt(e,n,t)==="dark"){let l=Fe.dark;o.colors={...o.colors,danger:l.danger.base,success:l.success.base,warning:l.warning.fg}}return qe(ln(n),o,fo(t))}s(rt,"verificationTheme");function st(e){let t=Fr(Hr,Vr,()=>!1);return e==="dark"||e==="system"&&t}s(st,"useDarkScheme");var Br="(prefers-color-scheme: dark)",cn=s(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Br):null,"media"),Vr=s(()=>cn()?.matches??!1,"prefersDark");function Hr(e){let t=cn();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}s(Hr,"subscribe");function $r(e,t){let[n,o]=[an(e),an(t)];return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}s($r,"contrast");function an(e){let t=[1,3,5].map(n=>{let o=Number.parseInt(e.slice(n,n+2),16)/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}s(an,"luminance");import{useEffect as Ur,useId as Kr,useState as Gr}from"react";import{jsx as G,jsxs as Ve}from"react/jsx-runtime";var Wr=new Set(["document_id_number_mismatch","name_mismatch","birth_date_mismatch"]);function zr({outcome:e}){return e==="approved"?Ve("svg",{className:"sekyro-outcome sekyro-outcome--approved",viewBox:"0 0 80 80","aria-hidden":"true",focusable:"false",children:[G("circle",{className:"sekyro-outcome__ring",cx:"40",cy:"40",r:"40"}),G("circle",{className:"sekyro-outcome__disc",cx:"40",cy:"40",r:"32"}),G("path",{className:"sekyro-outcome__glyph",d:"M6.5 12.5l3.6 3.6 7.4-8.2",pathLength:"1",transform:"translate(22 22) scale(1.5)"})]}):G("span",{className:`sekyro-tile sekyro-tile--${e==="review"?"info":"neutral"} sekyro-outcome-tile`,"aria-hidden":"true",children:G(F,{name:e==="review"?"pending":e==="expired"?"timer":"close"})})}s(zr,"OutcomeMark");function Yr({label:e,id:t,copied:n}){let[o,l]=Gr(!1);return Ur(()=>{if(!o)return;let i=setTimeout(()=>l(!1),1600);return()=>clearTimeout(i)},[o]),Ve("button",{type:"button",className:`sekyro-reference${o?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>l(!0),()=>{})},children:[G("span",{"aria-live":"polite",children:o?n:e}),G("bdi",{dir:"ltr",children:t}),G(F,{name:"copy"})]})}s(Yr,"ReferenceLine");function At({step:e,locale:t,strings:n,className:o,onClose:l}){let i=I(t,n),{t:r}=i,a=Kr(),u=he(),f=e.context.orgName,g=e.display==="approved"?"approved":e.display==="review"?"review":e.display==="expired"?"expired":"rejected",m;switch(e.display){case"policy_stop":{let h=e.failureReason??"";if(Wr.has(Xt(h)))m=r("session.result.detailsMismatch",{org:f});else if(h==="device_velocity_exceeded")m=r("session.result.deviceVelocity",{org:f});else if(h==="capture_tampered")m=r("session.result.deviceStop");else if(h==="camera_unavailable")m=r("reasons.camera_unavailable",{org:f});else if(h==="underage_estimated")m=r("reasons.underage_estimated");else if(h==="starter_credit_claimed")m=r("reasons.starter_credit_claimed");else if(h==="blocked_by_org")m=r("reasons.blocked_by_org");else{let d=eo(h);m=d!==null?r(d,{org:f}):r("session.result.rejected.description")}break}case"cooldown":{let h=to(i.locale,e.retryAfter);m=h!==null?r(h.key,{time:h.time}):r("reasons.device_cooldown");break}case"platform_unsupported":m=r("result.platform_unsupported");break;case"attempts_exhausted":m=r("common.noAttemptsLeft");break;default:m=f!==""?r(`native.result.${g}`,{org:f}):r(`session.result.${g}.description`)}return Ve("section",{className:`sekyro-result${o?` ${o}`:""}`,"aria-labelledby":a,"data-testid":"sekyro-result",children:[Ve("div",{className:"sekyro-result__body",children:[G(zr,{outcome:e.display==="cooldown"?"review":g}),Ve("div",{className:"sekyro-heading",children:[G("h2",{id:a,ref:u,tabIndex:-1,className:"sekyro-text-body",children:r(`session.result.${g}.title`)}),G("p",{className:"sekyro-text-muted",children:m})]}),G(Yr,{label:r("result.referenceLabel"),id:e.context.sessionId,copied:r("native.result.copied")})]}),l!==void 0?G("div",{className:"sekyro-actions",children:G(w,{full:!0,onClick:l,children:f!==""?r("native.result.back",{org:f}):r("native.close")})}):null]})}s(At,"VerificationResultScreen");import{Fragment as Vt,jsx as c,jsxs as ee}from"react/jsx-runtime";function Xr(e,t,n){let o=t?K.dark:K.light,l=t?K.roles.dark:K.roles.light,i=e.colors??{},r={},a=i.fg===o.fg&&i.surface===o.surface;i.brand===o.brand&&i.surface===o.surface&&(r["--sekyro-color-brand-soft"]=l.brandSoft),a&&(r["--sekyro-color-line"]=l.line,r["--sekyro-color-line-subtle"]=l.lineSubtle,r["--sekyro-color-line-strong"]=l.lineStrong,r["--sekyro-color-sunken"]=l.sunken),i.fgMuted===o.fgMuted&&i.surface===o.surface&&(r["--sekyro-color-fg-subtle"]=l.fgSubtle),e.fontFamily===K.font&&(r["--sekyro-font-display"]=K.fontDisplay);let u=t?Lt.dark:Lt.light;if(r["--sekyro-color-success-soft"]=u.successSoft,r["--sekyro-color-success-fg"]=u.successFg,r["--sekyro-color-on-success"]=u.onSuccess,r["--sekyro-color-warning-soft"]=u.warningSoft,r["--sekyro-color-warning-fg"]=u.warningFg,r["--sekyro-color-danger-soft"]=u.dangerSoft,r["--sekyro-color-danger-fg"]=u.dangerFg,r["--sekyro-color-on-danger"]=u.onDanger,r["--sekyro-color-info-soft"]=u.infoSoft,r["--sekyro-color-info-fg"]=u.infoFg,i.brand===o.brand&&(r["--sekyro-color-line-brand"]=u.lineBrand),n!==null){let f=Fe[n];for(let g of["danger","success","warning","info"])r[`--sekyro-color-${g}-soft`]=f[g].soft,r[`--sekyro-color-${g}-fg`]=f[g].fg;r["--sekyro-color-on-success"]=f.success.on,r["--sekyro-color-on-danger"]=f.danger.on}return r}s(Xr,"flowRoles");function Ht(e){let{verification:t,locale:n,strings:o,onStep:l,onResult:i}=e,{step:r,error:a}=ft(t);Ft(()=>{r!==null&&l?.(r)},[r,l]),Ft(()=>i===void 0?void 0:t.on("result",i),[t,i]);let u=st(e.colorScheme??"light"),f=r?.context.branding,g=rt(f,e.theme,u),[m,h]=le(!1),d=`sekyro-verification${u?" sekyro-verification--dark":""}${m?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,x=Pe(e.onClose);x.current=e.onClose;let k=Pe(r);k.current=r;let L=ae(()=>{let S=k.current;x.current?.(S?.kind==="result"?{reason:"finished",result:S.result}:{reason:"cancelled"})},[]),[E,C]=le(null),D=ae(()=>{let S=k.current;S!==null&&S.kind!=="result"&&S.context.consentRecorded?C("close"):L()},[L]),U=Qr(()=>t.reportCaptureIssue===void 0?null:S=>t.reportCaptureIssue?.(S),[t]);return c(yo,{theme:g,className:d,children:c(Ae,{locale:n,...o!==void 0?{strings:o}:{},children:c("div",{dir:e.dir??(n==="ar"?"rtl":"ltr"),lang:n,className:"sekyro-flow",style:Xr(g,u,Dt(f,u,e.theme)),children:c(bo.Provider,{value:h,children:c(dt.Provider,{value:e.onClose!==void 0?L:void 0,children:c(Je.Provider,{value:e.onClose!==void 0?D:void 0,children:c(ro.Provider,{value:U,children:ee(io.Provider,{value:jr,children:[c(ns,{...e,step:r,error:a,immersive:m,onLeaveAsk:()=>C("history"),onClosed:L}),c(os,{open:E!==null,onStay:()=>{E==="history"&&Bt(),C(null)},onLeave:()=>{let S=E;C(null),S==="close"||e.onClose!==void 0?L():typeof window<"u"&&pn()}})]})})})})})})})})}s(Ht,"SekyroVerification");var jr={self:c(F,{name:"face"}),assisted:c(F,{name:"camera"})};function es(e,t){if(t===void 0||t==="aml_screening")return null;let n=e,o=n[`session.processing.${t}.title`],l=n[`session.processing.${t}.description`];return typeof o=="string"&&o!==""&&typeof l=="string"&&l!==""?{title:o,description:l}:null}s(es,"processingCopyOf");function ts({error:e,retry:t}){let{t:n}=I(),o=he();return ee(ct,{tone:"danger",testId:"sekyro-error-notice",children:[c("span",{children:n(jt(e.kind))}),e.retryable?c(w,{ref:o,kind:"secondary",className:"sekyro-btn--start",onClick:t,children:n("common.retry")}):null]})}s(ts,"CameraErrorNotice");var un="sekyroFlow";function dn(){let e=window.history.state;return typeof e=="object"&&e!==null&&e[un]===!0}s(dn,"onGuard");function Bt(){if(typeof window>"u"||dn())return;let e=window.history.state;window.history.pushState({...typeof e=="object"&&e!==null?e:{},[un]:!0},"")}s(Bt,"pushGuard");function pn(){window.history.back()}s(pn,"leaveHistory");function os({open:e,onStay:t,onLeave:n}){let{t:o}=I();return c(nt,{open:e,role:"alertdialog",title:o("leave.title"),onClose:t,testId:"sekyro-leave",actions:ee(Vt,{children:[c(w,{full:!0,onClick:t,children:o("leave.stay")}),c(w,{full:!0,kind:"danger",onClick:n,children:o("leave.confirm")})]}),children:c("p",{className:"sekyro-text-muted",children:o("leave.body")})})}s(os,"LeaveDialog");function ns(e){let{step:t,error:n,slots:o,immersive:l}=e,i=I(),{t:r}=i,[a,u]=le(!1),[f,g]=le([]),m=ae(p=>(g(b=>[...b,p]),()=>g(b=>b.filter(J=>J!==p))),[]),[h,d]=le(null),x=ae(p=>d(()=>p),[]),[k,L]=le(0),[E,C]=le(null),D=t?.context.purpose??"identity",U=t?.context.returning===!0,S=e.verification,P=D==="human"||t?.context.cameraUnavailableHandled===!0,_=S.reportCameraUnavailable!==void 0&&P?p=>S.reportCameraUnavailable?.(p)??Promise.resolve():void 0,M=t?.kind==="liveness"&&t.mode==="liveness"&&t.reason===void 0&&!t.attemptsExhausted,A=e.handoffUrl,ce=ae((p,b)=>_===void 0?void 0:c(B,{view:"NoCameraView",i18n:i,quiet:!0,cause:b,onRetry:p,...M?{onContinue:_}:{},...A!==void 0?{handoffUrl:A}:{}}),[i,S,P,M,A]),xe=ae((p,b)=>c(_o,{start:p,context:b,human:D==="human",returning:U,extra:b.canChooseFacing&&c(co,{value:b.facing,onChange:b.setFacing}),notice:b.permissionSettled&&b.permission==="denied"?ce(p,"denied"):void 0}),[D,U,ce]),ue=ae((p,b)=>{let J=qr(p.kind);return(J!==void 0?ce(b,J):void 0)??ee(Vt,{children:[c(ts,{error:p,retry:b}),J!==void 0&&A!==void 0?c(B,{view:"DesktopHandoffView",i18n:i,quiet:!0,url:A}):null]})},[ce,A,i]),Ee=Pe(""),He=e.livenessProps?.slots?.stageOverlay,de=ae(p=>(p.guidance!==""&&!p.coached&&(Ee.current=p.guidance),c(xo,{testId:"sekyro-capture-stage",video:c("video",{ref:p.videoRef,playsInline:!0,muted:!0,className:"sekyro-lm-video sekyro-fc-video","aria-hidden":"true","data-testid":"sekyro-capture-video"}),instruction:p.settled?r("capture.checkingTitle"):p.guidance!==""?p.guidance:Ee.current,note:p.note,busy:p.settled,progress:p.phase==="seeking"||p.phase==="aligning"?p.progress:1,still:p.still,live:p.live,closeLabel:r("native.close"),overlay:He?.(p.videoRef),ramp:p.ramp?.colour??null,...p.settled?{}:{onClose:s(()=>L(b=>b+1),"onClose")},end:p.switchCamera&&c("button",{type:"button",className:"sekyro-glass",onClick:p.switchCamera,"aria-label":r("capture.switchCamera"),children:c(no,{})})})),[r,He]),pe=Jr(),$e=t,Ie=t!==null&&E===t.key&&t.context.switchable!==void 0,me=h??(t===null||t.kind==="result"?null:Ie?()=>C(null):t.context.switchable!==void 0&&typeof $e?.chooseOption=="function"?()=>C(t.key):null),Ue=Pe(me);Ue.current=me;let X=Pe(t);X.current=t;let fe=Pe({ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0});fe.current={ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0};let Te=e.backNavigation==="history";if(Ft(()=>{if(!Te||typeof window>"u")return;Bt();let p=s(()=>{if(dn())return;let b=X.current,J=Ue.current;J!==null?(J(),Bt()):b?.kind!=="result"&&b?.context.consentRecorded===!0?fe.current.ask():fe.current.hostClose?fe.current.closed():pn()},"onPop");return window.addEventListener("popstate",p),()=>window.removeEventListener("popstate",p)},[Te]),n!==null)return c(ct,{tone:"danger",children:c("span",{children:r(ke(n,i.strings))})});if(t===null)return ee("div",{className:"sekyro-skeleton",role:"status","aria-busy":"true",children:[c("span",{className:"sekyro-visually-hidden",children:r("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:W}=t,Z=s(p=>{u(!0),p().finally(()=>u(!1))},"refresh"),ye=o?.header??c(is,{context:W,headerId:pe,end:o?.headerEnd,...me!==null?{onBack:me}:{}}),T,z=Ie;if(z)T=c(B,{view:"LaneChoiceView",i18n:i,step:t,onClose:()=>C(null)});else switch(t.kind){case"phone_otp":T=c(kt,{step:t});break;case"email_otp":T=c(bt,{step:t});break;case"method":T=c(Nt,{step:t});break;case"registry":T=c(tt,{step:t});break;case"document":T=c(Et,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{}});break;case"liveness":{let p=e.livenessProps?.slots?.intro,b={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:p??xe,...p===void 0&&e.livenessProps?.slots?.errorPanel===void 0?{errorPanel:ue}:{}},...k>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:i.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};T=c(so.Provider,{value:de,children:t.instructions==="icao"||t.livePhoto?.icao===!0?c(B,{view:"LivePhotoLiveness",i18n:i,step:t,livenessProps:b,sekyroIntro:p===void 0},k):c(po,{...b},k)});break}case"portrait":T=ee(Vt,{children:[t.retakeOnly?c(B,{view:"PortraitRetakeNotice",i18n:i,quiet:!0}):null,c(Tt,{step:t,verification:e.verification,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"contact_choice":T=c(B,{view:"ContactChoiceView",i18n:i,step:t});break;case"choice":T=c(B,{view:"GenericChoiceView",i18n:i,step:t});break;case"identity_summary":T=c(B,{view:"IdentitySummaryView",i18n:i,step:t});break;case"mobile_required":T=e.handoffUrl!==void 0?c(B,{view:"HandoffView",i18n:i,url:e.handoffUrl,refresh:t.refresh}):c(Xe,{tone:"brand",icon:"smartphone",title:r("handoff.title"),actions:c(w,{kind:"secondary",full:!0,disabled:a,onClick:()=>Z(t.refresh),children:r("common.refresh")}),children:c("p",{children:r("reasons.mobile_required")})});break;case"processing":{let p=es(i.strings,t.service);T=c(Xe,{tone:"brand",icon:"pending",busy:!t.stalled,live:!0,title:p?.title??r("session.processing.title"),actions:t.stalled?c(w,{kind:"secondary",full:!0,disabled:a,onClick:()=>Z(t.refresh),children:r("common.refresh")}):null,children:c("p",{children:p?.description??r("session.processing.description")})});break}case"eid":T=c(vt,{step:t});break;case"unsupported":{let p=t.reason==="platform_unsupported";T=c(Xe,{tone:"neutral",icon:"smartphone",title:r(p?"needsApp.title":"unsupported.title"),actions:c(rs,{org:W.orgName}),children:c("p",{children:p?W.orgName!==""?r("needsApp.description",{org:W.orgName}):r("needsApp.descriptionNoOrg"):r("unsupported.description",{org:W.orgName})})});break}case"result":T=o?.result?.(t)??c(ss,{step:t});break;default:{let p=t;T=null}}let Y=!l&&!W.consentRecorded&&t.kind!=="result"?c(nn,{i18n:i,purpose:W.purpose}):null;return c(So.Provider,{value:x,children:ee(ko.Provider,{value:Y===null?null:{node:Y,owner:f[0]??null,claim:m},children:[l?null:ye,!l&&t.kind!=="result"&&W.sections.length>1?c(as,{context:W,current:t.section,i18n:i}):null,c(vo,{pageKey:t.key,children:T}),!l&&!z&&t.kind!=="result"&&t.context.switchable!==void 0?c(B,{view:"LaneSwitch",i18n:i,step:t,onOpen:()=>C(t.key),quiet:!0},t.key):null,f.length===0?Y:null,l?null:o?.footer!==void 0?o.footer:W.branding?.hideAttribution===!0?null:ee("a",{className:"sekyro-footer",href:"https://sekyro.ai",target:"_blank",rel:"noopener noreferrer",children:[c(F,{name:"lock"}),r("shell.verifiedBy")]})]})})}s(ns,"Body");function rs({org:e}){let{t}=I(),n=Zr(dt);return n===void 0?null:c(w,{full:!0,onClick:n,children:e!==""?t("native.result.back",{org:e}):t("native.close")})}s(rs,"BackToOrg");function ss({step:e}){return c(Je.Consumer,{children:t=>c(At,{step:e,...t!==void 0?{onClose:t}:{}})})}s(ss,"ResultPage");function is({context:e,headerId:t,end:n,onBack:o}){let{t:l}=I(),[i,r]=le(!1),a=i?void 0:e.branding?.logoUrl,u=e.orgName!==""?e.orgName:l(e.returning?"returning.heading":"session.title");return c("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:ee("div",{className:"sekyro-org",children:[o!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__back","aria-label":l("common.back"),onClick:o,"data-testid":"sekyro-back",children:c(F,{name:"back"})}):null,c("span",{className:"sekyro-org__tile","aria-hidden":"true",children:a!==void 0?c("img",{className:"sekyro-org__logo",src:a,alt:"",onError:()=>r(!0)}):rn(e.orgName)}),ee("div",{className:"sekyro-org__text",children:[c("h1",{id:t,className:"sekyro-org__name",children:u}),c("p",{className:"sekyro-org__sub",children:l(e.purpose==="human"?"shell.subtitleHuman":"shell.subtitle")})]}),n!=null?c("div",{className:"sekyro-org__end",children:n}):null,c(Je.Consumer,{children:f=>f!==void 0?c("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":l("native.close"),onClick:f,children:c(F,{name:"close"})}):null})]})})}s(is,"OrgHeader");function as({context:e,current:t,i18n:n}){let o=t===null?-1:e.sections.indexOf(t),l=e.progress,i=l!==void 0&&l.length===e.sections.length?l:e.sections.map((r,a)=>({id:r,state:a<o?"done":a===o?"current":"upcoming"}));return c("ol",{className:"sekyro-progress__bars","aria-label":n.t("session.progressLabel"),children:i.map(({id:r,state:a})=>c("li",{className:`sekyro-progress__bar${a==="done"?" is-done":a==="current"?" is-current":""}`,...a==="current"?{"aria-current":"step"}:{},children:c("span",{className:"sekyro-visually-hidden",children:n.strings[`section.${r}`]??r})},r))})}s(as,"SectionProgress");import{useEffect as ls,useState as fn}from"react";import{jsx as _e}from"react/jsx-runtime";function cs(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}s(cs,"pageUrl");function us({hostedUrl:e,inAppBrowser:t,...n}){let[o,l]=fn(t===!0);ls(()=>{t===void 0&&pt()&&l(!0)},[t]);let[i,r]=fn(!1),a=st(n.colorScheme??"light"),u=n.handoffUrl??e??cs();return o&&!i?_e(mo,{theme:qe(rt(void 0,void 0,a),n.theme),className:`sekyro-verification${a?" sekyro-verification--dark":""}${n.className!==void 0?` ${n.className}`:""}`,children:_e(Ae,{locale:n.locale,...n.strings!==void 0?{strings:n.strings}:{},children:_e("div",{dir:n.dir??(n.locale==="ar"?"rtl":"ltr"),lang:n.locale,className:"sekyro-flow",children:_e(ds,{url:u,onContinue:()=>r(!0)})})})}):_e(Ht,{...n,...u!==""?{handoffUrl:u}:{}})}s(us,"SekyroFlow");function ds({url:e,onContinue:t}){let n=I();return _e(B,{view:"InAppBrowserPrompt",i18n:n,url:e,onContinue:t})}s(ds,"Prompt");export{Et as DocumentCapture,vt as EidStep,bt as EmailOtpStep,tt as IdNumberEntry,Nt as MethodChoice,cr as NniEntry,kt as PhoneOtpStep,Tt as PortraitCapture,us as SekyroFlow,Ht as SekyroVerification,Ae as StepI18nProvider,At as VerificationResultScreen,bn as arSteps,vn as enSteps,Nn as formatTemplate,Cn as frSteps,pt as isInAppBrowser,kn as loadSekyroLocale,wn as resolveSekyroStrings,Sn as retakeHintStringKey,I as useStepI18n,ft as useVerificationStep};
|
|
2
|
+
import{a as Rn}from"../chunk-3H6KQ6BP.js";import{a as K,d as yn,e as yt,f as qe,g as gn,h as hn}from"../chunk-ZZIBCKKC.js";import{a as kn,b as Sn,c as _n}from"../chunk-GUTF3SPK.js";import{a as xn,b as En,c as In,d as Tn,e as ht,g as je}from"../chunk-IAJAM4I6.js";import{b as ln,c as cn,d as un,e as dn,f as pn,h as fn,k as mn}from"../chunk-JTDARDD6.js";import{b as sn}from"../chunk-AGIBFSCL.js";import{a as an}from"../chunk-7MMT5M4E.js";import{a as ke}from"../chunk-VRDPGOXM.js";import{a as Po,b as _o,c as xo,d as Eo,e as Io,f as De,g as R}from"../chunk-455FWUKU.js";import{a as B,b as ne,c as bn,d as oe,e as vn,f as Ze,g as Je,h as gt,i as Cn,k as Qe,l as Nn,m as wn,o as Pn,p as O,q as Xe}from"../chunk-T7C7Q4AN.js";import{c as rn}from"../chunk-VBIVDLBE.js";import{a as v,c as en,j as No,l as wo,m as tn,n as nn,o as on,q as mt,r as ve}from"../chunk-3GCHNE7R.js";import{a as s}from"../chunk-2KED7D2Q.js";import{useEffect as To,useState as Ln}from"react";function kt(e){let[t,o]=Ln(()=>e?.currentStep?.()??null),[n,a]=Ln(null);return To(()=>{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 i=!0,r=e.on("step",l=>{i&&o(l)});return e.run().then(l=>{i&&o(c=>c??l)},l=>{i&&a(l)}),()=>{i=!1,r()}},[e]),{step:t,error:n}}s(kt,"useVerificationStep");import{useEffect as vt,useId as Mo,useMemo as Oo,useRef as Ct,useState as ce}from"react";var Ro="AC247 AD376 AE971/0 AF93/0 AG1/1 AI1/1 AL355/0 AM374/0 AO244 AR54/0 AS1/1 AT43/0 AU61/0 AW297 AX358/0 AZ994/0 BA387/0 BB1/1 BD880/0 BE32/0 BF226 BG359/0 BH973 BI257 BJ229 BL590/0 BM1/1 BN673 BO591/0 BQ599 BR55/0 BS1/1 BT975 BW267 BY375/8 BZ501 CA1/1 CC61/0 CD243/0 CF236 CG242 CH41/0 CI225 CK682 CL56 CM237 CN86/0 CO57/0 CR506 CU53/0 CV238 CW599 CX61/0 CY357 CZ420 DE49/0 DJ253 DK45 DM1/1 DO1/1 DZ213/0 EC593/0 EE372 EG20/0 EH212/0 ER291/0 ES34 ET251/0 FI358/0 FJ679 FK500 FM691 FO298 FR33/0 GA241 GB44/0 GD1/1 GE995/0 GF594/0 GG44/0 GH233/0 GI350 GL299 GM220 GN224 GP590/0 GQ240 GR30 GT502 GU1/1 GW245 GY592 HK852 HN504 HR385/0 HT509 HU36/06 ID62/0 IE353/0 IL972/0 IM44/0 IN91/0 IO246 IQ964/0 IR98/0 IS354 IT39 JE44/0 JM1/1 JO962/0 JP81/0 KE254/0 KG996/0 KH855/0 KI686/0 KM269 KN1/1 KP850/0 KR82/0 KW965 KY1/1 KZ7/8 LA856/0 LB961/0 LC1/1 LI423/0 LK94/0 LR231/0 LS266 LT370/0 LU352 LV371 LY218/0 MA212/0 MC377/0 MD373/0 ME382/0 MF590/0 MG261/0 MH692/1 MK389/0 ML223 MM95/0 MN976/0 MO853 MP1/1 MQ596/0 MR222 MS1/1 MT356 MU230 MV960 MW265/0 MX52 MY60/0 MZ258 NA264/0 NC687 NE227 NF672 NG234/0 NI505 NL31/0 NO47 NP977/0 NR674 NU683 NZ64/0 OM968 PA507 PE51/0 PF689 PG675 PH63/0 PK92/0 PL48 PM508/0 PR1/1 PS970/0 PT351 PW680 PY595/0 QA974 RE262/0 RO40/0 RS381/0 RU7/8 RW250/0 SA966/0 SB677 SC248 SD249/0 SE46/0 SG65 SH290 SI386/0 SJ47 SK421/0 SL232/0 SM378 SN221 SO252/0 SR597 SS211/0 ST239 SV503 SX1/1 SY963/0 SZ268 TA290 TC1/1 TD235 TG228 TH66/0 TJ992 TK690 TL670 TM993/8 TN216 TO676 TR90/0 TT1/1 TV688 TW886/0 TZ255/0 UA380/0 UG256/0 US1/1 UY598/0 UZ998 VA39 VC1/1 VE58/0 VG1/1 VI1/1 VN84/0 VU678 WF681 WS685 XK383/0 YE967/0 YT262/0 ZA27/0 ZM260/0 ZW263/0",Mn;function On(e){return Mn??(Mn=new Map(Ro.split(" ").map(t=>{let[o,n]=t.slice(2).split("/");return[t.slice(0,2),[o,n]]}))),Mn.get(e.toUpperCase())}s(On,"entryOf");function An(e){return On(e)?.[0]}s(An,"dialCodeOf");function Dn(e){return On(e)?.[1]}s(Dn,"nationalPrefixOf");import{normalizeNni as Lo}from"@sekyro/web";function et(e){let t=Lo(e).replace(/\D/g,"");return/^\D*\+/.test(e)?`+${t}`:t.startsWith("00")?`+${t.slice(2)}`:t}s(et,"digitsOf");var St=s((e,t)=>(t.trunk!==void 0&&e.startsWith(t.trunk)?e.slice(t.trunk.length):e).slice(0,Math.max(...t.lengths)),"fitDigits");function tt(e,t){let o="",n=0;for(let a of t?.formats?.find(i=>new RegExp(`^(?:${i.leading})`).test(e))?.groups??[])n<e.length&&(o+=(n>0?" ":"")+e.slice(n,n+a)),n+=a;return o+e.slice(n)}s(tt,"groupDigits");function Fn(e,t){let o=0;for(let n=t;n>0&&o<e.length;o+=1)e[o]!==" "&&(n-=1);return o}s(Fn,"caretAfter");var bt=s((e,t)=>t.find(o=>e.startsWith(o.dial)),"countryOfNumber"),Bn=s((e,t)=>e.lengths.join(", ").replace(/, (\d+)$/,` ${t} $1`),"lengthsLabel");import{Fragment as Gn,jsx as b,jsxs as $}from"react/jsx-runtime";var Vn=s((e,t,o)=>{if(e===void 0)return 0;let n=Date.parse(e)-t;return Number.isFinite(n)?Math.min(o,Math.max(0,Math.ceil(n/1e3))):0},"secondsUntil"),Ao=600,Do=30,Fo=s(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),Bo=["whatsapp","sms"],Hn=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=et(e).replace("+","");return/^\d{8,15}$/.test(t)?`+${t}`:null}s(Un,"normalizedPhone");var Vo=s(e=>String.fromCodePoint(...Array.from(e,t=>127397+t.charCodeAt(0))),"flagOf");function Ho(e){let t=[];for(let o of e.phoneCountries??["MR"]){let n=e.phoneRules?.find(i=>i.code===o),a=n?.dial??An(o);a!==void 0&&!t.some(i=>i.code===o)&&t.push({code:o,dial:`+${a}`,...n!==void 0?{rule:n}:{}})}return t}s(Ho,"phoneCountriesOf");function Uo(e,t){if(t===null||!e.startsWith(t.dial))return Un(e);let o=e.slice(t.dial.length).replace(/\D/g,""),n=Dn(t.code);return n!==void 0&&o.startsWith(n)&&(o=o.slice(n.length)),Un(t.dial+o)}s(Uo,"e164Of");var $n=s((e,t)=>(bt(e,t)??t[0])?.code??null,"countryFor");function $o(e){let t=null;try{t=new Intl.DisplayNames([e],{type:"region"})}catch{}return o=>`${t?.of(o.code)??o.code} (${o.dial})`}s($o,"countryLabels");var Kn="other";function Nt({step:e,locale:t,strings:o,className:n,defaultPhone:a,onError:i}){let r=R(t,o),{t:l}=r,c=Oo(()=>Ho(e),[e.phoneCountries,e.phoneRules]),d=a??c[0]?.dial??"",[y,m]=ce(()=>$n(d,c)),h=c.map(g=>g.code).join(",");vt(()=>{if(y===null||!c.some(g=>g.code===y)){let g=$n(d,c);m(g);let N=w.current,q=c.find(j=>j.code===g)?.dial;q!==void 0&&I(j=>N!==null&&j.startsWith(N.dial)?q+j.slice(N.dial.length):j.startsWith("+")?j:q)}},[h,d]);let p=c.find(g=>g.code===y)??null,w=Ct(p);p!==null&&(w.current=p);let[S,I]=ce(d),[T,x]=ce(!1),[M,D]=ce(!1),[L,k]=ce(""),[P,A]=ce(!1),[W,ae]=ce(null),[ee,te]=ce(!1),[Ue,ct]=ce(null),ue=Ct(null),de=e.phase==="verify"&&!ee,$e=e.phase==="verify",Ke=_n($e),[ut,Ge]=kn(e.reason==="otp_mismatch",e.attemptsRemaining,()=>k("")),z=Mo(),Ie=Ct(null);vt(()=>{let g=setTimeout(()=>Ie.current?.focus({preventScroll:!0}),350);return()=>clearTimeout(g)},[de]);let Te=e.phase==="verify"?e.codeExpiresAt??"sent":null;vt(()=>{Te!==null&&(te(!1),ue.current!==null&&!Hn.has(e.reason??"")&&ct(ue.current),ue.current=null)},[Te]);let he=s(async g=>{A(!0),ae(null);try{await g()}catch(N){ae(ke(N,r.strings)),i?.(N)}finally{A(!1)}},"run"),J=Bo.filter(g=>(e.channels??[]).includes(g)),F=e.phoneInternational===!0,pe=T||p===null,Q=pe||S.startsWith("+")&&!S.startsWith(p.dial),_=Q?void 0:p.rule,Se=Q?S:S.replace(p.dial,"").replace(/\D/g,""),Y=_?St(Se,_):Se,Re=Q&&!pe&&!F&&e.phoneRules?.length&&!c.some(g=>g.dial.startsWith(S)),fe=Re?null:_?_.lengths.includes(Y.length)?p.dial+Y:null:pe&&!S.startsWith("+")?null:Uo(S,T?null:p),f=!e.needsPhone||fe!==null,C=s((g,N=!1)=>{let q=e.needsPhone?N?Ue:{number:fe??S,shown:Q||p===null?fe??S:`${p.dial} ${tt(Y,_)}`}:null;ue.current=q,he(async()=>{try{await e.send({...q!==null?{phone:q.number}:{},...g!==void 0?{channel:g}:{}})}catch(j){throw ue.current=null,j}})},"send"),X=s(g=>{he(()=>e.verify(g))},"submitCode"),Kt=s(g=>{g.preventDefault(),de?X(L):J.length<=1&&f&&C(J[0])},"onSubmit"),So=s(g=>{let N=g.target,q=g.nativeEvent.inputType,j=Math.max(0,N.value.lastIndexOf("+")),be=et(N.value.slice(j)),Me=bt(be,c),Oe=et(N.value.slice(j,N.selectionStart)).length,pt=be,Qt=be;if(D(!1),!Me&&(pe||be.startsWith("+")))F&&x(!0);else{let Ae=Me??p,le=Me?be.slice(Me.dial.length):be;if(m(Ae.code),x(!1),le===Y&&q?.startsWith("delete")&&(q.endsWith("Forward")||(Oe-=1),le=le.slice(0,Oe)+le.slice(Oe+1)),Ae.rule){let ft=St(le,Ae.rule),jt=le.length-ft.length;Oe-=jt,le=jt>0&&!Me&&Y.length===ft.length?Y:ft}Qt=Ae.dial+le,pt=tt(le,Ae.rule)}I(Qt),N.value=pt;let Xt=Fn(pt,Oe);N.setSelectionRange(Xt,Xt)},"onNumber"),We=Re?l("otp.reason_otp_destination_not_allowed"):M&&_?l("otp.phoneLengthError",{digits:Bn(_,l("otp.or"))}):"",Gt=c.length>1||F,me=`${z}-phone`,dt=Vn(e.codeExpiresAt,Ke,Ao),Le=Vn(e.resendAvailableAt,Ke,Do),ze=de&&e.codeExpiresAt!==void 0&&dt===0,Wt=e.needsPhone&&!e.attemptsExhausted,zt=$e&&(e.codeExpiresAt===void 0||dt>0),Yt=de&&Wt?()=>te(!0):ee&&zt?()=>te(!1):null;Ze(Yt===null?null:P?()=>{}:Yt);let Ye=s(g=>l(g==="whatsapp"?"otp.channelWhatsapp":"otp.channelSms"),"label"),[bo,vo]=l("otp.sentTo",{channel:Ye(e.channel)}).split("{number}"),qt=e.context.simulation?.otpCode,Co=e.reason==="otp_mismatch"?$(O,{tone:"danger",children:[b("span",{children:l("otp.reason_otp_mismatch")}),b("span",{children:Xe(r,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&Hn.has(e.reason)?b(O,{tone:"warning",children:b("span",{children:l(`otp.reason_${e.reason}`)})}):null,Zt=$(Gn,{children:[Co,W!==null?b(O,{tone:"danger",children:b("span",{children:l(W)})}):null]});if(de){let g=J.length===0;return $("form",{className:`sekyro-step sekyro-otp${n?` ${n}`:""}`,"aria-labelledby":z,onSubmit:Kt,noValidate:!0,children:[b(ne,{id:z,title:l("otp.verifyTitle"),lead:qt!==void 0?b(wn,{template:l("sandbox.otpHint"),code:qt}):$(Gn,{children:[bo,b("bdi",{dir:"ltr",className:"sekyro-mono",children:Ue?.shown??e.sentToMasked}),vo]})}),Zt,$("div",{className:"sekyro-field",children:[b("label",{className:"sekyro-label",htmlFor:`${z}-code`,children:l("otp.codeLabel")}),b(Sn,{id:`${z}-code`,value:L,invalid:ut,onChange:N=>{N!==""&&Ge(),k(N),N.length===6&&L.length!==6&&!P&&!e.attemptsExhausted&&X(N)}}),b("span",{className:`sekyro-help sekyro-otp-expiry${ze?" is-danger":""}`,"aria-hidden":!ze||void 0,children:ze?l("otp.expired"):l("otp.expiresIn",{time:Fo(dt)})})]}),b("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:ze?l("otp.expired"):""}),$(oe,{children:[b(v,{type:"submit",full:!0,disabled:P||L.length!==6||e.attemptsExhausted,"aria-busy":P||void 0,children:l("otp.verify")}),$("div",{className:"sekyro-resend-row",children:[g?b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:P||Le>0,onClick:()=>C(void 0,!0),children:Le>0?l("otp.resendIn",{seconds:Le}):l("otp.resend")}):Le>0?b("p",{className:"sekyro-resend is-waiting",children:l("otp.resendIn",{seconds:Le})}):J.map(N=>b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:P,onClick:()=>C(N,!0),children:l("otp.resendBy",{channel:Ye(N)})},N)),Wt?b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:P,onClick:()=>te(!0),"data-testid":"sekyro-otp-change",children:l("otp.changeNumber")}):null]})]})]})}let Jt=$o(r.locale);return $("form",{className:`sekyro-step sekyro-otp${n?` ${n}`:""}`,"aria-labelledby":z,onSubmit:Kt,noValidate:!0,children:[b(ne,{id:z,title:l("otp.sendTitle"),lead:l("otp.sendDescription")}),Zt,e.needsPhone?$("div",{className:"sekyro-field",children:[b("label",{className:"sekyro-label",htmlFor:me,children:l("otp.phoneLabel")}),$("div",{className:"sekyro-phone",dir:"ltr",children:[p===null||Q&&!T?null:$("div",{className:"sekyro-phone__lead",children:[Gt?$("select",{className:"sekyro-phone__country",dir:r.locale==="ar"?"rtl":"ltr","aria-label":`${l("otp.countryLabel")}: ${T?l("otp.otherCountry"):Jt(p)}`,value:T?Kn:p.code,onChange:g=>{D(!1);let N=c.find(q=>q.code===g.target.value);x(N===void 0),N!==void 0&&m(N.code),I(N===void 0?"":N.dial+(Q?"":Y))},children:[c.map(g=>b("option",{value:g.code,children:Jt(g)},g.code)),F?b("option",{value:Kn,children:l("otp.otherCountry")}):null]}):null,$("span",{className:"sekyro-phone__dial",id:`${me}-dial`,"aria-hidden":Gt||void 0,children:[b("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:T?"🌐":Vo(p.code)}),T?null:p.dial]})]}),b("input",{ref:Ie,id:me,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel","aria-describedby":`${Q?"":`${me}-dial ${me}-hint `}${We?`${me}-error`:""}`.trim()||void 0,"aria-invalid":!!We||void 0,placeholder:pe?"+":void 0,value:Q?S:tt(Y,_),onChange:So,onKeyDown:g=>{g.key==="Enter"&&!f&&D(!0)},onBlur:g=>{g.relatedTarget?.tagName!=="SELECT"&&D(Y!==""&&fe===null)}})]}),Q?null:b("span",{className:"sekyro-help",id:`${me}-hint`,children:l("otp.phonePlaceholderGeneric")}),We?b("span",{className:"sekyro-help is-danger",id:`${me}-error`,role:"alert",children:We}):null]}):b("p",{className:"sekyro-text-muted",children:l("otp.prefilledNotice")}),$(oe,{children:[J.length===1?b(v,{type:"submit",full:!0,disabled:P||!f,"aria-busy":P||void 0,children:l("otp.sendBy",{channel:Ye(J[0])})}):J.length>1?$("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:J.map(g=>$(v,{kind:"primary",disabled:P||!f,"aria-busy":P||void 0,onClick:()=>C(g),children:[b(B,{name:g}),Ye(g)]},g))})]}):b(v,{type:"submit",full:!0,disabled:P||!f,"aria-busy":P||void 0,children:l("otp.send")}),ee&&zt?b("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:P,onClick:()=>te(!1),"data-testid":"sekyro-otp-back-to-code",children:l("otp.backToCode")}):null]})]})}s(Nt,"PhoneOtpStep");import{lazy as Go,Suspense as Wo,useMemo as zo,useState as Yo}from"react";import{Component as Ko}from"react";var wt=class wt extends Ko{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};s(wt,"LoadBoundary");var re=wt;import{jsx as Ce,jsxs as Zo}from"react/jsx-runtime";var qo={load:s(()=>import("../email-otp-view-DUHRTUGD.js"),"load")};function Pt({locale:e,strings:t,...o}){let n=R(e,t),[a,i]=Yo(0),r=zo(()=>Go(()=>qo.load().then(c=>({default:c.EmailOtpView}))),[a]),l=Zo(O,{tone:"danger",children:[Ce("span",{children:n.t("errors.network_error")}),Ce(v,{kind:"secondary",onClick:()=>i(c=>c+1),children:n.t("common.retry")})]});return Ce(re,{fallback:l,children:Ce(Wo,{fallback:Ce("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:n.t("common.loading")}),children:Ce(r,{...o,i18n:n})})},a)}s(Pt,"EmailOtpStep");import{lazy as Jo,Suspense as Qo,useMemo as Xo,useState as jo}from"react";import{jsx as Ne,jsxs as tr}from"react/jsx-runtime";var er={load:s(()=>import("../eid-view-VYUU65A3.js"),"load")};function _t({locale:e,strings:t,...o}){let n=R(e,t),[a,i]=jo(0),r=Xo(()=>Jo(()=>er.load().then(c=>({default:c.EidView}))),[a]),l=tr(O,{tone:"danger",children:[Ne("span",{children:n.t("errors.network_error")}),Ne(v,{kind:"secondary",onClick:()=>i(c=>c+1),children:n.t("common.retry")})]});return Ne(re,{fallback:l,children:Ne(Qo,{fallback:Ne("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:n.t("common.loading")}),children:Ne(r,{...o,i18n:n})})},a)}s(_t,"EidStep");import{useMemo as lr}from"react";import{lazy as nr,Suspense as or,useMemo as rr,useState as sr}from"react";import{jsx as we,jsxs as ar}from"react/jsx-runtime";var ir={load:s(()=>import("../flow-views-VJPCIWEJ.js"),"load")};function V({view:e,i18n:t,quiet:o,...n}){let[a,i]=sr(0),r=rr(()=>nr(()=>ir.load().then(c=>({default:c[e]}))),[e,a]),l=ar(O,{tone:"danger",children:[we("span",{children:t.t("errors.network_error")}),we(v,{kind:"secondary",onClick:()=>i(c=>c+1),children:t.t("common.retry")})]});return we(re,{fallback:l,children:we(or,{fallback:o===!0?null:we("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:t.t("common.loading")}),children:we(r,{...n,i18n:t})})},a)}s(V,"Flow");import{jsx as xt,jsxs as cr}from"react/jsx-runtime";function Et({step:e,locale:t,strings:o,className:n,onError:a}){let i=R(t,o),{busy:r,error:l,run:c}=In(i,a),d=lr(()=>e.choice.options.flatMap(m=>{let h=En(m,i),p=xn[m.service];return h===null?[]:[{id:m.id,label:h,glyph:p&&xt(B,{name:p})}]}),[e.choice.options,i]),y=e.choice.options.find(m=>m.service==="national_eid");return cr("div",{className:n,children:[xt(un,{title:i.t("method.heading"),description:i.t("method.description"),options:d,busy:r,error:l,focus:!0,testId:"sekyro-method",onChoose:m=>c(()=>e.choose(m))}),y?.nationalEid?.afterPass==="continue"?xt(V,{view:"EidContinueHint",i18n:i,provider:y.nationalEid.providerName,quiet:!0}):null]})}s(Et,"MethodChoice");import{isValidNni as ur,normalizeNni as Wn}from"@sekyro/web";import{useId as dr,useState as It}from"react";import{Fragment as yr,jsx as H,jsxs as Pe}from"react/jsx-runtime";var pr=new Set(["nni_not_found","registry_record_not_found"]),fr=new Set(["nni_invalid","id_number_invalid"]);function nt({step:e,locale:t,strings:o,className:n,onError:a}){let i=R(t,o),{t:r}=i,[l,c]=It(""),[d,y]=It(!1),[m,h]=It(null),p=dr(),w=e.attemptsExhausted,S=s(async A=>{y(!0),h(null);try{await A()}catch(W){h(ke(W,i.strings)),a?.(W)}finally{y(!1)}},"run"),I=s(A=>{if(A.preventDefault(),e.source!=="typed"){S(()=>e.confirm());return}let W=Wn(l);if(!/^\d{10}$/.test(W))return h("population.invalid");if(!ur(W))return h("population.reason_id_number_invalid");S(()=>typeof e.submitIdNumber=="function"?e.submitIdNumber(W):e.submitNni(W))},"onSubmit"),T=Xe(i,e.attemptsRemaining,w),x=e.reason!==void 0&&pr.has(e.reason),M=e.reason!==void 0&&fr.has(e.reason),D=Pe(yr,{children:[e.reason==="registry_unavailable"?Pe(O,{tone:"warning",children:[H("span",{children:r("population.reason_registry_unavailable")}),H("span",{children:T})]}):null,x&&e.canUseDocument?Pe(O,{tone:"warning",children:[H("span",{children:r("population.reason_registry_record_not_found_or_document")}),H("span",{children:T}),H(v,{kind:"secondary",disabled:d,onClick:()=>{S(()=>e.useDocument())},children:r("population.useDocument")})]}):null,x&&!e.canUseDocument||M?Pe(O,{tone:"danger",children:[H("span",{children:r(x?"population.reason_registry_record_not_found":"population.reason_id_number_invalid")}),H("span",{children:T})]}):null,w&&e.reason===void 0?H(O,{tone:"danger",children:H("span",{children:T})}):null,m!==null?H(O,{tone:"danger",children:H("span",{children:r(m)})}):null]}),[L,k,P]=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 Pe("form",{className:`sekyro-step${n?` ${n}`:""}`,"aria-labelledby":p,onSubmit:I,noValidate:!0,children:[H(ne,{id:p,title:r(L),lead:r(k)}),D,e.source==="typed"?Pe("div",{className:"sekyro-field",children:[H("label",{className:"sekyro-label",htmlFor:`${p}-id-number`,children:r("population.label")}),H("input",{id:`${p}-id-number`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:r("population.placeholder"),value:l,"aria-describedby":`${p}-id-number-help`,"aria-invalid":m==="population.invalid"||m==="population.reason_id_number_invalid"||void 0,onChange:A=>{h(null),c(Wn(A.target.value).replace(/\D/g,"").slice(0,10))}}),H("span",{id:`${p}-id-number-help`,className:"sekyro-help",children:r("population.helper")})]}):null,H(oe,{children:w?null:H(v,{type:"submit",full:!0,disabled:d,"aria-busy":d||void 0,children:r(P)})})]})}s(nt,"IdNumberEntry");function mr(e){return nt(e)}s(mr,"NniEntry");import{acceptedIssuers as vr,acceptedTypesFor as Jn,warmDocumentCapture as Cr}from"@sekyro/web";import{lazy as Nr,Suspense as wr,useEffect as Pr,useMemo as _r,useState as Lt}from"react";import{acceptedIssuers as gr,acceptedTypesFor as Tt}from"@sekyro/web";import{useEffect as zn,useId as hr,useMemo as Yn,useState as Rt}from"react";import{jsx as U,jsxs as _e}from"react/jsx-runtime";var qn=s(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold"),kr=s(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),t=>127397+t.charCodeAt(0))),"flag"),Sr=220;function br(e,t,o=[],n){let a=null;try{a=new Intl.DisplayNames([e],{type:"region"})}catch{}let i=t.map(c=>({code:c,name:a?.of(c)??c})),r=new Intl.Collator(e),l=s(c=>{if(c===n)return-1;let d=o.indexOf(c);return d<0?o.length:d},"rank");return i.sort((c,d)=>l(c.code)-l(d.code)||r.compare(c.name,d.name))}s(br,"countryNames");function Zn({step:e,i18n:t,issuer:o,onPicked:n,ageStepUp:a=!1}){let{t:i,locale:r}=t,l=Yn(()=>gr(e.documents),[e.documents]),c=Yn(()=>br(r,l,Object.keys(e.documents.byIssuer??{}),e.detectedCountry),[r,l,e.documents,e.detectedCountry]),d=l.length===1?l[0]:null,[y,m]=Rt(o??d),[h,p]=Rt(""),[w,S]=Rt(null),I=hr(),T=d===null?[]:Tt(e.documents,d),x=d!==null&&T.length===1?T[0]:null;zn(()=>{d!==null&&x!==null&&e.selectDocument(d,x)},[d,x]);let M=s((k,P)=>{e.selectDocument(k,P),n?.()},"pick"),D=s(k=>{let P=Tt(e.documents,k);P.length===1?M(k,P[0]):m(k)},"chooseIssuer");if(zn(()=>{if(w===null||y===null)return;let k=setTimeout(()=>M(y,w),Sr);return()=>clearTimeout(k)},[w]),Ze(y!==null&&l.length>1&&o===void 0?()=>{m(null),S(null)}:null),x!==null)return null;if(y===null){let k=qn(h.trim()),P=k===""?c:c.filter(A=>qn(A.name).includes(k)||A.code.toLowerCase()===k);return _e("section",{className:"sekyro-step",children:[U(ne,{title:i("doc.countryTitle"),lead:i(a?"doc.ageStepUp":"doc.pickDescription")}),_e("div",{className:"sekyro-field",children:[U("label",{className:"sekyro-label",htmlFor:I,children:i("doc.countryLabel")}),U("input",{id:I,type:"search",className:"sekyro-input",placeholder:i("doc.countrySearch"),value:h,onChange:A=>p(A.target.value)})]}),P.length===0?U("p",{className:"sekyro-text-muted",children:i("doc.noCountryMatch")}):U("ul",{className:"sekyro-rows",children:P.map(A=>U("li",{children:_e("button",{type:"button",className:"sekyro-row-btn",onClick:()=>D(A.code),children:[U("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:kr(A.code)}),A.name]})},A.code))}),U(oe,{children:null})]})}let L=Tt(e.documents,y);return _e("section",{className:"sekyro-step",children:[U(ne,{title:i("doc.pickTitle"),lead:i(a&&d!==null?"doc.ageStepUp":"native.doc.holdIt")}),U("div",{className:"sekyro-choices",children:L.map(k=>_e("button",{type:"button",className:"sekyro-card","aria-pressed":w===k,disabled:w!==null&&w!==k,onClick:()=>S(k),children:[U("span",{className:"sekyro-card__tile",children:U(B,{name:k==="passport"?"passport":"card"})}),_e("span",{className:"sekyro-card__body",children:[U("span",{className:"sekyro-card__title",children:i(`doc.type.${k}`)}),U("span",{className:"sekyro-card__sub",children:i(`doc.sub.${k}`)})]}),U("span",{className:"sekyro-radio","aria-hidden":"true"})]},k))}),l.length>1?U("button",{type:"button",className:"sekyro-link",onClick:()=>{m(null),S(null)},children:i("native.doc.changeCountry")}):null,U(oe,{children:null})]})}s(Zn,"DocumentPicker");import{jsx as ye,jsxs as Er}from"react/jsx-runtime";var xr={load:s(()=>import("../document-capture-view-ZNZQMJBX.js"),"load")};function Mt({step:e,locale:t,strings:o,className:n,liveMrz:a}){let i=R(t,o),[r,l]=Lt(0),[c,d]=Lt(null),y=vr(e.documents),m=y.length>1,h=e.issuer!==null&&Jn(e.documents,e.issuer).length>1,p=e.documentType===null||e.issuer===null||c!==null,w=y.length===1&&Jn(e.documents,y[0]).length===1,[S]=Lt(()=>p&&!w),I=e.ageStepUp===!0,T=_r(()=>Nr(()=>xr.load().then(M=>({default:M.DocumentCaptureView}))),[r]);Pr(()=>{Cr()},[]);let x=Er(O,{tone:"danger",children:[ye("span",{children:i.t("errors.network_error")}),ye(v,{kind:"secondary",onClick:()=>l(M=>M+1),children:i.t("doc.retryCamera")})]});return ye("div",{className:n,children:p?ye(Zn,{step:e,i18n:i,ageStepUp:I&&c===null&&S,...c==="document"&&e.issuer!==null?{issuer:e.issuer}:{},onPicked:()=>d(null)}):ye(re,{fallback:x,children:ye(wr,{fallback:ye("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:i.t("common.loading")}),children:ye(T,{step:e,i18n:i,ageLead:I&&!S,liveMrz:a,...m?{onChangeCountry:s(()=>d("country"),"onChangeCountry")}:{},...h?{onChangeDocument:s(()=>d("document"),"onChangeDocument")}:{}})})},r)})}s(Mt,"DocumentCapture");import{warmPortraitCapture as Ir}from"@sekyro/web";import{Component as Tr,lazy as Qn,Suspense as Xn,useContext as Rr,useEffect as Lr,useMemo as jn,useState as eo}from"react";import{jsx as E,jsxs as rt}from"react/jsx-runtime";var Mr={load:s(()=>import("../portrait-capture-view-XUWOHJTS.js"),"load")},Or={load:s(()=>import("../portrait-review-view-SJXQZTAK.js"),"load")},At=class At extends Tr{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};s(At,"LoadBoundary");var ot=At;function Ar({step:e,i18n:t}){let{t:o}=t,n=ve();return rt("section",{className:"sekyro-stack sekyro-stack--2","data-testid":"sekyro-portrait-match",children:[E("h2",{ref:n,tabIndex:-1,className:"sekyro-text-body",children:o(e.review?"portrait.reviewTitle":"session.steps.portrait.title")}),e.review?E("p",{className:"sekyro-text-muted",children:o("portrait.reviewDescription")}):null,e.uploadFailed?rt(O,{tone:"danger",children:[E("span",{children:o("portrait.uploadFailed")}),E(v,{kind:"secondary",onClick:()=>{e.resubmit()},children:o("portrait.sendAgain")})]}):E("p",{role:"status","aria-live":"polite","aria-busy":"true",className:"sekyro-text-muted",children:o("portrait.matching")})]})}s(Ar,"MatchPhase");function Ot({step:e,locale:t,strings:o,className:n,assetBaseUrl:a,verification:i}){let r=R(t,o),l=fn(i),c=Rr(Qe),[d,y]=eo(0),[m,h]=eo(null),p=jn(()=>Qn(()=>Mr.load().then(k=>({default:k.PortraitCaptureView}))),[d]),w=jn(()=>Qn(()=>Or.load().then(k=>({default:k.PortraitScreens}))),[d]),S=typeof e.uploadPortrait=="function",I=S?e.photo?.source??"camera":"camera",T=S&&I!=="camera"&&e.photo?.uploadOffered===!0,x=I!=="upload",M=I==="upload"?"upload":I==="choice"?m??e.photo?.pick??"source":"camera";if(Lr(()=>{e.phase==="capture"&&M==="camera"&&Ir()},[e.phase,M]),e.phase==="match")return E("div",{className:n,children:E(Ar,{step:e,i18n:r})});let D=E("p",{role:"status","aria-busy":"true",className:"sekyro-text-muted",children:r.t("common.loading")});if(c!==null&&(c.busy||c.failed!==null)&&e.phase==="capture"&&M==="camera")return rt("section",{className:`sekyro-step${n?` ${n}`:""}`,children:[E(ne,{title:r.t("session.steps.portrait.title")}),E(oe,{children:E(v,{kind:"secondary",full:!0,disabled:c.busy,onClick:c.reset,children:r.t("portrait.retryCamera")})})]});if(e.phase==="review"||M!=="camera")return E("div",{className:n,children:E(ot,{fallback:E(v,{kind:"ghost",onClick:()=>y(k=>k+1),children:r.t("common.retry")}),children:E(Xn,{fallback:D,children:E(w,{screen:e.phase==="review"||M==="camera"?"review":M,step:e,i18n:r,...x?{onCamera:s(()=>h("camera"),"onCamera")}:{},onUpload:()=>h("upload"),onDeclined:()=>h(null)})})},d)});if(!l.settled)return E("div",{className:n,children:D});if((e.captureMode??l.session)==="choice"&&l.choice===null)return E("div",{className:n,children:E(rn,{value:k=>r.t(k),children:E(dn,{onChoose:l.choose,legend:r.t("capture.modePicker.legendPhoto"),help:r.t("capture.modePicker.helpPhoto")})})});let L=rt(O,{tone:"danger",children:[E("span",{children:r.t("errors.network_error")}),E(v,{kind:"secondary",onClick:()=>y(k=>k+1),children:r.t("portrait.retryCamera")})]});return E("div",{className:n,children:E(ot,{fallback:L,children:E(Xn,{fallback:D,children:E(p,{step:e,i18n:r,...a!==void 0?{assetBaseUrl:a}:{},...T?{onUpload:s(()=>h("upload"),"onUpload")}:{}})})},d)})}s(Ot,"PortraitCapture");import{cameraUnavailableCauseOf as es}from"@sekyro/web";import{useCallback as se,useContext as ts,useEffect as lt,useId as ns,useMemo as mo,useRef as ge,useState as ie}from"react";var Dt={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 Fe={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"}}},Dr=["danger","success","warning","info"];function Ft(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}s(Ft,"channel");function to(e){let t=Ft(parseInt(e.slice(1,3),16)),o=Ft(parseInt(e.slice(3,5),16)),n=Ft(parseInt(e.slice(5,7),16));return .2126*t+.7152*o+.0722*n}s(to,"luminance");function Fr(e,t){let o=to(e),n=to(t),a=Math.max(o,n),i=Math.min(o,n);return(a+.05)/(i+.05)}s(Fr,"contrastRatio");function no(e,t){return Math.min(...Dr.map(o=>Fr(Fe[e][o].fg,t)))}s(no,"worstAgainst");function oo(e,t,o){return Math.min(no(e,t),no(e,o))}s(oo,"worstStatusContrast");function ro(e,t){return oo("light",e,t)>=oo("dark",e,t)?"light":"dark"}s(ro,"statusSchemeFor");import{useRef as Hr,useState as Ur}from"react";import{useEffect as Br,useId as Vr,useRef as Bt}from"react";import{jsx as xe,jsxs as so}from"react/jsx-runtime";function st({open:e,title:t,closeLabel:o,onClose:n,children:a,actions:i,role:r,testId:l,returnFocus:c}){let d=Bt(null),y=Bt(null),m=Bt(!1),h=Vr();return Br(()=>{let p=d.current;if(p!==null){if(e&&!p.open?(y.current=typeof document>"u"?null:document.activeElement,typeof p.showModal=="function"?p.showModal():p.setAttribute("open","")):!e&&p.open&&(typeof p.close=="function"?p.close():p.removeAttribute("open")),!e&&m.current){let w=c?.current??(y.current instanceof HTMLElement?y.current:null);y.current=null,w?.focus()}m.current=e}},[e,c]),xe("dialog",{ref:d,className:"sekyro-dialog","aria-labelledby":h,...r==="alertdialog"?{role:r}:{},"data-testid":l,onCancel:p=>{p.preventDefault(),n()},onClick:p=>{p.target===p.currentTarget&&n()},children:so("div",{className:"sekyro-dialog__panel",children:[so("div",{className:"sekyro-dialog__head",children:[xe("h2",{id:h,className:"sekyro-dialog__title",children:t}),o!==void 0?xe("button",{type:"button",className:"sekyro-disc sekyro-dialog__close","aria-label":o,onClick:n,children:xe(B,{name:"close"})}):null]}),a!==void 0?xe("div",{className:"sekyro-dialog__body",children:a}):null,i!==void 0?xe("div",{className:"sekyro-dialog__actions",children:i}):null]})})}s(st,"FlowDialog");import{jsx as Be,jsxs as io}from"react/jsx-runtime";var $r=["intro","data","processing","sharing","retention"];function ao({i18n:e,purpose:t="identity"}){let{t:o}=e,[n,a]=Ur(!1),i=Hr(null),[r,l=""]=o("consent.short").split("{terms}");return io("div",{className:"sekyro-consent","data-testid":"sekyro-consent",children:[io("p",{className:"sekyro-consent__line",children:[r,Be("button",{ref:i,type:"button",className:"sekyro-link sekyro-link--inline","aria-haspopup":"dialog",onClick:()=>a(!0),children:o("consent.termsLink")}),l]}),Be(st,{open:n,title:o("consent.termsTitle"),closeLabel:o("native.close"),onClose:()=>a(!1),returnFocus:i,testId:"sekyro-consent-terms",children:Be("div",{className:"sekyro-stack sekyro-stack--3",children:t==="human"?Be(V,{view:"HumanConsentTerms",i18n:e,quiet:!0}):$r.map(c=>Be("p",{children:o(`consent.terms.${c}`)},c))})})]})}s(ao,"ConsentNotice");function lo(e){let t=e.trim().split(/\s+/).filter(n=>n!=="");return(t.length>=2?[t[0],t[1]].map(n=>Array.from(n??"")[0]??""):Array.from(t[0]??"").slice(0,2)).join("").toUpperCase()}s(lo,"initials");import{useSyncExternalStore as Kr}from"react";var po=s(e=>({colors:{...e?K.dark:K.light},radius:K.radius,fontFamily:K.font}),"brandTheme"),Ia=po(!1),co=/^#[0-9a-f]{6}$/i;function Vt(e,t,o){if(t)return null;let n=yt(e).colors,a=o?.colors?.bg??n?.bg,i=o?.colors?.surface??n?.surface;return a===void 0&&i===void 0||a!==void 0&&!co.test(a)||i!==void 0&&!co.test(i)?null:ro(a??K.light.bg,i??K.light.surface)}s(Vt,"partnerStatusScheme");function it(e,t,o){let n=yt(e);if(o&&n.colors!==void 0){let{brand:a,brandFg:i}=n.colors;a!==void 0&&Yr(a,K.dark.bg)>=3?n.colors={brand:a,ring:a,...i!==void 0?{brandFg:i}:{}}:delete n.colors}if(Vt(e,o,t)==="dark"){let a=Fe.dark;n.colors={...n.colors,danger:a.danger.base,success:a.success.base,warning:a.warning.fg}}return qe(po(o),n,yn(t))}s(it,"verificationTheme");function at(e){let t=Kr(zr,Wr,()=>!1);return e==="dark"||e==="system"&&t}s(at,"useDarkScheme");var Gr="(prefers-color-scheme: dark)",fo=s(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Gr):null,"media"),Wr=s(()=>fo()?.matches??!1,"prefersDark");function zr(e){let t=fo();return t?.addEventListener("change",e),()=>t?.removeEventListener("change",e)}s(zr,"subscribe");function Yr(e,t){let[o,n]=[uo(e),uo(t)];return(Math.max(o,n)+.05)/(Math.min(o,n)+.05)}s(Yr,"contrast");function uo(e){let t=[1,3,5].map(o=>{let n=Number.parseInt(e.slice(o,o+2),16)/255;return n<=.03928?n/12.92:((n+.055)/1.055)**2.4});return .2126*(t[0]??0)+.7152*(t[1]??0)+.0722*(t[2]??0)}s(uo,"luminance");import{useEffect as qr,useId as Zr,useState as Jr}from"react";import{jsx as G,jsxs as Ve}from"react/jsx-runtime";var Qr=new Set(["document_id_number_mismatch","name_mismatch","birth_date_mismatch"]);function Xr({outcome:e}){return e==="approved"?Ve("svg",{className:"sekyro-outcome sekyro-outcome--approved",viewBox:"0 0 80 80","aria-hidden":"true",focusable:"false",children:[G("circle",{className:"sekyro-outcome__ring",cx:"40",cy:"40",r:"40"}),G("circle",{className:"sekyro-outcome__disc",cx:"40",cy:"40",r:"32"}),G("path",{className:"sekyro-outcome__glyph",d:"M6.5 12.5l3.6 3.6 7.4-8.2",pathLength:"1",transform:"translate(22 22) scale(1.5)"})]}):G("span",{className:`sekyro-tile sekyro-tile--${e==="review"?"info":"neutral"} sekyro-outcome-tile`,"aria-hidden":"true",children:G(B,{name:e==="review"?"pending":e==="expired"?"timer":"close"})})}s(Xr,"OutcomeMark");function jr({label:e,id:t,copied:o}){let[n,a]=Jr(!1);return qr(()=>{if(!n)return;let i=setTimeout(()=>a(!1),1600);return()=>clearTimeout(i)},[n]),Ve("button",{type:"button",className:`sekyro-reference${n?" is-copied":""}`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>a(!0),()=>{})},children:[G("span",{"aria-live":"polite",children:n?o:e}),G("bdi",{dir:"ltr",children:t}),G(B,{name:"copy"})]})}s(jr,"ReferenceLine");function Ht({step:e,locale:t,strings:o,className:n,onClose:a}){let i=R(t,o),{t:r}=i,l=Zr(),c=ve(),d=e.context.orgName,y=e.display==="approved"?"approved":e.display==="review"?"review":e.display==="expired"?"expired":"rejected",m;switch(e.display){case"policy_stop":{let h=e.failureReason??"";if(Qr.has(en(h)))m=r("session.result.detailsMismatch",{org:d});else if(h==="device_velocity_exceeded")m=r("session.result.deviceVelocity",{org:d});else if(h==="capture_tampered")m=r("session.result.deviceStop");else if(h==="camera_unavailable")m=r("reasons.camera_unavailable",{org:d});else if(h==="underage_estimated")m=r("reasons.underage_estimated");else if(h==="starter_credit_claimed")m=r("reasons.starter_credit_claimed");else if(h==="blocked_by_org")m=r("reasons.blocked_by_org");else{let p=nn(h);m=p!==null?r(p,{org:d}):r("session.result.rejected.description")}break}case"cooldown":{let h=on(i.locale,e.retryAfter);m=h!==null?r(h.key,{time:h.time}):r("reasons.device_cooldown");break}case"platform_unsupported":m=r("result.platform_unsupported");break;case"attempts_exhausted":m=r("common.noAttemptsLeft");break;default:m=d!==""?r(`native.result.${y}`,{org:d}):r(`session.result.${y}.description`)}return Ve("section",{className:`sekyro-result${n?` ${n}`:""}`,"aria-labelledby":l,"data-testid":"sekyro-result",children:[Ve("div",{className:"sekyro-result__body",children:[G(Xr,{outcome:e.display==="cooldown"?"review":y}),Ve("div",{className:"sekyro-heading",children:[G("h2",{id:l,ref:c,tabIndex:-1,className:"sekyro-text-body",children:r(`session.result.${y}.title`)}),G("p",{className:"sekyro-text-muted",children:m})]}),G(jr,{label:r("result.referenceLabel"),id:e.context.sessionId,copied:r("native.result.copied")})]}),a!==void 0?G("div",{className:"sekyro-actions",children:G(v,{full:!0,onClick:a,children:d!==""?r("native.result.back",{org:d}):r("native.close")})}):null]})}s(Ht,"VerificationResultScreen");import{Fragment as He,jsx as u,jsxs as Z}from"react/jsx-runtime";function os(e,t,o){let n=t?K.dark:K.light,a=t?K.roles.dark:K.roles.light,i=e.colors??{},r={},l=i.fg===n.fg&&i.surface===n.surface;i.brand===n.brand&&i.surface===n.surface&&(r["--sekyro-color-brand-soft"]=a.brandSoft),l&&(r["--sekyro-color-line"]=a.line,r["--sekyro-color-line-subtle"]=a.lineSubtle,r["--sekyro-color-line-strong"]=a.lineStrong,r["--sekyro-color-sunken"]=a.sunken),i.fgMuted===n.fgMuted&&i.surface===n.surface&&(r["--sekyro-color-fg-subtle"]=a.fgSubtle),e.fontFamily===K.font&&(r["--sekyro-font-display"]=K.fontDisplay);let c=t?Dt.dark:Dt.light;if(r["--sekyro-color-success-soft"]=c.successSoft,r["--sekyro-color-success-fg"]=c.successFg,r["--sekyro-color-on-success"]=c.onSuccess,r["--sekyro-color-warning-soft"]=c.warningSoft,r["--sekyro-color-warning-fg"]=c.warningFg,r["--sekyro-color-danger-soft"]=c.dangerSoft,r["--sekyro-color-danger-fg"]=c.dangerFg,r["--sekyro-color-on-danger"]=c.onDanger,r["--sekyro-color-info-soft"]=c.infoSoft,r["--sekyro-color-info-fg"]=c.infoFg,i.brand===n.brand&&(r["--sekyro-color-line-brand"]=c.lineBrand),o!==null){let d=Fe[o];for(let y of["danger","success","warning","info"])r[`--sekyro-color-${y}-soft`]=d[y].soft,r[`--sekyro-color-${y}-fg`]=d[y].fg;r["--sekyro-color-on-success"]=d.success.on,r["--sekyro-color-on-danger"]=d.danger.on}return r}s(os,"flowRoles");function $t(e){let{verification:t,locale:o,strings:n,onStep:a,onResult:i}=e,{step:r,error:l}=kt(t);lt(()=>{r!==null&&a?.(r)},[r,a]),lt(()=>i===void 0?void 0:t.on("result",i),[t,i]);let c=at(e.colorScheme??"light"),d=r?.context.branding,y=it(d,e.theme,c),[m,h]=ie(!1),p=`sekyro-verification${c?" sekyro-verification--dark":""}${m?" is-immersive":""}${e.className!==void 0?` ${e.className}`:""}`,w=ge(e.onClose);w.current=e.onClose;let S=ge(r);S.current=r;let I=se(()=>{let L=S.current;w.current?.(L?.kind==="result"?{reason:"finished",result:L.result}:{reason:"cancelled"})},[]),[T,x]=ie(null),M=se(()=>{let L=S.current;L!==null&&L.kind!=="result"&&L.context.consentRecorded?x("close"):I()},[I]),D=mo(()=>t.reportCaptureIssue===void 0?null:L=>t.reportCaptureIssue?.(L),[t]);return u(hn,{theme:y,className:p,children:u(De,{locale:o,...n!==void 0?{strings:n}:{},children:u("div",{dir:e.dir??(o==="ar"?"rtl":"ltr"),lang:o,className:"sekyro-flow",style:os(y,c,Vt(d,c,e.theme)),children:u(Cn.Provider,{value:h,children:u(gt.Provider,{value:e.onClose!==void 0?I:void 0,children:u(Je.Provider,{value:e.onClose!==void 0?M:void 0,children:u(an.Provider,{value:D,children:Z(cn.Provider,{value:rs,children:[u(us,{...e,step:r,error:l,immersive:m,onLeaveAsk:()=>x("history"),onClosed:I}),u(as,{open:T!==null,onStay:()=>{T==="history"&&Ut(),x(null)},onLeave:()=>{let L=T;x(null),L==="close"||e.onClose!==void 0?I():typeof window<"u"&&ho()}})]})})})})})})})})}s($t,"SekyroVerification");var rs={self:u(B,{name:"face"}),assisted:u(B,{name:"camera"})};function ss(e,t){if(t===void 0||t==="aml_screening")return null;let o=e,n=o[`session.processing.${t}.title`],a=o[`session.processing.${t}.description`];return typeof n=="string"&&n!==""&&typeof a=="string"&&a!==""?{title:n,description:a}:null}s(ss,"processingCopyOf");function is({error:e,retry:t}){let{t:o}=R(),n=ve();return Z(mt,{tone:"danger",testId:"sekyro-error-notice",children:[u("span",{children:o(tn(e.kind))}),e.retryable?u(v,{ref:n,kind:"secondary",className:"sekyro-btn--start",onClick:t,children:o("common.retry")}):null]})}s(is,"CameraErrorNotice");var yo="sekyroFlow";function go(){let e=window.history.state;return typeof e=="object"&&e!==null&&e[yo]===!0}s(go,"onGuard");function Ut(){if(typeof window>"u"||go())return;let e=window.history.state;window.history.pushState({...typeof e=="object"&&e!==null?e:{},[yo]:!0},"")}s(Ut,"pushGuard");function ho(){window.history.back()}s(ho,"leaveHistory");function as({open:e,onStay:t,onLeave:o}){let{t:n}=R();return u(st,{open:e,role:"alertdialog",title:n("leave.title"),onClose:t,testId:"sekyro-leave",actions:Z(He,{children:[u(v,{full:!0,onClick:t,children:n("leave.stay")}),u(v,{full:!0,kind:"danger",onClick:o,children:n("leave.confirm")})]}),children:u("p",{className:"sekyro-text-muted",children:n("leave.body")})})}s(as,"LeaveDialog");function ls(e,t){let[o,n]=ie(!1),[a,i]=ie(null),r=e===null?void 0:e.skipCapture,l=ge(r);l.current=r;let c=ge(!1),d=e?.key;lt(()=>i(null),[d]);let y=se(()=>{if(c.current)return;let w=l.current;w!==void 0&&(c.current=!0,n(!0),i(null),w().catch(S=>i(t.t(ke(S,t.strings)))).finally(()=>{c.current=!1,n(!1)}))},[t]),m=se(()=>i(null),[]),h=r!==void 0,p=t.t("sandbox.skipCapture");return mo(()=>h?{label:p,busy:o,failed:a,run:y,reset:m}:null,[h,p,o,a,y,m])}s(ls,"useSkipCapture");function cs({skip:e}){return Z(He,{children:[e.failed!==null?u(O,{tone:"danger",children:u("span",{children:e.failed})}):null,u(v,{kind:"ghost",full:!0,disabled:e.busy,"aria-busy":e.busy||void 0,onClick:e.run,"data-testid":"sekyro-skip-capture",children:e.label})]})}s(cs,"SkipAction");function us(e){let{step:t,error:o,slots:n,immersive:a}=e,i=R(),{t:r}=i,[l,c]=ie(!1),[d,y]=ie([]),m=se(f=>(y(C=>[...C,f]),()=>y(C=>C.filter(X=>X!==f))),[]),[h,p]=ie(null),w=se(f=>p(()=>f),[]),[S,I]=ie(0),[T,x]=ie(null),M=ls(t,i),D=t?.context.purpose??"identity",L=t?.context.returning===!0,k=e.verification,P=D==="human"||t?.context.cameraUnavailableHandled===!0,A=k.reportCameraUnavailable!==void 0&&P?f=>k.reportCameraUnavailable?.(f)??Promise.resolve():void 0,W=t?.kind==="liveness"&&t.mode==="liveness"&&t.reason===void 0&&!t.attemptsExhausted,ae=e.handoffUrl,ee=t?.context.branding?.logoUrl,te=se((f,C)=>A===void 0?void 0:u(V,{view:"NoCameraView",i18n:i,quiet:!0,cause:C,onRetry:f,...W?{onContinue:A}:{},...ae!==void 0?{handoffUrl:ae}:{},...ee!==void 0?{logoUrl:ee}:{}}),[i,k,P,W,ae,ee]),Ue=se((f,C)=>u(Tn,{start:f,context:C,human:D==="human",returning:L,extra:C.canChooseFacing&&u(pn,{value:C.facing,onChange:C.setFacing}),notice:C.permissionSettled&&C.permission==="denied"?te(f,"denied"):void 0}),[D,L,te]),ct=se((f,C)=>{let X=es(f.kind);return(X!==void 0?te(C,X):void 0)??Z(He,{children:[u(is,{error:f,retry:C}),X!==void 0&&ae!==void 0?u(V,{view:"DesktopHandoffView",i18n:i,quiet:!0,url:ae,...ee!==void 0?{logoUrl:ee}:{}}):null]})},[te,ae,ee,i]),ue=ge(""),de=e.livenessProps?.slots?.stageOverlay,$e=se(f=>(f.guidance!==""&&!f.coached&&(ue.current=f.guidance),u(Rn,{testId:"sekyro-capture-stage",video:u("video",{ref:f.videoRef,playsInline:!0,muted:!0,className:"sekyro-lm-video sekyro-fc-video","aria-hidden":"true","data-testid":"sekyro-capture-video"}),instruction:f.settled?r("capture.checkingTitle"):f.guidance!==""?f.guidance:ue.current,note:f.note,busy:f.settled,progress:f.phase==="seeking"||f.phase==="aligning"?f.progress:1,still:f.still,live:f.live,closeLabel:r("native.close"),overlay:de?.(f.videoRef),ramp:f.ramp?.colour??null,...f.settled?{}:{onClose:s(()=>I(C=>C+1),"onClose")},end:f.switchCamera&&u("button",{type:"button",className:"sekyro-glass",onClick:f.switchCamera,"aria-label":r("capture.switchCamera"),children:u(sn,{})}),children:f.settled||!f.live?null:u(Nn,{onStop:()=>I(C=>C+1)})})),[r,de]),Ke=ns(),ut=t,Ge=t!==null&&T===t.key&&t.context.switchable!==void 0,z=h??(t===null||t.kind==="result"?null:Ge?()=>x(null):t.context.switchable!==void 0&&typeof ut?.chooseOption=="function"?()=>x(t.key):null),Ie=ge(z);Ie.current=z;let Te=ge(t);Te.current=t;let he=ge({ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0});he.current={ask:e.onLeaveAsk,closed:e.onClosed,hostClose:e.onClose!==void 0};let J=e.backNavigation==="history";if(lt(()=>{if(!J||typeof window>"u")return;Ut();let f=s(()=>{if(go())return;let C=Te.current,X=Ie.current;X!==null?(X(),Ut()):C?.kind!=="result"&&C?.context.consentRecorded===!0?he.current.ask():he.current.hostClose?he.current.closed():ho()},"onPop");return window.addEventListener("popstate",f),()=>window.removeEventListener("popstate",f)},[J]),o!==null)return u(mt,{tone:"danger",children:u("span",{children:r(ke(o,i.strings))})});if(t===null)return Z("div",{className:"sekyro-skeleton",role:"status","aria-busy":"true",children:[u("span",{className:"sekyro-visually-hidden",children:r("common.loading")}),u("span",{className:"sekyro-skeleton__bar is-title"}),u("span",{className:"sekyro-skeleton__bar"}),u("span",{className:"sekyro-skeleton__bar is-short"}),u("span",{className:"sekyro-skeleton__bar is-block"})]});let{context:F}=t,pe=s(f=>{c(!0),f().finally(()=>c(!1))},"refresh"),Q=n?.header??u(fs,{context:F,headerId:Ke,end:n?.headerEnd,...z!==null?{onBack:z}:{}}),_,Se=Ge;if(Se)_=u(V,{view:"LaneChoiceView",i18n:i,step:t,onClose:()=>x(null)});else switch(t.kind){case"phone_otp":_=u(Nt,{step:t});break;case"email_otp":_=u(Pt,{step:t});break;case"method":_=u(Et,{step:t});break;case"registry":_=u(nt,{step:t});break;case"document":_=u(Mt,{step:t,...e.documentLiveMrz!==void 0?{liveMrz:e.documentLiveMrz}:{}});break;case"liveness":{let f=e.livenessProps?.slots?.intro,C={...e.livenessProps??{},slots:{...e.livenessProps?.slots,intro:f??Ue,...f===void 0&&e.livenessProps?.slots?.errorPanel===void 0?{errorPanel:ct}:{}},...S>0?{autoStart:!1}:{},verification:e.verification,locale:e.locale,dir:e.dir,strings:i.strings,assetBaseUrl:e.assetBaseUrl,voice:e.voice,onCaptured:e.onLivenessCaptured};_=u(ln.Provider,{value:$e,children:t.instructions==="icao"||t.livePhoto?.icao===!0?u(V,{view:"LivePhotoLiveness",i18n:i,step:t,livenessProps:C,sekyroIntro:f===void 0},S):u(mn,{...C},S)});break}case"portrait":_=Z(He,{children:[t.retakeOnly?u(V,{view:"PortraitRetakeNotice",i18n:i,quiet:!0}):null,u(Ot,{step:t,verification:e.verification,...e.assetBaseUrl!==void 0?{assetBaseUrl:e.assetBaseUrl}:{}})]});break;case"contact_choice":_=u(V,{view:"ContactChoiceView",i18n:i,step:t});break;case"choice":_=u(V,{view:"GenericChoiceView",i18n:i,step:t});break;case"identity_summary":_=u(V,{view:"IdentitySummaryView",i18n:i,step:t});break;case"mobile_required":_=e.handoffUrl!==void 0?u(V,{view:"HandoffView",i18n:i,url:e.handoffUrl,refresh:t.refresh,...F.branding?.logoUrl!==void 0?{logoUrl:F.branding.logoUrl}:{}}):u(je,{tone:"brand",icon:"smartphone",title:r("handoff.title"),actions:u(v,{kind:"secondary",full:!0,disabled:l,onClick:()=>pe(t.refresh),children:r("common.refresh")}),children:u("p",{children:r("reasons.mobile_required")})});break;case"processing":{let f=ss(i.strings,t.service);_=u(je,{tone:"brand",icon:"pending",busy:!t.stalled,live:!0,title:f?.title??r("session.processing.title"),actions:t.stalled?u(v,{kind:"secondary",full:!0,disabled:l,onClick:()=>pe(t.refresh),children:r("common.refresh")}):null,children:u("p",{children:f?.description??r("session.processing.description")})});break}case"eid":_=u(_t,{step:t});break;case"unsupported":{let f=t.reason==="platform_unsupported";_=u(je,{tone:"neutral",icon:"smartphone",title:r(f?"needsApp.title":"unsupported.title"),actions:u(ds,{org:F.orgName}),children:u("p",{children:f?F.orgName!==""?r("needsApp.description",{org:F.orgName}):r("needsApp.descriptionNoOrg"):r("unsupported.description",{org:F.orgName})})});break}case"result":_=n?.result?.(t)??u(ps,{step:t});break;default:{let f=t;_=null}}let Y=!a&&!F.consentRecorded&&t.kind!=="result"?u(ao,{i18n:i,purpose:F.purpose}):null,Re=M!==null&&!a&&!Se?u(cs,{skip:M}):null,fe=Re===null?Y:Z(He,{children:[Re,Y]});return u(vn.Provider,{value:w,children:u(Qe.Provider,{value:M,children:Z(bn.Provider,{value:fe===null?null:{node:fe,owner:d[0]??null,claim:m},children:[a?null:Q,!a&&t.kind!=="result"&&F.sections.length>1?u(ms,{context:F,current:t.section,i18n:i}):null,u(Pn,{pageKey:t.key,children:_}),!a&&!Se&&t.kind!=="result"&&t.context.switchable!==void 0?u(V,{view:"LaneSwitch",i18n:i,step:t,onOpen:()=>x(t.key),quiet:!0},t.key):null,d.length===0?fe:null,a?null:n?.footer!==void 0?n.footer:F.branding?.hideAttribution===!0?null:Z("a",{className:"sekyro-footer",href:"https://sekyro.ai",target:"_blank",rel:"noopener noreferrer",children:[u(B,{name:"lock"}),r("shell.verifiedBy")]})]})})})}s(us,"Body");function ds({org:e}){let{t}=R(),o=ts(gt);return o===void 0?null:u(v,{full:!0,onClick:o,children:e!==""?t("native.result.back",{org:e}):t("native.close")})}s(ds,"BackToOrg");function ps({step:e}){return u(Je.Consumer,{children:t=>u(Ht,{step:e,...t!==void 0?{onClose:t}:{}})})}s(ps,"ResultPage");function fs({context:e,headerId:t,end:o,onBack:n}){let{t:a}=R(),[i,r]=ie(!1),l=i?void 0:e.branding?.logoUrl,c=e.orgName!==""?e.orgName:a(e.returning?"returning.heading":"session.title");return u("header",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":t,children:Z("div",{className:"sekyro-org",children:[n!==void 0?u("button",{type:"button",className:"sekyro-disc sekyro-org__back","aria-label":a("common.back"),onClick:n,"data-testid":"sekyro-back",children:u(B,{name:"back"})}):null,u("span",{className:"sekyro-org__tile","aria-hidden":"true",children:l!==void 0?u("img",{className:"sekyro-org__logo",src:l,alt:"",onError:()=>r(!0)}):lo(e.orgName)}),Z("div",{className:"sekyro-org__text",children:[u("h1",{id:t,className:"sekyro-org__name",children:c}),u("p",{className:"sekyro-org__sub",children:a(e.purpose==="human"?"shell.subtitleHuman":"shell.subtitle")})]}),o!=null?u("div",{className:"sekyro-org__end",children:o}):null,u(Je.Consumer,{children:d=>d!==void 0?u("button",{type:"button",className:"sekyro-disc sekyro-org__close","aria-label":a("native.close"),onClick:d,children:u(B,{name:"close"})}):null})]})})}s(fs,"OrgHeader");function ms({context:e,current:t,i18n:o}){let n=t===null?-1:e.sections.indexOf(t),a=e.progress,i=a!==void 0&&a.length===e.sections.length?a:e.sections.map((r,l)=>({id:r,state:l<n?"done":l===n?"current":"upcoming"}));return u("ol",{className:"sekyro-progress__bars","aria-label":o.t("session.progressLabel"),children:i.map(({id:r,state:l})=>u("li",{className:`sekyro-progress__bar${l==="done"?" is-done":l==="current"?" is-current":""}`,...l==="current"?{"aria-current":"step"}:{},children:u("span",{className:"sekyro-visually-hidden",children:o.strings[`section.${r}`]??r})},r))})}s(ms,"SectionProgress");import{useEffect as ys,useState as ko}from"react";import{jsx as Ee}from"react/jsx-runtime";function gs(){return typeof window>"u"?"":window.location.href.split("#")[0]??""}s(gs,"pageUrl");function hs({hostedUrl:e,inAppBrowser:t,...o}){let[n,a]=ko(t===!0);ys(()=>{t===void 0&&ht()&&a(!0)},[t]);let[i,r]=ko(!1),l=at(o.colorScheme??"light"),c=o.handoffUrl??e??gs();return n&&!i?Ee(gn,{theme:qe(it(void 0,void 0,l),o.theme),className:`sekyro-verification${l?" sekyro-verification--dark":""}${o.className!==void 0?` ${o.className}`:""}`,children:Ee(De,{locale:o.locale,...o.strings!==void 0?{strings:o.strings}:{},children:Ee("div",{dir:o.dir??(o.locale==="ar"?"rtl":"ltr"),lang:o.locale,className:"sekyro-flow",children:Ee(ks,{url:c,onContinue:()=>r(!0)})})})}):Ee($t,{...o,...c!==""?{handoffUrl:c}:{}})}s(hs,"SekyroFlow");function ks({url:e,onContinue:t}){let o=R();return Ee(V,{view:"InAppBrowserPrompt",i18n:o,url:e,onContinue:t})}s(ks,"Prompt");export{Mt as DocumentCapture,_t as EidStep,Pt as EmailOtpStep,nt as IdNumberEntry,Et as MethodChoice,mr as NniEntry,Nt as PhoneOtpStep,Ot as PortraitCapture,hs as SekyroFlow,$t as SekyroVerification,De as StepI18nProvider,Ht as VerificationResultScreen,Po as arSteps,_o as enSteps,Eo as formatTemplate,xo as frSteps,ht as isInAppBrowser,No as loadSekyroLocale,Io as resolveSekyroStrings,wo as retakeHintStringKey,R as useStepI18n,kt as useVerificationStep};
|
package/dist/verification.css
CHANGED
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
}
|
|
86
86
|
.sekyro-input:focus-visible { outline: 3px solid var(--sekyro-color-ring); outline-offset: 2px; }
|
|
87
87
|
.sekyro-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
|
|
88
|
+
.sekyro-test-code { font-weight: 600; color: var(--sekyro-color-fg); letter-spacing: 0.04em; }
|
|
88
89
|
.sekyro-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
|
|
89
90
|
.sekyro-center { text-align: center; }
|
|
90
91
|
.sekyro-result { text-align: start; }
|
|
@@ -730,9 +731,11 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
|
|
|
730
731
|
.sekyro-summary__row { display: grid; gap: 0.125rem; }
|
|
731
732
|
.sekyro-summary__row dt { font: var(--sekyro-type-flow-caption) var(--sekyro-font); }
|
|
732
733
|
.sekyro-summary__row dd { margin: 0; color: var(--sekyro-color-fg); font: var(--sekyro-type-flow-action) var(--sekyro-font); font-variant-numeric: tabular-nums; }
|
|
733
|
-
|
|
734
|
-
.
|
|
735
|
-
.sekyro-
|
|
734
|
+
/* The handoff QR: always navy modules on a white tile, in dark mode and under a partner theme too (phone cameras read
|
|
735
|
+
dark-on-light codes best). The camera-stage pair is fixed Sekyro navy and white: no theme or branding sets it. */
|
|
736
|
+
.sekyro-qr { inline-size: 12rem; block-size: 12rem; align-self: center; padding: 0.75rem; border: 1px solid var(--sekyro-color-line-subtle); border-radius: var(--sekyro-radius-card); background: var(--sekyro-color-on-stage); }
|
|
737
|
+
.sekyro-qr__bg { fill: var(--sekyro-color-on-stage); }
|
|
738
|
+
.sekyro-qr__fg { fill: var(--sekyro-color-stage); }
|
|
736
739
|
a.sekyro-btn { text-decoration: none; }
|
|
737
740
|
/* WhatsApp and SMS as equals: one row, two buttons of the same kind and width (Salem 2026-11-05). */
|
|
738
741
|
.sekyro-channel-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
|
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.18",
|
|
4
4
|
"description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (ar/fr/en, RTL-safe, WCAG AAA defaults)",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"strings:steps": "node scripts/gen-step-strings.mjs"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@sekyro/web": "^0.1.0-rc.
|
|
77
|
+
"@sekyro/web": "^0.1.0-rc.21 || ^0.2.0-rc.0",
|
|
78
78
|
"react": ">=18.2",
|
|
79
79
|
"react-dom": ">=18.2"
|
|
80
80
|
},
|
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.18",
|
|
101
|
+
"bom-ref": "@sekyro/react@0.1.0-rc.18",
|
|
102
102
|
"description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (ar/fr/en, 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.18?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.18"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
}
|
package/dist/chunk-JT7YHK7F.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as N}from"./chunk-VRDPGOXM.js";import{g as _}from"./chunk-XTQARDSJ.js";import{a as l,b as f,d as y}from"./chunk-NV7HZJM4.js";import{a as h,r as I}from"./chunk-25KWDPLY.js";import{a}from"./chunk-2KED7D2Q.js";import{useState as v}from"react";var L={document:"card",population_registry:"id",national_eid:"smartphone",phone_otp:"phone",email_otp:"email"};function B(t,n){switch(t.service){case"document":return n.t("method.document_photo");case"population_registry":return n.t("method.national_number");case"national_eid":{let s=t.nationalEid?.providerName;return s?n.t("method.national_eid",{provider:s}):n.t("method.national_eidGeneric")}default:return null}}a(B,"identityLabel");function $(t,n){let[s,o]=v(!1),[i,p]=v(null);return{busy:s,error:i,run:a(u=>{o(!0),p(null),u().then(()=>o(!1),r=>{o(!1),p(t.t(N(r,t.strings))),n?.(r)})},"run")}}a($,"useChoiceAction");import{useId as b}from"react";import{Fragment as w,jsx as e,jsxs as c}from"react/jsx-runtime";function S(){let t=`sekyro-face-light-${b().replace(/[^A-Za-z0-9_-]/g,"")}`;return c("svg",{className:"sekyro-mark sekyro-mark--face",viewBox:"0 0 168 206","aria-hidden":"true",focusable:"false",children:[e("defs",{children:e("mask",{id:t,children:e("ellipse",{className:"sekyro-mark__arc",cx:"84",cy:"103",rx:"76",ry:"95",pathLength:"1",fill:"none",stroke:"#fff",strokeWidth:"16"})})}),e("ellipse",{cx:"84",cy:"103",rx:"64",ry:"83",fill:"none",className:"sekyro-mark__line"}),e("path",{className:"sekyro-mark__face",d:"M68 64v10M100 64v10M84 66v25q0 2-6 1M60 108q24 18 48 0"}),e("ellipse",{className:"sekyro-mark__ticks",cx:"84",cy:"103",rx:"76",ry:"95",pathLength:"56"}),e("ellipse",{className:"sekyro-mark__ticks sekyro-mark__ticks--light",cx:"84",cy:"103",rx:"76",ry:"95",pathLength:"56",mask:`url(#${t})`})]})}a(S,"FaceMark");var x={glasses:"jGlasses",lighting:"light",faceCamera:"camera"};function P({start:t,context:n,tips:s,tipsTitle:o,extra:i,human:p=!1,returning:d=!1,notice:u}){let{t:r}=_();return c("section",{className:"sekyro-step",children:[e(S,{}),n.captureMode==="assisted"?e(f,{title:r("capture.assisted.heading"),lead:r("capture.assisted.lead")}):d?e(f,{title:r("returning.heading"),lead:r("returning.description")}):e(f,{title:r(p?"native.face.humanIntroTitle":"native.face.introTitle"),lead:r(p?"native.face.humanIntroLead":"native.face.introLead")}),o!==void 0?e("p",{className:"sekyro-section-label",children:o}):null,e("ul",{className:"sekyro-tiprows",children:s!==void 0?s.map(m=>c("li",{children:[e(l,{name:x[m.id]??"face"}),m.text]},m.id)):c(w,{children:[c("li",{children:[e(l,{name:"light"}),r("capture.tips.light")]}),c("li",{children:[e(l,{name:"jGlasses"}),r("capture.tips.uncover")]}),c("li",{children:[e(l,{name:"smartphone"}),r("capture.tips.eyeLevel")]})]})}),i,u??null,u!==void 0?null:n.assets==="failed"?e(h,{kind:"secondary",full:!0,onClick:n.retryAssets,children:r("common.retry")}):null,u!==void 0?null:e(y,{children:c(h,{full:!0,disabled:n.assets!=="ready","aria-busy":n.assets==="loading"||void 0,onClick:t,children:[e(l,{name:"camera"}),r("capture.start")]})})]})}a(P,"FaceIntro");import{isInAppBrowser as A}from"@sekyro/web/client";function K(t){return A(t)}a(K,"isInAppBrowser");function V(t,n){let s=n??(typeof navigator>"u"?"":String(navigator.userAgent??""));if(!/Android/i.test(s))return null;let o;try{o=new URL(t)}catch{return null}if(o.protocol!=="https:"&&o.protocol!=="http:")return null;let i=o.protocol.slice(0,-1);return`intent://${o.host}${o.pathname}${o.search}#Intent;scheme=${i};action=android.intent.action.VIEW;S.browser_fallback_url=${encodeURIComponent(t)};end`}a(V,"androidBrowserIntent");import{jsx as k,jsxs as g}from"react/jsx-runtime";function Q({tone:t,icon:n,busy:s,title:o,titleId:i,children:p,actions:d,live:u,testId:r}){let m=I();return g("section",{className:"sekyro-step sekyro-status",...i!==void 0?{"aria-labelledby":i}:{},...u?{role:"status","aria-live":"polite"}:{},"data-testid":r,children:[g("div",{className:"sekyro-status__body",children:[k("span",{className:`sekyro-tile sekyro-tile--${t}${s?" is-busy":""}`,"aria-hidden":"true",children:k(l,{name:n})}),g("div",{className:"sekyro-heading sekyro-status__text",children:[k("h2",{id:i,ref:m,tabIndex:-1,className:"sekyro-text-body",children:o}),p]})]}),d!=null&&d!==!1?k(y,{children:d}):null]})}a(Q,"StatusPage");export{L as a,B as b,$ as c,P as d,K as e,V as f,Q as g};
|
package/dist/chunk-NV7HZJM4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{p,q as k,r as h}from"./chunk-25KWDPLY.js";import{a as t}from"./chunk-2KED7D2Q.js";var M={success:'<path d="M2 12A10 10 0 1 0 22 12A10 10 0 1 0 2 12Z" stroke="currentColor"/><path d="M8.5 12.5L10.5 14.5L15.5 9.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>',pending:'<path d="M2 12A10 10 0 1 0 22 12A10 10 0 1 0 2 12Z" stroke="currentColor"/><path d="M12 8V12L14.5 14.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>',info:'<path d="M2 12A10 10 0 1 0 22 12A10 10 0 1 0 2 12Z" stroke="currentColor"/><path d="M12 17V11" stroke="currentColor" stroke-linecap="round"/><path d="M12 8H12" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>',timer:'<path d="M3 13A9 9 0 1 0 21 13A9 9 0 1 0 3 13Z" stroke="currentColor"/><path d="M12 9V13L14.5 15.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.5 4.5L7.5 2" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M20.5 4.5L16.5 2" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>',closeCircle:'<path d="M2 12A10 10 0 1 0 22 12A10 10 0 1 0 2 12Z" stroke="currentColor"/><path d="M14.5 9.5L9.5 14.5M9.5 9.5L14.5 14.5" stroke="currentColor" stroke-linecap="round"/>',sms:'<path d="M14.6 19.21C14.26 19.41 14.05 19.76 13.63 20.47L13.09 21.39C12.6 22.2 11.4 22.2 10.91 21.39L10.37 20.47C9.95 19.76 9.74 19.41 9.4 19.21C9.07 19.01 8.64 19.01 7.79 18.99C6.53 18.97 5.75 18.89 5.09 18.62C3.86 18.11 2.89 17.14 2.38 15.91C2 14.99 2 13.83 2 11.5V10.5C2 7.23 2 5.59 2.74 4.39C3.15 3.71 3.71 3.15 4.39 2.74C5.59 2 7.23 2 10.5 2H13.5C16.77 2 18.41 2 19.61 2.74C20.29 3.15 20.85 3.71 21.26 4.39C22 5.59 22 7.23 22 10.5V11.5C22 13.83 22 14.99 21.62 15.91C21.11 17.14 20.14 18.11 18.91 18.62C18.25 18.89 17.47 18.97 16.21 18.99C15.36 19.01 14.93 19.01 14.6 19.21Z" stroke="currentColor" stroke-linecap="round"/>',whatsapp:'<path d="M17.47 14.38c-0.3-0.15-1.76-0.87-2.03-0.97c-0.27-0.1-0.47-0.15-0.670.15c-0.20.3-0.770.97-0.94 1.16c-0.170.2-0.350.22-0.640.07c-0.3-0.15-1.25-0.46-2.39-1.48c-0.88-0.79-1.48-1.76-1.65-2.06c-0.17-0.3-0.02-0.460.13-0.61c0.13-0.130.3-0.350.45-0.52s0.2-0.30.3-0.5c0.1-0.20.05-0.37-0.03-0.52s-0.67-1.61-0.92-2.21c-0.24-0.58-0.49-0.5-0.67-0.51a13 13 0 0 0-0.57-0.01c-0.2 0-0.520.07-0.790.37c-0.270.3-1.04 1.02-1.04 2.48c0 1.46 1.06 2.88 1.21 3.07s2.1 3.2 5.08 4.49c0.710.31 1.260.49 1.690.63c0.710.23 1.360.2 1.870.12c0.57-0.09 1.76-0.72 2.01-1.41s0.25-1.290.17-1.41c-0.07-0.12-0.27-0.2-0.57-0.35m-5.42 7.4h0a9.87 9.87 0 0 1-5.03-1.38l-0.36-0.21l-3.740.98l1-3.65l-0.23-0.37a9.86 9.86 0 0 1-1.51-5.26c0-5.45 4.44-9.88 9.89-9.88c2.64 0 5.12 1.03 6.99 2.9a9.82 9.82 0 0 1 2.89 6.99c0 5.45-4.44 9.88-9.88 9.88m8.41-18.3A11.82 11.82 0 0 0 12.05 0C5.5 0 0.16 5.330.16 11.89c0 2.10.55 4.14 1.59 5.95L0.06 24l6.3-1.65a11.9 11.9 0 0 0 5.68 1.45h0.01c6.55 0 11.89-5.33 11.89-11.89a11.82 11.82 0 0 0-3.48-8.41" fill="currentColor"/>',back:'<path d="M15 5L9 12L15 19" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>',warning:'<path d="M5.31 10.76C8.23 5.59 9.69 3 12 3C14.31 3 15.77 5.59 18.69 10.76L19.05 11.41C21.48 15.71 22.69 17.86 21.59 19.43C20.5 21 17.79 21 12.36 21H11.64C6.21 21 3.5 21 2.41 19.43C1.31 17.86 2.52 15.71 4.95 11.41L5.31 10.76Z" stroke="currentColor"/><path d="M12 8V13" stroke="currentColor" stroke-linecap="round"/><path d="M12 16H12" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>',external:'<path d="M9 15L15 9M15 13.5V9H10.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M2 12C2 7.29 2 4.93 3.46 3.46C4.93 2 7.29 2 12 2C16.71 2 19.07 2 20.54 3.46C22 4.93 22 7.29 22 12C22 16.71 22 19.07 20.54 20.54C19.07 22 16.71 22 12 22C7.29 22 4.93 22 3.46 20.54C2 19.07 2 16.71 2 12Z" stroke="currentColor"/>'};var l={id:'<path d="M4 6H17C18.66 6 20 7.34 20 9V19C20 20.66 18.66 22 17 22H7C5.34 22 4 20.66 4 19V6ZM4 6V5" stroke="currentColor" stroke-linejoin="round"/><path d="M9 13A3 3 0 1 0 15 13A3 3 0 1 0 9 13Z" stroke="currentColor"/><path d="M18 6H5.07C4.48 6 4 5.52 4 4.93C4 4.4 4.39 3.94 4.92 3.87L15.72 2.33C16.92 2.15 18 3.09 18 4.31V6Z" stroke="currentColor" stroke-linejoin="round"/><path d="M10 19H14" stroke="currentColor" stroke-linecap="round"/>',card:'<path d="M2 12C2 8.23 2 6.34 3.17 5.17C4.34 4 6.23 4 10 4H14C17.77 4 19.66 4 20.83 5.17C22 6.34 22 8.23 22 12C22 15.77 22 17.66 20.83 18.83C19.66 20 17.77 20 14 20H10C6.23 20 4.34 20 3.17 18.83C2 17.66 2 15.77 2 12Z" stroke="currentColor"/><path d="M10 16H6" stroke="currentColor" stroke-linecap="round"/><path d="M14 16H12.5" stroke="currentColor" stroke-linecap="round"/><path d="M2 10L22 10" stroke="currentColor" stroke-linecap="round"/>',lock:'<path d="M2 16C2 13.17 2 11.76 2.88 10.88C3.76 10 5.17 10 8 10H16C18.83 10 20.24 10 21.12 10.88C22 11.76 22 13.17 22 16C22 18.83 22 20.24 21.12 21.12C20.24 22 18.83 22 16 22H8C5.17 22 3.76 22 2.88 21.12C2 20.24 2 18.83 2 16Z" stroke="currentColor"/><path d="M6 10V8C6 4.69 8.69 2 12 2C15.31 2 18 4.69 18 8V10" stroke="currentColor" stroke-linecap="round"/>',passport:'<path d="M4 6H17C18.66 6 20 7.34 20 9V19C20 20.66 18.66 22 17 22H7C5.34 22 4 20.66 4 19V6ZM4 6V5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M15 13A3 3 0 1 1 9 13A3 3 0 1 1 15 13Z" stroke="currentColor" stroke-linecap="round"/><path d="M18 6H5.07C4.48 6 4 5.52 4 4.93C4 4.4 4.39 3.94 4.92 3.87L15.72 2.33C16.92 2.15 18 3.09 18 4.31V6Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M10 19H14" stroke="currentColor" stroke-linecap="round"/>',camera:'<path d="M9 13A3 3 0 1 0 15 13A3 3 0 1 0 9 13Z" stroke="currentColor"/><path d="M9.78 21H14.22C17.34 21 18.9 21 20.02 20.26C20.51 19.95 20.93 19.54 21.25 19.06C22 17.96 22 16.43 22 13.36C22 10.3 22 8.77 21.25 7.67C20.93 7.19 20.51 6.78 20.02 6.46C19.3 5.99 18.4 5.82 17.02 5.76C16.36 5.76 15.8 5.27 15.67 4.64C15.47 3.68 14.62 3 13.63 3H10.37C9.38 3 8.53 3.68 8.33 4.64C8.2 5.27 7.64 5.76 6.98 5.76C5.6 5.82 4.7 5.99 3.98 6.46C3.49 6.78 3.07 7.19 2.75 7.67C2 8.77 2 10.3 2 13.36C2 16.43 2 17.96 2.75 19.06C3.07 19.54 3.49 19.95 3.98 20.26C5.1 21 6.66 21 9.78 21Z" stroke="currentColor"/><path d="M19 10H18" stroke="currentColor" stroke-linecap="round"/>',light:'<path d="M6 12A6 6 0 1 0 18 12A6 6 0 1 0 6 12Z" stroke="currentColor"/><path d="M12 2V3" stroke="currentColor" stroke-linecap="round"/><path d="M12 21V22" stroke="currentColor" stroke-linecap="round"/><path d="M22 12L21 12" stroke="currentColor" stroke-linecap="round"/><path d="M3 12L2 12" stroke="currentColor" stroke-linecap="round"/><path d="M19.07 4.93L18.68 5.32" stroke="currentColor" stroke-linecap="round"/><path d="M5.32 18.68L4.93 19.07" stroke="currentColor" stroke-linecap="round"/><path d="M19.07 19.07L18.68 18.68" stroke="currentColor" stroke-linecap="round"/><path d="M5.32 5.32L4.93 4.93" stroke="currentColor" stroke-linecap="round"/>',jGlasses:'<path d="M14 16A4 4 0 1 0 22 16A4 4 0 1 0 14 16Z" stroke="currentColor"/><path d="M2 16A4 4 0 1 0 10 16A4 4 0 1 0 2 16Z" stroke="currentColor"/><path d="M14 16.21L13.34 15.98C12.47 15.67 11.53 15.67 10.66 15.98L10 16.21" stroke="currentColor" stroke-linecap="round"/><path d="M2 16L2.76 7.61C2.88 6.34 2.94 5.71 3.31 5.24C3.68 4.77 4.28 4.57 5.48 4.17L6 4" stroke="currentColor" stroke-linecap="round"/><path d="M22 16L21.24 7.61C21.12 6.34 21.06 5.71 20.69 5.24C20.32 4.77 19.72 4.57 18.52 4.17L18 4" stroke="currentColor" stroke-linecap="round"/>',smartphone:'<path d="M4 10C4 6.23 4 4.34 5.17 3.17C6.34 2 8.23 2 12 2C15.77 2 17.66 2 18.83 3.17C20 4.34 20 6.23 20 10V14C20 17.77 20 19.66 18.83 20.83C17.66 22 15.77 22 12 22C8.23 22 6.34 22 5.17 20.83C4 19.66 4 17.77 4 14V10Z" stroke="currentColor" stroke-linecap="round"/><path d="M15 19H9" stroke="currentColor" stroke-linecap="round"/>',close:'<path d="M19.01 5L5.01 19" stroke="currentColor" stroke-linecap="round"/><path d="M19 19L5 5" stroke="currentColor" stroke-linecap="round"/>',phone:'<path d="M18.68 19.96C19.19 19.91 19.64 19.63 20 19.25L21.42 17.76C22.38 16.75 22.11 15.02 20.88 14.31L18.97 13.21C18.17 12.75 17.19 12.88 16.56 13.55L16.1 14.03C16.1 14.03 15.02 15.17 12.06 12.06C9.11 8.94 10.19 7.81 10.19 7.81L10.48 7.5C11.18 6.76 11.25 5.56 10.63 4.69L9.37 2.91C8.61 1.83 7.14 1.69 6.26 2.61L4.69 4.26C4.26 4.72 3.97 5.31 4 5.97C4.09 7.65 4.81 11.26 8.82 15.48C13.06 19.95 17.05 20.12 18.68 19.96Z" stroke="currentColor" stroke-linecap="round"/>',email:'<path d="M2 12C2 8.23 2 6.34 3.17 5.17C4.34 4 6.23 4 10 4H14C17.77 4 19.66 4 20.83 5.17C22 6.34 22 8.23 22 12C22 15.77 22 17.66 20.83 18.83C19.66 20 17.77 20 14 20H10C6.23 20 4.34 20 3.17 18.83C2 17.66 2 15.77 2 12Z" stroke="currentColor"/><path d="M6 8L8.16 9.8C10 11.33 10.91 12.09 12 12.09C13.09 12.09 14 11.33 15.84 9.8L18 8" stroke="currentColor" stroke-linecap="round"/>',face:'<path d="M9 16C9.85 16.63 10.88 17 12 17C13.12 17 14.15 16.63 15 16" stroke="currentColor" stroke-linecap="round"/><path d="M2.2 10C3 6.08 6.08 3 10 2.2" stroke="currentColor" stroke-linecap="round"/><path d="M2.2 14C3 17.92 6.08 21 10 21.8" stroke="currentColor" stroke-linecap="round"/><path d="M21.8 10C21 6.08 17.92 3 14 2.2" stroke="currentColor" stroke-linecap="round"/><path d="M21.8 14C21 17.92 17.92 21 14 21.8" stroke="currentColor" stroke-linecap="round"/><path d="M15.5 10.5C15.5 11.05 15.28 11.5 15 11.5C14.72 11.5 14.5 11.05 14.5 10.5C14.5 9.95 14.72 9.5 15 9.5C15.28 9.5 15.5 9.95 15.5 10.5Z" stroke="currentColor"/><path d="M8.5 10.5A0.5 1 0 1 0 9.5 10.5A0.5 1 0 1 0 8.5 10.5Z" stroke="currentColor"/>',copy:'<path d="M6 11C6 8.17 6 6.76 6.88 5.88C7.76 5 9.17 5 12 5H15C17.83 5 19.24 5 20.12 5.88C21 6.76 21 8.17 21 11V16C21 18.83 21 20.24 20.12 21.12C19.24 22 17.83 22 15 22H12C9.17 22 7.76 22 6.88 21.12C6 20.24 6 18.83 6 16V11Z" stroke="currentColor"/><path d="M6 19C4.34 19 3 17.66 3 16V10C3 6.23 3 4.34 4.17 3.17C5.34 2 7.23 2 11 2H15C16.66 2 18 3.34 18 5" stroke="currentColor"/>'};import{jsx as S}from"react/jsx-runtime";function m({name:o,className:r}){return S("svg",{className:`sekyro-glyph${r?` ${r}`:""}`,viewBox:"0 0 24 24",fill:"none",stroke:"none",strokeWidth:1.5,"aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:o in l?l[o]:M[o]}})}t(m,"Icon");import{createContext as c,useContext as d,useEffect as C,useId as x,useLayoutEffect as H,useRef as f,useState as g}from"react";import{jsx as a,jsxs as L}from"react/jsx-runtime";function $({id:o,title:r,lead:e}){let n=h();return L("div",{className:"sekyro-heading",children:[a("h2",{id:o,ref:n,tabIndex:-1,className:"sekyro-text-body",children:r}),e!==void 0?a("p",{className:"sekyro-text-muted",children:e}):null]})}t($,"StepHeading");var A=c(null),Z=typeof window>"u"?C:H;function B({children:o}){let r=d(A),e=x(),n=r?.claim;return Z(()=>n?.(e),[n,e]),L("div",{className:"sekyro-actions",children:[o,r!==null&&r.owner===e?r.node:null]})}t(B,"StepActions");var V=c(()=>{});function G(o){let r=d(V),e=f(o);e.current=o;let n=o!==null;C(()=>{if(n)return r(()=>e.current?.()),()=>r(null)},[n,r])}t(G,"useFlowBack");var P=c(void 0),q=c(void 0),v=c(()=>{});function z(o){let r=d(v);C(()=>(r(o),()=>r(!1)),[o,r])}t(z,"useImmersive");var I=100;function w({swapKey:o,className:r,children:e}){let[n,N]=g({key:o,node:e}),i=f(e);i.current=e;let s=n.key!==o;return C(()=>{if(!s)return;let y=setTimeout(()=>N({key:o,node:i.current}),I);return()=>clearTimeout(y)},[s,o]),a("div",{className:`${r}${s?" is-leaving":""}`,"aria-hidden":s||void 0,children:s?n.node:e},n.key)}t(w,"Swap");var D=t(({pageKey:o,children:r})=>a(w,{swapKey:o,className:"sekyro-page",children:r}),"PageSwap");import{jsx as u,jsxs as _}from"react/jsx-runtime";var O={info:"info",warning:"warning",danger:"warning"};function e1({tone:o,children:r}){return _(k,{tone:o,children:[u("span",{className:"sekyro-notice__icon","aria-hidden":"true",children:u(m,{name:O[o]})}),u("div",{className:"sekyro-notice__body",children:r})]})}t(e1,"StepNotice");function t1(o,r,e){return e?o.t("common.noAttemptsLeft"):p(o.strings,o.locale,r)}t(t1,"attemptsLine");export{m as a,$ as b,A as c,B as d,V as e,G as f,P as g,q as h,v as i,z as j,w as k,D as l,e1 as m,t1 as n};
|