@incodetech/web 2.4.1 → 2.5.0-rc.1

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 (365) hide show
  1. package/THIRD_PARTY_NOTICES.txt +1 -4
  2. package/dist/{GeolocationPermissionDenied-GbB9B3J0.js → GeolocationPermissionDenied-C7oh9rAr.js} +23 -8
  3. package/dist/Password-CV69m5l9.js +212 -0
  4. package/dist/RadioGroup-DmCpmlJN.js +123 -0
  5. package/dist/RequiredLegend-CLQ0HX7d.js +16 -0
  6. package/dist/RequiredMarker-CAqxArxr.js +16 -0
  7. package/dist/TextField-D41q5WTe.js +166 -0
  8. package/dist/ae-signature/ae-signature.es.js +4 -4
  9. package/dist/{af-ZA-Dm5i-KRC.js → af-ZA-Bp16S_5w.js} +135 -881
  10. package/dist/{ageVerification-n-1fouaD.js → ageVerification-BBnJYo9K.js} +10 -8
  11. package/dist/{am-UBTEdpJv.js → am-CWJUWWuF.js} +135 -881
  12. package/dist/antifraud/antifraud.es.js +5 -4
  13. package/dist/applyStudioConfig-20qjppIu.js +126 -0
  14. package/dist/{ar-AE--KjG2EAr.js → ar-AE-O12WV51F.js} +136 -882
  15. package/dist/{ar-RFuhholc.js → ar-DgUYRgR_.js} +135 -881
  16. package/dist/{ar-EG-y8SWJjy1.js → ar-EG-C7LOd56j.js} +135 -881
  17. package/dist/assertClassBrand-F6pL6aIr.js +17 -0
  18. package/dist/authentication/authentication.es.js +9 -6
  19. package/dist/autoFocusTitle-C2Ro8zdn.js +19 -0
  20. package/dist/{az-4Z0ZZq7T.js → az-DusLpWep.js} +135 -881
  21. package/dist/{back-horizontal-hint-BztyPanp.js → back-horizontal-hint-Bci98ivl.js} +1 -1
  22. package/dist/{back-vertical-hint-BSzA4QbJ.js → back-vertical-hint-DyPCItxn.js} +1 -1
  23. package/dist/base.css +1 -1
  24. package/dist/{baseTutorial-BixkM88z.js → baseTutorial-BBwEV7AE.js} +9 -7
  25. package/dist/{bn-CNhjOqja.js → bn-CX4BixDE.js} +135 -881
  26. package/dist/{bottomSheet-B4REej8W.js → bottomSheet-DRRJstLk.js} +3 -3
  27. package/dist/{bs-Culcuxab.js → bs-DTnRhENx.js} +134 -880
  28. package/dist/{ca-h1xwo6CW.js → ca-DBI3m_a_.js} +134 -880
  29. package/dist/cameraOverlay-Bz9UJCHp.js +2 -0
  30. package/dist/{cameraOverlayHeader-D4Bjr6Fw.js → cameraOverlayHeader-VCCUFLoy.js} +9 -8
  31. package/dist/{cameraView-BpdAdfIK.js → cameraView-CKWEmlho.js} +13 -14
  32. package/dist/capture-B6vGKsRf.js +3 -0
  33. package/dist/capture-B_WX2h2H.js +2 -0
  34. package/dist/{tutorial-HfSD-QZ3.js → capture-BszIVhdg.js} +226 -82
  35. package/dist/capture-wy0SZwxu.js +754 -0
  36. package/dist/captureButtonIcon-DhTUlcGq.js +1 -0
  37. package/dist/captureFocusContext-OuX65pCg.js +718 -0
  38. package/dist/captureFooter-5KiLmkNi.js +47 -0
  39. package/dist/{ceb-pTDH3h1x.js → ceb-fG0bt_zV.js} +135 -881
  40. package/dist/certificate-issuance/certificate-issuance.es.js +68 -41
  41. package/dist/certificate-issuance/styles.css +1 -1
  42. package/dist/certificate-issuance/styles.css.js +1 -1
  43. package/dist/{checkbox-CALR7EFM.js → checkbox-tpW2Q3Zi.js} +4 -4
  44. package/dist/chooser-CqCxdQx8.js +1517 -0
  45. package/dist/connectionError-D67rCsgf.js +100 -0
  46. package/dist/consent/consent.es.js +19 -14
  47. package/dist/consent/styles.css +1 -1
  48. package/dist/consent/styles.css.js +1 -1
  49. package/dist/{countryDefinitions-BO9OSKQO.js → countryDefinitions-UXJ0maPk.js} +6 -0
  50. package/dist/{countryFlag-2Vj85OIZ.js → countryFlag-CjuXF_8C.js} +1 -1
  51. package/dist/{countrySelector-DKvvYxP6.js → countrySelector-mjGgTZBA.js} +6 -5
  52. package/dist/cross-document-data-match/cross-document-data-match.es.js +5 -4
  53. package/dist/{cs-CZ-CiATe8nW.js → cs-CZ-DCggApzq.js} +134 -880
  54. package/dist/{cs-CrQuSSOI.js → cs-DsBY9V_4.js} +134 -880
  55. package/dist/curp-validation/curp-validation.es.js +97 -96
  56. package/dist/curp-validation/styles.css +1 -1
  57. package/dist/curp-validation/styles.css.js +1 -1
  58. package/dist/{customFields-DRwjotY-.js → customFields-COihEvWm.js} +33 -20
  59. package/dist/{customWatchlist-DmROVUfp.js → customWatchlist-CE5WPSMm.js} +11 -9
  60. package/dist/{da-DK-CgrU79mp.js → da-DK-B7LXeFYP.js} +134 -880
  61. package/dist/dashboardTheme-Cxl2WlSK.js +388 -0
  62. package/dist/{dateInputComposed-Bu7vM-M4.js → dateInputComposed-DqOzOxfP.js} +4 -5
  63. package/dist/dateInputComposed-kP5wiNvH.js +1 -0
  64. package/dist/{de-D0xnkswj.js → de-BhQ2hOut.js} +134 -880
  65. package/dist/denied-D4oFpTuV.js +272 -0
  66. package/dist/devWarn-SLn4Qexk.js +1034 -0
  67. package/dist/deviceWallet-CPP5AFbd.js +37 -0
  68. package/dist/{digitalIdRedirect-Dpv37Mbi.js → digitalIdRedirect-DqhYI_sj.js} +4 -4
  69. package/dist/{digitalIdUpload-DKXe-_GE.js → digitalIdUpload-p7Zcbeom.js} +37 -15
  70. package/dist/document-capture/document-capture.es.js +1 -1
  71. package/dist/document-capture/styles.css +1 -1
  72. package/dist/document-capture/styles.css.js +1 -1
  73. package/dist/{documentCapture-DlBMtLvL.js → documentCapture-DXG8TB9t.js} +136 -72
  74. package/dist/documentCapture-DczZSZ4A.js +2 -0
  75. package/dist/dropdownComposed-C3uN_APy.js +1 -0
  76. package/dist/{dropdownComposed-B-qTBcja.js → dropdownComposed-CUBU43V3.js} +8 -6
  77. package/dist/dynamic-forms/dynamic-forms.es.js +62 -35
  78. package/dist/ekyb/ekyb.es.js +1 -1
  79. package/dist/ekyb/styles.css +1 -1
  80. package/dist/ekyb/styles.css.js +1 -1
  81. package/dist/{ekybModule-qkUiNFdJ.js → ekybModule-mGfuTVTJ.js} +109 -89
  82. package/dist/ekybModule-xZtYttfn.js +2 -0
  83. package/dist/ekyc/ekyc.es.js +1 -1
  84. package/dist/ekyc/styles.css +1 -1
  85. package/dist/ekyc/styles.css.js +1 -1
  86. package/dist/ekyc-prefill/ekyc-prefill.es.js +2 -0
  87. package/dist/ekyc-prefill/styles.css +2 -0
  88. package/dist/ekyc-prefill/styles.css.js +1 -0
  89. package/dist/ekycModule-Cp-GdWbC.js +789 -0
  90. package/dist/ekycModule-DXy4cT0v.js +2 -0
  91. package/dist/ekycPrefillModule-BKbRJuek.js +233 -0
  92. package/dist/ekycPrefillModule-Cdu0zr52.js +2 -0
  93. package/dist/{el-B5gLXHxC.js → el-D-zg7VzS.js} +134 -880
  94. package/dist/{el-GR-DPUvlcvr.js → el-GR-D9eldyAW.js} +134 -880
  95. package/dist/electronic-signature/electronic-signature.es.js +1 -1
  96. package/dist/{electronic-signature-Jx8qWrW-.js → electronic-signature-uWLkdb8_.js} +55 -36
  97. package/dist/email/email.es.js +21 -16
  98. package/dist/{emailInput-ClX3Lu8X.js → emailInput-Bd8XECrW.js} +23 -12
  99. package/dist/{en-DG-DOwBuCCl.js → en-DG-CKwP-05W.js} +135 -881
  100. package/dist/{en-DNuMvR7-.js → en-DY1lnV9V.js} +135 -881
  101. package/dist/{errorContent-B_pH1MX7.js → errorContent-CqXgrkbQ.js} +21 -20
  102. package/dist/errorParams-B7BZHaA4.js +37 -0
  103. package/dist/es-419-DCPTzJnF.js +5 -0
  104. package/dist/{es-DNl7ceDm.js → es-BKio8b3N.js} +135 -881
  105. package/dist/{es-ES-BF9vl0Um.js → es-ES-MZM-tZ4f.js} +134 -880
  106. package/dist/{es-MX-Brp4FXN8.js → es-MX-Bwa400AE.js} +134 -880
  107. package/dist/{et-D5pPP4r0.js → et-CxKV1DgL.js} +136 -882
  108. package/dist/expiredId-BGfpQzNG.js +67 -0
  109. package/dist/extensibility.es.js +382 -55
  110. package/dist/{fa-IR-BoyK-lax.js → fa-IR-C1bLFtOi.js} +135 -881
  111. package/dist/face-match/face-match.es.js +1 -1
  112. package/dist/face-match/styles.css +1 -1
  113. package/dist/face-match/styles.css.js +1 -1
  114. package/dist/faceMatch-ClTodgeI.js +2 -0
  115. package/dist/{faceMatch-Dp1AGBtg.js → faceMatch-DpccWhgb.js} +54 -71
  116. package/dist/{fi-FI-mYdAUbtG.js → fi-FI-BC_3lqbM.js} +134 -880
  117. package/dist/field-comparison/field-comparison.es.js +1 -1
  118. package/dist/fieldComparison-CXSUE89Z.js +2 -0
  119. package/dist/fieldComparison-D2c7jots.js +126 -0
  120. package/dist/{fieldLabelHint-CxjArYkQ.js → fieldLabelHint-yMZjXK6p.js} +3 -3
  121. package/dist/{finalSuccessScreen-BgPVGAr4.js → finalSuccessScreen-D1AeAOtK.js} +31 -22
  122. package/dist/fiscal-qr/fiscal-qr.es.js +32 -26
  123. package/dist/flipAnimation-DwvNk514.js +46 -0
  124. package/dist/flipCapturedCardEligibility-C8ppBgP9.js +210 -0
  125. package/dist/flow/flow.es.js +315 -287
  126. package/dist/flow/shell/styles.css +1 -1
  127. package/dist/flow/shell/styles.css.js +1 -1
  128. package/dist/flow/styles.css +1 -1
  129. package/dist/formField-Bum3oh1A.js +49 -0
  130. package/dist/{fr-B4R5fgnm.js → fr-BGr4ZZSw.js} +134 -880
  131. package/dist/{fr-CA-DJSwRuWt.js → fr-CA-COfhYgrk.js} +134 -880
  132. package/dist/{front-horizontal-hint-DEHmtcdg.js → front-horizontal-hint-LxyNVfjy.js} +1 -1
  133. package/dist/{front-vertical-hint-Cb1NO-xT.js → front-vertical-hint-BKEg_DRs.js} +1 -1
  134. package/dist/geolocation/geolocation.es.js +15 -12
  135. package/dist/government-validation/government-validation.es.js +7 -6
  136. package/dist/{he-D2RDlnbd.js → he-BGdP9Cfd.js} +135 -881
  137. package/dist/helpButtonConfig-BFragC_J.js +24 -0
  138. package/dist/{hi-DFXhGN9O.js → hi-B8upUDpu.js} +135 -881
  139. package/dist/{hmn-BlNbfL-D.js → hmn-DOK-cZdX.js} +135 -881
  140. package/dist/{homeScreen-DjzxBrYL.js → homeScreen-CPaZiLqi.js} +26 -14
  141. package/dist/{incodeComponent-B-lwJJCV.js → hooks-C6m_ILVe.js} +256 -280
  142. package/dist/{hr-DArr3n62.js → hr-BjtqyvXa.js} +134 -880
  143. package/dist/{ht-CAd-Hmi1.js → ht-CbbFp5XL.js} +135 -881
  144. package/dist/{hu-CulT8eq_.js → hu-BXk1xFve.js} +135 -881
  145. package/dist/{icons-C2LgNjXy.js → icons-DLZTxOV2.js} +153 -80
  146. package/dist/id/id.es.js +167 -197
  147. package/dist/id/styles.css +1 -1
  148. package/dist/id/styles.css.js +1 -1
  149. package/dist/{id-D2VZL6b-.js → id-BrJu1D4k.js} +134 -880
  150. package/dist/{id-back-of-card-C7Au2tqk.js → id-back-of-card-BhF5T4fC.js} +1 -1
  151. package/dist/{id-back-of-card-vertical-CtQBFw8w.js → id-back-of-card-vertical-BudLiGPR.js} +1 -1
  152. package/dist/{id-front-of-card-BmHL_keG.js → id-front-of-card-CiGcJhVW.js} +1 -1
  153. package/dist/{id-front-of-card-vertical-DkNUn2Vx.js → id-front-of-card-vertical-C_GyecLf.js} +1 -1
  154. package/dist/id-selfie-flow/id-selfie-flow.es.js +13 -11
  155. package/dist/id-selfie-flow/styles.css +1 -1
  156. package/dist/id-verification/id-verification.es.js +12 -6
  157. package/dist/idFlipTransition-DMAbw1_Y.js +154 -0
  158. package/dist/{idOcr-BWG3vj8j.js → idOcr-D9zxy2eU.js} +64 -37
  159. package/dist/identity-reuse/identity-reuse.es.js +38 -25
  160. package/dist/identity-reuse/styles.css.js +1 -0
  161. package/dist/incodeComponent-DPY-ikO3.js +235 -0
  162. package/dist/incodeModule-Dyy5PfM4.js +41 -0
  163. package/dist/index.es.js +4 -3
  164. package/dist/{inputComposed-B35soRFg.js → inputComposed-BG3XgpYE.js} +4 -4
  165. package/dist/{it-fs9OkGbv.js → it-DI-TPE-K.js} +135 -881
  166. package/dist/{ja-BvKVI6Oo.js → ja-3XIFqaXu.js} +135 -881
  167. package/dist/{ja-JP-C5-gDGuX.js → ja-JP-BAeRWiVk.js} +136 -882
  168. package/dist/{jv-CyId7aPo.js → jv-BhjQxxBl.js} +134 -880
  169. package/dist/{ka-pqIPc2el.js → ka-Bx4-RrZ_.js} +135 -881
  170. package/dist/{kk-DK7mWl6k.js → kk-Ct91ZRbP.js} +134 -880
  171. package/dist/{km-BaJYdDrm.js → km-BWQuuNXz.js} +142 -888
  172. package/dist/{ko-CdYIGTH_.js → ko-Cve9iLc7.js} +135 -881
  173. package/dist/{ko-KP-Q3GGdDp3.js → ko-KP-0iLztCuj.js} +135 -881
  174. package/dist/{ky-Bc7ZXIXy.js → ky-DGt4vj88.js} +134 -880
  175. package/dist/kyb-checks/kyb-checks.es.js +2 -0
  176. package/dist/kyb-checks/styles.css +2 -0
  177. package/dist/kyb-checks/styles.css.js +1 -0
  178. package/dist/kybChecksModule-BlLRwSFe.js +2 -0
  179. package/dist/kybChecksModule-DmjxRBhO.js +345 -0
  180. package/dist/{lo-0jgAavCe.js → lo-DPvsfR2F.js} +135 -881
  181. package/dist/{lt-DDEjR6RD.js → lt-BMI5NrHt.js} +134 -880
  182. package/dist/{lv-Ddzb_N3H.js → lv-Bpw5rGRP.js} +135 -881
  183. package/dist/{mandatoryConsent-C21a2d2-.js → mandatoryConsent-Blhxc0KK.js} +23 -16
  184. package/dist/{manualCaptureButton-1KC7N_B-.js → manualCaptureButton-B1hLcNl4.js} +8 -7
  185. package/dist/{manualCaptureButton-C5VMDamt.js → manualCaptureButton-Cr-FQ3-N.js} +16 -12
  186. package/dist/{mk-SJwou4aX.js → mk-C9Z-5xUg.js} +135 -881
  187. package/dist/{mn-7B86xjpb.js → mn-p0zBw-tm.js} +134 -880
  188. package/dist/{ms-Bb-SlQCF.js → ms-CF8aT_Qq.js} +134 -880
  189. package/dist/{my-3ci4RJZY.js → my-CqWwTa_5.js} +135 -881
  190. package/dist/{nb-NO-DpZAni0R.js → nb-NO-C7Hb8Ok5.js} +134 -880
  191. package/dist/{ne-Dncyvxqt.js → ne-B5InVJ21.js} +135 -881
  192. package/dist/{nl-C1mnzCBH.js → nl-aJiBBLFg.js} +134 -880
  193. package/dist/{optionAccessibleLabel-DG8Lks9f.js → optionAccessibleLabel-JFrEz0Ax.js} +27 -11
  194. package/dist/otpInput-Bn8PHFh7.js +245 -0
  195. package/dist/{page-DINsqGIw.js → page-b7Hx6klV.js} +102 -79
  196. package/dist/{incode-logo-B1bl2S0z.js → pageUiConfig-BlsOWl2d.js} +88 -14
  197. package/dist/{passport-horizontal-hint-DgNc6F0-.js → passport-horizontal-hint-Bn18pckF.js} +1 -1
  198. package/dist/{passport-vertical-hint-B-toVsfT.js → passport-vertical-hint-D_bvTNZY.js} +1 -1
  199. package/dist/passwordRequirements-13qw_WSJ.js +49 -0
  200. package/dist/{pdf-BKHLi5Ac.js → pdf-DO_HvE8T.js} +2 -17
  201. package/dist/pdfViewer-BT-O-Zj1.js +2 -0
  202. package/dist/{pdfViewer-C8xHykz1.js → pdfViewer-D_sXx3SF.js} +11 -14
  203. package/dist/permissionInstructionList-CGo9uSeQ.js +43 -0
  204. package/dist/{permissions-B7-lHrFm.js → permissions-CS58hLHp.js} +84 -53
  205. package/dist/phone/phone.es.js +16 -12
  206. package/dist/{phoneInputComposed-Di4acsc0.js → phoneInputComposed-Dc2lHg4Z.js} +49 -12
  207. package/dist/{pl-CWr2fVBg.js → pl-CDmSpQ_-.js} +134 -880
  208. package/dist/preloadableLazy-KWGuHoqn.js +43 -0
  209. package/dist/{processing-z5wuXrKw.js → processing-C5A54RCC.js} +2 -2
  210. package/dist/{progressBar-BcKFaXZR.js → progressBar-CmkJY5xT.js} +2 -2
  211. package/dist/{pt-AGz2XGAK.js → pt-0SO_cPU9.js} +135 -881
  212. package/dist/{pt-BR-CMvTsOqE.js → pt-BR-BEfs5M8G.js} +135 -881
  213. package/dist/{pt-PT-KzIM0vpf.js → pt-PT-ONBmg0BR.js} +135 -881
  214. package/dist/qe-signature/qe-signature.es.js +4 -4
  215. package/dist/realtimeFeedbackConfig-DeZksjlR.js +16 -0
  216. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +66 -62
  217. package/dist/redirect-to-mobile/styles.css +1 -1
  218. package/dist/redirect-to-mobile/styles.css.js +1 -1
  219. package/dist/{registerIncodeElement-D_cn4dSI.js → registerIncodeElement-FoirFu19.js} +1 -1
  220. package/dist/{resendTimer-On_zrMLS.js → resendTimer-B7aR2zn3.js} +2 -2
  221. package/dist/richText-DlHC_sMB.js +1761 -0
  222. package/dist/{ro-DYdJJDKn.js → ro-ChyvDsu3.js} +135 -881
  223. package/dist/{ru-C1cguVi2.js → ru-B_vdxKv-.js} +134 -880
  224. package/dist/{ru-RU-18JeDfwz.js → ru-RU-CrvUlCJj.js} +134 -880
  225. package/dist/{sanitizeSvg-BC-qLUgS.js → sanitizeSvg-IfqLuP1N.js} +1 -1
  226. package/dist/selfie/selfie.es.js +37 -14
  227. package/dist/selfie/styles.css +1 -1
  228. package/dist/selfie/styles.css.js +1 -1
  229. package/dist/signature/signature.es.js +18 -13
  230. package/dist/{sk-CtIcnYOo.js → sk-ljMYKwHQ.js} +136 -882
  231. package/dist/{sl-DS_Gc0Wc.js → sl-BbVJSIEt.js} +135 -881
  232. package/dist/{smsTabContent-vE0WyKtg.js → smsTabContent-BOIszuLx.js} +40 -27
  233. package/dist/{so-dqMTkg5E.js → so-DTymvbrx.js} +135 -881
  234. package/dist/spacer-DQdgPJjU.js +1100 -0
  235. package/dist/spinner-DQf6JseL.js +69 -0
  236. package/dist/{sr-DgHGiiWM.js → sr-JVvblELi.js} +134 -880
  237. package/dist/{sr-Latn-Du7_x_Tr.js → sr-Latn-9I-jEoNt.js} +142 -888
  238. package/dist/sr-YU-AHJXObyx.js +5 -0
  239. package/dist/{sv-SE-Dw61hRjx.js → sv-SE-MhrEy6Di.js} +134 -880
  240. package/dist/{sw-De-Jo8XY.js → sw-2Mtjggv_.js} +135 -881
  241. package/dist/{th-BJixOgsM.js → th-CRCVvVIy.js} +135 -881
  242. package/dist/{th-TH-VyhljC5U.js → th-TH-BJP2vgt1.js} +135 -881
  243. package/dist/themes/dark.css +1 -1
  244. package/dist/themes/light.css +1 -1
  245. package/dist/{tl-DhjdqhA4.js → tl-CI98qs3U.js} +135 -881
  246. package/dist/{tl-PH-D2S2Irx7.js → tl-PH-Bwmbtl_j.js} +135 -881
  247. package/dist/{tr-BJAuvOwN.js → tr-Bjsibm46.js} +135 -881
  248. package/dist/{transitionSpinner-BZO916B1.js → transitionSpinner-BTr1yrwy.js} +7 -7
  249. package/dist/tutorial-DO3fs1fY.js +28 -0
  250. package/dist/types/ae-signature.d.ts +17 -4
  251. package/dist/types/antifraud.d.ts +17 -4
  252. package/dist/types/authentication.d.ts +17 -4
  253. package/dist/types/certificate-issuance.d.ts +17 -4
  254. package/dist/types/consent.d.ts +17 -4
  255. package/dist/types/cross-document-data-match.d.ts +17 -4
  256. package/dist/types/curp-validation.d.ts +17 -4
  257. package/dist/types/document-capture.d.ts +17 -4
  258. package/dist/types/dynamic-forms.d.ts +17 -4
  259. package/dist/types/ekyb.d.ts +17 -4
  260. package/dist/types/ekyc-prefill.d.ts +213 -0
  261. package/dist/types/ekyc.d.ts +17 -4
  262. package/dist/types/electronic-signature.d.ts +17 -4
  263. package/dist/types/email.d.ts +17 -4
  264. package/dist/types/extensibility.d.ts +204 -37
  265. package/dist/types/face-match.d.ts +17 -4
  266. package/dist/types/field-comparison.d.ts +17 -4
  267. package/dist/types/fiscal-qr.d.ts +17 -4
  268. package/dist/types/flow.d.ts +38 -5
  269. package/dist/types/geolocation.d.ts +17 -4
  270. package/dist/types/government-validation.d.ts +17 -4
  271. package/dist/types/id-selfie-flow.d.ts +17 -4
  272. package/dist/types/id-verification.d.ts +17 -4
  273. package/dist/types/id.d.ts +17 -4
  274. package/dist/types/identity-reuse.d.ts +18 -5
  275. package/dist/types/index.d.ts +92 -10
  276. package/dist/types/kyb-checks.d.ts +213 -0
  277. package/dist/types/phone.d.ts +17 -4
  278. package/dist/types/qe-signature.d.ts +17 -4
  279. package/dist/types/redirect-to-mobile.d.ts +1 -1
  280. package/dist/types/selfie.d.ts +17 -4
  281. package/dist/types/signature.d.ts +17 -4
  282. package/dist/types/video-selfie.d.ts +1 -1
  283. package/dist/types/watchlist.d.ts +17 -4
  284. package/dist/types/workflow.d.ts +17 -4
  285. package/dist/{typography-8iwtPQbj.js → typography-CyT20XIA.js} +3 -11
  286. package/dist/{uk-UA-BZR90qDZ.js → uk-UA-DmKAplUk.js} +135 -881
  287. package/dist/{uk-CcU91ee-.js → uk-fCdIfhh5.js} +134 -880
  288. package/dist/{ur-CIXtUYHK.js → ur-Dh9AF1hS.js} +135 -881
  289. package/dist/useCameraPreview-hNLhri73.js +93 -0
  290. package/dist/useCaptureHelpButton-CSuQmlEp.js +43 -0
  291. package/dist/useIsDarkTheme-DoOFy9TN.js +27 -0
  292. package/dist/{useModuleLoader-BdIp6TNQ.js → useModuleLoader-BCYS1xLP.js} +31 -18
  293. package/dist/{uz-CeLVgwAD.js → uz-DYarfGyT.js} +135 -881
  294. package/dist/{vendor-preact-C0jX1Cbq.js → vendor-preact-CjnloSla.js} +147 -5
  295. package/dist/{verificationResult-C2gxbmAo.js → verificationResult-C8jlwbOw.js} +30 -27
  296. package/dist/{vi-CgfGVVLY.js → vi-uK03Bfuc.js} +135 -881
  297. package/dist/video-selfie/styles.css +1 -1
  298. package/dist/video-selfie/styles.css.js +1 -1
  299. package/dist/video-selfie/video-selfie.es.js +120 -77
  300. package/dist/watchlist/watchlist.es.js +12 -9
  301. package/dist/{watchlistForBusiness-eOPtmu7z.js → watchlistForBusiness-DjSYKjVv.js} +63 -22
  302. package/dist/{withEndScreenTexts-aFUEeBgM.js → withEndScreenTexts-TlaaD6Qn.js} +253 -55
  303. package/dist/workflow/styles.css +1 -1
  304. package/dist/workflow/workflow.es.js +36 -28
  305. package/dist/{zh-CN-BOxod1_T.js → zh-CN-BkQoAg2R.js} +136 -882
  306. package/dist/{zh-HANT-zAahQ8nP.js → zh-HANT-DRh68ryN.js} +135 -881
  307. package/dist/{zh-B-kjeCig.js → zh-JlU3mjl9.js} +134 -880
  308. package/dist/{zh-TW-B0v7GYYG.js → zh-TW-ByGAHrvB.js} +135 -881
  309. package/package.json +48 -12
  310. package/dist/autoFocusTitle-Cy0J3lvr.js +0 -32
  311. package/dist/browser-ponyfill-DT11p-Ob.js +0 -441
  312. package/dist/cameraOverlay-DQEG24io.js +0 -2
  313. package/dist/check-icon-BpjpKqhJ.js +0 -48
  314. package/dist/connectionError-Cf6iGFyx.js +0 -45
  315. package/dist/dashboardTheme-CkyISqIs.js +0 -247
  316. package/dist/dateInputComposed-cgZGBSiu.js +0 -1
  317. package/dist/denied-ByGDWkTW.js +0 -1871
  318. package/dist/deviceWallet-C4UT05wN.js +0 -66
  319. package/dist/documentCapture-Dh1ftzGG.js +0 -2
  320. package/dist/dropdownComposed-DmT4s8VM.js +0 -1
  321. package/dist/ekybModule-BHInfPHS.js +0 -2
  322. package/dist/ekycModule-B2cfT3zi.js +0 -2
  323. package/dist/ekycModule-BQPl1KQT.js +0 -300
  324. package/dist/es-419-BU7r2Fvh.js +0 -3193
  325. package/dist/esm-15CISqPe.js +0 -430
  326. package/dist/expiredId-GIHjGAuY.js +0 -80
  327. package/dist/faceMatch-bXhejzhf.js +0 -2
  328. package/dist/fieldComparison-BirXQb7f.js +0 -2
  329. package/dist/fieldComparison-D8PL0eR1.js +0 -109
  330. package/dist/flipAnimation-BgMPQ8Ma.js +0 -3048
  331. package/dist/formField-0k8wVfXl.js +0 -60
  332. package/dist/incodeModule-DiVtqekm.js +0 -68
  333. package/dist/inputComposed-CKujYUSB.js +0 -1
  334. package/dist/numberedStep-CvbL3ht2.js +0 -13
  335. package/dist/otpInput-_B7xEZUU.js +0 -157
  336. package/dist/passwordInputComposed-B3WKjODU.js +0 -74
  337. package/dist/pdfViewer-DcB41xr7.js +0 -2
  338. package/dist/radioGroupComposed-CIbHjX4v.js +0 -160
  339. package/dist/radioGroupComposed-eXNWg1ez.js +0 -1
  340. package/dist/reload-icon-elAFo9-k.js +0 -70
  341. package/dist/richText-aCnLd3j2.js +0 -1549
  342. package/dist/spacer-lcnhSC-5.js +0 -741
  343. package/dist/spinner-B8BswhBb.js +0 -88
  344. package/dist/sr-YU-YuZu7wdb.js +0 -3197
  345. package/dist/statusPage-WIsGgf_m.js +0 -36
  346. package/dist/uiConfig-CwGL3QjP.js +0 -2589
  347. package/dist/useCaptureHelpButton-BTUZs3Ev.js +0 -86
  348. package/dist/useCoverMedia-VLw3OYN_.js +0 -149
  349. /package/dist/{aligndevicelottie-BARt-rhe.js → aligndevicelottie-BEKzL4SB.js} +0 -0
  350. /package/dist/{back-tutorial-CZrMmj1_.js → back-tutorial-B9W63fa-.js} +0 -0
  351. /package/dist/{backdevicelottie-CIM3ekd8.js → backdevicelottie-DsN8QBV3.js} +0 -0
  352. /package/dist/{blurdevicelottie-BRyXfLB6.js → blurdevicelottie-DkV7Kwo4.js} +0 -0
  353. /package/dist/{defineProperty-CjeJoXkx.js → defineProperty-B4FQTz14.js} +0 -0
  354. /package/dist/{flip-animation-BU5LNKYx.js → flip-animation-DJVnWWL5.js} +0 -0
  355. /package/dist/{frontdevicelottie-arpyu_Fz.js → frontdevicelottie-DiW1Wmya.js} +0 -0
  356. /package/dist/{glaredevicelottie-TwTFxe7h.js → glaredevicelottie-CK-fnX_s.js} +0 -0
  357. /package/dist/{id-laser-h-Dr-hBxrq.js → id-laser-h-6Am_cjM8.js} +0 -0
  358. /package/dist/{id-laser-v-D_r0QNY8.js → id-laser-v-DXoF3flH.js} +0 -0
  359. /package/dist/{id-tutorial-DM9Pkfs-.js → id-tutorial-DkKH3eTE.js} +0 -0
  360. /package/dist/{lottie_light-aMg9Q9iO.js → lottie_light-Bam05Bc9.js} +0 -0
  361. /package/dist/{passport-tutorial-CKZZuDf_.js → passport-tutorial-D3Fpk-Tj.js} +0 -0
  362. /package/dist/{pdf.worker.min-BM1b2w9V.js → pdf.worker.min-D0hm-8jN.js} +0 -0
  363. /package/dist/{policyUrls-B3M8nLRh.js → policyUrls-B3TEaluh.js} +0 -0
  364. /package/dist/{purify.es-0fCPkEV1.js → purify.es-DhY3JLdI.js} +0 -0
  365. /package/dist/{selfieTutorial-Dz6lDFMn.js → selfieTutorial-DnsRD1Z9.js} +0 -0
@@ -1,1549 +0,0 @@
1
- import { v as u } from "./vendor-preact-C0jX1Cbq.js";
2
- import { t as purify } from "./purify.es-0fCPkEV1.js";
3
- import { t as _defineProperty } from "./defineProperty-CjeJoXkx.js";
4
- //#region ../../node_modules/.pnpm/marked@17.0.5/node_modules/marked/lib/marked.esm.js
5
- var _Class;
6
- /**
7
- * marked v17.0.5 - a markdown parser
8
- * Copyright (c) 2018-2026, MarkedJS. (MIT License)
9
- * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
10
- * https://github.com/markedjs/marked
11
- */
12
- /**
13
- * DO NOT EDIT THIS FILE
14
- * The code in this file is generated from files in ./src/
15
- */
16
- function M() {
17
- return {
18
- async: !1,
19
- breaks: !1,
20
- extensions: null,
21
- gfm: !0,
22
- hooks: null,
23
- pedantic: !1,
24
- renderer: null,
25
- silent: !1,
26
- tokenizer: null,
27
- walkTokens: null
28
- };
29
- }
30
- var T = M();
31
- function G(u) {
32
- T = u;
33
- }
34
- var _ = { exec: () => null };
35
- function k(u, e = "") {
36
- let t = typeof u == "string" ? u : u.source, n = {
37
- replace: (r, i) => {
38
- let s = typeof i == "string" ? i : i.source;
39
- return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
40
- },
41
- getRegex: () => new RegExp(t, e)
42
- };
43
- return n;
44
- }
45
- var be = (() => {
46
- try {
47
- return true;
48
- } catch {
49
- return !1;
50
- }
51
- })(), m = {
52
- codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
53
- outputLinkReplace: /\\([\[\]])/g,
54
- indentCodeCompensation: /^(\s+)(?:```)/,
55
- beginningSpace: /^\s+/,
56
- endingHash: /#$/,
57
- startingSpaceChar: /^ /,
58
- endingSpaceChar: / $/,
59
- nonSpaceChar: /[^ ]/,
60
- newLineCharGlobal: /\n/g,
61
- tabCharGlobal: /\t/g,
62
- multipleSpaceGlobal: /\s+/g,
63
- blankLine: /^[ \t]*$/,
64
- doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
65
- blockquoteStart: /^ {0,3}>/,
66
- blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
67
- blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
68
- listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
69
- listIsTask: /^\[[ xX]\] +\S/,
70
- listReplaceTask: /^\[[ xX]\] +/,
71
- listTaskCheckbox: /\[[ xX]\]/,
72
- anyLine: /\n.*\n/,
73
- hrefBrackets: /^<(.*)>$/,
74
- tableDelimiter: /[:|]/,
75
- tableAlignChars: /^\||\| *$/g,
76
- tableRowBlankLine: /\n[ \t]*$/,
77
- tableAlignRight: /^ *-+: *$/,
78
- tableAlignCenter: /^ *:-+: *$/,
79
- tableAlignLeft: /^ *:-+ *$/,
80
- startATag: /^<a /i,
81
- endATag: /^<\/a>/i,
82
- startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
83
- endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
84
- startAngleBracket: /^</,
85
- endAngleBracket: />$/,
86
- pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
87
- unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
88
- escapeTest: /[&<>"']/,
89
- escapeReplace: /[&<>"']/g,
90
- escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
91
- escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
92
- caret: /(^|[^\[])\^/g,
93
- percentDecode: /%25/g,
94
- findPipe: /\|/g,
95
- splitPipe: / \|/,
96
- slashPipe: /\\\|/g,
97
- carriageReturn: /\r\n|\r/g,
98
- spaceLine: /^ +$/gm,
99
- notSpaceStart: /^\S*/,
100
- endingNewline: /\n$/,
101
- listItemRegex: (u) => new RegExp(`^( {0,3}${u})((?:[ ][^\\n]*)?(?:\\n|$))`),
102
- nextBulletRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),
103
- hrRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),
104
- fencesBeginRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}(?:\`\`\`|~~~)`),
105
- headingBeginRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}#`),
106
- htmlBeginRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}<(?:[a-z].*>|!--)`, "i"),
107
- blockquoteBeginRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}>`)
108
- }, Re = /^(?:[ \t]*(?:\n|$))+/, Te = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Oe = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, we = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Q = / {0,3}(?:[*+-]|\d{1,9}[.)])/, se = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ie = k(se).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), ye = k(se).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Pe = /^[^\n]+/, F = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Se = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", F).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), $e = k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q).getRegex(), v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, _e = k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), oe = k(j).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), K = {
109
- blockquote: k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex(),
110
- code: Te,
111
- def: Se,
112
- fences: Oe,
113
- heading: we,
114
- hr: C,
115
- html: _e,
116
- lheading: ie,
117
- list: $e,
118
- newline: Re,
119
- paragraph: oe,
120
- table: _,
121
- text: Pe
122
- }, ne = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Me = {
123
- ...K,
124
- lheading: ye,
125
- table: ne,
126
- paragraph: k(j).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ne).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex()
127
- }, ze = {
128
- ...K,
129
- html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
130
- def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
131
- heading: /^(#{1,6})(.*)(?:\n+|$)/,
132
- fences: _,
133
- lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
134
- paragraph: k(j).replace("hr", C).replace("heading", ` *#{1,6} *[^
135
- ]`).replace("lheading", ie).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
136
- }, Ee = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ie = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ae = /^( {2,}|\\)\n(?!\s*$)/, Ae = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, z = /[\p{P}\p{S}]/u, H = /[\s\p{P}\p{S}]/u, W = /[^\s\p{P}\p{S}]/u, Ce = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, H).getRegex(), le = /(?!~)[\p{P}\p{S}]/u, Be = /(?!~)[\s\p{P}\p{S}]/u, De = /(?:[^\s\p{P}\p{S}]|~)/u, qe = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", be ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ue = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, ve = k(ue, "u").replace(/punct/g, z).getRegex(), He = k(ue, "u").replace(/punct/g, le).getRegex(), pe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ze = k(pe, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex(), Ge = k(pe, "gu").replace(/notPunctSpace/g, De).replace(/punctSpace/g, Be).replace(/punct/g, le).getRegex(), Ne = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex(), Qe = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, z).getRegex(), Fe = k("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex(), Ue = k(/\\(punct)/, "gu").replace(/punct/g, z).getRegex(), Ke = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), We = k(U).replace("(?:-->|$)", "-->").getRegex(), Xe = k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", We).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Je = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ce = k(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", F).getRegex(), he = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex(), Ve = k("reflink|nolink(?!\\()", "g").replace("reflink", ce).replace("nolink", he).getRegex(), re = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = {
137
- _backpedal: _,
138
- anyPunctuation: Ue,
139
- autolink: Ke,
140
- blockSkip: qe,
141
- br: ae,
142
- code: Ie,
143
- del: _,
144
- delLDelim: _,
145
- delRDelim: _,
146
- emStrongLDelim: ve,
147
- emStrongRDelimAst: Ze,
148
- emStrongRDelimUnd: Ne,
149
- escape: Ee,
150
- link: Je,
151
- nolink: he,
152
- punctuation: Ce,
153
- reflink: ce,
154
- reflinkSearch: Ve,
155
- tag: Xe,
156
- text: Ae,
157
- url: _
158
- }, Ye = {
159
- ...X,
160
- link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(),
161
- reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex()
162
- }, N = {
163
- ...X,
164
- emStrongRDelimAst: Ge,
165
- emStrongLDelim: He,
166
- delLDelim: Qe,
167
- delRDelim: Fe,
168
- url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", re).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
169
- _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
170
- del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
171
- text: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", re).getRegex()
172
- }, et = {
173
- ...N,
174
- br: k(ae).replace("{2,}", "*").getRegex(),
175
- text: k(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
176
- }, B = {
177
- normal: K,
178
- gfm: Me,
179
- pedantic: ze
180
- }, E = {
181
- normal: X,
182
- gfm: N,
183
- breaks: et,
184
- pedantic: Ye
185
- };
186
- var tt = {
187
- "&": "&amp;",
188
- "<": "&lt;",
189
- ">": "&gt;",
190
- "\"": "&quot;",
191
- "'": "&#39;"
192
- }, ke = (u) => tt[u];
193
- function O(u, e) {
194
- if (e) {
195
- if (m.escapeTest.test(u)) return u.replace(m.escapeReplace, ke);
196
- } else if (m.escapeTestNoEncode.test(u)) return u.replace(m.escapeReplaceNoEncode, ke);
197
- return u;
198
- }
199
- function J(u) {
200
- try {
201
- u = encodeURI(u).replace(m.percentDecode, "%");
202
- } catch {
203
- return null;
204
- }
205
- return u;
206
- }
207
- function V(u, e) {
208
- let n = u.replace(m.findPipe, (i, s, a) => {
209
- let o = !1, l = s;
210
- for (; --l >= 0 && a[l] === "\\";) o = !o;
211
- return o ? "|" : " |";
212
- }).split(m.splitPipe), r = 0;
213
- if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
214
- else for (; n.length < e;) n.push("");
215
- for (; r < n.length; r++) n[r] = n[r].trim().replace(m.slashPipe, "|");
216
- return n;
217
- }
218
- function I(u, e, t) {
219
- let n = u.length;
220
- if (n === 0) return "";
221
- let r = 0;
222
- for (; r < n;) {
223
- let i = u.charAt(n - r - 1);
224
- if (i === e && !t) r++;
225
- else if (i !== e && t) r++;
226
- else break;
227
- }
228
- return u.slice(0, n - r);
229
- }
230
- function de(u, e) {
231
- if (u.indexOf(e[1]) === -1) return -1;
232
- let t = 0;
233
- for (let n = 0; n < u.length; n++) if (u[n] === "\\") n++;
234
- else if (u[n] === e[0]) t++;
235
- else if (u[n] === e[1] && (t--, t < 0)) return n;
236
- return t > 0 ? -2 : -1;
237
- }
238
- function ge(u, e = 0) {
239
- let t = e, n = "";
240
- for (let r of u) if (r === " ") {
241
- let i = 4 - t % 4;
242
- n += " ".repeat(i), t += i;
243
- } else n += r, t++;
244
- return n;
245
- }
246
- function fe(u, e, t, n, r) {
247
- let i = e.href, s = e.title || null, a = u[1].replace(r.other.outputLinkReplace, "$1");
248
- n.state.inLink = !0;
249
- let o = {
250
- type: u[0].charAt(0) === "!" ? "image" : "link",
251
- raw: t,
252
- href: i,
253
- title: s,
254
- text: a,
255
- tokens: n.inlineTokens(a)
256
- };
257
- return n.state.inLink = !1, o;
258
- }
259
- function nt(u, e, t) {
260
- let n = u.match(t.other.indentCodeCompensation);
261
- if (n === null) return e;
262
- let r = n[1];
263
- return e.split(`
264
- `).map((i) => {
265
- let s = i.match(t.other.beginningSpace);
266
- if (s === null) return i;
267
- let [a] = s;
268
- return a.length >= r.length ? i.slice(r.length) : i;
269
- }).join(`
270
- `);
271
- }
272
- var w = class {
273
- constructor(e) {
274
- _defineProperty(this, "options", void 0);
275
- _defineProperty(this, "rules", void 0);
276
- _defineProperty(this, "lexer", void 0);
277
- this.options = e || T;
278
- }
279
- space(e) {
280
- let t = this.rules.block.newline.exec(e);
281
- if (t && t[0].length > 0) return {
282
- type: "space",
283
- raw: t[0]
284
- };
285
- }
286
- code(e) {
287
- let t = this.rules.block.code.exec(e);
288
- if (t) {
289
- let n = t[0].replace(this.rules.other.codeRemoveIndent, "");
290
- return {
291
- type: "code",
292
- raw: t[0],
293
- codeBlockStyle: "indented",
294
- text: this.options.pedantic ? n : I(n, `
295
- `)
296
- };
297
- }
298
- }
299
- fences(e) {
300
- let t = this.rules.block.fences.exec(e);
301
- if (t) {
302
- let n = t[0], r = nt(n, t[3] || "", this.rules);
303
- return {
304
- type: "code",
305
- raw: n,
306
- lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
307
- text: r
308
- };
309
- }
310
- }
311
- heading(e) {
312
- let t = this.rules.block.heading.exec(e);
313
- if (t) {
314
- let n = t[2].trim();
315
- if (this.rules.other.endingHash.test(n)) {
316
- let r = I(n, "#");
317
- (this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
318
- }
319
- return {
320
- type: "heading",
321
- raw: t[0],
322
- depth: t[1].length,
323
- text: n,
324
- tokens: this.lexer.inline(n)
325
- };
326
- }
327
- }
328
- hr(e) {
329
- let t = this.rules.block.hr.exec(e);
330
- if (t) return {
331
- type: "hr",
332
- raw: I(t[0], `
333
- `)
334
- };
335
- }
336
- blockquote(e) {
337
- let t = this.rules.block.blockquote.exec(e);
338
- if (t) {
339
- let n = I(t[0], `
340
- `).split(`
341
- `), r = "", i = "", s = [];
342
- for (; n.length > 0;) {
343
- let a = !1, o = [], l;
344
- for (l = 0; l < n.length; l++) if (this.rules.other.blockquoteStart.test(n[l])) o.push(n[l]), a = !0;
345
- else if (!a) o.push(n[l]);
346
- else break;
347
- n = n.slice(l);
348
- let p = o.join(`
349
- `), c = p.replace(this.rules.other.blockquoteSetextReplace, `
350
- $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
351
- r = r ? `${r}
352
- ${p}` : p, i = i ? `${i}
353
- ${c}` : c;
354
- let d = this.lexer.state.top;
355
- if (this.lexer.state.top = !0, this.lexer.blockTokens(c, s, !0), this.lexer.state.top = d, n.length === 0) break;
356
- let h = s.at(-1);
357
- if (h?.type === "code") break;
358
- if (h?.type === "blockquote") {
359
- let R = h, f = R.raw + `
360
- ` + n.join(`
361
- `), S = this.blockquote(f);
362
- s[s.length - 1] = S, r = r.substring(0, r.length - R.raw.length) + S.raw, i = i.substring(0, i.length - R.text.length) + S.text;
363
- break;
364
- } else if (h?.type === "list") {
365
- let R = h, f = R.raw + `
366
- ` + n.join(`
367
- `), S = this.list(f);
368
- s[s.length - 1] = S, r = r.substring(0, r.length - h.raw.length) + S.raw, i = i.substring(0, i.length - R.raw.length) + S.raw, n = f.substring(s.at(-1).raw.length).split(`
369
- `);
370
- continue;
371
- }
372
- }
373
- return {
374
- type: "blockquote",
375
- raw: r,
376
- tokens: s,
377
- text: i
378
- };
379
- }
380
- }
381
- list(e) {
382
- let t = this.rules.block.list.exec(e);
383
- if (t) {
384
- let n = t[1].trim(), r = n.length > 1, i = {
385
- type: "list",
386
- raw: "",
387
- ordered: r,
388
- start: r ? +n.slice(0, -1) : "",
389
- loose: !1,
390
- items: []
391
- };
392
- n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
393
- let s = this.rules.other.listItemRegex(n), a = !1;
394
- for (; e;) {
395
- let l = !1, p = "", c = "";
396
- if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
397
- p = t[0], e = e.substring(p.length);
398
- let d = ge(t[2].split(`
399
- `, 1)[0], t[1].length), h = e.split(`
400
- `, 1)[0], R = !d.trim(), f = 0;
401
- if (this.options.pedantic ? (f = 2, c = d.trimStart()) : R ? f = t[1].length + 1 : (f = d.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = d.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (p += h + `
402
- `, e = e.substring(h.length + 1), l = !0), !l) {
403
- let S = this.rules.other.nextBulletRegex(f), Y = this.rules.other.hrRegex(f), ee = this.rules.other.fencesBeginRegex(f), te = this.rules.other.headingBeginRegex(f), me = this.rules.other.htmlBeginRegex(f), xe = this.rules.other.blockquoteBeginRegex(f);
404
- for (; e;) {
405
- let Z = e.split(`
406
- `, 1)[0], A;
407
- if (h = Z, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), A = h) : A = h.replace(this.rules.other.tabCharGlobal, " "), ee.test(h) || te.test(h) || me.test(h) || xe.test(h) || S.test(h) || Y.test(h)) break;
408
- if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
409
- ` + A.slice(f);
410
- else {
411
- if (R || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ee.test(d) || te.test(d) || Y.test(d)) break;
412
- c += `
413
- ` + h;
414
- }
415
- R = !h.trim(), p += Z + `
416
- `, e = e.substring(Z.length + 1), d = A.slice(f);
417
- }
418
- }
419
- i.loose || (a ? i.loose = !0 : this.rules.other.doubleBlankLine.test(p) && (a = !0)), i.items.push({
420
- type: "list_item",
421
- raw: p,
422
- task: !!this.options.gfm && this.rules.other.listIsTask.test(c),
423
- loose: !1,
424
- text: c,
425
- tokens: []
426
- }), i.raw += p;
427
- }
428
- let o = i.items.at(-1);
429
- if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
430
- else return;
431
- i.raw = i.raw.trimEnd();
432
- for (let l of i.items) {
433
- if (this.lexer.state.top = !1, l.tokens = this.lexer.blockTokens(l.text, []), l.task) {
434
- if (l.text = l.text.replace(this.rules.other.listReplaceTask, ""), l.tokens[0]?.type === "text" || l.tokens[0]?.type === "paragraph") {
435
- l.tokens[0].raw = l.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), l.tokens[0].text = l.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
436
- for (let c = this.lexer.inlineQueue.length - 1; c >= 0; c--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)) {
437
- this.lexer.inlineQueue[c].src = this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask, "");
438
- break;
439
- }
440
- }
441
- let p = this.rules.other.listTaskCheckbox.exec(l.raw);
442
- if (p) {
443
- let c = {
444
- type: "checkbox",
445
- raw: p[0] + " ",
446
- checked: p[0] !== "[ ]"
447
- };
448
- l.checked = c.checked, i.loose ? l.tokens[0] && ["paragraph", "text"].includes(l.tokens[0].type) && "tokens" in l.tokens[0] && l.tokens[0].tokens ? (l.tokens[0].raw = c.raw + l.tokens[0].raw, l.tokens[0].text = c.raw + l.tokens[0].text, l.tokens[0].tokens.unshift(c)) : l.tokens.unshift({
449
- type: "paragraph",
450
- raw: c.raw,
451
- text: c.raw,
452
- tokens: [c]
453
- }) : l.tokens.unshift(c);
454
- }
455
- }
456
- if (!i.loose) {
457
- let p = l.tokens.filter((d) => d.type === "space");
458
- i.loose = p.length > 0 && p.some((d) => this.rules.other.anyLine.test(d.raw));
459
- }
460
- }
461
- if (i.loose) for (let l of i.items) {
462
- l.loose = !0;
463
- for (let p of l.tokens) p.type === "text" && (p.type = "paragraph");
464
- }
465
- return i;
466
- }
467
- }
468
- html(e) {
469
- let t = this.rules.block.html.exec(e);
470
- if (t) return {
471
- type: "html",
472
- block: !0,
473
- raw: t[0],
474
- pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
475
- text: t[0]
476
- };
477
- }
478
- def(e) {
479
- let t = this.rules.block.def.exec(e);
480
- if (t) {
481
- let n = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), r = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", i = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
482
- return {
483
- type: "def",
484
- tag: n,
485
- raw: t[0],
486
- href: r,
487
- title: i
488
- };
489
- }
490
- }
491
- table(e) {
492
- let t = this.rules.block.table.exec(e);
493
- if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
494
- let n = V(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
495
- `) : [], s = {
496
- type: "table",
497
- raw: t[0],
498
- header: [],
499
- align: [],
500
- rows: []
501
- };
502
- if (n.length === r.length) {
503
- for (let a of r) this.rules.other.tableAlignRight.test(a) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(a) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(a) ? s.align.push("left") : s.align.push(null);
504
- for (let a = 0; a < n.length; a++) s.header.push({
505
- text: n[a],
506
- tokens: this.lexer.inline(n[a]),
507
- header: !0,
508
- align: s.align[a]
509
- });
510
- for (let a of i) s.rows.push(V(a, s.header.length).map((o, l) => ({
511
- text: o,
512
- tokens: this.lexer.inline(o),
513
- header: !1,
514
- align: s.align[l]
515
- })));
516
- return s;
517
- }
518
- }
519
- lheading(e) {
520
- let t = this.rules.block.lheading.exec(e);
521
- if (t) {
522
- let n = t[1].trim();
523
- return {
524
- type: "heading",
525
- raw: t[0],
526
- depth: t[2].charAt(0) === "=" ? 1 : 2,
527
- text: n,
528
- tokens: this.lexer.inline(n)
529
- };
530
- }
531
- }
532
- paragraph(e) {
533
- let t = this.rules.block.paragraph.exec(e);
534
- if (t) {
535
- let n = t[1].charAt(t[1].length - 1) === `
536
- ` ? t[1].slice(0, -1) : t[1];
537
- return {
538
- type: "paragraph",
539
- raw: t[0],
540
- text: n,
541
- tokens: this.lexer.inline(n)
542
- };
543
- }
544
- }
545
- text(e) {
546
- let t = this.rules.block.text.exec(e);
547
- if (t) return {
548
- type: "text",
549
- raw: t[0],
550
- text: t[0],
551
- tokens: this.lexer.inline(t[0])
552
- };
553
- }
554
- escape(e) {
555
- let t = this.rules.inline.escape.exec(e);
556
- if (t) return {
557
- type: "escape",
558
- raw: t[0],
559
- text: t[1]
560
- };
561
- }
562
- tag(e) {
563
- let t = this.rules.inline.tag.exec(e);
564
- if (t) return !this.lexer.state.inLink && this.rules.other.startATag.test(t[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && this.rules.other.endATag.test(t[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t[0]) && (this.lexer.state.inRawBlock = !1), {
565
- type: "html",
566
- raw: t[0],
567
- inLink: this.lexer.state.inLink,
568
- inRawBlock: this.lexer.state.inRawBlock,
569
- block: !1,
570
- text: t[0]
571
- };
572
- }
573
- link(e) {
574
- let t = this.rules.inline.link.exec(e);
575
- if (t) {
576
- let n = t[2].trim();
577
- if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
578
- if (!this.rules.other.endAngleBracket.test(n)) return;
579
- let s = I(n.slice(0, -1), "\\");
580
- if ((n.length - s.length) % 2 === 0) return;
581
- } else {
582
- let s = de(t[2], "()");
583
- if (s === -2) return;
584
- if (s > -1) {
585
- let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
586
- t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, o).trim(), t[3] = "";
587
- }
588
- }
589
- let r = t[2], i = "";
590
- if (this.options.pedantic) {
591
- let s = this.rules.other.pedanticHrefTitle.exec(r);
592
- s && (r = s[1], i = s[3]);
593
- } else i = t[3] ? t[3].slice(1, -1) : "";
594
- return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), fe(t, {
595
- href: r && r.replace(this.rules.inline.anyPunctuation, "$1"),
596
- title: i && i.replace(this.rules.inline.anyPunctuation, "$1")
597
- }, t[0], this.lexer, this.rules);
598
- }
599
- }
600
- reflink(e, t) {
601
- let n;
602
- if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
603
- let i = t[(n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
604
- if (!i) {
605
- let s = n[0].charAt(0);
606
- return {
607
- type: "text",
608
- raw: s,
609
- text: s
610
- };
611
- }
612
- return fe(n, i, n[0], this.lexer, this.rules);
613
- }
614
- }
615
- emStrong(e, t, n = "") {
616
- let r = this.rules.inline.emStrongLDelim.exec(e);
617
- if (!r || !r[1] && !r[2] && !r[3] && !r[4] || r[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
618
- if (!(r[1] || r[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
619
- let s = [...r[0]].length - 1, a, o, l = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
620
- for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null;) {
621
- if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
622
- if (o = [...a].length, r[3] || r[4]) {
623
- l += o;
624
- continue;
625
- } else if ((r[5] || r[6]) && s % 3 && !((s + o) % 3)) {
626
- p += o;
627
- continue;
628
- }
629
- if (l -= o, l > 0) continue;
630
- o = Math.min(o, o + l + p);
631
- let d = [...r[0]][0].length, h = e.slice(0, s + r.index + d + o);
632
- if (Math.min(s, o) % 2) {
633
- let f = h.slice(1, -1);
634
- return {
635
- type: "em",
636
- raw: h,
637
- text: f,
638
- tokens: this.lexer.inlineTokens(f)
639
- };
640
- }
641
- let R = h.slice(2, -2);
642
- return {
643
- type: "strong",
644
- raw: h,
645
- text: R,
646
- tokens: this.lexer.inlineTokens(R)
647
- };
648
- }
649
- }
650
- }
651
- codespan(e) {
652
- let t = this.rules.inline.code.exec(e);
653
- if (t) {
654
- let n = t[2].replace(this.rules.other.newLineCharGlobal, " "), r = this.rules.other.nonSpaceChar.test(n), i = this.rules.other.startingSpaceChar.test(n) && this.rules.other.endingSpaceChar.test(n);
655
- return r && i && (n = n.substring(1, n.length - 1)), {
656
- type: "codespan",
657
- raw: t[0],
658
- text: n
659
- };
660
- }
661
- }
662
- br(e) {
663
- let t = this.rules.inline.br.exec(e);
664
- if (t) return {
665
- type: "br",
666
- raw: t[0]
667
- };
668
- }
669
- del(e, t, n = "") {
670
- let r = this.rules.inline.delLDelim.exec(e);
671
- if (!r) return;
672
- if (!(r[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
673
- let s = [...r[0]].length - 1, a, o, l = s, p = this.rules.inline.delRDelim;
674
- for (p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t)) != null;) {
675
- if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a || (o = [...a].length, o !== s)) continue;
676
- if (r[3] || r[4]) {
677
- l += o;
678
- continue;
679
- }
680
- if (l -= o, l > 0) continue;
681
- o = Math.min(o, o + l);
682
- let c = [...r[0]][0].length, d = e.slice(0, s + r.index + c + o), h = d.slice(s, -s);
683
- return {
684
- type: "del",
685
- raw: d,
686
- text: h,
687
- tokens: this.lexer.inlineTokens(h)
688
- };
689
- }
690
- }
691
- }
692
- autolink(e) {
693
- let t = this.rules.inline.autolink.exec(e);
694
- if (t) {
695
- let n, r;
696
- return t[2] === "@" ? (n = t[1], r = "mailto:" + n) : (n = t[1], r = n), {
697
- type: "link",
698
- raw: t[0],
699
- text: n,
700
- href: r,
701
- tokens: [{
702
- type: "text",
703
- raw: n,
704
- text: n
705
- }]
706
- };
707
- }
708
- }
709
- url(e) {
710
- let t;
711
- if (t = this.rules.inline.url.exec(e)) {
712
- let n, r;
713
- if (t[2] === "@") n = t[0], r = "mailto:" + n;
714
- else {
715
- let i;
716
- do
717
- i = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
718
- while (i !== t[0]);
719
- n = t[0], t[1] === "www." ? r = "http://" + t[0] : r = t[0];
720
- }
721
- return {
722
- type: "link",
723
- raw: t[0],
724
- text: n,
725
- href: r,
726
- tokens: [{
727
- type: "text",
728
- raw: n,
729
- text: n
730
- }]
731
- };
732
- }
733
- }
734
- inlineText(e) {
735
- let t = this.rules.inline.text.exec(e);
736
- if (t) {
737
- let n = this.lexer.state.inRawBlock;
738
- return {
739
- type: "text",
740
- raw: t[0],
741
- text: t[0],
742
- escaped: n
743
- };
744
- }
745
- }
746
- };
747
- var x = class u {
748
- constructor(e) {
749
- _defineProperty(this, "tokens", void 0);
750
- _defineProperty(this, "options", void 0);
751
- _defineProperty(this, "state", void 0);
752
- _defineProperty(this, "inlineQueue", void 0);
753
- _defineProperty(this, "tokenizer", void 0);
754
- this.tokens = [], this.tokens.links = Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new w(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
755
- inLink: !1,
756
- inRawBlock: !1,
757
- top: !0
758
- };
759
- let t = {
760
- other: m,
761
- block: B.normal,
762
- inline: E.normal
763
- };
764
- this.options.pedantic ? (t.block = B.pedantic, t.inline = E.pedantic) : this.options.gfm && (t.block = B.gfm, this.options.breaks ? t.inline = E.breaks : t.inline = E.gfm), this.tokenizer.rules = t;
765
- }
766
- static get rules() {
767
- return {
768
- block: B,
769
- inline: E
770
- };
771
- }
772
- static lex(e, t) {
773
- return new u(t).lex(e);
774
- }
775
- static lexInline(e, t) {
776
- return new u(t).inlineTokens(e);
777
- }
778
- lex(e) {
779
- e = e.replace(m.carriageReturn, `
780
- `), this.blockTokens(e, this.tokens);
781
- for (let t = 0; t < this.inlineQueue.length; t++) {
782
- let n = this.inlineQueue[t];
783
- this.inlineTokens(n.src, n.tokens);
784
- }
785
- return this.inlineQueue = [], this.tokens;
786
- }
787
- blockTokens(e, t = [], n = !1) {
788
- for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e;) {
789
- let r;
790
- if (this.options.extensions?.block?.some((s) => (r = s.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
791
- if (r = this.tokenizer.space(e)) {
792
- e = e.substring(r.raw.length);
793
- let s = t.at(-1);
794
- r.raw.length === 1 && s !== void 0 ? s.raw += `
795
- ` : t.push(r);
796
- continue;
797
- }
798
- if (r = this.tokenizer.code(e)) {
799
- e = e.substring(r.raw.length);
800
- let s = t.at(-1);
801
- s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
802
- `) ? "" : `
803
- `) + r.raw, s.text += `
804
- ` + r.text, this.inlineQueue.at(-1).src = s.text) : t.push(r);
805
- continue;
806
- }
807
- if (r = this.tokenizer.fences(e)) {
808
- e = e.substring(r.raw.length), t.push(r);
809
- continue;
810
- }
811
- if (r = this.tokenizer.heading(e)) {
812
- e = e.substring(r.raw.length), t.push(r);
813
- continue;
814
- }
815
- if (r = this.tokenizer.hr(e)) {
816
- e = e.substring(r.raw.length), t.push(r);
817
- continue;
818
- }
819
- if (r = this.tokenizer.blockquote(e)) {
820
- e = e.substring(r.raw.length), t.push(r);
821
- continue;
822
- }
823
- if (r = this.tokenizer.list(e)) {
824
- e = e.substring(r.raw.length), t.push(r);
825
- continue;
826
- }
827
- if (r = this.tokenizer.html(e)) {
828
- e = e.substring(r.raw.length), t.push(r);
829
- continue;
830
- }
831
- if (r = this.tokenizer.def(e)) {
832
- e = e.substring(r.raw.length);
833
- let s = t.at(-1);
834
- s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
835
- `) ? "" : `
836
- `) + r.raw, s.text += `
837
- ` + r.raw, this.inlineQueue.at(-1).src = s.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = {
838
- href: r.href,
839
- title: r.title
840
- }, t.push(r));
841
- continue;
842
- }
843
- if (r = this.tokenizer.table(e)) {
844
- e = e.substring(r.raw.length), t.push(r);
845
- continue;
846
- }
847
- if (r = this.tokenizer.lheading(e)) {
848
- e = e.substring(r.raw.length), t.push(r);
849
- continue;
850
- }
851
- let i = e;
852
- if (this.options.extensions?.startBlock) {
853
- let s = Infinity, a = e.slice(1), o;
854
- this.options.extensions.startBlock.forEach((l) => {
855
- o = l.call({ lexer: this }, a), typeof o == "number" && o >= 0 && (s = Math.min(s, o));
856
- }), s < Infinity && s >= 0 && (i = e.substring(0, s + 1));
857
- }
858
- if (this.state.top && (r = this.tokenizer.paragraph(i))) {
859
- let s = t.at(-1);
860
- n && s?.type === "paragraph" ? (s.raw += (s.raw.endsWith(`
861
- `) ? "" : `
862
- `) + r.raw, s.text += `
863
- ` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t.push(r), n = i.length !== e.length, e = e.substring(r.raw.length);
864
- continue;
865
- }
866
- if (r = this.tokenizer.text(e)) {
867
- e = e.substring(r.raw.length);
868
- let s = t.at(-1);
869
- s?.type === "text" ? (s.raw += (s.raw.endsWith(`
870
- `) ? "" : `
871
- `) + r.raw, s.text += `
872
- ` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t.push(r);
873
- continue;
874
- }
875
- if (e) {
876
- let s = "Infinite loop on byte: " + e.charCodeAt(0);
877
- if (this.options.silent) {
878
- console.error(s);
879
- break;
880
- } else throw new Error(s);
881
- }
882
- }
883
- return this.state.top = !0, t;
884
- }
885
- inline(e, t = []) {
886
- return this.inlineQueue.push({
887
- src: e,
888
- tokens: t
889
- }), t;
890
- }
891
- inlineTokens(e, t = []) {
892
- this.tokenizer.lexer = this;
893
- let n = e, r = null;
894
- if (this.tokens.links) {
895
- let o = Object.keys(this.tokens.links);
896
- if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null;) o.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
897
- }
898
- for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
899
- let i;
900
- for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null;) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
901
- n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
902
- let s = !1, a = "";
903
- for (; e;) {
904
- s || (a = ""), s = !1;
905
- let o;
906
- if (this.options.extensions?.inline?.some((p) => (o = p.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), !0) : !1)) continue;
907
- if (o = this.tokenizer.escape(e)) {
908
- e = e.substring(o.raw.length), t.push(o);
909
- continue;
910
- }
911
- if (o = this.tokenizer.tag(e)) {
912
- e = e.substring(o.raw.length), t.push(o);
913
- continue;
914
- }
915
- if (o = this.tokenizer.link(e)) {
916
- e = e.substring(o.raw.length), t.push(o);
917
- continue;
918
- }
919
- if (o = this.tokenizer.reflink(e, this.tokens.links)) {
920
- e = e.substring(o.raw.length);
921
- let p = t.at(-1);
922
- o.type === "text" && p?.type === "text" ? (p.raw += o.raw, p.text += o.text) : t.push(o);
923
- continue;
924
- }
925
- if (o = this.tokenizer.emStrong(e, n, a)) {
926
- e = e.substring(o.raw.length), t.push(o);
927
- continue;
928
- }
929
- if (o = this.tokenizer.codespan(e)) {
930
- e = e.substring(o.raw.length), t.push(o);
931
- continue;
932
- }
933
- if (o = this.tokenizer.br(e)) {
934
- e = e.substring(o.raw.length), t.push(o);
935
- continue;
936
- }
937
- if (o = this.tokenizer.del(e, n, a)) {
938
- e = e.substring(o.raw.length), t.push(o);
939
- continue;
940
- }
941
- if (o = this.tokenizer.autolink(e)) {
942
- e = e.substring(o.raw.length), t.push(o);
943
- continue;
944
- }
945
- if (!this.state.inLink && (o = this.tokenizer.url(e))) {
946
- e = e.substring(o.raw.length), t.push(o);
947
- continue;
948
- }
949
- let l = e;
950
- if (this.options.extensions?.startInline) {
951
- let p = Infinity, c = e.slice(1), d;
952
- this.options.extensions.startInline.forEach((h) => {
953
- d = h.call({ lexer: this }, c), typeof d == "number" && d >= 0 && (p = Math.min(p, d));
954
- }), p < Infinity && p >= 0 && (l = e.substring(0, p + 1));
955
- }
956
- if (o = this.tokenizer.inlineText(l)) {
957
- e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (a = o.raw.slice(-1)), s = !0;
958
- let p = t.at(-1);
959
- p?.type === "text" ? (p.raw += o.raw, p.text += o.text) : t.push(o);
960
- continue;
961
- }
962
- if (e) {
963
- let p = "Infinite loop on byte: " + e.charCodeAt(0);
964
- if (this.options.silent) {
965
- console.error(p);
966
- break;
967
- } else throw new Error(p);
968
- }
969
- }
970
- return t;
971
- }
972
- };
973
- var y = class {
974
- constructor(e) {
975
- _defineProperty(this, "options", void 0);
976
- _defineProperty(this, "parser", void 0);
977
- this.options = e || T;
978
- }
979
- space(e) {
980
- return "";
981
- }
982
- code({ text: e, lang: t, escaped: n }) {
983
- let r = (t || "").match(m.notSpaceStart)?.[0], i = e.replace(m.endingNewline, "") + `
984
- `;
985
- return r ? "<pre><code class=\"language-" + O(r) + "\">" + (n ? i : O(i, !0)) + `</code></pre>
986
- ` : "<pre><code>" + (n ? i : O(i, !0)) + `</code></pre>
987
- `;
988
- }
989
- blockquote({ tokens: e }) {
990
- return `<blockquote>
991
- ${this.parser.parse(e)}</blockquote>
992
- `;
993
- }
994
- html({ text: e }) {
995
- return e;
996
- }
997
- def(e) {
998
- return "";
999
- }
1000
- heading({ tokens: e, depth: t }) {
1001
- return `<h${t}>${this.parser.parseInline(e)}</h${t}>
1002
- `;
1003
- }
1004
- hr(e) {
1005
- return `<hr>
1006
- `;
1007
- }
1008
- list(e) {
1009
- let t = e.ordered, n = e.start, r = "";
1010
- for (let a = 0; a < e.items.length; a++) {
1011
- let o = e.items[a];
1012
- r += this.listitem(o);
1013
- }
1014
- let i = t ? "ol" : "ul", s = t && n !== 1 ? " start=\"" + n + "\"" : "";
1015
- return "<" + i + s + `>
1016
- ` + r + "</" + i + `>
1017
- `;
1018
- }
1019
- listitem(e) {
1020
- return `<li>${this.parser.parse(e.tokens)}</li>
1021
- `;
1022
- }
1023
- checkbox({ checked: e }) {
1024
- return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\"> ";
1025
- }
1026
- paragraph({ tokens: e }) {
1027
- return `<p>${this.parser.parseInline(e)}</p>
1028
- `;
1029
- }
1030
- table(e) {
1031
- let t = "", n = "";
1032
- for (let i = 0; i < e.header.length; i++) n += this.tablecell(e.header[i]);
1033
- t += this.tablerow({ text: n });
1034
- let r = "";
1035
- for (let i = 0; i < e.rows.length; i++) {
1036
- let s = e.rows[i];
1037
- n = "";
1038
- for (let a = 0; a < s.length; a++) n += this.tablecell(s[a]);
1039
- r += this.tablerow({ text: n });
1040
- }
1041
- return r && (r = `<tbody>${r}</tbody>`), `<table>
1042
- <thead>
1043
- ` + t + `</thead>
1044
- ` + r + `</table>
1045
- `;
1046
- }
1047
- tablerow({ text: e }) {
1048
- return `<tr>
1049
- ${e}</tr>
1050
- `;
1051
- }
1052
- tablecell(e) {
1053
- let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
1054
- return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
1055
- `;
1056
- }
1057
- strong({ tokens: e }) {
1058
- return `<strong>${this.parser.parseInline(e)}</strong>`;
1059
- }
1060
- em({ tokens: e }) {
1061
- return `<em>${this.parser.parseInline(e)}</em>`;
1062
- }
1063
- codespan({ text: e }) {
1064
- return `<code>${O(e, !0)}</code>`;
1065
- }
1066
- br(e) {
1067
- return "<br>";
1068
- }
1069
- del({ tokens: e }) {
1070
- return `<del>${this.parser.parseInline(e)}</del>`;
1071
- }
1072
- link({ href: e, title: t, tokens: n }) {
1073
- let r = this.parser.parseInline(n), i = J(e);
1074
- if (i === null) return r;
1075
- e = i;
1076
- let s = "<a href=\"" + e + "\"";
1077
- return t && (s += " title=\"" + O(t) + "\""), s += ">" + r + "</a>", s;
1078
- }
1079
- image({ href: e, title: t, text: n, tokens: r }) {
1080
- r && (n = this.parser.parseInline(r, this.parser.textRenderer));
1081
- let i = J(e);
1082
- if (i === null) return O(n);
1083
- e = i;
1084
- let s = `<img src="${e}" alt="${O(n)}"`;
1085
- return t && (s += ` title="${O(t)}"`), s += ">", s;
1086
- }
1087
- text(e) {
1088
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : O(e.text);
1089
- }
1090
- };
1091
- var $ = class {
1092
- strong({ text: e }) {
1093
- return e;
1094
- }
1095
- em({ text: e }) {
1096
- return e;
1097
- }
1098
- codespan({ text: e }) {
1099
- return e;
1100
- }
1101
- del({ text: e }) {
1102
- return e;
1103
- }
1104
- html({ text: e }) {
1105
- return e;
1106
- }
1107
- text({ text: e }) {
1108
- return e;
1109
- }
1110
- link({ text: e }) {
1111
- return "" + e;
1112
- }
1113
- image({ text: e }) {
1114
- return "" + e;
1115
- }
1116
- br() {
1117
- return "";
1118
- }
1119
- checkbox({ raw: e }) {
1120
- return e;
1121
- }
1122
- };
1123
- var b = class u {
1124
- constructor(e) {
1125
- _defineProperty(this, "options", void 0);
1126
- _defineProperty(this, "renderer", void 0);
1127
- _defineProperty(this, "textRenderer", void 0);
1128
- this.options = e || T, this.options.renderer = this.options.renderer || new y(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
1129
- }
1130
- static parse(e, t) {
1131
- return new u(t).parse(e);
1132
- }
1133
- static parseInline(e, t) {
1134
- return new u(t).parseInline(e);
1135
- }
1136
- parse(e) {
1137
- this.renderer.parser = this;
1138
- let t = "";
1139
- for (let n = 0; n < e.length; n++) {
1140
- let r = e[n];
1141
- if (this.options.extensions?.renderers?.[r.type]) {
1142
- let s = r, a = this.options.extensions.renderers[s.type].call({ parser: this }, s);
1143
- if (a !== !1 || ![
1144
- "space",
1145
- "hr",
1146
- "heading",
1147
- "code",
1148
- "table",
1149
- "blockquote",
1150
- "list",
1151
- "html",
1152
- "def",
1153
- "paragraph",
1154
- "text"
1155
- ].includes(s.type)) {
1156
- t += a || "";
1157
- continue;
1158
- }
1159
- }
1160
- let i = r;
1161
- switch (i.type) {
1162
- case "space":
1163
- t += this.renderer.space(i);
1164
- break;
1165
- case "hr":
1166
- t += this.renderer.hr(i);
1167
- break;
1168
- case "heading":
1169
- t += this.renderer.heading(i);
1170
- break;
1171
- case "code":
1172
- t += this.renderer.code(i);
1173
- break;
1174
- case "table":
1175
- t += this.renderer.table(i);
1176
- break;
1177
- case "blockquote":
1178
- t += this.renderer.blockquote(i);
1179
- break;
1180
- case "list":
1181
- t += this.renderer.list(i);
1182
- break;
1183
- case "checkbox":
1184
- t += this.renderer.checkbox(i);
1185
- break;
1186
- case "html":
1187
- t += this.renderer.html(i);
1188
- break;
1189
- case "def":
1190
- t += this.renderer.def(i);
1191
- break;
1192
- case "paragraph":
1193
- t += this.renderer.paragraph(i);
1194
- break;
1195
- case "text":
1196
- t += this.renderer.text(i);
1197
- break;
1198
- default: {
1199
- let s = "Token with \"" + i.type + "\" type was not found.";
1200
- if (this.options.silent) return console.error(s), "";
1201
- throw new Error(s);
1202
- }
1203
- }
1204
- }
1205
- return t;
1206
- }
1207
- parseInline(e, t = this.renderer) {
1208
- this.renderer.parser = this;
1209
- let n = "";
1210
- for (let r = 0; r < e.length; r++) {
1211
- let i = e[r];
1212
- if (this.options.extensions?.renderers?.[i.type]) {
1213
- let a = this.options.extensions.renderers[i.type].call({ parser: this }, i);
1214
- if (a !== !1 || ![
1215
- "escape",
1216
- "html",
1217
- "link",
1218
- "image",
1219
- "strong",
1220
- "em",
1221
- "codespan",
1222
- "br",
1223
- "del",
1224
- "text"
1225
- ].includes(i.type)) {
1226
- n += a || "";
1227
- continue;
1228
- }
1229
- }
1230
- let s = i;
1231
- switch (s.type) {
1232
- case "escape":
1233
- n += t.text(s);
1234
- break;
1235
- case "html":
1236
- n += t.html(s);
1237
- break;
1238
- case "link":
1239
- n += t.link(s);
1240
- break;
1241
- case "image":
1242
- n += t.image(s);
1243
- break;
1244
- case "checkbox":
1245
- n += t.checkbox(s);
1246
- break;
1247
- case "strong":
1248
- n += t.strong(s);
1249
- break;
1250
- case "em":
1251
- n += t.em(s);
1252
- break;
1253
- case "codespan":
1254
- n += t.codespan(s);
1255
- break;
1256
- case "br":
1257
- n += t.br(s);
1258
- break;
1259
- case "del":
1260
- n += t.del(s);
1261
- break;
1262
- case "text":
1263
- n += t.text(s);
1264
- break;
1265
- default: {
1266
- let a = "Token with \"" + s.type + "\" type was not found.";
1267
- if (this.options.silent) return console.error(a), "";
1268
- throw new Error(a);
1269
- }
1270
- }
1271
- }
1272
- return n;
1273
- }
1274
- };
1275
- var P = (_Class = class {
1276
- constructor(e) {
1277
- _defineProperty(this, "options", void 0);
1278
- _defineProperty(this, "block", void 0);
1279
- this.options = e || T;
1280
- }
1281
- preprocess(e) {
1282
- return e;
1283
- }
1284
- postprocess(e) {
1285
- return e;
1286
- }
1287
- processAllTokens(e) {
1288
- return e;
1289
- }
1290
- emStrongMask(e) {
1291
- return e;
1292
- }
1293
- provideLexer() {
1294
- return this.block ? x.lex : x.lexInline;
1295
- }
1296
- provideParser() {
1297
- return this.block ? b.parse : b.parseInline;
1298
- }
1299
- }, _defineProperty(_Class, "passThroughHooks", new Set([
1300
- "preprocess",
1301
- "postprocess",
1302
- "processAllTokens",
1303
- "emStrongMask"
1304
- ])), _defineProperty(_Class, "passThroughHooksRespectAsync", new Set([
1305
- "preprocess",
1306
- "postprocess",
1307
- "processAllTokens"
1308
- ])), _Class);
1309
- var D = class {
1310
- constructor(...e) {
1311
- _defineProperty(this, "defaults", M());
1312
- _defineProperty(this, "options", this.setOptions);
1313
- _defineProperty(this, "parse", this.parseMarkdown(!0));
1314
- _defineProperty(this, "parseInline", this.parseMarkdown(!1));
1315
- _defineProperty(this, "Parser", b);
1316
- _defineProperty(this, "Renderer", y);
1317
- _defineProperty(this, "TextRenderer", $);
1318
- _defineProperty(this, "Lexer", x);
1319
- _defineProperty(this, "Tokenizer", w);
1320
- _defineProperty(this, "Hooks", P);
1321
- this.use(...e);
1322
- }
1323
- walkTokens(e, t) {
1324
- let n = [];
1325
- for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
1326
- case "table": {
1327
- let i = r;
1328
- for (let s of i.header) n = n.concat(this.walkTokens(s.tokens, t));
1329
- for (let s of i.rows) for (let a of s) n = n.concat(this.walkTokens(a.tokens, t));
1330
- break;
1331
- }
1332
- case "list": {
1333
- let i = r;
1334
- n = n.concat(this.walkTokens(i.items, t));
1335
- break;
1336
- }
1337
- default: {
1338
- let i = r;
1339
- this.defaults.extensions?.childTokens?.[i.type] ? this.defaults.extensions.childTokens[i.type].forEach((s) => {
1340
- let a = i[s].flat(Infinity);
1341
- n = n.concat(this.walkTokens(a, t));
1342
- }) : i.tokens && (n = n.concat(this.walkTokens(i.tokens, t)));
1343
- }
1344
- }
1345
- return n;
1346
- }
1347
- use(...e) {
1348
- let t = this.defaults.extensions || {
1349
- renderers: {},
1350
- childTokens: {}
1351
- };
1352
- return e.forEach((n) => {
1353
- let r = { ...n };
1354
- if (r.async = this.defaults.async || r.async || !1, n.extensions && (n.extensions.forEach((i) => {
1355
- if (!i.name) throw new Error("extension name required");
1356
- if ("renderer" in i) {
1357
- let s = t.renderers[i.name];
1358
- s ? t.renderers[i.name] = function(...a) {
1359
- let o = i.renderer.apply(this, a);
1360
- return o === !1 && (o = s.apply(this, a)), o;
1361
- } : t.renderers[i.name] = i.renderer;
1362
- }
1363
- if ("tokenizer" in i) {
1364
- if (!i.level || i.level !== "block" && i.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
1365
- let s = t[i.level];
1366
- s ? s.unshift(i.tokenizer) : t[i.level] = [i.tokenizer], i.start && (i.level === "block" ? t.startBlock ? t.startBlock.push(i.start) : t.startBlock = [i.start] : i.level === "inline" && (t.startInline ? t.startInline.push(i.start) : t.startInline = [i.start]));
1367
- }
1368
- "childTokens" in i && i.childTokens && (t.childTokens[i.name] = i.childTokens);
1369
- }), r.extensions = t), n.renderer) {
1370
- let i = this.defaults.renderer || new y(this.defaults);
1371
- for (let s in n.renderer) {
1372
- if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
1373
- if (["options", "parser"].includes(s)) continue;
1374
- let a = s, o = n.renderer[a], l = i[a];
1375
- i[a] = (...p) => {
1376
- let c = o.apply(i, p);
1377
- return c === !1 && (c = l.apply(i, p)), c || "";
1378
- };
1379
- }
1380
- r.renderer = i;
1381
- }
1382
- if (n.tokenizer) {
1383
- let i = this.defaults.tokenizer || new w(this.defaults);
1384
- for (let s in n.tokenizer) {
1385
- if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
1386
- if ([
1387
- "options",
1388
- "rules",
1389
- "lexer"
1390
- ].includes(s)) continue;
1391
- let a = s, o = n.tokenizer[a], l = i[a];
1392
- i[a] = (...p) => {
1393
- let c = o.apply(i, p);
1394
- return c === !1 && (c = l.apply(i, p)), c;
1395
- };
1396
- }
1397
- r.tokenizer = i;
1398
- }
1399
- if (n.hooks) {
1400
- let i = this.defaults.hooks || new P();
1401
- for (let s in n.hooks) {
1402
- if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
1403
- if (["options", "block"].includes(s)) continue;
1404
- let a = s, o = n.hooks[a], l = i[a];
1405
- P.passThroughHooks.has(s) ? i[a] = (p) => {
1406
- if (this.defaults.async && P.passThroughHooksRespectAsync.has(s)) return (async () => {
1407
- let d = await o.call(i, p);
1408
- return l.call(i, d);
1409
- })();
1410
- let c = o.call(i, p);
1411
- return l.call(i, c);
1412
- } : i[a] = (...p) => {
1413
- if (this.defaults.async) return (async () => {
1414
- let d = await o.apply(i, p);
1415
- return d === !1 && (d = await l.apply(i, p)), d;
1416
- })();
1417
- let c = o.apply(i, p);
1418
- return c === !1 && (c = l.apply(i, p)), c;
1419
- };
1420
- }
1421
- r.hooks = i;
1422
- }
1423
- if (n.walkTokens) {
1424
- let i = this.defaults.walkTokens, s = n.walkTokens;
1425
- r.walkTokens = function(a) {
1426
- let o = [];
1427
- return o.push(s.call(this, a)), i && (o = o.concat(i.call(this, a))), o;
1428
- };
1429
- }
1430
- this.defaults = {
1431
- ...this.defaults,
1432
- ...r
1433
- };
1434
- }), this;
1435
- }
1436
- setOptions(e) {
1437
- return this.defaults = {
1438
- ...this.defaults,
1439
- ...e
1440
- }, this;
1441
- }
1442
- lexer(e, t) {
1443
- return x.lex(e, t ?? this.defaults);
1444
- }
1445
- parser(e, t) {
1446
- return b.parse(e, t ?? this.defaults);
1447
- }
1448
- parseMarkdown(e) {
1449
- return (n, r) => {
1450
- let i = { ...r }, s = {
1451
- ...this.defaults,
1452
- ...i
1453
- }, a = this.onError(!!s.silent, !!s.async);
1454
- if (this.defaults.async === !0 && i.async === !1) return a(/* @__PURE__ */ new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
1455
- if (typeof n > "u" || n === null) return a(/* @__PURE__ */ new Error("marked(): input parameter is undefined or null"));
1456
- if (typeof n != "string") return a(/* @__PURE__ */ new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
1457
- if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
1458
- let o = s.hooks ? await s.hooks.preprocess(n) : n, p = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(p) : p;
1459
- s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
1460
- let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
1461
- return s.hooks ? await s.hooks.postprocess(h) : h;
1462
- })().catch(a);
1463
- try {
1464
- s.hooks && (n = s.hooks.preprocess(n));
1465
- let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
1466
- s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
1467
- let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
1468
- return s.hooks && (c = s.hooks.postprocess(c)), c;
1469
- } catch (o) {
1470
- return a(o);
1471
- }
1472
- };
1473
- }
1474
- onError(e, t) {
1475
- return (n) => {
1476
- if (n.message += `
1477
- Please report this to https://github.com/markedjs/marked.`, e) {
1478
- let r = "<p>An error occurred:</p><pre>" + O(n.message + "", !0) + "</pre>";
1479
- return t ? Promise.resolve(r) : r;
1480
- }
1481
- if (t) return Promise.reject(n);
1482
- throw n;
1483
- };
1484
- }
1485
- };
1486
- var L = new D();
1487
- function g(u, e) {
1488
- return L.parse(u, e);
1489
- }
1490
- g.options = g.setOptions = function(u) {
1491
- return L.setOptions(u), g.defaults = L.defaults, G(g.defaults), g;
1492
- };
1493
- g.getDefaults = M;
1494
- g.defaults = T;
1495
- g.use = function(...u) {
1496
- return L.use(...u), g.defaults = L.defaults, G(g.defaults), g;
1497
- };
1498
- g.walkTokens = function(u, e) {
1499
- return L.walkTokens(u, e);
1500
- };
1501
- g.parseInline = L.parseInline;
1502
- g.Parser = b;
1503
- g.parser = b.parse;
1504
- g.Renderer = y;
1505
- g.TextRenderer = $;
1506
- g.Lexer = x;
1507
- g.lexer = x.lex;
1508
- g.Tokenizer = w;
1509
- g.Hooks = P;
1510
- g.parse = g;
1511
- g.options;
1512
- g.setOptions;
1513
- g.use;
1514
- g.walkTokens;
1515
- g.parseInline;
1516
- b.parse;
1517
- x.lex;
1518
- //#endregion
1519
- //#region src/shared/richText/richText.tsx
1520
- function normalizeAnchorSpacing(content) {
1521
- return content.replace(/([^\s>])(<a\b)/gu, "$1\xA0$2").replace(/(<\/a>)([\p{L}\p{N}])/gu, "$1\xA0$2");
1522
- }
1523
- function decorateHtml(content) {
1524
- const doc = new DOMParser().parseFromString(content, "text/html");
1525
- for (const element of Array.from(doc.body.querySelectorAll("*"))) for (const attribute of Array.from(element.attributes)) if (attribute.name.startsWith("on")) element.removeAttribute(attribute.name);
1526
- const anchors = Array.from(doc.querySelectorAll("a"));
1527
- for (const anchor of anchors) {
1528
- anchor.setAttribute("target", "_blank");
1529
- anchor.setAttribute("rel", "noopener noreferrer");
1530
- }
1531
- return doc.body.innerHTML;
1532
- }
1533
- function sanitizeHtml(content, disallowedTags) {
1534
- const normalizedContent = normalizeAnchorSpacing(content);
1535
- const parsed = g.parse(normalizedContent);
1536
- return decorateHtml(purify.sanitize(parsed, { FORBID_TAGS: disallowedTags }));
1537
- }
1538
- function RichText({ content, class: className, disallowedTags = [] }) {
1539
- if (!content) return null;
1540
- return /* @__PURE__ */ u("div", {
1541
- class: className,
1542
- children: /* @__PURE__ */ u("div", {
1543
- class: "IncodeRichTextMarkup",
1544
- dangerouslySetInnerHTML: { __html: sanitizeHtml(content, disallowedTags) }
1545
- })
1546
- });
1547
- }
1548
- //#endregion
1549
- export { RichText as t };