@peculiar/certificates-viewer 4.3.2 → 4.4.0

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 (444) hide show
  1. package/components/actions.js +1 -0
  2. package/components/actions.js.map +1 -1
  3. package/components/arrow_top.js +1 -0
  4. package/components/arrow_top.js.map +1 -1
  5. package/components/attribute-certificate-viewer.js +20 -19
  6. package/components/attribute-certificate-viewer.js.map +1 -1
  7. package/components/attribute.js +4 -3
  8. package/components/attribute.js.map +1 -1
  9. package/components/button-menu.js +4 -4
  10. package/components/button-menu.js.map +1 -1
  11. package/components/button.js +1 -0
  12. package/components/button.js.map +1 -1
  13. package/components/certificate-chain-viewer.js +2 -4
  14. package/components/certificate-chain-viewer.js.map +1 -1
  15. package/components/certificate-viewer.js +18 -18
  16. package/components/certificate-viewer.js.map +1 -1
  17. package/components/circular-progress.js +9 -3
  18. package/components/circular-progress.js.map +1 -1
  19. package/components/crl-viewer.js +19 -17
  20. package/components/crl-viewer.js.map +1 -1
  21. package/components/cross.js +1 -0
  22. package/components/cross.js.map +1 -1
  23. package/components/csr-viewer.js +13 -10
  24. package/components/csr-viewer.js.map +1 -1
  25. package/components/download.js +943 -1585
  26. package/components/download.js.map +1 -1
  27. package/components/highlight-words.js +2 -3
  28. package/components/highlight-words.js.map +1 -1
  29. package/components/index.js +1 -0
  30. package/components/index2.js +4 -3
  31. package/components/index2.js.map +1 -1
  32. package/components/issuer_name.js +2 -1
  33. package/components/issuer_name.js.map +1 -1
  34. package/components/miscellaneous.js +21 -20
  35. package/components/miscellaneous.js.map +1 -1
  36. package/components/peculiar-attribute-certificate-viewer.js +1 -0
  37. package/components/peculiar-button-menu.js +1 -0
  38. package/components/peculiar-certificate-chain-viewer.js +1 -0
  39. package/components/peculiar-certificate-decoder.js +4 -7
  40. package/components/peculiar-certificate-decoder.js.map +1 -1
  41. package/components/peculiar-certificate-viewer.js +1 -0
  42. package/components/peculiar-certificates-viewer.js +34 -13
  43. package/components/peculiar-certificates-viewer.js.map +1 -1
  44. package/components/peculiar-circular-progress.js +1 -0
  45. package/components/peculiar-crl-viewer.js +1 -0
  46. package/components/peculiar-csr-viewer.js +1 -0
  47. package/components/peculiar-highlight-words.js +1 -0
  48. package/components/peculiar-text-hider.js +2 -2
  49. package/components/peculiar-text-hider.js.map +1 -1
  50. package/components/pkcs10_certificate_request.js +5 -4
  51. package/components/pkcs10_certificate_request.js.map +1 -1
  52. package/components/read_file.js +1 -0
  53. package/components/read_file.js.map +1 -1
  54. package/components/subject_name.js +4 -3
  55. package/components/subject_name.js.map +1 -1
  56. package/dist/cjs/{actions-64ce3326.js → actions-Dl4HXXlI.js} +3 -2
  57. package/dist/cjs/actions-Dl4HXXlI.js.map +1 -0
  58. package/dist/cjs/{app-globals-c20ffa41.js → app-globals-BOZYdIuK.js} +2 -1
  59. package/dist/cjs/app-globals-BOZYdIuK.js.map +1 -0
  60. package/dist/cjs/{arrow_top-b9b9f280.js → arrow_top-DBMPHVlB.js} +3 -2
  61. package/dist/cjs/arrow_top-DBMPHVlB.js.map +1 -0
  62. package/dist/cjs/{button-61bb8305.js → button-C5jDF-CZ.js} +3 -2
  63. package/dist/cjs/button-C5jDF-CZ.js.map +1 -0
  64. package/dist/cjs/{certification_request-393a843d.js → certification_request-Bipg1Az7.js} +944 -1587
  65. package/dist/cjs/certification_request-Bipg1Az7.js.map +1 -0
  66. package/dist/cjs/{cross-3aeffd04.js → cross-pi7K0cHC.js} +3 -2
  67. package/dist/cjs/cross-pi7K0cHC.js.map +1 -0
  68. package/dist/cjs/{download-c2836546.js → download-D9skkVoT.js} +3 -2
  69. package/dist/cjs/download-D9skkVoT.js.map +1 -0
  70. package/dist/cjs/{index-484a84a0.js → index-BO3rFndV.js} +1356 -1168
  71. package/dist/cjs/index-BO3rFndV.js.map +1 -0
  72. package/dist/cjs/index.cjs.js +11 -12
  73. package/dist/cjs/index.cjs.js.map +1 -1
  74. package/dist/cjs/{link-dad7195a.js → link-CwLq-Nge.js} +4 -3
  75. package/dist/cjs/link-CwLq-Nge.js.map +1 -0
  76. package/dist/cjs/loader.cjs.js +4 -5
  77. package/dist/cjs/loader.cjs.js.map +1 -1
  78. package/dist/cjs/{miscellaneous-ca06fb81.js → miscellaneous-C0sOAo-1.js} +25 -24
  79. package/dist/cjs/miscellaneous-C0sOAo-1.js.map +1 -0
  80. package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.cjs.js.map +1 -0
  81. package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js +47 -48
  82. package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js.map +1 -1
  83. package/dist/cjs/peculiar-button-menu.peculiar-circular-progress.peculiar-highlight-words.entry.cjs.js.map +1 -0
  84. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +16 -15
  85. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js.map +1 -1
  86. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +12 -17
  87. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
  88. package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -0
  89. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +19 -21
  90. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
  91. package/dist/cjs/peculiar-certificate-viewer.entry.cjs.js.map +1 -0
  92. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +42 -23
  93. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
  94. package/dist/cjs/peculiar-certificates-viewer.entry.cjs.js.map +1 -0
  95. package/dist/cjs/peculiar-text-hider.cjs.entry.js +5 -7
  96. package/dist/cjs/peculiar-text-hider.cjs.entry.js.map +1 -1
  97. package/dist/cjs/peculiar-text-hider.entry.cjs.js.map +1 -0
  98. package/dist/cjs/peculiar.cjs.js +8 -7
  99. package/dist/cjs/peculiar.cjs.js.map +1 -1
  100. package/dist/cjs/{pkcs10_certificate_request-56990e4f.js → pkcs10_certificate_request-BDz0P_px.js} +8 -7
  101. package/dist/cjs/pkcs10_certificate_request-BDz0P_px.js.map +1 -0
  102. package/dist/cjs/{read_file-2e22a97e.js → read_file-DWtcn3zU.js} +2 -1
  103. package/dist/cjs/read_file-DWtcn3zU.js.map +1 -0
  104. package/dist/cjs/{x509_certificate-d162984c.js → x509_certificate-DRvXOszL.js} +7 -6
  105. package/dist/cjs/x509_certificate-DRvXOszL.js.map +1 -0
  106. package/dist/cjs/{x509_crl-13322e13.js → x509_crl-DVGVym_S.js} +11 -10
  107. package/dist/cjs/x509_crl-DVGVym_S.js.map +1 -0
  108. package/dist/collection/collection-manifest.json +1 -1
  109. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +10 -9
  110. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js.map +1 -1
  111. package/dist/collection/components/button-menu/button-menu.js +2 -2
  112. package/dist/collection/components/button-menu/button-menu.js.map +1 -1
  113. package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.js +0 -2
  114. package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.js.map +1 -1
  115. package/dist/collection/components/certificate-decoder/certificate-decoder.js +0 -3
  116. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
  117. package/dist/collection/components/certificate-viewer/certificate-viewer.js +10 -10
  118. package/dist/collection/components/certificate-viewer/certificate-viewer.js.map +1 -1
  119. package/dist/collection/components/certificates-viewer/certificates-viewer.js +31 -10
  120. package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -1
  121. package/dist/collection/components/circular-progress/circular-progress.js +7 -1
  122. package/dist/collection/components/circular-progress/circular-progress.js.map +1 -1
  123. package/dist/collection/components/crl-viewer/crl-viewer.js +10 -8
  124. package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -1
  125. package/dist/collection/components/csr-viewer/csr-viewer.js +10 -7
  126. package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
  127. package/dist/collection/components/highlight-words/highlight-words.js +0 -1
  128. package/dist/collection/components/highlight-words/highlight-words.js.map +1 -1
  129. package/dist/collection/components/text-hider/text-hider.js.map +1 -1
  130. package/dist/collection/constants/oids.js +3 -0
  131. package/dist/collection/constants/oids.js.map +1 -1
  132. package/dist/esm/{actions-2e39a3b9.js → actions-DzoPRObK.js} +3 -2
  133. package/dist/esm/actions-DzoPRObK.js.map +1 -0
  134. package/dist/esm/{app-globals-5e9b67e0.js → app-globals-zVR349KA.js} +2 -1
  135. package/dist/esm/app-globals-zVR349KA.js.map +1 -0
  136. package/dist/esm/{arrow_top-72c7543a.js → arrow_top-CF9pv-tQ.js} +3 -2
  137. package/dist/esm/arrow_top-CF9pv-tQ.js.map +1 -0
  138. package/dist/esm/{button-e0909687.js → button-Djn8UI82.js} +3 -2
  139. package/dist/esm/button-Djn8UI82.js.map +1 -0
  140. package/dist/esm/{certification_request-714bd438.js → certification_request-BTbyumBe.js} +944 -1586
  141. package/dist/esm/certification_request-BTbyumBe.js.map +1 -0
  142. package/dist/esm/{cross-0c62835f.js → cross-DdCuR1F2.js} +3 -2
  143. package/dist/esm/cross-DdCuR1F2.js.map +1 -0
  144. package/dist/esm/{download-5686d86f.js → download-Cqfc-Sxf.js} +3 -2
  145. package/dist/esm/download-Cqfc-Sxf.js.map +1 -0
  146. package/dist/esm/{index-38365508.js → index-DDDrq3In.js} +1354 -1146
  147. package/dist/esm/index-DDDrq3In.js.map +1 -0
  148. package/dist/esm/index.js +11 -10
  149. package/dist/esm/index.js.map +1 -1
  150. package/dist/esm/{link-09718951.js → link-BfDk078v.js} +4 -3
  151. package/dist/esm/link-BfDk078v.js.map +1 -0
  152. package/dist/esm/loader.js +5 -4
  153. package/dist/esm/loader.js.map +1 -1
  154. package/dist/esm/{miscellaneous-0657d00e.js → miscellaneous-CGtCg3Q9.js} +27 -26
  155. package/dist/esm/miscellaneous-CGtCg3Q9.js.map +1 -0
  156. package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +1 -0
  157. package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js +48 -47
  158. package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js.map +1 -1
  159. package/dist/esm/peculiar-button-menu.peculiar-circular-progress.peculiar-highlight-words.entry.js.map +1 -0
  160. package/dist/esm/peculiar-button-menu_3.entry.js +16 -13
  161. package/dist/esm/peculiar-button-menu_3.entry.js.map +1 -1
  162. package/dist/esm/peculiar-certificate-decoder.entry.js +12 -15
  163. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
  164. package/dist/esm/peculiar-certificate-viewer.entry.js +19 -19
  165. package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
  166. package/dist/esm/peculiar-certificates-viewer.entry.js +42 -21
  167. package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
  168. package/dist/esm/peculiar-text-hider.entry.js +5 -5
  169. package/dist/esm/peculiar-text-hider.entry.js.map +1 -1
  170. package/dist/esm/peculiar.js +7 -5
  171. package/dist/esm/peculiar.js.map +1 -1
  172. package/dist/esm/{pkcs10_certificate_request-d3871050.js → pkcs10_certificate_request-CrA_WcgY.js} +8 -7
  173. package/dist/esm/pkcs10_certificate_request-CrA_WcgY.js.map +1 -0
  174. package/dist/esm/{read_file-bb0b1450.js → read_file-F2F0McJX.js} +2 -1
  175. package/dist/esm/read_file-F2F0McJX.js.map +1 -0
  176. package/dist/esm/{x509_certificate-d0d0c5c1.js → x509_certificate-DX7sKoAD.js} +7 -6
  177. package/dist/esm/x509_certificate-DX7sKoAD.js.map +1 -0
  178. package/dist/esm/{x509_crl-e837f4c3.js → x509_crl-DRjoh8Yp.js} +11 -10
  179. package/dist/esm/x509_crl-DRjoh8Yp.js.map +1 -0
  180. package/dist/esm-es5/{actions-2e39a3b9.js → actions-DzoPRObK.js} +2 -2
  181. package/dist/esm-es5/actions-DzoPRObK.js.map +1 -0
  182. package/dist/esm-es5/{app-globals-5e9b67e0.js → app-globals-zVR349KA.js} +1 -1
  183. package/dist/esm-es5/app-globals-zVR349KA.js.map +1 -0
  184. package/dist/esm-es5/{arrow_top-72c7543a.js → arrow_top-CF9pv-tQ.js} +2 -2
  185. package/dist/esm-es5/arrow_top-CF9pv-tQ.js.map +1 -0
  186. package/dist/esm-es5/{button-e0909687.js → button-Djn8UI82.js} +2 -2
  187. package/dist/esm-es5/button-Djn8UI82.js.map +1 -0
  188. package/dist/esm-es5/certification_request-BTbyumBe.js +142 -0
  189. package/dist/esm-es5/certification_request-BTbyumBe.js.map +1 -0
  190. package/dist/esm-es5/{cross-0c62835f.js → cross-DdCuR1F2.js} +2 -2
  191. package/dist/esm-es5/cross-DdCuR1F2.js.map +1 -0
  192. package/dist/esm-es5/{download-5686d86f.js → download-Cqfc-Sxf.js} +2 -2
  193. package/dist/esm-es5/download-Cqfc-Sxf.js.map +1 -0
  194. package/dist/esm-es5/index-DDDrq3In.js +6 -0
  195. package/dist/esm-es5/index-DDDrq3In.js.map +1 -0
  196. package/dist/esm-es5/index.js +1 -1
  197. package/dist/esm-es5/index.js.map +1 -1
  198. package/dist/esm-es5/link-BfDk078v.js +12 -0
  199. package/dist/esm-es5/link-BfDk078v.js.map +1 -0
  200. package/dist/esm-es5/loader.js +1 -1
  201. package/dist/esm-es5/loader.js.map +1 -1
  202. package/dist/esm-es5/{miscellaneous-0657d00e.js → miscellaneous-CGtCg3Q9.js} +15 -15
  203. package/dist/esm-es5/miscellaneous-CGtCg3Q9.js.map +1 -0
  204. package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +1 -0
  205. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js +5 -5
  206. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js.map +1 -1
  207. package/dist/esm-es5/peculiar-button-menu.peculiar-circular-progress.peculiar-highlight-words.entry.js.map +1 -0
  208. package/dist/esm-es5/peculiar-button-menu_3.entry.js +1 -1
  209. package/dist/esm-es5/peculiar-button-menu_3.entry.js.map +1 -1
  210. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +1 -1
  211. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
  212. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +2 -2
  213. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
  214. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +2 -2
  215. package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -1
  216. package/dist/esm-es5/peculiar-text-hider.entry.js +1 -1
  217. package/dist/esm-es5/peculiar-text-hider.entry.js.map +1 -1
  218. package/dist/esm-es5/peculiar.js +2 -2
  219. package/dist/esm-es5/peculiar.js.map +1 -1
  220. package/dist/esm-es5/pkcs10_certificate_request-CrA_WcgY.js +19 -0
  221. package/dist/esm-es5/pkcs10_certificate_request-CrA_WcgY.js.map +1 -0
  222. package/dist/esm-es5/{read_file-bb0b1450.js → read_file-F2F0McJX.js} +1 -1
  223. package/dist/esm-es5/read_file-F2F0McJX.js.map +1 -0
  224. package/dist/esm-es5/x509_certificate-DX7sKoAD.js +12 -0
  225. package/dist/esm-es5/x509_certificate-DX7sKoAD.js.map +1 -0
  226. package/dist/esm-es5/x509_crl-DRjoh8Yp.js +19 -0
  227. package/dist/esm-es5/x509_crl-DRjoh8Yp.js.map +1 -0
  228. package/dist/peculiar/index.esm.js +1 -1
  229. package/dist/peculiar/index.esm.js.map +1 -1
  230. package/dist/peculiar/loader.esm.js.map +1 -0
  231. package/dist/peculiar/p-092074e8.system.entry.js +5 -0
  232. package/dist/peculiar/p-092074e8.system.entry.js.map +1 -0
  233. package/dist/peculiar/p-12d2e080.entry.js +5 -0
  234. package/dist/peculiar/p-12d2e080.entry.js.map +1 -0
  235. package/dist/peculiar/p-1af57833.system.entry.js +5 -0
  236. package/dist/peculiar/p-1af57833.system.entry.js.map +1 -0
  237. package/dist/peculiar/p-1b3855ec.system.entry.js +111 -0
  238. package/dist/peculiar/p-1b3855ec.system.entry.js.map +1 -0
  239. package/dist/peculiar/p-4IvcYmU7.js +19 -0
  240. package/dist/peculiar/p-4IvcYmU7.js.map +1 -0
  241. package/dist/peculiar/{p-04228f9c.system.entry.js → p-73a75d1e.system.entry.js} +3 -3
  242. package/dist/peculiar/p-73a75d1e.system.entry.js.map +1 -0
  243. package/dist/peculiar/p-7Nmqck4T.system.js.map +1 -0
  244. package/dist/peculiar/p-80fc5538.entry.js +5 -0
  245. package/dist/peculiar/p-80fc5538.entry.js.map +1 -0
  246. package/dist/peculiar/{p-6eb92f5a.entry.js → p-85667993.entry.js} +2 -2
  247. package/dist/peculiar/p-85667993.entry.js.map +1 -0
  248. package/dist/peculiar/p-B0CjUC4o.system.js +142 -0
  249. package/dist/peculiar/p-B0CjUC4o.system.js.map +1 -0
  250. package/dist/peculiar/{p-d46670fa.system.js → p-B2YrZuK2.system.js} +2 -2
  251. package/dist/peculiar/p-B2YrZuK2.system.js.map +1 -0
  252. package/dist/peculiar/{p-c5d3333c.system.js → p-B7TxZGea.system.js} +4 -4
  253. package/dist/{esm/pkcs10_certificate_request-d3871050.js.map → peculiar/p-B7TxZGea.system.js.map} +1 -1
  254. package/dist/peculiar/{p-9ca02302.system.js → p-B859JpGw.system.js} +3 -3
  255. package/dist/peculiar/p-B859JpGw.system.js.map +1 -0
  256. package/dist/peculiar/{p-a3054d6e.system.js → p-BBgwMHRZ.system.js} +3 -3
  257. package/dist/peculiar/p-BBgwMHRZ.system.js.map +1 -0
  258. package/dist/peculiar/{p-9987b899.js → p-BCATfe_H.js} +2 -2
  259. package/dist/peculiar/p-BCATfe_H.js.map +1 -0
  260. package/dist/peculiar/p-BFenL1ap.system.js +6 -0
  261. package/dist/peculiar/p-BFenL1ap.system.js.map +1 -0
  262. package/dist/peculiar/{p-562652dd.js → p-BHBizfwo.js} +3 -3
  263. package/dist/peculiar/p-BHBizfwo.js.map +1 -0
  264. package/dist/peculiar/{p-02529999.system.js → p-BOSH9vjy.system.js} +3 -3
  265. package/dist/{esm-es5/actions-2e39a3b9.js.map → peculiar/p-BOSH9vjy.system.js.map} +1 -1
  266. package/dist/peculiar/{p-4ee5beee.system.js → p-BP2bmYR2.system.js} +3 -3
  267. package/dist/peculiar/p-BP2bmYR2.system.js.map +1 -0
  268. package/dist/peculiar/{p-d9145ee8.system.js → p-BRhx1gbw.system.js} +4 -4
  269. package/dist/peculiar/p-BRhx1gbw.system.js.map +1 -0
  270. package/dist/peculiar/p-BTbyumBe.js +142 -0
  271. package/dist/peculiar/p-BTbyumBe.js.map +1 -0
  272. package/dist/peculiar/p-BX9qW3ww.system.js.map +1 -0
  273. package/dist/peculiar/p-BbPo3hge.system.js.map +1 -0
  274. package/dist/peculiar/p-BisXzAqN.js +12 -0
  275. package/dist/peculiar/p-BisXzAqN.js.map +1 -0
  276. package/dist/peculiar/p-Bw_icgVx.js +19 -0
  277. package/dist/peculiar/p-Bw_icgVx.js.map +1 -0
  278. package/dist/peculiar/p-C_7Koml8.system.js.map +1 -0
  279. package/dist/peculiar/{p-ba3dfc03.js → p-CeKqQ13Z.js} +4 -4
  280. package/dist/peculiar/p-CeKqQ13Z.js.map +1 -0
  281. package/dist/peculiar/p-CpTwQbPC.js +12 -0
  282. package/dist/peculiar/p-CpTwQbPC.js.map +1 -0
  283. package/dist/peculiar/p-Ct0zEUB_.js +369 -0
  284. package/dist/peculiar/p-Ct0zEUB_.js.map +1 -0
  285. package/dist/peculiar/{p-c2995a63.system.js → p-CwlxH4oM.system.js} +1 -1
  286. package/dist/peculiar/p-CwlxH4oM.system.js.map +1 -0
  287. package/dist/peculiar/p-D13P_msn.system.js.map +1 -0
  288. package/dist/peculiar/{p-55303453.system.js → p-D2QB-8Q6.system.js} +1 -1
  289. package/dist/peculiar/p-D2QB-8Q6.system.js.map +1 -0
  290. package/dist/peculiar/p-D5BWI7FK.system.js +5 -0
  291. package/dist/peculiar/p-D5BWI7FK.system.js.map +1 -0
  292. package/dist/peculiar/p-DDDrq3In.js +6 -0
  293. package/dist/peculiar/p-DDDrq3In.js.map +1 -0
  294. package/dist/peculiar/{p-90c3a063.js → p-DhdG07f8.js} +2 -2
  295. package/dist/peculiar/p-DhdG07f8.js.map +1 -0
  296. package/dist/peculiar/{p-92f9641a.js → p-DkAhB3Vy.js} +2 -2
  297. package/dist/peculiar/p-DkAhB3Vy.js.map +1 -0
  298. package/dist/peculiar/p-DxdVL_Kj.system.js +13 -0
  299. package/dist/peculiar/p-DxdVL_Kj.system.js.map +1 -0
  300. package/dist/peculiar/{p-25a532a3.js → p-F2F0McJX.js} +1 -1
  301. package/dist/peculiar/p-F2F0McJX.js.map +1 -0
  302. package/dist/peculiar/p-FVz6FuoZ.system.js.map +1 -0
  303. package/dist/peculiar/p-RW7UbzcZ.system.js.map +1 -0
  304. package/dist/peculiar/p-ab220e36.system.entry.js +5 -0
  305. package/dist/peculiar/p-ab220e36.system.entry.js.map +1 -0
  306. package/dist/peculiar/{p-b01c70cf.entry.js → p-c2a805b3.entry.js} +3 -3
  307. package/dist/peculiar/p-c2a805b3.entry.js.map +1 -0
  308. package/dist/peculiar/p-cae95996.system.entry.js +5 -0
  309. package/dist/peculiar/p-cae95996.system.entry.js.map +1 -0
  310. package/dist/peculiar/p-e7266b0a.entry.js +110 -0
  311. package/dist/peculiar/p-e7266b0a.entry.js.map +1 -0
  312. package/dist/peculiar/p-f4490197.entry.js +5 -0
  313. package/dist/peculiar/p-f4490197.entry.js.map +1 -0
  314. package/dist/peculiar/{p-a9ea6c79.system.js → p-lnQq6VON.system.js} +4 -4
  315. package/dist/peculiar/p-lnQq6VON.system.js.map +1 -0
  316. package/dist/peculiar/{p-35cd359e.system.js → p-vMACJe_C.system.js} +54 -54
  317. package/dist/peculiar/{p-90f461c0.js.map → p-vMACJe_C.system.js.map} +1 -1
  318. package/dist/peculiar/p-wgYkE8CV.system.js +5 -0
  319. package/dist/peculiar/p-wgYkE8CV.system.js.map +1 -0
  320. package/dist/peculiar/{p-dac867e8.js → p-zVR349KA.js} +1 -1
  321. package/dist/peculiar/p-zVR349KA.js.map +1 -0
  322. package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.esm.js.map +1 -0
  323. package/dist/peculiar/peculiar-button-menu.peculiar-circular-progress.peculiar-highlight-words.entry.esm.js.map +1 -0
  324. package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -0
  325. package/dist/peculiar/peculiar-certificate-viewer.entry.esm.js.map +1 -0
  326. package/dist/peculiar/peculiar-certificates-viewer.entry.esm.js.map +1 -0
  327. package/dist/peculiar/{p-39bbe0b9.system.entry.js.map → peculiar-text-hider.entry.esm.js.map} +1 -1
  328. package/dist/peculiar/peculiar.esm.js +1 -1
  329. package/dist/peculiar/peculiar.esm.js.map +1 -1
  330. package/dist/peculiar/peculiar.js +1 -1
  331. package/dist/types/constants/oids.d.ts +3 -0
  332. package/dist/types/stencil-public-runtime.d.ts +1 -0
  333. package/hydrate/index.d.ts +22 -5
  334. package/hydrate/index.js +2848 -3022
  335. package/hydrate/index.mjs +2848 -3020
  336. package/package.json +23 -23
  337. package/dist/cjs/actions-64ce3326.js.map +0 -1
  338. package/dist/cjs/app-globals-c20ffa41.js.map +0 -1
  339. package/dist/cjs/arrow_top-b9b9f280.js.map +0 -1
  340. package/dist/cjs/button-61bb8305.js.map +0 -1
  341. package/dist/cjs/certification_request-393a843d.js.map +0 -1
  342. package/dist/cjs/cross-3aeffd04.js.map +0 -1
  343. package/dist/cjs/download-c2836546.js.map +0 -1
  344. package/dist/cjs/index-484a84a0.js.map +0 -1
  345. package/dist/cjs/link-dad7195a.js.map +0 -1
  346. package/dist/cjs/miscellaneous-ca06fb81.js.map +0 -1
  347. package/dist/cjs/pkcs10_certificate_request-56990e4f.js.map +0 -1
  348. package/dist/cjs/read_file-2e22a97e.js.map +0 -1
  349. package/dist/cjs/x509_certificate-d162984c.js.map +0 -1
  350. package/dist/cjs/x509_crl-13322e13.js.map +0 -1
  351. package/dist/esm/actions-2e39a3b9.js.map +0 -1
  352. package/dist/esm/app-globals-5e9b67e0.js.map +0 -1
  353. package/dist/esm/arrow_top-72c7543a.js.map +0 -1
  354. package/dist/esm/button-e0909687.js.map +0 -1
  355. package/dist/esm/certification_request-714bd438.js.map +0 -1
  356. package/dist/esm/cross-0c62835f.js.map +0 -1
  357. package/dist/esm/download-5686d86f.js.map +0 -1
  358. package/dist/esm/index-38365508.js.map +0 -1
  359. package/dist/esm/link-09718951.js.map +0 -1
  360. package/dist/esm/miscellaneous-0657d00e.js.map +0 -1
  361. package/dist/esm/read_file-bb0b1450.js.map +0 -1
  362. package/dist/esm/x509_certificate-d0d0c5c1.js.map +0 -1
  363. package/dist/esm/x509_crl-e837f4c3.js.map +0 -1
  364. package/dist/esm-es5/app-globals-5e9b67e0.js.map +0 -1
  365. package/dist/esm-es5/arrow_top-72c7543a.js.map +0 -1
  366. package/dist/esm-es5/button-e0909687.js.map +0 -1
  367. package/dist/esm-es5/certification_request-714bd438.js +0 -142
  368. package/dist/esm-es5/certification_request-714bd438.js.map +0 -1
  369. package/dist/esm-es5/cross-0c62835f.js.map +0 -1
  370. package/dist/esm-es5/download-5686d86f.js.map +0 -1
  371. package/dist/esm-es5/index-38365508.js +0 -6
  372. package/dist/esm-es5/index-38365508.js.map +0 -1
  373. package/dist/esm-es5/link-09718951.js +0 -12
  374. package/dist/esm-es5/link-09718951.js.map +0 -1
  375. package/dist/esm-es5/miscellaneous-0657d00e.js.map +0 -1
  376. package/dist/esm-es5/pkcs10_certificate_request-d3871050.js +0 -19
  377. package/dist/esm-es5/pkcs10_certificate_request-d3871050.js.map +0 -1
  378. package/dist/esm-es5/read_file-bb0b1450.js.map +0 -1
  379. package/dist/esm-es5/x509_certificate-d0d0c5c1.js +0 -12
  380. package/dist/esm-es5/x509_certificate-d0d0c5c1.js.map +0 -1
  381. package/dist/esm-es5/x509_crl-e837f4c3.js +0 -19
  382. package/dist/esm-es5/x509_crl-e837f4c3.js.map +0 -1
  383. package/dist/peculiar/p-02529999.system.js.map +0 -1
  384. package/dist/peculiar/p-04228f9c.system.entry.js.map +0 -1
  385. package/dist/peculiar/p-12bc3ebc.system.entry.js +0 -5
  386. package/dist/peculiar/p-12bc3ebc.system.entry.js.map +0 -1
  387. package/dist/peculiar/p-161f7f97.entry.js +0 -5
  388. package/dist/peculiar/p-161f7f97.entry.js.map +0 -1
  389. package/dist/peculiar/p-25a532a3.js.map +0 -1
  390. package/dist/peculiar/p-32cf293c.system.js +0 -5
  391. package/dist/peculiar/p-32cf293c.system.js.map +0 -1
  392. package/dist/peculiar/p-35cd359e.system.js.map +0 -1
  393. package/dist/peculiar/p-39bbe0b9.system.entry.js +0 -5
  394. package/dist/peculiar/p-41eacbcd.system.entry.js +0 -111
  395. package/dist/peculiar/p-41eacbcd.system.entry.js.map +0 -1
  396. package/dist/peculiar/p-47b7dd9e.entry.js +0 -110
  397. package/dist/peculiar/p-47b7dd9e.entry.js.map +0 -1
  398. package/dist/peculiar/p-4ee5beee.system.js.map +0 -1
  399. package/dist/peculiar/p-55303453.system.js.map +0 -1
  400. package/dist/peculiar/p-562652dd.js.map +0 -1
  401. package/dist/peculiar/p-5b4db88b.system.js +0 -5
  402. package/dist/peculiar/p-5b4db88b.system.js.map +0 -1
  403. package/dist/peculiar/p-67452b74.system.entry.js +0 -5
  404. package/dist/peculiar/p-67452b74.system.entry.js.map +0 -1
  405. package/dist/peculiar/p-684b7f0f.system.js +0 -142
  406. package/dist/peculiar/p-684b7f0f.system.js.map +0 -1
  407. package/dist/peculiar/p-6eb92f5a.entry.js.map +0 -1
  408. package/dist/peculiar/p-8dd6d1ee.entry.js +0 -5
  409. package/dist/peculiar/p-8dd6d1ee.entry.js.map +0 -1
  410. package/dist/peculiar/p-90c3a063.js.map +0 -1
  411. package/dist/peculiar/p-90f461c0.js +0 -369
  412. package/dist/peculiar/p-92f9641a.js.map +0 -1
  413. package/dist/peculiar/p-93e299aa.system.entry.js +0 -5
  414. package/dist/peculiar/p-93e299aa.system.entry.js.map +0 -1
  415. package/dist/peculiar/p-9987b899.js.map +0 -1
  416. package/dist/peculiar/p-9b64adaa.system.js +0 -13
  417. package/dist/peculiar/p-9b64adaa.system.js.map +0 -1
  418. package/dist/peculiar/p-9ca02302.system.js.map +0 -1
  419. package/dist/peculiar/p-a1adb881.js +0 -6
  420. package/dist/peculiar/p-a1adb881.js.map +0 -1
  421. package/dist/peculiar/p-a3054d6e.system.js.map +0 -1
  422. package/dist/peculiar/p-a55fd6f1.js +0 -142
  423. package/dist/peculiar/p-a55fd6f1.js.map +0 -1
  424. package/dist/peculiar/p-a87e1a0e.js +0 -12
  425. package/dist/peculiar/p-a87e1a0e.js.map +0 -1
  426. package/dist/peculiar/p-a9ea6c79.system.js.map +0 -1
  427. package/dist/peculiar/p-b01c70cf.entry.js.map +0 -1
  428. package/dist/peculiar/p-b5674f82.js +0 -19
  429. package/dist/peculiar/p-b5674f82.js.map +0 -1
  430. package/dist/peculiar/p-ba3dfc03.js.map +0 -1
  431. package/dist/peculiar/p-bc91996c.system.js +0 -6
  432. package/dist/peculiar/p-bc91996c.system.js.map +0 -1
  433. package/dist/peculiar/p-c2995a63.system.js.map +0 -1
  434. package/dist/peculiar/p-c5d3333c.system.js.map +0 -1
  435. package/dist/peculiar/p-cb8a0b79.js +0 -19
  436. package/dist/peculiar/p-cb8a0b79.js.map +0 -1
  437. package/dist/peculiar/p-d46670fa.system.js.map +0 -1
  438. package/dist/peculiar/p-d9145ee8.system.js.map +0 -1
  439. package/dist/peculiar/p-dac867e8.js.map +0 -1
  440. package/dist/peculiar/p-f456fe47.js +0 -12
  441. package/dist/peculiar/p-f456fe47.js.map +0 -1
  442. package/dist/peculiar/p-f6ec61db.entry.js +0 -5
  443. package/dist/peculiar/p-f6ec61db.entry.js.map +0 -1
  444. package/loader/package.json +0 -11
@@ -52,7 +52,11 @@ function downloadFromBuffer(value, name, extension, mime = 'application/octet-st
52
52
  });
53
53
  }
54
54
 
55
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
55
+ function getDefaultExportFromCjs (x) {
56
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
57
+ }
58
+
59
+ var build = {};
56
60
 
57
61
  /*!
58
62
  * MIT License
@@ -79,354 +83,388 @@ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof win
79
83
  *
80
84
  */
81
85
 
82
- const ARRAY_BUFFER_NAME = "[object ArrayBuffer]";
83
- class BufferSourceConverter {
84
- static isArrayBuffer(data) {
85
- return Object.prototype.toString.call(data) === ARRAY_BUFFER_NAME;
86
- }
87
- static toArrayBuffer(data) {
88
- if (this.isArrayBuffer(data)) {
89
- return data;
90
- }
91
- if (data.byteLength === data.buffer.byteLength) {
92
- return data.buffer;
93
- }
94
- if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {
95
- return data.buffer;
96
- }
97
- return this.toUint8Array(data.buffer)
98
- .slice(data.byteOffset, data.byteOffset + data.byteLength)
99
- .buffer;
100
- }
101
- static toUint8Array(data) {
102
- return this.toView(data, Uint8Array);
103
- }
104
- static toView(data, type) {
105
- if (data.constructor === type) {
106
- return data;
107
- }
108
- if (this.isArrayBuffer(data)) {
109
- return new type(data);
110
- }
111
- if (this.isArrayBufferView(data)) {
112
- return new type(data.buffer, data.byteOffset, data.byteLength);
113
- }
114
- throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");
115
- }
116
- static isBufferSource(data) {
117
- return this.isArrayBufferView(data)
118
- || this.isArrayBuffer(data);
119
- }
120
- static isArrayBufferView(data) {
121
- return ArrayBuffer.isView(data)
122
- || (data && this.isArrayBuffer(data.buffer));
123
- }
124
- static isEqual(a, b) {
125
- const aView = BufferSourceConverter.toUint8Array(a);
126
- const bView = BufferSourceConverter.toUint8Array(b);
127
- if (aView.length !== bView.byteLength) {
128
- return false;
129
- }
130
- for (let i = 0; i < aView.length; i++) {
131
- if (aView[i] !== bView[i]) {
132
- return false;
133
- }
134
- }
135
- return true;
136
- }
137
- static concat(...args) {
138
- let buffers;
139
- if (Array.isArray(args[0]) && !(args[1] instanceof Function)) {
140
- buffers = args[0];
141
- }
142
- else if (Array.isArray(args[0]) && args[1] instanceof Function) {
143
- buffers = args[0];
144
- }
145
- else {
146
- if (args[args.length - 1] instanceof Function) {
147
- buffers = args.slice(0, args.length - 1);
148
- }
149
- else {
150
- buffers = args;
151
- }
152
- }
153
- let size = 0;
154
- for (const buffer of buffers) {
155
- size += buffer.byteLength;
156
- }
157
- const res = new Uint8Array(size);
158
- let offset = 0;
159
- for (const buffer of buffers) {
160
- const view = this.toUint8Array(buffer);
161
- res.set(view, offset);
162
- offset += view.length;
163
- }
164
- if (args[args.length - 1] instanceof Function) {
165
- return this.toView(res, args[args.length - 1]);
166
- }
167
- return res.buffer;
168
- }
169
- }
170
-
171
- const STRING_TYPE = "string";
172
- const HEX_REGEX = /^[0-9a-f\s]+$/i;
173
- const BASE64_REGEX = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
174
- const BASE64URL_REGEX = /^[a-zA-Z0-9-_]+$/;
175
- class Utf8Converter {
176
- static fromString(text) {
177
- const s = unescape(encodeURIComponent(text));
178
- const uintArray = new Uint8Array(s.length);
179
- for (let i = 0; i < s.length; i++) {
180
- uintArray[i] = s.charCodeAt(i);
181
- }
182
- return uintArray.buffer;
183
- }
184
- static toString(buffer) {
185
- const buf = BufferSourceConverter.toUint8Array(buffer);
186
- let encodedString = "";
187
- for (let i = 0; i < buf.length; i++) {
188
- encodedString += String.fromCharCode(buf[i]);
189
- }
190
- const decodedString = decodeURIComponent(escape(encodedString));
191
- return decodedString;
192
- }
193
- }
194
- class Utf16Converter {
195
- static toString(buffer, littleEndian = false) {
196
- const arrayBuffer = BufferSourceConverter.toArrayBuffer(buffer);
197
- const dataView = new DataView(arrayBuffer);
198
- let res = "";
199
- for (let i = 0; i < arrayBuffer.byteLength; i += 2) {
200
- const code = dataView.getUint16(i, littleEndian);
201
- res += String.fromCharCode(code);
202
- }
203
- return res;
204
- }
205
- static fromString(text, littleEndian = false) {
206
- const res = new ArrayBuffer(text.length * 2);
207
- const dataView = new DataView(res);
208
- for (let i = 0; i < text.length; i++) {
209
- dataView.setUint16(i * 2, text.charCodeAt(i), littleEndian);
210
- }
211
- return res;
212
- }
213
- }
214
- class Convert {
215
- static isHex(data) {
216
- return typeof data === STRING_TYPE
217
- && HEX_REGEX.test(data);
218
- }
219
- static isBase64(data) {
220
- return typeof data === STRING_TYPE
221
- && BASE64_REGEX.test(data);
222
- }
223
- static isBase64Url(data) {
224
- return typeof data === STRING_TYPE
225
- && BASE64URL_REGEX.test(data);
226
- }
227
- static ToString(buffer, enc = "utf8") {
228
- const buf = BufferSourceConverter.toUint8Array(buffer);
229
- switch (enc.toLowerCase()) {
230
- case "utf8":
231
- return this.ToUtf8String(buf);
232
- case "binary":
233
- return this.ToBinary(buf);
234
- case "hex":
235
- return this.ToHex(buf);
236
- case "base64":
237
- return this.ToBase64(buf);
238
- case "base64url":
239
- return this.ToBase64Url(buf);
240
- case "utf16le":
241
- return Utf16Converter.toString(buf, true);
242
- case "utf16":
243
- case "utf16be":
244
- return Utf16Converter.toString(buf);
245
- default:
246
- throw new Error(`Unknown type of encoding '${enc}'`);
247
- }
248
- }
249
- static FromString(str, enc = "utf8") {
250
- if (!str) {
251
- return new ArrayBuffer(0);
252
- }
253
- switch (enc.toLowerCase()) {
254
- case "utf8":
255
- return this.FromUtf8String(str);
256
- case "binary":
257
- return this.FromBinary(str);
258
- case "hex":
259
- return this.FromHex(str);
260
- case "base64":
261
- return this.FromBase64(str);
262
- case "base64url":
263
- return this.FromBase64Url(str);
264
- case "utf16le":
265
- return Utf16Converter.fromString(str, true);
266
- case "utf16":
267
- case "utf16be":
268
- return Utf16Converter.fromString(str);
269
- default:
270
- throw new Error(`Unknown type of encoding '${enc}'`);
271
- }
272
- }
273
- static ToBase64(buffer) {
274
- const buf = BufferSourceConverter.toUint8Array(buffer);
275
- if (typeof btoa !== "undefined") {
276
- const binary = this.ToString(buf, "binary");
277
- return btoa(binary);
278
- }
279
- else {
280
- return Buffer.from(buf).toString("base64");
281
- }
282
- }
283
- static FromBase64(base64) {
284
- const formatted = this.formatString(base64);
285
- if (!formatted) {
286
- return new ArrayBuffer(0);
287
- }
288
- if (!Convert.isBase64(formatted)) {
289
- throw new TypeError("Argument 'base64Text' is not Base64 encoded");
290
- }
291
- if (typeof atob !== "undefined") {
292
- return this.FromBinary(atob(formatted));
293
- }
294
- else {
295
- return new Uint8Array(Buffer.from(formatted, "base64")).buffer;
296
- }
297
- }
298
- static FromBase64Url(base64url) {
299
- const formatted = this.formatString(base64url);
300
- if (!formatted) {
301
- return new ArrayBuffer(0);
302
- }
303
- if (!Convert.isBase64Url(formatted)) {
304
- throw new TypeError("Argument 'base64url' is not Base64Url encoded");
305
- }
306
- return this.FromBase64(this.Base64Padding(formatted.replace(/\-/g, "+").replace(/\_/g, "/")));
307
- }
308
- static ToBase64Url(data) {
309
- return this.ToBase64(data).replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, "");
310
- }
311
- static FromUtf8String(text, encoding = Convert.DEFAULT_UTF8_ENCODING) {
312
- switch (encoding) {
313
- case "ascii":
314
- return this.FromBinary(text);
315
- case "utf8":
316
- return Utf8Converter.fromString(text);
317
- case "utf16":
318
- case "utf16be":
319
- return Utf16Converter.fromString(text);
320
- case "utf16le":
321
- case "usc2":
322
- return Utf16Converter.fromString(text, true);
323
- default:
324
- throw new Error(`Unknown type of encoding '${encoding}'`);
325
- }
326
- }
327
- static ToUtf8String(buffer, encoding = Convert.DEFAULT_UTF8_ENCODING) {
328
- switch (encoding) {
329
- case "ascii":
330
- return this.ToBinary(buffer);
331
- case "utf8":
332
- return Utf8Converter.toString(buffer);
333
- case "utf16":
334
- case "utf16be":
335
- return Utf16Converter.toString(buffer);
336
- case "utf16le":
337
- case "usc2":
338
- return Utf16Converter.toString(buffer, true);
339
- default:
340
- throw new Error(`Unknown type of encoding '${encoding}'`);
341
- }
342
- }
343
- static FromBinary(text) {
344
- const stringLength = text.length;
345
- const resultView = new Uint8Array(stringLength);
346
- for (let i = 0; i < stringLength; i++) {
347
- resultView[i] = text.charCodeAt(i);
348
- }
349
- return resultView.buffer;
350
- }
351
- static ToBinary(buffer) {
352
- const buf = BufferSourceConverter.toUint8Array(buffer);
353
- let res = "";
354
- for (let i = 0; i < buf.length; i++) {
355
- res += String.fromCharCode(buf[i]);
356
- }
357
- return res;
358
- }
359
- static ToHex(buffer) {
360
- const buf = BufferSourceConverter.toUint8Array(buffer);
361
- let result = "";
362
- const len = buf.length;
363
- for (let i = 0; i < len; i++) {
364
- const byte = buf[i];
365
- if (byte < 16) {
366
- result += "0";
367
- }
368
- result += byte.toString(16);
369
- }
370
- return result;
371
- }
372
- static FromHex(hexString) {
373
- let formatted = this.formatString(hexString);
374
- if (!formatted) {
375
- return new ArrayBuffer(0);
376
- }
377
- if (!Convert.isHex(formatted)) {
378
- throw new TypeError("Argument 'hexString' is not HEX encoded");
379
- }
380
- if (formatted.length % 2) {
381
- formatted = `0${formatted}`;
382
- }
383
- const res = new Uint8Array(formatted.length / 2);
384
- for (let i = 0; i < formatted.length; i = i + 2) {
385
- const c = formatted.slice(i, i + 2);
386
- res[i / 2] = parseInt(c, 16);
387
- }
388
- return res.buffer;
389
- }
390
- static ToUtf16String(buffer, littleEndian = false) {
391
- return Utf16Converter.toString(buffer, littleEndian);
392
- }
393
- static FromUtf16String(text, littleEndian = false) {
394
- return Utf16Converter.fromString(text, littleEndian);
395
- }
396
- static Base64Padding(base64) {
397
- const padCount = 4 - (base64.length % 4);
398
- if (padCount < 4) {
399
- for (let i = 0; i < padCount; i++) {
400
- base64 += "=";
401
- }
402
- }
403
- return base64;
404
- }
405
- static formatString(data) {
406
- return (data === null || data === void 0 ? void 0 : data.replace(/[\n\r\t ]/g, "")) || "";
407
- }
408
- }
409
- Convert.DEFAULT_UTF8_ENCODING = "utf8";
410
- function isEqual(bytes1, bytes2) {
411
- if (!(bytes1 && bytes2)) {
412
- return false;
413
- }
414
- if (bytes1.byteLength !== bytes2.byteLength) {
415
- return false;
416
- }
417
- const b1 = new Uint8Array(bytes1);
418
- const b2 = new Uint8Array(bytes2);
419
- for (let i = 0; i < bytes1.byteLength; i++) {
420
- if (b1[i] !== b2[i]) {
421
- return false;
422
- }
423
- }
424
- return true;
425
- }
426
-
427
- var BufferSourceConverter_1 = BufferSourceConverter;
428
- var Convert_1 = Convert;
429
- var isEqual_1 = isEqual;
86
+ var hasRequiredBuild;
87
+
88
+ function requireBuild () {
89
+ if (hasRequiredBuild) return build;
90
+ hasRequiredBuild = 1;
91
+
92
+ const ARRAY_BUFFER_NAME = "[object ArrayBuffer]";
93
+ class BufferSourceConverter {
94
+ static isArrayBuffer(data) {
95
+ return Object.prototype.toString.call(data) === ARRAY_BUFFER_NAME;
96
+ }
97
+ static toArrayBuffer(data) {
98
+ if (this.isArrayBuffer(data)) {
99
+ return data;
100
+ }
101
+ if (data.byteLength === data.buffer.byteLength) {
102
+ return data.buffer;
103
+ }
104
+ if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {
105
+ return data.buffer;
106
+ }
107
+ return this.toUint8Array(data.buffer)
108
+ .slice(data.byteOffset, data.byteOffset + data.byteLength)
109
+ .buffer;
110
+ }
111
+ static toUint8Array(data) {
112
+ return this.toView(data, Uint8Array);
113
+ }
114
+ static toView(data, type) {
115
+ if (data.constructor === type) {
116
+ return data;
117
+ }
118
+ if (this.isArrayBuffer(data)) {
119
+ return new type(data);
120
+ }
121
+ if (this.isArrayBufferView(data)) {
122
+ return new type(data.buffer, data.byteOffset, data.byteLength);
123
+ }
124
+ throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");
125
+ }
126
+ static isBufferSource(data) {
127
+ return this.isArrayBufferView(data)
128
+ || this.isArrayBuffer(data);
129
+ }
130
+ static isArrayBufferView(data) {
131
+ return ArrayBuffer.isView(data)
132
+ || (data && this.isArrayBuffer(data.buffer));
133
+ }
134
+ static isEqual(a, b) {
135
+ const aView = BufferSourceConverter.toUint8Array(a);
136
+ const bView = BufferSourceConverter.toUint8Array(b);
137
+ if (aView.length !== bView.byteLength) {
138
+ return false;
139
+ }
140
+ for (let i = 0; i < aView.length; i++) {
141
+ if (aView[i] !== bView[i]) {
142
+ return false;
143
+ }
144
+ }
145
+ return true;
146
+ }
147
+ static concat(...args) {
148
+ let buffers;
149
+ if (Array.isArray(args[0]) && !(args[1] instanceof Function)) {
150
+ buffers = args[0];
151
+ }
152
+ else if (Array.isArray(args[0]) && args[1] instanceof Function) {
153
+ buffers = args[0];
154
+ }
155
+ else {
156
+ if (args[args.length - 1] instanceof Function) {
157
+ buffers = args.slice(0, args.length - 1);
158
+ }
159
+ else {
160
+ buffers = args;
161
+ }
162
+ }
163
+ let size = 0;
164
+ for (const buffer of buffers) {
165
+ size += buffer.byteLength;
166
+ }
167
+ const res = new Uint8Array(size);
168
+ let offset = 0;
169
+ for (const buffer of buffers) {
170
+ const view = this.toUint8Array(buffer);
171
+ res.set(view, offset);
172
+ offset += view.length;
173
+ }
174
+ if (args[args.length - 1] instanceof Function) {
175
+ return this.toView(res, args[args.length - 1]);
176
+ }
177
+ return res.buffer;
178
+ }
179
+ }
180
+
181
+ const STRING_TYPE = "string";
182
+ const HEX_REGEX = /^[0-9a-f\s]+$/i;
183
+ const BASE64_REGEX = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
184
+ const BASE64URL_REGEX = /^[a-zA-Z0-9-_]+$/;
185
+ class Utf8Converter {
186
+ static fromString(text) {
187
+ const s = unescape(encodeURIComponent(text));
188
+ const uintArray = new Uint8Array(s.length);
189
+ for (let i = 0; i < s.length; i++) {
190
+ uintArray[i] = s.charCodeAt(i);
191
+ }
192
+ return uintArray.buffer;
193
+ }
194
+ static toString(buffer) {
195
+ const buf = BufferSourceConverter.toUint8Array(buffer);
196
+ let encodedString = "";
197
+ for (let i = 0; i < buf.length; i++) {
198
+ encodedString += String.fromCharCode(buf[i]);
199
+ }
200
+ const decodedString = decodeURIComponent(escape(encodedString));
201
+ return decodedString;
202
+ }
203
+ }
204
+ class Utf16Converter {
205
+ static toString(buffer, littleEndian = false) {
206
+ const arrayBuffer = BufferSourceConverter.toArrayBuffer(buffer);
207
+ const dataView = new DataView(arrayBuffer);
208
+ let res = "";
209
+ for (let i = 0; i < arrayBuffer.byteLength; i += 2) {
210
+ const code = dataView.getUint16(i, littleEndian);
211
+ res += String.fromCharCode(code);
212
+ }
213
+ return res;
214
+ }
215
+ static fromString(text, littleEndian = false) {
216
+ const res = new ArrayBuffer(text.length * 2);
217
+ const dataView = new DataView(res);
218
+ for (let i = 0; i < text.length; i++) {
219
+ dataView.setUint16(i * 2, text.charCodeAt(i), littleEndian);
220
+ }
221
+ return res;
222
+ }
223
+ }
224
+ class Convert {
225
+ static isHex(data) {
226
+ return typeof data === STRING_TYPE
227
+ && HEX_REGEX.test(data);
228
+ }
229
+ static isBase64(data) {
230
+ return typeof data === STRING_TYPE
231
+ && BASE64_REGEX.test(data);
232
+ }
233
+ static isBase64Url(data) {
234
+ return typeof data === STRING_TYPE
235
+ && BASE64URL_REGEX.test(data);
236
+ }
237
+ static ToString(buffer, enc = "utf8") {
238
+ const buf = BufferSourceConverter.toUint8Array(buffer);
239
+ switch (enc.toLowerCase()) {
240
+ case "utf8":
241
+ return this.ToUtf8String(buf);
242
+ case "binary":
243
+ return this.ToBinary(buf);
244
+ case "hex":
245
+ return this.ToHex(buf);
246
+ case "base64":
247
+ return this.ToBase64(buf);
248
+ case "base64url":
249
+ return this.ToBase64Url(buf);
250
+ case "utf16le":
251
+ return Utf16Converter.toString(buf, true);
252
+ case "utf16":
253
+ case "utf16be":
254
+ return Utf16Converter.toString(buf);
255
+ default:
256
+ throw new Error(`Unknown type of encoding '${enc}'`);
257
+ }
258
+ }
259
+ static FromString(str, enc = "utf8") {
260
+ if (!str) {
261
+ return new ArrayBuffer(0);
262
+ }
263
+ switch (enc.toLowerCase()) {
264
+ case "utf8":
265
+ return this.FromUtf8String(str);
266
+ case "binary":
267
+ return this.FromBinary(str);
268
+ case "hex":
269
+ return this.FromHex(str);
270
+ case "base64":
271
+ return this.FromBase64(str);
272
+ case "base64url":
273
+ return this.FromBase64Url(str);
274
+ case "utf16le":
275
+ return Utf16Converter.fromString(str, true);
276
+ case "utf16":
277
+ case "utf16be":
278
+ return Utf16Converter.fromString(str);
279
+ default:
280
+ throw new Error(`Unknown type of encoding '${enc}'`);
281
+ }
282
+ }
283
+ static ToBase64(buffer) {
284
+ const buf = BufferSourceConverter.toUint8Array(buffer);
285
+ if (typeof btoa !== "undefined") {
286
+ const binary = this.ToString(buf, "binary");
287
+ return btoa(binary);
288
+ }
289
+ else {
290
+ return Buffer.from(buf).toString("base64");
291
+ }
292
+ }
293
+ static FromBase64(base64) {
294
+ const formatted = this.formatString(base64);
295
+ if (!formatted) {
296
+ return new ArrayBuffer(0);
297
+ }
298
+ if (!Convert.isBase64(formatted)) {
299
+ throw new TypeError("Argument 'base64Text' is not Base64 encoded");
300
+ }
301
+ if (typeof atob !== "undefined") {
302
+ return this.FromBinary(atob(formatted));
303
+ }
304
+ else {
305
+ return new Uint8Array(Buffer.from(formatted, "base64")).buffer;
306
+ }
307
+ }
308
+ static FromBase64Url(base64url) {
309
+ const formatted = this.formatString(base64url);
310
+ if (!formatted) {
311
+ return new ArrayBuffer(0);
312
+ }
313
+ if (!Convert.isBase64Url(formatted)) {
314
+ throw new TypeError("Argument 'base64url' is not Base64Url encoded");
315
+ }
316
+ return this.FromBase64(this.Base64Padding(formatted.replace(/\-/g, "+").replace(/\_/g, "/")));
317
+ }
318
+ static ToBase64Url(data) {
319
+ return this.ToBase64(data).replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, "");
320
+ }
321
+ static FromUtf8String(text, encoding = Convert.DEFAULT_UTF8_ENCODING) {
322
+ switch (encoding) {
323
+ case "ascii":
324
+ return this.FromBinary(text);
325
+ case "utf8":
326
+ return Utf8Converter.fromString(text);
327
+ case "utf16":
328
+ case "utf16be":
329
+ return Utf16Converter.fromString(text);
330
+ case "utf16le":
331
+ case "usc2":
332
+ return Utf16Converter.fromString(text, true);
333
+ default:
334
+ throw new Error(`Unknown type of encoding '${encoding}'`);
335
+ }
336
+ }
337
+ static ToUtf8String(buffer, encoding = Convert.DEFAULT_UTF8_ENCODING) {
338
+ switch (encoding) {
339
+ case "ascii":
340
+ return this.ToBinary(buffer);
341
+ case "utf8":
342
+ return Utf8Converter.toString(buffer);
343
+ case "utf16":
344
+ case "utf16be":
345
+ return Utf16Converter.toString(buffer);
346
+ case "utf16le":
347
+ case "usc2":
348
+ return Utf16Converter.toString(buffer, true);
349
+ default:
350
+ throw new Error(`Unknown type of encoding '${encoding}'`);
351
+ }
352
+ }
353
+ static FromBinary(text) {
354
+ const stringLength = text.length;
355
+ const resultView = new Uint8Array(stringLength);
356
+ for (let i = 0; i < stringLength; i++) {
357
+ resultView[i] = text.charCodeAt(i);
358
+ }
359
+ return resultView.buffer;
360
+ }
361
+ static ToBinary(buffer) {
362
+ const buf = BufferSourceConverter.toUint8Array(buffer);
363
+ let res = "";
364
+ for (let i = 0; i < buf.length; i++) {
365
+ res += String.fromCharCode(buf[i]);
366
+ }
367
+ return res;
368
+ }
369
+ static ToHex(buffer) {
370
+ const buf = BufferSourceConverter.toUint8Array(buffer);
371
+ let result = "";
372
+ const len = buf.length;
373
+ for (let i = 0; i < len; i++) {
374
+ const byte = buf[i];
375
+ if (byte < 16) {
376
+ result += "0";
377
+ }
378
+ result += byte.toString(16);
379
+ }
380
+ return result;
381
+ }
382
+ static FromHex(hexString) {
383
+ let formatted = this.formatString(hexString);
384
+ if (!formatted) {
385
+ return new ArrayBuffer(0);
386
+ }
387
+ if (!Convert.isHex(formatted)) {
388
+ throw new TypeError("Argument 'hexString' is not HEX encoded");
389
+ }
390
+ if (formatted.length % 2) {
391
+ formatted = `0${formatted}`;
392
+ }
393
+ const res = new Uint8Array(formatted.length / 2);
394
+ for (let i = 0; i < formatted.length; i = i + 2) {
395
+ const c = formatted.slice(i, i + 2);
396
+ res[i / 2] = parseInt(c, 16);
397
+ }
398
+ return res.buffer;
399
+ }
400
+ static ToUtf16String(buffer, littleEndian = false) {
401
+ return Utf16Converter.toString(buffer, littleEndian);
402
+ }
403
+ static FromUtf16String(text, littleEndian = false) {
404
+ return Utf16Converter.fromString(text, littleEndian);
405
+ }
406
+ static Base64Padding(base64) {
407
+ const padCount = 4 - (base64.length % 4);
408
+ if (padCount < 4) {
409
+ for (let i = 0; i < padCount; i++) {
410
+ base64 += "=";
411
+ }
412
+ }
413
+ return base64;
414
+ }
415
+ static formatString(data) {
416
+ return (data === null || data === void 0 ? void 0 : data.replace(/[\n\r\t ]/g, "")) || "";
417
+ }
418
+ }
419
+ Convert.DEFAULT_UTF8_ENCODING = "utf8";
420
+
421
+ function assign(target, ...sources) {
422
+ const res = arguments[0];
423
+ for (let i = 1; i < arguments.length; i++) {
424
+ const obj = arguments[i];
425
+ for (const prop in obj) {
426
+ res[prop] = obj[prop];
427
+ }
428
+ }
429
+ return res;
430
+ }
431
+ function combine(...buf) {
432
+ const totalByteLength = buf.map((item) => item.byteLength).reduce((prev, cur) => prev + cur);
433
+ const res = new Uint8Array(totalByteLength);
434
+ let currentPos = 0;
435
+ buf.map((item) => new Uint8Array(item)).forEach((arr) => {
436
+ for (const item2 of arr) {
437
+ res[currentPos++] = item2;
438
+ }
439
+ });
440
+ return res.buffer;
441
+ }
442
+ function isEqual(bytes1, bytes2) {
443
+ if (!(bytes1 && bytes2)) {
444
+ return false;
445
+ }
446
+ if (bytes1.byteLength !== bytes2.byteLength) {
447
+ return false;
448
+ }
449
+ const b1 = new Uint8Array(bytes1);
450
+ const b2 = new Uint8Array(bytes2);
451
+ for (let i = 0; i < bytes1.byteLength; i++) {
452
+ if (b1[i] !== b2[i]) {
453
+ return false;
454
+ }
455
+ }
456
+ return true;
457
+ }
458
+
459
+ build.BufferSourceConverter = BufferSourceConverter;
460
+ build.Convert = Convert;
461
+ build.assign = assign;
462
+ build.combine = combine;
463
+ build.isEqual = isEqual;
464
+ return build;
465
+ }
466
+
467
+ var buildExports = requireBuild();
430
468
 
431
469
  /**
432
470
  * @license
@@ -439,7 +477,7 @@ class Download {
439
477
  }
440
478
  Download.cert = {
441
479
  asPEM: (pem, name) => {
442
- downloadFromBuffer(Convert_1.FromString(pem), name, 'cer', 'application/pkix-cert');
480
+ downloadFromBuffer(buildExports.Convert.FromString(pem), name, 'cer', 'application/pkix-cert');
443
481
  },
444
482
  asDER: (raw, name) => {
445
483
  downloadFromBuffer(raw, name, 'cer', 'application/pkix-cert');
@@ -447,7 +485,7 @@ Download.cert = {
447
485
  };
448
486
  Download.attrCert = {
449
487
  asPEM: (pem, name) => {
450
- downloadFromBuffer(Convert_1.FromString(pem), name, 'cer', 'application/pkix-attr-cert');
488
+ downloadFromBuffer(buildExports.Convert.FromString(pem), name, 'cer', 'application/pkix-attr-cert');
451
489
  },
452
490
  asDER: (raw, name) => {
453
491
  downloadFromBuffer(raw, name, 'cer', 'application/pkix-attr-cert');
@@ -455,7 +493,7 @@ Download.attrCert = {
455
493
  };
456
494
  Download.csr = {
457
495
  asPEM: (pem, name) => {
458
- downloadFromBuffer(Convert_1.FromString(pem), name, 'csr', 'application/pkcs10');
496
+ downloadFromBuffer(buildExports.Convert.FromString(pem), name, 'csr', 'application/pkcs10');
459
497
  },
460
498
  asDER: (raw, name) => {
461
499
  downloadFromBuffer(raw, name, 'csr', 'application/pkcs10');
@@ -463,7 +501,7 @@ Download.csr = {
463
501
  };
464
502
  Download.crl = {
465
503
  asPEM: (pem, name) => {
466
- downloadFromBuffer(Convert_1.FromString(pem), name, 'crl', 'application/pkix-crl');
504
+ downloadFromBuffer(buildExports.Convert.FromString(pem), name, 'crl', 'application/pkix-crl');
467
505
  },
468
506
  asDER: (raw, name) => {
469
507
  downloadFromBuffer(raw, name, 'crl', 'application/pkix-crl');
@@ -473,6 +511,7 @@ Download.crl = {
473
511
  /*!
474
512
  Copyright (c) Peculiar Ventures, LLC
475
513
  */
514
+
476
515
  function utilFromBase(inputBuffer, inputBase) {
477
516
  let result = 0;
478
517
  if (inputBuffer.length === 1) {
@@ -644,6 +683,7 @@ function padNumber(inputNumber, fullLength) {
644
683
  *
645
684
  */
646
685
 
686
+
647
687
  function assertBigInt() {
648
688
  if (typeof BigInt === "undefined") {
649
689
  throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.");
@@ -727,7 +767,7 @@ function HexBlock(BaseClass) {
727
767
  super(...args);
728
768
  const params = args[0] || {};
729
769
  this.isHexOnly = (_a = params.isHexOnly) !== null && _a !== void 0 ? _a : false;
730
- this.valueHexView = params.valueHex ? BufferSourceConverter_1.toUint8Array(params.valueHex) : EMPTY_VIEW;
770
+ this.valueHexView = params.valueHex ? buildExports.BufferSourceConverter.toUint8Array(params.valueHex) : EMPTY_VIEW;
731
771
  }
732
772
  get valueHex() {
733
773
  return this.valueHexView.slice().buffer;
@@ -765,7 +805,7 @@ function HexBlock(BaseClass) {
765
805
  return {
766
806
  ...super.toJSON(),
767
807
  isHexOnly: this.isHexOnly,
768
- valueHex: Convert_1.ToHex(this.valueHexView),
808
+ valueHex: buildExports.Convert.ToHex(this.valueHexView),
769
809
  };
770
810
  }
771
811
  },
@@ -778,7 +818,7 @@ class LocalBaseBlock {
778
818
  this.blockLength = blockLength;
779
819
  this.error = error;
780
820
  this.warnings = warnings;
781
- this.valueBeforeDecodeView = BufferSourceConverter_1.toUint8Array(valueBeforeDecode);
821
+ this.valueBeforeDecodeView = buildExports.BufferSourceConverter.toUint8Array(valueBeforeDecode);
782
822
  }
783
823
  static blockName() {
784
824
  return this.NAME;
@@ -795,7 +835,7 @@ class LocalBaseBlock {
795
835
  blockLength: this.blockLength,
796
836
  error: this.error,
797
837
  warnings: this.warnings,
798
- valueBeforeDecode: Convert_1.ToHex(this.valueBeforeDecodeView),
838
+ valueBeforeDecode: buildExports.Convert.ToHex(this.valueBeforeDecodeView),
799
839
  };
800
840
  }
801
841
  }
@@ -817,7 +857,7 @@ class LocalIdentificationBlock extends HexBlock(LocalBaseBlock) {
817
857
  super();
818
858
  if (idBlock) {
819
859
  this.isHexOnly = (_a = idBlock.isHexOnly) !== null && _a !== void 0 ? _a : false;
820
- this.valueHexView = idBlock.valueHex ? BufferSourceConverter_1.toUint8Array(idBlock.valueHex) : EMPTY_VIEW;
860
+ this.valueHexView = idBlock.valueHex ? buildExports.BufferSourceConverter.toUint8Array(idBlock.valueHex) : EMPTY_VIEW;
821
861
  this.tagClass = (_b = idBlock.tagClass) !== null && _b !== void 0 ? _b : -1;
822
862
  this.tagNumber = (_c = idBlock.tagNumber) !== null && _c !== void 0 ? _c : -1;
823
863
  this.isConstructed = (_d = idBlock.isConstructed) !== null && _d !== void 0 ? _d : false;
@@ -883,7 +923,7 @@ class LocalIdentificationBlock extends HexBlock(LocalBaseBlock) {
883
923
  return retView.buffer;
884
924
  }
885
925
  fromBER(inputBuffer, inputOffset, inputLength) {
886
- const inputView = BufferSourceConverter_1.toUint8Array(inputBuffer);
926
+ const inputView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
887
927
  if (!checkBufferParams(this, inputView, inputOffset, inputLength)) {
888
928
  return -1;
889
929
  }
@@ -992,7 +1032,7 @@ class LocalLengthBlock extends LocalBaseBlock {
992
1032
  this.length = (_c = lenBlock.length) !== null && _c !== void 0 ? _c : 0;
993
1033
  }
994
1034
  fromBER(inputBuffer, inputOffset, inputLength) {
995
- const view = BufferSourceConverter_1.toUint8Array(inputBuffer);
1035
+ const view = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
996
1036
  if (!checkBufferParams(this, view, inputOffset, inputLength)) {
997
1037
  return -1;
998
1038
  }
@@ -1151,10 +1191,10 @@ class BaseBlock extends LocalBaseBlock {
1151
1191
  if (encoding === "ascii") {
1152
1192
  return this.onAsciiEncoding();
1153
1193
  }
1154
- return Convert_1.ToHex(this.toBER());
1194
+ return buildExports.Convert.ToHex(this.toBER());
1155
1195
  }
1156
1196
  onAsciiEncoding() {
1157
- return `${this.constructor.NAME} : ${Convert_1.ToHex(this.valueBlock.valueBeforeDecodeView)}`;
1197
+ return `${this.constructor.NAME} : ${buildExports.Convert.ToHex(this.valueBlock.valueBeforeDecodeView)}`;
1158
1198
  }
1159
1199
  isEqual(other) {
1160
1200
  if (this === other) {
@@ -1452,7 +1492,7 @@ function fromBER(inputBuffer) {
1452
1492
  result
1453
1493
  };
1454
1494
  }
1455
- return localFromBER(BufferSourceConverter_1.toUint8Array(inputBuffer).slice(), 0, inputBuffer.byteLength);
1495
+ return localFromBER(buildExports.BufferSourceConverter.toUint8Array(inputBuffer).slice(), 0, inputBuffer.byteLength);
1456
1496
  }
1457
1497
 
1458
1498
  function checkLen(indefiniteLength, length) {
@@ -1468,7 +1508,7 @@ class LocalConstructedValueBlock extends ValueBlock {
1468
1508
  this.isIndefiniteForm = isIndefiniteForm;
1469
1509
  }
1470
1510
  fromBER(inputBuffer, inputOffset, inputLength) {
1471
- const view = BufferSourceConverter_1.toUint8Array(inputBuffer);
1511
+ const view = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
1472
1512
  if (!checkBufferParams(this, view, inputOffset, inputLength)) {
1473
1513
  return -1;
1474
1514
  }
@@ -1638,7 +1678,7 @@ class LocalBooleanValueBlock extends HexBlock(ValueBlock) {
1638
1678
  constructor({ value, ...parameters } = {}) {
1639
1679
  super(parameters);
1640
1680
  if (parameters.valueHex) {
1641
- this.valueHexView = BufferSourceConverter_1.toUint8Array(parameters.valueHex);
1681
+ this.valueHexView = buildExports.BufferSourceConverter.toUint8Array(parameters.valueHex);
1642
1682
  }
1643
1683
  else {
1644
1684
  this.valueHexView = new Uint8Array(1);
@@ -1659,7 +1699,7 @@ class LocalBooleanValueBlock extends HexBlock(ValueBlock) {
1659
1699
  this.valueHexView[0] = value ? 0xFF : 0x00;
1660
1700
  }
1661
1701
  fromBER(inputBuffer, inputOffset, inputLength) {
1662
- const inputView = BufferSourceConverter_1.toUint8Array(inputBuffer);
1702
+ const inputView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
1663
1703
  if (!checkBufferParams(this, inputView, inputOffset, inputLength)) {
1664
1704
  return -1;
1665
1705
  }
@@ -1758,7 +1798,7 @@ class LocalOctetStringValueBlock extends HexBlock(LocalConstructedValueBlock) {
1758
1798
  LocalOctetStringValueBlock.NAME = "OctetStringValueBlock";
1759
1799
 
1760
1800
  var _a$r;
1761
- class OctetString$1 extends BaseBlock {
1801
+ let OctetString$1 = class OctetString extends BaseBlock {
1762
1802
  constructor({ idBlock = {}, lenBlock = {}, ...parameters } = {}) {
1763
1803
  var _b, _c;
1764
1804
  (_b = parameters.isConstructed) !== null && _b !== void 0 ? _b : (parameters.isConstructed = !!((_c = parameters.value) === null || _c === void 0 ? void 0 : _c.length));
@@ -1806,7 +1846,7 @@ class OctetString$1 extends BaseBlock {
1806
1846
  if (this.valueBlock.isConstructed || (this.valueBlock.value && this.valueBlock.value.length)) {
1807
1847
  return Constructed.prototype.onAsciiEncoding.call(this);
1808
1848
  }
1809
- return `${this.constructor.NAME} : ${Convert_1.ToHex(this.valueBlock.valueHexView)}`;
1849
+ return `${this.constructor.NAME} : ${buildExports.Convert.ToHex(this.valueBlock.valueHexView)}`;
1810
1850
  }
1811
1851
  getValue() {
1812
1852
  if (!this.idBlock.isConstructed) {
@@ -1814,13 +1854,13 @@ class OctetString$1 extends BaseBlock {
1814
1854
  }
1815
1855
  const array = [];
1816
1856
  for (const content of this.valueBlock.value) {
1817
- if (content instanceof OctetString$1) {
1857
+ if (content instanceof OctetString) {
1818
1858
  array.push(content.valueBlock.valueHexView);
1819
1859
  }
1820
1860
  }
1821
- return BufferSourceConverter_1.concat(array);
1861
+ return buildExports.BufferSourceConverter.concat(array);
1822
1862
  }
1823
- }
1863
+ };
1824
1864
  _a$r = OctetString$1;
1825
1865
  (() => {
1826
1866
  typeStore.OctetString = _a$r;
@@ -1866,7 +1906,7 @@ class LocalBitStringValueBlock extends HexBlock(LocalConstructedValueBlock) {
1866
1906
  }
1867
1907
  return resultOffset;
1868
1908
  }
1869
- const inputView = BufferSourceConverter_1.toUint8Array(inputBuffer);
1909
+ const inputView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
1870
1910
  if (!checkBufferParams(this, inputView, inputOffset, inputLength)) {
1871
1911
  return -1;
1872
1912
  }
@@ -1919,7 +1959,7 @@ class LocalBitStringValueBlock extends HexBlock(LocalConstructedValueBlock) {
1919
1959
  LocalBitStringValueBlock.NAME = "BitStringValueBlock";
1920
1960
 
1921
1961
  var _a$q;
1922
- class BitString$1 extends BaseBlock {
1962
+ let BitString$1 = class BitString extends BaseBlock {
1923
1963
  constructor({ idBlock = {}, lenBlock = {}, ...parameters } = {}) {
1924
1964
  var _b, _c;
1925
1965
  (_b = parameters.isConstructed) !== null && _b !== void 0 ? _b : (parameters.isConstructed = !!((_c = parameters.value) === null || _c === void 0 ? void 0 : _c.length));
@@ -1956,7 +1996,7 @@ class BitString$1 extends BaseBlock {
1956
1996
  return `${this.constructor.NAME} : ${bitsStr.substring(0, bitsStr.length - this.valueBlock.unusedBits)}`;
1957
1997
  }
1958
1998
  }
1959
- }
1999
+ };
1960
2000
  _a$q = BitString$1;
1961
2001
  (() => {
1962
2002
  typeStore.BitString = _a$q;
@@ -2206,13 +2246,13 @@ class Integer extends BaseBlock {
2206
2246
  const bigIntValue = BigInt(value);
2207
2247
  const writer = new ViewWriter();
2208
2248
  const hex = bigIntValue.toString(16).replace(/^-/, "");
2209
- const view = new Uint8Array(Convert_1.FromHex(hex));
2249
+ const view = new Uint8Array(buildExports.Convert.FromHex(hex));
2210
2250
  if (bigIntValue < 0) {
2211
2251
  const first = new Uint8Array(view.length + (view[0] & 0x80 ? 1 : 0));
2212
2252
  first[0] |= 0x80;
2213
- const firstInt = BigInt(`0x${Convert_1.ToHex(first)}`);
2253
+ const firstInt = BigInt(`0x${buildExports.Convert.ToHex(first)}`);
2214
2254
  const secondInt = firstInt + bigIntValue;
2215
- const second = BufferSourceConverter_1.toUint8Array(Convert_1.FromHex(secondInt.toString(16)));
2255
+ const second = buildExports.BufferSourceConverter.toUint8Array(buildExports.Convert.FromHex(secondInt.toString(16)));
2216
2256
  second[0] |= 0x80;
2217
2257
  writer.write(second);
2218
2258
  }
@@ -2273,7 +2313,7 @@ class LocalSidValueBlock extends HexBlock(ValueBlock) {
2273
2313
  if (!inputLength) {
2274
2314
  return inputOffset;
2275
2315
  }
2276
- const inputView = BufferSourceConverter_1.toUint8Array(inputBuffer);
2316
+ const inputView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
2277
2317
  if (!checkBufferParams(this, inputView, inputOffset, inputLength)) {
2278
2318
  return -1;
2279
2319
  }
@@ -2345,7 +2385,7 @@ class LocalSidValueBlock extends HexBlock(ValueBlock) {
2345
2385
  toString() {
2346
2386
  let result = "";
2347
2387
  if (this.isHexOnly)
2348
- result = Convert_1.ToHex(this.valueHexView);
2388
+ result = buildExports.Convert.ToHex(this.valueHexView);
2349
2389
  else {
2350
2390
  if (this.isFirstSid) {
2351
2391
  let sidValue = this.valueDec;
@@ -2542,7 +2582,7 @@ class LocalRelativeSidValueBlock extends HexBlock(LocalBaseBlock) {
2542
2582
  fromBER(inputBuffer, inputOffset, inputLength) {
2543
2583
  if (inputLength === 0)
2544
2584
  return inputOffset;
2545
- const inputView = BufferSourceConverter_1.toUint8Array(inputBuffer);
2585
+ const inputView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
2546
2586
  if (!checkBufferParams(this, inputView, inputOffset, inputLength))
2547
2587
  return -1;
2548
2588
  const intBuffer = inputView.subarray(inputOffset, inputOffset + inputLength);
@@ -2600,7 +2640,7 @@ class LocalRelativeSidValueBlock extends HexBlock(LocalBaseBlock) {
2600
2640
  toString() {
2601
2641
  let result = "";
2602
2642
  if (this.isHexOnly)
2603
- result = Convert_1.ToHex(this.valueHexView);
2643
+ result = buildExports.Convert.ToHex(this.valueHexView);
2604
2644
  else {
2605
2645
  result = this.valueDec.toString();
2606
2646
  }
@@ -2782,7 +2822,7 @@ class LocalSimpleStringBlock extends BaseStringBlock {
2782
2822
  super(parameters, LocalSimpleStringValueBlock);
2783
2823
  }
2784
2824
  fromBuffer(inputBuffer) {
2785
- this.valueBlock.value = String.fromCharCode.apply(null, BufferSourceConverter_1.toUint8Array(inputBuffer));
2825
+ this.valueBlock.value = String.fromCharCode.apply(null, buildExports.BufferSourceConverter.toUint8Array(inputBuffer));
2786
2826
  }
2787
2827
  fromString(inputString) {
2788
2828
  const strLen = inputString.length;
@@ -2796,17 +2836,17 @@ LocalSimpleStringBlock.NAME = "SIMPLE STRING";
2796
2836
 
2797
2837
  class LocalUtf8StringValueBlock extends LocalSimpleStringBlock {
2798
2838
  fromBuffer(inputBuffer) {
2799
- this.valueBlock.valueHexView = BufferSourceConverter_1.toUint8Array(inputBuffer);
2839
+ this.valueBlock.valueHexView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
2800
2840
  try {
2801
- this.valueBlock.value = Convert_1.ToUtf8String(inputBuffer);
2841
+ this.valueBlock.value = buildExports.Convert.ToUtf8String(inputBuffer);
2802
2842
  }
2803
2843
  catch (ex) {
2804
2844
  this.warnings.push(`Error during "decodeURIComponent": ${ex}, using raw string`);
2805
- this.valueBlock.value = Convert_1.ToBinary(inputBuffer);
2845
+ this.valueBlock.value = buildExports.Convert.ToBinary(inputBuffer);
2806
2846
  }
2807
2847
  }
2808
2848
  fromString(inputString) {
2809
- this.valueBlock.valueHexView = new Uint8Array(Convert_1.FromUtf8String(inputString));
2849
+ this.valueBlock.valueHexView = new Uint8Array(buildExports.Convert.FromUtf8String(inputString));
2810
2850
  this.valueBlock.value = inputString;
2811
2851
  }
2812
2852
  }
@@ -2828,12 +2868,12 @@ Utf8String.NAME = "UTF8String";
2828
2868
 
2829
2869
  class LocalBmpStringValueBlock extends LocalSimpleStringBlock {
2830
2870
  fromBuffer(inputBuffer) {
2831
- this.valueBlock.value = Convert_1.ToUtf16String(inputBuffer);
2832
- this.valueBlock.valueHexView = BufferSourceConverter_1.toUint8Array(inputBuffer);
2871
+ this.valueBlock.value = buildExports.Convert.ToUtf16String(inputBuffer);
2872
+ this.valueBlock.valueHexView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
2833
2873
  }
2834
2874
  fromString(inputString) {
2835
2875
  this.valueBlock.value = inputString;
2836
- this.valueBlock.valueHexView = new Uint8Array(Convert_1.FromUtf16String(inputString));
2876
+ this.valueBlock.valueHexView = new Uint8Array(buildExports.Convert.FromUtf16String(inputString));
2837
2877
  }
2838
2878
  }
2839
2879
  LocalBmpStringValueBlock.NAME = "BmpStringValueBlock";
@@ -3045,7 +3085,7 @@ class UTCTime extends VisibleString {
3045
3085
  this.idBlock.tagNumber = 23;
3046
3086
  }
3047
3087
  fromBuffer(inputBuffer) {
3048
- this.fromString(String.fromCharCode.apply(null, BufferSourceConverter_1.toUint8Array(inputBuffer)));
3088
+ this.fromString(String.fromCharCode.apply(null, buildExports.BufferSourceConverter.toUint8Array(inputBuffer)));
3049
3089
  }
3050
3090
  toBuffer() {
3051
3091
  const str = this.toString();
@@ -3395,17 +3435,17 @@ class Repeated extends Any {
3395
3435
 
3396
3436
  class RawData {
3397
3437
  constructor({ data = EMPTY_VIEW } = {}) {
3398
- this.dataView = BufferSourceConverter_1.toUint8Array(data);
3438
+ this.dataView = buildExports.BufferSourceConverter.toUint8Array(data);
3399
3439
  }
3400
3440
  get data() {
3401
3441
  return this.dataView.slice().buffer;
3402
3442
  }
3403
3443
  set data(value) {
3404
- this.dataView = BufferSourceConverter_1.toUint8Array(value);
3444
+ this.dataView = buildExports.BufferSourceConverter.toUint8Array(value);
3405
3445
  }
3406
3446
  fromBER(inputBuffer, inputOffset, inputLength) {
3407
3447
  const endLength = inputOffset + inputLength;
3408
- this.dataView = BufferSourceConverter_1.toUint8Array(inputBuffer).subarray(inputOffset, endLength);
3448
+ this.dataView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer).subarray(inputOffset, endLength);
3409
3449
  return endLength;
3410
3450
  }
3411
3451
  toBER(sizeOnly) {
@@ -3724,7 +3764,7 @@ function verifySchema(inputBuffer, inputSchema) {
3724
3764
  result: { error: "Wrong ASN.1 schema type" }
3725
3765
  };
3726
3766
  }
3727
- const asn1 = localFromBER(BufferSourceConverter_1.toUint8Array(inputBuffer));
3767
+ const asn1 = localFromBER(buildExports.BufferSourceConverter.toUint8Array(inputBuffer));
3728
3768
  if (asn1.offset === -1) {
3729
3769
  return {
3730
3770
  verified: false,
@@ -3734,7 +3774,7 @@ function verifySchema(inputBuffer, inputSchema) {
3734
3774
  return compareSchema(asn1.result, asn1.result, inputSchema);
3735
3775
  }
3736
3776
 
3737
- const asn1js = /*#__PURE__*/Object.freeze({
3777
+ var asn1js = /*#__PURE__*/Object.freeze({
3738
3778
  __proto__: null,
3739
3779
  Any: Any,
3740
3780
  BaseBlock: BaseBlock,
@@ -3827,9 +3867,9 @@ class BitString {
3827
3867
  if (typeof params === "number") {
3828
3868
  this.fromNumber(params);
3829
3869
  }
3830
- else if (BufferSourceConverter_1.isBufferSource(params)) {
3870
+ else if (buildExports.BufferSourceConverter.isBufferSource(params)) {
3831
3871
  this.unusedBits = unusedBits;
3832
- this.value = BufferSourceConverter_1.toArrayBuffer(params);
3872
+ this.value = buildExports.BufferSourceConverter.toArrayBuffer(params);
3833
3873
  }
3834
3874
  else {
3835
3875
  throw TypeError("Unsupported type of 'params' argument for BitString");
@@ -3867,7 +3907,11 @@ class BitString {
3867
3907
  const octetSize = (bits.length + 7) >> 3;
3868
3908
  this.unusedBits = (octetSize << 3) - bits.length;
3869
3909
  const octets = new Uint8Array(octetSize);
3870
- bits = bits.padStart(octetSize << 3, "0").split("").reverse().join("");
3910
+ bits = bits
3911
+ .padStart(octetSize << 3, "0")
3912
+ .split("")
3913
+ .reverse()
3914
+ .join("");
3871
3915
  let index = 0;
3872
3916
  while (index < octetSize) {
3873
3917
  octets[index] = parseInt(bits.slice(index << 3, (index << 3) + 8), 2);
@@ -3889,8 +3933,8 @@ class OctetString {
3889
3933
  this.buffer = new ArrayBuffer(param);
3890
3934
  }
3891
3935
  else {
3892
- if (BufferSourceConverter_1.isBufferSource(param)) {
3893
- this.buffer = BufferSourceConverter_1.toArrayBuffer(param);
3936
+ if (buildExports.BufferSourceConverter.isBufferSource(param)) {
3937
+ this.buffer = buildExports.BufferSourceConverter.toArrayBuffer(param);
3894
3938
  }
3895
3939
  else if (Array.isArray(param)) {
3896
3940
  this.buffer = new Uint8Array(param);
@@ -4128,7 +4172,7 @@ class AsnSchemaStorage {
4128
4172
  const item = schema.items[key];
4129
4173
  const name = useNames ? key : "";
4130
4174
  let asn1Item;
4131
- if (typeof (item.type) === "number") {
4175
+ if (typeof item.type === "number") {
4132
4176
  const Asn1TypeName = AsnPropTypes[item.type];
4133
4177
  const Asn1Type = asn1js[Asn1TypeName];
4134
4178
  if (!Asn1Type) {
@@ -4156,9 +4200,7 @@ class AsnSchemaStorage {
4156
4200
  const optional = !!item.optional || item.defaultValue !== undefined;
4157
4201
  if (item.repeated) {
4158
4202
  asn1Item.name = "";
4159
- const Container = item.repeated === "set"
4160
- ? Set
4161
- : Sequence;
4203
+ const Container = item.repeated === "set" ? Set : Sequence;
4162
4204
  asn1Item = new Container({
4163
4205
  name: "",
4164
4206
  value: [
@@ -4172,9 +4214,7 @@ class AsnSchemaStorage {
4172
4214
  if (item.context !== null && item.context !== undefined) {
4173
4215
  if (item.implicit) {
4174
4216
  if (typeof item.type === "number" || isConvertible(item.type)) {
4175
- const Container = item.repeated
4176
- ? Constructed
4177
- : Primitive;
4217
+ const Container = item.repeated ? Constructed : Primitive;
4178
4218
  asn1Value.push(new Container({
4179
4219
  name,
4180
4220
  optional,
@@ -4187,10 +4227,11 @@ class AsnSchemaStorage {
4187
4227
  else {
4188
4228
  this.cache(item.type);
4189
4229
  const isRepeated = !!item.repeated;
4190
- let value = !isRepeated
4191
- ? this.get(item.type, true).schema
4192
- : asn1Item;
4193
- value = "valueBlock" in value ? value.valueBlock.value : value.value;
4230
+ let value = !isRepeated ? this.get(item.type, true).schema : asn1Item;
4231
+ value =
4232
+ "valueBlock" in value
4233
+ ? value.valueBlock.value
4234
+ : value.value;
4194
4235
  asn1Value.push(new Constructed({
4195
4236
  name: !isRepeated ? name : "",
4196
4237
  optional,
@@ -4351,16 +4392,15 @@ class AsnParser {
4351
4392
  }
4352
4393
  if (schemaItem.repeated) {
4353
4394
  if (schemaItem.implicit) {
4354
- const Container = schemaItem.repeated === "sequence"
4355
- ? Sequence
4356
- : Set;
4395
+ const Container = schemaItem.repeated === "sequence" ? Sequence : Set;
4357
4396
  const newItem = new Container();
4358
4397
  newItem.valueBlock = asn1SchemaValue.valueBlock;
4359
4398
  const newItemAsn = fromBER(newItem.toBER(false));
4360
4399
  if (newItemAsn.offset === -1) {
4361
4400
  throw new Error(`Cannot parse the child item. ${newItemAsn.result.error}`);
4362
4401
  }
4363
- if (!("value" in newItemAsn.result.valueBlock && Array.isArray(newItemAsn.result.valueBlock.value))) {
4402
+ if (!("value" in newItemAsn.result.valueBlock &&
4403
+ Array.isArray(newItemAsn.result.valueBlock.value))) {
4364
4404
  throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");
4365
4405
  }
4366
4406
  const value = newItemAsn.result.valueBlock.value;
@@ -4451,19 +4491,23 @@ class AsnSerializer {
4451
4491
  for (const key in schema.items) {
4452
4492
  const schemaItem = schema.items[key];
4453
4493
  const objProp = obj[key];
4454
- if (objProp === undefined
4455
- || schemaItem.defaultValue === objProp
4456
- || (typeof schemaItem.defaultValue === "object" && typeof objProp === "object"
4457
- && isArrayEqual(this.serialize(schemaItem.defaultValue), this.serialize(objProp)))) {
4494
+ if (objProp === undefined ||
4495
+ schemaItem.defaultValue === objProp ||
4496
+ (typeof schemaItem.defaultValue === "object" &&
4497
+ typeof objProp === "object" &&
4498
+ isArrayEqual(this.serialize(schemaItem.defaultValue), this.serialize(objProp)))) {
4458
4499
  continue;
4459
4500
  }
4460
4501
  const asn1Item = AsnSerializer.toAsnItem(schemaItem, key, target, objProp);
4461
4502
  if (typeof schemaItem.context === "number") {
4462
4503
  if (schemaItem.implicit) {
4463
- if (!schemaItem.repeated
4464
- && (typeof schemaItem.type === "number" || isConvertible(schemaItem.type))) {
4504
+ if (!schemaItem.repeated &&
4505
+ (typeof schemaItem.type === "number" || isConvertible(schemaItem.type))) {
4465
4506
  const value = {};
4466
- value.valueHex = asn1Item instanceof Null ? asn1Item.valueBeforeDecodeView : asn1Item.valueBlock.toBER();
4507
+ value.valueHex =
4508
+ asn1Item instanceof Null
4509
+ ? asn1Item.valueBeforeDecodeView
4510
+ : asn1Item.valueBlock.toBER();
4467
4511
  asn1Value.push(new Primitive({
4468
4512
  optional: schemaItem.optional,
4469
4513
  idBlock: {
@@ -4519,1116 +4563,214 @@ class AsnSerializer {
4519
4563
  break;
4520
4564
  }
4521
4565
  return asnSchema;
4522
- }
4523
- static toAsnItem(schemaItem, key, target, objProp) {
4524
- let asn1Item;
4525
- if (typeof (schemaItem.type) === "number") {
4526
- const converter = schemaItem.converter;
4527
- if (!converter) {
4528
- throw new Error(`Property '${key}' doesn't have converter for type ${AsnPropTypes[schemaItem.type]} in schema '${target.name}'`);
4529
- }
4530
- if (schemaItem.repeated) {
4531
- if (!Array.isArray(objProp)) {
4532
- throw new TypeError("Parameter 'objProp' should be type of Array.");
4533
- }
4534
- const items = Array.from(objProp, (element) => converter.toASN(element));
4535
- const Container = schemaItem.repeated === "sequence"
4536
- ? Sequence
4537
- : Set;
4538
- asn1Item = new Container({
4539
- value: items,
4540
- });
4541
- }
4542
- else {
4543
- asn1Item = converter.toASN(objProp);
4544
- }
4545
- }
4546
- else {
4547
- if (schemaItem.repeated) {
4548
- if (!Array.isArray(objProp)) {
4549
- throw new TypeError("Parameter 'objProp' should be type of Array.");
4550
- }
4551
- const items = Array.from(objProp, (element) => this.toASN(element));
4552
- const Container = schemaItem.repeated === "sequence"
4553
- ? Sequence
4554
- : Set;
4555
- asn1Item = new Container({
4556
- value: items,
4557
- });
4558
- }
4559
- else {
4560
- asn1Item = this.toASN(objProp);
4561
- }
4562
- }
4563
- return asn1Item;
4564
- }
4565
- }
4566
-
4567
- class AsnArray extends Array {
4568
- constructor(items = []) {
4569
- if (typeof items === "number") {
4570
- super(items);
4571
- }
4572
- else {
4573
- super();
4574
- for (const item of items) {
4575
- this.push(item);
4576
- }
4577
- }
4578
- }
4579
- }
4580
-
4581
- class AsnConvert {
4582
- static serialize(obj) {
4583
- return AsnSerializer.serialize(obj);
4584
- }
4585
- static parse(data, target) {
4586
- return AsnParser.parse(data, target);
4587
- }
4588
- static toString(data) {
4589
- const buf = BufferSourceConverter_1.isBufferSource(data)
4590
- ? BufferSourceConverter_1.toArrayBuffer(data)
4591
- : AsnConvert.serialize(data);
4592
- const asn = fromBER(buf);
4593
- if (asn.offset === -1) {
4594
- throw new Error(`Cannot decode ASN.1 data. ${asn.result.error}`);
4595
- }
4596
- return asn.result.toString();
4597
- }
4598
- }
4599
-
4600
- /******************************************************************************
4601
- Copyright (c) Microsoft Corporation.
4602
-
4603
- Permission to use, copy, modify, and/or distribute this software for any
4604
- purpose with or without fee is hereby granted.
4605
-
4606
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
4607
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
4608
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
4609
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
4610
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
4611
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
4612
- PERFORMANCE OF THIS SOFTWARE.
4613
- ***************************************************************************** */
4614
-
4615
- function __decorate$1(decorators, target, key, desc) {
4616
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4617
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4618
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4619
- return c > 3 && r && Object.defineProperty(target, key, r), r;
4620
- }
4621
-
4622
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
4623
- var e = new Error(message);
4624
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
4625
- };
4626
-
4627
- var ipaddr = {exports: {}};
4628
-
4629
- (function (module) {
4630
- (function (root) {
4631
- // A list of regular expressions that match arbitrary IPv4 addresses,
4632
- // for which a number of weird notations exist.
4633
- // Note that an address like 0010.0xa5.1.1 is considered legal.
4634
- const ipv4Part = '(0?\\d+|0x[a-f0-9]+)';
4635
- const ipv4Regexes = {
4636
- fourOctet: new RegExp(`^${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}$`, 'i'),
4637
- threeOctet: new RegExp(`^${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}$`, 'i'),
4638
- twoOctet: new RegExp(`^${ipv4Part}\\.${ipv4Part}$`, 'i'),
4639
- longValue: new RegExp(`^${ipv4Part}$`, 'i')
4640
- };
4641
-
4642
- // Regular Expression for checking Octal numbers
4643
- const octalRegex = new RegExp(`^0[0-7]+$`, 'i');
4644
- const hexRegex = new RegExp(`^0x[a-f0-9]+$`, 'i');
4645
-
4646
- const zoneIndex = '%[0-9a-z]{1,}';
4647
-
4648
- // IPv6-matching regular expressions.
4649
- // For IPv6, the task is simpler: it is enough to match the colon-delimited
4650
- // hexadecimal IPv6 and a transitional variant with dotted-decimal IPv4 at
4651
- // the end.
4652
- const ipv6Part = '(?:[0-9a-f]+::?)+';
4653
- const ipv6Regexes = {
4654
- zoneIndex: new RegExp(zoneIndex, 'i'),
4655
- 'native': new RegExp(`^(::)?(${ipv6Part})?([0-9a-f]+)?(::)?(${zoneIndex})?$`, 'i'),
4656
- deprecatedTransitional: new RegExp(`^(?:::)(${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}(${zoneIndex})?)$`, 'i'),
4657
- transitional: new RegExp(`^((?:${ipv6Part})|(?:::)(?:${ipv6Part})?)${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}(${zoneIndex})?$`, 'i')
4658
- };
4659
-
4660
- // Expand :: in an IPv6 address or address part consisting of `parts` groups.
4661
- function expandIPv6 (string, parts) {
4662
- // More than one '::' means invalid adddress
4663
- if (string.indexOf('::') !== string.lastIndexOf('::')) {
4664
- return null;
4665
- }
4666
-
4667
- let colonCount = 0;
4668
- let lastColon = -1;
4669
- let zoneId = (string.match(ipv6Regexes.zoneIndex) || [])[0];
4670
- let replacement, replacementCount;
4671
-
4672
- // Remove zone index and save it for later
4673
- if (zoneId) {
4674
- zoneId = zoneId.substring(1);
4675
- string = string.replace(/%.+$/, '');
4676
- }
4677
-
4678
- // How many parts do we already have?
4679
- while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) {
4680
- colonCount++;
4681
- }
4682
-
4683
- // 0::0 is two parts more than ::
4684
- if (string.substr(0, 2) === '::') {
4685
- colonCount--;
4686
- }
4687
-
4688
- if (string.substr(-2, 2) === '::') {
4689
- colonCount--;
4690
- }
4691
-
4692
- // The following loop would hang if colonCount > parts
4693
- if (colonCount > parts) {
4694
- return null;
4695
- }
4696
-
4697
- // replacement = ':' + '0:' * (parts - colonCount)
4698
- replacementCount = parts - colonCount;
4699
- replacement = ':';
4700
- while (replacementCount--) {
4701
- replacement += '0:';
4702
- }
4703
-
4704
- // Insert the missing zeroes
4705
- string = string.replace('::', replacement);
4706
-
4707
- // Trim any garbage which may be hanging around if :: was at the edge in
4708
- // the source strin
4709
- if (string[0] === ':') {
4710
- string = string.slice(1);
4711
- }
4712
-
4713
- if (string[string.length - 1] === ':') {
4714
- string = string.slice(0, -1);
4715
- }
4716
-
4717
- parts = (function () {
4718
- const ref = string.split(':');
4719
- const results = [];
4720
-
4721
- for (let i = 0; i < ref.length; i++) {
4722
- results.push(parseInt(ref[i], 16));
4723
- }
4724
-
4725
- return results;
4726
- })();
4727
-
4728
- return {
4729
- parts: parts,
4730
- zoneId: zoneId
4731
- };
4732
- }
4733
-
4734
- // A generic CIDR (Classless Inter-Domain Routing) RFC1518 range matcher.
4735
- function matchCIDR (first, second, partSize, cidrBits) {
4736
- if (first.length !== second.length) {
4737
- throw new Error('ipaddr: cannot match CIDR for objects with different lengths');
4738
- }
4739
-
4740
- let part = 0;
4741
- let shift;
4742
-
4743
- while (cidrBits > 0) {
4744
- shift = partSize - cidrBits;
4745
- if (shift < 0) {
4746
- shift = 0;
4747
- }
4748
-
4749
- if (first[part] >> shift !== second[part] >> shift) {
4750
- return false;
4751
- }
4752
-
4753
- cidrBits -= partSize;
4754
- part += 1;
4755
- }
4756
-
4757
- return true;
4758
- }
4759
-
4760
- function parseIntAuto (string) {
4761
- // Hexadedimal base 16 (0x#)
4762
- if (hexRegex.test(string)) {
4763
- return parseInt(string, 16);
4764
- }
4765
- // While octal representation is discouraged by ECMAScript 3
4766
- // and forbidden by ECMAScript 5, we silently allow it to
4767
- // work only if the rest of the string has numbers less than 8.
4768
- if (string[0] === '0' && !isNaN(parseInt(string[1], 10))) {
4769
- if (octalRegex.test(string)) {
4770
- return parseInt(string, 8);
4771
- }
4772
- throw new Error(`ipaddr: cannot parse ${string} as octal`);
4773
- }
4774
- // Always include the base 10 radix!
4775
- return parseInt(string, 10);
4776
- }
4777
-
4778
- function padPart (part, length) {
4779
- while (part.length < length) {
4780
- part = `0${part}`;
4781
- }
4782
-
4783
- return part;
4784
- }
4785
-
4786
- const ipaddr = {};
4787
-
4788
- // An IPv4 address (RFC791).
4789
- ipaddr.IPv4 = (function () {
4790
- // Constructs a new IPv4 address from an array of four octets
4791
- // in network order (MSB first)
4792
- // Verifies the input.
4793
- function IPv4 (octets) {
4794
- if (octets.length !== 4) {
4795
- throw new Error('ipaddr: ipv4 octet count should be 4');
4796
- }
4797
-
4798
- let i, octet;
4799
-
4800
- for (i = 0; i < octets.length; i++) {
4801
- octet = octets[i];
4802
- if (!((0 <= octet && octet <= 255))) {
4803
- throw new Error('ipaddr: ipv4 octet should fit in 8 bits');
4804
- }
4805
- }
4806
-
4807
- this.octets = octets;
4808
- }
4809
-
4810
- // Special IPv4 address ranges.
4811
- // See also https://en.wikipedia.org/wiki/Reserved_IP_addresses
4812
- IPv4.prototype.SpecialRanges = {
4813
- unspecified: [[new IPv4([0, 0, 0, 0]), 8]],
4814
- broadcast: [[new IPv4([255, 255, 255, 255]), 32]],
4815
- // RFC3171
4816
- multicast: [[new IPv4([224, 0, 0, 0]), 4]],
4817
- // RFC3927
4818
- linkLocal: [[new IPv4([169, 254, 0, 0]), 16]],
4819
- // RFC5735
4820
- loopback: [[new IPv4([127, 0, 0, 0]), 8]],
4821
- // RFC6598
4822
- carrierGradeNat: [[new IPv4([100, 64, 0, 0]), 10]],
4823
- // RFC1918
4824
- 'private': [
4825
- [new IPv4([10, 0, 0, 0]), 8],
4826
- [new IPv4([172, 16, 0, 0]), 12],
4827
- [new IPv4([192, 168, 0, 0]), 16]
4828
- ],
4829
- // Reserved and testing-only ranges; RFCs 5735, 5737, 2544, 1700
4830
- reserved: [
4831
- [new IPv4([192, 0, 0, 0]), 24],
4832
- [new IPv4([192, 0, 2, 0]), 24],
4833
- [new IPv4([192, 88, 99, 0]), 24],
4834
- [new IPv4([198, 18, 0, 0]), 15],
4835
- [new IPv4([198, 51, 100, 0]), 24],
4836
- [new IPv4([203, 0, 113, 0]), 24],
4837
- [new IPv4([240, 0, 0, 0]), 4]
4838
- ]
4839
- };
4840
-
4841
- // The 'kind' method exists on both IPv4 and IPv6 classes.
4842
- IPv4.prototype.kind = function () {
4843
- return 'ipv4';
4844
- };
4845
-
4846
- // Checks if this address matches other one within given CIDR range.
4847
- IPv4.prototype.match = function (other, cidrRange) {
4848
- let ref;
4849
- if (cidrRange === undefined) {
4850
- ref = other;
4851
- other = ref[0];
4852
- cidrRange = ref[1];
4853
- }
4854
-
4855
- if (other.kind() !== 'ipv4') {
4856
- throw new Error('ipaddr: cannot match ipv4 address with non-ipv4 one');
4857
- }
4858
-
4859
- return matchCIDR(this.octets, other.octets, 8, cidrRange);
4860
- };
4861
-
4862
- // returns a number of leading ones in IPv4 address, making sure that
4863
- // the rest is a solid sequence of 0's (valid netmask)
4864
- // returns either the CIDR length or null if mask is not valid
4865
- IPv4.prototype.prefixLengthFromSubnetMask = function () {
4866
- let cidr = 0;
4867
- // non-zero encountered stop scanning for zeroes
4868
- let stop = false;
4869
- // number of zeroes in octet
4870
- const zerotable = {
4871
- 0: 8,
4872
- 128: 7,
4873
- 192: 6,
4874
- 224: 5,
4875
- 240: 4,
4876
- 248: 3,
4877
- 252: 2,
4878
- 254: 1,
4879
- 255: 0
4880
- };
4881
- let i, octet, zeros;
4882
-
4883
- for (i = 3; i >= 0; i -= 1) {
4884
- octet = this.octets[i];
4885
- if (octet in zerotable) {
4886
- zeros = zerotable[octet];
4887
- if (stop && zeros !== 0) {
4888
- return null;
4889
- }
4890
-
4891
- if (zeros !== 8) {
4892
- stop = true;
4893
- }
4894
-
4895
- cidr += zeros;
4896
- } else {
4897
- return null;
4898
- }
4899
- }
4900
-
4901
- return 32 - cidr;
4902
- };
4903
-
4904
- // Checks if the address corresponds to one of the special ranges.
4905
- IPv4.prototype.range = function () {
4906
- return ipaddr.subnetMatch(this, this.SpecialRanges);
4907
- };
4908
-
4909
- // Returns an array of byte-sized values in network order (MSB first)
4910
- IPv4.prototype.toByteArray = function () {
4911
- return this.octets.slice(0);
4912
- };
4913
-
4914
- // Converts this IPv4 address to an IPv4-mapped IPv6 address.
4915
- IPv4.prototype.toIPv4MappedAddress = function () {
4916
- return ipaddr.IPv6.parse(`::ffff:${this.toString()}`);
4917
- };
4918
-
4919
- // Symmetrical method strictly for aligning with the IPv6 methods.
4920
- IPv4.prototype.toNormalizedString = function () {
4921
- return this.toString();
4922
- };
4923
-
4924
- // Returns the address in convenient, decimal-dotted format.
4925
- IPv4.prototype.toString = function () {
4926
- return this.octets.join('.');
4927
- };
4928
-
4929
- return IPv4;
4930
- })();
4931
-
4932
- // A utility function to return broadcast address given the IPv4 interface and prefix length in CIDR notation
4933
- ipaddr.IPv4.broadcastAddressFromCIDR = function (string) {
4934
-
4935
- try {
4936
- const cidr = this.parseCIDR(string);
4937
- const ipInterfaceOctets = cidr[0].toByteArray();
4938
- const subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();
4939
- const octets = [];
4940
- let i = 0;
4941
- while (i < 4) {
4942
- // Broadcast address is bitwise OR between ip interface and inverted mask
4943
- octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255);
4944
- i++;
4945
- }
4946
-
4947
- return new this(octets);
4948
- } catch (e) {
4949
- throw new Error('ipaddr: the address does not have IPv4 CIDR format');
4950
- }
4951
- };
4952
-
4953
- // Checks if a given string is formatted like IPv4 address.
4954
- ipaddr.IPv4.isIPv4 = function (string) {
4955
- return this.parser(string) !== null;
4956
- };
4957
-
4958
- // Checks if a given string is a valid IPv4 address.
4959
- ipaddr.IPv4.isValid = function (string) {
4960
- try {
4961
- new this(this.parser(string));
4962
- return true;
4963
- } catch (e) {
4964
- return false;
4965
- }
4966
- };
4967
-
4968
- // Checks if a given string is a full four-part IPv4 Address.
4969
- ipaddr.IPv4.isValidFourPartDecimal = function (string) {
4970
- if (ipaddr.IPv4.isValid(string) && string.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/)) {
4971
- return true;
4972
- } else {
4973
- return false;
4974
- }
4975
- };
4976
-
4977
- // A utility function to return network address given the IPv4 interface and prefix length in CIDR notation
4978
- ipaddr.IPv4.networkAddressFromCIDR = function (string) {
4979
- let cidr, i, ipInterfaceOctets, octets, subnetMaskOctets;
4980
-
4981
- try {
4982
- cidr = this.parseCIDR(string);
4983
- ipInterfaceOctets = cidr[0].toByteArray();
4984
- subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();
4985
- octets = [];
4986
- i = 0;
4987
- while (i < 4) {
4988
- // Network address is bitwise AND between ip interface and mask
4989
- octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10));
4990
- i++;
4991
- }
4992
-
4993
- return new this(octets);
4994
- } catch (e) {
4995
- throw new Error('ipaddr: the address does not have IPv4 CIDR format');
4996
- }
4997
- };
4998
-
4999
- // Tries to parse and validate a string with IPv4 address.
5000
- // Throws an error if it fails.
5001
- ipaddr.IPv4.parse = function (string) {
5002
- const parts = this.parser(string);
5003
-
5004
- if (parts === null) {
5005
- throw new Error('ipaddr: string is not formatted like an IPv4 Address');
5006
- }
5007
-
5008
- return new this(parts);
5009
- };
5010
-
5011
- // Parses the string as an IPv4 Address with CIDR Notation.
5012
- ipaddr.IPv4.parseCIDR = function (string) {
5013
- let match;
5014
-
5015
- if ((match = string.match(/^(.+)\/(\d+)$/))) {
5016
- const maskLength = parseInt(match[2]);
5017
- if (maskLength >= 0 && maskLength <= 32) {
5018
- const parsed = [this.parse(match[1]), maskLength];
5019
- Object.defineProperty(parsed, 'toString', {
5020
- value: function () {
5021
- return this.join('/');
5022
- }
5023
- });
5024
- return parsed;
5025
- }
5026
- }
5027
-
5028
- throw new Error('ipaddr: string is not formatted like an IPv4 CIDR range');
5029
- };
5030
-
5031
- // Classful variants (like a.b, where a is an octet, and b is a 24-bit
5032
- // value representing last three octets; this corresponds to a class C
5033
- // address) are omitted due to classless nature of modern Internet.
5034
- ipaddr.IPv4.parser = function (string) {
5035
- let match, part, value;
5036
-
5037
- // parseInt recognizes all that octal & hexadecimal weirdness for us
5038
- if ((match = string.match(ipv4Regexes.fourOctet))) {
5039
- return (function () {
5040
- const ref = match.slice(1, 6);
5041
- const results = [];
5042
-
5043
- for (let i = 0; i < ref.length; i++) {
5044
- part = ref[i];
5045
- results.push(parseIntAuto(part));
5046
- }
5047
-
5048
- return results;
5049
- })();
5050
- } else if ((match = string.match(ipv4Regexes.longValue))) {
5051
- value = parseIntAuto(match[1]);
5052
- if (value > 0xffffffff || value < 0) {
5053
- throw new Error('ipaddr: address outside defined range');
5054
- }
5055
-
5056
- return ((function () {
5057
- const results = [];
5058
- let shift;
5059
-
5060
- for (shift = 0; shift <= 24; shift += 8) {
5061
- results.push((value >> shift) & 0xff);
5062
- }
5063
-
5064
- return results;
5065
- })()).reverse();
5066
- } else if ((match = string.match(ipv4Regexes.twoOctet))) {
5067
- return (function () {
5068
- const ref = match.slice(1, 4);
5069
- const results = [];
5070
-
5071
- value = parseIntAuto(ref[1]);
5072
- if (value > 0xffffff || value < 0) {
5073
- throw new Error('ipaddr: address outside defined range');
5074
- }
5075
-
5076
- results.push(parseIntAuto(ref[0]));
5077
- results.push((value >> 16) & 0xff);
5078
- results.push((value >> 8) & 0xff);
5079
- results.push( value & 0xff);
5080
-
5081
- return results;
5082
- })();
5083
- } else if ((match = string.match(ipv4Regexes.threeOctet))) {
5084
- return (function () {
5085
- const ref = match.slice(1, 5);
5086
- const results = [];
5087
-
5088
- value = parseIntAuto(ref[2]);
5089
- if (value > 0xffff || value < 0) {
5090
- throw new Error('ipaddr: address outside defined range');
5091
- }
5092
-
5093
- results.push(parseIntAuto(ref[0]));
5094
- results.push(parseIntAuto(ref[1]));
5095
- results.push((value >> 8) & 0xff);
5096
- results.push( value & 0xff);
5097
-
5098
- return results;
5099
- })();
5100
- } else {
5101
- return null;
5102
- }
5103
- };
5104
-
5105
- // A utility function to return subnet mask in IPv4 format given the prefix length
5106
- ipaddr.IPv4.subnetMaskFromPrefixLength = function (prefix) {
5107
- prefix = parseInt(prefix);
5108
- if (prefix < 0 || prefix > 32) {
5109
- throw new Error('ipaddr: invalid IPv4 prefix length');
5110
- }
5111
-
5112
- const octets = [0, 0, 0, 0];
5113
- let j = 0;
5114
- const filledOctetCount = Math.floor(prefix / 8);
5115
-
5116
- while (j < filledOctetCount) {
5117
- octets[j] = 255;
5118
- j++;
5119
- }
5120
-
5121
- if (filledOctetCount < 4) {
5122
- octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - (prefix % 8);
5123
- }
5124
-
5125
- return new this(octets);
5126
- };
5127
-
5128
- // An IPv6 address (RFC2460)
5129
- ipaddr.IPv6 = (function () {
5130
- // Constructs an IPv6 address from an array of eight 16 - bit parts
5131
- // or sixteen 8 - bit parts in network order(MSB first).
5132
- // Throws an error if the input is invalid.
5133
- function IPv6 (parts, zoneId) {
5134
- let i, part;
5135
-
5136
- if (parts.length === 16) {
5137
- this.parts = [];
5138
- for (i = 0; i <= 14; i += 2) {
5139
- this.parts.push((parts[i] << 8) | parts[i + 1]);
5140
- }
5141
- } else if (parts.length === 8) {
5142
- this.parts = parts;
5143
- } else {
5144
- throw new Error('ipaddr: ipv6 part count should be 8 or 16');
5145
- }
5146
-
5147
- for (i = 0; i < this.parts.length; i++) {
5148
- part = this.parts[i];
5149
- if (!((0 <= part && part <= 0xffff))) {
5150
- throw new Error('ipaddr: ipv6 part should fit in 16 bits');
5151
- }
5152
- }
5153
-
5154
- if (zoneId) {
5155
- this.zoneId = zoneId;
5156
- }
5157
- }
5158
-
5159
- // Special IPv6 ranges
5160
- IPv6.prototype.SpecialRanges = {
5161
- // RFC4291, here and after
5162
- unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128],
5163
- linkLocal: [new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10],
5164
- multicast: [new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8],
5165
- loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128],
5166
- uniqueLocal: [new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7],
5167
- ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96],
5168
- // RFC6145
5169
- rfc6145: [new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96],
5170
- // RFC6052
5171
- rfc6052: [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96],
5172
- // RFC3056
5173
- '6to4': [new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16],
5174
- // RFC6052, RFC6146
5175
- teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32],
5176
- // RFC4291
5177
- reserved: [[new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32]],
5178
- benchmarking: [new IPv6([0x2001, 0x2, 0, 0, 0, 0, 0, 0]), 48],
5179
- amt: [new IPv6([0x2001, 0x3, 0, 0, 0, 0, 0, 0]), 32],
5180
- as112v6: [new IPv6([0x2001, 0x4, 0x112, 0, 0, 0, 0, 0]), 48],
5181
- deprecated: [new IPv6([0x2001, 0x10, 0, 0, 0, 0, 0, 0]), 28],
5182
- orchid2: [new IPv6([0x2001, 0x20, 0, 0, 0, 0, 0, 0]), 28]
5183
- };
5184
-
5185
- // Checks if this address is an IPv4-mapped IPv6 address.
5186
- IPv6.prototype.isIPv4MappedAddress = function () {
5187
- return this.range() === 'ipv4Mapped';
5188
- };
5189
-
5190
- // The 'kind' method exists on both IPv4 and IPv6 classes.
5191
- IPv6.prototype.kind = function () {
5192
- return 'ipv6';
5193
- };
5194
-
5195
- // Checks if this address matches other one within given CIDR range.
5196
- IPv6.prototype.match = function (other, cidrRange) {
5197
- let ref;
5198
-
5199
- if (cidrRange === undefined) {
5200
- ref = other;
5201
- other = ref[0];
5202
- cidrRange = ref[1];
5203
- }
5204
-
5205
- if (other.kind() !== 'ipv6') {
5206
- throw new Error('ipaddr: cannot match ipv6 address with non-ipv6 one');
5207
- }
5208
-
5209
- return matchCIDR(this.parts, other.parts, 16, cidrRange);
5210
- };
5211
-
5212
- // returns a number of leading ones in IPv6 address, making sure that
5213
- // the rest is a solid sequence of 0's (valid netmask)
5214
- // returns either the CIDR length or null if mask is not valid
5215
- IPv6.prototype.prefixLengthFromSubnetMask = function () {
5216
- let cidr = 0;
5217
- // non-zero encountered stop scanning for zeroes
5218
- let stop = false;
5219
- // number of zeroes in octet
5220
- const zerotable = {
5221
- 0: 16,
5222
- 32768: 15,
5223
- 49152: 14,
5224
- 57344: 13,
5225
- 61440: 12,
5226
- 63488: 11,
5227
- 64512: 10,
5228
- 65024: 9,
5229
- 65280: 8,
5230
- 65408: 7,
5231
- 65472: 6,
5232
- 65504: 5,
5233
- 65520: 4,
5234
- 65528: 3,
5235
- 65532: 2,
5236
- 65534: 1,
5237
- 65535: 0
5238
- };
5239
- let part, zeros;
5240
-
5241
- for (let i = 7; i >= 0; i -= 1) {
5242
- part = this.parts[i];
5243
- if (part in zerotable) {
5244
- zeros = zerotable[part];
5245
- if (stop && zeros !== 0) {
5246
- return null;
5247
- }
5248
-
5249
- if (zeros !== 16) {
5250
- stop = true;
5251
- }
5252
-
5253
- cidr += zeros;
5254
- } else {
5255
- return null;
5256
- }
5257
- }
5258
-
5259
- return 128 - cidr;
5260
- };
5261
-
5262
-
5263
- // Checks if the address corresponds to one of the special ranges.
5264
- IPv6.prototype.range = function () {
5265
- return ipaddr.subnetMatch(this, this.SpecialRanges);
5266
- };
5267
-
5268
- // Returns an array of byte-sized values in network order (MSB first)
5269
- IPv6.prototype.toByteArray = function () {
5270
- let part;
5271
- const bytes = [];
5272
- const ref = this.parts;
5273
- for (let i = 0; i < ref.length; i++) {
5274
- part = ref[i];
5275
- bytes.push(part >> 8);
5276
- bytes.push(part & 0xff);
5277
- }
5278
-
5279
- return bytes;
5280
- };
5281
-
5282
- // Returns the address in expanded format with all zeroes included, like
5283
- // 2001:0db8:0008:0066:0000:0000:0000:0001
5284
- IPv6.prototype.toFixedLengthString = function () {
5285
- const addr = ((function () {
5286
- const results = [];
5287
- for (let i = 0; i < this.parts.length; i++) {
5288
- results.push(padPart(this.parts[i].toString(16), 4));
5289
- }
5290
-
5291
- return results;
5292
- }).call(this)).join(':');
5293
-
5294
- let suffix = '';
5295
-
5296
- if (this.zoneId) {
5297
- suffix = `%${this.zoneId}`;
5298
- }
5299
-
5300
- return addr + suffix;
5301
- };
5302
-
5303
- // Converts this address to IPv4 address if it is an IPv4-mapped IPv6 address.
5304
- // Throws an error otherwise.
5305
- IPv6.prototype.toIPv4Address = function () {
5306
- if (!this.isIPv4MappedAddress()) {
5307
- throw new Error('ipaddr: trying to convert a generic ipv6 address to ipv4');
5308
- }
5309
-
5310
- const ref = this.parts.slice(-2);
5311
- const high = ref[0];
5312
- const low = ref[1];
5313
-
5314
- return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]);
5315
- };
5316
-
5317
- // Returns the address in expanded format with all zeroes included, like
5318
- // 2001:db8:8:66:0:0:0:1
5319
- //
5320
- // Deprecated: use toFixedLengthString() instead.
5321
- IPv6.prototype.toNormalizedString = function () {
5322
- const addr = ((function () {
5323
- const results = [];
5324
-
5325
- for (let i = 0; i < this.parts.length; i++) {
5326
- results.push(this.parts[i].toString(16));
5327
- }
5328
-
5329
- return results;
5330
- }).call(this)).join(':');
5331
-
5332
- let suffix = '';
5333
-
5334
- if (this.zoneId) {
5335
- suffix = `%${this.zoneId}`;
4566
+ }
4567
+ static toAsnItem(schemaItem, key, target, objProp) {
4568
+ let asn1Item;
4569
+ if (typeof schemaItem.type === "number") {
4570
+ const converter = schemaItem.converter;
4571
+ if (!converter) {
4572
+ throw new Error(`Property '${key}' doesn't have converter for type ${AsnPropTypes[schemaItem.type]} in schema '${target.name}'`);
5336
4573
  }
5337
-
5338
- return addr + suffix;
5339
- };
5340
-
5341
- // Returns the address in compact, human-readable format like
5342
- // 2001:db8:8:66::1
5343
- // in line with RFC 5952 (see https://tools.ietf.org/html/rfc5952#section-4)
5344
- IPv6.prototype.toRFC5952String = function () {
5345
- const regex = /((^|:)(0(:|$)){2,})/g;
5346
- const string = this.toNormalizedString();
5347
- let bestMatchIndex = 0;
5348
- let bestMatchLength = -1;
5349
- let match;
5350
-
5351
- while ((match = regex.exec(string))) {
5352
- if (match[0].length > bestMatchLength) {
5353
- bestMatchIndex = match.index;
5354
- bestMatchLength = match[0].length;
4574
+ if (schemaItem.repeated) {
4575
+ if (!Array.isArray(objProp)) {
4576
+ throw new TypeError("Parameter 'objProp' should be type of Array.");
5355
4577
  }
4578
+ const items = Array.from(objProp, (element) => converter.toASN(element));
4579
+ const Container = schemaItem.repeated === "sequence" ? Sequence : Set;
4580
+ asn1Item = new Container({
4581
+ value: items,
4582
+ });
5356
4583
  }
5357
-
5358
- if (bestMatchLength < 0) {
5359
- return string;
5360
- }
5361
-
5362
- return `${string.substring(0, bestMatchIndex)}::${string.substring(bestMatchIndex + bestMatchLength)}`;
5363
- };
5364
-
5365
- // Returns the address in compact, human-readable format like
5366
- // 2001:db8:8:66::1
5367
- // Calls toRFC5952String under the hood.
5368
- IPv6.prototype.toString = function () {
5369
- return this.toRFC5952String();
5370
- };
5371
-
5372
- return IPv6;
5373
-
5374
- })();
5375
-
5376
- // A utility function to return broadcast address given the IPv6 interface and prefix length in CIDR notation
5377
- ipaddr.IPv6.broadcastAddressFromCIDR = function (string) {
5378
- try {
5379
- const cidr = this.parseCIDR(string);
5380
- const ipInterfaceOctets = cidr[0].toByteArray();
5381
- const subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();
5382
- const octets = [];
5383
- let i = 0;
5384
- while (i < 16) {
5385
- // Broadcast address is bitwise OR between ip interface and inverted mask
5386
- octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255);
5387
- i++;
5388
- }
5389
-
5390
- return new this(octets);
5391
- } catch (e) {
5392
- throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`);
5393
- }
5394
- };
5395
-
5396
- // Checks if a given string is formatted like IPv6 address.
5397
- ipaddr.IPv6.isIPv6 = function (string) {
5398
- return this.parser(string) !== null;
5399
- };
5400
-
5401
- // Checks to see if string is a valid IPv6 Address
5402
- ipaddr.IPv6.isValid = function (string) {
5403
-
5404
- // Since IPv6.isValid is always called first, this shortcut
5405
- // provides a substantial performance gain.
5406
- if (typeof string === 'string' && string.indexOf(':') === -1) {
5407
- return false;
5408
- }
5409
-
5410
- try {
5411
- const addr = this.parser(string);
5412
- new this(addr.parts, addr.zoneId);
5413
- return true;
5414
- } catch (e) {
5415
- return false;
5416
- }
5417
- };
5418
-
5419
- // A utility function to return network address given the IPv6 interface and prefix length in CIDR notation
5420
- ipaddr.IPv6.networkAddressFromCIDR = function (string) {
5421
- let cidr, i, ipInterfaceOctets, octets, subnetMaskOctets;
5422
-
5423
- try {
5424
- cidr = this.parseCIDR(string);
5425
- ipInterfaceOctets = cidr[0].toByteArray();
5426
- subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();
5427
- octets = [];
5428
- i = 0;
5429
- while (i < 16) {
5430
- // Network address is bitwise AND between ip interface and mask
5431
- octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10));
5432
- i++;
4584
+ else {
4585
+ asn1Item = converter.toASN(objProp);
5433
4586
  }
5434
-
5435
- return new this(octets);
5436
- } catch (e) {
5437
- throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`);
5438
4587
  }
5439
- };
5440
-
5441
- // Tries to parse and validate a string with IPv6 address.
5442
- // Throws an error if it fails.
5443
- ipaddr.IPv6.parse = function (string) {
5444
- const addr = this.parser(string);
5445
-
5446
- if (addr.parts === null) {
5447
- throw new Error('ipaddr: string is not formatted like an IPv6 Address');
5448
- }
5449
-
5450
- return new this(addr.parts, addr.zoneId);
5451
- };
5452
-
5453
- ipaddr.IPv6.parseCIDR = function (string) {
5454
- let maskLength, match, parsed;
5455
-
5456
- if ((match = string.match(/^(.+)\/(\d+)$/))) {
5457
- maskLength = parseInt(match[2]);
5458
- if (maskLength >= 0 && maskLength <= 128) {
5459
- parsed = [this.parse(match[1]), maskLength];
5460
- Object.defineProperty(parsed, 'toString', {
5461
- value: function () {
5462
- return this.join('/');
5463
- }
4588
+ else {
4589
+ if (schemaItem.repeated) {
4590
+ if (!Array.isArray(objProp)) {
4591
+ throw new TypeError("Parameter 'objProp' should be type of Array.");
4592
+ }
4593
+ const items = Array.from(objProp, (element) => this.toASN(element));
4594
+ const Container = schemaItem.repeated === "sequence" ? Sequence : Set;
4595
+ asn1Item = new Container({
4596
+ value: items,
5464
4597
  });
5465
- return parsed;
4598
+ }
4599
+ else {
4600
+ asn1Item = this.toASN(objProp);
5466
4601
  }
5467
4602
  }
4603
+ return asn1Item;
4604
+ }
4605
+ }
5468
4606
 
5469
- throw new Error('ipaddr: string is not formatted like an IPv6 CIDR range');
5470
- };
5471
-
5472
- // Parse an IPv6 address.
5473
- ipaddr.IPv6.parser = function (string) {
5474
- let addr, i, match, octet, octets, zoneId;
5475
-
5476
- if ((match = string.match(ipv6Regexes.deprecatedTransitional))) {
5477
- return this.parser(`::ffff:${match[1]}`);
5478
- }
5479
- if (ipv6Regexes.native.test(string)) {
5480
- return expandIPv6(string, 8);
4607
+ class AsnArray extends Array {
4608
+ constructor(items = []) {
4609
+ if (typeof items === "number") {
4610
+ super(items);
5481
4611
  }
5482
- if ((match = string.match(ipv6Regexes.transitional))) {
5483
- zoneId = match[6] || '';
5484
- addr = expandIPv6(match[1].slice(0, -1) + zoneId, 6);
5485
- if (addr.parts) {
5486
- octets = [
5487
- parseInt(match[2]),
5488
- parseInt(match[3]),
5489
- parseInt(match[4]),
5490
- parseInt(match[5])
5491
- ];
5492
- for (i = 0; i < octets.length; i++) {
5493
- octet = octets[i];
5494
- if (!((0 <= octet && octet <= 255))) {
5495
- return null;
5496
- }
5497
- }
5498
-
5499
- addr.parts.push(octets[0] << 8 | octets[1]);
5500
- addr.parts.push(octets[2] << 8 | octets[3]);
5501
- return {
5502
- parts: addr.parts,
5503
- zoneId: addr.zoneId
5504
- };
4612
+ else {
4613
+ super();
4614
+ for (const item of items) {
4615
+ this.push(item);
5505
4616
  }
5506
4617
  }
4618
+ }
4619
+ }
5507
4620
 
5508
- return null;
5509
- };
5510
-
5511
- // A utility function to return subnet mask in IPv6 format given the prefix length
5512
- ipaddr.IPv6.subnetMaskFromPrefixLength = function (prefix) {
5513
- prefix = parseInt(prefix);
5514
- if (prefix < 0 || prefix > 128) {
5515
- throw new Error('ipaddr: invalid IPv6 prefix length');
5516
- }
5517
-
5518
- const octets = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
5519
- let j = 0;
5520
- const filledOctetCount = Math.floor(prefix / 8);
5521
-
5522
- while (j < filledOctetCount) {
5523
- octets[j] = 255;
5524
- j++;
4621
+ class AsnConvert {
4622
+ static serialize(obj) {
4623
+ return AsnSerializer.serialize(obj);
4624
+ }
4625
+ static parse(data, target) {
4626
+ return AsnParser.parse(data, target);
4627
+ }
4628
+ static toString(data) {
4629
+ const buf = buildExports.BufferSourceConverter.isBufferSource(data)
4630
+ ? buildExports.BufferSourceConverter.toArrayBuffer(data)
4631
+ : AsnConvert.serialize(data);
4632
+ const asn = fromBER(buf);
4633
+ if (asn.offset === -1) {
4634
+ throw new Error(`Cannot decode ASN.1 data. ${asn.result.error}`);
5525
4635
  }
4636
+ return asn.result.toString();
4637
+ }
4638
+ }
5526
4639
 
5527
- if (filledOctetCount < 16) {
5528
- octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - (prefix % 8);
5529
- }
4640
+ /******************************************************************************
4641
+ Copyright (c) Microsoft Corporation.
5530
4642
 
5531
- return new this(octets);
5532
- };
4643
+ Permission to use, copy, modify, and/or distribute this software for any
4644
+ purpose with or without fee is hereby granted.
5533
4645
 
5534
- // Try to parse an array in network order (MSB first) for IPv4 and IPv6
5535
- ipaddr.fromByteArray = function (bytes) {
5536
- const length = bytes.length;
4646
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
4647
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
4648
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
4649
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
4650
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
4651
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
4652
+ PERFORMANCE OF THIS SOFTWARE.
4653
+ ***************************************************************************** */
4654
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
5537
4655
 
5538
- if (length === 4) {
5539
- return new ipaddr.IPv4(bytes);
5540
- } else if (length === 16) {
5541
- return new ipaddr.IPv6(bytes);
5542
- } else {
5543
- throw new Error('ipaddr: the binary input is neither an IPv6 nor IPv4 address');
5544
- }
5545
- };
5546
4656
 
5547
- // Checks if the address is valid IP address
5548
- ipaddr.isValid = function (string) {
5549
- return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string);
5550
- };
4657
+ function __decorate$1(decorators, target, key, desc) {
4658
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4659
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4660
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4661
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
4662
+ }
5551
4663
 
4664
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
4665
+ var e = new Error(message);
4666
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
4667
+ };
5552
4668
 
5553
- // Attempts to parse an IP Address, first through IPv6 then IPv4.
5554
- // Throws an error if it could not be parsed.
5555
- ipaddr.parse = function (string) {
5556
- if (ipaddr.IPv6.isValid(string)) {
5557
- return ipaddr.IPv6.parse(string);
5558
- } else if (ipaddr.IPv4.isValid(string)) {
5559
- return ipaddr.IPv4.parse(string);
5560
- } else {
5561
- throw new Error('ipaddr: the address has neither IPv6 nor IPv4 format');
4669
+ class IpConverter {
4670
+ static isIPv4(ip) {
4671
+ return /^(\d{1,3}\.){3}\d{1,3}$/.test(ip);
4672
+ }
4673
+ static parseIPv4(ip) {
4674
+ const parts = ip.split(".");
4675
+ if (parts.length !== 4) {
4676
+ throw new Error("Invalid IPv4 address");
4677
+ }
4678
+ return parts.map((part) => {
4679
+ const num = parseInt(part, 10);
4680
+ if (isNaN(num) || num < 0 || num > 255) {
4681
+ throw new Error("Invalid IPv4 address part");
4682
+ }
4683
+ return num;
4684
+ });
4685
+ }
4686
+ static parseIPv6(ip) {
4687
+ const expandedIP = this.expandIPv6(ip);
4688
+ const parts = expandedIP.split(":");
4689
+ if (parts.length !== 8) {
4690
+ throw new Error("Invalid IPv6 address");
5562
4691
  }
5563
- };
5564
-
5565
- // Attempt to parse CIDR notation, first through IPv6 then IPv4.
5566
- // Throws an error if it could not be parsed.
5567
- ipaddr.parseCIDR = function (string) {
5568
- try {
5569
- return ipaddr.IPv6.parseCIDR(string);
5570
- } catch (e) {
5571
- try {
5572
- return ipaddr.IPv4.parseCIDR(string);
5573
- } catch (e2) {
5574
- throw new Error('ipaddr: the address has neither IPv6 nor IPv4 CIDR format');
4692
+ return parts.reduce((bytes, part) => {
4693
+ const num = parseInt(part, 16);
4694
+ if (isNaN(num) || num < 0 || num > 0xffff) {
4695
+ throw new Error("Invalid IPv6 address part");
4696
+ }
4697
+ bytes.push((num >> 8) & 0xff);
4698
+ bytes.push(num & 0xff);
4699
+ return bytes;
4700
+ }, []);
4701
+ }
4702
+ static expandIPv6(ip) {
4703
+ if (!ip.includes("::")) {
4704
+ return ip;
4705
+ }
4706
+ const parts = ip.split("::");
4707
+ if (parts.length > 2) {
4708
+ throw new Error("Invalid IPv6 address");
4709
+ }
4710
+ const left = parts[0] ? parts[0].split(":") : [];
4711
+ const right = parts[1] ? parts[1].split(":") : [];
4712
+ const missing = 8 - (left.length + right.length);
4713
+ if (missing < 0) {
4714
+ throw new Error("Invalid IPv6 address");
4715
+ }
4716
+ return [...left, ...Array(missing).fill("0"), ...right].join(":");
4717
+ }
4718
+ static formatIPv6(bytes) {
4719
+ const parts = [];
4720
+ for (let i = 0; i < 16; i += 2) {
4721
+ parts.push(((bytes[i] << 8) | bytes[i + 1]).toString(16));
4722
+ }
4723
+ return this.compressIPv6(parts.join(":"));
4724
+ }
4725
+ static compressIPv6(ip) {
4726
+ const parts = ip.split(":");
4727
+ let longestZeroStart = -1;
4728
+ let longestZeroLength = 0;
4729
+ let currentZeroStart = -1;
4730
+ let currentZeroLength = 0;
4731
+ for (let i = 0; i < parts.length; i++) {
4732
+ if (parts[i] === "0") {
4733
+ if (currentZeroStart === -1) {
4734
+ currentZeroStart = i;
4735
+ }
4736
+ currentZeroLength++;
4737
+ }
4738
+ else {
4739
+ if (currentZeroLength > longestZeroLength) {
4740
+ longestZeroStart = currentZeroStart;
4741
+ longestZeroLength = currentZeroLength;
4742
+ }
4743
+ currentZeroStart = -1;
4744
+ currentZeroLength = 0;
5575
4745
  }
5576
4746
  }
5577
- };
5578
-
5579
- // Parse an address and return plain IPv4 address if it is an IPv4-mapped address
5580
- ipaddr.process = function (string) {
5581
- const addr = this.parse(string);
5582
-
5583
- if (addr.kind() === 'ipv6' && addr.isIPv4MappedAddress()) {
5584
- return addr.toIPv4Address();
5585
- } else {
5586
- return addr;
4747
+ if (currentZeroLength > longestZeroLength) {
4748
+ longestZeroStart = currentZeroStart;
4749
+ longestZeroLength = currentZeroLength;
5587
4750
  }
5588
- };
5589
-
5590
- // An utility function to ease named range matching. See examples below.
5591
- // rangeList can contain both IPv4 and IPv6 subnet entries and will not throw errors
5592
- // on matching IPv4 addresses to IPv6 ranges or vice versa.
5593
- ipaddr.subnetMatch = function (address, rangeList, defaultName) {
5594
- let i, rangeName, rangeSubnets, subnet;
5595
-
5596
- if (defaultName === undefined || defaultName === null) {
5597
- defaultName = 'unicast';
4751
+ if (longestZeroLength > 1) {
4752
+ const before = parts.slice(0, longestZeroStart).join(":");
4753
+ const after = parts.slice(longestZeroStart + longestZeroLength).join(":");
4754
+ return `${before}::${after}`;
5598
4755
  }
5599
-
5600
- for (rangeName in rangeList) {
5601
- if (Object.prototype.hasOwnProperty.call(rangeList, rangeName)) {
5602
- rangeSubnets = rangeList[rangeName];
5603
- // ECMA5 Array.isArray isn't available everywhere
5604
- if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) {
5605
- rangeSubnets = [rangeSubnets];
5606
- }
5607
-
5608
- for (i = 0; i < rangeSubnets.length; i++) {
5609
- subnet = rangeSubnets[i];
5610
- if (address.kind() === subnet[0].kind() && address.match.apply(address, subnet)) {
5611
- return rangeName;
5612
- }
5613
- }
4756
+ return ip;
4757
+ }
4758
+ static parseCIDR(text) {
4759
+ const [addr, prefixStr] = text.split("/");
4760
+ const prefix = parseInt(prefixStr, 10);
4761
+ if (this.isIPv4(addr)) {
4762
+ if (prefix < 0 || prefix > 32) {
4763
+ throw new Error("Invalid IPv4 prefix length");
5614
4764
  }
4765
+ return [this.parseIPv4(addr), prefix];
4766
+ }
4767
+ else {
4768
+ if (prefix < 0 || prefix > 128) {
4769
+ throw new Error("Invalid IPv6 prefix length");
4770
+ }
4771
+ return [this.parseIPv6(addr), prefix];
5615
4772
  }
5616
-
5617
- return defaultName;
5618
- };
5619
-
5620
- // Export for both the CommonJS and browser-like environment
5621
- if (module.exports) {
5622
- module.exports = ipaddr;
5623
-
5624
- } else {
5625
- root.ipaddr = ipaddr;
5626
4773
  }
5627
-
5628
- }(commonjsGlobal));
5629
- }(ipaddr));
5630
-
5631
- class IpConverter {
5632
4774
  static decodeIP(value) {
5633
4775
  if (value.length === 64 && parseInt(value, 16) === 0) {
5634
4776
  return "::/0";
@@ -5638,24 +4780,62 @@ class IpConverter {
5638
4780
  }
5639
4781
  const mask = parseInt(value.slice(8), 16)
5640
4782
  .toString(2)
5641
- .split('')
5642
- .reduce((a, k) => a + (+k), 0);
5643
- let ip = value.slice(0, 8)
5644
- .replace(/(.{2})/g, match => `${parseInt(match, 16)}.`);
4783
+ .split("")
4784
+ .reduce((a, k) => a + +k, 0);
4785
+ let ip = value.slice(0, 8).replace(/(.{2})/g, (match) => `${parseInt(match, 16)}.`);
5645
4786
  ip = ip.slice(0, -1);
5646
4787
  return `${ip}/${mask}`;
5647
4788
  }
5648
4789
  static toString(buf) {
5649
- if (buf.byteLength === 4 || buf.byteLength === 16) {
5650
- const uint8 = new Uint8Array(buf);
5651
- const addr = ipaddr.exports.fromByteArray(Array.from(uint8));
5652
- return addr.toString();
4790
+ const uint8 = new Uint8Array(buf);
4791
+ if (uint8.length === 4) {
4792
+ return Array.from(uint8).join(".");
4793
+ }
4794
+ if (uint8.length === 16) {
4795
+ return this.formatIPv6(uint8);
4796
+ }
4797
+ if (uint8.length === 8 || uint8.length === 32) {
4798
+ const half = uint8.length / 2;
4799
+ const addrBytes = uint8.slice(0, half);
4800
+ const maskBytes = uint8.slice(half);
4801
+ const isAllZeros = uint8.every((byte) => byte === 0);
4802
+ if (isAllZeros) {
4803
+ return uint8.length === 8 ? "0.0.0.0/0" : "::/0";
4804
+ }
4805
+ const prefixLen = maskBytes.reduce((a, b) => a + (b.toString(2).match(/1/g) || []).length, 0);
4806
+ if (uint8.length === 8) {
4807
+ const addrStr = Array.from(addrBytes).join(".");
4808
+ return `${addrStr}/${prefixLen}`;
4809
+ }
4810
+ else {
4811
+ const addrStr = this.formatIPv6(addrBytes);
4812
+ return `${addrStr}/${prefixLen}`;
4813
+ }
5653
4814
  }
5654
- return this.decodeIP(Convert_1.ToHex(buf));
4815
+ return this.decodeIP(buildExports.Convert.ToHex(buf));
5655
4816
  }
5656
4817
  static fromString(text) {
5657
- const addr = ipaddr.exports.parse(text);
5658
- return new Uint8Array(addr.toByteArray()).buffer;
4818
+ if (text.includes("/")) {
4819
+ const [addr, prefix] = this.parseCIDR(text);
4820
+ const maskBytes = new Uint8Array(addr.length);
4821
+ let bitsLeft = prefix;
4822
+ for (let i = 0; i < maskBytes.length; i++) {
4823
+ if (bitsLeft >= 8) {
4824
+ maskBytes[i] = 0xff;
4825
+ bitsLeft -= 8;
4826
+ }
4827
+ else if (bitsLeft > 0) {
4828
+ maskBytes[i] = 0xff << (8 - bitsLeft);
4829
+ bitsLeft = 0;
4830
+ }
4831
+ }
4832
+ const out = new Uint8Array(addr.length * 2);
4833
+ out.set(addr, 0);
4834
+ out.set(maskBytes, addr.length);
4835
+ return out.buffer;
4836
+ }
4837
+ const bytes = this.isIPv4(text) ? this.parseIPv4(text) : this.parseIPv6(text);
4838
+ return new Uint8Array(bytes).buffer;
5659
4839
  }
5660
4840
  }
5661
4841
 
@@ -5665,8 +4845,12 @@ let DirectoryString = class DirectoryString {
5665
4845
  Object.assign(this, params);
5666
4846
  }
5667
4847
  toString() {
5668
- return this.bmpString || this.printableString || this.teletexString || this.universalString
5669
- || this.utf8String || "";
4848
+ return (this.bmpString ||
4849
+ this.printableString ||
4850
+ this.teletexString ||
4851
+ this.universalString ||
4852
+ this.utf8String ||
4853
+ "");
5670
4854
  }
5671
4855
  };
5672
4856
  __decorate$1([
@@ -5693,7 +4877,7 @@ let AttributeValue = class AttributeValue extends DirectoryString {
5693
4877
  Object.assign(this, params);
5694
4878
  }
5695
4879
  toString() {
5696
- return this.ia5String || (this.anyValue ? Convert_1.ToHex(this.anyValue) : super.toString());
4880
+ return this.ia5String || (this.anyValue ? buildExports.Convert.ToHex(this.anyValue) : super.toString());
5697
4881
  }
5698
4882
  };
5699
4883
  __decorate$1([
@@ -5802,7 +4986,12 @@ __decorate$1([
5802
4986
  AsnProp({ type: AsnPropTypes.IA5String, context: 6, implicit: true })
5803
4987
  ], GeneralName.prototype, "uniformResourceIdentifier", void 0);
5804
4988
  __decorate$1([
5805
- AsnProp({ type: AsnPropTypes.OctetString, context: 7, implicit: true, converter: AsnIpConverter })
4989
+ AsnProp({
4990
+ type: AsnPropTypes.OctetString,
4991
+ context: 7,
4992
+ implicit: true,
4993
+ converter: AsnIpConverter,
4994
+ })
5806
4995
  ], GeneralName.prototype, "iPAddress", void 0);
5807
4996
  __decorate$1([
5808
4997
  AsnProp({ type: AsnPropTypes.ObjectIdentifier, context: 8, implicit: true })
@@ -6136,19 +5325,39 @@ __decorate$1([
6136
5325
  AsnProp({ type: DistributionPointName, context: 0, optional: true })
6137
5326
  ], IssuingDistributionPoint.prototype, "distributionPoint", void 0);
6138
5327
  __decorate$1([
6139
- AsnProp({ type: AsnPropTypes.Boolean, context: 1, defaultValue: IssuingDistributionPoint.ONLY, implicit: true })
5328
+ AsnProp({
5329
+ type: AsnPropTypes.Boolean,
5330
+ context: 1,
5331
+ defaultValue: IssuingDistributionPoint.ONLY,
5332
+ implicit: true,
5333
+ })
6140
5334
  ], IssuingDistributionPoint.prototype, "onlyContainsUserCerts", void 0);
6141
5335
  __decorate$1([
6142
- AsnProp({ type: AsnPropTypes.Boolean, context: 2, defaultValue: IssuingDistributionPoint.ONLY, implicit: true })
5336
+ AsnProp({
5337
+ type: AsnPropTypes.Boolean,
5338
+ context: 2,
5339
+ defaultValue: IssuingDistributionPoint.ONLY,
5340
+ implicit: true,
5341
+ })
6143
5342
  ], IssuingDistributionPoint.prototype, "onlyContainsCACerts", void 0);
6144
5343
  __decorate$1([
6145
5344
  AsnProp({ type: Reason, context: 3, optional: true, implicit: true })
6146
5345
  ], IssuingDistributionPoint.prototype, "onlySomeReasons", void 0);
6147
5346
  __decorate$1([
6148
- AsnProp({ type: AsnPropTypes.Boolean, context: 4, defaultValue: IssuingDistributionPoint.ONLY, implicit: true })
5347
+ AsnProp({
5348
+ type: AsnPropTypes.Boolean,
5349
+ context: 4,
5350
+ defaultValue: IssuingDistributionPoint.ONLY,
5351
+ implicit: true,
5352
+ })
6149
5353
  ], IssuingDistributionPoint.prototype, "indirectCRL", void 0);
6150
5354
  __decorate$1([
6151
- AsnProp({ type: AsnPropTypes.Boolean, context: 5, defaultValue: IssuingDistributionPoint.ONLY, implicit: true })
5355
+ AsnProp({
5356
+ type: AsnPropTypes.Boolean,
5357
+ context: 5,
5358
+ defaultValue: IssuingDistributionPoint.ONLY,
5359
+ implicit: true,
5360
+ })
6152
5361
  ], IssuingDistributionPoint.prototype, "onlyContainsAttributeCerts", void 0);
6153
5362
 
6154
5363
  const id_ce_cRLReasons = `${id_ce}.21`;
@@ -6335,13 +5544,19 @@ class PolicyConstraints {
6335
5544
  }
6336
5545
  __decorate$1([
6337
5546
  AsnProp({
6338
- type: AsnPropTypes.Integer, context: 0, implicit: true, optional: true,
5547
+ type: AsnPropTypes.Integer,
5548
+ context: 0,
5549
+ implicit: true,
5550
+ optional: true,
6339
5551
  converter: AsnIntegerArrayBufferConverter,
6340
5552
  })
6341
5553
  ], PolicyConstraints.prototype, "requireExplicitPolicy", void 0);
6342
5554
  __decorate$1([
6343
5555
  AsnProp({
6344
- type: AsnPropTypes.Integer, context: 1, implicit: true, optional: true,
5556
+ type: AsnPropTypes.Integer,
5557
+ context: 1,
5558
+ implicit: true,
5559
+ optional: true,
6345
5560
  converter: AsnIntegerArrayBufferConverter,
6346
5561
  })
6347
5562
  ], PolicyConstraints.prototype, "inhibitPolicyMapping", void 0);
@@ -6383,13 +5598,13 @@ SubjectAlternativeName = SubjectAlternativeName_1 = __decorate$1([
6383
5598
  AsnType({ type: AsnTypeTypes.Sequence })
6384
5599
  ], SubjectAlternativeName);
6385
5600
 
6386
- class Attribute$1 {
5601
+ let Attribute$1 = class Attribute {
6387
5602
  constructor(params = {}) {
6388
5603
  this.type = "";
6389
5604
  this.values = [];
6390
5605
  Object.assign(this, params);
6391
5606
  }
6392
- }
5607
+ };
6393
5608
  __decorate$1([
6394
5609
  AsnProp({ type: AsnPropTypes.ObjectIdentifier })
6395
5610
  ], Attribute$1.prototype, "type", void 0);
@@ -6423,7 +5638,7 @@ __decorate$1([
6423
5638
  AsnProp({ type: AsnPropTypes.GeneralizedTime, context: 0, implicit: true, optional: true })
6424
5639
  ], PrivateKeyUsagePeriod.prototype, "notBefore", void 0);
6425
5640
  __decorate$1([
6426
- AsnProp({ type: AsnPropTypes.GeneralizedTime, context: 1, implicit: true, optional: true, })
5641
+ AsnProp({ type: AsnPropTypes.GeneralizedTime, context: 1, implicit: true, optional: true })
6427
5642
  ], PrivateKeyUsagePeriod.prototype, "notAfter", void 0);
6428
5643
 
6429
5644
  const id_entrust_entrustVersInfo = "1.2.840.113533.7.65.0";
@@ -6454,7 +5669,7 @@ class EntrustInfo extends BitString {
6454
5669
  }
6455
5670
  class EntrustVersionInfo {
6456
5671
  constructor(params = {}) {
6457
- this.entrustVers = '';
5672
+ this.entrustVers = "";
6458
5673
  this.entrustInfoFlags = new EntrustInfo();
6459
5674
  Object.assign(this, params);
6460
5675
  }
@@ -6484,12 +5699,12 @@ class AlgorithmIdentifier {
6484
5699
  Object.assign(this, params);
6485
5700
  }
6486
5701
  isEqual(data) {
6487
- return data instanceof AlgorithmIdentifier
6488
- && data.algorithm == this.algorithm
6489
- && ((data.parameters && this.parameters
6490
- && isEqual_1(data.parameters, this.parameters))
6491
- ||
6492
- (data.parameters === this.parameters));
5702
+ return (data instanceof AlgorithmIdentifier &&
5703
+ data.algorithm == this.algorithm &&
5704
+ ((data.parameters &&
5705
+ this.parameters &&
5706
+ buildExports.isEqual(data.parameters, this.parameters)) ||
5707
+ data.parameters === this.parameters));
6493
5708
  }
6494
5709
  }
6495
5710
  __decorate$1([
@@ -6575,14 +5790,14 @@ __decorate$1([
6575
5790
  ], Validity.prototype, "notAfter", void 0);
6576
5791
 
6577
5792
  var Extensions_1;
6578
- class Extension$1 {
5793
+ let Extension$1 = class Extension {
6579
5794
  constructor(params = {}) {
6580
5795
  this.extnID = "";
6581
- this.critical = Extension$1.CRITICAL;
5796
+ this.critical = Extension.CRITICAL;
6582
5797
  this.extnValue = new OctetString();
6583
5798
  Object.assign(this, params);
6584
5799
  }
6585
- }
5800
+ };
6586
5801
  Extension$1.CRITICAL = false;
6587
5802
  __decorate$1([
6588
5803
  AsnProp({ type: AsnPropTypes.ObjectIdentifier })
@@ -6924,7 +6139,10 @@ const mgf1SHA1 = new AlgorithmIdentifier({
6924
6139
  });
6925
6140
  const pSpecifiedEmpty = new AlgorithmIdentifier({
6926
6141
  algorithm: id_pSpecified,
6927
- parameters: AsnConvert.serialize(AsnOctetStringConverter.toASN(new Uint8Array([0xda, 0x39, 0xa3, 0xee, 0x5e, 0x6b, 0x4b, 0x0d, 0x32, 0x55, 0xbf, 0xef, 0x95, 0x60, 0x18, 0x90, 0xaf, 0xd8, 0x07, 0x09]).buffer)),
6142
+ parameters: AsnConvert.serialize(AsnOctetStringConverter.toASN(new Uint8Array([
6143
+ 0xda, 0x39, 0xa3, 0xee, 0x5e, 0x6b, 0x4b, 0x0d, 0x32, 0x55, 0xbf, 0xef, 0x95, 0x60, 0x18,
6144
+ 0x90, 0xaf, 0xd8, 0x07, 0x09,
6145
+ ]).buffer)),
6928
6146
  });
6929
6147
  create(id_rsaEncryption);
6930
6148
  create(id_md2WithRSAEncryption);
@@ -7115,13 +6333,13 @@ CompositeSignatureValue = CompositeSignatureValue_1 = __decorate$1([
7115
6333
 
7116
6334
  class EncryptedData extends OctetString {
7117
6335
  }
7118
- class EncryptedPrivateKeyInfo$1 {
6336
+ let EncryptedPrivateKeyInfo$1 = class EncryptedPrivateKeyInfo {
7119
6337
  constructor(params = {}) {
7120
6338
  this.encryptionAlgorithm = new AlgorithmIdentifier();
7121
6339
  this.encryptedData = new EncryptedData();
7122
6340
  Object.assign(this, params);
7123
6341
  }
7124
- }
6342
+ };
7125
6343
  __decorate$1([
7126
6344
  AsnProp({ type: AlgorithmIdentifier })
7127
6345
  ], EncryptedPrivateKeyInfo$1.prototype, "encryptionAlgorithm", void 0);
@@ -7145,14 +6363,14 @@ let Attributes$1 = Attributes_1$1 = class Attributes extends AsnArray {
7145
6363
  Attributes$1 = Attributes_1$1 = __decorate$1([
7146
6364
  AsnType({ type: AsnTypeTypes.Sequence, itemType: Attribute$1 })
7147
6365
  ], Attributes$1);
7148
- class PrivateKeyInfo$1 {
6366
+ let PrivateKeyInfo$1 = class PrivateKeyInfo {
7149
6367
  constructor(params = {}) {
7150
6368
  this.version = Version$3.v1;
7151
6369
  this.privateKeyAlgorithm = new AlgorithmIdentifier();
7152
6370
  this.privateKey = new PrivateKey();
7153
6371
  Object.assign(this, params);
7154
6372
  }
7155
- }
6373
+ };
7156
6374
  __decorate$1([
7157
6375
  AsnProp({ type: AsnPropTypes.Integer })
7158
6376
  ], PrivateKeyInfo$1.prototype, "version", void 0);
@@ -7243,21 +6461,41 @@ CompositePrivateKey = CompositePrivateKey_1 = __decorate$1([
7243
6461
  AsnType({ type: AsnTypeTypes.Sequence, itemType: OneAsymmetricKey })
7244
6462
  ], CompositePrivateKey);
7245
6463
 
7246
- var dayjs_min = {exports: {}};
6464
+ var dayjs_min$1 = {exports: {}};
6465
+
6466
+ var dayjs_min = dayjs_min$1.exports;
6467
+
6468
+ var hasRequiredDayjs_min;
6469
+
6470
+ function requireDayjs_min () {
6471
+ if (hasRequiredDayjs_min) return dayjs_min$1.exports;
6472
+ hasRequiredDayjs_min = 1;
6473
+ (function (module, exports) {
6474
+ !function(t,e){module.exports=e();}(dayjs_min,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
6475
+ } (dayjs_min$1));
6476
+ return dayjs_min$1.exports;
6477
+ }
6478
+
6479
+ var dayjs_minExports = requireDayjs_min();
6480
+ var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
7247
6481
 
7248
- (function (module, exports) {
7249
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
7250
- }(dayjs_min));
6482
+ var relativeTime$2 = {exports: {}};
7251
6483
 
7252
- const dayjs = dayjs_min.exports;
6484
+ var relativeTime$1 = relativeTime$2.exports;
7253
6485
 
7254
- var relativeTime$1 = {exports: {}};
6486
+ var hasRequiredRelativeTime;
7255
6487
 
7256
- (function (module, exports) {
7257
- !function(r,e){module.exports=e();}(commonjsGlobal,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
7258
- }(relativeTime$1));
6488
+ function requireRelativeTime () {
6489
+ if (hasRequiredRelativeTime) return relativeTime$2.exports;
6490
+ hasRequiredRelativeTime = 1;
6491
+ (function (module, exports) {
6492
+ !function(r,e){module.exports=e();}(relativeTime$1,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,true):i.diff(e,y.d,true));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,true)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
6493
+ } (relativeTime$2));
6494
+ return relativeTime$2.exports;
6495
+ }
7259
6496
 
7260
- const relativeTime = relativeTime$1.exports;
6497
+ var relativeTimeExports = requireRelativeTime();
6498
+ var relativeTime = /*@__PURE__*/getDefaultExportFromCjs(relativeTimeExports);
7261
6499
 
7262
6500
  /**
7263
6501
  * @license
@@ -7322,7 +6560,7 @@ const crlEntryExtensions = "CRL Entry Extensions";
7322
6560
  const previewCertificate = "Preview certificate";
7323
6561
  const viewDetails = "View details";
7324
6562
  const downloadOptions = "Download options";
7325
- const en = {
6563
+ var en = {
7326
6564
  basicInformation: basicInformation,
7327
6565
  subjectName: subjectName,
7328
6566
  issuerName: issuerName,
@@ -9476,6 +8714,9 @@ const OIDs = {
9476
8714
  '2.16.840.1.101.3.4.2.4': 'SHA-224',
9477
8715
  '2.16.840.1.101.3.4.3.1': 'DSA with Sha224',
9478
8716
  '2.16.840.1.101.3.4.3.2': 'DSA with Sha256',
8717
+ '2.16.840.1.101.3.4.3.17': 'ML-DSA-44',
8718
+ '2.16.840.1.101.3.4.3.18': 'ML-DSA-65',
8719
+ '2.16.840.1.101.3.4.3.19': 'ML-DSA-87',
9479
8720
  '2.16.840.1.113719.1.2.8': 'Novell Algorithm',
9480
8721
  '2.16.840.1.113719.1.2.8.22': 'DES Cbc IV8',
9481
8722
  '2.16.840.1.113719.1.2.8.23': 'DES Cbc Pad IV8',
@@ -9783,7 +9024,7 @@ var _Name_asn;
9783
9024
  class Name {
9784
9025
  constructor(data) {
9785
9026
  _Name_asn.set(this, new Name$1());
9786
- if (BufferSourceConverter_1.isBufferSource(data)) {
9027
+ if (buildExports.BufferSourceConverter.isBufferSource(data)) {
9787
9028
  __classPrivateFieldSet$1(this, _Name_asn, AsnParser.parse(data, Name$1), "f");
9788
9029
  }
9789
9030
  else {
@@ -9991,8 +9232,8 @@ let CaVersion = class CaVersion {
9991
9232
  data.set(new Uint8Array(this.value), 4 - this.value.byteLength);
9992
9233
  }
9993
9234
  return {
9994
- keyIndex: parseInt(Convert_1.ToHex(data.slice(0, 2)), 16),
9995
- certificateIndex: parseInt(Convert_1.ToHex(data.slice(2)), 16),
9235
+ keyIndex: parseInt(buildExports.Convert.ToHex(data.slice(0, 2)), 16),
9236
+ certificateIndex: parseInt(buildExports.Convert.ToHex(data.slice(2)), 16),
9996
9237
  };
9997
9238
  }
9998
9239
  };
@@ -10413,7 +9654,7 @@ class ByteStream {
10413
9654
  }
10414
9655
  constructor(bytes) {
10415
9656
  this.offset = 0;
10416
- this.view = BufferSourceConverter_1.toUint8Array(bytes);
9657
+ this.view = buildExports.BufferSourceConverter.toUint8Array(bytes);
10417
9658
  }
10418
9659
  read(size = 1) {
10419
9660
  const res = this.view.slice(this.offset, this.offset + size);
@@ -10429,7 +9670,7 @@ class ByteStream {
10429
9670
  }
10430
9671
  readNumber(size) {
10431
9672
  const bytes = this.read(size);
10432
- const hex = Convert_1.ToHex(bytes);
9673
+ const hex = buildExports.Convert.ToHex(bytes);
10433
9674
  return parseInt(hex, 16);
10434
9675
  }
10435
9676
  readEnd() {
@@ -10442,7 +9683,7 @@ class ByteStream {
10442
9683
 
10443
9684
  class Structure {
10444
9685
  static createStream(bytes) {
10445
- const view = BufferSourceConverter_1.toUint8Array(bytes);
9686
+ const view = buildExports.BufferSourceConverter.toUint8Array(bytes);
10446
9687
  return new ByteStream(view);
10447
9688
  }
10448
9689
  }
@@ -10486,7 +9727,7 @@ class SignedCertificateTimestamp extends Structure {
10486
9727
  parse(stream) {
10487
9728
  this.version = stream.readByte();
10488
9729
  stream.read(2);
10489
- this.logId = BufferSourceConverter_1.toArrayBuffer(stream.read(32));
9730
+ this.logId = buildExports.BufferSourceConverter.toArrayBuffer(stream.read(32));
10490
9731
  this.timestamp = new Date(stream.readNumber(8));
10491
9732
  const extLen = stream.readNumber(2);
10492
9733
  this.extensions = stream.read(extLen).buffer;
@@ -10497,12 +9738,12 @@ class SignedCertificateTimestamp extends Structure {
10497
9738
  toJSON() {
10498
9739
  return {
10499
9740
  version: this.version,
10500
- logId: Convert_1.ToHex(this.logId),
9741
+ logId: buildExports.Convert.ToHex(this.logId),
10501
9742
  timestamp: this.timestamp,
10502
- extensions: Convert_1.ToBase64(this.extensions),
9743
+ extensions: buildExports.Convert.ToBase64(this.extensions),
10503
9744
  hashAlgorithm: HashAlgorithm[this.hashAlgorithm] || "undefined",
10504
9745
  signatureAlgorithm: SignatureAlgorithm[this.signatureAlgorithm] || "undefined",
10505
- signature: Convert_1.ToBase64(this.signature),
9746
+ signature: buildExports.Convert.ToBase64(this.signature),
10506
9747
  };
10507
9748
  }
10508
9749
  }
@@ -10524,7 +9765,7 @@ class CertificateTransparency extends OctetString {
10524
9765
  return this;
10525
9766
  }
10526
9767
  toJSON() {
10527
- return this.items.map(o => o.toJSON());
9768
+ return this.items.map((o) => o.toJSON());
10528
9769
  }
10529
9770
  }
10530
9771
 
@@ -10668,7 +9909,12 @@ class LogotypeImageInfo {
10668
9909
  }
10669
9910
  }
10670
9911
  __decorate$1([
10671
- AsnProp({ type: AsnPropTypes.Integer, context: 0, implicit: true, defaultValue: LogotypeImageType.color })
9912
+ AsnProp({
9913
+ type: AsnPropTypes.Integer,
9914
+ context: 0,
9915
+ implicit: true,
9916
+ defaultValue: LogotypeImageType.color,
9917
+ })
10672
9918
  ], LogotypeImageInfo.prototype, "type", void 0);
10673
9919
  __decorate$1([
10674
9920
  AsnProp({ type: AsnPropTypes.Integer })
@@ -10786,7 +10032,7 @@ let JWTClaimNames = JWTClaimNames_1 = class JWTClaimNames extends AsnArray {
10786
10032
  JWTClaimNames = JWTClaimNames_1 = __decorate$1([
10787
10033
  AsnType({
10788
10034
  type: AsnTypeTypes.Sequence,
10789
- itemType: AsnPropTypes.IA5String
10035
+ itemType: AsnPropTypes.IA5String,
10790
10036
  })
10791
10037
  ], JWTClaimNames);
10792
10038
  class JWTClaimPermittedValues {
@@ -10816,7 +10062,7 @@ let JWTClaimPermittedValuesList = JWTClaimPermittedValuesList_1 = class JWTClaim
10816
10062
  JWTClaimPermittedValuesList = JWTClaimPermittedValuesList_1 = __decorate$1([
10817
10063
  AsnType({
10818
10064
  type: AsnTypeTypes.Sequence,
10819
- itemType: JWTClaimPermittedValues
10065
+ itemType: JWTClaimPermittedValues,
10820
10066
  })
10821
10067
  ], JWTClaimPermittedValuesList);
10822
10068
  class JWTClaimConstraints {
@@ -11058,6 +10304,12 @@ __decorate$1([
11058
10304
  __decorate$1([
11059
10305
  AsnProp({ context: 720, type: AsnPropTypes.Null, optional: true })
11060
10306
  ], AuthorizationList.prototype, "deviceUniqueAttestation", void 0);
10307
+ __decorate$1([
10308
+ AsnProp({ context: 723, type: OctetString, optional: true })
10309
+ ], AuthorizationList.prototype, "attestationIdSecondImei", void 0);
10310
+ __decorate$1([
10311
+ AsnProp({ context: 724, type: OctetString, optional: true })
10312
+ ], AuthorizationList.prototype, "moduleHash", void 0);
11061
10313
  var SecurityLevel;
11062
10314
  (function (SecurityLevel) {
11063
10315
  SecurityLevel[SecurityLevel["software"] = 0] = "software";
@@ -11072,6 +10324,8 @@ var Version;
11072
10324
  Version[Version["KM4_1"] = 4] = "KM4_1";
11073
10325
  Version[Version["keyMint1"] = 100] = "keyMint1";
11074
10326
  Version[Version["keyMint2"] = 200] = "keyMint2";
10327
+ Version[Version["keyMint3"] = 300] = "keyMint3";
10328
+ Version[Version["keyMint4"] = 400] = "keyMint4";
11075
10329
  })(Version || (Version = {}));
11076
10330
  class KeyDescription {
11077
10331
  constructor(params = {}) {
@@ -11110,6 +10364,67 @@ __decorate$1([
11110
10364
  __decorate$1([
11111
10365
  AsnProp({ type: AuthorizationList })
11112
10366
  ], KeyDescription.prototype, "teeEnforced", void 0);
10367
+ class KeyMintKeyDescription {
10368
+ constructor(params = {}) {
10369
+ this.attestationVersion = Version.keyMint4;
10370
+ this.attestationSecurityLevel = SecurityLevel.software;
10371
+ this.keyMintVersion = 0;
10372
+ this.keyMintSecurityLevel = SecurityLevel.software;
10373
+ this.attestationChallenge = new OctetString();
10374
+ this.uniqueId = new OctetString();
10375
+ this.softwareEnforced = new AuthorizationList();
10376
+ this.hardwareEnforced = new AuthorizationList();
10377
+ Object.assign(this, params);
10378
+ }
10379
+ toLegacyKeyDescription() {
10380
+ return new KeyDescription({
10381
+ attestationVersion: this.attestationVersion,
10382
+ attestationSecurityLevel: this.attestationSecurityLevel,
10383
+ keymasterVersion: this.keyMintVersion,
10384
+ keymasterSecurityLevel: this.keyMintSecurityLevel,
10385
+ attestationChallenge: this.attestationChallenge,
10386
+ uniqueId: this.uniqueId,
10387
+ softwareEnforced: this.softwareEnforced,
10388
+ teeEnforced: this.hardwareEnforced,
10389
+ });
10390
+ }
10391
+ static fromLegacyKeyDescription(keyDesc) {
10392
+ return new KeyMintKeyDescription({
10393
+ attestationVersion: keyDesc.attestationVersion,
10394
+ attestationSecurityLevel: keyDesc.attestationSecurityLevel,
10395
+ keyMintVersion: keyDesc.keymasterVersion,
10396
+ keyMintSecurityLevel: keyDesc.keymasterSecurityLevel,
10397
+ attestationChallenge: keyDesc.attestationChallenge,
10398
+ uniqueId: keyDesc.uniqueId,
10399
+ softwareEnforced: keyDesc.softwareEnforced,
10400
+ hardwareEnforced: keyDesc.teeEnforced,
10401
+ });
10402
+ }
10403
+ }
10404
+ __decorate$1([
10405
+ AsnProp({ type: AsnPropTypes.Integer })
10406
+ ], KeyMintKeyDescription.prototype, "attestationVersion", void 0);
10407
+ __decorate$1([
10408
+ AsnProp({ type: AsnPropTypes.Enumerated })
10409
+ ], KeyMintKeyDescription.prototype, "attestationSecurityLevel", void 0);
10410
+ __decorate$1([
10411
+ AsnProp({ type: AsnPropTypes.Integer })
10412
+ ], KeyMintKeyDescription.prototype, "keyMintVersion", void 0);
10413
+ __decorate$1([
10414
+ AsnProp({ type: AsnPropTypes.Enumerated })
10415
+ ], KeyMintKeyDescription.prototype, "keyMintSecurityLevel", void 0);
10416
+ __decorate$1([
10417
+ AsnProp({ type: OctetString })
10418
+ ], KeyMintKeyDescription.prototype, "attestationChallenge", void 0);
10419
+ __decorate$1([
10420
+ AsnProp({ type: OctetString })
10421
+ ], KeyMintKeyDescription.prototype, "uniqueId", void 0);
10422
+ __decorate$1([
10423
+ AsnProp({ type: AuthorizationList })
10424
+ ], KeyMintKeyDescription.prototype, "softwareEnforced", void 0);
10425
+ __decorate$1([
10426
+ AsnProp({ type: AuthorizationList })
10427
+ ], KeyMintKeyDescription.prototype, "hardwareEnforced", void 0);
11113
10428
 
11114
10429
  var NonStandardAuthorizationList_1;
11115
10430
  let NonStandardAuthorization = class NonStandardAuthorization extends AuthorizationList {
@@ -11123,7 +10438,7 @@ let NonStandardAuthorizationList = NonStandardAuthorizationList_1 = class NonSta
11123
10438
  Object.setPrototypeOf(this, NonStandardAuthorizationList_1.prototype);
11124
10439
  }
11125
10440
  findProperty(key) {
11126
- const prop = this.find((o => key in o));
10441
+ const prop = this.find((o) => key in o);
11127
10442
  if (prop) {
11128
10443
  return prop[key];
11129
10444
  }
@@ -11134,6 +10449,24 @@ NonStandardAuthorizationList = NonStandardAuthorizationList_1 = __decorate$1([
11134
10449
  AsnType({ type: AsnTypeTypes.Sequence, itemType: NonStandardAuthorization })
11135
10450
  ], NonStandardAuthorizationList);
11136
10451
  class NonStandardKeyDescription {
10452
+ get keyMintVersion() {
10453
+ return this.keymasterVersion;
10454
+ }
10455
+ set keyMintVersion(value) {
10456
+ this.keymasterVersion = value;
10457
+ }
10458
+ get keyMintSecurityLevel() {
10459
+ return this.keymasterSecurityLevel;
10460
+ }
10461
+ set keyMintSecurityLevel(value) {
10462
+ this.keymasterSecurityLevel = value;
10463
+ }
10464
+ get hardwareEnforced() {
10465
+ return this.teeEnforced;
10466
+ }
10467
+ set hardwareEnforced(value) {
10468
+ this.teeEnforced = value;
10469
+ }
11137
10470
  constructor(params = {}) {
11138
10471
  this.attestationVersion = Version.KM4;
11139
10472
  this.attestationSecurityLevel = SecurityLevel.software;
@@ -11170,6 +10503,23 @@ __decorate$1([
11170
10503
  __decorate$1([
11171
10504
  AsnProp({ type: NonStandardAuthorizationList })
11172
10505
  ], NonStandardKeyDescription.prototype, "teeEnforced", void 0);
10506
+ let NonStandardKeyMintKeyDescription = class NonStandardKeyMintKeyDescription extends NonStandardKeyDescription {
10507
+ constructor(params = {}) {
10508
+ if ("keymasterVersion" in params && !("keyMintVersion" in params)) {
10509
+ params.keyMintVersion = params.keymasterVersion;
10510
+ }
10511
+ if ("keymasterSecurityLevel" in params && !("keyMintSecurityLevel" in params)) {
10512
+ params.keyMintSecurityLevel = params.keymasterSecurityLevel;
10513
+ }
10514
+ if ("teeEnforced" in params && !("hardwareEnforced" in params)) {
10515
+ params.hardwareEnforced = params.teeEnforced;
10516
+ }
10517
+ super(params);
10518
+ }
10519
+ };
10520
+ NonStandardKeyMintKeyDescription = __decorate$1([
10521
+ AsnType({ type: AsnTypeTypes.Sequence })
10522
+ ], NonStandardKeyMintKeyDescription);
11173
10523
 
11174
10524
  class AttestationPackageInfo {
11175
10525
  constructor(params = {}) {
@@ -11272,7 +10622,7 @@ class AsnData {
11272
10622
  else {
11273
10623
  // raw, type
11274
10624
  __classPrivateFieldSet(this, _AsnData_asn, AsnConvert.parse(args[0], args[1]), "f");
11275
- __classPrivateFieldSet(this, _AsnData_raw, BufferSourceConverter_1.toArrayBuffer(args[0]), "f");
10625
+ __classPrivateFieldSet(this, _AsnData_raw, buildExports.BufferSourceConverter.toArrayBuffer(args[0]), "f");
11276
10626
  }
11277
10627
  }
11278
10628
  get asn() {
@@ -11349,12 +10699,12 @@ class Extension extends AsnData {
11349
10699
  }
11350
10700
  else {
11351
10701
  console.warn(`Didn't detect parser for "${this.asn.extnID}" extension.`);
11352
- this.value = Convert_1.ToHex(asnExtnValue);
10702
+ this.value = buildExports.Convert.ToHex(asnExtnValue);
11353
10703
  }
11354
10704
  }
11355
10705
  catch (error) {
11356
10706
  console.error(`Error parse "${this.asn.extnID}" extension:`, error.message);
11357
- this.value = Convert_1.ToHex(asnExtnValue);
10707
+ this.value = buildExports.Convert.ToHex(asnExtnValue);
11358
10708
  }
11359
10709
  }
11360
10710
  }
@@ -11399,7 +10749,7 @@ class PemConverter {
11399
10749
  const pemStruct = {
11400
10750
  type: matches[1],
11401
10751
  headers: [],
11402
- rawData: Convert_1.FromBase64(base64),
10752
+ rawData: buildExports.Convert.FromBase64(base64),
11403
10753
  };
11404
10754
  // read headers
11405
10755
  const headersString = matches[2];
@@ -11447,12 +10797,12 @@ class PemConverter {
11447
10797
  if (tag) {
11448
10798
  // encode BufferSource[]
11449
10799
  rawData.forEach((element) => {
11450
- if (!BufferSourceConverter_1.isBufferSource(element)) {
10800
+ if (!buildExports.BufferSourceConverter.isBufferSource(element)) {
11451
10801
  throw new TypeError('Cannot encode array of BufferSource in PEM format. Not all items of the array are BufferSource');
11452
10802
  }
11453
10803
  raws.push(this.encodeStruct({
11454
10804
  type: tag,
11455
- rawData: BufferSourceConverter_1.toArrayBuffer(element),
10805
+ rawData: buildExports.BufferSourceConverter.toArrayBuffer(element),
11456
10806
  }));
11457
10807
  });
11458
10808
  }
@@ -11472,7 +10822,7 @@ class PemConverter {
11472
10822
  }
11473
10823
  return this.encodeStruct({
11474
10824
  type: tag,
11475
- rawData: BufferSourceConverter_1.toArrayBuffer(rawData),
10825
+ rawData: buildExports.BufferSourceConverter.toArrayBuffer(rawData),
11476
10826
  });
11477
10827
  }
11478
10828
  /**
@@ -11492,7 +10842,7 @@ class PemConverter {
11492
10842
  }
11493
10843
  res.push(''); // blank line
11494
10844
  }
11495
- const base64 = Convert_1.ToBase64(pem.rawData);
10845
+ const base64 = buildExports.Convert.ToBase64(pem.rawData);
11496
10846
  let sliced;
11497
10847
  let offset = 0;
11498
10848
  const rows = Array();
@@ -11577,14 +10927,14 @@ const certificateRawToBuffer = (raw) => {
11577
10927
  if (PemConverter.isPem(raw)) {
11578
10928
  return PemConverter.decode(raw)[0];
11579
10929
  }
11580
- if (Convert_1.isHex(raw)) {
11581
- return Convert_1.FromHex(raw);
10930
+ if (buildExports.Convert.isHex(raw)) {
10931
+ return buildExports.Convert.FromHex(raw);
11582
10932
  }
11583
- if (Convert_1.isBase64(raw)) {
11584
- return Convert_1.FromBase64(raw);
10933
+ if (buildExports.Convert.isBase64(raw)) {
10934
+ return buildExports.Convert.FromBase64(raw);
11585
10935
  }
11586
- if (Convert_1.isBase64Url(raw)) {
11587
- return Convert_1.FromBase64Url(raw);
10936
+ if (buildExports.Convert.isBase64Url(raw)) {
10937
+ return buildExports.Convert.FromBase64Url(raw);
11588
10938
  }
11589
10939
  throw new TypeError("Unsupported format of 'raw' argument. Must be one of DER, PEM, HEX, Base64, or Base4Url");
11590
10940
  };
@@ -12154,7 +11504,7 @@ WebGDPR = __decorate$1([
12154
11504
 
12155
11505
  class IssuerAndSerialNumber {
12156
11506
  constructor(params = {}) {
12157
- this.issuer = new Name$1;
11507
+ this.issuer = new Name$1();
12158
11508
  this.serialNumber = new ArrayBuffer(0);
12159
11509
  Object.assign(this, params);
12160
11510
  }
@@ -12379,7 +11729,14 @@ __decorate$1([
12379
11729
  AsnProp({ type: OctetString, context: 0, implicit: true, optional: true })
12380
11730
  ], EncryptedContent.prototype, "value", void 0);
12381
11731
  __decorate$1([
12382
- AsnProp({ type: OctetString, converter: AsnConstructedOctetStringConverter, context: 0, implicit: true, optional: true, repeated: "sequence" })
11732
+ AsnProp({
11733
+ type: OctetString,
11734
+ converter: AsnConstructedOctetStringConverter,
11735
+ context: 0,
11736
+ implicit: true,
11737
+ optional: true,
11738
+ repeated: "sequence",
11739
+ })
12383
11740
  ], EncryptedContent.prototype, "constructedValue", void 0);
12384
11741
  EncryptedContent = __decorate$1([
12385
11742
  AsnType({ type: AsnTypeTypes.Choice })
@@ -13215,6 +12572,7 @@ const DownloadIcon = (props) => {
13215
12572
  h("path", { fill: `var(--pv-color-${color})`, d: "M21 12h-2c-.6 0-1 .4-1 1s.4 1 1 1h2c.6 0 1 .4 1 1v7c0 .6-.4 1-1 1H9c-.6 0-1-.4-1-1v-7c0-.6.4-1 1-1h2c.6 0 1-.4 1-1s-.4-1-1-1H9c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h12c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3Zm-9.7 5.7 3 3c.2.2.4.3.7.3.3 0 .5-.1.7-.3l3-3c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L16 17.6V6c0-.6-.4-1-1-1s-1 .4-1 1v11.6l-1.3-1.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4Z" })));
13216
12573
  };
13217
12574
 
13218
- export { EDIPartyName as $, AsnData as A, id_pkcs9_at_challengePassword as B, CertificationRequest as C, Download as D, ECParameters as E, ChallengePassword as F, id_pkcs9_at_unstructuredName as G, ExtensionRequest as H, InsuranceValue as I, AttributeCertificate as J, dateDiff as K, Link as L, l10n as M, Name as N, OIDs as O, PemConverter as P, dateShort as Q, RSAPublicKey as R, Name$1 as S, TypeRelationship as T, UnstructuredName as U, ValuationRanking as V, WebGDPR as W, OtherName as X, DisplayText as Y, UserNotice as Z, BufferSourceConverter_1 as _, DownloadIcon as a, __decorate$1 as a0, AsnProp as a1, AsnPropTypes as a2, AsnType as a3, AsnTypeTypes as a4, AsnArray as a5, id_qcs_pkixQCSyntax_v2 as a6, SemanticsInformation as a7, AsnIntegerArrayBufferConverter as a8, AttestationApplicationId as a9, PrivateKeyUsagePeriod as aA, EntrustVersionInfo as aB, BiometricSyntax as aC, LogotypeExtn as aD, TNAuthorizationList as aE, PolicyConstraints as aF, PolicyMappings as aG, CRLNumber as aH, IssuingDistributionPoint as aI, NonStandardKeyDescription as aJ, CabforganizationIdentifier as aK, Certificate as aL, id_composite_key as aM, CompositePublicKey as aN, id_alg_composite as aO, CompositeSignatureValue as aP, CompositeParams as aQ, SignedData as aR, EncapsulatedContent as aS, OctetString as aT, CertificateSet as aU, CertificateChoices as aV, ContentInfo as aW, CertificateList as aX, InvalidityDate as aY, CertificateIssuer as aZ, RootOfTrust as aa, IntegerSet as ab, KeyUsage as ac, BasicConstraints as ad, ExtendedKeyUsage as ae, SubjectKeyIdentifier as af, AuthorityKeyIdentifier as ag, CRLDistributionPoints as ah, AuthorityInfoAccessSyntax as ai, SubjectInfoAccessSyntax as aj, SubjectAlternativeName as ak, CertificatePolicies as al, CertificateTransparency as am, NameConstraints as an, CertificateTemplate as ao, EnrollCertTypeChoice as ap, CaVersion as aq, QCStatements as ar, NetscapeComment as as, NetscapeCertType as at, LeiRole as au, LeiChoice as av, Timestamp as aw, ArchiveRevInfo as ax, CRLReason as ay, SubjectDirectoryAttributes as az, AsnConvert as b, certificateRawToBuffer as c, downloadFromBuffer as d, id_rsaEncryption as e, Convert_1 as f, getCertificateThumbprint as g, id_pkcs9_at_extensionRequest as h, id_ecPublicKey as i, Extension as j, Attribute$1 as k, AsnParser as l, id_DomainNameBeneficiary as m, DomainNameBeneficiary as n, id_DomainNameLegalRepresentative as o, DomainNameLegalRepresentative as p, id_DomainNameOwner as q, DomainNameOwner as r, id_DomainNameTechnicalOperator as s, DomainNameTechnicalOperator as t, id_TypeRelationship as u, id_ActivityDescription as v, ActivityDescription as w, id_WebGDPR as x, id_InsuranceValue as y, id_ValuationRanking as z };
12575
+ export { CertificateList as $, AsnData as A, id_TypeRelationship as B, CertificationRequest as C, Download as D, ECParameters as E, id_DomainNameTechnicalOperator as F, id_DomainNameOwner as G, id_DomainNameLegalRepresentative as H, InsuranceValue as I, id_DomainNameBeneficiary as J, Certificate as K, Link as L, dateDiff as M, Name as N, id_composite_key as O, PemConverter as P, CompositePublicKey as Q, RSAPublicKey as R, id_alg_composite as S, TypeRelationship as T, UnstructuredName as U, ValuationRanking as V, WebGDPR as W, CompositeSignatureValue as X, CompositeParams as Y, dateShort as Z, OIDs as _, DownloadIcon as a, CRLReason as a0, InvalidityDate as a1, CertificateIssuer as a2, SignedData as a3, EncapsulatedContent as a4, OctetString as a5, CertificateSet as a6, CertificateChoices as a7, ContentInfo as a8, AttributeCertificate as a9, CertificatePolicies as aA, CertificateTransparency as aB, NameConstraints as aC, CertificateTemplate as aD, EnrollCertTypeChoice as aE, CaVersion as aF, QCStatements as aG, NetscapeComment as aH, NetscapeCertType as aI, LeiRole as aJ, LeiChoice as aK, Timestamp as aL, ArchiveRevInfo as aM, SubjectDirectoryAttributes as aN, PrivateKeyUsagePeriod as aO, EntrustVersionInfo as aP, BiometricSyntax as aQ, LogotypeExtn as aR, TNAuthorizationList as aS, PolicyConstraints as aT, PolicyMappings as aU, CRLNumber as aV, IssuingDistributionPoint as aW, NonStandardKeyDescription as aX, CabforganizationIdentifier as aY, Name$1 as aa, OtherName as ab, DisplayText as ac, UserNotice as ad, EDIPartyName as ae, __decorate$1 as af, AsnProp as ag, AsnPropTypes as ah, AsnType as ai, AsnTypeTypes as aj, AsnArray as ak, id_qcs_pkixQCSyntax_v2 as al, SemanticsInformation as am, AsnIntegerArrayBufferConverter as an, AttestationApplicationId as ao, RootOfTrust as ap, IntegerSet as aq, KeyUsage as ar, BasicConstraints as as, ExtendedKeyUsage as at, SubjectKeyIdentifier as au, AuthorityKeyIdentifier as av, CRLDistributionPoints as aw, AuthorityInfoAccessSyntax as ax, SubjectInfoAccessSyntax as ay, SubjectAlternativeName as az, AsnConvert as b, certificateRawToBuffer as c, downloadFromBuffer as d, id_rsaEncryption as e, buildExports as f, getCertificateThumbprint as g, id_pkcs9_at_extensionRequest as h, id_ecPublicKey as i, Extension as j, Attribute$1 as k, l10n as l, AsnParser as m, ExtensionRequest as n, ChallengePassword as o, ActivityDescription as p, DomainNameTechnicalOperator as q, DomainNameOwner as r, DomainNameLegalRepresentative as s, DomainNameBeneficiary as t, id_pkcs9_at_unstructuredName as u, id_pkcs9_at_challengePassword as v, id_ValuationRanking as w, id_InsuranceValue as x, id_WebGDPR as y, id_ActivityDescription as z };
12576
+ //# sourceMappingURL=download.js.map
13219
12577
 
13220
12578
  //# sourceMappingURL=download.js.map