@sekyro/elements 0.1.0-rc.31 → 0.1.0-rc.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/cdn/chunks/{capture-session-doc-2JNGYSH6-GFUM3RZY.js → capture-session-doc-2GJ726S6-2H3IPQT3.js} +1 -1
- package/dist/cdn/chunks/{chunk-V6PELUV7.js → chunk-647NLEGV.js} +1 -1
- package/dist/cdn/chunks/{chunk-5OPKZZON.js → chunk-B4B5NNWF.js} +1 -1
- package/dist/cdn/chunks/{chunk-JICBF2XL.js → chunk-C4H77SCY.js} +1 -1
- package/dist/cdn/chunks/{chunk-7V3YMJPI.js → chunk-DCDSAYG4.js} +1 -1
- package/dist/cdn/chunks/{chunk-DO66BOHU.js → chunk-ERJRG52Z.js} +1 -1
- package/dist/cdn/chunks/{chunk-HTIKUYTU.js → chunk-F3BSTTXB.js} +1 -1
- package/dist/cdn/chunks/{chunk-AKU6DWJM.js → chunk-G4FFU5ST.js} +1 -1
- package/dist/cdn/chunks/chunk-GP6QFI3S.js +33 -0
- package/dist/cdn/chunks/chunk-HOEI5HQR.js +1 -0
- package/dist/cdn/chunks/{chunk-XVHJIXFH.js → chunk-HVC5SOWQ.js} +1 -1
- package/dist/cdn/chunks/{chunk-EB2QC3GA.js → chunk-K3XSP444.js} +1 -1
- package/dist/cdn/chunks/{chunk-5AGMJYMI.js → chunk-L2THMRAZ.js} +1 -1
- package/dist/cdn/chunks/{chunk-SYUAQ7BF.js → chunk-LK5ZZB5W.js} +1 -1
- package/dist/cdn/chunks/{chunk-PWGUNXYH.js → chunk-MZETEVSB.js} +1 -1
- package/dist/cdn/chunks/chunk-PQGILDKC.js +1 -0
- package/dist/cdn/chunks/chunk-QYOVP3SU.js +1 -0
- package/dist/cdn/chunks/{chunk-SOCYEC7N.js → chunk-S67OYV2K.js} +1 -1
- package/dist/cdn/chunks/chunk-WX5XRIRN.js +1 -0
- package/dist/cdn/chunks/{chunk-4MHDMYKP.js → chunk-XVONSDHT.js} +1 -1
- package/dist/cdn/chunks/chunk-XY3RKF2D.js +3 -0
- package/dist/cdn/chunks/{create-document-capture-DNJSSCWA-M73L4ODE.js → create-document-capture-NUZAIYUH-XUGCJ7DH.js} +1 -1
- package/dist/cdn/chunks/document-capture-view-HKEUWRPE-RG7TBRYZ.js +1 -0
- package/dist/cdn/chunks/{eid-view-XM5VHPPM-6KKXEHDA.js → eid-view-Y5OFAHVC-J7PHT73P.js} +1 -1
- package/dist/cdn/chunks/{email-otp-view-RQV5WU3T-TP222TAL.js → email-otp-view-ZEVLA5UZ-EEPZQDQ2.js} +1 -1
- package/dist/cdn/chunks/flow-views-ARNNXDI4-DG6547SK.js +1 -0
- package/dist/cdn/chunks/{form-view-Z7ODA3GO-2R5H32O2.js → form-view-PQQO4VIK-UMDKNDGI.js} +1 -1
- package/dist/cdn/chunks/overlay-de-QAMFKRTE-YSXFO53C.js +1 -0
- package/dist/cdn/chunks/overlay-es-5RUP36SI-HFW77Y5Z.js +1 -0
- package/dist/cdn/chunks/overlay-pt-7EUG7TIT-FUKZ7M5O.js +1 -0
- package/dist/cdn/chunks/plan-runner-BFNZHO4C-7RPJM7XJ.js +1 -0
- package/dist/cdn/chunks/portrait-capture-view-EKCFW3YQ-RBLI5X5Y.js +1 -0
- package/dist/cdn/chunks/portrait-review-view-NKIVRFCL-UAYMHF4D.js +1 -0
- package/dist/cdn/chunks/proof-of-address-view-HYTT7NHY-2DKOEB3I.js +1 -0
- package/dist/cdn/define.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/{chunk-W4G27O4B.js → chunk-25BK7D5W.js} +1 -1
- package/dist/chunk-2Z5FHSRB.js +33 -0
- package/dist/{chunk-3DAPWPSR.js → chunk-73ETQUUL.js} +1 -1
- package/dist/{chunk-YHNEYMR2.js → chunk-B7CZCSMF.js} +1 -1
- package/dist/{chunk-BA2AJKJM.js → chunk-ENB7AFED.js} +1 -1
- package/dist/{chunk-QEDULGVW.js → chunk-FV5OWBNU.js} +1 -1
- package/dist/{chunk-SVNDR2JE.js → chunk-HFOCTDYM.js} +1 -1
- package/dist/{chunk-WQIU4I3K.js → chunk-N2BPYCKG.js} +1 -1
- package/dist/{chunk-35LCXJCF.js → chunk-N3WQ4QSD.js} +1 -1
- package/dist/chunk-NAURWQ6C.js +1 -0
- package/dist/{chunk-A5EHF3BR.js → chunk-RV6PEFNT.js} +1 -1
- package/dist/{chunk-CMJWPBX6.js → chunk-TC5736OF.js} +1 -1
- package/dist/chunk-Y7JBM2YL.js +1 -0
- package/dist/define.cjs +5 -5
- package/dist/define.js +1 -1
- package/dist/document-capture-view-HKEUWRPE-KB4IVUEE.js +1 -0
- package/dist/{eid-view-XM5VHPPM-XKR4NZTZ.js → eid-view-Y5OFAHVC-NUZ7QUBA.js} +1 -1
- package/dist/{email-otp-view-RQV5WU3T-JY72E4XM.js → email-otp-view-ZEVLA5UZ-LAXHM22A.js} +1 -1
- package/dist/flow-views-ARNNXDI4-YXYLG7SQ.js +1 -0
- package/dist/{form-view-Z7ODA3GO-2ONECUO5.js → form-view-PQQO4VIK-H7PE6SJF.js} +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +1 -1
- package/dist/overlay-de-QAMFKRTE-Q37YV6YD.js +1 -0
- package/dist/overlay-es-5RUP36SI-N7N3ULGK.js +1 -0
- package/dist/overlay-pt-7EUG7TIT-5S423QBY.js +1 -0
- package/dist/portrait-capture-view-EKCFW3YQ-7UBYR6BX.js +1 -0
- package/dist/portrait-review-view-NKIVRFCL-IP7ZWZ6B.js +1 -0
- package/dist/proof-of-address-view-HYTT7NHY-QFJ33FM2.js +1 -0
- package/dist/styles.css +3 -1
- package/package.json +2 -2
- package/sbom.cdx.json +4 -4
- package/dist/cdn/chunks/chunk-44UA2IDQ.js +0 -1
- package/dist/cdn/chunks/chunk-6T7VBPLY.js +0 -3
- package/dist/cdn/chunks/chunk-EGCT7K5E.js +0 -1
- package/dist/cdn/chunks/chunk-LBEHJATK.js +0 -1
- package/dist/cdn/chunks/chunk-PRZX4CTP.js +0 -33
- package/dist/cdn/chunks/chunk-Y6MS7VVL.js +0 -1
- package/dist/cdn/chunks/chunk-ZWGMVZWP.js +0 -1
- package/dist/cdn/chunks/document-capture-view-RFBBBM3S-MO6WL377.js +0 -1
- package/dist/cdn/chunks/flow-views-GYVML5BT-MTJUSGHX.js +0 -1
- package/dist/cdn/chunks/overlay-de-ZQRK2WPD-YEE555KF.js +0 -1
- package/dist/cdn/chunks/overlay-es-XSQAIH32-DCYWAHRS.js +0 -1
- package/dist/cdn/chunks/overlay-pt-2LMQDJ4F-EWEOFJ27.js +0 -1
- package/dist/cdn/chunks/plan-runner-JXCJC5MM-BF6RMCBJ.js +0 -1
- package/dist/cdn/chunks/portrait-capture-view-ZBOXEM6H-LSOMBP5R.js +0 -1
- package/dist/cdn/chunks/portrait-review-view-BWCMLEID-JA7RWO6C.js +0 -1
- package/dist/cdn/chunks/proof-of-address-view-LW5RYD5I-Q3UXH6YT.js +0 -1
- package/dist/chunk-H7LR746C.js +0 -33
- package/dist/chunk-JGYTOIH7.js +0 -1
- package/dist/chunk-JREXIOVU.js +0 -1
- package/dist/chunk-YLWJXCPT.js +0 -1
- package/dist/document-capture-view-RFBBBM3S-ZNPUP6QX.js +0 -1
- package/dist/flow-views-GYVML5BT-WVKFYYSN.js +0 -1
- package/dist/overlay-de-ZQRK2WPD-FMRJWQQX.js +0 -1
- package/dist/overlay-es-XSQAIH32-VTIW3L6E.js +0 -1
- package/dist/overlay-pt-2LMQDJ4F-BB366XXI.js +0 -1
- package/dist/portrait-capture-view-ZBOXEM6H-PNCYH3WV.js +0 -1
- package/dist/portrait-review-view-BWCMLEID-MAO4RY74.js +0 -1
- package/dist/proof-of-address-view-LW5RYD5I-RDTH7FUR.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{a as ot}from"./chunk-F3BSTTXB.js";import{a as We}from"./chunk-7UCVVWRT.js";import"./chunk-SIBJ56BG.js";import{a as Je,b as et,c as tt}from"./chunk-ERJRG52Z.js";import{f as at}from"./chunk-WX5XRIRN.js";import{h as Xe}from"./chunk-XY3RKF2D.js";import{a as nt}from"./chunk-PQGILDKC.js";import"./chunk-MZETEVSB.js";import{E as je,F as Qe,G as Ze,I as qe,K as Q,L as le,a as Bt,b as Et,c as A,o as Ye,q as Ke,v as D,w as _e,y as Ce}from"./chunk-K3XSP444.js";import{a as s}from"./chunk-5QL6W6FW.js";import"./chunk-HOEI5HQR.js";import"./chunk-B4B5NNWF.js";import"./chunk-QYOVP3SU.js";import"./chunk-P7K7ELYZ.js";import"./chunk-6MYG4HWP.js";import"./chunk-JS2IXPNL.js";import"./chunk-SLLJX5QK.js";import{a as l,c as Ge}from"./chunk-4FHWXBOB.js";var i=Ge(Bt(),1),n=Ge(Et(),1);var Vt={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"/>'},Ft={"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":"يبدو أن هذه بطاقة تعريف أو بطاقة إقامة"},ce={"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"},Gt={"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"},Xt={"doc.uploadInstead":"رفع صورة بدلًا من ذلك","doc.uploadTitle":"ارفع صورة لوثيقتك","doc.uploadHint":"صورة واضحة للوثيقة كاملة، ملتقطة بكاميرا.","doc.uploadUnsupported":"اختر صورة للوثيقة بصيغة JPEG أو PNG أو HEIC.","doc.uploadFailed":"تعذّر إرسال هذه الصورة. أعد المحاولة.","doc.source.title":"كيف تريد إضافة وثيقتك؟","doc.source.description":"التقط صورة بالكاميرا، أو ارفع صورة للوثيقة من هذا الجهاز.","doc.source.camera":"التقاط صورة","doc.source.upload":"رفع صورة"},de={"doc.uploadInstead":"Upload a photo instead","doc.uploadTitle":"Upload a photo of your document","doc.uploadHint":"A clear photo of the whole document, taken with a camera.","doc.uploadUnsupported":"Choose a JPEG, PNG or HEIC photo of the document.","doc.uploadFailed":"We could not send this photo. Try again.","doc.source.title":"How do you want to add your document?","doc.source.description":"Take a photo with the camera, or upload a photo of the document from this device.","doc.source.camera":"Take a photo","doc.source.upload":"Upload a photo"},Wt={"doc.uploadInstead":"Téléverser une photo à la place","doc.uploadTitle":"Téléversez une photo de votre document","doc.uploadHint":"Une photo nette du document entier, prise avec un appareil photo.","doc.uploadUnsupported":"Choisissez une photo JPEG, PNG ou HEIC du document.","doc.uploadFailed":"Nous n'avons pas pu envoyer cette photo. Réessayez.","doc.source.title":"Comment voulez-vous ajouter votre document ?","doc.source.description":"Prenez une photo avec la caméra, ou importez une photo du document depuis cet appareil.","doc.source.camera":"Prendre une photo","doc.source.upload":"Importer une photo"},Yt={"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.doc.titleOf.carte_identite":"صوّر بطاقة هويتك","native.doc.titleOf.passport":"صوّر جواز سفرك","native.doc.titleOf.residence_permit":"صوّر بطاقة إقامتك","native.doc.titleOf.drivers_license":"صوّر رخصة قيادتك","native.doc.onlyType.carte_identite":"{country}: تُقبل بطاقة الهوية فقط هنا.","native.doc.onlyType.passport":"{country}: يُقبل جواز السفر فقط هنا.","native.doc.onlyType.residence_permit":"{country}: تُقبل بطاقة الإقامة فقط هنا.","native.doc.onlyType.drivers_license":"{country}: تُقبل رخصة القيادة فقط هنا.","native.scan.closer":"اقترب قليلًا","native.scan.farther":"ابتعد قليلًا","native.scan.glare":"أمِل البطاقة قليلًا لإبعاد الانعكاس.","native.scan.dark":"الإضاءة ضعيفة. انتقل إلى مكان أفضل إضاءة أو شغّل المصباح.","native.scan.darkNoLight":"الإضاءة ضعيفة. انتقل إلى مكان أفضل إضاءة.","native.scan.blurry":"الصورة غير واضحة. ثبّت الهاتف.","native.scan.holdStill":"لا تتحرك","native.scan.reading":"جارٍ التحقق من وثيقتك…","native.scan.putDown":"يمكنك وضع وثيقتك جانبًا.","native.scan.retry":"لنحاول مرة أخرى","native.scan.seenPassport":"يبدو أن هذا جواز سفر","native.scan.seenCard":"يبدو أن هذه بطاقة هوية أو بطاقة إقامة","native.scan.showInstead.carte_identite":"أظهر بطاقة هويتك بدلًا منها","native.scan.showInstead.passport":"أظهر صفحة الصورة في جواز سفرك بدلًا منها","native.scan.showInstead.residence_permit":"أظهر بطاقة إقامتك بدلًا منها","native.scan.showInstead.drivers_license":"أظهر رخصة قيادتك بدلًا منها","native.scan.expired":"انتهت صلاحية هذه الوثيقة. امسح وثيقة سارية.","native.scan.surface":"الحواف غير واضحة. ضع البطاقة على سطح أغمق."},ue={"native.doc.introTitle":"Photograph your document","native.doc.introLead":"The photo is taken by itself once the document is in the frame.","native.doc.tip.flat":"Lay it flat on a dark surface.","native.doc.tip.glare":"Avoid glare from lights.","native.doc.tip.frame":"Keep all of it in the frame.","native.doc.openCamera":"Open the camera","native.doc.changeDocument":"Change document","native.doc.titleOf.carte_identite":"Photograph your identity card","native.doc.titleOf.passport":"Photograph your passport","native.doc.titleOf.residence_permit":"Photograph your residence permit","native.doc.titleOf.drivers_license":"Photograph your driver's license","native.doc.onlyType.carte_identite":"{country}: only an identity card is accepted here.","native.doc.onlyType.passport":"{country}: only a passport is accepted here.","native.doc.onlyType.residence_permit":"{country}: only a residence permit is accepted here.","native.doc.onlyType.drivers_license":"{country}: only a driver's license is accepted here.","native.scan.closer":"Move a little closer","native.scan.farther":"Move back a little","native.scan.glare":"Tilt the card a little to move the reflection.","native.scan.dark":"Too dark. Move to better light or turn on the light.","native.scan.darkNoLight":"Too dark. Move to better 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","native.scan.seenPassport":"This looks like a passport","native.scan.seenCard":"This looks like an identity card or residence permit","native.scan.showInstead.carte_identite":"Show your identity card instead","native.scan.showInstead.passport":"Show the photo page of your passport instead","native.scan.showInstead.residence_permit":"Show your residence permit instead","native.scan.showInstead.drivers_license":"Show your driver's license instead","native.scan.expired":"This document has expired. Scan a valid document.","native.scan.surface":"The edges are hard to see. Put the card on a darker surface."},Kt={"native.doc.introTitle":"Photographiez votre pièce","native.doc.introLead":"La photo se prend toute seule quand la pièce est bien cadrée.","native.doc.tip.flat":"Posez la pièce à plat sur fond sombre.","native.doc.tip.glare":"Évitez les reflets de lumière.","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.doc.titleOf.carte_identite":"Photographiez votre carte d'identité","native.doc.titleOf.passport":"Photographiez votre passeport","native.doc.titleOf.residence_permit":"Photographiez votre titre de séjour","native.doc.titleOf.drivers_license":"Photographiez votre permis de conduire","native.doc.onlyType.carte_identite":"{country} : seule la carte d'identité est acceptée ici.","native.doc.onlyType.passport":"{country} : seul le passeport est accepté ici.","native.doc.onlyType.residence_permit":"{country} : seul le titre de séjour est accepté ici.","native.doc.onlyType.drivers_license":"{country} : seul le permis de conduire est accepté ici.","native.scan.closer":"Approchez un peu","native.scan.farther":"Reculez un peu","native.scan.glare":"Inclinez un peu la carte pour déplacer le reflet.","native.scan.dark":"Trop sombre. Allez dans un endroit mieux éclairé ou allumez la lampe.","native.scan.darkNoLight":"Trop sombre. Allez dans un endroit mieux éclairé.","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","native.scan.seenPassport":"Ceci ressemble à un passeport","native.scan.seenCard":"Ceci ressemble à une carte d'identité ou un titre de séjour","native.scan.showInstead.carte_identite":"Montrez plutôt votre carte d'identité","native.scan.showInstead.passport":"Montrez plutôt la page photo de votre passeport","native.scan.showInstead.residence_permit":"Montrez plutôt votre titre de séjour","native.scan.showInstead.drivers_license":"Montrez plutôt votre permis de conduire","native.scan.expired":"Ce document a expiré. Scannez un document valide.","native.scan.surface":"Les bords se voient mal. Posez la carte sur une surface plus sombre."},G,rt=(G=class{constructor(){this.shown=null,this.shownAt=0,this.yielded=null,this.shownPhotos=0}present(t,a,o,r,m=0){(t===null||t.key!==this.yielded)&&(this.yielded=null);let y=this.shown;return t!==null&&this.yielded===null?y?.kind==="problem"&&y.key===t.key&&y.action===t.action?(this.shownPhotos=m,!t.blocking&&a!==null&&r-this.shownAt>=3e3?(this.yielded=t.key,this.show({kind:"hint",key:a,action:null},r,m)):y):this.show({kind:"problem",key:t.key,action:t.action},r,m):y?.kind==="problem"&&t===null&&m===this.shownPhotos&&(o||r-this.shownAt<3e3)?y:a===null?this.show(null,r):y?.kind==="hint"&&y.key===a?y:this.show({kind:"hint",key:a,action:null},r)}show(t,a,o=this.shownPhotos){return this.shown=t,this.shownAt=a,this.shownPhotos=o,t}},l(G,"_e"),G);s(rt,"NoticeBand");var jt=rt,Qt=["locking","capturing"],X,it=(X=class{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(t,a){return this.presentHint(t,a),this.presentLock(t,a),this.presentCard(t,a),this.shutterSince=t.manualShutter?this.shutterSince??a:null,this.shown={...this.shown,manualShutter:this.shutterSince!==null&&a-this.shutterSince>=1e3},this.shown}presentHint(t,a){let o=t.phase==="framing"&&!(t.hint==="blurry"&&t.card===null)?t.hint:null;if(t.phase!=="framing"){this.shown={...this.shown,hint:null},this.candidate=null;return}if(o!==this.candidate&&(this.candidate=o,this.candidateSince=a),o===this.shown.hint)return;let r=a-this.candidateSince>=(o===null?0:350),m=this.shown.hint===null||a-this.hintShownAt>=2500;r&&m&&(this.shown={...this.shown,hint:o},this.hintShownAt=a)}presentLock(t,a){if(Qt.includes(t.phase)){this.shown={...this.shown,locking:!0},this.lockLostAt=null;return}if(this.shown.locking){if(t.phase!=="framing"){this.shown={...this.shown,locking:!1},this.lockLostAt=null;return}this.lockLostAt??(this.lockLostAt=a),a-this.lockLostAt>=300&&(this.shown={...this.shown,locking:!1},this.lockLostAt=null)}}presentCard(t,a){let o=t.card;if(o===null||t.phase!=="framing"){if(t.phase!=="framing"){this.shown={...this.shown,card:null},this.detectedSince=null,this.lostSince=null;return}this.detectedSince=null,this.lostSince??(this.lostSince=a),a-this.lostSince>=300&&(this.shown={...this.shown,card:null});return}if(this.lostSince=null,this.detectedSince??(this.detectedSince=a),a-this.detectedSince<250)return;let r=this.shown.card;if(r===null){this.shown={...this.shown,card:{...o}};return}let m=.35;this.shown={...this.shown,card:{fill:r.fill+(o.fill-r.fill)*m,offsetX:r.offsetX+(o.offsetX-r.offsetX)*m,offsetY:r.offsetY+(o.offsetY-r.offsetY)*m}}}},l(X,"Ce"),X);s(it,"ScanPresenter");var Zt=it,qt={en:ue,fr:Kt,ar:Yt,es:ue,pt:ue,de:ue},Jt=450,Ne=s(e=>(t,a)=>nt(e.strings[t]??qt[e.locale][t]??"",a),"useScanCopy");function st(e,t){try{return new Intl.DisplayNames([t],{type:"region"}).of(e)??e}catch{return e}}l(st,"Ut");s(st,"regionName");function lt(e){let t=e.documentType,a=t===null?"native.doc.introTitle":`native.doc.titleOf.${t}`,o=t!==null&&e.issuer!==null&&Xe(e.documents,e.issuer).length===1;return{titleKey:a,onlyKey:o?`native.doc.onlyType.${t}`:null}}l(lt,"Et");s(lt,"introCopy");function Z({name:e}){return(0,n.jsx)("svg",{className:"sekyro-glyph",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:Vt[e]}})}l(Z,"me");s(Z,"ScanGlyph");var en={en:ce,fr:Gt,ar:Ft,es:ce,pt:ce,de:ce},tn={en:de,fr:Wt,ar:Xt,es:de,pt:de,de},nn="image/jpeg,image/png,image/heic,image/heif";function B(e){let t=e.strings,a=s(o=>t[o]??tn[e.locale][o],"text");return{t:s(o=>a(o)??"","t")}}l(B,"G");s(B,"uploadCopy");function ct(e,t){return e===null||e.state==="fallback"||e.state==="mismatch"||e.state==="expired"?null:e.state==="searching"?t?"dcv3.mrz.searching":"dcv3.mrz.showMrzSide":e.state==="valid"?"dcv3.mrz.valid":e.coach==="holdStill"?"dcv3.mrz.holdStill":"dcv3.mrz.reading"}l(ct,"Vt");s(ct,"mrzInstruction");function dt(e){return e?.state==="reading"&&e.coach!==void 0&&e.coach!=="holdStill"?`mrz:${e.coach}`:null}l(dt,"Yt");s(dt,"mrzHint");function ut(e){return e==="carte_identite"||e==="passport"||e==="residence_permit"||e==="drivers_license"?`native.scan.showInstead.${e}`:null}l(ut,"Gt");s(ut,"showInsteadKey");var an={document_type_mismatch:"doc.reason_document_type_mismatch",document_number_invalid:"doc.reason_document_number_invalid",provider_unavailable:"doc.reason_provider_unavailable",document_type_not_supported:"doc.reason_document_type_not_supported",document_sides_mismatch:"doc.reason_document_sides_mismatch",document_side_not_read:"doc.reason_document_side_not_read",document_too_dark:"doc.reason_document_too_dark",document_glare:"doc.reason_document_glare"};function he(e){if(e.reason==="unreadable")return"doc.reason_unreadable";let t=e.reason!==void 0?an[e.reason]:void 0;return t!==void 0?t:e.reason==="tester_mismatch"?"sandboxMode.mismatchDocument":e.reason!==void 0&&e.reason!=="side_missing"?Ke(e.reason):null}l(he,"xe");s(he,"reasonOf");var ht=new Set(["document_type_not_accepted","tester_mismatch","document_type_mismatch","provider_unavailable","document_type_not_supported","document_sides_mismatch","document_side_not_read"]);function on({step:e,i18n:t,liveMrz:a,barcodeAssetBaseUrl:o,ageLead:r,...m}){let[y,h]=(0,i.useState)(!1),k=(0,i.useRef)(-1),[w,_]=(0,i.useState)("idle"),$=(0,i.useRef)(null),S=typeof e.uploadDocument=="function",b=S?e.photo?.source??"camera":"camera",M=S&&b!=="camera"&&e.photo?.uploadOffered===!0,[f,E]=(0,i.useState)(null),I=b==="upload"?"upload":b==="choice"?f??e.photo?.pick??"source":"camera",O=w==="sending"?void 0:()=>$.current?.click(),g=s(async V=>{let Y=V.currentTarget.files?.[0];if(V.currentTarget.value="",Y!==void 0){h(!1),_("sending");try{await e.uploadDocument(Y),_("idle")}catch(J){_(J instanceof TypeError&&J.message==="unsupported_file"?"unsupported":"failed")}}},"onFile"),q=M?(0,n.jsx)("input",{ref:$,type:"file",accept:nn,hidden:!0,"data-testid":"sekyro-doc-upload","aria-label":B(t).t("doc.uploadTitle"),onChange:l(V=>{g(V)},"onChange")}):null,z=B(t),W=e.photo?.cameraOnPhone===!0;return I==="camera"&&W?(0,n.jsx)(at,{i18n:t,lead:t.t("handoff.lead.document"),refresh:e.refresh,actions:(0,n.jsx)(A,{kind:"ghost",full:!0,onClick:l(()=>E("upload"),"onClick"),children:z.t("doc.source.upload")})}):I==="source"?(0,n.jsx)(ot,{testId:"sekyro-doc-source",title:z.t("doc.source.title"),lead:z.t("doc.source.description"),cameraLabel:W?t.t("capture.source.phone"):z.t("doc.source.camera"),onPhone:W,uploadLabel:z.t("doc.source.upload"),notice:(0,n.jsx)(pe,{step:e,i18n:t}),onCamera:l(()=>E("camera"),"onCamera"),onUpload:l(()=>E("upload"),"onUpload")}):I==="upload"?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(vt,{step:e,i18n:t,ageLead:r===!0,upload:w,offered:M,onPick:l(()=>$.current?.click(),"onPick"),...b==="choice"?{onCamera:s(()=>E("camera"),"onCamera")}:{},...m}),q]}):(0,n.jsxs)(n.Fragment,{children:[y?(0,n.jsx)(yt,{step:e,i18n:t,attempts:k,...a!==void 0?{liveMrz:a}:{},...o!==void 0?{barcodeAssetBaseUrl:o}:{},...M&&O!==void 0?{onUpload:O}:{},onClose:l(()=>h(!1),"onClose")}):(0,n.jsx)(mt,{step:e,i18n:t,ageLead:r===!0,onOpen:l(()=>h(!0),"onOpen"),upload:w,...M&&O!==void 0?{onUpload:O}:{},...m}),q]})}l(on,"Xn");s(on,"DocumentCaptureView");function Se({passport:e}){let t=Math.round(228/(e?1.42:1.586));return(0,n.jsxs)("svg",{className:`sekyro-mark sekyro-mark--card${e?" sekyro-mark--passport":""}`,viewBox:`-12 ${e?-22:-12} 252 ${t+(e?34:24)}`,"aria-hidden":"true",focusable:"false",children:[(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"sekyro-card-clip",children:(0,n.jsx)("rect",{width:228,height:t,rx:"12.5"})})}),e?(0,n.jsx)("rect",{className:"sekyro-mark__page",x:"10",y:"-14",width:208,height:t,rx:"10"}):null,(0,n.jsx)("rect",{className:"sekyro-mark__card",width:228,height:t,rx:"12.5"}),(0,n.jsx)("rect",{className:"sekyro-mark__photo",x:"17",y:"17",width:"55",height:t*(e?.5:.62),rx:"6"}),[0,1,2].map(a=>(0,n.jsx)("rect",{className:"sekyro-mark__text",x:"88",y:23+a*t*.12,width:100-a*20,height:"6",rx:"3"},a)),e?[0,1].map(a=>(0,n.jsx)("line",{className:"sekyro-mark__code",x1:"17",x2:211,y1:t*.75+a*11,y2:t*.75+a*11},a)):(0,n.jsx)("rect",{className:"sekyro-mark__text",x:"88",y:23+3*t*.12,width:"60",height:"6",rx:"3"}),(0,n.jsx)("g",{clipPath:"url(#sekyro-card-clip)",children:(0,n.jsx)("g",{className:"sekyro-mark__read",style:{"--sekyro-read-w":"228px"},children:(0,n.jsx)("rect",{x:"-1",width:"2",height:t,className:"sekyro-mark__beam"})})}),(0,n.jsx)("path",{className:"sekyro-mark__brackets",d:pt(-10,-10,248,t+20,16,30)})]})}l(Se,"ht");s(Se,"ScanMark");function pt(e,t,a,o,r,m){let y=Math.min(r,m*.6);return[[e,t,1,1],[e+a,t,-1,1],[e,t+o,1,-1],[e+a,t+o,-1,-1]].map(([h,k,w,_])=>`M${h} ${k+_*m}V${k+_*y}Q${h} ${k} ${h+w*y} ${k}H${h+w*m}`).join("")}l(pt,"Xt");s(pt,"brackets");function mt({step:e,i18n:t,ageLead:a,onOpen:o,onChangeCountry:r,onChangeDocument:m,upload:y,onUpload:h}){let k=Ne(t),w=B(t),_=e.documentType==="passport",$=lt(e),S=he(e),b=y==="sending",M=(0,i.useContext)(Qe)?.busy===!0,f=We(e.acceptedNationalities,t);return(0,n.jsxs)("section",{className:"sekyro-step sekyro-step--doc-intro","data-testid":"sekyro-document",children:[(0,n.jsx)(Se,{passport:_}),(0,n.jsx)(_e,{title:k($.titleKey)||k("native.doc.introTitle"),lead:a?t.t("doc.ageStepUp"):k("native.doc.introLead")}),$.onlyKey!==null&&e.issuer!==null?(0,n.jsx)("p",{className:"sekyro-text-muted sekyro-doc-only",children:k($.onlyKey,{country:st(e.issuer,t.locale)})}):null,f!==null?(0,n.jsx)(Q,{tone:"info",children:f}):null,(0,n.jsx)(pe,{step:e,i18n:t}),e.reason!==void 0&&ht.has(e.reason)?null:(0,n.jsxs)("ul",{className:"sekyro-tiprows",children:[(0,n.jsxs)("li",{children:[(0,n.jsx)(D,{name:_?"passport":"card"}),k("native.doc.tip.flat")]}),(0,n.jsxs)("li",{children:[(0,n.jsx)(D,{name:"light"}),k("native.doc.tip.glare")]}),(0,n.jsxs)("li",{children:[(0,n.jsx)(Z,{name:"image"}),k("native.doc.tip.frame")]})]}),(0,n.jsx)(xe,{i18n:t,...m!==void 0?{onChangeDocument:m}:{},...r!==void 0?{onChangeCountry:r}:{}}),(0,n.jsx)($e,{i18n:t,upload:y}),b?(0,n.jsx)("p",{className:"sekyro-text-muted",role:"status",children:t.t("doc.uploading")}):h!==void 0?(0,n.jsx)("p",{className:"sekyro-text-muted",children:w.t("doc.uploadHint")}):null,(0,n.jsxs)(Ce,{children:[(0,n.jsxs)(A,{full:!0,onClick:o,disabled:b||M,children:[(0,n.jsx)(D,{name:"camera"}),k("native.doc.openCamera")]}),h!==void 0?(0,n.jsxs)(A,{full:!0,kind:"ghost",onClick:h,children:[(0,n.jsx)(Z,{name:"image"}),w.t("doc.uploadInstead")]}):null]})]})}l(mt,"Wt");s(mt,"DocumentIntro");function pe({step:e,i18n:t}){let a=he(e);return a===null&&e.reasonHidden===!0?(0,n.jsx)(Q,{tone:"info",children:(0,n.jsx)("span",{children:le(t,e.attemptsRemaining,e.attemptsExhausted)})}):a===null?null:(0,n.jsxs)(Q,{tone:"warning",children:[(0,n.jsx)("span",{children:t.t(a)}),(0,n.jsx)("span",{children:le(t,e.attemptsRemaining,e.attemptsExhausted)})]})}l(pe,"Le");s(pe,"ReasonNotice");function xe({i18n:e,onChangeCountry:t,onChangeDocument:a}){let o=Ne(e);return a===void 0&&t===void 0?null:(0,n.jsxs)("div",{className:"sekyro-links",children:[a!==void 0?(0,n.jsx)("button",{type:"button",className:"sekyro-link",onClick:a,children:o("native.doc.changeDocument")}):null,t!==void 0?(0,n.jsx)("button",{type:"button",className:"sekyro-link",onClick:t,children:e.t("native.doc.changeCountry")}):null]})}l(xe,"ft");s(xe,"ChangeLinks");function $e({i18n:e,upload:t}){return t!=="unsupported"&&t!=="failed"?null:(0,n.jsx)(Q,{tone:"warning",children:(0,n.jsx)("span",{children:B(e).t(t==="unsupported"?"doc.uploadUnsupported":"doc.uploadFailed")})})}l($e,"yt");s($e,"UploadNotice");function vt({step:e,i18n:t,ageLead:a,upload:o,offered:r,onPick:m,onCamera:y,onChangeCountry:h,onChangeDocument:k}){let w=B(t),_=o==="sending";return(0,n.jsxs)("section",{className:"sekyro-step","data-testid":"sekyro-doc-upload-screen",children:[(0,n.jsx)(Se,{passport:e.documentType==="passport"}),(0,n.jsx)(_e,{title:w.t("doc.uploadTitle"),lead:a?t.t("doc.ageStepUp"):w.t("doc.uploadHint")}),a?(0,n.jsx)("p",{className:"sekyro-text-muted",children:w.t("doc.uploadHint")}):null,(0,n.jsx)(pe,{step:e,i18n:t}),(0,n.jsx)(xe,{i18n:t,...k!==void 0?{onChangeDocument:k}:{},...h!==void 0?{onChangeCountry:h}:{}}),(0,n.jsx)($e,{i18n:t,upload:o}),_?(0,n.jsx)("p",{className:"sekyro-text-muted",role:"status",children:t.t("doc.uploading")}):null,(0,n.jsxs)(Ce,{children:[(0,n.jsxs)(A,{full:!0,onClick:m,disabled:_||!r||e.attemptsExhausted,children:[(0,n.jsx)(Z,{name:"image"}),w.t("doc.source.upload")]}),y!==void 0?(0,n.jsxs)(A,{full:!0,kind:"ghost",onClick:y,disabled:_,children:[(0,n.jsx)(D,{name:"camera"}),w.t("doc.source.camera")]}):null]})]})}l(vt,"jt");s(vt,"DocumentUploadScreen");function ze(e,t,a){let o=e*.88,r=o/a;return{x:(e-o)/2,y:t*.42-r/2,w:o,h:r}}l(ze,"ut");s(ze,"guideRect");var rn={"mrz:moveCloser":"dcv3.mrz.moveCloser","mrz:turnSideways":"dcv3.mrz.turnSideways","mrz:glare":"dcv3.mrz.glare",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",low_contrast:"native.scan.surface"},sn=s(()=>typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0,"reduceMotion");function yt({step:e,i18n:t,liveMrz:a,barcodeAssetBaseUrl:o,onClose:r,attempts:m,onUpload:y}){let h=Ne(t),k=(0,i.useContext)(Je),w=(0,i.useRef)(k);w.current=k;let _=(0,i.useRef)(null),$=(0,i.useRef)(null),S=(0,i.useRef)(null),[b,M]=(0,i.useState)("idle"),[f,E]=(0,i.useState)(null),[I,O]=(0,i.useState)(null),[g,q]=(0,i.useState)({w:0,h:0}),[z,W]=(0,i.useState)({hint:null,locking:!1,card:null,manualShutter:!1}),[V,Y]=(0,i.useState)({}),[J,Te]=(0,i.useState)({}),[Me,Le]=(0,i.useState)(null),[Pe,zt]=(0,i.useState)(null),[Ie,He]=(0,i.useState)(0),[me,Ae]=(0,i.useState)(null),[ve,Nt]=(0,i.useState)(null),[ee,St]=(0,i.useState)(0),te=(0,i.useRef)(0);te.current=ee;let[xt,De]=(0,i.useState)(0),Oe=(0,i.useRef)(0),ne=(0,i.useRef)(null);(0,i.useEffect)(()=>{De(te.current)},[e.reason,e.attemptsRemaining]);let R=e.documentType==="passport",ae=R?1.42:1.586;je(!0),(0,i.useLayoutEffect)(()=>{let d=_.current;if(d===null)return;let v=s(()=>q({w:d.clientWidth,h:d.clientHeight}),"measure");if(v(),typeof ResizeObserver>"u")return;let p=new ResizeObserver(v);return p.observe(d),()=>p.disconnect()},[]);let c=ze(g.w,g.h,ae);(0,i.useEffect)(()=>{g.w===0||g.h===0||S.current?.setGuide?.({viewAspect:g.w/g.h,rect:{x:c.x/g.w,y:c.y/g.h,width:c.w/g.w,height:c.h/g.h}})},[g.w,g.h,c.x,c.y,c.w,c.h]),(0,i.useEffect)(()=>{let d=$.current;if(d===null)return;let v=e.capture({video:d,...a!==void 0?{liveMrz:a}:{},...o!==void 0?{barcodeAssetBaseUrl:o}:{}});S.current=v,Y({}),Te({}),Le(null);let p=_.current;if(p!==null&&p.clientWidth>0&&p.clientHeight>0){let u=ze(p.clientWidth,p.clientHeight,ae);v.setGuide?.({viewAspect:p.clientWidth/p.clientHeight,rect:{x:u.x/p.clientWidth,y:u.y/p.clientHeight,width:u.w/p.clientWidth,height:u.h/p.clientHeight}})}let T=new Zt,N={scan:null,feedback:null,gate:null,mrz:null},H=s(u=>{N={...N,...u};let C=N.gate?.guide,Ut={phase:N.scan?.phase??"framing",hint:N.feedback?.reticle==="coaching"?N.feedback.key:e.documentType==="drivers_license"?null:dt(N.mrz),card:C?.detected?{fill:C.fill,offsetX:C.offsetX,offsetY:C.offsetY}:null,manualShutter:N.scan?.manualShutter??!1},K=T.present(Ut,performance.now());W(j=>j.hint===K.hint&&j.locking===K.locking&&j.manualShutter===K.manualShutter&&Ct(j.card,K.card)?j:K)},"present"),Rt=[v.on("state",M),v.on("feedback",u=>H({feedback:u})),v.on("gate",u=>H({gate:u})),v.on("scan",u=>{u.captured.length===0&&Oe.current>0&&De(te.current),Oe.current=u.captured.length,ne.current=(ne.current??u.captured).filter(C=>u.captured.includes(C)),E(u),H({scan:u})}),v.on("captured",u=>{St(C=>C+1),Y(C=>({...C,[wt(u.side,R,C)]:u.previewDataUrl})),u.photo!==void 0&&Te(C=>({...C,[u.photo]:u.previewDataUrl})),Le(u.previewDataUrl),zt(bt(d))}),v.on("error",u=>{O(u);let C=w.current;C!==null&&tt(C,et("document",u,Math.max(0,m.current)))}),v.on("mrz",u=>{u.state==="mismatch"?Nt({format:u.format??null,at:te.current}):(Ae(u),H({mrz:u}))})];return m.current+=1,v.start().catch(()=>{}),()=>{ne.current=null;for(let u of Rt)u();v.destroy(),S.current=null}},[e.issuer,e.documentType]);let L=f?.phase??"framing",P=L==="reading"||L==="result",oe=L==="flipCue"||L==="reaskRecto",U=z.locking,Re=f?.captured.length??0;(0,i.useEffect)(()=>{U&&He(d=>d+1)},[U]),(0,i.useEffect)(()=>{Re>0&&He(d=>d+1)},[Re]);let $t=f?.expected??null;(0,i.useEffect)(()=>{Ae(null)},[$t]);let ye=oe||P||e.documentType==="drivers_license"?null:ct(me,R),Ue=s(d=>t.strings[d]??en[t.locale][d],"liveText"),Tt=s(d=>d.startsWith("dcv3.")?Ue(d):h(d),"copy"),ke=ye!==null?Ue(ye):h(L==="flipCue"?"doc.flip":L==="reaskRecto"?"doc.reaskRecto":P?"native.scan.reading":L==="locking"||L==="capturing"||U?"native.scan.holdStill":R?"doc.showPage":"doc.showSide"),re=e.browserCheck??null,fe=re!==null&&P,ie=he(e),Be=s(d=>({key:h(d),action:le(t,e.attemptsRemaining,e.attemptsExhausted),blocking:e.reason!==void 0&&ht.has(e.reason)}),"reasonProblem"),Ee=ut(e.documentType),Mt=me?.state==="expired"&&!oe&&!P?{key:h("native.scan.expired"),action:null,blocking:!0}:ve!==null&&ee<=ve.at+1?{key:h(ve.format==="TD3"?"native.scan.seenPassport":"native.scan.seenCard"),action:Ee===null?null:h(Ee),blocking:!0}:f?.notice==="same_face"?{key:h("doc.sameFace"),action:null,blocking:!1}:f?.notice==="reread"?ie!==null?Be(ie):{key:h("doc.reread"),action:null,blocking:!1}:f?.notice==="technical"?{key:h("native.scan.retry"),action:null,blocking:!1}:f?.notice==="blurry"?{key:h("native.scan.blurry"),action:null,blocking:!1}:ie!==null&&ee===xt?Be(ie):null,Lt=f?.torchAvailable===!0&&f.torch!==!0?"native.scan.dark":"native.scan.darkNoLight",Pt=z.hint===null?null:Tt(z.hint==="too_dark"?Lt:rn[z.hint]??`dcv2.${z.hint}`),It=z.hint==="too_dark"&&f?.torch!==!0,Ve=kt(Mt,Pt,U||L==="capturing"||P,ee),F=z.card,x=c;if(!U&&F!==null&&F.fill>=.45&&F.fill<=1.25&&!sn()){let d=c.w*F.fill,v=d/ae,p=c.x+c.w/2+c.w*Math.max(-.25,Math.min(.25,F.offsetX)),T=c.y+c.h/2+c.h*Math.max(-.25,Math.min(.25,F.offsetY));x={x:p-d/2,y:T-v/2,w:d,h:v}}let se=c.w*.045,ge=28,Fe=Math.min(se,ge*.6),Ht=[[x.x,x.y,1,1],[x.x+x.w,x.y,-1,1],[x.x,x.y+x.h,1,-1],[x.x+x.w,x.y+x.h,-1,-1]],At=U?"is-locked":Ve!==null?"is-coaching":"",Dt=R?[{side:"single",label:"doc.progressPage"}]:[{side:"recto",label:"doc.progressFront"},{side:"verso",label:"doc.progressBack"}],Ot=c.y+c.h+16,we={insetInlineStart:c.x,insetBlockStart:c.y,inlineSize:c.w,blockSize:c.h,borderRadius:se};return(0,n.jsx)("section",{className:"sekyro-lm","aria-label":ke,"data-testid":"sekyro-document",children:(0,n.jsxs)("div",{ref:_,className:`sekyro-lm-stage${P?" is-reading":""}${oe?" is-flip":""}`,style:{"--sekyro-guide-w":`${c.w}px`},children:[(0,n.jsx)("video",{ref:$,className:"sekyro-lm-video",playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true",onPointerUp:l(d=>{let v=d.currentTarget,p=v.getBoundingClientRect(),T=Math.max(p.width/(v.videoWidth||1),p.height/(v.videoHeight||1)),N=v.videoWidth*T,H=v.videoHeight*T;N>0&&H>0&&S.current?.focusAt((d.clientX-p.left+(N-p.width)/2)/N,(d.clientY-p.top+(H-p.height)/2)/H)},"onPointerUp")}),g.w>0?(0,n.jsxs)(n.Fragment,{children:[P&&Pe!==null?(0,n.jsx)("img",{className:"sekyro-lm-scene",src:Pe,alt:""}):null,P&&Me!==null?(0,n.jsx)("img",{className:"sekyro-lm-frozen",src:Me,alt:"",style:we}):null,(0,n.jsxs)("svg",{className:"sekyro-lm-overlay",viewBox:`0 0 ${g.w} ${g.h}`,"aria-hidden":"true",focusable:"false",children:[(0,n.jsxs)("defs",{children:[(0,n.jsxs)("linearGradient",{id:"sekyro-lm-top",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,n.jsx)("stop",{offset:"0",className:"sekyro-lm-ink",stopOpacity:"0.85"}),(0,n.jsx)("stop",{offset:"1",className:"sekyro-lm-ink",stopOpacity:"0"})]}),(0,n.jsxs)("linearGradient",{id:"sekyro-lm-bottom",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,n.jsx)("stop",{offset:"0",className:"sekyro-lm-ink",stopOpacity:"0"}),(0,n.jsx)("stop",{offset:"1",className:"sekyro-lm-ink",stopOpacity:"0.9"})]})]}),(0,n.jsx)("path",{className:"sekyro-lm-scrim",fillRule:"evenodd",d:`M0 0H${g.w}V${g.h}H0Z${_t(c,se)}`}),(0,n.jsx)("rect",{width:g.w,height:Math.max(0,c.y),fill:"url(#sekyro-lm-top)"}),(0,n.jsx)("rect",{y:c.y+c.h,width:g.w,height:Math.max(0,g.h-c.y-c.h),fill:"url(#sekyro-lm-bottom)"}),(0,n.jsx)("g",{className:`sekyro-lm-brackets ${At}`,children:Ht.map(([d,v,p,T],N)=>(0,n.jsx)("path",{style:{transform:`translate(${d}px, ${v}px) scale(${p}, ${T})`},d:`M0 ${ge}V${Fe}Q0 0 ${Fe} 0H${ge}`},N))}),U?(0,n.jsx)("rect",{className:"sekyro-lm-trace",x:c.x,y:c.y,width:c.w,height:c.h,rx:se,pathLength:"1",style:{animationDuration:`${Jt}ms`}}):null]}),(0,n.jsx)("div",{className:"sekyro-lm-slot",style:we,"aria-hidden":"true",children:P?(0,n.jsx)("span",{className:"sekyro-lm-read is-repeating"}):Ie>0?(0,n.jsx)("span",{className:"sekyro-lm-read"},Ie):null})]}):null,ye!==null?(0,n.jsx)("div",{className:"sekyro-lm-slot",style:we,"aria-hidden":"true",children:(0,n.jsx)("span",{"data-testid":"sekyro-mrz-strip",className:`sekyro-lm-mrz${R?" is-page":""}${me?.state==="valid"?" is-valid":""}`})}):null,(0,n.jsx)("div",{className:"sekyro-lm-instruction",style:{insetBlockStart:c.y-64},children:(0,n.jsx)("div",{role:"status","aria-live":"polite","data-testid":"sekyro-scan-instruction",children:fe?null:(0,n.jsx)(qe,{swapKey:ke,className:"sekyro-lm-line",children:ke})})}),(0,n.jsxs)("div",{className:"sekyro-lm-below",style:{insetBlockStart:Ot,inlineSize:c.w,insetInlineStart:c.x},children:[(0,n.jsx)(ft,{band:Ve}),fe?null:P?(0,n.jsxs)("p",{className:"sekyro-lm-note",children:[(0,n.jsx)("span",{className:"sekyro-lm-spinner","aria-hidden":"true"}),h("native.scan.putDown")]}):oe?(0,n.jsx)("div",{className:`sekyro-lm-flip${L==="reaskRecto"?" is-toFront":""}`,"data-testid":"sekyro-flip-cue","aria-hidden":"true",children:(0,n.jsxs)("span",{className:"sekyro-lm-flip-card",style:{aspectRatio:String(ae)},children:[(0,n.jsx)("span",{className:"sekyro-lm-flip-front"}),(0,n.jsx)("span",{className:"sekyro-lm-flip-back"})]})}):null]}),(0,n.jsxs)("div",{className:"sekyro-lm-controls",children:[(0,n.jsxs)("div",{className:"sekyro-lm-bar",children:[(0,n.jsx)("button",{type:"button",className:"sekyro-glass","aria-label":t.t("native.close"),onClick:r,children:(0,n.jsx)(D,{name:"close"})}),f?.torchAvailable?(0,n.jsx)("button",{type:"button",className:`sekyro-glass${f.torch?" is-on":""}${It?" is-cue":""}`,"aria-label":t.t("doc.torchOn"),"aria-pressed":f.torch,onClick:l(()=>S.current?.setTorch(!f.torch),"onClick"),children:(0,n.jsx)(Z,{name:"flashlight"})}):null]}),I!==null?(0,n.jsxs)("div",{className:"sekyro-lm-error",role:"alert",children:[(0,n.jsx)("p",{children:t.t("doc.cameraBlocked")}),(0,n.jsx)("p",{children:t.t(I.kind==="permission"?"doc.cameraBlockedHint":Ye(I.kind))}),(0,n.jsx)(A,{onClick:l(()=>{O(null),m.current+=1,S.current?.retry()},"onClick"),children:t.t("doc.retryCamera")})]}):null,re!==null&&I===null?(0,n.jsxs)("div",{className:"sekyro-lm-error",role:"alert","data-testid":"sekyro-doc-browser-check",children:[(0,n.jsx)("p",{children:t.t(re.code==="clock_wrong"?"errors.device_clock":"errors.attestation_invalid")}),(0,n.jsx)(A,{onClick:re.retry,children:t.t("common.retry")})]}):null,z.manualShutter?(0,n.jsx)("button",{type:"button",className:"sekyro-shutter","aria-label":t.t("doc.shutter"),onClick:l(()=>S.current?.shutter(),"onClick")}):null,(0,n.jsx)("ol",{className:"sekyro-lm-tray",children:Dt.map(({side:d,label:v})=>{let p=f?.captured.includes(d)??!1,T=gt(d,f,J,V);return(0,n.jsxs)("li",{className:p?"is-done":void 0,"aria-current":!p&&(R||f?.expected===d)?"step":void 0,children:[p?(0,n.jsxs)("span",{className:"sekyro-lm-thumb",children:[T!==void 0?(0,n.jsx)("img",{src:T,alt:""}):(0,n.jsx)(D,{name:"card"}),(0,n.jsx)("svg",{className:"sekyro-lm-check",viewBox:"0 0 18 18","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M5 9.2l2.6 2.6L13 6.4"})})]}):null,h(v),p&&T===void 0&&ne.current?.includes(d)?(0,n.jsx)("span",{className:"sekyro-lm-received",children:h("doc.sideReceived")}):null]},d)})}),y!==void 0?(0,n.jsx)("button",{type:"button",className:"sekyro-lm-upload",onClick:y,children:B(t).t("doc.uploadInstead")}):null,b==="uploading"||b==="checking"?null:(0,n.jsx)(Ze,{onStop:r})]}),!fe&&(b==="uploading"||b==="checking")?(0,n.jsx)("span",{className:"sekyro-visually-hidden",role:"status",children:b==="uploading"?t.t("doc.uploading"):h("native.scan.reading")}):null]})})}l(yt,"Jt");s(yt,"LumiereScan");function kt(e,t,a,o){let r=(0,i.useRef)(null);r.current??(r.current=new jt);let[m,y]=(0,i.useState)(null),h=(0,i.useRef)({problem:e,hint:t,busy:a,photos:o});h.current={problem:e,hint:t,busy:a,photos:o};let k=e===null?null:`${e.blocking}|${e.key}|${e.action??""}`;return(0,i.useEffect)(()=>{let w=s(()=>{let{problem:$,hint:S,busy:b,photos:M}=h.current;y(r.current?.present($,S,b,performance.now(),M)??null)},"run");w();let _=setInterval(w,250);return()=>clearInterval(_)},[k,t,a,o]),m}l(kt,"qt");s(kt,"useNoticeBand");function ft({band:e}){let[t,a]=(0,i.useState)(e);(0,i.useEffect)(()=>{e!==null&&a(e)},[e]);let o=e??t;return(0,n.jsx)("div",{className:`sekyro-lm-band${e!==null?" is-open":""}`,"data-testid":"sekyro-scan-notice",children:(0,n.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",children:o!==null?(0,n.jsxs)("div",{className:"sekyro-notice sekyro-notice--warning","data-kind":o.kind,"aria-hidden":e===null||void 0,children:[(0,n.jsx)("span",{className:"sekyro-notice__icon","aria-hidden":"true",children:(0,n.jsx)(D,{name:"warning"})}),(0,n.jsxs)("div",{className:"sekyro-notice__body",children:[(0,n.jsx)("span",{children:o.key}),o.action!==null&&o.action!==""?(0,n.jsx)("span",{children:o.action}):null]})]}):null})})}l(ft,"en");s(ft,"NoticeBandView");function gt(e,t,a,o){if(t?.photos===void 0)return o[e];let r=t.photos[e];return r===void 0?void 0:a[r]}l(gt,"tn");s(gt,"thumbOf");function wt(e,t,a){return t?"single":e==="recto"||e==="verso"?e:a.recto===void 0?"recto":"verso"}l(wt,"nn");s(wt,"slotOf");function _t({x:e,y:t,w:a,h:o},r){return`M${e+r} ${t}H${e+a-r}Q${e+a} ${t} ${e+a} ${t+r}V${t+o-r}Q${e+a} ${t+o} ${e+a-r} ${t+o}H${e+r}Q${e} ${t+o} ${e} ${t+o-r}V${t+r}Q${e} ${t} ${e+r} ${t}Z`}l(_t,"on");s(_t,"roundedRect");var be=.004;function Ct(e,t){return e===null||t===null?e===t:Math.abs(e.fill-t.fill)<be&&Math.abs(e.offsetX-t.offsetX)<be&&Math.abs(e.offsetY-t.offsetY)<be}l(Ct,"rn");s(Ct,"sameCard");function bt(e){let t=Math.round(e.videoWidth/4),a=Math.round(e.videoHeight/4);if(t===0||a===0||typeof document>"u")return null;try{let o=document.createElement("canvas");o.width=t,o.height=a;let r=o.getContext("2d");return r===null?null:(r.drawImage(e,0,0,t,a),o.toDataURL("image/jpeg",.7))}catch{return null}}l(bt,"an");s(bt,"sceneSnapshot");export{on as DocumentCaptureView,Jt as LOCK_TRACE_MS,nn as UPLOAD_ACCEPT,ze as guideRect,lt as introCopy,dt as mrzHint,ct as mrzInstruction,Ct as sameCard,ut as showInsteadKey,wt as slotOf,gt as thumbOf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as
|
|
1
|
+
"use client";import{a as J,b as v,c as K}from"./chunk-YVQ6LFN4.js";import{a as z,b as O,c as W}from"./chunk-DCDSAYG4.js";import{a as q}from"./chunk-G4FFU5ST.js";import{f as T,g as A}from"./chunk-XY3RKF2D.js";import{a as w}from"./chunk-PQGILDKC.js";import"./chunk-MZETEVSB.js";import{H as j,K as E,a as oe,b as ce,c as N,t as U,y as R}from"./chunk-K3XSP444.js";import{a as o}from"./chunk-5QL6W6FW.js";import"./chunk-HOEI5HQR.js";import"./chunk-B4B5NNWF.js";import"./chunk-QYOVP3SU.js";import"./chunk-P7K7ELYZ.js";import"./chunk-6MYG4HWP.js";import"./chunk-JS2IXPNL.js";import"./chunk-SLLJX5QK.js";import{a as u,c as P}from"./chunk-4FHWXBOB.js";var a=P(oe(),1),i=P(ce(),1);var Q={en:v,fr:K,ar:J,es:v,pt:v,de:v},C=6,pe=new Set(["eid_identifier_invalid","eid_code_invalid","eid_locked","eid_not_enrolled"]),X=o((e,d)=>{if(e===void 0)return 0;let h=Date.parse(e)-d;return Number.isFinite(h)?Math.max(0,Math.ceil(h/1e3)):0},"secondsUntil"),me=o(e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,"mmss");function ue({step:e,i18n:d,className:h,onError:Y}){let I=d.strings,r=o((n,t)=>w(I[n]??Q[d.locale][n]??"",t),"t"),B=o((n,t)=>{let le=new Intl.PluralRules(d.locale).select(t),L=`${n}.${le}`,te=I[L]??Q[d.locale][L]??r(`${n}.other`);return w(te,{count:new Intl.NumberFormat(d.locale).format(t)})},"plural"),y=o(n=>e.providerName?r(`eid.${n}`,{provider:e.providerName}):r(`eid.${n}Generic`),"named"),[S,Z]=(0,a.useState)(""),[f,_]=(0,a.useState)(""),[c,D]=(0,a.useState)(!1),[b,p]=(0,a.useState)(null),s=e.phase==="code",F=W(s),l=(0,a.useId)(),ee=U(),[ie,ne]=z(e.reason==="eid_code_invalid",e.codeAttemptsRemaining??0,()=>_("")),m=o(async n=>{D(!0),p(null);try{await n()}catch(t){p(q(t,d.strings)),Y?.(t)}finally{D(!1)}},"run"),M=(0,a.useRef)(!1);(0,a.useEffect)(()=>{!e.identifierBound||s||e.reason!==void 0||M.current||(M.current=!0,m(()=>e.start()))},[e.identifierBound,s,e.reason]),(0,a.useEffect)(()=>{(e.reason==="eid_code_invalid"||e.codeExpiresAt!==void 0)&&_("")},[e.reason,e.codeExpiresAt,e.codeAttemptsRemaining]);let H=(0,a.useRef)(s);(0,a.useEffect)(()=>{s&&!H.current&&document.getElementById(`${l}-code`)?.focus(),H.current=s},[s,l]);let k=e.reason==="eid_locked",V=X(e.codeExpiresAt,F),x=s&&e.codeExpiresAt!==void 0&&V===0,$=X(e.resendAvailableAt,F),G=e.resendsRemaining===0||e.reason==="eid_resend_limit",re=o(n=>{if(n.preventDefault(),s){f.length===C&&!k&&m(()=>e.verify(f));return}if(e.identifierBound){m(()=>e.start());return}let t=A(S);if(e.country==="MR"){if(!/^\d{10}$/.test(t))return p("population.invalid");if(!T(t))return p("population.reason_nni_invalid")}m(()=>e.start(t))},"onSubmit"),g=e.reason?.startsWith("eid_")?e.reason:void 0,ae=(0,i.jsxs)(i.Fragment,{children:[g!==void 0?(0,i.jsxs)(E,{tone:pe.has(g)?"danger":"warning",children:[(0,i.jsx)("span",{children:r(`reasons.${g}`)}),g==="eid_code_invalid"&&e.codeAttemptsRemaining!==void 0?(0,i.jsx)("span",{children:B("eid.codeAttemptsRemaining",e.codeAttemptsRemaining)}):null,e.canUseCamera?(0,i.jsx)(N,{kind:"secondary",disabled:c,onClick:u(()=>{m(()=>e.useCamera())},"onClick"),children:r("eid.useCamera")}):null]}):null,b!==null?(0,i.jsx)(E,{tone:"danger",children:(0,i.jsx)("span",{children:d.t(b)})}):null]}),[de,se]=s?[y("codeTitle"),y("codeHelp")]:[y("identifierTitle"),y(e.identifierBound?"boundDescription":"identifierDescription")];return(0,i.jsxs)("form",{className:`sekyro-step sekyro-otp${h?` ${h}`:""}`,"aria-labelledby":l,onSubmit:re,noValidate:!0,"data-testid":"sekyro-eid",children:[(0,i.jsxs)("div",{className:"sekyro-heading",children:[(0,i.jsx)("h2",{id:l,ref:ee,tabIndex:-1,className:"sekyro-text-body",children:de}),(0,i.jsx)("p",{className:"sekyro-text-muted",children:s&&e.context.simulation!==void 0?(0,i.jsx)(j,{template:d.t("sandbox.otpHint"),code:e.context.simulation.otpCode}):se}),e.afterPass==="continue"?(0,i.jsx)("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:e.providerName?r("eid.continueHint",{provider:e.providerName}):r("eid.continueHintGeneric")}):null]}),ae,s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"sekyro-field",children:[(0,i.jsx)("label",{className:"sekyro-label",htmlFor:`${l}-code`,children:r("eid.codeLabel")}),k?(0,i.jsx)("input",{id:`${l}-code`,className:"sekyro-input sekyro-input--number",dir:"ltr",value:f,disabled:!0,readOnly:!0}):(0,i.jsx)(O,{id:`${l}-code`,value:f,length:C,invalid:ie,onChange:u(n=>{p(null),n!==""&&ne(),_(n)},"onChange")}),e.codeExpiresAt!==void 0?(0,i.jsx)("span",{className:`sekyro-help sekyro-otp-expiry${x?" is-danger":""}`,children:x?r("eid.expired"):r("eid.expiresIn",{time:me(V)})}):null]}),(0,i.jsx)("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:x?r("eid.expired"):""}),(0,i.jsxs)(R,{children:[(0,i.jsx)(N,{type:"submit",full:!0,disabled:c||f.length!==C||k,"aria-busy":c||void 0,children:r("eid.verify")}),(0,i.jsx)("div",{className:"sekyro-resend-row",children:G?(0,i.jsx)("p",{className:"sekyro-resend is-waiting",children:r("eid.noResendsLeft")}):(0,i.jsx)("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:c||$>0||k,onClick:u(()=>{m(()=>e.resend())},"onClick"),children:$>0?r("eid.resendIn",{seconds:$}):r("eid.resend")})}),!G&&e.resendsRemaining!==void 0?(0,i.jsx)("p",{className:"sekyro-help sekyro-center",children:B("eid.resendsRemaining",e.resendsRemaining)}):null]})]}):(0,i.jsxs)(i.Fragment,{children:[e.identifierBound?null:(0,i.jsxs)("div",{className:"sekyro-field",children:[(0,i.jsx)("label",{className:"sekyro-label",htmlFor:`${l}-nni`,children:d.t("population.label")}),(0,i.jsx)("input",{id:`${l}-nni`,className:"sekyro-input sekyro-input--number",dir:"ltr",inputMode:"numeric",autoComplete:"off",placeholder:d.t("population.placeholder"),value:S,"aria-describedby":`${l}-nni-help`,"aria-invalid":b==="population.invalid"||b==="population.reason_nni_invalid"||void 0,onChange:u(n=>{p(null),Z(A(n.target.value).replace(/\D/g,"").slice(0,10))},"onChange")}),(0,i.jsx)("span",{id:`${l}-nni-help`,className:"sekyro-help",children:d.t("population.helper")})]}),(0,i.jsx)(R,{children:(0,i.jsx)(N,{type:"submit",full:!0,disabled:c,"aria-busy":c||void 0,children:r("eid.start")})})]})]})}u(ue,"Ae");o(ue,"EidView");export{ue as EidView};
|
package/dist/cdn/chunks/{email-otp-view-RQV5WU3T-TP222TAL.js → email-otp-view-ZEVLA5UZ-EEPZQDQ2.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as G,b as J,c as K}from"./chunk-7V3YMJPI.js";import{a as Y}from"./chunk-AKU6DWJM.js";import"./chunk-6T7VBPLY.js";import{a as B}from"./chunk-ZWGMVZWP.js";import"./chunk-PWGUNXYH.js";import{A as P,H as j,K as h,L as U,a as de,b as me,c as x,w as F,y as T}from"./chunk-EB2QC3GA.js";import{a as n}from"./chunk-5QL6W6FW.js";import{H as W}from"./chunk-44UA2IDQ.js";import"./chunk-5OPKZZON.js";import"./chunk-EGCT7K5E.js";import"./chunk-P7K7ELYZ.js";import"./chunk-6MYG4HWP.js";import"./chunk-JS2IXPNL.js";import"./chunk-SLLJX5QK.js";import{a as p,c as A}from"./chunk-4FHWXBOB.js";var s=A(de(),1),e=A(me(),1);var pe={"emailOtp.reason_otp_daily_cap_reached":"لا يمكننا إرسال رمز إلى بريدك الإلكتروني اليوم. اختر طريقة أخرى للتحقق إن كانت متاحة، أو حاول مرة أخرى لاحقًا.","emailOtp.reason_payment_method_required":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_spend_cap_reached":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_insufficient_balance":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_account_verification_required":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.sendTitle":"تحقّق من بريدك الإلكتروني","emailOtp.sendDescription":"سنرسل إليك عبر البريد الإلكتروني رمزًا يُستخدم مرة واحدة لتأكيد أن هذا العنوان يخصّك","emailOtp.prefilledNotice":"سنرسل رمز تحقّق إلى بريدك الإلكتروني المسجّل.","emailOtp.emailLabel":"البريد الإلكتروني","emailOtp.emailHelper":"سنرسل رمزًا يُستخدم مرة واحدة إلى هذا العنوان","emailOtp.emailPlaceholder":"عنوان بريدك الإلكتروني","emailOtp.emailInvalid":"أدخل عنوان بريد إلكتروني صالحًا","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":"استخدم بريدًا إلكترونيًا دائمًا، وليس عنوانًا مؤقتًا","emailOtp.changeEmail":"تغيير البريد الإلكتروني","emailOtp.backToCode":"العودة إلى الرمز","emailOtp.reason_otp_resend_limit":"لا يمكنك طلب رموز أخرى. أدخل آخر رمز وصلك"},b={"emailOtp.reason_otp_daily_cap_reached":"We can't email you a code today. Choose another way to verify if one is offered, or try again later.","emailOtp.reason_payment_method_required":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_spend_cap_reached":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_insufficient_balance":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_account_verification_required":"This verification method is not available right now. Choose another way to verify if one is offered.","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":"Your email address","emailOtp.emailInvalid":"Enter a valid email address","emailOtp.send":"Email me a code","emailOtp.verifyTitle":"Enter the 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 later. If it keeps happening, contact the organization that asked you to verify.","emailOtp.reason_otp_rate_limited":"Too many codes were requested for this address. Try again later, or enter another address.","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","emailOtp.changeEmail":"Change email","emailOtp.backToCode":"Back to code","emailOtp.reason_otp_resend_limit":"You can't get more codes. Enter the last code you received"},ce={"emailOtp.reason_otp_daily_cap_reached":"Nous ne pouvons pas vous envoyer de code par e-mail aujourd'hui. Choisissez une autre méthode si elle est proposée, ou réessayez plus tard.","emailOtp.reason_payment_method_required":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_spend_cap_reached":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_insufficient_balance":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_account_verification_required":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.sendTitle":"Vérifiez votre 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":"Votre adresse e-mail","emailOtp.emailInvalid":"Saisissez une adresse e-mail valide","emailOtp.send":"M'envoyer un code par e-mail","emailOtp.verifyTitle":"Saisissez le code","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 plus tard. Si le problème continue, contactez l'organisation qui vous a demandé de vous vérifier.","emailOtp.reason_otp_rate_limited":"Trop de codes ont été demandés pour cette adresse. Réessayez plus tard ou saisissez une autre adresse.","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","emailOtp.changeEmail":"Changer d'adresse e-mail","emailOtp.backToCode":"Retour au code","emailOtp.reason_otp_resend_limit":"Vous ne pouvez plus demander de code. Saisissez le dernier code reçu"},ue={en:b,fr:ce,ar:pe,es:b,pt:b,de:b},Q=n((a,l,O)=>{if(a===void 0)return 0;let _=Date.parse(a)-l;return Number.isFinite(_)?Math.min(O,Math.max(0,Math.ceil(_/1e3))):0},"secondsUntil"),he=600,Oe=60,_e=n(a=>`${Math.floor(a/60)}:${String(a%60).padStart(2,"0")}`,"mmss"),X=new Set(["otp_expired","otp_send_failed","otp_rate_limited","otp_resend_limit","email_invalid","email_disposable","otp_daily_cap_reached","payment_method_required","spend_cap_reached","insufficient_balance","account_verification_required"]);function fe({step:a,i18n:l,className:O,defaultEmail:_="",onError:Z}){let i=n((t,o)=>B(l.strings[t]??ue[l.locale][t],o),"t"),[N,ee]=(0,s.useState)(_),[f,E]=(0,s.useState)(""),[r,z]=(0,s.useState)(!1),[w,q]=(0,s.useState)(null),[g,c]=(0,s.useState)(!1),[I,ae]=(0,s.useState)(null),u=(0,s.useRef)(null),v=a.phase==="verify",m=v&&!g,R=K(v),d=(0,s.useId)(),[ie,te]=G(a.reason==="otp_mismatch",a.attemptsRemaining,()=>E("")),V=v?a.codeExpiresAt??"sent":null;(0,s.useEffect)(()=>{V!==null&&(c(!1),u.current!==null&&!X.has(a.reason??"")&&ae(u.current),u.current=null)},[V]);let S=n(async t=>{z(!0),q(null);try{await t()}catch(o){q(o instanceof W&&o.field==="email"?i("emailOtp.emailInvalid"):l.t(Y(o,l.strings))),Z?.(o)}finally{z(!1)}},"run"),$=n(t=>{let o=a.needsEmail?t?I:N.trim():null;u.current=o,S(async()=>{try{await a.send(o!==null?{email:o}:{})}catch(ne){throw u.current=null,ne}})},"send"),D=n(t=>{S(()=>a.verify(t))},"submitCode"),se=n(t=>{t.preventDefault(),m?D(f):$(!1)},"onSubmit"),k=Q(a.codeExpiresAt,R,he),C=Q(a.resendAvailableAt,R,Oe),y=m&&a.codeExpiresAt!==void 0&&k===0,L=a.needsEmail&&!a.attemptsExhausted,H=v&&(a.codeExpiresAt===void 0||k>0);P(m&&L?()=>c(!0):g&&H?()=>c(!1):null,r);let[oe,le]=i("emailOtp.sentTo").split("{email}"),M=a.context.simulation?.otpCode,re=a.reason==="otp_mismatch"?(0,e.jsxs)(h,{tone:"danger",children:[(0,e.jsx)("span",{children:i("emailOtp.reason_otp_mismatch")}),(0,e.jsx)("span",{children:U(l,a.attemptsRemaining,a.attemptsExhausted)})]}):a.reason!==void 0&&X.has(a.reason)?(0,e.jsx)(h,{tone:"warning",children:(0,e.jsx)("span",{children:i(`emailOtp.reason_${a.reason}`)})}):a.reason==="tester_mismatch"?(0,e.jsx)(h,{tone:"warning",children:(0,e.jsx)("span",{children:l.t("sandboxMode.mismatchEmail")})}):null;return(0,e.jsxs)("form",{className:`sekyro-step sekyro-otp${O?` ${O}`:""}`,"aria-labelledby":d,onSubmit:se,noValidate:!0,children:[(0,e.jsx)(F,{id:d,title:i(m?"emailOtp.verifyTitle":"emailOtp.sendTitle"),lead:m&&M!==void 0?(0,e.jsx)(j,{template:l.t("sandbox.otpHint"),code:M}):m?(0,e.jsxs)(e.Fragment,{children:[oe,(0,e.jsx)("bdi",{dir:"ltr",className:"sekyro-mono",children:I??a.sentToMasked}),le]}):i("emailOtp.sendDescription")}),re,w!==null?(0,e.jsx)(h,{tone:"danger",children:(0,e.jsx)("span",{children:w})}):null,m?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"sekyro-field",children:[(0,e.jsx)("label",{className:"sekyro-label",htmlFor:`${d}-code`,children:i("emailOtp.codeLabel")}),(0,e.jsx)(J,{id:`${d}-code`,value:f,invalid:ie,onChange:p(t=>{t!==""&&te(),E(t),t.length===6&&f.length!==6&&!r&&!a.attemptsExhausted&&D(t)},"onChange")}),(0,e.jsx)("span",{className:`sekyro-help sekyro-otp-expiry${y?" is-danger":""}`,"aria-hidden":!y||void 0,children:y?i("emailOtp.expired"):i("emailOtp.expiresIn",{time:_e(k)})})]}),(0,e.jsx)("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:y?i("emailOtp.expired"):""}),(0,e.jsxs)(T,{children:[(0,e.jsx)(x,{type:"submit",full:!0,disabled:r||f.length!==6,"aria-busy":r||void 0,children:i("emailOtp.verify")}),(0,e.jsxs)("div",{className:"sekyro-resend-row",children:[(0,e.jsx)("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:r||C>0,onClick:p(()=>$(!0),"onClick"),children:C>0?i("emailOtp.resendIn",{seconds:C}):i("emailOtp.resend")}),L?(0,e.jsx)("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:r,onClick:p(()=>c(!0),"onClick"),"data-testid":"sekyro-otp-change",children:i("emailOtp.changeEmail")}):null]})]})]}):(0,e.jsxs)(e.Fragment,{children:[a.needsEmail?(0,e.jsxs)("div",{className:"sekyro-field",children:[(0,e.jsx)("label",{className:"sekyro-label",htmlFor:`${d}-email`,children:i("emailOtp.emailLabel")}),(0,e.jsx)("input",{id:`${d}-email`,className:"sekyro-input",type:"email",dir:"ltr",inputMode:"email",autoComplete:"email",autoCapitalize:"none",spellCheck:!1,placeholder:i("emailOtp.emailPlaceholder"),value:N,"aria-describedby":`${d}-email-help`,onChange:p(t=>ee(t.target.value),"onChange")}),(0,e.jsx)("span",{id:`${d}-email-help`,className:"sekyro-help",children:i("emailOtp.emailHelper")})]}):(0,e.jsx)("p",{className:"sekyro-text-muted",children:i("emailOtp.prefilledNotice")}),(0,e.jsxs)(T,{children:[(0,e.jsx)(x,{type:"submit",full:!0,disabled:r,"aria-busy":r||void 0,children:i("emailOtp.send")}),g&&H?(0,e.jsx)("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:r,onClick:p(()=>c(!1),"onClick"),"data-testid":"sekyro-otp-back-to-code",children:i("emailOtp.backToCode")}):null]})]})]})}p(fe,"Ve");n(fe,"EmailOtpView");export{fe as EmailOtpView};
|
|
1
|
+
"use client";import{a as Y,b as B,c as G}from"./chunk-DCDSAYG4.js";import{a as J}from"./chunk-G4FFU5ST.js";import"./chunk-XY3RKF2D.js";import{a as K}from"./chunk-PQGILDKC.js";import"./chunk-MZETEVSB.js";import{A as P,H as j,K as h,L as U,a as de,b as me,c as x,w as F,y as T}from"./chunk-K3XSP444.js";import{a as n}from"./chunk-5QL6W6FW.js";import{J as W}from"./chunk-HOEI5HQR.js";import"./chunk-B4B5NNWF.js";import"./chunk-QYOVP3SU.js";import"./chunk-P7K7ELYZ.js";import"./chunk-6MYG4HWP.js";import"./chunk-JS2IXPNL.js";import"./chunk-SLLJX5QK.js";import{a as p,c as A}from"./chunk-4FHWXBOB.js";var s=A(de(),1),e=A(me(),1);var pe={"emailOtp.reason_otp_daily_cap_reached":"لا يمكننا إرسال رمز إلى بريدك الإلكتروني اليوم. اختر طريقة أخرى للتحقق إن كانت متاحة، أو حاول مرة أخرى لاحقًا.","emailOtp.reason_payment_method_required":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_spend_cap_reached":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_insufficient_balance":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.reason_account_verification_required":"طريقة التحقق هذه غير متاحة حاليًا. اختر طريقة أخرى للتحقق إن كانت متاحة.","emailOtp.sendTitle":"تحقّق من بريدك الإلكتروني","emailOtp.sendDescription":"سنرسل إليك عبر البريد الإلكتروني رمزًا يُستخدم مرة واحدة لتأكيد أن هذا العنوان يخصّك","emailOtp.prefilledNotice":"سنرسل رمز تحقّق إلى بريدك الإلكتروني المسجّل.","emailOtp.emailLabel":"البريد الإلكتروني","emailOtp.emailHelper":"سنرسل رمزًا يُستخدم مرة واحدة إلى هذا العنوان","emailOtp.emailPlaceholder":"عنوان بريدك الإلكتروني","emailOtp.emailInvalid":"أدخل عنوان بريد إلكتروني صالحًا","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":"استخدم بريدًا إلكترونيًا دائمًا، وليس عنوانًا مؤقتًا","emailOtp.changeEmail":"تغيير البريد الإلكتروني","emailOtp.backToCode":"العودة إلى الرمز","emailOtp.reason_otp_resend_limit":"لا يمكنك طلب رموز أخرى. أدخل آخر رمز وصلك"},b={"emailOtp.reason_otp_daily_cap_reached":"We can't email you a code today. Choose another way to verify if one is offered, or try again later.","emailOtp.reason_payment_method_required":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_spend_cap_reached":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_insufficient_balance":"This verification method is not available right now. Choose another way to verify if one is offered.","emailOtp.reason_account_verification_required":"This verification method is not available right now. Choose another way to verify if one is offered.","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":"Your email address","emailOtp.emailInvalid":"Enter a valid email address","emailOtp.send":"Email me a code","emailOtp.verifyTitle":"Enter the 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 later. If it keeps happening, contact the organization that asked you to verify.","emailOtp.reason_otp_rate_limited":"Too many codes were requested for this address. Try again later, or enter another address.","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","emailOtp.changeEmail":"Change email","emailOtp.backToCode":"Back to code","emailOtp.reason_otp_resend_limit":"You can't get more codes. Enter the last code you received"},ce={"emailOtp.reason_otp_daily_cap_reached":"Nous ne pouvons pas vous envoyer de code par e-mail aujourd'hui. Choisissez une autre méthode si elle est proposée, ou réessayez plus tard.","emailOtp.reason_payment_method_required":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_spend_cap_reached":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_insufficient_balance":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.reason_account_verification_required":"Cette méthode de vérification n'est pas disponible pour le moment. Choisissez une autre méthode si elle est proposée.","emailOtp.sendTitle":"Vérifiez votre 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":"Votre adresse e-mail","emailOtp.emailInvalid":"Saisissez une adresse e-mail valide","emailOtp.send":"M'envoyer un code par e-mail","emailOtp.verifyTitle":"Saisissez le code","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 plus tard. Si le problème continue, contactez l'organisation qui vous a demandé de vous vérifier.","emailOtp.reason_otp_rate_limited":"Trop de codes ont été demandés pour cette adresse. Réessayez plus tard ou saisissez une autre adresse.","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","emailOtp.changeEmail":"Changer d'adresse e-mail","emailOtp.backToCode":"Retour au code","emailOtp.reason_otp_resend_limit":"Vous ne pouvez plus demander de code. Saisissez le dernier code reçu"},ue={en:b,fr:ce,ar:pe,es:b,pt:b,de:b},Q=n((a,l,O)=>{if(a===void 0)return 0;let _=Date.parse(a)-l;return Number.isFinite(_)?Math.min(O,Math.max(0,Math.ceil(_/1e3))):0},"secondsUntil"),he=600,Oe=60,_e=n(a=>`${Math.floor(a/60)}:${String(a%60).padStart(2,"0")}`,"mmss"),X=new Set(["otp_expired","otp_send_failed","otp_rate_limited","otp_resend_limit","email_invalid","email_disposable","otp_daily_cap_reached","payment_method_required","spend_cap_reached","insufficient_balance","account_verification_required"]);function fe({step:a,i18n:l,className:O,defaultEmail:_="",onError:Z}){let i=n((t,o)=>K(l.strings[t]??ue[l.locale][t],o),"t"),[N,ee]=(0,s.useState)(_),[f,E]=(0,s.useState)(""),[r,z]=(0,s.useState)(!1),[w,q]=(0,s.useState)(null),[g,c]=(0,s.useState)(!1),[I,ae]=(0,s.useState)(null),u=(0,s.useRef)(null),v=a.phase==="verify",m=v&&!g,R=G(v),d=(0,s.useId)(),[ie,te]=Y(a.reason==="otp_mismatch",a.attemptsRemaining,()=>E("")),V=v?a.codeExpiresAt??"sent":null;(0,s.useEffect)(()=>{V!==null&&(c(!1),u.current!==null&&!X.has(a.reason??"")&&ae(u.current),u.current=null)},[V]);let S=n(async t=>{z(!0),q(null);try{await t()}catch(o){q(o instanceof W&&o.field==="email"?i("emailOtp.emailInvalid"):l.t(J(o,l.strings))),Z?.(o)}finally{z(!1)}},"run"),$=n(t=>{let o=a.needsEmail?t?I:N.trim():null;u.current=o,S(async()=>{try{await a.send(o!==null?{email:o}:{})}catch(ne){throw u.current=null,ne}})},"send"),D=n(t=>{S(()=>a.verify(t))},"submitCode"),se=n(t=>{t.preventDefault(),m?D(f):$(!1)},"onSubmit"),k=Q(a.codeExpiresAt,R,he),C=Q(a.resendAvailableAt,R,Oe),y=m&&a.codeExpiresAt!==void 0&&k===0,L=a.needsEmail&&!a.attemptsExhausted,H=v&&(a.codeExpiresAt===void 0||k>0);P(m&&L?()=>c(!0):g&&H?()=>c(!1):null,r);let[oe,le]=i("emailOtp.sentTo").split("{email}"),M=a.context.simulation?.otpCode,re=a.reason==="otp_mismatch"?(0,e.jsxs)(h,{tone:"danger",children:[(0,e.jsx)("span",{children:i("emailOtp.reason_otp_mismatch")}),(0,e.jsx)("span",{children:U(l,a.attemptsRemaining,a.attemptsExhausted)})]}):a.reason!==void 0&&X.has(a.reason)?(0,e.jsx)(h,{tone:"warning",children:(0,e.jsx)("span",{children:i(`emailOtp.reason_${a.reason}`)})}):a.reason==="tester_mismatch"?(0,e.jsx)(h,{tone:"warning",children:(0,e.jsx)("span",{children:l.t("sandboxMode.mismatchEmail")})}):null;return(0,e.jsxs)("form",{className:`sekyro-step sekyro-otp${O?` ${O}`:""}`,"aria-labelledby":d,onSubmit:se,noValidate:!0,children:[(0,e.jsx)(F,{id:d,title:i(m?"emailOtp.verifyTitle":"emailOtp.sendTitle"),lead:m&&M!==void 0?(0,e.jsx)(j,{template:l.t("sandbox.otpHint"),code:M}):m?(0,e.jsxs)(e.Fragment,{children:[oe,(0,e.jsx)("bdi",{dir:"ltr",className:"sekyro-mono",children:I??a.sentToMasked}),le]}):i("emailOtp.sendDescription")}),re,w!==null?(0,e.jsx)(h,{tone:"danger",children:(0,e.jsx)("span",{children:w})}):null,m?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"sekyro-field",children:[(0,e.jsx)("label",{className:"sekyro-label",htmlFor:`${d}-code`,children:i("emailOtp.codeLabel")}),(0,e.jsx)(B,{id:`${d}-code`,value:f,invalid:ie,onChange:p(t=>{t!==""&&te(),E(t),t.length===6&&f.length!==6&&!r&&!a.attemptsExhausted&&D(t)},"onChange")}),(0,e.jsx)("span",{className:`sekyro-help sekyro-otp-expiry${y?" is-danger":""}`,"aria-hidden":!y||void 0,children:y?i("emailOtp.expired"):i("emailOtp.expiresIn",{time:_e(k)})})]}),(0,e.jsx)("span",{className:"sekyro-visually-hidden",role:"status","aria-live":"polite",children:y?i("emailOtp.expired"):""}),(0,e.jsxs)(T,{children:[(0,e.jsx)(x,{type:"submit",full:!0,disabled:r||f.length!==6,"aria-busy":r||void 0,children:i("emailOtp.verify")}),(0,e.jsxs)("div",{className:"sekyro-resend-row",children:[(0,e.jsx)("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:r||C>0,onClick:p(()=>$(!0),"onClick"),children:C>0?i("emailOtp.resendIn",{seconds:C}):i("emailOtp.resend")}),L?(0,e.jsx)("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:r,onClick:p(()=>c(!0),"onClick"),"data-testid":"sekyro-otp-change",children:i("emailOtp.changeEmail")}):null]})]})]}):(0,e.jsxs)(e.Fragment,{children:[a.needsEmail?(0,e.jsxs)("div",{className:"sekyro-field",children:[(0,e.jsx)("label",{className:"sekyro-label",htmlFor:`${d}-email`,children:i("emailOtp.emailLabel")}),(0,e.jsx)("input",{id:`${d}-email`,className:"sekyro-input",type:"email",dir:"ltr",inputMode:"email",autoComplete:"email",autoCapitalize:"none",spellCheck:!1,placeholder:i("emailOtp.emailPlaceholder"),value:N,"aria-describedby":`${d}-email-help`,onChange:p(t=>ee(t.target.value),"onChange")}),(0,e.jsx)("span",{id:`${d}-email-help`,className:"sekyro-help",children:i("emailOtp.emailHelper")})]}):(0,e.jsx)("p",{className:"sekyro-text-muted",children:i("emailOtp.prefilledNotice")}),(0,e.jsxs)(T,{children:[(0,e.jsx)(x,{type:"submit",full:!0,disabled:r,"aria-busy":r||void 0,children:i("emailOtp.send")}),g&&H?(0,e.jsx)("button",{type:"button",className:"sekyro-link sekyro-resend",disabled:r,onClick:p(()=>c(!1),"onClick"),"data-testid":"sekyro-otp-back-to-code",children:i("emailOtp.backToCode")}):null]})]})]})}p(fe,"Ve");n(fe,"EmailOtpView");export{fe as EmailOtpView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{a as Ce,b as P,c as we}from"./chunk-YVQ6LFN4.js";import{a as $,e as W,f as ge,g as Z,h as E,i as ve,j as be,k as Ae,l as K}from"./chunk-L2THMRAZ.js";import"./chunk-LK5ZZB5W.js";import{a as j}from"./chunk-G4FFU5ST.js";import"./chunk-ERJRG52Z.js";import{a as M,e as X}from"./chunk-WX5XRIRN.js";import"./chunk-XY3RKF2D.js";import{a as Q}from"./chunk-PQGILDKC.js";import"./chunk-MZETEVSB.js";import{K as N,a as We,b as je,c as x,t as B,v as z,w as ke,y as O}from"./chunk-K3XSP444.js";import{a as m}from"./chunk-5QL6W6FW.js";import{a as L}from"./chunk-HOEI5HQR.js";import"./chunk-B4B5NNWF.js";import"./chunk-QYOVP3SU.js";import"./chunk-P7K7ELYZ.js";import{c as R,f as fe}from"./chunk-6MYG4HWP.js";import"./chunk-JS2IXPNL.js";import"./chunk-SLLJX5QK.js";import{a as y,c as ye}from"./chunk-4FHWXBOB.js";var k=ye(We(),1),n=ye(je(),1);var Qe={"consent.human.terms.intro":"تؤكد Sekyro AI أن شخصًا حقيقيًا يُجري هذه الخطوة، نيابةً عن الجهة التي طلبتها.","consent.human.terms.data":"تلتقط Sekyro AI تسجيلًا قصيرًا لوجهك.","consent.human.terms.processing":"يُفحص هذا التسجيل للتأكد من أنك شخص حقيقي وحاضر، وقد يُقارَن بالوجوه التي سبق التحقق منها لدى هذه الجهة.","consent.human.terms.sharing":"تُبلَّغ الجهة التي طلبت هذا التحقق بنتيجته.","consent.human.terms.retention":"تُخزَّن بياناتك مشفّرة. وتحدّد الجهة التي طلبت هذا التحقق مدة الاحتفاظ بها. لممارسة حقوقك المتعلقة بحماية البيانات، تواصل مع تلك الجهة.","capture.noCamera.title":"تتطلب هذه الخطوة كاميرا","capture.noCamera.body":"اسمح بالوصول إلى الكاميرا وحاول مرة أخرى، أو تابع على هاتف مزوّد بكاميرا.","capture.noCamera.continue":"المتابعة بدون كاميرا","capture.noCamera.deniedTitle":"اسمح بالوصول إلى الكاميرا","capture.noCamera.deniedBody":"حظر متصفحك الوصول إلى الكاميرا في هذه الصفحة. اسمح به من إعدادات الموقع ثم أعد المحاولة.","capture.noCamera.stepsChrome":"في Chrome، اضغط على الرمز الموجود بجانب العنوان، ثم الأذونات، وفعّل الكاميرا.","capture.noCamera.stepsSamsung":"في Samsung Internet، افتح القائمة، ثم الإعدادات، المواقع والتنزيلات، أذونات المواقع، الكاميرا، واسمح لهذا الموقع.","capture.noCamera.stepsSafari":"في Safari، اضغط على زر aA في شريط العنوان، ثم إعدادات موقع الويب، واضبط الكاميرا على السماح.","capture.noCamera.stepsDesktop":"انقر على الرمز الموجود بجانب العنوان واسمح بالكاميرا لهذا الموقع.","capture.noCamera.stepsSystem":"ما زالت محظورة؟ تحقق في إعدادات هاتفك من أن متصفحك مسموح له باستخدام الكاميرا.","capture.noCamera.stillBlocked":"ما زالت الكاميرا محظورة. اتبع الخطوات أعلاه ثم أعد المحاولة.","capture.noCamera.inAppTitle":"افتح هذه الصفحة في متصفحك","capture.noCamera.inAppBody":"لا يمكن لمتصفح هذا التطبيق استخدام الكاميرا. افتح الصفحة في Chrome أو Safari للمتابعة.","choice.title":"كيف تريد المتابعة؟","choice.description":"اختر خيارًا واحدًا.","choice.switch":"استخدم خيارًا آخر","choice.changeMethod":"تغيير الطريقة","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.id_number":"رقم الهوية","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":"المتابعة هنا على أي حال","needsApp.capture.title":"تابع في التطبيق","needsApp.capture.description":"تلتقط {org} صور هذا التحقق في تطبيق للهاتف. افتحه في تطبيق {org}.","needsApp.capture.descriptionSekyro":"تلتقط {org} صور هذا التحقق في تطبيق للهاتف. افتحه في تطبيق {org} أو في تطبيق Sekyro AI.","needsApp.capture.descriptionNoOrg":"يلتقط هذا التحقق الصور في تطبيق للهاتف. افتحه في التطبيق الذي أُعطي لك.","needsApp.capture.descriptionNoOrgSekyro":"يلتقط هذا التحقق الصور في تطبيق للهاتف. افتحه في تطبيق Sekyro AI.","needsApp.capture.openSekyro":"افتح في تطبيق Sekyro AI","needsApp.capture.getApp":"احصل على تطبيق Sekyro AI","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"امسح الرمز بهاتفك لفتح هذا التحقق في التطبيق.","needsApp.capture.qrAlt":"رمز QR يفتح هذا التحقق في التطبيق","needsApp.capture.waiting":"ستنتقل هذه الصفحة تلقائيًا بعد أن تُكمل الخطوة في التطبيق","inApp.openBrowser":"افتح في المتصفح","handoff.codeNote":"يعمل الرمز مرة واحدة ولمدة 5 دقائق","handoff.newCode":"عرض رمز جديد","handoff.wrongPhone":"فتحته على الهاتف الخطأ؟ اعرض رمزًا جديدًا وامسحه بالهاتف الصحيح","testerGate.title":"إجراء فحوصات حقيقية بصفتي مختبِرًا","testerGate.body":"انظر إلى الكاميرا. يجب أن يتطابق وجهك مع أحد المختبِرين المسجَّلين لدى المؤسسة. بعد ذلك تُجري الجلسة فحوصات حقيقية.","testerGate.notice":"يُقارَن وجهك بوجوه المختبِرين المسجَّلين لدى المؤسسة. يُحتفظ بالفيديو والنتيجة مع هذه الجلسة، ويمكن للمؤسسة الاطلاع عليهما.","testerGate.start":"ابدأ","testerGate.checking":"جارٍ التحقق من وجهك","testerGate.boundTitle":"الفحوصات الحقيقية مفعّلة","testerGate.boundBody":"تم التعرّف عليك كمختبِر مسجَّل. ستُجري الخطوات التالية فحوصات حقيقية.","testerGate.missTitle":"لا يوجد مختبِر مسجَّل مطابق","testerGate.missBody":"يُحتفظ بالفيديو والنتيجة مع هذه الجلسة. يمكنك إعادة المحاولة.","testerGate.retakeTitle":"تعذّر علينا التحقق من وجهك بوضوح","testerGate.retakeBody":"لا تُحتسب هذه المحاولة. يُحتفظ بالفيديو مع هذه الجلسة. اجعل الضوء أمامك لا خلفك، وأمسك الهاتف بمستوى عينيك ووجهك في الوسط، وابقَ ثابتًا، ثم أعد المحاولة.","testerGate.livenessTitle":"لم يتم تأكيد الوجه الحي","testerGate.livenessBody":"لم تتم مقارنة وجهك بالمختبِرين بعد. اجعل الضوء أمامك لا خلفك، وأمسك الهاتف بمستوى عينيك ووجهك في الوسط، وابقَ ثابتًا. لا بأس بالنظارات. يُحتفظ بالفيديو والنتيجة مع هذه الجلسة.","testerGate.retry":"أعد المحاولة","testerGate.continue":"متابعة","testerGate.checkUnavailableTitle":"تعذّر إجراء فحص الأمان","testerGate.checkUnavailableBody":"حظر هذا المتصفح أو هذه الشبكة فحص الأمان، لذا لا يمكن بدء الفحوص الحقيقية هنا. أعد المحاولة أو افتح الرابط في متصفح آخر.","sandboxMode.title":"كيف تريد الاختبار؟","sandboxMode.testDataBody":"لا يُفحص أي شيء حقيقي. النتائج قيم اختبار.","sandboxMode.testerTitle":"فحوصات حقيقية (مختبِر مسجَّل)","sandboxMode.testerBody":"يُتحقق من وجهك أولًا. بعد ذلك يجب أن تطابق كل خطوة بيانات تسجيلك.","sandboxMode.noTestersTitle":"لا يوجد مختبِر مسجَّل","sandboxMode.noTestersBody":"لا يوجد أي مختبِر مسجَّل في هذه المؤسسة. اطلب من أحد المسؤولين أن يرسل إليك رابط تسجيل مختبِر من لوحة التحكم.","sandboxMode.continueTestData":"المتابعة باستخدام بيانات الاختبار","sandboxMode.boundTitle":"الفحوصات الحقيقية مفعّلة لـ {name}","sandboxMode.summaryTestDataBody":"هذه الهوية وهمية. وهي لا تطابق الرقم الذي أدخلته."},q={"consent.human.terms.intro":"Sekyro AI confirms that a real person is completing this step, on behalf of the organization that asked for it.","consent.human.terms.data":"Sekyro AI collects a short capture of your face.","consent.human.terms.processing":"The capture is checked to confirm that you are a real person who is present. It may be compared with faces already verified for this organization.","consent.human.terms.sharing":"The organization that requested this verification learns its outcome.","consent.human.terms.retention":"Your data is stored encrypted. The organization that requested this verification sets how long it is kept. To exercise your data-protection rights, contact that organization.","capture.noCamera.title":"This step needs a camera","capture.noCamera.body":"Allow camera access and try again, or continue on a phone with a camera.","capture.noCamera.continue":"Continue without a camera","capture.noCamera.deniedTitle":"Allow camera access","capture.noCamera.deniedBody":"Your browser blocked the camera for this page. Allow it in the site settings, then try again.","capture.noCamera.stepsChrome":"In Chrome, tap the icon to the left of the address, then Permissions, and turn on Camera.","capture.noCamera.stepsSamsung":"In Samsung Internet, open the menu, then Settings, Sites and downloads, Site permissions, Camera, and allow this site.","capture.noCamera.stepsSafari":"In Safari, tap the aA button in the address bar, then Website Settings, and set Camera to Allow.","capture.noCamera.stepsDesktop":"Click the icon to the left of the address and allow the camera for this site.","capture.noCamera.stepsSystem":"Still blocked? In your phone's settings, check that your browser may use the camera.","capture.noCamera.stillBlocked":"The camera is still blocked. Follow the steps above, then try again.","capture.noCamera.inAppTitle":"Open this page in your browser","capture.noCamera.inAppBody":"This app's browser can't use your camera. Open the page in Chrome or Safari to continue.","choice.title":"Choose how to continue","choice.description":"Choose one option.","choice.switch":"Use another option","choice.changeMethod":"Change method","contact.title":"Where to send 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":"Mauritanian national ID number (NNI)","summary.id_number":"ID number","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. Scan the code with your phone instead","handoff.waiting":"This page moves on by itself once you finish on your phone","inApp.title":"Open 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","needsApp.capture.title":"Continue in the app","needsApp.capture.description":"{org} takes the photos for this verification in a mobile app. Open it in {org}'s app.","needsApp.capture.descriptionSekyro":"{org} takes the photos for this verification in a mobile app. Open it in {org}'s app or in the Sekyro AI app.","needsApp.capture.descriptionNoOrg":"This verification takes the photos in a mobile app. Open it in the app you were given.","needsApp.capture.descriptionNoOrgSekyro":"This verification takes the photos in a mobile app. Open it in the Sekyro AI app.","needsApp.capture.openSekyro":"Open in the Sekyro AI app","needsApp.capture.getApp":"Get the Sekyro AI app","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"Scan with your phone to open this verification in the app.","needsApp.capture.qrAlt":"QR code that opens this verification in the app","needsApp.capture.waiting":"This page moves on when you finish in the app","inApp.openBrowser":"Open in browser","handoff.codeNote":"The code works once and for 5 minutes","handoff.newCode":"Show a new code","handoff.wrongPhone":"Opened on the wrong phone? Show a new code and scan it with the right one","testerGate.title":"Run real checks as a tester","testerGate.body":"Look at the camera. Your face must match one of the organization's enrolled testers. Then the session runs real checks.","testerGate.notice":"Your face is compared with the organization's enrolled testers. The video and the result are kept with this session, and the organization can see them.","testerGate.start":"Start","testerGate.checking":"Checking your face","testerGate.boundTitle":"Real checks are on","testerGate.boundBody":"You were recognised as an enrolled tester. The next steps run real checks.","testerGate.missTitle":"No enrolled tester matched","testerGate.missBody":"The video and the result are kept with this session. You can try again.","testerGate.retakeTitle":"We couldn't check your face clearly","testerGate.retakeBody":"This try doesn't count. The video is kept with this session. Have the light in front of you, not behind, hold the phone at eye level with your face centred, keep still, and try again.","testerGate.livenessTitle":"Live face not confirmed","testerGate.livenessBody":"Your face wasn't compared with the testers yet. Have the light in front of you, not behind, hold the phone at eye level with your face centred, and keep still. Glasses are fine. The video and the result are kept with this session.","testerGate.retry":"Try again","testerGate.continue":"Continue","testerGate.checkUnavailableTitle":"The security check could not run","testerGate.checkUnavailableBody":"This browser or network blocked the security check, so real checks cannot start here. Try again, or open the link in another browser.","sandboxMode.title":"How do you want to test?","sandboxMode.testDataBody":"Nothing real is checked. The results are test values.","sandboxMode.testerTitle":"Real checks (enrolled tester)","sandboxMode.testerBody":"Your face is checked first. Then every step must match your enrollment details.","sandboxMode.noTestersTitle":"No enrolled tester","sandboxMode.noTestersBody":"No tester is enrolled in this organization. Ask an admin to send you a tester enrollment link from the dashboard.","sandboxMode.continueTestData":"Continue with test data","sandboxMode.boundTitle":"Real checks are on for {name}","sandboxMode.summaryTestDataBody":"This identity is made up. It doesn't match the number you typed."},Ze={"consent.human.terms.intro":"Sekyro AI confirme qu'une personne réelle effectue cette étape, pour le compte de l'organisme qui l'a demandée.","consent.human.terms.data":"Sekyro AI recueille une courte capture de votre visage.","consent.human.terms.processing":"La capture est analysée pour confirmer que vous êtes une personne réelle et présente. Elle peut être comparée aux visages déjà vérifiés pour cet organisme.","consent.human.terms.sharing":"L'organisme qui a demandé cette vérification est informé de son résultat.","consent.human.terms.retention":"Vos données sont stockées chiffrées. L'organisme qui a demandé cette vérification fixe leur durée de conservation. Pour exercer vos droits en matière de protection des données, contactez cet organisme.","capture.noCamera.title":"Une caméra est nécessaire","capture.noCamera.body":"Autorisez l'accès à la caméra et réessayez, ou continuez sur un téléphone équipé d'une caméra.","capture.noCamera.continue":"Continuer sans caméra","capture.noCamera.deniedTitle":"Autorisez la caméra","capture.noCamera.deniedBody":"Votre navigateur a bloqué la caméra pour cette page. Autorisez-la dans les paramètres du site, puis réessayez.","capture.noCamera.stepsChrome":"Dans Chrome, touchez l'icône à gauche de l'adresse, puis Autorisations, et activez Caméra.","capture.noCamera.stepsSamsung":"Dans Samsung Internet, ouvrez le menu, puis Paramètres, Sites et téléchargements, Autorisations des sites, Appareil photo, et autorisez ce site.","capture.noCamera.stepsSafari":"Dans Safari, touchez le bouton aA de la barre d'adresse, puis Réglages du site web, et réglez Caméra sur Autoriser.","capture.noCamera.stepsDesktop":"Cliquez sur l'icône à gauche de l'adresse et autorisez la caméra pour ce site.","capture.noCamera.stepsSystem":"Toujours bloquée ? Dans les réglages du téléphone, vérifiez que votre navigateur peut utiliser la caméra.","capture.noCamera.stillBlocked":"La caméra est toujours bloquée. Suivez les étapes ci-dessus, puis réessayez.","capture.noCamera.inAppTitle":"Ouvrez cette page dans votre navigateur","capture.noCamera.inAppBody":"Le navigateur de cette application ne peut pas utiliser votre caméra. Ouvrez la page dans Chrome ou Safari pour continuer.","choice.title":"Comment continuer ?","choice.description":"Choisissez une option.","choice.switch":"Utiliser une autre option","choice.changeMethod":"Changer de méthode","contact.title":"Où envoyer 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 mauritanien (NNI)","summary.id_number":"Numéro d'identité","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":"Impossible de copier le lien. Scannez plutôt le code avec votre téléphone","handoff.waiting":"Cette page avancera d’elle-même une fois l’étape terminée sur votre téléphone","inApp.title":"Ouvrez dans le 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","needsApp.capture.title":"Continuez dans l’application","needsApp.capture.description":"{org} prend les photos de cette vérification dans une application mobile. Ouvrez-la dans l’application de {org}.","needsApp.capture.descriptionSekyro":"{org} prend les photos de cette vérification dans une application mobile. Ouvrez-la dans l’application de {org} ou dans l’application Sekyro AI.","needsApp.capture.descriptionNoOrg":"Cette vérification prend les photos dans une application mobile. Ouvrez-la dans l’application que l’on vous a indiquée.","needsApp.capture.descriptionNoOrgSekyro":"Cette vérification prend les photos dans une application mobile. Ouvrez-la dans l’application Sekyro AI.","needsApp.capture.openSekyro":"Ouvrir dans l’application Sekyro AI","needsApp.capture.getApp":"Obtenir l’application Sekyro AI","needsApp.capture.appStore":"App Store","needsApp.capture.googlePlay":"Google Play","needsApp.capture.scan":"Scannez avec votre téléphone pour ouvrir cette vérification dans l’application.","needsApp.capture.qrAlt":"QR code qui ouvre cette vérification dans l’application","needsApp.capture.waiting":"Cette page avancera d’elle-même une fois l’étape terminée dans l’application","inApp.openBrowser":"Ouvrir dans le navigateur","handoff.codeNote":"Le code fonctionne une seule fois, pendant 5 minutes","handoff.newCode":"Afficher un nouveau code","handoff.wrongPhone":"Ouvert sur le mauvais téléphone ? Affichez un nouveau code et scannez-le avec le bon","testerGate.title":"Lancer de vrais contrôles en tant que testeur","testerGate.body":"Regardez la caméra. Votre visage doit correspondre à l'un des testeurs inscrits de l'organisation. Ensuite, la session lance de vrais contrôles.","testerGate.notice":"Votre visage est comparé à ceux des testeurs inscrits de l'organisation. La vidéo et le résultat sont conservés avec cette session, et l'organisation peut les voir.","testerGate.start":"Commencer","testerGate.checking":"Vérification de votre visage","testerGate.boundTitle":"Les vrais contrôles sont activés","testerGate.boundBody":"Vous avez été reconnu comme testeur inscrit. Les étapes suivantes lancent de vrais contrôles.","testerGate.missTitle":"Aucun testeur inscrit ne correspond","testerGate.missBody":"La vidéo et le résultat sont conservés avec cette session. Vous pouvez réessayer.","testerGate.retakeTitle":"Nous n'avons pas pu vérifier votre visage clairement","testerGate.retakeBody":"Cet essai ne compte pas. La vidéo est conservée avec cette session. Placez la lumière devant vous et non derrière, tenez le téléphone à hauteur des yeux, le visage centré, restez immobile et réessayez.","testerGate.livenessTitle":"Visage en direct non confirmé","testerGate.livenessBody":"Votre visage n'a pas encore été comparé aux testeurs. Placez la lumière devant vous et non derrière, tenez le téléphone à hauteur des yeux, le visage centré, et restez immobile. Les lunettes ne posent pas de problème. La vidéo et le résultat sont conservés avec cette session.","testerGate.retry":"Réessayer","testerGate.continue":"Continuer","testerGate.checkUnavailableTitle":"Le contrôle de sécurité n’a pas pu s’exécuter","testerGate.checkUnavailableBody":"Ce navigateur ou ce réseau a bloqué le contrôle de sécurité, les vérifications réelles ne peuvent donc pas démarrer ici. Réessayez ou ouvrez le lien dans un autre navigateur.","sandboxMode.title":"Comment voulez-vous tester ?","sandboxMode.testDataBody":"Rien de réel n'est contrôlé. Les résultats sont des valeurs de test.","sandboxMode.testerTitle":"Vrais contrôles (testeur inscrit)","sandboxMode.testerBody":"Votre visage est vérifié d'abord. Ensuite chaque étape doit correspondre à vos données d'inscription.","sandboxMode.noTestersTitle":"Aucun testeur inscrit","sandboxMode.noTestersBody":"Aucun testeur n'est inscrit dans cette organisation. Demandez à un administrateur de vous envoyer un lien d'inscription testeur depuis le tableau de bord.","sandboxMode.continueTestData":"Continuer avec des données de test","sandboxMode.boundTitle":"Vrais contrôles activés pour {name}","sandboxMode.summaryTestDataBody":"Cette identité est fictive. Elle ne correspond pas au numéro saisi."},Ne={M:{perBlock:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26],blocks:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16],formatBits:0},H:{perBlock:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28],blocks:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25],formatBits:2}},xe=20;function Me(e){let t=(16*e+128)*e+64;if(e>=2){let r=Math.floor(e/7)+2;t-=(25*r-10)*r-55,e>=7&&(t-=36)}return t}y(Me,"Fe");m(Me,"rawDataModules");function ee(e,t){let{perBlock:r,blocks:a}=Ne[t],o=r[e-1],s=a[e-1],l=Math.floor(Me(e)/8),c=s-l%s,i=Math.floor(l/s)-o;return[o,c===s?[[s,i]]:[[c,i],[s-c,i+1]]]}y(ee,"Se");m(ee,"blockLayout");var J=m((e,t)=>ee(e,t)[1].reduce((r,[a,o])=>r+a*o,0),"dataCapacity");function U(e,t){let r=0;for(let a=7;a>=0;a-=1)r=r<<1^(r>>>7)*285,r^=(t>>>a&1)*e;return r&255}y(U,"te");m(U,"gfMul");function Ie(e){let t=new Array(e).fill(0);t[e-1]=1;let r=1;for(let a=0;a<e;a+=1){for(let o=0;o<e;o+=1)t[o]=U(t[o],r),o+1<e&&(t[o]=t[o]^t[o+1]);r=U(r,2)}return t}y(Ie,"He");m(Ie,"rsDivisor");function _e(e,t){let r=t.map(()=>0);for(let a of e){let o=a^r.shift();r.push(0),t.forEach((s,l)=>{r[l]=r[l]^U(s,o)})}return r}y(_e,"Ee");m(_e,"rsRemainder");function ze(e,t,r){let a=[],o=m((d,u)=>{for(let A=u-1;A>=0;A-=1)a.push(d>>>A&1)},"put");o(4,4),o(e.length,t<10?8:16);for(let d of e)o(d,8);let s=J(t,r)*8;o(0,Math.min(4,s-a.length)),o(0,(8-a.length%8)%8);let l=[];for(let d=0;d<a.length;d+=8)l.push(a.slice(d,d+8).reduce((u,A)=>u<<1|A,0));for(let d=236;l.length<J(t,r);d^=253)l.push(d);let[c,i]=ee(t,r),h=Ie(c),p=[],f=0;for(let[d,u]of i)for(let A=0;A<d;A+=1){let b=l.slice(f,f+u);f+=u,p.push({data:b,ec:_e(b,h)})}let g=[],v=Math.max(...p.map(d=>d.data.length));for(let d=0;d<v;d+=1)for(let u of p)d<u.data.length&&g.push(u.data[d]);for(let d=0;d<c;d+=1)for(let u of p)g.push(u.ec[d]);return g}y(ze,"$e");m(ze,"codewords");function te(e){if(e===1)return[];let t=Math.floor(e/7)+2,r=Math.ceil((e*4+4)/(t*2-2))*2,a=[6];for(let o=e*4+10;a.length<t;o-=r)a.splice(1,0,o);return a}y(te,"Ce");m(te,"alignmentPositions");var Ke=[(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],G,Ee=(G=class{constructor(t){this.size=t,this.dark=new Array(t*t).fill(!1),this.fixed=new Array(t*t).fill(!1)}set(t,r,a){this.dark[t*this.size+r]=a,this.fixed[t*this.size+r]=!0}get(t,r){return this.dark[t*this.size+r]===!0}},y(G,"oe"),G);m(Ee,"Grid");var Xe=Ee;function Ge(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,l]of[[3,3],[3,r-4],[r-4,3]])for(let c=-4;c<=4;c+=1)for(let i=-4;i<=4;i+=1){let h=s+c,p=l+i;if(h<0||h>=r||p<0||p>=r)continue;let f=Math.max(Math.abs(c),Math.abs(i));e.set(h,p,f!==2&&f!==4)}let a=te(t),o=a.length-1;if(a.forEach((s,l)=>a.forEach((c,i)=>{if(!(l===0&&i===0||l===0&&i===o||l===o&&i===0))for(let h=-2;h<=2;h+=1)for(let p=-2;p<=2;p+=1)e.set(s+h,c+p,Math.max(Math.abs(h),Math.abs(p))!==1)})),ae(e,0),t>=7){let s=t;for(let c=0;c<12;c+=1)s=s<<1^(s>>>11)*7973;let l=t<<12|s;for(let c=0;c<18;c+=1){let i=(l>>>c&1)===1,h=r-11+c%3,p=Math.floor(c/3);e.set(h,p,i),e.set(p,h,i)}}}y(Ge,"qe");m(Ge,"drawFunctionPatterns");function ae(e,t,r=0){let a=e.size,o=r<<3|t,s=o;for(let i=0;i<10;i+=1)s=s<<1^(s>>>9)*1335;let l=(o<<10|s)^21522,c=m(i=>(l>>>i&1)===1,"bit");for(let i=0;i<=5;i+=1)e.set(i,8,c(i));e.set(7,8,c(6)),e.set(8,8,c(7)),e.set(8,7,c(8));for(let i=9;i<15;i+=1)e.set(8,14-i,c(i));for(let i=0;i<8;i+=1)e.set(8,a-1-i,c(i));for(let i=8;i<15;i+=1)e.set(a-15+i,8,c(i));e.set(a-8,8,!0)}y(ae,"xe");m(ae,"drawFormat");function De(e,t){let r=e.size,a=0;for(let o=r-1;o>=1;o-=2){o===6&&(o=5);for(let s=0;s<r;s+=1)for(let l=0;l<2;l+=1){let c=o-l,i=(o+1&2)===0?r-1-s:s;e.fixed[i*r+c]!==!0&&(a<t.length*8&&(e.dark[i*r+c]=(t[a>>>3]>>>7-(a&7)&1)===1),a+=1)}}}y(De,"Qe");m(De,"placeData");function Re(e,t){let r=Ke[t];for(let a=0;a<e.size;a+=1)for(let o=0;o<e.size;o+=1)e.fixed[a*e.size+o]!==!0&&r(a,o)&&(e.dark[a*e.size+o]=!e.dark[a*e.size+o])}y(Re,"Ye");m(Re,"applyMask");function Le(e){let t=e.size,r=0,a=m(s=>{let l=1;for(let c=1;c<=t;c+=1)c<t&&s(c)===s(c-1)?l+=1:(l>=5&&(r+=3+(l-5)),l=1);for(let c=0;c+10<t;c+=1){let i=[!0,!1,!0,!0,!0,!1,!0];if(!(i.every((f,g)=>s(c+g)===f)||i.every((f,g)=>s(c+4+g)===f)))continue;let h=[0,1,2,3].every(f=>!s(c+f))&&i.every((f,g)=>s(c+4+g)===f),p=i.every((f,g)=>s(c+g)===f)&&[7,8,9,10].every(f=>!s(c+f));h&&(r+=40),p&&(r+=40)}},"line");for(let s=0;s<t;s+=1)a(l=>e.get(s,l));for(let s=0;s<t;s+=1)a(l=>e.get(l,s));for(let s=0;s+1<t;s+=1)for(let l=0;l+1<t;l+=1){let c=e.get(s,l);c===e.get(s,l+1)&&c===e.get(s+1,l)&&c===e.get(s+1,l+1)&&(r+=3)}let o=e.dark.filter(Boolean).length;return r+=Math.floor(Math.abs(o*20-t*t*10)/(t*t))*10,r}y(Le,"Ke");m(Le,"penalty");function Be(e,t={}){let r=t.ecl??"M",a=new TextEncoder().encode(e),o=1;for(;o<=xe&&!(4+(o<10?8:16)+a.length*8<=J(o,r)*8);o+=1);if(o>xe)throw new RangeError("text too long for a QR code");let s=ze(a,o,r),l=m(h=>{let p=new Xe(o*4+17);return Ge(p,o),De(p,s),Re(p,h),ae(p,h,Ne[r].formatBits),p},"build"),c=null;if(t.mask!==void 0)c=l(t.mask);else{let h=Number.POSITIVE_INFINITY;for(let p=0;p<8;p+=1){let f=l(p),g=Le(f);g<h&&(h=g,c=f)}}let i=c;return{size:i.size,get:m((h,p)=>i.get(h,p),"get")}}y(Be,"Ne");m(Be,"encodeQr");var Je={viewBox:"0 0 100 100",d:"M22.37,0H77.63A22.37,22.37 0 0 1 100,22.37V77.63A22.37,22.37 0 0 1 77.63,100H22.37A22.37,22.37 0 0 1 0,77.63V22.37A22.37,22.37 0 0 1 22.37,0ZM48.067,21H38.308A17.308,17.308 0 0 0 21,38.308V42.543A19.886,19.886 0 0 0 40.886,62.429H60.219V57.641A4.419,4.419 0 0 0 55.8,53.222H43.463A11.416,11.416 0 0 1 32.048,41.806V38.308A8.102,8.102 0 0 1 40.149,30.206H43.648A4.419,4.419 0 0 0 48.067,25.787ZM38.676,79H59.114A19.886,19.886 0 0 0 79,59.114V57.457A19.886,19.886 0 0 0 59.114,37.571H38.676V42.359A4.419,4.419 0 0 0 43.095,46.778H56.537A11.416,11.416 0 0 1 67.952,58.194V58.378A11.416,11.416 0 0 1 56.537,69.794H43.095A4.419,4.419 0 0 0 38.676,74.213ZM51.933,21H79V37.571H69.794V30.206H51.933ZM21,71.543A7.457,7.457 0 1 0 35.914,71.543A7.457,7.457 0 1 0 21,71.543Z"},V=.42,et=.2,C=m(e=>{let t=Math.round(e*1e3)/1e3;return String(t===0?0:t)},"num");function I(e,t,r,a){let o=`A${C(a)} ${C(a)} 0 0 1 `;return`M${C(e+a)} ${C(t)}H${C(e+r-a)}${o}${C(e+r)} ${C(t+a)}V${C(t+r-a)}${o}${C(e+r-a)} ${C(t+r)}H${C(e+a)}${o}${C(e)} ${C(t+r-a)}V${C(t+a)}${o}${C(e+a)} ${C(t)}Z`}y(I,"R");m(I,"roundedSquare");function Oe(e){let t=(e-17)/4,r=te(t),a=r.length-1,o=[];return r.forEach((s,l)=>r.forEach((c,i)=>{l===0&&i===0||l===0&&i===a||l===a&&i===0||o.push([s,c])})),o}y(Oe,"Ze");m(Oe,"alignmentCentres");function Pe(e,{quiet:t=4,logo:r=!1}={}){let a=e.size,o=m((d,u)=>d<7&&u<7||d<7&&u>=a-7||d>=a-7&&u<7,"isFinder"),s=Math.floor(a*et),l=r?s%2===0?s-1:s:0,c=(a-l)/2,i=m((d,u)=>l>0&&d>=c&&d<c+l&&u>=c&&u<c+l,"inZone"),h=Oe(a).filter(([d,u])=>!i(d,u)),p=m((d,u)=>h.some(([A,b])=>Math.abs(d-A)<=2&&Math.abs(u-b)<=2),"isAlign"),f=`a${C(V)} ${C(V)} 0 1 0 `,g="";for(let d=0;d<a;d+=1)for(let u=0;u<a;u+=1)!e.get(d,u)||o(d,u)||p(d,u)||i(d,u)||(g+=`M${C(u+t+.5-V)} ${C(d+t+.5)}${f}${C(2*V)} 0${f}${C(-2*V)} 0Z`);let v="";for(let[d,u]of[[0,0],[0,a-7],[a-7,0]]){let A=u+t,b=d+t;v+=I(A,b,7,1.6)+I(A+1,b+1,5,.6)+I(A+2,b+2,3,.6)}for(let[d,u]of h){let A=u-2+t,b=d-2+t;v+=I(A,b,5,1.2)+I(A+1,b+1,3,.5)+I(A+2,b+2,1,.5)}return{size:a+t*2,dots:g,finders:v,logo:l>0?{x:c+t+.5,y:c+t+.5,size:l-1}:null}}y(Pe,"Ie");m(Pe,"styledQr");function Ve(e){let t=Math.round(e.size/100*1e5)/1e5;return`translate(${C(e.x)} ${C(e.y)}) scale(${t})`}y(Ve,"Me");m(Ve,"qrLogoTransform");var tt={en:q,fr:Ze,ar:Qe,es:q,pt:q,de:q},at={en:P,fr:we,ar:Ce,es:P,pt:P,de:P};function w(e){let t=e.strings;return(r,a)=>Q(t[r]??tt[e.locale][r]??"",a)}y(w,"A");m(w,"flowT");function re(e,t){let r=w(t);return e.flatMap(a=>{let o=a.service==="phone_otp"?r("contact.phone"):a.service==="email_otp"?r("contact.email"):Z(a,t),s=ge[a.service];return o===null?[]:[{id:a.id,label:o,...s!==void 0?{glyph:(0,n.jsx)(z,{name:s})}:{}}]})}y(re,"Pe");m(re,"labelled");function ne({step:e,i18n:t,onError:r}){let a=w(t),{busy:o,error:s,run:l}=E(t,r),c=e.kind==="contact_choice";return(0,n.jsx)($,{title:a(c?"contact.title":"choice.title"),description:a(c?"contact.description":"choice.description"),options:re(e.choice.options,t),busy:o,error:s,focus:!0,testId:c?"sekyro-contact-choice":"sekyro-choice",onChoose:y(i=>l(()=>e.choose(i)),"onChoose")})}y(ne,"_e");m(ne,"PlanChoiceView");var Ut=ne,Ft=ne;function rt({step:e,i18n:t,onError:r,onOpen:a}){let o=w(t),{busy:s,error:l,run:c}=E(t,r),i=e,h=e.context.switchable,p=h===void 0?[]:h.options.filter(b=>b.id!==h.current),f=i.kind==="registry"&&(i.reason==="nni_not_found"||i.reason==="registry_record_not_found")&&i.canUseDocument||i.kind==="eid"&&i.reason?.startsWith("eid_")&&i.canUseCamera;if(h===void 0||p.length===0||i.chooseOption===void 0||f)return null;let g=h.kind==="identity_method",v=!g&&p.length===1?p[0]:void 0,d=v!==void 0&&(v.service==="phone_otp"||v.service==="email_otp"),u=v===void 0?void 0:d&&i.canSwitch&&i.switchTo!==void 0?()=>i.switchTo.call(e):()=>i.chooseOption.call(e,v.id),A=g?o("choice.changeMethod"):v===void 0?o("choice.switch"):d?o("contact.switch"):Z(v,t);return A===null?null:(0,n.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[l!==null?(0,n.jsx)(N,{tone:"danger",children:(0,n.jsx)("span",{children:l})}):null,(0,n.jsx)(x,{kind:"secondary",disabled:s,"aria-busy":s||void 0,onClick:y(()=>u===void 0?a():c(u),"onClick"),"data-testid":d?"sekyro-contact-switch":g?"sekyro-change-method":"sekyro-lane-switch",children:A})]})}y(rt,"Ut");m(rt,"LaneSwitch");function nt({step:e,i18n:t,onError:r,onClose:a}){let o=w(t),{busy:s,error:l,run:c}=E(t,r),i=e.context.switchable,h=e.chooseOption,p=i===void 0?[]:re(i.options,t),f=p.length>1;if((0,k.useEffect)(()=>{f||a()},[f,a]),i===void 0||h===void 0||!f)return null;let[g,v]=i.kind==="identity_method"?[t.t("method.heading"),t.t("method.lead")]:i.kind==="contact"?[o("contact.title"),o("contact.description")]:[o("choice.title"),o("choice.description")];return(0,n.jsx)($,{title:g,description:v,options:p,...i.current!==null?{marked:i.current}:{},busy:s,error:l,focus:!0,testId:"sekyro-lane-choice",onChoose:y(d=>d===i.current?a():c(()=>h.call(e,d)),"onChoose")})}y(nt,"qt");m(nt,"LaneChoiceView");var ot=[["fullName","summary.fullName",!1],["birthDate","summary.birthDate",!0],["birthYear","summary.birthYear",!0],["nationality","summary.nationality",!0],["documentType","summary.documentType",!1],["documentNumberMasked","summary.documentNumber",!0],["idNumberMasked","summary.id_number",!0],["expiryDate","summary.expiryDate",!0]];function He(e){let[t,r]=(0,k.useState)(null);return(0,k.useEffect)(()=>{if(!e.portraitAvailable)return;let a=!0,o=null;return e.portrait().then(s=>{!a||s===null||!s.type.startsWith("image/")||typeof URL.createObjectURL!="function"||(o=URL.createObjectURL(s),r(o))}),()=>{a=!1,o!==null&&URL.revokeObjectURL(o)}},[e.portraitAvailable]),t}y(He,"nt");m(He,"usePortraitUrl");var st=m(e=>/^\d{4}-\d{2}-\d{2}$/.test(e),"isoDate");function $e(e,t){try{return new Intl.DateTimeFormat(t==="ar"?"ar-u-nu-latn":t,{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))}catch{return e}}y($e,"rt");m($e,"formatDate");function it({step:e,i18n:t,onError:r}){let a=w(t),o=(0,k.useId)(),s=B(),l=He(e),{busy:c,error:i,run:h}=E(t,r),p=e.context.orgName,f=["registry","document","chip"].find(b=>b===e.source),g=e.summaryKind==="partial",v=e.fullNameAr,d=t.locale==="ar"?v??e.fullName:e.fullName??v,u=m(b=>t.strings[`doc.type.${b}`]??b,"documentLabel"),A=e.context.sandbox&&(e.context.sandboxRun?.mode==="simulated"||e.context.sandboxRun===void 0&&e.context.simulation!==void 0);return(0,n.jsxs)("section",{className:"sekyro-step","aria-labelledby":o,"data-testid":"sekyro-identity-summary",children:[(0,n.jsxs)("div",{className:"sekyro-heading",children:[(0,n.jsx)("h2",{id:o,ref:s,tabIndex:-1,className:"sekyro-text-body",children:a("summary.title")}),(0,n.jsx)("p",{className:"sekyro-text-muted",children:a("summary.description")})]}),f!==void 0?(0,n.jsx)("p",{className:"sekyro-summary__source",children:a(`summary.source.${f}`)}):null,A?(0,n.jsxs)(N,{tone:"warning",children:[(0,n.jsx)("strong",{children:t.t("sandboxMode.testData")}),(0,n.jsx)("span",{children:a("sandboxMode.summaryTestDataBody")})]}):null,(0,n.jsxs)("div",{className:"sekyro-summary",children:[l!==null?(0,n.jsx)("img",{className:"sekyro-summary__portrait",src:l,alt:a("summary.portraitAlt")}):null,(0,n.jsx)("dl",{className:"sekyro-summary__list",children:ot.map(([b,T,_])=>{let S=b==="idNumberMasked"?e.idNumberMasked??e.nniMasked:b==="fullName"?d:e[b];return S===void 0?null:(0,n.jsxs)("div",{className:"sekyro-summary__row",children:[(0,n.jsx)("dt",{className:"sekyro-text-muted",children:a(b==="fullName"&&g?"summary.name":T)}),(0,n.jsx)("dd",{children:st(S)?$e(S,t.locale):_||S===v?(0,n.jsx)("bdi",{dir:_?"ltr":"rtl",children:S}):b==="documentType"?u(S):S})]},b)})})]}),i!==null?(0,n.jsx)(N,{tone:"danger",children:(0,n.jsx)("span",{children:i})}):null,e.retakeAvailable?null:(0,n.jsx)("p",{className:"sekyro-text-muted",children:a("summary.noRetake",{org:p})}),(0,n.jsxs)(O,{children:[(0,n.jsx)(x,{full:!0,disabled:c,"aria-busy":c||void 0,onClick:y(()=>h(()=>e.confirm()),"onClick"),children:a("summary.confirm")}),e.retakeAvailable?(0,n.jsx)(x,{kind:"secondary",full:!0,disabled:c,onClick:y(()=>h(()=>e.retake()),"onClick"),children:a(e.retakeTarget==="national_number"?"summary.retakeNationalNumber":"summary.retakeDocument")}):null]})]})}y(it,"Qt");m(it,"IdentitySummaryView");var ct=["glasses","headwear","expression","faceCamera","background","lighting","hair"];function lt({step:e,i18n:t,livenessProps:r,sekyroIntro:a}){let o=w(t),[s,l]=(0,k.useState)(null);(0,k.useEffect)(()=>e.onLivePhoto(u=>{let A=u.update?.coach;l(u.holding||A===void 0?null:t.t(`portrait.coach.${A}`))}),[e,t]);let c=e.instructions==="icao",i=(0,k.useMemo)(()=>ve(e),[e]),h=e.icao?.profile==="selfie",p=(0,k.useMemo)(()=>c?ct.filter(u=>!h||u!=="background").map(u=>({id:u,text:o(`capture.tipsIcao.${u}`)})):void 0,[c,h,t]),f=(0,k.useMemo)(()=>c&&!h?{...r.strings,"capture.tips.title":o("capture.tipsIcao.title")}:r.strings,[c,h,r.strings,t]),g=h?void 0:o("capture.tipsIcao.title"),v=(0,k.useMemo)(()=>a===!0&&p!==void 0?{...r.slots,intro:m((u,A)=>(0,n.jsx)(be,{start:u,context:A,tips:p,...g!==void 0?{tipsTitle:g}:{},...i!==void 0?{retry:i}:{}}),"intro")}:r.slots,[a,p,g,i,r.slots,t]),d=h?`${(p??[]).map(u=>u.text).join(". ")}.`:o("capture.tipsIcao.summary");return(0,n.jsx)(W,{...r,...v!==void 0?{slots:v}:{},...f!==void 0?{strings:f}:{},...p!==void 0?{tips:p,tipsSummary:d}:{},coach:s})}y(lt,"Yt");m(lt,"LivePhotoLiveness");function dt({i18n:e}){let t=w(e);return(0,n.jsxs)(N,{tone:"info",children:[(0,n.jsx)("strong",{children:t("portrait.retakeOnly")}),(0,n.jsx)("span",{children:t("portrait.keepCamera")})]})}y(dt,"Kt");m(dt,"PortraitRetakeNotice");function ut({i18n:e,provider:t}){let r=e.strings,a=m(o=>r[o]??at[e.locale][o]??"","pick");return(0,n.jsx)("p",{className:"sekyro-text-muted","data-testid":"sekyro-eid-continue",children:t?Q(a("eid.continueHint"),{provider:t}):a("eid.continueHintGeneric")})}y(ut,"Wt");m(ut,"EidContinueHint");async function qe(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}y(qe,"st");m(qe,"copy");function F({url:e,i18n:t,label:r,primary:a}){let o=w(t),[s,l]=(0,k.useState)("idle"),c=r.startsWith("inApp.")?"inApp":"handoff";return(0,n.jsxs)("div",{className:"sekyro-stack sekyro-stack--1",children:[(0,n.jsx)(x,{kind:a?"primary":"secondary",full:!0,onClick:y(()=>{qe(e).then(i=>l(i?"copied":"failed"))},"onClick"),children:o(r)}),(0,n.jsx)("p",{role:"status","aria-live":"polite",className:"sekyro-text-muted",children:s==="idle"?"":o(`${c}.${s==="copied"?"copied":"copyFailed"}`)})]})}y(F,"ae");m(F,"CopyLink");var pt=2e4,Te=5e3;function oe(e){let t=(0,k.useContext)(X),r=t?.verification.handoffLink?.bind(t.verification),a=t?.client?.handoffOpen!==!1,o=t?.client?.role==="origin",s=r!==void 0&&e.enabled,[l,c]=(0,k.useState)(s?{kind:"idle"}:e.fallback!==void 0?{kind:"ready",link:e.fallback}:{kind:"idle"}),i=(0,k.useRef)(void 0),h=(0,k.useRef)(!0),p=(0,k.useRef)(0),{address:f,target:g}=e,v=(0,k.useCallback)(()=>{if(r===void 0)return;clearTimeout(i.current);let A=++p.current;c({kind:"loading"}),r({...f!==void 0?{address:f}:{},...g!==void 0?{target:g}:{}}).then(b=>{if(!h.current||A!==p.current)return;c({kind:"ready",link:b.link,...b.appUrl!==void 0?{appUrl:b.appUrl}:{}});let T=Date.parse(b.expiresAt)-Date.now()-pt;i.current=setTimeout(()=>v(),Math.max(Te,Number.isFinite(T)?T:Te))},b=>{!h.current||A!==p.current||c(b instanceof L&&b.code==="handoff_closed"?{kind:"closed"}:{kind:"failed",error:b})})},[r,f,g]);(0,k.useEffect)(()=>(h.current=!0,()=>{h.current=!1,clearTimeout(i.current)}),[]),(0,k.useEffect)(()=>{s&&a&&!o&&e.askOnMount&&v()},[s]),(0,k.useEffect)(()=>{!s||a&&!o||(clearTimeout(i.current),p.current+=1,c(a?{kind:"idle"}:{kind:"closed"}))},[s,a,o]);let d=t?.client?.codesRedeemed,u=(0,k.useRef)(d);return(0,k.useEffect)(()=>{let A=u.current;u.current=d,!(!s||!o||d===void 0||A===void 0||d<=A)&&(clearTimeout(i.current),p.current+=1,c(a?{kind:"idle"}:{kind:"closed"}))},[s,o,a,d]),{state:l,renew:s&&a&&l.kind!=="closed"?v:null,open:a&&l.kind!=="closed",origin:o}}y(oe,"Re");m(oe,"useHandoffCode");function se({link:e,label:t}){let r=(0,k.useMemo)(()=>{try{return Pe(Be(e,{ecl:"H"}),{logo:!0})}catch{return null}},[e]);return r===null?null:(0,n.jsxs)("svg",{className:"sekyro-qr",viewBox:`0 0 ${r.size} ${r.size}`,role:"img","aria-label":t,children:[(0,n.jsx)("rect",{width:r.size,height:r.size,className:"sekyro-qr__bg"}),(0,n.jsx)("path",{d:r.dots,className:"sekyro-qr__fg"}),(0,n.jsx)("path",{d:r.finders,className:"sekyro-qr__fg",fillRule:"evenodd"}),r.logo!==null?(0,n.jsx)("path",{d:Je.d,className:"sekyro-qr__fg",fillRule:"evenodd",transform:Ve(r.logo),"data-qr-mark":""}):null]})}y(se,"Oe");m(se,"HandoffQr");function ie({i18n:e,renew:t,busy:r}){let a=w(e);return t===null?null:(0,n.jsx)(x,{kind:"secondary",full:!0,disabled:r,"aria-busy":r||void 0,onClick:t,children:a("handoff.newCode")})}y(ie,"Le");m(ie,"NewCodeButton");function ce({url:e,i18n:t,refresh:r,footer:a,lead:o}){let s=w(t),l=(0,k.useId)(),c=(0,k.useContext)(X),{state:i,renew:h,open:p,origin:f}=oe({address:e,enabled:!0,askOnMount:!0,fallback:e}),g=B(),v=i.kind==="failed"||i.kind==="closed"?i.kind==="closed"?"errors.handoff_closed":j(i.error,t.strings):null;return(0,n.jsxs)("section",{className:"sekyro-step sekyro-handoff","aria-labelledby":l,"data-testid":"sekyro-handoff",children:[(0,n.jsxs)("div",{className:"sekyro-heading",children:[(0,n.jsx)("h2",{id:l,ref:g,tabIndex:-1,className:"sekyro-text-body",children:t.t("handoff.title")}),o!==void 0?(0,n.jsx)("p",{children:o}):null,i.kind==="ready"?(0,n.jsx)("p",{className:"sekyro-text-muted",children:s("handoff.description")}):null,f&&p&&i.kind!=="ready"&&h!==null?(0,n.jsx)("p",{className:"sekyro-text-muted",children:s("handoff.wrongPhone")}):null]}),i.kind==="ready"?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(se,{link:i.link,label:s("handoff.qrAlt")}),c?.verification.handoffLink!==void 0?(0,n.jsx)("p",{className:"sekyro-text-muted sekyro-handoff__note",children:s("handoff.codeNote")}):null]}):null,v!==null&&(i.kind==="closed"||p)?(0,n.jsx)(N,{tone:i.kind==="closed"?"info":"danger",children:t.t(v)}):null,(0,n.jsxs)("p",{className:"sekyro-handoff__waiting",role:"status",children:[(0,n.jsx)("span",{className:"sekyro-handoff__pulse","aria-hidden":"true"}),s("handoff.waiting")]}),(0,n.jsxs)(O,{children:[i.kind==="ready"?(0,n.jsx)(F,{url:i.link,i18n:t,label:"handoff.copyLink"}):null,(0,n.jsx)(ie,{i18n:t,renew:h,busy:i.kind==="loading"}),a??null]})]})}y(ce,"Ve");m(ce,"HandoffView");var Se={appStore:"https://apps.apple.com/app/id6826858033",googlePlay:"https://play.google.com/store/apps/details?id=ai.sekyro.app"};function mt({i18n:e,org:t,nativeApp:r,refresh:a,footer:o}){let s=w(e),l=(0,k.useMemo)(()=>!R(),[]),c=r.sekyroApp,{state:i,renew:h,origin:p}=oe({address:void 0,...l?{}:{target:"app"},enabled:l||c,askOnMount:!0,fallback:void 0}),f=l&&i.kind==="ready"?i.link:null,g=!l&&c&&i.kind==="ready"?i.appUrl??null:null,v=l&&p&&h!==null,[d,u]=(0,k.useState)(!1),A=m(()=>{a!==void 0&&(u(!0),a().catch(()=>{}).finally(()=>u(!1)))},"again"),b=t!==""?s(c?"needsApp.capture.descriptionSekyro":"needsApp.capture.description",{org:t}):s(c?"needsApp.capture.descriptionNoOrgSekyro":"needsApp.capture.descriptionNoOrg");return(0,n.jsxs)(M,{tone:"brand",icon:"smartphone",title:s("needsApp.capture.title"),testId:"sekyro-native-app",actions:(0,n.jsxs)(n.Fragment,{children:[g!==null?(0,n.jsx)("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:g,"data-testid":"sekyro-open-sekyro-app",children:s("needsApp.capture.openSekyro")}):null,v?(0,n.jsx)(ie,{i18n:e,renew:h,busy:i.kind==="loading"}):null,a!==void 0?(0,n.jsx)(x,{kind:"secondary",full:!0,disabled:d,onClick:A,children:e.t("common.refresh")}):null,o??null]}),children:[(0,n.jsx)("p",{children:b}),v&&f===null?(0,n.jsx)("p",{className:"sekyro-text-muted",children:s("handoff.wrongPhone")}):null,f!==null?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(se,{link:f,label:s("needsApp.capture.qrAlt")}),(0,n.jsx)("p",{className:"sekyro-text-muted",children:s("needsApp.capture.scan")})]}):null,c?(0,n.jsxs)("p",{className:"sekyro-text-muted","data-testid":"sekyro-app-stores",children:[s("needsApp.capture.getApp")," ",(0,n.jsx)("a",{href:Se.appStore,target:"_blank",rel:"noopener noreferrer",children:s("needsApp.capture.appStore")})," · ",(0,n.jsx)("a",{href:Se.googlePlay,target:"_blank",rel:"noopener noreferrer",children:s("needsApp.capture.googlePlay")})]}):null,(0,n.jsxs)("p",{className:"sekyro-handoff__waiting",role:"status",children:[(0,n.jsx)("span",{className:"sekyro-handoff__pulse","aria-hidden":"true"}),s("needsApp.capture.waiting")]})]})}y(mt,"Zt");m(mt,"NativeAppView");var ht=["intro","data","processing","sharing","retention"];function yt({i18n:e}){let t=w(e);return(0,n.jsx)(n.Fragment,{children:ht.map(r=>(0,n.jsx)("p",{children:t(`consent.human.terms.${r}`)},r))})}y(yt,"jt");m(yt,"HumanConsentTerms");function ft({url:e,i18n:t}){return(0,k.useMemo)(()=>!R(),[])?(0,n.jsx)(ce,{url:e,i18n:t}):null}y(ft,"Xt");m(ft,"DesktopHandoffView");function Ue(e){let t=e??(typeof navigator>"u"?"":String(navigator.userAgent??""));if(Ae(t))return"in_app";if(/SamsungBrowser/i.test(t))return"samsung";let r=typeof navigator<"u"&&/Macintosh/.test(t)&&(navigator.maxTouchPoints??0)>1;return/iPhone|iPad|iPod/i.test(t)||r?"ios":/Android/i.test(t)?"chrome_android":"desktop"}y(Ue,"ut");m(Ue,"cameraHelpPlatform");var kt={samsung:"capture.noCamera.stepsSamsung",chrome_android:"capture.noCamera.stepsChrome",ios:"capture.noCamera.stepsSafari",desktop:"capture.noCamera.stepsDesktop"};function gt({i18n:e,cause:t,onRetry:r,onContinue:a,handoffUrl:o,repeated:s=!1,platform:l}){let c=w(e),i=(0,k.useId)(),h=B(),[p,f]=(0,k.useState)("idle"),g=(0,k.useMemo)(()=>o!==void 0&&!R(),[o]),v=t==="denied",d=(0,k.useMemo)(()=>l??Ue(),[l]),u=v&&d==="in_app",[A,b]=(0,k.useState)(!1),T=(0,k.useRef)(!1),_=(0,k.useRef)(!0);(0,k.useEffect)(()=>(_.current=!0,()=>{_.current=!1}),[]);let S=m(()=>{if(!v){r();return}T.current||(T.current=!0,fe().catch(()=>"unknown").then(H=>{T.current=!1,_.current&&(H==="denied"&&!A&&!s?b(!0):r())}))},"retry"),Ye=m(()=>{a!==void 0&&(f("busy"),a(t).then(()=>f("idle"),H=>f(H instanceof L&&H.code==="check_out_of_order"?"idle":"failed")))},"end"),D=typeof window>"u"?"":window.location.href.split("#")[0]??"",Y=(0,k.useMemo)(()=>u&&D!==""?K(D):null,[u,D]),le=(0,n.jsxs)(n.Fragment,{children:[u&&Y!==null?(0,n.jsxs)("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:Y,"data-testid":"sekyro-open-browser",children:[(0,n.jsx)(z,{name:"external"}),c("inApp.openBrowser")]}):null,u&&D!==""?(0,n.jsx)(F,{url:D,i18n:e,label:"inApp.copyLink",primary:Y===null}):null,(0,n.jsx)(x,{full:!0,kind:!u&&(v||a===void 0)?"primary":"secondary",onClick:S,children:e.t("common.retry")}),a!==void 0?(0,n.jsx)(x,{full:!0,kind:v?"secondary":"primary",disabled:p==="busy","aria-busy":p==="busy"||void 0,onClick:Ye,children:c("capture.noCamera.continue")}):null]}),de=p==="failed"?(0,n.jsx)(N,{tone:"danger",children:(0,n.jsx)("span",{children:e.t("errors.network_error")})}):null,ue=c(u?"capture.noCamera.inAppTitle":v?"capture.noCamera.deniedTitle":"capture.noCamera.title"),pe=c(u?"capture.noCamera.inAppBody":v?"capture.noCamera.deniedBody":"capture.noCamera.body"),me=v&&!u?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{"data-testid":"sekyro-camera-steps","data-platform":d,children:c(kt[d])}),d!=="desktop"?(0,n.jsx)("p",{className:"sekyro-text-muted",children:c("capture.noCamera.stepsSystem")}):null]}):null,he=v&&(A||s)?(0,n.jsx)(N,{tone:"warning",children:(0,n.jsx)("span",{role:"status","data-testid":"sekyro-camera-still-blocked",children:c("capture.noCamera.stillBlocked")})}):null;return g&&o!==void 0?(0,n.jsxs)("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":i,"data-testid":"sekyro-no-camera","data-cause":t,children:[(0,n.jsx)(ce,{url:o,i18n:e}),(0,n.jsx)("h2",{id:i,ref:h,tabIndex:-1,className:"sekyro-text-body",children:ue}),(0,n.jsx)("p",{className:"sekyro-text-muted",children:pe}),me,he,de,(0,n.jsx)("div",{className:"sekyro-stack sekyro-stack--3",children:le})]}):(0,n.jsxs)(M,{tone:v?"warning":"neutral",icon:"camera",titleId:i,title:ue,testId:"sekyro-no-camera",actions:le,children:[(0,n.jsx)("p",{children:pe}),me,he,de]})}y(gt,"Jt");m(gt,"NoCameraView");function vt({url:e,i18n:t,onContinue:r}){let a=w(t),o=(0,k.useId)(),s=(0,k.useMemo)(()=>K(e),[e]);return(0,n.jsx)(M,{tone:"brand",icon:"external",titleId:o,title:a("inApp.title"),testId:"sekyro-in-app",actions:(0,n.jsxs)(n.Fragment,{children:[s!==null?(0,n.jsxs)("a",{className:"sekyro-btn sekyro-btn--primary sekyro-btn--full",href:s,"data-testid":"sekyro-open-browser",children:[(0,n.jsx)(z,{name:"external"}),a("inApp.openBrowser")]}):null,(0,n.jsx)(F,{url:e,i18n:t,label:"inApp.copyLink",primary:s===null}),(0,n.jsx)(x,{kind:"ghost",full:!0,onClick:r,children:a("inApp.continueAnyway")})]}),children:(0,n.jsx)("p",{children:a("inApp.description")})})}y(vt,"en");m(vt,"InAppBrowserPrompt");var bt={retake:{title:"testerGate.retakeTitle",body:"testerGate.retakeBody"},liveness:{title:"testerGate.livenessTitle",body:"testerGate.livenessBody"},no_match:{title:"testerGate.missTitle",body:"testerGate.missBody"}};function Fe(e){return e instanceof L?e.code==="attestation_invalid":e instanceof Error&&e.name==="AttestationUnavailableError"}y(Fe,"pt");m(Fe,"isCheckUnavailable");function At({step:e,i18n:t,verification:r,onError:a}){let o=w(t),s=(0,k.useId)(),l=B(),{busy:c,error:i,run:h}=E(t,a),[p,f]=(0,k.useState)(!1),g=r.chooseSandboxMode,v=m(d=>{if(g!==void 0){if(d==="tester"&&!e.testersAvailable){f(!0);return}h(()=>g.call(r,d).catch(u=>{if(u instanceof L&&u.code==="no_testers")return f(!0);throw u}))}},"pick");return p?(0,n.jsxs)("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":s,"data-testid":"sekyro-sandbox-no-testers",children:[(0,n.jsxs)("div",{className:"sekyro-heading",children:[(0,n.jsx)("h2",{id:s,ref:l,tabIndex:-1,className:"sekyro-text-body",children:o("sandboxMode.noTestersTitle")}),(0,n.jsx)("p",{className:"sekyro-text-muted",children:o("sandboxMode.noTestersBody")})]}),i!==null?(0,n.jsx)(N,{tone:"danger",children:(0,n.jsx)("span",{children:i})}):null,(0,n.jsxs)(O,{children:[(0,n.jsx)(x,{full:!0,disabled:c||g===void 0,"aria-busy":c||void 0,onClick:y(()=>v("simulated"),"onClick"),children:o("sandboxMode.continueTestData")}),(0,n.jsx)(x,{full:!0,kind:"secondary",disabled:c,onClick:y(()=>f(!1),"onClick"),children:t.t("common.back")})]})]}):(0,n.jsx)($,{title:o("sandboxMode.title"),options:[{id:"simulated",label:t.t("sandboxMode.testData"),sub:o("sandboxMode.testDataBody"),glyph:(0,n.jsx)(z,{name:"info"})},{id:"tester",label:o("sandboxMode.testerTitle"),sub:o("sandboxMode.testerBody"),glyph:(0,n.jsx)(z,{name:"face"})}],busy:c||g===void 0,error:i,focus:!0,testId:"sekyro-sandbox-mode",onChoose:y(d=>v(d==="tester"?"tester":"simulated"),"onChoose")})}y(At,"tn");m(At,"SandboxModeView");function Ct({i18n:e,testerName:t,onContinue:r}){let a=w(e);return(0,n.jsx)(M,{tone:"success",icon:"success",title:t!==void 0?a("sandboxMode.boundTitle",{name:t}):a("testerGate.boundTitle"),testId:"sekyro-tester-gate-bound",actions:(0,n.jsx)(x,{full:!0,onClick:r,children:a("testerGate.continue")}),children:(0,n.jsx)("p",{children:a("testerGate.boundBody")})})}y(Ct,"nn");m(Ct,"TesterBoundView");function wt({i18n:e,verification:t,attemptsLeft:r,livenessProps:a}){let o=w(e),s=(0,k.useId)(),[l,c]=(0,k.useState)("intro"),[i,h]=(0,k.useState)(null),[p,f]=(0,k.useState)("no_match"),g=t.testerGate,v=o("testerGate.notice"),d=m(A=>{g!==void 0&&(c("checking"),g.call(t,A,{evidenceNotice:v.trim()!==""}).then(({bound:b,missReason:T})=>{b||(f(T??"no_match"),c("miss"))},b=>{if(Fe(b)){h(null),c("unavailable");return}h(e.t(j(b,e.strings))),c("failed")}))},"captured"),u=(0,n.jsx)(x,{full:!0,onClick:y(()=>c("capture"),"onClick"),"data-testid":"sekyro-tester-gate-retry",children:o("testerGate.retry")});if(l==="capture")return(0,n.jsx)(W,{...a,onCaptured:d});if(l==="checking")return(0,n.jsx)(M,{tone:"brand",icon:"face",busy:!0,live:!0,title:o("testerGate.checking"),testId:"sekyro-tester-gate-checking"});if(l==="unavailable")return(0,n.jsx)(M,{tone:"warning",icon:"info",title:o("testerGate.checkUnavailableTitle"),testId:"sekyro-tester-gate-unavailable",actions:u,children:(0,n.jsx)("p",{children:o("testerGate.checkUnavailableBody")})});if(l==="miss"||l==="failed"){let A=bt[p],b=l==="failed"||p==="retake"||r>0;return(0,n.jsx)(M,{tone:"warning",icon:"info",title:o(l==="miss"?A.title:"testerGate.title"),testId:"sekyro-tester-gate-miss",actions:b?u:void 0,children:(0,n.jsx)("p",{children:l==="miss"?o(A.body):i})})}return(0,n.jsxs)("section",{className:"sekyro-stack sekyro-stack--4","aria-labelledby":s,"data-testid":"sekyro-tester-gate",children:[(0,n.jsx)(ke,{id:s,title:o("testerGate.title"),lead:o("testerGate.body")}),(0,n.jsx)("p",{className:"sekyro-text-muted","data-testid":"sekyro-tester-gate-notice",children:v}),(0,n.jsx)(O,{children:(0,n.jsx)(x,{full:!0,onClick:y(()=>c("capture"),"onClick"),disabled:g===void 0,"data-testid":"sekyro-tester-gate-start",children:o("testerGate.start")})})]})}y(wt,"on");m(wt,"TesterGateView");export{Ut as ContactChoiceView,ft as DesktopHandoffView,ut as EidContinueHint,Ft as GenericChoiceView,ce as HandoffView,yt as HumanConsentTerms,it as IdentitySummaryView,vt as InAppBrowserPrompt,nt as LaneChoiceView,rt as LaneSwitch,lt as LivePhotoLiveness,mt as NativeAppView,gt as NoCameraView,dt as PortraitRetakeNotice,At as SandboxModeView,Ct as TesterBoundView,wt as TesterGateView,Ue as cameraHelpPlatform};
|