@sekyro/elements 0.1.0-rc.1 → 0.1.0-rc.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/README.md +8 -9
  3. package/custom-elements.json +2 -2
  4. package/dist/cdn/chunks/{background-monitor-GCMNCJMG-UXYQ5GX7.js → background-monitor-A7FKJOAG-K3WF3C2D.js} +1 -1
  5. package/dist/cdn/chunks/barcode-detect-C5IOXMKI-ZOZ2WOWU.js +1 -0
  6. package/dist/cdn/chunks/{camera-trait-HVV5ZEDI-JB4HN6S3.js → camera-trait-V4UAOPIQ-TFCPOCSU.js} +1 -1
  7. package/dist/cdn/chunks/{capture-session-doc-ELX6VK6Z-SDM3ILRA.js → capture-session-doc-2LIRRKFX-GZQBYOR3.js} +1 -1
  8. package/dist/cdn/chunks/challenge-frame-YAQJ5YMB-MHZYRGKY.js +1 -0
  9. package/dist/cdn/chunks/chunk-52CHUGVC.js +3 -0
  10. package/dist/cdn/chunks/chunk-574O5HZZ.js +1 -0
  11. package/dist/cdn/chunks/chunk-5FPDMYLD.js +33 -0
  12. package/dist/cdn/chunks/{chunk-6H22RNSK.js → chunk-6N4AXKCS.js} +1 -1
  13. package/dist/cdn/chunks/chunk-BIK4PGBE.js +1 -0
  14. package/dist/cdn/chunks/{chunk-FEWP7HBJ.js → chunk-BZDKXIWD.js} +1 -1
  15. package/dist/cdn/chunks/{chunk-D334IAZJ.js → chunk-CW56KMMH.js} +1 -1
  16. package/dist/cdn/chunks/{chunk-BF6SE2AC.js → chunk-FVMJYXGV.js} +1 -1
  17. package/dist/cdn/chunks/{chunk-36WGD7QV.js → chunk-JDANRDDK.js} +1 -1
  18. package/dist/cdn/chunks/chunk-LAF6JZRH.js +1 -0
  19. package/dist/cdn/chunks/{chunk-FCTRNWRU.js → chunk-MDDGAHO6.js} +1 -1
  20. package/dist/cdn/chunks/{chunk-LYYAVERP.js → chunk-MZ6WG3QQ.js} +1 -1
  21. package/dist/cdn/chunks/{chunk-FDWO4KXK.js → chunk-NNYJYD3Q.js} +1 -1
  22. package/dist/cdn/chunks/{chunk-ZIC5GEH2.js → chunk-NT7PZPBW.js} +1 -1
  23. package/dist/cdn/chunks/chunk-PH7RJ5GZ.js +1 -0
  24. package/dist/cdn/chunks/{chunk-T4M2J44L.js → chunk-Q5ZVLMKQ.js} +1 -1
  25. package/dist/cdn/chunks/chunk-Q6GRUOR3.js +1 -0
  26. package/dist/cdn/chunks/chunk-SIBJ56BG.js +1 -0
  27. package/dist/cdn/chunks/{chunk-CYGAKCKG.js → chunk-SJAQ7DUY.js} +1 -1
  28. package/dist/cdn/chunks/{chunk-X767DBO7.js → chunk-SVROKIYG.js} +1 -1
  29. package/dist/cdn/chunks/{chunk-JM3CYFFZ.js → chunk-UQKRYXN5.js} +1 -1
  30. package/dist/cdn/chunks/chunk-WKQRKYX4.js +25 -0
  31. package/dist/cdn/chunks/chunk-X42LECG5.js +1 -0
  32. package/dist/cdn/chunks/chunk-X7QE75V5.js +1 -0
  33. package/dist/cdn/chunks/{chunk-IBOJTLL7.js → chunk-Y6PC7FZV.js} +1 -1
  34. package/dist/cdn/chunks/{chunk-KLE75SX4.js → chunk-YGXNL7S2.js} +1 -1
  35. package/dist/cdn/chunks/{chunk-BZ37D4FR.js → chunk-YPIQ6IU7.js} +1 -1
  36. package/dist/cdn/chunks/chunk-YZWLMKXA.js +1 -0
  37. package/dist/cdn/chunks/{chunk-7Y73DZJB.js → chunk-ZRL6E7XH.js} +1 -1
  38. package/dist/cdn/chunks/create-document-capture-X35M4UAK-BB2SCTPK.js +1 -0
  39. package/dist/cdn/chunks/create-portrait-capture-5VGYZUOK-N3333DJC.js +1 -0
  40. package/dist/cdn/chunks/{detector-scanic-F3Y5X3DF-FGVR4NEM.js → detector-scanic-KMAVOHGF-NFYSZ7GU.js} +1 -1
  41. package/dist/cdn/chunks/document-capture-view-QMXAAYA2-5HJJKIZ4.js +1 -0
  42. package/dist/cdn/chunks/{eid-view-RZS6MLT6-35VSHTV3.js → eid-view-3QTJORA7-S7APLLOM.js} +1 -1
  43. package/dist/cdn/chunks/email-otp-view-6MD74OFN-PRYGFOHY.js +1 -0
  44. package/dist/cdn/chunks/flow-views-AEVFAZOT-DUBO6WU5.js +1 -0
  45. package/dist/cdn/chunks/form-view-YAGVGWMI-7BEAIBSC.js +1 -0
  46. package/dist/cdn/chunks/icao-gate-T3BTOKFJ-BWMLKL7A.js +1 -0
  47. package/dist/cdn/chunks/icao-tuning-4ETMF53W-FRBTB5R7.js +1 -0
  48. package/dist/cdn/chunks/{landmarker-3BBP3RBY-DDXMOLGK.js → landmarker-KB7LVXAU-F7BQTP3H.js} +1 -1
  49. package/dist/cdn/chunks/mrz-band-VYHOTDHY-VEZ2J5IL.js +1 -0
  50. package/dist/cdn/chunks/overlay-de-U5AM34SS-UPJSNTKZ.js +1 -0
  51. package/dist/cdn/chunks/overlay-es-LS4JWU5J-UFZMJAU6.js +1 -0
  52. package/dist/cdn/chunks/overlay-pt-M4ZJJRFE-HJIXIX5G.js +1 -0
  53. package/dist/cdn/chunks/plan-runner-T2ZTSBI4-SEXJ6KJP.js +1 -0
  54. package/dist/cdn/chunks/{portrait-capture-view-GQIBQY4U-TJUYRCTI.js → portrait-capture-view-6EUUL2QA-7F2WSHIW.js} +1 -1
  55. package/dist/cdn/chunks/portrait-review-view-TTVTYGLG-SVRXTB4Q.js +1 -0
  56. package/dist/cdn/chunks/{print-4WOMNRBE-DNXJ7ERA.js → print-SEWS3VHQ-HWJTHADG.js} +1 -1
  57. package/dist/cdn/chunks/proof-of-address-view-5WWGRXJL-JQWHMWVI.js +1 -0
  58. package/dist/cdn/chunks/reader-652D2CK6.js +2 -0
  59. package/dist/cdn/chunks/upload-file-EGXXM6TQ-NNVVB5QQ.js +1 -0
  60. package/dist/cdn/define.js +1 -1
  61. package/dist/cdn/index.js +1 -1
  62. package/dist/{chunk-B6A5RXN4.js → chunk-2WPZFQUP.js} +1 -1
  63. package/dist/chunk-BCDTYNQ3.js +1 -0
  64. package/dist/{chunk-IBPUWYHJ.js → chunk-DMESMWZ7.js} +1 -1
  65. package/dist/chunk-F2IYM4GV.js +1 -0
  66. package/dist/chunk-F67N4IZQ.js +1 -0
  67. package/dist/{chunk-RMV3BNWO.js → chunk-GIMNUGVE.js} +1 -1
  68. package/dist/chunk-K5DAJSLX.js +25 -0
  69. package/dist/{chunk-QE2B3MSJ.js → chunk-M3SKGQUG.js} +1 -1
  70. package/dist/{chunk-ESSKMX7I.js → chunk-NQQZCBHQ.js} +1 -1
  71. package/dist/chunk-P223YKM3.js +1 -0
  72. package/dist/{chunk-XEY5ANJ6.js → chunk-PCLZBE2D.js} +1 -1
  73. package/dist/{chunk-AGPBG22V.js → chunk-SSSIPHG7.js} +1 -1
  74. package/dist/chunk-W23RACX3.js +33 -0
  75. package/dist/{chunk-IGC6OQZ2.js → chunk-XJJ3KCLT.js} +1 -1
  76. package/dist/{chunk-6NQ7EWA4.js → chunk-YC4IK7VG.js} +1 -1
  77. package/dist/{chunk-SEE6MST7.js → chunk-YZ6YGLNN.js} +1 -1
  78. package/dist/define.cjs +6 -6
  79. package/dist/define.js +1 -1
  80. package/dist/document-capture-view-QMXAAYA2-62JPLXV7.js +1 -0
  81. package/dist/{eid-view-RZS6MLT6-2W2T3AWK.js → eid-view-3QTJORA7-TLA52WL7.js} +1 -1
  82. package/dist/email-otp-view-6MD74OFN-WVIWSE4A.js +1 -0
  83. package/dist/flow-views-AEVFAZOT-PKXWQC2K.js +1 -0
  84. package/dist/form-view-YAGVGWMI-CWM5GSJJ.js +1 -0
  85. package/dist/index.cjs +6 -6
  86. package/dist/index.d.cts +154 -6
  87. package/dist/index.d.ts +154 -6
  88. package/dist/index.js +1 -1
  89. package/dist/overlay-de-U5AM34SS-ISYPWAT7.js +1 -0
  90. package/dist/overlay-es-LS4JWU5J-2VRTV7R4.js +1 -0
  91. package/dist/overlay-pt-M4ZJJRFE-UCQAZFCI.js +1 -0
  92. package/dist/{portrait-capture-view-GQIBQY4U-AFPEUDLY.js → portrait-capture-view-6EUUL2QA-ZTAGMPU2.js} +1 -1
  93. package/dist/portrait-review-view-TTVTYGLG-HVTGBDRR.js +1 -0
  94. package/dist/proof-of-address-view-5WWGRXJL-3BWMP23I.js +1 -0
  95. package/dist/styles.css +109 -18
  96. package/package.json +2 -2
  97. package/sbom.cdx.json +153 -0
  98. package/dist/cdn/chunks/chunk-5FLR7RPJ.js +0 -1
  99. package/dist/cdn/chunks/chunk-CFJJD6T2.js +0 -1
  100. package/dist/cdn/chunks/chunk-CMS5FVGM.js +0 -1
  101. package/dist/cdn/chunks/chunk-HQF66Y6S.js +0 -1
  102. package/dist/cdn/chunks/chunk-PUO2VWDE.js +0 -33
  103. package/dist/cdn/chunks/chunk-U3UDWPBG.js +0 -1
  104. package/dist/cdn/chunks/chunk-X3BGM3B2.js +0 -1
  105. package/dist/cdn/chunks/chunk-YWPZG2MZ.js +0 -25
  106. package/dist/cdn/chunks/chunk-ZKLSZJFN.js +0 -1
  107. package/dist/cdn/chunks/create-document-capture-UHZJUZHC-YYZNCSW6.js +0 -1
  108. package/dist/cdn/chunks/create-portrait-capture-VRZZOMJS-I4FBRNBP.js +0 -1
  109. package/dist/cdn/chunks/document-capture-view-JE6IX4IE-2454PW6Z.js +0 -1
  110. package/dist/cdn/chunks/email-otp-view-WUQ5OGDD-YDSUKAN2.js +0 -1
  111. package/dist/cdn/chunks/flow-views-5L7JF3MM-M6C3RXSX.js +0 -1
  112. package/dist/cdn/chunks/icao-gate-SO6YJ7RV-MPW6W3QN.js +0 -1
  113. package/dist/cdn/chunks/icao-tuning-DCZCMCEQ-ZQSK7ZOV.js +0 -1
  114. package/dist/cdn/chunks/mrz-band-DCXFWDBD-OPMO6HYS.js +0 -1
  115. package/dist/cdn/chunks/overlay-de-JQ2FDZBA-HLFTXIF6.js +0 -1
  116. package/dist/cdn/chunks/overlay-es-WDYRSRHH-UXHTYCHD.js +0 -1
  117. package/dist/cdn/chunks/overlay-pt-AQMDWDWX-BD7TO6Y4.js +0 -1
  118. package/dist/cdn/chunks/plan-runner-ZHOYMRAO-RDS523K5.js +0 -1
  119. package/dist/cdn/chunks/portrait-review-view-XOQYQNU7-LPONGGFW.js +0 -1
  120. package/dist/cdn/chunks/turnstile-N4K4U2AI-SLP55XAA.js +0 -1
  121. package/dist/cdn/chunks/upload-file-C4MFKLT3-DXCNEDXP.js +0 -1
  122. package/dist/chunk-72JW2LCH.js +0 -25
  123. package/dist/chunk-7URX73UH.js +0 -1
  124. package/dist/chunk-EIRNIJXL.js +0 -1
  125. package/dist/chunk-ZDF5JILV.js +0 -33
  126. package/dist/document-capture-view-JE6IX4IE-5HJYAEDX.js +0 -1
  127. package/dist/email-otp-view-WUQ5OGDD-NGI6PBX3.js +0 -1
  128. package/dist/flow-views-5L7JF3MM-P55CCCOH.js +0 -1
  129. package/dist/overlay-de-JQ2FDZBA-FR25JPE4.js +0 -1
  130. package/dist/overlay-es-WDYRSRHH-PFDMX5D2.js +0 -1
  131. package/dist/overlay-pt-AQMDWDWX-LTD4N2DW.js +0 -1
  132. package/dist/portrait-review-view-XOQYQNU7-IPKAZBP6.js +0 -1
  133. /package/dist/cdn/chunks/{chunk-SK6UAYX2.js → chunk-2FETDQV5.js} +0 -0
  134. /package/dist/cdn/chunks/{chunk-RK4HVNRS.js → chunk-5QL6W6FW.js} +0 -0
  135. /package/dist/cdn/chunks/{chunk-HDJ6JFXX.js → chunk-IO7MUUC6.js} +0 -0
  136. /package/dist/cdn/chunks/{chunk-RRLXNT33.js → chunk-JS2IXPNL.js} +0 -0
  137. /package/dist/cdn/chunks/{chunk-ET7NCKUV.js → chunk-KHSYTJ46.js} +0 -0
  138. /package/dist/cdn/chunks/{chunk-CMDITVXF.js → chunk-KVTY4E6J.js} +0 -0
  139. /package/dist/cdn/chunks/{chunk-7HJH5Q4M.js → chunk-L22GFJQV.js} +0 -0
  140. /package/dist/cdn/chunks/{chunk-FAIDO3QL.js → chunk-L244IUB3.js} +0 -0
  141. /package/dist/cdn/chunks/{chunk-UZWMCNZI.js → chunk-P7K7ELYZ.js} +0 -0
  142. /package/dist/cdn/chunks/{chunk-JOZCJGRV.js → chunk-YVQ6LFN4.js} +0 -0
  143. /package/dist/cdn/chunks/{clip-inspect-HZ7N2YOP-DCDXB76T.js → clip-inspect-DLJXVKV6-TNHTD4LV.js} +0 -0
  144. /package/dist/cdn/chunks/{keyframe-rank-R4NPQGN3-VRURE6OQ.js → keyframe-rank-YAJLYJYF-WCA6RPMD.js} +0 -0
  145. /package/dist/cdn/chunks/{scanic-ml-stub-XPNKT2N3-YSXFN7KY.js → scanic-ml-stub-KW7IZHUT-XLERBDWM.js} +0 -0
  146. /package/dist/cdn/chunks/{segmenter-3CVPTZMM-WGI6XGWN.js → segmenter-USLNBX65-HFEEUGXG.js} +0 -0
  147. /package/dist/{chunk-TPIBYY2S.js → chunk-N2DNXUEA.js} +0 -0
  148. /package/dist/{chunk-RPLVIGTS.js → chunk-SSU37LFQ.js} +0 -0
@@ -0,0 +1 @@
1
+ "use client";import{a as S}from"./chunk-SSSIPHG7.js";import{a as J}from"./chunk-P223YKM3.js";import{d as M}from"./chunk-GIMNUGVE.js";import"./chunk-2WPZFQUP.js";import{a as q}from"./chunk-BCDTYNQ3.js";import"./chunk-YC4IK7VG.js";import{K as b,L as G,a as O,b as j,c as k,v as N,w as D,y as R}from"./chunk-K5DAJSLX.js";import{a as l,c as x,i as p}from"./chunk-SSU37LFQ.js";var v=x(O(),1),f=x(O(),1),o=x(j(),1),t=x(j(),1);var ee={"poa.title":"إثبات العنوان","poa.lead":"ارفع وثيقة حديثة تُظهر اسمك وعنوانك الحالي.","poa.accepted":"الوثائق المقبولة","poa.acceptedFor":"مقبول في {country}","poa.kindDated":"{kind}، صادر خلال آخر {days} يومًا","poa.kinds.utility_bill":"فاتورة كهرباء أو ماء أو غاز","poa.kinds.telecom_bill":"فاتورة هاتف أو إنترنت","poa.kinds.bank_statement":"كشف حساب بنكي","poa.kinds.tax_notice":"إشعار ضريبي","poa.kinds.rental_agreement":"عقد إيجار","poa.kinds.government_certificate":"شهادة السكن","poa.kinds.insurance_statement":"وثيقة تأمين","poa.source.camera":"التقاط صورة","poa.source.upload":"رفع ملف","poa.source.lead":"صورة للوثيقة، أو ملف PDF أو صورة من جهازك","poa.upload.hint":"PDF أو JPEG أو PNG، بحد أقصى 3 صفحات و10 ميغابايت","poa.upload.choose":"اختيار ملف","poa.upload.addPage":"إضافة صفحة","poa.upload.pages":"{count} من 3 صفحات","poa.upload.send":"إرسال الوثيقة","poa.upload.sending":"جارٍ إرسال وثيقتك…","poa.upload.unsupported":"نوع الملف هذا غير مقبول. اختر ملف PDF أو JPEG أو PNG","poa.upload.tooManyPages":"أرسل 3 صفحات على الأكثر. احذف صفحة أو اختر ملفًا أقصر","poa.upload.tooLarge":"حجم الملف يتجاوز 10 ميغابايت. اختر ملفًا أصغر","poa.upload.failed":"تعذّر إرسال الوثيقة. تحقّق من اتصالك وحاول مرة أخرى","poa.camera.lead":"ضع الوثيقة بشكل مسطّح واملأ الإطار. التقط صورة واحدة لكل صفحة","poa.camera.capture":"التقاط الصورة","poa.camera.retake":"إعادة الالتقاط","poa.camera.next":"الصفحة التالية","poa.camera.page":"الصفحة {number}","poa.letter.title":"رسالة من صاحب الفاتورة","poa.letter.lead":"الوثيقة باسم شخص آخر. أضف رسالة موقّعة من هذا الشخص تفيد بأنك تسكن في هذا العنوان","poa.letter.send":"إرسال الرسالة","poa.licence.use":"استخدام العنوان المذكور في رخصة القيادة","poa.licence.note":"قرأنا هذا العنوان من رخصتك. لا تحتاج إلى وثيقة أخرى.","poa.retry.document_too_old":"هذه الوثيقة أقدم من المسموح. ارفع وثيقة أحدث من القائمة أدناه","poa.retry.document_date_invalid":"تاريخ الوثيقة في المستقبل. ارفع وثيقة بتاريخ اليوم أو قبله","poa.retry.document_kind_not_accepted":"نوع هذه الوثيقة غير مقبول. ارفع إحدى الوثائق المذكورة أدناه","poa.retry.name_mismatch":"الاسم في الوثيقة لا يطابق اسمك. ارفع وثيقة باسمك","poa.retry.address_mismatch":"العنوان في الوثيقة لا يطابق العنوان الذي وصلنا. ارفع وثيقة لهذا العنوان","poa.retry.holder_letter_missing":"يجب أن تكون الرسالة موقّعة وأن تذكر اسمك واسم صاحب الفاتورة. ارفع رسالة كاملة","poa.retry.unreadable":"تعذّرت قراءة الوثيقة. ارفع نسخة كاملة وأكثر وضوحًا","poa.retry.pdf_protected":"أزل كلمة المرور من ملف PDF وحاول مرة أخرى","poa.retry.provider_unavailable":"تعذّر فحص الوثيقة حاليًا. حاول مرة أخرى بعد قليل","poa.hint.blurry":"الصورة غير واضحة","poa.hint.cropped":"جزء من الوثيقة مقطوع","poa.hint.glare":"يوجد انعكاس ضوء على الوثيقة","reasons.provider_unavailable":"تعذّر فحص الوثيقة حاليًا","reasons.pdf_protected":"ملف PDF محمي بكلمة مرور أو يحتوي على محتوى نشط","reasons.document_kind_not_accepted":"نوع الوثيقة غير مقبول","reasons.document_date_invalid":"تاريخ الوثيقة في المستقبل","reasons.document_too_old":"الوثيقة قديمة جدًا","reasons.document_tampered":"يبدو أن الوثيقة قد عُدّلت","reasons.holder_letter_required":"يلزم تقديم رسالة من صاحب الفاتورة","reasons.holder_letter_missing":"رسالة صاحب الفاتورة مفقودة أو غير مكتملة","reasons.address_mismatch":"العنوان لا يطابق العنوان المقدَّم"},U={"poa.title":"Proof of address","poa.lead":"Upload a recent document that shows your name and your current address.","poa.accepted":"Accepted documents","poa.acceptedFor":"Accepted for {country}","poa.kindDated":"{kind}, dated within the last {days} days","poa.kinds.utility_bill":"Electricity, water or gas bill","poa.kinds.telecom_bill":"Phone or internet bill","poa.kinds.bank_statement":"Bank statement","poa.kinds.tax_notice":"Tax notice","poa.kinds.rental_agreement":"Rental agreement","poa.kinds.government_certificate":"Residence certificate","poa.kinds.insurance_statement":"Insurance statement","poa.source.camera":"Take a photo","poa.source.upload":"Upload a file","poa.source.lead":"A photo of the document, or a PDF or image from your device","poa.upload.hint":"PDF, JPEG or PNG, up to 3 pages and 10 MB","poa.upload.choose":"Choose a file","poa.upload.addPage":"Add a page","poa.upload.pages":"{count} of 3 pages","poa.upload.send":"Send document","poa.upload.sending":"Sending your document…","poa.upload.unsupported":"This file type is not accepted. Choose a PDF, JPEG or PNG","poa.upload.tooManyPages":"Send at most 3 pages. Remove a page or choose a shorter file","poa.upload.tooLarge":"The file is over 10 MB. Choose a smaller file","poa.upload.failed":"We could not send the document. Check your connection and try again","poa.camera.lead":"Lay the document flat and fill the frame. Take one photo per page","poa.camera.capture":"Take photo","poa.camera.retake":"Retake","poa.camera.next":"Next page","poa.camera.page":"Page {number}","poa.letter.title":"Letter from the bill holder","poa.letter.lead":"The document is in another person's name. Add a signed letter from that person saying that you live at this address","poa.letter.send":"Send letter","poa.licence.use":"Use the address on my driver's license","poa.licence.note":"We read this address from your license. You don't need another document.","poa.retry.document_too_old":"This document is older than allowed. Upload a more recent one from the list below","poa.retry.document_date_invalid":"The date on the document is in the future. Upload a document with today's date or earlier","poa.retry.document_kind_not_accepted":"This document type is not accepted. Upload one of the documents listed below","poa.retry.name_mismatch":"The name on the document does not match yours. Upload a document in your name","poa.retry.address_mismatch":"The address on the document does not match the one we were given. Upload a document for that address","poa.retry.holder_letter_missing":"The letter must be signed and name both you and the bill holder. Upload a complete letter","poa.retry.unreadable":"We could not read the document. Upload a sharper, complete copy","poa.retry.pdf_protected":"Remove the password from the PDF and try again","poa.retry.provider_unavailable":"The document could not be checked right now. Try again in a moment","poa.hint.blurry":"The image is blurry","poa.hint.cropped":"Part of the document is cut off","poa.hint.glare":"There is glare on the document","reasons.provider_unavailable":"The document could not be checked right now","reasons.pdf_protected":"The PDF is password-protected or contains active content","reasons.document_kind_not_accepted":"The document type is not accepted","reasons.document_date_invalid":"The document date is in the future","reasons.document_too_old":"The document is too old","reasons.document_tampered":"The document appears to have been edited","reasons.holder_letter_required":"A letter from the bill holder is needed","reasons.holder_letter_missing":"The letter from the bill holder is missing or incomplete","reasons.address_mismatch":"The address does not match the one supplied"},ae={"poa.title":"Justificatif de domicile","poa.lead":"Importez un document récent qui indique votre nom et votre adresse actuelle.","poa.accepted":"Documents acceptés","poa.acceptedFor":"Accepté pour {country}","poa.kindDated":"{kind}, daté des {days} derniers jours","poa.kinds.utility_bill":"Facture d'électricité, d'eau ou de gaz","poa.kinds.telecom_bill":"Facture de téléphone ou d'internet","poa.kinds.bank_statement":"Relevé bancaire","poa.kinds.tax_notice":"Avis d'imposition","poa.kinds.rental_agreement":"Bail ou quittance de loyer","poa.kinds.government_certificate":"Certificat de résidence","poa.kinds.insurance_statement":"Attestation d'assurance","poa.source.camera":"Prendre une photo","poa.source.upload":"Importer un fichier","poa.source.lead":"Une photo du document, ou un PDF ou une image depuis votre appareil","poa.upload.hint":"PDF, JPEG ou PNG, 3 pages et 10 Mo au maximum","poa.upload.choose":"Choisir un fichier","poa.upload.addPage":"Ajouter une page","poa.upload.pages":"{count} sur 3 pages","poa.upload.send":"Envoyer le document","poa.upload.sending":"Envoi de votre document…","poa.upload.unsupported":"Ce type de fichier n'est pas accepté. Choisissez un PDF, un JPEG ou un PNG","poa.upload.tooManyPages":"Envoyez 3 pages au maximum. Retirez une page ou choisissez un fichier plus court","poa.upload.tooLarge":"Le fichier dépasse 10 Mo. Choisissez un fichier plus léger","poa.upload.failed":"Nous n'avons pas pu envoyer le document. Vérifiez votre connexion et réessayez","poa.camera.lead":"Posez le document à plat et remplissez le cadre. Prenez une photo par page","poa.camera.capture":"Prendre la photo","poa.camera.retake":"Reprendre","poa.camera.next":"Page suivante","poa.camera.page":"Page {number}","poa.letter.title":"Lettre du titulaire de la facture","poa.letter.lead":"Le document est au nom d'une autre personne. Ajoutez une lettre signée de cette personne attestant que vous habitez à cette adresse","poa.letter.send":"Envoyer la lettre","poa.licence.use":"Utiliser l'adresse de mon permis de conduire","poa.licence.note":"Nous avons lu cette adresse sur votre permis. Vous n'avez pas besoin d'un autre document.","poa.retry.document_too_old":"Ce document est plus ancien que la limite. Importez un document plus récent parmi ceux de la liste ci-dessous","poa.retry.document_date_invalid":"La date du document est dans le futur. Importez un document daté d'aujourd'hui ou d'avant","poa.retry.document_kind_not_accepted":"Ce type de document n'est pas accepté. Importez l'un des documents de la liste ci-dessous","poa.retry.name_mismatch":"Le nom sur le document ne correspond pas au vôtre. Importez un document à votre nom","poa.retry.address_mismatch":"L'adresse du document ne correspond pas à celle qui nous a été transmise. Importez un document pour cette adresse","poa.retry.holder_letter_missing":"La lettre doit être signée et nommer à la fois vous et le titulaire de la facture. Importez une lettre complète","poa.retry.unreadable":"Nous n'avons pas pu lire le document. Importez une copie plus nette et complète","poa.retry.pdf_protected":"Retirez le mot de passe du PDF et réessayez","poa.retry.provider_unavailable":"Le document n'a pas pu être vérifié pour le moment. Réessayez dans un instant","poa.hint.blurry":"L'image est floue","poa.hint.cropped":"Une partie du document est coupée","poa.hint.glare":"Il y a un reflet sur le document","reasons.provider_unavailable":"Le document n'a pas pu être vérifié pour le moment","reasons.pdf_protected":"Le PDF est protégé par un mot de passe ou contient du contenu actif","reasons.document_kind_not_accepted":"Ce type de document n'est pas accepté","reasons.document_date_invalid":"La date du document est dans le futur","reasons.document_too_old":"Le document est trop ancien","reasons.document_tampered":"Le document semble avoir été modifié","reasons.holder_letter_required":"Une lettre du titulaire de la facture est nécessaire","reasons.holder_letter_missing":"La lettre du titulaire de la facture est absente ou incomplète","reasons.address_mismatch":"L'adresse ne correspond pas à celle qui a été transmise"};function B({blob:a,label:n}){let[e,r]=(0,f.useState)(void 0);return(0,f.useEffect)(()=>{if(typeof URL.createObjectURL!="function")return;let d=URL.createObjectURL(a);return r(d),()=>URL.revokeObjectURL(d)},[a]),(0,o.jsx)("img",{src:e,alt:n})}l(B,"Q");p(B,"PageThumb");function $({step:a,i18n:n,c:e,title:r,notice:d,intro:m,onUpload:i}){let y=(0,f.useRef)(null),s=(0,f.useRef)(null),[c,_]=(0,f.useState)([]),[h,P]=(0,f.useState)(!1),[L,C]=(0,f.useState)("idle"),[K,F]=(0,f.useState)(!1),A=p(u=>{P(!1),u.start().catch(()=>P(!0))},"open");(0,f.useEffect)(()=>{let u=y.current;if(u===null)return;let g;try{g=a.capturePage({video:u})}catch{P(!0);return}return s.current=g,A(g),()=>{g.destroy(),s.current=null}},[]);let E=c.length>=a.maxPages,Q=p(async()=>{let u=s.current;if(!(u===null||E)){C("taking"),F(!1);try{await u.takePage()}catch{}_([...u.pages]),C("idle")}},"take"),X=p(u=>{let g=s.current;g!==null&&(g.removePage(u),_([...g.pages]))},"retake"),Z=p(async()=>{let u=s.current;if(!(u===null||c.length===0)){C("sending"),F(!1);try{await u.submitPages()}catch{F(!0)}C("idle")}},"send"),T=L==="sending";return(0,o.jsxs)("section",{className:"sekyro-step","data-testid":"sekyro-poa-camera",children:[(0,o.jsx)(D,{title:r,lead:e("poa.camera.lead")}),d,K?(0,o.jsx)(b,{tone:"danger",children:(0,o.jsx)("span",{children:e("poa.upload.failed")})}):null,h?(0,o.jsxs)(b,{tone:"danger",children:[(0,o.jsx)("span",{children:e("doc.cameraBlocked")}),(0,o.jsx)("span",{children:e("doc.cameraBlockedHint")}),s.current!==null?(0,o.jsx)(k,{kind:"secondary",onClick:l(()=>s.current!==null&&A(s.current),"onClick"),children:e("doc.retryCamera")}):null]}):null,c.length===0?m:null,(0,o.jsx)("video",{ref:y,className:"sekyro-poa-video",playsInline:!0,muted:!0,autoPlay:!0,"aria-hidden":"true"}),c.length>0?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:"sekyro-text-muted",role:"status",children:e("poa.upload.pages",{count:c.length})}),(0,o.jsx)("ul",{className:"sekyro-poa-pages",children:c.map((u,g)=>{let I=e("poa.camera.page",{number:g+1});return(0,o.jsxs)("li",{children:[(0,o.jsx)(B,{blob:u,label:I}),(0,o.jsx)(k,{kind:"ghost",onClick:l(()=>X(g),"onClick"),disabled:T,"aria-label":`${e("poa.camera.retake")} ${I}`,children:e("poa.camera.retake")})]},g)})})]}):null,T?(0,o.jsx)("p",{className:"sekyro-text-muted",role:"status","aria-busy":"true",children:e("poa.upload.sending")}):null,(0,o.jsxs)(R,{children:[(0,o.jsxs)(k,{full:!0,kind:c.length>0?"secondary":"primary",onClick:l(()=>{Q()},"onClick"),disabled:E||h||L!=="idle"||a.attemptsExhausted,"aria-busy":L==="taking"||void 0,children:[(0,o.jsx)(N,{name:"camera"}),e("poa.camera.capture")]}),c.length>0?(0,o.jsx)(k,{full:!0,onClick:l(()=>{Z()},"onClick"),disabled:L!=="idle","aria-busy":T||void 0,children:e("poa.upload.send")}):null,i!==void 0?(0,o.jsx)(k,{full:!0,kind:"ghost",onClick:i,disabled:T,children:e("poa.source.upload")}):null]})]})}l($,"J");p($,"PageCamera");var te={en:U,fr:ae,ar:ee,es:U,pt:U,de:U},oe="image/jpeg,image/png,image/heic,image/heif,application/pdf";function V(a){let n=a.strings,e=te[a.locale];return(r,d)=>q(n[r]??e[r]??"",d)}l(V,"ae");p(V,"poaCopy");function z({step:a,i18n:n,c:e}){if(a.reason===void 0)return null;let r=e(`poa.retry.${a.reason}`)||e(`reasons.${a.reason}`)||e("poa.retry.unreadable");return(0,t.jsxs)(b,{tone:"warning",children:[(0,t.jsx)("span",{children:r}),(0,t.jsx)("span",{children:G(n,a.attemptsRemaining,a.attemptsExhausted)})]})}l(z,"U");p(z,"RetryNotice");function w({step:a,i18n:n,c:e}){let r=(0,v.useId)(),{country:d}=a.rule,m=d===null?e("poa.accepted"):e("poa.acceptedFor",{country:J(d,n.locale)});return(0,t.jsxs)("div",{className:"sekyro-poa-accepted",children:[(0,t.jsx)("p",{id:r,className:"sekyro-poa-accepted__title",children:m}),(0,t.jsx)("ul",{className:"sekyro-poa-list","aria-labelledby":r,children:a.rule.kinds.map(i=>(0,t.jsx)("li",{children:e("poa.kindDated",{kind:e(`poa.kinds.${i.kind}`)||i.kind,days:i.maxAgeDays})},i.kind))})]})}l(w,"j");p(w,"AcceptedList");var re={unsupported:"poa.upload.unsupported",tooMany:"poa.upload.tooManyPages",tooLarge:"poa.upload.tooLarge",failed:"poa.upload.failed"};function W(a){return a instanceof TypeError&&a.message==="unsupported_file"?"unsupported":a instanceof RangeError&&a.message==="file_too_large"?"tooLarge":a instanceof RangeError&&(a.message==="too_many_pages"||a.message==="no_pages")?"tooMany":"failed"}l(W,"re");p(W,"refusalOf");function H({step:a,i18n:n,c:e,letter:r,onCamera:d}){let m=(0,v.useRef)(null),[i,y]=(0,v.useState)("idle"),s=i==="sending",c=p(async _=>{let h=Array.from(_.currentTarget.files??[]);if(_.currentTarget.value="",h.length!==0){if(h.length>a.maxPages){y("tooMany");return}y("sending");try{await(r?a.uploadHolderLetter(h):a.uploadPages(h)),y("idle")}catch(P){y(W(P))}}},"onFiles");return(0,t.jsxs)("section",{className:"sekyro-step","data-testid":r?"sekyro-poa-letter":"sekyro-poa-upload",children:[(0,t.jsx)(D,{title:e(r?"poa.letter.title":"poa.title"),lead:e(r?"poa.letter.lead":"poa.lead")}),i==="idle"||s?(0,t.jsx)(z,{step:a,i18n:n,c:e}):null,i!=="idle"&&!s?(0,t.jsx)(b,{tone:"danger",children:(0,t.jsx)("span",{children:e(re[i])})}):null,r?null:(0,t.jsx)(w,{step:a,i18n:n,c:e}),(0,t.jsx)("p",{className:"sekyro-text-muted",children:e("poa.upload.hint")}),s?(0,t.jsx)("p",{className:"sekyro-text-muted",role:"status","aria-busy":"true",children:e("poa.upload.sending")}):null,(0,t.jsx)("input",{ref:m,type:"file",accept:oe,multiple:!0,hidden:!0,"data-testid":"sekyro-poa-file","aria-label":e(r?"poa.letter.title":"poa.title"),onChange:l(_=>{c(_)},"onChange")}),(0,t.jsxs)(R,{children:[(0,t.jsx)(k,{full:!0,onClick:l(()=>m.current?.click(),"onClick"),disabled:s||!a.photo.uploadOffered||a.attemptsExhausted,"aria-busy":s||void 0,children:e("poa.upload.choose")}),d!==void 0?(0,t.jsxs)(k,{full:!0,kind:"ghost",onClick:d,disabled:s,children:[(0,t.jsx)(N,{name:a.photo.cameraOnPhone===!0?"smartphone":"camera"}),a.photo.cameraOnPhone===!0?e("capture.source.phone"):e("poa.source.camera")]}):null]})]})}l(H,"se");p(H,"UploadScreen");function Y({step:a,c:n}){let[e,r]=(0,v.useState)("idle"),d=a.useLicenceAddress;if(d===void 0)return null;let m=p(async()=>{r("sending");try{await d(),r("idle")}catch{r("failed")}},"onUse");return(0,t.jsxs)("div",{className:"sekyro-poa-licence","data-testid":"sekyro-poa-licence",children:[(0,t.jsx)("p",{className:"sekyro-text-muted",children:n("poa.licence.note")}),e==="failed"?(0,t.jsx)(b,{tone:"danger",children:(0,t.jsx)("span",{children:n("poa.upload.failed")})}):null,(0,t.jsx)(k,{full:!0,kind:"secondary",onClick:l(()=>{m()},"onClick"),disabled:e==="sending"||a.attemptsExhausted,"aria-busy":e==="sending"||void 0,children:n("poa.licence.use")})]})}l(Y,"de");p(Y,"LicenceShortcut");function ne({step:a,i18n:n}){let e=V(n),[r,d]=(0,v.useState)(null),m=a.phase==="holder_letter",i=a.photo.source,y=i==="choice"?r??a.photo.pick:i,s=a.photo.cameraOnPhone===!0,c=a.photo.uploadOffered?()=>d("upload"):void 0,_=e(m?"poa.letter.title":"poa.title"),h;return y===null?h=(0,t.jsx)(S,{testId:"sekyro-poa-source",title:_,lead:e("poa.source.lead"),cameraLabel:e(s?"capture.source.phone":"poa.source.camera"),uploadLabel:e("poa.source.upload"),onPhone:s,notice:(0,t.jsx)(z,{step:a,i18n:n,c:e}),onCamera:l(()=>d("camera"),"onCamera"),onUpload:l(()=>d("upload"),"onUpload")}):y==="camera"&&s?h=(0,t.jsx)(M,{i18n:n,lead:e("handoff.lead.poa"),refresh:a.refresh,actions:c!==void 0?(0,t.jsx)(k,{kind:"ghost",full:!0,onClick:c,children:e("poa.source.upload")}):null}):y==="camera"?h=(0,t.jsx)($,{step:a,i18n:n,c:e,title:_,notice:(0,t.jsx)(z,{step:a,i18n:n,c:e}),intro:m?null:(0,t.jsx)(w,{step:a,i18n:n,c:e}),...i==="choice"&&c!==void 0?{onUpload:c}:{}}):h=(0,t.jsx)(H,{step:a,i18n:n,c:e,letter:m,...i==="choice"?{onCamera:p(()=>d("camera"),"onCamera")}:{}}),(0,t.jsxs)(t.Fragment,{children:[m?null:(0,t.jsx)(Y,{step:a,c:e}),h]})}l(ne,"we");p(ne,"ProofOfAddressView");export{oe as POA_UPLOAD_ACCEPT,ne as ProofOfAddressView,V as poaCopy};
package/dist/styles.css CHANGED
@@ -761,6 +761,13 @@
761
761
  @font-face { font-family: "Sekyro Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("./fonts/SekyroInter-SemiBold.woff2") format("woff2"); unicode-range: U+0000-017F, U+02BB-02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2713, U+FEFF; }
762
762
  @font-face { font-family: "Sekyro Geist"; font-style: normal; font-weight: 600; font-display: swap; src: url("./fonts/SekyroGeist-SemiBold.woff2") format("woff2"); unicode-range: U+0000-017F, U+02BB-02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2713, U+FEFF; }
763
763
  @font-face { font-family: "Sekyro Geist"; font-style: normal; font-weight: 700; font-display: swap; src: url("./fonts/SekyroGeist-Bold.woff2") format("woff2"); unicode-range: U+0000-017F, U+02BB-02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2713, U+FEFF; }
764
+ /* Geist's metric-matched local fallbacks (in --sekyro-font-display after "Sekyro Geist"), shown while the title face
765
+ loads: a real bold face sized to Geist 600 (the flow-* titles), so the swap neither moves a title nor draws it in
766
+ synthetic bold, crowded by the titles' negative tracking. size-adjust = Geist 600's mean width over the local face
767
+ on French and English titles; ascent/descent = Geist's 1.005/0.295 em over size-adjust (fontTools, 2026-11-15; the
768
+ same method as @sekyro/brand/font-fallbacks.css, which is tuned at 650 for the website's heroes). */
769
+ @font-face { font-family: "Sekyro Geist Fallback"; font-style: normal; font-weight: 550 1000; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold"), local("Arimo Bold"), local("Arimo-Bold"), local("Helvetica Bold"), local("Helvetica-Bold"); ascent-override: 98.41%; descent-override: 28.89%; line-gap-override: 0%; size-adjust: 102.12%; }
770
+ @font-face { font-family: "Sekyro Geist Fallback Roboto"; font-style: normal; font-weight: 550 1000; src: local("Roboto Bold"), local("Roboto-Bold"); ascent-override: 92.61%; descent-override: 27.18%; line-gap-override: 0%; size-adjust: 108.52%; }
764
771
  @font-face { font-family: "Sekyro Cairo"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/SekyroCairo-Regular.woff2") format("woff2"); unicode-range: U+0020-00FF, U+0600-06FF, U+2013-2026, U+FB50-FDFF, U+FE70-FEFC; }
765
772
  @font-face { font-family: "Sekyro Cairo"; font-style: normal; font-weight: 600; font-display: swap; src: url("./fonts/SekyroCairo-SemiBold.woff2") format("woff2"); unicode-range: U+0020-00FF, U+0600-06FF, U+2013-2026, U+FB50-FDFF, U+FE70-FEFC; }
766
773
  @font-face { font-family: "Sekyro Cairo"; font-style: normal; font-weight: 700; font-display: swap; src: url("./fonts/SekyroCairo-Bold.woff2") format("woff2"); unicode-range: U+0020-00FF, U+0600-06FF, U+2013-2026, U+FB50-FDFF, U+FE70-FEFC; }
@@ -1010,27 +1017,32 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
1010
1017
  .sekyro-phone__lead { position: relative; display: flex; flex: none; align-items: center; align-self: stretch; margin-inline-start: -1rem; padding-inline-start: 1rem; }
1011
1018
  .sekyro-phone__dial { display: inline-flex; align-items: center; gap: 6px; padding-inline-end: 0.75rem; border-inline-end: 1px solid var(--sekyro-color-line); color: var(--sekyro-color-fg); }
1012
1019
  .sekyro-phone__flag { font-size: 1.25rem; line-height: 1; }
1013
- /* Several contact countries (person data spec Q16): a native select, transparent, over the whole segment from the field's edge. 17 px text keeps iOS from zooming on focus. */
1014
- .sekyro-phone__country {
1015
- position: absolute; inset: 0; z-index: 1; inline-size: 100%; block-size: 100%; margin: 0; padding: 0;
1016
- border: 0; opacity: 0; appearance: none; cursor: pointer;
1017
- font: var(--sekyro-type-flow-input) var(--sekyro-font);
1020
+ /* Several contact countries or "Another country" (phone rules spec 2026-11-02 §4.2): the segment is a button with a
1021
+ chevron; it opens the country list under the field, as the native sheet. */
1022
+ .sekyro-phone__pick {
1023
+ margin-block: 0; padding-block: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer;
1024
+ border-start-start-radius: var(--sekyro-radius); border-end-start-radius: var(--sekyro-radius);
1018
1025
  }
1019
1026
  /* The chevron is drawn here so the JS bundle carries no extra icon; the tighter segment keeps nine digits in view at 320 px. */
1020
- .sekyro-phone:has(.sekyro-phone__country) { padding-inline-end: 0.5rem; }
1027
+ .sekyro-phone:has(.sekyro-phone__pick) { padding-inline-end: 0.5rem; }
1021
1028
  /* Nine grouped digits stay in view beside the chevron on the narrowest phones (phone rules spec 2026-11-02 §4.1). */
1022
- @media (max-width: 359px) { .sekyro-phone:has(.sekyro-phone__country) { gap: 0.5rem; padding-inline-end: 0.25rem; } }
1023
- .sekyro-phone__country + .sekyro-phone__dial { gap: 4px; padding-inline-end: 0.5rem; }
1024
- .sekyro-phone__country + .sekyro-phone__dial::after {
1029
+ @media (max-width: 359px) { .sekyro-phone:has(.sekyro-phone__pick) { gap: 0.5rem; padding-inline-end: 0.25rem; } }
1030
+ .sekyro-phone__pick .sekyro-phone__dial { gap: 4px; padding-inline-end: 0.5rem; }
1031
+ .sekyro-phone__pick .sekyro-phone__dial::after {
1025
1032
  content: ""; inline-size: 7px; block-size: 7px; margin-block-start: -4px; margin-inline-start: 2px;
1026
1033
  border-block-end: 1.5px solid var(--sekyro-color-fg-muted); border-inline-end: 1.5px solid var(--sekyro-color-fg-muted);
1027
1034
  transform: rotate(45deg);
1028
1035
  }
1029
- .sekyro-phone__country:focus-visible + .sekyro-phone__dial { border-radius: 4px; outline: 2px solid var(--sekyro-color-ring); outline-offset: 2px; }
1036
+ .sekyro-phone__pick[aria-expanded="true"] .sekyro-phone__dial::after { margin-block-start: 4px; transform: rotate(-135deg); }
1037
+ .sekyro-phone__pick:focus-visible { outline: none; }
1038
+ .sekyro-phone__pick:focus-visible .sekyro-phone__dial { border-radius: 4px; outline: 2px solid var(--sekyro-color-ring); outline-offset: 2px; }
1039
+ .sekyro-phone__list { display: flex; flex-direction: column; gap: 0.75rem; }
1030
1040
  .sekyro-phone__input {
1031
1041
  flex: 1; min-inline-size: 0; padding: 0; border: 0; outline: none; background: transparent;
1032
1042
  font: inherit; font-variant-numeric: tabular-nums; color: var(--sekyro-color-fg); caret-color: var(--sekyro-color-brand);
1033
1043
  }
1044
+ /* The Form's phone answer: the height of every other field of the form (its text role is set with the Form's fields). */
1045
+ .sekyro-phone--compact { min-block-size: 52px; }
1034
1046
 
1035
1047
  /* The one-time code: full-width boxes over ONE input (paste and autofill land in it). */
1036
1048
  .sekyro-otp-boxes { position: relative; }
@@ -1107,6 +1119,11 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
1107
1119
  transform: rotate(calc(45deg * var(--sekyro-inline-sign)));
1108
1120
  }
1109
1121
  .sekyro-row-btn__flag { font-size: 1.375rem; line-height: 1; }
1122
+ /* Inside the rounded list (overflow hidden) the focus ring sits inside the row, so it is never clipped. */
1123
+ .sekyro-rows .sekyro-row-btn:focus-visible { outline-offset: -2px; }
1124
+ .sekyro-row-btn__name { flex: 1; min-inline-size: 0; }
1125
+ /* The phone list's calling code: left to right, muted, before the row's chevron. */
1126
+ .sekyro-row-btn__detail { color: var(--sekyro-color-fg-muted); font-variant-numeric: tabular-nums; }
1110
1127
 
1111
1128
  /* A small label over a group (the ICAO tips' "For your ID photo:"). */
1112
1129
  .sekyro-section-label { margin: 0; font: var(--sekyro-type-flow-label) var(--sekyro-font); color: var(--sekyro-color-fg-muted); }
@@ -1122,6 +1139,71 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
1122
1139
  }
1123
1140
  .sekyro-disc .sekyro-glyph { inline-size: 18px; block-size: 18px; }
1124
1141
 
1142
+ /* ── Proof of address (spec 2026-11-10 §7.4): the accepted list, the page camera and its thumbnails ── */
1143
+ .sekyro-poa-accepted { display: flex; flex-direction: column; gap: 0.5rem; }
1144
+ .sekyro-poa-accepted__title { margin: 0; font-weight: 600; color: var(--sekyro-color-fg); }
1145
+ .sekyro-poa-list { margin: 0; padding-inline-start: 1.25rem; display: flex; flex-direction: column; gap: 0.375rem; color: var(--sekyro-color-fg); }
1146
+ .sekyro-poa-video {
1147
+ display: block; inline-size: 100%; max-block-size: 50vh; aspect-ratio: 3 / 4; object-fit: cover;
1148
+ border-radius: var(--sekyro-radius-card); background: var(--sekyro-color-sunken);
1149
+ }
1150
+ .sekyro-poa-pages { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
1151
+ .sekyro-poa-pages > li { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
1152
+ .sekyro-poa-pages img {
1153
+ inline-size: 4.5rem; block-size: 6rem; object-fit: cover; border-radius: 0.5rem;
1154
+ border: 1px solid var(--sekyro-color-line); background: var(--sekyro-color-sunken);
1155
+ }
1156
+
1157
+ /* ── Form (spec 2026-11-14 §14.2): one column of questions, choices as touch rows, consents last ── */
1158
+ /* Every answer's value in one text role, the body's (17 px: no zoom on focus in iOS Safari): text, numbers, the date's
1159
+ parts, the country and the phone number alike. The extra class outweighs a host page's own input rules. */
1160
+ .sekyro-root .sekyro-form.sekyro-step :is(input.sekyro-input, textarea.sekyro-input, button.sekyro-form-country, .sekyro-phone, .sekyro-phone__input) {
1161
+ font: var(--sekyro-type-flow-body) var(--sekyro-font);
1162
+ }
1163
+ .sekyro-form-questions { display: flex; flex-direction: column; gap: 1.25rem; }
1164
+ .sekyro-form-q { min-inline-size: 0; }
1165
+ .sekyro-form-group { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; padding: 0; border: 0; }
1166
+ .sekyro-form-group > legend { padding: 0; margin-block-end: 0.5rem; }
1167
+ .sekyro-root .sekyro-form-q .sekyro-label { color: var(--sekyro-color-fg); }
1168
+ .sekyro-form-optional { font-weight: 400; color: var(--sekyro-color-fg-muted); white-space: nowrap; }
1169
+ .sekyro-form-choices { display: flex; flex-direction: column; gap: 0.5rem; }
1170
+ .sekyro-form-choice {
1171
+ display: flex; align-items: center; gap: 0.75rem; min-block-size: 52px; padding-block: 0.75rem; padding-inline: 1rem;
1172
+ border: 1px solid var(--sekyro-color-line); border-radius: var(--sekyro-radius); background: var(--sekyro-color-surface);
1173
+ color: var(--sekyro-color-fg); cursor: pointer; transition: border-color 150ms, box-shadow 150ms;
1174
+ }
1175
+ .sekyro-form-choice > input { flex: none; inline-size: 20px; block-size: 20px; margin: 0; accent-color: var(--sekyro-color-brand); cursor: pointer; }
1176
+ .sekyro-form-choice:has(> input:checked) { border-color: var(--sekyro-color-brand); box-shadow: inset 0 0 0 1px var(--sekyro-color-brand); }
1177
+ .sekyro-form-choice:has(> input:focus-visible) { outline: 2px solid var(--sekyro-color-ring); outline-offset: 2px; }
1178
+ .sekyro-form-choice:has(> input[aria-invalid="true"]) { border-color: var(--sekyro-color-danger); }
1179
+ .sekyro-root .sekyro-form-textarea { min-block-size: 7.5rem; padding-block: 0.75rem; resize: vertical; }
1180
+ .sekyro-form-date { display: flex; gap: 0.75rem; }
1181
+ .sekyro-form-date > div { display: flex; flex-direction: column; gap: 0.25rem; }
1182
+ .sekyro-form-date__day, .sekyro-form-date__month { inline-size: 4.5rem; }
1183
+ .sekyro-form-date__year { inline-size: 6.5rem; }
1184
+ .sekyro-form-date .sekyro-input { inline-size: 100%; text-align: center; }
1185
+ /* A country answer: the chosen country as a field (flag, name, a chevron); the document picker's list opens under it. */
1186
+ .sekyro-root .sekyro-form-country { display: flex; align-items: center; gap: 0.75rem; inline-size: 100%; color: var(--sekyro-color-fg); text-align: start; cursor: pointer; }
1187
+ .sekyro-form-country::after {
1188
+ content: ""; flex: none; margin-inline-start: auto; inline-size: 7px; block-size: 7px; margin-block-start: -4px;
1189
+ border-block-end: 1.5px solid var(--sekyro-color-fg-muted); border-inline-end: 1.5px solid var(--sekyro-color-fg-muted);
1190
+ transform: rotate(calc(45deg * var(--sekyro-inline-sign)));
1191
+ }
1192
+ .sekyro-form-country[aria-expanded="true"]::after { margin-block-start: 4px; transform: rotate(calc(-135deg * var(--sekyro-inline-sign))); }
1193
+ .sekyro-form-country__name { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1194
+ .sekyro-form-country__name.is-empty { color: var(--sekyro-color-fg-subtle); }
1195
+ .sekyro-form-country__list { display: flex; flex-direction: column; gap: 0.75rem; }
1196
+ .sekyro-rows--scroll { max-block-size: 18rem; overflow-y: auto; overscroll-behavior: contain; }
1197
+ .sekyro-row-btn[aria-current="true"] { background: var(--sekyro-color-brand-soft); font-weight: 600; }
1198
+ .sekyro-form-address { display: flex; flex-direction: column; gap: 0.75rem; }
1199
+ .sekyro-form-consents { gap: 0.75rem; }
1200
+ .sekyro-form-consent { display: flex; flex-direction: column; gap: 0.375rem; }
1201
+ .sekyro-form-consent__row { align-items: flex-start; cursor: default; }
1202
+ .sekyro-form-consent__row > input { margin-block-start: 2px; }
1203
+ .sekyro-form-consent__text { display: flex; flex-direction: column; gap: 0.25rem; }
1204
+ .sekyro-form-consent__text > label { cursor: pointer; }
1205
+ .sekyro-root .sekyro-form-consent__link { align-self: flex-start; color: var(--sekyro-color-brand); text-decoration: underline; text-underline-offset: 0.2em; }
1206
+
1125
1207
  /* ── The camera intros' marks: line geometry of what the camera will do ── */
1126
1208
  .sekyro-mark { display: block; margin-inline: auto; overflow: visible; }
1127
1209
  .sekyro-mark--card { inline-size: min(100%, 15.75rem); margin-block: 0.75rem; }
@@ -1145,14 +1227,23 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
1145
1227
  .sekyro-root .sekyro-result { display: flex; flex-direction: column; flex: 1; padding-block-start: 2rem; }
1146
1228
  .sekyro-result__body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; flex: 1; padding-block-end: 2rem; text-align: center; }
1147
1229
  .sekyro-root .sekyro-result .sekyro-heading { align-items: center; }
1148
- /* The approved disc (64 px) in its soft ring (8 px each side). */
1149
- .sekyro-outcome { inline-size: calc(var(--sekyro-size-result-disc) + 2 * var(--sekyro-size-result-ring)); block-size: calc(var(--sekyro-size-result-disc) + 2 * var(--sekyro-size-result-ring)); }
1150
- .sekyro-outcome__ring { fill: var(--sekyro-color-success-soft, color-mix(in srgb, var(--sekyro-color-success) 14%, var(--sekyro-color-surface))); transform-origin: center; transform-box: fill-box; animation: sekyro-fill 380ms var(--sekyro-spring) both; }
1151
- .sekyro-outcome__disc { fill: var(--sekyro-color-success); transform-origin: center; transform-box: fill-box; animation: sekyro-fill 380ms var(--sekyro-spring) 120ms both; }
1230
+ /* The result's title is the flow's hero role (28/34, Geist 600, -0.015em), as on iOS and Android (ResultScreen). */
1231
+ .sekyro-root .sekyro-result .sekyro-heading > h2 { font: var(--sekyro-type-flow-hero) var(--sekyro-font-display); letter-spacing: var(--sekyro-tracking-flow-hero); }
1232
+ .sekyro-root [lang="ar"] .sekyro-result .sekyro-heading > h2 { font-family: var(--sekyro-font-arabic); line-height: 1.4; }
1233
+ /* The simulated Sandbox session's notice: the width of the column, read from the start like every notice. */
1234
+ .sekyro-result__body .sekyro-notice { align-self: stretch; text-align: start; }
1235
+ /* The verified mark (136 px, as before the 2026-11-05 refresh): the soft success band draws itself round, the disc springs in, the check is traced. */
1236
+ .sekyro-outcome { inline-size: 136px; block-size: 136px; }
1237
+ .sekyro-outcome__ring {
1238
+ fill: none; stroke: var(--sekyro-color-success-soft, color-mix(in srgb, var(--sekyro-color-success) 14%, var(--sekyro-color-surface))); stroke-width: 12; stroke-linecap: butt;
1239
+ stroke-dasharray: 1; stroke-dashoffset: 1; transform: rotate(-90deg); transform-origin: center; transform-box: fill-box;
1240
+ animation: sekyro-draw 450ms ease-out forwards;
1241
+ }
1242
+ .sekyro-outcome__disc { fill: var(--sekyro-color-success); transform-origin: center; transform-box: fill-box; animation: sekyro-fill 380ms var(--sekyro-spring) 380ms both; }
1152
1243
  @keyframes sekyro-fill { from { opacity: 0; transform: scale(0.86); } }
1153
1244
  .sekyro-outcome__glyph {
1154
- fill: none; stroke: var(--sekyro-color-on-success, var(--sekyro-color-surface)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
1155
- stroke-dasharray: 1; stroke-dashoffset: 1; animation: sekyro-draw 320ms ease-out 380ms forwards;
1245
+ fill: none; stroke: var(--sekyro-color-on-success, var(--sekyro-color-surface)); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
1246
+ stroke-dasharray: 1; stroke-dashoffset: 1; animation: sekyro-draw 320ms ease-out 620ms forwards;
1156
1247
  }
1157
1248
  @keyframes sekyro-draw { to { stroke-dashoffset: 0; } }
1158
1249
  .sekyro-outcome-tile { animation: sekyro-fill 380ms var(--sekyro-spring) both; }
@@ -1413,8 +1504,8 @@ p.sekyro-resend { display: flex; align-items: center; min-block-size: 44px; marg
1413
1504
  .sekyro-lm-read, .sekyro-lm-flip-card { animation: none; }
1414
1505
  .sekyro-lm-flip-card { transform: rotateY(180deg); }
1415
1506
  .sekyro-lm-read.is-repeating { transform: translateX(calc(var(--sekyro-guide-w) * 0.5 * var(--sekyro-inline-sign))); }
1416
- .sekyro-outcome__glyph { animation: none; stroke-dashoffset: 0; }
1417
- .sekyro-outcome__ring, .sekyro-outcome__disc, .sekyro-outcome-tile, .sekyro-dialog[open], .sekyro-skeleton__bar, .sekyro-handoff__pulse { animation: none; }
1507
+ .sekyro-outcome__ring, .sekyro-outcome__glyph { animation: none; stroke-dashoffset: 0; }
1508
+ .sekyro-outcome__disc, .sekyro-outcome-tile, .sekyro-dialog[open], .sekyro-skeleton__bar, .sekyro-handoff__pulse { animation: none; }
1418
1509
  .sekyro-tile.is-busy { animation: none; }
1419
1510
  .sekyro-lm-brackets > path, .sekyro-progress__bar::before, .sekyro-root .sekyro-btn, .sekyro-card { transition: none; }
1420
1511
  .sekyro-root .sekyro-btn:active, .sekyro-card:active { transform: none; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sekyro/elements",
3
- "version": "0.1.0-rc.1",
3
+ "version": "0.1.0-rc.10",
4
4
  "description": "Sekyro AI custom elements: <sekyro-verification> for Vue, Angular, Svelte and plain HTML, the @sekyro/react flow with React bundled inside",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -94,7 +94,7 @@
94
94
  "api:check": "api-extractor run"
95
95
  },
96
96
  "peerDependencies": {
97
- "@sekyro/web": "^0.1.0-rc.23 || ^0.2.0-rc.0"
97
+ "@sekyro/web": "^0.1.0-rc.31 || ^0.2.0-rc.0"
98
98
  },
99
99
  "devDependencies": {
100
100
  "@microsoft/api-extractor": "^7.59.4",
package/sbom.cdx.json ADDED
@@ -0,0 +1,153 @@
1
+ {
2
+ "$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
3
+ "bomFormat": "CycloneDX",
4
+ "specVersion": "1.6",
5
+ "version": 1,
6
+ "metadata": {
7
+ "tools": {
8
+ "components": [
9
+ {
10
+ "type": "application",
11
+ "name": "npm",
12
+ "version": "11.12.1"
13
+ },
14
+ {
15
+ "type": "library",
16
+ "name": "cyclonedx-library",
17
+ "group": "@cyclonedx",
18
+ "version": "10.3.0",
19
+ "author": "Jan Kowalleck",
20
+ "description": "Core functionality of CycloneDX for JavaScript (Node.js or WebBrowser).",
21
+ "licenses": [
22
+ {
23
+ "license": {
24
+ "id": "Apache-2.0"
25
+ }
26
+ }
27
+ ],
28
+ "externalReferences": [
29
+ {
30
+ "url": "https://github.com/CycloneDX/cyclonedx-javascript-library/issues",
31
+ "type": "issue-tracker",
32
+ "comment": "as detected from PackageJson property \"bugs.url\""
33
+ },
34
+ {
35
+ "url": "git+https://github.com/CycloneDX/cyclonedx-javascript-library.git",
36
+ "type": "vcs",
37
+ "comment": "as detected from PackageJson property \"repository.url\""
38
+ },
39
+ {
40
+ "url": "https://github.com/CycloneDX/cyclonedx-javascript-library#readme",
41
+ "type": "website",
42
+ "comment": "as detected from PackageJson property \"homepage\""
43
+ }
44
+ ],
45
+ "properties": [
46
+ {
47
+ "name": "cdx:npm:package:constraint:engine:node",
48
+ "value": ">=20.18.0"
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ "type": "application",
54
+ "name": "cyclonedx-npm",
55
+ "group": "@cyclonedx",
56
+ "version": "6.0.1",
57
+ "author": "Jan Kowalleck",
58
+ "description": "Create CycloneDX Software Bill of Materials (SBOM) from NPM projects.",
59
+ "licenses": [
60
+ {
61
+ "license": {
62
+ "id": "Apache-2.0"
63
+ }
64
+ }
65
+ ],
66
+ "externalReferences": [
67
+ {
68
+ "url": "https://github.com/CycloneDX/cyclonedx-node-npm/issues",
69
+ "type": "issue-tracker",
70
+ "comment": "as detected from PackageJson property \"bugs.url\""
71
+ },
72
+ {
73
+ "url": "git+https://github.com/CycloneDX/cyclonedx-node-npm.git",
74
+ "type": "vcs",
75
+ "comment": "as detected from PackageJson property \"repository.url\""
76
+ },
77
+ {
78
+ "url": "https://github.com/CycloneDX/cyclonedx-node-npm#readme",
79
+ "type": "website",
80
+ "comment": "as detected from PackageJson property \"homepage\""
81
+ }
82
+ ],
83
+ "properties": [
84
+ {
85
+ "name": "cdx:npm:package:constraint:engine:node",
86
+ "value": ">=20.18.0"
87
+ },
88
+ {
89
+ "name": "cdx:npm:package:constraint:engine:npm",
90
+ "value": ">=9"
91
+ }
92
+ ]
93
+ }
94
+ ]
95
+ },
96
+ "component": {
97
+ "type": "application",
98
+ "name": "elements",
99
+ "group": "@sekyro",
100
+ "version": "0.1.0-rc.10",
101
+ "bom-ref": "@sekyro/elements@0.1.0-rc.10",
102
+ "description": "Sekyro AI custom elements: <sekyro-verification> for Vue, Angular, Svelte and plain HTML, the @sekyro/react flow with React bundled inside",
103
+ "licenses": [
104
+ {
105
+ "license": {
106
+ "name": "SEE LICENSE IN LICENSE",
107
+ "acknowledgement": "declared"
108
+ }
109
+ }
110
+ ],
111
+ "purl": "pkg:npm/%40sekyro/elements@0.1.0-rc.10?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-elements",
112
+ "externalReferences": [
113
+ {
114
+ "url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity/issues",
115
+ "type": "issue-tracker",
116
+ "comment": "as detected from PackageJson property \"bugs.url\""
117
+ },
118
+ {
119
+ "url": "git+https://github.com/IBTIKAR-Technologies/ibtikar-identity.git#packages/sekyro-elements",
120
+ "type": "vcs",
121
+ "comment": "as detected from PackageJson property \"repository.url\" and \"repository.directory\""
122
+ },
123
+ {
124
+ "url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity#readme",
125
+ "type": "website",
126
+ "comment": "as detected from PackageJson property \"homepage\""
127
+ }
128
+ ],
129
+ "properties": [
130
+ {
131
+ "name": "cdx:npm:package:constraint:engine:node",
132
+ "value": ">=20"
133
+ },
134
+ {
135
+ "name": "cdx:npm:package:path",
136
+ "value": ""
137
+ }
138
+ ]
139
+ },
140
+ "properties": [
141
+ {
142
+ "name": "cdx:reproducible",
143
+ "value": "true"
144
+ }
145
+ ]
146
+ },
147
+ "components": [],
148
+ "dependencies": [
149
+ {
150
+ "ref": "@sekyro/elements@0.1.0-rc.10"
151
+ }
152
+ ]
153
+ }
@@ -1 +0,0 @@
1
- import{B as Y,C as U,D as Re,E as Ee,a as L,b as ve,c as ye,f as _e,g as ge,h as we,i as ke,j as be,k as Ce,m as A,o as b,p as S,q as I,s as C,t as Z,u as Me,v as Ae,w as Se,x as Te,y as Ie}from"./chunk-U3UDWPBG.js";import{f as Oe}from"./chunk-ZKLSZJFN.js";import{b as he,c as $,e as Pe}from"./chunk-D334IAZJ.js";import{a as t}from"./chunk-4FHWXBOB.js";function nt(n){return n.idNumberBound??n.nniBound}t(nt,"J");function Ne(n){return n===void 0?void 0:n.idNumberFromDocument??n.nniFromDocument}t(Ne,"F");var xe="https://api.sekyro.ai",rt=5e3,it=24e4,at=1500,ot=10;function st(n){return new Promise(a=>setTimeout(a,n))}t(st,"Rt");function lt(){let n=globalThis.crypto;if(n!==void 0&&typeof n.randomUUID=="function")return n.randomUUID();let a=new Uint8Array(16);if(n!==void 0&&typeof n.getRandomValues=="function")n.getRandomValues(a);else for(let p=0;p<16;p+=1)a[p]=Math.floor(Math.random()*256);a[6]=(a[6]??0)&15|64,a[8]=(a[8]??0)&63|128;let d=[...a].map(p=>p.toString(16).padStart(2,"0")).join("");return`${d.slice(0,8)}-${d.slice(8,12)}-${d.slice(12,16)}-${d.slice(16,20)}-${d.slice(20)}`}t(lt,"xt");function ut(n){return ct(n,{})}t(ut,"gn");function ct(n,a){let d=n.apiOrigin??xe,p=n.autoRetry??!0,Ke=n.rearm??"auto",f=a.client??new ye({apiOrigin:d,sessionToken:n.clientToken,fetch:n.fetch}),R=a.sleep??st,Be=a.uuid??lt,Ve=a.getTurnstileToken??((e,r)=>import("./turnstile-N4K4U2AI-SLP55XAA.js").then(i=>i.executeTurnstile(e,r))),k=Pe(),M=null,z=null,u=!1,J=new AbortController,o=null,E=null,P=null,O=t(()=>P??Re(o),"G"),Q=t(()=>Ee(U(o),O()),"le"),v=t(e=>{o=e,k.emit("view",e),M?.onView(e)},"R"),m=t(()=>o!==null?Promise.resolve(o):(E??(E=f.getSession().then(e=>(v(e),e)).finally(()=>{E=null})),E),"_"),y=t(async()=>{let e=await f.getSession();return v(e),e},"x"),K=t(async(e,r)=>{e.plan!==void 0?v(e):await y()},"Q"),N=null,X=t(async e=>{let r=await m();if(e||!r.consentRecorded){let i=await f.recordConsent(n.locale);i.plan!==void 0?v(i):o!==null&&v({...o,consentRecorded:!0})}ce(r.turnstileSiteKey)},"pe"),w=t(e=>e?.force===!0?X(!0):(N??(N=X(!1).finally(()=>{N=null})),N),"I"),B={client:f,ensureConsent:t(e=>w(e),"ensureConsent"),sleep:R,uuid:Be,...a.random!==void 0?{random:a.random}:{},onBusy:t(e=>{u||k.emit("busy",e)},"onBusy")},ee=!1,te=null,V=t(e=>{if(e.status==="verified"||e.status==="not_verified"||e.status==="review"){if(ee)return;ee=!0}te=JSON.stringify(e),k.emit("result",e)},"ee"),Fe=t(e=>{te!==JSON.stringify(e)&&V(e)},"st"),ne=t(async e=>{let r=o;e&&(r=await y().catch(()=>o));let i=r===null?null:A(r);return i!==null&&!u&&k.emit("method",i),i!==null},"he"),F=null,re=!1,ie=!1,ae=t(()=>Se(B,(e,r)=>e.submitCheck("population_registry",{},{idempotencyKey:r})),"Ce"),oe=t(e=>nt(e)===!0||Ne(I(e,"population_registry"))===!0,"_e"),He=t(async()=>{try{let e=await m();if(b(e)||A(e)!==null||S(e)?.checkType!=="population_registry")return;if(!oe(e)&&Ne(I(e,"population_registry"))===void 0&&(e=await y()),!oe(e)){ie=!0;return}await w(),await K(await ae(),"population_registry");let r=o===null?void 0:I(o,"population_registry");if(r?.state==="input_required"&&r.reason==="registry_unavailable"&&Ce(r)>0){if(await R(rt),u)return;await K(await ae(),"population_registry")}}catch(e){if(e instanceof L&&(e.code==="check_not_active"||e.code==="step_not_on_path")){await y().catch(()=>{});return}re=!0;return}o!==null&&b(o)&&V(Z(o,{autoRetry:p}))},"at"),se=t(()=>(F??(F=He()),F),"ke"),le=a.now??Date.now,x=null,H=t(e=>Ve(e,{signal:J.signal}),"te"),ue=t((e,r)=>e!==null&&e.siteKey===r&&le()-e.at<it,"be"),ce=t(e=>{if(e===null||u||ue(x,e))return;let r=H(e);r.catch(()=>{}),x={siteKey:e,at:le(),token:r}},"Re"),je=t(e=>{let r=x;return x=null,ue(r,e)?r.token.catch(()=>H(e)):H(e)},"ct"),de=t(async()=>{let e=(await m()).turnstileSiteKey;return e===null?{}:{channel:"hosted_web",siteKey:e,turnstileToken:await je(e)}},"xe"),D=t(e=>{if(u)return;let r=f.reportCaptureIssue;if(r===void 0)return;let i=e.formFactor;try{i??(i=he())}catch{}try{Promise.resolve(r.call(f,{...e,...i!==void 0?{formFactor:i}:{}})).catch(()=>{})}catch{}},"q"),h=null,pe=Promise.resolve(),T=0,qe=t(async()=>{let e=await m();for(let r=0;r<ot&&!u&&!b(e)&&S(e)===void 0&&be(e).some(i=>i.state==="processing")&&(await R(at),!u);r+=1)e=await y();return e},"ut"),$e=t(async(e,r,i)=>{let{capture:c}=e,s=t(()=>u,"h"),_=t(()=>e.alive&&e.attempt===i,"O"),G=t(l=>{_()&&c.setFlowState(l)},"Y"),g=t(l=>{if(!s()&&(l.status==="unavailable"&&l.reasonCode!==void 0&&!_e(l.reasonCode)&&D({check:"liveness",kind:"unavailable",phase:"upload",engineKind:l.reasonCode,attempt:Math.max(0,e.issues.value)}),V(l),!!_())){if(l.status==="retry"&&Ke==="auto"){c.handle.retry();return}c.setFlowState("done")}},"v");if(r.degraded==="NO_RECORDER"){let l=o?.sessionId??(await m().catch(()=>null))?.sessionId??"";g(C(l,"no_recorder"));return}G("uploading");try{if(await se(),s())return;let l=await m(),me;if(!b(l)&&A(l)!==null){await ne(!1),g(C(l.sessionId,"method_required"));return}if(!b(l)){if(S(l)?.checkType==="population_registry"){g(C(l.sessionId,ie?"nni_unbound":re?"network":"registry_unavailable"));return}if(await w(),s())return;me=o??l;let q=await Te({...B,artifacts:r,getAttestation:de,getView:t(()=>o??l,"getView"),refreshView:y,applySubmit:K,onPhase:G,isCancelled:s,onKeyframePromoted:t(et=>{z=et},"onKeyframePromoted")});if(s())return;if(q.kind==="unavailable"){g(C(l.sessionId,q.reason));return}if(q.kind==="resync"&&await y(),o!==null&&A(o)!==null){await ne(!1),g(C(l.sessionId,"method_required"));return}l=await qe()}g(Z(l,{autoRetry:p,previous:me}))}catch{if(s())return;g(C(o?.sessionId??"","network"))}},"dt"),Ze=t((e,r)=>{let i=e.attempt;T>0&&e.alive&&e.capture.setFlowState("uploading"),T+=1,pe=pe.then(()=>$e(e,r,i)).finally(()=>{T-=1,T===0&&M?.onChainIdle()}).catch(()=>{})},"lt"),fe=t(e=>{h?.capture.handle.destroy(),h!==null&&(h.alive=!1);let r=Oe(e,M?.captureInternals?.(e)??a.capture,()=>o?.capture?.liveness?.keyframe?.rank===!0,Q,()=>o?.capture?.liveness?.screenRamp,{session:t(()=>U(o),"session"),onModeChange:t(s=>{P=s},"onModeChange")}),i={capture:r,alive:!0,attempt:0,issues:we()};h=i,r.handle.on("error",s=>{D(ge("liveness",s,i.issues.value))}),r.handle.on("state",s=>{if(i.issues.note(s),s==="starting"){i.attempt+=1,ce(o?.turnstileSiteKey??null);let _=o===null?void 0:S(o)?.checkType;(_==="liveness"||_==="face_match")&&w().catch(()=>{})}}),r.handle.on("captured",s=>{Promise.resolve().then(()=>Ze(i,s))});let c=r.handle;return{get state(){return c.state},get captureMode(){return c.captureMode},get facingMode(){return c.facingMode},on:t((s,_)=>c.on(s,_),"on"),start:t(async s=>{if(o===null&&await m().catch(()=>{}),!!i.alive)return c.start(s)},"start"),retry:t(()=>c.retry(),"retry"),switchCamera:t(()=>c.switchCamera(),"switchCamera"),canSwitchCaptureMode:t(()=>c.canSwitchCaptureMode(),"canSwitchCaptureMode"),setCaptureMode:t(s=>c.setCaptureMode(s),"setCaptureMode"),destroy:t(()=>{i.alive=!1,h===i&&(h=null),c.destroy()},"destroy")}},"ve"),Ye=t(async()=>{if(u)return null;try{let e=await m();return u?null:A(e)}catch{return null}},"pt"),We=t(async()=>{if(u)return"self";try{let e=await m();if(u)return"self";let r=U(e);return r==="choice"?O()??r:r}catch{return"self"}},"ft"),ze=t(async()=>{if(u)return!1;try{let e=await m();return u||b(e)||$()?!1:Y(e,S(e))==="phone"||Y(e,I(e,"liveness"))==="phone"}catch{return!1}},"mt"),Je=t(async()=>{if(u)return!1;try{let e=await m();return!u&&e.returning===!0}catch{return!1}},"ht"),Qe=t(async e=>{let r=(await m()).plan?.choice,i=r?.options.find(s=>ke[s.service]===e);if(!i)throw new RangeError(`method ${String(e)} is not offered`);let c=await f.choose(r.nodeId,i.id);u||v(c)},"St"),j=null,Xe=t(()=>(j??(j=import("./plan-runner-ZHOYMRAO-RDS523K5.js").then(e=>{let r=e.createPlanRunner({runtime:B,currentView:t(()=>o,"currentView"),cameraMode:Q,captureModeSwitch:{pick:O,choose:t(i=>{P=i},"choose")},ensureView:m,refreshView:y,ensureConsent:t(()=>w(),"ensureConsent"),liveness:fe,stopLiveness:t(()=>{h!==null&&(h.alive=!1,h.capture.handle.destroy(),h=null)},"stopLiveness"),chainBusy:t(()=>T>0,"chainBusy"),destroyed:t(()=>u,"destroyed"),sleep:R,isMobile:$,now:a.now??Date.now,keptFaceKey:t(()=>z,"keptFaceKey"),setView:v,baseCapture:a.capture,emitStep:t(i=>{u||k.emit("step",i)},"emitStep"),emitResult:Fe,reportCaptureIssue:D,documentInternals:a.document,portraitInternals:a.portrait,livePhotoInternals:a.livePhoto,uploadInternals:a.upload});return M=r,r})),j),"yt");return{consent:t(()=>w(),"consent"),startRegistry:se,methodChoice:Ye,selectMethod:Qe,reportCameraUnavailable:t(async e=>{await w();let r=f.reportCameraUnavailable;if(r===void 0)throw new TypeError("this client cannot report a missing camera");let i=await r.call(f,e).catch(c=>{if(c instanceof L&&c.code==="check_out_of_order")return f.getSession();throw c});u||v(i)},"reportCameraUnavailable"),reportCaptureIssue:D,testerGate:t(async e=>{let r=f.testerGate;if(r===void 0)throw new TypeError("this client cannot run the tester gate");let i=e.clip,c=ve(e.clipMime??"");if(i===void 0||!Ae.includes(c))throw new TypeError("the capture has no clip");await w();let s=await Me(f,"clip",c,i.size,{engine:e.engine,durationMs:e.clipMs});await f.uploadToSpaces(s.uploadUrl,i,c);let{key:_}=await f.completeMedia(s.key),G=await r.call(f,{clipKey:_,attestation:await de(),captureChannel:e.captureChannel,capture:Ie(e)}),{bound:g,...l}=G;return u||(l.plan!==void 0?v(l):await y()),{bound:g===!0}},"testerGate"),mobileRequired:ze,captureMode:We,chooseCaptureMode:t(e=>{P=e},"chooseCaptureMode"),get captureChoice(){return O()},returning:Je,liveness:fe,run:t(async()=>{if(u)throw new Error("verification destroyed");return(await Xe()).run()},"run"),currentStep:t(()=>M?.current()??null,"currentStep"),voiceClips:t(async()=>{if(u)return null;try{let e=await m();return u?null:e.voice??null}catch{return null}},"voiceClips"),on:t((e,r)=>k.on(e,r),"on"),destroy:t(()=>{u=!0,J.abort(),M?.destroy(),h!==null&&(h.alive=!1,h.capture.handle.destroy(),h=null),k.clear()},"destroy")}}t(ct,"Ot");var De=["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],Ge=["carte_identite","passport","residence_permit"];function W(n,a){let d=n.byIssuer?.[a]??n.default;return Ge.filter(p=>d==="*"||d.includes(p))}t(W,"At");function Le(n,a=De){return[...new Set([...a,...Object.keys(n.byIssuer??{})])].filter(d=>W(n,d).length>0).sort()}t(Le,"Pn");var Ue=Object.freeze({nni_invalid:"id_number_invalid",nni_not_found:"registry_record_not_found",nni_recheck:"id_number_recheck",document_nni_mismatch:"document_id_number_mismatch",nni_locked:"id_number_locked",nni_unbound:"id_number_unbound",sandbox_nni_not_seeded:"sandbox_id_number_not_seeded",missing_nni:"missing_id_number",registry_needs_nni_source:"registry_needs_id_number_source"}),Et=new Map(Object.entries(Ue)),Pt=new Map(Object.entries(Ue).map(([n,a])=>[a,n]));function un(n){if(n==="permission")return"denied";if(n==="notfound"||n==="insecure"||n==="unsupported")return"no_camera"}t(un,"ee");var dt=/^[A-Z0-9][A-Z0-9 -]{0,39}$/,pt=Object.freeze({normalize:t(n=>n.trim().toUpperCase().replace(/\s+/g," "),"normalize"),check:t(n=>dt.test(n),"check"),registrySources:Object.freeze([]),describe:"number must be 1 to 40 letters, digits, spaces or hyphens"});function ft(n){return typeof n=="string"&&/^\d{10}$/.test(n)&&Number(n)%97===1}t(ft,"re");var mt=Object.freeze({normalize:t(n=>n.trim(),"normalize"),check:t(n=>ft(n),"check"),registrySources:Object.freeze(["MR.anrpts"]),describe:"number must be the 10-digit Mauritanian national ID number with a valid check digit"}),ht=Object.freeze({"MR:national_id":mt});function vt(n,a){return ht[`${n.toUpperCase()}:${a}`]??pt}t(vt,"m");var cn=Object.freeze({MRT:"MR"});function dn(n){return vt("MR","national_id").check(n)}t(dn,"pe");function yt(n){let a="";for(let d of n){let p=d.codePointAt(0)??0;p>=1632&&p<=1641?a+=String(p-1632):p>=1776&&p<=1785?a+=String(p-1776):d!==" "&&d!=="-"&&d!==" "&&(a+=d)}return a}t(yt,"g");function pn(n){return yt(n)}t(pn,"ue");var fn=W,mn=Le;var _t=t(()=>import("./create-document-capture-UHZJUZHC-YYZNCSW6.js"),"M");function gt(){_t().then(n=>n.warmDocumentCapture()).catch(()=>{})}t(gt,"E");function hn(){gt()}t(hn,"Ge");var wt=t(()=>import("./create-portrait-capture-VRZZOMJS-I4FBRNBP.js"),"D");function kt(){wt().then(n=>n.warmPortraitCapture()).catch(()=>{})}t(kt,"L");function vn(){kt()}t(vn,"ke");export{ut as a,un as b,dn as c,pn as d,fn as e,mn as f,hn as g,vn as h};
@@ -1 +0,0 @@
1
- import{a as ee,b as he,c as fe,d as ge,f as ve}from"./chunk-SK6UAYX2.js";import{c as ye}from"./chunk-CMS5FVGM.js";import{e as Y}from"./chunk-ZKLSZJFN.js";import{e as pe,j as me}from"./chunk-D334IAZJ.js";import{g as X}from"./chunk-RRLXNT33.js";import{a as n}from"./chunk-4FHWXBOB.js";var We={low:{maxLongEdge:1920,payloadTargetBytes:7e5,qMin:.7,qMax:.92},mid:{maxLongEdge:2240,payloadTargetBytes:12e5,qMin:.7,qMax:.92},good:{maxLongEdge:2560,payloadTargetBytes:16e5,qMin:.7,qMax:.92}};function qe(e){let{deviceMemory:t,effectiveType:r,saveData:i,downlinkMbps:l,sourceLongEdge:u}=e,s=i===!0||r==="slow-2g"||r==="2g"||l!=null&&l>0&&l<1,d=t!=null&&t<=2,c=r==="4g"||l!=null&&l>=5,v=t!=null&&t>=6,f;s||d?f="low":c&&v?f="good":f="mid";let y=We[f],M=u&&u>0?Math.min(y.maxLongEdge,u):y.maxLongEdge;return{tier:f,...y,maxLongEdge:M}}n(qe,"He");function Fe(e){let t={};try{let r=navigator;typeof r.deviceMemory=="number"&&(t.deviceMemory=r.deviceMemory);let i=r.connection;i&&(t.effectiveType=i.effectiveType,t.saveData=i.saveData,t.downlinkMbps=i.downlink)}catch{}return typeof e=="number"&&e>0&&(t.sourceLongEdge=e),qe(t)}n(Fe,"ke");function Ie(e,t,r){let i=Math.min(1,Math.max(0,(e-.28)/.21999999999999997)),l=(t+r)/2;return Math.max(t,r-i*(r-l))}n(Ie,"Xe");function Be(e,t,r){let i=Math.max(e,t),l=i>0?Math.min(1,r/i):1;return{width:Math.max(1,Math.round(e*l)),height:Math.max(1,Math.round(t*l))}}n(Be,"Ve");async function ze(e,t){let r=t.startQ,i=await e(r);for(let l=0;l<4&&!(i.size<=t.budgetBytes||r<=t.qMin);l++)r=Math.max(t.qMin,r-.08),i=await e(r);return{blob:i,quality:r}}n(ze,"Ye");async function Oe(e,t,r,i,l){if(t<=0||r<=0)return null;let{width:u,height:s}=Be(t,r,i.maxLongEdge),d=document.createElement("canvas");d.width=u,d.height=s;let c=d.getContext("2d");if(!c)return null;c.drawImage(e,0,0,u,s);let v=n(F=>new Promise((g,m)=>{d.toBlob(h=>h?g(h):m(new Error("canvas toBlob returned null")),"image/jpeg",F)}),"f"),f=Ie(l,i.qMin,i.qMax),{blob:y,quality:M}=await ze(v,{startQ:f,qMin:i.qMin,budgetBytes:i.payloadTargetBytes}).finally(()=>{d.width=0,d.height=0});if(y.size>5242880)throw new Error("encoded document exceeds the 5242880-byte media cap");return{blob:y,quality:M,width:u,height:s}}n(Oe,"De");async function Ue(e){let t=Fe(Math.max(e.width,e.height)),r=await Oe(e,e.width,e.height,t,.5);if(r===null)throw new Error("canvas encode unavailable");return{blob:r.blob,width:r.width,height:r.height}}n(Ue,"Z");function xe(e,t){return{layout:e,phase:"framing",captured:{},pending:[],lastCaptureAt:t,lastReportAt:t,manualShutter:!1,restPhase:"framing",readSides:[],needFlip:!1,flipped:!1,flipTimeoutSpent:!1,timeoutCapture:!1,lastShotByTimeout:!1}}n(xe,"te");var Te=n(e=>e==="recto"?"verso":"recto","Ce"),Ce=n(e=>e.phase==="framing"||e.phase==="locking"||e.phase==="flipCue"||e.phase==="reaskRecto","Re"),ne=n(e=>(e.captured.recto!==void 0?1:0)+(e.captured.verso!==void 0?1:0)+e.pending.length,"ne");function te(e,t){return e.lastCaptureAt>=0&&e.lastReportAt>=0?e:{...e,lastCaptureAt:e.lastCaptureAt<0?t:e.lastCaptureAt,lastReportAt:e.lastReportAt<0?t:e.lastReportAt}}n(te,"ee");function Ne(e,t,r){if(e.phase==="result")return{...e,lastReportAt:r};let i=!t.present||e.captureArea!==void 0&&t.areaFrac<.6*e.captureArea,{flipped:l,awaySince:u}=e;i&&(u=u??r),u!==void 0&&r-u>=250&&(l=!0),i||(u=void 0);let s=e.flipTimeoutSpent&&!(l&&!e.flipped),d={...e,lastReportAt:r,flipped:l,awaySince:u,flipTimeoutSpent:s,lastArea:t.areaFrac};if(!Ce(e))return d;if(e.needFlip&&!l){if(!t.ready)return{...d,phase:e.restPhase,goodSince:void 0};let c=e.lastShot!==void 0&&e.pending.includes(e.lastShot);if(s||c)return{...d,goodSince:void 0,phase:e.restPhase};let v=e.goodSince??r;return r-v>=1800?{...d,goodSince:v,phase:"capturing",flipTimeoutSpent:!0,timeoutCapture:!0}:{...d,goodSince:v,phase:e.restPhase}}return t.ready?{...d,phase:"capturing",goodSince:e.goodSince??r}:{...d,goodSince:void 0,phase:t.locking?"locking":e.restPhase}}n(Ne,"Qe");function Ve(e,t){if(!Ce(e)||e.manualShutter)return e;let r=t-e.lastReportAt>=2e3,i=t-e.lastCaptureAt>=6e3;return r||i?{...e,manualShutter:!0}:e}n(Ve,"Ke");function je(e,t,r){let i=e.layout==="singlePage",l=i?{recto:t}:e.captured,u=i?[]:[...e.pending,t],s={...e,captured:l,pending:u,lastShot:t,lastCaptureAt:r,lastReportAt:-1,manualShutter:!1,goodSince:void 0,notice:void 0,awaySince:void 0,flipped:!1,lastShotByTimeout:e.timeoutCapture,timeoutCapture:!1,captureArea:e.lastArea};return i||ne({captured:l,pending:u})>=2?{...s,phase:"reading",restPhase:"framing",current:void 0,needFlip:!1}:{...s,phase:"flipCue",restPhase:"flipCue",current:void 0,needFlip:!0}}n(je,"je");function Re(e,t,r){return e.pending.includes(t)?{...e,pending:e.pending.filter(i=>i!==t),lastShot:e.lastShot===t?void 0:e.lastShot,phase:e.phase==="capturing"?e.phase:"flipCue",restPhase:"flipCue",current:Te(r),needFlip:!0,flipTimeoutSpent:!0,goodSince:void 0,manualShutter:!0,notice:"same_face",lastCaptureAt:-1,lastReportAt:-1}:e}n(Re,"xe");function Ge(e,t,r){if(!e.pending.includes(t))return e;if(e.captured[r]!==void 0)return Re(e,t,r);let i=e.pending.filter(c=>c!==t),l={...e,pending:i,captured:{...e.captured,[r]:t}};if(ne(l)!==1||e.layout==="singlePage")return l;let u=Te(r),s=u==="recto"&&e.restPhase==="reaskRecto"?"reaskRecto":"flipCue",d=e.phase==="flipCue"||e.phase==="reaskRecto"||e.phase==="framing";return{...l,restPhase:s,current:u,phase:d?s:e.phase}}n(Ge,"$e");function He(e,t){let r=t.id??e.captured[t.side],i={...e.captured};(t.id===void 0||i[t.side]===t.id)&&delete i[t.side];let l=e.pending.filter(v=>v!==r),u=e.layout==="twoSided"&&ne({captured:i,pending:l})>0,s=e.lastShotByTimeout||r===e.lastShot!==e.flipped,d=u&&!s,c=d?t.side==="recto"?"reaskRecto":"flipCue":"framing";return{...e,captured:i,pending:l,readSides:e.readSides.filter(v=>v!==t.side),lastShot:e.lastShot===r?void 0:e.lastShot,notice:t.issue,goodSince:void 0,manualShutter:!1,phase:c,restPhase:c,current:t.side,needFlip:d,flipped:!1,flipTimeoutSpent:!1,awaySince:void 0,lastCaptureAt:-1,lastReportAt:-1}}n(He,"Je");function _e(e,t){switch(t.type){case"report":return Ne(te(e,t.at),t.report,t.at);case"tick":return Ve(te(e,t.at),t.at);case"captured":return je(te(e,t.at),t.id,t.at);case"captureFailed":return{...e,phase:e.restPhase,goodSince:void 0,lastCaptureAt:t.at,manualShutter:!0,timeoutCapture:!1};case"classified":return Ge(e,t.id,t.side);case"duplicate":return Re(e,t.id,t.side);case"readOk":{let r=e.readSides.includes(t.side)?e.readSides:[...e.readSides,t.side],i=["recto","verso"].filter(u=>e.captured[u]!==void 0),l=e.phase==="reading"&&e.pending.length===0&&i.every(u=>r.includes(u));return{...e,readSides:r,flipTimeoutSpent:!1,phase:l?"result":e.phase}}case"readFailed":return He(e,t);case"clockRestart":return e.lastCaptureAt<0&&e.lastReportAt<0&&e.awaySince===void 0?e:{...e,awaySince:void 0,lastCaptureAt:-1,lastReportAt:-1};case"retake":return{...xe(e.layout,-1),lastCaptureAt:-1,lastReportAt:-1};default:return e}}n(_e,"ve");function Ye(e,t,r=!1){let i=e(t);return i===null?"recto":!r||i.y+i.height/2>=t.height/2?"verso":"recto"}n(Ye,"Ze");async function Je(e,t=!1){let{detectMrzBand:r}=await import("./mrz-band-DCXFWDBD-OPMO6HYS.js");return Ye(r,e,t)}n(Je,"et");async function we(e,t=480,r,i=r!=null){let l=r??{x:0,y:0,width:e.width,height:e.height},u=Math.max(1,Math.round(l.height/l.width*t)),s=document.createElement("canvas");s.width=t,s.height=u;try{let d=s.getContext("2d");return d===null?"recto":(d.drawImage(e,l.x,l.y,l.width,l.height,0,0,t,u),await Je(d.getImageData(0,0,t,u),i))}finally{s.width=0,s.height=0}}n(we,"re");var re=n((e,t,r)=>Math.min(r,Math.max(t,Math.round(e))),"oe"),J=n(e=>Math.round(Math.min(1,Math.max(0,e))*1e4)/1e4,"Y");async function Qe(e,t,r,i){let l=i.decode??(c=>createImageBitmap(c)),u=n(async()=>e.stillRead(await l(t),i.region??[0,0,1,1],i.detectorLimit),"l"),s;try{s=await u()}catch{try{await new Promise(c=>setTimeout(c,i.retryMs??300)),s=await u()}catch{return null}}let d=s.mrzBox;return d===void 0?null:{engine:i.engine,source:"live_mrz",format:r.format,lineCount:re(r.lineCount,2,3),checkDigitsValid:!0,stillConfirmed:s.valid&&s.digest===r.digest,band:[J(d[0]),J(d[1]),J(Math.min(d[2],1-d[0])),J(Math.min(d[3],1-d[1]))],digest:r.digest,framesToValid:re(r.framesToValid,1,1e3),msToValid:re(r.msToValid,0,12e4)}}n(Qe,"Le");var $e=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]),Ke=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,7,1,5,0,6,64,11,11]);function Ze(e,t=globalThis){let r=t.WebAssembly?.validate;if(typeof r!="function")return{ok:!1,reason:"simd"};try{if(!r.call(t.WebAssembly,$e)||!r.call(t.WebAssembly,Ke))return{ok:!1,reason:"simd"}}catch{return{ok:!1,reason:"simd"}}if(typeof t.Worker!="function")return{ok:!1,reason:"worker"};if(typeof t.createImageBitmap!="function")return{ok:!1,reason:"bitmap"};let i=t.navigator?.deviceMemory;return typeof i=="number"&&i<e.minDeviceMemoryGb?{ok:!1,reason:"memory"}:{ok:!0}}n(Ze,"_e");function Xe(e=globalThis){let t=e.navigator?.connection;return t?.saveData===!0||["slow-2g","2g","3g"].includes(t?.effectiveType??"")}n(Xe,"Te");var U,E=(U=class extends Error{constructor(t){super(t),this.name="OcrEngineError",this.code=t}},n(U,"T"),U);function Me(){let e=n(t=>(t.close(),Promise.reject(new E("unsupported"))),"e");return{ready:Promise.resolve("unsupported"),busy:!1,bandRead:e,stillRead:e,layoutRead:e,dispose:n(()=>{},"dispose")}}n(Me,"Ee");function et(e){let t;try{if(e.createWorker)t=e.createWorker();else if(e.workerUrl!==void 0)t=new Worker(e.workerUrl,{type:"module",name:"sekyro-ocr"});else return Me()}catch{return Me()}let r=new Map,i=0,l=!1,u=!1,s=!1;t.addEventListener("message",m=>{let h=m.data,x=r.get(h.id);x&&(r.delete(h.id),x.resolve(h))});let d=n(()=>{for(let m of r.values())m.reject(new E("error"));r.clear(),v()},"u");t.addEventListener("error",d),t.addEventListener("messageerror",d);function c(m,h=[]){if(l)return Promise.reject(new E("disposed"));let x=++i;return new Promise((W,q)=>{r.set(x,{resolve:W,reject:q});try{t.postMessage({...m,id:x},h)}catch{r.delete(x),q(new E("error"))}})}n(c,"c");function v(){if(!l){l=!0;try{t.postMessage({id:++i,kind:"dispose"})}catch{}t.terminate();for(let m of r.values())m.reject(new E("disposed"));r.clear()}}n(v,"f");let f=(async()=>{let m=await c({kind:"init",baseUrl:e.baseUrl,salt:e.salt,detectorLimit:e.tuning.detectorLimit,maxDownloadMs:e.tuning.maxDownloadMs});if(m.kind==="failed")return m.reason;if(m.kind!=="ready")return"error";let h=await c({kind:"warmup"});return h.kind!=="ready"?"error":{warmupMs:h.warmupMs,downloadMs:m.downloadMs,cached:m.cached}})().catch(()=>"error"),y,M=new Promise(m=>{y=setTimeout(()=>m("timeout"),e.tuning.loadTimeoutMs)}),F=Promise.race([f,M]).then(m=>(clearTimeout(y),typeof m=="string"?v():s=!0,l&&typeof m!="string"?"error":m));(e.page===void 0?globalThis.addEventListener?globalThis:null:e.page)?.addEventListener("pagehide",v,{once:!0});async function g(m,h,x){if(l)throw h.close(),new E("disposed");if(!s)throw h.close(),new E("not_ready");if(u)throw h.close(),new E("busy");u=!0;let W;try{let q=new Promise((V,b)=>{W=setTimeout(()=>{b(new E("timeout")),v()},e.tuning.readTimeoutMs??1e4)}),P=await Promise.race([c(m,[h]),q]);if(P.kind===x){let{id:V,...b}=P;return b}throw new E(P.kind==="error"?P.code:P.kind==="failed"?P.reason:"error")}finally{clearTimeout(W),u=!1}}return n(g,"w"),{ready:F,get busy(){return u},bandRead:n((m,h=e.tuning.detectorLimit)=>g({kind:"band",bitmap:m,detectorLimit:h},m,"band"),"bandRead"),stillRead:n((m,h,x=e.tuning.detectorLimit)=>g({kind:"still",bitmap:m,region:h,detectorLimit:x},m,"band"),"stillRead"),layoutRead:n((m,h)=>g({kind:"layout",bitmap:m,detectorLimit:h},m,"layout"),"layoutRead"),dispose:v}}n(et,"Oe");var Q="sekyro-ocr-1",ae=n(e=>e!==null&&typeof e=="object"?e:{},"ae"),R=n((e,t,r,i)=>typeof e=="number"&&Number.isFinite(e)&&e>=t&&e<=r?e:i,"v"),be=n((e,t)=>typeof e=="boolean"?e:t,"Pe"),ke=n(e=>{let t=typeof e=="string"?/^sekyro-ocr-(\d{1,4})$/.exec(e):null;return t?Number(t[1]):Number.POSITIVE_INFINITY},"Ae");function tt(e,t={}){let r=ae(e),i=ae(r.liveMrz),l=ae(r.frontLock),u=ke(t.engine??Q),s=t.mode==="off",d=n(h=>h.enabled===!0?h.arm==="live"?"live":"control":null,"u"),c=d(i),v=d(l),f=n((h,x)=>!s&&x==="live"&&ke(h.minEngine??Q)<=u,"p"),y=ge,M=f(i,c)?{detectorLimit:R(i.detectorLimit,320,1600,y.detectorLimit),bandMaxWidthPx:R(i.bandMaxWidthPx,320,4096,y.bandMaxWidthPx),minBandWidthPx:R(i.minBandWidthPx,0,4096,y.minBandWidthPx),bandTop:R(i.bandTop,0,.95,y.bandTop),minIntervalMs:R(i.minIntervalMs,0,5e3,y.minIntervalMs),stableReads:Math.round(R(i.stableReads,1,10,y.stableReads)),profileReads:Math.round(R(i.profileReads,1,100,y.profileReads)),maxReadMs:R(i.maxReadMs,50,6e4,y.maxReadMs),searchTimeoutMs:R(i.searchTimeoutMs,1e3,12e4,y.searchTimeoutMs),hint:be(i.hint,!0),stillConfirm:be(i.stillConfirm,!0)}:null,F=fe,g=n((h,x,W)=>R(l[h],x,W,F[h]),"h"),m=f(l,v)?{minLines:Math.round(g("minLines",1,50)),fillMin:g("fillMin",0,1),fillMax:g("fillMax",0,2),offsetMax:g("offsetMax",0,1),steadyFillDelta:g("steadyFillDelta",0,1),steadyOffsetDelta:g("steadyOffsetDelta",0,1),layoutShiftMax:g("layoutShiftMax",0,1),lineCountDelta:Math.round(g("lineCountDelta",0,50)),lockMs:g("lockMs",0,3e4),steadyMs:g("steadyMs",0,3e4),minFrames:Math.round(g("minFrames",1,100)),minIntervalMs:g("minIntervalMs",0,5e3),maxWidthPx:g("maxWidthPx",160,2048),detectorLimit:g("detectorLimit",320,1600),searchTimeoutMs:g("searchTimeoutMs",1e3,12e4)}:null;return{enabled:M!==null||m!==null,liveMrz:M,textLock:m,liveMrzArm:c,frontLockArm:v,load:{detectorLimit:M?.detectorLimit??m?.detectorLimit??y.detectorLimit,loadTimeoutMs:R(i.loadTimeoutMs,1e3,12e4,2e4),maxDownloadMs:R(i.maxDownloadMs,1e3,12e4,2e4),minDeviceMemoryGb:R(i.minDeviceMemoryGb,0,64,2)},reportSampleRate:R(i.reportSampleRate,0,1,1)}}n(tt,"Be");function rt(e,t){return e.enabled?!(t.probe??Ze)({minDeviceMemoryGb:e.load.minDeviceMemoryGb}).ok||(t.slow??Xe)()?{ok:!1,reason:"unsupported"}:{ok:!0,engine:et({baseUrl:t.baseUrl,salt:t.salt,tuning:{detectorLimit:e.load.detectorLimit,maxDownloadMs:e.load.maxDownloadMs,loadTimeoutMs:e.load.loadTimeoutMs},...t.workerUrl!==void 0?{workerUrl:t.workerUrl}:{},...t.createWorker!==void 0?{createWorker:t.createWorker}:{},...t.page!==void 0?{page:t.page}:{}})}:{ok:!1,reason:"off"}}n(rt,"Ie");function at(e=typeof navigator<"u"?navigator.userAgent:""){return/SamsungBrowser\//.test(e)?"samsung":/Firefox\/|FxiOS\//.test(e)?"firefox":/Chrome\/|CriOS\/|Chromium\//.test(e)&&!/Edg\/|OPR\//.test(e)?"chrome":/Safari\//.test(e)&&/Version\/|Mobile\//.test(e)&&!/Chrome\/|CriOS\//.test(e)?"safari":"other"}n(at,"rt");var B=n(e=>e===void 0||!Number.isFinite(e)?void 0:Math.min(6e5,Math.max(0,Math.round(e))),"F"),ie=n((e,t,r)=>e===void 0||!Number.isFinite(e)?void 0:Math.min(r,Math.max(t,Math.round(e))),"ie");function it(e){let t=e.assist??null,r=e.load!==null&&e.load!==void 0&&typeof e.load=="object"?e.load:null,i=typeof e.load=="string"?e.load:null,l=t!==null?t.outcome:i==="unsupported"||i==="download"||i==="integrity"?i:i==="error"||i==="timeout"?"error":"off",u={kind:"live_mrz",platform:"web",engine:e.engine??Q,arm:e.arm,capture:e.capture,outcome:l,reads:ie(t?.reads??0,0,1e4)??0,browser:e.browser??at()},s=n((d,c)=>{c!==void 0&&(u[d]=c)},"s");return s("format",t?.format),s("framesToValid",ie(t?.framesToValid,1,1e4)),s("msToValid",B(t?.msToValid)),s("framesToLock",ie(t?.framesToLock,1,1e4)),s("msToLock",B(t?.msToLock)),s("msToCapture",B(e.msToCapture)),s("readP50Ms",B(t?.readP50Ms)),s("readP90Ms",B(t?.readP90Ms)),s("deviceClass",t?.deviceClass),r!==null&&(s("warmupMs",B(r.warmupMs)),s("downloadMs",B(r.downloadMs)),s("cached",r.cached)),s("stillConfirmed",e.stillConfirmed),s("typeMismatch",e.typeMismatch),u}n(it,"We");function Se(e,t){return e===void 0?!1:t==="passport"?e!=="TD3":e==="TD3"}n(Se,"se");var nt=2;async function ot(e){let t=await import("./capture-session-doc-ELX6VK6Z-SDM3ILRA.js");return new t.CaptureSessionDoc(e)}n(ot,"at");function lt(e){return{topLeft:{x:e.x,y:e.y},topRight:{x:e.x+e.width,y:e.y},bottomRight:{x:e.x+e.width,y:e.y+e.height},bottomLeft:{x:e.x,y:e.y+e.height}}}n(lt,"it");function st(e,t,r){let i=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft],l=0;for(let u=0;u<i.length;u+=1){let s=i[u],d=i[(u+1)%i.length];l+=s.x*d.y-d.x*s.y}return t>0&&r>0?Math.abs(l)/2/(t*r):0}n(st,"st");function ft(){import("./capture-session-doc-ELX6VK6Z-SDM3ILRA.js").then(e=>e.warmDocDetector()).catch(()=>{})}n(ft,"Gt");function gt(e){return dt(e,{}).handle}n(gt,"qt");function dt(e,t){let r=pe(),i=me({enabled:e.keepScreenAwake!==!1}),l=t.decode??(a=>createImageBitmap(a)),u=t.blurRefuseSharpnessMax??.16,s=t.now??(()=>performance.now()),d=e.documentType==="passport"||e.side==="single",c=xe(d?"singlePage":"twoSided",s());if(!d&&(e.side==="recto"||e.side==="verso")){let a=e.side==="recto"?"verso":"recto";c={...c,captured:{[a]:"server"},readSides:[a],current:e.side,phase:"flipCue",restPhase:"flipCue"}}let v="idle",f=null,y=null,M=!0,F=0,g=0,m=!1,h=!1,x="",W=null,q,P=null,V=[],b=t.webOcr!==void 0?tt(t.webOcr.captureDocument,{mode:e.liveMrz?.mode??"auto"}):null,N=null,z=b===null||!b.enabled?"off":null,j=null,G=null,oe=new WeakMap,$="";if(b!==null&&b.enabled&&t.webOcr!==void 0){let a=t.webOcr,o=rt(b,{baseUrl:e.liveMrz?.assetBaseUrl??a.baseUrl,salt:a.salt,...e.liveMrz?.workerUrl!==void 0?{workerUrl:e.liveMrz.workerUrl}:{},...a.createWorker!==void 0?{createWorker:a.createWorker}:{}});if(o.ok){N=o.engine;let p=new ve({textLock:b.textLock,liveMrz:b.liveMrz});j=p;let w=o.engine;w.ready.then(A=>{z=A,typeof A!="string"&&M&&p.setEngine(w)})}else z=o.reason}let O=n(a=>{let o=JSON.stringify(a);o!==$&&($=o,r.emit("mrz",a))},"N"),le=n((a,o)=>{let p=t.webOcr?.reports;if(p===void 0||b===null||a===void 0)return;let w=a.format==="ID-3"||a.side==="single"?"single":a.side==="verso"?"verso":"recto",A=w!=="recto"?b.liveMrzArm??b.frontLockArm:b.frontLockArm;if(A===null||Math.random()>=b.reportSampleRate)return;let L=a.via==="live_mrz"?G:null,C=n(()=>{let D=L?.value??null;p([it({arm:A,capture:w,assist:a.ocr??null,load:A==="control"?"off":z,...a.msToCapture!==void 0?{msToCapture:a.msToCapture}:{},...D!==null&&D.stillConfirmed!==void 0?{stillConfirmed:D.stillConfirmed}:{},...o!==void 0?{typeMismatch:Se(o.format,e.documentType==="passport"?"passport":"card")}:{}})])},"x");L!==null&&L.value===null?Promise.race([L.promise,new Promise(D=>setTimeout(D,3e3))]).then(C):C()},"le"),I=n(a=>{!M||a===v||(v=a,i.setActive(a==="starting"||a==="scanning"),r.emit("state",a))},"W"),Ae=n((a,o)=>o===void 0?null:d?"single":a.captured.recto===o?"recto":a.captured.verso===o?"verso":null,"Fe"),Le=n(a=>({phase:a.phase,captured:d?a.captured.recto!==void 0?["single"]:[]:["recto","verso"].filter(o=>a.captured[o]!==void 0),expected:d?null:a.current??null,notice:a.notice??null,lastShot:Ae(a,a.lastShot),manualShutter:a.manualShutter,torchAvailable:f?.torchAvailable()??!1,torch:h}),"ze"),se=n(()=>{let a=f;a!==null&&a.captureNow().catch(()=>T({type:"captureFailed",at:s()}))},"ce");function T(a){if(!M)return;let o=c;c=_e(c,a),c.phase==="capturing"&&o.phase!=="capturing"&&Promise.resolve().then(se),c.phase==="result"&&o.phase!=="result"&&(I("done"),de());let p=Le(c),w=JSON.stringify(p);w!==x&&(x=w,r.emit("scan",p))}n(T,"R");function de(){P!==null&&clearInterval(P),P=null;for(let a of V.splice(0))a();f?.destroy(),f=null,i.setActive(!1)}n(de,"de");let ue=n(()=>f?.captureReport?.(),"me"),K=!1,ce=n((a,o)=>{if(!(a===void 0||t.onFaceReport===void 0))try{t.onFaceReport(a,o)}catch{}},"pe"),H=n(a=>{$="",!(f===null||c.phase==="reading"||c.phase==="result")&&(K=!1,f.rearm(d?"single":c.current??a))},"H"),Pe=n(async(a,o,p,w)=>{if(G=null,w!==void 0&&N!==null&&b?.liveMrz?.hint===!0){let k={promise:Qe(N,a,w,{engine:Q,detectorLimit:b.liveMrz.detectorLimit}).catch(()=>null),value:null};k.promise.then(S=>{k.value=S}),G=k}w!==void 0&&Se(w.format,e.documentType==="passport"?"passport":"card")&&O({state:"mismatch",format:w.format});let A=ue();ce(A,"captured"),K=!0,le(A,w);let L=p===void 0?W:p===null?null:{quad:lt(p),frameWidth:0,frameHeight:0,inStill:!0},C={decoded:null},D=n(()=>(C.decoded??(C.decoded=Promise.resolve().then(()=>l(a)).catch(()=>null)),C.decoded),"E");try{await De(a,o,L,D,G)}finally{C.decoded!==null&&(await C.decoded)?.close()}},"Ne"),De=n(async(a,o,p,w,A)=>{let L=`shot-${F+=1}`;if(T({type:"captured",id:L,at:s()}),e.haptics!==!1)try{globalThis.navigator?.vibrate?.(30)}catch{}if(!m&&u>0){let k=await(t.measureSharpness!==void 0?t.measureSharpness(a,p):w().then(S=>S===null?-1:he(S,ee(p?.quad??null,p?.inStill===!0?S:{width:p?.frameWidth??0,height:p?.frameHeight??0},S)))).catch(()=>-1);if(!M)return;if(Number.isFinite(k)&&k>=0&&k<u){m=!0;let S=d?"recto":c.current??(c.captured.recto===void 0?"recto":"verso");T({type:"readFailed",side:S,id:L,issue:"blurry"}),H(S);return}}m=!1;let C;if(d)C="single";else{let k=c.current,S=await(t.classify!==void 0?t.classify(a):w().then(_=>_===null?k??"recto":p?.inStill===!0?we(_,480,null,!0):we(_,480,ee(p?.quad??null,{width:p?.frameWidth??0,height:p?.frameHeight??0},_)))).catch(()=>k??"recto");if(!M)return;if(c.captured[S]!==void 0&&g<nt){g+=1,T({type:"duplicate",id:L,side:S}),H(S==="recto"?"verso":"recto");return}C=c.captured[S]!==void 0&&k!==void 0?k:S,g=0,T({type:"classified",id:L,side:C})}let D=C==="verso"?"verso":"recto";try{let k=t.encode!==void 0?await t.encode(a):await w().then(S=>{if(S===null)throw new Error("the still could not be decoded");return Ue(S)});if(!M)return;A!==null&&oe.set(k.blob,A),r.emit("captured",{image:k.blob,side:C,documentType:e.documentType,...e.issuer!==void 0?{issuer:e.issuer}:{},width:k.width,height:k.height,previewDataUrl:o}),t.deferRead!==!0&&T({type:"readOk",side:D})}catch(k){T({type:"readFailed",side:D,id:L,issue:"technical"}),r.emit("error",Y("generic",!0,{phase:"keyframes",name:X(k)}))}H(D==="recto"?"verso":"recto")},"Ue"),Ee=n(a=>{V.push(a.on("statechange",({state:o})=>{o==="preflight"||o==="acquiring"?I("starting"):o==="positioning"?I("scanning"):o==="captured"?I("captured"):o==="error"&&I("error")}),a.on("feedback",({key:o,reticle:p})=>r.emit("feedback",{key:o,reticle:p})),a.on("checks",o=>{r.emit("gate",{progress:o.p,quad:o.quad,frameWidth:o.frameWidth,frameHeight:o.frameHeight,...o.guide!==void 0?{guide:{detected:o.guide.detected,fill:o.guide.fill,offsetX:o.guide.offsetX??0,offsetY:o.guide.offsetY??0}}:{}});let p=o.ocr?.mrz;p!==void 0&&(p.state==="fallback"?O({state:"fallback",reason:p.reason}):p.state==="valid"?O({state:"valid",format:p.format}):p.state==="reading"?O({state:"reading",...p.format?{format:p.format}:{},...p.coach?{coach:p.coach}:{}}):O({state:"searching"}));let w=o.quad===null?0:st(o.quad,o.frameWidth,o.frameHeight);W=o.quad===null?null:{quad:o.quad,frameWidth:o.frameWidth,frameHeight:o.frameHeight},T({type:"report",report:{present:o.quad!==null&&o.plausible||o.guide?.detected===!0,ready:o.ready===!0,locking:o.p>=.5,areaFrac:w},at:s()})}),a.on("error",({kind:o,retryable:p,detail:w})=>r.emit("error",Y(o,p,w))),a.on("artifacts",o=>{Pe(o.keyframe,o.previewDataUrl,o.docRegion,o.liveMrz)}))},"Ge"),Z=n(()=>(y??(y=(async()=>{if(M){if(f===null){let a;try{a=await(t.createEngine??ot)({...t.engineOptions??{},...q!==void 0?{guide:q}:{},video:e.video,format:ye(e.documentType),side:d?"single":e.side??"recto",autoCapture:!1,...j!==null?{ocr:j}:{}})}catch(p){I("error"),r.emit("error",Y("models",!0,{phase:"models",name:X(p)}));return}if(!M){a.destroy();return}f=a,Ee(a);let o=t.tickMs??500;o>0&&(P=setInterval(()=>T({type:"tick",at:s()}),o))}T({type:"clockRestart"}),b!==null&&b.liveMrzArm==="live"&&(z==="unsupported"||z==="off")&&O({state:"fallback",reason:z}),await f.start()}})().finally(()=>{y=null})),y),"j");return{handle:{get state(){return v},on:n((a,o)=>r.on(a,o),"on"),start:Z,retry:n(()=>{if(f===null&&c.phase==="result"){T({type:"retake"}),g=0,m=!1,Z();return}if(f!==null&&v!=="error"){T({type:"retake"}),g=0,m=!1,f.rearm(d?"single":void 0);return}Z()},"retry"),setSide:n(a=>{d||a==="single"||(c.current!==a&&(c={...c,current:a}),T({type:"clockRestart"}),c.phase!=="reading"&&c.phase!=="result"&&f?.rearm(a))},"setSide"),shutter:se,focusAt:n((a,o)=>{f?.focusAt?.(a,o)},"focusAt"),setGuide:n(a=>{q=a,f?.setGuide?.(a)},"setGuide"),setTorch:n(a=>{h=a,f?.setTorch(a),T({type:"tick",at:s()})},"setTorch"),destroy:n(()=>{if(M&&f!==null&&v!=="done"){let a=ue();!K&&a!==void 0&&a.ticks>0&&ce(a,"abandoned"),le(a,void 0)}M=!1,de(),j?.setEngine(null),N?.dispose(),N=null,r.clear()},"destroy")},setFlowState:n(a=>{(c.phase==="reading"||c.phase==="result")&&I(a==="done"&&c.phase!=="result"?"scanning":a)},"setFlowState"),settle:n((a,o)=>{let p=a==="verso"?"verso":"recto";T(o.ok?{type:"readOk",side:p}:{type:"readFailed",side:p,issue:o.issue}),o.ok||H(p)},"settle"),takeDeviceRead:n(a=>oe.get(a.image)?.value??null,"takeDeviceRead")}}n(dt,"ut");export{nt as a,ft as b,gt as c,dt as d};
@@ -1 +0,0 @@
1
- import{a as o}from"./chunk-4FHWXBOB.js";var a={"ID-1":{center:1.586,tolerance:.15},"ID-2":{center:1.419,tolerance:.12},"ID-3":{center:1.42,tolerance:.2}},i={"ID-1":["ID-1"],"ID-2":["ID-2"],"ID-3":["ID-3"],card:["ID-1","ID-2"]};function d(e){return a[e==="card"?"ID-1":e]}o(d,"i");function s(e,r){return i[e].some(t=>Math.abs(r-a[t].center)<=a[t].tolerance)}o(s,"d");var c=[{docType:"carte_identite",format:"ID-1",sides:["recto","verso"],mrz:"td1",portraitSide:"recto",aspectRatio:1.586,identifierSource:"mrz"},{docType:"passport",format:"ID-3",sides:["single"],mrz:"td3",portraitSide:"single",aspectRatio:1.42,identifierSource:"mrz"}],n=[...c,{docType:"residence_permit",format:"ID-1",sides:["recto","verso"],mrz:"td1",portraitSide:"recto",aspectRatio:1.586,identifierSource:"mrz"}];function D(e){let r=n.find(t=>t.docType===e);return r===void 0||r.format==="ID-1"?"card":r.format}o(D,"s");export{d as a,s as b,D as c};