@sekyro/react 0.1.0-rc.4 → 0.1.0-rc.6

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +137 -0
  2. package/LICENSE +25 -16
  3. package/README.md +39 -7
  4. package/dist/chunk-3MBJZSJL.js +2 -0
  5. package/dist/chunk-4INDRENU.js +2 -0
  6. package/dist/chunk-4RUZQW5T.js +2 -0
  7. package/dist/chunk-63NUMQST.js +2 -0
  8. package/dist/chunk-65JA6YKG.js +2 -0
  9. package/dist/chunk-ADMDZLPM.js +2 -0
  10. package/dist/chunk-AMOZXMUP.js +2 -0
  11. package/dist/chunk-BENNJ4GV.js +2 -0
  12. package/dist/chunk-BJJZ4MO5.js +2 -0
  13. package/dist/chunk-BRA6F56P.js +2 -0
  14. package/dist/chunk-JAUZKPQO.js +2 -0
  15. package/dist/chunk-P2LX7BBE.js +2 -0
  16. package/dist/chunk-Q232JYNO.js +2 -0
  17. package/dist/chunk-YUNPD6ZB.js +2 -0
  18. package/dist/document-capture-view-SKFDM4AQ.js +2 -0
  19. package/dist/eid-view-WIK6KUTY.js +2 -0
  20. package/dist/email-otp-view-TYSBCGUY.js +2 -0
  21. package/dist/flow-views-PCBR5GYS.js +2 -0
  22. package/dist/fonts/Cairo-OFL.txt +93 -0
  23. package/dist/fonts/Geist-OFL.txt +93 -0
  24. package/dist/fonts/Inter-OFL.txt +93 -0
  25. package/dist/fonts/SekyroCairo-Bold.woff2 +0 -0
  26. package/dist/fonts/SekyroCairo-Regular.woff2 +0 -0
  27. package/dist/fonts/SekyroCairo-SemiBold.woff2 +0 -0
  28. package/dist/fonts/SekyroGeist-Bold.woff2 +0 -0
  29. package/dist/fonts/SekyroGeist-SemiBold.woff2 +0 -0
  30. package/dist/fonts/SekyroInter-Medium.woff2 +0 -0
  31. package/dist/fonts/SekyroInter-Regular.woff2 +0 -0
  32. package/dist/fonts/SekyroInter-SemiBold.woff2 +0 -0
  33. package/dist/index.cjs +1 -2
  34. package/dist/index.d.cts +5 -383
  35. package/dist/index.d.ts +5 -383
  36. package/dist/index.js +1 -2
  37. package/dist/portrait-capture-view-HYOEOAF4.js +2 -0
  38. package/dist/theme-BpOuzcWh.d.cts +456 -0
  39. package/dist/theme-BpOuzcWh.d.ts +456 -0
  40. package/dist/verification/index.cjs +2 -0
  41. package/dist/verification/index.d.cts +524 -0
  42. package/dist/verification/index.d.ts +524 -0
  43. package/dist/verification/index.js +2 -0
  44. package/dist/verification.css +560 -0
  45. package/package.json +24 -13
  46. package/sbom.cdx.json +153 -0
  47. package/dist/index.cjs.map +0 -1
  48. package/dist/index.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{a as Ht,b as Ft,c as N}from"./chunk-65JA6YKG.js";import{a as n,b as T,f as Tt,g as Kt,h as Ot,i as Ut,j as Gt,k as D,l as $e}from"./chunk-4RUZQW5T.js";import{useId as tr}from"react";import{Fragment as er,jsx as _,jsxs as W}from"react/jsx-runtime";function z({className:e,children:t}){return _("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:e??"sekyro-icon sekyro-icon--sm",children:t})}n(z,"Svg");var st="M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z";function Bt(e){return W(z,{...e,children:[_("circle",{cx:"12",cy:"12",r:"4"}),_("path",{d:"M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4"})]})}n(Bt,"SunIcon");function Dt(e){return W(z,{...e,children:[_("circle",{cx:"12",cy:"12",r:"9"}),_("path",{d:"M9 10h.01M15 10h.01M8.8 14.6a4.2 4.2 0 0 0 6.4 0"})]})}n(Dt,"FaceUncoveredIcon");function $t(e){return W(z,{...e,children:[_("rect",{x:"7",y:"2.5",width:"10",height:"19",rx:"2"}),_("path",{d:"M10.5 18.5h3M2.5 9.5h2.5M19 9.5h2.5"}),_("circle",{cx:"12",cy:"9.5",r:"1.6"})]})}n($t,"PhoneEyeLevelIcon");function qt(e){return W(z,{...e,children:[_("path",{d:"M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z"}),_("circle",{cx:"12",cy:"12",r:"2.8"})]})}n(qt,"LookStraightIcon");function jt(e){return W(z,{...e,children:[_("path",{d:st}),_("path",{d:"M9 13l2 2 4-4"})]})}n(jt,"CameraCheckIcon");function Wt(e){return W(z,{...e,children:[_("path",{d:st}),_("path",{d:"M10.2 11.2a1.9 1.9 0 1 1 2.6 1.8c-.5.2-.8.6-.8 1.1v.3M12 16.4h.01"})]})}n(Wt,"CameraAskIcon");function zt(e){return W(z,{...e,children:[_("path",{d:st}),_("path",{d:"M3 3l18 18"})]})}n(zt,"CameraBlockedIcon");function me({off:e,className:t}){return W(z,{...t!==void 0?{className:t}:{},children:[_("path",{d:"M4.5 9.5v5H8l4 3.5v-12L8 9.5H4.5Z"}),e?_("path",{d:"M4 4l16 16"}):W(er,{children:[_("path",{d:"M15.5 9.7a3.6 3.6 0 0 1 0 4.6"}),_("path",{d:"M18 7.6a6.6 6.6 0 0 1 0 8.8"})]})]})}n(me,"SpeakerIcon");function Yt(e){return _(z,{...e,children:_("path",{d:"M5 12.5l4.5 4.5L19 7.5"})})}n(Yt,"CheckIcon");function Zt(e){return W(z,{className:e.className??"sekyro-spinner",children:[_("circle",{cx:"12",cy:"12",r:"9",opacity:"0.25"}),_("path",{d:"M21 12a9 9 0 0 0-9-9"})]})}n(Zt,"SpinnerIcon");import{jsx as re,jsxs as Xt}from"react/jsx-runtime";var qe=["light","uncover","eyeLevel","straight"],nr={light:{key:"capture.tips.light",icon:n(()=>re(Bt,{}),"icon")},uncover:{key:"capture.tips.uncover",icon:n(()=>re(Dt,{}),"icon")},eyeLevel:{key:"capture.tips.eyeLevel",icon:n(()=>re($t,{}),"icon")},straight:{key:"capture.tips.straight",icon:n(()=>re(qt,{}),"icon")}};function Qt({tips:e}){let t=N(),s=tr();return e.length===0?null:Xt("section",{className:"sekyro-tips","aria-labelledby":s,"data-testid":"sekyro-tips",children:[re("p",{className:"sekyro-tips__title",id:s,children:t("capture.tips.title")}),re("ul",{className:"sekyro-tips__list",children:e.map(o=>{let r=typeof o=="string"?nr[o]:void 0,i=typeof o=="string"?o:o.id,c=r!==void 0?r.icon():typeof o=="string"?void 0:o.icon,u=r!==void 0?t(r.key):typeof o=="string"?o:o.text;return Xt("li",{className:"sekyro-tips__item",children:[c!=null?re("span",{className:"sekyro-tips__icon","aria-hidden":"true",children:c}):null,re("span",{children:u})]},i)})})]})}n(Qt,"TipList");var je=["fcv3.no_face","fcv3.come_closer","fcv3.move_back","fcv3.center_face","fcv3.straighten","fcv3.more_light","fcv3.too_bright","fcv3.hold_still","fcv3.steady_camera","capture.tips.summary"];function ce(e){return e!==null&&je.includes(e)}n(ce,"isVoiceKey");import{useCallback as Z,useEffect as le,useLayoutEffect as ir,useMemo as ar,useRef as he,useState as Le}from"react";var rr=n((e,t)=>Object.prototype.hasOwnProperty.call(e,t),"own");function ge(e,t,s){let o;try{if(typeof e=="function")o=e(t,s);else{let r=e[s];o=r!=null&&rr(r,t)?r[t]:null}}catch{return null}return typeof o=="string"&&o!==""?o:null}n(ge,"resolveClip");var or="UklGRiQAAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YQAAAAA=",tn={ar:"ar-SA",fr:"fr-FR",en:"en-US"};function Y(){return typeof window<"u"&&"speechSynthesis"in window?window.speechSynthesis:null}n(Y,"synth");function sr(){return Y()!==null&&typeof SpeechSynthesisUtterance=="function"}n(sr,"speechAvailable");function Jt(e){return(e.split(/[-_]/)[0]??e).toLowerCase()}n(Jt,"baseLang");function nn(e,t){let s=n(r=>r.replace(/_/g,"-").toLowerCase(),"norm"),o=Jt(t);return e.find(r=>s(r.lang)===s(t))??e.find(r=>Jt(r.lang)===o)}n(nn,"pickVoice");function rn(e){if(!sr())return!1;let t=[];try{t=Y()?.getVoices()??[]}catch{return!0}return t.length===0||nn(t,e)!==void 0}n(rn,"speechUsable");function on(e){let t=Y();return t===null||typeof t.addEventListener!="function"?()=>{}:(t.addEventListener("voiceschanged",e),()=>t.removeEventListener?.("voiceschanged",e))}n(on,"subscribeVoices");function xe(e){try{let t=typeof location<"u"?location.href:"http://localhost/",s=new URL(e,t);return`clip:${s.origin}${s.pathname}`}catch{return`clip:${e}`}}n(xe,"clipIdentity");function en(e){e.pause(),e.removeAttribute("src"),e.load()}n(en,"release");function sn(){let e=null,t=null,s=0,o=null,r=[],i=new Map,c=n(()=>{r=Y()?.getVoices()??[]},"loadVoices"),u=!1,p=n(()=>{let l=Y();u||l===null||(u=!0,c(),l.addEventListener?.("voiceschanged",c))},"bindVoices"),V=n(()=>(e??(e=new Audio),e),"element"),m=n((l,g,h)=>{let C=Y();if(C!==null&&l!==""&&typeof SpeechSynthesisUtterance=="function"){p();let R=nn(r,g);if(r.length===0||R!==void 0){C.cancel();let y=new SpeechSynthesisUtterance(l);y.lang=g,R!==void 0&&(y.voice=R),y.rate=.95,h!==void 0&&(y.onend=y.onerror=h),C.speak(y);return}}h?.()},"speak"),b=n(()=>{s+=1,o=null,e!==null&&(e.pause(),e.currentTime=0),Y()?.cancel()},"stop"),f=n(l=>{for(let g of l){let h=xe(g);if(i.has(h))continue;let C=new Audio;C.preload="auto",C.src=g,i.set(h,C)}},"warmClips");return{say(l){let g=l.url!==null?xe(l.url):`tts:${l.lang}:${l.text}`;if(g===o)return;o=g,s+=1;let h=s,C=l.onEnd,R=C!==void 0?()=>{h===s&&C()}:void 0;if(Y()?.cancel(),l.url!==null){let y=V();y.pause(),y.muted=!1,y.src=l.url,y.currentTime=0,y.onended=R??null,y.play()?.catch(S=>{h===s&&S?.name!=="AbortError"&&(l.speech?m(l.text,l.lang,R):R?.())});return}l.speech?m(l.text,l.lang,R):R?.()},unlock({lang:l,speech:g,prefetch:h}){let C=V();if(t===null&&typeof Blob=="function"&&typeof URL.createObjectURL=="function"){let S=Uint8Array.from(atob(or),x=>x.charCodeAt(0));t=URL.createObjectURL(new Blob([S],{type:"audio/wav"}))}let R=C.paused===!1&&t!==null&&C.src!==t;t!==null&&!R&&(C.muted=!0,C.onended=null,C.src=t,C.play()?.catch(()=>{}));let y=Y();if(g&&y!==null&&typeof SpeechSynthesisUtterance=="function"){p();let S=new SpeechSynthesisUtterance(" ");S.volume=0,S.lang=l,y.speak(S)}f(h??[])},prefetch:f,stop:b,dispose(){b(),u&&Y()?.removeEventListener?.("voiceschanged",c),u=!1,t!==null&&URL.revokeObjectURL(t),t=null,e!==null&&en(e),e=null;for(let l of i.values())en(l);i.clear()}}}n(sn,"createVoicePlayer");var an="sekyro.voiceGuidance";function cn(e){try{if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t==="1"?!0:t==="0"?!1:null}catch{return null}}n(cn,"readVoicePreference");function ln(e,t){try{if(typeof window>"u")return;window.localStorage.setItem(e,t?"1":"0")}catch{}}n(ln,"writeVoicePreference");var we="capture.tips.summary",cr=typeof window<"u"?ir:le,lr=Object.freeze({});function it(e,t){let s=new Set,o=[];for(let r of je){let i=r===we?null:ge(e,r,t);i===null||s.has(xe(i))||(s.add(xe(i)),o.push(i))}return o}n(it,"resolvedClipUrls");function at({locale:e,defaultClips:t,options:s}){let o=s===!1,r=o?{}:s??{},i=r.storageKey===void 0?an:r.storageKey,[c,u]=Le(r.defaultEnabled??!0),p=he(c),[V,m]=Le(!1),[b,f]=Le("none"),[l,g]=Le(!1),h=he(!1),[C,R]=Le(0),y=he(null),S=Z(()=>(y.current??(y.current=sn()),y.current),[]),x=tn[e],K=r.speechFallback,v=K===void 0||K===!0?!0:K===!1?!1:K.includes(e),M=r.clips??t??lr,F=he(!1),O=he(M);cr(()=>{O.current=M,p.current=c}),le(()=>{if(o||i===null)return;let d=cn(i);d!==null&&(p.current=d,u(d))},[o,i]),le(()=>{if(!(o||!v))return on(()=>R(d=>d+1))},[o,v]);let a=r.clips;le(()=>{if(o)return;let d=v&&rn(x);m(it(M,e).length>0||d),f(a!==void 0&&ge(a,we,e)!==null?"partner":ge(M,we,e)!==null||d?"default":"none")},[o,M,a,e,v,x,C]),le(()=>{if(o||!c||!F.current)return;let d=it(M,e);d.length>0&&S().prefetch(d)},[o,c,M,e,S]),le(()=>()=>{y.current?.dispose(),y.current=null,F.current=!1},[]);let A=Z(d=>{o||(F.current=!0,S().unlock({lang:x,speech:v,...d?{prefetch:it(O.current,e)}:{}}))},[o,S,x,v,e]),w=Z(()=>A(p.current),[A]),H=Z(()=>{h.current=!1,g(!1)},[]),E=Z(()=>{H(),y.current?.stop()},[H]),oe=Z(()=>{h.current&&E()},[E]),U=Z((d,q)=>{if(o)return;if(h.current){E();return}let ee=S();ee.stop(),h.current=!0,g(!0);let Ke=q?.clip===!1?null:ge(O.current,we,e);ee.say({url:Ke,text:d,lang:x,speech:v,onEnd:H})},[o,E,S,e,x,v,H]),P=Z(d=>{o||(d?A(!0):E(),i!==null&&ln(i,d),p.current=d,u(d))},[o,A,E,i]),k=Z(()=>P(!p.current),[P]),se=Z((d,q)=>{if(o||!c)return;h.current&&H();let ee=ge(O.current,d,e);S().say({url:ee,text:q,lang:x,speech:v})},[o,c,e,S,x,v,H]);return ar(()=>({supported:!o&&V,enabled:!o&&c,setEnabled:P,toggle:k,unlock:w,speakKey:se,stop:E,summary:o?"none":b,summaryPlaying:l,toggleSummary:U,stopSummary:oe}),[o,V,c,P,k,w,se,E,b,l,U,oe])}n(at,"useVoiceGuidance");function ct(e,t,s,o){let{speakKey:r,stop:i,enabled:c}=e,u=he(!1);le(()=>{if(!o||!c){u.current&&i(),u.current=!1;return}u.current=!0,ce(t)&&t!==we&&s!==""&&r(t,s)},[o,c,t,s,r,i])}n(ct,"useSpeakGuidance");import{isValidElement as qr,useCallback as Xe,useContext as jr,useEffect as ue,useMemo as be,useRef as de,useState as $n}from"react";import{jsx as Ee,jsxs as un}from"react/jsx-runtime";var ur=Array.from({length:56},(e,t)=>{let s=t/56*2*Math.PI-Math.PI/2,o=Math.cos(s),r=Math.sin(s);return{id:`tick-${t}`,frac:t/55,x1:150+108*o,y1:150+108*r,x2:150+138*o,y2:150+138*r,style:{transitionDelay:`${t*6}ms`}}});function dr(e,t,s,o){return s?"var(--sekyro-color-success)":e?o?"color-mix(in srgb, var(--sekyro-color-warning) 75%, transparent)":t<.33?"color-mix(in srgb, var(--sekyro-color-brand) 55%, transparent)":t<.66?"color-mix(in srgb, var(--sekyro-color-brand) 80%, transparent)":"var(--sekyro-color-brand)":"color-mix(in srgb, var(--sekyro-color-surface) 32%, transparent)"}n(dr,"tickColor");var pr="M0 -50 H300 V350 H0 Z M50 150 a100,100 0 1 0 200,0 a100,100 0 1 0 -200,0 Z";function dn({progress:e,phase:t,draining:s=!1}){let o=Math.min(1,Math.max(0,e)),r=Math.round(o*56),i=t==="checking",c=t==="recording",u=t==="frozen",p=i||u,V=i||c||u,m=t==="locked"||V,b=s&&!m;return un("svg",{"aria-hidden":"true",viewBox:"0 0 300 300",preserveAspectRatio:"xMidYMid meet",className:"sekyro-stage__arc","data-testid":"sekyro-capture-arc","data-phase":t,"data-filled":r,"data-recording":c?"":void 0,"data-draining":b?"":void 0,children:[Ee("path",{fillRule:"evenodd",d:pr,fill:"color-mix(in srgb, var(--sekyro-color-fg) var(--sekyro-scrim, 96%), transparent)",style:{"--sekyro-scrim":p?"100%":"96%"},className:"sekyro-arc__scrim sekyro-capture-fade-in","data-testid":"sekyro-capture-scrim"}),un("g",{className:t==="locked"?"sekyro-capture-settle":void 0,children:[Ee("g",{className:p?"sekyro-arc__ring sekyro-arc__ring--dim":"sekyro-arc__ring",children:ur.map((f,l)=>Ee("line",{x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,stroke:dr(l<r,f.frac,m,b),strokeWidth:3,strokeLinecap:"round",style:f.style,className:"sekyro-arc__tick"},f.id))}),Ee("g",{className:t==="seeking"?"sekyro-capture-breathe":void 0,children:Ee("circle",{cx:150,cy:150,r:100,fill:"none",stroke:m?"var(--sekyro-color-success)":"var(--sekyro-color-surface)",strokeWidth:m?3.5:2.5,className:V?"sekyro-arc__guide sekyro-arc__guide--spin sekyro-capture-ring-spin":"sekyro-arc__guide sekyro-capture-fade-in","data-testid":"sekyro-capture-guide"})})]})]})}n(dn,"CaptureArc");import{jsx as G,jsxs as Ne}from"react/jsx-runtime";function pn({videoRef:e,guidanceText:t,guidanceHint:s,guidanceKey:o,progress:r,phase:i,draining:c=!1,stillUrl:u,showChecking:p,onSwitchCamera:V,canSwitchCamera:m,voicePrompt:b,overlay:f,reduceMotion:l=!1}){let g=N(),h=i==="checking",R=h||i==="frozen",y=R&&p?g("capture.checking"):t,S=b?.(s,y,o);return Ne("div",{className:l?"sekyro-stage sekyro-capture-reduce":"sekyro-stage","data-testid":"sekyro-capture-stage",children:[G("video",{ref:e,playsInline:!0,muted:!0,className:"sekyro-stage__video","data-testid":"sekyro-capture-video"}),u!==null&&R?G("img",{src:u,alt:g("capture.previewAlt"),className:"sekyro-stage__still sekyro-capture-develop","data-testid":"sekyro-capture-still"}):null,G(dn,{progress:r,phase:i,draining:c}),f?.(e),S!=null&&!R?G("div",{className:"sekyro-stage__corner-start","data-testid":"sekyro-voice-slot",children:S}):null,m?G(T,{kind:"chip",onClick:V,"aria-label":g("capture.switchCamera"),className:"sekyro-stage__corner-end","data-testid":"sekyro-switch-camera",children:G(fr,{})}):null,h&&p?Ne("span",{className:"sekyro-stage__corner-end sekyro-stage__pill sekyro-capture-pill-in","data-testid":"sekyro-camera-off-pill",children:[G(yr,{}),g("capture.cameraOff")]}):null,Ne("p",{"aria-live":"polite",className:"sekyro-stage__guidance","data-testid":"sekyro-capture-guidance",children:[G("span",{className:"sekyro-stage__guidance-text sekyro-capture-text-in",children:y},y),R&&p?G("span",{className:"sekyro-stage__guidance-hint",children:g("capture.checkingHint")}):null]})]})}n(pn,"CaptureStage");function fr(){return Ne("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"sekyro-icon",children:[G("path",{d:"M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z"}),G("path",{d:"M15.4 11.9a3.5 3.5 0 0 0-6.1-1.4M15.4 11.9h-2.1m2.1 0V9.8"}),G("path",{d:"M8.6 13.4a3.5 3.5 0 0 0 6.1 1.4M8.6 13.4h2.1m-2.1 0v2.1"})]})}n(fr,"FlipCameraIcon");function yr(){return Ne("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"sekyro-icon sekyro-icon--sm",children:[G("path",{d:"M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z"}),G("path",{d:"M3 3l18 18"})]})}n(yr,"CameraOffIcon");import{useEffect as mr,useRef as gr}from"react";import{jsx as ve,jsxs as lt}from"react/jsx-runtime";function fn({showCoaching:e,attemptsText:t,showRetake:s,onRetake:o}){let r=N(),i=gr(null);return mr(()=>{s&&i.current?.focus()},[s]),!e&&!s?null:lt("div",{className:"sekyro-stack sekyro-stack--3","data-testid":"sekyro-captured-panel",children:[e?lt("div",{className:"sekyro-stack sekyro-stack--1",children:[ve("p",{className:"sekyro-text-body",children:r("capture.retryCoaching.title")}),lt("ul",{className:"sekyro-coaching",children:[ve("li",{children:r("capture.retryCoaching.light")}),ve("li",{children:r("capture.retryCoaching.eyeLevel")}),ve("li",{children:r("capture.retryCoaching.head")})]}),t!==null?ve("p",{className:"sekyro-text-muted","data-testid":"sekyro-attempts-remaining",children:t}):null]}):null,s?ve(T,{ref:i,className:"sekyro-btn--start",onClick:o,children:r("capture.recordAgain")}):null]})}n(fn,"CapturedPanel");function We(){try{return process.env.NODE_ENV!=="production"}catch{return!1}}n(We,"isDevBuild");import{createContext as hr}from"react";var yn=hr(null);import{useCallback as kn,useEffect as Cn,useRef as ke}from"react";import{useId as vr}from"react";import{jsx as ze,jsxs as ut}from"react/jsx-runtime";var kr=["user","environment"];function mn({value:e,onChange:t}){let s=N(),o=vr();return ut("fieldset",{className:"sekyro-segmented","data-testid":"sekyro-facing",children:[ze("legend",{className:"sekyro-segmented__legend",children:s("capture.cameraLabel")}),ze("div",{className:"sekyro-segmented__options",children:kr.map(r=>ut("label",{className:"sekyro-segmented__option",children:[ze("input",{type:"radio",className:"sekyro-segmented__input",name:o,value:r,checked:e===r,onChange:()=>t(r)}),ut("span",{className:"sekyro-segmented__face",children:[ze("span",{className:"sekyro-segmented__dot","aria-hidden":"true"}),s(`capture.facing.${r}`)]})]},r))})]})}n(mn,"FacingPicker");import{useEffect as Cr,useState as br}from"react";import{jsx as Me,jsxs as Sr}from"react/jsx-runtime";function gn({state:e}){let t=N(),[s,o]=br(!1);Cr(()=>{e!=="unknown"&&o(!0)},[e]);let r=e==="granted"?Me(jt,{}):e==="denied"?Me(zt,{}):Me(Wt,{});return Sr("div",{role:s?"status":void 0,className:`sekyro-permission sekyro-permission--${e}`,"data-testid":"sekyro-permission","data-state":e,children:[Me("span",{className:"sekyro-permission__icon","aria-hidden":"true",children:r}),Me("span",{children:t(`capture.permission.${e}`)})]})}n(gn,"PermissionRow");import{jsx as Ye,jsxs as hn}from"react/jsx-runtime";function vn({voice:e}){let t=N();if(!e.supported)return null;let s=e.enabled;return hn("button",{type:"button",role:"switch","aria-checked":s,className:"sekyro-switch","data-testid":"sekyro-voice-switch",onClick:()=>e.toggle(),children:[hn("span",{className:"sekyro-switch__label",children:[Ye(me,{off:!s}),t("capture.voiceGuidance")]}),Ye("span",{className:"sekyro-switch__track","aria-hidden":"true",children:Ye("span",{className:"sekyro-switch__thumb",children:s?Ye(Yt,{className:"sekyro-switch__check"}):null})})]})}n(vn,"VoiceSwitch");import{Fragment as Rr,jsx as $,jsxs as Ae}from"react/jsx-runtime";function bn({assets:e,onRetryAssets:t,permission:s,canChooseFacing:o,facing:r,onFacingChange:i,voice:c,tips:u,summary:p,startLabel:V,startDisabled:m,onStart:b}){let f=N(),l=ke(p?.stop);l.current=p?.stop,Cn(()=>()=>l.current?.(),[]);let g=ke(null),h=ke(null),C=ke(null),R=ke(e),y=ke(!1);Cn(()=>{let F=R.current;if(R.current=e,F===e)return;let O=y.current;e!=="loading"&&(y.current=!1),Vr(g.current)&&(e==="failed"?C.current?.focus():O&&h.current?.focus())},[e]);let S=kn(()=>{y.current=!0,t()},[t]),x=e==="loading",K=x||m,v=kn(()=>{K||(l.current?.(),b())},[K,b]),M;return e==="failed"?M=Ae(D,{tone:"danger",testId:"sekyro-assets-error",children:[$("p",{className:"sekyro-text-body",children:f("fcv2.err.models")}),$(T,{kind:"ghost",ref:C,className:"sekyro-btn--start",onClick:S,"data-testid":"sekyro-assets-retry",children:f("common.retry")})]}):M=Ae("div",{className:"sekyro-stack sekyro-stack--1",children:[$(T,{ref:h,full:!0,"data-testid":"sekyro-start","aria-disabled":K?"true":void 0,"aria-busy":x?"true":void 0,onClick:v,children:x?Ae(Rr,{children:[$(Zt,{}),f("capture.preparing.title")]}):V??f("capture.start")}),x?$("p",{className:"sekyro-text-muted",children:f("capture.preparing.hint")}):null]}),Ae("div",{ref:g,className:"sekyro-stack sekyro-stack--4","data-testid":"sekyro-intro","data-assets":e,children:[u!==!1?$(Qt,{tips:u}):null,p!==void 0?Ae(T,{kind:"ghost",className:"sekyro-btn--start",onClick:p.toggle,"data-testid":"sekyro-tips-listen",children:[$(me,{off:!1}),f(p.playing?"capture.tips.stop":"capture.tips.listen")]}):null,$(gn,{state:s}),o?$(mn,{value:r,onChange:i}):null,$(vn,{voice:c}),$("p",{className:"sekyro-text-muted",children:f("capture.securityNote")}),M,$("p",{role:"status",className:"sekyro-visually-hidden","data-testid":"sekyro-intro-status",children:e==="loading"?f("capture.preparing.title"):e==="ready"?f("capture.ready"):""})]})}n(bn,"PreCaptureScreen");function Vr(e){if(typeof document>"u")return!1;let t=document.activeElement;return t===null||t===document.body||e!==null&&e.contains(t)}n(Vr,"focusIsOurs");import{useId as _r}from"react";import{jsx as Ce,jsxs as Sn}from"react/jsx-runtime";function Vn({choice:e,busy:t,failed:s,focus:o,eidLabel:r,onSelect:i}){let c=N(),u=_r(),p=$e(),V=e.options.filter(m=>m!=="document_chip"&&(m!=="national_eid"||r!==void 0));return Sn("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":u,"data-testid":"sekyro-method",children:[Sn("div",{className:"sekyro-stack sekyro-stack--1",children:[Ce("h2",{id:u,className:"sekyro-text-body",children:c("method.title")}),Ce("p",{className:"sekyro-text-muted",children:c("method.description")})]}),s?Ce(D,{tone:"danger",children:Ce("span",{children:c("errors.network_error")})}):null,Ce("div",{className:"sekyro-stack sekyro-stack--3",children:V.map((m,b)=>Ce(T,{ref:b===0&&o?p:void 0,kind:b===0?"primary":"ghost",full:!0,disabled:t,"aria-busy":t||void 0,onClick:()=>i(m),children:m==="national_eid"?r:c(`method.${m}`)},m))})]})}n(Vn,"MethodScreen");import{hasMultipleCameras as Ir,subscribeCameraPermission as xr}from"@sekyro/web";import{useEffect as Rn,useState as _n}from"react";function In(){let[e,t]=_n({state:"unknown",settled:!1}),[s,o]=_n(!1);return Rn(()=>xr(r=>t({state:r,settled:!0})),[]),Rn(()=>{let r=!0;return Ir().then(i=>{r&&o(i)}),()=>{r=!1}},[]),{permission:e.state,permissionSettled:e.settled,canChooseFacing:s}}n(In,"useCameraStatus");import{useEffect as xn,useState as Ln}from"react";function wn(e){return Nn(e,"mobileRequired")}n(wn,"useMobileRequired");function En(e){return Nn(e,"returning").required}n(En,"useReturning");function Nn(e,t){let[s,o]=Ln({required:!1,settled:e===void 0});return xn(()=>{let r=e?.[t];if(e===void 0||typeof r!="function"){o({required:!1,settled:!0});return}let i=!0;return o({required:!1,settled:!1}),Promise.resolve().then(()=>r.call(e)).then(c=>{i&&o({required:c===!0,settled:!0})},()=>{i&&o({required:!1,settled:!0})}),()=>{i=!1}},[e,t]),s}n(Nn,"useFlag");function Mn(e){let[t,s]=Ln(!1);return xn(()=>{if(s(!1),e===void 0)return;let o=e.on("busy",()=>s(!0)),r=e.on("result",()=>s(!1));return()=>{o(),r()}},[e]),t}n(Mn,"useBusy");import{getLivenessAssetsStatus as Lr,preloadLivenessAssets as wr,subscribeLivenessAssets as Er}from"@sekyro/web";import{useCallback as dt,useEffect as An,useRef as Pn,useState as Nr,useSyncExternalStore as Mr}from"react";var Ar=n(()=>"idle","serverSnapshot");function Tn(e){return wr(e!==void 0?{assetBaseUrl:e}:{})}n(Tn,"preload");function Kn(e,t=!0){let s=Mr(dt(b=>Er(b,e),[e]),()=>Lr(e),Ar),[o,r]=Nr(null),i=Pn(!1),c=dt(()=>{Tn(e).then(b=>{i.current&&b==="idle"&&r({base:e})})},[e]);An(()=>(i.current=!0,c(),()=>{i.current=!1}),[c]);let u=Pn(null);An(()=>{if(s!=="idle"){u.current={base:e};return}!t||u.current===null||u.current.base!==e||(u.current=null,c())},[s,e,c,t]);let p=dt(()=>{Tn(e)},[e]);return{gate:o!==null&&o.base===e&&s==="idle"||s==="ready"?"ready":s==="failed"?"failed":"loading",retry:p}}n(Kn,"useLivenessAssets");import{createLivenessCapture as Pr}from"@sekyro/web";import{useCallback as pt,useEffect as Tr,useRef as Pe,useState as J}from"react";var On={progress:0,hint:null,faceDetected:!1};function Un(e){let{videoRef:t,assetBaseUrl:s}=e,r=Pe(e.verification).current,i=Pe(!1);e.verification!==r&&!i.current&&We()&&(i.current=!0,console.warn("[@sekyro/react] <LivenessCapture>: the `verification` prop changed identity after mount. The first instance stays bound (the camera is not rebuilt); create the verification once (useMemo / useState / outside render) instead of on every render."));let c=Pe(null),[u,p]=J("idle"),[V,m]=J(On),[b,f]=J(!1),[l,g]=J(!1),[h,C]=J(null),[R,y]=J(!1),[S,x]=J(null),[K,v]=J(null),[M,F]=J(null),O=Pe(null),a=Pe(e);a.current=e,Tr(()=>{let E=t.current;if(E===null)return;let oe={video:E,...s!==void 0?{assetBaseUrl:s}:{}},U=r!==void 0?r.liveness(oe):Pr(oe);c.current=U;let P=[U.on("state",k=>{k==="starting"&&(x(null),v(null),m(On),g(!1),f(!1),C(null),O.current=null),p(k),a.current.onStateChange?.(k)}),U.on("gate",k=>{let se=O.current;O.current=k.progress,f(se!==null&&k.progress<se-.001&&k.progress>0&&k.progress<1),k.progress>=1&&g(!0),m(k)}),U.on("frozen",({previewDataUrl:k})=>C(k)),U.on("profile",({animations:k})=>y(k==="reduced")),U.on("captured",k=>{x(k),F(null),a.current.onCaptured?.(k)}),U.on("error",k=>{v(k),a.current.onError?.(k)}),r?.on("result",k=>{F(k),a.current.onResult?.(k)})];return()=>{for(let k of P)k?.();c.current=null,U.destroy()}},[r,t,s]);let A=pt(E=>{c.current?.start(E)},[]),w=pt(()=>{c.current?.retry()},[]),H=pt(()=>{g(!1),f(!1),C(null),O.current=null,c.current?.switchCamera()},[]);return{state:u,gate:V,draining:b,gateLocked:l,frozenPreview:h,reduceMotion:R,artifacts:S,error:K,result:M,start:A,retry:w,switchCamera:H}}n(Un,"useLivenessHandle");import{useCallback as Kr,useEffect as Or,useState as Ze}from"react";var Ur=new Set(["national_number"]);function Gn(e){if(e==null||!e.available||e.selected!==null)return null;let t=e.options.filter(s=>Ur.has(s));return t.length>0?{...e,options:t}:null}n(Gn,"pending");function Hn(e){let[t,s]=Ze(null),[o,r]=Ze(e===void 0),[i,c]=Ze(!1),[u,p]=Ze(!1);Or(()=>{if(s(null),e===void 0){r(!0);return}let f=!0,l=e.methodChoice;typeof l=="function"?(r(!1),Promise.resolve().then(()=>l.call(e)).then(h=>{f&&s(Gn(h))},()=>{}).finally(()=>{f&&r(!0)})):r(!0);let g=e.on("method",h=>s(Gn(h)));return()=>{f=!1,g()}},[e]);let V=Kr(async f=>{if(e===void 0)return!1;c(!0),p(!1);try{return await e.selectMethod(f),s(null),!0}catch{return p(!0),!1}finally{c(!1)}},[e]),m=t!==null&&t.options.length===1?t.options[0]:null;return{choice:t,auto:m==="national_number"&&!u?m:null,settled:o,busy:i,failed:u,select:V}}n(Hn,"useMethodChoice");import{useEffect as Gr,useMemo as Hr,useState as Fr}from"react";var Br=["ar","fr","en"];function Dr(e){if(typeof e!="string")return!1;try{let t=new URL(e);return t.protocol==="https:"||t.protocol==="http:"&&/^(localhost|127\.0\.0\.1)$/.test(t.hostname)}catch{return!1}}n(Dr,"isClipUrl");function $r(e){let t=e.clips;if(typeof t!="object"||t===null)return null;let s={};for(let o of Br){let r=t[o];if(!(typeof r!="object"||r===null))for(let[i,c]of Object.entries(r))!ce(i)||!Dr(c)||((s[o]??(s[o]={}))[i]=c)}return Object.keys(s).length>0?s:null}n($r,"toVoiceClipMap");function Fn(e){let[t,s]=Fr(null);Gr(()=>{if(s(null),e===void 0)return;let r=!0,i=n(u=>{if(!r)return;let p=typeof u=="object"&&u!==null&&typeof u.setId=="string"?u:null;s(V=>V?.setId===p?.setId?V:p)},"take");try{typeof e.voiceClips=="function"&&Promise.resolve(e.voiceClips()).then(i,()=>i(null))}catch{i(null)}let c=e.on("view",u=>i(u.voice));return()=>{r=!1,c()}},[e]);let o=Hr(()=>t!==null?$r(t):null,[t]);return e===void 0?null:o}n(Fn,"useServerVoiceClips");import{jsx as Bn}from"react/jsx-runtime";function Dn({voice:e}){let t=N();return Bn(T,{kind:"chip","aria-pressed":e.enabled,"aria-label":t("capture.voiceGuidance"),"data-testid":"sekyro-voice-toggle",onClick:()=>e.toggle(),children:Bn(me,{off:!e.enabled,className:"sekyro-icon"})})}n(Dn,"VoiceChip");import{Fragment as Jr,jsx as I,jsxs as Te}from"react/jsx-runtime";var Wr=800;function zr(e){return e===void 0||e!==!1&&e.length===qe.length&&qe.every(t=>e.includes(t))}n(zr,"isDefaultTips");function Yr(e){if(e.type==="keydown"&&e.key==="Escape")return!1;let t=globalThis.navigator?.userActivation;return t===void 0?!(e.type==="pointerup"&&e.pointerType==="touch"):t.isActive}n(Yr,"carriesActivation");function Zr(e){return typeof e=="object"&&e!==null&&!qr(e)&&"tone"in e&&"text"in e}n(Zr,"isNoticeObject");function Xr(e){return e==="starting"||e==="gating"||e==="recording"}n(Xr,"isCapturing");function Qr(e){return e==="captured"||e==="uploading"||e==="checking"}n(Qr,"isPostCapture");function _i({verification:e,locale:t,dir:s,strings:o,slots:r,autoStart:i=!1,notice:c,startDisabled:u=!1,startLabel:p,tips:V,tipsSummary:m,coach:b,defaultFacing:f,voice:l,onGuidance:g,onCaptured:h,onResult:C,onError:R,onStateChange:y,assetBaseUrl:S,className:x}){let K=be(()=>Ht(t,o),[t,o]),v=be(()=>L=>K[L]??"",[K]),M=s??(t==="ar"?"rtl":"ltr"),F=de(null),O=jr(yn),a=Un({verification:e,videoRef:F,assetBaseUrl:S,onCaptured:h,onResult:C,onError:R,onStateChange:y}),A=Kn(S,a.state==="idle"&&a.error===null),w=Hn(e),H=w.choice!==null,E=wn(e),oe=En(e),U=Mn(e),P=In(),k=l!==!1&&l?.clips===void 0,se=Fn(k?e:void 0),d=at({locale:t,defaultClips:se,options:l}),[q,ee]=$n(f??"user"),Ke=de(null),Oe=de(!1),ft=de(d.unlock);ft.current=d.unlock,ue(()=>{let L=Ke.current;if(L===null)return;let ae=["pointerup","touchend","click","keydown"],ne=n(()=>{for(let Ie of ae)L.removeEventListener(Ie,ye,!0)},"disarm");function ye(Ie){if(Oe.current){ne();return}Yr(Ie)&&(Oe.current=!0,ne(),ft.current())}n(ye,"onGesture");for(let Ie of ae)L.addEventListener(Ie,ye,{capture:!0,passive:!0});return ne},[]);let yt=Xe(()=>{Oe.current||(Oe.current=!0,d.unlock()),a.start({facing:q})},[d.unlock,a.start,q]),mt=Xe(()=>a.start({facing:q}),[a.start,q]),Ue=de(!1),Se=a.state==="idle"&&a.error===null,gt=!H&&!E.required&&(i===!0||i==="when-permitted"&&P.permission==="granted"),ht=gt&&w.settled&&E.settled,qn=i==="when-permitted"&&!P.permissionSettled&&!Ue.current,vt=gt&&Se&&!Ue.current,Qe=(qn||vt)&&A.gate==="ready"?"loading":A.gate;ue(()=>{!ht||!Se||A.gate!=="ready"||Ue.current||(Ue.current=!0,mt())},[ht,Se,A.gate,mt]);let jn=Se&&!H&&!E.required&&!(vt&&A.gate==="ready"),Wn=Xe(()=>{ee(L=>L==="user"?"environment":"user"),a.switchCamera()},[a.switchCamera]),Ge=be(()=>a.artifacts!==null&&typeof URL.createObjectURL=="function"?URL.createObjectURL(a.artifacts.keyframe):null,[a.artifacts]);ue(()=>{if(Ge!==null)return()=>URL.revokeObjectURL(Ge)},[Ge]);let kt=a.frozenPreview??Ge,pe=e!==void 0,B=Xr(a.state),te=Qr(a.state),He=B||te,j=a.result,Ct=a.state==="done"&&j!==null,bt=a.state==="recording"&&a.frozenPreview!==null,Je=O!==null,Ve=te||bt,St=te?"checking":bt?"frozen":a.state==="recording"?"recording":a.gateLocked||a.gate.progress>=1?"locked":a.gate.faceDetected?"aligning":"seeking",Fe=B?a.gate.hint:null,Be=a.state==="starting"?"capture.preparing.title":Fe===null?null:Fe==="center"&&!a.gate.faceDetected?"fcv3.no_face":Tt(Fe),[zn,Vt]=$n(null);ue(()=>{if(Be!=="fcv3.no_face"){Vt(Be);return}if(!B)return;let L=setTimeout(()=>Vt(Be),Wr);return()=>clearTimeout(L)},[Be,B]);let et=B&&typeof b=="string"&&b!=="",ie=B&&!et?zn:null,tt=et?b:ie===null?"":v(ie);ct(d,ie,tt,B);let Rt=de(g);Rt.current=g,ue(()=>{if(ce(ie))try{Rt.current?.(ie)}catch(L){console.error("[@sekyro/react] onGuidance threw:",L)}},[ie]);let Re=be(()=>({supported:d.supported,enabled:d.enabled,setEnabled:d.setEnabled,toggle:d.toggle}),[d.supported,d.enabled,d.setEnabled,d.toggle]),nt=r?.voicePrompt,_t=nt!==void 0,It=l===void 0,xt=de(!1);ue(()=>{!_t||!It||xt.current||!We()||(xt.current=!0,console.warn("[@sekyro/react] <LivenessCapture>: `slots.voicePrompt` is set and `voice` is undefined, so the component speaks the guidance itself. If your slot plays audio, pass voice={false} or the person hears every hint twice; pass voice={{}} to keep the built-in voice and silence this warning."))},[_t,It]);let Yn=nt!==void 0?(L,ae,ne)=>nt(L,ae,ne,Re):d.supported?()=>I(Dn,{voice:Re}):void 0,{summary:rt,summaryPlaying:Lt,toggleSummary:wt,stopSummary:Et}=d,De=m!==void 0&&m!=="",Nt=De?m:v("capture.tips.summary"),Mt=De?rt!=="none":rt==="partner"||rt==="default"&&zr(V),At=be(()=>Mt?{playing:Lt,toggle:n(()=>wt(Nt,{clip:!De}),"toggle"),stop:Et}:void 0,[Mt,Lt,wt,Nt,Et,De]),Zn=be(()=>({assets:Qe,retryAssets:A.retry,permission:P.permission,facing:q,setFacing:ee,canChooseFacing:P.canChooseFacing,voice:Re}),[Qe,A.retry,P.permission,P.canChooseFacing,q,Re]),Xn=Zr(c)?I(D,{tone:c.tone,testId:"sekyro-host-notice",children:I("span",{children:c.text})}):c??null,X=j!==null&&j.status==="retry"?j:null,Q=Ct&&j.status==="unavailable"&&!H&&j.reason!=="portrait_required"?j:null,_e=Ct&&(j.status==="approved"||j.status==="rejected"||j.status==="review")?j:null,fe=n((L,ae)=>{if(L===void 0)return null;if(L==="device_cooldown"){let ye=Ut(t,ae);if(ye!==null)return v(ye.key).replace("{time}",ye.time)}let ne=Ot(L);return ne===null?null:v(ne)},"reasonText"),Qn=Q!==null&&Q.reason!==void 0&&Q.reason!=="nni_unbound"&&Q.reason!=="method_required"&&Q.reason!=="mobile_required"&&!(Q.reason==="no_recorder"&&a.artifacts?.degraded==="NO_RECORDER"),Pt=$e(),Jn=H&&w.auto===null&&!B&&!te&&a.error===null,ot=Xe(async L=>{await w.select(L)&&a.state==="done"&&a.retry()},[w.select,a.state,a.retry]);return ue(()=>{w.auto!==null&&!w.busy&&!B&&!te&&ot(w.auto)},[w.auto,w.busy,B,te,ot]),I(Ft,{value:v,children:Te("div",{ref:Ke,className:x===void 0?"sekyro-capture":`sekyro-capture ${x}`,dir:M,lang:t,"data-testid":"sekyro-liveness-capture","data-state":a.state,children:[r?.header,X!==null&&fe(X.reason)!==null&&!(Je&&He)?I(D,{tone:"warning",role:"status",testId:"sekyro-retry-notice",children:I("span",{children:fe(X.reason)})}):null,U&&te&&!Je?I(D,{tone:"info",role:"status",testId:"sekyro-busy-notice",children:I("span",{children:v("capture.busy")})}):null,E.required&&Se?I(D,{tone:"info",role:"status",testId:"sekyro-mobile-required",children:I("span",{children:v("reasons.mobile_required")})}):null,a.error!==null?r?.errorPanel!==void 0?r.errorPanel(a.error,a.retry):Te(D,{tone:"danger",testId:"sekyro-error-notice",children:[I("span",{children:v(Kt(a.error.kind))}),a.error.retryable?I(T,{ref:Pt,kind:"ghost",className:"sekyro-btn--start",onClick:a.retry,children:v("common.retry")}):null]}):null,Q!==null?Te(D,{tone:"danger",testId:"sekyro-unavailable-notice",children:[I("span",{children:fe(Q.reason)??v(Q.reason===void 0?"errors.session_expired":"errors.network_error")}),Qn?I(T,{ref:Pt,kind:"ghost",className:"sekyro-btn--start",onClick:a.retry,children:v("capture.recordAgain")}):null]}):null,_e!==null&&fe(_e.reason)!==null?I(D,{tone:_e.status==="rejected"?"danger":"info",testId:"sekyro-result-notice",children:I("span",{children:fe(_e.reason,_e.retryAfter)})}):null,I("div",{className:He?void 0:"sekyro-hidden","data-capture-live":He?"":void 0,children:Je?O({videoRef:F,guidance:Ve&&pe?v("capture.checking"):tt,coached:et&&!(Ve&&pe),note:Ve?pe?v(U?"capture.busy":"capture.checkingHint"):null:X!==null?fe(X.reason):null,settled:Ve&&pe,progress:a.gate.progress,phase:St,still:Ve?kt:null,live:He}):I(pn,{videoRef:F,guidanceText:tt,guidanceHint:Fe,guidanceKey:ie,progress:a.gate.progress,phase:St,draining:a.draining,stillUrl:kt,showChecking:pe,onSwitchCamera:Wn,canSwitchCamera:B&&a.state!=="recording",voicePrompt:Yn,overlay:r?.stageOverlay,reduceMotion:a.reduceMotion})}),Jn&&w.choice!==null?I(Vn,{choice:w.choice,busy:w.busy,failed:w.failed,focus:a.state==="done",onSelect:L=>{ot(L)}}):null,jn?Te(Jr,{children:[oe&&r?.header===void 0?Te("div",{className:"sekyro-stack sekyro-stack--1",children:[I("h2",{className:"sekyro-text-body",children:v("returning.title")}),I("p",{className:"sekyro-text-muted",children:v("returning.description")})]}):null,Xn,r?.intro!==void 0?r.intro(yt,Zn):I(bn,{assets:Qe,onRetryAssets:A.retry,permission:P.permission,canChooseFacing:P.canChooseFacing,facing:q,onFacingChange:ee,voice:Re,tips:V??qe,...At!==void 0?{summary:At}:{},...p!==void 0?{startLabel:p}:{},startDisabled:u,onStart:yt})]}):null,I(fn,{showCoaching:X!==null,attemptsText:X?.attemptsRemaining!==void 0?Gt(K,t,X.attemptsRemaining):null,showRetake:X!==null&&!B&&!te||!pe&&a.state==="captured",onRetake:a.retry}),r?.footer]})})}n(_i,"LivenessCapture");export{yn as a,qe as b,Vn as c,je as d,Wr as e,_i as f};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{g as p}from"./chunk-BJJZ4MO5.js";import{a as t}from"./chunk-Q232JYNO.js";import{a as k,b as f}from"./chunk-63NUMQST.js";import{a as n,b as l}from"./chunk-4RUZQW5T.js";import{useId as y}from"react";import{Fragment as g,jsx as e,jsxs as s}from"react/jsx-runtime";function d(){let r=`sekyro-face-light-${y().replace(/[^A-Za-z0-9_-]/g,"")}`;return s("svg",{className:"sekyro-mark sekyro-mark--face",viewBox:"0 0 168 206","aria-hidden":"true",focusable:"false",children:[e("defs",{children:e("mask",{id:r,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(#${r})`})]})}n(d,"FaceMark");var u={glasses:"jGlasses",lighting:"light",faceCamera:"camera"};function x({start:r,context:o,tips:c,tipsTitle:m}){let{t:a}=p();return s("section",{className:"sekyro-step",children:[e(d,{}),e(k,{title:a("native.face.introTitle"),lead:a("native.face.introLead")}),m!==void 0?e("p",{className:"sekyro-section-label",children:m}):null,e("ul",{className:"sekyro-tiprows",children:c!==void 0?c.map(i=>s("li",{children:[e(t,{name:u[i.id]??"face"}),i.text]},i.id)):s(g,{children:[s("li",{children:[e(t,{name:"light"}),a("capture.tips.light")]}),s("li",{children:[e(t,{name:"jGlasses"}),a("capture.tips.uncover")]}),s("li",{children:[e(t,{name:"smartphone"}),a("capture.tips.eyeLevel")]})]})}),o.assets==="failed"?e(l,{kind:"ghost",onClick:o.retryAssets,children:a("common.refresh")}):null,e(f,{children:s(l,{full:!0,disabled:o.assets!=="ready","aria-busy":o.assets==="loading"||void 0,onClick:r,children:[e(t,{name:"camera"}),a("capture.start")]})})]})}n(x,"FaceIntro");export{x as a};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{a as i}from"./chunk-4RUZQW5T.js";import{HostedApiError as o,InvalidInputError as r,OtpInputError as a}from"@sekyro/web";function f(n,t){if(n instanceof r)return n.field==="phone"?"otp.phoneInvalid":n.field==="code"?"otp.codeInvalid":n.kind==="check_digit"?"population.reason_nni_invalid":"population.invalid";if(n instanceof a&&n.field==="channel")return"otp.reason_otp_channel_unavailable";if(n instanceof o){let e=`errors.${n.code}`;if(Object.hasOwn(t,e))return e}return"errors.network_error"}i(f,"errorKey");export{f as a};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{a as o}from"./chunk-4RUZQW5T.js";var e={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 C}from"react/jsx-runtime";function a({name:t,className:r}){return C("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:e[t]}})}o(a,"Icon");export{a};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ var e={"eid.identifierTitle":"التحقق عبر {provider}","eid.identifierTitleGeneric":"التحقق عبر هويتك الرقمية الوطنية","eid.identifierDescription":"أدخل رقمك الوطني. سيعرض لك تطبيق {provider} رمزًا.","eid.identifierDescriptionGeneric":"أدخل رقمك الوطني. سيعرض لك تطبيق الهوية الرقمية رمزًا.","eid.boundDescription":"سيعرض لك تطبيق {provider} رمزًا.","eid.boundDescriptionGeneric":"سيعرض لك تطبيق الهوية الرقمية رمزًا.","eid.start":"احصل على رمزي","eid.codeTitle":"أدخل رمز {provider}","eid.codeTitleGeneric":"أدخل الرمز من تطبيق الهوية الرقمية","eid.codeHelp":"افتح تطبيق {provider} لرؤية رمزك","eid.codeHelpGeneric":"افتح تطبيق الهوية الرقمية الوطنية لرؤية رمزك","eid.codeLabel":"الرمز","eid.verify":"تحقّق من الرمز","eid.resend":"احصل على رمز جديد","eid.resendIn":"رمز جديد خلال {seconds} ثانية","eid.noResendsLeft":"لم يعد بإمكانك طلب رمز جديد","eid.expiresIn":"ينتهي الرمز خلال {time}","eid.expired":"انتهت صلاحية الرمز — اطلب رمزًا جديدًا","eid.useCamera":"التحقق بالكاميرا بدلًا من ذلك","reasons.eid_identifier_invalid":"تحقّق من رقمك الوطني وأعد إدخاله","reasons.eid_code_invalid":"الرمز غير صحيح — تحقّق منه وأعد إدخاله","reasons.eid_code_expired":"انتهت صلاحية رمزك — اطلب رمزًا جديدًا للمتابعة","reasons.eid_locked":"أُدخلت رموز غير صحيحة عدة مرات — تم قفل الدخول بالهوية الرقمية لهذا التحقق","reasons.eid_not_enrolled":"هذا الرقم الوطني غير مفعّل للدخول بالهوية الرقمية","reasons.eid_unavailable":"الدخول بالهوية الرقمية غير متاح حاليًا — أعد المحاولة بعد قليل","reasons.eid_resend_too_soon":"انتظر قليلًا قبل طلب رمز جديد","reasons.eid_resend_limit":"لا يمكنك طلب رموز أخرى — أدخل آخر رمز وصلك","eid.continueHint":"بعد {provider}، ستلتقط صورة حية سريعة.","eid.continueHintGeneric":"بعد الهوية الرقمية الوطنية، ستلتقط صورة حية سريعة.","eid.resendsRemaining.zero":"لا يمكنك طلب رمز جديد","eid.resendsRemaining.one":"يمكنك طلب رمز جديد واحد","eid.resendsRemaining.two":"يمكنك طلب رمزين جديدين","eid.resendsRemaining.few":"يمكنك طلب {count} رموز جديدة","eid.resendsRemaining.many":"يمكنك طلب {count} رمزًا جديدًا","eid.resendsRemaining.other":"يمكنك طلب {count} رمز جديد","eid.codeAttemptsRemaining.zero":"لم تتبقَّ أي محاولة","eid.codeAttemptsRemaining.one":"تبقّت محاولة واحدة","eid.codeAttemptsRemaining.two":"تبقّت محاولتان","eid.codeAttemptsRemaining.few":"تبقّت {count} محاولات","eid.codeAttemptsRemaining.many":"تبقّت {count} محاولة","eid.codeAttemptsRemaining.other":"تبقّت {count} محاولة"};var n={"eid.identifierTitle":"Verify with {provider}","eid.identifierTitleGeneric":"Verify with your national eID","eid.identifierDescription":"Enter your national number. {provider} will show you a code in its app.","eid.identifierDescriptionGeneric":"Enter your national number. Your national eID app will show you a code.","eid.boundDescription":"{provider} will show you a code in its app.","eid.boundDescriptionGeneric":"Your national eID app will show you a code.","eid.start":"Get my code","eid.codeTitle":"Enter your {provider} code","eid.codeTitleGeneric":"Enter the code from your eID app","eid.codeHelp":"Open the {provider} app to see your code","eid.codeHelpGeneric":"Open your national eID app to see your code","eid.codeLabel":"Code","eid.verify":"Verify code","eid.resend":"Get a new code","eid.resendIn":"Get a new code in {seconds}s","eid.noResendsLeft":"You can't get more codes","eid.expiresIn":"Code expires in {time}","eid.expired":"This code has expired — get a new code","eid.useCamera":"Verify with my camera instead","reasons.eid_identifier_invalid":"Check your national number and enter it again","reasons.eid_code_invalid":"That code is incorrect — check it and enter it again","reasons.eid_code_expired":"Your code has expired — get a new code to continue","reasons.eid_locked":"Too many incorrect codes — eID sign-in is locked for this verification","reasons.eid_not_enrolled":"This national number isn't set up for eID sign-in","reasons.eid_unavailable":"eID sign-in isn't available right now — try again in a moment","reasons.eid_resend_too_soon":"Wait a moment before asking for a new code","reasons.eid_resend_limit":"You can't get more codes — enter the last code you received","eid.continueHint":"After {provider}, you'll take a quick live photo.","eid.continueHintGeneric":"After your national eID, you'll take a quick live photo.","eid.resendsRemaining.one":"{count} new code left","eid.resendsRemaining.other":"{count} new codes left","eid.codeAttemptsRemaining.one":"{count} try left","eid.codeAttemptsRemaining.other":"{count} tries left"};var d={"eid.identifierTitle":"Vérifier avec {provider}","eid.identifierTitleGeneric":"Vérifier avec votre eID national","eid.identifierDescription":"Saisissez votre numéro national. {provider} vous affichera un code dans son application.","eid.identifierDescriptionGeneric":"Saisissez votre numéro national. Votre application eID vous affichera un code.","eid.boundDescription":"{provider} vous affichera un code dans son application.","eid.boundDescriptionGeneric":"Votre application eID vous affichera un code.","eid.start":"Recevoir mon code","eid.codeTitle":"Saisissez votre code {provider}","eid.codeTitleGeneric":"Saisissez le code de votre application eID","eid.codeHelp":"Ouvrez l'application {provider} pour voir votre code","eid.codeHelpGeneric":"Ouvrez votre application eID nationale pour voir votre code","eid.codeLabel":"Code","eid.verify":"Vérifier le code","eid.resend":"Recevoir un nouveau code","eid.resendIn":"Nouveau code dans {seconds} s","eid.noResendsLeft":"Vous ne pouvez plus demander de nouveau code","eid.expiresIn":"Le code expire dans {time}","eid.expired":"Ce code a expiré — demandez un nouveau code","eid.useCamera":"Vérifier plutôt avec ma caméra","reasons.eid_identifier_invalid":"Vérifiez votre numéro national et saisissez-le à nouveau","reasons.eid_code_invalid":"Ce code est incorrect — vérifiez-le et saisissez-le à nouveau","reasons.eid_code_expired":"Votre code a expiré — demandez un nouveau code pour continuer","reasons.eid_locked":"Trop de codes incorrects — la connexion eID est bloquée pour cette vérification","reasons.eid_not_enrolled":"Ce numéro national n'est pas activé pour la connexion eID","reasons.eid_unavailable":"La connexion eID n'est pas disponible pour le moment — réessayez dans un instant","reasons.eid_resend_too_soon":"Patientez un instant avant de demander un nouveau code","reasons.eid_resend_limit":"Vous ne pouvez plus demander de code — saisissez le dernier code reçu","eid.continueHint":"Après {provider}, vous prendrez une photo rapide en direct.","eid.continueHintGeneric":"Après votre eID nationale, vous prendrez une photo rapide en direct.","eid.resendsRemaining.one":"{count} nouveau code possible","eid.resendsRemaining.other":"{count} nouveaux codes possibles","eid.codeAttemptsRemaining.one":"{count} essai restant","eid.codeAttemptsRemaining.other":"{count} essais restants"};export{e as a,n as b,d as c};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{d as me}from"./chunk-BJJZ4MO5.js";import"./chunk-65JA6YKG.js";import{a as A}from"./chunk-Q232JYNO.js";import{a as pe,b as he,e as fe,f as ve}from"./chunk-63NUMQST.js";import{a as Se,b as X}from"./chunk-BENNJ4GV.js";import{a as h,b as G,h as de}from"./chunk-4RUZQW5T.js";import{useEffect as R,useLayoutEffect as Ue,useRef as Q,useState as g}from"react";var ge={image:'<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"/><path d="M14 8A2 2 0 1 0 18 8A2 2 0 1 0 14 8Z" stroke="currentColor"/><path d="M2 12.5L3.75 10.97C4.66 10.17 6.04 10.22 6.89 11.07L11.18 15.36C11.87 16.05 12.95 16.14 13.75 15.58L14.04 15.37C15.19 14.57 16.74 14.66 17.78 15.6L21 18.5" stroke="currentColor" stroke-linecap="round"/>',flashlight:'<path d="M9 11.66V19C9 19.93 9 20.4 9.15 20.77C9.36 21.26 9.74 21.64 10.23 21.85C10.6 22 11.07 22 12 22C12.93 22 13.4 22 13.77 21.85C14.26 21.64 14.64 21.26 14.85 20.77C15 20.4 15 19.93 15 19V11.66C15 10.84 15 10.43 15.15 10.06C15.3 9.7 15.59 9.41 16.17 8.83L16.17 8.83L19.41 5.59C19.7 5.3 19.85 5.15 19.92 4.97C20 4.78 20 4.58 20 4.17V4C20 3.06 20 2.59 19.71 2.29C19.41 2 18.94 2 18 2H6C5.06 2 4.59 2 4.29 2.29C4 2.59 4 3.06 4 4V4.17C4 4.58 4 4.78 4.08 4.97C4.15 5.15 4.3 5.3 4.59 5.59L7.83 8.83C8.41 9.41 8.7 9.7 8.85 10.06C9 10.43 9 10.84 9 11.66Z" stroke="currentColor" stroke-linecap="round"/><path d="M15 10H9" stroke="currentColor" stroke-linecap="round"/><path d="M12 13V15" stroke="currentColor" stroke-linecap="round"/><path d="M4.5 5H19.5" stroke="currentColor" stroke-linecap="round"/>'};var ye={"dcv3.mrz.searching":"ضع صفحة جواز السفر كاملة داخل الإطار","dcv3.mrz.showMrzSide":"اعرض الوجه الذي يحتوي على سطرين أو ثلاثة أسطر من الحروف","dcv3.mrz.reading":"جارٍ قراءة الوثيقة… ثبّتها","dcv3.mrz.moveCloser":"اقترب حتى تملأ أسطر الحروف الإطار","dcv3.mrz.turnSideways":"أدر هاتفك أفقيًا لقراءة أسطر الحروف","dcv3.mrz.glare":"أمِل الوثيقة لإزالة الانعكاس","dcv3.mrz.holdStill":"لا تتحرك","dcv3.mrz.valid":"تمت قراءة الوثيقة — جارٍ التقاط الصورة","dcv3.mrz.looksLikePassport":"يبدو أن هذا جواز سفر","dcv3.mrz.looksLikeCard":"يبدو أن هذه بطاقة تعريف أو بطاقة إقامة"};var ke={"dcv3.mrz.searching":"Fit the whole passport page in the frame","dcv3.mrz.showMrzSide":"Show the side with the two or three lines of characters","dcv3.mrz.reading":"Reading the document… hold it steady","dcv3.mrz.moveCloser":"Move closer so the lines of characters fill the frame","dcv3.mrz.turnSideways":"Turn your phone sideways to read the lines of characters","dcv3.mrz.glare":"Tilt the document to remove the reflection","dcv3.mrz.holdStill":"Hold still","dcv3.mrz.valid":"Document read — taking the photo","dcv3.mrz.looksLikePassport":"This looks like a passport","dcv3.mrz.looksLikeCard":"This looks like an identity card or residence permit"};var we={"dcv3.mrz.searching":"Cadrez toute la page du passeport","dcv3.mrz.showMrzSide":"Montrez la face avec les deux ou trois lignes de caractères","dcv3.mrz.reading":"Lecture du document… tenez-le immobile","dcv3.mrz.moveCloser":"Rapprochez-vous pour que les lignes de caractères remplissent le cadre","dcv3.mrz.turnSideways":"Tournez votre téléphone à l’horizontale pour lire les lignes de caractères","dcv3.mrz.glare":"Inclinez le document pour supprimer le reflet","dcv3.mrz.holdStill":"Ne bougez plus","dcv3.mrz.valid":"Document lu — prise de la photo","dcv3.mrz.looksLikePassport":"Ceci ressemble à un passeport","dcv3.mrz.looksLikeCard":"Ceci ressemble à une carte d’identité ou un titre de séjour"};var be={"native.doc.introTitle":"سنلتقط صورة لوثيقتك","native.doc.introLead":"ستُفتح كاميرا هاتفك، وتُلتقط الصورة تلقائيًا بمجرد أن تكون الوثيقة داخل الإطار.","native.doc.tip.flat":"ضع الوثيقة مسطحة على سطح داكن.","native.doc.tip.glare":"تجنّب انعكاسات المصابيح أو الشمس.","native.doc.tip.frame":"أبقِ الوثيقة كاملة داخل الإطار.","native.doc.openCamera":"افتح الكاميرا","native.doc.changeDocument":"تغيير الوثيقة","native.scan.closer":"اقترب قليلًا","native.scan.farther":"ابتعد قليلًا","native.scan.glare":"أمِل البطاقة قليلًا","native.scan.dark":"الإضاءة ضعيفة. شغّل المصباح.","native.scan.blurry":"الصورة غير واضحة. ثبّت الهاتف.","native.scan.holdStill":"لا تتحرك","native.scan.reading":"جارٍ التحقق من وثيقتك…","native.scan.putDown":"يمكنك وضع وثيقتك جانبًا.","native.scan.retry":"لنحاول مرة أخرى"};var Ce={"native.doc.introTitle":"We'll photograph your document","native.doc.introLead":"Your phone's camera will open. The photo is taken by itself as soon as the document is well framed.","native.doc.tip.flat":"Lay the document flat on a dark surface.","native.doc.tip.glare":"Avoid glare from lamps or sunlight.","native.doc.tip.frame":"Keep the whole document in the frame.","native.doc.openCamera":"Open the camera","native.doc.changeDocument":"Change document","native.scan.closer":"Move a little closer","native.scan.farther":"Move back a little","native.scan.glare":"Tilt the card a little","native.scan.dark":"Too dark. Turn on the light.","native.scan.blurry":"Blurry image. Hold the phone still.","native.scan.holdStill":"Hold still","native.scan.reading":"Checking your document…","native.scan.putDown":"You can put your document down.","native.scan.retry":"Let's try that again"};var ze={"native.doc.introTitle":"Nous allons photographier votre pièce","native.doc.introLead":"La caméra de votre téléphone va s'ouvrir. La photo est prise automatiquement dès que la pièce est bien cadrée.","native.doc.tip.flat":"Posez la pièce à plat, sur une surface sombre.","native.doc.tip.glare":"Évitez les reflets de lampe ou de soleil.","native.doc.tip.frame":"Gardez toute la pièce dans le cadre.","native.doc.openCamera":"Ouvrir la caméra","native.doc.changeDocument":"Changer de document","native.scan.closer":"Approchez un peu","native.scan.farther":"Reculez un peu","native.scan.glare":"Inclinez un peu la carte","native.scan.dark":"Trop sombre. Allumez la lampe.","native.scan.blurry":"Image floue. Tenez le téléphone immobile.","native.scan.holdStill":"Ne bougez plus","native.scan.reading":"Vérification de votre document…","native.scan.putDown":"Vous pouvez poser votre pièce.","native.scan.retry":"Réessayons"};var Be=["locking","capturing"],W=class W{constructor(){this.shown={hint:null,locking:!1,card:null,manualShutter:!1};this.candidate=null;this.candidateSince=0;this.hintShownAt=0;this.lockLostAt=null;this.detectedSince=null;this.lostSince=null;this.shutterSince=null}present(e,r){return this.presentHint(e,r),this.presentLock(e,r),this.presentCard(e,r),this.shutterSince=e.manualShutter?this.shutterSince??r:null,this.shown={...this.shown,manualShutter:this.shutterSince!==null&&r-this.shutterSince>=1e3},this.shown}presentHint(e,r){let a=e.phase==="framing"&&!(e.hint==="blurry"&&e.card===null)?e.hint:null;if(e.phase!=="framing"){this.shown={...this.shown,hint:null},this.candidate=null;return}if(a!==this.candidate&&(this.candidate=a,this.candidateSince=r),a===this.shown.hint)return;let s=r-this.candidateSince>=(a===null?0:350),u=this.shown.hint===null||r-this.hintShownAt>=1200;s&&u&&(this.shown={...this.shown,hint:a},this.hintShownAt=r)}presentLock(e,r){if(Be.includes(e.phase)){this.shown={...this.shown,locking:!0},this.lockLostAt=null;return}if(this.shown.locking){if(e.phase!=="framing"){this.shown={...this.shown,locking:!1},this.lockLostAt=null;return}this.lockLostAt??(this.lockLostAt=r),r-this.lockLostAt>=300&&(this.shown={...this.shown,locking:!1},this.lockLostAt=null)}}presentCard(e,r){let a=e.card;if(a===null||e.phase!=="framing"){if(e.phase!=="framing"){this.shown={...this.shown,card:null},this.detectedSince=null,this.lostSince=null;return}this.detectedSince=null,this.lostSince??(this.lostSince=r),r-this.lostSince>=300&&(this.shown={...this.shown,card:null});return}if(this.lostSince=null,this.detectedSince??(this.detectedSince=r),r-this.detectedSince<250)return;let s=this.shown.card;if(s===null){this.shown={...this.shown,card:{...a}};return}let u=.35;this.shown={...this.shown,card:{fill:s.fill+(a.fill-s.fill)*u,offsetX:s.offsetX+(a.offsetX-s.offsetX)*u,offsetY:s.offsetY+(a.offsetY-s.offsetY)*u}}}};h(W,"ScanPresenter");var P=W;import{Fragment as at,jsx as t,jsxs as m}from"react/jsx-runtime";var Fe={en:Ce,fr:ze,ar:be},Ge=450,De=h(n=>e=>me(n.strings[e]??Fe[n.locale][e]??""),"useScanCopy");function Ne({name:n}){return t("svg",{className:"sekyro-glyph",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:ge[n]}})}h(Ne,"ScanGlyph");var Xe={en:ke,fr:we,ar:ye};function We(n,e){return n===null||n.state==="fallback"||n.state==="mismatch"?null:n.state==="searching"?e?"dcv3.mrz.searching":"dcv3.mrz.showMrzSide":n.state==="valid"?"dcv3.mrz.valid":n.coach!==void 0?`dcv3.mrz.${n.coach}`:"dcv3.mrz.reading"}h(We,"mrzInstruction");function Me(n){return n.reason==="unreadable"?"doc.reason_unreadable":n.reason!==void 0&&n.reason!=="side_missing"?de(n.reason):null}h(Me,"reasonOf");function xt({step:n,i18n:e,liveMrz:r,...a}){let[s,u]=g(!1);return s?t(et,{step:n,i18n:e,...r!==void 0?{liveMrz:r}:{},onClose:()=>u(!1)}):t(qe,{step:n,i18n:e,onOpen:()=>u(!0),...a})}h(xt,"DocumentCaptureView");function Qe({passport:n}){let r=Math.round(228/(n?1.42:1.586));return m("svg",{className:"sekyro-mark sekyro-mark--card",viewBox:`-12 -12 252 ${r+24}`,"aria-hidden":"true",focusable:"false",children:[t("defs",{children:t("clipPath",{id:"sekyro-card-clip",children:t("rect",{width:228,height:r,rx:"12.5"})})}),t("rect",{className:"sekyro-mark__card",width:228,height:r,rx:"12.5"}),t("rect",{className:"sekyro-mark__photo",x:"17",y:"17",width:"55",height:r*.52,rx:"6"}),[0,1,2].map(a=>t("rect",{className:"sekyro-mark__text",x:"88",y:23+a*r*.12,width:100-a*20,height:"6",rx:"3"},a)),[0,1].map(a=>t("rect",{className:"sekyro-mark__text",x:"17",y:r*.74+a*9,width:194,height:"4",rx:"2"},a)),t("g",{clipPath:"url(#sekyro-card-clip)",children:t("g",{className:"sekyro-mark__read",style:{"--sekyro-read-w":"228px"},children:t("rect",{x:"-1",width:"2",height:r,className:"sekyro-mark__beam"})})}),t("path",{className:"sekyro-mark__brackets",d:Ze(-10,-10,248,r+20,16,30)})]})}h(Qe,"ScanMark");function Ze(n,e,r,a,s,u){let w=Math.min(s,u*.6);return[[n,e,1,1],[n+r,e,-1,1],[n,e+a,1,-1],[n+r,e+a,-1,-1]].map(([C,_,f,E])=>`M${C} ${_+E*u}V${_+E*w}Q${C} ${_} ${C+f*w} ${_}H${C+f*u}`).join("")}h(Ze,"brackets");function qe({step:n,i18n:e,onOpen:r,onChangeCountry:a,onChangeDocument:s}){let u=De(e),w=n.documentType==="passport",y=Me(n);return m("section",{className:"sekyro-step","data-testid":"sekyro-document",children:[t(Qe,{passport:w}),t(pe,{title:u("native.doc.introTitle"),lead:u("native.doc.introLead")}),y!==null?m(Se,{tone:"warning",children:[t("span",{children:e.t(y)}),t("span",{children:X(e,n.attemptsRemaining,n.attemptsExhausted)})]}):null,m("ul",{className:"sekyro-tiprows",children:[m("li",{children:[t(A,{name:w?"passport":"card"}),u("native.doc.tip.flat")]}),m("li",{children:[t(A,{name:"light"}),u("native.doc.tip.glare")]}),m("li",{children:[t(Ne,{name:"image"}),u("native.doc.tip.frame")]})]}),s!==void 0||a!==void 0?m("div",{className:"sekyro-links",children:[s!==void 0?t("button",{type:"button",className:"sekyro-link",onClick:s,children:u("native.doc.changeDocument")}):null,a!==void 0?t("button",{type:"button",className:"sekyro-link",onClick:a,children:e.t("native.doc.changeCountry")}):null]}):null,t(he,{children:m(G,{full:!0,onClick:r,children:[t(A,{name:"camera"}),u("native.doc.openCamera")]})})]})}h(qe,"DocumentIntro");function Le(n,e,r){let a=n*.88,s=a/r;return{x:(n-a)/2,y:e*.42-s/2,w:a,h:s}}h(Le,"guideRect");var je={too_far:"native.scan.closer",too_close:"native.scan.farther",focus_far:"native.scan.farther",glare:"native.scan.glare",too_bright:"native.scan.glare",too_dark:"native.scan.dark",blurry:"native.scan.blurry"},Je=h(()=>typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0,"reduceMotion");function et({step:n,i18n:e,liveMrz:r,onClose:a}){let s=De(e),u=Q(null),w=Q(null),y=Q(null),[C,_]=g("idle"),[f,E]=g(null),[xe,Z]=g(null),[p,$e]=g({w:0,h:0}),[z,_e]=g({hint:null,locking:!1,card:null,manualShutter:!1}),[q,Te]=g({}),[j,He]=g(null),[J,Re]=g(null),[ee,te]=g(0),[ne,re]=g(null),[O,ae]=g(null),L=n.documentType==="passport",K=L?1.42:1.586;fe(!0),Ue(()=>{let i=u.current;if(i===null)return;let c=h(()=>$e({w:i.clientWidth,h:i.clientHeight}),"measure");if(c(),typeof ResizeObserver>"u")return;let l=new ResizeObserver(c);return l.observe(i),()=>l.disconnect()},[]);let o=Le(p.w,p.h,K);R(()=>{p.w===0||p.h===0||y.current?.setGuide?.({viewAspect:p.w/p.h,rect:{x:o.x/p.w,y:o.y/p.h,width:o.w/p.w,height:o.h/p.h}})},[p.w,p.h,o.x,o.y,o.w,o.h]),R(()=>{let i=w.current;if(i===null)return;let c=n.capture({video:i,...r!==void 0?{liveMrz:r}:{}});y.current=c;let l=u.current;if(l!==null&&l.clientWidth>0&&l.clientHeight>0){let d=Le(l.clientWidth,l.clientHeight,K);c.setGuide?.({viewAspect:l.clientWidth/l.clientHeight,rect:{x:d.x/l.clientWidth,y:d.y/l.clientHeight,width:d.w/l.clientWidth,height:d.h/l.clientHeight}})}let b=new P,S={scan:null,feedback:null,gate:null},N=h(d=>{S={...S,...d};let M=S.gate?.guide,Ye={phase:S.scan?.phase??"framing",hint:S.feedback?.reticle==="coaching"?S.feedback.key:null,card:M?.detected?{fill:M.fill,offsetX:M.offsetX,offsetY:M.offsetY}:null,manualShutter:S.scan?.manualShutter??!1},x=b.present(Ye,performance.now());_e($=>$.hint===x.hint&&$.locking===x.locking&&$.manualShutter===x.manualShutter&&$.card?.fill===x.card?.fill&&$.card?.offsetX===x.card?.offsetX&&$.card?.offsetY===x.card?.offsetY?$:x)},"present"),Ve=[c.on("state",_),c.on("feedback",d=>N({feedback:d})),c.on("gate",d=>N({gate:d})),c.on("scan",d=>{E(d),N({scan:d})}),c.on("captured",d=>{Te(M=>({...M,[tt(d.side,L,M)]:d.previewDataUrl})),He(d.previewDataUrl),Re(rt(i))}),c.on("error",Z),c.on("mrz",d=>{d.state==="mismatch"?ae(d.format??null):re(d)})];return c.start().catch(()=>{}),()=>{for(let d of Ve)d();c.destroy(),y.current=null}},[n.issuer,n.documentType]);let k=f?.phase??"framing",D=k==="reading"||k==="result",V=k==="flipCue"||k==="reaskRecto",T=z.locking,se=f?.captured.length??0;R(()=>{T&&te(i=>i+1)},[T]),R(()=>{se>0&&te(i=>i+1)},[se]);let Ae=f?.expected??null;R(()=>{re(null)},[Ae]),R(()=>{if(O===null)return;let i=setTimeout(()=>ae(null),2e3);return()=>clearTimeout(i)},[O]);let oe=V||D?null:We(ne,L),Y=O!==null?O==="TD3"?"dcv3.mrz.looksLikePassport":"dcv3.mrz.looksLikeCard":oe,Ee=Y===null?null:e.strings[Y]??Xe[e.locale][Y],ie=Me(n),le=z.hint===null?null:je[z.hint]??`dcv2.${z.hint}`,Oe=le??(k==="flipCue"?f?.notice==="same_face"?"doc.sameFace":"doc.flip":k==="reaskRecto"?"doc.reaskRecto":D?"native.scan.reading":k==="locking"||k==="capturing"||T?"native.scan.holdStill":f?.notice==="reread"?"doc.reread":f?.notice==="technical"?"native.scan.retry":f?.notice==="blurry"?"native.scan.blurry":ie??(L?"doc.showPage":"doc.showSide")),B=Ee??s(Oe),H=z.card,v=o;if(!T&&H!==null&&H.fill>=.45&&H.fill<=1.25&&!Je()){let i=o.w*H.fill,c=i/K,l=o.x+o.w/2+o.w*Math.max(-.25,Math.min(.25,H.offsetX)),b=o.y+o.h/2+o.h*Math.max(-.25,Math.min(.25,H.offsetY));v={x:l-i/2,y:b-c/2,w:i,h:c}}let I=o.w*.045,U=28,ce=Math.min(I,U*.6),Ke=[[v.x,v.y,1,1],[v.x+v.w,v.y,-1,1],[v.x,v.y+v.h,1,-1],[v.x+v.w,v.y+v.h,-1,-1]],Ie=T?"is-locked":z.hint!==null?"is-coaching":"",Pe=L?[{side:"single",label:"doc.progressPage"}]:[{side:"recto",label:"doc.progressFront"},{side:"verso",label:"doc.progressBack"}],ue=o.y+o.h+48,F={insetInlineStart:o.x,insetBlockStart:o.y,inlineSize:o.w,blockSize:o.h,borderRadius:I};return t("section",{className:"sekyro-lm","aria-label":B,"data-testid":"sekyro-document",children:m("div",{ref:u,className:`sekyro-lm-stage${D?" is-reading":""}${V?" is-flip":""}`,style:{"--sekyro-guide-w":`${o.w}px`},children:[t("video",{ref:w,className:"sekyro-lm-video",playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true",onPointerUp:i=>{let c=i.currentTarget,l=c.getBoundingClientRect(),b=Math.max(l.width/(c.videoWidth||1),l.height/(c.videoHeight||1)),S=c.videoWidth*b,N=c.videoHeight*b;S>0&&N>0&&y.current?.focusAt((i.clientX-l.left+(S-l.width)/2)/S,(i.clientY-l.top+(N-l.height)/2)/N)}}),p.w>0?m(at,{children:[D&&J!==null?t("img",{className:"sekyro-lm-scene",src:J,alt:""}):null,D&&j!==null?t("img",{className:"sekyro-lm-frozen",src:j,alt:"",style:F}):null,m("svg",{className:"sekyro-lm-overlay",viewBox:`0 0 ${p.w} ${p.h}`,"aria-hidden":"true",focusable:"false",children:[m("defs",{children:[m("linearGradient",{id:"sekyro-lm-top",x1:"0",y1:"0",x2:"0",y2:"1",children:[t("stop",{offset:"0",className:"sekyro-lm-ink",stopOpacity:"0.85"}),t("stop",{offset:"1",className:"sekyro-lm-ink",stopOpacity:"0"})]}),m("linearGradient",{id:"sekyro-lm-bottom",x1:"0",y1:"0",x2:"0",y2:"1",children:[t("stop",{offset:"0",className:"sekyro-lm-ink",stopOpacity:"0"}),t("stop",{offset:"1",className:"sekyro-lm-ink",stopOpacity:"0.9"})]})]}),t("path",{className:"sekyro-lm-scrim",fillRule:"evenodd",d:`M0 0H${p.w}V${p.h}H0Z${nt(o,I)}`}),t("rect",{width:p.w,height:Math.max(0,o.y),fill:"url(#sekyro-lm-top)"}),t("rect",{y:o.y+o.h,width:p.w,height:Math.max(0,p.h-o.y-o.h),fill:"url(#sekyro-lm-bottom)"}),t("g",{className:`sekyro-lm-brackets ${Ie}`,children:Ke.map(([i,c,l,b],S)=>t("path",{style:{transform:`translate(${i}px, ${c}px) scale(${l}, ${b})`},d:`M0 ${U}V${ce}Q0 0 ${ce} 0H${U}`},S))}),T?t("rect",{className:"sekyro-lm-trace",x:o.x,y:o.y,width:o.w,height:o.h,rx:I,pathLength:"1",style:{animationDuration:`${Ge}ms`}}):null]}),t("div",{className:"sekyro-lm-slot",style:F,"aria-hidden":"true",children:D?t("span",{className:"sekyro-lm-read is-repeating"}):ee>0?t("span",{className:"sekyro-lm-read"},ee):null})]}):null,oe!==null?t("div",{className:"sekyro-lm-slot",style:F,"aria-hidden":"true",children:t("span",{"data-testid":"sekyro-mrz-strip",className:`sekyro-lm-mrz${L?" is-page":""}${ne?.state==="valid"?" is-valid":""}`})}):null,m("div",{className:"sekyro-lm-instruction",style:{insetBlockStart:o.y-64},children:[t("div",{role:"status","aria-live":"polite",children:t(ve,{swapKey:B,className:"sekyro-lm-line",children:B})}),ie!==null&&k==="framing"&&le===null?t("p",{className:"sekyro-lm-attempts",children:X(e,n.attemptsRemaining,n.attemptsExhausted)}):null]}),D?m("p",{className:"sekyro-lm-under sekyro-lm-note",style:{insetBlockStart:ue-12},children:[t("span",{className:"sekyro-lm-spinner","aria-hidden":"true"}),s("native.scan.putDown")]}):V?t("div",{className:`sekyro-lm-under sekyro-lm-flip${k==="reaskRecto"?" is-toFront":""}`,style:{insetBlockStart:ue-20},"data-testid":"sekyro-flip-cue","aria-hidden":"true",children:m("span",{className:"sekyro-lm-flip-card",style:{aspectRatio:String(K)},children:[t("span",{className:"sekyro-lm-flip-front"}),t("span",{className:"sekyro-lm-flip-back"})]})}):null,m("div",{className:"sekyro-lm-controls",children:[m("div",{className:"sekyro-lm-bar",children:[t("button",{type:"button",className:"sekyro-glass","aria-label":e.t("native.close"),onClick:a,children:t(A,{name:"close"})}),f?.torchAvailable?t("button",{type:"button",className:`sekyro-glass${f.torch?" is-on":""}`,"aria-label":e.t("doc.torchOn"),"aria-pressed":f.torch,onClick:()=>y.current?.setTorch(!f.torch),children:t(Ne,{name:"flashlight"})}):null]}),xe!==null?m("div",{className:"sekyro-lm-error",role:"alert",children:[t("p",{children:e.t("doc.cameraBlocked")}),t("p",{children:e.t("doc.cameraBlockedHint")}),t(G,{onClick:()=>{Z(null),y.current?.retry()},children:e.t("doc.retryCamera")})]}):null,z.manualShutter?t("button",{type:"button",className:"sekyro-shutter","aria-label":e.t("doc.shutter"),onClick:()=>y.current?.shutter()}):null,t("ol",{className:"sekyro-lm-tray",children:Pe.map(({side:i,label:c})=>{let l=f?.captured.includes(i)??!1;return m("li",{className:l?"is-done":void 0,"aria-current":!l&&(L||f?.expected===i)?"step":void 0,children:[l?m("span",{className:"sekyro-lm-thumb",children:[q[i]!==void 0?t("img",{src:q[i],alt:""}):null,t("svg",{className:"sekyro-lm-check",viewBox:"0 0 18 18","aria-hidden":"true",children:t("path",{d:"M5 9.2l2.6 2.6L13 6.4"})})]}):null,s(c)]},i)})})]}),C==="uploading"||C==="checking"?t("span",{className:"sekyro-visually-hidden",role:"status",children:e.t("doc.uploading")}):null]})})}h(et,"LumiereScan");function tt(n,e,r){return e?"single":n==="recto"||n==="verso"?n:r.recto===void 0?"recto":"verso"}h(tt,"slotOf");function nt({x:n,y:e,w:r,h:a},s){return`M${n+s} ${e}H${n+r-s}Q${n+r} ${e} ${n+r} ${e+s}V${e+a-s}Q${n+r} ${e+a} ${n+r-s} ${e+a}H${n+s}Q${n} ${e+a} ${n} ${e+a-s}V${e+s}Q${n} ${e} ${n+s} ${e}Z`}h(nt,"roundedRect");function rt(n){let e=Math.round(n.videoWidth/4),r=Math.round(n.videoHeight/4);if(e===0||r===0||typeof document>"u")return null;try{let a=document.createElement("canvas");a.width=e,a.height=r;let s=a.getContext("2d");return s===null?null:(s.drawImage(n,0,0,e,r),a.toDataURL("image/jpeg",.7))}catch{return null}}h(rt,"sceneSnapshot");export{xt as DocumentCaptureView,Ge as LOCK_TRACE_MS,Le as guideRect,We as mrzInstruction,tt as slotOf};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{a as K}from"./chunk-4INDRENU.js";import{a as O,b as U,c as z}from"./chunk-YUNPD6ZB.js";import{a as G}from"./chunk-P2LX7BBE.js";import{d as h}from"./chunk-BJJZ4MO5.js";import"./chunk-65JA6YKG.js";import{a as E}from"./chunk-BENNJ4GV.js";import{a,b as f,l as V}from"./chunk-4RUZQW5T.js";import{isValidNni as oe,normalizeNni as _}from"@sekyro/web";import{useEffect as x,useId as re,useRef as W,useState as N}from"react";import{Fragment as R,jsx as i,jsxs as l}from"react/jsx-runtime";var Y={en:U,fr:z,ar:O},$=6,de=new Set(["eid_identifier_invalid","eid_code_invalid","eid_locked","eid_not_enrolled"]),q=a((e,o)=>{if(e===void 0)return 0;let p=Date.parse(e)-o;return Number.isFinite(p)?Math.max(0,Math.ceil(p/1e3)):0},"secondsUntil"),se=a(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss");function be({step:e,i18n:o,className:p,onError:J}){let A=o.strings,n=a((t,d)=>h(A[t]??Y[o.locale][t]??"",d),"t"),B=a((t,d)=>{let ne=new Intl.PluralRules(o.locale).select(d),L=`${t}.${ne}`,te=A[L]??Y[o.locale][L]??n(`${t}.other`);return h(te,{count:new Intl.NumberFormat(o.locale).format(d)})},"plural"),y=a(t=>e.providerName?n(`eid.${t}`,{provider:e.providerName}):n(`eid.${t}Generic`),"named"),[C,Q]=N(""),[g,w]=N(""),[c,I]=N(!1),[v,u]=N(null),r=e.phase==="code",P=K(r),s=re(),X=V(),m=a(async t=>{I(!0),u(null);try{await t()}catch(d){u(G(d,o.strings)),J?.(d)}finally{I(!1)}},"run"),D=W(!1);x(()=>{!e.identifierBound||r||e.reason!==void 0||D.current||(D.current=!0,m(()=>e.start()))},[e.identifierBound,r,e.reason]),x(()=>{(e.reason==="eid_code_invalid"||e.codeExpiresAt!==void 0)&&w("")},[e.reason,e.codeExpiresAt,e.codeAttemptsRemaining]);let F=W(r);x(()=>{r&&!F.current&&document.getElementById(`${s}-code`)?.focus(),F.current=r},[r,s]);let k=e.reason==="eid_locked",M=q(e.codeExpiresAt,P),T=r&&e.codeExpiresAt!==void 0&&M===0,S=q(e.resendAvailableAt,P),H=e.resendsRemaining===0||e.reason==="eid_resend_limit",Z=a(t=>{if(t.preventDefault(),r){g.length===$&&!k&&m(()=>e.verify(g));return}if(e.identifierBound){m(()=>e.start());return}let d=_(C);if(e.country==="MR"){if(!/^\d{10}$/.test(d))return u("population.invalid");if(!oe(d))return u("population.reason_nni_invalid")}m(()=>e.start(d))},"onSubmit"),b=e.reason?.startsWith("eid_")?e.reason:void 0,j=l(R,{children:[b!==void 0?l(E,{tone:de.has(b)?"danger":"warning",children:[i("span",{children:n(`reasons.${b}`)}),b==="eid_code_invalid"&&e.codeAttemptsRemaining!==void 0?i("span",{children:B("eid.codeAttemptsRemaining",e.codeAttemptsRemaining)}):null,e.canUseCamera?i(f,{kind:"ghost",disabled:c,onClick:()=>{m(()=>e.useCamera())},children:n("eid.useCamera")}):null]}):null,v!==null?i(E,{tone:"danger",children:i("span",{children:o.t(v)})}):null]}),[ee,ie]=r?[y("codeTitle"),y("codeHelp")]:[y("identifierTitle"),y(e.identifierBound?"boundDescription":"identifierDescription")];return l("form",{className:`sekyro-stack sekyro-stack--4 sekyro-otp${p?` ${p}`:""}`,"aria-labelledby":s,onSubmit:Z,noValidate:!0,"data-testid":"sekyro-eid",children:[l("div",{className:"sekyro-stack sekyro-stack--1",children:[i("h2",{id:s,ref:X,tabIndex:-1,className:"sekyro-text-body",children:ee}),i("p",{className:"sekyro-text-muted",children:ie}),e.afterPass==="continue"?i("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:e.providerName?n("eid.continueHint",{provider:e.providerName}):n("eid.continueHintGeneric")}):null]}),j,r?l(R,{children:[l("div",{className:"sekyro-field",children:[i("label",{className:"sekyro-label",htmlFor:`${s}-code`,children:n("eid.codeLabel")}),i("input",{id:`${s}-code`,className:"sekyro-input sekyro-input--code",dir:"ltr",inputMode:"numeric",autoComplete:"one-time-code",value:g,disabled:k,onChange:t=>{u(null),w(_(t.target.value).replace(/\D/g,"").slice(0,$))}})]}),l("div",{className:"sekyro-row",children:[e.codeExpiresAt!==void 0?i("span",{className:"sekyro-text-muted",children:T?n("eid.expired"):n("eid.expiresIn",{time:se(M)})}):null,H?i("span",{className:"sekyro-text-muted",children:n("eid.noResendsLeft")}):i(f,{kind:"ghost",disabled:c||S>0||k,onClick:()=>{m(()=>e.resend())},children:S>0?n("eid.resendIn",{seconds:S}):n("eid.resend")})]}),!H&&e.resendsRemaining!==void 0?i("p",{className:"sekyro-text-muted",children:B("eid.resendsRemaining",e.resendsRemaining)}):null,i("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:T?n("eid.expired"):""}),i(f,{type:"submit",full:!0,disabled:c||g.length!==$||k,"aria-busy":c||void 0,children:n("eid.verify")})]}):l(R,{children:[e.identifierBound?null:l("div",{className:"sekyro-field",children:[i("label",{className:"sekyro-label",htmlFor:`${s}-nni`,children:o.t("population.label")}),i("input",{id:`${s}-nni`,className:"sekyro-input sekyro-mono",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:o.t("population.placeholder"),value:C,"aria-describedby":`${s}-nni-help`,"aria-invalid":v==="population.invalid"||v==="population.reason_nni_invalid"||void 0,onChange:t=>{u(null),Q(_(t.target.value).replace(/\D/g,"").slice(0,10))}}),i("span",{id:`${s}-nni-help`,className:"sekyro-help",children:o.t("population.helper")})]}),i(f,{type:"submit",full:!0,disabled:c,"aria-busy":c||void 0,children:n("eid.start")})]})]})}a(be,"EidView");export{be as EidView};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{a as w}from"./chunk-AMOZXMUP.js";import{a as D}from"./chunk-4INDRENU.js";import{a as $}from"./chunk-P2LX7BBE.js";import{d as C}from"./chunk-BJJZ4MO5.js";import"./chunk-65JA6YKG.js";import{a as A,b as h}from"./chunk-63NUMQST.js";import{a as f,b as L}from"./chunk-BENNJ4GV.js";import{a as s,b as _}from"./chunk-4RUZQW5T.js";import{OtpInputError as K}from"@sekyro/web";import{useId as Y,useState as O}from"react";var P={"emailOtp.sendTitle":"تحقّق من بريدك الإلكتروني","emailOtp.sendDescription":"سنرسل إليك عبر البريد الإلكتروني رمزًا يُستخدم مرة واحدة لتأكيد أن هذا العنوان يخصّك","emailOtp.prefilledNotice":"سنرسل رمز تحقّق إلى بريدك الإلكتروني المسجّل.","emailOtp.emailLabel":"البريد الإلكتروني","emailOtp.emailHelper":"سنرسل رمزًا يُستخدم مرة واحدة إلى هذا العنوان","emailOtp.emailPlaceholder":"name@example.com","emailOtp.emailInvalid":"أدخل عنوان بريد إلكتروني صالحًا، مثل name@example.com","emailOtp.send":"أرسل لي رمزًا عبر البريد الإلكتروني","emailOtp.verifyTitle":"أدخل رمز التحقّق","emailOtp.verifyDescription":"أدخل الرمز المكوّن من 6 أرقام الذي أرسلناه إلى بريدك الإلكتروني لإتمام التحقّق من عنوانك","emailOtp.sentTo":"أرسلنا رمزًا مكوّنًا من 6 أرقام إلى {email}","emailOtp.codeLabel":"رمز التحقّق","emailOtp.codeHelper":"أدخل الرمز المكوّن من 6 أرقام الوارد في الرسالة","emailOtp.verify":"تحقّق من الرمز","emailOtp.resend":"إعادة إرسال الرمز","emailOtp.resendIn":"إعادة إرسال الرمز خلال {seconds} ثانية","emailOtp.expiresIn":"ينتهي الرمز خلال {time}","emailOtp.expired":"انتهت صلاحية الرمز — أعد إرسال رمز جديد","emailOtp.reason_otp_mismatch":"الرمز غير صحيح — تحقّق منه وأعد إدخاله","emailOtp.reason_otp_expired":"انتهت صلاحية الرمز — أعد إرسال رمز جديد للمتابعة","emailOtp.reason_otp_send_failed":"تعذّر إرسال الرسالة — أعد المحاولة بعد قليل","emailOtp.reason_otp_rate_limited":"طلبت رموزًا كثيرة — انتظر قليلًا ثم أعد المحاولة","emailOtp.reason_email_invalid":"لا يمكننا الإرسال إلى هذا العنوان — تحقّق منه أو أدخل عنوانًا آخر","emailOtp.reason_email_disposable":"استخدم بريدًا إلكترونيًا دائمًا، وليس عنوانًا مؤقتًا"};var V={"emailOtp.sendTitle":"Verify your email address","emailOtp.sendDescription":"We'll email you a one-time code to confirm this address is yours","emailOtp.prefilledNotice":"We'll send a verification code to your registered email address.","emailOtp.emailLabel":"Email address","emailOtp.emailHelper":"We'll send a one-time code to this address","emailOtp.emailPlaceholder":"name@example.com","emailOtp.emailInvalid":"Enter a valid email address, for example name@example.com","emailOtp.send":"Email me a code","emailOtp.verifyTitle":"Enter the verification code","emailOtp.verifyDescription":"Type the 6-digit code we emailed you to finish verifying your address","emailOtp.sentTo":"We sent a 6-digit code to {email}","emailOtp.codeLabel":"Verification code","emailOtp.codeHelper":"Enter the 6-digit code from the email","emailOtp.verify":"Verify code","emailOtp.resend":"Resend code","emailOtp.resendIn":"Resend code in {seconds}s","emailOtp.expiresIn":"Code expires in {time}","emailOtp.expired":"That code has expired — resend a new one","emailOtp.reason_otp_mismatch":"That code was incorrect — check it and enter it again","emailOtp.reason_otp_expired":"That code has expired — resend a new code to continue","emailOtp.reason_otp_send_failed":"We couldn't send the email — try again in a moment","emailOtp.reason_otp_rate_limited":"Too many codes requested — wait a moment, then try again","emailOtp.reason_email_invalid":"We can't send to this address — check it or enter another one","emailOtp.reason_email_disposable":"Use a permanent email address, not a temporary one"};var H={"emailOtp.sendTitle":"Vérifiez votre adresse e-mail","emailOtp.sendDescription":"Nous vous enverrons par e-mail un code à usage unique pour confirmer que cette adresse vous appartient","emailOtp.prefilledNotice":"Nous enverrons un code de vérification à votre adresse e-mail enregistrée.","emailOtp.emailLabel":"Adresse e-mail","emailOtp.emailHelper":"Nous enverrons un code à usage unique à cette adresse","emailOtp.emailPlaceholder":"nom@exemple.com","emailOtp.emailInvalid":"Saisissez une adresse e-mail valide, par exemple nom@exemple.com","emailOtp.send":"M'envoyer un code par e-mail","emailOtp.verifyTitle":"Saisissez le code de vérification","emailOtp.verifyDescription":"Saisissez le code à 6 chiffres que nous vous avons envoyé par e-mail pour finaliser la vérification de votre adresse","emailOtp.sentTo":"Nous avons envoyé un code à 6 chiffres à {email}","emailOtp.codeLabel":"Code de vérification","emailOtp.codeHelper":"Saisissez le code à 6 chiffres reçu par e-mail","emailOtp.verify":"Vérifier le code","emailOtp.resend":"Renvoyer le code","emailOtp.resendIn":"Renvoyer le code dans {seconds} s","emailOtp.expiresIn":"Le code expire dans {time}","emailOtp.expired":"Ce code a expiré — renvoyez-en un nouveau","emailOtp.reason_otp_mismatch":"Ce code est incorrect — vérifiez-le et saisissez-le à nouveau","emailOtp.reason_otp_expired":"Ce code a expiré — renvoyez un nouveau code pour continuer","emailOtp.reason_otp_send_failed":"Nous n'avons pas pu envoyer l'e-mail — réessayez dans un instant","emailOtp.reason_otp_rate_limited":"Trop de codes demandés — patientez un instant, puis réessayez","emailOtp.reason_email_invalid":"Nous ne pouvons pas envoyer à cette adresse — vérifiez-la ou saisissez-en une autre","emailOtp.reason_email_disposable":"Utilisez une adresse e-mail permanente, pas une adresse temporaire"};import{Fragment as b,jsx as i,jsxs as o}from"react/jsx-runtime";var J={en:V,fr:H,ar:P},R=s((e,n)=>{if(e===void 0)return 0;let d=Date.parse(e)-n;return Number.isFinite(d)?Math.max(0,Math.ceil(d/1e3)):0},"secondsUntil"),Q=s(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss"),X=new Set(["otp_expired","otp_send_failed","otp_rate_limited","email_invalid","email_disposable"]);function ue({step:e,i18n:n,className:d,defaultEmail:S="",onError:W}){let a=s((t,p)=>C(n.strings[t]??J[n.locale][t],p),"t"),[y,M]=O(S),[c,q]=O(""),[r,g]=O(!1),[x,E]=O(null),m=e.phase==="verify",N=D(m),l=Y(),k=s(async t=>{g(!0),E(null);try{await t()}catch(p){E(p instanceof K&&p.field==="email"?a("emailOtp.emailInvalid"):n.t($(p,n.strings))),W?.(p)}finally{g(!1)}},"run"),T=s(t=>{k(()=>e.send(e.needsEmail&&(!t||y!==S)?{email:y}:{}))},"send"),I=s(t=>{k(()=>e.verify(t))},"submitCode"),F=s(t=>{t.preventDefault(),m?I(c):T(!1)},"onSubmit"),z=R(e.codeExpiresAt,N),v=R(e.resendAvailableAt,N),u=m&&e.codeExpiresAt!==void 0&&z===0,[B,U]=a("emailOtp.sentTo").split("{email}"),G=e.reason==="otp_mismatch"?o(f,{tone:"danger",children:[i("span",{children:a("emailOtp.reason_otp_mismatch")}),i("span",{children:L(n,e.attemptsRemaining,e.attemptsExhausted)})]}):e.reason!==void 0&&X.has(e.reason)?i(f,{tone:"warning",children:i("span",{children:a(`emailOtp.reason_${e.reason}`)})}):null;return o("form",{className:`sekyro-step sekyro-otp${d?` ${d}`:""}`,"aria-labelledby":l,onSubmit:F,noValidate:!0,children:[i(A,{id:l,title:a(m?"emailOtp.verifyTitle":"emailOtp.sendTitle"),lead:m?o(b,{children:[B,i("bdi",{dir:"ltr",className:"sekyro-mono",children:e.sentToMasked}),U]}):a("emailOtp.sendDescription")}),G,x!==null?i(f,{tone:"danger",children:i("span",{children:x})}):null,m?o(b,{children:[o("div",{className:"sekyro-field",children:[i("label",{className:"sekyro-label",htmlFor:`${l}-code`,children:a("emailOtp.codeLabel")}),i(w,{id:`${l}-code`,value:c,invalid:e.reason==="otp_mismatch",onChange:t=>{q(t),t.length===6&&c.length!==6&&!r&&!e.attemptsExhausted&&I(t)}}),i("span",{className:`sekyro-help sekyro-otp-expiry${u?" is-danger":""}`,"aria-hidden":!u||void 0,children:u?a("emailOtp.expired"):a("emailOtp.expiresIn",{time:Q(z)})})]}),i("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:u?a("emailOtp.expired"):""}),o(h,{children:[i(_,{type:"submit",full:!0,disabled:r||c.length!==6,"aria-busy":r||void 0,children:a("emailOtp.verify")}),i("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:r||v>0,onClick:()=>T(!0),children:v>0?a("emailOtp.resendIn",{seconds:v}):a("emailOtp.resend")})]})]}):o(b,{children:[e.needsEmail?o("div",{className:"sekyro-field",children:[i("label",{className:"sekyro-label",htmlFor:`${l}-email`,children:a("emailOtp.emailLabel")}),i("input",{id:`${l}-email`,className:"sekyro-input",type:"email",dir:"ltr",inputMode:"email",autoComplete:"email",autoCapitalize:"none",spellCheck:!1,placeholder:a("emailOtp.emailPlaceholder"),value:y,"aria-describedby":`${l}-email-help`,onChange:t=>M(t.target.value)}),i("span",{id:`${l}-email-help`,className:"sekyro-help",children:a("emailOtp.emailHelper")})]}):i("p",{className:"sekyro-text-muted",children:a("emailOtp.prefilledNotice")}),i(h,{children:i(_,{type:"submit",full:!0,disabled:r,"aria-busy":r||void 0,children:a("emailOtp.send")})})]})]})}s(ue,"EmailOtpView");export{ue as EmailOtpView};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{a as K}from"./chunk-JAUZKPQO.js";import{f as _}from"./chunk-BRA6F56P.js";import{a as B,b as O,c as V}from"./chunk-YUNPD6ZB.js";import{a as E}from"./chunk-P2LX7BBE.js";import{d as z}from"./chunk-BJJZ4MO5.js";import"./chunk-65JA6YKG.js";import"./chunk-Q232JYNO.js";import"./chunk-63NUMQST.js";import{a as v}from"./chunk-BENNJ4GV.js";import{a as m,b as w,l as S}from"./chunk-4RUZQW5T.js";import{useEffect as D,useId as A,useMemo as C,useRef as se,useState as x}from"react";var q={"contact.title":"كيف تريد استلام الرمز؟","contact.description":"اختر خيارًا واحدًا.","contact.phone":"عبر الهاتف (واتساب أو رسالة نصية)","contact.email":"عبر البريد الإلكتروني","contact.switch":"استخدم خيارًا آخر","summary.title":"تحقق من بياناتك","summary.description":"تأكد من أن هذه بياناتك قبل الصورة الحية.","summary.fullName":"الاسم الكامل","summary.birthDate":"تاريخ الميلاد","summary.nationality":"الجنسية","summary.documentType":"الوثيقة","summary.documentNumber":"رقم الوثيقة","summary.nni":"الرقم الوطني للتعريف (NNI)","summary.expiryDate":"تاريخ الانتهاء","summary.portraitAlt":"الصورة المسجلة","summary.source.registry":"من سجل الحالة المدنية","summary.source.document":"مقروءة من وثيقتك","summary.source.chip":"مقروءة من شريحة وثيقتك","summary.name":"الاسم","summary.birthYear":"سنة الميلاد","summary.confirm":"تأكيد ومتابعة","summary.retakeDocument":"مسح وثيقتي مرة أخرى","summary.retakeNationalNumber":"إدخال رقمي مرة أخرى","summary.noRetake":"لم يعد بإمكانك إعادة المحاولة — تواصل مع {org} إذا كانت هذه البيانات غير صحيحة","capture.tipsIcao.title":"لصورة الهوية:","capture.tipsIcao.glasses":"انزع نظارتك","capture.tipsIcao.headwear":"انزع القبعة — يُقبل غطاء الرأس الديني إذا كان الوجه ظاهرًا بالكامل","capture.tipsIcao.expression":"حافظ على تعبير محايد وفمك مغلق","capture.tipsIcao.faceCamera":"انظر مباشرة إلى الكاميرا وعيناك مفتوحتان","capture.tipsIcao.background":"قف أمام خلفية سادة فاتحة اللون","capture.tipsIcao.lighting":"استخدم إضاءة متساوية على وجهك — دون ظلال","capture.tipsIcao.hair":"أبعد شعرك عن وجهك وعينيك","capture.tipsIcao.summary":"قف أمام جدار سادة فاتح اللون مع إضاءة متساوية على وجهك. انزع نظارتك وأي قبعة. أبعد شعرك عن وجهك، وانظر مباشرة إلى الكاميرا وعيناك مفتوحتان، وحافظ على تعبير محايد وفمك مغلق، وابقَ ثابتًا.","portrait.retakeOnly":"نجح التحقق الحي — الصورة فقط تحتاج إلى محاولة أخرى","portrait.keepCamera":"ابقَ أمام الكاميرا","handoff.description":"امسح الرمز بهاتفك للمتابعة","handoff.qrAlt":"رمز QR يفتح عملية التحقق هذه على هاتفك","handoff.copyLink":"نسخ الرابط","handoff.copyFailed":"تعذّر نسخ الرابط — انسخ عنوان هذه الصفحة من متصفحك بدلًا من ذلك","handoff.waiting":"ستنتقل هذه الصفحة تلقائيًا بعد أن تُكمل الخطوة على هاتفك","inApp.title":"افتح هذه الصفحة في متصفحك","inApp.description":"لا تعمل الكاميرا جيدًا داخل هذا التطبيق. افتح الرابط في Chrome أو Safari للمتابعة.","inApp.copyLink":"نسخ الرابط","inApp.copied":"تم نسخ الرابط — الصقه في متصفحك","inApp.copyFailed":"تعذّر نسخ الرابط — انسخ عنوان هذه الصفحة بدلًا من ذلك","inApp.continueAnyway":"المتابعة هنا على أي حال"};var H={"contact.title":"How do you want to get your code?","contact.description":"Choose one option.","contact.phone":"By phone (WhatsApp or SMS)","contact.email":"By email","contact.switch":"Use another option","summary.title":"Check your details","summary.description":"Make sure this is you before the live photo.","summary.fullName":"Full name","summary.birthDate":"Date of birth","summary.nationality":"Nationality","summary.documentType":"Document","summary.documentNumber":"Document number","summary.nni":"National number (NNI)","summary.expiryDate":"Expiry date","summary.portraitAlt":"Photo on record","summary.source.registry":"From the civil registry","summary.source.document":"Read from your document","summary.source.chip":"Read from your document's chip","summary.name":"Name","summary.birthYear":"Year of birth","summary.confirm":"Confirm and continue","summary.retakeDocument":"Scan my document again","summary.retakeNationalNumber":"Enter my number again","summary.noRetake":"You can't try again — contact {org} if these details are wrong","capture.tipsIcao.title":"For your ID photo:","capture.tipsIcao.glasses":"Remove your glasses","capture.tipsIcao.headwear":"Remove hats and caps — a religious head covering is fine if your whole face shows","capture.tipsIcao.expression":"Keep a neutral expression with your mouth closed","capture.tipsIcao.faceCamera":"Look straight at the camera with your eyes open","capture.tipsIcao.background":"Stand in front of a plain, light background","capture.tipsIcao.lighting":"Use even light on your face — no shadows","capture.tipsIcao.hair":"Keep your hair away from your face and eyes","capture.tipsIcao.summary":"Stand in front of a plain, light wall with even light on your face. Remove your glasses and any hat. Keep your hair off your face, look straight at the camera with your eyes open, keep a neutral expression with your mouth closed, and hold still.","portrait.retakeOnly":"Your live check passed — only the photo needs another try","portrait.keepCamera":"Stay in front of the camera","handoff.description":"Scan with your phone to continue","handoff.qrAlt":"QR code that opens this verification on your phone","handoff.copyLink":"Copy link","handoff.copyFailed":"We couldn't copy the link — copy this page's address from your browser instead","handoff.waiting":"This page moves on by itself once you finish on your phone","inApp.title":"Open this page in your browser","inApp.description":"The camera doesn't work well inside this app. Open the link in Chrome or Safari to continue.","inApp.copyLink":"Copy link","inApp.copied":"Link copied — paste it in your browser","inApp.copyFailed":"We couldn't copy the link — copy this page's address instead","inApp.continueAnyway":"Continue here anyway"};var U={"contact.title":"Comment voulez-vous recevoir votre code ?","contact.description":"Choisissez une option.","contact.phone":"Par téléphone (WhatsApp ou SMS)","contact.email":"Par e-mail","contact.switch":"Utiliser une autre option","summary.title":"Vérifiez vos informations","summary.description":"Assurez-vous qu'il s'agit bien de vous avant la photo en direct.","summary.fullName":"Nom complet","summary.birthDate":"Date de naissance","summary.nationality":"Nationalité","summary.documentType":"Document","summary.documentNumber":"Numéro du document","summary.nni":"Numéro national d'identification (NNI)","summary.expiryDate":"Date d'expiration","summary.portraitAlt":"Photo enregistrée","summary.source.registry":"Issu de l'état civil","summary.source.document":"Lu sur votre document","summary.source.chip":"Lu sur la puce de votre document","summary.name":"Nom","summary.birthYear":"Année de naissance","summary.confirm":"Confirmer et continuer","summary.retakeDocument":"Scanner à nouveau mon document","summary.retakeNationalNumber":"Saisir à nouveau mon numéro","summary.noRetake":"Vous ne pouvez plus réessayer — contactez {org} si ces informations sont incorrectes","capture.tipsIcao.title":"Pour votre photo d'identité :","capture.tipsIcao.glasses":"Retirez vos lunettes","capture.tipsIcao.headwear":"Retirez chapeau et casquette — un couvre-chef religieux est accepté si tout le visage est visible","capture.tipsIcao.expression":"Gardez une expression neutre, la bouche fermée","capture.tipsIcao.faceCamera":"Regardez la caméra bien en face, les yeux ouverts","capture.tipsIcao.background":"Placez-vous devant un fond uni et clair","capture.tipsIcao.lighting":"Éclairez votre visage de façon uniforme — sans ombres","capture.tipsIcao.hair":"Dégagez vos cheveux du visage et des yeux","capture.tipsIcao.summary":"Placez-vous devant un mur uni et clair, le visage éclairé de façon uniforme. Retirez vos lunettes et tout chapeau. Dégagez vos cheveux du visage, regardez la caméra bien en face, les yeux ouverts, gardez une expression neutre, la bouche fermée, et ne bougez plus.","portrait.retakeOnly":"Votre vérification en direct est validée — seule la photo est à refaire","portrait.keepCamera":"Restez face à la caméra","handoff.description":"Scannez avec votre téléphone pour continuer","handoff.qrAlt":"Code QR qui ouvre cette vérification sur votre téléphone","handoff.copyLink":"Copier le lien","handoff.copyFailed":"Nous n'avons pas pu copier le lien — copiez plutôt l'adresse de cette page depuis votre navigateur","handoff.waiting":"Cette page avancera d’elle-même une fois l’étape terminée sur votre téléphone","inApp.title":"Ouvrez cette page dans votre navigateur","inApp.description":"La caméra fonctionne mal dans cette application. Ouvrez le lien dans Chrome ou Safari pour continuer.","inApp.copyLink":"Copier le lien","inApp.copied":"Lien copié — collez-le dans votre navigateur","inApp.copyFailed":"Impossible de copier le lien — copiez plutôt l'adresse de cette page","inApp.continueAnyway":"Continuer ici quand même"};var L=[[10,[[1,16]]],[16,[[1,28]]],[26,[[1,44]]],[18,[[2,32]]],[24,[[2,43]]],[16,[[4,27]]],[18,[[4,31]]],[22,[[2,38],[2,39]]],[22,[[3,36],[2,37]]],[26,[[4,43],[1,44]]],[30,[[1,50],[4,51]]],[22,[[6,36],[2,37]]],[22,[[8,37],[1,38]]],[24,[[4,40],[5,41]]],[24,[[5,41],[5,42]]],[28,[[7,45],[3,46]]],[28,[[10,46],[1,47]]],[26,[[9,43],[4,44]]],[26,[[3,44],[11,45]]],[26,[[3,41],[13,42]]]],Y=L.length,j=0,F=m(e=>(L[e-1]?.[1]??[]).reduce((t,[r,o])=>t+r*o,0),"dataCapacity");function R(e,t){let r=0;for(let o=7;o>=0;o-=1)r=r<<1^(r>>>7)*285,r^=(t>>>o&1)*e;return r&255}m(R,"gfMul");function X(e){let t=new Array(e).fill(0);t[e-1]=1;let r=1;for(let o=0;o<e;o+=1){for(let a=0;a<e;a+=1)t[a]=R(t[a],r),a+1<e&&(t[a]=t[a]^t[a+1]);r=R(r,2)}return t}m(X,"rsDivisor");function J(e,t){let r=t.map(()=>0);for(let o of e){let a=o^r.shift();r.push(0),t.forEach((s,i)=>{r[i]=r[i]^R(s,a)})}return r}m(J,"rsRemainder");function Z(e,t){let r=[],o=m((p,d)=>{for(let b=d-1;b>=0;b-=1)r.push(p>>>b&1)},"put");o(4,4),o(e.length,t<10?8:16);for(let p of e)o(p,8);let a=F(t)*8;o(0,Math.min(4,a-r.length)),o(0,(8-r.length%8)%8);let s=[];for(let p=0;p<r.length;p+=8)s.push(r.slice(p,p+8).reduce((d,b)=>d<<1|b,0));for(let p=236;s.length<F(t);p^=253)s.push(p);let[i,n]=L[t-1],u=X(i),c=[],f=0;for(let[p,d]of n)for(let b=0;b<p;b+=1){let N=s.slice(f,f+d);f+=d,c.push({data:N,ec:J(N,u)})}let y=[],h=Math.max(...c.map(p=>p.data.length));for(let p=0;p<h;p+=1)for(let d of c)p<d.data.length&&y.push(d.data[p]);for(let p=0;p<i;p+=1)for(let d of c)y.push(d.ec[p]);return y}m(Z,"codewords");function ee(e){if(e===1)return[];let t=Math.floor(e/7)+2,r=Math.ceil((e*4+4)/(t*2-2))*2,o=[6];for(let a=e*4+10;o.length<t;a-=r)o.splice(1,0,a);return o}m(ee,"alignmentPositions");var te=[(e,t)=>(e+t)%2===0,e=>e%2===0,(e,t)=>t%3===0,(e,t)=>(e+t)%3===0,(e,t)=>(Math.floor(e/2)+Math.floor(t/3))%2===0,(e,t)=>e*t%2+e*t%3===0,(e,t)=>(e*t%2+e*t%3)%2===0,(e,t)=>((e+t)%2+e*t%3)%2===0],P=class P{constructor(t){this.size=t,this.dark=new Array(t*t).fill(!1),this.fixed=new Array(t*t).fill(!1)}set(t,r,o){this.dark[t*this.size+r]=o,this.fixed[t*this.size+r]=!0}get(t,r){return this.dark[t*this.size+r]===!0}};m(P,"Grid");var M=P;function oe(e,t){let r=e.size;for(let s=0;s<r;s+=1)e.set(6,s,s%2===0),e.set(s,6,s%2===0);for(let[s,i]of[[3,3],[3,r-4],[r-4,3]])for(let n=-4;n<=4;n+=1)for(let u=-4;u<=4;u+=1){let c=s+n,f=i+u;if(c<0||c>=r||f<0||f>=r)continue;let y=Math.max(Math.abs(n),Math.abs(u));e.set(c,f,y!==2&&y!==4)}let o=ee(t),a=o.length-1;if(o.forEach((s,i)=>o.forEach((n,u)=>{if(!(i===0&&u===0||i===0&&u===a||i===a&&u===0))for(let c=-2;c<=2;c+=1)for(let f=-2;f<=2;f+=1)e.set(s+c,n+f,Math.max(Math.abs(c),Math.abs(f))!==1)})),$(e,0),t>=7){let s=t;for(let n=0;n<12;n+=1)s=s<<1^(s>>>11)*7973;let i=t<<12|s;for(let n=0;n<18;n+=1){let u=(i>>>n&1)===1,c=r-11+n%3,f=Math.floor(n/3);e.set(c,f,u),e.set(f,c,u)}}}m(oe,"drawFunctionPatterns");function $(e,t){let r=e.size,o=j<<3|t,a=o;for(let n=0;n<10;n+=1)a=a<<1^(a>>>9)*1335;let s=(o<<10|a)^21522,i=m(n=>(s>>>n&1)===1,"bit");for(let n=0;n<=5;n+=1)e.set(n,8,i(n));e.set(7,8,i(6)),e.set(8,8,i(7)),e.set(8,7,i(8));for(let n=9;n<15;n+=1)e.set(8,14-n,i(n));for(let n=0;n<8;n+=1)e.set(8,r-1-n,i(n));for(let n=8;n<15;n+=1)e.set(r-15+n,8,i(n));e.set(r-8,8,!0)}m($,"drawFormat");function re(e,t){let r=e.size,o=0;for(let a=r-1;a>=1;a-=2){a===6&&(a=5);for(let s=0;s<r;s+=1)for(let i=0;i<2;i+=1){let n=a-i,c=(a+1&2)===0?r-1-s:s;e.fixed[c*r+n]!==!0&&(o<t.length*8&&(e.dark[c*r+n]=(t[o>>>3]>>>7-(o&7)&1)===1),o+=1)}}}m(re,"placeData");function ne(e,t){let r=te[t];for(let o=0;o<e.size;o+=1)for(let a=0;a<e.size;a+=1)e.fixed[o*e.size+a]!==!0&&r(o,a)&&(e.dark[o*e.size+a]=!e.dark[o*e.size+a])}m(ne,"applyMask");function ae(e){let t=e.size,r=0,o=m(s=>{let i=1;for(let n=1;n<=t;n+=1)n<t&&s(n)===s(n-1)?i+=1:(i>=5&&(r+=3+(i-5)),i=1);for(let n=0;n+10<t;n+=1){let u=[!0,!1,!0,!0,!0,!1,!0];if(!(u.every((h,p)=>s(n+p)===h)||u.every((h,p)=>s(n+4+p)===h)))continue;let f=[0,1,2,3].every(h=>!s(n+h))&&u.every((h,p)=>s(n+4+p)===h),y=u.every((h,p)=>s(n+p)===h)&&[7,8,9,10].every(h=>!s(n+h));f&&(r+=40),y&&(r+=40)}},"line");for(let s=0;s<t;s+=1)o(i=>e.get(s,i));for(let s=0;s<t;s+=1)o(i=>e.get(i,s));for(let s=0;s+1<t;s+=1)for(let i=0;i+1<t;i+=1){let n=e.get(s,i);n===e.get(s,i+1)&&n===e.get(s+1,i)&&n===e.get(s+1,i+1)&&(r+=3)}let a=e.dark.filter(Boolean).length;return r+=Math.floor(Math.abs(a*20-t*t*10)/(t*t))*10,r}m(ae,"penalty");function Q(e,t={}){let r=new TextEncoder().encode(e),o=1;for(;o<=Y&&!(4+(o<10?8:16)+r.length*8<=F(o)*8);o+=1);if(o>Y)throw new RangeError("text too long for a QR code");let a=Z(r,o),s=m(u=>{let c=new M(o*4+17);return oe(c,o),re(c,a),ne(c,u),$(c,u),c},"build"),i=null;if(t.mask!==void 0)i=s(t.mask);else{let u=Number.POSITIVE_INFINITY;for(let c=0;c<8;c+=1){let f=s(c),y=ae(f);y<u&&(u=y,i=f)}}let n=i;return{size:n.size,get:m((u,c)=>n.get(u,c),"get")}}m(Q,"encodeQr");function G(e,t=4){let r=[];for(let o=0;o<e.size;o+=1)for(let a=0;a<e.size;a+=1)e.get(o,a)&&r.push(`M${a+t} ${o+t}h1v1h-1z`);return{size:e.size+t*2,d:r.join("")}}m(G,"qrPath");import{jsx as l,jsxs as k}from"react/jsx-runtime";var ie={en:H,fr:U,ar:q},ce={en:O,fr:V,ar:B};function g(e){let t=e.strings;return(r,o)=>z(t[r]??ie[e.locale][r]??"",o)}m(g,"flowT");function T(e,t){let[r,o]=x(!1),[a,s]=x(null);return{busy:r,error:a,run:m(n=>{o(!0),s(null),n().then(()=>o(!1),u=>{o(!1),s(e.t(E(u,e.strings))),t?.(u)})},"run")}}m(T,"useAction");function Pe({step:e,i18n:t,onError:r}){let o=g(t),a=A(),s=S(),{busy:i,error:n,run:u}=T(t,r),c=m(f=>o(f==="phone"?"contact.phone":"contact.email"),"label");return k("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":a,"data-testid":"sekyro-contact-choice",children:[k("div",{className:"sekyro-stack sekyro-stack--1",children:[l("h2",{id:a,ref:s,tabIndex:-1,className:"sekyro-text-body",children:o("contact.title")}),l("p",{className:"sekyro-text-muted",children:o("contact.description")})]}),n!==null?l(v,{tone:"danger",children:l("span",{children:n})}):null,e.options.length===0?l(v,{tone:"danger",children:l("span",{children:t.t("errors.network_error")})}):null,l("div",{className:"sekyro-stack sekyro-stack--3",children:e.options.map((f,y)=>l(w,{kind:y===0?"primary":"ghost",full:!0,disabled:i,"aria-busy":i||void 0,onClick:()=>u(()=>e.select(f)),children:c(f)},f))})]})}m(Pe,"ContactChoiceView");function De({step:e,i18n:t,onError:r}){let o=g(t),{busy:a,error:s,run:i}=T(t,r);return e.canSwitch?k("div",{className:"sekyro-stack sekyro-stack--1",children:[s!==null?l(v,{tone:"danger",children:l("span",{children:s})}):null,l(w,{kind:"ghost",disabled:a,"aria-busy":a||void 0,onClick:()=>i(()=>e.switchTo()),"data-testid":"sekyro-contact-switch",children:o("contact.switch")})]}):null}m(De,"ContactSwitch");var ue=[["fullName","summary.fullName",!1],["birthDate","summary.birthDate",!0],["birthYear","summary.birthYear",!0],["nationality","summary.nationality",!0],["documentType","summary.documentType",!1],["documentNumberMasked","summary.documentNumber",!0],["nniMasked","summary.nni",!0],["expiryDate","summary.expiryDate",!0]];function le(e){let[t,r]=x(null);return D(()=>{if(!e.portraitAvailable)return;let o=!0,a=null;return e.portrait().then(s=>{!o||s===null||!s.type.startsWith("image/")||typeof URL.createObjectURL!="function"||(a=URL.createObjectURL(s),r(a))}),()=>{o=!1,a!==null&&URL.revokeObjectURL(a)}},[e.portraitAvailable]),t}m(le,"usePortraitUrl");function Te({step:e,i18n:t,onError:r}){let o=g(t),a=A(),s=S(),i=le(e),{busy:n,error:u,run:c}=T(t,r),f=e.context.orgName,y=["registry","document","chip"].find(d=>d===e.source),h=e.summaryKind==="partial",p=m(d=>t.strings[`doc.type.${d}`]??d,"documentLabel");return k("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":a,"data-testid":"sekyro-identity-summary",children:[k("div",{className:"sekyro-stack sekyro-stack--1",children:[l("h2",{id:a,ref:s,tabIndex:-1,className:"sekyro-text-body",children:o("summary.title")}),l("p",{className:"sekyro-text-muted",children:o("summary.description")}),y!==void 0?l("p",{className:"sekyro-text-muted",children:o(`summary.source.${y}`)}):null]}),k("div",{className:"sekyro-summary",children:[i!==null?l("img",{className:"sekyro-summary__portrait",src:i,alt:o("summary.portraitAlt")}):null,l("dl",{className:"sekyro-summary__list",children:ue.map(([d,b,N])=>{let I=e[d];return I===void 0?null:k("div",{className:"sekyro-summary__row",children:[l("dt",{className:"sekyro-text-muted",children:o(d==="fullName"&&h?"summary.name":b)}),l("dd",{children:N?l("bdi",{dir:"ltr",children:I}):d==="documentType"?p(I):I})]},d)})})]}),u!==null?l(v,{tone:"danger",children:l("span",{children:u})}):null,k("div",{className:"sekyro-stack sekyro-stack--3",children:[l(w,{full:!0,disabled:n,"aria-busy":n||void 0,onClick:()=>c(()=>e.confirm()),children:o("summary.confirm")}),e.retakeAvailable?l(w,{kind:"ghost",full:!0,disabled:n,onClick:()=>c(()=>e.retake()),children:o(e.retakeTarget==="national_number"?"summary.retakeNationalNumber":"summary.retakeDocument")}):l("p",{className:"sekyro-text-muted",children:o("summary.noRetake",{org:f})})]})]})}m(Te,"IdentitySummaryView");var me=["glasses","headwear","expression","faceCamera","background","lighting","hair"];function _e({step:e,i18n:t,livenessProps:r,sekyroIntro:o}){let a=g(t),[s,i]=x(null);D(()=>e.onLivePhoto(d=>{let b=d.update?.coach;i(d.holding||b===void 0?null:t.t(`portrait.coach.${b}`))}),[e,t]);let n=e.instructions==="icao",u=e.icao?.profile==="selfie",c=C(()=>n?me.filter(d=>!u||d!=="background").map(d=>({id:d,text:a(`capture.tipsIcao.${d}`)})):void 0,[n,u,t]),f=C(()=>n&&!u?{...r.strings,"capture.tips.title":a("capture.tipsIcao.title")}:r.strings,[n,u,r.strings,t]),y=u?void 0:a("capture.tipsIcao.title"),h=C(()=>o===!0&&c!==void 0?{...r.slots,intro:m((d,b)=>l(K,{start:d,context:b,tips:c,...y!==void 0?{tipsTitle:y}:{}}),"intro")}:r.slots,[o,c,y,r.slots,t]),p=u?`${(c??[]).map(d=>d.text).join(". ")}.`:a("capture.tipsIcao.summary");return l(_,{...r,...h!==void 0?{slots:h}:{},...f!==void 0?{strings:f}:{},...c!==void 0?{tips:c,tipsSummary:p}:{},coach:s})}m(_e,"LivePhotoLiveness");function Ee({i18n:e}){let t=g(e);return k(v,{tone:"info",children:[l("strong",{children:t("portrait.retakeOnly")}),l("span",{children:t("portrait.keepCamera")})]})}m(Ee,"PortraitRetakeNotice");function Be({i18n:e,provider:t}){let r=e.strings,o=m(a=>r[a]??ce[e.locale][a]??"","pick");return l("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:t?z(o("eid.continueHint"),{provider:t}):o("eid.continueHintGeneric")})}m(Be,"EidContinueHint");async function pe(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}m(pe,"copy");function W({url:e,i18n:t,label:r}){let o=g(t),[a,s]=x("idle"),i=r.startsWith("inApp.")?"inApp":"handoff";return k("div",{className:"sekyro-stack sekyro-stack--1",children:[l(w,{kind:"ghost",onClick:()=>{pe(e).then(n=>s(n?"copied":"failed"))},children:o(r)}),l("p",{role:"status","aria-live":"polite",className:"sekyro-text-muted",children:a==="idle"?"":o(`${i}.${a==="copied"?"copied":"copyFailed"}`)})]})}m(W,"CopyLink");function Oe({url:e,i18n:t,refresh:r,footer:o}){let a=g(t),s=A(),i=C(()=>{try{return G(Q(e))}catch{return null}},[e]),n=se(r);n.current=r;let u=S();return D(()=>{let c=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&n.current?.().catch(()=>{})},5e3);return()=>clearInterval(c)},[]),k("section",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":s,"data-testid":"sekyro-handoff",children:[l("h2",{id:s,ref:u,tabIndex:-1,className:"sekyro-text-body",children:t.t("handoff.title")}),l("p",{className:"sekyro-text-muted",children:a("handoff.description")}),i!==null?k("svg",{className:"sekyro-qr",viewBox:`0 0 ${i.size} ${i.size}`,role:"img","aria-label":a("handoff.qrAlt"),shapeRendering:"crispEdges",children:[l("rect",{width:i.size,height:i.size,className:"sekyro-qr__bg"}),l("path",{d:i.d,className:"sekyro-qr__fg"})]}):null,l(W,{url:e,i18n:t,label:"handoff.copyLink"}),l("p",{className:"sekyro-text-muted",children:a("handoff.waiting")}),o??null]})}m(Oe,"HandoffView");function Ve({url:e,i18n:t,onContinue:r}){let o=g(t),a=A(),s=S();return k("section",{className:"sekyro-stack sekyro-stack--3","aria-labelledby":a,"data-testid":"sekyro-in-app",children:[l("h2",{id:a,ref:s,tabIndex:-1,className:"sekyro-text-body",children:o("inApp.title")}),l("p",{className:"sekyro-text-muted",children:o("inApp.description")}),l(W,{url:e,i18n:t,label:"inApp.copyLink"}),l(w,{kind:"ghost",onClick:r,children:o("inApp.continueAnyway")})]})}m(Ve,"InAppBrowserPrompt");export{Pe as ContactChoiceView,De as ContactSwitch,Be as EidContinueHint,Oe as HandoffView,Te as IdentitySummaryView,Ve as InAppBrowserPrompt,_e as LivePhotoLiveness,Ee as PortraitRetakeNotice};
@@ -0,0 +1,93 @@
1
+ Copyright 2009 The Cairo Project Authors (https://github.com/Gue3bara/Cairo)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font.git)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://openfontlicense.org
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.